[Scummvm-cvs-logs] SF.net SVN: scummvm:[40065] scummvm/branches/branch-0-13-0/engines/agos

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Wed Apr 22 12:35:25 CEST 2009


Revision: 40065
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40065&view=rev
Author:   Kirben
Date:     2009-04-22 10:35:25 +0000 (Wed, 22 Apr 2009)

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

Modified Paths:
--------------
    scummvm/branches/branch-0-13-0/engines/agos/agos.h
    scummvm/branches/branch-0-13-0/engines/agos/zones.cpp

Modified: scummvm/branches/branch-0-13-0/engines/agos/agos.h
===================================================================
--- scummvm/branches/branch-0-13-0/engines/agos/agos.h	2009-04-22 10:33:18 UTC (rev 40064)
+++ scummvm/branches/branch-0-13-0/engines/agos/agos.h	2009-04-22 10:35:25 UTC (rev 40065)
@@ -856,10 +856,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();
@@ -1711,10 +1711,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/branches/branch-0-13-0/engines/agos/zones.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/agos/zones.cpp	2009-04-22 10:33:18 UTC (rev 40064)
+++ scummvm/branches/branch-0-13-0/engines/agos/zones.cpp	2009-04-22 10:35:25 UTC (rev 40065)
@@ -140,7 +140,7 @@
 
 void AGOSEngine::checkRunningAnims() {
 	VgaSprite *vsp;
-	if (getGameType() != GType_FF && getGameType() != GType_PP &&
+	if ((getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) &&
 		(_lockWord & 0x20)) {
 		return;
 	}
@@ -152,7 +152,7 @@
 	}
 }
 
-void AGOSEngine_Feeble::checkNoOverWrite() {
+void AGOSEngine::checkNoOverWrite() {
 	VgaPointersEntry *vpe;
 
 	if (_noOverWrite == 0xFFFF)
@@ -174,7 +174,7 @@
 	}
 }
 
-void AGOSEngine_Feeble::checkAnims(uint a) {
+void AGOSEngine::checkAnims(uint a) {
 	VgaPointersEntry *vpe;
 
 	vpe = &_vgaBufferPointers[a];
@@ -193,7 +193,7 @@
 	}
 }
 
-void AGOSEngine_Feeble::checkZonePtrs() {
+void AGOSEngine::checkZonePtrs() {
 	uint count = ARRAYSIZE(_vgaBufferPointers);
 	VgaPointersEntry *vpe = _vgaBufferPointers;
 	do {
@@ -210,49 +210,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