[Scummvm-cvs-logs] scummvm master -> ae12264c5f8e4aa5eb7422f1b4719846f758e14b
Templier
Templier at users.noreply.github.com
Tue Jun 17 01:02:51 CEST 2014
This automated email contains information about 20 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f403d6b45d LASTEXPRESS: Rename Kronos functions
7765f852be LASTEXPRESS: Rename Hadija functions
5310d49e53 LASTEXPRESS: Rename Server* classes to Waiter*
73cc1803cb LASTEXPRESS: Rename Waiter* functions
d921f6721d LASTEXPRESS: Add missing logic in Waiter2 for chapter 4
9b4ed3f1e5 LASTEXPRESS: Rename Cooks functions
a42f910a90 LASTEXPRESS: Rename Pascale functions
374ee55cfc LASTEXPRESS: Rename Kahina functions
b4d7c1c15b LASTEXPRESS: Rename Chapters and Gendarmes functions
9e1c0f14a8 LASTEXPRESS: Rename Max functions
cbb7c71c89 LASTEXPRESS: Add asserts in EntityData serialization code. CID 1003265
71a703d8bb LASTEXPRESS: Update SavePoint::push/call interface and check for string size. CID 1003261, 1003262
5aad09213b LASTEXPRESS: Replace useless checks by asserts. CID 1004086, 1004090
771cae50e4 LASTEXPRESS: Check that the archive is loaded correctly in debug code. CID 1003848, 1003849
4f78d1faec LASTEXPRESS: Add asserts in sound entry serialization and update code. CID 1003259, 1003260
0a4cf53df1 LASTEXPRESS: Fix comparison in sound entry serialization. CID 1004148
cf360e6721 LASTEXPRESS: Rename Ivo functions
be563f3c19 LASTEXPRESS: Add assert check in Gendarmes logic. CID 1003263
94861cd73c LASTEXPRESS: Check for resulting sequence size in August logic code. CID 1003264
ae12264c5f LASTEXPRESS: Fix potential out-of-bounds read. CID 1003992
Commit: f403d6b45db55264e92ba34dfc4c3a65a7a81435
https://github.com/scummvm/scummvm/commit/f403d6b45db55264e92ba34dfc4c3a65a7a81435
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:11-04:00
Commit Message:
LASTEXPRESS: Rename Kronos functions
Changed paths:
engines/lastexpress/entities/kronos.cpp
engines/lastexpress/entities/kronos.h
diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp
index 8bf1589..fd1eeee 100644
--- a/engines/lastexpress/entities/kronos.cpp
+++ b/engines/lastexpress/entities/kronos.cpp
@@ -70,21 +70,21 @@ Kronos::Kronos(LastExpressEngine *engine) : Entity(engine, kEntityKronos) {
ADD_CALLBACK_FUNCTION(Kronos, updateFromTicks);
ADD_CALLBACK_FUNCTION(Kronos, chapter1);
ADD_CALLBACK_FUNCTION(Kronos, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Kronos, function9);
+ ADD_CALLBACK_FUNCTION(Kronos, greetCath);
ADD_CALLBACK_FUNCTION(Kronos, function10);
ADD_CALLBACK_FUNCTION(Kronos, function11);
ADD_CALLBACK_FUNCTION(Kronos, chapter2);
ADD_CALLBACK_FUNCTION(Kronos, chapter3);
ADD_CALLBACK_FUNCTION(Kronos, chapter3Handler);
ADD_CALLBACK_FUNCTION(Kronos, function15);
- ADD_CALLBACK_FUNCTION(Kronos, function16);
- ADD_CALLBACK_FUNCTION(Kronos, function17);
- ADD_CALLBACK_FUNCTION(Kronos, function18);
- ADD_CALLBACK_FUNCTION(Kronos, function19);
- ADD_CALLBACK_FUNCTION(Kronos, function20);
- ADD_CALLBACK_FUNCTION(Kronos, function21);
- ADD_CALLBACK_FUNCTION(Kronos, function22);
- ADD_CALLBACK_FUNCTION(Kronos, function23);
+ ADD_CALLBACK_FUNCTION(Kronos, visitSalon);
+ ADD_CALLBACK_FUNCTION(Kronos, returnCompartment);
+ ADD_CALLBACK_FUNCTION(Kronos, preConcert);
+ ADD_CALLBACK_FUNCTION(Kronos, startConcert);
+ ADD_CALLBACK_FUNCTION(Kronos, duringConcert);
+ ADD_CALLBACK_FUNCTION(Kronos, afterConcert);
+ ADD_CALLBACK_FUNCTION(Kronos, awaitingCath);
+ ADD_CALLBACK_FUNCTION(Kronos, finished);
ADD_CALLBACK_FUNCTION(Kronos, chapter4);
ADD_CALLBACK_FUNCTION(Kronos, chapter5);
}
@@ -155,13 +155,13 @@ IMPLEMENT_FUNCTION(8, Kronos, chapter1Handler)
break;
case kAction202621266:
- setup_function9();
+ setup_greetCath();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Kronos, function9)
+IMPLEMENT_FUNCTION(9, Kronos, greetCath)
switch (savepoint.action) {
default:
break;
@@ -294,7 +294,7 @@ IMPLEMENT_FUNCTION(15, Kronos, function15)
case kActionNone:
if (params->param1 && !getEntities()->isInSalon(kEntityBoutarel)) {
if (Entity::updateParameter(params->param2, getState()->timeTicks, 75)) {
- setup_function16();
+ setup_visitSalon();
break;
}
}
@@ -311,13 +311,13 @@ IMPLEMENT_FUNCTION(15, Kronos, function15)
params->param3 = kTimeInvalid;
if (getEntities()->isInSalon(kEntityPlayer)) {
- setup_function16();
+ setup_visitSalon();
} else {
getSavePoints()->push(kEntityKronos, kEntityAnna, kAction101169422);
getSavePoints()->push(kEntityKronos, kEntityTatiana, kAction101169422);
getSavePoints()->push(kEntityKronos, kEntityAbbot, kAction101169422);
- setup_function18();
+ setup_preConcert();
}
}
break;
@@ -333,7 +333,7 @@ IMPLEMENT_FUNCTION(15, Kronos, function15)
case kActionDrawScene:
if (params->param1 && getEntities()->isPlayerPosition(kCarRestaurant, 51) && !getEntities()->isInSalon(kEntityBoutarel))
- setup_function16();
+ setup_visitSalon();
else
params->param1 = getEntities()->isPlayerPosition(kCarRestaurant, 60)
|| getEntities()->isPlayerPosition(kCarRestaurant, 59)
@@ -345,7 +345,7 @@ IMPLEMENT_FUNCTION(15, Kronos, function15)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Kronos, function16)
+IMPLEMENT_FUNCTION(16, Kronos, visitSalon)
switch (savepoint.action) {
default:
break;
@@ -363,14 +363,14 @@ IMPLEMENT_FUNCTION(16, Kronos, function16)
getSavePoints()->push(kEntityKronos, kEntityAbbot, kAction101169422);
getScenes()->loadSceneFromPosition(kCarRestaurant, 60);
- setup_function17();
+ setup_returnCompartment();
}
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Kronos, function17)
+IMPLEMENT_FUNCTION(17, Kronos, returnCompartment)
switch (savepoint.action) {
default:
break;
@@ -386,13 +386,13 @@ IMPLEMENT_FUNCTION(17, Kronos, function17)
case kActionCallback:
if (getCallback() == 1)
- setup_function18();
+ setup_preConcert();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(18, Kronos, function18)
+IMPLEMENT_FUNCTION(18, Kronos, preConcert)
switch (savepoint.action) {
default:
break;
@@ -405,7 +405,7 @@ IMPLEMENT_FUNCTION(18, Kronos, function18)
params->param2 = 1;
}
- if (!Entity::timeCheck(kTime2106000, params->param3, WRAP_SETUP_FUNCTION(Kronos, setup_function19))) {
+ if (!Entity::timeCheck(kTime2106000, params->param3, WRAP_SETUP_FUNCTION(Kronos, setup_startConcert))) {
if (params->param1 && getEntities()->isInKronosSanctum(kEntityPlayer)) {
setCallback(1);
setup_savegame(kSavegameTypeEvent, kEventKahinaPunchSuite4);
@@ -429,7 +429,7 @@ IMPLEMENT_FUNCTION(18, Kronos, function18)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Kronos, function19)
+IMPLEMENT_FUNCTION(19, Kronos, startConcert)
switch (savepoint.action) {
default:
break;
@@ -465,7 +465,7 @@ IMPLEMENT_FUNCTION(19, Kronos, function19)
RESET_ENTITY_STATE(kEntityAnna, Anna, setup_concert);
RESET_ENTITY_STATE(kEntityTatiana, Tatiana, setup_function35);
- setup_function20();
+ setup_duringConcert();
break;
}
break;
@@ -473,7 +473,7 @@ IMPLEMENT_FUNCTION(19, Kronos, function19)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Kronos, function20)
+IMPLEMENT_FUNCTION(20, Kronos, duringConcert)
switch (savepoint.action) {
default:
break;
@@ -585,7 +585,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
getSound()->playSound(kEntityPlayer, "BUMP");
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 26);
- setup_function21();
+ setup_afterConcert();
break;
}
@@ -602,7 +602,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
break;
}
- setup_function21();
+ setup_afterConcert();
break;
case kActionOpenDoor:
@@ -678,7 +678,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
getSound()->playSound(kEntityPlayer, "BUMP");
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 26);
- setup_function21();
+ setup_afterConcert();
break;
}
break;
@@ -686,7 +686,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(21, Kronos, function21)
+IMPLEMENT_FUNCTION(21, Kronos, afterConcert)
switch (savepoint.action) {
default:
break;
@@ -703,7 +703,7 @@ IMPLEMENT_FUNCTION(21, Kronos, function21)
getObjects()->update(kObjectCompartmentKronos, kEntityPlayer, kObjectLocation3, kCursorNormal, kCursorNormal);
getSavePoints()->push(kEntityKronos, kEntityRebecca, kAction191668032);
if (!getEvent(kEventConcertLeaveWithBriefcase))
- setup_function22();
+ setup_awaitingCath();
break;
case kActionCallback:
@@ -722,13 +722,13 @@ IMPLEMENT_FUNCTION(21, Kronos, function21)
break;
case kAction235599361:
- setup_function22();
+ setup_awaitingCath();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(22, Kronos, function22)
+IMPLEMENT_FUNCTION(22, Kronos, awaitingCath)
switch (savepoint.action) {
default:
break;
@@ -791,7 +791,7 @@ IMPLEMENT_FUNCTION(22, Kronos, function22)
getInventory()->removeItem(kItemFirebird);
getInventory()->removeItem(kItemScarf);
- setup_function23();
+ setup_finished();
break;
case 2:
@@ -800,7 +800,7 @@ IMPLEMENT_FUNCTION(22, Kronos, function22)
getInventory()->removeItem(kItemFirebird);
getInventory()->get(kItemFirebird)->location = kObjectLocation5;
- setup_function23();
+ setup_finished();
break;
case 3:
@@ -809,7 +809,7 @@ IMPLEMENT_FUNCTION(22, Kronos, function22)
getAction()->playAnimation(kEventKronosBringEgg);
getScenes()->loadSceneFromPosition(kCarKronos, 87);
getInventory()->addItem(kItemBriefcase);
- setup_function23();
+ setup_finished();
break;
case 4:
@@ -835,12 +835,12 @@ IMPLEMENT_FUNCTION(22, Kronos, function22)
break;
case kAction138085344:
- setup_function23();
+ setup_finished();
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Kronos, function23)
+IMPLEMENT_FUNCTION(23, Kronos, finished)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/kronos.h b/engines/lastexpress/entities/kronos.h
index 48da419..00564b8 100644
--- a/engines/lastexpress/entities/kronos.h
+++ b/engines/lastexpress/entities/kronos.h
@@ -89,7 +89,7 @@ public:
*/
DECLARE_FUNCTION(chapter1Handler)
- DECLARE_FUNCTION(function9)
+ DECLARE_FUNCTION(greetCath)
DECLARE_FUNCTION(function10)
DECLARE_FUNCTION(function11)
@@ -109,14 +109,14 @@ public:
DECLARE_FUNCTION(chapter3Handler)
DECLARE_FUNCTION(function15)
- DECLARE_FUNCTION(function16)
- DECLARE_FUNCTION(function17)
- DECLARE_FUNCTION(function18)
- DECLARE_FUNCTION(function19)
- DECLARE_FUNCTION(function20)
- DECLARE_FUNCTION(function21)
- DECLARE_FUNCTION(function22)
- DECLARE_FUNCTION(function23)
+ DECLARE_FUNCTION(visitSalon)
+ DECLARE_FUNCTION(returnCompartment)
+ DECLARE_FUNCTION(preConcert)
+ DECLARE_FUNCTION(startConcert)
+ DECLARE_FUNCTION(duringConcert)
+ DECLARE_FUNCTION(afterConcert)
+ DECLARE_FUNCTION(awaitingCath)
+ DECLARE_FUNCTION(finished)
/**
* Setup Chapter 4
Commit: 7765f852bee7990109c0d85d5819f0a642c11035
https://github.com/scummvm/scummvm/commit/7765f852bee7990109c0d85d5819f0a642c11035
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:12-04:00
Commit Message:
LASTEXPRESS: Rename Hadija functions
Changed paths:
engines/lastexpress/entities/hadija.cpp
engines/lastexpress/entities/hadija.h
diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp
index 14d5b71..eb255d7 100644
--- a/engines/lastexpress/entities/hadija.cpp
+++ b/engines/lastexpress/entities/hadija.cpp
@@ -38,10 +38,10 @@ Hadija::Hadija(LastExpressEngine *engine) : Entity(engine, kEntityHadija) {
ADD_CALLBACK_FUNCTION(Hadija, playSound);
ADD_CALLBACK_FUNCTION(Hadija, updateFromTime);
ADD_CALLBACK_FUNCTION(Hadija, updateEntity);
- ADD_CALLBACK_FUNCTION(Hadija, compartment6);
- ADD_CALLBACK_FUNCTION(Hadija, compartment8);
- ADD_CALLBACK_FUNCTION(Hadija, compartment6to8);
- ADD_CALLBACK_FUNCTION(Hadija, compartment8to6);
+ ADD_CALLBACK_FUNCTION(Hadija, peekF);
+ ADD_CALLBACK_FUNCTION(Hadija, peekH);
+ ADD_CALLBACK_FUNCTION(Hadija, goFtoH);
+ ADD_CALLBACK_FUNCTION(Hadija, goHtoF);
ADD_CALLBACK_FUNCTION(Hadija, chapter1);
ADD_CALLBACK_FUNCTION(Hadija, chapter1Handler);
ADD_CALLBACK_FUNCTION(Hadija, function12);
@@ -55,7 +55,7 @@ Hadija::Hadija(LastExpressEngine *engine) : Entity(engine, kEntityHadija) {
ADD_CALLBACK_FUNCTION(Hadija, chapter5);
ADD_CALLBACK_FUNCTION(Hadija, chapter5Handler);
ADD_CALLBACK_FUNCTION(Hadija, function22);
- ADD_CALLBACK_FUNCTION(Hadija, function23);
+ ADD_CALLBACK_FUNCTION(Hadija, hiding);
ADD_NULL_FUNCTION();
}
@@ -85,22 +85,22 @@ IMPLEMENT_FUNCTION_II(5, Hadija, updateEntity, CarIndex, EntityPosition)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(6, Hadija, compartment6)
+IMPLEMENT_FUNCTION(6, Hadija, peekF)
Entity::goToCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Cf", "619Df");
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Hadija, compartment8)
+IMPLEMENT_FUNCTION(7, Hadija, peekH)
Entity::goToCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Ch", "619Dh");
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(8, Hadija, compartment6to8)
+IMPLEMENT_FUNCTION(8, Hadija, goFtoH)
Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Bf", kObjectCompartment8, kPosition_2740, "619Ah");
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Hadija, compartment8to6)
+IMPLEMENT_FUNCTION(9, Hadija, goHtoF)
Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Bh", kObjectCompartment6, kPosition_4070, "619Af");
IMPLEMENT_FUNCTION_END
@@ -134,7 +134,7 @@ IMPLEMENT_FUNCTION(11, Hadija, chapter1Handler)
break;
label_callback1:
- if (Entity::timeCheckCallback(kTime1084500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8)))
+ if (Entity::timeCheckCallback(kTime1084500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goFtoH)))
break;
label_callback2:
@@ -147,7 +147,7 @@ label_callback2:
if (!params->param3) {
setCallback(3);
- setup_compartment8();
+ setup_peekH();
return;
}
}
@@ -159,11 +159,11 @@ label_callback2:
params->param3 = kTimeInvalid;
setCallback(3);
- setup_compartment8();
+ setup_peekH();
}
label_callback3:
- if (Entity::timeCheckCallback(kTime1156500, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)))
+ if (Entity::timeCheckCallback(kTime1156500, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF)))
break;
label_callback4:
@@ -175,7 +175,7 @@ label_callback4:
if (!params->param5) {
setCallback(5);
- setup_compartment6();
+ setup_peekF();
return;
}
}
@@ -187,7 +187,7 @@ label_callback4:
params->param5 = kTimeInvalid;
setCallback(5);
- setup_compartment6();
+ setup_peekF();
}
break;
@@ -254,7 +254,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler)
}
if (params->param2 == kTimeInvalid || getState()->time <= kTime1786500) {
- Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6));
+ Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF));
break;
}
@@ -264,7 +264,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler)
params->param2 = (uint)getState()->time + 75;
if (params->param2 >= getState()->time) {
- Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6));
+ Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF));
break;
}
}
@@ -272,7 +272,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler)
params->param2 = kTimeInvalid;
setCallback(1);
- setup_compartment8();
+ setup_peekH();
break;
case kActionCallback:
@@ -281,7 +281,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler)
break;
case 1:
- Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6));
+ Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF));
break;
case 2:
@@ -321,24 +321,24 @@ IMPLEMENT_FUNCTION(16, Hadija, chapter3Handler)
break;
case kActionNone:
- if (Entity::timeCheckCallback(kTime1998000, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8)))
+ if (Entity::timeCheckCallback(kTime1998000, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_goFtoH)))
break;
label_callback1:
- if (Entity::timeCheckCallback(kTime2020500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)))
+ if (Entity::timeCheckCallback(kTime2020500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF)))
break;
label_callback2:
- if (Entity::timeCheckCallback(kTime2079000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8)))
+ if (Entity::timeCheckCallback(kTime2079000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_goFtoH)))
break;
label_callback3:
- if (Entity::timeCheckCallback(kTime2187000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)))
+ if (Entity::timeCheckCallback(kTime2187000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF)))
break;
label_callback4:
if (params->param5 != kTimeInvalid && getState()->time > kTime2196000) {
- if (Entity::timeCheckCar(kTime2254500, params->param5, 5, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6)))
+ if (Entity::timeCheckCar(kTime2254500, params->param5, 5, WRAP_SETUP_FUNCTION(Hadija, setup_peekF)))
break;
}
break;
@@ -394,21 +394,21 @@ IMPLEMENT_FUNCTION(18, Hadija, chapter4Handler)
case kActionNone:
if (params->param1 != kTimeInvalid) {
- if (Entity::timeCheckCar(kTime1714500, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6)))
+ if (Entity::timeCheckCar(kTime1714500, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_peekF)))
break;
}
label_callback1:
- if (Entity::timeCheckCallback(kTime2367000, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8)))
+ if (Entity::timeCheckCallback(kTime2367000, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_goFtoH)))
break;
label_callback2:
- if (Entity::timeCheckCallback(kTime2421000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)))
+ if (Entity::timeCheckCallback(kTime2421000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_goHtoF)))
break;
label_callback3:
if (params->param4 != kTimeInvalid && getState()->time > kTime2425500) {
- if (Entity::timeCheckCar(kTime2484000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6)))
+ if (Entity::timeCheckCar(kTime2484000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_peekF)))
break;
}
break;
@@ -483,7 +483,7 @@ IMPLEMENT_FUNCTION(22, Hadija, function22)
if (!Entity::updateParameter(params->param1, getState()->time, 2700))
break;
- setup_function23();
+ setup_hiding();
break;
case kActionDefault:
@@ -494,14 +494,14 @@ IMPLEMENT_FUNCTION(22, Hadija, function22)
case kActionDrawScene:
if (getEntities()->isInsideTrainCar(kEntityPlayer, kCarGreenSleeping)) {
- setup_function23();
+ setup_hiding();
}
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Hadija, function23)
+IMPLEMENT_FUNCTION(23, Hadija, hiding)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/hadija.h b/engines/lastexpress/entities/hadija.h
index 8e92dc6..a66aa33 100644
--- a/engines/lastexpress/entities/hadija.h
+++ b/engines/lastexpress/entities/hadija.h
@@ -70,10 +70,10 @@ public:
*/
DECLARE_FUNCTION_2(updateEntity, CarIndex car, EntityPosition entityPosition)
- DECLARE_FUNCTION(compartment6)
- DECLARE_FUNCTION(compartment8)
- DECLARE_FUNCTION(compartment6to8)
- DECLARE_FUNCTION(compartment8to6)
+ DECLARE_FUNCTION(peekF)
+ DECLARE_FUNCTION(peekH)
+ DECLARE_FUNCTION(goFtoH)
+ DECLARE_FUNCTION(goHtoF)
/**
* Setup Chapter 1
@@ -130,7 +130,7 @@ public:
DECLARE_FUNCTION(chapter5Handler)
DECLARE_FUNCTION(function22)
- DECLARE_FUNCTION(function23)
+ DECLARE_FUNCTION(hiding)
DECLARE_NULL_FUNCTION()
};
Commit: 5310d49e5305cc5159d875cc8a8699ef6cc4b1b0
https://github.com/scummvm/scummvm/commit/5310d49e5305cc5159d875cc8a8699ef6cc4b1b0
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:13-04:00
Commit Message:
LASTEXPRESS: Rename Server* classes to Waiter*
Changed paths:
A engines/lastexpress/entities/waiter1.cpp
A engines/lastexpress/entities/waiter1.h
A engines/lastexpress/entities/waiter2.cpp
A engines/lastexpress/entities/waiter2.h
R engines/lastexpress/entities/servers0.cpp
R engines/lastexpress/entities/servers0.h
R engines/lastexpress/entities/servers1.cpp
R engines/lastexpress/entities/servers1.h
engines/lastexpress/entities/abbot.cpp
engines/lastexpress/entities/alexei.cpp
engines/lastexpress/entities/anna.cpp
engines/lastexpress/entities/august.cpp
engines/lastexpress/entities/boutarel.cpp
engines/lastexpress/entities/chapters.cpp
engines/lastexpress/entities/ivo.cpp
engines/lastexpress/entities/milos.cpp
engines/lastexpress/entities/pascale.cpp
engines/lastexpress/entities/rebecca.cpp
engines/lastexpress/entities/tatiana.cpp
engines/lastexpress/game/entities.cpp
engines/lastexpress/lastexpress.cpp
engines/lastexpress/module.mk
engines/lastexpress/shared.h
engines/lastexpress/sound/sound.cpp
diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp
index 5393410..1581916 100644
--- a/engines/lastexpress/entities/abbot.cpp
+++ b/engines/lastexpress/entities/abbot.cpp
@@ -415,7 +415,7 @@ IMPLEMENT_FUNCTION(22, Abbot, haveLunch)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime1971000, params->param1, kEntityAbbot, kEntityServers0, kAction218586752);
+ Entity::timeCheckSavepoint(kTime1971000, params->param1, kEntityAbbot, kEntityWaiter1, kAction218586752);
if (getState()->time > kTime1989000 && getEntities()->isSomebodyInsideRestaurantOrSalon()) {
getData()->inventoryItem = kItemNone;
@@ -476,7 +476,7 @@ IMPLEMENT_FUNCTION(23, Abbot, leaveLunch)
case 1:
getEntities()->updatePositionExit(kEntityAbbot, kCarRestaurant, 67);
- getSavePoints()->push(kEntityAbbot, kEntityServers0, kAction270068760);
+ getSavePoints()->push(kEntityAbbot, kEntityWaiter1, kAction270068760);
getSavePoints()->push(kEntityAbbot, kEntityAnna, kAction238936000);
getEntities()->drawSequenceRight(kEntityAbbot, "804DS");
@@ -1324,7 +1324,7 @@ IMPLEMENT_FUNCTION(41, Abbot, chapter4Handler)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime2358000, params->param1, kEntityAbbot, kEntityServers0, kAction218128129);
+ Entity::timeCheckSavepoint(kTime2358000, params->param1, kEntityAbbot, kEntityWaiter1, kAction218128129);
if (getState()->time > kTime2389500 && getEntities()->isSomebodyInsideRestaurantOrSalon())
setup_leaveDinner();
@@ -1368,7 +1368,7 @@ IMPLEMENT_FUNCTION(42, Abbot, leaveDinner)
case 1:
getEntities()->updatePositionExit(kEntityAbbot, kCarRestaurant, 67);
- getSavePoints()->push(kEntityAbbot, kEntityServers0, kAction270068760);
+ getSavePoints()->push(kEntityAbbot, kEntityWaiter1, kAction270068760);
getEntities()->drawSequenceRight(kEntityAbbot, "804DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
@@ -1779,7 +1779,7 @@ IMPLEMENT_FUNCTION(49, Abbot, catchCath)
getData()->location = kLocationInsideCompartment;
getSavePoints()->call(kEntityAbbot, kEntityTables4, kActionDrawTablesWithChairs, "029G");
- getSavePoints()->push(kEntityAbbot, kEntityServers0, kAction270068760);
+ getSavePoints()->push(kEntityAbbot, kEntityWaiter1, kAction270068760);
getSavePoints()->push(kEntityAbbot, kEntityBoutarel, kAction125039808);
getObjects()->update(kObjectCompartment2, kEntityAbbot, kObjectLocation1, kCursorHandKnock, kCursorHand);
getObjects()->update(kObjectHandleInsideBathroom, kEntityAbbot, kObjectLocation1, kCursorHandKnock, kCursorHand);
diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp
index 9b56fca..5ea3ff4 100644
--- a/engines/lastexpress/entities/alexei.cpp
+++ b/engines/lastexpress/entities/alexei.cpp
@@ -607,7 +607,7 @@ IMPLEMENT_FUNCTION(19, Alexei, returnCompartment)
case 7:
getEntities()->updatePositionExit(kEntityAlexei, kCarRestaurant, 63);
- getSavePoints()->push(kEntityAlexei, kEntityServers1, kAction302996448);
+ getSavePoints()->push(kEntityAlexei, kEntityWaiter2, kAction302996448);
setCallback(8);
setup_draw("934");
diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp
index ff65be9..3354964 100644
--- a/engines/lastexpress/entities/anna.cpp
+++ b/engines/lastexpress/entities/anna.cpp
@@ -907,7 +907,7 @@ IMPLEMENT_FUNCTION(23, Anna, waitingDinner)
case kActionDefault:
getEntities()->drawSequenceLeft(kEntityAnna, "001D");
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction270410280);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction270410280);
getSavePoints()->push(kEntityAnna, kEntityTables0, kAction136455232);
setCallback(1);
@@ -931,7 +931,7 @@ IMPLEMENT_FUNCTION(23, Anna, waitingDinner)
break;
case 3:
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction203859488);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction203859488);
setup_waitingDinner2();
break;
}
@@ -964,7 +964,7 @@ IMPLEMENT_FUNCTION(24, Anna, waitingDinner2)
break;
case 2:
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction136702400);
setup_eatingDinner();
break;
}
@@ -1034,7 +1034,7 @@ IMPLEMENT_FUNCTION(26, Anna, leaveDinner)
case 1:
getEntities()->updatePositionExit(kEntityAnna, kCarRestaurant, 62);
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction237485916);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction237485916);
getEntities()->drawSequenceRight(kEntityAnna, "801DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
@@ -2145,7 +2145,7 @@ label_callback_4:
break;
case 2:
- getSavePoints()->push(kEntityAnna, kEntityServers0, kAction218983616);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter1, kAction218983616);
break;
case 3:
@@ -2285,7 +2285,7 @@ IMPLEMENT_FUNCTION(51, Anna, afterLunch)
getData()->location = kLocationInsideCompartment;
getEntities()->drawSequenceLeft(kEntityAnna, "112B");
getEntities()->updatePositionExit(kEntityAnna, kCarRestaurant, 57);
- getSavePoints()->push(kEntityAnna, kEntityServers1, kAction219377792);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter2, kAction219377792);
break;
case 2:
@@ -3473,7 +3473,7 @@ IMPLEMENT_FUNCTION(69, Anna, goSalon4)
case 3:
getData()->location = kLocationInsideCompartment;
getEntities()->drawSequenceLeft(kEntityAnna, "127B");
- getSavePoints()->push(kEntityAnna, kEntityServers1, kAction258136010);
+ getSavePoints()->push(kEntityAnna, kEntityWaiter2, kAction258136010);
break;
case 4:
diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index c502953..a63a104 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -1162,7 +1162,7 @@ IMPLEMENT_FUNCTION(25, August, chapter1Handler)
break;
case 1:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction204704037);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction204704037);
getEntities()->drawSequenceRight(kEntityAugust, "803DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
getEntities()->updateFrame(kEntityAugust);
@@ -1195,7 +1195,7 @@ IMPLEMENT_FUNCTION(25, August, chapter1Handler)
break;
case 5:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction204704037);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction204704037);
getEntities()->drawSequenceRight(kEntityAugust, "803DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
getEntities()->updateFrame(kEntityAugust);
@@ -1366,7 +1366,7 @@ IMPLEMENT_FUNCTION(28, August, function28)
params->param1 = kItemInvalid;
getEntities()->drawSequenceLeft(kEntityAugust, "010B");
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction304061224);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction304061224);
getData()->inventoryItem = (InventoryItem)params->param1;
break;
@@ -1376,13 +1376,13 @@ IMPLEMENT_FUNCTION(28, August, function28)
break;
case 1:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction203859488);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction203859488);
getData()->inventoryItem = (InventoryItem)params->param1;
getEntities()->drawSequenceLeft(kEntityAugust, "010B");
break;
case 2:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction136702400);
getEntities()->drawSequenceLeft(kEntityAugust, "010B");
setup_function29();
break;
@@ -1399,7 +1399,7 @@ IMPLEMENT_FUNCTION(28, August, function28)
case kAction170016384:
getData()->inventoryItem = kItemNone;
- getEntities()->drawSequenceLeft(kEntityServers0, "BLANK");
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "BLANK");
getEntities()->drawSequenceLeft(kEntityAugust, "010G");
setCallback(2);
@@ -1551,7 +1551,7 @@ IMPLEMENT_FUNCTION(30, August, restaurant)
break;
case 3:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction292758554);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction292758554);
getSavePoints()->push(kEntityAugust, kEntityAnna, kAction122358304);
getEntities()->drawSequenceLeft(kEntityAugust, "001K");
getSound()->playSound(kEntityAugust, "AUG1003");
@@ -1815,7 +1815,7 @@ IMPLEMENT_FUNCTION(36, August, chapter2Handler)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime1755000, params->param2, kEntityAugust, kEntityServers0, kAction252568704);
+ Entity::timeCheckSavepoint(kTime1755000, params->param2, kEntityAugust, kEntityWaiter1, kAction252568704);
if (getState()->time > kTime1773000 && params->param1 && getEntities()->isSomebodyInsideRestaurantOrSalon()) {
getData()->inventoryItem = kItemNone;
@@ -1863,7 +1863,7 @@ IMPLEMENT_FUNCTION(36, August, chapter2Handler)
break;
case 3:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction286534136);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction286534136);
setCallback(4);
setup_updateEntity(kCarGreenSleeping, kPosition_6470);
@@ -1882,7 +1882,7 @@ IMPLEMENT_FUNCTION(36, August, chapter2Handler)
if (!getEvent(kEventAugustGoodMorning))
getData()->inventoryItem = kItemInvalid;
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction219522616);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction219522616);
getEntities()->drawSequenceLeft(kEntityAugust, "016B");
params->param1 = 1;
break;
@@ -3044,7 +3044,7 @@ IMPLEMENT_FUNCTION(60, August, function60)
}
if (pushSavepoint)
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction207330561);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction207330561);
if (!params->param1)
break;
@@ -3074,7 +3074,7 @@ IMPLEMENT_FUNCTION(60, August, function60)
break;
case 2:
- getSavePoints()->push(kEntityAugust, kEntityServers0, kAction286403504);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter1, kAction286403504);
setup_function61();
break;
}
@@ -3199,7 +3199,7 @@ IMPLEMENT_FUNCTION(62, August, function62)
case 5:
getEntities()->drawSequenceLeft(kEntityAugust, "122B");
- getSavePoints()->push(kEntityAugust, kEntityServers1, kAction291721418);
+ getSavePoints()->push(kEntityAugust, kEntityWaiter2, kAction291721418);
break;
}
break;
diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp
index 979381a..32507b0 100644
--- a/engines/lastexpress/entities/boutarel.cpp
+++ b/engines/lastexpress/entities/boutarel.cpp
@@ -310,7 +310,7 @@ IMPLEMENT_FUNCTION_I(14, Boutarel, function14, bool)
break;
case 2:
- getSavePoints()->push(kEntityBoutarel, kEntityServers1, kAction326144276);
+ getSavePoints()->push(kEntityBoutarel, kEntityWaiter2, kAction326144276);
getEntities()->drawSequenceRight(kEntityBoutarel, "812DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
getEntities()->updateFrame(kEntityBoutarel);
@@ -674,7 +674,7 @@ IMPLEMENT_FUNCTION(20, Boutarel, function20)
break;
case 2:
- getSavePoints()->push(kEntityBoutarel, kEntityServers1, kAction256200848);
+ getSavePoints()->push(kEntityBoutarel, kEntityWaiter2, kAction256200848);
break;
case 3:
@@ -937,7 +937,7 @@ IMPLEMENT_FUNCTION(29, Boutarel, function29)
case kActionNone:
if (Entity::updateParameter(params->param2, getState()->time, 450)) {
- getSavePoints()->push(kEntityBoutarel, kEntityServers1, kAction256200848);
+ getSavePoints()->push(kEntityBoutarel, kEntityWaiter2, kAction256200848);
}
if (!params->param1)
@@ -1086,7 +1086,7 @@ IMPLEMENT_FUNCTION(33, Boutarel, function33)
break;
case 2:
- getSavePoints()->push(kEntityBoutarel, kEntityServers1, kAction256200848);
+ getSavePoints()->push(kEntityBoutarel, kEntityWaiter2, kAction256200848);
break;
case 3:
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index fe977a5..b100e30 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -44,13 +44,13 @@
#include "lastexpress/entities/pascale.h"
#include "lastexpress/entities/rebecca.h"
#include "lastexpress/entities/salko.h"
-#include "lastexpress/entities/servers0.h"
-#include "lastexpress/entities/servers1.h"
#include "lastexpress/entities/sophie.h"
#include "lastexpress/entities/tatiana.h"
#include "lastexpress/entities/vassili.h"
#include "lastexpress/entities/verges.h"
#include "lastexpress/entities/vesna.h"
+#include "lastexpress/entities/waiter1.h"
+#include "lastexpress/entities/waiter2.h"
#include "lastexpress/entities/yasmin.h"
#include "lastexpress/game/action.h"
@@ -207,8 +207,8 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
case kActionDefault:
RESET_ENTITY_STATE(kEntityPascale, Pascale, setup_function19);
- RESET_ENTITY_STATE(kEntityServers0, Servers0, setup_function22);
- RESET_ENTITY_STATE(kEntityServers1, Servers1, setup_function16);
+ RESET_ENTITY_STATE(kEntityWaiter1, Waiter1, setup_function22);
+ RESET_ENTITY_STATE(kEntityWaiter2, Waiter2, setup_function16);
RESET_ENTITY_STATE(kEntityCooks, Cooks, setup_function7);
RESET_ENTITY_STATE(kEntityMertens, Mertens, setup_function42);
@@ -1518,8 +1518,8 @@ label_callback_4:
RESET_ENTITY_STATE(kEntityAugust, August, setup_function65);
RESET_ENTITY_STATE(kEntityMertens, Mertens, setup_function48);
RESET_ENTITY_STATE(kEntityCoudert, Coudert, setup_function53);
- RESET_ENTITY_STATE(kEntityServers0, Servers0, setup_chapter4Handler);
- RESET_ENTITY_STATE(kEntityServers1, Servers1, setup_chapter4Handler);
+ RESET_ENTITY_STATE(kEntityWaiter1, Waiter1, setup_chapter4Handler);
+ RESET_ENTITY_STATE(kEntityWaiter2, Waiter2, setup_chapter4Handler);
RESET_ENTITY_STATE(kEntityPascale, Pascale, setup_chapter4Handler);
RESET_ENTITY_STATE(kEntityVerges, Verges, setup_chapter4Handler);
RESET_ENTITY_STATE(kEntityTatiana, Tatiana, setup_function49);
@@ -1539,8 +1539,8 @@ label_callback_4:
getSavePoints()->push(kEntityChapters, kEntityAnna, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityMertens, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityCoudert, kAction201431954);
- getSavePoints()->push(kEntityChapters, kEntityServers0, kAction201431954);
- getSavePoints()->push(kEntityChapters, kEntityServers1, kAction201431954);
+ getSavePoints()->push(kEntityChapters, kEntityWaiter1, kAction201431954);
+ getSavePoints()->push(kEntityChapters, kEntityWaiter2, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityPascale, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityVerges, kAction201431954);
diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp
index b7697d0..cf18f43 100644
--- a/engines/lastexpress/entities/ivo.cpp
+++ b/engines/lastexpress/entities/ivo.cpp
@@ -464,7 +464,7 @@ IMPLEMENT_FUNCTION(20, Ivo, function20)
break;
case kActionDefault:
- getSavePoints()->push(kEntityIvo, kEntityServers1, kAction189688608);
+ getSavePoints()->push(kEntityIvo, kEntityWaiter2, kAction189688608);
getEntities()->drawSequenceLeft(kEntityIvo, "023B");
break;
@@ -474,7 +474,7 @@ IMPLEMENT_FUNCTION(20, Ivo, function20)
break;
case 1:
- getSavePoints()->push(kEntityIvo, kEntityServers1, kAction101106391);
+ getSavePoints()->push(kEntityIvo, kEntityWaiter2, kAction101106391);
getEntities()->drawSequenceLeft(kEntityIvo, "023B");
params->param1 = 1;
break;
@@ -485,7 +485,7 @@ IMPLEMENT_FUNCTION(20, Ivo, function20)
break;
case 3:
- getSavePoints()->push(kEntityIvo, kEntityServers1, kAction236237423);
+ getSavePoints()->push(kEntityIvo, kEntityWaiter2, kAction236237423);
setup_function21();
break;
}
diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp
index 601187b..90a397c 100644
--- a/engines/lastexpress/entities/milos.cpp
+++ b/engines/lastexpress/entities/milos.cpp
@@ -722,7 +722,7 @@ IMPLEMENT_FUNCTION(15, Milos, chapter1Handler)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime1071000, params->param3, kEntityMilos, kEntityServers1, kAction223002560);
+ Entity::timeCheckSavepoint(kTime1071000, params->param3, kEntityMilos, kEntityWaiter2, kAction223002560);
if (getState()->time > kTime1089000 && getEntities()->isSomebodyInsideRestaurantOrSalon()) {
setup_function16();
@@ -801,7 +801,7 @@ IMPLEMENT_FUNCTION(16, Milos, function16)
break;
case 1:
- getSavePoints()->push(kEntityMilos, kEntityServers1, kAction269485588);
+ getSavePoints()->push(kEntityMilos, kEntityWaiter2, kAction269485588);
getSavePoints()->push(kEntityMilos, kEntityIvo, kAction125242096);
getEntities()->drawSequenceRight(kEntityMilos, "807DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp
index b6356a0..69e5fe0 100644
--- a/engines/lastexpress/entities/pascale.cpp
+++ b/engines/lastexpress/entities/pascale.cpp
@@ -584,8 +584,8 @@ IMPLEMENT_FUNCTION(18, Pascale, function18)
if (getState()->time > kTime1242000 && !params->param1) {
params->param1 = 1;
- getSavePoints()->push(kEntityPascale, kEntityServers0, kAction101632192);
- getSavePoints()->push(kEntityPascale, kEntityServers1, kAction101632192);
+ getSavePoints()->push(kEntityPascale, kEntityWaiter1, kAction101632192);
+ getSavePoints()->push(kEntityPascale, kEntityWaiter2, kAction101632192);
getSavePoints()->push(kEntityPascale, kEntityCooks, kAction101632192);
getSavePoints()->push(kEntityPascale, kEntityVerges, kAction101632192);
diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp
index 0521166..40175ad 100644
--- a/engines/lastexpress/entities/rebecca.cpp
+++ b/engines/lastexpress/entities/rebecca.cpp
@@ -437,7 +437,7 @@ IMPLEMENT_FUNCTION(19, Rebecca, function19)
break;
case 2:
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction337548856);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction337548856);
getEntities()->drawSequenceRight(kEntityRebecca, "810DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
getEntities()->updateFrame(kEntityRebecca);
@@ -850,7 +850,7 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24)
break;
case kActionNone:
- Entity::timeCheckSavepoint(kTime1134000, params->param2, kEntityRebecca, kEntityServers0, kAction223712416);
+ Entity::timeCheckSavepoint(kTime1134000, params->param2, kEntityRebecca, kEntityWaiter1, kAction223712416);
if (!params->param1)
break;
@@ -920,7 +920,7 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24)
break;
case 8:
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction136702400);
getEntities()->drawSequenceLeft(kEntityRebecca, "012G");
params->param1 = 1;
break;
@@ -928,7 +928,7 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24)
break;
case kAction123712592:
- getEntities()->drawSequenceLeft(kEntityServers0, "BLANK");
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "BLANK");
getEntities()->drawSequenceLeft(kEntityRebecca, "012E");
setCallback(8);
@@ -1244,7 +1244,7 @@ IMPLEMENT_FUNCTION(34, Rebecca, function34)
params->param2 = kTimeInvalid;
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction223712416);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction223712416);
}
Entity::timeCheckCallback(kTime2052000, params->param3, 1, WRAP_SETUP_FUNCTION(Rebecca, setup_function19));
@@ -1280,7 +1280,7 @@ IMPLEMENT_FUNCTION(34, Rebecca, function34)
break;
case 4:
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction136702400);
getEntities()->drawSequenceLeft(kEntityRebecca, "012G");
params->param1 = 1;
break;
@@ -1288,7 +1288,7 @@ IMPLEMENT_FUNCTION(34, Rebecca, function34)
break;
case kAction123712592:
- getEntities()->drawSequenceLeft(kEntityServers0, "BLANK");
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "BLANK");
getSound()->playSound(kEntityRebecca, "Reb3003");
setCallback(4);
@@ -1624,7 +1624,7 @@ IMPLEMENT_FUNCTION(44, Rebecca, function44)
params->param3 = kTimeInvalid;
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction223712416);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction223712416);
}
label_next:
@@ -1684,7 +1684,7 @@ label_callback_2:
break;
case 4:
- getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction136702400);
+ getSavePoints()->push(kEntityRebecca, kEntityWaiter1, kAction136702400);
getEntities()->drawSequenceLeft(kEntityRebecca, "012G");
params->param2 = 1;
break;
diff --git a/engines/lastexpress/entities/servers0.cpp b/engines/lastexpress/entities/servers0.cpp
deleted file mode 100644
index 590efa7..0000000
--- a/engines/lastexpress/entities/servers0.cpp
+++ /dev/null
@@ -1,1034 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "lastexpress/entities/servers0.h"
-
-#include "lastexpress/game/entities.h"
-#include "lastexpress/game/logic.h"
-#include "lastexpress/game/object.h"
-#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/state.h"
-
-#include "lastexpress/lastexpress.h"
-
-namespace LastExpress {
-
-#define HANDLE_TABLE(index, param, callback, function) \
- if (ENTITY_PARAM(index, param)) { \
- setCallback(callback); \
- function(); \
- break; \
- }
-
-Servers0::Servers0(LastExpressEngine *engine) : Entity(engine, kEntityServers0) {
- ADD_CALLBACK_FUNCTION(Servers0, callSavepoint);
- ADD_CALLBACK_FUNCTION(Servers0, updateFromTime);
- ADD_CALLBACK_FUNCTION(Servers0, draw);
- ADD_CALLBACK_FUNCTION(Servers0, updatePosition);
- ADD_CALLBACK_FUNCTION(Servers0, callbackActionOnDirection);
- ADD_CALLBACK_FUNCTION(Servers0, playSound);
- ADD_CALLBACK_FUNCTION(Servers0, function7);
- ADD_CALLBACK_FUNCTION(Servers0, function8);
- ADD_CALLBACK_FUNCTION(Servers0, function9);
- ADD_CALLBACK_FUNCTION(Servers0, function10);
- ADD_CALLBACK_FUNCTION(Servers0, chapter1);
- ADD_CALLBACK_FUNCTION(Servers0, function12);
- ADD_CALLBACK_FUNCTION(Servers0, function13);
- ADD_CALLBACK_FUNCTION(Servers0, function14);
- ADD_CALLBACK_FUNCTION(Servers0, function15);
- ADD_CALLBACK_FUNCTION(Servers0, function16);
- ADD_CALLBACK_FUNCTION(Servers0, function17);
- ADD_CALLBACK_FUNCTION(Servers0, function18);
- ADD_CALLBACK_FUNCTION(Servers0, function19);
- ADD_CALLBACK_FUNCTION(Servers0, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Servers0, function21);
- ADD_CALLBACK_FUNCTION(Servers0, function22);
- ADD_CALLBACK_FUNCTION(Servers0, chapter2);
- ADD_CALLBACK_FUNCTION(Servers0, chapter2Handler);
- ADD_CALLBACK_FUNCTION(Servers0, function25);
- ADD_CALLBACK_FUNCTION(Servers0, function26);
- ADD_CALLBACK_FUNCTION(Servers0, chapter3);
- ADD_CALLBACK_FUNCTION(Servers0, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Servers0, augustAnnaDateOrder);
- ADD_CALLBACK_FUNCTION(Servers0, function30);
- ADD_CALLBACK_FUNCTION(Servers0, chapter4);
- ADD_CALLBACK_FUNCTION(Servers0, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Servers0, augustOrderSteak);
- ADD_CALLBACK_FUNCTION(Servers0, augustServeDuck);
- ADD_CALLBACK_FUNCTION(Servers0, function35);
- ADD_CALLBACK_FUNCTION(Servers0, chapter5);
- ADD_CALLBACK_FUNCTION(Servers0, chapter5Handler);
- ADD_NULL_FUNCTION();
-}
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_SIIS(1, Servers0, callSavepoint, EntityIndex, ActionIndex)
- Entity::callSavepoint(savepoint, true);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_NOSETUP(2, Servers0, updateFromTime)
- Entity::updateFromTime(savepoint);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(3, Servers0, draw)
- Entity::draw(savepoint, true);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_NOSETUP(4, Servers0, updatePosition)
- Entity::updatePosition(savepoint, true);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_NOSETUP(5, Servers0, callbackActionOnDirection)
- EXPOSE_PARAMS(EntityData::EntityParametersIIII);
-
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- if (getData()->direction != kDirectionRight)
- callbackAction();
- break;
-
- case kActionExitCompartment:
- callbackAction();
- break;
-
- case kActionExcuseMeCath:
- if (!params->param1) {
- getSound()->excuseMe(kEntityServers0);
- params->param1 = 1;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(6, Servers0, playSound)
- Entity::playSound(savepoint);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Servers0, function7)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- ENTITY_PARAM(0, 3) = 0;
-
- setCallback(1);
- setup_draw("911");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getEntities()->clearSequences(kEntityServers0);
- getSavePoints()->push(kEntityServers0, kEntityRebecca, kAction123712592);
- break;
-
- case 2:
- getEntities()->clearSequences(kEntityServers0);
- getData()->entityPosition = kPosition_5900;
- callbackAction();
- break;
- }
- break;
-
- case kAction136702400:
- setCallback(2);
- setup_draw("913");
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(8, Servers0, function8)
- serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "913", &ENTITY_PARAM(1, 2));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Servers0, function9)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw("915");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getSavePoints()->push(kEntityServers0, kEntityAbbot, kAction122358304);
- getEntities()->drawSequenceLeft(kEntityServers0, "029D");
-
- setCallback(2);
- setup_playSound(getProgress().chapter == kChapter3 ? "Abb3016" : "Abb4001");
- break;
-
- case 2:
- getSavePoints()->push(kEntityServers0, kEntityAbbot, kAction122288808);
-
- setCallback(3);
- setup_draw("917");
- break;
-
- case 3:
- getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
- ENTITY_PARAM(2, 2) = 0;
- ENTITY_PARAM(1, 6) = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(10, Servers0, function10)
- serveTable(savepoint, "916", kEntityTables4, "014E", "014F", "918", &ENTITY_PARAM(2, 3), false);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Servers0, chapter1)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter1Handler();
- break;
-
- case kActionDefault:
- getSavePoints()->addData(kEntityServers0, kAction270410280, 0);
- getSavePoints()->addData(kEntityServers0, kAction304061224, 1);
- getSavePoints()->addData(kEntityServers0, kAction252568704, 10);
- getSavePoints()->addData(kEntityServers0, kAction286534136, 11);
- getSavePoints()->addData(kEntityServers0, kAction218983616, 12);
- getSavePoints()->addData(kEntityServers0, kAction218586752, 13);
- getSavePoints()->addData(kEntityServers0, kAction207330561, 14);
- getSavePoints()->addData(kEntityServers0, kAction286403504, 16);
- getSavePoints()->addData(kEntityServers0, kAction218128129, 17);
- getSavePoints()->addData(kEntityServers0, kAction270068760, 18);
- getSavePoints()->addData(kEntityServers0, kAction223712416, 2);
- getSavePoints()->addData(kEntityServers0, kAction237485916, 5);
- getSavePoints()->addData(kEntityServers0, kAction188893625, 8);
- getSavePoints()->addData(kEntityServers0, kAction204704037, 6);
- getSavePoints()->addData(kEntityServers0, kAction292758554, 7);
- getSavePoints()->addData(kEntityServers0, kAction337548856, 9);
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Servers0, function12)
- handleServer(savepoint, "907", kEntityAnna, kAction268773672, &ENTITY_PARAM(0, 1));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Servers0, function13)
- handleServer(savepoint, "911", kEntityAugust, kAction268773672, &ENTITY_PARAM(0, 2), "010F");
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Servers0, function14)
- handleServer(savepoint, "908", kEntityAnna, kAction170016384, &ENTITY_PARAM(0, 4));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Servers0, function15)
- handleServer(savepoint, "912", kEntityAugust, kAction170016384, &ENTITY_PARAM(0, 5));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Servers0, function16)
- serveTable(savepoint, "907", kEntityTables0, "001N", "001P", "909", &ENTITY_PARAM(0, 6));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Servers0, function17)
- serveTable(savepoint, "915", kEntityTables4, "014E", "014F", "917", &ENTITY_PARAM(1, 1), true, false, 67);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(18, Servers0, function18)
- serveTable(savepoint, "911", kEntityTables3, "010L", "010H", "913", &ENTITY_PARAM(0, 7));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Servers0, function19)
- serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "913", &ENTITY_PARAM(0, 8), true, true);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Servers0, chapter1Handler)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- if (params->param2) {
- if (Entity::updateParameter(params->param3, getState()->time, 2700)) {
- ENTITY_PARAM(0, 4) = 1;
- params->param2 = 0;
- }
- }
-
- if (params->param1) {
- if (Entity::updateParameter(params->param4, getState()->time, 4500)) {
- ENTITY_PARAM(0, 5) = 1;
- params->param1 = 0;
- }
- }
-
- if (!getEntities()->isInKitchen(kEntityServers0) && !getEntities()->isSomebodyInsideRestaurantOrSalon())
- break;
-
- HANDLE_TABLE(0, 1, 1, setup_function12);
- HANDLE_TABLE(0, 2, 2, setup_function13);
- HANDLE_TABLE(0, 3, 3, setup_function7);
- HANDLE_TABLE(0, 4, 4, setup_function14);
- HANDLE_TABLE(0, 5, 5, setup_function15);
- HANDLE_TABLE(0, 6, 6, setup_function16);
- HANDLE_TABLE(1, 1, 7, setup_function17);
- HANDLE_TABLE(0, 7, 8, setup_function18);
- HANDLE_TABLE(0, 8, 9, setup_function19);
- HANDLE_TABLE(1, 2, 10, setup_function8);
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 10:
- getSavePoints()->push(kEntityServers0, kEntityPascale, kAction352703104);
- setup_function21();
- break;
-
- case 11:
- case 12:
- getEntities()->clearSequences(kEntityServers0);
- getData()->entityPosition = kPosition_5900;
-
- if (getCallback() == 11)
- params->param2 = 1;
- else
- params->param1 = 1;
- break;
-
- case 13:
- case 14:
- getEntities()->clearSequences(kEntityServers0);
- getData()->entityPosition = kPosition_5900;
- break;
- }
- break;
-
- case kAction136702400:
- setCallback(savepoint.entity2 == kEntityAnna ? 13 : 14);
- setup_draw(savepoint.entity2 == kEntityAnna ? "909" : "913");
- break;
-
- case kAction203859488:
- setCallback(savepoint.entity2 == kEntityAnna ? 11 : 12);
- setup_draw(savepoint.entity2 == kEntityAnna ? "910" : "913");
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(21, Servers0, function21)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5900;
- break;
-
- case kAction101632192:
- setup_function22();
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(22, Servers0, function22)
- if (savepoint.action == kActionDefault) {
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
-
- getEntities()->clearSequences(kEntityServers0);
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Servers0, chapter2)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter2Handler();
- break;
-
- case kActionDefault:
- getEntities()->clearSequences(kEntityServers0);
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
- getData()->clothes = kClothes1;
- getData()->inventoryItem = kItemNone;
-
- ENTITY_PARAM(1, 3) = 0;
- ENTITY_PARAM(1, 4) = 0;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(24, Servers0, chapter2Handler)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- if (!getEntities()->isInKitchen(kEntityServers0) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
- break;
-
- HANDLE_TABLE(1, 3, 1, setup_function25);
- HANDLE_TABLE(1, 4, 2, setup_function26);
- break;
-
- case kActionCallback:
- if (getCallback() == 1)
- HANDLE_TABLE(1, 4, 2, setup_function26);
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(25, Servers0, function25)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw("957");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getSavePoints()->push(kEntityServers0, kEntityAugust, kAction123712592);
- getEntities()->drawSequenceLeft(kEntityServers0, "BLANK");
- break;
-
- case 2:
- getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
- ENTITY_PARAM(1, 3) = 0;
-
- callbackAction();
- break;
- }
- break;
-
- case kAction219522616:
- setCallback(2);
- setup_draw("959");
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Servers0, function26)
- serveTable(savepoint, "957", kEntityTables0, "016E", "016D", "959", &ENTITY_PARAM(1, 4));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Servers0, chapter3)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter3Handler();
- break;
-
- case kActionDefault:
- getEntities()->clearSequences(kEntityServers0);
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
- getData()->clothes = kClothes1;
- getData()->inventoryItem = kItemNone;
-
- ENTITY_PARAM(0, 3) = 0;
- ENTITY_PARAM(1, 2) = 0;
- ENTITY_PARAM(1, 5) = 0;
- ENTITY_PARAM(1, 6) = 0;
- ENTITY_PARAM(2, 3) = 0;
- ENTITY_PARAM(2, 4) = 0;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Servers0, chapter3Handler)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
- break;
-
- if (ENTITY_PARAM(1, 5)) {
- setCallback(1);
- setup_augustAnnaDateOrder();
- break;
- }
-
-label_callback_1:
- if (ENTITY_PARAM(1, 6)) {
- setCallback(2);
- setup_function9();
- break;
- }
-
-label_callback_2:
- if (ENTITY_PARAM(2, 4)) {
- setCallback(3);
- setup_function30();
- break;
- }
-
-label_callback_3:
- if (ENTITY_PARAM(2, 3)) {
- setCallback(4);
- setup_function10();
- break;
- }
-
-label_callback_4:
- if (ENTITY_PARAM(0, 3)) {
- setCallback(5);
- setup_function7();
- break;
- }
-
-label_callback_5:
- if (ENTITY_PARAM(1, 2)) {
- setCallback(6);
- setup_function8();
- break;
- }
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- goto label_callback_1;
-
- case 2:
- goto label_callback_2;
-
- case 3:
- goto label_callback_3;
-
- case 4:
- goto label_callback_4;
-
- case 5:
- goto label_callback_5;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(29, Servers0, augustAnnaDateOrder)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw("911");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getSavePoints()->push(kEntityServers0, kEntityAnna, kAction122358304);
- getEntities()->drawSequenceLeft(kEntityServers0, "026D");
-
- setCallback(2);
- setup_playSound("Ann3138");
- break;
-
- case 2:
- getSavePoints()->push(kEntityServers0, kEntityAnna, kAction122288808);
-
- setCallback(3);
- setup_draw("913");
- break;
-
- case 3:
- getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
- ENTITY_PARAM(1, 5) = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(30, Servers0, function30)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw("916");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getSavePoints()->push(kEntityServers0, kEntityAbbot, kAction122358304);
- getEntities()->drawSequenceLeft(kEntityServers0, "029D");
-
- setCallback(2);
- setup_playSound("Abb3016a");
- break;
-
- case 2:
- getSavePoints()->push(kEntityServers0, kEntityAbbot, kAction122288808);
-
- setCallback(3);
- setup_draw("918");
- break;
-
- case 3:
- getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
- ENTITY_PARAM(2, 4) = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(31, Servers0, chapter4)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter4Handler();
- break;
-
- case kActionDefault:
- getEntities()->clearSequences(kEntityServers0);
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
- getData()->clothes = kClothesDefault;
- getData()->inventoryItem = kItemNone;
-
- ENTITY_PARAM(0, 3) = 0;
- ENTITY_PARAM(1, 7) = 0;
- ENTITY_PARAM(1, 8) = 0;
- ENTITY_PARAM(2, 1) = 0;
- ENTITY_PARAM(2, 2) = 0;
- ENTITY_PARAM(2, 3) = 0;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(32, Servers0, chapter4Handler)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- if (Entity::updateParameter(params->param2, getState()->time, 3600)) {
- ENTITY_PARAM(1, 8) = 1;
- params->param1 = 0;
- }
-
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
- break;
-
- if (ENTITY_PARAM(1, 7)) {
- setCallback(1);
- setup_augustOrderSteak();
- break;
- }
-
-label_callback_1:
- if (ENTITY_PARAM(1, 8)) {
- setCallback(2);
- setup_augustServeDuck();
- break;
- }
-
-label_callback_2:
- if (ENTITY_PARAM(2, 1)) {
- setCallback(3);
- setup_function35();
- break;
- }
-
-label_callback_3:
- if (ENTITY_PARAM(2, 2)) {
- setCallback(4);
- setup_function9();
- break;
- }
-
-label_callback_4:
- if (ENTITY_PARAM(2, 3)) {
- setCallback(5);
- setup_function10();
- break;
- }
-
-label_callback_5:
- if (ENTITY_PARAM(0, 3)) {
- setCallback(6);
- setup_function7();
- break;
- }
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- params->param1 = 1;
- goto label_callback_1;
-
- case 2:
- goto label_callback_2;
-
- case 3:
- goto label_callback_3;
-
- case 4:
- goto label_callback_4;
-
- case 5:
- goto label_callback_5;
- }
- break;
-
- case kAction201431954:
- ENTITY_PARAM(0, 3) = 0;
- ENTITY_PARAM(1, 7) = 0;
- ENTITY_PARAM(1, 8) = 0;
- ENTITY_PARAM(2, 1) = 0;
- ENTITY_PARAM(2, 3) = 0;
- params->param1 = 0;
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(33, Servers0, augustOrderSteak)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- setCallback(1);
- setup_draw("911");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getEntities()->drawSequenceLeft(kEntityServers0, "010F3");
- getEntities()->drawSequenceLeft(kEntityAugust, "010D3");
-
- setCallback(2);
- setup_playSound("AUG4002");
- break;
-
- case 2:
- getSavePoints()->push(kEntityServers0, kEntityAugust, kAction122288808);
-
- setCallback(3);
- setup_draw("913");
- break;
-
- case 3:
- getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
- ENTITY_PARAM(1, 7) = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(34, Servers0, augustServeDuck)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- setCallback(1);
- setup_draw("912");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getSavePoints()->push(kEntityServers0, kEntityAugust, kAction122358304);
- getSound()->playSound(kEntityServers0, "AUG1053");
-
- setCallback(2);
- setup_draw("010G3");
- break;
-
- case 2:
- getSavePoints()->push(kEntityServers0, kEntityAugust, kAction201964801);
-
- setCallback(3);
- setup_draw("914");
- break;
-
- case 3:
- getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers0);
- ENTITY_PARAM(1, 8) = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(35, Servers0, function35)
- serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "914", &ENTITY_PARAM(2, 1), false, true);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(36, Servers0, chapter5)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter5Handler();
- break;
-
- case kActionDefault:
- getEntities()->clearSequences(kEntityServers0);
-
- getData()->entityPosition = kPosition_3969;
- getData()->location = kLocationInsideCompartment;
- getData()->car = kCarRestaurant;
- getData()->inventoryItem = kItemNone;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(37, Servers0, chapter5Handler)
- if (savepoint.action == kActionProceedChapter5)
- setup_nullfunction();
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_NULL_FUNCTION(38, Servers0)
-
-
-//////////////////////////////////////////////////////////////////////////
-// Private functions
-//////////////////////////////////////////////////////////////////////////
-void Servers0::handleServer(const SavePoint &savepoint, const char *name, EntityIndex entity, ActionIndex action, uint *parameter, const char *name2) {
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw(name);
- break;
-
- case kActionCallback:
- if (getCallback() == 1) {
- // Prepare or draw sequences depending of value of string
- if (strcmp(name2, ""))
- getEntities()->clearSequences(kEntityServers0);
- else
- getEntities()->drawSequenceLeft(kEntityServers0, name2);
-
- getSavePoints()->push(kEntityServers0, entity, action);
- *parameter = 0;
-
- callbackAction();
- }
- break;
- }
-}
-
-//////////////////////////////////////////////////////////////////////////
-void Servers0::serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, bool shouldUpdatePosition, bool pushSavepoint, Position position) {
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- if (shouldUpdatePosition) {
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
- }
-
- setCallback(1);
- setup_draw(seq1);
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- if (position)
- getEntities()->updatePositionEnter(kEntityServers0, kCarRestaurant, position);
-
- getSavePoints()->push(kEntityServers0, entity, kAction136455232);
-
- setCallback(2);
- setup_callSavepoint(seq2, entity, kActionDrawTablesWithChairs, seq3);
- break;
-
- case 2:
- if (position)
- getEntities()->updatePositionExit(kEntityServers0, kCarRestaurant, position);
-
- setCallback(3);
- setup_draw(seq4);
- break;
-
- case 3:
- getData()->entityPosition = kPosition_5900;
-
- // Special case for functions 19 & 35
- if (pushSavepoint)
- getSavePoints()->push(kEntityServers0, kEntityRebecca, kAction224253538);
-
- getEntities()->clearSequences(kEntityServers0);
- *parameter = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-}
-
-} // End of namespace LastExpress
diff --git a/engines/lastexpress/entities/servers0.h b/engines/lastexpress/entities/servers0.h
deleted file mode 100644
index 70f0659..0000000
--- a/engines/lastexpress/entities/servers0.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef LASTEXPRESS_SERVERS0_H
-#define LASTEXPRESS_SERVERS0_H
-
-#include "lastexpress/entities/entity.h"
-
-namespace LastExpress {
-
-class LastExpressEngine;
-
-class Servers0 : public Entity {
-public:
- Servers0(LastExpressEngine *engine);
- ~Servers0() {}
-
- /**
- * Call a savepoint (or draw sequence in default case)
- *
- * @param sequence1 The sequence to draw in the default case
- * @param entity The entity
- * @param action The action
- * @param sequence2 The sequence name for the savepoint
- */
- DECLARE_FUNCTION_4(callSavepoint, const char *sequence1, EntityIndex entity, ActionIndex action, const char *sequence2)
-
- /**
- * Updates parameter 2 using time value
- *
- * @param savepoint The savepoint
- * - Time to add
- */
- DECLARE_FUNCTION_NOSETUP(updateFromTime)
-
- /**
- * Draws the entity
- *
- * @param sequence The sequence to draw
- */
- DECLARE_FUNCTION_1(draw, const char *sequence)
-
- /**
- * Updates the position
- *
- * @param sequence1 The sequence to draw
- * @param car The car
- * @param position The position
- */
- DECLARE_FUNCTION_3(updatePosition, const char *sequence1, CarIndex car, Position position)
-
- /**
- * Process callback action when the entity direction is not kDirectionRight
- */
- DECLARE_FUNCTION_NOSETUP(callbackActionOnDirection)
-
- /**
- * Plays sound
- *
- * @param filename The sound filename
- */
- DECLARE_FUNCTION_1(playSound, const char *filename)
-
- DECLARE_FUNCTION(function7)
- DECLARE_FUNCTION(function8)
- DECLARE_FUNCTION(function9)
- DECLARE_FUNCTION(function10)
-
- /**
- * Setup Chapter 1
- */
- DECLARE_FUNCTION(chapter1)
- DECLARE_FUNCTION(function12)
- DECLARE_FUNCTION(function13)
- DECLARE_FUNCTION(function14)
- DECLARE_FUNCTION(function15)
- DECLARE_FUNCTION(function16)
- DECLARE_FUNCTION(function17)
- DECLARE_FUNCTION(function18)
- DECLARE_FUNCTION(function19)
-
- /**
- * Handle Chapter 1 events
- */
- DECLARE_FUNCTION(chapter1Handler)
-
- DECLARE_FUNCTION(function21)
- DECLARE_FUNCTION(function22)
-
- /**
- * Setup Chapter 2
- */
- DECLARE_FUNCTION(chapter2)
-
- /**
- * Handle Chapter 2 events
- */
- DECLARE_FUNCTION(chapter2Handler)
-
- DECLARE_FUNCTION(function25)
- DECLARE_FUNCTION(function26)
-
- /**
- * Setup Chapter 3
- */
- DECLARE_FUNCTION(chapter3)
-
- /**
- * Handle Chapter 3 events
- */
- DECLARE_FUNCTION(chapter3Handler)
-
- DECLARE_FUNCTION(augustAnnaDateOrder)
- DECLARE_FUNCTION(function30)
-
- /**
- * Setup Chapter 4
- */
- DECLARE_FUNCTION(chapter4)
-
- /**
- * Handle Chapter 4 events
- */
- DECLARE_FUNCTION(chapter4Handler)
-
- DECLARE_FUNCTION(augustOrderSteak)
- DECLARE_FUNCTION(augustServeDuck)
- DECLARE_FUNCTION(function35)
-
- /**
- * Setup Chapter 5
- */
- DECLARE_FUNCTION(chapter5)
-
- /**
- * Handle Chapter 5 events
- */
- DECLARE_FUNCTION(chapter5Handler)
-
- DECLARE_NULL_FUNCTION()
-
-private:
- void handleServer(const SavePoint &savepoint, const char *name, EntityIndex entity, ActionIndex action, uint *parameter, const char *name2 = "");
- void serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, bool shouldUpdatePosition = true, bool pushSavepoint = false, Position position = 0);
-};
-
-} // End of namespace LastExpress
-
-#endif // LASTEXPRESS_SERVERS0_H
diff --git a/engines/lastexpress/entities/servers1.cpp b/engines/lastexpress/entities/servers1.cpp
deleted file mode 100644
index 153c2b6..0000000
--- a/engines/lastexpress/entities/servers1.cpp
+++ /dev/null
@@ -1,782 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "lastexpress/entities/servers1.h"
-
-#include "lastexpress/game/entities.h"
-#include "lastexpress/game/logic.h"
-#include "lastexpress/game/object.h"
-#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/state.h"
-
-#include "lastexpress/lastexpress.h"
-
-namespace LastExpress {
-
-Servers1::Servers1(LastExpressEngine *engine) : Entity(engine, kEntityServers1) {
- ADD_CALLBACK_FUNCTION(Servers1, updateFromTime);
- ADD_CALLBACK_FUNCTION(Servers1, draw);
- ADD_CALLBACK_FUNCTION(Servers1, updatePosition);
- ADD_CALLBACK_FUNCTION(Servers1, callbackActionOnDirection);
- ADD_CALLBACK_FUNCTION(Servers1, callSavepoint);
- ADD_CALLBACK_FUNCTION(Servers1, playSound);
- ADD_CALLBACK_FUNCTION(Servers1, function7);
- ADD_CALLBACK_FUNCTION(Servers1, chapter1);
- ADD_CALLBACK_FUNCTION(Servers1, function9);
- ADD_CALLBACK_FUNCTION(Servers1, function10);
- ADD_CALLBACK_FUNCTION(Servers1, function11);
- ADD_CALLBACK_FUNCTION(Servers1, function12);
- ADD_CALLBACK_FUNCTION(Servers1, function13);
- ADD_CALLBACK_FUNCTION(Servers1, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Servers1, function15);
- ADD_CALLBACK_FUNCTION(Servers1, function16);
- ADD_CALLBACK_FUNCTION(Servers1, chapter2);
- ADD_CALLBACK_FUNCTION(Servers1, chapter2Handler);
- ADD_CALLBACK_FUNCTION(Servers1, function19);
- ADD_CALLBACK_FUNCTION(Servers1, function20);
- ADD_CALLBACK_FUNCTION(Servers1, function21);
- ADD_CALLBACK_FUNCTION(Servers1, chapter3);
- ADD_CALLBACK_FUNCTION(Servers1, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Servers1, function24);
- ADD_CALLBACK_FUNCTION(Servers1, chapter4);
- ADD_CALLBACK_FUNCTION(Servers1, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Servers1, function27);
- ADD_CALLBACK_FUNCTION(Servers1, function28);
- ADD_CALLBACK_FUNCTION(Servers1, function29);
- ADD_CALLBACK_FUNCTION(Servers1, chapter5);
- ADD_CALLBACK_FUNCTION(Servers1, chapter5Handler);
- ADD_NULL_FUNCTION()
-}
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_NOSETUP(1, Servers1, updateFromTime)
- Entity::updateFromTime(savepoint);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(2, Servers1, draw)
- Entity::draw(savepoint, true);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_SII(3, Servers1, updatePosition, CarIndex, Position)
- Entity::updatePosition(savepoint, true);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(4, Servers1, callbackActionOnDirection)
- if (savepoint.action == kActionExcuseMeCath) {
- if (!params->param1) {
- getSound()->excuseMe(kEntityServers1);
- params->param1 = 1;
- }
- }
-
- Entity::callbackActionOnDirection(savepoint);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_SIIS(5, Servers1, callSavepoint, EntityIndex, ActionIndex)
- Entity::callSavepoint(savepoint, true);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(6, Servers1, playSound)
- Entity::playSound(savepoint);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Servers1, function7)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw("924");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getSavePoints()->push(kEntityServers1, kEntityBoutarel, kAction122358304);
- setCallback(2);
- setup_draw("008C");
- break;
-
- case 2:
- getSavePoints()->push(kEntityServers1, kEntityBoutarel, kAction122288808);
- setCallback(2);
- setup_draw("926");
- break;
-
- case 3:
- getEntities()->clearSequences(kEntityServers1);
- getData()->entityPosition = kPosition_5900;
- ENTITY_PARAM(1, 2) = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(8, Servers1, chapter1)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter1Handler();
- break;
-
- case kActionDefault:
- getSavePoints()->addData(kEntityServers1, kAction223002560, 0);
- getSavePoints()->addData(kEntityServers1, kAction302996448, 2);
- getSavePoints()->addData(kEntityServers1, kAction269485588, 3);
- getSavePoints()->addData(kEntityServers1, kAction326144276, 4);
- getSavePoints()->addData(kEntityServers1, kAction302203328, 5);
- getSavePoints()->addData(kEntityServers1, kAction189688608, 6);
- getSavePoints()->addData(kEntityServers1, kAction236237423, 7);
- getSavePoints()->addData(kEntityServers1, kAction219377792, 8);
- getSavePoints()->addData(kEntityServers1, kAction256200848, 9);
- getSavePoints()->addData(kEntityServers1, kAction291721418, 10);
- getSavePoints()->addData(kEntityServers1, kAction258136010, 11);
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Servers1, function9)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw("924");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getEntities()->drawSequenceLeft(kEntityMilos, "BLANK");
- getEntities()->drawSequenceLeft(kEntityServers1, "009B");
-
- setCallback(2);
- setup_playSound("WAT1001");
- break;
-
- case 2:
- getEntities()->drawSequenceLeft(kEntityMilos, "009A");
-
- setCallback(3);
- setup_draw("926");
- break;
-
- case 3:
- getEntities()->clearSequences(kEntityServers1);
- getData()->entityPosition = kPosition_5900;
- ENTITY_PARAM(0, 1) = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(10, Servers1, function10)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw("924");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getEntities()->drawSequenceLeft(kEntityBoutarel, "BLANK");
- getEntities()->drawSequenceLeft(kEntityServers1, "008C");
-
- setCallback(2);
- setup_playSound("MRB1077");
- break;
-
- case 2:
- getSavePoints()->push(kEntityServers1, kEntityBoutarel, kAction168717392);
-
- setCallback(3);
- setup_draw("926");
- break;
-
- case 3:
- getEntities()->clearSequences(kEntityServers1);
- getData()->entityPosition = kPosition_5900;
- ENTITY_PARAM(0, 2) = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Servers1, function11)
- serveTable(savepoint, "919", kEntityTables1, "005H", "005J", "921", &ENTITY_PARAM(0, 3), 63);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Servers1, function12)
- serveTable(savepoint, "923", kEntityTables2, "009F", "009G", "926", &ENTITY_PARAM(0, 4));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Servers1, function13)
- serveTable(savepoint, "923", kEntityTables2, "009F", "009G", "926", &ENTITY_PARAM(0, 5));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Servers1, chapter1Handler)
-switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
- break;
-
- if (ENTITY_PARAM(0, 1)) {
- setCallback(1);
- setup_function9();
- break;
- }
-
- if (ENTITY_PARAM(1, 2)) {
- setCallback(2);
- setup_function10();
- break;
- }
-
- if (ENTITY_PARAM(0, 3)) {
- setCallback(3);
- setup_function11();
- break;
- }
-
- if (ENTITY_PARAM(0, 4)) {
- setCallback(4);
- setup_function12();
- break;
- }
-
- if (ENTITY_PARAM(0, 5)) {
- setCallback(5);
- setup_function13();
- }
- break;
-
- case kActionCallback:
- if (getCallback() == 5) {
- getSavePoints()->push(kEntityServers1, kEntityPascale, kAction352768896);
- setup_function15();
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Servers1, function15)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5900;
- break;
-
- case kAction101632192:
- setup_function16();
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Servers1, function16)
- if (savepoint.action == kActionDefault) {
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
-
- getEntities()->clearSequences(kEntityServers1);
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Servers1, chapter2)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter2Handler();
- break;
-
- case kActionDefault:
- getEntities()->clearSequences(kEntityServers1);
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
- getData()->clothes = kClothes1;
- getData()->inventoryItem = kItemNone;
-
- ENTITY_PARAM(0, 6) = 0;
- ENTITY_PARAM(0, 7) = 0;
- ENTITY_PARAM(0, 8) = 0;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(18, Servers1, chapter2Handler)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
- break;
-
- if (ENTITY_PARAM(0, 6)) {
- setCallback(1);
- setup_function19();
- break;
- }
-
-label_callback_1:
- if (ENTITY_PARAM(0, 7)) {
- setCallback(2);
- setup_function20();
- break;
- }
-
-label_callback_2:
- if (ENTITY_PARAM(0, 8) || ENTITY_PARAM(0, 5)) {
- setCallback(3);
- setup_function21();
- }
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- goto label_callback_1;
-
- case 2:
- goto label_callback_2;
-
- case 4:
- getEntities()->clearSequences(kEntityServers1);
- getData()->entityPosition = kPosition_5900;
- break;
- }
- break;
-
- case kAction101106391:
- setCallback(4);
- setup_draw("975");
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Servers1, function19)
- serveTable(savepoint, "969", kEntityTables1, "005H2", "018A", "971", &ENTITY_PARAM(0, 6), 63);
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Servers1, function20)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw("973");
- break;
-
- case kActionCallback:
- if (getCallback() == 1) {
- getSavePoints()->push(kEntityServers1, kEntityIvo, kAction123712592);
- getEntities()->drawSequenceLeft(kEntityServers1, "BLANK");
- ENTITY_PARAM(0, 7) = 0;
-
- callbackAction();
- }
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(21, Servers1, function21)
- serveTable(savepoint, "974", kEntityTables2, "009F2", "009G", "976", &ENTITY_PARAM(0, 8), 0, true, &ENTITY_PARAM(0, 5));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(22, Servers1, chapter3)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter3Handler();
- break;
-
- case kActionDefault:
- getEntities()->clearSequences(kEntityServers1);
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
- getData()->clothes = kClothes1;
- getData()->inventoryItem = kItemNone;
-
- ENTITY_PARAM(1, 1) = 0;
- ENTITY_PARAM(1, 2) = 0;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Servers1, chapter3Handler)
- if (savepoint.action != kActionNone)
- return;
-
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
- return;
-
- if (ENTITY_PARAM(1, 1)) {
- setCallback(1);
- setup_function24();
- return;
- }
-
- if (ENTITY_PARAM(1, 2)) {
- setCallback(2);
- setup_function7();
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(24, Servers1, function24)
- serveSalon(savepoint, "927", "Ann3143A", kEntityAnna, "Ann31444", "112C", kAction122288808, "928", &ENTITY_PARAM(1, 1));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(25, Servers1, chapter4)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter4Handler();
- break;
-
- case kActionDefault:
- getEntities()->clearSequences(kEntityServers1);
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- getData()->car = kCarRestaurant;
- getData()->inventoryItem = kItemNone;
-
- getEntities()->clearSequences(kEntityServers1);
-
- ENTITY_PARAM(1, 2) = 0;
- ENTITY_PARAM(1, 3) = 0;
- ENTITY_PARAM(1, 4) = 0;
- ENTITY_PARAM(1, 5) = 0;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Servers1, chapter4Handler)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- if (params->param2) {
- if (Entity::updateParameter(params->param2, getState()->time, 900)) {
- ENTITY_PARAM(1, 5) = 1;
- params->param1 = 0;
- }
- }
-
- if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
- break;
-
- if (ENTITY_PARAM(1, 5)) {
- setCallback(2);
- setup_function28();
- break;
- }
-
- if (ENTITY_PARAM(1, 4)) {
- setCallback(3);
- setup_function29();
- break;
- }
-
- if (ENTITY_PARAM(1, 2)) {
- setCallback(4);
- setup_function7();
- }
- break;
-
- case kActionCallback:
- if (getCallback() == 1)
- params->param1 = 1;
- break;
-
- case kAction201431954:
- ENTITY_PARAM(1, 2) = 0;
- ENTITY_PARAM(1, 3) = 0;
- ENTITY_PARAM(1, 4) = 0;
- ENTITY_PARAM(1, 5) = 0;
-
- getData()->entityPosition = kPosition_5900;
- getData()->location = kLocationOutsideCompartment;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Servers1, function27)
- serveSalon(savepoint, "929", "", kEntityAugust, "Aug4003", "122D", kAction134486752, "930", &ENTITY_PARAM(1, 3));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Servers1, function28)
- serveSalon(savepoint, "931", "", kEntityAugust, "Aug4004", "122E", kAction125826561, "930", &ENTITY_PARAM(1, 5));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(29, Servers1, function29)
- serveSalon(savepoint, "932", "", kEntityAnna, "Ann4151", "127D", kAction122288808, "930", &ENTITY_PARAM(1, 4));
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(30, Servers1, chapter5)
- switch (savepoint.action) {
- default:
- break;
-
- case kActionNone:
- setup_chapter5Handler();
- break;
-
- case kActionDefault:
- getEntities()->clearSequences(kEntityServers1);
-
- getData()->entityPosition = kPosition_3969;
- getData()->location = kLocationInsideCompartment;
- getData()->car = kCarRestaurant;
- getData()->inventoryItem = kItemNone;
- break;
- }
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(31, Servers1, chapter5Handler)
- if (savepoint.action == kActionProceedChapter5)
- setup_nullfunction();
-IMPLEMENT_FUNCTION_END
-
-//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_NULL_FUNCTION(32, Servers1)
-
-
-//////////////////////////////////////////////////////////////////////////
-// Private functions
-//////////////////////////////////////////////////////////////////////////
-void Servers1::serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, Position position, bool shouldUpdatePosition, uint *parameter2) {
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- if (shouldUpdatePosition) {
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
- }
-
- setCallback(1);
- setup_draw(seq1);
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- if (position)
- getEntities()->updatePositionEnter(kEntityServers1, kCarRestaurant, position);
-
- getSavePoints()->push(kEntityServers1, entity, kAction136455232);
-
- setCallback(2);
- setup_callSavepoint(seq2, entity, kActionDrawTablesWithChairs, seq3);
- break;
-
- case 2:
- if (position)
- getEntities()->updatePositionExit(kEntityServers1, kCarRestaurant, position);
-
- setCallback(3);
- setup_draw(seq4);
- break;
-
- case 3:
- getData()->entityPosition = kPosition_5900;
- getEntities()->clearSequences(kEntityServers1);
- *parameter = 0;
-
- if (parameter2 != NULL)
- *parameter2 = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-}
-
-//////////////////////////////////////////////////////////////////////////
-void Servers1::serveSalon(const SavePoint &savepoint, const char *seq1, const char *snd1, EntityIndex entity, const char *snd2, const char *seq2, ActionIndex action, const char *seq3, uint *parameter) {
- switch (savepoint.action) {
- default:
- break;
-
- case kActionDefault:
- getData()->entityPosition = kPosition_5800;
- getData()->location = kLocationOutsideCompartment;
-
- setCallback(1);
- setup_draw("816DD");
- break;
-
- case kActionCallback:
- switch (getCallback()) {
- default:
- break;
-
- case 1:
- getEntities()->drawSequenceRight(kEntityServers1, seq1);
-
- if (getEntities()->isInRestaurant(kEntityPlayer))
- getEntities()->updateFrame(kEntityServers1);
-
- if (!strcmp(snd1, ""))
- getSound()->playSound(kEntityServers1, snd1);
-
- setCallback(2);
- setup_callbackActionOnDirection();
- break;
-
- case 2:
- getSavePoints()->push(kEntityServers1, entity, kAction122358304);
-
- getSound()->playSound(kEntityServers1, snd2);
-
- setCallback(3);
- setup_updatePosition(seq2, kCarRestaurant, 57);
- break;
-
- case 3:
- getSavePoints()->push(kEntityServers1, entity, action);
-
- setCallback(4);
- setup_draw(seq3);
- break;
-
- case 4:
- getEntities()->drawSequenceRight(kEntityServers1, "816UD");
-
- if (getEntities()->isInSalon(kEntityPlayer))
- getEntities()->updateFrame(kEntityServers1);
-
- setCallback(5);
- setup_callbackActionOnDirection();
- break;
-
- case 5:
- getEntities()->clearSequences(kEntityServers1);
- getData()->entityPosition = kPosition_5900;
- *parameter = 0;
-
- callbackAction();
- break;
- }
- break;
- }
-}
-
-} // End of namespace LastExpress
diff --git a/engines/lastexpress/entities/servers1.h b/engines/lastexpress/entities/servers1.h
deleted file mode 100644
index 58566cd..0000000
--- a/engines/lastexpress/entities/servers1.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef LASTEXPRESS_SERVERS1_H
-#define LASTEXPRESS_SERVERS1_H
-
-#include "lastexpress/entities/entity.h"
-
-namespace LastExpress {
-
-class LastExpressEngine;
-
-class Servers1 : public Entity {
-public:
- Servers1(LastExpressEngine *engine);
- ~Servers1() {}
-
- /**
- * Updates parameter 2 using time value
- *
- * @param savepoint The savepoint
- * - Time to add
- */
- DECLARE_FUNCTION_NOSETUP(updateFromTime)
-
- /**
- * Draws the entity
- *
- * @param sequence The sequence to draw
- */
- DECLARE_FUNCTION_1(draw, const char *sequence)
-
- /**
- * Updates the position
- *
- * @param sequence1 The sequence to draw
- * @param car The car
- * @param position The position
- */
- DECLARE_FUNCTION_3(updatePosition, const char *sequence, CarIndex car, Position position)
-
- /**
- * Process callback action when the entity direction is not kDirectionRight
- */
- DECLARE_FUNCTION(callbackActionOnDirection)
-
- /**
- * Call a savepoint (or draw sequence in default case)
- *
- * @param sequence1 The sequence to draw in the default case
- * @param entity The entity
- * @param action The action
- * @param sequence2 The sequence name for the savepoint
- */
- DECLARE_FUNCTION_4(callSavepoint, const char *sequence1, EntityIndex entity, ActionIndex action, const char *sequence2)
-
- /**
- * Plays sound
- *
- * @param filename The sound filename
- */
- DECLARE_FUNCTION_1(playSound, const char *filename)
-
- DECLARE_FUNCTION(function7)
-
- /**
- * Setup Chapter 1
- */
- DECLARE_FUNCTION(chapter1)
-
- DECLARE_FUNCTION(function9)
- DECLARE_FUNCTION(function10)
- DECLARE_FUNCTION(function11)
- DECLARE_FUNCTION(function12)
- DECLARE_FUNCTION(function13)
-
- /**
- * Handle Chapter 1 events
- */
- DECLARE_FUNCTION(chapter1Handler)
-
- DECLARE_FUNCTION(function15)
- DECLARE_FUNCTION(function16)
-
- /**
- * Setup Chapter 2
- */
- DECLARE_FUNCTION(chapter2)
-
- /**
- * Handle Chapter 2 events
- */
- DECLARE_FUNCTION(chapter2Handler)
-
- DECLARE_FUNCTION(function19)
- DECLARE_FUNCTION(function20)
- DECLARE_FUNCTION(function21)
-
- /**
- * Setup Chapter 3
- */
- DECLARE_FUNCTION(chapter3)
-
- /**
- * Handle Chapter 3 events
- */
- DECLARE_FUNCTION(chapter3Handler)
-
- DECLARE_FUNCTION(function24)
-
- /**
- * Setup Chapter 4
- */
- DECLARE_FUNCTION(chapter4)
-
- /**
- * Handle Chapter 4 events
- */
- DECLARE_FUNCTION(chapter4Handler)
-
- DECLARE_FUNCTION(function27)
- DECLARE_FUNCTION(function28)
- DECLARE_FUNCTION(function29)
-
- /**
- * Setup Chapter 5
- */
- DECLARE_FUNCTION(chapter5)
-
- /**
- * Handle Chapter 5 events
- */
- DECLARE_FUNCTION(chapter5Handler)
-
- DECLARE_NULL_FUNCTION()
-
-private:
- void serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, Position position = 0, bool updatePosition = true, uint *parameter2 = NULL);
- void serveSalon(const SavePoint &savepoint, const char *seq1, const char *snd1, EntityIndex entity, const char *snd2, const char *seq2, ActionIndex action, const char *seq3, uint *parameter);
-};
-
-} // End of namespace LastExpress
-
-#endif // LASTEXPRESS_SERVERS1_H
diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp
index c6788fd..951e89d 100644
--- a/engines/lastexpress/entities/tatiana.cpp
+++ b/engines/lastexpress/entities/tatiana.cpp
@@ -507,7 +507,7 @@ IMPLEMENT_FUNCTION(20, Tatiana, function20)
case 2:
getEntities()->updatePositionExit(kEntityTatiana, kCarRestaurant, 67);
- getSavePoints()->push(kEntityTatiana, kEntityServers0, kAction188893625);
+ getSavePoints()->push(kEntityTatiana, kEntityWaiter1, kAction188893625);
setCallback(3);
setup_function18();
@@ -917,7 +917,7 @@ IMPLEMENT_FUNCTION(29, Tatiana, function29)
case 2:
getEntities()->updatePositionExit(kEntityTatiana, kCarRestaurant, 63);
- getSavePoints()->push(kEntityTatiana, kEntityServers1, kAction302203328);
+ getSavePoints()->push(kEntityTatiana, kEntityWaiter2, kAction302203328);
getEntities()->drawSequenceRight(kEntityTatiana, "805DS");
if (getEntities()->isInRestaurant(kEntityPlayer))
diff --git a/engines/lastexpress/entities/waiter1.cpp b/engines/lastexpress/entities/waiter1.cpp
new file mode 100644
index 0000000..21e40d3
--- /dev/null
+++ b/engines/lastexpress/entities/waiter1.cpp
@@ -0,0 +1,1034 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "lastexpress/entities/waiter1.h"
+
+#include "lastexpress/game/entities.h"
+#include "lastexpress/game/logic.h"
+#include "lastexpress/game/object.h"
+#include "lastexpress/game/savepoint.h"
+#include "lastexpress/game/state.h"
+
+#include "lastexpress/lastexpress.h"
+
+namespace LastExpress {
+
+#define HANDLE_TABLE(index, param, callback, function) \
+ if (ENTITY_PARAM(index, param)) { \
+ setCallback(callback); \
+ function(); \
+ break; \
+ }
+
+Waiter1::Waiter1(LastExpressEngine *engine) : Entity(engine, kEntityWaiter1) {
+ ADD_CALLBACK_FUNCTION(Waiter1, callSavepoint);
+ ADD_CALLBACK_FUNCTION(Waiter1, updateFromTime);
+ ADD_CALLBACK_FUNCTION(Waiter1, draw);
+ ADD_CALLBACK_FUNCTION(Waiter1, updatePosition);
+ ADD_CALLBACK_FUNCTION(Waiter1, callbackActionOnDirection);
+ ADD_CALLBACK_FUNCTION(Waiter1, playSound);
+ ADD_CALLBACK_FUNCTION(Waiter1, function7);
+ ADD_CALLBACK_FUNCTION(Waiter1, function8);
+ ADD_CALLBACK_FUNCTION(Waiter1, function9);
+ ADD_CALLBACK_FUNCTION(Waiter1, function10);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter1);
+ ADD_CALLBACK_FUNCTION(Waiter1, function12);
+ ADD_CALLBACK_FUNCTION(Waiter1, function13);
+ ADD_CALLBACK_FUNCTION(Waiter1, function14);
+ ADD_CALLBACK_FUNCTION(Waiter1, function15);
+ ADD_CALLBACK_FUNCTION(Waiter1, function16);
+ ADD_CALLBACK_FUNCTION(Waiter1, function17);
+ ADD_CALLBACK_FUNCTION(Waiter1, function18);
+ ADD_CALLBACK_FUNCTION(Waiter1, function19);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter1Handler);
+ ADD_CALLBACK_FUNCTION(Waiter1, function21);
+ ADD_CALLBACK_FUNCTION(Waiter1, function22);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter2);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter2Handler);
+ ADD_CALLBACK_FUNCTION(Waiter1, function25);
+ ADD_CALLBACK_FUNCTION(Waiter1, function26);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter3);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter3Handler);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustAnnaDateOrder);
+ ADD_CALLBACK_FUNCTION(Waiter1, function30);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter4);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter4Handler);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustOrderSteak);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustServeDuck);
+ ADD_CALLBACK_FUNCTION(Waiter1, function35);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter5);
+ ADD_CALLBACK_FUNCTION(Waiter1, chapter5Handler);
+ ADD_NULL_FUNCTION();
+}
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_SIIS(1, Waiter1, callSavepoint, EntityIndex, ActionIndex)
+ Entity::callSavepoint(savepoint, true);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_NOSETUP(2, Waiter1, updateFromTime)
+ Entity::updateFromTime(savepoint);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_S(3, Waiter1, draw)
+ Entity::draw(savepoint, true);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_NOSETUP(4, Waiter1, updatePosition)
+ Entity::updatePosition(savepoint, true);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_NOSETUP(5, Waiter1, callbackActionOnDirection)
+ EXPOSE_PARAMS(EntityData::EntityParametersIIII);
+
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ if (getData()->direction != kDirectionRight)
+ callbackAction();
+ break;
+
+ case kActionExitCompartment:
+ callbackAction();
+ break;
+
+ case kActionExcuseMeCath:
+ if (!params->param1) {
+ getSound()->excuseMe(kEntityWaiter1);
+ params->param1 = 1;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_S(6, Waiter1, playSound)
+ Entity::playSound(savepoint);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(7, Waiter1, function7)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ ENTITY_PARAM(0, 3) = 0;
+
+ setCallback(1);
+ setup_draw("911");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getEntities()->clearSequences(kEntityWaiter1);
+ getSavePoints()->push(kEntityWaiter1, kEntityRebecca, kAction123712592);
+ break;
+
+ case 2:
+ getEntities()->clearSequences(kEntityWaiter1);
+ getData()->entityPosition = kPosition_5900;
+ callbackAction();
+ break;
+ }
+ break;
+
+ case kAction136702400:
+ setCallback(2);
+ setup_draw("913");
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(8, Waiter1, function8)
+ serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "913", &ENTITY_PARAM(1, 2));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(9, Waiter1, function9)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw("915");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getSavePoints()->push(kEntityWaiter1, kEntityAbbot, kAction122358304);
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "029D");
+
+ setCallback(2);
+ setup_playSound(getProgress().chapter == kChapter3 ? "Abb3016" : "Abb4001");
+ break;
+
+ case 2:
+ getSavePoints()->push(kEntityWaiter1, kEntityAbbot, kAction122288808);
+
+ setCallback(3);
+ setup_draw("917");
+ break;
+
+ case 3:
+ getData()->entityPosition = kPosition_5900;
+ getEntities()->clearSequences(kEntityWaiter1);
+ ENTITY_PARAM(2, 2) = 0;
+ ENTITY_PARAM(1, 6) = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(10, Waiter1, function10)
+ serveTable(savepoint, "916", kEntityTables4, "014E", "014F", "918", &ENTITY_PARAM(2, 3), false);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(11, Waiter1, chapter1)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter1Handler();
+ break;
+
+ case kActionDefault:
+ getSavePoints()->addData(kEntityWaiter1, kAction270410280, 0);
+ getSavePoints()->addData(kEntityWaiter1, kAction304061224, 1);
+ getSavePoints()->addData(kEntityWaiter1, kAction252568704, 10);
+ getSavePoints()->addData(kEntityWaiter1, kAction286534136, 11);
+ getSavePoints()->addData(kEntityWaiter1, kAction218983616, 12);
+ getSavePoints()->addData(kEntityWaiter1, kAction218586752, 13);
+ getSavePoints()->addData(kEntityWaiter1, kAction207330561, 14);
+ getSavePoints()->addData(kEntityWaiter1, kAction286403504, 16);
+ getSavePoints()->addData(kEntityWaiter1, kAction218128129, 17);
+ getSavePoints()->addData(kEntityWaiter1, kAction270068760, 18);
+ getSavePoints()->addData(kEntityWaiter1, kAction223712416, 2);
+ getSavePoints()->addData(kEntityWaiter1, kAction237485916, 5);
+ getSavePoints()->addData(kEntityWaiter1, kAction188893625, 8);
+ getSavePoints()->addData(kEntityWaiter1, kAction204704037, 6);
+ getSavePoints()->addData(kEntityWaiter1, kAction292758554, 7);
+ getSavePoints()->addData(kEntityWaiter1, kAction337548856, 9);
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(12, Waiter1, function12)
+ handleServer(savepoint, "907", kEntityAnna, kAction268773672, &ENTITY_PARAM(0, 1));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(13, Waiter1, function13)
+ handleServer(savepoint, "911", kEntityAugust, kAction268773672, &ENTITY_PARAM(0, 2), "010F");
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(14, Waiter1, function14)
+ handleServer(savepoint, "908", kEntityAnna, kAction170016384, &ENTITY_PARAM(0, 4));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(15, Waiter1, function15)
+ handleServer(savepoint, "912", kEntityAugust, kAction170016384, &ENTITY_PARAM(0, 5));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(16, Waiter1, function16)
+ serveTable(savepoint, "907", kEntityTables0, "001N", "001P", "909", &ENTITY_PARAM(0, 6));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(17, Waiter1, function17)
+ serveTable(savepoint, "915", kEntityTables4, "014E", "014F", "917", &ENTITY_PARAM(1, 1), true, false, 67);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(18, Waiter1, function18)
+ serveTable(savepoint, "911", kEntityTables3, "010L", "010H", "913", &ENTITY_PARAM(0, 7));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(19, Waiter1, function19)
+ serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "913", &ENTITY_PARAM(0, 8), true, true);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(20, Waiter1, chapter1Handler)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ if (params->param2) {
+ if (Entity::updateParameter(params->param3, getState()->time, 2700)) {
+ ENTITY_PARAM(0, 4) = 1;
+ params->param2 = 0;
+ }
+ }
+
+ if (params->param1) {
+ if (Entity::updateParameter(params->param4, getState()->time, 4500)) {
+ ENTITY_PARAM(0, 5) = 1;
+ params->param1 = 0;
+ }
+ }
+
+ if (!getEntities()->isInKitchen(kEntityWaiter1) && !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ break;
+
+ HANDLE_TABLE(0, 1, 1, setup_function12);
+ HANDLE_TABLE(0, 2, 2, setup_function13);
+ HANDLE_TABLE(0, 3, 3, setup_function7);
+ HANDLE_TABLE(0, 4, 4, setup_function14);
+ HANDLE_TABLE(0, 5, 5, setup_function15);
+ HANDLE_TABLE(0, 6, 6, setup_function16);
+ HANDLE_TABLE(1, 1, 7, setup_function17);
+ HANDLE_TABLE(0, 7, 8, setup_function18);
+ HANDLE_TABLE(0, 8, 9, setup_function19);
+ HANDLE_TABLE(1, 2, 10, setup_function8);
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 10:
+ getSavePoints()->push(kEntityWaiter1, kEntityPascale, kAction352703104);
+ setup_function21();
+ break;
+
+ case 11:
+ case 12:
+ getEntities()->clearSequences(kEntityWaiter1);
+ getData()->entityPosition = kPosition_5900;
+
+ if (getCallback() == 11)
+ params->param2 = 1;
+ else
+ params->param1 = 1;
+ break;
+
+ case 13:
+ case 14:
+ getEntities()->clearSequences(kEntityWaiter1);
+ getData()->entityPosition = kPosition_5900;
+ break;
+ }
+ break;
+
+ case kAction136702400:
+ setCallback(savepoint.entity2 == kEntityAnna ? 13 : 14);
+ setup_draw(savepoint.entity2 == kEntityAnna ? "909" : "913");
+ break;
+
+ case kAction203859488:
+ setCallback(savepoint.entity2 == kEntityAnna ? 11 : 12);
+ setup_draw(savepoint.entity2 == kEntityAnna ? "910" : "913");
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(21, Waiter1, function21)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5900;
+ break;
+
+ case kAction101632192:
+ setup_function22();
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(22, Waiter1, function22)
+ if (savepoint.action == kActionDefault) {
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+
+ getEntities()->clearSequences(kEntityWaiter1);
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(23, Waiter1, chapter2)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter2Handler();
+ break;
+
+ case kActionDefault:
+ getEntities()->clearSequences(kEntityWaiter1);
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+ getData()->clothes = kClothes1;
+ getData()->inventoryItem = kItemNone;
+
+ ENTITY_PARAM(1, 3) = 0;
+ ENTITY_PARAM(1, 4) = 0;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(24, Waiter1, chapter2Handler)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ if (!getEntities()->isInKitchen(kEntityWaiter1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ break;
+
+ HANDLE_TABLE(1, 3, 1, setup_function25);
+ HANDLE_TABLE(1, 4, 2, setup_function26);
+ break;
+
+ case kActionCallback:
+ if (getCallback() == 1)
+ HANDLE_TABLE(1, 4, 2, setup_function26);
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(25, Waiter1, function25)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw("957");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getSavePoints()->push(kEntityWaiter1, kEntityAugust, kAction123712592);
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "BLANK");
+ break;
+
+ case 2:
+ getData()->entityPosition = kPosition_5900;
+ getEntities()->clearSequences(kEntityWaiter1);
+ ENTITY_PARAM(1, 3) = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+
+ case kAction219522616:
+ setCallback(2);
+ setup_draw("959");
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(26, Waiter1, function26)
+ serveTable(savepoint, "957", kEntityTables0, "016E", "016D", "959", &ENTITY_PARAM(1, 4));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(27, Waiter1, chapter3)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter3Handler();
+ break;
+
+ case kActionDefault:
+ getEntities()->clearSequences(kEntityWaiter1);
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+ getData()->clothes = kClothes1;
+ getData()->inventoryItem = kItemNone;
+
+ ENTITY_PARAM(0, 3) = 0;
+ ENTITY_PARAM(1, 2) = 0;
+ ENTITY_PARAM(1, 5) = 0;
+ ENTITY_PARAM(1, 6) = 0;
+ ENTITY_PARAM(2, 3) = 0;
+ ENTITY_PARAM(2, 4) = 0;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(28, Waiter1, chapter3Handler)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ break;
+
+ if (ENTITY_PARAM(1, 5)) {
+ setCallback(1);
+ setup_augustAnnaDateOrder();
+ break;
+ }
+
+label_callback_1:
+ if (ENTITY_PARAM(1, 6)) {
+ setCallback(2);
+ setup_function9();
+ break;
+ }
+
+label_callback_2:
+ if (ENTITY_PARAM(2, 4)) {
+ setCallback(3);
+ setup_function30();
+ break;
+ }
+
+label_callback_3:
+ if (ENTITY_PARAM(2, 3)) {
+ setCallback(4);
+ setup_function10();
+ break;
+ }
+
+label_callback_4:
+ if (ENTITY_PARAM(0, 3)) {
+ setCallback(5);
+ setup_function7();
+ break;
+ }
+
+label_callback_5:
+ if (ENTITY_PARAM(1, 2)) {
+ setCallback(6);
+ setup_function8();
+ break;
+ }
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ goto label_callback_1;
+
+ case 2:
+ goto label_callback_2;
+
+ case 3:
+ goto label_callback_3;
+
+ case 4:
+ goto label_callback_4;
+
+ case 5:
+ goto label_callback_5;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(29, Waiter1, augustAnnaDateOrder)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw("911");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getSavePoints()->push(kEntityWaiter1, kEntityAnna, kAction122358304);
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "026D");
+
+ setCallback(2);
+ setup_playSound("Ann3138");
+ break;
+
+ case 2:
+ getSavePoints()->push(kEntityWaiter1, kEntityAnna, kAction122288808);
+
+ setCallback(3);
+ setup_draw("913");
+ break;
+
+ case 3:
+ getData()->entityPosition = kPosition_5900;
+ getEntities()->clearSequences(kEntityWaiter1);
+ ENTITY_PARAM(1, 5) = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(30, Waiter1, function30)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw("916");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getSavePoints()->push(kEntityWaiter1, kEntityAbbot, kAction122358304);
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "029D");
+
+ setCallback(2);
+ setup_playSound("Abb3016a");
+ break;
+
+ case 2:
+ getSavePoints()->push(kEntityWaiter1, kEntityAbbot, kAction122288808);
+
+ setCallback(3);
+ setup_draw("918");
+ break;
+
+ case 3:
+ getData()->entityPosition = kPosition_5900;
+ getEntities()->clearSequences(kEntityWaiter1);
+ ENTITY_PARAM(2, 4) = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(31, Waiter1, chapter4)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter4Handler();
+ break;
+
+ case kActionDefault:
+ getEntities()->clearSequences(kEntityWaiter1);
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+ getData()->clothes = kClothesDefault;
+ getData()->inventoryItem = kItemNone;
+
+ ENTITY_PARAM(0, 3) = 0;
+ ENTITY_PARAM(1, 7) = 0;
+ ENTITY_PARAM(1, 8) = 0;
+ ENTITY_PARAM(2, 1) = 0;
+ ENTITY_PARAM(2, 2) = 0;
+ ENTITY_PARAM(2, 3) = 0;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(32, Waiter1, chapter4Handler)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ if (Entity::updateParameter(params->param2, getState()->time, 3600)) {
+ ENTITY_PARAM(1, 8) = 1;
+ params->param1 = 0;
+ }
+
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ break;
+
+ if (ENTITY_PARAM(1, 7)) {
+ setCallback(1);
+ setup_augustOrderSteak();
+ break;
+ }
+
+label_callback_1:
+ if (ENTITY_PARAM(1, 8)) {
+ setCallback(2);
+ setup_augustServeDuck();
+ break;
+ }
+
+label_callback_2:
+ if (ENTITY_PARAM(2, 1)) {
+ setCallback(3);
+ setup_function35();
+ break;
+ }
+
+label_callback_3:
+ if (ENTITY_PARAM(2, 2)) {
+ setCallback(4);
+ setup_function9();
+ break;
+ }
+
+label_callback_4:
+ if (ENTITY_PARAM(2, 3)) {
+ setCallback(5);
+ setup_function10();
+ break;
+ }
+
+label_callback_5:
+ if (ENTITY_PARAM(0, 3)) {
+ setCallback(6);
+ setup_function7();
+ break;
+ }
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ params->param1 = 1;
+ goto label_callback_1;
+
+ case 2:
+ goto label_callback_2;
+
+ case 3:
+ goto label_callback_3;
+
+ case 4:
+ goto label_callback_4;
+
+ case 5:
+ goto label_callback_5;
+ }
+ break;
+
+ case kAction201431954:
+ ENTITY_PARAM(0, 3) = 0;
+ ENTITY_PARAM(1, 7) = 0;
+ ENTITY_PARAM(1, 8) = 0;
+ ENTITY_PARAM(2, 1) = 0;
+ ENTITY_PARAM(2, 3) = 0;
+ params->param1 = 0;
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(33, Waiter1, augustOrderSteak)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ setCallback(1);
+ setup_draw("911");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getEntities()->drawSequenceLeft(kEntityWaiter1, "010F3");
+ getEntities()->drawSequenceLeft(kEntityAugust, "010D3");
+
+ setCallback(2);
+ setup_playSound("AUG4002");
+ break;
+
+ case 2:
+ getSavePoints()->push(kEntityWaiter1, kEntityAugust, kAction122288808);
+
+ setCallback(3);
+ setup_draw("913");
+ break;
+
+ case 3:
+ getData()->entityPosition = kPosition_5900;
+ getEntities()->clearSequences(kEntityWaiter1);
+ ENTITY_PARAM(1, 7) = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(34, Waiter1, augustServeDuck)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ setCallback(1);
+ setup_draw("912");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getSavePoints()->push(kEntityWaiter1, kEntityAugust, kAction122358304);
+ getSound()->playSound(kEntityWaiter1, "AUG1053");
+
+ setCallback(2);
+ setup_draw("010G3");
+ break;
+
+ case 2:
+ getSavePoints()->push(kEntityWaiter1, kEntityAugust, kAction201964801);
+
+ setCallback(3);
+ setup_draw("914");
+ break;
+
+ case 3:
+ getData()->entityPosition = kPosition_5900;
+ getEntities()->clearSequences(kEntityWaiter1);
+ ENTITY_PARAM(1, 8) = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(35, Waiter1, function35)
+ serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "914", &ENTITY_PARAM(2, 1), false, true);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(36, Waiter1, chapter5)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter5Handler();
+ break;
+
+ case kActionDefault:
+ getEntities()->clearSequences(kEntityWaiter1);
+
+ getData()->entityPosition = kPosition_3969;
+ getData()->location = kLocationInsideCompartment;
+ getData()->car = kCarRestaurant;
+ getData()->inventoryItem = kItemNone;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(37, Waiter1, chapter5Handler)
+ if (savepoint.action == kActionProceedChapter5)
+ setup_nullfunction();
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_NULL_FUNCTION(38, Waiter1)
+
+
+//////////////////////////////////////////////////////////////////////////
+// Private functions
+//////////////////////////////////////////////////////////////////////////
+void Waiter1::handleServer(const SavePoint &savepoint, const char *name, EntityIndex entity, ActionIndex action, uint *parameter, const char *name2) {
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw(name);
+ break;
+
+ case kActionCallback:
+ if (getCallback() == 1) {
+ // Prepare or draw sequences depending of value of string
+ if (strcmp(name2, ""))
+ getEntities()->clearSequences(kEntityWaiter1);
+ else
+ getEntities()->drawSequenceLeft(kEntityWaiter1, name2);
+
+ getSavePoints()->push(kEntityWaiter1, entity, action);
+ *parameter = 0;
+
+ callbackAction();
+ }
+ break;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+void Waiter1::serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, bool shouldUpdatePosition, bool pushSavepoint, Position position) {
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ if (shouldUpdatePosition) {
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+ }
+
+ setCallback(1);
+ setup_draw(seq1);
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ if (position)
+ getEntities()->updatePositionEnter(kEntityWaiter1, kCarRestaurant, position);
+
+ getSavePoints()->push(kEntityWaiter1, entity, kAction136455232);
+
+ setCallback(2);
+ setup_callSavepoint(seq2, entity, kActionDrawTablesWithChairs, seq3);
+ break;
+
+ case 2:
+ if (position)
+ getEntities()->updatePositionExit(kEntityWaiter1, kCarRestaurant, position);
+
+ setCallback(3);
+ setup_draw(seq4);
+ break;
+
+ case 3:
+ getData()->entityPosition = kPosition_5900;
+
+ // Special case for functions 19 & 35
+ if (pushSavepoint)
+ getSavePoints()->push(kEntityWaiter1, kEntityRebecca, kAction224253538);
+
+ getEntities()->clearSequences(kEntityWaiter1);
+ *parameter = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/entities/waiter1.h b/engines/lastexpress/entities/waiter1.h
new file mode 100644
index 0000000..2a0c56e
--- /dev/null
+++ b/engines/lastexpress/entities/waiter1.h
@@ -0,0 +1,168 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef LASTEXPRESS_WAITER1_H
+#define LASTEXPRESS_WAITER1_H
+
+#include "lastexpress/entities/entity.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+
+class Waiter1 : public Entity {
+public:
+ Waiter1(LastExpressEngine *engine);
+ ~Waiter1() {}
+
+ /**
+ * Call a savepoint (or draw sequence in default case)
+ *
+ * @param sequence1 The sequence to draw in the default case
+ * @param entity The entity
+ * @param action The action
+ * @param sequence2 The sequence name for the savepoint
+ */
+ DECLARE_FUNCTION_4(callSavepoint, const char *sequence1, EntityIndex entity, ActionIndex action, const char *sequence2)
+
+ /**
+ * Updates parameter 2 using time value
+ *
+ * @param savepoint The savepoint
+ * - Time to add
+ */
+ DECLARE_FUNCTION_NOSETUP(updateFromTime)
+
+ /**
+ * Draws the entity
+ *
+ * @param sequence The sequence to draw
+ */
+ DECLARE_FUNCTION_1(draw, const char *sequence)
+
+ /**
+ * Updates the position
+ *
+ * @param sequence1 The sequence to draw
+ * @param car The car
+ * @param position The position
+ */
+ DECLARE_FUNCTION_3(updatePosition, const char *sequence1, CarIndex car, Position position)
+
+ /**
+ * Process callback action when the entity direction is not kDirectionRight
+ */
+ DECLARE_FUNCTION_NOSETUP(callbackActionOnDirection)
+
+ /**
+ * Plays sound
+ *
+ * @param filename The sound filename
+ */
+ DECLARE_FUNCTION_1(playSound, const char *filename)
+
+ DECLARE_FUNCTION(function7)
+ DECLARE_FUNCTION(function8)
+ DECLARE_FUNCTION(function9)
+ DECLARE_FUNCTION(function10)
+
+ /**
+ * Setup Chapter 1
+ */
+ DECLARE_FUNCTION(chapter1)
+ DECLARE_FUNCTION(function12)
+ DECLARE_FUNCTION(function13)
+ DECLARE_FUNCTION(function14)
+ DECLARE_FUNCTION(function15)
+ DECLARE_FUNCTION(function16)
+ DECLARE_FUNCTION(function17)
+ DECLARE_FUNCTION(function18)
+ DECLARE_FUNCTION(function19)
+
+ /**
+ * Handle Chapter 1 events
+ */
+ DECLARE_FUNCTION(chapter1Handler)
+
+ DECLARE_FUNCTION(function21)
+ DECLARE_FUNCTION(function22)
+
+ /**
+ * Setup Chapter 2
+ */
+ DECLARE_FUNCTION(chapter2)
+
+ /**
+ * Handle Chapter 2 events
+ */
+ DECLARE_FUNCTION(chapter2Handler)
+
+ DECLARE_FUNCTION(function25)
+ DECLARE_FUNCTION(function26)
+
+ /**
+ * Setup Chapter 3
+ */
+ DECLARE_FUNCTION(chapter3)
+
+ /**
+ * Handle Chapter 3 events
+ */
+ DECLARE_FUNCTION(chapter3Handler)
+
+ DECLARE_FUNCTION(augustAnnaDateOrder)
+ DECLARE_FUNCTION(function30)
+
+ /**
+ * Setup Chapter 4
+ */
+ DECLARE_FUNCTION(chapter4)
+
+ /**
+ * Handle Chapter 4 events
+ */
+ DECLARE_FUNCTION(chapter4Handler)
+
+ DECLARE_FUNCTION(augustOrderSteak)
+ DECLARE_FUNCTION(augustServeDuck)
+ DECLARE_FUNCTION(function35)
+
+ /**
+ * Setup Chapter 5
+ */
+ DECLARE_FUNCTION(chapter5)
+
+ /**
+ * Handle Chapter 5 events
+ */
+ DECLARE_FUNCTION(chapter5Handler)
+
+ DECLARE_NULL_FUNCTION()
+
+private:
+ void handleServer(const SavePoint &savepoint, const char *name, EntityIndex entity, ActionIndex action, uint *parameter, const char *name2 = "");
+ void serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, bool shouldUpdatePosition = true, bool pushSavepoint = false, Position position = 0);
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_WAITER1_H
diff --git a/engines/lastexpress/entities/waiter2.cpp b/engines/lastexpress/entities/waiter2.cpp
new file mode 100644
index 0000000..8641818
--- /dev/null
+++ b/engines/lastexpress/entities/waiter2.cpp
@@ -0,0 +1,782 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "lastexpress/entities/waiter2.h"
+
+#include "lastexpress/game/entities.h"
+#include "lastexpress/game/logic.h"
+#include "lastexpress/game/object.h"
+#include "lastexpress/game/savepoint.h"
+#include "lastexpress/game/state.h"
+
+#include "lastexpress/lastexpress.h"
+
+namespace LastExpress {
+
+Waiter2::Waiter2(LastExpressEngine *engine) : Entity(engine, kEntityWaiter2) {
+ ADD_CALLBACK_FUNCTION(Waiter2, updateFromTime);
+ ADD_CALLBACK_FUNCTION(Waiter2, draw);
+ ADD_CALLBACK_FUNCTION(Waiter2, updatePosition);
+ ADD_CALLBACK_FUNCTION(Waiter2, callbackActionOnDirection);
+ ADD_CALLBACK_FUNCTION(Waiter2, callSavepoint);
+ ADD_CALLBACK_FUNCTION(Waiter2, playSound);
+ ADD_CALLBACK_FUNCTION(Waiter2, function7);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter1);
+ ADD_CALLBACK_FUNCTION(Waiter2, function9);
+ ADD_CALLBACK_FUNCTION(Waiter2, function10);
+ ADD_CALLBACK_FUNCTION(Waiter2, function11);
+ ADD_CALLBACK_FUNCTION(Waiter2, function12);
+ ADD_CALLBACK_FUNCTION(Waiter2, function13);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter1Handler);
+ ADD_CALLBACK_FUNCTION(Waiter2, function15);
+ ADD_CALLBACK_FUNCTION(Waiter2, function16);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter2);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter2Handler);
+ ADD_CALLBACK_FUNCTION(Waiter2, function19);
+ ADD_CALLBACK_FUNCTION(Waiter2, function20);
+ ADD_CALLBACK_FUNCTION(Waiter2, function21);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter3);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter3Handler);
+ ADD_CALLBACK_FUNCTION(Waiter2, function24);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter4);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter4Handler);
+ ADD_CALLBACK_FUNCTION(Waiter2, function27);
+ ADD_CALLBACK_FUNCTION(Waiter2, function28);
+ ADD_CALLBACK_FUNCTION(Waiter2, function29);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter5);
+ ADD_CALLBACK_FUNCTION(Waiter2, chapter5Handler);
+ ADD_NULL_FUNCTION()
+}
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_NOSETUP(1, Waiter2, updateFromTime)
+ Entity::updateFromTime(savepoint);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_S(2, Waiter2, draw)
+ Entity::draw(savepoint, true);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_SII(3, Waiter2, updatePosition, CarIndex, Position)
+ Entity::updatePosition(savepoint, true);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(4, Waiter2, callbackActionOnDirection)
+ if (savepoint.action == kActionExcuseMeCath) {
+ if (!params->param1) {
+ getSound()->excuseMe(kEntityWaiter2);
+ params->param1 = 1;
+ }
+ }
+
+ Entity::callbackActionOnDirection(savepoint);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_SIIS(5, Waiter2, callSavepoint, EntityIndex, ActionIndex)
+ Entity::callSavepoint(savepoint, true);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION_S(6, Waiter2, playSound)
+ Entity::playSound(savepoint);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(7, Waiter2, function7)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw("924");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getSavePoints()->push(kEntityWaiter2, kEntityBoutarel, kAction122358304);
+ setCallback(2);
+ setup_draw("008C");
+ break;
+
+ case 2:
+ getSavePoints()->push(kEntityWaiter2, kEntityBoutarel, kAction122288808);
+ setCallback(2);
+ setup_draw("926");
+ break;
+
+ case 3:
+ getEntities()->clearSequences(kEntityWaiter2);
+ getData()->entityPosition = kPosition_5900;
+ ENTITY_PARAM(1, 2) = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(8, Waiter2, chapter1)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter1Handler();
+ break;
+
+ case kActionDefault:
+ getSavePoints()->addData(kEntityWaiter2, kAction223002560, 0);
+ getSavePoints()->addData(kEntityWaiter2, kAction302996448, 2);
+ getSavePoints()->addData(kEntityWaiter2, kAction269485588, 3);
+ getSavePoints()->addData(kEntityWaiter2, kAction326144276, 4);
+ getSavePoints()->addData(kEntityWaiter2, kAction302203328, 5);
+ getSavePoints()->addData(kEntityWaiter2, kAction189688608, 6);
+ getSavePoints()->addData(kEntityWaiter2, kAction236237423, 7);
+ getSavePoints()->addData(kEntityWaiter2, kAction219377792, 8);
+ getSavePoints()->addData(kEntityWaiter2, kAction256200848, 9);
+ getSavePoints()->addData(kEntityWaiter2, kAction291721418, 10);
+ getSavePoints()->addData(kEntityWaiter2, kAction258136010, 11);
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(9, Waiter2, function9)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw("924");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getEntities()->drawSequenceLeft(kEntityMilos, "BLANK");
+ getEntities()->drawSequenceLeft(kEntityWaiter2, "009B");
+
+ setCallback(2);
+ setup_playSound("WAT1001");
+ break;
+
+ case 2:
+ getEntities()->drawSequenceLeft(kEntityMilos, "009A");
+
+ setCallback(3);
+ setup_draw("926");
+ break;
+
+ case 3:
+ getEntities()->clearSequences(kEntityWaiter2);
+ getData()->entityPosition = kPosition_5900;
+ ENTITY_PARAM(0, 1) = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(10, Waiter2, function10)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw("924");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getEntities()->drawSequenceLeft(kEntityBoutarel, "BLANK");
+ getEntities()->drawSequenceLeft(kEntityWaiter2, "008C");
+
+ setCallback(2);
+ setup_playSound("MRB1077");
+ break;
+
+ case 2:
+ getSavePoints()->push(kEntityWaiter2, kEntityBoutarel, kAction168717392);
+
+ setCallback(3);
+ setup_draw("926");
+ break;
+
+ case 3:
+ getEntities()->clearSequences(kEntityWaiter2);
+ getData()->entityPosition = kPosition_5900;
+ ENTITY_PARAM(0, 2) = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(11, Waiter2, function11)
+ serveTable(savepoint, "919", kEntityTables1, "005H", "005J", "921", &ENTITY_PARAM(0, 3), 63);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(12, Waiter2, function12)
+ serveTable(savepoint, "923", kEntityTables2, "009F", "009G", "926", &ENTITY_PARAM(0, 4));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(13, Waiter2, function13)
+ serveTable(savepoint, "923", kEntityTables2, "009F", "009G", "926", &ENTITY_PARAM(0, 5));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(14, Waiter2, chapter1Handler)
+switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ break;
+
+ if (ENTITY_PARAM(0, 1)) {
+ setCallback(1);
+ setup_function9();
+ break;
+ }
+
+ if (ENTITY_PARAM(1, 2)) {
+ setCallback(2);
+ setup_function10();
+ break;
+ }
+
+ if (ENTITY_PARAM(0, 3)) {
+ setCallback(3);
+ setup_function11();
+ break;
+ }
+
+ if (ENTITY_PARAM(0, 4)) {
+ setCallback(4);
+ setup_function12();
+ break;
+ }
+
+ if (ENTITY_PARAM(0, 5)) {
+ setCallback(5);
+ setup_function13();
+ }
+ break;
+
+ case kActionCallback:
+ if (getCallback() == 5) {
+ getSavePoints()->push(kEntityWaiter2, kEntityPascale, kAction352768896);
+ setup_function15();
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(15, Waiter2, function15)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5900;
+ break;
+
+ case kAction101632192:
+ setup_function16();
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(16, Waiter2, function16)
+ if (savepoint.action == kActionDefault) {
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+
+ getEntities()->clearSequences(kEntityWaiter2);
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(17, Waiter2, chapter2)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter2Handler();
+ break;
+
+ case kActionDefault:
+ getEntities()->clearSequences(kEntityWaiter2);
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+ getData()->clothes = kClothes1;
+ getData()->inventoryItem = kItemNone;
+
+ ENTITY_PARAM(0, 6) = 0;
+ ENTITY_PARAM(0, 7) = 0;
+ ENTITY_PARAM(0, 8) = 0;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(18, Waiter2, chapter2Handler)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ break;
+
+ if (ENTITY_PARAM(0, 6)) {
+ setCallback(1);
+ setup_function19();
+ break;
+ }
+
+label_callback_1:
+ if (ENTITY_PARAM(0, 7)) {
+ setCallback(2);
+ setup_function20();
+ break;
+ }
+
+label_callback_2:
+ if (ENTITY_PARAM(0, 8) || ENTITY_PARAM(0, 5)) {
+ setCallback(3);
+ setup_function21();
+ }
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ goto label_callback_1;
+
+ case 2:
+ goto label_callback_2;
+
+ case 4:
+ getEntities()->clearSequences(kEntityWaiter2);
+ getData()->entityPosition = kPosition_5900;
+ break;
+ }
+ break;
+
+ case kAction101106391:
+ setCallback(4);
+ setup_draw("975");
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(19, Waiter2, function19)
+ serveTable(savepoint, "969", kEntityTables1, "005H2", "018A", "971", &ENTITY_PARAM(0, 6), 63);
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(20, Waiter2, function20)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw("973");
+ break;
+
+ case kActionCallback:
+ if (getCallback() == 1) {
+ getSavePoints()->push(kEntityWaiter2, kEntityIvo, kAction123712592);
+ getEntities()->drawSequenceLeft(kEntityWaiter2, "BLANK");
+ ENTITY_PARAM(0, 7) = 0;
+
+ callbackAction();
+ }
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(21, Waiter2, function21)
+ serveTable(savepoint, "974", kEntityTables2, "009F2", "009G", "976", &ENTITY_PARAM(0, 8), 0, true, &ENTITY_PARAM(0, 5));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(22, Waiter2, chapter3)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter3Handler();
+ break;
+
+ case kActionDefault:
+ getEntities()->clearSequences(kEntityWaiter2);
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+ getData()->clothes = kClothes1;
+ getData()->inventoryItem = kItemNone;
+
+ ENTITY_PARAM(1, 1) = 0;
+ ENTITY_PARAM(1, 2) = 0;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(23, Waiter2, chapter3Handler)
+ if (savepoint.action != kActionNone)
+ return;
+
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ return;
+
+ if (ENTITY_PARAM(1, 1)) {
+ setCallback(1);
+ setup_function24();
+ return;
+ }
+
+ if (ENTITY_PARAM(1, 2)) {
+ setCallback(2);
+ setup_function7();
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(24, Waiter2, function24)
+ serveSalon(savepoint, "927", "Ann3143A", kEntityAnna, "Ann31444", "112C", kAction122288808, "928", &ENTITY_PARAM(1, 1));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(25, Waiter2, chapter4)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter4Handler();
+ break;
+
+ case kActionDefault:
+ getEntities()->clearSequences(kEntityWaiter2);
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ getData()->car = kCarRestaurant;
+ getData()->inventoryItem = kItemNone;
+
+ getEntities()->clearSequences(kEntityWaiter2);
+
+ ENTITY_PARAM(1, 2) = 0;
+ ENTITY_PARAM(1, 3) = 0;
+ ENTITY_PARAM(1, 4) = 0;
+ ENTITY_PARAM(1, 5) = 0;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(26, Waiter2, chapter4Handler)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ if (params->param2) {
+ if (Entity::updateParameter(params->param2, getState()->time, 900)) {
+ ENTITY_PARAM(1, 5) = 1;
+ params->param1 = 0;
+ }
+ }
+
+ if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
+ break;
+
+ if (ENTITY_PARAM(1, 5)) {
+ setCallback(2);
+ setup_function28();
+ break;
+ }
+
+ if (ENTITY_PARAM(1, 4)) {
+ setCallback(3);
+ setup_function29();
+ break;
+ }
+
+ if (ENTITY_PARAM(1, 2)) {
+ setCallback(4);
+ setup_function7();
+ }
+ break;
+
+ case kActionCallback:
+ if (getCallback() == 1)
+ params->param1 = 1;
+ break;
+
+ case kAction201431954:
+ ENTITY_PARAM(1, 2) = 0;
+ ENTITY_PARAM(1, 3) = 0;
+ ENTITY_PARAM(1, 4) = 0;
+ ENTITY_PARAM(1, 5) = 0;
+
+ getData()->entityPosition = kPosition_5900;
+ getData()->location = kLocationOutsideCompartment;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(27, Waiter2, function27)
+ serveSalon(savepoint, "929", "", kEntityAugust, "Aug4003", "122D", kAction134486752, "930", &ENTITY_PARAM(1, 3));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(28, Waiter2, function28)
+ serveSalon(savepoint, "931", "", kEntityAugust, "Aug4004", "122E", kAction125826561, "930", &ENTITY_PARAM(1, 5));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(29, Waiter2, function29)
+ serveSalon(savepoint, "932", "", kEntityAnna, "Ann4151", "127D", kAction122288808, "930", &ENTITY_PARAM(1, 4));
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(30, Waiter2, chapter5)
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionNone:
+ setup_chapter5Handler();
+ break;
+
+ case kActionDefault:
+ getEntities()->clearSequences(kEntityWaiter2);
+
+ getData()->entityPosition = kPosition_3969;
+ getData()->location = kLocationInsideCompartment;
+ getData()->car = kCarRestaurant;
+ getData()->inventoryItem = kItemNone;
+ break;
+ }
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_FUNCTION(31, Waiter2, chapter5Handler)
+ if (savepoint.action == kActionProceedChapter5)
+ setup_nullfunction();
+IMPLEMENT_FUNCTION_END
+
+//////////////////////////////////////////////////////////////////////////
+IMPLEMENT_NULL_FUNCTION(32, Waiter2)
+
+
+//////////////////////////////////////////////////////////////////////////
+// Private functions
+//////////////////////////////////////////////////////////////////////////
+void Waiter2::serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, Position position, bool shouldUpdatePosition, uint *parameter2) {
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ if (shouldUpdatePosition) {
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+ }
+
+ setCallback(1);
+ setup_draw(seq1);
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ if (position)
+ getEntities()->updatePositionEnter(kEntityWaiter2, kCarRestaurant, position);
+
+ getSavePoints()->push(kEntityWaiter2, entity, kAction136455232);
+
+ setCallback(2);
+ setup_callSavepoint(seq2, entity, kActionDrawTablesWithChairs, seq3);
+ break;
+
+ case 2:
+ if (position)
+ getEntities()->updatePositionExit(kEntityWaiter2, kCarRestaurant, position);
+
+ setCallback(3);
+ setup_draw(seq4);
+ break;
+
+ case 3:
+ getData()->entityPosition = kPosition_5900;
+ getEntities()->clearSequences(kEntityWaiter2);
+ *parameter = 0;
+
+ if (parameter2 != NULL)
+ *parameter2 = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+void Waiter2::serveSalon(const SavePoint &savepoint, const char *seq1, const char *snd1, EntityIndex entity, const char *snd2, const char *seq2, ActionIndex action, const char *seq3, uint *parameter) {
+ switch (savepoint.action) {
+ default:
+ break;
+
+ case kActionDefault:
+ getData()->entityPosition = kPosition_5800;
+ getData()->location = kLocationOutsideCompartment;
+
+ setCallback(1);
+ setup_draw("816DD");
+ break;
+
+ case kActionCallback:
+ switch (getCallback()) {
+ default:
+ break;
+
+ case 1:
+ getEntities()->drawSequenceRight(kEntityWaiter2, seq1);
+
+ if (getEntities()->isInRestaurant(kEntityPlayer))
+ getEntities()->updateFrame(kEntityWaiter2);
+
+ if (!strcmp(snd1, ""))
+ getSound()->playSound(kEntityWaiter2, snd1);
+
+ setCallback(2);
+ setup_callbackActionOnDirection();
+ break;
+
+ case 2:
+ getSavePoints()->push(kEntityWaiter2, entity, kAction122358304);
+
+ getSound()->playSound(kEntityWaiter2, snd2);
+
+ setCallback(3);
+ setup_updatePosition(seq2, kCarRestaurant, 57);
+ break;
+
+ case 3:
+ getSavePoints()->push(kEntityWaiter2, entity, action);
+
+ setCallback(4);
+ setup_draw(seq3);
+ break;
+
+ case 4:
+ getEntities()->drawSequenceRight(kEntityWaiter2, "816UD");
+
+ if (getEntities()->isInSalon(kEntityPlayer))
+ getEntities()->updateFrame(kEntityWaiter2);
+
+ setCallback(5);
+ setup_callbackActionOnDirection();
+ break;
+
+ case 5:
+ getEntities()->clearSequences(kEntityWaiter2);
+ getData()->entityPosition = kPosition_5900;
+ *parameter = 0;
+
+ callbackAction();
+ break;
+ }
+ break;
+ }
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/entities/waiter2.h b/engines/lastexpress/entities/waiter2.h
new file mode 100644
index 0000000..0ed85cd
--- /dev/null
+++ b/engines/lastexpress/entities/waiter2.h
@@ -0,0 +1,163 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef LASTEXPRESS_WAITER2_H
+#define LASTEXPRESS_WAITER2_H
+
+#include "lastexpress/entities/entity.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+
+class Waiter2 : public Entity {
+public:
+ Waiter2(LastExpressEngine *engine);
+ ~Waiter2() {}
+
+ /**
+ * Updates parameter 2 using time value
+ *
+ * @param savepoint The savepoint
+ * - Time to add
+ */
+ DECLARE_FUNCTION_NOSETUP(updateFromTime)
+
+ /**
+ * Draws the entity
+ *
+ * @param sequence The sequence to draw
+ */
+ DECLARE_FUNCTION_1(draw, const char *sequence)
+
+ /**
+ * Updates the position
+ *
+ * @param sequence1 The sequence to draw
+ * @param car The car
+ * @param position The position
+ */
+ DECLARE_FUNCTION_3(updatePosition, const char *sequence, CarIndex car, Position position)
+
+ /**
+ * Process callback action when the entity direction is not kDirectionRight
+ */
+ DECLARE_FUNCTION(callbackActionOnDirection)
+
+ /**
+ * Call a savepoint (or draw sequence in default case)
+ *
+ * @param sequence1 The sequence to draw in the default case
+ * @param entity The entity
+ * @param action The action
+ * @param sequence2 The sequence name for the savepoint
+ */
+ DECLARE_FUNCTION_4(callSavepoint, const char *sequence1, EntityIndex entity, ActionIndex action, const char *sequence2)
+
+ /**
+ * Plays sound
+ *
+ * @param filename The sound filename
+ */
+ DECLARE_FUNCTION_1(playSound, const char *filename)
+
+ DECLARE_FUNCTION(function7)
+
+ /**
+ * Setup Chapter 1
+ */
+ DECLARE_FUNCTION(chapter1)
+
+ DECLARE_FUNCTION(function9)
+ DECLARE_FUNCTION(function10)
+ DECLARE_FUNCTION(function11)
+ DECLARE_FUNCTION(function12)
+ DECLARE_FUNCTION(function13)
+
+ /**
+ * Handle Chapter 1 events
+ */
+ DECLARE_FUNCTION(chapter1Handler)
+
+ DECLARE_FUNCTION(function15)
+ DECLARE_FUNCTION(function16)
+
+ /**
+ * Setup Chapter 2
+ */
+ DECLARE_FUNCTION(chapter2)
+
+ /**
+ * Handle Chapter 2 events
+ */
+ DECLARE_FUNCTION(chapter2Handler)
+
+ DECLARE_FUNCTION(function19)
+ DECLARE_FUNCTION(function20)
+ DECLARE_FUNCTION(function21)
+
+ /**
+ * Setup Chapter 3
+ */
+ DECLARE_FUNCTION(chapter3)
+
+ /**
+ * Handle Chapter 3 events
+ */
+ DECLARE_FUNCTION(chapter3Handler)
+
+ DECLARE_FUNCTION(function24)
+
+ /**
+ * Setup Chapter 4
+ */
+ DECLARE_FUNCTION(chapter4)
+
+ /**
+ * Handle Chapter 4 events
+ */
+ DECLARE_FUNCTION(chapter4Handler)
+
+ DECLARE_FUNCTION(function27)
+ DECLARE_FUNCTION(function28)
+ DECLARE_FUNCTION(function29)
+
+ /**
+ * Setup Chapter 5
+ */
+ DECLARE_FUNCTION(chapter5)
+
+ /**
+ * Handle Chapter 5 events
+ */
+ DECLARE_FUNCTION(chapter5Handler)
+
+ DECLARE_NULL_FUNCTION()
+
+private:
+ void serveTable(const SavePoint &savepoint, const char *seq1, EntityIndex entity, const char *seq2, const char *seq3, const char *seq4, uint *parameter, Position position = 0, bool updatePosition = true, uint *parameter2 = NULL);
+ void serveSalon(const SavePoint &savepoint, const char *seq1, const char *snd1, EntityIndex entity, const char *snd2, const char *seq2, ActionIndex action, const char *seq3, uint *parameter);
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_WAITER2_H
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp
index b4b5527..26a8288 100644
--- a/engines/lastexpress/game/entities.cpp
+++ b/engines/lastexpress/game/entities.cpp
@@ -51,8 +51,6 @@
#include "lastexpress/entities/pascale.h"
#include "lastexpress/entities/rebecca.h"
#include "lastexpress/entities/salko.h"
-#include "lastexpress/entities/servers0.h"
-#include "lastexpress/entities/servers1.h"
#include "lastexpress/entities/sophie.h"
#include "lastexpress/entities/tables.h"
#include "lastexpress/entities/tatiana.h"
@@ -60,6 +58,8 @@
#include "lastexpress/entities/vassili.h"
#include "lastexpress/entities/verges.h"
#include "lastexpress/entities/vesna.h"
+#include "lastexpress/entities/waiter1.h"
+#include "lastexpress/entities/waiter2.h"
#include "lastexpress/entities/yasmin.h"
// Game
@@ -134,8 +134,8 @@ Entities::Entities(LastExpressEngine *engine) : _engine(engine) {
ADD_ENTITY(Mertens);
ADD_ENTITY(Coudert);
ADD_ENTITY(Pascale);
- ADD_ENTITY(Servers0);
- ADD_ENTITY(Servers1);
+ ADD_ENTITY(Waiter1);
+ ADD_ENTITY(Waiter2);
ADD_ENTITY(Cooks);
ADD_ENTITY(Verges);
ADD_ENTITY(Tatiana);
diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp
index 293c3ab..90b684a 100644
--- a/engines/lastexpress/lastexpress.cpp
+++ b/engines/lastexpress/lastexpress.cpp
@@ -48,7 +48,7 @@
const char *g_actionNames[] = {"None", "Action1", "Action2", "ExitCompartment", "Action4", "ExcuseMeCath", "ExcuseMe", "INVALID", "Knock", "OpenDoor", "Action10", "Action11", "Default", "INVALID", "INVALID", "INVALID", "Action16", "DrawScene", "Callback"};
const char *g_directionNames[] = { "None", "Up", "Down", "Left", "Right", "Switch"};
-const char *g_entityNames[] = { "Player", "Anna", "August", "Mertens", "Coudert", "Pascale", "Servers0", "Servers1", "Cooks", "Verges", "Tatiana", "Vassili", "Alexei", "Abbot", "Milos", "Vesna", "Ivo", "Salko", "Kronos", "Kahina", "Francois", "MmeBoutarel", "Boutarel", "Rebecca", "Sophie", "Mahmud", "Yasmin", "Hadija", "Alouan", "Gendarmes", "Max", "Chapters", "Train", "Tables0", "Tables1", "Tables2", "Tables3", "Tables4", "Tables5", "Entity39"};
+const char *g_entityNames[] = { "Player", "Anna", "August", "Mertens", "Coudert", "Pascale", "Waiter1", "Waiter2", "Cooks", "Verges", "Tatiana", "Vassili", "Alexei", "Abbot", "Milos", "Vesna", "Ivo", "Salko", "Kronos", "Kahina", "Francois", "MmeBoutarel", "Boutarel", "Rebecca", "Sophie", "Mahmud", "Yasmin", "Hadija", "Alouan", "Gendarmes", "Max", "Chapters", "Train", "Tables0", "Tables1", "Tables2", "Tables3", "Tables4", "Tables5", "Entity39"};
namespace LastExpress {
diff --git a/engines/lastexpress/module.mk b/engines/lastexpress/module.mk
index 8b3287d..afce0b0 100644
--- a/engines/lastexpress/module.mk
+++ b/engines/lastexpress/module.mk
@@ -35,8 +35,6 @@ MODULE_OBJS := \
entities/pascale.o \
entities/rebecca.o \
entities/salko.o \
- entities/servers0.o \
- entities/servers1.o \
entities/sophie.o \
entities/tables.o \
entities/tatiana.o \
@@ -44,6 +42,8 @@ MODULE_OBJS := \
entities/vassili.o \
entities/verges.o \
entities/vesna.o \
+ entities/waiter1.o \
+ entities/waiter2.o \
entities/yasmin.o \
fight/fight.o \
fight/fighter.o \
diff --git a/engines/lastexpress/shared.h b/engines/lastexpress/shared.h
index c0099db..724c4b3 100644
--- a/engines/lastexpress/shared.h
+++ b/engines/lastexpress/shared.h
@@ -1006,8 +1006,8 @@ enum EntityIndex {
kEntityMertens,
kEntityCoudert,
kEntityPascale, // 5
- kEntityServers0,
- kEntityServers1,
+ kEntityWaiter1,
+ kEntityWaiter2,
kEntityCooks,
kEntityVerges,
kEntityTatiana, // 10
@@ -1409,7 +1409,7 @@ enum ActionIndex {
kAction169032608 = 169032608,
kAction189426612 = 189426612,
kAction203859488 = 203859488,
- kAction219522616 = 219522616, // Servers0
+ kAction219522616 = 219522616, // Waiter1
kAction225182640 = 225182640,
kAction235257824 = 235257824,
@@ -1520,7 +1520,7 @@ enum ActionIndex {
kAction71277948 = 71277948,
kAction158007856 = 158007856,
kAction101687594 = 101687594,
- kAction122358304 = 122358304, // also Servers1/Boutarel?
+ kAction122358304 = 122358304, // also Waiter2/Boutarel?
kActionMaxFreeFromCage = 135204609,
kAction156622016 = 156622016,
diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp
index 5f55f4e..3a2d0c0 100644
--- a/engines/lastexpress/sound/sound.cpp
+++ b/engines/lastexpress/sound/sound.cpp
@@ -984,22 +984,22 @@ void SoundManager::excuseMe(EntityIndex entity, EntityIndex entity2, SoundFlag f
playSound(kEntityPlayer, (rnd(2) ? "HDE1002" : "HED1002A"), flag);
break;
- case kEntityServers0:
- case kEntityServers1:
+ case kEntityWaiter1:
+ case kEntityWaiter2:
switch(rnd(3)) {
default:
break;
case 0:
- playSound(kEntityPlayer, (entity == kEntityServers0) ? "WAT1002" : "WAT1003", flag);
+ playSound(kEntityPlayer, (entity == kEntityWaiter1) ? "WAT1002" : "WAT1003", flag);
break;
case 1:
- playSound(kEntityPlayer, (entity == kEntityServers0) ? "WAT1002A" : "WAT1003A", flag);
+ playSound(kEntityPlayer, (entity == kEntityWaiter1) ? "WAT1002A" : "WAT1003A", flag);
break;
case 2:
- playSound(kEntityPlayer, (entity == kEntityServers0) ? "WAT1002B" : "WAT1003B", flag);
+ playSound(kEntityPlayer, (entity == kEntityWaiter1) ? "WAT1002B" : "WAT1003B", flag);
break;
}
break;
Commit: 73cc1803cb3eb9651e346751e8aa9ae718a85f51
https://github.com/scummvm/scummvm/commit/73cc1803cb3eb9651e346751e8aa9ae718a85f51
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:14-04:00
Commit Message:
LASTEXPRESS: Rename Waiter* functions
Changed paths:
engines/lastexpress/entities/chapters.cpp
engines/lastexpress/entities/waiter1.cpp
engines/lastexpress/entities/waiter1.h
engines/lastexpress/entities/waiter2.cpp
engines/lastexpress/entities/waiter2.h
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index b100e30..6023ae6 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -1518,8 +1518,8 @@ label_callback_4:
RESET_ENTITY_STATE(kEntityAugust, August, setup_function65);
RESET_ENTITY_STATE(kEntityMertens, Mertens, setup_function48);
RESET_ENTITY_STATE(kEntityCoudert, Coudert, setup_function53);
- RESET_ENTITY_STATE(kEntityWaiter1, Waiter1, setup_chapter4Handler);
- RESET_ENTITY_STATE(kEntityWaiter2, Waiter2, setup_chapter4Handler);
+ RESET_ENTITY_STATE(kEntityWaiter1, Waiter1, setup_serving4);
+ RESET_ENTITY_STATE(kEntityWaiter2, Waiter2, setup_serving4);
RESET_ENTITY_STATE(kEntityPascale, Pascale, setup_chapter4Handler);
RESET_ENTITY_STATE(kEntityVerges, Verges, setup_chapter4Handler);
RESET_ENTITY_STATE(kEntityTatiana, Tatiana, setup_function49);
diff --git a/engines/lastexpress/entities/waiter1.cpp b/engines/lastexpress/entities/waiter1.cpp
index 21e40d3..80ec471 100644
--- a/engines/lastexpress/entities/waiter1.cpp
+++ b/engines/lastexpress/entities/waiter1.cpp
@@ -46,35 +46,35 @@ Waiter1::Waiter1(LastExpressEngine *engine) : Entity(engine, kEntityWaiter1) {
ADD_CALLBACK_FUNCTION(Waiter1, updatePosition);
ADD_CALLBACK_FUNCTION(Waiter1, callbackActionOnDirection);
ADD_CALLBACK_FUNCTION(Waiter1, playSound);
- ADD_CALLBACK_FUNCTION(Waiter1, function7);
- ADD_CALLBACK_FUNCTION(Waiter1, function8);
- ADD_CALLBACK_FUNCTION(Waiter1, function9);
- ADD_CALLBACK_FUNCTION(Waiter1, function10);
+ ADD_CALLBACK_FUNCTION(Waiter1, rebeccaFeedUs);
+ ADD_CALLBACK_FUNCTION(Waiter1, rebeccaClearOurTable);
+ ADD_CALLBACK_FUNCTION(Waiter1, abbotCheckMe);
+ ADD_CALLBACK_FUNCTION(Waiter1, abbotClearTable);
ADD_CALLBACK_FUNCTION(Waiter1, chapter1);
- ADD_CALLBACK_FUNCTION(Waiter1, function12);
- ADD_CALLBACK_FUNCTION(Waiter1, function13);
- ADD_CALLBACK_FUNCTION(Waiter1, function14);
- ADD_CALLBACK_FUNCTION(Waiter1, function15);
- ADD_CALLBACK_FUNCTION(Waiter1, function16);
- ADD_CALLBACK_FUNCTION(Waiter1, function17);
- ADD_CALLBACK_FUNCTION(Waiter1, function18);
- ADD_CALLBACK_FUNCTION(Waiter1, function19);
- ADD_CALLBACK_FUNCTION(Waiter1, chapter1Handler);
+ ADD_CALLBACK_FUNCTION(Waiter1, annaOrder);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustOrder);
+ ADD_CALLBACK_FUNCTION(Waiter1, serveAnna);
+ ADD_CALLBACK_FUNCTION(Waiter1, serveAugust);
+ ADD_CALLBACK_FUNCTION(Waiter1, clearAnna);
+ ADD_CALLBACK_FUNCTION(Waiter1, clearTatiana);
+ ADD_CALLBACK_FUNCTION(Waiter1, clearAugust1);
+ ADD_CALLBACK_FUNCTION(Waiter1, clearAugust2);
+ ADD_CALLBACK_FUNCTION(Waiter1, servingDinner);
ADD_CALLBACK_FUNCTION(Waiter1, function21);
ADD_CALLBACK_FUNCTION(Waiter1, function22);
ADD_CALLBACK_FUNCTION(Waiter1, chapter2);
- ADD_CALLBACK_FUNCTION(Waiter1, chapter2Handler);
- ADD_CALLBACK_FUNCTION(Waiter1, function25);
- ADD_CALLBACK_FUNCTION(Waiter1, function26);
+ ADD_CALLBACK_FUNCTION(Waiter1, inKitchen);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustComeHere2);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustClearTable2);
ADD_CALLBACK_FUNCTION(Waiter1, chapter3);
- ADD_CALLBACK_FUNCTION(Waiter1, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Waiter1, augustAnnaDateOrder);
- ADD_CALLBACK_FUNCTION(Waiter1, function30);
+ ADD_CALLBACK_FUNCTION(Waiter1, serving3);
+ ADD_CALLBACK_FUNCTION(Waiter1, annaComeHere3);
+ ADD_CALLBACK_FUNCTION(Waiter1, abbotServeLunch3);
ADD_CALLBACK_FUNCTION(Waiter1, chapter4);
- ADD_CALLBACK_FUNCTION(Waiter1, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Waiter1, augustOrderSteak);
- ADD_CALLBACK_FUNCTION(Waiter1, augustServeDuck);
- ADD_CALLBACK_FUNCTION(Waiter1, function35);
+ ADD_CALLBACK_FUNCTION(Waiter1, serving4);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustOrder4);
+ ADD_CALLBACK_FUNCTION(Waiter1, serveAugust4);
+ ADD_CALLBACK_FUNCTION(Waiter1, augustClearTable);
ADD_CALLBACK_FUNCTION(Waiter1, chapter5);
ADD_CALLBACK_FUNCTION(Waiter1, chapter5Handler);
ADD_NULL_FUNCTION();
@@ -132,7 +132,7 @@ IMPLEMENT_FUNCTION_S(6, Waiter1, playSound)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Waiter1, function7)
+IMPLEMENT_FUNCTION(7, Waiter1, rebeccaFeedUs)
switch (savepoint.action) {
default:
break;
@@ -173,12 +173,12 @@ IMPLEMENT_FUNCTION(7, Waiter1, function7)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(8, Waiter1, function8)
+IMPLEMENT_FUNCTION(8, Waiter1, rebeccaClearOurTable)
serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "913", &ENTITY_PARAM(1, 2));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Waiter1, function9)
+IMPLEMENT_FUNCTION(9, Waiter1, abbotCheckMe)
switch (savepoint.action) {
default:
break;
@@ -225,7 +225,7 @@ IMPLEMENT_FUNCTION(9, Waiter1, function9)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(10, Waiter1, function10)
+IMPLEMENT_FUNCTION(10, Waiter1, abbotClearTable)
serveTable(savepoint, "916", kEntityTables4, "014E", "014F", "918", &ENTITY_PARAM(2, 3), false);
IMPLEMENT_FUNCTION_END
@@ -236,7 +236,7 @@ IMPLEMENT_FUNCTION(11, Waiter1, chapter1)
break;
case kActionNone:
- setup_chapter1Handler();
+ setup_servingDinner();
break;
case kActionDefault:
@@ -265,47 +265,47 @@ IMPLEMENT_FUNCTION(11, Waiter1, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Waiter1, function12)
+IMPLEMENT_FUNCTION(12, Waiter1, annaOrder)
handleServer(savepoint, "907", kEntityAnna, kAction268773672, &ENTITY_PARAM(0, 1));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Waiter1, function13)
+IMPLEMENT_FUNCTION(13, Waiter1, augustOrder)
handleServer(savepoint, "911", kEntityAugust, kAction268773672, &ENTITY_PARAM(0, 2), "010F");
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Waiter1, function14)
+IMPLEMENT_FUNCTION(14, Waiter1, serveAnna)
handleServer(savepoint, "908", kEntityAnna, kAction170016384, &ENTITY_PARAM(0, 4));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Waiter1, function15)
+IMPLEMENT_FUNCTION(15, Waiter1, serveAugust)
handleServer(savepoint, "912", kEntityAugust, kAction170016384, &ENTITY_PARAM(0, 5));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Waiter1, function16)
+IMPLEMENT_FUNCTION(16, Waiter1, clearAnna)
serveTable(savepoint, "907", kEntityTables0, "001N", "001P", "909", &ENTITY_PARAM(0, 6));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Waiter1, function17)
+IMPLEMENT_FUNCTION(17, Waiter1, clearTatiana)
serveTable(savepoint, "915", kEntityTables4, "014E", "014F", "917", &ENTITY_PARAM(1, 1), true, false, 67);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(18, Waiter1, function18)
+IMPLEMENT_FUNCTION(18, Waiter1, clearAugust1)
serveTable(savepoint, "911", kEntityTables3, "010L", "010H", "913", &ENTITY_PARAM(0, 7));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Waiter1, function19)
+IMPLEMENT_FUNCTION(19, Waiter1, clearAugust2)
serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "913", &ENTITY_PARAM(0, 8), true, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Waiter1, chapter1Handler)
+IMPLEMENT_FUNCTION(20, Waiter1, servingDinner)
switch (savepoint.action) {
default:
break;
@@ -328,16 +328,16 @@ IMPLEMENT_FUNCTION(20, Waiter1, chapter1Handler)
if (!getEntities()->isInKitchen(kEntityWaiter1) && !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
- HANDLE_TABLE(0, 1, 1, setup_function12);
- HANDLE_TABLE(0, 2, 2, setup_function13);
- HANDLE_TABLE(0, 3, 3, setup_function7);
- HANDLE_TABLE(0, 4, 4, setup_function14);
- HANDLE_TABLE(0, 5, 5, setup_function15);
- HANDLE_TABLE(0, 6, 6, setup_function16);
- HANDLE_TABLE(1, 1, 7, setup_function17);
- HANDLE_TABLE(0, 7, 8, setup_function18);
- HANDLE_TABLE(0, 8, 9, setup_function19);
- HANDLE_TABLE(1, 2, 10, setup_function8);
+ HANDLE_TABLE(0, 1, 1, setup_annaOrder);
+ HANDLE_TABLE(0, 2, 2, setup_augustOrder);
+ HANDLE_TABLE(0, 3, 3, setup_rebeccaFeedUs);
+ HANDLE_TABLE(0, 4, 4, setup_serveAnna);
+ HANDLE_TABLE(0, 5, 5, setup_serveAugust);
+ HANDLE_TABLE(0, 6, 6, setup_clearAnna);
+ HANDLE_TABLE(1, 1, 7, setup_clearTatiana);
+ HANDLE_TABLE(0, 7, 8, setup_clearAugust1);
+ HANDLE_TABLE(0, 8, 9, setup_clearAugust2);
+ HANDLE_TABLE(1, 2, 10, setup_rebeccaClearOurTable);
break;
case kActionCallback:
@@ -415,7 +415,7 @@ IMPLEMENT_FUNCTION(23, Waiter1, chapter2)
break;
case kActionNone:
- setup_chapter2Handler();
+ setup_inKitchen();
break;
case kActionDefault:
@@ -434,7 +434,7 @@ IMPLEMENT_FUNCTION(23, Waiter1, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(24, Waiter1, chapter2Handler)
+IMPLEMENT_FUNCTION(24, Waiter1, inKitchen)
switch (savepoint.action) {
default:
break;
@@ -443,19 +443,19 @@ IMPLEMENT_FUNCTION(24, Waiter1, chapter2Handler)
if (!getEntities()->isInKitchen(kEntityWaiter1) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
- HANDLE_TABLE(1, 3, 1, setup_function25);
- HANDLE_TABLE(1, 4, 2, setup_function26);
+ HANDLE_TABLE(1, 3, 1, setup_augustComeHere2);
+ HANDLE_TABLE(1, 4, 2, setup_augustClearTable2);
break;
case kActionCallback:
if (getCallback() == 1)
- HANDLE_TABLE(1, 4, 2, setup_function26);
+ HANDLE_TABLE(1, 4, 2, setup_augustClearTable2);
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(25, Waiter1, function25)
+IMPLEMENT_FUNCTION(25, Waiter1, augustComeHere2)
switch (savepoint.action) {
default:
break;
@@ -496,7 +496,7 @@ IMPLEMENT_FUNCTION(25, Waiter1, function25)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Waiter1, function26)
+IMPLEMENT_FUNCTION(26, Waiter1, augustClearTable2)
serveTable(savepoint, "957", kEntityTables0, "016E", "016D", "959", &ENTITY_PARAM(1, 4));
IMPLEMENT_FUNCTION_END
@@ -507,7 +507,7 @@ IMPLEMENT_FUNCTION(27, Waiter1, chapter3)
break;
case kActionNone:
- setup_chapter3Handler();
+ setup_serving3();
break;
case kActionDefault:
@@ -530,7 +530,7 @@ IMPLEMENT_FUNCTION(27, Waiter1, chapter3)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Waiter1, chapter3Handler)
+IMPLEMENT_FUNCTION(28, Waiter1, serving3)
switch (savepoint.action) {
default:
break;
@@ -541,42 +541,42 @@ IMPLEMENT_FUNCTION(28, Waiter1, chapter3Handler)
if (ENTITY_PARAM(1, 5)) {
setCallback(1);
- setup_augustAnnaDateOrder();
+ setup_annaComeHere3();
break;
}
label_callback_1:
if (ENTITY_PARAM(1, 6)) {
setCallback(2);
- setup_function9();
+ setup_abbotCheckMe();
break;
}
label_callback_2:
if (ENTITY_PARAM(2, 4)) {
setCallback(3);
- setup_function30();
+ setup_abbotServeLunch3();
break;
}
label_callback_3:
if (ENTITY_PARAM(2, 3)) {
setCallback(4);
- setup_function10();
+ setup_abbotClearTable();
break;
}
label_callback_4:
if (ENTITY_PARAM(0, 3)) {
setCallback(5);
- setup_function7();
+ setup_rebeccaFeedUs();
break;
}
label_callback_5:
if (ENTITY_PARAM(1, 2)) {
setCallback(6);
- setup_function8();
+ setup_rebeccaClearOurTable();
break;
}
break;
@@ -606,7 +606,8 @@ label_callback_5:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(29, Waiter1, augustAnnaDateOrder)
+IMPLEMENT_FUNCTION(29, Waiter1, annaComeHere3)
+ // August and Anna order dinner
switch (savepoint.action) {
default:
break;
@@ -652,7 +653,7 @@ IMPLEMENT_FUNCTION(29, Waiter1, augustAnnaDateOrder)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(30, Waiter1, function30)
+IMPLEMENT_FUNCTION(30, Waiter1, abbotServeLunch3)
switch (savepoint.action) {
default:
break;
@@ -704,7 +705,7 @@ IMPLEMENT_FUNCTION(31, Waiter1, chapter4)
break;
case kActionNone:
- setup_chapter4Handler();
+ setup_serving4();
break;
case kActionDefault:
@@ -727,7 +728,7 @@ IMPLEMENT_FUNCTION(31, Waiter1, chapter4)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(32, Waiter1, chapter4Handler)
+IMPLEMENT_FUNCTION(32, Waiter1, serving4)
switch (savepoint.action) {
default:
break;
@@ -743,42 +744,42 @@ IMPLEMENT_FUNCTION(32, Waiter1, chapter4Handler)
if (ENTITY_PARAM(1, 7)) {
setCallback(1);
- setup_augustOrderSteak();
+ setup_augustOrder4();
break;
}
label_callback_1:
if (ENTITY_PARAM(1, 8)) {
setCallback(2);
- setup_augustServeDuck();
+ setup_serveAugust4();
break;
}
label_callback_2:
if (ENTITY_PARAM(2, 1)) {
setCallback(3);
- setup_function35();
+ setup_augustClearTable();
break;
}
label_callback_3:
if (ENTITY_PARAM(2, 2)) {
setCallback(4);
- setup_function9();
+ setup_abbotCheckMe();
break;
}
label_callback_4:
if (ENTITY_PARAM(2, 3)) {
setCallback(5);
- setup_function10();
+ setup_abbotClearTable();
break;
}
label_callback_5:
if (ENTITY_PARAM(0, 3)) {
setCallback(6);
- setup_function7();
+ setup_rebeccaFeedUs();
break;
}
break;
@@ -821,7 +822,8 @@ label_callback_5:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(33, Waiter1, augustOrderSteak)
+IMPLEMENT_FUNCTION(33, Waiter1, augustOrder4)
+ // August orders a steak
switch (savepoint.action) {
default:
break;
@@ -864,7 +866,8 @@ IMPLEMENT_FUNCTION(33, Waiter1, augustOrderSteak)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(34, Waiter1, augustServeDuck)
+IMPLEMENT_FUNCTION(34, Waiter1, serveAugust4)
+ // August is being served
switch (savepoint.action) {
default:
break;
@@ -907,7 +910,7 @@ IMPLEMENT_FUNCTION(34, Waiter1, augustServeDuck)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(35, Waiter1, function35)
+IMPLEMENT_FUNCTION(35, Waiter1, augustClearTable)
serveTable(savepoint, "911", kEntityTables3, "010L", "010M", "914", &ENTITY_PARAM(2, 1), false, true);
IMPLEMENT_FUNCTION_END
diff --git a/engines/lastexpress/entities/waiter1.h b/engines/lastexpress/entities/waiter1.h
index 2a0c56e..64c6655 100644
--- a/engines/lastexpress/entities/waiter1.h
+++ b/engines/lastexpress/entities/waiter1.h
@@ -80,29 +80,24 @@ public:
*/
DECLARE_FUNCTION_1(playSound, const char *filename)
- DECLARE_FUNCTION(function7)
- DECLARE_FUNCTION(function8)
- DECLARE_FUNCTION(function9)
- DECLARE_FUNCTION(function10)
+ DECLARE_FUNCTION(rebeccaFeedUs)
+ DECLARE_FUNCTION(rebeccaClearOurTable)
+ DECLARE_FUNCTION(abbotCheckMe)
+ DECLARE_FUNCTION(abbotClearTable)
/**
* Setup Chapter 1
*/
DECLARE_FUNCTION(chapter1)
- DECLARE_FUNCTION(function12)
- DECLARE_FUNCTION(function13)
- DECLARE_FUNCTION(function14)
- DECLARE_FUNCTION(function15)
- DECLARE_FUNCTION(function16)
- DECLARE_FUNCTION(function17)
- DECLARE_FUNCTION(function18)
- DECLARE_FUNCTION(function19)
-
- /**
- * Handle Chapter 1 events
- */
- DECLARE_FUNCTION(chapter1Handler)
-
+ DECLARE_FUNCTION(annaOrder)
+ DECLARE_FUNCTION(augustOrder)
+ DECLARE_FUNCTION(serveAnna)
+ DECLARE_FUNCTION(serveAugust)
+ DECLARE_FUNCTION(clearAnna)
+ DECLARE_FUNCTION(clearTatiana)
+ DECLARE_FUNCTION(clearAugust1)
+ DECLARE_FUNCTION(clearAugust2)
+ DECLARE_FUNCTION(servingDinner)
DECLARE_FUNCTION(function21)
DECLARE_FUNCTION(function22)
@@ -110,41 +105,26 @@ public:
* Setup Chapter 2
*/
DECLARE_FUNCTION(chapter2)
-
- /**
- * Handle Chapter 2 events
- */
- DECLARE_FUNCTION(chapter2Handler)
-
- DECLARE_FUNCTION(function25)
- DECLARE_FUNCTION(function26)
+ DECLARE_FUNCTION(inKitchen)
+ DECLARE_FUNCTION(augustComeHere2)
+ DECLARE_FUNCTION(augustClearTable2)
/**
* Setup Chapter 3
*/
DECLARE_FUNCTION(chapter3)
-
- /**
- * Handle Chapter 3 events
- */
- DECLARE_FUNCTION(chapter3Handler)
-
- DECLARE_FUNCTION(augustAnnaDateOrder)
- DECLARE_FUNCTION(function30)
+ DECLARE_FUNCTION(serving3)
+ DECLARE_FUNCTION(annaComeHere3)
+ DECLARE_FUNCTION(abbotServeLunch3)
/**
* Setup Chapter 4
*/
DECLARE_FUNCTION(chapter4)
-
- /**
- * Handle Chapter 4 events
- */
- DECLARE_FUNCTION(chapter4Handler)
-
- DECLARE_FUNCTION(augustOrderSteak)
- DECLARE_FUNCTION(augustServeDuck)
- DECLARE_FUNCTION(function35)
+ DECLARE_FUNCTION(serving4)
+ DECLARE_FUNCTION(augustOrder4)
+ DECLARE_FUNCTION(serveAugust4)
+ DECLARE_FUNCTION(augustClearTable)
/**
* Setup Chapter 5
diff --git a/engines/lastexpress/entities/waiter2.cpp b/engines/lastexpress/entities/waiter2.cpp
index 8641818..ebb5a3e 100644
--- a/engines/lastexpress/entities/waiter2.cpp
+++ b/engines/lastexpress/entities/waiter2.cpp
@@ -39,29 +39,29 @@ Waiter2::Waiter2(LastExpressEngine *engine) : Entity(engine, kEntityWaiter2) {
ADD_CALLBACK_FUNCTION(Waiter2, callbackActionOnDirection);
ADD_CALLBACK_FUNCTION(Waiter2, callSavepoint);
ADD_CALLBACK_FUNCTION(Waiter2, playSound);
- ADD_CALLBACK_FUNCTION(Waiter2, function7);
+ ADD_CALLBACK_FUNCTION(Waiter2, monsieurServeUs);
ADD_CALLBACK_FUNCTION(Waiter2, chapter1);
- ADD_CALLBACK_FUNCTION(Waiter2, function9);
- ADD_CALLBACK_FUNCTION(Waiter2, function10);
- ADD_CALLBACK_FUNCTION(Waiter2, function11);
- ADD_CALLBACK_FUNCTION(Waiter2, function12);
- ADD_CALLBACK_FUNCTION(Waiter2, function13);
- ADD_CALLBACK_FUNCTION(Waiter2, chapter1Handler);
+ ADD_CALLBACK_FUNCTION(Waiter2, milosOrder);
+ ADD_CALLBACK_FUNCTION(Waiter2, monsieurOrder);
+ ADD_CALLBACK_FUNCTION(Waiter2, clearAlexei);
+ ADD_CALLBACK_FUNCTION(Waiter2, clearMilos);
+ ADD_CALLBACK_FUNCTION(Waiter2, clearMonsieur);
+ ADD_CALLBACK_FUNCTION(Waiter2, servingDinner);
ADD_CALLBACK_FUNCTION(Waiter2, function15);
ADD_CALLBACK_FUNCTION(Waiter2, function16);
ADD_CALLBACK_FUNCTION(Waiter2, chapter2);
- ADD_CALLBACK_FUNCTION(Waiter2, chapter2Handler);
- ADD_CALLBACK_FUNCTION(Waiter2, function19);
- ADD_CALLBACK_FUNCTION(Waiter2, function20);
- ADD_CALLBACK_FUNCTION(Waiter2, function21);
+ ADD_CALLBACK_FUNCTION(Waiter2, inKitchen);
+ ADD_CALLBACK_FUNCTION(Waiter2, tatianaClearTableB);
+ ADD_CALLBACK_FUNCTION(Waiter2, ivoComeHere);
+ ADD_CALLBACK_FUNCTION(Waiter2, ivoClearTableC);
ADD_CALLBACK_FUNCTION(Waiter2, chapter3);
- ADD_CALLBACK_FUNCTION(Waiter2, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Waiter2, function24);
+ ADD_CALLBACK_FUNCTION(Waiter2, serving3);
+ ADD_CALLBACK_FUNCTION(Waiter2, annaBringTea3);
ADD_CALLBACK_FUNCTION(Waiter2, chapter4);
- ADD_CALLBACK_FUNCTION(Waiter2, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Waiter2, function27);
- ADD_CALLBACK_FUNCTION(Waiter2, function28);
- ADD_CALLBACK_FUNCTION(Waiter2, function29);
+ ADD_CALLBACK_FUNCTION(Waiter2, serving4);
+ ADD_CALLBACK_FUNCTION(Waiter2, augustNeedsADrink);
+ ADD_CALLBACK_FUNCTION(Waiter2, serveAugustADrink);
+ ADD_CALLBACK_FUNCTION(Waiter2, annaNeedsADrink);
ADD_CALLBACK_FUNCTION(Waiter2, chapter5);
ADD_CALLBACK_FUNCTION(Waiter2, chapter5Handler);
ADD_NULL_FUNCTION()
@@ -105,7 +105,7 @@ IMPLEMENT_FUNCTION_S(6, Waiter2, playSound)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Waiter2, function7)
+IMPLEMENT_FUNCTION(7, Waiter2, monsieurServeUs)
switch (savepoint.action) {
default:
break;
@@ -154,7 +154,7 @@ IMPLEMENT_FUNCTION(8, Waiter2, chapter1)
break;
case kActionNone:
- setup_chapter1Handler();
+ setup_servingDinner();
break;
case kActionDefault:
@@ -178,7 +178,7 @@ IMPLEMENT_FUNCTION(8, Waiter2, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Waiter2, function9)
+IMPLEMENT_FUNCTION(9, Waiter2, milosOrder)
switch (savepoint.action) {
default:
break;
@@ -224,7 +224,7 @@ IMPLEMENT_FUNCTION(9, Waiter2, function9)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(10, Waiter2, function10)
+IMPLEMENT_FUNCTION(10, Waiter2, monsieurOrder)
switch (savepoint.action) {
default:
break;
@@ -270,22 +270,22 @@ IMPLEMENT_FUNCTION(10, Waiter2, function10)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Waiter2, function11)
+IMPLEMENT_FUNCTION(11, Waiter2, clearAlexei)
serveTable(savepoint, "919", kEntityTables1, "005H", "005J", "921", &ENTITY_PARAM(0, 3), 63);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Waiter2, function12)
+IMPLEMENT_FUNCTION(12, Waiter2, clearMilos)
serveTable(savepoint, "923", kEntityTables2, "009F", "009G", "926", &ENTITY_PARAM(0, 4));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Waiter2, function13)
+IMPLEMENT_FUNCTION(13, Waiter2, clearMonsieur)
serveTable(savepoint, "923", kEntityTables2, "009F", "009G", "926", &ENTITY_PARAM(0, 5));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Waiter2, chapter1Handler)
+IMPLEMENT_FUNCTION(14, Waiter2, servingDinner)
switch (savepoint.action) {
default:
break;
@@ -296,31 +296,31 @@ switch (savepoint.action) {
if (ENTITY_PARAM(0, 1)) {
setCallback(1);
- setup_function9();
+ setup_milosOrder();
break;
}
if (ENTITY_PARAM(1, 2)) {
setCallback(2);
- setup_function10();
+ setup_monsieurOrder();
break;
}
if (ENTITY_PARAM(0, 3)) {
setCallback(3);
- setup_function11();
+ setup_clearAlexei();
break;
}
if (ENTITY_PARAM(0, 4)) {
setCallback(4);
- setup_function12();
+ setup_clearMilos();
break;
}
if (ENTITY_PARAM(0, 5)) {
setCallback(5);
- setup_function13();
+ setup_clearMonsieur();
}
break;
@@ -367,7 +367,7 @@ IMPLEMENT_FUNCTION(17, Waiter2, chapter2)
break;
case kActionNone:
- setup_chapter2Handler();
+ setup_inKitchen();
break;
case kActionDefault:
@@ -387,7 +387,7 @@ IMPLEMENT_FUNCTION(17, Waiter2, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(18, Waiter2, chapter2Handler)
+IMPLEMENT_FUNCTION(18, Waiter2, inKitchen)
switch (savepoint.action) {
default:
break;
@@ -398,21 +398,21 @@ IMPLEMENT_FUNCTION(18, Waiter2, chapter2Handler)
if (ENTITY_PARAM(0, 6)) {
setCallback(1);
- setup_function19();
+ setup_tatianaClearTableB();
break;
}
label_callback_1:
if (ENTITY_PARAM(0, 7)) {
setCallback(2);
- setup_function20();
+ setup_ivoComeHere();
break;
}
label_callback_2:
if (ENTITY_PARAM(0, 8) || ENTITY_PARAM(0, 5)) {
setCallback(3);
- setup_function21();
+ setup_ivoClearTableC();
}
break;
@@ -442,12 +442,12 @@ label_callback_2:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Waiter2, function19)
+IMPLEMENT_FUNCTION(19, Waiter2, tatianaClearTableB)
serveTable(savepoint, "969", kEntityTables1, "005H2", "018A", "971", &ENTITY_PARAM(0, 6), 63);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Waiter2, function20)
+IMPLEMENT_FUNCTION(20, Waiter2, ivoComeHere)
switch (savepoint.action) {
default:
break;
@@ -473,7 +473,7 @@ IMPLEMENT_FUNCTION(20, Waiter2, function20)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(21, Waiter2, function21)
+IMPLEMENT_FUNCTION(21, Waiter2, ivoClearTableC)
serveTable(savepoint, "974", kEntityTables2, "009F2", "009G", "976", &ENTITY_PARAM(0, 8), 0, true, &ENTITY_PARAM(0, 5));
IMPLEMENT_FUNCTION_END
@@ -484,7 +484,7 @@ IMPLEMENT_FUNCTION(22, Waiter2, chapter3)
break;
case kActionNone:
- setup_chapter3Handler();
+ setup_serving3();
break;
case kActionDefault:
@@ -503,7 +503,7 @@ IMPLEMENT_FUNCTION(22, Waiter2, chapter3)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Waiter2, chapter3Handler)
+IMPLEMENT_FUNCTION(23, Waiter2, serving3)
if (savepoint.action != kActionNone)
return;
@@ -512,18 +512,18 @@ IMPLEMENT_FUNCTION(23, Waiter2, chapter3Handler)
if (ENTITY_PARAM(1, 1)) {
setCallback(1);
- setup_function24();
+ setup_annaBringTea3();
return;
}
if (ENTITY_PARAM(1, 2)) {
setCallback(2);
- setup_function7();
+ setup_monsieurServeUs();
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(24, Waiter2, function24)
+IMPLEMENT_FUNCTION(24, Waiter2, annaBringTea3)
serveSalon(savepoint, "927", "Ann3143A", kEntityAnna, "Ann31444", "112C", kAction122288808, "928", &ENTITY_PARAM(1, 1));
IMPLEMENT_FUNCTION_END
@@ -534,7 +534,7 @@ IMPLEMENT_FUNCTION(25, Waiter2, chapter4)
break;
case kActionNone:
- setup_chapter4Handler();
+ setup_serving4();
break;
case kActionDefault:
@@ -556,7 +556,7 @@ IMPLEMENT_FUNCTION(25, Waiter2, chapter4)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Waiter2, chapter4Handler)
+IMPLEMENT_FUNCTION(26, Waiter2, serving4)
switch (savepoint.action) {
default:
break;
@@ -574,19 +574,19 @@ IMPLEMENT_FUNCTION(26, Waiter2, chapter4Handler)
if (ENTITY_PARAM(1, 5)) {
setCallback(2);
- setup_function28();
+ setup_serveAugustADrink();
break;
}
if (ENTITY_PARAM(1, 4)) {
setCallback(3);
- setup_function29();
+ setup_annaNeedsADrink();
break;
}
if (ENTITY_PARAM(1, 2)) {
setCallback(4);
- setup_function7();
+ setup_monsieurServeUs();
}
break;
@@ -608,17 +608,17 @@ IMPLEMENT_FUNCTION(26, Waiter2, chapter4Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Waiter2, function27)
+IMPLEMENT_FUNCTION(27, Waiter2, augustNeedsADrink)
serveSalon(savepoint, "929", "", kEntityAugust, "Aug4003", "122D", kAction134486752, "930", &ENTITY_PARAM(1, 3));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Waiter2, function28)
+IMPLEMENT_FUNCTION(28, Waiter2, serveAugustADrink)
serveSalon(savepoint, "931", "", kEntityAugust, "Aug4004", "122E", kAction125826561, "930", &ENTITY_PARAM(1, 5));
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(29, Waiter2, function29)
+IMPLEMENT_FUNCTION(29, Waiter2, annaNeedsADrink)
serveSalon(savepoint, "932", "", kEntityAnna, "Ann4151", "127D", kAction122288808, "930", &ENTITY_PARAM(1, 4));
IMPLEMENT_FUNCTION_END
diff --git a/engines/lastexpress/entities/waiter2.h b/engines/lastexpress/entities/waiter2.h
index 0ed85cd..e8dc8f4 100644
--- a/engines/lastexpress/entities/waiter2.h
+++ b/engines/lastexpress/entities/waiter2.h
@@ -80,24 +80,19 @@ public:
*/
DECLARE_FUNCTION_1(playSound, const char *filename)
- DECLARE_FUNCTION(function7)
+ DECLARE_FUNCTION(monsieurServeUs)
/**
* Setup Chapter 1
*/
DECLARE_FUNCTION(chapter1)
- DECLARE_FUNCTION(function9)
- DECLARE_FUNCTION(function10)
- DECLARE_FUNCTION(function11)
- DECLARE_FUNCTION(function12)
- DECLARE_FUNCTION(function13)
-
- /**
- * Handle Chapter 1 events
- */
- DECLARE_FUNCTION(chapter1Handler)
-
+ DECLARE_FUNCTION(milosOrder)
+ DECLARE_FUNCTION(monsieurOrder)
+ DECLARE_FUNCTION(clearAlexei)
+ DECLARE_FUNCTION(clearMilos)
+ DECLARE_FUNCTION(clearMonsieur)
+ DECLARE_FUNCTION(servingDinner)
DECLARE_FUNCTION(function15)
DECLARE_FUNCTION(function16)
@@ -105,41 +100,26 @@ public:
* Setup Chapter 2
*/
DECLARE_FUNCTION(chapter2)
-
- /**
- * Handle Chapter 2 events
- */
- DECLARE_FUNCTION(chapter2Handler)
-
- DECLARE_FUNCTION(function19)
- DECLARE_FUNCTION(function20)
- DECLARE_FUNCTION(function21)
+ DECLARE_FUNCTION(inKitchen)
+ DECLARE_FUNCTION(tatianaClearTableB)
+ DECLARE_FUNCTION(ivoComeHere)
+ DECLARE_FUNCTION(ivoClearTableC)
/**
* Setup Chapter 3
*/
DECLARE_FUNCTION(chapter3)
-
- /**
- * Handle Chapter 3 events
- */
- DECLARE_FUNCTION(chapter3Handler)
-
- DECLARE_FUNCTION(function24)
+ DECLARE_FUNCTION(serving3)
+ DECLARE_FUNCTION(annaBringTea3)
/**
* Setup Chapter 4
*/
DECLARE_FUNCTION(chapter4)
-
- /**
- * Handle Chapter 4 events
- */
- DECLARE_FUNCTION(chapter4Handler)
-
- DECLARE_FUNCTION(function27)
- DECLARE_FUNCTION(function28)
- DECLARE_FUNCTION(function29)
+ DECLARE_FUNCTION(serving4)
+ DECLARE_FUNCTION(augustNeedsADrink)
+ DECLARE_FUNCTION(serveAugustADrink)
+ DECLARE_FUNCTION(annaNeedsADrink)
/**
* Setup Chapter 5
Commit: d921f6721df9fc495d12d96db4efc68eae67331a
https://github.com/scummvm/scummvm/commit/d921f6721df9fc495d12d96db4efc68eae67331a
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:16-04:00
Commit Message:
LASTEXPRESS: Add missing logic in Waiter2 for chapter 4
Changed paths:
engines/lastexpress/entities/waiter2.cpp
diff --git a/engines/lastexpress/entities/waiter2.cpp b/engines/lastexpress/entities/waiter2.cpp
index ebb5a3e..52a48a7 100644
--- a/engines/lastexpress/entities/waiter2.cpp
+++ b/engines/lastexpress/entities/waiter2.cpp
@@ -572,6 +572,12 @@ IMPLEMENT_FUNCTION(26, Waiter2, serving4)
if (!getEntities()->isInKitchen(kEntityWaiter2) || !getEntities()->isSomebodyInsideRestaurantOrSalon())
break;
+ if (ENTITY_PARAM(1, 3)) {
+ setCallback(1);
+ setup_augustNeedsADrink();
+ break;
+ }
+
if (ENTITY_PARAM(1, 5)) {
setCallback(2);
setup_serveAugustADrink();
Commit: 9b4ed3f1e5ae022a0fd700c09261d6866235ab0f
https://github.com/scummvm/scummvm/commit/9b4ed3f1e5ae022a0fd700c09261d6866235ab0f
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:17-04:00
Commit Message:
LASTEXPRESS: Rename Cooks functions
Changed paths:
engines/lastexpress/entities/chapters.cpp
engines/lastexpress/entities/cooks.cpp
engines/lastexpress/entities/cooks.h
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index 6023ae6..8628eab 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -209,7 +209,7 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
RESET_ENTITY_STATE(kEntityPascale, Pascale, setup_function19);
RESET_ENTITY_STATE(kEntityWaiter1, Waiter1, setup_function22);
RESET_ENTITY_STATE(kEntityWaiter2, Waiter2, setup_function16);
- RESET_ENTITY_STATE(kEntityCooks, Cooks, setup_function7);
+ RESET_ENTITY_STATE(kEntityCooks, Cooks, setup_lockUp);
RESET_ENTITY_STATE(kEntityMertens, Mertens, setup_function42);
RESET_ENTITY_STATE(kEntityCoudert, Coudert, setup_chapter1Handler);
diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp
index e24180e..749e939 100644
--- a/engines/lastexpress/entities/cooks.cpp
+++ b/engines/lastexpress/entities/cooks.cpp
@@ -37,17 +37,17 @@ namespace LastExpress {
Cooks::Cooks(LastExpressEngine *engine) : Entity(engine, kEntityCooks) {
ADD_CALLBACK_FUNCTION(Cooks, draw);
ADD_CALLBACK_FUNCTION(Cooks, playSound);
- ADD_CALLBACK_FUNCTION(Cooks, function3);
- ADD_CALLBACK_FUNCTION(Cooks, function4);
+ ADD_CALLBACK_FUNCTION(Cooks, uptrainVersion);
+ ADD_CALLBACK_FUNCTION(Cooks, downtrainVersion);
ADD_CALLBACK_FUNCTION(Cooks, chapter1);
- ADD_CALLBACK_FUNCTION(Cooks, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Cooks, function7);
+ ADD_CALLBACK_FUNCTION(Cooks, inKitchenDinner);
+ ADD_CALLBACK_FUNCTION(Cooks, lockUp);
ADD_CALLBACK_FUNCTION(Cooks, chapter2);
- ADD_CALLBACK_FUNCTION(Cooks, chapter2Handler);
+ ADD_CALLBACK_FUNCTION(Cooks, inKitchenBreakfast);
ADD_CALLBACK_FUNCTION(Cooks, chapter3);
- ADD_CALLBACK_FUNCTION(Cooks, chapter3Handler);
+ ADD_CALLBACK_FUNCTION(Cooks, inKitchenLunch);
ADD_CALLBACK_FUNCTION(Cooks, chapter4);
- ADD_CALLBACK_FUNCTION(Cooks, chapter4Handler);
+ ADD_CALLBACK_FUNCTION(Cooks, inKitchenDinner2);
ADD_CALLBACK_FUNCTION(Cooks, chapter5);
}
@@ -62,7 +62,7 @@ IMPLEMENT_FUNCTION_S(2, Cooks, playSound)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(3, Cooks, function3)
+IMPLEMENT_FUNCTION(3, Cooks, uptrainVersion)
switch (savepoint.action) {
default:
break;
@@ -147,7 +147,7 @@ IMPLEMENT_FUNCTION(3, Cooks, function3)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(4, Cooks, function4)
+IMPLEMENT_FUNCTION(4, Cooks, downtrainVersion)
switch (savepoint.action) {
default:
break;
@@ -239,7 +239,7 @@ IMPLEMENT_FUNCTION(5, Cooks, chapter1)
break;
case kActionNone:
- Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Cooks, setup_chapter1Handler));
+ Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Cooks, setup_inKitchenDinner));
break;
case kActionDefault:
@@ -254,7 +254,7 @@ IMPLEMENT_FUNCTION(5, Cooks, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(6, Cooks, chapter1Handler)
+IMPLEMENT_FUNCTION(6, Cooks, inKitchenDinner)
switch (savepoint.action) {
default:
break;
@@ -281,7 +281,7 @@ IMPLEMENT_FUNCTION(6, Cooks, chapter1Handler)
if (params->param1) {
if (getEntities()->isPlayerPosition(kCarRestaurant, 73)) {
setCallback(1);
- setup_function3();
+ setup_uptrainVersion();
}
} else {
if (params->param3) {
@@ -311,7 +311,7 @@ IMPLEMENT_FUNCTION(6, Cooks, chapter1Handler)
break;
case kAction101632192:
- setup_function7();
+ setup_lockUp();
break;
case kAction224849280:
@@ -322,7 +322,7 @@ IMPLEMENT_FUNCTION(6, Cooks, chapter1Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Cooks, function7)
+IMPLEMENT_FUNCTION(7, Cooks, lockUp)
switch (savepoint.action) {
default:
break;
@@ -350,7 +350,7 @@ IMPLEMENT_FUNCTION(8, Cooks, chapter2)
break;
case kActionNone:
- setup_chapter2Handler();
+ setup_inKitchenBreakfast();
break;
case kActionDefault:
@@ -368,7 +368,7 @@ IMPLEMENT_FUNCTION(8, Cooks, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(9, Cooks, chapter2Handler)
+IMPLEMENT_FUNCTION(9, Cooks, inKitchenBreakfast)
switch (savepoint.action) {
default:
break;
@@ -411,7 +411,7 @@ IMPLEMENT_FUNCTION(10, Cooks, chapter3)
break;
case kActionNone:
- setup_chapter3Handler();
+ setup_inKitchenLunch();
break;
case kActionDefault:
@@ -428,7 +428,7 @@ IMPLEMENT_FUNCTION(10, Cooks, chapter3)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Cooks, chapter3Handler)
+IMPLEMENT_FUNCTION(11, Cooks, inKitchenLunch)
switch (savepoint.action) {
default:
break;
@@ -459,7 +459,7 @@ IMPLEMENT_FUNCTION(11, Cooks, chapter3Handler)
if (params->param1) {
if (getEntities()->isPlayerPosition(kCarRestaurant, 80)) {
setCallback(1);
- setup_function4();
+ setup_downtrainVersion();
}
} else {
if (params->param3) {
@@ -502,7 +502,7 @@ IMPLEMENT_FUNCTION(12, Cooks, chapter4)
break;
case kActionNone:
- setup_chapter4Handler();
+ setup_inKitchenDinner2();
break;
case kActionDefault:
@@ -520,7 +520,7 @@ IMPLEMENT_FUNCTION(12, Cooks, chapter4)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Cooks, chapter4Handler)
+IMPLEMENT_FUNCTION(13, Cooks, inKitchenDinner2)
switch (savepoint.action) {
default:
break;
@@ -553,7 +553,6 @@ IMPLEMENT_FUNCTION(13, Cooks, chapter4Handler)
}
break;
-
case kActionCallback:
// Play the next part of background sound
if (getCallback() == 1 || getCallback() == 2) {
diff --git a/engines/lastexpress/entities/cooks.h b/engines/lastexpress/entities/cooks.h
index 79addb0..6a65a25 100644
--- a/engines/lastexpress/entities/cooks.h
+++ b/engines/lastexpress/entities/cooks.h
@@ -48,9 +48,9 @@ public:
*/
DECLARE_FUNCTION_1(playSound, const char *filename)
- DECLARE_FUNCTION(function3)
+ DECLARE_FUNCTION(uptrainVersion)
- DECLARE_FUNCTION(function4)
+ DECLARE_FUNCTION(downtrainVersion)
/**
* Setup Chapter 1
@@ -58,21 +58,21 @@ public:
DECLARE_FUNCTION(chapter1)
/**
- * Handle Chapter 1 events
+ * Chapter 1: Prepare dinner in kitchen
*/
- DECLARE_FUNCTION(chapter1Handler)
+ DECLARE_FUNCTION(inKitchenDinner)
- DECLARE_FUNCTION(function7)
+ DECLARE_FUNCTION(lockUp)
/**
* Setup Chapter 2
*/
DECLARE_FUNCTION(chapter2)
- /**
- * Handle Chapter 2 events
+ /*
+ * Chapter 2: Prepare breakfast in kitchen
*/
- DECLARE_FUNCTION(chapter2Handler)
+ DECLARE_FUNCTION(inKitchenBreakfast)
/**
* Setup Chapter 3
@@ -80,9 +80,9 @@ public:
DECLARE_FUNCTION(chapter3)
/**
- * Handle Chapter 3 events
+ * Chapter 3: Prepare lunch in kitchen
*/
- DECLARE_FUNCTION(chapter3Handler)
+ DECLARE_FUNCTION(inKitchenLunch)
/**
* Setup Chapter 4
@@ -90,9 +90,9 @@ public:
DECLARE_FUNCTION(chapter4)
/**
- * Handle Chapter 4 events
+ * Chapter 4: Prepare second dinner in kitchen
*/
- DECLARE_FUNCTION(chapter4Handler)
+ DECLARE_FUNCTION(inKitchenDinner2)
/**
* Setup Chapter 5
Commit: a42f910a90e732765592f8594d8c7a358aabdb7d
https://github.com/scummvm/scummvm/commit/a42f910a90e732765592f8594d8c7a358aabdb7d
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:18-04:00
Commit Message:
LASTEXPRESS: Rename Pascale functions
Changed paths:
engines/lastexpress/entities/pascale.cpp
engines/lastexpress/entities/pascale.h
diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp
index 69e5fe0..24b7f04 100644
--- a/engines/lastexpress/entities/pascale.cpp
+++ b/engines/lastexpress/entities/pascale.cpp
@@ -46,29 +46,29 @@ Pascale::Pascale(LastExpressEngine *engine) : Entity(engine, kEntityPascale) {
ADD_CALLBACK_FUNCTION(Pascale, welcomeSophieAndRebecca);
ADD_CALLBACK_FUNCTION(Pascale, sitSophieAndRebecca);
ADD_CALLBACK_FUNCTION(Pascale, welcomeCath);
- ADD_CALLBACK_FUNCTION(Pascale, function11);
+ ADD_CALLBACK_FUNCTION(Pascale, seatCath);
ADD_CALLBACK_FUNCTION(Pascale, chapter1);
- ADD_CALLBACK_FUNCTION(Pascale, getMessageFromAugustToTyler);
- ADD_CALLBACK_FUNCTION(Pascale, sitAnna);
- ADD_CALLBACK_FUNCTION(Pascale, welcomeAnna);
- ADD_CALLBACK_FUNCTION(Pascale, serveTatianaVassili);
- ADD_CALLBACK_FUNCTION(Pascale, chapter1Handler);
+ ADD_CALLBACK_FUNCTION(Pascale, greetAugust);
+ ADD_CALLBACK_FUNCTION(Pascale, seatAnna);
+ ADD_CALLBACK_FUNCTION(Pascale, greetAnna);
+ ADD_CALLBACK_FUNCTION(Pascale, greetTatiana);
+ ADD_CALLBACK_FUNCTION(Pascale, servingDinner);
ADD_CALLBACK_FUNCTION(Pascale, function18);
ADD_CALLBACK_FUNCTION(Pascale, function19);
ADD_CALLBACK_FUNCTION(Pascale, chapter2);
ADD_CALLBACK_FUNCTION(Pascale, chapter3);
ADD_CALLBACK_FUNCTION(Pascale, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Pascale, function23);
+ ADD_CALLBACK_FUNCTION(Pascale, abbotSeatMe3);
ADD_CALLBACK_FUNCTION(Pascale, welcomeAbbot);
ADD_CALLBACK_FUNCTION(Pascale, chapter4);
ADD_CALLBACK_FUNCTION(Pascale, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Pascale, function27);
- ADD_CALLBACK_FUNCTION(Pascale, messageFromAnna);
- ADD_CALLBACK_FUNCTION(Pascale, function29);
- ADD_CALLBACK_FUNCTION(Pascale, function30);
+ ADD_CALLBACK_FUNCTION(Pascale, meetCoudert);
+ ADD_CALLBACK_FUNCTION(Pascale, tellAugust);
+ ADD_CALLBACK_FUNCTION(Pascale, walkDownTrain);
+ ADD_CALLBACK_FUNCTION(Pascale, walkUpTrain);
ADD_CALLBACK_FUNCTION(Pascale, chapter5);
ADD_CALLBACK_FUNCTION(Pascale, chapter5Handler);
- ADD_CALLBACK_FUNCTION(Pascale, function33);
+ ADD_CALLBACK_FUNCTION(Pascale, hiding);
ADD_NULL_FUNCTION();
}
@@ -118,6 +118,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(8, Pascale, welcomeSophieAndRebecca)
+ // Welcomes Sophie And Rebecca
switch (savepoint.action) {
default:
break;
@@ -244,7 +245,7 @@ IMPLEMENT_FUNCTION(10, Pascale, welcomeCath)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Pascale, function11)
+IMPLEMENT_FUNCTION(11, Pascale, seatCath)
switch (savepoint.action) {
default:
break;
@@ -295,7 +296,7 @@ IMPLEMENT_FUNCTION(12, Pascale, chapter1)
break;
case kActionNone:
- setup_chapter1Handler();
+ setup_servingDinner();
break;
case kActionDefault:
@@ -319,7 +320,7 @@ IMPLEMENT_FUNCTION(12, Pascale, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Pascale, getMessageFromAugustToTyler)
+IMPLEMENT_FUNCTION(13, Pascale, greetAugust)
switch (savepoint.action) {
default:
break;
@@ -372,7 +373,7 @@ IMPLEMENT_FUNCTION(13, Pascale, getMessageFromAugustToTyler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Pascale, sitAnna)
+IMPLEMENT_FUNCTION(14, Pascale, seatAnna)
switch (savepoint.action) {
default:
break;
@@ -394,7 +395,7 @@ IMPLEMENT_FUNCTION(14, Pascale, sitAnna)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Pascale, welcomeAnna)
+IMPLEMENT_FUNCTION(15, Pascale, greetAnna)
switch (savepoint.action) {
default:
break;
@@ -416,7 +417,7 @@ IMPLEMENT_FUNCTION(15, Pascale, welcomeAnna)
getSound()->playSound(kEntityPascale, "ANN1047");
setCallback(2);
- setup_sitAnna();
+ setup_seatAnna();
break;
case 2:
@@ -439,7 +440,7 @@ IMPLEMENT_FUNCTION(15, Pascale, welcomeAnna)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Pascale, serveTatianaVassili)
+IMPLEMENT_FUNCTION(16, Pascale, greetTatiana)
switch (savepoint.action) {
default:
break;
@@ -492,7 +493,7 @@ IMPLEMENT_FUNCTION(16, Pascale, serveTatianaVassili)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Pascale, chapter1Handler)
+IMPLEMENT_FUNCTION(17, Pascale, servingDinner)
switch (savepoint.action) {
default:
break;
@@ -521,28 +522,28 @@ switch (savepoint.action) {
if (params->param1 && !params->param2 && getEntities()->isPlayerPosition(kCarRestaurant, 61)) {
setCallback(1);
- setup_function11();
+ setup_seatCath();
break;
}
label_callback1:
if (ENTITY_PARAM(0, 1) && !ENTITY_PARAM(1, 3)) {
setCallback(2);
- setup_getMessageFromAugustToTyler();
+ setup_greetAugust();
break;
}
label_callback2:
if (ENTITY_PARAM(0, 3)) {
setCallback(3);
- setup_serveTatianaVassili();
+ setup_greetTatiana();
break;
}
label_callback3:
if (ENTITY_PARAM(0, 2)) {
setCallback(4);
- setup_welcomeAnna();
+ setup_greetAnna();
break;
}
@@ -674,7 +675,7 @@ IMPLEMENT_FUNCTION(22, Pascale, chapter3Handler)
if (ENTITY_PARAM(0, 7)) {
setCallback(1);
- setup_function23();
+ setup_abbotSeatMe3();
break;
}
@@ -693,7 +694,7 @@ label_callback:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Pascale, function23)
+IMPLEMENT_FUNCTION(23, Pascale, abbotSeatMe3)
switch (savepoint.action) {
default:
break;
@@ -806,7 +807,7 @@ IMPLEMENT_FUNCTION(26, Pascale, chapter4Handler)
if (getEntities()->isSomebodyInsideRestaurantOrSalon()) {
if (ENTITY_PARAM(0, 8)) {
setCallback(1);
- setup_function27();
+ setup_meetCoudert();
break;
}
@@ -820,7 +821,7 @@ label_callback1:
if (params->param3 < getState()->time) {
params->param5 = kTimeInvalid;
setCallback(2);
- setup_messageFromAnna();
+ setup_tellAugust();
break;
}
@@ -830,7 +831,7 @@ label_callback1:
if (params->param5 < getState()->time) {
params->param5 = kTimeInvalid;
setCallback(2);
- setup_messageFromAnna();
+ setup_tellAugust();
break;
}
}
@@ -839,7 +840,7 @@ label_callback1:
label_callback2:
if (params->param1 && !params->param2 && getEntities()->isPlayerPosition(kCarRestaurant, 61)) {
setCallback(3);
- setup_function11();
+ setup_seatCath();
break;
}
}
@@ -906,7 +907,7 @@ label_callback3:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Pascale, function27)
+IMPLEMENT_FUNCTION(27, Pascale, meetCoudert)
switch (savepoint.action) {
default:
break;
@@ -920,7 +921,7 @@ IMPLEMENT_FUNCTION(27, Pascale, function27)
case kActionDefault:
setCallback(1);
- setup_function29();
+ setup_walkDownTrain();
break;
case kActionCallback:
@@ -941,7 +942,7 @@ IMPLEMENT_FUNCTION(27, Pascale, function27)
case 3:
setCallback(4);
- setup_function30();
+ setup_walkUpTrain();
break;
case 4:
@@ -959,7 +960,8 @@ IMPLEMENT_FUNCTION(27, Pascale, function27)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Pascale, messageFromAnna)
+IMPLEMENT_FUNCTION(28, Pascale, tellAugust)
+ // Tell August the message from Anna
switch (savepoint.action) {
default:
break;
@@ -1005,7 +1007,7 @@ IMPLEMENT_FUNCTION(28, Pascale, messageFromAnna)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(29, Pascale, function29)
+IMPLEMENT_FUNCTION(29, Pascale, walkDownTrain)
switch (savepoint.action) {
default:
break;
@@ -1043,7 +1045,7 @@ IMPLEMENT_FUNCTION(29, Pascale, function29)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(30, Pascale, function30)
+IMPLEMENT_FUNCTION(30, Pascale, walkUpTrain)
switch (savepoint.action) {
default:
break;
@@ -1104,11 +1106,11 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(32, Pascale, chapter5Handler)
if (savepoint.action == kActionProceedChapter5)
- setup_function33();
+ setup_hiding();
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(33, Pascale, function33)
+IMPLEMENT_FUNCTION(33, Pascale, hiding)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/pascale.h b/engines/lastexpress/entities/pascale.h
index 1b7777d..c8df758 100644
--- a/engines/lastexpress/entities/pascale.h
+++ b/engines/lastexpress/entities/pascale.h
@@ -88,22 +88,22 @@ public:
DECLARE_FUNCTION(welcomeSophieAndRebecca)
DECLARE_FUNCTION(sitSophieAndRebecca)
DECLARE_FUNCTION(welcomeCath)
- DECLARE_FUNCTION(function11)
+ DECLARE_FUNCTION(seatCath)
/**
* Setup Chapter 1
*/
DECLARE_FUNCTION(chapter1)
- DECLARE_FUNCTION(getMessageFromAugustToTyler)
- DECLARE_FUNCTION(sitAnna)
- DECLARE_FUNCTION(welcomeAnna)
- DECLARE_FUNCTION(serveTatianaVassili)
+ DECLARE_FUNCTION(greetAugust)
+ DECLARE_FUNCTION(seatAnna)
+ DECLARE_FUNCTION(greetAnna)
+ DECLARE_FUNCTION(greetTatiana)
/**
* Handle Chapter 1 events
*/
- DECLARE_FUNCTION(chapter1Handler)
+ DECLARE_FUNCTION(servingDinner)
DECLARE_FUNCTION(function18)
DECLARE_FUNCTION(function19)
@@ -123,7 +123,7 @@ public:
*/
DECLARE_FUNCTION(chapter3Handler)
- DECLARE_FUNCTION(function23)
+ DECLARE_FUNCTION(abbotSeatMe3)
DECLARE_FUNCTION(welcomeAbbot)
/**
@@ -136,10 +136,10 @@ public:
*/
DECLARE_FUNCTION(chapter4Handler)
- DECLARE_FUNCTION(function27)
- DECLARE_FUNCTION(messageFromAnna)
- DECLARE_FUNCTION(function29)
- DECLARE_FUNCTION(function30)
+ DECLARE_FUNCTION(meetCoudert)
+ DECLARE_FUNCTION(tellAugust)
+ DECLARE_FUNCTION(walkDownTrain)
+ DECLARE_FUNCTION(walkUpTrain)
/**
* Setup Chapter 5
@@ -151,7 +151,7 @@ public:
*/
DECLARE_FUNCTION(chapter5Handler)
- DECLARE_FUNCTION(function33)
+ DECLARE_FUNCTION(hiding)
DECLARE_NULL_FUNCTION()
};
Commit: 374ee55cfca5621ef96977b40254c89c28c8ff8f
https://github.com/scummvm/scummvm/commit/374ee55cfca5621ef96977b40254c89c28c8ff8f
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:19-04:00
Commit Message:
LASTEXPRESS: Rename Kahina functions
Changed paths:
engines/lastexpress/entities/chapters.cpp
engines/lastexpress/entities/kahina.cpp
engines/lastexpress/entities/kahina.h
engines/lastexpress/entities/kronos.cpp
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index 8628eab..341c55a 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -220,7 +220,7 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
getSavePoints()->push(kEntityChapters, kEntityVerges, kAction201431954);
RESET_ENTITY_STATE(kEntityKronos, Kronos, setup_function10);
- RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_function13);
+ RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_cathDone);
RESET_ENTITY_STATE(kEntityAnna, Anna, setup_asleep);
RESET_ENTITY_STATE(kEntityAugust, August, setup_function34);
RESET_ENTITY_STATE(kEntityTatiana, Tatiana, setup_function24);
@@ -270,7 +270,6 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
if (getSoundQueue()->isBuffered("ZFX1007B"))
getSoundQueue()->processEntry("ZFX1007B");
-
getSound()->playSound(kEntityPlayer, "MUS008", kFlagDefault);
getInventory()->unselectItem();
@@ -1754,7 +1753,6 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler)
}
IMPLEMENT_FUNCTION_END
-
//////////////////////////////////////////////////////////////////////////
// Private functions
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp
index b7af877..bbb2853 100644
--- a/engines/lastexpress/entities/kahina.cpp
+++ b/engines/lastexpress/entities/kahina.cpp
@@ -43,28 +43,28 @@ Kahina::Kahina(LastExpressEngine *engine) : Entity(engine, kEntityKahina) {
ADD_CALLBACK_FUNCTION(Kahina, savegame);
ADD_CALLBACK_FUNCTION(Kahina, updateFromTime);
ADD_CALLBACK_FUNCTION(Kahina, updateFromTicks);
- ADD_CALLBACK_FUNCTION(Kahina, function6);
+ ADD_CALLBACK_FUNCTION(Kahina, lookingForCath);
ADD_CALLBACK_FUNCTION(Kahina, updateEntity2);
ADD_CALLBACK_FUNCTION(Kahina, updateEntity);
ADD_CALLBACK_FUNCTION(Kahina, enterExitCompartment);
ADD_CALLBACK_FUNCTION(Kahina, chapter1);
ADD_CALLBACK_FUNCTION(Kahina, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Kahina, function12);
- ADD_CALLBACK_FUNCTION(Kahina, function13);
+ ADD_CALLBACK_FUNCTION(Kahina, awaitingCath);
+ ADD_CALLBACK_FUNCTION(Kahina, cathDone);
ADD_CALLBACK_FUNCTION(Kahina, function14);
- ADD_CALLBACK_FUNCTION(Kahina, function15);
+ ADD_CALLBACK_FUNCTION(Kahina, searchTrain);
ADD_CALLBACK_FUNCTION(Kahina, chapter2);
- ADD_CALLBACK_FUNCTION(Kahina, chapter2Handler);
+ ADD_CALLBACK_FUNCTION(Kahina, inSeclusionPart2);
ADD_CALLBACK_FUNCTION(Kahina, chapter3);
ADD_CALLBACK_FUNCTION(Kahina, function19);
- ADD_CALLBACK_FUNCTION(Kahina, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Kahina, function21);
- ADD_CALLBACK_FUNCTION(Kahina, function22);
- ADD_CALLBACK_FUNCTION(Kahina, function23);
- ADD_CALLBACK_FUNCTION(Kahina, function24);
- ADD_CALLBACK_FUNCTION(Kahina, function25);
- ADD_CALLBACK_FUNCTION(Kahina, function26);
- ADD_CALLBACK_FUNCTION(Kahina, function27);
+ ADD_CALLBACK_FUNCTION(Kahina, beforeConcert);
+ ADD_CALLBACK_FUNCTION(Kahina, concert);
+ ADD_CALLBACK_FUNCTION(Kahina, finished);
+ ADD_CALLBACK_FUNCTION(Kahina, findFirebird);
+ ADD_CALLBACK_FUNCTION(Kahina, seekCath);
+ ADD_CALLBACK_FUNCTION(Kahina, searchCath);
+ ADD_CALLBACK_FUNCTION(Kahina, searchTatiana);
+ ADD_CALLBACK_FUNCTION(Kahina, killCathAnywhere);
ADD_CALLBACK_FUNCTION(Kahina, chapter4);
ADD_CALLBACK_FUNCTION(Kahina, chapter5);
}
@@ -100,7 +100,7 @@ IMPLEMENT_FUNCTION_NOSETUP(5, Kahina, updateFromTicks)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_I(6, Kahina, function6, TimeValue)
+IMPLEMENT_FUNCTION_I(6, Kahina, lookingForCath, TimeValue)
switch (savepoint.action) {
default:
break;
@@ -270,17 +270,17 @@ IMPLEMENT_FUNCTION(11, Kahina, chapter1Handler)
Entity::timeCheckSavepoint(kTime1107000, params->param1, kEntityKahina, kEntityMertens, kAction238732837);
if (getProgress().eventMertensKronosInvitation)
- setup_function12();
+ setup_awaitingCath();
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Kahina, function12)
+IMPLEMENT_FUNCTION(12, Kahina, awaitingCath)
switch (savepoint.action) {
default:
break;
case kActionNone:
- Entity::timeCheck(kTime1485000, params->param2, WRAP_SETUP_FUNCTION(Kahina, setup_function13));
+ Entity::timeCheck(kTime1485000, params->param2, WRAP_SETUP_FUNCTION(Kahina, setup_cathDone));
break;
case kActionKnock:
@@ -316,13 +316,13 @@ IMPLEMENT_FUNCTION(12, Kahina, function12)
break;
case kAction137685712:
- setup_function13();
+ setup_cathDone();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(13, Kahina, function13)
+IMPLEMENT_FUNCTION(13, Kahina, cathDone)
switch (savepoint.action) {
default:
break;
@@ -347,7 +347,7 @@ IMPLEMENT_FUNCTION(13, Kahina, function13)
label_callback:
setCallback(1);
- setup_function15();
+ setup_searchTrain();
break;
case kActionDefault:
@@ -387,7 +387,7 @@ IMPLEMENT_FUNCTION(14, Kahina, function14)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Kahina, function15)
+IMPLEMENT_FUNCTION(15, Kahina, searchTrain)
switch (savepoint.action) {
default:
break;
@@ -554,7 +554,7 @@ IMPLEMENT_FUNCTION(16, Kahina, chapter2)
break;
case kActionNone:
- setup_chapter2Handler();
+ setup_inSeclusionPart2();
break;
case kActionDefault:
@@ -573,7 +573,7 @@ IMPLEMENT_FUNCTION(16, Kahina, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(17, Kahina, chapter2Handler)
+IMPLEMENT_FUNCTION(17, Kahina, inSeclusionPart2)
switch (savepoint.action) {
default:
break;
@@ -700,7 +700,7 @@ IMPLEMENT_FUNCTION(18, Kahina, chapter3)
break;
case kActionNone:
- setup_chapter3Handler();
+ setup_beforeConcert();
break;
case kActionDefault:
@@ -724,7 +724,7 @@ IMPLEMENT_FUNCTION_II(19, Kahina, function19, CarIndex, EntityPosition)
case kActionNone:
if (getEvent(kEventAnnaBaggageArgument)) {
- RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_function22);
+ RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_finished);
}
if (getEntities()->updateEntity(kEntityKahina, (CarIndex)params->param1, (EntityPosition)params->param2))
@@ -750,7 +750,7 @@ IMPLEMENT_FUNCTION_II(19, Kahina, function19, CarIndex, EntityPosition)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Kahina, chapter3Handler)
+IMPLEMENT_FUNCTION(20, Kahina, beforeConcert)
switch (savepoint.action) {
default:
break;
@@ -781,7 +781,7 @@ label_callback_2:
if (getEntities()->isInKronosSalon(kEntityPlayer))
getScenes()->loadSceneFromPosition(kCarKronos, 87);
- setup_function21();
+ setup_concert();
break;
}
@@ -917,7 +917,7 @@ label_callback_2:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(21, Kahina, function21)
+IMPLEMENT_FUNCTION(21, Kahina, concert)
switch (savepoint.action) {
default:
break;
@@ -930,7 +930,7 @@ IMPLEMENT_FUNCTION(21, Kahina, function21)
if (params->param6 != kTimeInvalid) {
if (Entity::updateParameterTime((TimeValue)params->param3, (getEntities()->isPlayerPosition(kCarKronos, 80) || getEntities()->isPlayerPosition(kCarKronos, 88)), params->param5, 0)) {
setCallback(2);
- setup_function23();
+ setup_findFirebird();
break;
}
}
@@ -961,10 +961,10 @@ label_callback_2:
if (location == kObjectLocation3 || location == kObjectLocation7) {
setCallback(3);
- setup_function25();
+ setup_searchCath();
} else if (location == kObjectLocation1 || location == kObjectLocation2) {
setCallback(4);
- setup_function26();
+ setup_searchTatiana();
}
}
break;
@@ -997,17 +997,17 @@ label_callback_2:
case kAction92186062:
if (params->param1) {
setCallback(1);
- setup_function23();
+ setup_findFirebird();
}
break;
case kAction134611040:
if (getEvent(kEventConcertLeaveWithBriefcase))
- setup_function24();
+ setup_seekCath();
break;
case kAction137503360:
- setup_function22();
+ setup_finished();
break;
case kAction237555748:
@@ -1017,7 +1017,7 @@ label_callback_2:
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(22, Kahina, function22)
+IMPLEMENT_FUNCTION(22, Kahina, finished)
switch (savepoint.action) {
default:
break;
@@ -1028,10 +1028,10 @@ IMPLEMENT_FUNCTION(22, Kahina, function22)
if (ENTITY_PARAM(0, 3) || location == kObjectLocation3 || location == kObjectLocation7) {
setCallback(1);
- setup_function25();
+ setup_searchCath();
} else if (location == kObjectLocation2 || location == kObjectLocation1) {
setCallback(2);
- setup_function26();
+ setup_searchTatiana();
}
}
break;
@@ -1050,7 +1050,7 @@ IMPLEMENT_FUNCTION(22, Kahina, function22)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(23, Kahina, function23)
+IMPLEMENT_FUNCTION(23, Kahina, findFirebird)
switch (savepoint.action) {
default:
break;
@@ -1133,7 +1133,7 @@ IMPLEMENT_FUNCTION(23, Kahina, function23)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(24, Kahina, function24)
+IMPLEMENT_FUNCTION(24, Kahina, seekCath)
switch (savepoint.action) {
default:
break;
@@ -1149,12 +1149,12 @@ IMPLEMENT_FUNCTION(24, Kahina, function24)
if (getEntities()->isInsideTrainCar(kEntityPlayer, kCarKronos))
getSavePoints()->push(kEntityKahina, kEntityKronos, kActionOpenDoor);
else
- setup_function27();
+ setup_killCathAnywhere();
break;
case kActionDefault:
setCallback(1);
- setup_function6(kTime2241000);
+ setup_lookingForCath(kTime2241000);
break;
case kActionCallback:
@@ -1170,12 +1170,12 @@ IMPLEMENT_FUNCTION(24, Kahina, function24)
getProgress().field_44 = 0;
- setup_function22();
+ setup_finished();
} else if (ENTITY_PARAM(0, 1)) {
setCallback(2);
setup_savegame(kSavegameTypeEvent, kEventKahinaGunYellow);
} else {
- setup_function27();
+ setup_killCathAnywhere();
}
break;
@@ -1205,13 +1205,13 @@ IMPLEMENT_FUNCTION(24, Kahina, function24)
getProgress().field_44 = 0;
- setup_function22();
+ setup_finished();
break;
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(25, Kahina, function25)
+IMPLEMENT_FUNCTION(25, Kahina, searchCath)
switch (savepoint.action) {
default:
break;
@@ -1369,7 +1369,7 @@ IMPLEMENT_FUNCTION(25, Kahina, function25)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Kahina, function26)
+IMPLEMENT_FUNCTION(26, Kahina, searchTatiana)
switch (savepoint.action) {
default:
break;
@@ -1470,7 +1470,7 @@ IMPLEMENT_FUNCTION(26, Kahina, function26)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Kahina, function27)
+IMPLEMENT_FUNCTION(27, Kahina, killCathAnywhere)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/kahina.h b/engines/lastexpress/entities/kahina.h
index ee9ccf5..15c446c 100644
--- a/engines/lastexpress/entities/kahina.h
+++ b/engines/lastexpress/entities/kahina.h
@@ -69,7 +69,7 @@ public:
*/
DECLARE_FUNCTION_NOSETUP(updateFromTicks)
- DECLARE_FUNCTION_1(function6, TimeValue timeValue)
+ DECLARE_FUNCTION_1(lookingForCath, TimeValue timeValue)
/**
* Updates the entity
@@ -105,20 +105,16 @@ public:
*/
DECLARE_FUNCTION(chapter1Handler)
- DECLARE_FUNCTION(function12)
- DECLARE_FUNCTION(function13)
+ DECLARE_FUNCTION(awaitingCath)
+ DECLARE_FUNCTION(cathDone)
DECLARE_FUNCTION(function14)
- DECLARE_FUNCTION(function15)
+ DECLARE_FUNCTION(searchTrain)
/**
* Setup Chapter 2
*/
DECLARE_FUNCTION(chapter2)
-
- /**
- * Handle Chapter 2 events
- */
- DECLARE_FUNCTION(chapter2Handler)
+ DECLARE_FUNCTION(inSeclusionPart2)
/**
* Setup Chapter 3
@@ -133,18 +129,14 @@ public:
*/
DECLARE_FUNCTION_2(function19, CarIndex car, EntityPosition entityPosition)
- /**
- * Handle Chapter 3 events
- */
- DECLARE_FUNCTION(chapter3Handler)
-
- DECLARE_FUNCTION(function21)
- DECLARE_FUNCTION(function22)
- DECLARE_FUNCTION(function23)
- DECLARE_FUNCTION(function24)
- DECLARE_FUNCTION(function25)
- DECLARE_FUNCTION(function26)
- DECLARE_FUNCTION(function27)
+ DECLARE_FUNCTION(beforeConcert)
+ DECLARE_FUNCTION(concert)
+ DECLARE_FUNCTION(finished)
+ DECLARE_FUNCTION(findFirebird)
+ DECLARE_FUNCTION(seekCath)
+ DECLARE_FUNCTION(searchCath)
+ DECLARE_FUNCTION(searchTatiana)
+ DECLARE_FUNCTION(killCathAnywhere)
/**
* Setup Chapter 4
diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp
index fd1eeee..1fe478f 100644
--- a/engines/lastexpress/entities/kronos.cpp
+++ b/engines/lastexpress/entities/kronos.cpp
@@ -668,7 +668,7 @@ IMPLEMENT_FUNCTION(20, Kronos, duringConcert)
getData()->entityPosition = kPosition_6000;
getAction()->playAnimation(kEventConcertLeaveWithBriefcase);
- RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_function21);
+ RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_concert);
getScenes()->loadSceneFromPosition(kCarKronos, 87);
break;
Commit: b4d7c1c15b5a0fa491c1bb093dfcc2e5ca6211ee
https://github.com/scummvm/scummvm/commit/b4d7c1c15b5a0fa491c1bb093dfcc2e5ca6211ee
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:20-04:00
Commit Message:
LASTEXPRESS: Rename Chapters and Gendarmes functions
Changed paths:
engines/lastexpress/entities/chapters.cpp
engines/lastexpress/entities/chapters.h
engines/lastexpress/entities/gendarmes.cpp
engines/lastexpress/entities/gendarmes.h
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index 341c55a..4972ff6 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -77,7 +77,7 @@ Chapters::Chapters(LastExpressEngine *engine) : Entity(engine, kEntityChapters)
ADD_CALLBACK_FUNCTION(Chapters, exitStation);
ADD_CALLBACK_FUNCTION(Chapters, chapter1);
ADD_CALLBACK_FUNCTION(Chapters, resetMainEntities);
- ADD_CALLBACK_FUNCTION(Chapters, chapter1End);
+ ADD_CALLBACK_FUNCTION(Chapters, firstDream);
ADD_CALLBACK_FUNCTION(Chapters, chapter1Init);
ADD_CALLBACK_FUNCTION(Chapters, chapter1Handler);
ADD_CALLBACK_FUNCTION(Chapters, chapter1Next);
@@ -154,7 +154,8 @@ IMPLEMENT_FUNCTION(5, Chapters, resetMainEntities)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
+IMPLEMENT_FUNCTION(6, Chapters, firstDream)
+ // Chapter 1 end
switch (savepoint.action) {
default:
break;
@@ -384,6 +385,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(8, Chapters, chapter1Handler)
+ // Moving at night
switch (savepoint.action) {
default:
break;
@@ -704,7 +706,7 @@ label_chapter1_next:
setup_chapter1Next();
} else {
setCallback(23);
- setup_chapter1End();
+ setup_firstDream();
}
break;
}
@@ -917,6 +919,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(15, Chapters, chapter3Handler)
+ // Moving during the afternoon
switch (savepoint.action) {
default:
break;
@@ -1077,6 +1080,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(16, Chapters, viennaEvents)
+ // End in Vienna
switch (savepoint.action) {
default:
break;
@@ -1224,6 +1228,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(19, Chapters, chapter4Handler)
+ // Moving during the second night
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/chapters.h b/engines/lastexpress/entities/chapters.h
index 39739aa..abc4648 100644
--- a/engines/lastexpress/entities/chapters.h
+++ b/engines/lastexpress/entities/chapters.h
@@ -70,7 +70,7 @@ public:
/**
* Handle end of Chapter 1 events
*/
- DECLARE_FUNCTION(chapter1End)
+ DECLARE_FUNCTION(firstDream)
/**
* Init Chapter 1 data
diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp
index 7b31c59..5ecf8ef 100644
--- a/engines/lastexpress/entities/gendarmes.cpp
+++ b/engines/lastexpress/entities/gendarmes.cpp
@@ -37,16 +37,16 @@ namespace LastExpress {
Gendarmes::Gendarmes(LastExpressEngine *engine) : Entity(engine, kEntityGendarmes) {
ADD_CALLBACK_FUNCTION(Gendarmes, reset);
ADD_CALLBACK_FUNCTION(Gendarmes, chapter1);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestDraw);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestPlaysound);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestPlaysound16);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestCallback);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doDraw);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doDialog);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doDialogFullVolume);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doWait);
ADD_CALLBACK_FUNCTION(Gendarmes, savegame);
- ADD_CALLBACK_FUNCTION(Gendarmes, arrestUpdateEntity);
- ADD_CALLBACK_FUNCTION(Gendarmes, function9);
- ADD_CALLBACK_FUNCTION(Gendarmes, function10);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doWalk);
+ ADD_CALLBACK_FUNCTION(Gendarmes, doCompartment);
+ ADD_CALLBACK_FUNCTION(Gendarmes, trappedCath);
ADD_CALLBACK_FUNCTION(Gendarmes, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Gendarmes, function12);
+ ADD_CALLBACK_FUNCTION(Gendarmes, searchTrain);
ADD_CALLBACK_FUNCTION(Gendarmes, function13);
ADD_CALLBACK_FUNCTION(Gendarmes, chapter2);
ADD_CALLBACK_FUNCTION(Gendarmes, chapter3);
@@ -76,23 +76,23 @@ IMPLEMENT_FUNCTION(2, Gendarmes, chapter1)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(3, Gendarmes, arrestDraw)
- arrest(savepoint);
+IMPLEMENT_FUNCTION_S(3, Gendarmes, doDraw)
+ handleAction(savepoint);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(4, Gendarmes, arrestPlaysound)
- arrest(savepoint, true);
+IMPLEMENT_FUNCTION_S(4, Gendarmes, doDialog)
+ handleAction(savepoint, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_S(5, Gendarmes, arrestPlaysound16)
- arrest(savepoint, true, kFlagDefault);
+IMPLEMENT_FUNCTION_S(5, Gendarmes, doDialogFullVolume)
+ handleAction(savepoint, true, kFlagDefault);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_I(6, Gendarmes, arrestCallback, uint32)
- arrest(savepoint, true, kFlagInvalid, true);
+IMPLEMENT_FUNCTION_I(6, Gendarmes, doWait, uint32)
+ handleAction(savepoint, true, kFlagInvalid, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
@@ -101,12 +101,12 @@ IMPLEMENT_FUNCTION_II(7, Gendarmes, savegame, SavegameType, uint32)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_II(8, Gendarmes, arrestUpdateEntity, CarIndex, EntityPosition)
- arrest(savepoint, true, kFlagInvalid, false, true);
+IMPLEMENT_FUNCTION_II(8, Gendarmes, doWalk, CarIndex, EntityPosition)
+ handleAction(savepoint, true, kFlagInvalid, false, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
+IMPLEMENT_FUNCTION_IISS(9, Gendarmes, doCompartment, CarIndex, EntityPosition)
EntityData::EntityParametersSSS *parameters1 = (EntityData::EntityParametersSSS*)_data->getCurrentParameters(1);
EntityData::EntityParametersISII *parameters2 = (EntityData::EntityParametersISII*)_data->getCurrentParameters(2);
@@ -178,13 +178,13 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
|| (params->param1 == kCarGreenSleeping && params->param2 == kPosition_8200 && getEntities()->isOutsideAlexeiWindow()))
&& !getEntities()->isInsideCompartment(kEntityPlayer, kCarRedSleeping, kPosition_7850)) {
setCallback(1);
- setup_function10((CarIndex)params->param1, (EntityPosition)params->param2, (ObjectIndex)parameters2->param5);
+ setup_trappedCath((CarIndex)params->param1, (EntityPosition)params->param2, (ObjectIndex)parameters2->param5);
} else {
getEntities()->drawSequenceLeft(kEntityGendarmes, (char *)¶meters1->seq1);
getEntities()->enterCompartment(kEntityGendarmes, (ObjectIndex)CURRENT_PARAM(2, 5));
setCallback(parameters2->param6 ? 2 : 3);
- setup_arrestPlaysound(parameters2->param6 ? "POL1044A" : "POL1044B");
+ setup_doDialog(parameters2->param6 ? "POL1044A" : "POL1044B");
}
break;
@@ -202,14 +202,14 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
getEntities()->drawSequenceLeft(kEntityGendarmes, (char *)¶meters1->seq2);
if (getEntities()->isNobodyInCompartment((CarIndex)params->param1, (EntityPosition)params->param2) || !strcmp(params->seq2, "NODIALOG")) {
setCallback(4);
- setup_arrestCallback(150);
+ setup_doWait(150);
} else {
char *arrestSound = (char *)¶meters2->seq;
strcpy(arrestSound, "POL1045");
strcat(arrestSound, (char *)¶ms->seq2);
setCallback(5);
- setup_arrestPlaysound(arrestSound);
+ setup_doDialog(arrestSound);
}
break;
@@ -226,7 +226,7 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
getData()->location = kLocationInsideCompartment;
setCallback(6);
- setup_arrestDraw((char *)¶meters1->seq3);
+ setup_doDraw((char *)¶meters1->seq3);
break;
case 6:
@@ -240,7 +240,7 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, ObjectIndex)
+IMPLEMENT_FUNCTION_III(10, Gendarmes, trappedCath, CarIndex, EntityPosition, ObjectIndex)
switch (savepoint.action) {
default:
break;
@@ -287,7 +287,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).status, kCursorNormal, kCursorNormal);
setCallback(5);
- setup_arrestPlaysound16("POL1046B");
+ setup_doDialogFullVolume("POL1046B");
break;
case kActionOpenDoor:
@@ -299,7 +299,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
getObjects()->update((ObjectIndex)params->param3, kEntityGendarmes, getObjects()->get((ObjectIndex)params->param3).status, kCursorNormal, kCursorNormal);
setCallback(1);
- setup_arrestPlaysound16("POL1046");
+ setup_doDialogFullVolume("POL1046");
break;
case kActionCallback:
@@ -351,12 +351,12 @@ IMPLEMENT_FUNCTION_END
IMPLEMENT_FUNCTION(11, Gendarmes, chapter1Handler)
if (savepoint.action == kAction169499649) {
getSavePoints()->push(kEntityGendarmes, kEntityMertens, kAction190082817);
- setup_function12();
+ setup_searchTrain();
}
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(12, Gendarmes, function12)
+IMPLEMENT_FUNCTION(12, Gendarmes, searchTrain)
switch (savepoint.action) {
default:
break;
@@ -369,7 +369,7 @@ IMPLEMENT_FUNCTION(12, Gendarmes, function12)
getProgress().field_14 = 29;
setCallback(1);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_5540);
+ setup_doWalk(kCarGreenSleeping, kPosition_5540);
break;
case kActionCallback:
@@ -379,42 +379,42 @@ IMPLEMENT_FUNCTION(12, Gendarmes, function12)
case 1:
setCallback(2);
- setup_function9(kCarGreenSleeping, kPosition_5790, "d", "A");
+ setup_doCompartment(kCarGreenSleeping, kPosition_5790, "d", "A");
break;
case 2:
setCallback(3);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_6220);
+ setup_doWalk(kCarGreenSleeping, kPosition_6220);
break;
case 3:
setCallback(4);
- setup_function9(kCarGreenSleeping, kPosition_6470, "c", "B");
+ setup_doCompartment(kCarGreenSleeping, kPosition_6470, "c", "B");
break;
case 4:
setCallback(5);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_7250);
+ setup_doWalk(kCarGreenSleeping, kPosition_7250);
break;
case 5:
setCallback(6);
- setup_function9(kCarGreenSleeping, kPosition_7500, "b", "C");
+ setup_doCompartment(kCarGreenSleeping, kPosition_7500, "b", "C");
break;
case 6:
setCallback(7);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_7950);
+ setup_doWalk(kCarGreenSleeping, kPosition_7950);
break;
case 7:
setCallback(8);
- setup_function9(kCarGreenSleeping, kPosition_8200, "a", "NODIALOG");
+ setup_doCompartment(kCarGreenSleeping, kPosition_8200, "a", "NODIALOG");
break;
case 8:
setCallback(9);
- setup_arrestUpdateEntity(kCarGreenSleeping, kPosition_9460);
+ setup_doWalk(kCarGreenSleeping, kPosition_9460);
break;
case 9:
@@ -427,77 +427,77 @@ IMPLEMENT_FUNCTION(12, Gendarmes, function12)
}
setCallback(10);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_2490);
+ setup_doWalk(kCarRedSleeping, kPosition_2490);
break;
case 10:
setCallback(11);
- setup_function9(kCarRedSleeping, kPosition_2740, "h", "NODIALOG");
+ setup_doCompartment(kCarRedSleeping, kPosition_2740, "h", "NODIALOG");
break;
case 11:
setCallback(12);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_3820);
+ setup_doWalk(kCarRedSleeping, kPosition_3820);
break;
case 12:
setCallback(13);
- setup_function9(kCarRedSleeping, kPosition_4070, "f", "E");
+ setup_doCompartment(kCarRedSleeping, kPosition_4070, "f", "E");
break;
case 13:
setCallback(14);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_4590);
+ setup_doWalk(kCarRedSleeping, kPosition_4590);
break;
case 14:
setCallback(15);
- setup_function9(kCarRedSleeping, kPosition_4840, "e", "F");
+ setup_doCompartment(kCarRedSleeping, kPosition_4840, "e", "F");
break;
case 15:
setCallback(16);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_5540);
+ setup_doWalk(kCarRedSleeping, kPosition_5540);
break;
case 16:
setCallback(17);
- setup_function9(kCarRedSleeping, kPosition_5790, "d", "G");
+ setup_doCompartment(kCarRedSleeping, kPosition_5790, "d", "G");
break;
case 17:
setCallback(18);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_6220);
+ setup_doWalk(kCarRedSleeping, kPosition_6220);
break;
case 18:
setCallback(19);
- setup_function9(kCarRedSleeping, kPosition_6470, "c", "H");
+ setup_doCompartment(kCarRedSleeping, kPosition_6470, "c", "H");
break;
case 19:
setCallback(20);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_7250);
+ setup_doWalk(kCarRedSleeping, kPosition_7250);
break;
case 20:
setCallback(21);
- setup_function9(kCarRedSleeping, kPosition_7500, "b", "J");
+ setup_doCompartment(kCarRedSleeping, kPosition_7500, "b", "J");
break;
case 21:
setCallback(22);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_7950);
+ setup_doWalk(kCarRedSleeping, kPosition_7950);
break;
case 22:
setCallback(23);
- setup_function9(kCarRedSleeping, kPosition_8200, "a", "NODIALOG");
+ setup_doCompartment(kCarRedSleeping, kPosition_8200, "a", "NODIALOG");
break;
case 23:
setCallback(24);
- setup_arrestUpdateEntity(kCarRedSleeping, kPosition_9460);
+ setup_doWalk(kCarRedSleeping, kPosition_9460);
break;
case 24:
@@ -544,7 +544,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
// Private functions
//////////////////////////////////////////////////////////////////////////
-void Gendarmes::arrest(const SavePoint &savepoint, bool shouldPlaySound, SoundFlag flag, bool checkCallback, bool shouldUpdateEntity) {
+void Gendarmes::handleAction(const SavePoint &savepoint, bool shouldPlaySound, SoundFlag flag, bool checkCallback, bool shouldUpdateEntity) {
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/gendarmes.h b/engines/lastexpress/entities/gendarmes.h
index 8475c50..1cde626 100644
--- a/engines/lastexpress/entities/gendarmes.h
+++ b/engines/lastexpress/entities/gendarmes.h
@@ -46,10 +46,10 @@ public:
*/
DECLARE_FUNCTION(chapter1)
- DECLARE_FUNCTION_1(arrestDraw, const char *sequence)
- DECLARE_FUNCTION_1(arrestPlaysound, const char *soundName)
- DECLARE_FUNCTION_1(arrestPlaysound16, const char *soundName)
- DECLARE_FUNCTION_1(arrestCallback, uint32 timeValue)
+ DECLARE_FUNCTION_1(doDraw, const char *sequence)
+ DECLARE_FUNCTION_1(doDialog, const char *soundName)
+ DECLARE_FUNCTION_1(doDialogFullVolume, const char *soundName)
+ DECLARE_FUNCTION_1(doWait, uint32 timeValue)
/**
* Saves the game
@@ -59,11 +59,11 @@ public:
*/
DECLARE_FUNCTION_2(savegame, SavegameType savegameType, uint32 param)
- DECLARE_FUNCTION_2(arrestUpdateEntity, CarIndex car, EntityPosition entityPosition)
- DECLARE_FUNCTION_4(function9, CarIndex car, EntityPosition entityPosition, const char *sequence1, const char *sequence2)
- DECLARE_FUNCTION_3(function10, CarIndex car, EntityPosition entityPosition, ObjectIndex object)
+ DECLARE_FUNCTION_2(doWalk, CarIndex car, EntityPosition entityPosition)
+ DECLARE_FUNCTION_4(doCompartment, CarIndex car, EntityPosition entityPosition, const char *sequence1, const char *sequence2)
+ DECLARE_FUNCTION_3(trappedCath, CarIndex car, EntityPosition entityPosition, ObjectIndex object)
DECLARE_FUNCTION(chapter1Handler)
- DECLARE_FUNCTION(function12)
+ DECLARE_FUNCTION(searchTrain)
DECLARE_FUNCTION(function13)
/**
@@ -87,7 +87,7 @@ public:
DECLARE_FUNCTION(chapter5)
private:
- void arrest(const SavePoint &savepoint, bool playSound = false, SoundFlag flag = kFlagInvalid, bool checkCallback = false, bool shouldUpdateEntity = false);
+ void handleAction(const SavePoint &savepoint, bool playSound = false, SoundFlag flag = kFlagInvalid, bool checkCallback = false, bool shouldUpdateEntity = false);
};
} // End of namespace LastExpress
Commit: 9e1c0f14a8c1db3b631f4ab82be15ff9339ecd01
https://github.com/scummvm/scummvm/commit/9e1c0f14a8c1db3b631f4ab82be15ff9339ecd01
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:21-04:00
Commit Message:
LASTEXPRESS: Rename Max functions
Changed paths:
engines/lastexpress/entities/chapters.cpp
engines/lastexpress/entities/max.cpp
engines/lastexpress/entities/max.h
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index 4972ff6..f1a7d02 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -1539,7 +1539,7 @@ label_callback_4:
RESET_ENTITY_STATE(kEntityYasmin, Yasmin, setup_function17);
RESET_ENTITY_STATE(kEntityHadija, Hadija, setup_function19);
RESET_ENTITY_STATE(kEntityAlouan, Alouan, setup_function19);
- RESET_ENTITY_STATE(kEntityMax, Max, setup_chapter4Handler);
+ RESET_ENTITY_STATE(kEntityMax, Max, setup_inCageFriendly);
getSavePoints()->push(kEntityChapters, kEntityAnna, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityMertens, kAction201431954);
getSavePoints()->push(kEntityChapters, kEntityCoudert, kAction201431954);
diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp
index 1056e7f..d75b6af 100644
--- a/engines/lastexpress/entities/max.cpp
+++ b/engines/lastexpress/entities/max.cpp
@@ -42,16 +42,16 @@ Max::Max(LastExpressEngine *engine) : Entity(engine, kEntityMax) {
ADD_CALLBACK_FUNCTION(Max, draw);
ADD_CALLBACK_FUNCTION(Max, enterExitCompartment);
ADD_CALLBACK_FUNCTION(Max, savegame);
- ADD_CALLBACK_FUNCTION(Max, chapter12_handler);
- ADD_CALLBACK_FUNCTION(Max, function7);
- ADD_CALLBACK_FUNCTION(Max, chapter4Handler);
+ ADD_CALLBACK_FUNCTION(Max, withAnna);
+ ADD_CALLBACK_FUNCTION(Max, guardingCompartment);
+ ADD_CALLBACK_FUNCTION(Max, inCageFriendly);
ADD_CALLBACK_FUNCTION(Max, function9);
ADD_CALLBACK_FUNCTION(Max, chapter1);
ADD_CALLBACK_FUNCTION(Max, chapter2);
ADD_CALLBACK_FUNCTION(Max, chapter3);
ADD_CALLBACK_FUNCTION(Max, chapter3Handler);
- ADD_CALLBACK_FUNCTION(Max, freeFromCage);
- ADD_CALLBACK_FUNCTION(Max, function15);
+ ADD_CALLBACK_FUNCTION(Max, inCageMad);
+ ADD_CALLBACK_FUNCTION(Max, letMeIn);
ADD_CALLBACK_FUNCTION(Max, chapter4);
ADD_CALLBACK_FUNCTION(Max, function17);
ADD_CALLBACK_FUNCTION(Max, chapter5);
@@ -83,7 +83,7 @@ IMPLEMENT_FUNCTION_II(5, Max, savegame, SavegameType, uint32)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(6, Max, chapter12_handler)
+IMPLEMENT_FUNCTION(6, Max, withAnna)
switch (savepoint.action) {
default:
break;
@@ -105,7 +105,7 @@ IMPLEMENT_FUNCTION(6, Max, chapter12_handler)
case kAction71277948:
setCallback(1);
- setup_function7();
+ setup_guardingCompartment();
break;
case kAction158007856:
@@ -118,7 +118,7 @@ IMPLEMENT_FUNCTION(6, Max, chapter12_handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(7, Max, function7)
+IMPLEMENT_FUNCTION(7, Max, guardingCompartment)
switch (savepoint.action) {
default:
break;
@@ -208,7 +208,7 @@ IMPLEMENT_FUNCTION(7, Max, function7)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(8, Max, chapter4Handler)
+IMPLEMENT_FUNCTION(8, Max, inCageFriendly)
switch (savepoint.action) {
default:
break;
@@ -296,7 +296,7 @@ IMPLEMENT_FUNCTION(9, Max, function9)
setup_functions:
if (getProgress().chapter == kChapter3)
- setup_function15();
+ setup_letMeIn();
if (getProgress().chapter == kChapter4)
setup_function17();
@@ -324,7 +324,7 @@ IMPLEMENT_FUNCTION(10, Max, chapter1)
break;
case kActionNone:
- Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Max, setup_chapter12_handler));
+ Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Max, setup_withAnna));
break;
case kActionDefault:
@@ -343,7 +343,7 @@ IMPLEMENT_FUNCTION(11, Max, chapter2)
break;
case kActionNone:
- setup_chapter12_handler();
+ setup_withAnna();
break;
case kActionDefault:
@@ -413,7 +413,7 @@ IMPLEMENT_FUNCTION(13, Max, chapter3Handler)
case kAction71277948:
setCallback(1);
- setup_function7();
+ setup_guardingCompartment();
break;
case kAction122358304:
@@ -421,7 +421,7 @@ IMPLEMENT_FUNCTION(13, Max, chapter3Handler)
break;
case kActionMaxFreeFromCage:
- setup_freeFromCage();
+ setup_inCageMad();
break;
case kAction158007856:
@@ -437,7 +437,7 @@ IMPLEMENT_FUNCTION(13, Max, chapter3Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(14, Max, freeFromCage)
+IMPLEMENT_FUNCTION(14, Max, inCageMad)
switch (savepoint.action) {
default:
break;
@@ -504,7 +504,7 @@ IMPLEMENT_FUNCTION(14, Max, freeFromCage)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(15, Max, function15)
+IMPLEMENT_FUNCTION(15, Max, letMeIn)
switch (savepoint.action) {
default:
break;
@@ -551,7 +551,7 @@ IMPLEMENT_FUNCTION(15, Max, function15)
case kActionMaxFreeFromCage:
getEntities()->exitCompartment(kEntityMax, kObjectCompartmentF, true);
- setup_chapter4Handler();
+ setup_inCageFriendly();
break;
}
IMPLEMENT_FUNCTION_END
@@ -563,7 +563,7 @@ IMPLEMENT_FUNCTION(16, Max, chapter4)
break;
case kActionNone:
- setup_chapter4Handler();
+ setup_inCageFriendly();
break;
case kActionDefault:
@@ -606,7 +606,7 @@ IMPLEMENT_FUNCTION(17, Max, function17)
case kActionMaxFreeFromCage:
getEntities()->exitCompartment(kEntityMax, kObjectCompartmentF, true);
- setup_chapter4Handler();
+ setup_inCageFriendly();
break;
}
IMPLEMENT_FUNCTION_END
diff --git a/engines/lastexpress/entities/max.h b/engines/lastexpress/entities/max.h
index 7b77807..e12b4b6 100644
--- a/engines/lastexpress/entities/max.h
+++ b/engines/lastexpress/entities/max.h
@@ -70,18 +70,9 @@ public:
*/
DECLARE_FUNCTION_2(savegame, SavegameType savegameType, uint32 param)
- /**
- * Handle Chapter 1 & 2 events
- */
- DECLARE_FUNCTION(chapter12_handler)
-
- DECLARE_FUNCTION(function7)
-
- /**
- * Handle Chapter 4 events
- */
- DECLARE_FUNCTION(chapter4Handler)
-
+ DECLARE_FUNCTION(withAnna)
+ DECLARE_FUNCTION(guardingCompartment)
+ DECLARE_FUNCTION(inCageFriendly)
DECLARE_FUNCTION(function9)
/**
@@ -104,8 +95,8 @@ public:
*/
DECLARE_FUNCTION(chapter3Handler)
- DECLARE_FUNCTION(freeFromCage)
- DECLARE_FUNCTION(function15)
+ DECLARE_FUNCTION(inCageMad)
+ DECLARE_FUNCTION(letMeIn)
/**
* Setup Chapter 4
Commit: cbb7c71c89392462ee747027994bbce7217f27d3
https://github.com/scummvm/scummvm/commit/cbb7c71c89392462ee747027994bbce7217f27d3
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:22-04:00
Commit Message:
LASTEXPRESS: Add asserts in EntityData serialization code. CID 1003265
Changed paths:
engines/lastexpress/entities/entity.cpp
diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp
index 07e82d2..170248d 100644
--- a/engines/lastexpress/entities/entity.cpp
+++ b/engines/lastexpress/entities/entity.cpp
@@ -51,6 +51,9 @@ EntityData::EntityCallData::~EntityCallData() {
}
void EntityData::EntityCallData::syncString(Common::Serializer &s, Common::String &string, uint length) const {
+ assert(length <= 13);
+ assert(string.size() <= 13);
+
char seqName[13];
memset(&seqName, 0, length);
@@ -972,5 +975,4 @@ bool Entity::timeCheckPlaySoundUpdatePosition(TimeValue timeValue, uint ¶met
return false;
}
-
} // End of namespace LastExpress
Commit: 71a703d8bb09cd6e520c40d8db1576687e888292
https://github.com/scummvm/scummvm/commit/71a703d8bb09cd6e520c40d8db1576687e888292
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:23-04:00
Commit Message:
LASTEXPRESS: Update SavePoint::push/call interface and check for string size. CID 1003261, 1003262
Changed paths:
engines/lastexpress/game/action.cpp
engines/lastexpress/game/savepoint.cpp
engines/lastexpress/game/savepoint.h
diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp
index 986c56c..96b97db 100644
--- a/engines/lastexpress/game/action.cpp
+++ b/engines/lastexpress/game/action.cpp
@@ -1456,7 +1456,7 @@ IMPLEMENT_ACTION(playMusicChapterSetupTrain)
if (!getSoundQueue()->isBuffered(filename) && hotspot.param3 & id) {
getSound()->playSound(kEntityPlayer, filename, kFlagDefault);
- getSavePoints()->call(kEntityPlayer, kEntityTrain, kAction203863200, filename.c_str());
+ getSavePoints()->call(kEntityPlayer, kEntityTrain, kAction203863200, filename);
getSavePoints()->push(kEntityPlayer, kEntityTrain, kAction222746496, hotspot.param2);
}
diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp
index b0186a4..a8483e6 100644
--- a/engines/lastexpress/game/savepoint.cpp
+++ b/engines/lastexpress/game/savepoint.cpp
@@ -28,7 +28,6 @@
#include "lastexpress/lastexpress.h"
-
namespace LastExpress {
SavePoints::SavePoints(LastExpressEngine *engine) : _engine(engine) {
@@ -57,7 +56,7 @@ void SavePoints::push(EntityIndex entity2, EntityIndex entity1, ActionIndex acti
_savepoints.push_back(point);
}
-void SavePoints::push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const char *param) {
+void SavePoints::push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const Common::String param) {
if (_savepoints.size() >= _savePointsMaxSize)
return;
@@ -65,7 +64,9 @@ void SavePoints::push(EntityIndex entity2, EntityIndex entity1, ActionIndex acti
point.entity1 = entity1;
point.action = action;
point.entity2 = entity2;
- strcpy((char *)&point.param.charValue, param);
+
+ assert(param.size() <= 5);
+ strncpy((char *)&point.param.charValue, param.c_str(), 5);
_savepoints.push_back(point);
}
@@ -76,7 +77,6 @@ SavePoint SavePoints::pop() {
return point;
}
-
void SavePoints::pushAll(EntityIndex entity, ActionIndex action, uint32 param) {
for (uint32 index = 1; index < 40; index++) {
if ((EntityIndex)index != entity)
@@ -156,16 +156,18 @@ void SavePoints::call(EntityIndex entity2, EntityIndex entity1, ActionIndex acti
}
}
-void SavePoints::call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const char *param) const {
+void SavePoints::call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const Common::String param) const {
SavePoint point;
point.entity1 = entity1;
point.action = action;
point.entity2 = entity2;
- strcpy((char *)&point.param.charValue, param);
+
+ assert(param.size() <= 5);
+ strncpy((char *)&point.param.charValue, param.c_str(), 5);
Callback *callback = getCallback(entity1);
if (callback != NULL && callback->isValid()) {
- debugC(8, kLastExpressDebugLogic, "Savepoint: entity1=%s, action=%s, entity2=%s, param=%s", ENTITY_NAME(entity1), ACTION_NAME(action), ENTITY_NAME(entity2), param);
+ debugC(8, kLastExpressDebugLogic, "Savepoint: entity1=%s, action=%s, entity2=%s, param=%s", ENTITY_NAME(entity1), ACTION_NAME(action), ENTITY_NAME(entity2), param.c_str());
(*callback)(point);
}
}
diff --git a/engines/lastexpress/game/savepoint.h b/engines/lastexpress/game/savepoint.h
index 068c54e..ab64907 100644
--- a/engines/lastexpress/game/savepoint.h
+++ b/engines/lastexpress/game/savepoint.h
@@ -101,7 +101,7 @@ public:
// Savepoints
void push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, uint32 param = 0);
- void push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const char *param);
+ void push(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const Common::String param);
void pushAll(EntityIndex entity, ActionIndex action, uint32 param = 0);
void process();
void reset();
@@ -113,7 +113,7 @@ public:
void setCallback(EntityIndex index, Callback *callback);
Callback *getCallback(EntityIndex entity) const;
void call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, uint32 param = 0) const;
- void call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const char *param) const;
+ void call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const Common::String param) const;
void callAndProcess();
// Serializable
Commit: 5aad09213ba5392d5065a04f1547e359e39457a8
https://github.com/scummvm/scummvm/commit/5aad09213ba5392d5065a04f1547e359e39457a8
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:24-04:00
Commit Message:
LASTEXPRESS: Replace useless checks by asserts. CID 1004086, 1004090
Changed paths:
engines/lastexpress/game/entities.cpp
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp
index 26a8288..b881d34 100644
--- a/engines/lastexpress/game/entities.cpp
+++ b/engines/lastexpress/game/entities.cpp
@@ -389,7 +389,6 @@ void Entities::resetState(EntityIndex entityIndex) {
getLogic()->updateCursor();
}
-
void Entities::updateFields() const {
if (!getFlags()->isGameRunning)
return;
@@ -897,7 +896,6 @@ void Entities::computeCurrentFrame(EntityIndex entityIndex) const {
}
break;
-
case kDirectionLeft:
if (data->currentFrame == -1 || data->currentFrame >= (int32)data->sequence->count()) {
data->currentFrame = 0;
@@ -1772,8 +1770,7 @@ void Entities::enterCompartment(EntityIndex entity, ObjectIndex compartment, boo
// Update compartments
int index = (compartment < 32 ? compartment - 1 : compartment - 24);
- if (index >= 16)
- error("[Entities::enterCompartment] Invalid compartment index");
+ assert(index < 16);
if (useCompartment1)
_compartments1[index] |= STORE_VALUE(entity);
@@ -1858,8 +1855,7 @@ void Entities::exitCompartment(EntityIndex entity, ObjectIndex compartment, bool
// Update compartments
int index = (compartment < 32 ? compartment - 1 : compartment - 24);
- if (index >= 16)
- error("[Entities::exitCompartment] Invalid compartment index");
+ assert(index < 16);
if (useCompartment1)
_compartments1[index] &= ~STORE_VALUE(entity);
Commit: 771cae50e4e1960fd76311fbb79971b999ec0332
https://github.com/scummvm/scummvm/commit/771cae50e4e1960fd76311fbb79971b999ec0332
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:25-04:00
Commit Message:
LASTEXPRESS: Check that the archive is loaded correctly in debug code. CID 1003848, 1003849
Changed paths:
engines/lastexpress/debug.cpp
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 57943f9..a6cecc7 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -653,7 +653,6 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) {
// Make sure we are not called in a loop
_numParams = 0;
-
// Check if we got a nis filename or an animation index
if (name.contains('.')) {
Animation animation;
@@ -796,7 +795,10 @@ bool Debugger::cmdFight(int argc, const char **argv) {
break;
}
- loadArchive(index);
+ if (!loadArchive(index)) {
+ debugPrintf("Error: failed to load archive %d\n", index);
+ return true;
+ }
// Store command
if (!hasCommand()) {
@@ -854,7 +856,10 @@ error:
bool Debugger::cmdBeetle(int argc, const char **argv) {
if (argc == 1) {
// Load proper data file (beetle game in in Cd2)
- loadArchive(kArchiveCd2);
+ if (!loadArchive(kArchiveCd2)) {
+ debugPrintf("Error: failed to load archive 2");
+ return true;
+ }
// Store command
if (!hasCommand()) {
@@ -924,7 +929,6 @@ bool Debugger::cmdBeetle(int argc, const char **argv) {
break;
}
-
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONUP:
// Update coordinates
Commit: 4f78d1faec9838e5523292b1db39500b24d45059
https://github.com/scummvm/scummvm/commit/4f78d1faec9838e5523292b1db39500b24d45059
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:27-04:00
Commit Message:
LASTEXPRESS: Add asserts in sound entry serialization and update code. CID 1003259, 1003260
Changed paths:
engines/lastexpress/sound/entry.cpp
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp
index 6bf1ebc..f2967fd 100644
--- a/engines/lastexpress/sound/entry.cpp
+++ b/engines/lastexpress/sound/entry.cpp
@@ -33,7 +33,6 @@
#include "lastexpress/lastexpress.h"
#include "lastexpress/resource.h"
-
namespace LastExpress {
#define SOUNDCACHE_ENTRY_SIZE 92160
@@ -267,6 +266,8 @@ void SoundEntry::update(uint val) {
}
bool SoundEntry::updateSound() {
+ assert(_name2.size() <= 16);
+
bool result;
char sub[16];
@@ -279,6 +280,7 @@ bool SoundEntry::updateSound() {
_status.status &= ~0x8000;
strcpy(sub, _name2.c_str());
+ // FIXME: Rewrite and document expected behavior
int l = strlen(sub) + 1;
if (l - 1 > 4)
sub[l - (1 + 4)] = 0;
@@ -361,6 +363,9 @@ void SoundEntry::showSubtitle(Common::String filename) {
}
void SoundEntry::saveLoadWithSerializer(Common::Serializer &s) {
+ assert(_name1.size() <= 16);
+ assert(_name2.size() <= 16);
+
if (_name2.matchString("NISSND?") && (_status.status & kFlagType7) != kFlag3) {
s.syncAsUint32LE(_status.status);
s.syncAsUint32LE(_type);
Commit: 0a4cf53df14296fedeb6e3db0b3f53192a43a14a
https://github.com/scummvm/scummvm/commit/0a4cf53df14296fedeb6e3db0b3f53192a43a14a
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:28-04:00
Commit Message:
LASTEXPRESS: Fix comparison in sound entry serialization. CID 1004148
Changed paths:
engines/lastexpress/sound/entry.cpp
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp
index f2967fd..697e6e1 100644
--- a/engines/lastexpress/sound/entry.cpp
+++ b/engines/lastexpress/sound/entry.cpp
@@ -366,7 +366,7 @@ void SoundEntry::saveLoadWithSerializer(Common::Serializer &s) {
assert(_name1.size() <= 16);
assert(_name2.size() <= 16);
- if (_name2.matchString("NISSND?") && (_status.status & kFlagType7) != kFlag3) {
+ if (_name2.matchString("NISSND?") && (_status.status & kFlagType9) != kFlag3) {
s.syncAsUint32LE(_status.status);
s.syncAsUint32LE(_type);
s.syncAsUint32LE(_blockCount); // field_8;
Commit: cf360e6721c469964458fef8ddf733560f0838da
https://github.com/scummvm/scummvm/commit/cf360e6721c469964458fef8ddf733560f0838da
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:29-04:00
Commit Message:
LASTEXPRESS: Rename Ivo functions
Changed paths:
engines/lastexpress/entities/ivo.cpp
engines/lastexpress/entities/ivo.h
diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp
index cf18f43..12a23e7d 100644
--- a/engines/lastexpress/entities/ivo.cpp
+++ b/engines/lastexpress/entities/ivo.cpp
@@ -47,29 +47,29 @@ Ivo::Ivo(LastExpressEngine *engine) : Entity(engine, kEntityIvo) {
ADD_CALLBACK_FUNCTION(Ivo, playSound);
ADD_CALLBACK_FUNCTION(Ivo, callbackActionRestaurantOrSalon);
ADD_CALLBACK_FUNCTION(Ivo, savegame);
- ADD_CALLBACK_FUNCTION(Ivo, function11);
+ ADD_CALLBACK_FUNCTION(Ivo, goCompartment);
ADD_CALLBACK_FUNCTION(Ivo, sitAtTableWithSalko);
ADD_CALLBACK_FUNCTION(Ivo, leaveTableWithSalko);
ADD_CALLBACK_FUNCTION(Ivo, chapter1);
ADD_CALLBACK_FUNCTION(Ivo, chapter1Handler);
- ADD_CALLBACK_FUNCTION(Ivo, function16);
+ ADD_CALLBACK_FUNCTION(Ivo, inCompartment);
ADD_CALLBACK_FUNCTION(Ivo, function17);
ADD_CALLBACK_FUNCTION(Ivo, chapter2);
- ADD_CALLBACK_FUNCTION(Ivo, function19);
- ADD_CALLBACK_FUNCTION(Ivo, function20);
+ ADD_CALLBACK_FUNCTION(Ivo, goBreakfast);
+ ADD_CALLBACK_FUNCTION(Ivo, atBreakfast);
ADD_CALLBACK_FUNCTION(Ivo, function21);
ADD_CALLBACK_FUNCTION(Ivo, chapter3);
ADD_CALLBACK_FUNCTION(Ivo, chapter3Handler);
ADD_CALLBACK_FUNCTION(Ivo, chapter4);
ADD_CALLBACK_FUNCTION(Ivo, chapter4Handler);
- ADD_CALLBACK_FUNCTION(Ivo, function26);
- ADD_CALLBACK_FUNCTION(Ivo, function27);
- ADD_CALLBACK_FUNCTION(Ivo, function28);
+ ADD_CALLBACK_FUNCTION(Ivo, returnCompartment4);
+ ADD_CALLBACK_FUNCTION(Ivo, inCompartment4);
+ ADD_CALLBACK_FUNCTION(Ivo, hiding);
ADD_CALLBACK_FUNCTION(Ivo, function29);
ADD_CALLBACK_FUNCTION(Ivo, chapter5);
ADD_CALLBACK_FUNCTION(Ivo, chapter5Handler);
- ADD_CALLBACK_FUNCTION(Ivo, fight);
- ADD_CALLBACK_FUNCTION(Ivo, function33);
+ ADD_CALLBACK_FUNCTION(Ivo, fightCath);
+ ADD_CALLBACK_FUNCTION(Ivo, knockedOut);
ADD_CALLBACK_FUNCTION(Ivo, function34);
}
@@ -129,7 +129,7 @@ IMPLEMENT_FUNCTION_II(10, Ivo, savegame, SavegameType, uint32)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(11, Ivo, function11)
+IMPLEMENT_FUNCTION(11, Ivo, goCompartment)
switch (savepoint.action) {
default:
break;
@@ -279,12 +279,12 @@ IMPLEMENT_FUNCTION(15, Ivo, chapter1Handler)
case 1:
setCallback(2);
- setup_function11();
+ setup_goCompartment();
break;
case 2:
getSavePoints()->push(kEntityIvo, kEntityMilos, kAction135024800);
- setup_function16();
+ setup_inCompartment();
break;
}
break;
@@ -297,7 +297,7 @@ IMPLEMENT_FUNCTION(15, Ivo, chapter1Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(16, Ivo, function16)
+IMPLEMENT_FUNCTION(16, Ivo, inCompartment)
switch (savepoint.action) {
default:
break;
@@ -371,7 +371,7 @@ IMPLEMENT_FUNCTION(18, Ivo, chapter2)
break;
case kActionNone:
- Entity::timeCheck(kTime1777500, params->param1, WRAP_SETUP_FUNCTION(Ivo, setup_function19));
+ Entity::timeCheck(kTime1777500, params->param1, WRAP_SETUP_FUNCTION(Ivo, setup_goBreakfast));
break;
case kActionDefault:
@@ -391,7 +391,7 @@ IMPLEMENT_FUNCTION(18, Ivo, chapter2)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(19, Ivo, function19)
+IMPLEMENT_FUNCTION(19, Ivo, goBreakfast)
switch (savepoint.action) {
default:
break;
@@ -434,7 +434,7 @@ IMPLEMENT_FUNCTION(19, Ivo, function19)
case 5:
getData()->location = kLocationInsideCompartment;
- setup_function20();
+ setup_atBreakfast();
break;
}
break;
@@ -447,7 +447,7 @@ IMPLEMENT_FUNCTION(19, Ivo, function19)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(20, Ivo, function20)
+IMPLEMENT_FUNCTION(20, Ivo, atBreakfast)
switch (savepoint.action) {
default:
break;
@@ -481,7 +481,7 @@ IMPLEMENT_FUNCTION(20, Ivo, function20)
case 2:
setCallback(3);
- setup_function11();
+ setup_goCompartment();
break;
case 3:
@@ -567,7 +567,7 @@ IMPLEMENT_FUNCTION(25, Ivo, chapter4Handler)
case kActionNone:
if (getState()->time > kTime2361600 && getEntities()->isSomebodyInsideRestaurantOrSalon()) {
getData()->location = kLocationOutsideCompartment;
- setup_function26();
+ setup_returnCompartment4();
}
break;
@@ -579,7 +579,7 @@ IMPLEMENT_FUNCTION(25, Ivo, chapter4Handler)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(26, Ivo, function26)
+IMPLEMENT_FUNCTION(26, Ivo, returnCompartment4)
switch (savepoint.action) {
default:
break;
@@ -596,11 +596,11 @@ IMPLEMENT_FUNCTION(26, Ivo, function26)
case 1:
setCallback(2);
- setup_function11();
+ setup_goCompartment();
break;
case 2:
- setup_function27();
+ setup_inCompartment4();
break;
}
break;
@@ -608,7 +608,7 @@ IMPLEMENT_FUNCTION(26, Ivo, function26)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(27, Ivo, function27)
+IMPLEMENT_FUNCTION(27, Ivo, inCompartment4)
switch (savepoint.action) {
default:
break;
@@ -634,7 +634,7 @@ IMPLEMENT_FUNCTION(27, Ivo, function27)
case 2:
getEntities()->clearSequences(kEntityIvo);
- setup_function28();
+ setup_hiding();
break;
case 3:
@@ -676,7 +676,7 @@ IMPLEMENT_FUNCTION(27, Ivo, function27)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(28, Ivo, function28)
+IMPLEMENT_FUNCTION(28, Ivo, hiding)
switch (savepoint.action) {
default:
break;
@@ -745,11 +745,11 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(31, Ivo, chapter5Handler)
if (savepoint.action == kActionProceedChapter5)
- setup_fight();
+ setup_fightCath();
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(32, Ivo, fight)
+IMPLEMENT_FUNCTION(32, Ivo, fightCath)
switch (savepoint.action) {
default:
break;
@@ -783,7 +783,7 @@ IMPLEMENT_FUNCTION(32, Ivo, fight)
getLogic()->gameOver(kSavegameTypeIndex, 0, kSceneNone, true);
} else {
getScenes()->loadSceneFromPosition(kCarBaggageRear, 96);
- setup_function33();
+ setup_knockedOut();
}
break;
}
@@ -792,7 +792,7 @@ IMPLEMENT_FUNCTION(32, Ivo, fight)
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
-IMPLEMENT_FUNCTION(33, Ivo, function33)
+IMPLEMENT_FUNCTION(33, Ivo, knockedOut)
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/ivo.h b/engines/lastexpress/entities/ivo.h
index a23d06c..3646bc1 100644
--- a/engines/lastexpress/entities/ivo.h
+++ b/engines/lastexpress/entities/ivo.h
@@ -102,7 +102,7 @@ public:
*/
DECLARE_FUNCTION_2(savegame, SavegameType savegameType, uint32 param)
- DECLARE_FUNCTION(function11)
+ DECLARE_FUNCTION(goCompartment)
DECLARE_FUNCTION(sitAtTableWithSalko)
DECLARE_FUNCTION(leaveTableWithSalko)
@@ -116,7 +116,7 @@ public:
*/
DECLARE_FUNCTION(chapter1Handler)
- DECLARE_FUNCTION(function16)
+ DECLARE_FUNCTION(inCompartment)
DECLARE_FUNCTION(function17)
/**
@@ -124,8 +124,8 @@ public:
*/
DECLARE_FUNCTION(chapter2)
- DECLARE_FUNCTION(function19)
- DECLARE_FUNCTION(function20)
+ DECLARE_FUNCTION(goBreakfast)
+ DECLARE_FUNCTION(atBreakfast)
DECLARE_FUNCTION(function21)
/**
@@ -148,9 +148,9 @@ public:
*/
DECLARE_FUNCTION(chapter4Handler)
- DECLARE_FUNCTION(function26)
- DECLARE_FUNCTION(function27)
- DECLARE_FUNCTION(function28)
+ DECLARE_FUNCTION(returnCompartment4)
+ DECLARE_FUNCTION(inCompartment4)
+ DECLARE_FUNCTION(hiding)
DECLARE_FUNCTION(function29)
/**
@@ -163,8 +163,8 @@ public:
*/
DECLARE_FUNCTION(chapter5Handler)
- DECLARE_FUNCTION(fight)
- DECLARE_FUNCTION(function33)
+ DECLARE_FUNCTION(fightCath)
+ DECLARE_FUNCTION(knockedOut)
DECLARE_FUNCTION(function34)
};
Commit: be563f3c195833ea8208c2cd0e6a645b60adbc1a
https://github.com/scummvm/scummvm/commit/be563f3c195833ea8208c2cd0e6a645b60adbc1a
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:30-04:00
Commit Message:
LASTEXPRESS: Add assert check in Gendarmes logic. CID 1003263
Changed paths:
engines/lastexpress/entities/gendarmes.cpp
diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp
index 5ecf8ef..b628b8d 100644
--- a/engines/lastexpress/entities/gendarmes.cpp
+++ b/engines/lastexpress/entities/gendarmes.cpp
@@ -169,6 +169,9 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, doCompartment, CarIndex, EntityPosition)
strcpy((char *)¶meters1->seq3, "632F");
}
+ // The sequence 3 string needs to be a maximum of 9 characters, leaving 5 characters after the initial setup
+ assert(Common::String(params->seq1).size() <= 5);
+
strcat((char *)¶meters1->seq1, (char *)¶ms->seq1);
strcat((char *)¶meters1->seq2, (char *)¶ms->seq1);
strcat((char *)¶meters1->seq3, (char *)¶ms->seq1);
Commit: 94861cd73c400ac95b6af951db8050f9dce81c04
https://github.com/scummvm/scummvm/commit/94861cd73c400ac95b6af951db8050f9dce81c04
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:31-04:00
Commit Message:
LASTEXPRESS: Check for resulting sequence size in August logic code. CID 1003264
Changed paths:
engines/lastexpress/entities/august.cpp
diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index a63a104..14dcf20 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -452,11 +452,17 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
}
if (params->param1) {
- strcpy((char *)¶meters->seq2, Common::String::format("%s%s", (char *)¶meters->seq1, "Gc").c_str());
+ Common::String sequence = Common::String::format("%s%s", (char *)¶meters->seq1, "Gc");
+ assert(sequence.size() <= 13);
+
+ strcpy((char *)¶meters->seq2, sequence.c_str());
getObjects()->update(kObjectCompartment3, kEntityPlayer, kObjectLocation1, kCursorKeepValue, kCursorKeepValue);
} else {
- strcpy((char *)¶meters->seq2, Common::String::format("%s%s", (char *)¶meters->seq1, "Ec").c_str());
+ Common::String sequence = Common::String::format("%s%s", (char *)¶meters->seq1, "Ec");
+ assert(sequence.size() <= 13);
+
+ strcpy((char *)¶meters->seq2, sequence.c_str());
}
setCallback(1);
@@ -484,15 +490,22 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool)
setCallback(2);
setup_playSound("AUG2094");
}
+
}
break;
case 2:
- case 3:
+ case 3: {
getSavePoints()->push(kEntityAugust, kEntityMertens, kAction269436673);
- strcpy((char *)¶meters->seq2, Common::String::format("%s%s", (char *)¶meters->seq1, "Qc").c_str());
+
+ Common::String sequence = Common::String::format("%s%s", (char *)¶meters->seq1, "Qc");
+ assert(sequence.size() <= 13);
+
+ strcpy((char *)¶meters->seq2, sequence.c_str());
getEntities()->drawSequenceLeft(kEntityAugust, (char *)¶meters->seq2);
+
+ }
break;
}
break;
Commit: ae12264c5f8e4aa5eb7422f1b4719846f758e14b
https://github.com/scummvm/scummvm/commit/ae12264c5f8e4aa5eb7422f1b4719846f758e14b
Author: Littleboy (littleboy at scummvm.org)
Date: 2014-06-16T18:46:32-04:00
Commit Message:
LASTEXPRESS: Fix potential out-of-bounds read. CID 1003992
Changed paths:
engines/lastexpress/game/inventory.cpp
diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp
index 9e02b3b..622d547 100644
--- a/engines/lastexpress/game/inventory.cpp
+++ b/engines/lastexpress/game/inventory.cpp
@@ -40,7 +40,6 @@
#include "lastexpress/lastexpress.h"
#include "lastexpress/resource.h"
-
namespace LastExpress {
Inventory::Inventory(LastExpressEngine *engine) : _engine(engine), _selectedItem(kItemNone), _highlightedItemIndex(0), _itemsShown(0),
@@ -534,18 +533,18 @@ Common::String Inventory::toString() {
// Private methods
//////////////////////////////////////////////////////////////////////////
InventoryItem Inventory::getFirstExaminableItem() const {
-
int index = 0;
- InventoryEntry entry = _entries[index];
- while (!entry.inPocket || !entry.cursor || entry.floating) {
- index++;
- entry = _entries[index];
+ do {
+ InventoryEntry entry = _entries[index];
- if (index >= kPortraitOriginal)
- return kItemNone;
- }
+ // Check if it is an examinable item
+ if (entry.inPocket && entry.cursor && !entry.floating)
+ return (InventoryItem)index;
+
+ index++;
+ } while (index < kPortraitOriginal);
- return (InventoryItem)index;
+ return kItemNone;
}
bool Inventory::isItemSceneParameter(InventoryItem item) const {
More information about the Scummvm-git-logs
mailing list