summaryrefslogtreecommitdiff
path: root/Games/Minesweeper/Field.cpp
diff options
context:
space:
mode:
authorWilliam McPherson <willmcpherson2@gmail.com>2019-12-23 20:46:15 +1100
committerAndreas Kling <awesomekling@gmail.com>2019-12-23 15:08:15 +0100
commit7c8bbea995d9e2a5580c66cca7e8a56f65329fc2 (patch)
treef6a15da45b6379bbeb8668fd04529ffb9c2414ed /Games/Minesweeper/Field.cpp
parentebaadda6bd44cc68b2b96eb4afe990c9b2e7b993 (diff)
downloadserenity-7c8bbea995d9e2a5580c66cca7e8a56f65329fc2.zip
Piano: Add piano roll
m_roll_notes[] is an array of 2 bools, pressed and playing. A roll note is highlighted if it is pressed or in the currently playing column, but the note is only actually played if the roll note is both pressed and playing. We change columns every m_tick which is currently 10 frames. The delay is synchronised with this. change_roll_column() tracks the previous column and current column to be played. Each roll note in the previous column is set to "not playing" and the underlying audio note is turned off if it was pressed. For the current column, each roll note is set to playing and the underlying audio note is turned on if pressed.
Diffstat (limited to 'Games/Minesweeper/Field.cpp')
0 files changed, 0 insertions, 0 deletions