diff options
author | Robert Göffringmann | 2003-07-01 23:31:29 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-07-01 23:31:29 +0000 |
commit | c66457664ed3a235d0dba9a8982055147b4945b4 (patch) | |
tree | e2cecb900430dd6eeea16c8dd37fb564988ea1a8 /sky/control.cpp | |
parent | b7f9b1a5d88a0872ff40d8d540bebd120632eebf (diff) | |
download | scummvm-rg350-c66457664ed3a235d0dba9a8982055147b4945b4.tar.gz scummvm-rg350-c66457664ed3a235d0dba9a8982055147b4945b4.tar.bz2 scummvm-rg350-c66457664ed3a235d0dba9a8982055147b4945b4.zip |
removed useless AR saving leftovers and implemented fnRestoreGame()
svn-id: r8693
Diffstat (limited to 'sky/control.cpp')
-rw-r--r-- | sky/control.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/sky/control.cpp b/sky/control.cpp index 01e47f64aa..5c97b76992 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -292,6 +292,33 @@ void SkyControl::drawMainPanel(void) { _bodge->drawToScreen(WITH_MASK); } +void SkyControl::doLoadSavePanel(void) { + if (SkyState::isDemo() && (!SkyState::isCDVersion())) + return; // I don't think this can even happen + initPanel(); + _skyScreen->clearScreen(); + if (SkyState::_systemVars.gameVersion < 368) + _skyScreen->setPalette(60509); + else + _skyScreen->setPalette(60510); + + _savedMouse = _skyMouse->giveCurrentMouseType(); + _skyMouse->spriteMouse(MOUSE_NORMAL,0,0); + _lastButton = -1; + _curButtonText = 0; + _textSprite = NULL; + + saveRestorePanel(false); + + memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); + _system->copy_rect(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); + _system->update_screen(); + _skyScreen->forceRefresh(); + _skyScreen->setPalette((uint8*)SkyState::fetchCompact(SkyState::_systemVars.currentPalette)); + removePanel(); + _skyMouse->spriteMouse(_savedMouse, 0, 0); +} + void SkyControl::doControlPanel(void) { if (SkyState::isDemo() && (!SkyState::isCDVersion())) { @@ -335,7 +362,9 @@ void SkyControl::doControlPanel(void) { buttonControl(NULL); _text->drawToScreen(WITH_MASK); // flush text restore buffer drawMainPanel(); - if (clickRes == QUIT_PANEL) quitPanel = true; + if ((clickRes == QUIT_PANEL) || (clickRes == GAME_SAVED) || + (clickRes == GAME_RESTORED)) + quitPanel = true; } _mouseClicked = false; } @@ -1126,7 +1155,7 @@ uint16 SkyControl::parseSaveData(uint8 *srcBuf) { LODSD(srcPos, size); LODSD(srcPos, saveRev); - if (saveRev != SAVE_FILE_REVISION) { + if (saveRev > SAVE_FILE_REVISION) { warning("Unknown save file revision (%d)",saveRev); return RESTORE_FAILED; } |