summaryrefslogtreecommitdiffstats
path: root/MatchBloxEngine/MatchBloxEngine/C_MatchBloxEngine.h
diff options
context:
space:
mode:
Diffstat (limited to 'MatchBloxEngine/MatchBloxEngine/C_MatchBloxEngine.h')
-rw-r--r--MatchBloxEngine/MatchBloxEngine/C_MatchBloxEngine.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/MatchBloxEngine/MatchBloxEngine/C_MatchBloxEngine.h b/MatchBloxEngine/MatchBloxEngine/C_MatchBloxEngine.h
new file mode 100644
index 0000000..f733bcc
--- /dev/null
+++ b/MatchBloxEngine/MatchBloxEngine/C_MatchBloxEngine.h
@@ -0,0 +1,55 @@
+#ifndef C_MATCHBLOXENGINE_HEADER_FILE
+
+#define C_MATCHBLOXENGINE_HEADER_FILE
+
+#include "MessageQueue.h"
+
+class C_3DObject;
+class C_Block;
+class C_Hand;
+class C_Log;
+
+typedef enum GameResult
+{
+ GR_FINISHED,
+ GR_BUSY,
+ GR_ERROR
+} GameResult;
+
+enum EngineState
+{
+ ES_INITIALISED,
+ ES_ERROR,
+ ES_GET_READY, //game initialised, waiting for start signal from player
+ ES_PLAYING_GRAB_BLOCK, //no block in hand -> grab floating block
+ ES_PLAYING_PUT_BLOCK, //block in hand -> put block in box
+ ES_PAUSED,
+ ES_FINISHED
+};
+
+class C_MatchBloxEngine
+{
+ C_MatchBloxEngine(char *f_strModelPath, char *f_strLogFile);
+ ~C_MatchBloxEngine();
+
+public:
+ GameResult GameStep(msgQueue &f_Queue);
+ void Draw(unsigned int f_uiElapsedTime);
+
+ bool NewGame(int f_iUserID, int f_iGameId);
+ bool StartGame();
+ bool Pause();
+ bool Resume();
+ bool Abort();
+
+private:
+ C_Block *m_pBlock[4];
+ C_Hand *m_pHand;
+ C_3DObject *m_pHole[4],
+ *m_pBox;
+ C_Log *m_pLog;
+
+ EngineState m_State;
+};
+
+#endif //C_MATCHBLOXENGINE_HEADER_FILE \ No newline at end of file