aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-09-08 10:48:22 +0200
committeruruk2013-09-08 10:48:22 +0200
commit8a4a5b3c56d86e846617f03703a8003dba2936ef (patch)
tree518dee217411a2d8d797f7d4616f4eb255f2b399 /engines
parent3f2ed1c803d36842b01320da28d4e68592317781 (diff)
downloadscummvm-rg350-8a4a5b3c56d86e846617f03703a8003dba2936ef.tar.gz
scummvm-rg350-8a4a5b3c56d86e846617f03703a8003dba2936ef.tar.bz2
scummvm-rg350-8a4a5b3c56d86e846617f03703a8003dba2936ef.zip
AVALANCHE: Renaming in timeout2.h
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/acci2.cpp26
-rw-r--r--engines/avalanche/animation.cpp18
-rw-r--r--engines/avalanche/avalanche.cpp6
-rw-r--r--engines/avalanche/avalot.cpp2
-rw-r--r--engines/avalanche/lucerna2.cpp28
-rw-r--r--engines/avalanche/scrolls2.cpp2
-rw-r--r--engines/avalanche/sequence2.cpp4
-rw-r--r--engines/avalanche/timeout2.cpp298
-rw-r--r--engines/avalanche/timeout2.h220
9 files changed, 279 insertions, 325 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index bdbb6174d3..2b223b7fd6 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -379,7 +379,7 @@ void Acci::storeInterrogation(byte interrogation) {
while ((_vm->_parser->_inputText.lastChar() == ' ') && (!_vm->_parser->_inputText.empty()))
_vm->_parser->_inputText.deleteLastChar();
- _vm->_timeout->lose_timer(_vm->_timeout->kReasonCardiffsurvey); // If you want to use any other timer, put this into the case statement.
+ _vm->_timeout->loseTimer(_vm->_timeout->kReasonCardiffsurvey); // If you want to use any other timer, put this into the case statement.
switch (interrogation) {
case 1:
@@ -419,7 +419,7 @@ void Acci::storeInterrogation(byte interrogation) {
}
if (interrogation < 4)
- _vm->_timeout->cardiff_survey();
+ _vm->_timeout->cardiffSurvey();
}
@@ -1041,7 +1041,7 @@ void Acci::notInOrder() {
void Acci::goToCauldron() {
_vm->_animation->tr[1]._callEachStepFl = false; // Stops Geida_Procs.
- _vm->_timeout->set_up_timer(1, _vm->_timeout->procspludwick_goes_to_cauldron, _vm->_timeout->kReasonSpludWalk);
+ _vm->_timeout->addTimer(1, _vm->_timeout->kProcSpludwickGoesToCauldron, _vm->_timeout->kReasonSpludWalk);
_vm->_animation->tr[1].walkto(2);
}
@@ -1143,7 +1143,7 @@ void Acci::standUp() {
_vm->_celer->drawBackgroundSprite(-1, -1, 4); // Picture of empty pillow.
_vm->_lucerna->incScore(1);
_vm->_gyro->_dna._avvyInBed = false;
- _vm->_timeout->lose_timer(_vm->_timeout->kReasonArkataShouts);
+ _vm->_timeout->loseTimer(_vm->_timeout->kReasonArkataShouts);
} else
already();
break;
@@ -1242,7 +1242,7 @@ void Acci::giveGeidaTheLute() {
_vm->_lucerna->refreshObjectList();
_vm->_visa->dixi('q', 64); // She plays it.
- _vm->_timeout->set_up_timer(1, _vm->_timeout->procgive_lute_to_geida, _vm->_timeout->kReasonGeidaSings);
+ _vm->_timeout->addTimer(1, _vm->_timeout->kProcGiveLuteToGeida, _vm->_timeout->kReasonGeidaSings);
_vm->_enid->backToBootstrap(4);
}
@@ -1259,7 +1259,7 @@ void Acci::winSequence() {
_vm->_sequence->thenShow(8);
_vm->_sequence->thenShow(9);
_vm->_sequence->startToClose();
- _vm->_timeout->set_up_timer(30, _vm->_timeout->procwinning, _vm->_timeout->kReasonWinning);
+ _vm->_timeout->addTimer(30, _vm->_timeout->kProcWinning, _vm->_timeout->kReasonWinning);
}
void Acci::personSpeaks() {
@@ -1682,7 +1682,7 @@ void Acci::doThat() {
case kVerbCodePee:
if (_vm->_gyro->setFlag('P')) {
_vm->_scrolls->displayText("Hmm, I don't think anyone will notice...");
- _vm->_timeout->set_up_timer(4, _vm->_timeout->procurinate, _vm->_timeout->kReasonGoToToilet);
+ _vm->_timeout->addTimer(4, _vm->_timeout->kProcUrinate, _vm->_timeout->kReasonGoToToilet);
} else
_vm->_scrolls->displayText(Common::String("It would be ") + _vm->_scrolls->kControlItalic + "VERY"
+ _vm->_scrolls->kControlRoman + " unwise to do that here, Avvy!");
@@ -1706,7 +1706,7 @@ void Acci::doThat() {
_vm->_animation->tr[1]._callEachStepFl = true;
_vm->_animation->tr[1]._eachStepProc = _vm->_animation->kProcBackAndForth;
_vm->_gyro->_dna._avariciusTalk = 14;
- _vm->_timeout->set_up_timer(177, _vm->_timeout->procavaricius_talks, _vm->_timeout->kReasonAvariciusTalks);
+ _vm->_timeout->addTimer(177, _vm->_timeout->kProcAvariciusTalks, _vm->_timeout->kReasonAvariciusTalks);
}
} else
_vm->_scrolls->displayText("Nothing appears to happen...");
@@ -1769,7 +1769,7 @@ void Acci::doThat() {
_vm->_celer->drawBackgroundSprite(-1, -1, 10);
_vm->_gyro->_dna._malagauche = 177;
- _vm->_timeout->set_up_timer(27, _vm->_timeout->procbuydrinks, _vm->_timeout->kReasonDrinks);
+ _vm->_timeout->addTimer(27, _vm->_timeout->kProcBuyDrinks, _vm->_timeout->kReasonDrinks);
break;
case 52:
examine();
@@ -1795,7 +1795,7 @@ void Acci::doThat() {
_vm->_celer->drawBackgroundSprite(-1, -1, 10);
_vm->_gyro->_dna._malagauche = 177;
- _vm->_timeout->set_up_timer(27, _vm->_timeout->procbuywine, _vm->_timeout->kReasonDrinks);
+ _vm->_timeout->addTimer(27, _vm->_timeout->kProcBuyWine, _vm->_timeout->kReasonDrinks);
}
break;
}
@@ -1892,7 +1892,7 @@ void Acci::doThat() {
else {
_vm->_lucerna->incScore(4);
_vm->_scrolls->displayText("The drawbridge opens!");
- _vm->_timeout->set_up_timer(7, _vm->_timeout->procopen_drawbridge, _vm->_timeout->kReasonDrawbridgeFalls);
+ _vm->_timeout->addTimer(7, _vm->_timeout->kProcOpenDrawbridge, _vm->_timeout->kReasonDrawbridgeFalls);
_vm->_gyro->_dna._drawbridgeOpen = 1;
}
} else
@@ -1944,7 +1944,7 @@ void Acci::doThat() {
_vm->_scrolls->displayText("Not with your head for heights, Avvy!");
break;
case kVerbCodeJump:
- _vm->_timeout->set_up_timer(1, _vm->_timeout->procjump, _vm->_timeout->kReasonJumping);
+ _vm->_timeout->addTimer(1, _vm->_timeout->kProcJump, _vm->_timeout->kReasonJumping);
_vm->_gyro->_dna._userMovesAvvy = false;
break;
case kVerbCodeHiscores:
@@ -1985,7 +1985,7 @@ void Acci::doThat() {
_vm->_scrolls->displayText("You're already sitting!");
else {
_vm->_animation->tr[0].walkto(4); // Move Avvy to the place, and sit him down.
- _vm->_timeout->set_up_timer(1, _vm->_timeout->procavvy_sit_down, _vm->_timeout->kReasonSittingDown);
+ _vm->_timeout->addTimer(1, _vm->_timeout->kProcAvvySitDown, _vm->_timeout->kReasonSittingDown);
}
} else { // Default doodah.
_vm->_lucerna->dusk();
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 127fbf9178..7fbcf892c1 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -840,7 +840,7 @@ void Animation::catamove(byte ped) {
// This proc gets called whenever you touch a line defined as _vm->_gyro->special.
void Animation::dawndelay() {
- _vm->_timeout->set_up_timer(2, _vm->_timeout->procdawn_delay, _vm->_timeout->kReasonDawndelay);
+ _vm->_timeout->addTimer(2, _vm->_timeout->kProcDawnDelay, _vm->_timeout->kReasonDawndelay);
}
void Animation::call_special(uint16 which) {
@@ -849,7 +849,7 @@ void Animation::call_special(uint16 which) {
_vm->_celer->drawBackgroundSprite(-1, -1, 1);
_vm->_gyro->_dna._brummieStairs = 1;
_vm->_gyro->_magics[9]._operation = _vm->_gyro->kMagicNothing;
- _vm->_timeout->set_up_timer(10, _vm->_timeout->procstairs, _vm->_timeout->kReasonBrummieStairs);
+ _vm->_timeout->addTimer(10, _vm->_timeout->kProcStairs, _vm->_timeout->kReasonBrummieStairs);
stopWalking();
_vm->_gyro->_dna._userMovesAvvy = false;
break;
@@ -883,7 +883,7 @@ void Animation::call_special(uint16 which) {
case 4: // This is the ghost room link.
_vm->_lucerna->dusk();
tr[0].turn(kDirRight); // you'll see this after we get back from bootstrap
- _vm->_timeout->set_up_timer(1, _vm->_timeout->procghost_room_phew, _vm->_timeout->kReasonGhostRoomPhew);
+ _vm->_timeout->addTimer(1, _vm->_timeout->kProcGhostRoomPhew, _vm->_timeout->kReasonGhostRoomPhew);
_vm->_enid->backToBootstrap(3);
break;
case 5:
@@ -901,7 +901,7 @@ void Animation::call_special(uint16 which) {
tr[1]._vanishIfStill = true;
tr[1]._doCheck = true; // One of them must have Check_Me switched on.
_vm->_gyro->_whereIs[_vm->_gyro->kPeopleFriarTuck - 150] = 177; // Not here, then.
- _vm->_timeout->set_up_timer(364, _vm->_timeout->prochang_around, _vm->_timeout->kReasonHangingAround);
+ _vm->_timeout->addTimer(364, _vm->_timeout->kProcHangAround, _vm->_timeout->kReasonHangingAround);
}
break;
case 6: // _vm->_gyro->special 6: fall down oubliette.
@@ -909,17 +909,17 @@ void Animation::call_special(uint16 which) {
tr[0]._moveX = 3;
tr[0]._moveY = 0;
tr[0]._facingDir = kDirRight;
- _vm->_timeout->set_up_timer(1, _vm->_timeout->procfall_down_oubliette, _vm->_timeout->kReasonFallingDownOubliette);
+ _vm->_timeout->addTimer(1, _vm->_timeout->kProcFallDownOubliette, _vm->_timeout->kReasonFallingDownOubliette);
break;
case 7: // _vm->_gyro->special 7: stop falling down oubliette.
tr[0]._visible = false;
_vm->_gyro->_magics[9]._operation = _vm->_gyro->kMagicNothing;
stopWalking();
- _vm->_timeout->lose_timer(_vm->_timeout->kReasonFallingDownOubliette);
+ _vm->_timeout->loseTimer(_vm->_timeout->kReasonFallingDownOubliette);
//_vm->_lucerna->mblit(12, 80, 38, 160, 3, 0);
//_vm->_lucerna->mblit(12, 80, 38, 160, 3, 1);
_vm->_scrolls->displayText("Oh dear, you seem to be down the bottom of an oubliette.");
- _vm->_timeout->set_up_timer(200, _vm->_timeout->procmeet_avaroid, _vm->_timeout->kReasonMeetingAvaroid);
+ _vm->_timeout->addTimer(200, _vm->_timeout->kProcMeetAvaroid, _vm->_timeout->kReasonMeetingAvaroid);
break;
case 8: // _vm->_gyro->special 8: leave du Lustie's room.
if ((_vm->_gyro->_dna._geidaFollows) && (!_vm->_gyro->_dna._lustieIsAsleep)) {
@@ -937,7 +937,7 @@ void Animation::call_special(uint16 which) {
tr[1].walkto(4); // She walks to somewhere...
tr[0].done(); // Lose Avvy.
_vm->_gyro->_dna._userMovesAvvy = false;
- _vm->_timeout->set_up_timer(40, _vm->_timeout->procrobin_hood_and_geida, _vm->_timeout->kReasonRobinHoodAndGeida);
+ _vm->_timeout->addTimer(40, _vm->_timeout->kProcRobinHoodAndGeida, _vm->_timeout->kReasonRobinHoodAndGeida);
break;
case 10: // _vm->_gyro->special 10: transfer north in catacombs.
if ((_vm->_gyro->_dna._catacombX == 4) && (_vm->_gyro->_dna._catacombY == 1)) {
@@ -1223,7 +1223,7 @@ void Animation::arrow_procs(byte tripnum) {
_vm->_lucerna->gameOver();
_vm->_gyro->_dna._userMovesAvvy = false; // Stop the user from moving him.
- _vm->_timeout->set_up_timer(55, _vm->_timeout->procnaughty_duke, _vm->_timeout->kReasonNaughtyDuke);
+ _vm->_timeout->addTimer(55, _vm->_timeout->kProcNaughtyDuke, _vm->_timeout->kReasonNaughtyDuke);
}
} else { // Arrow has hit the wall!
tr[tripnum].done(); // Deallocate the arrow.
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 3439165224..6d921ce6f5 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -335,9 +335,9 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) {
//blockwrite(f, times, sizeof(times)); // Timeout.times: Timers.
for (byte i = 0; i < 7; i++) {
- sz.syncAsSint32LE(_timeout->times[i].time_left);
- sz.syncAsByte(_timeout->times[i].then_where);
- sz.syncAsByte(_timeout->times[i].what_for);
+ sz.syncAsSint32LE(_timeout->_times[i]._timeLeft);
+ sz.syncAsByte(_timeout->_times[i]._thenWhere);
+ sz.syncAsByte(_timeout->_times[i]._whatFor);
}
//blockwrite(f, seq, sizeof(seq)); // Sequencer information.
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index ee805efb70..052619c48f 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -205,7 +205,7 @@ void Avalot::run(Common::String arg) {
_vm->_celer->updateBackgroundSprites();
_vm->_animation->animLink();
_vm->_lucerna->checkClick();
- _vm->_timeout->one_tick();
+ _vm->_timeout->updateTimer();
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index a6c6286b47..07fe6b4270 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -340,21 +340,21 @@ void Lucerna::exitRoom(byte x) {
switch (x) {
case r__spludwicks:
- _vm->_timeout->lose_timer(_vm->_timeout->kReasonAvariciusTalks);
+ _vm->_timeout->loseTimer(_vm->_timeout->kReasonAvariciusTalks);
_vm->_gyro->_dna._avariciusTalk = 0;
// He doesn't HAVE to be talking for this to work. It just deletes it IF it exists.
break;
case r__bridge:
if (_vm->_gyro->_dna._drawbridgeOpen > 0) {
_vm->_gyro->_dna._drawbridgeOpen = 4; // Fully open.
- _vm->_timeout->lose_timer(_vm->_timeout->kReasonDrawbridgeFalls);
+ _vm->_timeout->loseTimer(_vm->_timeout->kReasonDrawbridgeFalls);
}
break;
case r__outsidecardiffcastle:
- _vm->_timeout->lose_timer(_vm->_timeout->kReasonCardiffsurvey);
+ _vm->_timeout->loseTimer(_vm->_timeout->kReasonCardiffsurvey);
break;
case r__robins:
- _vm->_timeout->lose_timer(_vm->_timeout->kReasonGettingTiedUp);
+ _vm->_timeout->loseTimer(_vm->_timeout->kReasonGettingTiedUp);
break;
}
@@ -436,7 +436,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
if (_vm->_gyro->_dna._avvyInBed) {
_vm->_celer->drawBackgroundSprite(-1, -1, 3);
_vm->_graphics->refreshBackground();
- _vm->_timeout->set_up_timer(100, _vm->_timeout->procarkata_shouts, _vm->_timeout->kReasonArkataShouts);
+ _vm->_timeout->addTimer(100, _vm->_timeout->kProcArkataShouts, _vm->_timeout->kReasonArkataShouts);
}
break;
@@ -464,7 +464,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
_vm->_animation->tr[1].init(8, false, _vm->_animation);
_vm->_animation->apped(2, 2);
_vm->_animation->tr[1].walkto(4);
- _vm->_timeout->set_up_timer(20, _vm->_timeout->proccrapulus_splud_out, _vm->_timeout->kReasonCrapulusSaysSpludwickOut);
+ _vm->_timeout->addTimer(20, _vm->_timeout->kProcCrapulusSpludOut, _vm->_timeout->kReasonCrapulusSaysSpludwickOut);
_vm->_gyro->_dna._crapulusWillTell = false;
}
}
@@ -472,7 +472,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
case r__outsidespludwicks:
if ((_vm->_gyro->_dna._roomCount[r__outsidespludwicks] == 1) && (ped == 1)) {
- _vm->_timeout->set_up_timer(20, _vm->_timeout->procbang, _vm->_timeout->kReasonExplosion);
+ _vm->_timeout->addTimer(20, _vm->_timeout->kProcBang, _vm->_timeout->kReasonExplosion);
_vm->_gyro->_dna._spludwickAtHome = true;
}
break;
@@ -527,7 +527,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
_vm->_animation->tr[1]._vanishIfStill = true;
_vm->_gyro->_dna._passedCwytalotInHerts = true;
// _vm->_gyro->whereis[#157] = r__Nowhere; // can we fit this in?
- _vm->_timeout->set_up_timer(20, _vm->_timeout->proc_cwytalot_in_herts, _vm->_timeout->kReasonCwytalotInHerts);
+ _vm->_timeout->addTimer(20, _vm->_timeout->kProcCwytalotInHerts, _vm->_timeout->kReasonCwytalotInHerts);
}
break;
@@ -548,7 +548,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
_vm->_animation->tr[1].init(6, false, _vm->_animation);
_vm->_animation->apped(2, 2);
_vm->_animation->tr[1].walkto(3);
- _vm->_timeout->set_up_timer(36, _vm->_timeout->procget_tied_up, _vm->_timeout->kReasonGettingTiedUp);
+ _vm->_timeout->addTimer(36, _vm->_timeout->kProcGetTiedUp, _vm->_timeout->kReasonGettingTiedUp);
}
}
@@ -572,7 +572,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
_vm->_animation->tr[1].init(9, false, _vm->_animation);
_vm->_animation->apped(2, 2);
_vm->_animation->tr[1].walkto(3);
- _vm->_timeout->set_up_timer(47, _vm->_timeout->proccardiffsurvey, _vm->_timeout->kReasonCardiffsurvey);
+ _vm->_timeout->addTimer(47, _vm->_timeout->kProcCardiffSurvey, _vm->_timeout->kReasonCardiffsurvey);
}
break;
case 5 :
@@ -582,7 +582,7 @@ void Lucerna::enterRoom(byte room, byte ped) {
_vm->_animation->tr[1].init(9, false, _vm->_animation);
_vm->_animation->apped(2, 3);
_vm->_animation->tr[1]._facingDir = Animation::kDirRight;
- _vm->_timeout->set_up_timer(3, _vm->_timeout->proccardiff_return, _vm->_timeout->kReasonCardiffsurvey);
+ _vm->_timeout->addTimer(3, _vm->_timeout->kProcCardiffReturn, _vm->_timeout->kReasonCardiffsurvey);
}
}
if (_vm->_gyro->_dna._cardiffQuestionNum < 5)
@@ -650,10 +650,10 @@ void Lucerna::enterRoom(byte room, byte ped) {
case r__lustiesroom:
_vm->_gyro->_dna._dogFoodPos = 1; // Actually, du Lustie pos.
if (_vm->_animation->tr[0]._id == 0) // Avvy in his normal clothes
- _vm->_timeout->set_up_timer(3, _vm->_timeout->proccallsguards, _vm->_timeout->kReasonDuLustieTalks);
+ _vm->_timeout->addTimer(3, _vm->_timeout->kProcCallsGuards, _vm->_timeout->kReasonDuLustieTalks);
else if (! _vm->_gyro->_dna._enteredLustiesRoomAsMonk) // already
// Presumably, Avvy dressed as a monk.
- _vm->_timeout->set_up_timer(3, _vm->_timeout->procgreetsmonk, _vm->_timeout->kReasonDuLustieTalks);
+ _vm->_timeout->addTimer(3, _vm->_timeout->kProcGreetsMonk, _vm->_timeout->kReasonDuLustieTalks);
if (_vm->_gyro->_dna._geidaFollows) {
putGeidaAt(5, ped);
@@ -1190,7 +1190,7 @@ void Lucerna::gameOver() {
_vm->_animation->tr[0]._stepNum = 0;
_vm->_animation->tr[0].appear(sx, sy, 0);
- _vm->_timeout->set_up_timer(3, _vm->_timeout->procavalot_falls, _vm->_timeout->kReasonFallingOver);
+ _vm->_timeout->addTimer(3, _vm->_timeout->kProcAvalotFalls, _vm->_timeout->kReasonFallingOver);
_vm->_gyro->_alive = false;
}
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index 62f2fe3bf3..3c9fbefd51 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -219,7 +219,7 @@ void Scrolls::scrollModeMusic() {
setReadyLight(0);
_vm->_gyro->_seeScroll = false;
- _vm->_timeout->set_up_timer(8, _vm->_timeout->procjacques_wakes_up, _vm->_timeout->kReasonJacquesWakingUp);
+ _vm->_timeout->addTimer(8, _vm->_timeout->kProcJacquesWakesUp, _vm->_timeout->kReasonJacquesWakingUp);
warning("STUB: Scrolls::music_scroll()");
return;
#if 0
diff --git a/engines/avalanche/sequence2.cpp b/engines/avalanche/sequence2.cpp
index e233b1300a..8f8a3db391 100644
--- a/engines/avalanche/sequence2.cpp
+++ b/engines/avalanche/sequence2.cpp
@@ -69,8 +69,8 @@ void Sequence::thenFlip(byte where, byte ped) {
}
void Sequence::startToClose() {
- _vm->_timeout->lose_timer(_vm->_timeout->kReasonSequencer);
- _vm->_timeout->set_up_timer(7, _vm->_timeout->procsequence, _vm->_timeout->kReasonSequencer);
+ _vm->_timeout->loseTimer(_vm->_timeout->kReasonSequencer);
+ _vm->_timeout->addTimer(7, _vm->_timeout->kProcSequence, _vm->_timeout->kReasonSequencer);
}
void Sequence::startToOpen() {
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp
index df2ba941f3..5a73db20ca 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timeout2.cpp
@@ -47,163 +47,163 @@ Timeout::Timeout(AvalancheEngine *vm) {
_vm = vm;
for (byte i = 0; i < 7; i++) {
- times[i].time_left = 0;
- times[i].then_where = 0;
- times[i].what_for = 0;
+ _times[i]._timeLeft = 0;
+ _times[i]._thenWhere = 0;
+ _times[i]._whatFor = 0;
}
}
-void Timeout::set_up_timer(int32 howlong, byte whither, byte why) {
- if ((_vm->_gyro->isLoaded == false) || (timerLost == true)) {
+void Timeout::addTimer(int32 howlong, byte whither, byte why) {
+ if ((_vm->_gyro->isLoaded == false) || (_timerLost == true)) {
byte i = 0;
- while ((i < 7) && (times[i].time_left != 0))
+ while ((i < 7) && (_times[i]._timeLeft != 0))
i++;
if (i == 7)
return; // Oh dear...
// Everything's OK here!
- times[i].time_left = howlong;
- times[i].then_where = whither;
- times[i].what_for = why;
+ _times[i]._timeLeft = howlong;
+ _times[i]._thenWhere = whither;
+ _times[i]._whatFor = why;
} else {
_vm->_gyro->isLoaded = false;
return;
}
}
-void Timeout::one_tick() {
+void Timeout::updateTimer() {
if (_vm->_gyro->_dropdownActive)
return;
for (byte fv = 0; fv < 7; fv++) {
- if (times[fv].time_left > 0) {
- times[fv].time_left--;
+ if (_times[fv]._timeLeft > 0) {
+ _times[fv]._timeLeft--;
- if (times[fv].time_left == 0) {
- switch (times[fv].then_where) {
- case procopen_drawbridge :
- open_drawbridge();
+ if (_times[fv]._timeLeft == 0) {
+ switch (_times[fv]._thenWhere) {
+ case kProcOpenDrawbridge :
+ openDrawbridge();
break;
- case procavaricius_talks :
- avaricius_talks();
+ case kProcAvariciusTalks :
+ avariciusTalks();
break;
- case procurinate :
+ case kProcUrinate :
urinate();
break;
- case proctoilet2 :
- toilet2();
+ case kProcToilet :
+ toilet();
break;
- case procbang:
+ case kProcBang:
bang();
break;
- case procbang2:
+ case kProcBang2:
bang2();
break;
- case procstairs:
+ case kProcStairs:
stairs();
break;
- case proccardiffsurvey:
- cardiff_survey();
+ case kProcCardiffSurvey:
+ cardiffSurvey();
break;
- case proccardiff_return:
- cardiff_return();
+ case kProcCardiffReturn:
+ cardiffReturn();
break;
- case proc_cwytalot_in_herts:
- cwytalot_in_herts();
+ case kProcCwytalotInHerts:
+ cwytalotInHerts();
break;
- case procget_tied_up:
- get_tied_up();
+ case kProcGetTiedUp:
+ getTiedUp();
break;
- case procget_tied_up2:
- get_tied_up2();
+ case kProcGetTiedUp2:
+ getTiedUp2();
break;
- case prochang_around:
- hang_around();
+ case kProcHangAround:
+ hangAround();
break;
- case prochang_around2:
- hang_around2();
+ case kProcHangAround2:
+ hangAround2();
break;
- case procafter_the_shootemup:
- after_the_shootemup();
+ case kProcAfterTheShootemup:
+ afterTheShootemup();
break;
- case procjacques_wakes_up:
- jacques_wakes_up();
+ case kProcJacquesWakesUp:
+ jacquesWakesUp();
break;
- case procnaughty_duke:
- naughty_duke();
+ case kProcNaughtyDuke:
+ naughtyDuke();
break;
- case procnaughty_duke2:
- naughty_duke2();
+ case kProcNaughtyDuke2:
+ naughtyDuke2();
break;
- case procnaughty_duke3:
- naughty_duke3();
+ case kProcNaughtyDuke3:
+ naughtyDuke3();
break;
- case procjump:
+ case kProcJump:
jump();
break;
- case procsequence:
+ case kProcSequence:
_vm->_sequence->callSequencer();
break;
- case proccrapulus_splud_out:
- crapulus_says_splud_out();
+ case kProcCrapulusSpludOut:
+ crapulusSaysSpludOut();
break;
- case procdawn_delay:
+ case kProcDawnDelay:
_vm->_lucerna->dawn();
break;
- case procbuydrinks:
- buydrinks();
+ case kProcBuyDrinks:
+ buyDrinks();
break;
- case procbuywine:
- buywine();
+ case kProcBuyWine:
+ buyWine();
break;
- case proccallsguards:
- callsguards();
+ case kProcCallsGuards:
+ callsGuards();
break;
- case procgreetsmonk:
- greetsmonk();
+ case kProcGreetsMonk:
+ greetsMonk();
break;
- case procfall_down_oubliette:
- fall_down_oubliette();
+ case kProcFallDownOubliette:
+ fallDownOubliette();
break;
- case procmeet_avaroid:
- meet_avaroid();
+ case kProcMeetAvaroid:
+ meetAvaroid();
break;
- case procrise_up_oubliette:
- rise_up_oubliette();
+ case kProcRiseUpOubliette:
+ riseUpOubliette();
break;
- case procrobin_hood_and_geida:
- robin_hood_and_geida();
+ case kProcRobinHoodAndGeida:
+ robinHoodAndGeida();
break;
- case procrobin_hood_and_geida_talk:
- robin_hood_and_geida_talk();
+ case kProcRobinHoodAndGeidaTalk:
+ robinHoodAndGeidaTalk();
break;
- case procavalot_returns:
- avalot_returns();
+ case kProcAvalotReturns:
+ avalotReturns();
break;
- case procavvy_sit_down:
- avvy_sit_down();
+ case kProcAvvySitDown:
+ avvySitDown();
break;
- case procghost_room_phew:
- ghost_room_phew();
+ case kProcGhostRoomPhew:
+ ghostRoomPhew();
break;
- case procarkata_shouts:
- arkata_shouts();
+ case kProcArkataShouts:
+ arkataShouts();
break;
- case procwinning:
+ case kProcWinning:
winning();
break;
- case procavalot_falls:
- avalot_falls();
+ case kProcAvalotFalls:
+ avalotFalls();
break;
- case procspludwick_goes_to_cauldron:
- spludwick_goes_to_cauldron();
+ case kProcSpludwickGoesToCauldron:
+ spludwickGoesToCauldron();
break;
- case procspludwick_leaves_cauldron:
- spludwick_leaves_cauldron();
+ case kProcSpludwickLeavesCauldron:
+ spludwickLeavesCauldron();
break;
- case procgive_lute_to_geida:
- give_lute_to_geida();
+ case kProcGiveLuteToGeida:
+ giveLuteToGeida();
break;
}
}
@@ -213,31 +213,31 @@ void Timeout::one_tick() {
_vm->_gyro->_dna._totalTime++; // Total amount of time for this game.
}
-void Timeout::lose_timer(byte which) {
+void Timeout::loseTimer(byte which) {
for (byte fv = 0; fv < 7; fv++) {
- if (times[fv].what_for == which)
- times[fv].time_left = 0; // Cancel this one!
+ if (_times[fv]._whatFor == which)
+ _times[fv]._timeLeft = 0; // Cancel this one!
}
- timerLost = true;
+ _timerLost = true;
}
-void Timeout::open_drawbridge() {
+void Timeout::openDrawbridge() {
_vm->_gyro->_dna._drawbridgeOpen++;
_vm->_celer->drawBackgroundSprite(-1, -1, _vm->_gyro->_dna._drawbridgeOpen - 1);
if (_vm->_gyro->_dna._drawbridgeOpen == 4)
_vm->_gyro->_magics[1]._operation = _vm->_gyro->kMagicNothing; // You may enter the drawbridge.
else
- set_up_timer(7, procopen_drawbridge, kReasonDrawbridgeFalls);
+ addTimer(7, kProcOpenDrawbridge, kReasonDrawbridgeFalls);
}
-void Timeout::avaricius_talks() {
+void Timeout::avariciusTalks() {
_vm->_visa->dixi('q', _vm->_gyro->_dna._avariciusTalk);
_vm->_gyro->_dna._avariciusTalk++;
if (_vm->_gyro->_dna._avariciusTalk < 17)
- set_up_timer(177, procavaricius_talks, kReasonAvariciusTalks);
+ addTimer(177, kProcAvariciusTalks, kReasonAvariciusTalks);
else
_vm->_lucerna->incScore(3);
}
@@ -246,16 +246,16 @@ void Timeout::urinate() {
_vm->_animation->tr[0].turn(Animation::kDirUp);
_vm->_animation->stopWalking();
_vm->_lucerna->drawDirection();
- set_up_timer(14, proctoilet2, kReasonGoToToilet);
+ addTimer(14, kProcToilet, kReasonGoToToilet);
}
-void Timeout::toilet2() {
+void Timeout::toilet() {
_vm->_scrolls->displayText("That's better!");
}
void Timeout::bang() {
_vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlItalic) + "< BANG! >");
- set_up_timer(30, procbang2, kReasonExplosion);
+ addTimer(30, kProcBang2, kReasonExplosion);
}
void Timeout::bang2() {
@@ -272,7 +272,7 @@ void Timeout::stairs() {
_vm->_gyro->_magics[3]._operation = _vm->_gyro->kMagicNothing; // Stop them hitting the sides (or the game will hang.)
}
-void Timeout::cardiff_survey() {
+void Timeout::cardiffSurvey() {
if (_vm->_gyro->_dna._cardiffQuestionNum == 0) {
_vm->_gyro->_dna._cardiffQuestionNum++;
_vm->_visa->dixi('q', 27);
@@ -282,19 +282,19 @@ void Timeout::cardiff_survey() {
_vm->_gyro->_interrogation = _vm->_gyro->_dna._cardiffQuestionNum;
- set_up_timer(182, proccardiffsurvey, kReasonCardiffsurvey);
+ addTimer(182, kProcCardiffSurvey, kReasonCardiffsurvey);
}
-void Timeout::cardiff_return() {
+void Timeout::cardiffReturn() {
_vm->_visa->dixi('q', 28);
- cardiff_survey(); // Add end of question.
+ cardiffSurvey(); // Add end of question.
}
-void Timeout::cwytalot_in_herts() {
+void Timeout::cwytalotInHerts() {
_vm->_visa->dixi('q', 29);
}
-void Timeout::get_tied_up() {
+void Timeout::getTiedUp() {
_vm->_visa->dixi('q', 34); // ...Trouble!
_vm->_gyro->_dna._userMovesAvvy = false;
_vm->_gyro->_dna._beenTiedUp = true;
@@ -303,27 +303,27 @@ void Timeout::get_tied_up() {
_vm->_animation->tr[1].stophoming();
_vm->_animation->tr[1]._callEachStepFl = true;
_vm->_animation->tr[1]._eachStepProc = _vm->_animation->kProcGrabAvvy;
- set_up_timer(70, procget_tied_up2, kReasonGettingTiedUp);
+ addTimer(70, kProcGetTiedUp2, kReasonGettingTiedUp);
}
-void Timeout::get_tied_up2() {
+void Timeout::getTiedUp2() {
_vm->_animation->tr[0].walkto(4);
_vm->_animation->tr[1].walkto(5);
_vm->_gyro->_magics[3]._operation = _vm->_gyro->kMagicNothing; // No effect when you touch the boundaries.
_vm->_gyro->_dna._friarWillTieYouUp = true;
}
-void Timeout::hang_around() {
+void Timeout::hangAround() {
_vm->_animation->tr[1]._doCheck = false;
_vm->_animation->tr[0].init(7, true, _vm->_animation); // Robin Hood
_vm->_gyro->_whereIs[_vm->_gyro->kPeopleRobinHood - 150] = r__robins;
_vm->_animation->apped(1, 2);
_vm->_visa->dixi('q', 39);
_vm->_animation->tr[0].walkto(7);
- set_up_timer(55, prochang_around2, kReasonHangingAround);
+ addTimer(55, kProcHangAround2, kReasonHangingAround);
}
-void Timeout::hang_around2() {
+void Timeout::hangAround2() {
_vm->_visa->dixi('q', 40);
_vm->_animation->tr[1]._vanishIfStill = false;
_vm->_animation->tr[1].walkto(4);
@@ -332,7 +332,7 @@ void Timeout::hang_around2() {
_vm->_animation->tr[0].done();
_vm->_animation->tr[1].done(); // Get rid of Robin Hood and Friar Tuck.
- set_up_timer(1, procafter_the_shootemup, kReasonHangingAround);
+ addTimer(1, kProcAfterTheShootemup, kReasonHangingAround);
// Immediately call the following proc (when you have a chance).
_vm->_gyro->_dna._tiedUp = false;
@@ -340,7 +340,7 @@ void Timeout::hang_around2() {
_vm->_enid->backToBootstrap(1); // Call the shoot-'em-up.
}
-void Timeout::after_the_shootemup() {
+void Timeout::afterTheShootemup() {
_vm->_animation->fliproom(_vm->_gyro->_dna._room, 0);
// Only placed this here to replace the minigame. TODO: Remove it when the shoot em' up is implemented!
@@ -376,7 +376,7 @@ void Timeout::after_the_shootemup() {
_vm->_visa->dixi('q', 70);
}
-void Timeout::jacques_wakes_up() {
+void Timeout::jacquesWakesUp() {
_vm->_gyro->_dna._jacquesState++;
switch (_vm->_gyro->_dna._jacquesState) { // Additional pictures.
@@ -406,15 +406,15 @@ void Timeout::jacques_wakes_up() {
case 1:
case 2:
case 3:
- set_up_timer(12, procjacques_wakes_up, kReasonJacquesWakingUp);
+ addTimer(12, kProcJacquesWakesUp, kReasonJacquesWakingUp);
break;
case 4:
- set_up_timer(24, procjacques_wakes_up, kReasonJacquesWakingUp);
+ addTimer(24, kProcJacquesWakesUp, kReasonJacquesWakingUp);
break;
}
}
-void Timeout::naughty_duke() { // This is when the Duke comes in and takes your money.
+void Timeout::naughtyDuke() { // This is when the Duke comes in and takes your money.
_vm->_animation->tr[1].init(9, false, _vm->_animation); // Here comes the Duke.
_vm->_animation->apped(2, 1); // He starts at the door...
_vm->_animation->tr[1].walkto(3); // He walks over to you.
@@ -424,17 +424,17 @@ void Timeout::naughty_duke() { // This is when the Duke comes in and takes your
_vm->_sequence->firstShow(2);
_vm->_sequence->startToClose();
- set_up_timer(50, procnaughty_duke2, kReasonNaughtyDuke);
+ addTimer(50, kProcNaughtyDuke2, kReasonNaughtyDuke);
}
-void Timeout::naughty_duke2() {
+void Timeout::naughtyDuke2() {
_vm->_visa->dixi('q', 48); // "Ha ha, it worked again!"
_vm->_animation->tr[1].walkto(1); // Walk to the door.
_vm->_animation->tr[1]._vanishIfStill = true; // Then go away!
- set_up_timer(32, procnaughty_duke3, kReasonNaughtyDuke);
+ addTimer(32, kProcNaughtyDuke3, kReasonNaughtyDuke);
}
-void Timeout::naughty_duke3() {
+void Timeout::naughtyDuke3() {
_vm->_celer->drawBackgroundSprite(-1, -1, 1);
_vm->_sequence->firstShow(2);
_vm->_sequence->startToClose();
@@ -466,7 +466,7 @@ void Timeout::jump() {
_vm->_gyro->_dna._userMovesAvvy = true;
_vm->_gyro->_dna._jumpStatus = 0;
} else { // Still jumping.
- set_up_timer(1, procjump, kReasonJumping);
+ addTimer(1, kProcJump, kReasonJumping);
}
if ((_vm->_gyro->_dna._jumpStatus == 10) // You're at the highest point of your jump.
@@ -487,12 +487,12 @@ void Timeout::jump() {
}
}
-void Timeout::crapulus_says_splud_out() {
+void Timeout::crapulusSaysSpludOut() {
_vm->_visa->dixi('q', 56);
_vm->_gyro->_dna._crapulusWillTell = false;
}
-void Timeout::buydrinks() {
+void Timeout::buyDrinks() {
_vm->_celer->drawBackgroundSprite(-1, -1, 11); // Malagauche gets up again.
_vm->_gyro->_dna._malagauche = 0;
@@ -504,7 +504,7 @@ void Timeout::buydrinks() {
_vm->_acci->drink();
}
-void Timeout::buywine() {
+void Timeout::buyWine() {
_vm->_celer->drawBackgroundSprite(-1, -1, 11); // Malagauche gets up again.
_vm->_gyro->_dna._malagauche = 0;
@@ -518,24 +518,24 @@ void Timeout::buywine() {
}
}
-void Timeout::callsguards() {
+void Timeout::callsGuards() {
_vm->_visa->dixi('Q', 58); // "GUARDS!!!"
_vm->_lucerna->gameOver();
}
-void Timeout::greetsmonk() {
+void Timeout::greetsMonk() {
_vm->_visa->dixi('Q', 59);
_vm->_gyro->_dna._enteredLustiesRoomAsMonk = true;
}
-void Timeout::fall_down_oubliette() {
+void Timeout::fallDownOubliette() {
_vm->_gyro->_magics[8]._operation = _vm->_gyro->kMagicNothing;
_vm->_animation->tr[0]._moveY++; // Increments dx/dy!
_vm->_animation->tr[0]._y += _vm->_animation->tr[0]._moveY; // Dowwwn we go...
- set_up_timer(3, procfall_down_oubliette, kReasonFallingDownOubliette);
+ addTimer(3, kProcFallDownOubliette, kReasonFallingDownOubliette);
}
-void Timeout::meet_avaroid() {
+void Timeout::meetAvaroid() {
if (_vm->_gyro->_dna._metAvaroid) {
_vm->_scrolls->displayText(Common::String("You can't expect to be ") + _vm->_scrolls->kControlItalic + "that"
+ _vm->_scrolls->kControlRoman + " lucky twice in a row!");
@@ -543,7 +543,7 @@ void Timeout::meet_avaroid() {
} else {
_vm->_visa->dixi('Q', 60);
_vm->_gyro->_dna._metAvaroid = true;
- set_up_timer(1, procrise_up_oubliette, kReasonRisingUpOubliette);
+ addTimer(1, kProcRiseUpOubliette, kReasonRisingUpOubliette);
_vm->_animation->tr[0]._facingDir = Animation::kDirLeft;
_vm->_animation->tr[0]._x = 151;
@@ -554,36 +554,36 @@ void Timeout::meet_avaroid() {
}
}
-void Timeout::rise_up_oubliette() {
+void Timeout::riseUpOubliette() {
_vm->_animation->tr[0]._visible = true;
_vm->_animation->tr[0]._moveY++; // Decrements dx/dy!
_vm->_animation->tr[0]._y -= _vm->_animation->tr[0]._moveY; // Uuuupppp we go...
if (_vm->_animation->tr[0]._moveY > 0)
- set_up_timer(3, procrise_up_oubliette, kReasonRisingUpOubliette);
+ addTimer(3, kProcRiseUpOubliette, kReasonRisingUpOubliette);
else
_vm->_gyro->_dna._userMovesAvvy = true;
}
-void Timeout::robin_hood_and_geida() {
+void Timeout::robinHoodAndGeida() {
_vm->_animation->tr[0].init(7, true, _vm->_animation);
_vm->_animation->apped(1, 7);
_vm->_animation->tr[0].walkto(6);
_vm->_animation->tr[1].stopWalk();
_vm->_animation->tr[1]._facingDir = Animation::kDirLeft;
- set_up_timer(20, procrobin_hood_and_geida_talk, kReasonRobinHoodAndGeida);
+ addTimer(20, kProcRobinHoodAndGeidaTalk, kReasonRobinHoodAndGeida);
_vm->_gyro->_dna._geidaFollows = false;
}
-void Timeout::robin_hood_and_geida_talk() {
+void Timeout::robinHoodAndGeidaTalk() {
_vm->_visa->dixi('q', 66);
_vm->_animation->tr[0].walkto(2);
_vm->_animation->tr[1].walkto(2);
_vm->_animation->tr[0]._vanishIfStill = true;
_vm->_animation->tr[1]._vanishIfStill = true;
- set_up_timer(162, procavalot_returns, kReasonRobinHoodAndGeida);
+ addTimer(162, kProcAvalotReturns, kReasonRobinHoodAndGeida);
}
-void Timeout::avalot_returns() {
+void Timeout::avalotReturns() {
_vm->_animation->tr[0].done();
_vm->_animation->tr[1].done();
_vm->_animation->tr[0].init(0, true, _vm->_animation);
@@ -592,10 +592,10 @@ void Timeout::avalot_returns() {
_vm->_gyro->_dna._userMovesAvvy = true;
}
-void Timeout::avvy_sit_down() {
+void Timeout::avvySitDown() {
// This is used when you sit down in the pub in Notts. It loops around so that it will happen when Avvy stops walking.
if (_vm->_animation->tr[0]._homing) // Still walking.
- set_up_timer(1, procavvy_sit_down, kReasonSittingDown);
+ addTimer(1, kProcAvvySitDown, kReasonSittingDown);
else {
_vm->_celer->drawBackgroundSprite(-1, -1, 3);
_vm->_gyro->_dna._sittingInPub = true;
@@ -604,18 +604,18 @@ void Timeout::avvy_sit_down() {
}
}
-void Timeout::ghost_room_phew() {
+void Timeout::ghostRoomPhew() {
_vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlItalic) + "PHEW!" + _vm->_scrolls->kControlRoman
+ " You're glad to get out of " + _vm->_scrolls->kControlItalic + "there!");
}
-void Timeout::arkata_shouts() {
+void Timeout::arkataShouts() {
if (_vm->_gyro->_dna._teetotal)
return;
_vm->_visa->dixi('q', 76);
- set_up_timer(160, procarkata_shouts, kReasonArkataShouts);
+ addTimer(160, kProcArkataShouts, kReasonArkataShouts);
}
void Timeout::winning() {
@@ -635,10 +635,10 @@ void Timeout::winning() {
_vm->_gyro->_letMeOut = true;
}
-void Timeout::avalot_falls() {
+void Timeout::avalotFalls() {
if (_vm->_animation->tr[0]._stepNum < 5) {
_vm->_animation->tr[0]._stepNum++;
- set_up_timer(3, procavalot_falls, kReasonFallingOver);
+ addTimer(3, kProcAvalotFalls, kReasonFallingOver);
} else {
Common::String toDisplay;
for (byte i = 0; i < 6; i++)
@@ -650,18 +650,18 @@ void Timeout::avalot_falls() {
}
}
-void Timeout::spludwick_goes_to_cauldron() {
+void Timeout::spludwickGoesToCauldron() {
if (_vm->_animation->tr[1]._homing)
- set_up_timer(1, procspludwick_goes_to_cauldron, kReasonSpludWalk);
+ addTimer(1, kProcSpludwickGoesToCauldron, kReasonSpludWalk);
else
- set_up_timer(17, procspludwick_leaves_cauldron, kReasonSpludWalk);
+ addTimer(17, kProcSpludwickLeavesCauldron, kReasonSpludWalk);
}
-void Timeout::spludwick_leaves_cauldron() {
+void Timeout::spludwickLeavesCauldron() {
_vm->_animation->tr[1]._callEachStepFl = true; // So that normal procs will continue.
}
-void Timeout::give_lute_to_geida() { // Moved here from Acci.
+void Timeout::giveLuteToGeida() { // Moved here from Acci.
_vm->_visa->dixi('Q', 86);
_vm->_lucerna->incScore(4);
_vm->_gyro->_dna._lustieIsAsleep = true;
diff --git a/engines/avalanche/timeout2.h b/engines/avalanche/timeout2.h
index 8536fefe2c..a2223e7275 100644
--- a/engines/avalanche/timeout2.h
+++ b/engines/avalanche/timeout2.h
@@ -69,156 +69,110 @@ public:
kReasonGeidaSings = 28
};
- // procx now runs between 1 and 41.
-
- static const int16 procopen_drawbridge = 3;
- static const int16 procavaricius_talks = 4;
- static const int16 procurinate = 5;
- static const int16 proctoilet2 = 6;
- static const int16 procbang = 7;
- static const int16 procbang2 = 8;
- static const int16 procstairs = 9;
- static const int16 proccardiffsurvey = 10;
- static const int16 proccardiff_return = 11;
- static const int16 proc_cwytalot_in_herts = 12;
- static const int16 procget_tied_up = 13;
- static const int16 procget_tied_up2 = 1;
- static const int16 prochang_around = 14;
- static const int16 prochang_around2 = 15;
- static const int16 procafter_the_shootemup = 32;
- static const int16 procjacques_wakes_up = 16;
- static const int16 procnaughty_duke = 17;
- static const int16 procnaughty_duke2 = 18;
- static const int16 procnaughty_duke3 = 38;
- static const int16 procjump = 19;
- static const int16 procsequence = 20;
- static const int16 proccrapulus_splud_out = 21;
- static const int16 procdawn_delay = 22;
- static const int16 procbuydrinks = 23;
- static const int16 procbuywine = 24;
- static const int16 proccallsguards = 25;
- static const int16 procgreetsmonk = 26;
- static const int16 procfall_down_oubliette = 27;
- static const int16 procmeet_avaroid = 28;
- static const int16 procrise_up_oubliette = 29;
- static const int16 procrobin_hood_and_geida = 2;
- static const int16 procrobin_hood_and_geida_talk = 30;
- static const int16 procavalot_returns = 31;
- static const int16 procavvy_sit_down = 33; // In Nottingham.
- static const int16 procghost_room_phew = 34;
- static const int16 procarkata_shouts = 35;
- static const int16 procwinning = 36;
- static const int16 procavalot_falls = 37;
- static const int16 procspludwick_goes_to_cauldron = 39;
- static const int16 procspludwick_leaves_cauldron = 40;
- static const int16 procgive_lute_to_geida = 41;
-
- struct timetype {
- int32 time_left;
- byte then_where;
- byte what_for;
+ // Proc runs between 1 and 41.
+ enum Proc {
+ kProcOpenDrawbridge = 3,
+ kProcAvariciusTalks = 4,
+ kProcUrinate = 5,
+ kProcToilet = 6,
+ kProcBang = 7,
+ kProcBang2 = 8,
+ kProcStairs = 9,
+ kProcCardiffSurvey = 10,
+ kProcCardiffReturn = 11,
+ kProcCwytalotInHerts = 12,
+ kProcGetTiedUp = 13,
+ kProcGetTiedUp2 = 1,
+ kProcHangAround = 14,
+ kProcHangAround2 = 15,
+ kProcAfterTheShootemup = 32,
+ kProcJacquesWakesUp = 16,
+ kProcNaughtyDuke = 17,
+ kProcNaughtyDuke2 = 18,
+ kProcNaughtyDuke3 = 38,
+ kProcJump = 19,
+ kProcSequence = 20,
+ kProcCrapulusSpludOut = 21,
+ kProcDawnDelay = 22,
+ kProcBuyDrinks = 23,
+ kProcBuyWine = 24,
+ kProcCallsGuards = 25,
+ kProcGreetsMonk = 26,
+ kProcFallDownOubliette = 27,
+ kProcMeetAvaroid = 28,
+ kProcRiseUpOubliette = 29,
+ kProcRobinHoodAndGeida = 2,
+ kProcRobinHoodAndGeidaTalk = 30,
+ kProcAvalotReturns = 31,
+ kProcAvvySitDown = 33, // In Nottingham.
+ kProcGhostRoomPhew = 34,
+ kProcArkataShouts = 35,
+ kProcWinning = 36,
+ kProcAvalotFalls = 37,
+ kProcSpludwickGoesToCauldron = 39,
+ kProcSpludwickLeavesCauldron = 40,
+ kProcGiveLuteToGeida = 41
};
+ struct TimeType {
+ int32 _timeLeft;
+ byte _thenWhere;
+ byte _whatFor;
+ };
-
- timetype times[7];
-
- bool timerLost; // Is the timer "lost"? (Because of using lose_timer())
-
-
+ TimeType _times[7];
+ bool _timerLost; // Is the timer "lost"? (Because of using loseTimer())
Timeout(AvalancheEngine *vm);
- void setParent(AvalancheEngine *vm);
-
- void set_up_timer(int32 howlong, byte whither, byte why);
-
- void one_tick();
-
- void lose_timer(byte which);
+ void addTimer(int32 howlong, byte whither, byte why); // Original: set_up_timer()
+ void updateTimer(); // Original: one_tick()
+ void loseTimer(byte which);
// Procedures to do things at the end of amounts of time:
-
- void open_drawbridge();
-
- void avaricius_talks();
-
+ void openDrawbridge();
+ void avariciusTalks();
void urinate();
-
- void toilet2();
-
+ void toilet();
void bang();
-
void bang2();
-
void stairs();
-
- void cardiff_survey();
-
- void cardiff_return();
-
- void cwytalot_in_herts();
-
- void get_tied_up();
-
- void get_tied_up2();
-
- void hang_around();
-
- void hang_around2();
-
- void after_the_shootemup();
-
- void jacques_wakes_up();
-
- void naughty_duke();
-
- void naughty_duke2();
-
- void naughty_duke3();
-
+ void cardiffSurvey();
+ void cardiffReturn();
+ void cwytalotInHerts();
+ void getTiedUp();
+ void getTiedUp2();
+ void hangAround();
+ void hangAround2();
+ void afterTheShootemup();
+ void jacquesWakesUp();
+ void naughtyDuke();
+ void naughtyDuke2();
+ void naughtyDuke3();
void jump();
-
- void crapulus_says_splud_out();
-
- void buydrinks();
-
- void buywine();
-
- void callsguards();
-
- void greetsmonk();
-
- void fall_down_oubliette();
-
- void meet_avaroid();
-
- void rise_up_oubliette();
-
- void robin_hood_and_geida();
-
- void robin_hood_and_geida_talk();
-
- void avalot_returns();
-
- void avvy_sit_down();
-
- void ghost_room_phew();
-
- void arkata_shouts();
-
+ void crapulusSaysSpludOut();
+ void buyDrinks();
+ void buyWine();
+ void callsGuards();
+ void greetsMonk();
+ void fallDownOubliette();
+ void meetAvaroid();
+ void riseUpOubliette();
+ void robinHoodAndGeida();
+ void robinHoodAndGeidaTalk();
+ void avalotReturns();
+ void avvySitDown();
+ void ghostRoomPhew();
+ void arkataShouts();
void winning();
-
- void avalot_falls();
-
- void spludwick_goes_to_cauldron();
-
- void spludwick_leaves_cauldron();
-
- void give_lute_to_geida();
+ void avalotFalls();
+ void spludwickGoesToCauldron();
+ void spludwickLeavesCauldron();
+ void giveLuteToGeida();
private:
AvalancheEngine *_vm;
+
};
} // End of namespace Avalanche.