mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 00:41:12 +00:00
TEENAGENT: Add dsAddr symbols for Inventory. Minor fix to logic.
The start address for the inventory item pointer data table was incorrect and has been corrected.
This commit is contained in:
parent
7bc646f8ca
commit
f856a0a746
@ -58,15 +58,14 @@ Inventory::Inventory(TeenAgentEngine *vm) : _vm(vm) {
|
||||
}
|
||||
_offset[92] = items_size;
|
||||
|
||||
for (byte i = 0; i <= 92; ++i) {
|
||||
for (byte i = 0; i < 92; ++i) {
|
||||
InventoryObject io;
|
||||
uint16 obj_addr = vm->res->dseg.get_word(0xc4a4 + i * 2);
|
||||
if (obj_addr != 0)
|
||||
io.load(vm->res->dseg.ptr(obj_addr));
|
||||
uint16 obj_addr = vm->res->dseg.get_word(dsAddr_inventoryItemDataPtrTable + i * 2);
|
||||
io.load(vm->res->dseg.ptr(obj_addr));
|
||||
_objects.push_back(io);
|
||||
}
|
||||
|
||||
_inventory = vm->res->dseg.ptr(0xc48d);
|
||||
_inventory = vm->res->dseg.ptr(dsAddr_inventory);
|
||||
|
||||
for (int y = 0; y < 4; ++y)
|
||||
for (int x = 0; x < 6; ++x) {
|
||||
|
@ -645,6 +645,12 @@ const uint16 dsAddr_currentScene = 0xb4f3; // 1 byte
|
||||
// Object Combine Error Message : 0xc3e2 to 0xc41e
|
||||
const uint16 dsAddr_objCombineErrorMsg = 0xc3e2; // "Using these two objects ..."
|
||||
|
||||
// Inventory (item ids held by Ego) (1 byte * 24) : 0xc48d to 0xc4a4
|
||||
const uint16 dsAddr_inventory = 0xc48d;
|
||||
// 0xc4a5 is null word alignment byte
|
||||
// Inventory item data address table (2 bytes * 92) : 0xc4a6 to 0xc55d
|
||||
const uint16 dsAddr_inventoryItemDataPtrTable = 0xc4a6;
|
||||
|
||||
// Current Music Id Playing : 0xdb90
|
||||
const uint16 dsAddr_currentMusic = 0xdb90; // 1 byte
|
||||
// Counter for Mansion Intrusion Attempts : 0xdbea
|
||||
|
Loading…
Reference in New Issue
Block a user