mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 01:57:16 +00:00
implemented sfWaitWalk scriptFunction
svn-id: r16619
This commit is contained in:
parent
01a863414e
commit
4f68706f3c
@ -97,6 +97,8 @@ namespace Saga {
|
||||
#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
|
||||
|
@ -469,10 +469,10 @@ private:
|
||||
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 @@ private:
|
||||
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 @@ private:
|
||||
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);
|
||||
|
@ -65,7 +65,7 @@ void Script::setupScriptFuncList(void) {
|
||||
OPCODE(sfKillActorThreads),
|
||||
OPCODE(sfFaceTowards),
|
||||
OPCODE(sfSetFollower),
|
||||
OPCODE(SF_gotoScene),
|
||||
OPCODE(sfScriptGotoScene),
|
||||
OPCODE(SF_setObjImage),
|
||||
OPCODE(SF_setObjName),
|
||||
OPCODE(SF_getObjImage),
|
||||
@ -79,7 +79,7 @@ void Script::setupScriptFuncList(void) {
|
||||
OPCODE(sfScriptWalkToAsync),
|
||||
OPCODE(SF_enableZone),
|
||||
OPCODE(sfSetActorState),
|
||||
OPCODE(scriptMoveTo),
|
||||
OPCODE(sfScriptMoveTo),
|
||||
OPCODE(SF_sceneEq),
|
||||
OPCODE(SF_dropObject),
|
||||
OPCODE(sfFinishBgdAnim),
|
||||
@ -102,7 +102,7 @@ void Script::setupScriptFuncList(void) {
|
||||
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 @@ static struct SceneSubstitutes {
|
||||
};
|
||||
|
||||
// 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 @@ void Script::sfSetActorState(SCRIPTFUNC_PARAMS) {
|
||||
// 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 @@ void Script::scriptMoveTo(SCRIPTFUNC_PARAMS) {
|
||||
|
||||
actor->location.x = actorLocation.x;
|
||||
actor->location.y = actorLocation.y;
|
||||
|
||||
}
|
||||
|
||||
// Script function #31 (0x21)
|
||||
@ -1227,10 +1238,20 @@ void Script::SF_throwActor(SCRIPTFUNC_PARAMS) {
|
||||
}
|
||||
|
||||
// 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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user