![]() |
Routines |
| Prev: D8E4 | Up: Map | Next: DC6A |
|
Used by the routine at TestGroupObjects.
Tests whether an object is at the position that is stored at RestartCandidate and E4C8, and if it is then clears the flag at E4C7.
|
||||||||
| TestObjectMatch | DC3F | LD HL,($5CB8) | The high nibble of the object's first byte, beside the word at TitleAnimationFrame. | |||||
| DC42 | LD A,(IY+$00) | |||||||
| DC45 | AND $F0 | |||||||
| DC47 | LD L,A | |||||||
| DC48 | LD DE,($E4C6) | It matches the stored position at RestartCandidate. | ||||||
| DC4C | AND A | |||||||
| DC4D | SBC HL,DE | |||||||
| DC4F | JR NZ,TestObjectMatch_Skip | |||||||
| DC51 | LD HL,($5CB9) | The same byte shifted up by four, beside the cell position. | ||||||
| DC54 | LD A,(IY+$00) | |||||||
| DC57 | ADD A,A | |||||||
| DC58 | ADD A,A | |||||||
| DC59 | ADD A,A | |||||||
| DC5A | ADD A,A | |||||||
| DC5B | LD L,A | |||||||
| DC5C | LD DE,($E4C8) | It matches the stored position at E4C8. | ||||||
| DC60 | AND A | |||||||
| DC61 | SBC HL,DE | |||||||
| DC63 | JR NZ,TestObjectMatch_Skip | |||||||
| DC65 | XOR A | Clear the flag at E4C7. | ||||||
| DC66 | LD ($E4C7),A | |||||||
| TestObjectMatch_Skip | DC69 | RET | Return. | |||||
| Prev: D8E4 | Up: Map | Next: DC6A |