aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-07-23 00:12:29 +0000
committerJohannes Schickel2010-07-23 00:12:29 +0000
commit795062d8e75851d8d5ac337edaa55834cfc6adee (patch)
treeca9c824b09ea5405442f1a48ec2c2ae463812475
parenta2f6fd976b09985ac5414e4665018f1b8cd7716e (diff)
downloadscummvm-rg350-795062d8e75851d8d5ac337edaa55834cfc6adee.tar.gz
scummvm-rg350-795062d8e75851d8d5ac337edaa55834cfc6adee.tar.bz2
scummvm-rg350-795062d8e75851d8d5ac337edaa55834cfc6adee.zip
KYRA: Cleanup.
svn-id: r51181
-rw-r--r--engines/kyra/kyra_lok.h12
-rw-r--r--engines/kyra/timer_lok.cpp31
2 files changed, 17 insertions, 26 deletions
diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h
index 9f1eb282f5..aa28c70410 100644
--- a/engines/kyra/kyra_lok.h
+++ b/engines/kyra/kyra_lok.h
@@ -374,16 +374,14 @@ protected:
//void setTimer19();
void setupTimers();
void timerUpdateHeadAnims(int timerNum);
- void timerSetFlags1(int timerNum);
- void timerSetFlags2(int timerNum);
- void timerSetFlags3(int timerNum);
- void timerCheckAnimFlag1(int timerNum);
- void timerCheckAnimFlag2(int timerNum);
+ void timerTulipCreator(int timerNum);
+ void timerAsInvisibleTimeout(int timerNum);
+ void timerAsWillowispTimeout(int timerNum);
void checkAmuletAnimFlags();
void timerRedrawAmulet(int timerNum);
void timerFadeText(int timerNum);
- void updateAnimFlag1(int timerNum);
- void updateAnimFlag2(int timerNum);
+ void timerWillowispFrameTimer(int timerNum);
+ void timerInvisibleFrameTimer(int timerNum);
void drawAmulet();
void setTextFadeTimerCountdown(int16 countdown);
void setWalkspeed(uint8 newSpeed);
diff --git a/engines/kyra/timer_lok.cpp b/engines/kyra/timer_lok.cpp
index 3a7d1ed0de..c3353138ad 100644
--- a/engines/kyra/timer_lok.cpp
+++ b/engines/kyra/timer_lok.cpp
@@ -48,11 +48,11 @@ void KyraEngine_LoK::setupTimers() {
for (int i = 10; i <= 13; ++i)
_timer->addTimer(i, 0, 420, 1);
- _timer->addTimer(14, TimerV1(timerCheckAnimFlag2), 600, 1);
+ _timer->addTimer(14, TimerV1(timerAsWillowispTimeout), 600, 1);
_timer->addTimer(15, TimerV1(timerUpdateHeadAnims), 11, 1);
- _timer->addTimer(16, TimerV1(timerSetFlags1), 7200, 1);
+ _timer->addTimer(16, TimerV1(timerTulipCreator), 7200, 1);
_timer->addTimer(17, 0 /*sub_15120*/, 7200, 1);
- _timer->addTimer(18, TimerV1(timerCheckAnimFlag1), 600, 1);
+ _timer->addTimer(18, TimerV1(timerAsInvisibleTimeout), 600, 1);
_timer->addTimer(19, TimerV1(timerRedrawAmulet), 600, 1);
_timer->addTimer(20, 0, 7200, 1);
@@ -67,8 +67,8 @@ void KyraEngine_LoK::setupTimers() {
_timer->addTimer(30, 0, 10800, 1);
_timer->addTimer(31, TimerV1(timerFadeText), -1, 1);
- _timer->addTimer(32, TimerV1(updateAnimFlag1), 9, 1);
- _timer->addTimer(33, TimerV1(updateAnimFlag2), 3, 1);
+ _timer->addTimer(32, TimerV1(timerWillowispFrameTimer), 9, 1);
+ _timer->addTimer(33, TimerV1(timerInvisibleFrameTimer), 3, 1);
}
void KyraEngine_LoK::timerUpdateHeadAnims(int timerNum) {
@@ -89,7 +89,7 @@ void KyraEngine_LoK::timerUpdateHeadAnims(int timerNum) {
_animator->animRefreshNPC(_talkingCharNum);
}
-void KyraEngine_LoK::timerSetFlags1(int timerNum) {
+void KyraEngine_LoK::timerTulipCreator(int timerNum) {
if (_currentCharacter->sceneId == 0x1C)
return;
@@ -111,16 +111,14 @@ void KyraEngine_LoK::timerFadeText(int timerNum) {
_fadeText = true;
}
-void KyraEngine_LoK::updateAnimFlag1(int timerNum) {
- if (_brandonStatusBit & 2) {
+void KyraEngine_LoK::timerWillowispFrameTimer(int timerNum) {
+ if (_brandonStatusBit & 2)
_brandonStatusBit0x02Flag = 1;
- }
}
-void KyraEngine_LoK::updateAnimFlag2(int timerNum) {
- if (_brandonStatusBit & 0x20) {
+void KyraEngine_LoK::timerInvisibleFrameTimer(int timerNum) {
+ if (_brandonStatusBit & 0x20)
_brandonStatusBit0x20Flag = 1;
- }
}
void KyraEngine_LoK::setTextFadeTimerCountdown(int16 countdown) {
@@ -130,19 +128,14 @@ void KyraEngine_LoK::setTextFadeTimerCountdown(int16 countdown) {
_timer->setCountdown(31, countdown*60);
}
-void KyraEngine_LoK::timerSetFlags2(int timerNum) {
- if (!((uint32 *)(_flagsTable+0x2D))[timerNum])
- ((uint32 *)(_flagsTable+0x2D))[timerNum] = 1;
-}
-
-void KyraEngine_LoK::timerCheckAnimFlag1(int timerNum) {
+void KyraEngine_LoK::timerAsInvisibleTimeout(int timerNum) {
if (_brandonStatusBit & 0x20) {
checkAmuletAnimFlags();
_timer->setCountdown(18, -1);
}
}
-void KyraEngine_LoK::timerCheckAnimFlag2(int timerNum) {
+void KyraEngine_LoK::timerAsWillowispTimeout(int timerNum) {
if (_brandonStatusBit & 0x2) {
checkAmuletAnimFlags();
_timer->setCountdown(14, -1);