Routines
| Prev: E6BC | Up: Map | Next: E70E |
E6E6: Action record: take the passenger in my cab as the one to deal with (RUN at $F2F7, $F35F, $F371)
|
The pre-check refuses unless the actor is not the direct object and the direct object's holder is one less than the actor's number - that is, the passenger is inside the cab that the cabbie (thing 31) drives (thing 30). The body then stores the direct object in +3 of the actor's table record (CFB6) - the saved direct-object register of its plan - so the cabbie takes that person as the one he is dealing with.
|
||||||||||||||
| E6E6 | DEFB $4D,$00,$F6,$E6 | Action record header: flags $4D; bit 6: pre-check at E6F6; byte 1 $00 | ||||||||||||
| E6EA | CALL $CFB6 | IX = the record CFB6 yields... | ||||||||||||
| E6ED | LD A,($A034) | Read $A034 in "Game variables" into A - ...its +3 becomes the direct object ($A034) | ||||||||||||
| E6F0 | LD (IX+$03),A | Store A in byte +3 of the record at IX | ||||||||||||
| E6F3 | OR $01 | Make A non-zero, which clears the zero flag, and hand that back to the caller - Succeed | ||||||||||||
| E6F5 | RET | Return to the caller | ||||||||||||
| E6F6 | LD A,($A036) | Read $A036 in "Game variables" into A - Pre-check: the actor must not be the direct object itself | ||||||||||||
| E6F9 | LD HL,$A034 | Point HL at $A034 in "Game variables" | ||||||||||||
| E6FC | CP (HL) | Compare A with the byte at $A034 in "Game variables" | ||||||||||||
| E6FD | JP Z,$DC15 | If A equals the byte at $A034 in "Game variables", go back to the routine "Fail: A = 0, HL = 0, Z set" (DC15) | ||||||||||||
| E700 | DEC A | Subtract one from A - And the direct object's holder (+1) must be the actor's number less 1; else refuse | ||||||||||||
| E701 | LD IX,($A013) | Read $A013 in "Game variables" into IX | ||||||||||||
| E705 | CP (IX+$01) | Compare A with byte +1 of the record at IX | ||||||||||||
| E708 | JP NZ,$DC15 | If A differs from byte +1 of the record at IX, go back to the routine "Fail: A = 0, HL = 0, Z set" (DC15) | ||||||||||||
| E70B | OR $01 | Make A non-zero, which clears the zero flag, and hand that back to the caller | ||||||||||||
| E70D | RET | Return to the caller | ||||||||||||
| Prev: E6BC | Up: Map | Next: E70E |