.FinishEnemyTactics LDX gameplayStack \ Restore the stack pointer to the position it was in TXS \ when we called ApplyEnemyTactics from ProcessGameplay, \ so that executing an RTS instruction will now take us \ back to the ProcessGameplay routine, just after the \ JSR ApplyEnemyTactics instruction at play2 JMP MoveOnToNextEnemy \ Jump to MoveOnToNextEnemy to stop applying tactics to \ this enemy and set things up so we move on to the next \ enemy in the next iteration of the gameplay loopName: FinishEnemyTactics [Show more] Type: Subroutine Category: Gameplay Summary: Stop applying tactics to the current enemy and return to the ProcessGameplay routine to continue with the gameplay loopContext: See this subroutine in context in the source code References: This subroutine is called as follows: * DrainObjectEnergy calls FinishEnemyTactics * ExpendEnemyEnergy calls FinishEnemyTactics * ScanForMeanieTree calls FinishEnemyTactics
[X]
Subroutine MoveOnToNextEnemy (category: Gameplay)
Update enemyObject so the next time we consider applying enemy tactics, we apply them to the next enemy, looping from 7 to 0
[X]
Variable gameplayStack in workspace Main variable workspace
The value of the stack pointer at the start of the ApplyEnemyTactics routine, so we can return back to the ProcessGameplay routine from deep within the tactics routines if required