Prev: 8D11 Up: Map Next: 8DA6
8D50: Action Handler for Oracle
Used by the routine at Vector_PrintChar.
ActionOracle 8D50 LD A,(IX+$0A) Check animation countdown.
8D53 AND A Skip if zero
8D54 JR Z,ActionOracle_0
8D56 DEC (IX+$0A) Countdown.
8D59 JR NZ,ActionOracle_2 Not zero yet...
8D5B LD A,(IX+$0B) If eye set to open?
8D5E CP $C6
8D60 JR Z,ActionOracle_1 Yes, set to blink
ActionOracle_0 8D62 LD (IX+$0B),$C6 Set eye to open, with long countdown.
8D66 LD (IX+$0A),$30
8D6A JR ActionOracle_2
ActionOracle_1 8D6C LD (IX+$0B),$C7 Set eye to blink, with a short countdown.
8D70 LD (IX+$0A),$02
ActionOracle_2 8D74 LD A,(CamDirection_DFD2) Only display oracle if camera is facing N/S.
8D77 BIT 0,A
8D79 RET NZ
8D7A LD HL,(ManData_PosSecondary_dfc5) Check to see if oracle is within the camera view.
8D7D LD E,(IX+$07) Check against oracle secondary position.
8D80 LD D,(IX+$08)
8D83 CALL Vector_ABS(hl_minus_de)
8D86 LD BC,$0022
8D89 AND A
8D8A SBC HL,BC
8D8C JR C,ActionOracle_3
8D8E LD DE,$0005
8D91 AND A
8D92 SBC HL,DE
8D94 RET C
8D95 LD (IX+$0B),$00 Turn off any animation.
8D99 RET
ActionOracle_3 8D9A LD (IX+$09),$23 Set Y position on offscreen.
8D9E LD (IX+$0C),$01
8DA2 CALL Vector_SpriteBlit
8DA5 RET
Prev: 8D11 Up: Map Next: 8DA6