summaryrefslogtreecommitdiff
path: root/engine/sine.asm
diff options
context:
space:
mode:
authorDaniel Harding <33dannye@gmail.com>2020-05-16 21:42:24 -0500
committerGitHub <noreply@github.com>2020-05-16 21:42:24 -0500
commit8a924f1f783572ff395f617f99546b4c949c8b04 (patch)
tree1b6c7de331cb983256651b11b8adf413a3a434f1 /engine/sine.asm
parent88d7e9a34a8b610b358cec1ccc6660634ca9ce80 (diff)
parented94962edf1668aba3f60938e8a5ba8040e2a59c (diff)
Merge pull request #30 from entrpntr/spring-cleaning
Spring Cleaning
Diffstat (limited to 'engine/sine.asm')
-rw-r--r--engine/sine.asm40
1 files changed, 0 insertions, 40 deletions
diff --git a/engine/sine.asm b/engine/sine.asm
deleted file mode 100644
index e22d785a..00000000
--- a/engine/sine.asm
+++ /dev/null
@@ -1,40 +0,0 @@
-_Sine:: ; 8ac9 (2:4ac9)
- ld a, e
- and $3f
- cp $20
- jr nc, .negative
- call .GetSine
- ld a, h
- ret
-.negative
- and $1f
- call .GetSine
- ld a, h
- xor $ff
- inc a
- ret
-
-.GetSine: ; 8adf (2:4adf)
- 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
-.loop
- srl a
- jr nc, .no_add
- add hl, de
-.no_add
- sla e
- rl d
- and a
- jr nz, .loop
- ret
-
-.SineWave:
- sine_table $100