aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/acci2.cpp30
-rw-r--r--engines/avalanche/animation.cpp20
-rw-r--r--engines/avalanche/animation.h2
-rw-r--r--engines/avalanche/avalanche.cpp10
-rw-r--r--engines/avalanche/avalanche.h4
-rw-r--r--engines/avalanche/avalot.cpp4
-rw-r--r--engines/avalanche/enid2.cpp2
-rw-r--r--engines/avalanche/lucerna2.cpp30
-rw-r--r--engines/avalanche/module.mk2
-rw-r--r--engines/avalanche/scrolls2.cpp4
-rw-r--r--engines/avalanche/sequence2.cpp6
-rw-r--r--engines/avalanche/sequence2.h2
-rw-r--r--engines/avalanche/timer.cpp (renamed from engines/avalanche/timeout2.cpp)94
-rw-r--r--engines/avalanche/timer.h (renamed from engines/avalanche/timeout2.h)16
14 files changed, 113 insertions, 113 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index 3691ae9afc..fe7296782d 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -34,7 +34,7 @@
#include "avalanche/lucerna2.h"
#include "avalanche/scrolls2.h"
#include "avalanche/visa2.h"
-#include "avalanche/timeout2.h"
+#include "avalanche/timer.h"
#include "avalanche/animation.h"
#include "avalanche/enid2.h"
#include "avalanche/celer2.h"
@@ -379,7 +379,7 @@ void Acci::storeInterrogation(byte interrogation) {
while ((_vm->_parser->_inputText.lastChar() == ' ') && (!_vm->_parser->_inputText.empty()))
_vm->_parser->_inputText.deleteLastChar();
- _vm->_timeout->loseTimer(_vm->_timeout->kReasonCardiffsurvey); // If you want to use any other timer, put this into the case statement.
+ _vm->_timer->loseTimer(_vm->_timer->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->cardiffSurvey();
+ _vm->_timer->cardiffSurvey();
}
@@ -1041,7 +1041,7 @@ void Acci::notInOrder() {
void Acci::goToCauldron() {
_vm->_animation->tr[1]._callEachStepFl = false; // Stops Geida_Procs.
- _vm->_timeout->addTimer(1, _vm->_timeout->kProcSpludwickGoesToCauldron, _vm->_timeout->kReasonSpludWalk);
+ _vm->_timer->addTimer(1, _vm->_timer->kProcSpludwickGoesToCauldron, _vm->_timer->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->loseTimer(_vm->_timeout->kReasonArkataShouts);
+ _vm->_timer->loseTimer(_vm->_timer->kReasonArkataShouts);
} else
already();
break;
@@ -1242,7 +1242,7 @@ void Acci::giveGeidaTheLute() {
_vm->_lucerna->refreshObjectList();
_vm->_visa->displayScrollChain('q', 64); // She plays it.
- _vm->_timeout->addTimer(1, _vm->_timeout->kProcGiveLuteToGeida, _vm->_timeout->kReasonGeidaSings);
+ _vm->_timer->addTimer(1, _vm->_timer->kProcGiveLuteToGeida, _vm->_timer->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->addTimer(30, _vm->_timeout->kProcWinning, _vm->_timeout->kReasonWinning);
+ _vm->_timer->addTimer(30, _vm->_timer->kProcWinning, _vm->_timer->kReasonWinning);
}
void Acci::personSpeaks() {
@@ -1506,7 +1506,7 @@ void Acci::doThat() {
case kVerbCodeQuit: // quit
if (_vm->_gyro->kDemo) {
warning("STUB: Acci::doThat() - case kVerbCodequit");
- // _vm->_visa->dixi('pos', 31);
+ // _vm->_visa->displayScrollChain('pos', 31);
// close(demofile);
// exit(0); // Change this later!!!
}
@@ -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->addTimer(4, _vm->_timeout->kProcUrinate, _vm->_timeout->kReasonGoToToilet);
+ _vm->_timer->addTimer(4, _vm->_timer->kProcUrinate, _vm->_timer->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->addTimer(177, _vm->_timeout->kProcAvariciusTalks, _vm->_timeout->kReasonAvariciusTalks);
+ _vm->_timer->addTimer(177, _vm->_timer->kProcAvariciusTalks, _vm->_timer->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->addTimer(27, _vm->_timeout->kProcBuyDrinks, _vm->_timeout->kReasonDrinks);
+ _vm->_timer->addTimer(27, _vm->_timer->kProcBuyDrinks, _vm->_timer->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->addTimer(27, _vm->_timeout->kProcBuyWine, _vm->_timeout->kReasonDrinks);
+ _vm->_timer->addTimer(27, _vm->_timer->kProcBuyWine, _vm->_timer->kReasonDrinks);
}
break;
}
@@ -1892,7 +1892,7 @@ void Acci::doThat() {
else {
_vm->_lucerna->incScore(4);
_vm->_scrolls->displayText("The drawbridge opens!");
- _vm->_timeout->addTimer(7, _vm->_timeout->kProcOpenDrawbridge, _vm->_timeout->kReasonDrawbridgeFalls);
+ _vm->_timer->addTimer(7, _vm->_timer->kProcOpenDrawbridge, _vm->_timer->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->addTimer(1, _vm->_timeout->kProcJump, _vm->_timeout->kReasonJumping);
+ _vm->_timer->addTimer(1, _vm->_timer->kProcJump, _vm->_timer->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->addTimer(1, _vm->_timeout->kProcAvvySitDown, _vm->_timeout->kReasonSittingDown);
+ _vm->_timer->addTimer(1, _vm->_timer->kProcAvvySitDown, _vm->_timer->kReasonSittingDown);
}
} else { // Default doodah.
_vm->_lucerna->dusk();
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 68266f366d..df8724feb5 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -36,7 +36,7 @@
#include "avalanche/gyro2.h"
#include "avalanche/celer2.h"
#include "avalanche/sequence2.h"
-#include "avalanche/timeout2.h"
+#include "avalanche/timer.h"
#include "avalanche/enid2.h"
#include "common/scummsys.h"
@@ -834,7 +834,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->addTimer(2, _vm->_timeout->kProcDawnDelay, _vm->_timeout->kReasonDawndelay);
+ _vm->_timer->addTimer(2, _vm->_timer->kProcDawnDelay, _vm->_timer->kReasonDawndelay);
}
void Animation::call_special(uint16 which) {
@@ -843,7 +843,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->addTimer(10, _vm->_timeout->kProcStairs, _vm->_timeout->kReasonBrummieStairs);
+ _vm->_timer->addTimer(10, _vm->_timer->kProcStairs, _vm->_timer->kReasonBrummieStairs);
stopWalking();
_vm->_gyro->_dna._userMovesAvvy = false;
break;
@@ -877,7 +877,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->addTimer(1, _vm->_timeout->kProcGhostRoomPhew, _vm->_timeout->kReasonGhostRoomPhew);
+ _vm->_timer->addTimer(1, _vm->_timer->kProcGhostRoomPhew, _vm->_timer->kReasonGhostRoomPhew);
_vm->_enid->backToBootstrap(3);
break;
case 5:
@@ -895,7 +895,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->addTimer(364, _vm->_timeout->kProcHangAround, _vm->_timeout->kReasonHangingAround);
+ _vm->_timer->addTimer(364, _vm->_timer->kProcHangAround, _vm->_timer->kReasonHangingAround);
}
break;
case 6: // _vm->_gyro->special 6: fall down oubliette.
@@ -903,17 +903,17 @@ void Animation::call_special(uint16 which) {
tr[0]._moveX = 3;
tr[0]._moveY = 0;
tr[0]._facingDir = kDirRight;
- _vm->_timeout->addTimer(1, _vm->_timeout->kProcFallDownOubliette, _vm->_timeout->kReasonFallingDownOubliette);
+ _vm->_timer->addTimer(1, _vm->_timer->kProcFallDownOubliette, _vm->_timer->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->loseTimer(_vm->_timeout->kReasonFallingDownOubliette);
+ _vm->_timer->loseTimer(_vm->_timer->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->addTimer(200, _vm->_timeout->kProcMeetAvaroid, _vm->_timeout->kReasonMeetingAvaroid);
+ _vm->_timer->addTimer(200, _vm->_timer->kProcMeetAvaroid, _vm->_timer->kReasonMeetingAvaroid);
break;
case 8: // _vm->_gyro->special 8: leave du Lustie's room.
if ((_vm->_gyro->_dna._geidaFollows) && (!_vm->_gyro->_dna._lustieIsAsleep)) {
@@ -931,7 +931,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->addTimer(40, _vm->_timeout->kProcRobinHoodAndGeida, _vm->_timeout->kReasonRobinHoodAndGeida);
+ _vm->_timer->addTimer(40, _vm->_timer->kProcRobinHoodAndGeida, _vm->_timer->kReasonRobinHoodAndGeida);
break;
case 10: // _vm->_gyro->special 10: transfer north in catacombs.
if ((_vm->_gyro->_dna._catacombX == 4) && (_vm->_gyro->_dna._catacombY == 1)) {
@@ -1217,7 +1217,7 @@ void Animation::arrow_procs(byte tripnum) {
_vm->_lucerna->gameOver();
_vm->_gyro->_dna._userMovesAvvy = false; // Stop the user from moving him.
- _vm->_timeout->addTimer(55, _vm->_timeout->kProcNaughtyDuke, _vm->_timeout->kReasonNaughtyDuke);
+ _vm->_timer->addTimer(55, _vm->_timer->kProcNaughtyDuke, _vm->_timer->kReasonNaughtyDuke);
}
} else { // Arrow has hit the wall!
tr[tripnum].done(); // Deallocate the arrow.
diff --git a/engines/avalanche/animation.h b/engines/avalanche/animation.h
index 72c86a48de..b820d2d808 100644
--- a/engines/avalanche/animation.h
+++ b/engines/avalanche/animation.h
@@ -25,7 +25,7 @@
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
*/
-/* Original name TRIP5 / Trippancy V - the sprite animation subsystem */
+/* Original name: TRIP5 / Trippancy V - the sprite animation subsystem */
#ifndef AVALANCHE_ANIMATION_H
#define AVALANCHE_ANIMATION_H
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 2e7b7f3115..b28fe7fb5f 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -69,7 +69,7 @@ AvalancheEngine::~AvalancheEngine() {
delete _enid;
delete _celer;
delete _sequence;
- delete _timeout;
+ delete _timer;
delete _animation;
delete _acci;
delete _dropdown;
@@ -90,7 +90,7 @@ Common::ErrorCode AvalancheEngine::initialize() {
_enid = new Enid(this);
_celer = new Celer(this);
_sequence = new Sequence(this);
- _timeout = new Timeout(this);
+ _timer = new Timer(this);
_animation = new Animation(this);
_acci = new Acci(this);
_dropdown = new Dropdown(this);
@@ -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]._timeLeft);
- sz.syncAsByte(_timeout->_times[i]._action);
- sz.syncAsByte(_timeout->_times[i]._reason);
+ sz.syncAsSint32LE(_timer->_times[i]._timeLeft);
+ sz.syncAsByte(_timer->_times[i]._action);
+ sz.syncAsByte(_timer->_times[i]._reason);
}
//blockwrite(f, seq, sizeof(seq)); // Sequencer information.
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 1973f9b6ff..998363a242 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -42,7 +42,7 @@
#include "avalanche/enid2.h"
#include "avalanche/celer2.h"
#include "avalanche/sequence2.h"
-#include "avalanche/timeout2.h"
+#include "avalanche/timer.h"
#include "avalanche/animation.h"
#include "avalanche/acci2.h"
#include "avalanche/dropdown2.h"
@@ -79,7 +79,7 @@ public:
Enid *_enid;
Celer *_celer;
Sequence *_sequence;
- Timeout *_timeout;
+ Timer *_timer;
Animation *_animation;
Acci *_acci;
Dropdown *_dropdown;
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index e0e05144c4..a4392383b1 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -38,7 +38,7 @@
#include "avalanche/scrolls2.h"
#include "avalanche/dropdown2.h"
#include "avalanche/pingo2.h"
-#include "avalanche/timeout2.h"
+#include "avalanche/timer.h"
#include "avalanche/celer2.h"
#include "avalanche/enid2.h"
#include "avalanche/visa2.h"
@@ -205,7 +205,7 @@ void Avalot::run(Common::String arg) {
_vm->_celer->updateBackgroundSprites();
_vm->_animation->animLink();
_vm->_lucerna->checkClick();
- _vm->_timeout->updateTimer();
+ _vm->_timer->updateTimer();
diff --git a/engines/avalanche/enid2.cpp b/engines/avalanche/enid2.cpp
index c3a195ecf4..f6e22dfc59 100644
--- a/engines/avalanche/enid2.cpp
+++ b/engines/avalanche/enid2.cpp
@@ -33,7 +33,7 @@
#include "avalanche/scrolls2.h"
#include "avalanche/lucerna2.h"
#include "avalanche/animation.h"
-#include "avalanche/timeout2.h"
+#include "avalanche/timer.h"
#include "avalanche/celer2.h"
#include "avalanche/sequence2.h"
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index 598ff63869..1cf7b3ef70 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -33,7 +33,7 @@
#include "avalanche/gyro2.h"
#include "avalanche/scrolls2.h"
#include "avalanche/visa2.h"
-#include "avalanche/timeout2.h"
+#include "avalanche/timer.h"
#include "avalanche/animation.h"
#include "avalanche/enid2.h"
#include "avalanche/celer2.h"
@@ -340,21 +340,21 @@ void Lucerna::exitRoom(byte x) {
switch (x) {
case r__spludwicks:
- _vm->_timeout->loseTimer(_vm->_timeout->kReasonAvariciusTalks);
+ _vm->_timer->loseTimer(_vm->_timer->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->loseTimer(_vm->_timeout->kReasonDrawbridgeFalls);
+ _vm->_timer->loseTimer(_vm->_timer->kReasonDrawbridgeFalls);
}
break;
case r__outsidecardiffcastle:
- _vm->_timeout->loseTimer(_vm->_timeout->kReasonCardiffsurvey);
+ _vm->_timer->loseTimer(_vm->_timer->kReasonCardiffsurvey);
break;
case r__robins:
- _vm->_timeout->loseTimer(_vm->_timeout->kReasonGettingTiedUp);
+ _vm->_timer->loseTimer(_vm->_timer->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->addTimer(100, _vm->_timeout->kProcArkataShouts, _vm->_timeout->kReasonArkataShouts);
+ _vm->_timer->addTimer(100, _vm->_timer->kProcArkataShouts, _vm->_timer->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->addTimer(20, _vm->_timeout->kProcCrapulusSpludOut, _vm->_timeout->kReasonCrapulusSaysSpludwickOut);
+ _vm->_timer->addTimer(20, _vm->_timer->kProcCrapulusSpludOut, _vm->_timer->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->addTimer(20, _vm->_timeout->kProcBang, _vm->_timeout->kReasonExplosion);
+ _vm->_timer->addTimer(20, _vm->_timer->kProcBang, _vm->_timer->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->addTimer(20, _vm->_timeout->kProcCwytalotInHerts, _vm->_timeout->kReasonCwytalotInHerts);
+ _vm->_timer->addTimer(20, _vm->_timer->kProcCwytalotInHerts, _vm->_timer->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->addTimer(36, _vm->_timeout->kProcGetTiedUp, _vm->_timeout->kReasonGettingTiedUp);
+ _vm->_timer->addTimer(36, _vm->_timer->kProcGetTiedUp, _vm->_timer->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->addTimer(47, _vm->_timeout->kProcCardiffSurvey, _vm->_timeout->kReasonCardiffsurvey);
+ _vm->_timer->addTimer(47, _vm->_timer->kProcCardiffSurvey, _vm->_timer->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->addTimer(3, _vm->_timeout->kProcCardiffReturn, _vm->_timeout->kReasonCardiffsurvey);
+ _vm->_timer->addTimer(3, _vm->_timer->kProcCardiffReturn, _vm->_timer->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->addTimer(3, _vm->_timeout->kProcCallsGuards, _vm->_timeout->kReasonDuLustieTalks);
+ _vm->_timer->addTimer(3, _vm->_timer->kProcCallsGuards, _vm->_timer->kReasonDuLustieTalks);
else if (! _vm->_gyro->_dna._enteredLustiesRoomAsMonk) // already
// Presumably, Avvy dressed as a monk.
- _vm->_timeout->addTimer(3, _vm->_timeout->kProcGreetsMonk, _vm->_timeout->kReasonDuLustieTalks);
+ _vm->_timer->addTimer(3, _vm->_timer->kProcGreetsMonk, _vm->_timer->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->addTimer(3, _vm->_timeout->kProcAvalotFalls, _vm->_timeout->kReasonFallingOver);
+ _vm->_timer->addTimer(3, _vm->_timer->kProcAvalotFalls, _vm->_timer->kReasonFallingOver);
_vm->_gyro->_alive = false;
}
diff --git a/engines/avalanche/module.mk b/engines/avalanche/module.mk
index c46f8e21f1..0f1722a482 100644
--- a/engines/avalanche/module.mk
+++ b/engines/avalanche/module.mk
@@ -15,7 +15,7 @@ MODULE_OBJS = \
enid2.o \
celer2.o \
sequence2.o \
- timeout2.o \
+ timer.o \
animation.o \
acci2.o \
dropdown2.o \
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index 01c61be208..f8972d5bd3 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -35,7 +35,7 @@
#include "avalanche/animation.h"
#include "avalanche/acci2.h"
#include "avalanche/visa2.h"
-#include "avalanche/timeout2.h"
+#include "avalanche/timer.h"
#include "common/textconsole.h"
#include "common/file.h"
@@ -219,7 +219,7 @@ void Scrolls::scrollModeMusic() {
setReadyLight(0);
_vm->_gyro->_seeScroll = false;
- _vm->_timeout->addTimer(8, _vm->_timeout->kProcJacquesWakesUp, _vm->_timeout->kReasonJacquesWakingUp);
+ _vm->_timer->addTimer(8, _vm->_timer->kProcJacquesWakesUp, _vm->_timer->kReasonJacquesWakingUp);
warning("STUB: Scrolls::music_scroll()");
return;
#if 0
diff --git a/engines/avalanche/sequence2.cpp b/engines/avalanche/sequence2.cpp
index 8f8a3db391..48b8017515 100644
--- a/engines/avalanche/sequence2.cpp
+++ b/engines/avalanche/sequence2.cpp
@@ -31,7 +31,7 @@
#include "avalanche/sequence2.h"
#include "avalanche/gyro2.h"
-#include "avalanche/timeout2.h"
+#include "avalanche/timer.h"
#include "avalanche/celer2.h"
#include "avalanche/animation.h"
@@ -69,8 +69,8 @@ void Sequence::thenFlip(byte where, byte ped) {
}
void Sequence::startToClose() {
- _vm->_timeout->loseTimer(_vm->_timeout->kReasonSequencer);
- _vm->_timeout->addTimer(7, _vm->_timeout->kProcSequence, _vm->_timeout->kReasonSequencer);
+ _vm->_timer->loseTimer(_vm->_timer->kReasonSequencer);
+ _vm->_timer->addTimer(7, _vm->_timer->kProcSequence, _vm->_timer->kReasonSequencer);
}
void Sequence::startToOpen() {
diff --git a/engines/avalanche/sequence2.h b/engines/avalanche/sequence2.h
index 07c90b455b..67650d519d 100644
--- a/engines/avalanche/sequence2.h
+++ b/engines/avalanche/sequence2.h
@@ -54,7 +54,7 @@ public:
private:
AvalancheEngine *_vm;
- void shoveLeft(); // This PROC is called by Timeout when it's time to do another frame.
+ void shoveLeft(); // This PROC is called by Timer when it's time to do another frame.
};
} // End of namespace Avalanche.
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timer.cpp
index 0f484fc5e8..2656aeaa84 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timer.cpp
@@ -25,11 +25,11 @@
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
*/
-/* TIMEOUT The scheduling unit. */
+/* Original name: TIMEOUT The scheduling unit. */
#include "avalanche/avalanche.h"
-#include "avalanche/timeout2.h"
+#include "avalanche/timer.h"
#include "avalanche/visa2.h"
#include "avalanche/lucerna2.h"
#include "avalanche/animation.h"
@@ -43,7 +43,7 @@
namespace Avalanche {
-Timeout::Timeout(AvalancheEngine *vm) {
+Timer::Timer(AvalancheEngine *vm) {
_vm = vm;
for (byte i = 0; i < 7; i++) {
@@ -58,7 +58,7 @@ Timeout::Timeout(AvalancheEngine *vm) {
* Add a nex timer
* @remarks Originally called 'set_up_timer'
*/
-void Timeout::addTimer(int32 duration, byte action, byte reason) {
+void Timer::addTimer(int32 duration, byte action, byte reason) {
if ((_vm->_gyro->isLoaded == false) || (_timerLost == true)) {
byte i = 0;
while ((i < 7) && (_times[i]._timeLeft != 0))
@@ -81,7 +81,7 @@ void Timeout::addTimer(int32 duration, byte action, byte reason) {
* Update the timers
* @remarks Originally called 'one_tick'
*/
-void Timeout::updateTimer() {
+void Timer::updateTimer() {
if (_vm->_gyro->_dropdownActive)
return;
@@ -223,7 +223,7 @@ void Timeout::updateTimer() {
_vm->_gyro->_dna._totalTime++; // Total amount of time for this game.
}
-void Timeout::loseTimer(byte which) {
+void Timer::loseTimer(byte which) {
for (byte i = 0; i < 7; i++) {
if (_times[i]._reason == which)
_times[i]._timeLeft = 0; // Cancel this one!
@@ -232,7 +232,7 @@ void Timeout::loseTimer(byte which) {
_timerLost = true;
}
-void Timeout::openDrawbridge() {
+void Timer::openDrawbridge() {
_vm->_gyro->_dna._drawbridgeOpen++;
_vm->_celer->drawBackgroundSprite(-1, -1, _vm->_gyro->_dna._drawbridgeOpen - 1);
@@ -242,7 +242,7 @@ void Timeout::openDrawbridge() {
addTimer(7, kProcOpenDrawbridge, kReasonDrawbridgeFalls);
}
-void Timeout::avariciusTalks() {
+void Timer::avariciusTalks() {
_vm->_visa->displayScrollChain('q', _vm->_gyro->_dna._avariciusTalk);
_vm->_gyro->_dna._avariciusTalk++;
@@ -252,27 +252,27 @@ void Timeout::avariciusTalks() {
_vm->_lucerna->incScore(3);
}
-void Timeout::urinate() {
+void Timer::urinate() {
_vm->_animation->tr[0].turn(Animation::kDirUp);
_vm->_animation->stopWalking();
_vm->_lucerna->drawDirection();
addTimer(14, kProcToilet, kReasonGoToToilet);
}
-void Timeout::toilet() {
+void Timer::toilet() {
_vm->_scrolls->displayText("That's better!");
}
-void Timeout::bang() {
+void Timer::bang() {
_vm->_scrolls->displayText(Common::String(_vm->_scrolls->kControlItalic) + "< BANG! >");
addTimer(30, kProcBang2, kReasonExplosion);
}
-void Timeout::bang2() {
+void Timer::bang2() {
_vm->_scrolls->displayText("Hmm... sounds like Spludwick's up to something...");
}
-void Timeout::stairs() {
+void Timer::stairs() {
_vm->_gyro->blip();
_vm->_animation->tr[0].walkto(4);
_vm->_celer->drawBackgroundSprite(-1, -1, 2);
@@ -282,7 +282,7 @@ void Timeout::stairs() {
_vm->_gyro->_magics[3]._operation = _vm->_gyro->kMagicNothing; // Stop them hitting the sides (or the game will hang.)
}
-void Timeout::cardiffSurvey() {
+void Timer::cardiffSurvey() {
if (_vm->_gyro->_dna._cardiffQuestionNum == 0) {
_vm->_gyro->_dna._cardiffQuestionNum++;
_vm->_visa->displayScrollChain('q', 27);
@@ -293,16 +293,16 @@ void Timeout::cardiffSurvey() {
addTimer(182, kProcCardiffSurvey, kReasonCardiffsurvey);
}
-void Timeout::cardiffReturn() {
+void Timer::cardiffReturn() {
_vm->_visa->displayScrollChain('q', 28);
cardiffSurvey(); // Add end of question.
}
-void Timeout::cwytalotInHerts() {
+void Timer::cwytalotInHerts() {
_vm->_visa->displayScrollChain('q', 29);
}
-void Timeout::getTiedUp() {
+void Timer::getTiedUp() {
_vm->_visa->displayScrollChain('q', 34); // ...Trouble!
_vm->_gyro->_dna._userMovesAvvy = false;
_vm->_gyro->_dna._beenTiedUp = true;
@@ -314,14 +314,14 @@ void Timeout::getTiedUp() {
addTimer(70, kProcGetTiedUp2, kReasonGettingTiedUp);
}
-void Timeout::getTiedUp2() {
+void Timer::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::hangAround() {
+void Timer::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;
@@ -331,7 +331,7 @@ void Timeout::hangAround() {
addTimer(55, kProcHangAround2, kReasonHangingAround);
}
-void Timeout::hangAround2() {
+void Timer::hangAround2() {
_vm->_visa->displayScrollChain('q', 40);
_vm->_animation->tr[1]._vanishIfStill = false;
_vm->_animation->tr[1].walkto(4);
@@ -348,7 +348,7 @@ void Timeout::hangAround2() {
_vm->_enid->backToBootstrap(1); // Call the shoot-'em-up.
}
-void Timeout::afterTheShootemup() {
+void Timer::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!
@@ -379,12 +379,12 @@ void Timeout::afterTheShootemup() {
points(gain);
#endif
- warning("STUB: Timeout::after_the_shootemup()");
+ warning("STUB: Timer::after_the_shootemup()");
_vm->_visa->displayScrollChain('q', 70);
}
-void Timeout::jacquesWakesUp() {
+void Timer::jacquesWakesUp() {
_vm->_gyro->_dna._jacquesState++;
switch (_vm->_gyro->_dna._jacquesState) { // Additional pictures.
@@ -422,7 +422,7 @@ void Timeout::jacquesWakesUp() {
}
}
-void Timeout::naughtyDuke() { // This is when the Duke comes in and takes your money.
+void Timer::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.
@@ -435,20 +435,20 @@ void Timeout::naughtyDuke() { // This is when the Duke comes in and takes your m
addTimer(50, kProcNaughtyDuke2, kReasonNaughtyDuke);
}
-void Timeout::naughtyDuke2() {
+void Timer::naughtyDuke2() {
_vm->_visa->displayScrollChain('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!
addTimer(32, kProcNaughtyDuke3, kReasonNaughtyDuke);
}
-void Timeout::naughtyDuke3() {
+void Timer::naughtyDuke3() {
_vm->_celer->drawBackgroundSprite(-1, -1, 1);
_vm->_sequence->firstShow(2);
_vm->_sequence->startToClose();
}
-void Timeout::jump() {
+void Timer::jump() {
_vm->_gyro->_dna._jumpStatus++;
switch (_vm->_gyro->_dna._jumpStatus) {
@@ -495,12 +495,12 @@ void Timeout::jump() {
}
}
-void Timeout::crapulusSaysSpludOut() {
+void Timer::crapulusSaysSpludOut() {
_vm->_visa->displayScrollChain('q', 56);
_vm->_gyro->_dna._crapulusWillTell = false;
}
-void Timeout::buyDrinks() {
+void Timer::buyDrinks() {
_vm->_celer->drawBackgroundSprite(-1, -1, 11); // Malagauche gets up again.
_vm->_gyro->_dna._malagauche = 0;
@@ -512,7 +512,7 @@ void Timeout::buyDrinks() {
_vm->_acci->drink();
}
-void Timeout::buyWine() {
+void Timer::buyWine() {
_vm->_celer->drawBackgroundSprite(-1, -1, 11); // Malagauche gets up again.
_vm->_gyro->_dna._malagauche = 0;
@@ -526,24 +526,24 @@ void Timeout::buyWine() {
}
}
-void Timeout::callsGuards() {
+void Timer::callsGuards() {
_vm->_visa->displayScrollChain('Q', 58); // "GUARDS!!!"
_vm->_lucerna->gameOver();
}
-void Timeout::greetsMonk() {
+void Timer::greetsMonk() {
_vm->_visa->displayScrollChain('Q', 59);
_vm->_gyro->_dna._enteredLustiesRoomAsMonk = true;
}
-void Timeout::fallDownOubliette() {
+void Timer::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...
addTimer(3, kProcFallDownOubliette, kReasonFallingDownOubliette);
}
-void Timeout::meetAvaroid() {
+void Timer::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!");
@@ -562,7 +562,7 @@ void Timeout::meetAvaroid() {
}
}
-void Timeout::riseUpOubliette() {
+void Timer::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...
@@ -572,7 +572,7 @@ void Timeout::riseUpOubliette() {
_vm->_gyro->_dna._userMovesAvvy = true;
}
-void Timeout::robinHoodAndGeida() {
+void Timer::robinHoodAndGeida() {
_vm->_animation->tr[0].init(7, true, _vm->_animation);
_vm->_animation->apped(1, 7);
_vm->_animation->tr[0].walkto(6);
@@ -582,7 +582,7 @@ void Timeout::robinHoodAndGeida() {
_vm->_gyro->_dna._geidaFollows = false;
}
-void Timeout::robinHoodAndGeidaTalk() {
+void Timer::robinHoodAndGeidaTalk() {
_vm->_visa->displayScrollChain('q', 66);
_vm->_animation->tr[0].walkto(2);
_vm->_animation->tr[1].walkto(2);
@@ -591,7 +591,7 @@ void Timeout::robinHoodAndGeidaTalk() {
addTimer(162, kProcAvalotReturns, kReasonRobinHoodAndGeida);
}
-void Timeout::avalotReturns() {
+void Timer::avalotReturns() {
_vm->_animation->tr[0].done();
_vm->_animation->tr[1].done();
_vm->_animation->tr[0].init(0, true, _vm->_animation);
@@ -605,7 +605,7 @@ void Timeout::avalotReturns() {
* so that it will happen when Avvy stops walking.
* @remarks Originally called 'avvy_sit_down'
*/
-void Timeout::avvySitDown() {
+void Timer::avvySitDown() {
if (_vm->_animation->tr[0]._homing) // Still walking.
addTimer(1, kProcAvvySitDown, kReasonSittingDown);
else {
@@ -616,12 +616,12 @@ void Timeout::avvySitDown() {
}
}
-void Timeout::ghostRoomPhew() {
+void Timer::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::arkataShouts() {
+void Timer::arkataShouts() {
if (_vm->_gyro->_dna._teetotal)
return;
@@ -629,11 +629,11 @@ void Timeout::arkataShouts() {
addTimer(160, kProcArkataShouts, kReasonArkataShouts);
}
-void Timeout::winning() {
+void Timer::winning() {
_vm->_visa->displayScrollChain('q', 79);
_vm->_pingo->winningPic();
- warning("STUB: Timeout::winning()");
+ warning("STUB: Timer::winning()");
#if 0
do {
_vm->_lucerna->checkclick();
@@ -646,7 +646,7 @@ void Timeout::winning() {
_vm->_gyro->_letMeOut = true;
}
-void Timeout::avalotFalls() {
+void Timer::avalotFalls() {
if (_vm->_animation->tr[0]._stepNum < 5) {
_vm->_animation->tr[0]._stepNum++;
addTimer(3, kProcAvalotFalls, kReasonFallingOver);
@@ -661,18 +661,18 @@ void Timeout::avalotFalls() {
}
}
-void Timeout::spludwickGoesToCauldron() {
+void Timer::spludwickGoesToCauldron() {
if (_vm->_animation->tr[1]._homing)
addTimer(1, kProcSpludwickGoesToCauldron, kReasonSpludWalk);
else
addTimer(17, kProcSpludwickLeavesCauldron, kReasonSpludWalk);
}
-void Timeout::spludwickLeavesCauldron() {
+void Timer::spludwickLeavesCauldron() {
_vm->_animation->tr[1]._callEachStepFl = true; // So that normal procs will continue.
}
-void Timeout::giveLuteToGeida() { // Moved here from Acci.
+void Timer::giveLuteToGeida() { // Moved here from Acci.
_vm->_visa->displayScrollChain('Q', 86);
_vm->_lucerna->incScore(4);
_vm->_gyro->_dna._lustieIsAsleep = true;
diff --git a/engines/avalanche/timeout2.h b/engines/avalanche/timer.h
index 5f1769a663..c8b664b743 100644
--- a/engines/avalanche/timeout2.h
+++ b/engines/avalanche/timer.h
@@ -25,17 +25,17 @@
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
*/
-/* TIMEOUT The scheduling unit. */
+/* Original name: TIMEOUT The scheduling unit. */
-#ifndef AVALANCHE_TIMEOUT2_H
-#define AVALANCHE_TIMEOUT2_H
+#ifndef AVALANCHE_TIMER_H
+#define AVALANCHE_TIMER_H
#include "common/scummsys.h"
namespace Avalanche {
class AvalancheEngine;
-class Timeout {
+class Timer {
public:
// Reason runs between 1 and 28.
enum Reason {
@@ -114,16 +114,16 @@ public:
kProcGiveLuteToGeida = 41
};
- struct TimeType {
+ struct TimerType {
int32 _timeLeft;
byte _action;
byte _reason;
};
- TimeType _times[7];
+ TimerType _times[7];
bool _timerLost; // Is the timer "lost"? (Because of using loseTimer())
- Timeout(AvalancheEngine *vm);
+ Timer(AvalancheEngine *vm);
void addTimer(int32 duration, byte action, byte reason);
void updateTimer();
@@ -177,4 +177,4 @@ private:
} // End of namespace Avalanche.
-#endif // AVALANCHE_TIMEOUT2_H
+#endif // AVALANCHE_TIMER_H