Prev: C401 Up: Map Next: C426
C412: Handler: Update Object Location
Input
B Object/ event ID
C Room ID for the update (can also be 00)
Handler_UpdateObjectLocation C412 BIT 7,B Jump to UpdateObjectLocation_NonScenic if this is a normal object/ event.
C414 JR Z,UpdateObjectLocation_NonScenic
Handle non-scenic events.
Prepare object/ event ID for use.
C416 RES 7,B Clear the scenic flag.
C418 LD HL,$BC78 HL=Table_ScenicEventLocations.
C41B JR UpdateObjectLocation Jump to UpdateObjectLocation.
Handle non-scenic events.
UpdateObjectLocation_NonScenic C41D LD HL,$BBF0 HL=Table_ItemLocations.
Both object/ event types continue from here.
UpdateObjectLocation C420 LD D,$00 Load the event ID into DE.
C422 LD E,B
C423 ADD HL,DE Add the event ID to the event locations table.
C424 LD (HL),C Update the table with the new room ID in C.
C425 RET Return.
Prev: C401 Up: Map Next: C426