Skip to navigation

Gameplay: ResetMeanieScan

Name: 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 slate
Context: 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
.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 subroutine