mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 17:57:14 +00:00
LASTEXPRESS: Replace PLAY_STEAM macro by function
This commit is contained in:
parent
96d0aedba9
commit
d4f7c02323
@ -384,12 +384,6 @@ IMPLEMENT_FUNCTION(7, Chapters, chapter1Init)
|
||||
IMPLEMENT_FUNCTION_END
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#define PLAY_STEAM() { \
|
||||
getSoundQueue()->resetState(); \
|
||||
getSound()->playSteam((CityIndex)ENTITY_PARAM(0, 4)); \
|
||||
ENTITY_PARAM(0, 2) = 0; \
|
||||
}
|
||||
|
||||
IMPLEMENT_FUNCTION(8, Chapters, chapter1Handler)
|
||||
switch (savepoint.action) {
|
||||
default:
|
||||
@ -522,43 +516,43 @@ label_chapter1_next:
|
||||
getSavePoints()->push(kEntityChapters, kEntityTrain, kActionTrainStopRunning);
|
||||
|
||||
if (getEntityData(kEntityPlayer)->location != kLocationOutsideTrain) {
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
if (getEntities()->isOutsideAlexeiWindow()) {
|
||||
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
if (getEntities()->isOutsideAnnaWindow()) {
|
||||
getScenes()->loadSceneFromPosition(kCarRedSleeping, 49);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
CarIndex car = getEntityData(kEntityPlayer)->car;
|
||||
if (car < kCarRedSleeping || car > kCarCoalTender) {
|
||||
if (car < kCarBaggageRear || car > kCarGreenSleeping) {
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
if (getEntities()->isPlayerPosition(kCarGreenSleeping, 98)) {
|
||||
getSound()->playSound(kEntityPlayer, "LIB015");
|
||||
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 71);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 82);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
getScenes()->loadSceneFromPosition(kCarRestaurant, 82);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1278,43 +1272,43 @@ label_callback_4:
|
||||
getSavePoints()->push(kEntityChapters, kEntityTrain, kActionTrainStopRunning);
|
||||
|
||||
if (getEntityData(kEntityPlayer)->location != kLocationOutsideTrain) {
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
if (getEntities()->isOutsideAlexeiWindow()) {
|
||||
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
if (getEntities()->isOutsideAnnaWindow()) {
|
||||
getScenes()->loadSceneFromPosition(kCarRedSleeping, 49);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
CarIndex car = getEntityData(kEntityPlayer)->car;
|
||||
if (car < kCarRedSleeping || car > kCarCoalTender) {
|
||||
if (car < kCarBaggageRear || car > kCarGreenSleeping) {
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
if (getEntities()->isPlayerPosition(kCarGreenSleeping, 98)) {
|
||||
getSound()->playSound(kEntityPlayer, "LIB015");
|
||||
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 71);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 82);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
getScenes()->loadSceneFromPosition(kCarRestaurant, 82);
|
||||
PLAY_STEAM();
|
||||
playSteam();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1816,4 +1810,10 @@ void Chapters::enterExitHelper(bool isEnteringStation) {
|
||||
callbackAction();
|
||||
}
|
||||
|
||||
void Chapters::playSteam() {
|
||||
getSoundQueue()->resetState();
|
||||
getSound()->playSteam((CityIndex)ENTITY_PARAM(0, 4));
|
||||
ENTITY_PARAM(0, 2) = 0;
|
||||
}
|
||||
|
||||
} // End of namespace LastExpress
|
||||
|
@ -156,6 +156,7 @@ public:
|
||||
private:
|
||||
void enterExitStation(const SavePoint &savepoint, bool isEnteringStation);
|
||||
void enterExitHelper(bool isEnteringStation);
|
||||
void playSteam();
|
||||
};
|
||||
|
||||
} // End of namespace LastExpress
|
||||
|
Loading…
x
Reference in New Issue
Block a user