source: GTP/trunk/App/Games/Jungle_Rumble/src/GameManager.h @ 1378

Revision 1378, 2.5 KB checked in by giegl, 18 years ago (diff)

GTPD - Jungle Rumble - integrate into GTP SVN structure

Line 
1#pragma once
2
3#include<vector> // Standard-Vektor einschließen
4#include "GameScene.h"
5#include "MenueScene.h"
6#include <string>
7#include "PhysXOutputStream.h"
8#include "UserAllocator.h"
9#include "ResourceManager.h"
10
11using namespace std;
12
13class Scene;
14class Node;
15
16#define SPTR boost::shared_ptr
17
18class GameManager
19{
20public:
21        GameManager(void);
22        ~GameManager(void);
23
24        int init(void);
25       
26        void printToConsole (std::string output);
27        void addScene(Scene &newScene);
28        void removeScene (Scene &oldScene);
29        void setActiveScene(Scene &aScene);
30        void switchToMenueScene();
31        void switchToGameScene();
32
33        void keyPressed(UINT nChar, bool bKeyDown, bool bAltDown, void* pUserContext);
34        void setMouseStatus(bool bLeftButtonDown,  bool bRightButtonDown,bool bMiddleButtonDown,
35                     bool bSideButton1Down, bool bSideButton2Down, int nMouseWheelDelta,
36                     int xPos, int yPos);
37
38        void updateGame(float fElapsedTime);
39        void initGame();
40       
41        ID3DXEffect* getEffect(UINT id);
42        ID3DXEffect* loadEffect(UINT id, LPCWSTR filename);
43        void releaseEffect(ID3DXEffect* effect);
44
45        void OnLostDevice( void* pUserContext );
46        void OnDestroyDevice( void* pUserContext );
47        HRESULT OnCreateDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext );
48        HRESULT OnResetDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext );
49        void OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext );
50
51
52        //PhysicSDK
53        NxPhysicsSDK*   pPhysicsSDK;
54        UserAllocator*  pAllocator;
55
56        void setScreenDimension(int width, int height);
57
58        ResourceManager resManager;
59
60        int screenWidth;
61        int screenHeight;
62
63        MenueScene ms; // Menue Scene
64        GameScene gs;  // GameScene
65
66        //EffectConstants
67        static const UINT EFFECT_FADE = 0;
68        static const UINT EFFECT_RAYTRACE = 1;
69        static const UINT EFFECT_DEPTHIMP = 2;
70        static const UINT EFFECT_SIMPLEMESH = 3;
71        static const UINT EFFECT_TERRAIN        = 4;
72        static const UINT EFFECT_OCEAN  = 5;
73
74        friend class Scene;
75protected:
76        Scene* activeScene;
77        std::vector<Scene *> sceneVector;
78        bool consoleStarted;
79        HANDLE outputHandle;
80
81        PhysXOutputStream pOutputStream;
82
83        //Effect vector
84        static const int NB_EFFECTS = 100;
85        ID3DXEffect* effectList[NB_EFFECTS];
86        int effectReleaseCount[NB_EFFECTS];
87
88        bool firstFrame;
89        IDirect3DSurface9* finalRenderTarget;
90        IDirect3DDevice9* device;
91        ID3DXEffect* fadeEffect;
92};
Note: See TracBrowser for help on using the repository browser.