Routines
| Prev: B90E | Up: Map | Next: B934 |
B91F: Is an order or a remark waiting for the current actor?
|
Walks the list headed at 9FEE (the pseudo-node at 9FF0 holds the head) for an 8-byte node whose +0 is the current actor ($A036). Z if one is found (IX = the node), NZ if not. Nodes are made by a plan script's ASK (CDBF: +1 = $FF, +2/+3/+4 = verb and objects) and by B8D1 when the player speaks to someone (+1 = 0, +5/+6 = the words, +7 from $A024). CC37 calls this for every actor at the start of its turn and sets $CC0D for CC78.
N ('YOU CANNOT GO NORTH.', which takes no time) 0. The id sequence the old test saw (0, 2-6, 104, 7-13, 31, 34, 36-43) is simply the actor table's order.
|
||||||||||||||
| B91F | LD IX,$9FF0 | Start of the order/remark list | ||||||||||||
| B923 | CALL $A0F7 | Next node: Z at the end | ||||||||||||
| B926 | JR Z,$B931 | None left | ||||||||||||
| B928 | LD A,($A036) | Read $A036 in "Game variables" into A - Is it for the current actor? | ||||||||||||
| B92B | CP (IX+$00) | Compare A with the first byte of the record at IX | ||||||||||||
| B92E | RET Z | Yes: Z, IX = the node | ||||||||||||
| B92F | JR $B923 | No: keep looking | ||||||||||||
| B931 | OR $01 | Not found: NZ | ||||||||||||
| B933 | RET | Return to the caller | ||||||||||||
| Prev: B90E | Up: Map | Next: B934 |