diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-09-05 11:30:12 -0700 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-09-05 11:30:12 -0700 |
commit | 40b4c87db7e9472d99186b67bdec3d48a2132e73 (patch) | |
tree | b0ea0d40187c103dbb9f8bd185ee5f40770b5b53 /engine/sine.asm | |
parent | 4e36d85ee966f8f22531183679549061263b2166 (diff) | |
parent | 60dde1d03ed43de1e7ef777e4198963620c73958 (diff) |
Merge pull request #188 from yenatch/split-common
recomment and split out a ton of common asm (bank 0)
Diffstat (limited to 'engine/sine.asm')
-rw-r--r-- | engine/sine.asm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/engine/sine.asm b/engine/sine.asm new file mode 100644 index 000000000..09d06ca89 --- /dev/null +++ b/engine/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 + |