![]() |
Routines |
| Prev: 9928 | Up: Map | Next: 99C6 |
|
Used by the routine at CHARACTERS_ACT.
Two bytes, then a 2-byte fallback if bit 4 is set. Byte 1 is an action code, tried with neither object -- RUN, say, which carries the character off in some direction. An action code of $FF does nothing and ends the character's turn: a pause, with the script going on at the next step next turn -- or, with a fallback, at the fallback, which makes it a jump. The warg's one script ends that way, a pause before going round again.
A refused step, of either kind, comes here at STEP_REFUSED: count it, and go on at the fallback if there is one, or the next step if not.
|
||||
| SCRIPT_BARE | 9974 | LD DE,$0002 | Step past it | |
| 9977 | CALL STEP_PAST | |||
| 997A | LD A,(IX+$01) | $FF: a pause or a jump | ||
| 997D | CP $FF | |||
| 997F | JR Z,SCRIPT_BARE_0 | |||
| 9981 | LD (ACTION),A | The action alone: done, or refused | ||
| 9984 | LD A,$FF | |||
| 9986 | LD (TARGET),A | |||
| 9989 | LD (INSTRUMENT),A | |||
| 998C | CALL ACTOR_TRIES | |||
| 998F | JR Z,STEP_REFUSED | |||
| 9991 | JP NEXT_CHARACTER | |||
| SCRIPT_BARE_0 | 9994 | BIT 4,(IX+$00) | Jump to the fallback, if there is one; either way that is the turn | |
| 9998 | JP Z,NEXT_CHARACTER | |||
| 999B | LD L,(IX+$02) | |||
| 999E | LD H,(IX+$03) | |||
| 99A1 | LD (IY+$02),L | |||
| 99A4 | LD (IY+$03),H | |||
| 99A7 | JP NEXT_CHARACTER | |||
|
This entry point is used by the routine at SCRIPT_DO.
|
||||
| STEP_REFUSED | 99AA | LD HL,STEPS_REFUSED | Refused: count it | |
| 99AD | INC (HL) | |||
| 99AE | BIT 4,(IX+$00) | No fallback? On to the next step | ||
| 99B2 | JP Z,RUN_SCRIPT | |||
| 99B5 | ADD IX,DE | Otherwise on at the fallback | ||
| 99B7 | LD H,(IX+$01) | |||
| 99BA | LD L,(IX+$00) | |||
| 99BD | LD (IY+$02),L | |||
| 99C0 | LD (IY+$03),H | |||
| 99C3 | JP SCRIPT_STEP | |||
| Prev: 9928 | Up: Map | Next: 99C6 |