LASTEXPRESS: Simplify some entity callback code

svn-id: r53690
This commit is contained in:
Julien Templier 2010-10-21 23:44:27 +00:00
parent af36047c71
commit 4466e2a20d
4 changed files with 8 additions and 8 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;