| The Hobbit (v1.0) | Routines |
| Prev: 9B96 | Up: Map | Next: 9BDF |
|
Returns with carry set if the target ($B5D9) is held by the actor, directly or inside something the actor holds. The entry at 9BD0 does the same for object A. An object of $FF counts as held.
|
||||||||
| 9BCD | LD A,($B5D9) | A = the target of the current command | ||||||
|
This entry point is used by the routines at 8FE0, 946F and 9686.
|
||||||||
| 9BD0 | LD HL,$B5DB | HL = the address holding the current actor's number | ||||||
|
This entry point is used by the routine at 8C75.
|
||||||||
| 9BD3 | CP $FF | Is there no target at all ($FF)? | ||||||
| 9BD5 | SCF | If so, treat that as "yes, held" (set the carry flag), since there is nothing to fail the test | ||||||
| 9BD6 | RET Z | |||||||
| 9BD7 | PUSH IX | Save the caller's IX | ||||||
| 9BD9 | CALL $9BDF | Is the target held, directly or indirectly, by whichever object's number is stored at HL? | ||||||
| 9BDC | POP IX | Restore the caller's IX | ||||||
| 9BDE | RET | |||||||
| Prev: 9B96 | Up: Map | Next: 9BDF |