Prev: B0E4 Up: Map Next: B0FD
B0EE: 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 B0EE LD IX,$840B Use the locations at Table_Locations and the character script cycle at CharacterScriptCycles.
B0F2 LD HL,$A01F
B0F5 LD DE,$840B Use the locations at Table_Locations.
B0F8 AND A Clear the carry before subtracting the two room pointers.
B0F9 SBC HL,DE Measure the gap between the two pointers.
B0FB EX DE,HL Hand the offset back in DE.
B0FC RET Return.
Prev: B0E4 Up: Map Next: B0FD