aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-11 00:54:09 +0530
committerEugene Sandulenko2019-09-03 17:17:16 +0200
commitac4deacf500034a7b88dd73ea219a48367ec84f5 (patch)
treed4286bbc709812349c00ae241935e145a00a5be1
parent40765c4e9bab19906ce9e9581ccafb7528703e69 (diff)
downloadscummvm-rg350-ac4deacf500034a7b88dd73ea219a48367ec84f5.tar.gz
scummvm-rg350-ac4deacf500034a7b88dd73ea219a48367ec84f5.tar.bz2
scummvm-rg350-ac4deacf500034a7b88dd73ea219a48367ec84f5.zip
HDB: Unstub fillGameSaveSlots()
-rw-r--r--engines/hdb/menu.cpp21
-rw-r--r--engines/hdb/menu.h10
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