Added a hack in kAddScreenItem to display the view in question on screen. Some parts of the main menu can be seen now in GK1

svn-id: r46528
This commit is contained in:
Filippos Karapetis 2009-12-24 14:18:16 +00:00
parent 69fa167902
commit c8a3d163d1
2 changed files with 11 additions and 4 deletions

View file

@ -28,6 +28,7 @@
#include "sci/engine/kernel.h" #include "sci/engine/kernel.h"
#include "sci/engine/segment.h" #include "sci/engine/segment.h"
#include "sci/engine/state.h" #include "sci/engine/state.h"
#include "sci/gui/gui.h"
namespace Sci { namespace Sci {
@ -594,11 +595,15 @@ reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) {
int16 viewId = GET_SEL32V(s->_segMan, viewObj, view); int16 viewId = GET_SEL32V(s->_segMan, viewObj, view);
int16 loopNo = GET_SEL32V(s->_segMan, viewObj, loop); int16 loopNo = GET_SEL32V(s->_segMan, viewObj, loop);
int16 celNo = GET_SEL32V(s->_segMan, viewObj, cel); int16 celNo = GET_SEL32V(s->_segMan, viewObj, cel);
//int16 leftPos = 0; int16 leftPos = 50; // HACK: lsLeft, perhaps? (but it's 0...)
//int16 topPos = 0; int16 topPos = 50; // HACK: lsTop, perhaps? (but it's 0...)
int16 priority = GET_SEL32V(s->_segMan, viewObj, priority); int16 priority = GET_SEL32V(s->_segMan, viewObj, priority);
//int16 control = 0; //int16 control = 0;
warning("kAddScreenItem, view %d, loop %d, cel %d, pri %d", viewId, loopNo, celNo, priority);
// HACK: just draw the view on screen
s->_gui->drawCel(viewId, loopNo, celNo, leftPos, topPos, priority, 0);
warning("kAddScreenItem, object %04x:%04x, view %d, loop %d, cel %d, pri %d", PRINT_REG(viewObj), viewId, loopNo, celNo, priority);
//s->_gui->addToPicView(viewId, loopNo, celNo, leftPos, topPos, priority, control); //s->_gui->addToPicView(viewId, loopNo, celNo, leftPos, topPos, priority, control);
return NULL_REG; return NULL_REG;
} }
@ -612,6 +617,7 @@ reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv) {
//int16 topPos = 0; //int16 topPos = 0;
int16 priority = GET_SEL32V(s->_segMan, viewObj, priority); int16 priority = GET_SEL32V(s->_segMan, viewObj, priority);
//int16 control = 0; //int16 control = 0;
warning("kUpdateScreenItem, view %d, loop %d, cel %d, pri %d", viewId, loopNo, celNo, priority); warning("kUpdateScreenItem, view %d, loop %d, cel %d, pri %d", viewId, loopNo, celNo, priority);
return NULL_REG; return NULL_REG;
} }

View file

@ -151,7 +151,8 @@ Common::Error SciEngine::run() {
#ifdef ENABLE_SCI32 #ifdef ENABLE_SCI32
if (getSciVersion() >= SCI_VERSION_2) { if (getSciVersion() >= SCI_VERSION_2) {
// Falsify the Views with a Dummy GUI // Falsify the Views with a Dummy GUI
_gamestate->_gui = new SciGuiDummy(_gamestate, screen, palette, cursor); //_gamestate->_gui = new SciGuiDummy(_gamestate, screen, palette, cursor);
_gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor); // new
} else { } else {
#endif #endif
#ifdef INCLUDE_OLDGFX #ifdef INCLUDE_OLDGFX