![]() |
Routines |
| Prev: CFAD | Up: Map | Next: CFCE |
|
Used by the routine at search_chain.
Part of iy_goes_first: adds IY to the chain, makes it the candidate, and compares it with the whole list from the top, since it may not be the first undrawn entry.
Nothing checks the chain's length. candidate_chain has room for seven indices and the terminator; an eighth link would put its $FF terminator over the first byte of check_user_input. How long a chain real rooms can produce has not been measured.
|
||||
| iy_becomes_candidate | CFB8 | LD A,C | append IY's index and a new terminator | |
| CFB9 | LD (DE),A | |||
| CFBA | INC DE | |||
| CFBB | LD A,$FF | |||
| CFBD | LD (DE),A | |||
| CFBE | PUSH IY | IX = IY; $5BCD = $5BCF | ||
| CFC0 | POP IX | |||
| CFC2 | LD HL,($5BCF) | |||
| CFC5 | LD ($5BCD),HL | |||
| CFC8 | LD DE,objects_to_draw | compare from the top of the list | ||
| CFCB | JP compare_next_obj | |||
| Prev: CFAD | Up: Map | Next: CFCE |