-
Notifications
You must be signed in to change notification settings - Fork 0
/
TerrainManager.h
44 lines (35 loc) · 937 Bytes
/
TerrainManager.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
#pragma once
#include "stdafx.h"
#include "TerrainGen.h"
#include "Actor.h"
//#include "glext.h"
class TerrainManager
{
public:
struct TerrainList
{
TerrainList *next;
TerrainGen *world;
GLuint list;
Vector2 locationID;
};
TerrainList *root;
//TerrainGen *world;
GLuint * testTex; //Array for holding OpenGL textures
tile getTileData(int x, int z);
double getHeight(int x, int z);
int getType(int x, int z);
double getSpecificHeight(double x, double z);
void drawTerrain();
void setMovePath(Actor *a, Vector3 &targetLocation);
TerrainManager(void);
~TerrainManager(void);
private:
int seed;
void writeTerrainToFile(TerrainGen *t, Vector2 location);
void initTerrainVBO(TerrainList *world);
void newChunk(int x, int z);
void drawTerrainChunk(GLuint list, TerrainGen * world, Vector2 &location);
void addToList(TerrainGen *w, Vector2 &location);
void deleteFromList(Vector2 &locationID);
};