aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLittleboy2013-11-23 19:07:15 -0500
committerLittleboy2013-12-10 01:54:56 -0500
commit1314c5c128873804446d10edaaf2f2bb4fbe1def (patch)
treee6ee641caabd52ac0810a88ca033cb98883277b6
parentf8c45b93a3e972ab728e1e15a38ec78e05147e79 (diff)
downloadscummvm-rg350-1314c5c128873804446d10edaaf2f2bb4fbe1def.tar.gz
scummvm-rg350-1314c5c128873804446d10edaaf2f2bb4fbe1def.tar.bz2
scummvm-rg350-1314c5c128873804446d10edaaf2f2bb4fbe1def.zip
LASTEXPRESS: Rename Object properties
-rw-r--r--engines/lastexpress/entities/abbot.cpp2
-rw-r--r--engines/lastexpress/entities/anna.cpp2
-rw-r--r--engines/lastexpress/entities/august.cpp30
-rw-r--r--engines/lastexpress/entities/chapters.cpp26
-rw-r--r--engines/lastexpress/entities/coudert.cpp54
-rw-r--r--engines/lastexpress/entities/entity.cpp4
-rw-r--r--engines/lastexpress/entities/entity.h2
-rw-r--r--engines/lastexpress/entities/francois.cpp4
-rw-r--r--engines/lastexpress/entities/gendarmes.cpp10
-rw-r--r--engines/lastexpress/entities/kahina.cpp24
-rw-r--r--engines/lastexpress/entities/kronos.cpp2
-rw-r--r--engines/lastexpress/entities/mertens.cpp60
-rw-r--r--engines/lastexpress/entities/milos.cpp30
-rw-r--r--engines/lastexpress/entities/rebecca.cpp8
-rw-r--r--engines/lastexpress/entities/tatiana.cpp10
-rw-r--r--engines/lastexpress/entities/vassili.cpp8
-rw-r--r--engines/lastexpress/entities/verges.cpp2
-rw-r--r--engines/lastexpress/fight/fight.cpp2
-rw-r--r--engines/lastexpress/game/action.cpp38
-rw-r--r--engines/lastexpress/game/object.cpp24
-rw-r--r--engines/lastexpress/game/object.h28
-rw-r--r--engines/lastexpress/game/scenes.cpp12
-rw-r--r--engines/lastexpress/shared.h30
-rw-r--r--engines/lastexpress/sound/sound.cpp2
24 files changed, 214 insertions, 200 deletions
diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp
index 5b6cb04326..fd91069438 100644
--- a/engines/lastexpress/entities/abbot.cpp
+++ b/engines/lastexpress/entities/abbot.cpp
@@ -1791,7 +1791,7 @@ IMPLEMENT_FUNCTION(49, Abbot, catchCath)
break;
case 1:
- getAction()->playAnimation(getObjects()->get(kObjectCompartment2).location2 < kObjectLocation2 ? kEventAbbotWrongCompartmentBed : kEventAbbotWrongCompartment);
+ getAction()->playAnimation(getObjects()->get(kObjectCompartment2).model < kObjectLocation2 ? kEventAbbotWrongCompartmentBed : kEventAbbotWrongCompartment);
getEntities()->updateEntity(kEntityAbbot, kCarRedSleeping, kPosition_6470);
getSound()->playSound(kEntityPlayer, "LIB015");
getScenes()->loadSceneFromObject(kObjectCompartment2, true);
diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp
index ba88f38f49..4889f66c69 100644
--- a/engines/lastexpress/entities/anna.cpp
+++ b/engines/lastexpress/entities/anna.cpp
@@ -1400,7 +1400,7 @@ IMPLEMENT_FUNCTION(33, Anna, readyForBed)
case kActionCallback:
if (getCallback() == 1) {
- getObjects()->updateLocation2(kObjectCompartmentF, kObjectLocation1);
+ getObjects()->updateModel(kObjectCompartmentF, kObjectModel1);
setup_asleep();
}
break;
diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index da0e64f4f8..4b6bceba1f 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -640,7 +640,7 @@ label_continue:
break;
case 6:
- getAction()->playAnimation(getObjects()->get(kObjectCompartment3).location2 == kObjectLocation1 ? kEventMeetAugustHisCompartmentBed : kEventMeetAugustHisCompartment);
+ getAction()->playAnimation(getObjects()->get(kObjectCompartment3).model == kObjectLocation1 ? kEventMeetAugustHisCompartmentBed : kEventMeetAugustHisCompartment);
getProgress().eventMetAugust = true;
getObjects()->update(kObjectCompartment3, kEntityAugust, kObjectLocation1, kCursorNormal, kCursorNormal);
@@ -840,11 +840,11 @@ label_callback_9:
if (CURRENT_PARAM(1, 1) >= getState()->timeTicks)
break;
- if (getObjects()->get(kObjectCompartment1).location == kObjectLocation1) {
+ if (getObjects()->get(kObjectCompartment1).status == kObjectLocation1) {
if (!Entity::updateParameter(CURRENT_PARAM(1, 2), getState()->timeTicks, 75))
break;
- getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
params->param6++;
@@ -866,7 +866,7 @@ label_callback_9:
params->param8++;
if (params->param8 >= 3) {
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
callbackAction();
break;
}
@@ -874,12 +874,12 @@ label_callback_9:
params->param6 = 0;
}
- getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).location, params->param4 ? kCursorNormal : kCursorTalk, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).status, params->param4 ? kCursorNormal : kCursorTalk, kCursorHand);
CURRENT_PARAM(1, 2) = 0;
} else {
if (getProgress().eventCorpseMovedFromFloor && getProgress().jacket != kJacketBlood) {
- params->param7 = (getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) ? 8 : 7;
+ params->param7 = (getObjects()->get(kObjectCompartment1).model == kObjectLocation1) ? 8 : 7;
getObjects()->update(kObjectOutsideTylerCompartment, kEntityPlayer, kObjectLocationNone, kCursorKeepValue, kCursorKeepValue);
setCallback(4);
@@ -900,7 +900,7 @@ label_callback_9:
setCallback(15);
setup_playSound("LIB012");
} else if (!params->param4) {
- getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
setCallback(17);
setup_playSound("AUG1002A");
@@ -912,9 +912,9 @@ label_callback_9:
if (params->param3) {
getData()->location = kLocationInsideCompartment;
- params->param7 = (getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) ? kEventMeetAugustHisCompartmentBed : kEventMeetAugustHisCompartment;
+ params->param7 = (getObjects()->get(kObjectCompartment1).model == kObjectLocation1) ? kEventMeetAugustHisCompartmentBed : kEventMeetAugustHisCompartment;
} else {
- params->param7 = (getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) ? kEventMeetAugustTylerCompartmentBed : kEventMeetAugustTylerCompartment;
+ params->param7 = (getObjects()->get(kObjectCompartment1).model == kObjectLocation1) ? kEventMeetAugustTylerCompartmentBed : kEventMeetAugustTylerCompartment;
}
setCallback(14);
@@ -931,14 +931,14 @@ label_callback_9:
if (getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_8200)
|| getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_7850)
|| getEntities()->isOutsideAlexeiWindow()) {
- getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
if (getEntities()->isOutsideAlexeiWindow())
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49);
getSound()->playSound(kEntityPlayer, "LIB012");
- getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).location, kCursorTalk, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).status, kCursorTalk, kCursorHand);
params->param2 = 1;
} else {
@@ -996,7 +996,7 @@ label_callback_9:
case 6:
case 7:
- getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).location, params->param4 ? kCursorNormal : kCursorTalk, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).status, params->param4 ? kCursorNormal : kCursorTalk, kCursorHand);
ENTITY_PARAM(1, 2) = 0;
break;
@@ -1032,7 +1032,7 @@ label_callback_9:
break;
case 13:
- getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).location == kObjectLocation1 ? "LIB032" : "LIB014");
+ getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).status == kObjectLocation1 ? "LIB032" : "LIB014");
getAction()->playAnimation(kEventAugustFindCorpse);
if (getEvent(kEventDinerAugustOriginalJacket))
@@ -1045,7 +1045,7 @@ label_callback_9:
case 14:
if (!params->param2)
- getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).location == kObjectLocation1 ? "LIB032" : "LIB014");
+ getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).status == kObjectLocation1 ? "LIB032" : "LIB014");
getObjects()->update(kObjectCompartment1, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand);
getObjects()->update(kObjectOutsideTylerCompartment, kEntityPlayer, kObjectLocationNone, kCursorKeepValue, kCursorKeepValue);
@@ -1070,7 +1070,7 @@ label_callback_9:
case 17:
params->param4 = 1;
- getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorHand);
break;
}
break;
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index 6cf99d684f..2aeca2bc35 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -349,19 +349,19 @@ IMPLEMENT_FUNCTION(7, Chapters, chapter1Init)
getObjects()->update(kObjectOutsideTylerCompartment, kEntityPlayer, kObjectLocationNone, kCursorKeepValue, kCursorKeepValue);
for (uint i = kObjectCompartment1; i <= kObjectCompartment8; i++) {
- getObjects()->updateLocation2((ObjectIndex)i, kObjectLocation2);
+ getObjects()->updateModel((ObjectIndex) i, kObjectModel2);
}
for (uint i = kObjectCompartmentA; i <= kObjectCompartmentH; i++) {
- getObjects()->updateLocation2((ObjectIndex)i, kObjectLocation2);
+ getObjects()->updateModel((ObjectIndex) i, kObjectModel2);
}
params->param1 = 40;
- getObjects()->updateLocation2(kObject25, kObjectLocation1);
- getObjects()->updateLocation2(kObjectTrainTimeTable, kObjectLocation1);
- getObjects()->updateLocation2(kObject98, kObjectLocation1);
- getObjects()->updateLocation2(kObjectRestaurantCar, kObjectLocation1);
+ getObjects()->updateModel(kObject25, kObjectModel1);
+ getObjects()->updateModel(kObjectTrainTimeTable, kObjectModel1);
+ getObjects()->updateModel(kObject98, kObjectModel1);
+ getObjects()->updateModel(kObjectRestaurantCar, kObjectModel1);
getObjects()->update(kObject25, kEntityPlayer, kObjectLocationNone, kCursorNormal, kCursorForward);
getObjects()->update(kObjectTrainTimeTable, kEntityPlayer, kObjectLocationNone, kCursorNormal, kCursorForward);
@@ -792,11 +792,11 @@ IMPLEMENT_FUNCTION(11, Chapters, chapter2Init)
getInventory()->setLocationAndProcess(kItem3, kObjectLocation1);
for (uint i = 1; i < 9; i++) {
- getObjects()->updateLocation2((ObjectIndex)i, kObjectLocation2);
+ getObjects()->updateModel((ObjectIndex) i, kObjectModel2);
}
for (uint i = 33; i < 40; i++) {
- getObjects()->updateLocation2((ObjectIndex)i, kObjectLocation2);
+ getObjects()->updateModel((ObjectIndex) i, kObjectModel2);
}
params->param1 = 40;
@@ -893,7 +893,7 @@ IMPLEMENT_FUNCTION(14, Chapters, chapter3Init)
getObjects()->update(kObjectHandleOutsideRight, kEntityPlayer, kObjectLocation1, kCursorNormal, kCursorHand);
getInventory()->setLocationAndProcess(kItemBriefcase, kObjectLocation1);
getInventory()->setLocationAndProcess(kItem3, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartment1, kObjectLocation2);
+ getObjects()->updateModel(kObjectCompartment1, kObjectModel2);
getObjects()->update(kObject107, kEntityPlayer, kObjectLocation3, kCursorKeepValue, kCursorKeepValue);
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
@@ -1204,7 +1204,7 @@ IMPLEMENT_FUNCTION(18, Chapters, chapter4Init)
if (getInventory()->get(kItemBeetle)->location == kObjectLocation3)
getScenes()->loadSceneFromItemPosition(kItemBeetle);
- getObjects()->updateLocation2(kObject25, kObjectLocation2);
+ getObjects()->updateModel(kObject25, kObjectModel2);
getObjects()->update(kObject107, kEntityPlayer, kObjectLocation3, kCursorKeepValue, kCursorKeepValue);
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
@@ -1265,7 +1265,7 @@ label_exitPozsony:
break;
label_enterGalanta:
- if (getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) {
+ if (getObjects()->get(kObjectCompartment1).model == kObjectLocation1) {
if (getState()->time > kTime2403000 && !CURRENT_PARAM(1, 2)) {
CURRENT_PARAM(1, 2) = 1;
getProgress().field_18 = 2;
@@ -1675,8 +1675,8 @@ IMPLEMENT_FUNCTION(21, Chapters, chapter5Init)
getObjects()->update(kObject94, kEntityPlayer, kObjectLocationNone, kCursorKeepValue, kCursorKeepValue);
getObjects()->update(kObject101, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand);
- getObjects()->updateLocation2(kObject98, kObjectLocation2);
- getObjects()->updateLocation2(kObjectRestaurantCar, kObjectLocation2);
+ getObjects()->updateModel(kObject98, kObjectModel2);
+ getObjects()->updateModel(kObjectRestaurantCar, kObjectModel2);
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
getSoundQueue()->removeFromQueue(kEntityChapters);
diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp
index b604277903..ebe2a930a5 100644
--- a/engines/lastexpress/entities/coudert.cpp
+++ b/engines/lastexpress/entities/coudert.cpp
@@ -915,7 +915,7 @@ IMPLEMENT_FUNCTION_II(20, Coudert, function20, ObjectIndex, ObjectIndex)
if (!Entity::updateParameter(CURRENT_PARAM(1, 4), getState()->time, 900))
break;
- getObjects()->updateLocation2((ObjectIndex)params->param1, kObjectLocation1);
+ getObjects()->updateModel((ObjectIndex) params->param1, kObjectModel1);
if (params->param4 != kObjectLocation2)
getObjects()->update((ObjectIndex)params->param1, (EntityIndex)params->param3, (ObjectLocation)params->param4, (CursorStyle)params->param5, (CursorStyle)params->param6);
@@ -938,15 +938,15 @@ IMPLEMENT_FUNCTION_II(20, Coudert, function20, ObjectIndex, ObjectIndex)
case kActionDefault:
params->param3 = getObjects()->get((ObjectIndex)params->param1).entity;
- params->param4 = getObjects()->get((ObjectIndex)params->param1).location;
- params->param5 = getObjects()->get((ObjectIndex)params->param1).cursor;
- params->param6 = getObjects()->get((ObjectIndex)params->param1).cursor2;
+ params->param4 = getObjects()->get((ObjectIndex)params->param1).status;
+ params->param5 = getObjects()->get((ObjectIndex)params->param1).windowCursor;
+ params->param6 = getObjects()->get((ObjectIndex)params->param1).handleCursor;
if (params->param2) {
params->param7 = getObjects()->get((ObjectIndex)params->param2).entity;
- params->param8 = getObjects()->get((ObjectIndex)params->param2).location;
- CURRENT_PARAM(1, 1) = getObjects()->get((ObjectIndex)params->param2).cursor;
- CURRENT_PARAM(1, 2) = getObjects()->get((ObjectIndex)params->param2).cursor2;
+ params->param8 = getObjects()->get((ObjectIndex)params->param2).status;
+ CURRENT_PARAM(1, 1) = getObjects()->get((ObjectIndex)params->param2).windowCursor;
+ CURRENT_PARAM(1, 2) = getObjects()->get((ObjectIndex)params->param2).handleCursor;
getObjects()->update((ObjectIndex)params->param2, kEntityCoudert, kObjectLocation1, kCursorHandKnock, kCursorHand);
}
@@ -1580,7 +1580,7 @@ IMPLEMENT_FUNCTION_I(30, Coudert, function30, ObjectIndex)
case 2:
if (getEntities()->checkFields19(kEntityPlayer, kCarRedSleeping, (EntityPosition)parameters->param3)
|| ((parameters->param1 == kObjectCompartmentE || parameters->param1 == kObjectCompartmentF) && getEntities()->isOutsideAnnaWindow())) {
- getObjects()->update((ObjectIndex)parameters->param1, kEntityPlayer, getObjects()->get((ObjectIndex)parameters->param1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update((ObjectIndex)parameters->param1, kEntityPlayer, getObjects()->get((ObjectIndex)parameters->param1).status, kCursorNormal, kCursorNormal);
parameters->param5 = true;
}
@@ -1598,7 +1598,7 @@ IMPLEMENT_FUNCTION_I(30, Coudert, function30, ObjectIndex)
case 4:
if (parameters->param5)
- getObjects()->update((ObjectIndex)parameters->param1, kEntityPlayer, getObjects()->get((ObjectIndex)parameters->param1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update((ObjectIndex)parameters->param1, kEntityPlayer, getObjects()->get((ObjectIndex)parameters->param1).status, kCursorHandKnock, kCursorHand);
getEntities()->exitCompartment(kEntityCoudert, (ObjectIndex)parameters->param1, true);
@@ -1991,7 +1991,7 @@ IMPLEMENT_FUNCTION(36, Coudert, chapter1)
getData()->location = kLocationOutsideCompartment;
getData()->car = kCarRedSleeping;
- getObjects()->updateLocation2(kObject111, kObjectLocation1);
+ getObjects()->updateModel(kObject111, kObjectModel1);
break;
case kActionCallback:
@@ -2294,9 +2294,9 @@ label_callback_10:
if (!ENTITY_PARAM(0, 2))
break;
- timeCheckObject(kTime1107000, params->param4, kObject111, kObjectLocation2);
- timeCheckObject(kTime1161000, params->param5, kObject111, kObjectLocation3);
- timeCheckObject(kTime1206000, params->param6, kObject111, kObjectLocation4);
+ timeCheckObject(kTime1107000, params->param4, kObject111, kObjectModel2);
+ timeCheckObject(kTime1161000, params->param5, kObject111, kObjectModel3);
+ timeCheckObject(kTime1206000, params->param6, kObject111, kObjectModel4);
break;
case kAction1:
@@ -2577,7 +2577,7 @@ IMPLEMENT_FUNCTION(42, Coudert, chapter2)
ENTITY_PARAM(2, 4) = 0;
- getObjects()->updateLocation2(kObject111, kObjectLocation5);
+ getObjects()->updateModel(kObject111, kObjectModel5);
break;
case kActionCallback:
@@ -2716,7 +2716,7 @@ IMPLEMENT_FUNCTION(44, Coudert, chapter3)
ENTITY_PARAM(2, 4) = 0;
ENTITY_PARAM(2, 5) = 0;
- getObjects()->updateLocation2(kObject111, kObjectLocation6);
+ getObjects()->updateModel(kObject111, kObjectModel6);
break;
case kActionCallback:
@@ -2850,9 +2850,9 @@ label_callback_18:
label_callback_19:
if (ENTITY_PARAM(0, 2)) {
- timeCheckObject(kTime2025000, params->param7, kObject111, kObjectLocation7);
- timeCheckObject(kTime2133000, params->param8, kObject111, kObjectLocation8);
- timeCheckObject(kTime2173500, CURRENT_PARAM(1, 1), kObject111, kObjectLocation9);
+ timeCheckObject(kTime2025000, params->param7, kObject111, kObjectModel7);
+ timeCheckObject(kTime2133000, params->param8, kObject111, kObjectModel8);
+ timeCheckObject(kTime2173500, CURRENT_PARAM(1, 1), kObject111, kObjectModel9);
}
break;
@@ -3498,7 +3498,7 @@ IMPLEMENT_FUNCTION(52, Coudert, chapter4)
ENTITY_PARAM(2, 3) = 0;
ENTITY_PARAM(2, 4) = 0;
- getObjects()->updateLocation2(kObject111, kObjectLocation10);
+ getObjects()->updateModel(kObject111, kObjectModel10);
break;
case kActionCallback:
@@ -3523,14 +3523,14 @@ IMPLEMENT_FUNCTION(53, Coudert, function53)
params->param1 = 1;
- getObjects()->updateLocation2(kObjectCompartmentA, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartmentB, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartmentC, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartmentD, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartmentE, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartmentF, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartmentG, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartmentH, kObjectLocation1);
+ getObjects()->updateModel(kObjectCompartmentA, kObjectModel1);
+ getObjects()->updateModel(kObjectCompartmentB, kObjectModel1);
+ getObjects()->updateModel(kObjectCompartmentC, kObjectModel1);
+ getObjects()->updateModel(kObjectCompartmentD, kObjectModel1);
+ getObjects()->updateModel(kObjectCompartmentE, kObjectModel1);
+ getObjects()->updateModel(kObjectCompartmentF, kObjectModel1);
+ getObjects()->updateModel(kObjectCompartmentG, kObjectModel1);
+ getObjects()->updateModel(kObjectCompartmentH, kObjectModel1);
ENTITY_PARAM(2, 3) = 0;
diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp
index dad5e67392..b2fc30829f 100644
--- a/engines/lastexpress/entities/entity.cpp
+++ b/engines/lastexpress/entities/entity.cpp
@@ -943,10 +943,10 @@ void Entity::timeCheckSavepoint(TimeValue timeValue, uint &parameter, EntityInde
}
}
-void Entity::timeCheckObject(TimeValue timeValue, uint &parameter, ObjectIndex object, ObjectLocation location) const {
+void Entity::timeCheckObject(TimeValue timeValue, uint &parameter, ObjectIndex object, ObjectModel model) const {
if (getState()->time > timeValue && !parameter) {
parameter = 1;
- getObjects()->updateLocation2(object, location);
+ getObjects()->updateModel(object, model);
}
}
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h
index f3b57e7464..634c854d05 100644
--- a/engines/lastexpress/entities/entity.h
+++ b/engines/lastexpress/entities/entity.h
@@ -1095,7 +1095,7 @@ protected:
bool timeCheckCallbackInventory(TimeValue timeValue, uint &parameter, byte callback, Common::Functor0<void> *function);
bool timeCheckCar(TimeValue timeValue, uint &parameter, byte callback, Common::Functor0<void> *function);
void timeCheckSavepoint(TimeValue timeValue, uint &parameter, EntityIndex entity1, EntityIndex entity2, ActionIndex action) const;
- void timeCheckObject(TimeValue timeValue, uint &parameter, ObjectIndex index, ObjectLocation location) const;
+ void timeCheckObject(TimeValue timeValue, uint &parameter, ObjectIndex index, ObjectModel model) const;
bool timeCheckCallbackAction(TimeValue timeValue, uint &parameter);
bool timeCheckPlaySoundUpdatePosition(TimeValue timeValue, uint &parameter, byte callback, const char* sound, EntityPosition position);
diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp
index d2bbc9854c..12a0a37e99 100644
--- a/engines/lastexpress/entities/francois.cpp
+++ b/engines/lastexpress/entities/francois.cpp
@@ -202,7 +202,7 @@ IMPLEMENT_FUNCTION(9, Francois, function9)
break;
case kActionDefault:
- if (getObjects()->get(kObjectCompartmentD).location == kObjectLocation2) {
+ if (getObjects()->get(kObjectCompartmentD).status == kObjectLocation2) {
getObjects()->update(kObjectCompartmentD, kEntityPlayer, kObjectLocationNone, kCursorKeepValue, kCursorKeepValue);
getSavePoints()->push(kEntityFrancois, kEntityMmeBoutarel, kAction134289824);
setCallback(1);
@@ -238,7 +238,7 @@ IMPLEMENT_FUNCTION(10, Francois, function10)
break;
case kActionDefault:
- if (getObjects()->get(kObjectCompartmentD).location == kObjectLocation2) {
+ if (getObjects()->get(kObjectCompartmentD).status == kObjectLocation2) {
getObjects()->update(kObjectCompartmentD, kEntityPlayer, kObjectLocationNone, kCursorKeepValue, kCursorKeepValue);
setCallback(1);
setup_enterExitCompartment2("605Bd", kObjectCompartmentD);
diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp
index a912fa4ecb..2ff34ef4c9 100644
--- a/engines/lastexpress/entities/gendarmes.cpp
+++ b/engines/lastexpress/entities/gendarmes.cpp
@@ -250,7 +250,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
if (!params->param5)
params->param5 = getState()->timeTicks + 75;
- if (!getEntities()->isOutsideAlexeiWindow() && getObjects()->get((ObjectIndex)params->param3).location != kObjectLocation1) {
+ if (!getEntities()->isOutsideAlexeiWindow() && getObjects()->get((ObjectIndex)params->param3).status != kObjectLocation1) {
setCallback(2);
setup_savegame(kSavegameTypeEvent, kEventGendarmesArrestation);
break;
@@ -284,7 +284,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
break;
case kActionKnock:
- getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).location, kCursorNormal, kCursorNormal);
+ getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).status, kCursorNormal, kCursorNormal);
setCallback(5);
setup_arrestPlaysound16("POL1046B");
@@ -296,7 +296,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
break;
case kActionDefault:
- getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).location, kCursorNormal, kCursorNormal);
+ getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).status, kCursorNormal, kCursorNormal);
setCallback(1);
setup_arrestPlaysound16("POL1046");
@@ -308,7 +308,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
break;
case 1:
- getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).location, kCursorTalk, kCursorNormal);
+ getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).status, kCursorTalk, kCursorNormal);
break;
case 2:
@@ -334,7 +334,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
break;
case 5:
- getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).location, kCursorNormal, kCursorHand);
+ getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).status, kCursorNormal, kCursorHand);
break;
case 6:
diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp
index 467c8d8b3c..29e9a90d41 100644
--- a/engines/lastexpress/entities/kahina.cpp
+++ b/engines/lastexpress/entities/kahina.cpp
@@ -503,16 +503,16 @@ IMPLEMENT_FUNCTION(15, Kahina, function15)
getData()->location = kLocationInsideCompartment;
getEntities()->clearSequences(kEntityKahina);
- getObjects()->update(kObjectCompartmentC, kEntityPlayer, getObjects()->get(kObjectCompartmentC).location, kCursorNormal, kCursorNormal);
- getObjects()->update(kObject50, kEntityPlayer, getObjects()->get(kObject50).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartmentC, kEntityPlayer, getObjects()->get(kObjectCompartmentC).status, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObject50, kEntityPlayer, getObjects()->get(kObject50).status, kCursorNormal, kCursorNormal);
setCallback(13);
setup_updateFromTime(900);
break;
case 13:
- getObjects()->update(kObjectCompartmentC, kEntityPlayer, getObjects()->get(kObjectCompartmentC).location, kCursorHandKnock, kCursorHand);
- getObjects()->update(kObject50, kEntityPlayer, getObjects()->get(kObject50).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartmentC, kEntityPlayer, getObjects()->get(kObjectCompartmentC).status, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObject50, kEntityPlayer, getObjects()->get(kObject50).status, kCursorHandKnock, kCursorHand);
setCallback(14);
setup_enterExitCompartment("616Bc", kObjectCompartmentC);
@@ -1088,16 +1088,16 @@ IMPLEMENT_FUNCTION(23, Kahina, function23)
getData()->location = kLocationInsideCompartment;
getEntities()->clearSequences(kEntityKahina);
- getObjects()->update(kObjectCompartmentF, kEntityPlayer, getObjects()->get(kObjectCompartmentF).location, kCursorNormal, kCursorNormal);
- getObjects()->update(kObject53, kEntityPlayer, getObjects()->get(kObject53).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartmentF, kEntityPlayer, getObjects()->get(kObjectCompartmentF).status, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObject53, kEntityPlayer, getObjects()->get(kObject53).status, kCursorNormal, kCursorNormal);
setCallback(3);
setup_updateFromTime(900);
break;
case 3:
- getObjects()->update(kObjectCompartmentF, kEntityPlayer, getObjects()->get(kObjectCompartmentF).location, kCursorHandKnock, kCursorHand);
- getObjects()->update(kObject53, kEntityPlayer, getObjects()->get(kObject53).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartmentF, kEntityPlayer, getObjects()->get(kObjectCompartmentF).status, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObject53, kEntityPlayer, getObjects()->get(kObject53).status, kCursorHandKnock, kCursorHand);
setCallback(4);
setup_enterExitCompartment("616Df", kObjectCompartmentF);
@@ -1436,16 +1436,16 @@ IMPLEMENT_FUNCTION(26, Kahina, function26)
getData()->location = kLocationInsideCompartment;
getEntities()->clearSequences(kEntityKahina);
- getObjects()->update(kObjectCompartmentA, kEntityPlayer, getObjects()->get(kObjectCompartmentA).location, kCursorNormal, kCursorNormal);
- getObjects()->update(kObject48, kEntityPlayer, getObjects()->get(kObject48).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartmentA, kEntityPlayer, getObjects()->get(kObjectCompartmentA).status, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObject48, kEntityPlayer, getObjects()->get(kObject48).status, kCursorNormal, kCursorNormal);
setCallback(7);
setup_updateFromTime(900);
break;
case 7:
- getObjects()->update(kObjectCompartmentA, kEntityPlayer, getObjects()->get(kObjectCompartmentA).location, kCursorHandKnock, kCursorHand);
- getObjects()->update(kObject48, kEntityPlayer, getObjects()->get(kObject48).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartmentA, kEntityPlayer, getObjects()->get(kObjectCompartmentA).status, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObject48, kEntityPlayer, getObjects()->get(kObject48).status, kCursorHandKnock, kCursorHand);
if (getInventory()->get(kItemFirebird)->location == kObjectLocation1 || getInventory()->get(kItemFirebird)->location == kObjectLocation2) {
getScenes()->loadSceneFromItemPosition(kItemFirebird);
diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp
index fa51e7044b..38a685ec19 100644
--- a/engines/lastexpress/entities/kronos.cpp
+++ b/engines/lastexpress/entities/kronos.cpp
@@ -399,7 +399,7 @@ IMPLEMENT_FUNCTION(18, Kronos, function18)
case kActionNone:
if (getState()->time > kTime2079000 && !params->param2) {
- getObjects()->updateLocation2(kObjectCompartmentKronos, kObjectLocation3);
+ getObjects()->updateModel(kObjectCompartmentKronos, kObjectModel3);
getObjects()->update(kObjectCompartmentKronos, kEntityPlayer, kObjectLocation3, kCursorHandKnock, kCursorHand);
params->param1 = 1;
params->param2 = 1;
diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp
index 97dd293793..f484d00a2c 100644
--- a/engines/lastexpress/entities/mertens.cpp
+++ b/engines/lastexpress/entities/mertens.cpp
@@ -1067,7 +1067,7 @@ IMPLEMENT_FUNCTION_II(21, Mertens, function21, ObjectIndex, ObjectIndex)
break;
// Update objects
- getObjects()->updateLocation2((ObjectIndex)params->param1, kObjectLocation1);
+ getObjects()->updateModel((ObjectIndex)params->param1, kObjectModel1);
if (params->param5 != kObjectLocation2)
getObjects()->update((ObjectIndex)params->param1, (EntityIndex)params->param4, (ObjectLocation)params->param5, (CursorStyle)params->param6, (CursorStyle)params->param7);
@@ -1090,15 +1090,15 @@ IMPLEMENT_FUNCTION_II(21, Mertens, function21, ObjectIndex, ObjectIndex)
case kActionDefault:
params->param3 = 1;
params->param4 = getObjects()->get((ObjectIndex)params->param1).entity;
- params->param5 = getObjects()->get((ObjectIndex)params->param1).location;
- params->param6 = getObjects()->get((ObjectIndex)params->param1).cursor;
- params->param7 = getObjects()->get((ObjectIndex)params->param1).cursor2;
+ params->param5 = getObjects()->get((ObjectIndex)params->param1).status;
+ params->param6 = getObjects()->get((ObjectIndex)params->param1).windowCursor;
+ params->param7 = getObjects()->get((ObjectIndex)params->param1).handleCursor;
if (params->param2) {
- params->param8 = getObjects()->get((ObjectIndex)params->param2).entity;
- CURRENT_PARAM(1, 1) = getObjects()->get((ObjectIndex)params->param2).location;
- CURRENT_PARAM(1, 2) = getObjects()->get((ObjectIndex)params->param2).cursor;
- CURRENT_PARAM(1, 3) = getObjects()->get((ObjectIndex)params->param2).cursor2;
+ params->param8 = getObjects()->get((ObjectIndex)params->param2).entity;
+ CURRENT_PARAM(1, 1) = getObjects()->get((ObjectIndex)params->param2).status;
+ CURRENT_PARAM(1, 2) = getObjects()->get((ObjectIndex)params->param2).windowCursor;
+ CURRENT_PARAM(1, 3) = getObjects()->get((ObjectIndex)params->param2).handleCursor;
getObjects()->update((ObjectIndex)params->param2, kEntityMertens, kObjectLocation1, kCursorHandKnock, kCursorHand);
}
@@ -1506,7 +1506,7 @@ IMPLEMENT_FUNCTION_I(26, Mertens, function26, bool)
getData()->location = kLocationInsideCompartment;
getEntities()->clearSequences(kEntityMertens);
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
setCallback(3);
setup_playSound16("ZNU1001");
@@ -1522,14 +1522,14 @@ IMPLEMENT_FUNCTION_I(26, Mertens, function26, bool)
break;
case 1:
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
setCallback(2);
setup_playSound16("CON1062");
break;
case 2:
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
callbackAction();
break;
@@ -1617,7 +1617,7 @@ IMPLEMENT_FUNCTION_I(27, Mertens, tylerCompartment, MertensActionType)
}
if (Entity::updateParameter(params->param2, getState()->timeTicks, 150)) {
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
setCallback(10);
setup_playSound16("CON1018A");
@@ -1683,7 +1683,7 @@ label_callback11:
} else {
params->param3 = kTimeInvalid;
- if (getObjects()->get(kObjectCompartment1).location == kObjectLocation1) {
+ if (getObjects()->get(kObjectCompartment1).status == kObjectLocation1) {
getObjects()->update(kObjectCompartment1, kEntityPlayer, kObjectLocation1, kCursorNormal, kCursorNormal);
setCallback(11);
@@ -1742,11 +1742,11 @@ label_callback11:
case kActionKnock:
if (params->param1) {
- getObjects()->update(kObjectCompartment1, kEntityMertens, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityMertens, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
switch (params->param1) {
default:
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
callbackAction();
break;
@@ -1774,7 +1774,7 @@ label_callback11:
break;
case kActionOpenDoor:
- getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).location == kObjectLocation1 ? "LIB012" : "LIB014");
+ getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).status == kObjectLocation1 ? "LIB012" : "LIB014");
if (getProgress().eventCorpseMovedFromFloor) {
@@ -1828,7 +1828,7 @@ label_callback11:
if (getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_8200)
|| getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_7850)
|| getEntities()->isOutsideAlexeiWindow()) {
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
if (getEntities()->isOutsideAlexeiWindow())
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49);
@@ -1920,15 +1920,15 @@ label_callback11:
case 8:
case 9:
- getObjects()->update(kObjectCompartment1, kEntityMertens, getObjects()->get(kObjectCompartment1).location, kCursorTalk, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityMertens, getObjects()->get(kObjectCompartment1).status, kCursorTalk, kCursorHand);
break;
case 10:
- getObjects()->update(kObjectCompartment1, kEntityMertens, getObjects()->get(kObjectCompartment1).location, kCursorTalk, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityMertens, getObjects()->get(kObjectCompartment1).status, kCursorTalk, kCursorHand);
goto label_callback10;
case 11:
- getObjects()->update(kObjectCompartment1, kEntityMertens, getObjects()->get(kObjectCompartment1).location, kCursorTalk, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityMertens, getObjects()->get(kObjectCompartment1).status, kCursorTalk, kCursorHand);
goto label_callback11;
case 13:
@@ -1971,20 +1971,20 @@ label_callback11:
case 23:
getProgress().eventMertensAugustWaiting = true;
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
callbackAction();
break;
case 24:
getProgress().eventMertensKronosInvitation = true;
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
callbackAction();
break;
case 25:
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
callbackAction();
break;
@@ -2182,7 +2182,7 @@ IMPLEMENT_FUNCTION_I(30, Mertens, function30, MertensActionType)
case 2:
if (getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_7500)) {
- getObjects()->update(kObjectCompartment2, kEntityPlayer, getObjects()->get(kObjectCompartment2).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment2, kEntityPlayer, getObjects()->get(kObjectCompartment2).status, kCursorNormal, kCursorNormal);
params->param3 = 1;
}
@@ -2192,7 +2192,7 @@ IMPLEMENT_FUNCTION_I(30, Mertens, function30, MertensActionType)
case 3:
if (getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_6470)) {
- getObjects()->update(kObjectCompartment3, kEntityPlayer, getObjects()->get(kObjectCompartment3).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment3, kEntityPlayer, getObjects()->get(kObjectCompartment3).status, kCursorNormal, kCursorNormal);
params->param3 = 1;
}
@@ -2220,7 +2220,7 @@ IMPLEMENT_FUNCTION_I(30, Mertens, function30, MertensActionType)
case 5:
if (params->param3)
- getObjects()->update(kObjectCompartment2, kEntityPlayer, getObjects()->get(kObjectCompartment2).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment2, kEntityPlayer, getObjects()->get(kObjectCompartment2).status, kCursorHandKnock, kCursorHand);
getEntities()->exitCompartment(kEntityMertens, kObjectCompartment2);
@@ -2241,7 +2241,7 @@ IMPLEMENT_FUNCTION_I(30, Mertens, function30, MertensActionType)
case 7:
if (params->param3)
- getObjects()->update(kObjectCompartment3, kEntityPlayer, getObjects()->get(kObjectCompartment3).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment3, kEntityPlayer, getObjects()->get(kObjectCompartment3).status, kCursorHandKnock, kCursorHand);
getEntities()->exitCompartment(kEntityMertens, kObjectCompartment3);
@@ -3688,9 +3688,9 @@ IMPLEMENT_FUNCTION(48, Mertens, function48)
if (ENTITY_PARAM(2, 3)) {
params->param1 = 1;
- getObjects()->updateLocation2(kObjectCompartment2, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartment3, kObjectLocation1);
- getObjects()->updateLocation2(kObjectCompartment4, kObjectLocation1);
+ getObjects()->updateModel(kObjectCompartment2, kObjectModel1);
+ getObjects()->updateModel(kObjectCompartment3, kObjectModel1);
+ getObjects()->updateModel(kObjectCompartment4, kObjectModel1);
ENTITY_PARAM(1, 4) = 0;
ENTITY_PARAM(1, 5) = 0;
diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp
index 519a613497..ca67fc4f49 100644
--- a/engines/lastexpress/entities/milos.cpp
+++ b/engines/lastexpress/entities/milos.cpp
@@ -433,16 +433,16 @@ IMPLEMENT_FUNCTION(14, Milos, function14)
if (CURRENT_PARAM(1, 1) < getState()->timeTicks) {
- if (getObjects()->get(kObjectCompartment1).location == kObjectLocation1) {
+ if (getObjects()->get(kObjectCompartment1).status == kObjectLocation1) {
if (!Entity::updateParameter(CURRENT_PARAM(1, 2), getState()->timeTicks, 75))
break;
- getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
++params->param5;
switch (params->param5) {
default:
- getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).location, params->param3 < 1 ? kCursorTalk : kCursorNormal, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, params->param3 < 1 ? kCursorTalk : kCursorNormal, kCursorHand);
CURRENT_PARAM(1, 2) = 0;
break;
@@ -466,19 +466,19 @@ IMPLEMENT_FUNCTION(14, Milos, function14)
if (params->param7 < 3) {
params->param5 = 1;
- getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).location, params->param3 < 1 ? kCursorTalk : kCursorNormal, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, params->param3 < 1 ? kCursorTalk : kCursorNormal, kCursorHand);
CURRENT_PARAM(1, 2) = 0;
break;
}
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
callbackAction();
break;
}
} else {
if (getProgress().eventCorpseMovedFromFloor && getProgress().jacket != kJacketBlood) {
- params->param6 = (getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) ? kEventMilosTylerCompartmentBedVisit : kEventMilosTylerCompartmentVisit;
+ params->param6 = (getObjects()->get(kObjectCompartment1).model == kObjectLocation1) ? kEventMilosTylerCompartmentBedVisit : kEventMilosTylerCompartmentVisit;
setCallback(3);
setup_savegame(kSavegameTypeEvent, kEventMilosTylerCompartmentVisit);
@@ -538,7 +538,7 @@ label_callback_12:
setCallback(20);
setup_playSound("LIB012");
} else if (!params->param3) {
- getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
setCallback(22);
setup_playSound16("MIL1032");
@@ -549,9 +549,9 @@ label_callback_12:
if (getProgress().eventCorpseMovedFromFloor && getProgress().jacket != kJacketBlood) {
if (params->param2) {
getEntityData(kEntityPlayer)->location = kLocationInsideCompartment;
- params->param6 = (getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) ? kEventMilosTylerCompartmentBed : kEventMilosTylerCompartment;
+ params->param6 = (getObjects()->get(kObjectCompartment1).model == kObjectLocation1) ? kEventMilosTylerCompartmentBed : kEventMilosTylerCompartment;
} else {
- params->param6 = (getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) ? kEventMilosTylerCompartmentBedVisit : kEventMilosTylerCompartmentVisit;
+ params->param6 = (getObjects()->get(kObjectCompartment1).model == kObjectLocation1) ? kEventMilosTylerCompartmentBedVisit : kEventMilosTylerCompartmentVisit;
}
setCallback(17);
@@ -568,14 +568,14 @@ label_callback_12:
if (getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_8200)
|| getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_7850)
|| getEntities()->isOutsideAlexeiWindow()) {
- getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal);
+ getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorNormal);
if (getEntities()->isOutsideAlexeiWindow())
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49);
getSound()->playSound(kEntityPlayer, "LIB012");
- getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).location, kCursorTalk, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, kCursorTalk, kCursorHand);
params->param1 = 1;
} else {
@@ -644,7 +644,7 @@ label_callback_12:
case 7:
case 9:
case 11:
- getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).location, params->param3 < 1 ? kCursorTalk : kCursorNormal, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, params->param3 < 1 ? kCursorTalk : kCursorNormal, kCursorHand);
CURRENT_PARAM(1, 2) = 0;
break;
@@ -682,13 +682,13 @@ label_callback_12:
break;
case 16:
- getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).location == kObjectLocation1 ? "LIB032" : "LIB014");
+ getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).status == kObjectLocation1 ? "LIB032" : "LIB014");
getAction()->playAnimation(kEventMilosCorpseFloor);
getLogic()->gameOver(kSavegameTypeIndex, 1, getProgress().eventCorpseMovedFromFloor ? kSceneGameOverBloodJacket : kSceneGameOverPolice1, true);
break;
case 17:
- getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).location == kObjectLocation1 ? "LIB032" : "LIB014");
+ getSound()->playSound(kEntityPlayer, getObjects()->get(kObjectCompartment1).status == kObjectLocation1 ? "LIB032" : "LIB014");
getObjects()->update(kObjectCompartment1, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand);
getObjects()->update(kObjectOutsideTylerCompartment, kEntityPlayer, kObjectLocationNone, kCursorKeepValue, kCursorKeepValue);
getAction()->playAnimation((EventIndex)params->param6);
@@ -708,7 +708,7 @@ label_callback_12:
case 22:
params->param3 = 1;
- getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorHand);
break;
}
break;
diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp
index 5bcb6aef85..8c779baeba 100644
--- a/engines/lastexpress/entities/rebecca.cpp
+++ b/engines/lastexpress/entities/rebecca.cpp
@@ -665,7 +665,7 @@ IMPLEMENT_FUNCTION(21, Rebecca, chapter1)
getObjects()->update(kObject52, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand);
getObjects()->update(kObjectOutsideBetweenCompartments, kEntityPlayer, kObjectLocationNone, kCursorKeepValue, kCursorKeepValue);
- getObjects()->updateLocation2(kObject110, kObjectLocation1);
+ getObjects()->updateModel(kObject110, kObjectModel1);
getData()->entityPosition = kPosition_2830;
getData()->location = kLocationInsideCompartment;
@@ -1051,7 +1051,7 @@ IMPLEMENT_FUNCTION(28, Rebecca, chapter2)
getObjects()->update(kObjectCompartmentE, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand);
getObjects()->update(kObject52, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand);
- getObjects()->updateLocation2(kObject110, kObjectLocation2);
+ getObjects()->updateModel(kObject110, kObjectModel2);
ENTITY_PARAM(0, 2) = 1;
break;
@@ -1574,7 +1574,7 @@ IMPLEMENT_FUNCTION(42, Rebecca, chapter4)
getData()->clothes = kClothesDefault;
getData()->inventoryItem = kItemNone;
- getObjects()->updateLocation2(kObject110, kObjectLocation3);
+ getObjects()->updateModel(kObject110, kObjectModel3);
ENTITY_PARAM(0, 1) = 0;
ENTITY_PARAM(0, 2) = 1;
@@ -1750,7 +1750,7 @@ IMPLEMENT_FUNCTION(46, Rebecca, chapter5)
getData()->car = kCarRestaurant;
getData()->inventoryItem = kItemNone;
- getObjects()->updateLocation2(kObject110, kObjectLocation4);
+ getObjects()->updateModel(kObject110, kObjectModel4);
break;
}
IMPLEMENT_FUNCTION_END
diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp
index 199da1409c..9d792fa422 100644
--- a/engines/lastexpress/entities/tatiana.cpp
+++ b/engines/lastexpress/entities/tatiana.cpp
@@ -1917,7 +1917,7 @@ IMPLEMENT_FUNCTION(47, Tatiana, function47)
case 3:
case 4:
- if (ENTITY_PARAM(0, 1) && getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) {
+ if (ENTITY_PARAM(0, 1) && getObjects()->get(kObjectCompartment1).model == kObjectLocation1) {
setup_function48();
} else {
setCallback(4);
@@ -1940,7 +1940,7 @@ IMPLEMENT_FUNCTION(48, Tatiana, function48)
if (!getEvent(kEventTatianaTylerCompartment) && getEntities()->isInsideCompartment(kEntityPlayer, kCarGreenSleeping, kPosition_8200)) {
params->param1 = 1;
getProgress().field_E4 = 1;
- getObjects()->update(kObjectCompartment1, kEntityTatiana, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityTatiana, getObjects()->get(kObjectCompartment1).status, kCursorNormal, kCursorHand);
}
if (!params->param1)
@@ -1948,7 +1948,7 @@ IMPLEMENT_FUNCTION(48, Tatiana, function48)
}
if (!getEntities()->checkFields19(kEntityPlayer, kCarGreenSleeping, kPosition_7850)) {
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
params->param1 = 0;
}
@@ -1964,7 +1964,7 @@ IMPLEMENT_FUNCTION(48, Tatiana, function48)
label_end:
if (getEvent(kEventTatianaTylerCompartment) || getState()->time > kTime2475000) {
if (params->param1)
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
getProgress().field_E4 = 0;
getEntities()->exitCompartment(kEntityTatiana, kObjectCompartment2, true);
@@ -2040,7 +2040,7 @@ label_end:
case kAction238790488:
params->param1 = 0;
- getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand);
+ getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).status, kCursorHandKnock, kCursorHand);
getEntities()->exitCompartment(kEntityTatiana, kObjectCompartment2, true);
getEntities()->clearSequences(kEntityTatiana);
diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp
index 4695f8831f..67135c426f 100644
--- a/engines/lastexpress/entities/vassili.cpp
+++ b/engines/lastexpress/entities/vassili.cpp
@@ -112,7 +112,7 @@ IMPLEMENT_FUNCTION(5, Vassili, chapter1Handler)
break;
}
- if (!params->param2 && getObjects()->get(kObjectCompartmentA).location == kObjectLocation1) {
+ if (!params->param2 && getObjects()->get(kObjectCompartmentA).status == kObjectLocation1) {
params->param2 = 1;
getEntities()->drawSequenceLeft(kEntityVassili, "303A");
getObjects()->update(kObjectCompartmentA, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand);
@@ -289,7 +289,7 @@ IMPLEMENT_FUNCTION(9, Vassili, function9)
case kActionDefault:
case kActionDrawScene:
- if ((getObjects()->get(kObjectCompartmentA).location == kObjectLocation2 && getEntities()->isPlayerPosition(kCarRedSleeping, 17))
+ if ((getObjects()->get(kObjectCompartmentA).status == kObjectLocation2 && getEntities()->isPlayerPosition(kCarRedSleeping, 17))
|| getEntities()->isPlayerPosition(kCarRedSleeping, 18)
|| getEntities()->isPlayerPosition(kCarRedSleeping, 37)
|| getEntities()->isPlayerPosition(kCarRedSleeping, 38)
@@ -388,7 +388,7 @@ IMPLEMENT_FUNCTION(12, Vassili, chapter2)
getData()->inventoryItem = kItemNone;
getObjects()->update(kObjectCompartmentA, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand);
- getObjects()->updateLocation2(kObjectCompartmentA, kObjectLocation1);
+ getObjects()->updateModel(kObjectCompartmentA, kObjectModel1);
break;
}
IMPLEMENT_FUNCTION_END
@@ -532,7 +532,7 @@ IMPLEMENT_FUNCTION(16, Vassili, chapter4)
getData()->inventoryItem = kItemNone;
getObjects()->update(kObjectCompartmentA, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand);
- getObjects()->updateLocation2(kObjectCompartmentA, kObjectLocation1);
+ getObjects()->updateModel(kObjectCompartmentA, kObjectModel1);
break;
}
IMPLEMENT_FUNCTION_END
diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp
index 68c0813013..f1e980842e 100644
--- a/engines/lastexpress/entities/verges.cpp
+++ b/engines/lastexpress/entities/verges.cpp
@@ -1816,7 +1816,7 @@ IMPLEMENT_FUNCTION(41, Verges, askPassengersToStayInCompartments)
break;
case kActionDefault:
- getObjects()->updateLocation2(kObjectRestaurantCar, kObjectLocation3);
+ getObjects()->updateModel(kObjectRestaurantCar, kObjectModel3);
getData()->car = kCarRedSleeping;
getData()->entityPosition = kPosition_9460;
getData()->location = kLocationInsideCompartment;
diff --git a/engines/lastexpress/fight/fight.cpp b/engines/lastexpress/fight/fight.cpp
index 49a9b85657..a717299a74 100644
--- a/engines/lastexpress/fight/fight.cpp
+++ b/engines/lastexpress/fight/fight.cpp
@@ -222,7 +222,7 @@ Fight::FightEndType Fight::setup(FightType type) {
break;
case kFightMilos:
- sceneIndex = (getObjects()->get(kObjectCompartment1).location2 < kObjectLocation3) ? kSceneFightMilos : kSceneFightMilosBedOpened;
+ sceneIndex = (getObjects()->get(kObjectCompartment1).model < kObjectLocation3) ? kSceneFightMilos : kSceneFightMilosBedOpened;
break;
case kFightAnna:
diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp
index 19c3f45114..dcb421c979 100644
--- a/engines/lastexpress/game/action.cpp
+++ b/engines/lastexpress/game/action.cpp
@@ -521,7 +521,7 @@ IMPLEMENT_ACTION(compartment)
return kSceneNone;
}
- ObjectLocation location = getObjects()->get(compartment).location;
+ ObjectLocation location = getObjects()->get(compartment).status;
if (location == kObjectLocation1 || location == kObjectLocation3 || getEntities()->checkFields2(compartment)) {
if (location != kObjectLocation1 || getEntities()->checkFields2(compartment)
@@ -627,12 +627,12 @@ IMPLEMENT_ACTION(openCloseObject)
// Action 10
IMPLEMENT_ACTION(setModel)
ObjectIndex object = (ObjectIndex)hotspot.param1;
- ObjectLocation location = (ObjectLocation)hotspot.param2;
+ ObjectModel model = (ObjectModel)hotspot.param2;
if (object >= kObjectMax)
return kSceneInvalid;
- getObjects()->updateLocation2(object, location);
+ getObjects()->updateModel(object, model);
if (object != kObject112 || getSoundQueue()->isBuffered("LIB096")) {
if (object == 1)
@@ -808,7 +808,7 @@ IMPLEMENT_ACTION(dropItem)
//////////////////////////////////////////////////////////////////////////
// Action 16
IMPLEMENT_ACTION(enterCompartment)
- if (getObjects()->get(kObjectCompartment1).location == kObjectLocation1 || getObjects()->get(kObjectCompartment1).location == kObjectLocation3 || getInventory()->getSelectedItem() == kItemKey)
+ if (getObjects()->get(kObjectCompartment1).status == kObjectLocation1 || getObjects()->get(kObjectCompartment1).status == kObjectLocation3 || getInventory()->getSelectedItem() == kItemKey)
return action_compartment(hotspot);
if (getProgress().eventCorpseFound) {
@@ -845,9 +845,9 @@ IMPLEMENT_ACTION(enterCompartment)
IMPLEMENT_ACTION(leanOutWindow)
ObjectIndex object = (ObjectIndex)hotspot.param1;
- if ((getEvent(kEventCathLookOutsideWindowDay) || getEvent(kEventCathLookOutsideWindowNight) || getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1)
+ if ((getEvent(kEventCathLookOutsideWindowDay) || getEvent(kEventCathLookOutsideWindowNight) || getObjects()->get(kObjectCompartment1).model == kObjectModel1)
&& getProgress().isTrainRunning
- && (object != kObjectOutsideAnnaCompartment || (!getEntities()->isInsideCompartment(kEntityRebecca, kCarRedSleeping, kPosition_4840) && getObjects()->get(kObjectOutsideBetweenCompartments).location == kObjectLocation2))
+ && (object != kObjectOutsideAnnaCompartment || (!getEntities()->isInsideCompartment(kEntityRebecca, kCarRedSleeping, kPosition_4840) && getObjects()->get(kObjectOutsideBetweenCompartments).status == kObjectLocation2))
&& getInventory()->getSelectedItem() != kItemFirebird
&& getInventory()->getSelectedItem() != kItemBriefcase) {
@@ -1224,7 +1224,7 @@ IMPLEMENT_ACTION(exitCompartment)
getProgress().field_30 = 1;
}
- getObjects()->updateLocation2(kObjectCompartment1, (ObjectLocation)hotspot.param2);
+ getObjects()->updateModel(kObjectCompartment1, (ObjectModel)hotspot.param2);
// fall to case enterCompartment action
return action_enterCompartment(hotspot);
@@ -1724,7 +1724,7 @@ bool Action::handleOtherCompartment(ObjectIndex object, bool doPlaySound, bool d
}
void Action::playCompartmentSoundEvents(ObjectIndex object) const {
- if (getObjects()->get(object).location == kObjectLocation1 || getObjects()->get(object).location == kObjectLocation3 || getEntities()->checkFields2(object)) {
+ if (getObjects()->get(object).status == kObjectLocation1 || getObjects()->get(object).status == kObjectLocation3 || getEntities()->checkFields2(object)) {
getSound()->playSoundEvent(kEntityPlayer, 13);
} else {
getSound()->playSoundEvent(kEntityPlayer, 14);
@@ -1757,7 +1757,7 @@ CursorStyle Action::getCursor(const SceneHotspot &hotspot) const {
if (object >= kObjectMax)
return kCursorNormal;
else
- return (CursorStyle)getObjects()->get(object).cursor;
+ return (CursorStyle)getObjects()->get(object).windowCursor;
case SceneHotspot::kAction12:
debugC(2, kLastExpressDebugScenes, "================================= OBJECT %03d =================================", object);
@@ -1765,7 +1765,7 @@ CursorStyle Action::getCursor(const SceneHotspot &hotspot) const {
return kCursorNormal;
if (getObjects()->get(object).entity)
- return (CursorStyle)getObjects()->get(object).cursor;
+ return (CursorStyle)getObjects()->get(object).windowCursor;
else
return kCursorNormal;
@@ -1806,8 +1806,8 @@ CursorStyle Action::getCursor(const SceneHotspot &hotspot) const {
return kCursorNormal;
case SceneHotspot::kActionEnterCompartment:
- if ((getInventory()->getSelectedItem() != kItemKey || getObjects()->get(kObjectCompartment1).location)
- && (getObjects()->get(kObjectCompartment1).location != 1 || !getInventory()->hasItem(kItemKey)
+ if ((getInventory()->getSelectedItem() != kItemKey || getObjects()->get(kObjectCompartment1).status)
+ && (getObjects()->get(kObjectCompartment1).status != 1 || !getInventory()->hasItem(kItemKey)
|| (getInventory()->getSelectedItem() != kItemFirebird && getInventory()->getSelectedItem() != kItemBriefcase)))
goto LABEL_KEY;
@@ -1817,13 +1817,13 @@ CursorStyle Action::getCursor(const SceneHotspot &hotspot) const {
if (getProgress().jacket != kJacketGreen)
return kCursorNormal;
- if ((getEvent(kEventCathLookOutsideWindowDay) || getEvent(kEventCathLookOutsideWindowNight) || getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1)
+ if ((getEvent(kEventCathLookOutsideWindowDay) || getEvent(kEventCathLookOutsideWindowNight) || getObjects()->get(kObjectCompartment1).model == kObjectModel1)
&& getProgress().isTrainRunning
- && (object != kObjectOutsideAnnaCompartment || (getEntities()->isInsideCompartment(kEntityRebecca, kCarRedSleeping, kPosition_4840) && getObjects()->get(kObjectOutsideBetweenCompartments).location == 2))
+ && (object != kObjectOutsideAnnaCompartment || (getEntities()->isInsideCompartment(kEntityRebecca, kCarRedSleeping, kPosition_4840) && getObjects()->get(kObjectOutsideBetweenCompartments).status == 2))
&& getInventory()->getSelectedItem() != kItemBriefcase && getInventory()->getSelectedItem() != kItemFirebird)
return kCursorForward;
- return (getObjects()->get(kObjectCompartment1).location2 < kObjectLocation2) ? kCursorNormal : kCursorMagnifier;
+ return (getObjects()->get(kObjectCompartment1).model < kObjectModel2) ? kCursorNormal : kCursorMagnifier;
case SceneHotspot::kActionSlip:
return (getProgress().field_C8 < 1) ? kCursorNormal : kCursorLeft;
@@ -1841,7 +1841,7 @@ CursorStyle Action::getCursor(const SceneHotspot &hotspot) const {
if (object != kObjectCompartment1)
return kCursorNormal;
- return (getObjects()->get(kObjectCeiling).location < kObjectLocation1) ? kCursorHand : kCursorNormal;
+ return (getObjects()->get(kObjectCeiling).status < kObjectLocation1) ? kCursorHand : kCursorNormal;
case SceneHotspot::kActionUnbound:
if (hotspot.param2 != 2)
@@ -1904,11 +1904,11 @@ LABEL_KEY:
if (getInventory()->getSelectedItem() != kItemKey
|| getObjects()->get(object).entity
- || getObjects()->get(object).location != 1
- || !getObjects()->get(object).cursor2
+ || getObjects()->get(object).status != 1
+ || !getObjects()->get(object).handleCursor
|| getEntities()->isInsideCompartments(kEntityPlayer)
|| getEntities()->checkFields2(object))
- return (CursorStyle)getObjects()->get(object).cursor2;
+ return (CursorStyle)getObjects()->get(object).handleCursor;
else
return (CursorStyle)getInventory()->get(kItemKey)->cursor;
}
diff --git a/engines/lastexpress/game/object.cpp b/engines/lastexpress/game/object.cpp
index 2fcdde12b9..ad13a65199 100644
--- a/engines/lastexpress/game/object.cpp
+++ b/engines/lastexpress/game/object.cpp
@@ -32,7 +32,7 @@
namespace LastExpress {
Common::String Objects::Object::toString() {
- return Common::String::format("{ %s - %d - %d - %d - %d }", ENTITY_NAME(entity), location, cursor, cursor2, location2);
+ return Common::String::format("{ %s - %d - %d - %d - %d }", ENTITY_NAME(entity), status, windowCursor, handleCursor, model);
}
Objects::Objects(LastExpressEngine *engine) : _engine(engine) {}
@@ -44,24 +44,24 @@ const Objects::Object Objects::get(ObjectIndex index) const {
return _objects[index];
}
-void Objects::update(ObjectIndex index, EntityIndex entity, ObjectLocation location, CursorStyle cursor, CursorStyle cursor2) {
+void Objects::update(ObjectIndex index, EntityIndex entity, ObjectLocation status, CursorStyle windowCursor, CursorStyle handleCursor) {
if (index >= kObjectMax)
return;
Object *object = &_objects[index];
// Store original location
- ObjectLocation original_location = object->location;
+ ObjectLocation original_status = object->status;
// Update entity
object->entity = entity;
- object->location = location;
+ object->status = status;
- if (cursor != kCursorKeepValue || cursor2 != kCursorKeepValue) {
- if (cursor != kCursorKeepValue)
- object->cursor = cursor;
- if (cursor2 != kCursorKeepValue)
- object->cursor2 = cursor2;
+ if (windowCursor != kCursorKeepValue || handleCursor != kCursorKeepValue) {
+ if (windowCursor != kCursorKeepValue)
+ object->windowCursor = windowCursor;
+ if (handleCursor != kCursorKeepValue)
+ object->handleCursor = handleCursor;
getLogic()->updateCursor();
}
@@ -69,7 +69,7 @@ void Objects::update(ObjectIndex index, EntityIndex entity, ObjectLocation locat
getFlags()->flag_3 = true;
// Compartments
- if (original_location != location && (original_location == kObjectLocation2 || location == kObjectLocation2)) {
+ if (original_status != status && (original_status == kObjectLocation2 || status == kObjectLocation2)) {
if ((index >= kObjectCompartment1 && index <= kObjectCompartment8)
|| (index >= kObjectCompartmentA && index <= kObjectCompartmentF)) {
getScenes()->updateDoorsAndClock();
@@ -77,11 +77,11 @@ void Objects::update(ObjectIndex index, EntityIndex entity, ObjectLocation locat
}
}
-void Objects::updateLocation2(ObjectIndex index, ObjectLocation location2) {
+void Objects::updateModel(ObjectIndex index, ObjectModel model) {
if (index >= kObjectMax)
return;
- _objects[index].location2 = location2;
+ _objects[index].model = model;
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/lastexpress/game/object.h b/engines/lastexpress/game/object.h
index 87c9d7d407..be9d63d6c5 100644
--- a/engines/lastexpress/game/object.h
+++ b/engines/lastexpress/game/object.h
@@ -37,17 +37,17 @@ public:
struct Object : Common::Serializable { // All fields should be saved as bytes
EntityIndex entity;
- ObjectLocation location;
- CursorStyle cursor;
- CursorStyle cursor2;
- ObjectLocation location2;
+ ObjectLocation status;
+ CursorStyle windowCursor;
+ CursorStyle handleCursor;
+ ObjectModel model;
Object() {
entity = kEntityPlayer;
- location = kObjectLocationNone;
- cursor = kCursorHandKnock;
- cursor2 = kCursorHandKnock;
- location2 = kObjectLocationNone;
+ status = kObjectLocationNone;
+ windowCursor = kCursorHandKnock;
+ handleCursor = kCursorHandKnock;
+ model = kObjectModelNone;
}
Common::String toString();
@@ -55,18 +55,18 @@ public:
// Serializable
void saveLoadWithSerializer(Common::Serializer &s) {
s.syncAsByte(entity);
- s.syncAsByte(location);
- s.syncAsByte(cursor);
- s.syncAsByte(cursor2);
- s.syncAsByte(location2);
+ s.syncAsByte(status);
+ s.syncAsByte(windowCursor);
+ s.syncAsByte(handleCursor);
+ s.syncAsByte(model);
}
};
Objects(LastExpressEngine *engine);
const Object get(ObjectIndex index) const;
- void update(ObjectIndex index, EntityIndex entity, ObjectLocation location, CursorStyle cursor, CursorStyle cursor2);
- void updateLocation2(ObjectIndex index, ObjectLocation location2);
+ void update(ObjectIndex index, EntityIndex entity, ObjectLocation status, CursorStyle cursor, CursorStyle cursor2);
+ void updateModel(ObjectIndex index, ObjectModel model);
// Serializable
void saveLoadWithSerializer(Common::Serializer &s);
diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp
index 82688fff2e..0d8f51af6e 100644
--- a/engines/lastexpress/game/scenes.cpp
+++ b/engines/lastexpress/game/scenes.cpp
@@ -579,7 +579,7 @@ void SceneManager::updateDoorsAndClock() {
for (ObjectIndex index = firstIndex; index < (ObjectIndex)(firstIndex + 8); index = (ObjectIndex)(index + 1)) {
// Doors is not open, nothing to do
- if (getObjects()->get(index).location != kObjectLocation2)
+ if (getObjects()->get(index).status != kObjectLocation2)
continue;
// Load door sequence
@@ -842,11 +842,11 @@ void SceneManager::preProcessScene(SceneIndex *index) {
if (object >= kObjectMax)
break;
- if (getObjects()->get(object).location == kObjectLocationNone)
+ if (getObjects()->get(object).status == kObjectLocationNone)
break;
for (Common::Array<SceneHotspot *>::iterator it = scene->getHotspots()->begin(); it != scene->getHotspots()->end(); ++it) {
- if (getObjects()->get(object).location != (*it)->location)
+ if (getObjects()->get(object).status != (*it)->location)
continue;
PROCESS_HOTSPOT_SCENE(*it, index);
@@ -920,7 +920,7 @@ void SceneManager::preProcessScene(SceneIndex *index) {
int location = kObjectLocationNone;
- if (getObjects()->get(object).location == kObjectLocation2)
+ if (getObjects()->get(object).status == kObjectLocation2)
location = kObjectLocation1;
if (getInventory()->get(item)->location != kObjectLocationNone)
@@ -933,7 +933,7 @@ void SceneManager::preProcessScene(SceneIndex *index) {
if (location != (*it)->location)
continue;
- if (getObjects()->get(object).location != (*it)->param1)
+ if (getObjects()->get(object).status != (*it)->param1)
continue;
if (getInventory()->get(item)->location != (*it)->param2)
@@ -994,7 +994,7 @@ void SceneManager::preProcessScene(SceneIndex *index) {
bool found = false;
for (Common::Array<SceneHotspot *>::iterator it = scene->getHotspots()->begin(); it != scene->getHotspots()->end(); ++it) {
- if (getObjects()->get(object).location2 != (*it)->location)
+ if (getObjects()->get(object).model != (*it)->location)
continue;
PROCESS_HOTSPOT_SCENE(*it, index);
diff --git a/engines/lastexpress/shared.h b/engines/lastexpress/shared.h
index 56cf730e24..dae7928043 100644
--- a/engines/lastexpress/shared.h
+++ b/engines/lastexpress/shared.h
@@ -755,7 +755,7 @@ enum ClothesIndex {
};
//////////////////////////////////////////////////////////////////////////
-// Location of objects
+// Objects (doors)
//////////////////////////////////////////////////////////////////////////
enum ObjectLocation {
kObjectLocationNone = 0,
@@ -763,13 +763,27 @@ enum ObjectLocation {
kObjectLocation2 = 2, // Bed ?
kObjectLocation3 = 3,
kObjectLocation4 = 4, // Window ?
- kObjectLocation5 = 5,
- kObjectLocation6 = 6,
- kObjectLocation7 = 7,
- kObjectLocation8 = 8,
- kObjectLocation9 = 9,
- kObjectLocation10 = 10,
- kObjectLocation18 = 18
+ kObjectLocation5 = 5,
+ kObjectLocation6 = 6,
+ kObjectLocation7 = 7,
+ kObjectLocation8 = 8,
+ kObjectLocation9 = 9,
+ kObjectLocation10 = 10,
+ kObjectLocation18 = 18
+};
+
+enum ObjectModel {
+ kObjectModelNone = 0,
+ kObjectModel1 = 1,
+ kObjectModel2 = 2,
+ kObjectModel3 = 3,
+ kObjectModel4 = 4,
+ kObjectModel5 = 5,
+ kObjectModel6 = 6,
+ kObjectModel7 = 7,
+ kObjectModel8 = 8,
+ kObjectModel9 = 9,
+ kObjectModel10 = 10
};
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp
index 319f7cd4f4..ad61c2e0d9 100644
--- a/engines/lastexpress/sound/sound.cpp
+++ b/engines/lastexpress/sound/sound.cpp
@@ -1323,7 +1323,7 @@ void SoundManager::playLoopingSound(int param) {
break;
if (getEntities()->isInsideCompartment(kEntityPlayer, getEntityData(kEntityPlayer)->car, positions[pos])) {
numLoops[0] = 1;
- partNumber = (getObjects()->get((ObjectIndex)objNum).location - 2) < 1 ? 6 : 1;
+ partNumber = (getObjects()->get((ObjectIndex)objNum).status - 2) < 1 ? 6 : 1;
}
objNum++;
}