Prev: 45284 Up: Map Next: 45309
45294: Calculate Location Offset
Used by the routines at LoadGameState and SaveGameState.
Subtracts the location table at Table_Locations from the room pointer and returns that distance.
Output
DE Offset from base location address
CalculateLocationOffset 45294 LD IX,33803 Use the locations at Table_Locations and the character script cycle at CharacterScriptCycles.
45298 LD HL,40991
45301 LD DE,33803 Use the locations at Table_Locations.
45304 AND A Clear the carry before subtracting the two room pointers.
45305 SBC HL,DE Measure the gap between the two pointers.
45307 EX DE,HL Hand the offset back in DE.
45308 RET Return.
Prev: 45284 Up: Map Next: 45309