![]() |
Routines |
| Prev: 45708 | Up: Map | Next: 45848 |
|
Used by the routine at InitialiseGame.
Called every frame in the town. When the outlaw has been shot (OutlawShotFlag is one) it plays a tune, clears all the objects and goes on to the duel with the outlaw. The player is given a life to make up for the one which is taken when the next stage starts.
|
||||
| FinishTownStage | 45801 | LD HL,41482 | Point HL at the outlaw shot flag. | |
| 45804 | LD A,(HL) | Fetch the flag. | ||
| 45805 | CP 1 | Return if the outlaw has not just been shot. | ||
| 45807 | RET NZ | |||
| 45808 | INC (HL) | Set the flag to two so that this does not happen again. | ||
|
Play the tune for shooting the outlaw.
|
||||
| 45809 | LD DE,45493 | Call PlayMusic to play OutlawShotTune. | ||
| 45812 | CALL PlayMusic | |||
| 45815 | CALL RemoveAllObjects | Remove all of the objects. | ||
| 45818 | XOR A | Write 0 to TownOffset so the next stage is outside the town. | ||
| 45819 | LD (41575),A | |||
| 45822 | LD (41490),A | Clear the flag at ShotsFiredCount. | ||
| 45825 | LD HL,513 | Set one stage to play, of the kind which is the duel. | ||
| 45828 | LD (41572),HL | |||
| 45831 | LD HL,41571 | Point HL at Lives. | ||
| 45834 | INC (HL) | Add one to the number of lives, to make up for the one which the next stage takes. | ||
| 45835 | LD A,1 | Write 1 to StageRunningFlag to show that a new stage is starting. | ||
| 45837 | LD (41536),A | |||
| 45840 | LD A,69 | Write INK:CYAN, PAPER:BLACK (BRIGHT) to ScreenAttribute. | ||
| 45842 | LD (41574),A | |||
| 45845 | JP StartStage | Start the next stage. | ||
| Prev: 45708 | Up: Map | Next: 45848 |