Prev: ED47 Up: Map Next: EDC1
EDB8: Point IX at an object record by its number
Used by the routine at SORT_AND_DRAW_BEHIND.
Records are numbered from 1, the first of the six fixed ones (FIXED_RECORDS); the knight's is 7 (KNIGHT). Twenty bytes each. Used by the sorting in SORT_AND_DRAW_BEHIND (Krumlinde's RTN_ObjectPtr_From_Index).
Input
B The record's number
Output
IX The record
RECORD_FROM_NUMBER EDB8 LD DE,$0014 From the first record, twenty bytes a step; the jump into the loop makes one step fewer than B
EDBB LD IX,FIXED_RECORDS
EDBF JR RECORD_FROM_NUMBER_STEP_0
Prev: ED47 Up: Map Next: EDC1