![]() |
Routines |
| Prev: 40056 | Up: Map | Next: 40095 |
|
Used by the routine at ConditionIsTheObjectCarried.
Returns with carry set when the character whose turn it is holds the object, either directly or inside something the character holds. Otherwise returns with carry clear.
|
||||
|
Find the object's record.
|
||||
| Condition_TestTheObjectIsHeld | 40074 | CALL LocateObject | Call LocateObject to locate object. | |
| 40077 | PUSH AF | Read where this object is from the object record. | ||
| 40078 | LD A,(IX+1) | |||
| 40081 | CP 255 | Jump to Condition_TestTheObjectIsHeld_NotInside if this object is not inside another object. | ||
| 40083 | JR Z,Condition_TestTheObjectIsHeld_NotInside | |||
| 40085 | POP IX | Jump back to Condition_TestTheObjectIsHeld if where this object is is not the character whose turn it is. | ||
| 40087 | CP (HL) | |||
| 40088 | JR NZ,Condition_TestTheObjectIsHeld | |||
| 40090 | SCF | Return with carry set: this character is carrying it. | ||
| 40091 | RET | Return. | ||
| Condition_TestTheObjectIsHeld_NotInside | 40092 | POP AF | See whether where this object is is zero. | |
| 40093 | AND A | |||
| 40094 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 40056 | Up: Map | Next: 40095 |