aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2010-10-22 21:08:27 +0000
committerPaul Gilbert2010-10-22 21:08:27 +0000
commit96723838c6559a2885cdbeaf1a207ee608ed9ce6 (patch)
treef0ecfb887ec1297dfa3700b8bb6dd29c9791075c /engines
parent9e9739c074420b2d3c080b91e25d52f121e14140 (diff)
downloadscummvm-rg350-96723838c6559a2885cdbeaf1a207ee608ed9ce6.tar.gz
scummvm-rg350-96723838c6559a2885cdbeaf1a207ee608ed9ce6.tar.bz2
scummvm-rg350-96723838c6559a2885cdbeaf1a207ee608ed9ce6.zip
TINSEL: Added new opcode set for the DW2 Demo
svn-id: r53708
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/scene.h6
-rw-r--r--engines/tinsel/tinlib.cpp44
-rw-r--r--engines/tinsel/tinsel.h2
3 files changed, 49 insertions, 3 deletions
diff --git a/engines/tinsel/scene.h b/engines/tinsel/scene.h
index e17a6ab7a0..2ef7da1289 100644
--- a/engines/tinsel/scene.h
+++ b/engines/tinsel/scene.h
@@ -78,9 +78,9 @@ enum REEL {
typedef enum { TRANS_DEF, TRANS_CUT, TRANS_FADE } TRANSITS;
// amount to shift scene handles by
-#define SCNHANDLE_SHIFT (TinselV2 ? 25 : 23)
-#define OFFSETMASK (TinselV2 ? 0x01ffffffL : 0x007fffffL)
-#define HANDLEMASK (TinselV2 ? 0xFE000000L : 0xFF800000L)
+#define SCNHANDLE_SHIFT ((TinselV2 && !IsDemo) ? 25 : 23)
+#define OFFSETMASK ((TinselV2 && !IsDemo) ? 0x01ffffffL : 0x007fffffL)
+#define HANDLEMASK ((TinselV2 && !IsDemo) ? 0xFE000000L : 0xFF800000L)
void DoHailScene(SCNHANDLE scene);
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index 766d4ed54a..b65be231bf 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -213,6 +213,43 @@ const MASTER_LIB_CODES DW1_CODES[] = {
HIGHEST_LIBCODE
};
+const MASTER_LIB_CODES DW2DEMO_CODES[] = {
+ ACTORBRIGHTNESS, ACTORDIRECTION, ACTORPALETTE, ACTORPRIORITY,
+ ACTORREF, ACTORRGB, ACTORSCALE, ACTORXPOS, ACTORYPOS,
+ ADDHIGHLIGHT, ADDINV, ADDINV1, ADDINV2, ADDOPENINV, ADDTOPIC,
+ BACKGROUND, CALLACTOR, CALLGLOBALPROCESS, CALLOBJECT,
+ CALLPROCESS, CALLSCENE, CALLTAG, CAMERA, CDCHANGESCENE,
+ CDDOCHANGE, CDLOAD, CDPLAY, CLEARHOOKSCENE, CLOSEINVENTORY,
+ CONTROL, CONVERSATION, CURSOR, CURSORXPOS, CURSORYPOS,
+ DECCONVW, DECCURSOR, DECFLAGS, DECINV1, DECINV2, DECINVW,
+ DECLEAD, DECSCALE, DECTAGFONT, DECTALKFONT, DELTOPIC,
+ DIMMUSIC, DROP, DROPOUT, EFFECTACTOR, ENABLEMENU, ENDACTOR,
+ ESCAPEOFF, ESCAPEON, EVENT, FACETAG, FADEIN, FADEOUT, FRAMEGRAB,
+ FREEZECURSOR, GETINVLIMIT, GHOST, GLOBALVAR, HASRESTARTED,
+ HAVE, HELDOBJECT, HIDEACTOR, HIDEBLOCK, HIDEEFFECT, HIDEPATH,
+ HIDEREFER, HIDETAG, HOLD, HOOKSCENE, IDLETIME, INSTANTSCROLL,
+ INVENTORY, INVPLAY, INWHICHINV, KILLACTOR, KILLGLOBALPROCESS,
+ KILLPROCESS, LOCALVAR, MOVECURSOR, MOVETAG, MOVETAGTO, NEWSCENE,
+ NOBLOCKING, NOPAUSE, NOSCROLL, OFFSET, OTHEROBJECT, PAUSE, PLAY,
+ PLAYMOVIE, PLAYRTF, PLAYSAMPLE, POINTACTOR, POINTTAG, POSTACTOR,
+ POSTGLOBALPROCESS, POSTOBJECT, POSTPROCESS, POSTTAG, PRINT,
+ PRINTCURSOR, PRINTOBJ, PRINTTAG, QUITGAME, RANDOM, RESETIDLETIME,
+ RESTARTGAME, RESTORESCENE, RUNMODE, SAVESCENE, SAY, SAYAT,
+ SCALINGREELS, SCREENXPOS, SCREENYPOS, SCROLL, SCROLLPARAMETERS,
+ SENDACTOR, SENDGLOBALPROCESS, SENDOBJECT, SENDPROCESS, SENDTAG,
+ SETBRIGHTNESS, SETINVLIMIT, SETINVSIZE, SETLANGUAGE, SETPALETTE,
+ SETSYSTEMSTRING, SETSYSTEMVAR, SHELL, SHOWACTOR, SHOWBLOCK,
+ SHOWEFFECT, SHOWPATH, SHOWREFER, SHOWTAG, STAND, STANDTAG,
+ STARTGLOBALPROCESS, STARTPROCESS, STARTTIMER, STOPWALK, SUBTITLES,
+ SWALK, SYSTEMVAR, TAGTAGXPOS, TAGTAGYPOS, TAGWALKXPOS, TAGWALKYPOS,
+ TALK, TALKAT, TALKPALETTEINDEX, TALKRGB, TALKVIA, THISOBJECT,
+ THISTAG, TIMER, TOPIC, TOPPLAY, TOPWINDOW, TRANSLUCENTINDEX,
+ UNDIMMUSIC, UNHOOKSCENE, WAITFRAME, WAITKEY, WAITSCROLL, WAITTIME,
+ WALK, WALKED, WALKEDPOLY, WALKEDTAG, WALKINGACTOR, WALKPOLY,
+ WALKTAG, WALKXPOS, WALKYPOS, WHICHCD, WHICHINVENTORY,
+ HIGHEST_LIBCODE
+};
+
const MASTER_LIB_CODES DW2_CODES[] = {
ACTORBRIGHTNESS, ACTORDIRECTION, ACTORPALETTE, ACTORPRIORITY,
ACTORREF, ACTORRGB, ACTORSCALE, ACTORXPOS, ACTORYPOS,
@@ -3978,6 +4015,12 @@ static void Walked(CORO_PARAM, int actor, int x, int y, SCNHANDLE film, bool esc
}
/**
+ */
+static void WalkedTag(uint16 actorId) {
+ RegisterMover(actorId);
+}
+
+/**
* Declare a moving actor.
*/
static void WalkingActor(uint32 id, SCNHANDLE *rp = NULL) {
@@ -4208,6 +4251,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
int libCode;
if (TinselV0) libCode = DW1DEMO_CODES[operand];
else if (!TinselV2) libCode = DW1_CODES[operand];
+ else if (_vm->getFeatures() & GF_DEMO) libCode = DW2DEMO_CODES[operand];
else libCode = DW2_CODES[operand];
debug(7, "CallLibraryRoutine op %d (escOn %d, myEscape %d)", operand, pic->escOn, pic->myEscape);
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index 04b8825ace..cb7701b048 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -139,6 +139,7 @@ typedef bool (*KEYFPTR)(const Common::KeyState &);
#define TinselV1 (TinselVersion == TINSEL_V1)
#define TinselV2 (TinselVersion == TINSEL_V2)
#define TinselV1PSX (TinselVersion == TINSEL_V1 && _vm->getPlatform() == Common::kPlatformPSX)
+#define IsDemo (_vm->getFeatures() & GF_DEMO)
// Global reference to the TinselEngine object
extern TinselEngine *_vm;
@@ -183,6 +184,7 @@ public:
uint32 getFeatures() const;
Common::Language getLanguage() const;
uint16 getVersion() const;
+ uint32 TinselEngine::getFlags() const;
Common::Platform getPlatform() const;
const char *getSampleIndex(LANGUAGE lang);