Prev: 8A1E Up: Map Next: 8A80
8A2F: Drive the witch
Sprites $90 to $93. The countdown at +$0D and the arithmetic shift of +$09 give her flight its rise and fall: SRA halves the vertical speed while keeping its sign, so she coasts upward, slows and drops rather than moving at a constant rate.
MOVE_WITCH 8A2F CALL ACTOR_TO_WORKSPACE
8A32 LD A,($EA91)
8A35 CP (IX+$01)
8A38 JP NZ,ACTOR_TICK_TIMER
8A3B LD HL,$5E25
8A3E INC (HL)
8A3F CALL CHECK_HIT
8A42 DEC E
8A43 JP Z,MONSTER_CAUGHT_PLAYER
8A46 CALL CHECK_SHOT_HIT
8A49 DEC E
8A4A JP Z,KILL_MONSTER
8A4D DEC (IX+$0D)
8A50 JR NZ,MOVE_WITCH_0
8A52 CALL RANDOM_VELOCITY
8A55 SRA (IX+$09)
8A59 LD (IX+$0D),$10
MOVE_WITCH_0 8A5D LD A,(IX+$00)
8A60 AND $FC
8A62 BIT 7,(IX+$08)
8A66 JR NZ,MOVE_WITCH_1
8A68 ADD A,$02
MOVE_WITCH_1 8A6A LD C,A
8A6B LD A,(IX+$0D)
8A6E RRA
8A6F AND $01
8A71 ADD A,C
8A72 LD (IX+$00),A
8A75 LD DE,($5E1D)
8A79 LD (IX+$05),$43
8A7D JP STEP_ACTOR
Prev: 8A1E Up: Map Next: 8A80