Prev: E005 Up: Map Next: E01F
E007: Calculate Spectrum screen coordinates for an entry in map_object_table.
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