.ResetMeanieScan LDA #%10000000 \ Set bit 7 of enemyMeanieTree for object #X to indicate STA enemyMeanieTree,X \ that the enemy has not turned a tree into a meanie STA enemyFailTarget,X \ Set bit 7 of enemyFailTarget for object #X to remove \ the details of any failed meanie scans for this enemy LDA #0 \ Zero enemyFailCounter for object #X to reset the STA enemyFailCounter,X \ recorded number of failed meanie scans for this enemy LDA #64 \ Set enemyMeanieCheck = 64 for the enemy so if we start STA enemyMeanieScan,X \ scanning objects for trees to potentially turn into a \ meanie, we start from the last object and work down RTS \ Return from the subroutineName: ResetMeanieScan [Show more] Type: Subroutine Category: Gameplay Summary: Reset the data stored for any meanie scans that the enemy has tried in the past, so we can start looking with a clean slateContext: See this subroutine in context in the source code References: This subroutine is called as follows: * AddEnemiesToTiles calls ResetMeanieScan * ApplyTactics (Part 5 of 8) calls ResetMeanieScan * ApplyTactics (Part 6 of 8) calls ResetMeanieScan
Arguments: X The object number of the enemy being added
[X]
Variable enemyFailCounter in workspace Main variable workspace
Enemy failed to find meanie: counter (one byte per
[X]
Variable enemyFailTarget in workspace Main variable workspace
Enemy failed to find meanie: target object (one byte
[X]
Variable enemyMeanieScan in workspace Main variable workspace
Enemy meanie scan object counter (one byte per enemy)
[X]
Variable enemyMeanieTree in workspace Main variable workspace
Enemy has turned a tree into a meanie (one byte per