Routines |
Prev: A188 | Up: Map | Next: A1E6 |
Used by the routines at routine04, subversion_spell, RAISDO, TUR_DO, routine13, creature_cast_spell, disbelieve_spell, trees_castles_spell, routine18, routine73, routine77, routine79 and routine83.
|
||||||||
routine20 | A18A | LD A,(IX+$02) | If max distance byte of spell is zero jump to routine20_0. | |||||
A18D | OR A | |||||||
A18E | JR Z,routine20_0 | |||||||
A190 | LD HL,sound_effect_04 | Else play sound_effect_04. | ||||||
A193 | LD (sound_effect_pointer),HL | |||||||
A196 | CALL play_sound_effect_pointer | |||||||
A199 | LD A,$03 | Set unknown48 to 3 ??? | ||||||
A19B | LD (unknown48),A | |||||||
A19E | CALL routine28 | Call routine28 ??? | ||||||
A1A1 | CALL routine50 | Call routine50 ??? | ||||||
A1A4 | HALT | Wait for next interrupt. | ||||||
routine20_0 | A1A5 | DI | Disable interrupts. | |||||
A1A6 | LD A,$45 | Set ATTR-T to $45 (bright cyan on black). | ||||||
A1A8 | LD ($5C8F),A | |||||||
A1AB | LD HL,sound_effect_01 | Play sound_effect_01. | ||||||
A1AE | LD (sound_effect_pointer),HL | |||||||
A1B1 | CALL play_sound_effect_pointer | |||||||
A1B4 | LD HL,twirl_sprites_table | Set twirl_sprite_pointer to first entry in twirl_sprites_table. | ||||||
A1B7 | LD (twirl_sprite_pointer),HL | |||||||
A1BA | LD HL,(object_table_entry_pointer) | Get coordinates from address of current object table entry. | ||||||
A1BD | LD (temp_entry_pointer),HL | |||||||
A1C0 | CALL address_to_coordinate | |||||||
A1C3 | LD (LC_POS),HL | Store coordinates in LC_POS. | ||||||
A1C6 | LD B,$12 | Set B to 18 as loop counter. | ||||||
routine20_1 | A1C8 | PUSH BC | Preserve loop counter | |||||
A1C9 | LD HL,(twirl_sprite_pointer) | Load twirl_sprites_table entry into DE and increment pointer. | ||||||
A1CC | LD E,(HL) | |||||||
A1CD | INC HL | |||||||
A1CE | LD D,(HL) | |||||||
A1CF | INC HL | |||||||
A1D0 | LD (twirl_sprite_pointer),HL | |||||||
A1D3 | EX DE,HL | Swap sprite address into HL and store in C_DATA. | ||||||
A1D4 | LD (C_DATA),HL | |||||||
A1D7 | CALL P_CHAR | Print the sprite. | ||||||
A1DA | CALL sound_effect_playback | Play sound_effect_04 again. | ||||||
A1DD | POP BC | Restore the loop counter and loop for 18 iterations. | ||||||
A1DE | DJNZ routine20_1 | |||||||
A1E0 | CALL routine50 | |||||||
A1E3 | EI | Enable interrupts. | ||||||
A1E4 | HALT | Wait for next interrupt and return. | ||||||
A1E5 | RET |
Prev: A188 | Up: Map | Next: A1E6 |