Prev: 8BDD Up: Map Next: 8C2D
8BF5: Room : Call all of the room events.
Used by the routine at Stage_Draw.
Input
Output
Room_Events 8BF5 LD HL,(CurrentRoom_Type) Get current room's special function and call it.
8BF8 LD H,$00
8BFA ADD HL,HL
8BFB LD DE,Room_TypeJumpVector
8BFE ADD HL,DE
8BFF LD E,(HL)
8C00 INC HL
8C01 LD H,(HL)
8C02 LD L,E
8C03 CALL JP_HL
8C06 LD IX,LinkList_Bg_Ptr Get ptr to link list.
Room_Events_0 8C0A LD L,(IX+$00) Get address of next link.
8C0D LD H,(IX+$01)
8C10 LD A,L check for null ptr, end of list.
8C11 OR H
8C12 RET Z
8C13 PUSH HL Put address of link into IX, putting the previous address on the stack.
8C14 EX (SP),IX
8C16 LD A,(IX+$02) Check for unsed link and remove it if required.
8C19 AND A
8C1A JR NZ,Room_Events_1
8C1C CALL List_RemoveLink
8C1F JR Room_Events_0 Next link.
Room_Events_1 8C21 LD L,(IX+$03) Call store special function.
8C24 LD H,(IX+$04)
8C27 CALL JP_HL
8C2A POP HL Remove old link address from stack.
8C2B JR Room_Events_0 Next link.
Prev: 8BDD Up: Map Next: 8C2D