From a54783c41479d9bdb3fc9a7739bf97af29dc9bdb Mon Sep 17 00:00:00 2001 From: Julien Templier Date: Thu, 21 Oct 2010 23:46:00 +0000 Subject: LASTEXPRESS: Merge several TIME_CHECK* macros together svn-id: r53692 --- engines/lastexpress/entities/alexei.cpp | 2 +- engines/lastexpress/entities/alouan.cpp | 4 +- engines/lastexpress/entities/anna.cpp | 2 +- engines/lastexpress/entities/august.cpp | 2 +- engines/lastexpress/entities/boutarel.cpp | 2 +- engines/lastexpress/entities/chapters.cpp | 76 ++++++++++++++++------------ engines/lastexpress/entities/cooks.cpp | 2 +- engines/lastexpress/entities/entity_intern.h | 57 --------------------- engines/lastexpress/entities/francois.cpp | 2 +- engines/lastexpress/entities/gendarmes.cpp | 2 +- engines/lastexpress/entities/hadija.cpp | 7 ++- engines/lastexpress/entities/ivo.cpp | 2 +- engines/lastexpress/entities/kahina.cpp | 2 +- engines/lastexpress/entities/kronos.cpp | 2 +- engines/lastexpress/entities/mahmud.cpp | 2 +- engines/lastexpress/entities/max.cpp | 2 +- engines/lastexpress/entities/mertens.cpp | 2 +- engines/lastexpress/entities/milos.cpp | 2 +- engines/lastexpress/entities/mmeboutarel.cpp | 2 +- engines/lastexpress/entities/rebecca.cpp | 4 +- engines/lastexpress/entities/salko.cpp | 2 +- engines/lastexpress/entities/sophie.cpp | 2 +- engines/lastexpress/entities/tatiana.cpp | 2 +- engines/lastexpress/entities/vassili.cpp | 2 +- engines/lastexpress/entities/verges.cpp | 2 +- engines/lastexpress/entities/vesna.cpp | 2 +- engines/lastexpress/entities/yasmin.cpp | 10 ++-- 27 files changed, 78 insertions(+), 122 deletions(-) (limited to 'engines/lastexpress') diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp index 890a2af65f..260122eb36 100644 --- a/engines/lastexpress/entities/alexei.cpp +++ b/engines/lastexpress/entities/alexei.cpp @@ -450,7 +450,7 @@ IMPLEMENT_FUNCTION(17, Alexei, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler) + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler) break; case kActionDefault: diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp index 0a66004a49..6225fb28cf 100644 --- a/engines/lastexpress/entities/alouan.cpp +++ b/engines/lastexpress/entities/alouan.cpp @@ -116,7 +116,7 @@ IMPLEMENT_FUNCTION(10, Alouan, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: @@ -293,7 +293,7 @@ label_callback1: TIME_CHECK_CAR(kTime2119500, params->param5, 5, setup_compartment8); label_callback2: - TIME_CHECK_PLAYSOUND(kTime2052000, params->param3, 3, "Har1005"); + TIME_CHECK_CALLBACK_1(kTime2052000, params->param3, 3, setup_playSound, "Har1005"); label_callback3: TIME_CHECK_CALLBACK(kTime2133000, params->param4, 4, setup_compartment6to8); diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp index 33b1eec4cf..c8e7e28078 100644 --- a/engines/lastexpress/entities/anna.cpp +++ b/engines/lastexpress/entities/anna.cpp @@ -547,7 +547,7 @@ IMPLEMENT_FUNCTION(16, Anna, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index 0882eabeed..b642c019eb 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -754,7 +754,7 @@ IMPLEMENT_FUNCTION(22, August, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp index 411456c5c8..b82eeb047f 100644 --- a/engines/lastexpress/entities/boutarel.cpp +++ b/engines/lastexpress/entities/boutarel.cpp @@ -616,7 +616,7 @@ IMPLEMENT_FUNCTION(19, Boutarel, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index 0e027f8bf0..a057da23d3 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -411,18 +411,28 @@ IMPLEMENT_FUNCTION(8, Chapters, chapter1Handler) label_processStations: // Process stations - TIME_CHECK_SAVEGAME(kTime1039500, params->param7, 1, kSavegameTypeTime, kTimeNone); + TIME_CHECK_CALLBACK_2(kTime1039500, params->param7, 1, setup_savegame, kSavegameTypeTime, kTimeNone); label_enter_epernay: // Entering Epernay station - TIME_CHECK_ENTERSTATION(kTimeEnterEpernay, params->param8, 1, "Epernay", kCityEpernay); + TIME_CHECK_CALLBACK_2(kTimeEnterEpernay, params->param8, 1, setup_enterStation, "Epernay", kCityEpernay); label_exit_epernay: // Exiting Epernay station - TIME_CHECK_EXITSTATION_2(kTimeExitEpernay, CURRENT_PARAM(1, 1), params->param4, 3, "Epernay"); + if (getState()->time > kTimeExitEpernay && !CURRENT_PARAM(1, 1)) { + CURRENT_PARAM(1, 1) = 1; + params->param4 = 1; + setCallback(3); + setup_exitStation("Epernay"); + break; + } label_epernay_police: - TIME_CHECK_EXITSTATION_0(params->param5, ENTITY_PARAM(0, 2), 4, "Unschedu"); + if (params->param5 && !ENTITY_PARAM(0, 2)) { + setCallback(4); + setup_exitStation("Unschedu"); + break; + } label_enter_chalons: if (getState()->time > kTimeEnterChalons && !CURRENT_PARAM(1, 2)) { @@ -435,19 +445,19 @@ label_enter_chalons: goto label_exit_strasbourg; // Entering Chalons station - TIME_CHECK_ENTERSTATION(kTimeEnterChalons, CURRENT_PARAM(1, 3), 5, "Chalons", kCityChalons); + TIME_CHECK_CALLBACK_2(kTimeEnterChalons, CURRENT_PARAM(1, 3), 5, setup_enterStation, "Chalons", kCityChalons); label_exit_chalons: // Exiting Chalons station - TIME_CHECK_EXITSTATION(kTimeExitChalons, CURRENT_PARAM(1, 4), 6, "Chalons"); + TIME_CHECK_CALLBACK_1(kTimeExitChalons, CURRENT_PARAM(1, 4), 6, setup_exitStation, "Chalons"); label_enter_barleduc: // Entering Bar-Le-Duc station - TIME_CHECK_ENTERSTATION(kTimeCityBarLeDuc, CURRENT_PARAM(1, 5), 7, "BarLeDuc", kCityBarleduc); + TIME_CHECK_CALLBACK_2(kTimeCityBarLeDuc, CURRENT_PARAM(1, 5), 7, setup_enterStation, "BarLeDuc", kCityBarleduc); label_exit_barleduc: // Exiting Bar-Le-Duc station - TIME_CHECK_EXITSTATION(kTimeExitBarLeDuc, CURRENT_PARAM(1, 6), 8, "BarLeDuc"); + TIME_CHECK_CALLBACK_1(kTimeExitBarLeDuc, CURRENT_PARAM(1, 6), 8, setup_exitStation, "BarLeDuc"); label_enter_nancy: if (getState()->time > kTime1260000 && !CURRENT_PARAM(1, 7)) { @@ -456,50 +466,50 @@ label_enter_nancy: } // Entering Nancy station - TIME_CHECK_ENTERSTATION(kTimeCityNancy, CURRENT_PARAM(1, 8), 9, "Nancy", kCityNancy); + TIME_CHECK_CALLBACK_2(kTimeCityNancy, CURRENT_PARAM(1, 8), 9, setup_enterStation, "Nancy", kCityNancy); label_exit_nancy: // Exiting Nancy station - TIME_CHECK_EXITSTATION(kTimeExitNancy, CURRENT_PARAM(2, 1), 10, "Nancy"); + TIME_CHECK_CALLBACK_1(kTimeExitNancy, CURRENT_PARAM(2, 1), 10, setup_exitStation, "Nancy"); label_enter_luneville: // Entering Luneville station - TIME_CHECK_ENTERSTATION(kTimeCityLuneville, CURRENT_PARAM(2, 2), 11, "Luneville", kCityLuneville); + TIME_CHECK_CALLBACK_2(kTimeCityLuneville, CURRENT_PARAM(2, 2), 11, setup_enterStation, "Luneville", kCityLuneville); label_exit_luneville: // Exiting Luneville station - TIME_CHECK_EXITSTATION(kTimeExitLuneville, CURRENT_PARAM(2, 3), 12, "Luneville"); + TIME_CHECK_CALLBACK_1(kTimeExitLuneville, CURRENT_PARAM(2, 3), 12, setup_exitStation, "Luneville"); label_enter_avricourt: // Entering Avricourt station - TIME_CHECK_ENTERSTATION(kTimeCityAvricourt, CURRENT_PARAM(2, 4), 13, "Avricourt", kCityAvricourt); + TIME_CHECK_CALLBACK_2(kTimeCityAvricourt, CURRENT_PARAM(2, 4), 13, setup_enterStation, "Avricourt", kCityAvricourt); label_exit_avricourt: // Exiting Avricourt station - TIME_CHECK_EXITSTATION(kTimeExitAvricourt, CURRENT_PARAM(2, 5), 14, "Avricourt"); + TIME_CHECK_CALLBACK_1(kTimeExitAvricourt, CURRENT_PARAM(2, 5), 14, setup_exitStation, "Avricourt"); label_enter_deutschavricourt: // Entering Deutsch-Avricourt station - TIME_CHECK_ENTERSTATION(kTimeCityDeutschAvricourt, CURRENT_PARAM(2, 6), 15, "DeutschA", kCityDeutschAvricourt); + TIME_CHECK_CALLBACK_2(kTimeCityDeutschAvricourt, CURRENT_PARAM(2, 6), 15, setup_enterStation, "DeutschA", kCityDeutschAvricourt); label_exit_deutschavricourt: // Exiting Avricourt station - TIME_CHECK_EXITSTATION(kTimeExitDeutschAvricourt, CURRENT_PARAM(2, 7), 16, "DeutschA"); + TIME_CHECK_CALLBACK_1(kTimeExitDeutschAvricourt, CURRENT_PARAM(2, 7), 16, setup_exitStation, "DeutschA"); label_enter_strasbourg: - TIME_CHECK_SAVEGAME(kTimeCityStrasbourg, CURRENT_PARAM(2, 8), 17, kSavegameTypeTime, kTimeNone); + TIME_CHECK_CALLBACK_2(kTimeCityStrasbourg, CURRENT_PARAM(2, 8), 17, setup_savegame, kSavegameTypeTime, kTimeNone); label_exit_strasbourg: // Exiting Strasbourg station - TIME_CHECK_EXITSTATION(kTimeExitStrasbourg, CURRENT_PARAM(3, 1), 19, "Strasbou"); + TIME_CHECK_CALLBACK_1(kTimeExitStrasbourg, CURRENT_PARAM(3, 1), 19, setup_exitStation, "Strasbou"); label_enter_badenoos: // Entering Baden Oos station - TIME_CHECK_ENTERSTATION(kTimeCityBadenOos, CURRENT_PARAM(3, 2), 20, "BadenOos", kCityBadenOos); + TIME_CHECK_CALLBACK_2(kTimeCityBadenOos, CURRENT_PARAM(3, 2), 20, setup_enterStation, "BadenOos", kCityBadenOos); label_exit_badenoos: // Exiting Baden Oos station - TIME_CHECK_EXITSTATION(kTimeExitBadenOos, CURRENT_PARAM(3, 3), 21, "BadenOos"); + TIME_CHECK_CALLBACK_1(kTimeExitBadenOos, CURRENT_PARAM(3, 3), 21, setup_exitStation, "BadenOos"); label_chapter1_next: if (getState()->time > kTimeChapter1End3 && ! CURRENT_PARAM(3, 4)) { @@ -919,28 +929,28 @@ IMPLEMENT_FUNCTION(15, Chapters, chapter3Handler) params->param5 = 0; UPDATE_PARAM_PROC_END - TIME_CHECK_ENTERSTATION(kTimeEnterSalzbourg, params->param6, 1, "Salzburg", kCitySalzbourg); + TIME_CHECK_CALLBACK_2(kTimeEnterSalzbourg, params->param6, 1, setup_enterStation, "Salzburg", kCitySalzbourg); label_callback_1: - TIME_CHECK_EXITSTATION(kTimeExitSalzbourg, params->param7, 2, "Salzburg"); + TIME_CHECK_CALLBACK_1(kTimeExitSalzbourg, params->param7, 2, setup_exitStation, "Salzburg"); label_callback_2: - TIME_CHECK_ENTERSTATION(kTimeEnterAttnangPuchheim, params->param8, 3, "Attnang", kCityAttnangPuchheim); + TIME_CHECK_CALLBACK_2(kTimeEnterAttnangPuchheim, params->param8, 3, setup_enterStation, "Attnang", kCityAttnangPuchheim); label_callback_3: - TIME_CHECK_EXITSTATION(kTimeExitAttnangPuchheim, CURRENT_PARAM(1, 1), 4, "Attnang"); + TIME_CHECK_CALLBACK_1(kTimeExitAttnangPuchheim, CURRENT_PARAM(1, 1), 4, setup_exitStation, "Attnang"); label_callback_4: - TIME_CHECK_ENTERSTATION(kTimeEnterWels, CURRENT_PARAM(1, 2), 5, "Wels", kCityWels); + TIME_CHECK_CALLBACK_2(kTimeEnterWels, CURRENT_PARAM(1, 2), 5, setup_enterStation, "Wels", kCityWels); label_callback_5: - TIME_CHECK_EXITSTATION(kTimeEnterWels, CURRENT_PARAM(1, 3), 6, "Wels"); + TIME_CHECK_CALLBACK_1(kTimeEnterWels, CURRENT_PARAM(1, 3), 6, setup_exitStation, "Wels"); label_callback_6: - TIME_CHECK_ENTERSTATION(kTimeEnterLinz, CURRENT_PARAM(1, 4), 7, "Linz", kCityLinz); + TIME_CHECK_CALLBACK_2(kTimeEnterLinz, CURRENT_PARAM(1, 4), 7, setup_enterStation, "Linz", kCityLinz); label_callback_7: - TIME_CHECK_EXITSTATION(kTimeCityLinz, CURRENT_PARAM(1, 5), 8, "Linz"); + TIME_CHECK_CALLBACK_1(kTimeCityLinz, CURRENT_PARAM(1, 5), 8, setup_exitStation, "Linz"); label_callback_8: if (getState()->time > kTime2187000 && !CURRENT_PARAM(1, 6)) { @@ -948,7 +958,7 @@ label_callback_8: getState()->timeDelta = 5; } - TIME_CHECK_ENTERSTATION(kTimeCityVienna, CURRENT_PARAM(1, 7), 9, "Vienna", kCityVienna); + TIME_CHECK_CALLBACK_2(kTimeCityVienna, CURRENT_PARAM(1, 7), 9, setup_enterStation, "Vienna", kCityVienna); break; case kActionEndSound: @@ -1217,10 +1227,10 @@ IMPLEMENT_FUNCTION(19, Chapters, chapter4Handler) params->param7 = 0; UPDATE_PARAM_PROC_END - TIME_CHECK_ENTERSTATION(kTimeEnterPoszony, params->param8, 1, "Pozsony", kCityPoszony); + TIME_CHECK_CALLBACK_2(kTimeEnterPoszony, params->param8, 1, setup_enterStation, "Pozsony", kCityPoszony); label_exitPozsony: - TIME_CHECK_EXITSTATION(kTimeExitPoszony, CURRENT_PARAM(1, 1), 2, "Pozsony"); + TIME_CHECK_CALLBACK_1(kTimeExitPoszony, CURRENT_PARAM(1, 1), 2, setup_exitStation, "Pozsony"); label_enterGalanta: if (getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) { @@ -1233,10 +1243,10 @@ label_enterGalanta: if (params->param1) goto label_callback_4; - TIME_CHECK_ENTERSTATION(kTimeEnterGalanta, CURRENT_PARAM(1, 3), 3, "Galanta", kCityGalanta); + TIME_CHECK_CALLBACK_2(kTimeEnterGalanta, CURRENT_PARAM(1, 3), 3, setup_enterStation, "Galanta", kCityGalanta); label_exitGalanta: - TIME_CHECK_EXITSTATION(kTimeExitGalanta, CURRENT_PARAM(1, 4), 4, "Galanta"); + TIME_CHECK_CALLBACK_1(kTimeExitGalanta, CURRENT_PARAM(1, 4), 4, setup_exitStation, "Galanta"); label_callback_4: if (getState()->time > kTime2470500 && !CURRENT_PARAM(1, 5)) { diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp index 2bc787b495..51e723887b 100644 --- a/engines/lastexpress/entities/cooks.cpp +++ b/engines/lastexpress/entities/cooks.cpp @@ -242,7 +242,7 @@ IMPLEMENT_FUNCTION(5, Cooks, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 7566471322..a410796a61 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -322,9 +322,6 @@ void class::setup_##name() { \ ////////////////////////////////////////////////////////////////////////// // Time check macros ////////////////////////////////////////////////////////////////////////// -#define TIME_CHECK_CHAPTER1(function) \ - TIME_CHECK(kTimeChapter1, params->param1, function) - #define TIME_CHECK(timeValue, parameter, function) \ if (getState()->time > timeValue && !parameter) { \ parameter = 1; \ @@ -386,54 +383,6 @@ void class::setup_##name() { \ break; \ } -#define TIME_CHECK_SAVEGAME(timeValue, parameter, callback, type, event) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - setCallback(callback); \ - setup_savegame(type, event); \ - break; \ - } - -#define TIME_CHECK_ENTERSTATION(timeValue, parameter, callback, name, param2) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - setCallback(callback); \ - setup_enterStation(name, param2); \ - break; \ - } - -#define TIME_CHECK_EXITSTATION(timeValue, parameter, callback, name) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - setCallback(callback); \ - setup_exitStation(name); \ - break; \ - } - -#define TIME_CHECK_EXITSTATION_2(timeValue, parameter1, parameter2, callback, name) \ - if (getState()->time > timeValue && !parameter1) { \ - parameter1 = 1; \ - parameter2 = 1; \ - setCallback(callback); \ - setup_exitStation(name); \ - break; \ - } - -#define TIME_CHECK_EXITSTATION_0(parameter1, parameter2, callback, name) \ - if (parameter1 && !parameter2) { \ - setCallback(callback); \ - setup_exitStation(name); \ - break; \ - } - -#define TIME_CHECK_PLAYSOUND(timeValue, parameter, callback, sound) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - setCallback(callback); \ - setup_playSound(sound); \ - break; \ - } - #define TIME_CHECK_PLAYSOUND_UPDATEPOSITION(timeValue, parameter, callback, sound, position) \ if (getState()->time > timeValue && !parameter) { \ parameter = 1; \ @@ -449,12 +398,6 @@ void class::setup_##name() { \ getObjects()->updateLocation2(object, location); \ } -#define TIME_CHECK_POSITION(timeValue, parameter, position) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - getData()->entityPosition = position; \ - } - #define TIME_CHECK_CAR(timeValue, parameter, callback, function) {\ if ((getState()->time <= timeValue && !getEntities()->isPlayerInCar(kCarGreenSleeping)) || !parameter) \ parameter = getState()->time + 75; \ diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index 73dbc57adc..3a3d948e1d 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -850,7 +850,7 @@ IMPLEMENT_FUNCTION(17, Francois, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp index 55e86d3e9e..9c659e09db 100644 --- a/engines/lastexpress/entities/gendarmes.cpp +++ b/engines/lastexpress/entities/gendarmes.cpp @@ -70,7 +70,7 @@ IMPLEMENT_FUNCTION(2, Gendarmes, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp index 564ac942ca..b38dac1251 100644 --- a/engines/lastexpress/entities/hadija.cpp +++ b/engines/lastexpress/entities/hadija.cpp @@ -116,7 +116,7 @@ IMPLEMENT_FUNCTION(10, Hadija, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: @@ -250,7 +250,10 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler) break; case kActionNone: - TIME_CHECK_POSITION(kTime1782000, params->param1, kPosition_2740); + if (getState()->time > kTime1782000 && !params->param1) { \ + params->param1 = 1; + getData()->entityPosition = kPosition_2740; + } if (params->param2 == kTimeInvalid || getState()->time <= kTime1786500) { TIME_CHECK_CALLBACK(kTime1822500, params->param3, 2, setup_compartment8to6); diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp index d56c184c15..f689a1c2ca 100644 --- a/engines/lastexpress/entities/ivo.cpp +++ b/engines/lastexpress/entities/ivo.cpp @@ -250,7 +250,7 @@ IMPLEMENT_FUNCTION(14, Ivo, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index eda3ca6af7..d6619e9d4f 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -250,7 +250,7 @@ IMPLEMENT_FUNCTION(10, Kahina, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp index e11339f5d4..7e92aa6421 100644 --- a/engines/lastexpress/entities/kronos.cpp +++ b/engines/lastexpress/entities/kronos.cpp @@ -129,7 +129,7 @@ IMPLEMENT_FUNCTION(7, Kronos, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp index 0200f0b554..0b4dc1b138 100644 --- a/engines/lastexpress/entities/mahmud.cpp +++ b/engines/lastexpress/entities/mahmud.cpp @@ -733,7 +733,7 @@ IMPLEMENT_FUNCTION(15, Mahmud, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chaptersHandler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chaptersHandler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp index 5bc1c1f357..67b0be7958 100644 --- a/engines/lastexpress/entities/max.cpp +++ b/engines/lastexpress/entities/max.cpp @@ -324,7 +324,7 @@ IMPLEMENT_FUNCTION(10, Max, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter12_handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter12_handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index 384a368685..4e9be7e5e3 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -2514,7 +2514,7 @@ IMPLEMENT_FUNCTION(34, Mertens, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index 4c53ecf901..fd99084cf8 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -364,7 +364,7 @@ IMPLEMENT_FUNCTION(12, Milos, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/mmeboutarel.cpp b/engines/lastexpress/entities/mmeboutarel.cpp index 489adf8d04..203732129f 100644 --- a/engines/lastexpress/entities/mmeboutarel.cpp +++ b/engines/lastexpress/entities/mmeboutarel.cpp @@ -247,7 +247,7 @@ IMPLEMENT_FUNCTION(10, MmeBoutarel, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index af3197a210..07f28b1719 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -658,7 +658,7 @@ IMPLEMENT_FUNCTION(21, Rebecca, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: @@ -686,7 +686,7 @@ IMPLEMENT_FUNCTION(22, Rebecca, chapter1Handler) break; case kActionNone: - TIME_CHECK_PLAYSOUND(kTime1084500, params->param3, 1, "REB1015"); + TIME_CHECK_CALLBACK_1(kTime1084500, params->param3, 1, setup_playSound, "REB1015"); if (params->param4 == kTimeInvalid) goto label_callback_4; diff --git a/engines/lastexpress/entities/salko.cpp b/engines/lastexpress/entities/salko.cpp index 688208f30a..27538ae15c 100644 --- a/engines/lastexpress/entities/salko.cpp +++ b/engines/lastexpress/entities/salko.cpp @@ -158,7 +158,7 @@ IMPLEMENT_FUNCTION(9, Salko, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/sophie.cpp b/engines/lastexpress/entities/sophie.cpp index bab74ad1f2..1b2d7b92ee 100644 --- a/engines/lastexpress/entities/sophie.cpp +++ b/engines/lastexpress/entities/sophie.cpp @@ -209,7 +209,7 @@ IMPLEMENT_FUNCTION(4, Sophie, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chaptersHandler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chaptersHandler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index 4908c71505..86af301a16 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -343,7 +343,7 @@ IMPLEMENT_FUNCTION(17, Tatiana, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp index db16b0e032..ce74aaa6d0 100644 --- a/engines/lastexpress/entities/vassili.cpp +++ b/engines/lastexpress/entities/vassili.cpp @@ -86,7 +86,7 @@ IMPLEMENT_FUNCTION(4, Vassili, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index 0d1cad0d48..6455827d6b 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -574,7 +574,7 @@ IMPLEMENT_FUNCTION(18, Verges, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp index 9e0ef09a08..fecf322a51 100644 --- a/engines/lastexpress/entities/vesna.cpp +++ b/engines/lastexpress/entities/vesna.cpp @@ -258,7 +258,7 @@ IMPLEMENT_FUNCTION(12, Vesna, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp index fe7c7fb2bf..7dc46f9690 100644 --- a/engines/lastexpress/entities/yasmin.cpp +++ b/engines/lastexpress/entities/yasmin.cpp @@ -188,7 +188,7 @@ IMPLEMENT_FUNCTION(8, Yasmin, chapter1) break; case kActionNone: - TIME_CHECK_CHAPTER1(setup_chapter1Handler); + TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); break; case kActionDefault: @@ -209,8 +209,8 @@ IMPLEMENT_FUNCTION(9, Yasmin, chapter1Handler) TIME_CHECK_CALLBACK(kTime1093500, params->param1, 1, setup_function6); TIME_CHECK_CALLBACK(kTime1161000, params->param2, 3, setup_function7); TIME_CHECK_PLAYSOUND_UPDATEPOSITION(kTime1162800, params->param3, 4, "Har1102", kPosition_4070); - TIME_CHECK_PLAYSOUND(kTime1165500, params->param4, 5, "Har1104"); - TIME_CHECK_PLAYSOUND(kTime1174500, params->param5, 6, "Har1106"); + TIME_CHECK_CALLBACK_1(kTime1165500, params->param4, 5, setup_playSound, "Har1104"); + TIME_CHECK_CALLBACK_1(kTime1174500, params->param5, 6, setup_playSound, "Har1106"); TIME_CHECK_CALLBACK(kTime1183500, params->param6, 7, setup_function6); break; @@ -234,11 +234,11 @@ IMPLEMENT_FUNCTION(9, Yasmin, chapter1Handler) // Fallback to case 4 case 4: - TIME_CHECK_PLAYSOUND(kTime1165500, params->param4, 5, "Har1104"); + TIME_CHECK_CALLBACK_1(kTime1165500, params->param4, 5, setup_playSound, "Har1104"); // Fallback to case 5 case 5: - TIME_CHECK_PLAYSOUND(kTime1174500, params->param5, 6, "Har1106"); + TIME_CHECK_CALLBACK_1(kTime1174500, params->param5, 6, setup_playSound, "Har1106"); // Fallback to case 6 case 6: -- cgit v1.2.3