diff options
author | Filippos Karapetis | 2009-11-20 13:29:42 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-11-20 13:29:42 +0000 |
commit | e7820f972d3c186e241fff34b42ddada3583c443 (patch) | |
tree | 5a7dd8f6ea7c15f3fdb6521e74bedcd4b2803ba8 /engines/sci | |
parent | a70aa90f6285b128bd75d537b504960b767e5468 (diff) | |
download | scummvm-rg350-e7820f972d3c186e241fff34b42ddada3583c443.tar.gz scummvm-rg350-e7820f972d3c186e241fff34b42ddada3583c443.tar.bz2 scummvm-rg350-e7820f972d3c186e241fff34b42ddada3583c443.zip |
Selector cleanup: rearranged all selectors to be in the same order as in Sierra's dictionary files, and removed several unused selectors
svn-id: r46005
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/script.cpp | 7 | ||||
-rw-r--r-- | engines/sci/engine/static_selectors.cpp | 23 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 143 |
3 files changed, 80 insertions, 93 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 036bae3439..f7291683bf 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -214,14 +214,7 @@ void Kernel::mapSelectors() { FIND_SELECTOR2(delete_, "delete"); FIND_SELECTOR(z); // ----------------------------- - FIND_SELECTOR(init); - FIND_SELECTOR(dispose); FIND_SELECTOR(size); - FIND_SELECTOR(caller); - FIND_SELECTOR(cue); - FIND_SELECTOR(owner); - FIND_SELECTOR(completed); - FIND_SELECTOR(cycler); FIND_SELECTOR(moveDone); FIND_SELECTOR(vol); FIND_SELECTOR(pri); diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp index eee558dc5a..89e194fea5 100644 --- a/engines/sci/engine/static_selectors.cpp +++ b/engines/sci/engine/static_selectors.cpp @@ -63,32 +63,25 @@ static const char * const sci1Selectors[] = { // Taken from Codename: Iceman (Full Game) static const SelectorRemap sci0SelectorRemap[] = { - { "caller", 119 }, { "cue", 121 }, { "owner", 130 }, - { "completed", 159 }, { "cycler", 164 }, { "moveDone", 170 }, - { "distance", 173 }, { "setCursor", 254 }, { "overlay", 270 }, - { "points", 316 }, { "flags", 368 }, { 0, 0 } + { "cue", 121 }, { "moveDone", 170 }, { "setCursor", 254 }, + { "overlay", 270 }, { "points", 316 }, { "flags", 368 }, + { 0, 0 } }; // Taken from Leisure Suit Larry 1 VGA (Full Game) static const SelectorRemap sci1SelectorRemap[] = { { "nodePtr", 44 }, { "cantBeHere", 57 }, { "topString", 101 }, - { "flags", 102 }, { "init", 104 }, { "dispose", 105 }, - { "caller", 134 }, { "cue", 136 }, { "owner", 150 }, - { "setVol", 156 }, { "newRoom", 173 }, { "setCursor", 183 }, - { "completed", 210 }, { "cycler", 215 }, { "distance", 224 }, - { "canBeHere", 232 }, { "syncTime", 247 }, { "syncCue", 248 }, - { 0, 0 } + { "flags", 102 }, { "dispose", 105 }, { "newRoom", 173 }, + { "setCursor", 183 }, { "canBeHere", 232 }, { "syncTime", 247 }, + { "syncCue", 248 }, { 0, 0 } }; // Taken from KQ6 floppy (Full Game) static const SelectorRemap sci11SelectorRemap[] = { { "nodePtr", 41 }, { "cantBeHere", 54 }, { "topString", 98 }, { "flags", 99 }, { "scaleX", 104 }, { "scaleY", 105 }, - { "init", 110 }, { "dispose", 111 }, { "caller", 143 }, - { "cue", 145 }, { "owner", 166 }, { "setVol", 172 }, - { "setCursor", 197 }, { "completed", 242 }, { "cycler", 247 }, - { "distance", 256 }, { "canBeHere", 264 }, { "syncTime", 279 }, - { "syncCue", 280 }, { 0, 0 } + { "dispose", 111 }, { "setCursor", 197 }, { "canBeHere", 264 }, + { "syncTime", 279 }, { "syncCue", 280 }, { 0, 0 } }; Common::StringList Kernel::checkStaticSelectorNames() { diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index 06c09a1a52..55af3f84aa 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -103,8 +103,8 @@ enum SelectorType { }; struct Class { - int script; /**< number of the script the class is in, -1 for non-existing */ - reg_t reg; /**< offset; script-relative offset, segment: 0 if not instantiated */ + int script; // number of the script the class is in, -1 for non-existing */ + reg_t reg; // offset; script-relative offset, segment: 0 if not instantiated */ }; #define RAW_IS_OBJECT(datablock) (READ_LE_UINT16(((byte *) datablock) + SCRIPT_OBJECT_MAGIC_OFFSET) == SCRIPT_OBJECT_MAGIC_NUMBER) @@ -115,84 +115,85 @@ struct SelectorCache { memset(this, 0, sizeof(*this)); } - Selector init; /**< Init function */ - Selector play; /**< Play function (first function to be called) */ - Selector replay; /**< Replay function */ - Selector x, y, z; /**< Coordinates */ - Selector priority; - Selector view, loop, cel; /**< Description of a specific image */ - Selector brLeft, brRight, brTop, brBottom; /**< Bounding Rectangle */ - Selector xStep, yStep; /**< BR adjustments */ - Selector nsLeft, nsRight, nsTop, nsBottom; /**< View boundaries ('now seen') */ - Selector text, font; /**< Used by controls */ - Selector type, state; /**< Used by contols as well */ - Selector doit; /**< Called (!) by the Animate() system call */ - Selector signal; /**< Used by Animate() to control a view's behaviour */ - Selector underBits; /**< Used by the graphics subroutines to store backupped BG pic data */ - Selector scaleX, scaleY; /**< SCI1.1 view scaling */ - - /* The following selectors are used by the Bresenham syscalls: */ - Selector canBeHere; /**< Funcselector: Checks for movement validity */ - Selector client; /**< The object that wants to be moved */ - Selector cycler; /**< The cycler of the client */ - Selector dx, dy; /**< Deltas */ - Selector b_movCnt, b_i1, b_i2, b_di, b_xAxis, b_incr; /**< Various Bresenham vars */ - Selector completed; - - Selector illegalBits; /**< Used by CanBeHere */ - Selector dispose; - - Selector message, modifiers; /**< Used by GetEvent */ - - Selector owner, handle; - Selector cue; + // Statically defined selectors, (almost the) same in all SCI versions + Selector y; + Selector x; + Selector view, loop, cel; // Description of a specific image + Selector underBits; // Used by the graphics subroutines to store backupped BG pic data + Selector nsTop, nsLeft, nsBottom, nsRight; // View boundaries ('now seen') + Selector lsTop, lsLeft, lsBottom, lsRight; // Used by Animate() subfunctions and scroll list controls + Selector signal; // Used by Animate() to control a view's behaviour + Selector illegalBits; // Used by CanBeHere + Selector brTop, brLeft, brBottom, brRight; // Bounding Rectangle + // name, key, time + Selector text; // Used by controls + Selector elements; // Used by SetSynonyms() + // color, back + Selector mode; // Used by text controls (-> DrawControl()) + // style + Selector state, font, type; // Used by controls + // window + Selector cursor, max; // Used by EditControl + // mark, who + Selector message; // Used by GetEvent + // edit + Selector play; // Play function (first function to be called) Selector number; - - Selector max, cursor; /**< Used by EditControl */ - Selector mode; /**< Used by text controls (-> DrawControl()) */ - - Selector wordFail, syntaxFail; /**< Used by Parse() */ - - Selector claimed; /**< Used generally by the event mechanism */ - - Selector elements; /**< Used by SetSynonyms() */ - - Selector lsTop, lsBottom, lsRight, lsLeft; /**< Used by Animate() subfunctions and scroll list controls */ - Selector topString; /**< SCI1 scroll lists use this instead of lsTop */ - - Selector looper, mover, isBlocked, heading; /**< Used in DoAvoider */ - - Selector caller, moveDone, moveSpeed; /**< Used for DoBresen */ - - Selector delete_; /**< Called by Animate() to dispose a view object */ - - Selector vol; - Selector pri; - - Selector min; /**< SMPTE time format */ + Selector handle; // Replaced by nodePtr in SCI1+ + Selector nodePtr; // Replaces handle in SCI1+ + Selector client; // The object that wants to be moved + Selector dx, dy; // Deltas + Selector b_movCnt, b_i1, b_i2, b_di, b_xAxis, b_incr; // Various Bresenham vars + Selector xStep, yStep; // BR adjustments + Selector moveSpeed; // Used for DoBresen + Selector canBeHere; // Funcselector: Checks for movement validity + Selector heading, mover; // Used in DoAvoider + Selector doit; // Called (!) by the Animate() system call + Selector isBlocked, looper; // Used in DoAvoider + Selector priority; + Selector modifiers; // Used by GetEvent + Selector replay; // Replay function + // setPri, at, next, done, width + Selector wordFail, syntaxFail; // Used by Parse() + // semanticFail, pragmaFail + // said + Selector claimed; // Used generally by the event mechanism + // value, save, restore, title, button, icon, draw + Selector delete_; // Called by Animate() to dispose a view object + Selector z; + + // SCI1+ static selectors + Selector parseLang; + Selector printLang; // Used for i18n + Selector subtitleLang; + Selector size; + Selector points; // Used by AvoidPath() + Selector palette; + Selector dataInc; + // handle (in SCI1) + Selector min; // SMPTE time format Selector sec; Selector frame; + Selector vol; + Selector pri; + // perform + Selector moveDone; // used for DoBresen - Selector dataInc; - Selector size; - Selector palette; + // SCI1 selectors which have been moved a bit in SCI1.1, but otherwise static Selector cantBeHere; - Selector nodePtr; + Selector topString; // SCI1 scroll lists use this instead of lsTop Selector flags; - Selector overlay; /**< Used to determine if a game is using old gfx functions or not */ - - Selector points; /**< Used by AvoidPath() */ - - Selector syncCue; /**< Used by DoSync() */ + // SCI1+ music-related selectors, not static + Selector syncCue; // Used by DoSync() Selector syncTime; - Selector printLang; /**< Used for i18n */ - Selector subtitleLang; - Selector parseLang; + // SCI1.1 specific selectors + Selector scaleX, scaleY; // SCI1.1 view scaling + // Used for auto detection purposes + Selector overlay; /** Used to determine if a game is using old gfx functions or not */ Selector newRoom; /** For SCI1 lofs parameter type autodetection fallback */ - Selector setCursor; /** For autodetection */ }; @@ -292,8 +293,8 @@ enum BreakpointType { struct Breakpoint { BreakpointType type; union { - uint32 address; /**< Breakpoints on exports */ - char *name; /**< Breakpoints on selector names */ + uint32 address; // Breakpoints on exports */ + char *name; // Breakpoints on selector names */ } data; Breakpoint *next; }; |