[Scummvm-cvs-logs] SF.net SVN: scummvm: [26485] scummvm/trunk/engines/lure
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sun Apr 15 12:43:32 CEST 2007
Revision: 26485
http://scummvm.svn.sourceforge.net/scummvm/?rev=26485&view=rev
Author: dreammaster
Date: 2007-04-15 03:43:31 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
Added new script methods
Modified Paths:
--------------
scummvm/trunk/engines/lure/scripts.cpp
scummvm/trunk/engines/lure/scripts.h
Modified: scummvm/trunk/engines/lure/scripts.cpp
===================================================================
--- scummvm/trunk/engines/lure/scripts.cpp 2007-04-15 08:34:53 UTC (rev 26484)
+++ scummvm/trunk/engines/lure/scripts.cpp 2007-04-15 10:43:31 UTC (rev 26485)
@@ -439,6 +439,14 @@
hotspot->tickProcOffset = 0x7efa;
}
+// Free Goewin from captivity
+
+void Script::freeGoewin(uint16 v1, uint16 v2, uint16 v3) {
+ HotspotData *goewin = Resources::getReference().getHotspot(GOEWIN_ID);
+ goewin->actions = 0x820C00; // Enable Talk To, Give, Bribe, and Ask for
+ goewin->actionCtr = 1;
+}
+
// Barman serving the player
void Script::barmanServe(uint16 v1, uint16 v2, uint16 v3) {
@@ -461,6 +469,16 @@
fields.setField(GENERAL, fields.numGroats());
}
+// Enables the talk action on the two gargoyles
+
+void Script::enableGargoylesTalk(uint16 v1, uint16 v2, uint16 v3) {
+ Resources &res = Resources::getReference();
+ HotspotData *g1 = res.getHotspot(0x42C);
+ HotspotData *g2 = res.getHotspot(0x42D);
+ g1->actions = 1 << (TALK_TO - 1);
+ g2->actions = 1 << (TALK_TO - 1);
+}
+
// Loads the specified animation, completely bypassing the standard process
// of checking for a load proc/sequence
@@ -549,8 +567,10 @@
{50, Script::givePlayerItem},
{51, Script::decreaseNumGroats},
{54, Script::setVillageSkorlTickProc},
+ {55, Script::freeGoewin},
{56, Script::barmanServe},
{57, Script::getNumGroats},
+ {59, Script::enableGargoylesTalk},
{62, Script::animationLoad},
{63, Script::addActions},
{64, Script::randomToGeneral},
@@ -911,9 +931,9 @@
opcode = nextVal(scriptData, offset);
switch (opcode) {
- case S2_OPCODE_TIMEOUT:
+ case S2_OPCODE_FRAME_CTR:
param1 = nextVal(scriptData, offset);
- debugC(ERROR_DETAILED, kLureDebugScripts, "SET TIMEOUT = %d", param1);
+ debugC(ERROR_DETAILED, kLureDebugScripts, "SET FRAME_CTR = %d", param1);
h->setTickCtr(param1);
h->setScript(offset);
@@ -964,22 +984,21 @@
h->setAnimation(param1);
break;
- case S2_OPCODE_UNKNOWN_247:
+ case S2_OPCODE_PLAY_SOUND:
param1 = nextVal(scriptData, offset);
param2 = nextVal(scriptData, offset);
- debugC(ERROR_DETAILED, kLureDebugScripts, "SUB_247(%d,%d)", param1, param2);
-
+ debugC(ERROR_DETAILED, kLureDebugScripts, "PLAY_SOUND(%d,%d)", param1, param2);
// warning("UNKNOWN_247 stub called");
break;
- case S2_OPCODE_UNKNOWN_258:
+ case S2_OPCODE_STOP_SOUND:
param1 = nextVal(scriptData, offset);
- debugC(ERROR_DETAILED, kLureDebugScripts, "SUB_258()");
+ debugC(ERROR_DETAILED, kLureDebugScripts, "STOP_SOUND()");
// warning("UNKNOWN_258 stub called");
break;
case S2_OPCODE_ACTIONS:
- param1 = nextVal(scriptData, offset) << 4;
+ param1 = nextVal(scriptData, offset);
param2 = nextVal(scriptData, offset);
actions = (uint32) param1 | ((uint32) param2 << 16);
Modified: scummvm/trunk/engines/lure/scripts.h
===================================================================
--- scummvm/trunk/engines/lure/scripts.h 2007-04-15 08:34:53 UTC (rev 26484)
+++ scummvm/trunk/engines/lure/scripts.h 2007-04-15 10:43:31 UTC (rev 26485)
@@ -57,15 +57,15 @@
#define S_OPCODE_ABORT3 24
#define S_OPCODE_RANDOM 25
-#define S2_OPCODE_TIMEOUT -1
+#define S2_OPCODE_FRAME_CTR -1
#define S2_OPCODE_POSITION -2
#define S2_OPCODE_CHANGE_POS -3
#define S2_OPCODE_UNLOAD -4
#define S2_OPCODE_DIMENSIONS -5
#define S2_OPCODE_JUMP -6
#define S2_OPCODE_ANIMATION -7
-#define S2_OPCODE_UNKNOWN_247 -8
-#define S2_OPCODE_UNKNOWN_258 -9
+#define S2_OPCODE_PLAY_SOUND -8
+#define S2_OPCODE_STOP_SOUND -9
#define S2_OPCODE_ACTIONS -10
@@ -116,8 +116,10 @@
static void givePlayerItem(uint16 hotspotId, uint16 v2, uint16 v3);
static void decreaseNumGroats(uint16 characterId, uint16 numGroats, uint16 v3);
static void setVillageSkorlTickProc(uint16 v1, uint16 v2, uint16 v3);
+ static void freeGoewin(uint16 v1, uint16 v2, uint16 v3);
static void barmanServe(uint16 v1, uint16 v2, uint16 v3);
static void getNumGroats(uint16 v1, uint16 v2, uint16 v3);
+ static void enableGargoylesTalk(uint16 v1, uint16 v2, uint16 v3);
static void animationLoad(uint16 hotspotId, uint16 v2, uint16 v3);
static void addActions(uint16 hotspotId, uint16 actions, uint16 v3);
static void randomToGeneral(uint16 maxVal, uint16 minVal, uint16 v3);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list