← A777 Resolve a ball bounce Map A898 → Bat-bounce angles (normal bat)
A889: Point IX at an object-pool slot by index
Points IX at one pool slot's sprite record. The index is not bounds-checked against the live slot count.
Input
A slot index (0-based) into the object pool
Output
IX address of that slot's 9-byte record
object_slot_ptr A889 LD IX,object_table Start at the pool's first slot; a zero index returns it unchanged.
A88D OR A
A88E RET Z
A88F LD B,A Set up the walk: the slot index in B, the record size in DE.
A890 LD DE,$0009
object_slot_ptr_step A893 ADD IX,DE Step IX one record per slot, which leaves it on the object's record.
A895 DJNZ object_slot_ptr_step
A897 RET
← A777 Resolve a ball bounce Map A898 → Bat-bounce angles (normal bat)
Fork me on GitHub