Prev: 8BF5 Up: Map Next: 8C72
8C2D: Create a door opening / closing event.
Used by the routine at Action_Enter.
Input
Output
Creates an event for opening the door which will be called.
Event_CreateDoor 8C2D CALL LinkList_CreateNewBg Set up some memory
8C30 RET Z No memory left.
8C31 LD HL,Event_NumDoors Increase door event count
8C34 INC (HL)
8C35 LD HL,EventDoorOpenClose Store the function to use.
8C38 LD (IX+$03),L
8C3B LD (IX+$04),H
8C3E LD A,(ExitFound_DoorType) Store the type of door.
8C41 LD (IX+$02),A
8C44 LD DE,(ExitFound_Coords) Set the coords based on position and camera.
8C48 LD HL,(Coords_NS)
8C4B LD A,(Camera_Compass)
8C4E LD (IX+$0A),A
8C51 BIT 0,A
8C53 JR Z,Event_CreateDoor_0
8C55 LD HL,(Coords_EW)
8C58 EX DE,HL
Event_CreateDoor_0 8C59 LD (IX+$05),L
8C5C LD (IX+$06),H
8C5F LD (IX+$07),E
8C62 LD (IX+$08),D
8C65 LD (IX+$09),$10
8C69 LD A,(Room_CurrentIndex) Store room (?)
8C6C LD (IX+$0C),A
8C6F OR $01 Return (true)
8C71 RET
Prev: 8BF5 Up: Map Next: 8C72