feat: remove hold from song

assume songs code it as 1 always; implementations are free to change this during compilation, but this should be a compile time flag / optimization; not a concern of song.
This commit is contained in:
vsariola
2021-01-05 15:50:27 +02:00
parent 994c11e8db
commit 30379c981d
96 changed files with 14 additions and 138 deletions

View File

@ -216,7 +216,7 @@
(i32.add (global.get $row))
(i32.load8_u offset={{index .Labels "su_patterns"}})
(local.tee $note)
(if (i32.ne (i32.const {{.Song.Hold}}))(then
(if (i32.ne (i32.const {{.Hold}}))(then
(i32.store offset=4164
(i32.mul
(i32.add
@ -227,7 +227,7 @@
)
(i32.const 1)
) ;; release the note
(if (i32.gt_u (local.get $note) (i32.const {{.Song.Hold}}))(then
(if (i32.gt_u (local.get $note) (i32.const {{.Hold}}))(then
(local.set $di (i32.add
(i32.mul
(i32.add
@ -263,9 +263,9 @@
(i32.add (global.get $row))
(i32.load8_u offset={{index .Labels "su_patterns"}})
(local.tee $note)
(if (i32.ne (i32.const {{.Song.Hold}}))(then
(if (i32.ne (i32.const {{.Hold}}))(then
(i32.store offset=4 (local.get $di) (i32.const 1)) ;; release the note
(if (i32.gt_u (local.get $note) (i32.const {{.Song.Hold}}))(then
(if (i32.gt_u (local.get $note) (i32.const {{.Hold}}))(then
(memory.fill (local.get $di) (i32.const 0) (i32.const 4096))
(i32.store (local.get $di) (local.get $note))
))