aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2014-12-28 00:22:30 +0100
committerMartin Kiewitz2014-12-28 00:22:30 +0100
commit329c9386c6db79b3c52fbd6712f3ae1718d04c1f (patch)
tree57704ee4708ddd1685a53c982588ad08826120f5 /engines/sci
parentc823a6e825a6474c75f1ddecfcb67a602393fae6 (diff)
downloadscummvm-rg350-329c9386c6db79b3c52fbd6712f3ae1718d04c1f.tar.gz
scummvm-rg350-329c9386c6db79b3c52fbd6712f3ae1718d04c1f.tar.bz2
scummvm-rg350-329c9386c6db79b3c52fbd6712f3ae1718d04c1f.zip
SCI: improve kPortrait debug support + fix
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/portrait.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp
index 959c0f6817..3311f47022 100644
--- a/engines/sci/graphics/portrait.cpp
+++ b/engines/sci/graphics/portrait.cpp
@@ -230,7 +230,7 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint
debugPrint[raveResource->size] = 0; // set terminating NUL
debug("kPortrait: using actor %s", _resourceName.c_str());
debug("kPortrait (noun %d, verb %d, cond %d, seq %d)", noun, verb, cond, seq);
- debug("kPortrait: %s", debugPrint);
+ debug("kPortrait: rave data is '%s'", debugPrint);
}
#endif
@@ -301,7 +301,11 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint
}
#ifdef DEBUG_PORTRAIT
- debug("kPortrait: %d: %x", raveTicks, raveID);
+ if (raveID & 0x0ff) {
+ debug("kPortrait: rave '%c%c' after %d ticks", raveID >> 8, raveID & 0x0ff, raveTicks);
+ } else if (raveID) {
+ debug("kPortrait: rave '%c' after %d ticks", raveID >> 8, raveTicks);
+ }
#endif
timerPosition += raveTicks;
@@ -325,10 +329,9 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint
// Tick = 0xFF is the terminator for the data
timerPositionWithin = timerPosition;
raveLipSyncTicks = *raveLipSyncData++;
-#ifdef DEBUG_PORTRAIT
- debug("kPortrait: waiting %d", raveLipSyncTicks);
-#endif
while ( (raveLipSyncData < _lipSyncDataOffsetTableEnd) && (raveLipSyncTicks != 0xFF) ) {
+ if (raveLipSyncTicks)
+ raveLipSyncTicks--; // 1 -> wait 0 ticks, 2 -> wait 1 tick, etc.
timerPositionWithin += raveLipSyncTicks;
do {
@@ -343,7 +346,11 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint
raveLipSyncBitmapNr = *raveLipSyncData++;
#ifdef DEBUG_PORTRAIT
- debug("kPortrait: showing bitmap %d", raveLipSyncBitmapNr);
+ if (!raveLipSyncTicks) {
+ debug("kPortrait: showing frame %d", raveLipSyncBitmapNr);
+ } else {
+ debug("kPortrait: showing frame %d after %d ticks", raveLipSyncBitmapNr, raveLipSyncTicks);
+ }
#endif
// bitmap nr within sync data is base 1, we need base 0