![]() |
Routines |
| Prev: 59309 | Up: Map | Next: 59344 |
|
Used by the routine at Handle_Guardian.
Sets the collected flag of the entry of a table that an object came from. The entries are three bytes long, and byte 6 of the object is the number of the entry counted from the end of the table, so the entry is the length of the table less that number.
The routine has two entry points: Set_Collected_Flag for a table of 8 entries, and Set_Collected_Flag_Entry with the length in A.
|
||||||||||
| Set_Collected_Flag | 59330 | LD A,8 | A=8. | |||||||
|
This entry point is used by the routine at Collect_Extra_Life.
|
||||||||||
| Set_Collected_Flag_Entry | 59332 | SUB (IX+6) | Subtract byte 6 of the object, to get the number of the entry. | |||||||
| 59335 | LD E,A | Store it in E. | ||||||||
| 59336 | LD D,0 | Clear the high byte of the number of the entry. | ||||||||
| 59338 | ADD HL,DE | Add the number of the entry three times, to point at the collected flag. | ||||||||
| 59339 | ADD HL,DE | |||||||||
| 59340 | ADD HL,DE | |||||||||
| 59341 | LD (HL),1 | Set the collected flag. | ||||||||
| 59343 | RET | Return. | ||||||||
| Prev: 59309 | Up: Map | Next: 59344 |