aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/event.cpp
diff options
context:
space:
mode:
authorTravis Howell2007-05-13 13:19:46 +0000
committerTravis Howell2007-05-13 13:19:46 +0000
commita8c6dc6e7d1594791f0d47b1f4877b4a655053a3 (patch)
tree6ef41aefaf3d1d0e68d1b31730462af11666eeff /engines/agos/event.cpp
parent09c816e69555a1cd6f8034458440754533fe492b (diff)
downloadscummvm-rg350-a8c6dc6e7d1594791f0d47b1f4877b4a655053a3.tar.gz
scummvm-rg350-a8c6dc6e7d1594791f0d47b1f4877b4a655053a3.tar.bz2
scummvm-rg350-a8c6dc6e7d1594791f0d47b1f4877b4a655053a3.zip
Cleanup.
svn-id: r26833
Diffstat (limited to 'engines/agos/event.cpp')
-rw-r--r--engines/agos/event.cpp88
1 files changed, 46 insertions, 42 deletions
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index 01058938c9..b2636d2a48 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -440,7 +440,7 @@ void AGOSEngine::delay(uint amount) {
}
void AGOSEngine::timer_callback() {
- if (_timer5 != 0) {
+ if (_timer5) {
_syncFlag2 = true;
_timer5--;
} else {
@@ -448,7 +448,7 @@ void AGOSEngine::timer_callback() {
}
}
-void AGOSEngine::timer_proc1() {
+void AGOSEngine_Feeble::timer_proc1() {
_timer4++;
if (_lockWord & 0x80E9 || _lockWord & 2)
@@ -458,41 +458,15 @@ void AGOSEngine::timer_proc1() {
_lockWord |= 2;
- handleMouseMoved();
-
if (!(_lockWord & 0x10)) {
- if (getGameType() == GType_PP) {
- _syncFlag2 ^= 1;
- if (!_syncFlag2) {
- processVgaEvents();
- } else {
- if (_scrollCount == 0) {
- _lockWord &= ~2;
- return;
- }
- }
- } else if (getGameType() == GType_FF) {
- _syncFlag2 ^= 1;
- if (!_syncFlag2) {
- processVgaEvents();
- } else {
- // Double speed on Oracle
- if (getBitFlag(99)) {
- processVgaEvents();
- } else if (_scrollCount == 0) {
- _lockWord &= ~2;
- return;
- }
- }
- } else {
- processVgaEvents();
+ _syncFlag2 ^= 1;
+ if (!_syncFlag2) {
processVgaEvents();
- _syncFlag2 ^= 1;
- _cepeFlag ^= 1;
- if (!_cepeFlag)
+ } else {
+ // Double speed on Oracle
+ if (getGameType() == GType_FF && getBitFlag(99)) {
processVgaEvents();
-
- if (_mouseHideCount != 0 && _syncFlag2) {
+ } else if (_scrollCount == 0) {
_lockWord &= ~2;
return;
}
@@ -501,21 +475,15 @@ void AGOSEngine::timer_proc1() {
if (getGameType() == GType_FF) {
_moviePlay->nextFrame();
- animateSprites();
}
+ animateSprites();
+
if (_copyPartialMode == 2) {
fillFrontFromBack(0, 0, _screenWidth, _screenHeight);
_copyPartialMode = 0;
}
- if (_updateScreen) {
- _system->copyRectToScreen(getFrontBuf(), _screenWidth, 0, 0, _screenWidth, _screenHeight);
- _system->updateScreen();
-
- _updateScreen = false;
- }
-
if (_displayScreen) {
if (getGameType() == GType_FF) {
if (!getBitFlag(78)) {
@@ -525,6 +493,42 @@ void AGOSEngine::timer_proc1() {
swapCharacterLogo();
}
}
+ handleMouseMoved();
+ displayScreen();
+ _displayScreen = false;
+ }
+
+ _lockWord &= ~2;
+}
+
+void AGOSEngine::timer_proc1() {
+ _timer4++;
+
+ if (_lockWord & 0x80E9 || _lockWord & 2)
+ return;
+
+ _syncCount++;
+
+ _lockWord |= 2;
+
+ handleMouseMoved();
+
+ if (!(_lockWord & 0x10)) {
+ processVgaEvents();
+ processVgaEvents();
+ _cepeFlag ^= 1;
+ if (!_cepeFlag)
+ processVgaEvents();
+ }
+
+ if (_updateScreen) {
+ _system->copyRectToScreen(getFrontBuf(), _screenWidth, 0, 0, _screenWidth, _screenHeight);
+ _system->updateScreen();
+
+ _updateScreen = false;
+ }
+
+ if (_displayScreen) {
displayScreen();
_displayScreen = false;
}