summaryrefslogtreecommitdiffstats
path: root/matchblox/engine/C_MatchBloxEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'matchblox/engine/C_MatchBloxEngine.cpp')
-rw-r--r--matchblox/engine/C_MatchBloxEngine.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/matchblox/engine/C_MatchBloxEngine.cpp b/matchblox/engine/C_MatchBloxEngine.cpp
index 5925fb2..48a11a9 100644
--- a/matchblox/engine/C_MatchBloxEngine.cpp
+++ b/matchblox/engine/C_MatchBloxEngine.cpp
@@ -24,6 +24,7 @@
#include "font.h"
#include "stereoheadtrackfrustum.h"
#include "textfile.h"
+#include "menu.h"
extern "C" {
extern GLuint g_iBase;
@@ -110,11 +111,14 @@ GameResult C_MatchBloxEngine::ProcessMsgs(void)
switch (l_iAction)
{
case ACTION_PAUSE:
- if (!Pause())
+ if (Pause())
{
- Resume();
+ MenuOptions();
}
break;
+ case ACTION_RECALIBRATE:
+ // recalibrate
+ break;
case ACTION_START:
Abort();
NewGame(l_pMsg1->gamemode);
@@ -423,9 +427,9 @@ bool C_MatchBloxEngine::NewGame(int f_iGameMode)
{
if(m_State == ES_INITIALISED)
{
- m_bHeadTrackingEnabled = (int)(f_iGameMode & GO_HEADTRACKING);
- m_bStereoEnabled = (int)(f_iGameMode & GO_STEREOVISION);
- m_CurrentBox = (BoxSize)((f_iGameMode & (255 - 8)) >> 3);
+ m_bHeadTrackingEnabled = (int)(f_iGameMode & GO_HEADTRACKING)? true : false;
+ m_bStereoEnabled = (f_iGameMode & GO_STEREOVISION)? true : false;
+ m_CurrentBox = (BoxSize)((f_iGameMode & (255 - 7)) >> 3);
//prepare a session struct for administration
m_pCurrentSession = new GameSession(m_GameSettings.m_iNrOfTurns, m_CurrentBox);
@@ -458,7 +462,8 @@ bool C_MatchBloxEngine::Pause()
{
//only pause when playing
if (m_State == ES_PLAYING_GRAB_BLOCK ||
- m_State == ES_PLAYING_PUT_BLOCK)
+ m_State == ES_PLAYING_PUT_BLOCK ||
+ m_State == ES_GET_READY)
{
//save current state
m_SavedState = m_State;
@@ -723,6 +728,7 @@ void C_MatchBloxEngine::CursorMove(Vect3D_t &f_NewCursorPos)
{
//send a rumble message and set collision animation state
//message_send()
+
}
}