summaryrefslogtreecommitdiff
path: root/macros/data.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-02-03 21:11:55 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2018-02-03 21:11:55 -0500
commit73ea7c6326f16f84de1cf74193705328d1664645 (patch)
tree31c6e407dd73df136f34c7945c8198afb2746f0a /macros/data.asm
parent271aa20b73f699819351e787c58d0d14694eb135 (diff)
Macro factors out sine code, just like sine data, since it's used 5 times
Diffstat (limited to 'macros/data.asm')
-rw-r--r--macros/data.asm18
1 files changed, 9 insertions, 9 deletions
diff --git a/macros/data.asm b/macros/data.asm
index 8adb33005..ad2d9b8ef 100644
--- a/macros/data.asm
+++ b/macros/data.asm
@@ -111,7 +111,15 @@ menu_coords: MACRO
ENDM
-sine_wave: MACRO
+bcd: MACRO
+rept _NARG
+ dn ((\1) % 100) / 10, (\1) % 10
+ shift
+endr
+ENDM
+
+
+sine_table: MACRO
; \1 samples of sin(x) from x=0 to x<32768 (pi radians)
x = 0
rept \1
@@ -119,11 +127,3 @@ rept \1
x = x + DIV(32768, \1) ; a circle has 65536 "degrees"
endr
ENDM
-
-
-bcd: MACRO
-rept _NARG
- dn ((\1) % 100) / 10, (\1) % 10
- shift
-endr
-ENDM