Prev: 40258 Up: Map Next: 40338
40326: Load B with room index of object A
Used by the routine at 40258.
Input
A Index of an object
Output
B Current room of object
HL Address of current position data for object
40326 LD C,A Load BC with three times object index...
40327 ADD A,A ...
40328 ADD A,C ...
40329 LD C,A ...
40330 LD B,0 ...
40332 LD HL,24922 Load HL with start address of table of objects' current positions...
40335 ADD HL,BC ...and add BC as offset
40336 LD B,(HL) Load B with room index of object
40337 RET Return
Prev: 40258 Up: Map Next: 40338