aboutsummaryrefslogtreecommitdiff
path: root/engines
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
parent09c816e69555a1cd6f8034458440754533fe492b (diff)
downloadscummvm-rg350-a8c6dc6e7d1594791f0d47b1f4877b4a655053a3.tar.gz
scummvm-rg350-a8c6dc6e7d1594791f0d47b1f4877b4a655053a3.tar.bz2
scummvm-rg350-a8c6dc6e7d1594791f0d47b1f4877b4a655053a3.zip
Cleanup.
svn-id: r26833
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/agos.h9
-rw-r--r--engines/agos/event.cpp88
-rw-r--r--engines/agos/gfx.cpp5
-rw-r--r--engines/agos/oracle.cpp4
-rw-r--r--engines/agos/string.cpp4
5 files changed, 58 insertions, 52 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index ee3e556713..e39c7a4540 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -711,9 +711,6 @@ protected:
void clearMenuStrip();
void doMenuStrip(uint menuNum);
- void oracleLogo();
- void swapCharacterLogo();
-
void mouseOff();
void mouseOn();
@@ -1125,7 +1122,7 @@ protected:
void readGameFile(void *dst, uint32 offs, uint32 size);
void timer_callback();
- void timer_proc1();
+ virtual void timer_proc1();
virtual void animateSprites();
@@ -1560,6 +1557,10 @@ protected:
virtual void animateSprites();
void animateSpritesByY();
+ void oracleLogo();
+ void swapCharacterLogo();
+ virtual void timer_proc1();
+
virtual void addArrows(WindowBlock *window);
virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
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;
}
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp
index 3aa18dd5ec..a8bff9a451 100644
--- a/engines/agos/gfx.cpp
+++ b/engines/agos/gfx.cpp
@@ -1226,6 +1226,9 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vga_res_id) {
_lockWord |= 0x20;
VgaTimerEntry *vte = _vgaTimerList;
+ while (vte->type != 2)
+ vte++;
+
vte->delay = 2;
if (getGameType() == GType_FF || getGameType() == GType_PP) {
@@ -1259,7 +1262,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vga_res_id) {
_vgaSpriteChanged++;
if (_window3Flag == 1) {
- clearVideoBackGround(3, 0); // (window, color)
+ clearVideoBackGround(3, 0);
}
uint xoffs = _videoWindows[updateWindow * 4 + 0] * 16;
diff --git a/engines/agos/oracle.cpp b/engines/agos/oracle.cpp
index 4c140fbe63..9aa3a4bf87 100644
--- a/engines/agos/oracle.cpp
+++ b/engines/agos/oracle.cpp
@@ -298,7 +298,7 @@ void AGOSEngine_Feeble::scrollOracleDown() {
}
}
-void AGOSEngine::oracleLogo() {
+void AGOSEngine_Feeble::oracleLogo() {
Common::Rect srcRect, dstRect;
byte *src, *dst;
uint16 w, h;
@@ -326,7 +326,7 @@ void AGOSEngine::oracleLogo() {
}
}
-void AGOSEngine::swapCharacterLogo() {
+void AGOSEngine_Feeble::swapCharacterLogo() {
Common::Rect srcRect, dstRect;
byte *src, *dst;
uint16 w, h;
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index 9c1f3e6f3e..2335d894ac 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -362,9 +362,7 @@ void AGOSEngine::printScreenText(uint vgaSpriteId, uint color, const char *strin
renderString(vgaSpriteId, color, width, height, convertedString);
}
- int b = 4;
- if (!getBitFlag(133))
- b = 3;
+ int b = (!getBitFlag(133)) ? 3 : 4;
x /= 8;
if (y < 2)