.MoveOnToNextEnemy JSR GetNextSeedNumber \ Set A to the next number from the landscape's sequence \ of seed numbers DEC enemyObject \ Decrement the number of the enemy object that we are \ considering for tactics, so the next iteration of the \ gameplay loop will apply tactics to the next enemy BPL next1 \ If enemyObject is positive then it is still in the \ range 0 to 7, so jump to next1 to skip the following LDA #7 \ Set enemyObject = 7 to wrap the enemy number back up STA enemyObject \ to 7, so it iterates from 7 down to 0 and then back \ to 7 again .next1 LDA playerObject \ Set viewingObject to the object number of the player, STA viewingObject \ so any future view calculations are done from the \ aspect of the player rather than the enemy object \ (until we return to apply tactics to the next enemy) RTS \ Return from the subroutineName: MoveOnToNextEnemy [Show more] Type: Subroutine Category: Gameplay Summary: Update enemyObject so the next time we consider applying enemy tactics, we apply them to the next enemy, looping from 7 to 0Context: See this subroutine in context in the source code References: This subroutine is called as follows: * ApplyEnemyTactics calls MoveOnToNextEnemy * ApplyTactics (Part 1 of 8) calls MoveOnToNextEnemy * ApplyTactics (Part 2 of 8) calls MoveOnToNextEnemy * ApplyTactics (Part 5 of 8) calls MoveOnToNextEnemy * ApplyTactics (Part 7 of 8) calls MoveOnToNextEnemy * ApplyTactics (Part 8 of 8) calls MoveOnToNextEnemy * FinishEnemyTactics calls MoveOnToNextEnemy
[X]
Subroutine GetNextSeedNumber (category: Maths (Arithmetic))
Set A to a seed number
[X]
Variable enemyObject in workspace Zero page
The object number of the enemy to which we are applying tactics in this iteration around the main loop (0-7)
[X]
Label next1 is local to this routine
[X]
Variable playerObject in workspace Zero page
The number of the player object
[X]
Variable viewingObject in workspace Zero page
The number of the viewing object