Prev: 81DB Up: Map Next: 8283
81F0: Drive the wizard's spell
Sprites $34 to $37, and the odd one of the three weapons: where the sword and the axe are solid shapes redrawn at eight angles, this is a scatter of loose pixels that changes shape rather than turning, which is what makes it read as magic rather than as a thrown object. Two of its four frames are identical.
Confirmed by firing as each character and reading the weapon type out of the player record: the wizard's shots come back as $36, inside this range, while the knight's are $41-$47 and the serf's $3E.
SPIN_SPELL 81F0 CALL ACTOR_TO_WORKSPACE
81F3 LD A,(IX+$00)
81F6 INC A
81F7 AND $03
81F9 ADD A,$34
81FB LD (IX+$00),A
81FE LD A,($5C78)
8201 RLA
8202 AND $02
8204 ADD A,$45
8206 LD (IX+$05),A
This entry point is used by the routines at SPIN_AXE and AIM_SWORD.
SPIN_WEAPON 8209 LD DE,($5E1D)
820D LD A,($EA91)
8210 CP (IX+$01)
8213 JR NZ,CLEAR_ACTOR
8215 DEC (IX+$0F)
8218 JR Z,WEAPON_GONE
821A BIT 0,(IX+$02)
821E JR NZ,WEAPON_GONE
8220 LD A,(IX+$03)
8223 ADD A,(IX+$06)
8226 LD C,A
8227 SUB $58
8229 JP P,SPIN_SPELL_0
822C NEG
SPIN_SPELL_0 822E CP E
822F JR NC,SPIN_SPELL_5
SPIN_SPELL_1 8231 LD A,(IX+$04)
8234 ADD A,(IX+$07)
8237 LD B,A
8238 SUB $68
823A JP P,SPIN_SPELL_2
823D NEG
SPIN_SPELL_2 823F CP D
8240 JR NC,SPIN_SPELL_4
SPIN_SPELL_3 8242 LD (IX+$03),C
8245 LD (IX+$04),B
8248 JP REDRAW_ACTOR
SPIN_SPELL_4 824B LD B,(IX+$04)
824E LD A,(IX+$07)
8251 NEG
8253 LD (IX+$07),A
8256 PUSH BC
8257 CALL SOUND_BOUNCE
825A POP BC
825B JR SPIN_SPELL_3
SPIN_SPELL_5 825D LD C,(IX+$03)
8260 LD A,(IX+$06)
8263 NEG
8265 LD (IX+$06),A
8268 PUSH BC
8269 CALL SOUND_BOUNCE
826C POP BC
826D JR SPIN_SPELL_1
This entry point is used by the routine at COUNTDOWN_ACTOR.
WEAPON_GONE 826F CALL ERASE_THING
8272 CALL SOUND_WEAPON_GONE
8275 LD A,($5E1A)
8278 LD (IX+$05),A
827B CALL DRAW_FROM_RECORD
This entry point is used by the routine at ACTOR_TICK_TIMER.
CLEAR_ACTOR 827E LD (IX+$00),$00
8282 RET
Prev: 81DB Up: Map Next: 8283