diff options
author | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-06-05 20:15:21 -0400 |
---|---|---|
committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-06-05 20:15:21 -0400 |
commit | 5ecda4d2741cc8f43a0b172aefc8299e44687832 (patch) | |
tree | 7fbac7a8f1be0bcd6a877ea47ec73fd5dfbbc211 /engine/bank3d | |
parent | 139e117d0717c69ae4c47a8d1a040267ee28d91d (diff) | |
parent | d48ea223eaad84af95e4f29043c279b56aa4ae88 (diff) |
Merge git://github.com/dannye/pokeyellow into dannye-master
Conflicts:
constants/connection_constants.asm
constants/evolution_constants.asm
constants/list_constants.asm
constants/oam_constants.asm
constants/sprite_constants.asm
constants/type_constants.asm
engine/bank3d/random.asm
engine/bank3f/main.asm
home.asm
home/overworld.asm
home/serial.asm
macros.asm
main.asm
wram.asm
Diffstat (limited to 'engine/bank3d')
-rw-r--r-- | engine/bank3d/random.asm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engine/bank3d/random.asm b/engine/bank3d/random.asm new file mode 100644 index 00000000..8c8ead4e --- /dev/null +++ b/engine/bank3d/random.asm @@ -0,0 +1,15 @@ +SECTION "bank3d Random",ROMX[$67DC],BANK[$3D] + +Random_:: +; Generate a random 16-bit value. + ld a, [rDIV] + ld b, a + ld a, [hRandomAdd] + adc b + ld [hRandomAdd], a + ld a, [rDIV] + ld b, a + ld a, [hRandomSub] + sbc b + ld [hRandomSub], a + ret |