Routines |
Prev: C0D8 | Up: Map | Next: C123 |
Used by the routines at magic_armour_spell, magic_sword_spell, magic_knife_spell, magic_shield_spell, magic_wings_spell, magic_bow_spell, RAISDO, TUR_DO, TREPUT, examine_board, routine06, routine13, routine14, disbelieve_spell, trees_castles_spell, lightning_spell, dark_power_spell, INTERO, routine20, routine21, routine22, WIZKIL, routine35, routine41, display_object_info, routine54, routine72, routine74, routine80 and routine83.
|
||||
routine50 | C0DD | DI | Disable interrupts. | |
C0DE | LD B,$A0 | Set B to 160 as loop counter. | ||
C0E0 | LD HL,map_object_table | Set HL to address of map_object_table. | ||
routine50_0 | C0E3 | LD A,(HL) | If object is not zero jump to routine50_1. | |
C0E4 | OR A | |||
C0E5 | JR NZ,routine50_1 | |||
C0E7 | PUSH HL | Preserve address. | ||
C0E8 | LD DE,map_object_table | Get offset within map_object_table. | ||
C0EB | SBC HL,DE | |||
C0ED | LD A,L | |||
C0EE | INC A | Increment and select low nibble to get next column number. | ||
C0EF | AND $0F | |||
C0F1 | POP HL | Restore address. | ||
C0F2 | JR Z,routine50_1 | If next column is zero jump to routine50_1. | ||
C0F4 | LD A,$01 | Else set entry in map_object_table to $01. | ||
C0F6 | LD (HL),A | |||
C0F7 | LD DE,$0141 | Set corresponding entry in map_animation_frame_table to zero. | ||
C0FA | ADD HL,DE | |||
C0FB | XOR A | |||
C0FC | LD (HL),A | |||
C0FD | SBC HL,DE | |||
routine50_1 | C0FF | INC HL | Increment address to next entry in map_object_table. | |
C100 | DJNZ routine50_0 | Loop for 160 iterations. | ||
C102 | LD HL,map_animation_timeout_table | Fill map_animation_timeout_table with $01 ??? | ||
C105 | LD DE,$E0C1 | |||
C108 | LD BC,$009F | |||
C10B | LD (HL),$01 | |||
C10D | LDIR | |||
C10F | LD A,(unknown06) | If unknown06 is clear jump to routine50_2 | ||
C112 | OR A | |||
C113 | JR NZ,routine50_2 | |||
C115 | LD A,$41 | Else set ATTR-T to bright blue on black and draw border. | ||
C117 | LD ($5C8F),A | |||
C11A | CALL ZRDR_P | |||
routine50_2 | C11D | XOR A | Clear unknown06 ??? | |
C11E | LD (unknown06),A | |||
C121 | EI | Enable interrupts and return. | ||
C122 | RET |
Prev: C0D8 | Up: Map | Next: C123 |