fork/training-mode-ce
git clone https://git.julia.blue/fork/training-mode-ce
9280fdf
nix
1# To be inserted at 80266ce0 2.include "../Globals.s" 3 4####################################### 5## Runs During CSS -> SSS Transition ## 6####################################### 7 8.set REG_RandomStageField , 5 9.set REG_RulesPointer , 6 10 11# Ensure only all other legal stages are enabled 12# Get Random Stage Select Bitflags 13lwz REG_RulesPointer , MemcardData ( r13 ) 14addi REG_RulesPointer , REG_RulesPointer , 7344 15lwz REG_RandomStageField , 0x18 ( REG_RulesPointer ) 16# Check if only all legal stages are on 17load r3 , 0xE70000B0 18xor. r3 , r3 , REG_RandomStageField 19beq CheckForTeams 20# Check if the only other stage off is FoD 21cmpwi r3 , 0x20 22beq CheckForTeams 23b Exit 24 25CheckForTeams : 26# Get Teams On/Off Bool 27lwz r3 , -0x49F0 ( r13 ) 28lbz r3 , 0x18 ( r3 ) 29# Check If Teams is On or Off 30cmpwi r3 , 0x1 31beq Doubles 32 33Singles : 34# Flip FoD Bit On in Random Stage Bitflag (FoD is bit #26) 35li r3 , 0x1 36rlwimi REG_RandomStageField , r3 , 5 , 26 , 26 37stw REG_RandomStageField , 0x18 ( REG_RulesPointer ) 38b Exit 39 40Doubles : 41# Flip FoD Bit Off in Random Stage Bitflag (FoD is bit #26) 42li r3 , 0x0 43rlwimi REG_RandomStageField , r3 , 5 , 26 , 26 44stw REG_RandomStageField , 0x18 ( REG_RulesPointer ) 45b Exit 46 47Exit : 48li r3 , 1