diff options
| author | yenatch <yenatch@gmail.com> | 2014-05-24 11:40:38 -0700 |
|---|---|---|
| committer | yenatch <yenatch@gmail.com> | 2014-05-24 11:40:38 -0700 |
| commit | 64479cd64205d611a66698f447aa42c16c334b2d (patch) | |
| tree | 2cd1ddc619864053accbbc7f6cbf084a9bd33c53 /engine/rng.asm | |
| parent | Comment some more bank 0 functions. (diff) | |
| download | pokeyellow-64479cd64205d611a66698f447aa42c16c334b2d.tar.gz pokeyellow-64479cd64205d611a66698f447aa42c16c334b2d.tar.xz pokeyellow-64479cd64205d611a66698f447aa42c16c334b2d.zip | |
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-x | engine/rng.asm | 20 |
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 |
