aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorWalter van Niftrik2009-04-25 23:31:03 +0000
committerWalter van Niftrik2009-04-25 23:31:03 +0000
commitdfd02452739858c7bfd56d28f5b136f6c3aca9ff (patch)
treefe11f965b075f79c2db0a032761d53f64e5508b1 /engines/sci/engine
parentbac2239709d558b05b70624bf415b1fbeab62ed8 (diff)
downloadscummvm-rg350-dfd02452739858c7bfd56d28f5b136f6c3aca9ff.tar.gz
scummvm-rg350-dfd02452739858c7bfd56d28f5b136f6c3aca9ff.tar.bz2
scummvm-rg350-dfd02452739858c7bfd56d28f5b136f6c3aca9ff.zip
SCI: DoSync should work now, but the lip-syncing mechanism also needs DoAudio
(currently stubbed), so it hasn't been tested yet. so it hasn't been tested yet. svn-id: r40147
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/ksound.cpp11
-rw-r--r--engines/sci/engine/script.cpp2
-rw-r--r--engines/sci/engine/vm.h3
3 files changed, 8 insertions, 8 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 4be6785e2e..e464f99794 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -1002,21 +1002,16 @@ reg_t kDoSync(EngineState *s, int funct_nr, int argc, reg_t *argv) {
s->sound.soundSync = (ResourceSync *)s->resmgr->findResource(kResourceTypeSync, UKPV(2), 1);
if (s->sound.soundSync) {
- Object *obj = obj_get(s, argv[1]);
- s->sound.soundSync->startSync(obj);
+ s->sound.soundSync->startSync(s, argv[1]);
} else {
// Notify the scripts to stop sound sync
- //Object *obj = obj_get(s, argv[1]);
- // TODO: Convert the following from Greg's code to SCI's code
- //obj.setPropertyN(_objOfs[0x33], 0xFFFF); // Greg's
- //obj->variables[s->game_obj.offset[0x33]] = 0xFFFF; // something like this?
+ PUT_SEL32V(argv[1], syncCue, -1);
}
break;
case 1: // next sync
//printf("kDoSync: next sync\n");
if (s->sound.soundSync) {
- Object *obj = obj_get(s, argv[1]);
- s->sound.soundSync->nextSync(obj);
+ s->sound.soundSync->nextSync(s, argv[1]);
}
break;
case 2: // stop sync
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index b1a8601a30..4166594590 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -208,6 +208,8 @@ void script_map_selectors(EngineState *s, selector_map_t *map) {
FIND_SELECTOR(nodePtr);
FIND_SELECTOR(flags);
FIND_SELECTOR(points);
+ FIND_SELECTOR(syncCue);
+ FIND_SELECTOR(syncTime);
}
int sci_hexdump(byte *data, int length, int offsetplus) {
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 6212abf423..848188d263 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -380,6 +380,9 @@ struct selector_map_t {
Selector flags;
Selector points; /* Used by AvoidPath() */
+
+ Selector syncCue; /* Used by DoSync() */
+ Selector syncTime; /* Used by DoSync() */
}; /* Contains selector IDs for a few selected selectors */
struct ViewObject {