Routines |
Prev: E005 | Up: Map | Next: E01F |
Used by the routines at disbelieve_spell, lightning_spell, routine20, routine26, WIZKIL, routine35, routine36, routine53, highlight_objects, routine80 and update_animation.
|
||||
address_to_coordinate | E007 | LD HL,(temp_entry_pointer) | Load temp_entry_pointer into HL. | |
E00A | XOR A | Clear carry flag. | ||
E00B | LD DE,map_object_table | Subtract address of map_object_table to get position in table. | ||
E00E | SBC HL,DE | |||
E010 | LD A,L | Multiply offset by 2 and mask bits to get column and store in L. | ||
E011 | AND $F0 | |||
E013 | RRCA | Divide by 8 to get row and store in H. | ||
E014 | RRCA | |||
E015 | RRCA | |||
E016 | LD H,A | |||
E017 | LD A,L | |||
E018 | RLA | |||
E019 | AND $1E | |||
E01B | LD L,A | |||
E01C | INC H | Increment both coordinates to account for border and return. | ||
E01D | INC L | |||
E01E | RET |
Prev: E005 | Up: Map | Next: E01F |