aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress
diff options
context:
space:
mode:
authorEvgeny Grechnikov2018-09-02 21:07:00 +0300
committerEvgeny Grechnikov2018-09-02 21:07:00 +0300
commit6a1e5c1d9347c1e609be25af7b3873bbc1db8d17 (patch)
treebf7a03ca2c0578799b135f3c5568a72641887165 /engines/lastexpress
parentbde1556b979af1dbffa02fc1474895d574f5917a (diff)
downloadscummvm-rg350-6a1e5c1d9347c1e609be25af7b3873bbc1db8d17.tar.gz
scummvm-rg350-6a1e5c1d9347c1e609be25af7b3873bbc1db8d17.tar.bz2
scummvm-rg350-6a1e5c1d9347c1e609be25af7b3873bbc1db8d17.zip
LASTEXPRESS: more fixes in NPC logic
Diffstat (limited to 'engines/lastexpress')
-rw-r--r--engines/lastexpress/entities/alexei.cpp2
-rw-r--r--engines/lastexpress/entities/anna.cpp2
-rw-r--r--engines/lastexpress/entities/august.cpp16
3 files changed, 11 insertions, 9 deletions
diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp
index 89027c2d2f..45dd03aa32 100644
--- a/engines/lastexpress/entities/alexei.cpp
+++ b/engines/lastexpress/entities/alexei.cpp
@@ -1792,8 +1792,8 @@ IMPLEMENT_FUNCTION(44, Alexei, goToPlatform)
if (getEntities()->isPlayerPosition(kCarGreenSleeping, 62))
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 72);
- setup_returnCompartment4();
}
+ setup_returnCompartment4();
}
break;
diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp
index 2b31c7b5c8..80ad1a2ae4 100644
--- a/engines/lastexpress/entities/anna.cpp
+++ b/engines/lastexpress/entities/anna.cpp
@@ -3864,7 +3864,7 @@ IMPLEMENT_FUNCTION(78, Anna, kidnapped)
case 2:
getAction()->playAnimation(kEventKronosHostageAnna);
- getScenes()->loadSceneFromPosition(kCarRestaurant, 61);
+ getScenes()->loadSceneFromPosition(kCarRestaurant, 61, 1);
getSound()->playSound(kEntityAnna, "Mus024", kFlagDefault);
setup_waiting();
break;
diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index 01dc0b76c9..cdcc85cca1 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -453,14 +453,14 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
if (parameters->param1) {
Common::String sequence = Common::String::format("%s%s", (char *)&parameters->seq1, "Gc");
- assert(sequence.size() <= 13);
+ assert(sequence.size() <= 12); // .size() does not count terminating zero
strcpy((char *)&parameters->seq2, sequence.c_str());
getObjects()->update(kObjectCompartment3, kEntityPlayer, kObjectLocation1, kCursorKeepValue, kCursorKeepValue);
} else {
Common::String sequence = Common::String::format("%s%s", (char *)&parameters->seq1, "Ec");
- assert(sequence.size() <= 13);
+ assert(sequence.size() <= 12);
strcpy((char *)&parameters->seq2, sequence.c_str());
}
@@ -477,10 +477,12 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
case 1: {
getData()->location = kLocationOutsideCompartment;
- Common::String sequence2 = Common::String::format("%s%s", (char *)&parameters->seq2, "Pc");
- strcpy((char *)&parameters->seq2, (char *)&parameters->seq1);
+ Common::String sequence2 = Common::String::format("%s%s", (char *)&parameters->seq1, "Pc");
+ assert(sequence2.size() <= 12);
+
+ strcpy((char *)&parameters->seq2, sequence2.c_str());
- getEntities()->drawSequenceLeft(kEntityAugust, sequence2.c_str());
+ getEntities()->drawSequenceLeft(kEntityAugust, (char *)&parameters->seq2);
getEntities()->enterCompartment(kEntityAugust, kObjectCompartment3, true);
if (getProgress().chapter != kChapter3 || getState()->time >= kTime1998000) {
@@ -885,7 +887,7 @@ label_callback_9:
if (params->param8 >= 3) {
getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
callbackAction();
- break;
+ return;
}
params->param6 = 0;
@@ -1014,7 +1016,7 @@ label_callback_9:
case 6:
case 7:
getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).status, params->param4 ? kCursorNormal : kCursorTalk, kCursorHand);
- ENTITY_PARAM(1, 2) = 0;
+ CURRENT_PARAM(1, 2) = 0;
break;
case 8: