aboutsummaryrefslogtreecommitdiff
path: root/saga/sfuncs.cpp
diff options
context:
space:
mode:
authorAndrew Kurushin2005-01-06 19:15:01 +0000
committerAndrew Kurushin2005-01-06 19:15:01 +0000
commit00c98c519e85ee7d3f7f2a262e80a2b24b1914e0 (patch)
tree229428b76d7a1cf76b9fe1a40a91ed1559db5443 /saga/sfuncs.cpp
parent4fae197c67b8cecf5a674c710530c44f5cef814e (diff)
downloadscummvm-rg350-00c98c519e85ee7d3f7f2a262e80a2b24b1914e0.tar.gz
scummvm-rg350-00c98c519e85ee7d3f7f2a262e80a2b24b1914e0.tar.bz2
scummvm-rg350-00c98c519e85ee7d3f7f2a262e80a2b24b1914e0.zip
- implement faceTowards (script function & etc)
- implement debug actor walk path (press f6) svn-id: r16456
Diffstat (limited to 'saga/sfuncs.cpp')
-rw-r--r--saga/sfuncs.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index 5c65c5e6f5..d4162ccfd4 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -62,7 +62,7 @@ void Script::setupScriptFuncList(void) {
OPCODE(sfLockUser),
OPCODE(SF_preDialog),
OPCODE(SF_killActorThreads),
- OPCODE(SF_faceTowards),
+ OPCODE(sfFaceTowards),
OPCODE(sfSetFollower),
OPCODE(SF_gotoScene),
OPCODE(SF_setObjImage),
@@ -324,11 +324,19 @@ int Script::SF_killActorThreads(SCRIPTFUNC_PARAMS) {
}
// Script function #14 (0x0E)
-int Script::SF_faceTowards(SCRIPTFUNC_PARAMS) {
- ScriptDataWord param1 = thread->pop();
- ScriptDataWord param2 = thread->pop();
+// Param1: actor id
+// Param2: object id
+int Script::sfFaceTowards(SCRIPTFUNC_PARAMS) {
+ int16 actorId;
+ int16 targetObject;
+ ActorData *actor;
+
+ actorId = getSWord(thread->pop());
+ targetObject = getSWord(thread->pop());
+
+ actor = _vm->_actor->getActor(actorId);
+ actor->targetObject = targetObject;
- debug(1, "stub: SF_faceTowards(%d, %d)", param1, param2);
return SUCCESS;
}
@@ -945,7 +953,7 @@ int Script::sfPlacard(SCRIPTFUNC_PARAMS) {
PALENTRY *pal;
EVENT event;
EVENT *q_event;
-
+
thread->wait(kWaitTypePlacard);
_vm->_interface->rememberMode();