forked from rtpHarry/Sokoban
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThemeModel.h
73 lines (60 loc) · 1.89 KB
/
ThemeModel.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
#pragma once
//////////////////////////////////////////////////////////////////////////
// This is a base class for all themes that use 3dmodels
//////////////////////////////////////////////////////////////////////////
// Theme
// - ThemeDefault
// - ThemeSimple
// - ThemeModel
// - ThemeDesert
// - ThemeEvilForest
#include "theme.h"
#include "Vector3.h"
#include "Model3D.h"
class ThemeModel
: public Theme
{
public:
ThemeModel(void);
virtual ~ThemeModel(void);
// abstract interface
virtual void SetupTheme(void);
virtual void DestroyTheme(void);
virtual void PreRender(void); // operations before rendered scene
virtual void PostRender(void); // operations after rendered scene
virtual void RenderTileFloor(float X, float Y); // Render the floor tile
virtual void RenderTileWall(float X, float Y); // Render the wall tile
virtual void RenderTileVoid(float X, float Y); // Render the void tile
virtual void RenderItemTarget(float X, float Y); // Render the target item
virtual void RenderItemCrate(float X, float Y); // Render the crate item
virtual void RenderItemPlayer(float X, float Y); // Render the player item
// Render the scenery
virtual void RenderSurroundingScene(float X, float Y, float Z, float fLevelWidth);
protected:
// models
Model3D m_FloorModel;
Model3D m_WallModel;
Model3D m_VoidModel;
Model3D m_PlayerModel;
Model3D m_CrateModel;
Model3D m_TargetModel;
Model3D m_SkyboxModel;
// display list ids
GLuint m_didDefaultTile;
// bools
bool bUseDefaultFloor;
bool bUseDefaultWall;
bool bUseDefaultVoid;
bool bUseDefaultPlayer;
bool bUseDefaultCrate;
bool bUseDefaultTarget;
bool bUseDefaultSkyBox;
// colors
CVector3 m_vFloorColor;
CVector3 m_vWallColor;
CVector3 m_vVoidColor;
CVector3 m_vPlayerColor;
CVector3 m_vCrateColor;
CVector3 m_vTargetColor;
// skybox color not needed
};