[Scummvm-cvs-logs] SF.net SVN: scummvm:[43896] scummvm/trunk/engines/gob
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Tue Sep 1 22:36:04 CEST 2009
Revision: 43896
http://scummvm.svn.sourceforge.net/scummvm/?rev=43896&view=rev
Author: strangerke
Date: 2009-09-01 20:36:03 +0000 (Tue, 01 Sep 2009)
Log Message:
-----------
Playtoons: Add support to IDs 65530, 65531, 65532, 65534, and renamed Id -1 into 65535 in Map_v2::loadMapObjects. This allows to start the contruction mode and "somehow" use it. (Thanks DrMcCoy for pointing out my errors)
Modified Paths:
--------------
scummvm/trunk/engines/gob/map.h
scummvm/trunk/engines/gob/map_v2.cpp
Modified: scummvm/trunk/engines/gob/map.h
===================================================================
--- scummvm/trunk/engines/gob/map.h 2009-09-01 20:34:10 UTC (rev 43895)
+++ scummvm/trunk/engines/gob/map.h 2009-09-01 20:36:03 UTC (rev 43896)
@@ -72,6 +72,7 @@
int16 _tilesHeight;
int16 _passWidth;
bool _bigTiles;
+ bool _mapUnknownBool;
int8 *_passMap; // [y * _mapWidth + x], getPass(x, y);
int16 **_itemsMap; // [y][x]
Modified: scummvm/trunk/engines/gob/map_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/map_v2.cpp 2009-09-01 20:34:10 UTC (rev 43895)
+++ scummvm/trunk/engines/gob/map_v2.cpp 2009-09-01 20:36:03 UTC (rev 43896)
@@ -54,6 +54,7 @@
byte *variables;
uint32 tmpPos;
uint32 passPos;
+ uint16 i;
var = _vm->_game->_script->readVarIndex();
variables = _vm->_inter->_variables->getAddressOff8(var);
@@ -61,11 +62,34 @@
id = _vm->_game->_script->readInt16();
if (((uint16) id) >= 65520) {
- warning("Map_v2::loadMapObjects(): ID >= 65520");
+ switch ((uint16) id) {
+ case 65530:
+ for (i = 0; i < _mapWidth * _mapHeight; i++)
+ _passMap[i] -= READ_VARO_UINT8(var + i);
+ break;
+ case 65531:
+ for (i = 0; i < _mapWidth * _mapHeight; i++)
+ _passMap[i] += READ_VARO_UINT8(var + i);
+ break;
+ case 65532:
+ for (i = 0; i < _mapWidth * _mapHeight; i++)
+ WRITE_VARO_UINT8(var + i, 0x00);
+ break;
+ case 65533:
+ warning("Map_v2::loadMapObjects(): ID == 65533");
+ break;
+ case 65534:
+ _tilesWidth = READ_VARO_UINT8(var);
+ _tilesHeight = READ_VARO_UINT8(var + 1);
+ _mapWidth = READ_VARO_UINT8(var + 2);
+ _mapHeight = READ_VARO_UINT8(var + 3);
+ _mapUnknownBool = READ_VARO_UINT8(var + 4) ? true : false;
+ break;
+ case 65535:
+ _passMap = (int8 *) _vm->_inter->_variables->getAddressOff8(var);
+ break;
+ }
return;
- } else if (id == -1) {
- _passMap = (int8 *) _vm->_inter->_variables->getAddressOff8(var);
- return;
}
Resource *resource = _vm->_game->_resources->getResource(id);
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