aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-11-10 01:02:58 +0100
committerPaul Gilbert2014-12-12 22:27:28 -0500
commit304db8ee6f963a4f647488623fd30ccb70472962 (patch)
tree0793c6d00a2512b60af5574dade0b764695446b0 /engines
parent6390f54d4b6e191d5b1f85d0a3f86e94bb110228 (diff)
downloadscummvm-rg350-304db8ee6f963a4f647488623fd30ccb70472962.tar.gz
scummvm-rg350-304db8ee6f963a4f647488623fd30ccb70472962.tar.bz2
scummvm-rg350-304db8ee6f963a4f647488623fd30ccb70472962.zip
ACCESS: Add some code to display scene number & description
Diffstat (limited to 'engines')
-rw-r--r--engines/access/amazon/amazon_resources.cpp18
-rw-r--r--engines/access/amazon/amazon_resources.h2
-rw-r--r--engines/access/debugger.cpp38
-rw-r--r--engines/access/debugger.h4
-rw-r--r--engines/access/martian/martian_resources.cpp15
-rw-r--r--engines/access/martian/martian_resources.h2
6 files changed, 74 insertions, 5 deletions
diff --git a/engines/access/amazon/amazon_resources.cpp b/engines/access/amazon/amazon_resources.cpp
index e60da5b0ff..42dc35aa8e 100644
--- a/engines/access/amazon/amazon_resources.cpp
+++ b/engines/access/amazon/amazon_resources.cpp
@@ -574,6 +574,24 @@ const byte *ROOM_TABLE[] = {
CAVE, nullptr, nullptr, nullptr, PIT, nullptr, nullptr
};
+const char *ROOM_DESCR[] = {
+ "TBD CREDITS", nullptr, nullptr, nullptr, "TBD ALLISTER",
+ "TBD HALL", "TBD JASONLAB", nullptr, "TBD ALLENLAB", "TBD OUTVAULT",
+ "TBD VAULT", "TBD LIBRARY", "TBD JASAPT", "TBD RANSACKED", "TBD MEAN1",
+ "TBD FLYSOUTH", "TBD CUZCO", "TBD INAIR", "TBD GREENMONKEY", "TBD INPLANE",
+ "TBD PILFALL", "TBD COCKPIT", "TBD CRASH", "TBD SINKING", "TBD JNGLWLK",
+ "TBD TOWN", "TBD HOTEL", "TBD CANTINA", nullptr, "TBD MASSACRE",
+ "TBD TRADE", "TBD BRIDGE", "TBD DOCK", "TBD DRIVER", nullptr,
+ nullptr, "TBD SHORE", "TBD BOAT", "TBD CABIN", "TBD CAPTIVE",
+ nullptr, nullptr, "TBD VILLAGE", nullptr, "TBD TREE",
+ "TBD CANOE", "TBD INTREE", "TBD FALLS", nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr, "TBD WATERFALL",
+ "TBD INWATER", nullptr, "TBD CAVE", nullptr, nullptr,
+ nullptr, "TBD PIT", nullptr, nullptr
+};
+
+const int ROOM_NUMB = 63;
+
const byte ELAINE[] = {
0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x0, 0x0, 0x0, 0x0, 0x41, 0x41, 0x0, 0x1, 0x0, 0xFF, 0x41, 0x0, 0x2,
diff --git a/engines/access/amazon/amazon_resources.h b/engines/access/amazon/amazon_resources.h
index 2be9b4dd4b..7aee90003e 100644
--- a/engines/access/amazon/amazon_resources.h
+++ b/engines/access/amazon/amazon_resources.h
@@ -36,6 +36,8 @@ extern const byte *CURSORS[10];
extern const int TRAVEL_POS[][2];
extern const byte *ROOM_TABLE[];
+extern const char *ROOM_DESCR[];
+extern const int ROOM_NUMB;
extern const byte *CHARTBL[];
diff --git a/engines/access/debugger.cpp b/engines/access/debugger.cpp
index d8f7cfe411..17ab6e101d 100644
--- a/engines/access/debugger.cpp
+++ b/engines/access/debugger.cpp
@@ -57,15 +57,38 @@ Debugger *Debugger::init(AccessEngine *vm) {
Debugger::Debugger(AccessEngine *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("scene", WRAP_METHOD(Debugger, Cmd_LoadScene));
+
+ switch (vm->getGameID()) {
+ case GType_Amazon:
+ _sceneNumb = Amazon::ROOM_NUMB;
+ _sceneDescr = new Common::String[_sceneNumb];
+ for (int i = 0; i < _sceneNumb; i++)
+ _sceneDescr[i] = Common::String(Amazon::ROOM_DESCR[i]);
+ break;
+ case GType_MartianMemorandum:
+ _sceneNumb = Martian::ROOM_NUMB;
+ _sceneDescr = new Common::String[_sceneNumb];
+ for (int i = 0; i < _sceneNumb; i++)
+ _sceneDescr[i] = Common::String(Martian::ROOM_DESCR[i]);
+ break;
+ default:
+ _sceneDescr = nullptr;
+ _sceneNumb = 0;
+ break;
+ }
}
bool Debugger::Cmd_LoadScene(int argc, const char **argv) {
- if (argc != 2) {
- debugPrintf("Current scene is: %d\n", _vm->_player->_roomNumber);
- debugPrintf("Usage: %s <scene number>\n", argv[0]);
+ switch (argc) {
+ case 1:
+ debugPrintf("Current scene is: %d\n\n", _vm->_player->_roomNumber);
+
+ for (int i = 0; i < _sceneNumb; i++)
+ if (_sceneDescr[i].size())
+ debugPrintf("%d - %s\n", i, _sceneDescr[i].c_str());
return true;
- }
- else {
+
+ case 2:
_vm->_player->_roomNumber = strToInt(argv[1]);
_vm->_room->_function = FN_CLEAR1;
@@ -75,6 +98,11 @@ bool Debugger::Cmd_LoadScene(int argc, const char **argv) {
_vm->_scripts->_returnCode = 0;
return false;
+
+ default:
+ debugPrintf("Current scene is: %d\n", _vm->_player->_roomNumber);
+ debugPrintf("Usage: %s <scene number>\n", argv[0]);
+ return true;
}
}
diff --git a/engines/access/debugger.h b/engines/access/debugger.h
index 67425430e2..60bd22358a 100644
--- a/engines/access/debugger.h
+++ b/engines/access/debugger.h
@@ -25,6 +25,8 @@
#include "common/scummsys.h"
#include "gui/debugger.h"
+#include "access/amazon/amazon_resources.h"
+#include "access/martian/martian_resources.h"
namespace Access {
@@ -35,6 +37,8 @@ protected:
AccessEngine *_vm;
bool Cmd_LoadScene(int argc, const char **argv);
+ Common::String *_sceneDescr;
+ int _sceneNumb;
public:
static Debugger *init(AccessEngine *vm);
public:
diff --git a/engines/access/martian/martian_resources.cpp b/engines/access/martian/martian_resources.cpp
index b596797ab5..5dfb766885 100644
--- a/engines/access/martian/martian_resources.cpp
+++ b/engines/access/martian/martian_resources.cpp
@@ -421,6 +421,21 @@ const byte *ROOM_TABLE[] = {
nullptr, nullptr, nullptr, nullptr, nullptr, ROOM_TABLE47
};
+const char *ROOM_DESCR[] = {
+ nullptr, "TBD ROOM_TABLE1", "TBD ROOM_TABLE2", "TBD ROOM_TABLE3", "TBD ROOM_TABLE4",
+ "TBD ROOM_TABLE5", "TBD ROOM_TABLE6", "TBD ROOM_TABLE7", "TBD ROOM_TABLE8", "TBD ROOM_TABLE9",
+ nullptr, "TBD ROOM_TABLE11", nullptr, "TBD ROOM_TABLE13", "TBD ROOM_TABLE14",
+ "TBD ROOM_TABLE15", "TBD ROOM_TABLE16", "TBD ROOM_TABLE17", "TBD ROOM_TABLE18", nullptr,
+ nullptr, "TBD ROOM_TABLE21", "TBD ROOM_TABLE22", "TBD ROOM_TABLE23", "TBD ROOM_TABLE24",
+ "TBD ROOM_TABLE25", "TBD ROOM_TABLE26", "TBD ROOM_TABLE27", "TBD ROOM_TABLE28", "TBD ROOM_TABLE29",
+ "TBD ROOM_TABLE30", "TBD ROOM_TABLE31", "TBD ROOM_TABLE32", "TBD ROOM_TABLE33", nullptr,
+ "TBD ROOM_TABLE35", nullptr, "TBD ROOM_TABLE37", "TBD ROOM_TABLE38", "TBD ROOM_TABLE39",
+ nullptr, nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, "TBD ROOM_TABLE47"
+};
+
+const int ROOM_NUMB = 48;
+
const byte CHAR_TABLE0[] = {
0x02, 0x31, 0x00, 0x08, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
diff --git a/engines/access/martian/martian_resources.h b/engines/access/martian/martian_resources.h
index a6ababeec3..ab8dfb4d1a 100644
--- a/engines/access/martian/martian_resources.h
+++ b/engines/access/martian/martian_resources.h
@@ -38,6 +38,8 @@ extern const int TRAVEL_POS[][2];
extern const char *const INVENTORY_NAMES[];
extern const byte *ROOM_TABLE[];
+extern const char *ROOM_DESCR[];
+extern const int ROOM_NUMB;
extern const byte *CHAR_TABLE[];