diff options
-rw-r--r-- | engines/hdb/menu.cpp | 21 | ||||
-rw-r--r-- | engines/hdb/menu.h | 10 |
2 files changed, 29 insertions, 2 deletions
diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp index a19e9b33da..6382d338f9 100644 --- a/engines/hdb/menu.cpp +++ b/engines/hdb/menu.cpp @@ -182,7 +182,26 @@ void Menu::drawTitle() { } void Menu::fillSavegameSlots() { - warning("STUB: PMenu::fillSavegameSlots()"); + int i; + int max = kNumSaveSlots; + + Common::InSaveFile *in; + Common::String saveGameFile; + + for (i = 0; i < max; i++) { + saveGameFile = Common::String::format("%s.%03d", g_hdb->getTargetName()->c_str(), i); + in = g_system->getSavefileManager()->openForLoading(saveGameFile); + + if (!in) { + memset(&_saveGames[i], 0, sizeof(Save)); + } else { + strcpy(_saveGames[i].saveID, saveGameFile.c_str()); + _saveGames[i].seconds = in->readUint32LE(); + in->read(_saveGames[i].mapName, 32); + delete in; + } + _saveGames[i].fileSlot = i + 1; + } } } // End of Namespace diff --git a/engines/hdb/menu.h b/engines/hdb/menu.h index 7dcf9fcb80..5c79f58872 100644 --- a/engines/hdb/menu.h +++ b/engines/hdb/menu.h @@ -48,6 +48,12 @@ namespace HDB { #define CONFIG_KEY_USE "keyuse" #define CONFIG_VOICES "voices" +#define TITLE_DELAY1 2 // time to wait before OOH OOH +#define TITLE_DELAY2 0.5 // time to spend doing OOH OOH +#define TITLE_DELAY3 1 // time to wait before ending title + +#define centerPic(x) (kScreenWidth / 2 - x->_width / 2) + enum { kStarRedX = 70, kStarRedY = 20, @@ -164,13 +170,15 @@ public: void fillSavegameSlots(); + Save _saveGames[kNumSaveSlots + 1]; + int _starWarp; int _titleCycle; uint32 _titleDelay; bool _titleActive; SoundType _resumeSong; // the song that was playing before entering the Options screen - Picture *_ohhOhhGfx; + Picture *_oohOohGfx; Picture *_titleScreen, *_titleLogo, *_hdbLogoScreen, *_menuBackoutGfx, *_controlButtonGfx, *_controlsGfx, *_menuBackspaceGfx; int _rocketY, _rocketYVel, _rocketEx; // Rocket Vars |