diff options
Diffstat (limited to 'matchblox/engine')
-rw-r--r-- | matchblox/engine/C_MatchBloxEngine.cpp | 12 | ||||
-rw-r--r-- | matchblox/engine/C_MatchBloxEngine.h | 1 |
2 files changed, 5 insertions, 8 deletions
diff --git a/matchblox/engine/C_MatchBloxEngine.cpp b/matchblox/engine/C_MatchBloxEngine.cpp index 9d385e2..e380300 100644 --- a/matchblox/engine/C_MatchBloxEngine.cpp +++ b/matchblox/engine/C_MatchBloxEngine.cpp @@ -117,7 +117,7 @@ GameResult C_MatchBloxEngine::ProcessMsgs(void) break;
case ACTION_START:
Abort();
- NewGame(0, l_pMsg1->gamemode, BS_SMALL);
+ NewGame(l_pMsg1->gamemode);
break;
case ACTION_RESUME:
Resume();
@@ -426,13 +426,9 @@ bool C_MatchBloxEngine::NewGame(int f_iGameMode) {
if(m_State == ES_INITIALISED)
{
- switch (f_iGameMode)
- {
- case 0:
- m_bHeadTrackingEnabled = true;
- m_bStereoEnabled = true;
- m_CurrentBox = BoxSize::BS_MED;
- }
+ m_bHeadTrackingEnabled = (int)(f_iGameMode & GO_HEADTRACKING);
+ m_bStereoEnabled = (int)(f_iGameMode & GO_STEREOVISION);
+ m_CurrentBox = (BoxSize)((f_iGameMode & (255 - 8)) >> 3);
//prepare a session struct for administration
m_pCurrentSession = new GameSession(m_GameSettings.m_iNrOfTurns, m_CurrentBox);
diff --git a/matchblox/engine/C_MatchBloxEngine.h b/matchblox/engine/C_MatchBloxEngine.h index 5d90291..950f8e3 100644 --- a/matchblox/engine/C_MatchBloxEngine.h +++ b/matchblox/engine/C_MatchBloxEngine.h @@ -26,6 +26,7 @@ typedef enum GameResult GR_ERROR
} GameResult;
+
enum EngineState
{
ES_INITIALISED,
|