Moved ganon/agah rng rigging from contrib.asm to rngfixes.asm

GanonAgahRNG switch is only 0 or 1 now, static rng or no blue balls/warps
Filled in some static rng in LTTP_RND_GeneralBugfixes.asm
This commit is contained in:
Myramong
2017-06-14 18:13:23 -03:00
parent cbdae959a4
commit 97c262eaaa
5 changed files with 49 additions and 78 deletions

View File

@@ -135,65 +135,4 @@ Sprite_ShowSolicitedMessageIfPlayerFacing_Alt:
RTL
}
;================================================================
RandomAgah:
{
LDA.l GanonAgahRNG : BNE +
JSL GetRandomInt
RTL
+
CMP #$01 : BEQ .noBlueBalls
CMP #$02 : BEQ .rigRng
.noBlueBalls
JSL GetRandomInt
ORA #$01 ;guarantee no blue ball
RTL
.rigRng
PHX
LDA $A0 : CMP #$20 : BEQ + ; branch if at agah 1 (they use a different part of the random table)
;g tower agahnim
LDX $0FA3
LDA.l $AF8100, X ; random table
INX
STX $0FA3
BRA .return
+
;light world agahnim
LDX $0FA2
LDA.l $AF8000, X ; random table
INX
STX $0FA2
.return
PLX
RTL
}
RandomGanon:
{
LDA.l GanonAgahRNG : BNE + ; branch if not using vanilla behavior
JSL GetRandomInt
RTL
+
CMP #$01 : BEQ .noTeleports
CMP #$02 : BEQ .rigRng
.noTeleports
JSL GetRandomInt
AND #$FE ; set least significant bit to 0 to prevent teleport
RTL
.rigRng
PHX
LDX $0FA4
LDA.l $AF8200, X ; random table
INX
STX $0FA4
PLX
RTL
}
;================================================================