diff options
-rw-r--r-- | engines/hdb/hdb.cpp | 53 | ||||
-rw-r--r-- | engines/hdb/hdb.h | 11 |
2 files changed, 59 insertions, 5 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 242bb4c479..11b3bc2634 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -58,6 +58,7 @@ HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst _currentMapname[0] = _currentLuaName[0] = 0; _lastMapname[0] = _lastLuaName[0] = 0; + _inMapName[0] = 0; _monkeystone7 = STARS_MONKEYSTONE_7_FAKE; _monkeystone14 = STARS_MONKEYSTONE_14_FAKE; @@ -652,6 +653,58 @@ void HDBGame::useEntity(AIEntity *e) { } } +struct { + const char *fName, *printName; +} mapNames[] = { + { "MAP00", "HDS Colby Jack" }, + { "MAP01", "Servandrones, Inc." }, + { "MAP02", "Pushbot Storage" }, + { "MAP03", "Rightbot Problems" }, + { "MAP04", "Shockbot Secrets" }, + { "MAP05", "The Drain Pain" }, + { "MAP06", "Energy Column Tower" }, + { "MAP07", "Water Supply Systems" }, + { "MAP08", "Food Supply Systems" }, + { "MAP09", "Purple Storage Room" }, + { "MAP10", "Back On The Jack" }, + { "MAP11", "Bridia" }, + { "MAP12", "BEAL Offices" }, + { "MAP13", "BEAL Labs" }, + { "MAP14", "Earthen Plain" }, + { "MAP15", "Fatfrog Swamp" }, + { "MAP16", "Fatfrog Deeps" }, + { "MAP17", "Glacier West" }, + { "MAP18", "Glacier East" }, + { "MAP19", "Mystery Pizza Factory" }, + { "MAP20", "Colby Jack Attack" }, + { "MAP21", "Pharitale" }, + { "MAP22", "Happy Meadow" }, + { "MAP23", "Water Caves" }, + { "MAP24", "Rocky Crag" }, + { "MAP25", "Dragon Deeps" }, + { "MAP26", "Lower Dragon Deeps" }, + { "MAP27", "Ice Dragon Valley" }, + { "MAP28", "Faerie Glade" }, + { "MAP29", "Palace In The Clouds" }, + { "MAP30", "Monkeystone Star Zone" }, +}; + +void HDBGame::setInMapName(const char *name) { + int i = 0; + + while (mapNames[i].fName) { + if (!scumm_stricmp(name, mapNames[i].fName)) { + memset(&_inMapName, 0, 32); + strcpy(_inMapName, mapNames[i].printName); + return; + } + i++; + } + + memset(&_inMapName, 0, 32); + strcpy(_inMapName, name); +} + Common::Error HDBGame::run() { // Initialize System diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h index 3444fbf3d7..e16ee5aca1 100644 --- a/engines/hdb/hdb.h +++ b/engines/hdb/hdb.h @@ -48,10 +48,6 @@ #include "hdb/sound.h" #include "hdb/window.h" -#define MAX_SNDCACHE_MEM 0x400000 // 4Mb of sounds in memory -#define MAX_TILES_CACHED 3500 // Max no of tiles in memory at once -#define GFX_CACHE_LIMIT 0x800000 - struct ADGameDescription; namespace HDB { @@ -211,7 +207,10 @@ public: return _timeSlice - _prevTimeSlice; } - char *lastMapname() { return _lastMapname; } + char *lastMapName() { return _lastMapname; } + char *currentMapName() { return _currentMapname; } + char *getInMapName() { return _inMapName; } + void setInMapName(const char *name); void changeLevel(const char *name) { strcpy(_changeMapname, name); @@ -253,6 +252,8 @@ private: char _currentLuaName[64]; char _lastLuaName[64]; + char _inMapName[32]; // Name Inside Map file + int32 _monkeystone7; int32 _monkeystone14; int32 _monkeystone21; |