diff options
author | yenatch <yenatch@gmail.com> | 2018-02-25 22:39:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-25 22:39:51 -0500 |
commit | 725148443f0ed0f70af747259ef49643359e92a2 (patch) | |
tree | 5f8ccf80489e0820934d40a732a5ce8d7f65e1e3 /engine/routines | |
parent | f44f306cfd4b438d0ba2f56b61be4b118ef3274b (diff) | |
parent | 7453bd1aa8e55a1a9fcce7c69f62106f5e5f6e9c (diff) |
Merge pull request #476 from Rangi42/master
Resolve some issues; rename some maps; move more tables into data/; warp_def → warp_event (ready to merge)
Diffstat (limited to 'engine/routines')
-rw-r--r-- | engine/routines/playslowcry.asm | 2 | ||||
-rwxr-xr-x | engine/routines/sine.asm | 48 | ||||
-rw-r--r-- | engine/routines/unreferenced_getgen1trainerclassname.asm | 2 |
3 files changed, 4 insertions, 48 deletions
diff --git a/engine/routines/playslowcry.asm b/engine/routines/playslowcry.asm index 1dc6c78ac..1f27a7ca4 100644 --- a/engine/routines/playslowcry.asm +++ b/engine/routines/playslowcry.asm @@ -1,4 +1,4 @@ -Special_PlaySlowCry: ; fb841 +PlaySlowCry: ; fb841 ld a, [wScriptVar] call LoadCry jr c, .done diff --git a/engine/routines/sine.asm b/engine/routines/sine.asm index 5f56a10a8..23e86c015 100755 --- a/engine/routines/sine.asm +++ b/engine/routines/sine.asm @@ -1,48 +1,4 @@ _Sine:: ; 84d9 -; A simple sine function. -; Return d * sin(e) in hl. - -; e is a signed 6-bit value. +; a = d * sin(e * pi/32) ld a, e - and %111111 - cp %100000 - jr nc, .negative - call .ApplySineWave - ld a, h - ret - -.negative - and %011111 - call .ApplySineWave - ld a, h - xor $ff - inc a - ret - -.ApplySineWave: ; 84ef - ld e, a - ld a, d - ld d, 0 - ld hl, .sinewave - add hl, de - add hl, de - ld e, [hl] - inc hl - ld d, [hl] - ld hl, 0 -; Factor amplitude -.multiply - srl a - jr nc, .even - add hl, de -.even - sla e - rl d - and a - jr nz, .multiply - ret - -.sinewave ; 850b -; A $20-word table representing a sine wave. -; 90 degrees is index $10 at a base amplitude of $100. - sine_wave $100 + calc_sine_wave diff --git a/engine/routines/unreferenced_getgen1trainerclassname.asm b/engine/routines/unreferenced_getgen1trainerclassname.asm index 66c80172d..da8e98b61 100644 --- a/engine/routines/unreferenced_getgen1trainerclassname.asm +++ b/engine/routines/unreferenced_getgen1trainerclassname.asm @@ -18,4 +18,4 @@ Unreferenced_GetGen1TrainerClassName: ; 50a28 jr nz, .copy ret -INCLUDE "data/unused/gen_1_trainer_names.asm" +INCLUDE "data/text/unused_gen1_trainer_names.asm" |