Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Walkthrough.h
Go to the documentation of this file.
1#ifndef WALKTHROUGH_H_INCLUDED
2#define WALKTHROUGH_H_INCLUDED
3
5#include <Ult/ModelData.h>
6#include <Ult/Camera.h>
7#include <Ult/Math/Frustum.h>
8
9#include "PortalSystem.h"
10
11#define WINDOW_NAME "Walkthrough 3D"
12#define WINDOW_CLASS "UPGCLASS"
13#define WINDOW_WIDTH 1024
14#define WINDOW_HEIGHT 768
15#define WINDOW_FULLSCREEN 0
16
17#define TOTAL_SECTORS 2
18
25
31
33{
34public:
36 virtual ~Walkthrough3D();
37
38 void Resize(int width, int height);
39
40 virtual bool GameInitialize(Ult::RenderParams& params);
41 virtual void GameUpdate();
42 void GameRender();
43 virtual void GameShutdown();
44
45 virtual int EnterGameLoop() = 0;
46
47protected:
48
50
53
56
59
61
63
65
67
68 void ProcessMainMenu();
69 void ProcessGameLevel();
70 void RenderSector(int index);
71};
72
73#endif // WALKTHROUGH_H_INCLUDED
74
#define TOTAL_SECTORS
Definition Walkthrough.h:17
WALKTHROUGH_GAME_STATE
Definition Walkthrough.h:19
@ WT_GAME_MENU
Definition Walkthrough.h:21
@ WT_GAME_QUIT
Definition Walkthrough.h:23
@ WT_GAME_PLAY
Definition Walkthrough.h:22
@ WT_GAME_INITIALIZING
Definition Walkthrough.h:20
WALKTHROUGH_KEYS
Definition Walkthrough.h:26
@ WT_TOTAL_KEYS
Definition Walkthrough.h:29
@ WT_S_KEY
Definition Walkthrough.h:27
@ WT_ESC_KEY
Definition Walkthrough.h:28
Definition PortalSystem.h:69
Definition Camera.h:13
Definition Frustum.h:18
Definition ModelData.h:26
Definition OpenGLRenderer.h:23
virtual void GameShutdown()
Definition Walkthrough.cpp:225
bool mQuitDemo
Definition Walkthrough.h:66
Ult::Texture mMenuTexture
Definition Walkthrough.h:58
WALKTHROUGH_GAME_STATE mCurrentGameState
Definition Walkthrough.h:60
bool mButtonKeys[WT_TOTAL_KEYS]
Definition Walkthrough.h:62
int mWidth
Definition Walkthrough.h:64
void GameRender()
Definition Walkthrough.cpp:206
void RenderSector(int index)
Definition Walkthrough.cpp:275
void ProcessMainMenu()
Definition Walkthrough.cpp:230
Ult::ModelData mMenu
Definition Walkthrough.h:57
Ult::Camera mCamera
Definition Walkthrough.h:54
Walkthrough3D()
Definition Walkthrough.cpp:10
void Resize(int width, int height)
Definition Walkthrough.cpp:27
Ult::OpenGLRenderer mRender
Definition Walkthrough.h:49
Ult::Frustum mViewFrustum
Definition Walkthrough.h:55
virtual ~Walkthrough3D()
Definition Walkthrough.cpp:22
virtual void GameUpdate()
Definition Walkthrough.cpp:153
virtual bool GameInitialize(Ult::RenderParams &params)
Definition Walkthrough.cpp:34
bool mAreaFlags[TOTAL_SECTORS]
Definition Walkthrough.h:52
int mHeight
Definition Walkthrough.h:64
Sector mAreas[TOTAL_SECTORS]
Definition Walkthrough.h:51
void ProcessGameLevel()
Definition Walkthrough.cpp:243
virtual int EnterGameLoop()=0
Handle< stTexture > Texture
Definition Texture.h:10
Definition RenderParams.h:11