Use SERIAL_RNS_LENGTH
in _BattleRandom
This commit is contained in:
@@ -6900,7 +6900,7 @@ _BattleRandom::
|
|||||||
ld [wLinkBattleRNCount], a
|
ld [wLinkBattleRNCount], a
|
||||||
|
|
||||||
; If we haven't hit the end yet, we're good
|
; If we haven't hit the end yet, we're good
|
||||||
cp 10 - 1 ; Exclude last value. See the closing comment
|
cp SERIAL_RNS_LENGTH - 1 ; Exclude last value. See the closing comment
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
@@ -6916,7 +6916,7 @@ _BattleRandom::
|
|||||||
xor a
|
xor a
|
||||||
ld [wLinkBattleRNCount], a
|
ld [wLinkBattleRNCount], a
|
||||||
ld hl, wLinkBattleRNs
|
ld hl, wLinkBattleRNs
|
||||||
ld b, 10 ; number of seeds
|
ld b, SERIAL_RNS_LENGTH ; number of seeds
|
||||||
|
|
||||||
; Generate next number in the sequence for each seed
|
; Generate next number in the sequence for each seed
|
||||||
; a[n+1] = (a[n] * 5 + 1) % 256
|
; a[n+1] = (a[n] * 5 + 1) % 256
|
||||||
|
Reference in New Issue
Block a user