Prev: 48965 Up: Map Next: 49001
48981: Handler: Update Object Location
Write a new location for an object, or for a scenic-event room.
Bit 7 selects the scenic-room list instead of the object table.
UpdateObjectLocation 48981 BIT 7,B Jump to UpdateObjectLocation_Objects for an ordinary object.
48983 JR Z,UpdateObjectLocation_Objects
48985 RES 7,B Clear that bit and use the scenic list (47688).
48987 LD HL,47688
48990 JR UpdateObjectLocation_Write Jump to UpdateObjectLocation_Write to write the location.
UpdateObjectLocation_Objects 48992 LD HL,47560 Look up the object locations (GameState).
UpdateObjectLocation_Write 48995 LD D,0 Write the new location.
48997 LD E,B
48998 ADD HL,DE
48999 LD (HL),C
49000 RET Return.
View the equivalent code in;
Prev: 48965 Up: Map Next: 49001