diff options
author | Littleboy | 2013-11-26 01:49:40 -0500 |
---|---|---|
committer | Littleboy | 2013-12-10 01:54:59 -0500 |
commit | e36786eb1bacc55f0b5ba29ac3278cd3b27a0e59 (patch) | |
tree | aa9b3076c4da0999c7e2c431055a1c461a30f965 /engines/lastexpress/entities | |
parent | a434de35ff6a3d00267ef825a09d412a643618bc (diff) | |
download | scummvm-rg350-e36786eb1bacc55f0b5ba29ac3278cd3b27a0e59.tar.gz scummvm-rg350-e36786eb1bacc55f0b5ba29ac3278cd3b27a0e59.tar.bz2 scummvm-rg350-e36786eb1bacc55f0b5ba29ac3278cd3b27a0e59.zip |
LASTEXPRESS: Rename Francois and Alouan logic functions
Diffstat (limited to 'engines/lastexpress/entities')
-rw-r--r-- | engines/lastexpress/entities/alouan.cpp | 48 | ||||
-rw-r--r-- | engines/lastexpress/entities/alouan.h | 10 | ||||
-rw-r--r-- | engines/lastexpress/entities/francois.cpp | 146 | ||||
-rw-r--r-- | engines/lastexpress/entities/francois.h | 29 |
4 files changed, 115 insertions, 118 deletions
diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp index e834e1f7cb..86d5512cb9 100644 --- a/engines/lastexpress/entities/alouan.cpp +++ b/engines/lastexpress/entities/alouan.cpp @@ -38,10 +38,10 @@ Alouan::Alouan(LastExpressEngine *engine) : Entity(engine, kEntityAlouan) { ADD_CALLBACK_FUNCTION(Alouan, playSound); ADD_CALLBACK_FUNCTION(Alouan, updateFromTime); ADD_CALLBACK_FUNCTION(Alouan, updateEntity); - ADD_CALLBACK_FUNCTION(Alouan, compartment6); - ADD_CALLBACK_FUNCTION(Alouan, compartment8); - ADD_CALLBACK_FUNCTION(Alouan, compartment6to8); - ADD_CALLBACK_FUNCTION(Alouan, compartment8to6); + ADD_CALLBACK_FUNCTION(Alouan, peekF); + ADD_CALLBACK_FUNCTION(Alouan, peekH); + ADD_CALLBACK_FUNCTION(Alouan, goFtoH); + ADD_CALLBACK_FUNCTION(Alouan, goHtoF); ADD_CALLBACK_FUNCTION(Alouan, chapter1); ADD_CALLBACK_FUNCTION(Alouan, chapter1Handler); ADD_CALLBACK_FUNCTION(Alouan, function12); @@ -55,7 +55,7 @@ Alouan::Alouan(LastExpressEngine *engine) : Entity(engine, kEntityAlouan) { ADD_CALLBACK_FUNCTION(Alouan, chapter5); ADD_CALLBACK_FUNCTION(Alouan, chapter5Handler); ADD_CALLBACK_FUNCTION(Alouan, function22); - ADD_CALLBACK_FUNCTION(Alouan, function23); + ADD_CALLBACK_FUNCTION(Alouan, hiding); ADD_NULL_FUNCTION(); } @@ -85,22 +85,22 @@ IMPLEMENT_FUNCTION_II(5, Alouan, updateEntity, CarIndex, EntityPosition) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(6, Alouan, compartment6) +IMPLEMENT_FUNCTION(6, Alouan, peekF) Entity::goToCompartment(savepoint, kObjectCompartment6, kPosition_4070, "621Cf", "621Df"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(7, Alouan, compartment8) +IMPLEMENT_FUNCTION(7, Alouan, peekH) Entity::goToCompartment(savepoint, kObjectCompartment8, kPosition_2740, "621Ch", "621Dh"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(8, Alouan, compartment6to8) +IMPLEMENT_FUNCTION(8, Alouan, goFtoH) Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment6, kPosition_4070, "621Bf", kObjectCompartment8, kPosition_2740, "621Ah"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(9, Alouan, compartment8to6) +IMPLEMENT_FUNCTION(9, Alouan, goHtoF) Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment8, kPosition_2740, "621Bh", kObjectCompartment6, kPosition_4070, "621Af"); IMPLEMENT_FUNCTION_END @@ -131,7 +131,7 @@ IMPLEMENT_FUNCTION(11, Alouan, chapter1Handler) case kActionNone: - if (Entity::timeCheckCallback(kTime1096200, params->param1, 1, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8to6))) + if (Entity::timeCheckCallback(kTime1096200, params->param1, 1, WRAP_SETUP_FUNCTION(Alouan, setup_goHtoF))) break; label_callback1: @@ -146,7 +146,7 @@ label_callback1: getSavePoints()->push(kEntityAlouan, kEntityTrain, kAction191070912, kPosition_4840); setCallback(2); - setup_compartment6to8(); + setup_goFtoH(); } break; @@ -215,9 +215,9 @@ IMPLEMENT_FUNCTION(14, Alouan, chapter2Handler) setCallback(params->param1 ? 1 : 2); if (params->param1) - setup_compartment8(); + setup_peekH(); else - setup_compartment6(); + setup_peekF(); break; case kActionDefault: @@ -249,7 +249,7 @@ IMPLEMENT_FUNCTION(14, Alouan, chapter2Handler) case kAction189489753: setCallback(3); - setup_compartment8to6(); + setup_goHtoF(); break; } IMPLEMENT_FUNCTION_END @@ -282,12 +282,12 @@ IMPLEMENT_FUNCTION(16, Alouan, chapter3Handler) break; case kActionNone: - if (Entity::timeCheckCallback(kTimeCitySalzbourg, params->param1, 1, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8to6))) + if (Entity::timeCheckCallback(kTimeCitySalzbourg, params->param1, 1, WRAP_SETUP_FUNCTION(Alouan, setup_goHtoF))) break; label_callback1: if (params->param2 != kTimeInvalid && getState()->time > kTime1989000) { - if (Entity::timeCheckCar(kTime2119500, params->param5, 5, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8))) + if (Entity::timeCheckCar(kTime2119500, params->param5, 5, WRAP_SETUP_FUNCTION(Alouan, setup_peekH))) break; } @@ -296,12 +296,12 @@ label_callback2: break; label_callback3: - if (Entity::timeCheckCallback(kTime2133000, params->param4, 4, WRAP_SETUP_FUNCTION(Alouan, setup_compartment6to8))) + if (Entity::timeCheckCallback(kTime2133000, params->param4, 4, WRAP_SETUP_FUNCTION(Alouan, setup_goFtoH))) break; label_callback4: if (params->param5 != kTimeInvalid && getState()->time > kTime2151000) { - if (Entity::timeCheckCar(kTime2241000, params->param5, 5, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8))) + if (Entity::timeCheckCar(kTime2241000, params->param5, 5, WRAP_SETUP_FUNCTION(Alouan, setup_peekH))) break; } break; @@ -361,12 +361,12 @@ IMPLEMENT_FUNCTION(18, Alouan, chapter4Handler) case kActionNone: if (params->param1 != kTimeInvalid) { - if (Entity::timeCheckCar(kTime2443500, params->param1, 1, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8))) + if (Entity::timeCheckCar(kTime2443500, params->param1, 1, WRAP_SETUP_FUNCTION(Alouan, setup_peekH))) break; } label_callback1: - if (Entity::timeCheckCallback(kTime2455200, params->param2, 2, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8to6))) + if (Entity::timeCheckCallback(kTime2455200, params->param2, 2, WRAP_SETUP_FUNCTION(Alouan, setup_goHtoF))) break; label_callback2: @@ -375,7 +375,7 @@ label_callback2: getSavePoints()->push(kEntityAlouan, kEntityTrain, kAction191070912, kPosition_4840); setCallback(3); - setup_compartment6to8(); + setup_goFtoH(); } break; @@ -452,7 +452,7 @@ IMPLEMENT_FUNCTION(22, Alouan, function22) if (!Entity::updateParameter(params->param1, getState()->time, 2700)) break; - setup_function23(); + setup_hiding(); break; case kActionDefault: @@ -463,13 +463,13 @@ IMPLEMENT_FUNCTION(22, Alouan, function22) case kActionDrawScene: if (getEntities()->isInsideTrainCar(kEntityPlayer, kCarGreenSleeping)) - setup_function23(); + setup_hiding(); break; } IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(23, Alouan, function23) +IMPLEMENT_FUNCTION(23, Alouan, hiding) switch (savepoint.action) { default: break; diff --git a/engines/lastexpress/entities/alouan.h b/engines/lastexpress/entities/alouan.h index 91254a449a..371e4f20d9 100644 --- a/engines/lastexpress/entities/alouan.h +++ b/engines/lastexpress/entities/alouan.h @@ -69,10 +69,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 @@ -126,7 +126,7 @@ public: */ DECLARE_FUNCTION(chapter5Handler) DECLARE_FUNCTION(function22) - DECLARE_FUNCTION(function23) + DECLARE_FUNCTION(hiding) DECLARE_NULL_FUNCTION() }; diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index 12a0a37e99..12ce16a32b 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -44,22 +44,22 @@ Francois::Francois(LastExpressEngine *engine) : Entity(engine, kEntityFrancois) ADD_CALLBACK_FUNCTION(Francois, enterExitCompartment2); ADD_CALLBACK_FUNCTION(Francois, playSound); ADD_CALLBACK_FUNCTION(Francois, savegame); - ADD_CALLBACK_FUNCTION(Francois, updateEntity); - ADD_CALLBACK_FUNCTION(Francois, function9); - ADD_CALLBACK_FUNCTION(Francois, function10); - ADD_CALLBACK_FUNCTION(Francois, function11); - ADD_CALLBACK_FUNCTION(Francois, function12); - ADD_CALLBACK_FUNCTION(Francois, function13); - ADD_CALLBACK_FUNCTION(Francois, function14); - ADD_CALLBACK_FUNCTION(Francois, function15); - ADD_CALLBACK_FUNCTION(Francois, function16); + ADD_CALLBACK_FUNCTION(Francois, doWalk); + ADD_CALLBACK_FUNCTION(Francois, exitCompartment); + ADD_CALLBACK_FUNCTION(Francois, enterCompartment); + ADD_CALLBACK_FUNCTION(Francois, rampage); + ADD_CALLBACK_FUNCTION(Francois, takeWalk); + ADD_CALLBACK_FUNCTION(Francois, haremVisit); + ADD_CALLBACK_FUNCTION(Francois, chaseBeetle); + ADD_CALLBACK_FUNCTION(Francois, findCath); + ADD_CALLBACK_FUNCTION(Francois, letsGo); ADD_CALLBACK_FUNCTION(Francois, chapter1); ADD_CALLBACK_FUNCTION(Francois, chapter1Handler); - ADD_CALLBACK_FUNCTION(Francois, function19); + ADD_CALLBACK_FUNCTION(Francois, inCompartment); ADD_CALLBACK_FUNCTION(Francois, function20); ADD_CALLBACK_FUNCTION(Francois, chapter2); - ADD_CALLBACK_FUNCTION(Francois, chapter2Handler); - ADD_CALLBACK_FUNCTION(Francois, function23); + ADD_CALLBACK_FUNCTION(Francois, atBreakfast); + ADD_CALLBACK_FUNCTION(Francois, withMama); ADD_CALLBACK_FUNCTION(Francois, chapter3); ADD_CALLBACK_FUNCTION(Francois, chapter3Handler); ADD_CALLBACK_FUNCTION(Francois, chapter4); @@ -106,7 +106,7 @@ IMPLEMENT_FUNCTION_II(7, Francois, savegame, SavegameType, uint32) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION_II(8, Francois, updateEntity, CarIndex, EntityPosition) +IMPLEMENT_FUNCTION_II(8, Francois, doWalk, CarIndex, EntityPosition) switch (savepoint.action) { default: break; @@ -196,7 +196,7 @@ IMPLEMENT_FUNCTION_II(8, Francois, updateEntity, CarIndex, EntityPosition) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(9, Francois, function9) +IMPLEMENT_FUNCTION(9, Francois, exitCompartment) switch (savepoint.action) { default: break; @@ -232,7 +232,7 @@ IMPLEMENT_FUNCTION(9, Francois, function9) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(10, Francois, function10) +IMPLEMENT_FUNCTION(10, Francois, enterCompartment) switch (savepoint.action) { default: break; @@ -270,7 +270,7 @@ IMPLEMENT_FUNCTION(10, Francois, function10) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION_I(11, Francois, function11, TimeValue) +IMPLEMENT_FUNCTION_I(11, Francois, rampage, TimeValue) switch (savepoint.action) { default: break; @@ -375,7 +375,7 @@ label_callback: getSoundQueue()->processEntry(kEntityFrancois); setCallback(4); - setup_updateEntity(kCarRedSleeping, kPosition_5790); + setup_doWalk(kCarRedSleeping, kPosition_5790); } break; @@ -400,7 +400,7 @@ label_callback: case kActionDefault: setCallback(1); - setup_function9(); + setup_exitCompartment(); break; case kActionCallback: @@ -437,7 +437,7 @@ label_callback: case 4: setCallback(5); - setup_function10(); + setup_enterCompartment(); break; case 5: @@ -477,14 +477,14 @@ label_callback: IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(12, Francois, function12) +IMPLEMENT_FUNCTION(12, Francois, takeWalk) switch (savepoint.action) { default: break; case kActionDefault: setCallback(1); - setup_function9(); + setup_exitCompartment(); break; case kActionCallback: @@ -494,7 +494,7 @@ IMPLEMENT_FUNCTION(12, Francois, function12) case 1: setCallback(2); - setup_updateEntity(kCarRedSleeping, kPosition_9460); + setup_doWalk(kCarRedSleeping, kPosition_9460); break; case 2: @@ -504,7 +504,7 @@ IMPLEMENT_FUNCTION(12, Francois, function12) case 3: setCallback(4); - setup_updateEntity(kCarRedSleeping, kPosition_540); + setup_doWalk(kCarRedSleeping, kPosition_540); break; case 4: @@ -514,12 +514,12 @@ IMPLEMENT_FUNCTION(12, Francois, function12) case 5: setCallback(6); - setup_updateEntity(kCarRedSleeping, kPosition_5790); + setup_doWalk(kCarRedSleeping, kPosition_5790); break; case 6: setCallback(7); - setup_function10(); + setup_enterCompartment(); break; case 7: @@ -531,14 +531,14 @@ IMPLEMENT_FUNCTION(12, Francois, function12) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(13, Francois, function13) +IMPLEMENT_FUNCTION(13, Francois, haremVisit) switch (savepoint.action) { default: break; case kActionDefault: setCallback(1); - setup_function9(); + setup_exitCompartment(); break; case kActionCallback: @@ -548,12 +548,12 @@ IMPLEMENT_FUNCTION(13, Francois, function13) case 1: setCallback(2); - setup_updateEntity(kCarRedSleeping, kPosition_540); + setup_doWalk(kCarRedSleeping, kPosition_540); break; case 2: setCallback(3); - setup_updateEntity(kCarGreenSleeping, kPosition_4070); + setup_doWalk(kCarGreenSleeping, kPosition_4070); break; case 3: @@ -577,13 +577,13 @@ IMPLEMENT_FUNCTION(13, Francois, function13) getData()->location = kLocationOutsideCompartment; setCallback(7); - setup_updateEntity(kCarGreenSleeping, kPosition_4840); + setup_doWalk(kCarGreenSleeping, kPosition_4840); break; case 7: if (getInventory()->hasItem(kItemWhistle) || getInventory()->get(kItemWhistle)->location == kObjectLocation3) { setCallback(10); - setup_updateEntity(kCarGreenSleeping, kPosition_5790); + setup_doWalk(kCarGreenSleeping, kPosition_5790); break; } @@ -599,12 +599,12 @@ IMPLEMENT_FUNCTION(13, Francois, function13) getEntities()->exitCompartment(kEntityFrancois, kObjectCompartmentE, true); setCallback(10); - setup_updateEntity(kCarGreenSleeping, kPosition_5790); + setup_doWalk(kCarGreenSleeping, kPosition_5790); break; case 10: setCallback(11); - setup_function10(); + setup_enterCompartment(); break; case 11: @@ -621,7 +621,7 @@ IMPLEMENT_FUNCTION(13, Francois, function13) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION_IIS(14, Francois, function14, ObjectIndex, EntityPosition) +IMPLEMENT_FUNCTION_IIS(14, Francois, chaseBeetle, ObjectIndex, EntityPosition) // Expose parameters as IISS and ignore the default exposed parameters EntityData::EntityParametersIISS *parameters = (EntityData::EntityParametersIISS*)_data->getCurrentParameters(); @@ -634,7 +634,7 @@ IMPLEMENT_FUNCTION_IIS(14, Francois, function14, ObjectIndex, EntityPosition) strcat((char *)¶meters->seq2, (char *)¶meters->seq1); setCallback(1); - setup_function9(); + setup_exitCompartment(); break; case kActionCallback: @@ -644,7 +644,7 @@ IMPLEMENT_FUNCTION_IIS(14, Francois, function14, ObjectIndex, EntityPosition) case 1: setCallback(2); - setup_updateEntity(kCarRedSleeping, (EntityPosition)parameters->param2); + setup_doWalk(kCarRedSleeping, (EntityPosition)parameters->param2); break; case 2: @@ -657,10 +657,10 @@ IMPLEMENT_FUNCTION_IIS(14, Francois, function14, ObjectIndex, EntityPosition) } else { if (parameters->param2 >= kPosition_5790) { setCallback(10); - setup_updateEntity(kCarRedSleeping, kPosition_9460); + setup_doWalk(kCarRedSleeping, kPosition_9460); } else { setCallback(9); - setup_updateEntity(kCarRedSleeping, kPosition_540); + setup_doWalk(kCarRedSleeping, kPosition_540); } } break; @@ -688,7 +688,7 @@ IMPLEMENT_FUNCTION_IIS(14, Francois, function14, ObjectIndex, EntityPosition) case 9: setCallback(10); - setup_updateEntity(kCarRedSleeping, kPosition_9460); + setup_doWalk(kCarRedSleeping, kPosition_9460); break; case 10: @@ -698,12 +698,12 @@ IMPLEMENT_FUNCTION_IIS(14, Francois, function14, ObjectIndex, EntityPosition) case 11: setCallback(12); - setup_updateEntity(kCarRedSleeping, kPosition_5790); + setup_doWalk(kCarRedSleeping, kPosition_5790); break; case 12: setCallback(13); - setup_function10(); + setup_enterCompartment(); break; case 13: @@ -715,14 +715,14 @@ IMPLEMENT_FUNCTION_IIS(14, Francois, function14, ObjectIndex, EntityPosition) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(15, Francois, function15) +IMPLEMENT_FUNCTION(15, Francois, findCath) switch (savepoint.action) { default: break; case kActionDefault: setCallback(1); - setup_function9(); + setup_exitCompartment(); break; case kActionCallback: @@ -733,10 +733,10 @@ IMPLEMENT_FUNCTION(15, Francois, function15) case 1: if (getData()->entityPosition >= getEntityData(kEntityPlayer)->entityPosition) { setCallback(3); - setup_updateEntity(kCarRedSleeping, kPosition_540); + setup_doWalk(kCarRedSleeping, kPosition_540); } else { setCallback(2); - setup_updateEntity(kCarRedSleeping, kPosition_9460); + setup_doWalk(kCarRedSleeping, kPosition_9460); } break; @@ -748,12 +748,12 @@ IMPLEMENT_FUNCTION(15, Francois, function15) case 4: setCallback(5); - setup_updateEntity(kCarRedSleeping, kPosition_5790); + setup_doWalk(kCarRedSleeping, kPosition_5790); break; case 5: setCallback(6); - setup_function10(); + setup_enterCompartment(); break; case 6: @@ -780,7 +780,7 @@ IMPLEMENT_FUNCTION(15, Francois, function15) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(16, Francois, function16) +IMPLEMENT_FUNCTION(16, Francois, letsGo) switch (savepoint.action) { default: break; @@ -809,7 +809,7 @@ IMPLEMENT_FUNCTION(16, Francois, function16) getSavePoints()->push(kEntityFrancois, kEntityMmeBoutarel, kAction101107728); setCallback(2); - setup_updateEntity(kCarRestaurant, kPosition_850); + setup_doWalk(kCarRestaurant, kPosition_850); break; case 2: @@ -836,7 +836,7 @@ IMPLEMENT_FUNCTION(16, Francois, function16) case kAction100901266: setCallback(3); - setup_updateEntity(kCarRedSleeping, kPosition_5790); + setup_doWalk(kCarRedSleeping, kPosition_5790); break; } IMPLEMENT_FUNCTION_END @@ -871,24 +871,24 @@ IMPLEMENT_FUNCTION(18, Francois, chapter1Handler) case kActionCallback: if (getCallback() == 1) - setup_function19(); + setup_inCompartment(); break; } IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(19, Francois, function19) +IMPLEMENT_FUNCTION(19, Francois, inCompartment) switch (savepoint.action) { default: break; case kActionNone: - Entity::timeCheckCallback(kTime1161000, params->param1, 2, WRAP_SETUP_FUNCTION(Francois, setup_function12)); + Entity::timeCheckCallback(kTime1161000, params->param1, 2, WRAP_SETUP_FUNCTION(Francois, setup_takeWalk)); break; case kAction101107728: setCallback(1); - setup_function16(); + setup_letsGo(); break; } IMPLEMENT_FUNCTION_END @@ -911,7 +911,7 @@ IMPLEMENT_FUNCTION(21, Francois, chapter2) break; case kActionNone: - setup_chapter2Handler(); + setup_atBreakfast(); break; case kActionDefault: @@ -927,7 +927,7 @@ IMPLEMENT_FUNCTION(21, Francois, chapter2) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(22, Francois, chapter2Handler) +IMPLEMENT_FUNCTION(22, Francois, atBreakfast) switch (savepoint.action) { default: break; @@ -948,20 +948,20 @@ IMPLEMENT_FUNCTION(22, Francois, chapter2Handler) getData()->entityPosition = kPosition_5790; getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityFrancois); - setup_function23(); + setup_withMama(); break; } break; case kAction100901266: setCallback(1); - setup_updateEntity(kCarRedSleeping, kPosition_5790); + setup_doWalk(kCarRedSleeping, kPosition_5790); break; } IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(23, Francois, function23) +IMPLEMENT_FUNCTION(23, Francois, withMama) switch (savepoint.action) { default: break; @@ -973,7 +973,7 @@ IMPLEMENT_FUNCTION(23, Francois, function23) if (ENTITY_PARAM(0, 1) && getEntities()->isPlayerInCar(kCarRedSleeping)) { setCallback(1); - setup_function15(); + setup_findCath(); break; } @@ -982,7 +982,7 @@ label_callback_1: break; label_callback_2: - if (Entity::timeCheckCallback(kTime1800000, params->param2, 3, WRAP_SETUP_FUNCTION(Francois, setup_function13))) + if (Entity::timeCheckCallback(kTime1800000, params->param2, 3, WRAP_SETUP_FUNCTION(Francois, setup_haremVisit))) break; label_callback_3: @@ -1085,36 +1085,36 @@ IMPLEMENT_FUNCTION(25, Francois, chapter3Handler) if (ENTITY_PARAM(0, 1) && getEntities()->isPlayerInCar(kCarRedSleeping)) { setCallback(2); - setup_function15(); + setup_findCath(); break; } label_callback_2: - if (Entity::timeCheckCallback(kTime2025000, params->param3, 3, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + if (Entity::timeCheckCallback(kTime2025000, params->param3, 3, WRAP_SETUP_FUNCTION(Francois, setup_takeWalk))) break; label_callback_3: - if (Entity::timeCheckCallback(kTime2052000, params->param4, 4, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + if (Entity::timeCheckCallback(kTime2052000, params->param4, 4, WRAP_SETUP_FUNCTION(Francois, setup_takeWalk))) break; label_callback_4: - if (Entity::timeCheckCallback(kTime2079000, params->param5, 5, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + if (Entity::timeCheckCallback(kTime2079000, params->param5, 5, WRAP_SETUP_FUNCTION(Francois, setup_takeWalk))) break; label_callback_5: - if (Entity::timeCheckCallback(kTime2092500, params->param6, 6, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + if (Entity::timeCheckCallback(kTime2092500, params->param6, 6, WRAP_SETUP_FUNCTION(Francois, setup_takeWalk))) break; label_callback_6: - if (Entity::timeCheckCallback(kTime2173500, params->param7, 7, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + if (Entity::timeCheckCallback(kTime2173500, params->param7, 7, WRAP_SETUP_FUNCTION(Francois, setup_takeWalk))) break; label_callback_7: - if (Entity::timeCheckCallback(kTime2182500, params->param8, 8, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + if (Entity::timeCheckCallback(kTime2182500, params->param8, 8, WRAP_SETUP_FUNCTION(Francois, setup_takeWalk))) break; label_callback_8: - if (Entity::timeCheckCallback(kTime2241000, CURRENT_PARAM(1, 1), 9, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + if (Entity::timeCheckCallback(kTime2241000, CURRENT_PARAM(1, 1), 9, WRAP_SETUP_FUNCTION(Francois, setup_takeWalk))) break; label_callback_9: @@ -1208,7 +1208,7 @@ label_callback_14: case kAction101107728: setCallback(1); - setup_function16(); + setup_letsGo(); break; case kAction189872836: @@ -1246,7 +1246,7 @@ IMPLEMENT_FUNCTION_END IMPLEMENT_FUNCTION(27, Francois, chapter4Handler) if (savepoint.action == kAction101107728) { setCallback(1); - setup_function16(); + setup_letsGo(); } IMPLEMENT_FUNCTION_END @@ -1314,7 +1314,7 @@ bool Francois::timeCheckCallbackCompartment(TimeValue timeValue, uint ¶meter if (getState()->time > timeValue && !parameter) { parameter = 1; setCallback(callback); - setup_function14(compartment, position, sequenceSuffix); + setup_chaseBeetle(compartment, position, sequenceSuffix); return true; } @@ -1326,7 +1326,7 @@ bool Francois::timeCheckCallback(TimeValue timeValue, uint ¶meter, byte call if (getState()->time > timeValue && !parameter) { parameter = 1; setCallback(callback); - setup_function11(timeValue2); + setup_rampage(timeValue2); return true; } diff --git a/engines/lastexpress/entities/francois.h b/engines/lastexpress/entities/francois.h index 51270fa4b6..3118faf867 100644 --- a/engines/lastexpress/entities/francois.h +++ b/engines/lastexpress/entities/francois.h @@ -85,21 +85,21 @@ public: DECLARE_FUNCTION_2(savegame, SavegameType savegameType, uint32 param) /** - * Updates the entity + * Walk * * @param car The car * @param entityPosition The entity position */ - DECLARE_FUNCTION_2(updateEntity, CarIndex car, EntityPosition entityPosition) + DECLARE_FUNCTION_2(doWalk, CarIndex car, EntityPosition entityPosition) - DECLARE_FUNCTION(function9) - DECLARE_FUNCTION(function10) - DECLARE_FUNCTION_1(function11, TimeValue timeValue) - DECLARE_FUNCTION(function12) - DECLARE_FUNCTION(function13) - DECLARE_FUNCTION_3(function14, ObjectIndex compartment, EntityPosition entityPosition, const char *str) - DECLARE_FUNCTION(function15) - DECLARE_FUNCTION(function16) + DECLARE_FUNCTION(exitCompartment) + DECLARE_FUNCTION(enterCompartment) + DECLARE_FUNCTION_1(rampage, TimeValue timeValue) + DECLARE_FUNCTION(takeWalk) + DECLARE_FUNCTION(haremVisit) + DECLARE_FUNCTION_3(chaseBeetle, ObjectIndex compartment, EntityPosition entityPosition, const char *str) + DECLARE_FUNCTION(findCath) + DECLARE_FUNCTION(letsGo) /** * Setup Chapter 1 @@ -110,8 +110,7 @@ public: * Handle Chapter 1 events */ DECLARE_FUNCTION(chapter1Handler) - - DECLARE_FUNCTION(function19) + DECLARE_FUNCTION(inCompartment) DECLARE_FUNCTION(function20) /** @@ -122,9 +121,8 @@ public: /** * Handle Chapter 2 events */ - DECLARE_FUNCTION(chapter2Handler) - - DECLARE_FUNCTION(function23) + DECLARE_FUNCTION(atBreakfast) + DECLARE_FUNCTION(withMama) /** * Setup Chapter 3 @@ -155,7 +153,6 @@ public: * Handle Chapter 5 events */ DECLARE_FUNCTION(chapter5Handler) - DECLARE_FUNCTION(function30) DECLARE_NULL_FUNCTION() |