-
Notifications
You must be signed in to change notification settings - Fork 1
/
Assignment2.h~
78 lines (63 loc) · 2.18 KB
/
Assignment2.h~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef __Assignment2_h_
#define __Assignment2_h_
#include "BaseApplication.h"
#include "Game.h"
#include "ServerGame.h"
#include "ClientGame.h"
#include "Sound.h"
#include "Network.h"
#include <CEGUI.h>
#include <CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h>
#include <stdio.h>
class Assignment2 : public BaseApplication
{
public:
Assignment2(void);
virtual ~Assignment2(void);
protected:
const static Ogre::Real BOX_SIDE_LENGTH = 200.0f;
ServerGame* sGame;
ClientGame* cGame;
enum AppMode appMode;
// NETWORK OBJECT
Network* conn;
bool mouseClicked;
bool mPaused;
Ogre::Real mRotate;
Ogre::Real mMove;
Ogre::Vector3 mDirection;
Ogre::SceneNode *mCamNode;
// not used for now
//OgreBites::ParamsPanel* scorePanel;
const static int MAX_NUM_BALLS = 10;
bool pauses [MAX_NUM_BALLS];
int bounces;
int collisions;
CEGUI::OgreRenderer* mRenderer;
void setupCEGUI(void);
bool title_start_sp_game(const CEGUI::EventArgs &e);
bool title_mp_menu(const CEGUI::EventArgs &e);
bool title_host_game(const CEGUI::EventArgs &e);
bool title_connect_to_game(const CEGUI::EventArgs &e);
bool quit(const CEGUI::EventArgs &e);
bool resume_game(const CEGUI::EventArgs &e);
bool game_controls(const CEGUI::EventArgs &e);
bool game_controls_return(const CEGUI::EventArgs &e);
bool configure_game(const CEGUI::EventArgs &e);
bool config_return(const CEGUI::EventArgs &e);
bool config_setVolume(const CEGUI::EventArgs &e);
bool config_setSFXVolume(const CEGUI::EventArgs &e);
bool config_setRestitution(const CEGUI::EventArgs &e);
bool config_court(const CEGUI::EventArgs &e);
bool config_gravity(const CEGUI::EventArgs &e);
virtual void createCamera(void);
virtual void createScene(void);
virtual void createFrameListener(void);
virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);
virtual bool keyPressed( const OIS::KeyEvent& evt );
virtual bool keyReleased( const OIS::KeyEvent& evt );
virtual bool mouseMoved( const OIS::MouseEvent& evt );
virtual bool mousePressed( const OIS::MouseEvent& evt, OIS::MouseButtonID id );
virtual bool mouseReleased( const OIS::MouseEvent& evt, OIS::MouseButtonID id );
};
#endif // #ifndef __Assignment2_h_