forked from skeeto/pixelcity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Building.h
53 lines (45 loc) · 1.85 KB
/
Building.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
#ifndef ENTITY
#include "entity.h"
#endif
enum
{
BUILDING_SIMPLE,
BUILDING_BLOCKY,
BUILDING_MODERN,
BUILDING_TOWER
};
class CBuilding : public CEntity
{
private:
int _x;
int _y;
int _width;
int _depth;
int _height;
int _texture_type;
int _seed;
int _roof_tiers;
GLrgba _color;
GLrgba _trim_color;
class CMesh* _mesh;
class CMesh* _mesh_flat;
bool _have_lights;
bool _have_trim;
bool _have_logo;
void CreateSimple ();
void CreateBlocky ();
void CreateModern ();
void CreateTower ();
float ConstructWall (int start_x, int start_y, int start_z, int direction, int length, int height, int window_groups, float uv_start, bool blank_corners);
void ConstructSpike (int left, int right, int front, int back, int bottom, int top);
void ConstructCube (int left, int right, int front, int back, int bottom, int top);
void ConstructCube (float left, float right, float front, float back, float bottom, float top);
void ConstructRoof (float left, float right, float front, float back, float bottom);
public:
CBuilding (int type, int x, int y, int height, int width, int depth, int seed, GLrgba color);
~CBuilding ();
void Render (void);
int PolyCount ();
void RenderFlat (bool colored);
unsigned Texture ();
};