.tact6 STX viewingObject \ Set the viewing object to the enemy we are processing, \ so everything is done from their viewpoint from now on JSR ExpendEnemyEnergy \ Drain one unit of energy from the enemy and expend it \ onto the landscape by spawning a tree, if possible \ \ This ensures that if an enemy has absorbed energy from \ somewhere, it always dissipates back into the \ landscape it when it gets the chance \ \ If we can't spawn a tree because we are about to pan \ the screen and the tree would spawn in a position that \ would be visible on-screen, then the routine does not \ expend energy or spawn a tree, and instead it gives up \ and aborts applying tactics for this gameplay loop \ \ If we successfully spawned a tree then the object \ number of the tree is in X BCS tact7 \ If the call to ExpendEnemyEnergy returned with the C \ flag set, then either the enemy didn't have any energy \ to expend or we couldn't spawn a tree, so jump to part \ 4 to keep applying tactics JMP tact25 \ Otherwise that's enough tactics for this iteration, so \ jump to tact25 with X set to the object number of \ the tree to update it on-screen with a dithered effect \ and return from the subroutine using a tail callName: ApplyTactics (Part 3 of 8) [Show more] Type: Subroutine Category: Gameplay Summary: If the enemy has any residual energy, try expending it onto the landscape in the form of a tree (and end tactics if successful)Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
[X]
Subroutine ExpendEnemyEnergy (category: Gameplay)
Drain one unit of energy from an enemy and expend it onto the landscape by spawning a tree, if possible
[X]
Entry point tact25 in subroutine ApplyTactics (Part 8 of 8) (category: Gameplay)
Dither the updated object #X onto the screen, with bit 7 of drawLandscape determining whether the object is drawn on its own (bit 7 set) or with the surrounding landscape (bit 7 clear)
[X]
Label tact7 in subroutine ApplyTactics (Part 4 of 8)
[X]
Variable viewingObject in workspace Zero page
The number of the viewing object