diff options
author | Julien Templier | 2010-10-21 23:44:27 +0000 |
---|---|---|
committer | Julien Templier | 2010-10-21 23:44:27 +0000 |
commit | 4466e2a20db1ef0ec92b12dc631d1593c315e471 (patch) | |
tree | 47208925cfdcfb608183dee59ec14e8fc139c453 /engines | |
parent | af36047c715e7bffaa36de2c0018dbf1cb88d284 (diff) | |
download | scummvm-rg350-4466e2a20db1ef0ec92b12dc631d1593c315e471.tar.gz scummvm-rg350-4466e2a20db1ef0ec92b12dc631d1593c315e471.tar.bz2 scummvm-rg350-4466e2a20db1ef0ec92b12dc631d1593c315e471.zip |
LASTEXPRESS: Simplify some entity callback code
svn-id: r53690
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lastexpress/entities/coudert.cpp | 2 | ||||
-rw-r--r-- | engines/lastexpress/entities/francois.cpp | 4 | ||||
-rw-r--r-- | engines/lastexpress/entities/kahina.cpp | 8 | ||||
-rw-r--r-- | engines/lastexpress/entities/milos.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index e4f7cad068..780a8bafae 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -1346,7 +1346,7 @@ IMPLEMENT_FUNCTION(26, Coudert, function26) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityCoudert); - setCallback(getCallback() == 3 ? 4 : 8); + setCallback(getCallback() + 1); setup_function20(kObjectCompartmentD, kObject51); break; diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index cffcb20f22..169192f275 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -669,13 +669,13 @@ IMPLEMENT_FUNCTION_IIS(14, Francois, function14, ObjectIndex, EntityPosition) case 3: case 5: - setCallback(getCallback() == 3 ? 4 : 6); + setCallback(getCallback() + 1); setup_updateFromTime(rnd(450)); break; case 4: case 6: - setCallback(getCallback() == 4 ? 5 : 7); + setCallback(getCallback() + 1); setup_playSound(rnd(2) ? "Fra2005B" : "Fra2005C"); break; diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index 2180ea2a0d..eda3ca6af7 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -665,13 +665,13 @@ label_callback_3: getObjects()->update(kObjectCompartmentKronos, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); getScenes()->loadSceneFromPosition(kCarKronos, 80, 1); - setCallback(getCallback() == 1 ? 2 : 5); + setCallback(getCallback() + 1); setup_updateFromTime(900); break; case 2: case 5: - setCallback(getCallback() == 2 ? 3 : 6); + setCallback(getCallback() + 1); setup_playSound("KRO3005"); break; @@ -1274,7 +1274,7 @@ IMPLEMENT_FUNCTION(25, Kahina, function25) case 1: case 4: if (getEntities()->isPlayerInCar(kCarGreenSleeping)) { - setCallback(getCallback() == 1 ? 2 : 5); + setCallback(getCallback() + 1); setup_function19(getCallback() == 1 ? kCarGreenSleeping : kCarKronos, getCallback() == 1 ? kPosition_9460 : kPosition_9270); break; } else { @@ -1361,7 +1361,7 @@ IMPLEMENT_FUNCTION(25, Kahina, function25) case 12: getData()->location = kLocationOutsideCompartment; - setCallback(getCallback() == 10 ? 11 : 13); + setCallback(getCallback() + 1); setup_updateEntity(kCarKronos, kPosition_9270); break; } diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index f1c97a8fe3..0b4afc109f 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -621,7 +621,7 @@ label_callback_12: getState()->time += 1800; getProgress().field_CC = 1; - setCallback(getCallback() == 4 ? 5 : 19); + setCallback(getCallback() + 1); setup_savegame(kSavegameTypeEvent, kEventMilosTylerCompartmentDefeat); } break; |