00001
00002
00003 #ifndef __GAME_H
00004 #define __GAME_H
00005
00006
00007 #include "irrlicht.h"
00008 using namespace irr;
00009
00010
00011 class cWorld;
00012 class mt19937;
00013 class cConfiguration;
00014 class IC_console;
00015
00016 enum eGameStatus { eGameStart=1, eGameRuns, eGameQuit, ePlayerIsDead, ePlayerHasWon };
00017
00018 class cGame : public IEventReceiver
00019 {
00020 public:
00021
00022 cGame( IrrlichtDevice* device, cConfiguration* configuration, cAudioDevice* audioDevice,
00023 IC_Console* console, unsigned int level );
00024 ~cGame( void );
00025
00026
00027 void run( void );
00028
00029 private:
00030
00031 bool OnEvent( const SEvent& event );
00032
00033
00034 void drawInterface( void );
00035
00036
00037 bool isPlayerDead( void )
00038 { return mWorld->getSoul()->getEnergy()<=0; }
00039
00040 private:
00041
00042 IrrlichtDevice* mDevice;
00043 video::IVideoDriver* mDriver;
00044 scene::ISceneManager* mSmgr;
00045 gui::IGUIEnvironment* mEnv;
00046 ILogger *mLogger;
00047
00048
00049 cConfiguration* mConfiguration;
00050
00051
00052 cAudioDevice* mAudioDevice;
00053
00054
00055 IC_Console *mConsole;
00056
00057
00058 cWorld* mWorld;
00059 unsigned int mLevel;
00060
00061
00062 eGameStatus mGameStatus;
00063
00064
00065 video::ITexture* tIrrlichtLogo;
00066 video::ITexture* tCrosshair;
00067 video::ITexture* tNrgTree;
00068 video::ITexture* tNrgBoulder;
00069 video::ITexture* tNrgRobot;
00070 video::ITexture* tNrgRobot5;
00071
00072
00073
00074 mt19937* mRNG;
00075 };
00076
00077
00078 #endif // __GAME_H