summaryrefslogtreecommitdiff
path: root/engine/sine.asm
diff options
context:
space:
mode:
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