[Scummvm-cvs-logs] SF.net SVN: scummvm:[53950] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sat Oct 30 19:27:23 CEST 2010


Revision: 53950
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53950&view=rev
Author:   drmccoy
Date:     2010-10-30 17:27:23 +0000 (Sat, 30 Oct 2010)

Log Message:
-----------
GOB: Rename Map::_widthByte to _mapVersion

Modified Paths:
--------------
    scummvm/trunk/engines/gob/goblin_v4.cpp
    scummvm/trunk/engines/gob/map.cpp
    scummvm/trunk/engines/gob/map.h
    scummvm/trunk/engines/gob/map_v2.cpp

Modified: scummvm/trunk/engines/gob/goblin_v4.cpp
===================================================================
--- scummvm/trunk/engines/gob/goblin_v4.cpp	2010-10-30 17:26:49 UTC (rev 53949)
+++ scummvm/trunk/engines/gob/goblin_v4.cpp	2010-10-30 17:27:23 UTC (rev 53950)
@@ -135,7 +135,7 @@
 	obj->destX = destX;
 	obj->destY = destY;
 
-	if (_vm->_map->_widthByte == 4) {
+	if (_vm->_map->getVersion() == 4) {
 		switch (dir) {
 		case kDirNW:
 			animData->nextState = turnState(animData->state, kDirNW);

Modified: scummvm/trunk/engines/gob/map.cpp
===================================================================
--- scummvm/trunk/engines/gob/map.cpp	2010-10-30 17:26:49 UTC (rev 53949)
+++ scummvm/trunk/engines/gob/map.cpp	2010-10-30 17:27:23 UTC (rev 53950)
@@ -32,13 +32,13 @@
 namespace Gob {
 
 Map::Map(GobEngine *vm) : _vm(vm) {
+	_mapVersion = 0;
+
 	_passWidth =  0;
 	_mapWidth  = -1;
 	_mapHeight = -1;
 	_passMap   =  0;
 
-	_widthByte = 0;
-
 	_screenWidth  = 0;
 	_screenHeight = 0;
 	_tilesWidth   = 0;
@@ -82,6 +82,10 @@
 	delete[] _wayPoints;
 }
 
+uint8 Map::getVersion() const {
+	return _mapVersion;
+}
+
 int8 Map::getPass(int x, int y, int width) const {
 	if (!_passMap)
 		return 0;

Modified: scummvm/trunk/engines/gob/map.h
===================================================================
--- scummvm/trunk/engines/gob/map.h	2010-10-30 17:26:49 UTC (rev 53949)
+++ scummvm/trunk/engines/gob/map.h	2010-10-30 17:27:23 UTC (rev 53950)
@@ -80,8 +80,6 @@
 	int16 _mapWidth;
 	int16 _mapHeight;
 
-	byte _widthByte;
-
 	int16 _screenWidth;
 	int16 _screenHeight;
 	int16 _tilesWidth;
@@ -107,6 +105,8 @@
 	Map(GobEngine *vm);
 	virtual ~Map();
 
+	uint8 getVersion() const;
+
 	int8 getPass(int x, int y, int width = -1) const;
 	void setPass(int x, int y, int8 pass, int width = -1);
 
@@ -139,6 +139,8 @@
 
 	bool _loadFromAvo;
 
+	uint8 _mapVersion;
+
 	int16 _passWidth;
 	int8 *_passMap; // [y * _mapWidth + x], getPass(x, y);
 

Modified: scummvm/trunk/engines/gob/map_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/map_v2.cpp	2010-10-30 17:26:49 UTC (rev 53949)
+++ scummvm/trunk/engines/gob/map_v2.cpp	2010-10-30 17:27:23 UTC (rev 53950)
@@ -100,11 +100,11 @@
 
 	Common::SeekableReadStream &mapData = *resource->stream();
 
-	_widthByte = mapData.readByte();
-	if (_widthByte == 4) {
+	_mapVersion = mapData.readByte();
+	if (_mapVersion == 4) {
 		_screenWidth = 640;
 		_screenHeight = 400;
-	} else if (_widthByte == 3) {
+	} else if (_mapVersion == 3) {
 		_passWidth = 65;
 		_screenWidth = 640;
 		_screenHeight = 200;
@@ -121,7 +121,7 @@
 	_bigTiles = !(_tilesHeight & 0xFF00);
 	_tilesHeight &= 0xFF;
 
-	if (_widthByte == 4) {
+	if (_mapVersion == 4) {
 		_screenWidth = mapData.readSint16LE();
 		_screenHeight = mapData.readSint16LE();
 	}
@@ -145,7 +145,7 @@
 		_wayPoints[i].notWalkable = mapData.readSByte();
 	}
 
-	if (_widthByte == 4) {
+	if (_mapVersion == 4) {
 		_mapWidth  = VAR(17);
 		_passWidth = _mapWidth;
 	}


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