[Scummvm-cvs-logs] SF.net SVN: scummvm: [28871] scummvm/trunk/engines/agi

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Fri Sep 7 01:32:08 CEST 2007


Revision: 28871
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28871&view=rev
Author:   mthreepwood
Date:     2007-09-06 16:32:08 -0700 (Thu, 06 Sep 2007)

Log Message:
-----------
This fixes images in Winnie (for me at least)

Modified Paths:
--------------
    scummvm/trunk/engines/agi/loader_preagi.cpp
    scummvm/trunk/engines/agi/preagi_winnie.cpp

Modified: scummvm/trunk/engines/agi/loader_preagi.cpp
===================================================================
--- scummvm/trunk/engines/agi/loader_preagi.cpp	2007-09-06 22:13:33 UTC (rev 28870)
+++ scummvm/trunk/engines/agi/loader_preagi.cpp	2007-09-06 23:32:08 UTC (rev 28871)
@@ -225,25 +225,24 @@
 		/* if picture is currently NOT loaded *OR* cacheing is off,
 		 * unload the resource (caching==off) and reload it
 		 */
-		if (~_vm->_game.dirPic[0].flags & RES_LOADED) {
+		if (~_vm->_game.dirPic[0].flags & RES_LOADED)
 			unloadResource(rPICTURE, 0);
 
-			data = new uint8[4096];
+		data = new uint8[4096];
 
-			if (!infile.open(n))
-				return errBadResource;
-			infile.read(data, infile.size());
+		if (!infile.open(n))
+			return errBadResource;
+		infile.read(data, infile.size());
 
-			if (data != NULL) {
-				_vm->_game.pictures[0].rdata = data;
-				_vm->_game.dirPic[0].len = infile.size();
-				_vm->_game.dirPic[0].flags |= RES_LOADED;
-			} else {
-				ec = errBadResource;
-			}
-
-			infile.close();
+		if (data != NULL) {
+			_vm->_game.pictures[0].rdata = data;
+			_vm->_game.dirPic[0].len = infile.size();
+			_vm->_game.dirPic[0].flags |= RES_LOADED;
+		} else {
+			ec = errBadResource;
 		}
+
+		infile.close();
 		break;
 	case rSOUND:
 		break;
@@ -269,16 +268,15 @@
 		/* if picture is currently NOT loaded *OR* cacheing is off,
 		 * unload the resource (caching==off) and reload it
 		 */
-		if (~_vm->_game.dirPic[0].flags & RES_LOADED) {
+		if (~_vm->_game.dirPic[0].flags & RES_LOADED)
 			unloadResource(rPICTURE, 0);
 
-			if (n != NULL) {
-				_vm->_game.pictures[0].rdata = n;
-				_vm->_game.dirPic[0].len = 4096;		//FIXME
-				_vm->_game.dirPic[0].flags |= RES_LOADED;
-			} else {
-				ec = errBadResource;
-			}
+		if (n != NULL) {
+			_vm->_game.pictures[0].rdata = n;
+			_vm->_game.dirPic[0].len = 4096;		//FIXME
+			_vm->_game.dirPic[0].flags |= RES_LOADED;
+		} else {
+			ec = errBadResource;
 		}
 		break;
 	case rSOUND:

Modified: scummvm/trunk/engines/agi/preagi_winnie.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_winnie.cpp	2007-09-06 22:13:33 UTC (rev 28870)
+++ scummvm/trunk/engines/agi/preagi_winnie.cpp	2007-09-06 23:32:08 UTC (rev 28871)
@@ -662,7 +662,6 @@
 	_vm->_picture->showPic(IDI_WTP_PIC_X0, IDI_WTP_PIC_Y0, IDI_WTP_PIC_WIDTH, IDI_WTP_PIC_HEIGHT);
 	_vm->_gfx->doUpdate();
 	_vm->_system->updateScreen();	// TODO: this should go in the game's main loop
-	//_vm->preAgiUnloadResource(rPICTURE, 0); // FIXME: This causes crashes
 
 	// draw object picture
 	//Winnie_DrawObjPic(iObj, IDI_WTP_PIC_X0 + roomhdr.objX, IDI_WTP_PIC_Y0 + roomhdr.objY);


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