Skip to navigation

Cracker protection: CheckCrackerSeed

Name: CheckCrackerSeed [Show more] Type: Subroutine Category: Cracker protection Summary: Check whether the anti-cracker seed-related data is correctly set up, as part of the anti-cracker code
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
.CheckCrackerSeed LDA alteredSeed-7,X \ Set A to the value of alteredSeed, which we set in \ the AlterCrackerSeed routine CMP CrackerSeed+1-7,X \ If A >= the contents of CrackerSeed+1 then the code BCS csee1 \ in AlterCrackerSeed was correctly run (which only \ happens if the gameplay routines are run, i.e. when \ the landscape has been played), so jump to csee1 to \ skip the following \ If we get here then the AlterCrackerSeed routine has \ not been correctly run, which means the landscape was \ not played properly, so we now corrupt the secret code \ that's being drawn on-screen (if that's why we are \ here) JSR CorruptSecretCode \ At this point A < the contents of CrackerSeed+1 and \ the C flag is clear, so CorruptSecretCode will call \ the GetNextSeedNumber routine, which will in turn \ corrupt the generation of the landscape's secret code \ by moving one step too far in the landscape's sequence \ of seed numbers .csee1 \ Fall through into part 2 of SpawnCharacter3D to \ continue with the character-spawning process