aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/game.cpp1
-rw-r--r--engines/sci/include/engine.h3
-rw-r--r--engines/sci/scicore/script.cpp175
3 files changed, 88 insertions, 91 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index f76238ebce..1afc2ffe51 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -597,7 +597,6 @@ EngineState::EngineState() {
opcodes = 0;
memset(&selector_map, 0, sizeof(selector_map)); // FIXME: Remove this once/if we C++ify selector_map_t
- port_ID = 0;
successor = 0;
}
diff --git a/engines/sci/include/engine.h b/engines/sci/include/engine.h
index 2e29a0682a..a7d1c49cd9 100644
--- a/engines/sci/include/engine.h
+++ b/engines/sci/include/engine.h
@@ -266,9 +266,6 @@ struct EngineState {
selector_map_t selector_map; /* Shortcut list for important selectors */
- /* Backwards compatibility crap */
- int port_ID;
-
EngineState *successor; /* Successor of this state: Used for restoring */
};
diff --git a/engines/sci/scicore/script.cpp b/engines/sci/scicore/script.cpp
index 1675768cda..e0907b32c3 100644
--- a/engines/sci/scicore/script.cpp
+++ b/engines/sci/scicore/script.cpp
@@ -119,95 +119,96 @@ int script_find_selector(EngineState *s, const char *selectorname) {
return -1;
}
-#define FIND_SELECTOR(_slc_, _slcstr_) map->_slc_ = script_find_selector(s, _slcstr_);
+#define FIND_SELECTOR(_slc_) map->_slc_ = script_find_selector(s, #_slc_)
+#define FIND_SELECTOR2(_slc_, _slcstr_) map->_slc_ = script_find_selector(s, _slcstr_)
void script_map_selectors(EngineState *s, selector_map_t *map) {
- map->init = script_find_selector(s, "init");
- map->play = script_find_selector(s, "play");
- FIND_SELECTOR(replay, "replay");
- map->x = script_find_selector(s, "x");
- map->y = script_find_selector(s, "y");
- map->z = script_find_selector(s, "z");
- map->priority = script_find_selector(s, "priority");
- map->view = script_find_selector(s, "view");
- map->loop = script_find_selector(s, "loop");
- map->cel = script_find_selector(s, "cel");
- FIND_SELECTOR(brLeft, "brLeft");
- FIND_SELECTOR(brRight, "brRight");
- FIND_SELECTOR(brTop, "brTop");
- FIND_SELECTOR(brBottom, "brBottom");
- FIND_SELECTOR(xStep, "xStep");
- FIND_SELECTOR(yStep, "yStep");
- FIND_SELECTOR(nsBottom, "nsBottom");
- FIND_SELECTOR(nsTop, "nsTop");
- FIND_SELECTOR(nsLeft, "nsLeft");
- FIND_SELECTOR(nsRight, "nsRight");
- FIND_SELECTOR(font, "font");
- FIND_SELECTOR(text, "text");
- FIND_SELECTOR(type, "type");
- FIND_SELECTOR(state, "state");
- FIND_SELECTOR(doit, "doit");
- FIND_SELECTOR(delete_, "delete");
- FIND_SELECTOR(signal, "signal");
- FIND_SELECTOR(underBits, "underBits");
- FIND_SELECTOR(canBeHere, "canBeHere");
- FIND_SELECTOR(client, "client");
- FIND_SELECTOR(dx, "dx");
- FIND_SELECTOR(dy, "dy");
- FIND_SELECTOR(xStep, "xStep");
- FIND_SELECTOR(yStep, "yStep");
- FIND_SELECTOR(b_movCnt, "b-moveCnt");
- FIND_SELECTOR(b_i1, "b-i1");
- FIND_SELECTOR(b_i2, "b-i2");
- FIND_SELECTOR(b_di, "b-di");
- FIND_SELECTOR(b_xAxis, "b-xAxis");
- FIND_SELECTOR(b_incr, "b-incr");
- FIND_SELECTOR(completed, "completed");
- FIND_SELECTOR(illegalBits, "illegalBits");
- FIND_SELECTOR(dispose, "dispose");
- FIND_SELECTOR(prevSignal, "prevSignal");
- FIND_SELECTOR(message, "message");
- FIND_SELECTOR(modifiers, "modifiers");
- FIND_SELECTOR(cue, "cue");
- FIND_SELECTOR(owner, "owner");
- FIND_SELECTOR(handle, "handle");
- FIND_SELECTOR(number, "number");
- FIND_SELECTOR(max, "max");
- FIND_SELECTOR(cursor, "cursor");
- FIND_SELECTOR(claimed, "claimed");
- FIND_SELECTOR(edgeHit, "edgeHit");
- FIND_SELECTOR(wordFail, "wordFail");
- FIND_SELECTOR(syntaxFail, "syntaxFail");
- FIND_SELECTOR(semanticFail, "semanticFail");
- FIND_SELECTOR(cycler, "cycler");
- FIND_SELECTOR(elements, "elements");
- FIND_SELECTOR(lsTop, "lsTop");
- FIND_SELECTOR(lsBottom, "lsBottom");
- FIND_SELECTOR(lsLeft, "lsLeft");
- FIND_SELECTOR(lsRight, "lsRight");
- FIND_SELECTOR(baseSetter, "baseSetter");
- FIND_SELECTOR(who, "who");
- FIND_SELECTOR(distance, "distance");
- FIND_SELECTOR(mover, "mover");
- FIND_SELECTOR(looper, "looper");
- FIND_SELECTOR(isBlocked, "isBlocked");
- FIND_SELECTOR(heading, "heading");
- FIND_SELECTOR(mode, "mode");
- FIND_SELECTOR(caller, "caller");
- FIND_SELECTOR(moveDone, "moveDone");
- FIND_SELECTOR(vol, "vol");
- FIND_SELECTOR(pri, "pri");
- FIND_SELECTOR(min, "min");
- FIND_SELECTOR(sec, "sec");
- FIND_SELECTOR(frame, "frame");
- FIND_SELECTOR(dataInc, "dataInc");
- FIND_SELECTOR(size, "size");
- FIND_SELECTOR(palette, "palette");
- FIND_SELECTOR(moveSpeed, "moveSpeed");
- FIND_SELECTOR(cantBeHere, "cantBeHere");
- FIND_SELECTOR(nodePtr, "nodePtr");
- FIND_SELECTOR(flags, "flags");
- FIND_SELECTOR(points, "points");
+ FIND_SELECTOR(init);
+ FIND_SELECTOR(play);
+ FIND_SELECTOR(replay);
+ FIND_SELECTOR(x);
+ FIND_SELECTOR(y);
+ FIND_SELECTOR(z);
+ FIND_SELECTOR(priority);
+ FIND_SELECTOR(view);
+ FIND_SELECTOR(loop);
+ FIND_SELECTOR(cel);
+ FIND_SELECTOR(brLeft);
+ FIND_SELECTOR(brRight);
+ FIND_SELECTOR(brTop);
+ FIND_SELECTOR(brBottom);
+ FIND_SELECTOR(xStep);
+ FIND_SELECTOR(yStep);
+ FIND_SELECTOR(nsBottom);
+ FIND_SELECTOR(nsTop);
+ FIND_SELECTOR(nsLeft);
+ FIND_SELECTOR(nsRight);
+ FIND_SELECTOR(font);
+ FIND_SELECTOR(text);
+ FIND_SELECTOR(type);
+ FIND_SELECTOR(state);
+ FIND_SELECTOR(doit);
+ FIND_SELECTOR2(delete_, "delete");
+ FIND_SELECTOR(signal);
+ FIND_SELECTOR(underBits);
+ FIND_SELECTOR(canBeHere);
+ FIND_SELECTOR(client);
+ FIND_SELECTOR(dx);
+ FIND_SELECTOR(dy);
+ FIND_SELECTOR(xStep);
+ FIND_SELECTOR(yStep);
+ FIND_SELECTOR2(b_movCnt, "b-moveCnt");
+ FIND_SELECTOR2(b_i1, "b-i1");
+ FIND_SELECTOR2(b_i2, "b-i2");
+ FIND_SELECTOR2(b_di, "b-di");
+ FIND_SELECTOR2(b_xAxis, "b-xAxis");
+ FIND_SELECTOR2(b_incr, "b-incr");
+ FIND_SELECTOR(completed);
+ FIND_SELECTOR(illegalBits);
+ FIND_SELECTOR(dispose);
+ FIND_SELECTOR(prevSignal);
+ FIND_SELECTOR(message);
+ FIND_SELECTOR(modifiers);
+ FIND_SELECTOR(cue);
+ FIND_SELECTOR(owner);
+ FIND_SELECTOR(handle);
+ FIND_SELECTOR(number);
+ FIND_SELECTOR(max);
+ FIND_SELECTOR(cursor);
+ FIND_SELECTOR(claimed);
+ FIND_SELECTOR(edgeHit);
+ FIND_SELECTOR(wordFail);
+ FIND_SELECTOR(syntaxFail);
+ FIND_SELECTOR(semanticFail);
+ FIND_SELECTOR(cycler);
+ FIND_SELECTOR(elements);
+ FIND_SELECTOR(lsTop);
+ FIND_SELECTOR(lsBottom);
+ FIND_SELECTOR(lsLeft);
+ FIND_SELECTOR(lsRight);
+ FIND_SELECTOR(baseSetter);
+ FIND_SELECTOR(who);
+ FIND_SELECTOR(distance);
+ FIND_SELECTOR(mover);
+ FIND_SELECTOR(looper);
+ FIND_SELECTOR(isBlocked);
+ FIND_SELECTOR(heading);
+ FIND_SELECTOR(mode);
+ FIND_SELECTOR(caller);
+ FIND_SELECTOR(moveDone);
+ FIND_SELECTOR(vol);
+ FIND_SELECTOR(pri);
+ FIND_SELECTOR(min);
+ FIND_SELECTOR(sec);
+ FIND_SELECTOR(frame);
+ FIND_SELECTOR(dataInc);
+ FIND_SELECTOR(size);
+ FIND_SELECTOR(palette);
+ FIND_SELECTOR(moveSpeed);
+ FIND_SELECTOR(cantBeHere);
+ FIND_SELECTOR(nodePtr);
+ FIND_SELECTOR(flags);
+ FIND_SELECTOR(points);
}
int sci_hexdump(byte *data, int length, int offsetplus) {