diff options
author | Sven Hesse | 2009-07-05 11:28:57 +0000 |
---|---|---|
committer | Sven Hesse | 2009-07-05 11:28:57 +0000 |
commit | 4e70129d6033f2d9e4c7ec3d6806de66a61ad5c1 (patch) | |
tree | 8535afdbd1cf9635ba6de852e48c66dbce186b1c /engines/gob/game.cpp | |
parent | 3b9add8330f2498ba3ea49de5b745f183080c880 (diff) | |
download | scummvm-rg350-4e70129d6033f2d9e4c7ec3d6806de66a61ad5c1.tar.gz scummvm-rg350-4e70129d6033f2d9e4c7ec3d6806de66a61ad5c1.tar.bz2 scummvm-rg350-4e70129d6033f2d9e4c7ec3d6806de66a61ad5c1.zip |
Merging Game_v1's and Game_v2's prepareStart()
svn-id: r42127
Diffstat (limited to 'engines/gob/game.cpp')
-rw-r--r-- | engines/gob/game.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index b75726cc75..d8db743450 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -205,6 +205,42 @@ Game::~Game() { delete _hotspots; } +void Game::prepareStart() { + _vm->_global->_pPaletteDesc->unused2 = _vm->_draw->_unusedPalette2; + _vm->_global->_pPaletteDesc->unused1 = _vm->_draw->_unusedPalette1; + _vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaPalette; + + _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); + + _vm->_draw->initScreen(); + _vm->_video->fillRect(*_vm->_draw->_frontSurface, 0, 0, + _vm->_video->_surfWidth - 1, _vm->_video->_surfHeight - 1, 1); + + _vm->_util->setMousePos(152, 92); + _vm->_draw->_cursorX = _vm->_global->_inter_mouseX = 152; + _vm->_draw->_cursorY = _vm->_global->_inter_mouseY = 92; + + _vm->_draw->_invalidatedCount = 0; + _vm->_draw->_noInvalidated = true; + _vm->_draw->_applyPal = false; + _vm->_draw->_paletteCleared = false; + _vm->_draw->_cursorWidth = 16; + _vm->_draw->_cursorHeight = 16; + _vm->_draw->_transparentCursor = 1; + + for (int i = 0; i < 40; i++) { + _vm->_draw->_cursorAnimLow[i] = -1; + _vm->_draw->_cursorAnimDelays[i] = 0; + _vm->_draw->_cursorAnimHigh[i] = 0; + } + + _vm->_draw->_renderFlags = 0; + _vm->_draw->_backDeltaX = 0; + _vm->_draw->_backDeltaY = 0; + + _startTimeKey = _vm->_util->getTimeKey(); +} + void Game::capturePush(int16 left, int16 top, int16 width, int16 height) { int16 right; |