summaryrefslogtreecommitdiff
path: root/ofAsterisk/src/Asterisk.h
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2012-12-10 19:30:27 +0000
committerComment <tim@gray.(none)>2012-12-10 19:30:27 +0000
commitdba01ce870165fd8d8a5fea921cb31f7c4e8c25f (patch)
treebc7f877edaeb2047eac9606c9bf869bbe9f7776a /ofAsterisk/src/Asterisk.h
parent0bb92ced351b7fbba6e2e7036eae92037d08facf (diff)
fixed race condition in asterisk driver
Diffstat (limited to 'ofAsterisk/src/Asterisk.h')
-rwxr-xr-xofAsterisk/src/Asterisk.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/ofAsterisk/src/Asterisk.h b/ofAsterisk/src/Asterisk.h
index 5033a5c..fb6097c 100755
--- a/ofAsterisk/src/Asterisk.h
+++ b/ofAsterisk/src/Asterisk.h
@@ -4,10 +4,12 @@
#include "ofMain.h"
#include "ofxNetwork.h"
-#define IDLE 0
-#define WAITING 1
-#define STARTING 2
-#define PLAYING 3
+#define ASTERISK_IDLE 0
+#define ASTERISK_WAITING 1
+#define ASTERISK_STARTING 2
+#define ASTERISK_PLAYING 3
+#define ASTERISK_GAMESTARTED 1000
+#define ASTERISK_GAMEOVER 1001
class Asterisk: public ofThread
@@ -15,27 +17,27 @@ class Asterisk: public ofThread
public:
Asterisk(){
}
-
+
void start(){
-
+
}
void stop(){
stopThread();
}
//--------------------------
-
+
void setup(string passcode="1111",int millis=1000);
virtual ~Asterisk();
void startGame();
void endGame(string score);
int update();
int state;
- bool isPlaying;
int queued;
protected:
- void cmd(string s);
+ void cmd(string s);
+ void scmd(string s);
void threadedFunction();
private:
int startTime;
@@ -43,8 +45,9 @@ class Asterisk: public ofThread
int filenum;
ofxUDPManager udpConnection;
string playerCode;
- int statusPollMillis;
-
+ int statusPollMillis;
+
+
};
#endif // ASTERISK_H