00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef MATCH_H
00013 #define MATCH_H
00014
00015 #include "GameConstants.h"
00016 #include "DiscManager.h"
00017 #include "AudioManager.h"
00018 #include "Net.h"
00019 #include "Tutorial.h"
00020 #include "Menu.h"
00021 #include "PauseMenu.h"
00022 #include "EndMenu.h"
00023
00029 class Match
00030 {
00031 public:
00035 Match();
00036
00040 virtual ~Match();
00041
00047 virtual int Update(double deltaTime,
00048 CIw2DFont *font) = 0;
00049
00055 int BaseUpdate(double deltaTime,
00056 CIw2DFont* font);
00057
00062 void Draw(double deltaTime);
00063
00067 void ResetGame();
00068
00069 protected:
00071 CIw2DImage *m_catapultImage;
00072
00074 CIw2DImage *m_pauseButton;
00075
00077 CIw2DImage *m_backButton;
00078
00080 CIwFVec2 m_catapultPosition;
00081
00083 CIwFVec2 m_pauseButtonPosition;
00084
00086 CIwFVec2 m_aiTextPosition;
00087
00089 CIwFVec2 m_aiTextDimensions;
00090
00092 CIwFVec2 m_pauseButtonDimensions;
00093
00095 CIwFVec2 m_catapultDimensions;
00096
00098 CIwFVec2 m_backButtonPosition;
00099
00101 CIwFVec2 m_backButtonDimensions;
00102
00104 double m_startTime;
00105
00107 Tutorial *m_tutorial;
00108
00110 Grid *m_grid;
00111
00113 PauseMenu *m_pauseMenu;
00114
00116 EndMenu *m_endMenu;
00117
00119 enum State { PLAYING, TUTORIAL, QUITMENU, RESTARTMENU, PAUSEMENU, LOBBY, ENDGAME };
00120
00122 State m_state;
00123
00125 CIw2DFont *m_aiFont;
00126
00128 bool m_aiRender;
00129
00131 bool m_aiPrevRender;
00132
00134 static const int m_standardGridSize = 85;
00135
00137 CIwFVec2 m_gridPosition;
00138
00140 enum Result { REDWIN = 1, YELLOWWIN = 2, DRAW = 3 };
00141
00143 static const int m_numQuotes = 5;
00144
00146 CIw2DImage *m_aiQuotes[m_numQuotes];
00147
00149 CIwFVec2 m_aiQuotePos;
00150
00152 CIwFVec2 m_aiQuoteSize;
00153
00155 int m_quoteIndex;
00156
00161 void DrawWaitingText(CIw2DFont *font);
00162
00164 CIw2DFont *m_statusFont;
00165
00167 CIwFVec2 m_searchingTextPos;
00168
00170 CIwFVec2 m_ipStatusPos;
00171
00173 CIwFVec2 m_portStatusPos;
00174
00176 CIwFVec2 m_serverStatusPos;
00177
00179 CIwFVec2 m_textRectangle;
00180
00182 char* m_ipStatus;
00183
00185 char* m_serverStatus;
00186
00188 char* m_portStatus;
00189
00191 int m_textCounter;
00192 };
00193
00194 #endif