mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 23:22:26 +13:00
Add subdirectories to engine/ similar to pokecrystal
This commit is contained in:
parent
5559d51c86
commit
f275790aec
124 changed files with 342 additions and 346 deletions
13
engine/math/random.asm
Executable file
13
engine/math/random.asm
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue