![]() |
Routines |
| Prev: CF15 | Up: Map | Next: CF39 |
|
Used by the routine at compare_next_obj.
Part of compare_next_obj. Along Y (centre +$02, half-size +$05) the code adds 0 if the candidate's low-Y edge is at or beyond IY's high-Y edge -- the candidate lies wholly further back -- 6 if IY lies wholly further back, and 3 if they overlap.
|
||||
| compare_along_y | CF16 | LD A,(IY+$02) | L = IY's high-Y edge | |
| CF19 | ADD A,(IY+$05) | |||
| CF1C | LD L,A | candidate's low-Y edge at or beyond it: add 0 | ||
| CF1D | LD A,(IX+$02) | |||
| CF20 | SUB (IX+$05) | |||
| CF23 | SUB L | |||
| CF24 | JR NC,compare_along_x | |||
| CF26 | LD A,(IX+$02) | L = the candidate's high-Y edge | ||
| CF29 | ADD A,(IX+$05) | |||
| CF2C | LD L,A | IY's low-Y edge at or beyond it: add 6, otherwise 3 | ||
| CF2D | LD A,(IY+$02) | |||
| CF30 | SUB (IY+$05) | |||
| CF33 | SUB L | |||
| CF34 | LD A,C | |||
| CF35 | JR C,add_y_code | |||
| CF37 | ADD A,$03 | |||
| Prev: CF15 | Up: Map | Next: CF39 |