Prev: 47146 Up: Map Next: 47219
47195: Run Stage Script
Used by the routine at InitialiseGame.
Called every frame. In the duel and the bonus stage, which both have TownOffset set to zero, it runs the routine for the kind of stage which is in StageKind, as long as there are still stages to play (TargetsLeft is not zero). In kind 0 nothing happens, in kind 1 money bags are made, and in kind 2 the duel is set up.
This routine is only for the duel and the bonus stage.
RunStageScript 47195 LD A,(41575) Return if TownOffset is not zero, so this is the town.
47198 AND A
47199 RET NZ
The stage continues only while there is something left to play.
47200 LD A,(41572) Return if TargetsLeft is zero.
47203 AND A
47204 RET Z
47205 LD A,1 Set StageRunningFlag, so that the objects can go without a life being lost.
47207 LD (41536),A
47210 LD A,(41573) Fetch the kind of stage.
47213 LD BC,47219 Point BC at StageRoutines.
Run the routine for the kind of stage.
47216 JP RunTableRoutine Jump to RunTableRoutine.
Prev: 47146 Up: Map Next: 47219