8CFE: Event : Door opening or closing.
EventDoorOpenClose |
8CFE |
INC (IX+$0D) |
|
8D01 |
LD E,(IX+$0D) |
|
8D04 |
LD D,$00 |
|
8D06 |
LD HL,Door_PreFrameTable |
|
8D09 |
ADD HL,DE |
|
8D0A |
LD A,(HL) |
|
8D0B |
CP $FF |
|
8D0D |
JR NZ,EventDoorOpenClose_0 |
|
8D0F |
LD (IX+$02),$00 |
|
8D13 |
LD HL,Event_NumDoors |
|
8D16 |
DEC (HL) |
|
8D17 |
LD A,(IX+$0E) |
|
8D1A |
AND A |
|
8D1B |
RET NZ |
|
8D1C |
LD HL,Flag_DoorEntry |
|
8D1F |
SET 2,(HL) |
|
8D21 |
RET |
EventDoorOpenClose_0 |
8D22 |
CP $06 |
|
8D24 |
JR NZ,EventDoorOpenClose_1 |
|
8D26 |
LD A,(IX+$0E) |
|
8D29 |
AND A |
|
8D2A |
JR NZ,EventDoorOpenClose_1 |
|
8D2C |
LD A,(Flag_DoorEntry) |
|
8D2F |
SET 1,A |
|
8D31 |
LD (Flag_DoorEntry),A |
EventDoorOpenClose_1 |
8D34 |
LD A,(Room_CurrentIndex) |
|
8D37 |
CP (IX+$0C) |
|
8D3A |
RET NZ |
|
8D3B |
LD A,(Camera_Compass) |
|
8D3E |
CP (IX+$0A) |
|
8D41 |
RET NZ |
|
8D42 |
LD C,L |
|
8D43 |
LD B,H |
|
8D44 |
BIT 0,A |
|
8D46 |
JR NZ,EventDoorOpenClose_2 |
|
8D48 |
LD HL,(Coords_NS) |
|
8D4B |
LD E,(IX+$05) |
|
8D4E |
LD D,(IX+$06) |
|
8D51 |
AND A |
|
8D52 |
SBC HL,DE |
|
8D54 |
RET NZ |
|
8D55 |
LD HL,(Coords_EW) |
|
8D58 |
LD E,(IX+$07) |
|
8D5B |
LD D,(IX+$08) |
|
8D5E |
JR EventDoorOpenClose_3 |
EventDoorOpenClose_2 |
8D60 |
LD HL,(Coords_EW) |
|
8D63 |
LD E,(IX+$07) |
|
8D66 |
LD D,(IX+$08) |
|
8D69 |
AND A |
|
8D6A |
SBC HL,DE |
|
8D6C |
RET NZ |
|
8D6D |
LD HL,(Coords_NS) |
|
8D70 |
LD E,(IX+$05) |
|
8D73 |
LD D,(IX+$06) |
EventDoorOpenClose_3 |
8D76 |
CALL sub_abs |
|
8D79 |
LD DE,$0023 |
|
8D7C |
AND A |
|
8D7D |
SBC HL,DE |
|
8D7F |
RET NC |
|
8D80 |
LD A,(IX+$02) |
|
8D83 |
CP $94 |
|
8D85 |
RET NC |
|
8D86 |
LD A,(BC) |
|
8D87 |
CALL Door_CreateBitmap |
|
8D8A |
LD HL,ScratchPad |
|
8D8D |
LD (Bitmap_PtrTable),HL |
|
8D90 |
LD A,$86 |
|
8D92 |
LD (Bitmap_PtrTableOffHeight),A |
|
8D95 |
LD A,$03 |
|
8D97 |
LD (Bitmap_PtrTableOffWidth),A |
|
8D9A |
LD A,$01 |
|
8D9C |
JP ObjNode_BlitShft |