[1378] | 1 | #pragma once
|
---|
| 2 | #include "scene.h"
|
---|
| 3 | #include <list>
|
---|
| 4 | #include <string.h>
|
---|
| 5 | #include ".\GameScene.h"
|
---|
| 6 |
|
---|
| 7 | class MenueScene :
|
---|
| 8 | public Scene
|
---|
| 9 | {
|
---|
| 10 | public:
|
---|
| 11 | MenueScene(void);
|
---|
| 12 | ~MenueScene(void);
|
---|
| 13 |
|
---|
| 14 | virtual void initScene(GameManager &_manager);
|
---|
| 15 | virtual void clearScene();
|
---|
| 16 | void addChallenge(std::string challengeName);
|
---|
| 17 | virtual void renderScene(float fElapsedTime);
|
---|
| 18 |
|
---|
| 19 | void setDialogResourceManager(CDXUTDialogResourceManager * DialogResourceManager);
|
---|
| 20 | void setGUI(CDXUTDialog * GUI);
|
---|
| 21 | CDXUTDialog * getGUI();
|
---|
| 22 | virtual void OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext );
|
---|
| 23 |
|
---|
| 24 | void initGUI();
|
---|
| 25 | void setupGUI();
|
---|
| 26 | void renderGUI(float fElapsedTime);
|
---|
| 27 | void renderBackground();
|
---|
| 28 | void activateStandardBackground();
|
---|
| 29 | void activateLoadingBackground(int index);
|
---|
| 30 |
|
---|
| 31 | std::vector<std::string>* getChallengeList();
|
---|
| 32 | std::vector<std::string>* getChallengeNameList();
|
---|
| 33 | std::vector<std::string>* getChallengeScreenList();
|
---|
| 34 |
|
---|
| 35 | std::vector<IDirect3DTexture9*> Textures;
|
---|
| 36 | std::vector<IDirect3DTexture9*> LoadingTextures;
|
---|
| 37 |
|
---|
| 38 | LPD3DXSPRITE* getSprite();
|
---|
| 39 |
|
---|
| 40 | virtual void OnLostDevice( void* pUserContext );
|
---|
| 41 | virtual void OnDestroyDevice( void* pUserContext );
|
---|
| 42 | virtual HRESULT OnResetDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext );
|
---|
| 43 |
|
---|
| 44 | //Backgroundmusic Stuff
|
---|
| 45 | /*FSOUND_STREAM *bgMusicStream;
|
---|
| 46 | int bgSoundChannel;
|
---|
| 47 | float bgSoundVolume;
|
---|
| 48 | bool soundStopped;
|
---|
| 49 | void setBackgroundSound(std::string filename);
|
---|
| 50 | void playBackgroundSound();*/
|
---|
| 51 | //virtual void setBackgroundSoundMute(bool _playMusic);
|
---|
| 52 | virtual void updateSoundNodeVolume();
|
---|
| 53 | private:
|
---|
| 54 | bool lightSetted;
|
---|
| 55 | CDXUTDialogResourceManager *DialogResourceManager;
|
---|
| 56 | CDXUTDialog *GUI;
|
---|
| 57 |
|
---|
| 58 | void updateMenueFirst();
|
---|
| 59 | void prepareLoading(int index);
|
---|
| 60 | void loadGameScene();
|
---|
| 61 |
|
---|
| 62 | #define MENU_IDLE 0
|
---|
| 63 | #define MENU_PREPARE 1
|
---|
| 64 | #define MENU_LOAD 2
|
---|
| 65 |
|
---|
| 66 | int menuestatus;
|
---|
| 67 |
|
---|
| 68 | std::vector<std::string> challengeList;
|
---|
| 69 | std::vector<std::string> challengeNameList;
|
---|
| 70 | std::vector<std::string> challengeScreenList;
|
---|
| 71 |
|
---|
| 72 | GameScene *activeGameScene;
|
---|
| 73 | int activeChallengeNumber;
|
---|
| 74 | int selectedChallengeNumber;
|
---|
| 75 |
|
---|
| 76 | //create sprite
|
---|
| 77 | LPD3DXSPRITE sprite;
|
---|
| 78 | //create scale/rotate matrices
|
---|
| 79 | D3DXMATRIX spriteMatrix;
|
---|
| 80 | //create surface descriptor
|
---|
| 81 | D3DSURFACE_DESC desc;
|
---|
| 82 |
|
---|
| 83 | #define IDC_LOADGAME 0
|
---|
| 84 | #define IDC_LOADGAME2 1
|
---|
| 85 | #define IDC_EXIT 2
|
---|
| 86 | #define IDC_CHALLENGELIST 3
|
---|
| 87 |
|
---|
| 88 | int backgroundIndex;
|
---|
| 89 | };
|
---|