-
Notifications
You must be signed in to change notification settings - Fork 1
/
world.h
97 lines (64 loc) · 1.66 KB
/
world.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef WORLD_H
#define WORLD_H
#include "wowmapview.h"
#include "maptile.h"
#include "wmo.h"
#include "frustum.h"
#include "sky.h"
#include <string>
#define MAPTILECACHESIZE 16
const float detail_size = 8.0f;
class World {
MapTile *maptilecache[MAPTILECACHESIZE];
MapTile *current[3][3];
int ex,ez;
public:
std::string basename;
bool maps[64][64];
GLuint lowrestiles[64][64];
bool autoheight;
std::vector<std::string> gwmos;
std::vector<WMOInstance> gwmois;
int gnWMO, nMaps;
float mapdrawdistance, modeldrawdistance, doodaddrawdistance, highresdistance;
float mapdrawdistance2, modeldrawdistance2, doodaddrawdistance2, highresdistance2;
float culldistance, culldistance2, fogdistance;
float l_const, l_linear, l_quadratic;
Skies *skies;
float time,animtime;
bool hadSky;
bool thirdperson,lighting,drawmodels,drawdoodads,drawterrain,drawwmo,loading,drawhighres,drawfog;
bool uselowlod;
GLuint detailtexcoords, alphatexcoords;
short *mapstrip,*mapstrip2;
TextureID water;
Vec3D camera, lookat;
Frustum frustum;
int cx,cz;
bool oob;
WMOManager wmomanager;
ModelManager modelmanager;
OutdoorLighting *ol;
OutdoorLightStats outdoorLightStats;
GLuint minimap;
World(const char* name);
~World();
void init();
void initMinimap();
void initDisplay();
void initWMOs();
void initLowresTerrain();
void enterTile(int x, int z);
MapTile *loadTile(int x, int z);
void tick(float dt);
void draw();
void outdoorLighting();
void outdoorLights(bool on);
void setupFog();
/// Get the tile on wich the camera currently is on
unsigned int getAreaID();
};
extern World *gWorld;
void lightingDefaults();
void myFakeLighting();
#endif