[Scummvm-cvs-logs] CVS: scummvm/saga resnames.h,1.22,1.23 script.h,1.65,1.66 sfuncs.cpp,1.84,1.85
Andrew Kurushin
h00ligan at users.sourceforge.net
Sat Jan 22 13:42:03 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga resnames.h,1.21,1.22 script.h,1.64,1.65 sfuncs.cpp,1.83,1.84 sthread.cpp,1.71,1.72
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21063
Modified Files:
resnames.h script.h sfuncs.cpp
Log Message:
implemented sfWaitWalk scriptFunction
Index: resnames.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/resnames.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- resnames.h 22 Jan 2005 19:21:38 -0000 1.22
+++ resnames.h 22 Jan 2005 21:40:54 -0000 1.23
@@ -97,6 +97,8 @@
#define RID_ITE_INTRO_IMG_3 1561
#define RID_ITE_INTRO_IMG_4 1565
+#define RID_ITE_ENDCREDIT_SCENE_1 1802
+
// ITE_VOICES
#define RID_CAVE_VOICE_0 0
#define RID_CAVE_VOICE_1 1
Index: script.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- script.h 22 Jan 2005 19:21:38 -0000 1.65
+++ script.h 22 Jan 2005 21:40:54 -0000 1.66
@@ -469,10 +469,10 @@
void sfLockUser(SCRIPTFUNC_PARAMS);
void sfPreDialog(SCRIPTFUNC_PARAMS);
void sfKillActorThreads(SCRIPTFUNC_PARAMS);
-
void sfFaceTowards(SCRIPTFUNC_PARAMS);
void sfSetFollower(SCRIPTFUNC_PARAMS);
- void SF_gotoScene(SCRIPTFUNC_PARAMS);
+ void sfScriptGotoScene(SCRIPTFUNC_PARAMS);
+
void SF_setObjImage(SCRIPTFUNC_PARAMS);
void SF_setObjName(SCRIPTFUNC_PARAMS);
void SF_getObjImage(SCRIPTFUNC_PARAMS);
@@ -486,7 +486,7 @@
void sfScriptWalkToAsync(SCRIPTFUNC_PARAMS);
void SF_enableZone(SCRIPTFUNC_PARAMS);
void sfSetActorState(SCRIPTFUNC_PARAMS);
- void scriptMoveTo(SCRIPTFUNC_PARAMS);
+ void sfScriptMoveTo(SCRIPTFUNC_PARAMS);
void SF_sceneEq(SCRIPTFUNC_PARAMS);
void SF_dropObject(SCRIPTFUNC_PARAMS);
void sfFinishBgdAnim(SCRIPTFUNC_PARAMS);
@@ -509,7 +509,7 @@
void SF_setProtagState(SCRIPTFUNC_PARAMS);
void sfResumeBgdAnim(SCRIPTFUNC_PARAMS);
void SF_throwActor(SCRIPTFUNC_PARAMS);
- void SF_waitWalk(SCRIPTFUNC_PARAMS);
+ void sfWaitWalk(SCRIPTFUNC_PARAMS);
void SF_sceneID(SCRIPTFUNC_PARAMS);
void SF_changeActorScene(SCRIPTFUNC_PARAMS);
void SF_climb(SCRIPTFUNC_PARAMS);
Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- sfuncs.cpp 22 Jan 2005 19:21:38 -0000 1.84
+++ sfuncs.cpp 22 Jan 2005 21:40:54 -0000 1.85
@@ -65,7 +65,7 @@
OPCODE(sfKillActorThreads),
OPCODE(sfFaceTowards),
OPCODE(sfSetFollower),
- OPCODE(SF_gotoScene),
+ OPCODE(sfScriptGotoScene),
OPCODE(SF_setObjImage),
OPCODE(SF_setObjName),
OPCODE(SF_getObjImage),
@@ -79,7 +79,7 @@
OPCODE(sfScriptWalkToAsync),
OPCODE(SF_enableZone),
OPCODE(sfSetActorState),
- OPCODE(scriptMoveTo),
+ OPCODE(sfScriptMoveTo),
OPCODE(SF_sceneEq),
OPCODE(SF_dropObject),
OPCODE(sfFinishBgdAnim),
@@ -102,7 +102,7 @@
OPCODE(SF_setProtagState),
OPCODE(sfResumeBgdAnim),
OPCODE(SF_throwActor),
- OPCODE(SF_waitWalk),
+ OPCODE(sfWaitWalk),
OPCODE(SF_sceneID),
OPCODE(SF_changeActorScene),
OPCODE(SF_climb),
@@ -465,15 +465,27 @@
};
// Script function #16 (0x10)
-void Script::SF_gotoScene(SCRIPTFUNC_PARAMS) {
- int16 sceneNum = thread->pop();
- int16 entrance = thread->pop();
+void Script::sfScriptGotoScene(SCRIPTFUNC_PARAMS) {
+ int16 sceneNumber;
+ int16 entrance;
- for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++)
+ sceneNumber = thread->pop();
+ entrance = thread->pop();
+ if (sceneNumber < 0) {
+ //TODO: quit from game at all
+ }
+
+// _vm->_scene->loadScene(sceneNumber, BY_SCENE, _vm->_scene->SC_defaultScene, NULL, (sceneNumber = RID_ITE_ENDCREDIT_SCENE_1) ? SCENE_FADE : SCENE_NOFADE, entrance);
+
+ //TODO: placard stuff
+ _pendingVerb = kVerbNone;
+ _currentObject[0] = _currentObject[1] = ID_NOTHING;
+ showVerb();
+/* for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++)
if (sceneSubstitutes[i].sceneId == sceneNum)
debug(0, "Scene %d substitute exists", sceneNum);
- debug(1, "stub: SF_gotoScene(%d, %d)", sceneNum, entrance);
+ debug(1, "stub: SF_gotoScene(%d, %d)", sceneNum, entrance);*/
}
// Script function #17 (0x11)
@@ -653,7 +665,7 @@
// Param1: actor id
// Param2: actor pos x
// Param3: actor pos y
-void Script::scriptMoveTo(SCRIPTFUNC_PARAMS) {
+void Script::sfScriptMoveTo(SCRIPTFUNC_PARAMS) {
int16 actorId;
Location actorLocation;
ActorData *actor;
@@ -666,7 +678,6 @@
actor->location.x = actorLocation.x;
actor->location.y = actorLocation.y;
-
}
// Script function #31 (0x21)
@@ -1227,10 +1238,20 @@
}
// Script function #53 (0x35)
-void Script::SF_waitWalk(SCRIPTFUNC_PARAMS) {
- int16 param = thread->pop();
+// Param1: actor id
+// Param2: target object
+void Script::sfWaitWalk(SCRIPTFUNC_PARAMS) {
+ int16 actorId;
+ ActorData *actor;
- debug(1, "stub: SF_waitWalk(%d)", param);
+ actorId = thread->pop();
+ actor = _vm->_actor->getActor(actorId);
+
+ if ((actor->currentAction == kActionWalkToPoint) ||
+ (actor->currentAction == kActionWalkToLink) ||
+ (actor->currentAction == kActionFall)) {
+ thread->waitWalk(actor);
+ }
}
// Script function #54 (0x36)
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga resnames.h,1.21,1.22 script.h,1.64,1.65 sfuncs.cpp,1.83,1.84 sthread.cpp,1.71,1.72
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list