[Scummvm-cvs-logs] SF.net SVN: scummvm:[36209] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Tue Feb 3 11:42:27 CET 2009


Revision: 36209
          http://scummvm.svn.sourceforge.net/scummvm/?rev=36209&view=rev
Author:   peres001
Date:     2009-02-03 10:42:27 +0000 (Tue, 03 Feb 2009)

Log Message:
-----------
Fixed support for walking zones in BRA:
* patches are not applied if the zone is not visible when loading 
* when applying a patch, always overwrite the existing data instead of OR'ing

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/gfxbase.cpp
    scummvm/trunk/engines/parallaction/graphics.cpp
    scummvm/trunk/engines/parallaction/graphics.h
    scummvm/trunk/engines/parallaction/parser_br.cpp

Modified: scummvm/trunk/engines/parallaction/gfxbase.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/gfxbase.cpp	2009-02-03 10:38:56 UTC (rev 36208)
+++ scummvm/trunk/engines/parallaction/gfxbase.cpp	2009-02-03 10:42:27 UTC (rev 36209)
@@ -34,7 +34,7 @@
 
 GfxObj::GfxObj(uint objType, Frames *frames, const char* name) :
 	_frames(frames), _keep(true), x(0), y(0), z(0), _flags(kGfxObjNormal),
-	type(objType), frame(0), layer(3), scale(100), _hasMask(false)  {
+	type(objType), frame(0), layer(3), scale(100), _hasMask(false), _hasPath(false)  {
 
 	if (name) {
 		_name = strdup(name);

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2009-02-03 10:38:56 UTC (rev 36208)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2009-02-03 10:42:27 UTC (rev 36209)
@@ -941,7 +941,7 @@
 	}
 	PathBuffer *patch = _pathPatches[id];
 	if (apply) {
-		_path->bltOr(x, y, *patch, 0, 0, patch->w, patch->h);
+		_path->bltCopy(x, y, *patch, 0, 0, patch->w, patch->h);
 	} else {
 		_path->bltCopy(x, y, _pathBackup, x, y, patch->w, patch->h);
 	}
@@ -1075,23 +1075,6 @@
 	return data + (x >> 3) + y * internalWidth;
 }
 
-void PathBuffer::bltOr(uint16 dx, uint16 dy, const PathBuffer &src, uint16 sx, uint16 sy, uint width, uint height) {
-	assert((width <= w) && (width <= src.w) && (height <= h) && (height <= src.h));
-
-	byte *s = src.getPtr(sx, sy);
-	byte *d = getPtr(dx, dy);
-
-	// this code assumes buffers are aligned on 4-pixels boundaries, as the original does
-	uint16 linewidth = width >> 3;
-	for (uint16 i = 0; i < height; i++) {
-		for (uint16 j = 0; j < linewidth; j++) {
-			*d++ |= *s++;
-		}
-		d += internalWidth - linewidth;
-		s += src.internalWidth - linewidth;
-	}
-}
-
 void PathBuffer::bltCopy(uint16 dx, uint16 dy, const PathBuffer &src, uint16 sx, uint16 sy, uint width, uint height) {
 	assert((width <= w) && (width <= src.w) && (height <= h) && (height <= src.h));
 

Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h	2009-02-03 10:38:56 UTC (rev 36208)
+++ scummvm/trunk/engines/parallaction/graphics.h	2009-02-03 10:42:27 UTC (rev 36209)
@@ -218,7 +218,6 @@
 	bool	bigEndian;
 
 	byte* getPtr(uint16 x, uint16 y) const;
-	void bltOr(uint16 dx, uint16 dy, const PathBuffer &src, uint16 sx, uint16 sy, uint width, uint height);
 	void bltCopy(uint16 dx, uint16 dy, const PathBuffer &src, uint16 sx, uint16 sy, uint width, uint height);
 
 public:

Modified: scummvm/trunk/engines/parallaction/parser_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser_br.cpp	2009-02-03 10:38:56 UTC (rev 36208)
+++ scummvm/trunk/engines/parallaction/parser_br.cpp	2009-02-03 10:42:27 UTC (rev 36209)
@@ -1258,7 +1258,8 @@
 	ZoneList::iterator it = _vm->_location._zones.begin();
 	for ( ; it != _vm->_location._zones.end(); it++) {
 		bool visible = ((*it)->_flags & kFlagsRemove) == 0;
-		_vm->showZone((*it), visible);
+		if (visible)
+			_vm->showZone((*it), visible);
 	}
 
 	if (ctxt.characterName) {


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