summaryrefslogtreecommitdiff
path: root/chord.h
diff options
context:
space:
mode:
authorSimon Gagne <gags2431@usherbrooke.ca>2023-03-16 10:06:04 -0400
committerSimon Gagne <gags2431@usherbrooke.ca>2023-03-16 10:06:04 -0400
commitb8dadd82d4afff0e5e6b6a8a00df948045d31503 (patch)
treec0613c30de11d5261bc0bdf4a1d5522515f41eb5 /chord.h
parent8332074b391e824ae4b92edfd5aa658c71265449 (diff)
Commit pour deplacement vers VSStudio
Diffstat (limited to 'chord.h')
-rw-r--r--chord.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/chord.h b/chord.h
deleted file mode 100644
index 6ce4b64..0000000
--- a/chord.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef __CHORD_H__
-#define __CHORD_H__
-
-#include <regex>
-
-// Chords are used to represent a set of notes that are played together.
-// For this guitar hero implementation, a single note is technically a chord.
-// This analogy is used to make sure that simultaneous notes are always grouped
-// under a single chord since they have information in common (start/end time).
-
-#define FRET1 0 // green
-#define FRET2 1 // red
-#define FRET3 2 // yellow
-#define FRET4 3 // blue
-#define FRET5 4 // orange
-
-
-class Chord {
- private:
- bool notes[5]; // which buttons are pressed
- int start; // when to play in ms (relative to song start)
- int end; // when to stop playing in ms (relative to song start)
- int renderStart; // when to render (no need to define on construction)
- public:
- // Chords are initialized with a single button.
- // Other notes are added as notes with the same "start" are encountered
- // in .chart files.
- // End time is initialized to 0 but can be changed if the .chart indicates
- // that the chord is held for longer than the default 1/16th note.
- Chord(int btn, int startTime, int endTime);
- ~Chord();
- void change(int button); // change note in existing chord
- void setEnd(int endTime); // set the end time of the chord
- void setRenderStart(int renderTime); // sets when to start rendering
- bool* getNotes(); // get the notes in the chord
- int getStart(); // get the start time of the chord
- int getEnd(); // get the end time of the chord
- int getRenderStart(); // get the render time of the chord
- std::regex getRegex(); // regex for this chord
- // compares the player's input to
- // the expected chord
-};
-
-#include "chord.cpp"
-#endif // __CHORD_H__