[Scummvm-cvs-logs] SF.net SVN: scummvm: [26833] scummvm/trunk/engines/agos

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sun May 13 15:19:47 CEST 2007


Revision: 26833
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26833&view=rev
Author:   kirben
Date:     2007-05-13 06:19:46 -0700 (Sun, 13 May 2007)

Log Message:
-----------
Cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/event.cpp
    scummvm/trunk/engines/agos/gfx.cpp
    scummvm/trunk/engines/agos/oracle.cpp
    scummvm/trunk/engines/agos/string.cpp

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2007-05-13 12:41:42 UTC (rev 26832)
+++ scummvm/trunk/engines/agos/agos.h	2007-05-13 13:19:46 UTC (rev 26833)
@@ -711,9 +711,6 @@
 	void clearMenuStrip();
 	void doMenuStrip(uint menuNum);
 
-	void oracleLogo();
-	void swapCharacterLogo();
-
 	void mouseOff();
 	void mouseOn();
 
@@ -1125,7 +1122,7 @@
 	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 @@
 	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);
 

Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp	2007-05-13 12:41:42 UTC (rev 26832)
+++ scummvm/trunk/engines/agos/event.cpp	2007-05-13 13:19:46 UTC (rev 26833)
@@ -440,7 +440,7 @@
 }
 
 void AGOSEngine::timer_callback() {
-	if (_timer5 != 0) {
+	if (_timer5) {
 		_syncFlag2 = true;
 		_timer5--;
 	} else {
@@ -448,7 +448,7 @@
 	}
 }
 
-void AGOSEngine::timer_proc1() {
+void AGOSEngine_Feeble::timer_proc1() {
 	_timer4++;
 
 	if (_lockWord & 0x80E9 || _lockWord & 2)
@@ -458,41 +458,15 @@
 
 	_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;
-				}
-			}
+		_syncFlag2 ^= 1;
+		if (!_syncFlag2) {
+			processVgaEvents();
 		} else {
-			processVgaEvents();
-			processVgaEvents();
-			_syncFlag2 ^= 1;
-			_cepeFlag ^= 1;
-			if (!_cepeFlag)
+			// 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 @@
 
 	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,7 @@
 				swapCharacterLogo();
 			}
 		}
+		handleMouseMoved();
 		displayScreen();
 		_displayScreen = false;
 	}
@@ -532,4 +501,39 @@
 	_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;
+	}
+
+	_lockWord &= ~2;
+}
+
 } // End of namespace AGOS

Modified: scummvm/trunk/engines/agos/gfx.cpp
===================================================================
--- scummvm/trunk/engines/agos/gfx.cpp	2007-05-13 12:41:42 UTC (rev 26832)
+++ scummvm/trunk/engines/agos/gfx.cpp	2007-05-13 13:19:46 UTC (rev 26833)
@@ -1226,6 +1226,9 @@
 	_lockWord |= 0x20;
 
 	VgaTimerEntry *vte = _vgaTimerList;
+	while (vte->type != 2)
+		vte++;
+
 	vte->delay = 2;
 
 	if (getGameType() == GType_FF || getGameType() == GType_PP) {
@@ -1259,7 +1262,7 @@
 		_vgaSpriteChanged++;
 
 		if (_window3Flag == 1) {
-			clearVideoBackGround(3, 0); // (window, color)
+			clearVideoBackGround(3, 0);
 		}
 
 		uint xoffs = _videoWindows[updateWindow * 4 + 0] * 16;

Modified: scummvm/trunk/engines/agos/oracle.cpp
===================================================================
--- scummvm/trunk/engines/agos/oracle.cpp	2007-05-13 12:41:42 UTC (rev 26832)
+++ scummvm/trunk/engines/agos/oracle.cpp	2007-05-13 13:19:46 UTC (rev 26833)
@@ -298,7 +298,7 @@
 	}
 }
 
-void AGOSEngine::oracleLogo() {
+void AGOSEngine_Feeble::oracleLogo() {
 	Common::Rect srcRect, dstRect;
 	byte *src, *dst;
 	uint16 w, h;
@@ -326,7 +326,7 @@
 	}
 }
 
-void AGOSEngine::swapCharacterLogo() {
+void AGOSEngine_Feeble::swapCharacterLogo() {
 	Common::Rect srcRect, dstRect;
 	byte *src, *dst;
 	uint16 w, h;

Modified: scummvm/trunk/engines/agos/string.cpp
===================================================================
--- scummvm/trunk/engines/agos/string.cpp	2007-05-13 12:41:42 UTC (rev 26832)
+++ scummvm/trunk/engines/agos/string.cpp	2007-05-13 13:19:46 UTC (rev 26833)
@@ -362,9 +362,7 @@
 		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)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list