.tact25 \ We jump here to update object #X on-screen by drawing \ the object (or the landscape without the object) onto \ the screen with a dithered effect \ \ This is used to show objects being absorbed, for \ example LDA #%01000000 \ Clear bit 7 and set bit 6 of ditherObjectSights so the STA ditherObjectSights \ updated object is dithered onto the screen in the call \ to DrawUpdatedObject below .tact26 \ If we jump here instead of tact25, then we update \ object #X on-screen, but instantly rather than with a \ dithered effect \ \ This is used to show objects rotating, for example STX currentObject \ Set the current object to X so the call LDA playerObject \ Set viewingObject to the object number of the player STA viewingObject JSR DrawUpdatedObject \ Draw the updated object (or the landscape where the \ object used to be) into the screen buffer and dither \ it onto the screen, pixel by pixel and randomly .tact27 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: ApplyTactics (Part 8 of 8) [Show more] Type: Subroutine Category: Gameplay Summary: Redraw the object on the screen, optionally with a dithered effectContext: See this subroutine in context in the source code References: This subroutine is called as follows: * ApplyEnemyTactics calls via tact25 * ApplyTactics (Part 2 of 8) calls via tact25 * ApplyTactics (Part 3 of 8) calls via tact25 * ApplyTactics (Part 5 of 8) calls via tact25 * ApplyTactics (Part 7 of 8) calls via tact25
Other entry points: tact25 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]
Subroutine DrawUpdatedObject (category: Drawing objects)
Draw an updated object on-screen, optionally with a dithered effect, and with or without the surrounding landscape
[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 currentObject in workspace Zero page
The number of the object we are currently processing
[X]
Variable ditherObjectSights in workspace Main variable workspace
Configures how an updated object is drawn onto the screen in the DrawUpdatedObject 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