aboutsummaryrefslogtreecommitdiff
path: root/engines/made/database.cpp
diff options
context:
space:
mode:
authorBenjamin Haisch2008-05-06 11:45:23 +0000
committerBenjamin Haisch2008-05-06 11:45:23 +0000
commit9df82055f0dff7c242f889c5d776ad0cca2d5bc8 (patch)
tree5748f4f80aad87ae23478d8eea4beb7e7eef2013 /engines/made/database.cpp
parent397e04d0b1ff6d96502c4eca42c1ab4a31b2dbcd (diff)
downloadscummvm-rg350-9df82055f0dff7c242f889c5d776ad0cca2d5bc8.tar.gz
scummvm-rg350-9df82055f0dff7c242f889c5d776ad0cca2d5bc8.tar.bz2
scummvm-rg350-9df82055f0dff7c242f889c5d776ad0cca2d5bc8.zip
- The Manhole: New and Enhanced is now (partially) playable
- Implemented cmd_objectp - Changed how the script externals array is set up - Cleanup svn-id: r31895
Diffstat (limited to 'engines/made/database.cpp')
-rw-r--r--engines/made/database.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/made/database.cpp b/engines/made/database.cpp
index a7970a2e27..ea48fdedbe 100644
--- a/engines/made/database.cpp
+++ b/engines/made/database.cpp
@@ -256,8 +256,9 @@ void GameDatabase::loadVersion2(Common::SeekableReadStream &sourceS) {
debug(2, "textOffs = %08X; textSize = %08X; objectCount = %d; varObjectCount = %d; gameStateSize = %d; objectsOffs = %08X; objectsSize = %d\n", textOffs, textSize, objectCount, varObjectCount, _gameStateSize, objectsOffs, objectsSize);
- _gameState = new byte[_gameStateSize];
+ _gameState = new byte[_gameStateSize + 2];
memset(_gameState, 0, _gameStateSize);
+ setVar(1, objectCount);
sourceS.seek(textOffs);
_gameText = new char[textSize];
@@ -271,8 +272,8 @@ void GameDatabase::loadVersion2(Common::SeekableReadStream &sourceS) {
for (uint32 i = 0; i < objectCount; i++) {
Object *obj = new Object();
int objSize = obj->loadVersion2(sourceS);
- objSize = objSize % 2;
// objects are aligned on 2-byte-boundaries, skip unused bytes
+ objSize = objSize % 2;
sourceS.skip(objSize);
_objects.push_back(obj);
}