aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-08-30 14:36:37 +0000
committerMartin Kiewitz2010-08-30 14:36:37 +0000
commit6d0902860740290159ac5c81d5b8594aefc17563 (patch)
tree5730826202bf37c372339df14737dd9a9a3b3c8d /engines
parentd02628a0dcbade4419c6c653cb65899b98c9cb86 (diff)
downloadscummvm-rg350-6d0902860740290159ac5c81d5b8594aefc17563.tar.gz
scummvm-rg350-6d0902860740290159ac5c81d5b8594aefc17563.tar.bz2
scummvm-rg350-6d0902860740290159ac5c81d5b8594aefc17563.zip
SCI: ability to ignore movecount for new DoBresen
fixes later sci games, when using new kDoBresen/kInitBresen svn-id: r52454
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kmovement.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 0bac90886d..ff70b1dd98 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -333,16 +333,21 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
reg_t mover = argv[0];
reg_t client = readSelector(segMan, mover, SELECTOR(client));
bool completed = false;
+ bool handleMoveCount = g_sci->_features->handleMoveCount();
if (getSciVersion() >= SCI_VERSION_1_EGA) {
uint client_signal = readSelectorValue(segMan, client, SELECTOR(signal));
writeSelectorValue(segMan, client, SELECTOR(signal), client_signal & ~kSignalHitObstacle);
}
- int16 mover_moveCnt = readSelectorValue(segMan, mover, SELECTOR(b_movCnt));
- int16 client_moveSpeed = readSelectorValue(segMan, client, SELECTOR(moveSpeed));
+ int16 mover_moveCnt = 1;
+ int16 client_moveSpeed = 0;
+ if (handleMoveCount) {
+ mover_moveCnt = readSelectorValue(segMan, mover, SELECTOR(b_movCnt));
+ client_moveSpeed = readSelectorValue(segMan, client, SELECTOR(moveSpeed));
+ mover_moveCnt++;
+ }
- mover_moveCnt++;
if (client_moveSpeed < mover_moveCnt) {
mover_moveCnt = 0;
int16 client_x = readSelectorValue(segMan, client, SELECTOR(x));
@@ -429,7 +434,9 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
writeSelectorValue(segMan, mover, SELECTOR(b_i2), mover_i2);
writeSelectorValue(segMan, mover, SELECTOR(b_di), mover_di);
}
- writeSelectorValue(segMan, mover, SELECTOR(b_movCnt), mover_moveCnt);
+ if (handleMoveCount)
+ writeSelectorValue(segMan, mover, SELECTOR(b_movCnt), mover_moveCnt);
+
if ((getSciVersion() >= SCI_VERSION_1_EGA)) {
// Sierra SCI compared client_x&mover_x and client_y&mover_y
// those variables were not initialized in case the moveSpeed