Don't store the engine state in the SciGuiPalette class. The palette timestamps are now calculated from Epoch time, instead of game start time (the functionality is exactly the same, though)

svn-id: r44773
This commit is contained in:
Filippos Karapetis 2009-10-08 08:00:30 +00:00
parent 0120111416
commit 498d80a510
4 changed files with 20 additions and 29 deletions

View file

@ -137,9 +137,16 @@ Common::Error SciEngine::run() {
_kernel = new Kernel(_resMan);
_vocabulary = new Vocabulary(_resMan);
SciGuiScreen *screen = new SciGuiScreen();
SciGuiPalette *palette = new SciGuiPalette(_resMan, screen);
SciGuiCursor *cursor = new SciGuiCursor(_resMan, palette);
// we'll set the gui and cursor below
_gamestate = new EngineState(_resMan, _kernel, _vocabulary, NULL, NULL, flags);
// We'll set the GUI below
_gamestate = new EngineState(_resMan, _kernel, _vocabulary, NULL, cursor, flags);
// Gui change
//_gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor); // new
_gamestate->_gui = new SciGui32(_gamestate, screen, palette, cursor); // old
if (script_init_engine(_gamestate))
return Common::kUnknownError;
@ -159,17 +166,6 @@ Common::Error SciEngine::run() {
GfxState gfx_state;
_gamestate->gfx_state = &gfx_state;
SciGuiScreen *screen = new SciGuiScreen();
SciGuiPalette *palette = new SciGuiPalette(_gamestate, screen);
SciGuiCursor *cursor = new SciGuiCursor(_resMan, palette);
_gamestate->_cursor = cursor;
_gamestate->_cursor->setMoveZone(Common::Rect(0, 0, 320, 200));
// Gui change
//_gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor); // new
_gamestate->_gui = new SciGui32(_gamestate, screen, palette, cursor); // old
// Assign default values to the config manager, in case settings are missing
ConfMan.registerDefault("dither_mode", "0");