aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-11-07 15:28:20 +0000
committerTorbjörn Andersson2004-11-07 15:28:20 +0000
commitd6cfbdad21fe995b5f2c4e6c3b1b7afb84701d9e (patch)
treed581303d961848c9d9a6b0c9a2083c608038c60a /saga
parentebb77764c65b16c7557af6af3ad438dcfc193faf (diff)
downloadscummvm-rg350-d6cfbdad21fe995b5f2c4e6c3b1b7afb84701d9e.tar.gz
scummvm-rg350-d6cfbdad21fe995b5f2c4e6c3b1b7afb84701d9e.tar.bz2
scummvm-rg350-d6cfbdad21fe995b5f2c4e6c3b1b7afb84701d9e.zip
Unstubbed SF_setObjImage(). (Untested)
svn-id: r15727
Diffstat (limited to 'saga')
-rw-r--r--saga/sfuncs.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index 58f374033a..ce458c0640 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -348,10 +348,18 @@ int Script::SF_gotoScene(SCRIPTFUNC_PARAMS) {
// Script function #17 (0x11)
int Script::SF_setObjImage(SCRIPTFUNC_PARAMS) {
- for (int i = 0; i < nArgs; i++)
- thread->pop();
+ SDataWord_T obj_param = thread->pop();
+ SDataWord_T sprite_param = thread->pop();
+
+ int index = obj_param & 0x1FFF;
+
+ if (index >= ARRAYSIZE(ObjectTable)) {
+ return FAILURE;
+ }
+
+ ObjectTable[index].spritelistRn = sprite_param + 9;
+ _vm->_interface->draw();
- debug(1, "stub: SF_setObjImage(), %d args", nArgs);
return SUCCESS;
}