diff options
author | Vladimir Menshakov | 2009-10-31 19:03:44 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2009-10-31 19:03:44 +0000 |
commit | 5f77a350a3d3b88c2bbfde6053f841cceb49670b (patch) | |
tree | acaa2118f56101ce2611f1a7b888993c4a8ef521 | |
parent | b1671eb2d39900618f6e1077f2b9aeda5f2618f0 (diff) | |
download | scummvm-rg350-5f77a350a3d3b88c2bbfde6053f841cceb49670b.tar.gz scummvm-rg350-5f77a350a3d3b88c2bbfde6053f841cceb49670b.tar.bz2 scummvm-rg350-5f77a350a3d3b88c2bbfde6053f841cceb49670b.zip |
fixed bird-assert from chapter 1
svn-id: r45577
-rw-r--r-- | engines/teenagent/inventory.cpp | 4 | ||||
-rw-r--r-- | engines/teenagent/inventory.h | 2 | ||||
-rw-r--r-- | engines/teenagent/teenagent.cpp | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp index 91de759bec..69478ebeca 100644 --- a/engines/teenagent/inventory.cpp +++ b/engines/teenagent/inventory.cpp @@ -46,11 +46,11 @@ void Inventory::init(TeenAgentEngine *engine) { byte offsets = items->readByte(); assert(offsets == 92); - for (byte i = 0; i < offsets; ++i) { + for (byte i = 0; i <= offsets; ++i) { offset[i] = items->readUint16LE(); } - for (byte i = 0; i < 92; ++i) { + for (byte i = 0; i <= 92; ++i) { InventoryObject io; uint16 obj_addr = res->dseg.get_word(0xc4a4 + i * 2); if (obj_addr != 0) diff --git a/engines/teenagent/inventory.h b/engines/teenagent/inventory.h index d54aa30375..16f7714c04 100644 --- a/engines/teenagent/inventory.h +++ b/engines/teenagent/inventory.h @@ -58,7 +58,7 @@ private: TeenAgentEngine *_engine; Surface background; Common::SeekableReadStream *items; - uint16 offset[92]; + uint16 offset[93]; Common::Array<InventoryObject> objects; byte *inventory; diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index 17242d677e..36dabcda0c 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -185,6 +185,7 @@ Common::Error TeenAgentEngine::loadGameState(int slot) { memcpy(res->dseg.ptr(0x6478), data, sizeof(data)); scene->clear(); + inventory->activate(false); setMusic(Resources::instance()->dseg.get_byte(0xDB90)); |