aboutsummaryrefslogtreecommitdiff
path: root/scumm/scumm.h
diff options
context:
space:
mode:
authorMax Horn2002-11-06 16:44:57 +0000
committerMax Horn2002-11-06 16:44:57 +0000
commit18153f22c9c45d03ed5a3b77d17d7b7a9c602b58 (patch)
treede2f5f8699674ed4eb9fe4c16a38bae1dd9c3253 /scumm/scumm.h
parent004afead33bceab805bde3c6ca6d299f582612af (diff)
downloadscummvm-rg350-18153f22c9c45d03ed5a3b77d17d7b7a9c602b58.tar.gz
scummvm-rg350-18153f22c9c45d03ed5a3b77d17d7b7a9c602b58.tar.bz2
scummvm-rg350-18153f22c9c45d03ed5a3b77d17d7b7a9c602b58.zip
why keep a seperate opcode entry & opcode description table if we can have it both in one (note that the descriptions were in fact outdated in some cases! also note, this is really just a refactoring, no functionality is changed except that opcode descriptions are now in sync with the opcode procs, that's why I am commiting this at all)
svn-id: r5445
Diffstat (limited to 'scumm/scumm.h')
-rw-r--r--scumm/scumm.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 8b5e4cc003..797390d497 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -43,6 +43,11 @@ struct FindObjectInRoom;
typedef void (Scumm::*OpcodeProc)();
+struct OpcodeEntry {
+ OpcodeProc proc;
+ const char *desc;
+};
+
// Use g_scumm from error() ONLY
extern Scumm *g_scumm;
@@ -60,6 +65,9 @@ struct ScummPoint {
int x, y;
};
+#include "gfx.h"
+#include "boxes.h"
+
struct MemBlkHeader {
uint32 size;
};
@@ -265,9 +273,6 @@ enum MouseButtonStatus {
msClicked = 2
};
-#include "gfx.h"
-#include "boxes.h"
-
class Scumm : public Engine {
public:
/* Put often used variables at the top.
@@ -450,13 +455,12 @@ public:
byte *_scriptPointer, *_scriptOrgPointer, *_scriptPointerStart;
byte _opcode, _numNestedScripts, _currentScript;
uint16 _curExecScript;
- const OpcodeProc *_opcodes;
- const char **_opcodes_lookup;
+ const OpcodeEntry *_opcodes;
byte **_lastCodePtr;
int _resultVarNumber, _scummStackPos;
int16 _localParamList[16], _scummStack[150];
- OpcodeProc getOpcode(int i) { return _opcodes[i]; }
+ OpcodeProc getOpcode(int i) { return _opcodes[i].proc; }
void initializeLocals(int slot, int16 *vars);
int getScriptSlot();
void runScript(int script, int a, int b, int16 *lvarptr);
@@ -985,6 +989,7 @@ public:
void o5_isLess();
void o5_isNotEqual();
void o5_ifState();
+ void o5_ifNotState();
void o5_isSoundRunning();
void o5_jumpRelative();
void o5_lessOrEqual();