aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-03 15:15:42 +0200
committerEugene Sandulenko2019-09-03 17:17:09 +0200
commitaf43070e150452c7876a6bc949c7ad36ae761508 (patch)
tree3892351edce10a44c298de8267b24ed237729700 /engines
parent106a63aa81a17d9598936785b55d80641d6432de (diff)
downloadscummvm-rg350-af43070e150452c7876a6bc949c7ad36ae761508.tar.gz
scummvm-rg350-af43070e150452c7876a6bc949c7ad36ae761508.tar.bz2
scummvm-rg350-af43070e150452c7876a6bc949c7ad36ae761508.zip
HDB: Implemented HDBGame::startMap()
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/hdb.cpp42
-rw-r--r--engines/hdb/hdb.h10
2 files changed, 52 insertions, 0 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index d4db1cf536..6e19f1e389 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -52,6 +52,8 @@ HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst
_window = new Window;
_rnd = new Common::RandomSource("hdb");
+ _currentMapname[0] = _currentLuaName[0] = 0;
+
DebugMan.addDebugChannel(kDebugExample1, "Example1", "This is just an example to test");
DebugMan.addDebugChannel(kDebugExample2, "Example2", "This is also an example");
}
@@ -145,6 +147,40 @@ void HDBGame::changeGameState() {
}
}
+bool HDBGame::restartMap() {
+ if (!_currentMapname[0])
+ return false;
+
+ warning("STUB: HDBGame::restartMap()");
+
+ return true;
+}
+
+bool HDBGame::startMap(char *name) {
+ // save last mapname
+ strcpy(_lastMapname, _currentMapname);
+
+ // set current mapname
+ strcpy(_currentMapname, name);
+ strcat(_currentMapname, ".MSM");
+
+ // set current luaname
+ strcpy(_currentLuaName, name );
+ strcat(_currentLuaName, ".LUA");
+
+ restartMap();
+
+ //
+ // here is where we will be autosaving the start of level
+ // don't save cine intro/outro/etc...OR map30 (secret star map)
+ //
+ if (!scumm_strnicmp(name, "map", 3) && scumm_stricmp(name, "map30")) {
+ //_menu->fillSavegameSlots();
+ saveSlot(0); // we ignore the slot parameter in everything else since we just keep saving...
+ }
+ return true;
+}
+
void HDBGame::paint() {
switch (_gameState) {
case GAME_TITLE:
@@ -322,6 +358,12 @@ void HDBGame::setTargetXY(int x, int y) {
}
}
+bool HDBGame::saveSlot(int slot) {
+ warning("STUB: HDBGame::saveSlot(%d)", slot);
+
+ return true;
+}
+
// PLAYER is trying to use this entity
void HDBGame::useEntity(AIEntity *e) {
warning("STUB: HDBGame::useEntity incomplete");
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index 62c266e442..53ac40fe5a 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -147,6 +147,12 @@ public:
bool init();
void start();
+
+ bool restartMap();
+ bool startMap(char *name);
+
+ bool saveSlot(int slot);
+
void setGameState(GameState gs) {
_gameState = gs;
}
@@ -209,8 +215,12 @@ private:
int _actionMode; // 0 or 1
int _pauseFlag;
+ char _currentMapname[64];
char _lastMapname[64];
+ char _currentLuaName[64];
+ char _lastLuaName[64];
+
};
extern HDBGame *g_hdb;