summaryrefslogtreecommitdiff
path: root/engine/rng.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-05-24 11:40:38 -0700
committeryenatch <yenatch@gmail.com>2014-05-24 11:40:38 -0700
commit64479cd64205d611a66698f447aa42c16c334b2d (patch)
tree2cd1ddc619864053accbbc7f6cbf084a9bd33c53 /engine/rng.asm
parent8f8281fe6ed02d8235ab9f92fa6ae93f50a3bf8e (diff)
Rename random number function and hram labels.
GenRandom -> Random GenRandomInBattle -> BattleRandom H_RAND1 -> hRandomAdd H_RAND2 -> hRandomSub
Diffstat (limited to 'engine/rng.asm')
-rwxr-xr-xengine/rng.asm20
1 files changed, 10 insertions, 10 deletions
diff --git a/engine/rng.asm b/engine/rng.asm
index a0e0daa7..2fc83f6f 100755
--- a/engine/rng.asm
+++ b/engine/rng.asm
@@ -1,13 +1,13 @@
-GenRandom_: ; 13a8f (4:7a8f)
-; generate a random 16-bit integer and store it at $FFD3,$FFD4
- ld a,[rDIV]
- ld b,a
- ld a,[H_RAND1]
+Random_::
+; Generate a random 16-bit value.
+ ld a, [rDIV]
+ ld b, a
+ ld a, [hRandomAdd]
adc b
- ld [H_RAND1],a
- ld a,[rDIV]
- ld b,a
- ld a,[H_RAND2]
+ ld [hRandomAdd], a
+ ld a, [rDIV]
+ ld b, a
+ ld a, [hRandomSub]
sbc b
- ld [H_RAND2],a
+ ld [hRandomSub], a
ret