Mercurial > hg > tweakathon2ios
diff SequenceController.h @ 31:a677c027e3a0
Demo to Simon, kinda works.
4 reps of sequence.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Fri, 21 Nov 2014 17:07:56 +0000 |
parents | e7af34b1af83 |
children | 75202498bee9 |
line wrap: on
line diff
--- a/SequenceController.h Tue Nov 04 14:37:35 2014 +0000 +++ b/SequenceController.h Fri Nov 21 17:07:56 2014 +0000 @@ -11,15 +11,16 @@ #include <iostream> #include "ofMain.h" - -#define MIN_TARGETS_IN_SEQUENCE 1 +#include "presetManager.h" +#include "TrainingScoreManager.h" +#define MIN_TARGETS_IN_SEQUENCE 2 #define MAX_TARGETS_IN_SEQUENCE 5 #define MIN_TEMPO 60 #define MAX_TEMPO 300 #define NUM_TEMPO_STEPS 12 #define NUM_PRESETS 8 -#define SPACER_BARS true -#define NO_GUIDES_LEVEL true +#define SPACER_BARS false +#define NO_GUIDES_LEVEL false class AnimStep{ @@ -30,6 +31,8 @@ MATCHING_NEUTRAL_COUNT, PREVIEW_MOVE, PREVIEW_HIT, + GUIDED_MOVE, + GUIDED_HIT, MATCHING_MOVE, MATCHING_HIT} stepType; @@ -40,6 +43,8 @@ return 1000* (60.0/tempo); } int presetIndex; + Preset * currentTargetPreset; + Preset * nextTargetPreset; int whichInSequence; bool isLastOfAll; @@ -50,10 +55,18 @@ bool isLastOfRun; bool showsGuides; // depends on 'level' + bool showsIcons; + bool showsResultsAtEnd; vector<int> thisSequence; // so that we can show the whole sequence at the top? + + TrainingTestResult result; // only applies to steps that were scored. + + + void saveResult(TrainingTestResult result); }; +// NOT USED class Step{ public: typedef enum {COUNT_IN, PREVIEW_PREPARER, PREVIEW_DISPLAYER, MATCHING_PREPARER, MATCHING_INTERACTION, MATCHING_RESULT} stepTypes; @@ -92,10 +105,12 @@ void setAsMatchingPreparer(); void setAsMatchingInteraction(); void setAsMatchingFeedback(); + float getTimeBetweenTicks(){ return 1000. * (60.0/tempo); } + }; class SequenceController{ @@ -105,6 +120,8 @@ void setToStart(); void stepForward(); float getStartTickTime(); + void saveResultForCurrentStep(TrainingTestResult result); + TrainingTestResult getResultForPreviousStep(); private: void generateSteps(); void generateCountIn(int countInLength);