![]() |
Routines |
| Prev: D4CC | Up: Map | Next: D51A |
|
Used by the routines at CountObjectsInLocation and FindMatchingObject.
Sets the carry when the object matches the id, the location and the remaining checks. Returns with the carry clear when any check fails.
|
||||||||||||||
| CheckObjectMatchCriteria | D4EF | CP (IY+$01) | Go to CheckObjectMatchCriteria_NoMatch if the object id does not match. | |||||||||||
| D4F2 | JR NZ,CheckObjectMatchCriteria_NoMatch | |||||||||||||
| D4F4 | LD A,($A036) | Go to CheckObjectMatchCriteria_NoMatch if the object is the character being processed. | ||||||||||||
| D4F7 | CP (IX+$00) | |||||||||||||
| D4FA | JR Z,CheckObjectMatchCriteria_NoMatch | |||||||||||||
| D4FC | LD A,(IX+$00) | Go to CheckObjectMatchCriteria_NoMatch if the object is not in this location. | ||||||||||||
| D4FF | CALL CheckObjectLocationMatch | |||||||||||||
| D502 | JR Z,CheckObjectMatchCriteria_NoMatch | |||||||||||||
| D504 | LD A,(IY+$00) | Jump to CheckObjectMatchCriteria_NoMatch if the character id is at least 02. | ||||||||||||
| D507 | CP $02 | |||||||||||||
| D509 | JR NC,CheckObjectMatchCriteria_NoMatch | |||||||||||||
|
Perform final validation check.
|
||||||||||||||
| D50B | LD A,($A036) | Read the current character. | ||||||||||||
| D50E | PUSH IX | |||||||||||||
| D510 | POP HL | |||||||||||||
| D511 | CALL $D278 | Call D278 to perform an additional validation check. | ||||||||||||
| D514 | JR C,CheckObjectMatchCriteria_NoMatch | Go to CheckObjectMatchCriteria_NoMatch if D278 sets the carry. | ||||||||||||
|
All checks passed - object matches the criteria.
|
||||||||||||||
| D516 | SCF | Mark the condition as met. | ||||||||||||
| D517 | RET | Return. | ||||||||||||
|
Clear the carry so an object that failed the checks returns as no match.
Object doesn't match any criteria.
|
||||||||||||||
| CheckObjectMatchCriteria_NoMatch | D518 | AND A | Clear the carry before returning the failed object match. | |||||||||||
| D519 | RET | Return. | ||||||||||||
| Prev: D4CC | Up: Map | Next: D51A |