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

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sun Apr 19 03:28:27 CEST 2009


Revision: 40015
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40015&view=rev
Author:   Kirben
Date:     2009-04-19 01:28:27 +0000 (Sun, 19 Apr 2009)

Log Message:
-----------
Fix possible overwriting of sound data in earlier games, and cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/zones.cpp

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2009-04-19 01:01:54 UTC (rev 40014)
+++ scummvm/trunk/engines/agos/agos.h	2009-04-19 01:28:27 UTC (rev 40015)
@@ -868,10 +868,10 @@
 	void writeChar(WindowBlock *window, int x, int y, int offs, int val);
 
 	byte *allocBlock(uint32 size);
-	virtual void checkNoOverWrite();
+	void checkNoOverWrite();
 	void checkRunningAnims();
-	virtual void checkAnims(uint a);
-	virtual void checkZonePtrs();
+	void checkAnims(uint a);
+	void checkZonePtrs();
 	void setZoneBuffers();
 
 	void runVgaScript();
@@ -1993,10 +1993,6 @@
 	void saveUserGame(int slot);
 	void windowBackSpace(WindowBlock *window);
 
-	virtual void checkNoOverWrite();
-	virtual void checkAnims(uint a);
-	virtual void checkZonePtrs();
-
 	virtual char *genSaveName(int slot);
 };
 

Modified: scummvm/trunk/engines/agos/zones.cpp
===================================================================
--- scummvm/trunk/engines/agos/zones.cpp	2009-04-19 01:01:54 UTC (rev 40014)
+++ scummvm/trunk/engines/agos/zones.cpp	2009-04-19 01:28:27 UTC (rev 40015)
@@ -144,12 +144,12 @@
 }
 
 void AGOSEngine::checkRunningAnims() {
-	VgaSprite *vsp;
-	if (getGameType() != GType_FF && getGameType() != GType_PP &&
+	if ((getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) &&
 		(_videoLockOut & 0x20)) {
 		return;
 	}
 
+	VgaSprite *vsp;
 	for (vsp = _vgaSprites; vsp->id; vsp++) {
 		checkAnims(vsp->zoneNum);
 		if (_rejectBlock == true)
@@ -157,7 +157,7 @@
 	}
 }
 
-void AGOSEngine_Feeble::checkNoOverWrite() {
+void AGOSEngine::checkNoOverWrite() {
 	VgaPointersEntry *vpe;
 
 	if (_noOverWrite == 0xFFFF)
@@ -179,7 +179,7 @@
 	}
 }
 
-void AGOSEngine_Feeble::checkAnims(uint a) {
+void AGOSEngine::checkAnims(uint a) {
 	VgaPointersEntry *vpe;
 
 	vpe = &_vgaBufferPointers[a];
@@ -198,7 +198,7 @@
 	}
 }
 
-void AGOSEngine_Feeble::checkZonePtrs() {
+void AGOSEngine::checkZonePtrs() {
 	uint count = ARRAYSIZE(_vgaBufferPointers);
 	VgaPointersEntry *vpe = _vgaBufferPointers;
 	do {
@@ -215,49 +215,6 @@
 	} while (++vpe, --count);
 }
 
-void AGOSEngine::checkNoOverWrite() {
-	VgaPointersEntry *vpe;
-
-	if (_noOverWrite == 0xFFFF)
-		return;
-
-	vpe = &_vgaBufferPointers[_noOverWrite];
-
-	if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) ||
-		((_vgaMemPtr <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) {
-		_rejectBlock = true;
-		_vgaMemPtr = vpe->vgaFile1 + 0x5000;
-	} else {
-		_rejectBlock = false;
-	}
-}
-
-void AGOSEngine::checkAnims(uint a) {
-	VgaPointersEntry *vpe;
-
-	vpe = &_vgaBufferPointers[a];
-
-	if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) ||
-			((_block <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) {
-		_rejectBlock = true;
-		_vgaMemPtr = vpe->vgaFile1 + 0x5000;
-	} else {
-		_rejectBlock = false;
-	}
-}
-
-void AGOSEngine::checkZonePtrs() {
-	uint count = ARRAYSIZE(_vgaBufferPointers);
-	VgaPointersEntry *vpe = _vgaBufferPointers;
-	do {
-		if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) ||
-			((_block <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) {
-			vpe->vgaFile1 = NULL;
-			vpe->vgaFile2 = NULL;
-		}
-	} while (++vpe, --count);
-}
-
 } // End of namespace AGOS
 
 


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