Routines
| Prev: 9C07 | Up: Map | Next: 9C56 |
9C41: Action record: move the vehicle the actor is in to the direct object's room
|
Header $04 $00, then: takes the actor's container (+1 of $A017 - the cab or train it is riding in), sets that thing's bit 7 of +5 (9C56), and moves it to the room in $A034, with everything in it, by jumping into the move code of the direction action at DD0E (which also updates A00A, DD01 and DCFF when the mover is the actor). Run by the vehicle sub-script at F3AD (F3AD+4: RUN 9C41 with the plan's direct object), which 9B20 returns.
|
||||||||||||||
| 9C41 | INC B | Add one to B - Header $04 $00 | ||||||||||||
| 9C42 | NOP | Do nothing (padding) | ||||||||||||
| 9C43 | LD IX,($A017) | Read $A017 in "Game variables" into IX - A = the actor's container: the vehicle it is in | ||||||||||||
| 9C47 | LD A,(IX+$01) | Read byte +1 of the record at IX into A | ||||||||||||
| 9C4A | PUSH AF | Save AF on the stack | ||||||||||||
| 9C4B | CALL $9C56 | Set the vehicle's +5 bit 7 | ||||||||||||
| 9C4E | LD A,($A034) | Read $A034 in "Game variables" into A - B = the destination | ||||||||||||
| 9C51 | LD B,A | Copy A into B | ||||||||||||
| 9C52 | POP AF | Restore AF from the stack | ||||||||||||
| 9C53 | JP $DD0E | Move the vehicle and all in it to room B | ||||||||||||
| Prev: 9C07 | Up: Map | Next: 9C56 |