diff options
author | yenatch <yenatch@gmail.com> | 2013-09-07 23:38:19 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2013-09-07 23:38:19 -0400 |
commit | 9f53825ce2701f94470a98b3decd8013fbeba91a (patch) | |
tree | 47c7a1380ebf0569eb7d5765b28f25843d636675 /common/sine.asm | |
parent | 7a3a4f913b32784480dc297e8a4794934ec87b06 (diff) |
move common asm from engine/ to common/
engine/ was getting really bloated and common asm wasnt what it was made for
Diffstat (limited to 'common/sine.asm')
-rw-r--r-- | common/sine.asm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/common/sine.asm b/common/sine.asm new file mode 100644 index 000000000..09d06ca89 --- /dev/null +++ b/common/sine.asm @@ -0,0 +1,22 @@ +Cosine: ; 1b0f +; Return d * cos(a) in hl + add $10 ; 90 degrees + +Sine: ; 1b11 +; Return d * sin(a) in hl +; a is a signed 6-bit value. + + ld e, a + + ld a, [hROMBank] + push af + ld a, BANK(_Sine) + rst Bankswitch + + call _Sine + + pop af + rst Bankswitch + ret +; 1b1e + |