-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChunk.h
39 lines (31 loc) · 884 Bytes
/
Chunk.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
#ifndef CHUNK_H
#define CHUNK_H
#include <unordered_map>
#include <string>
#include <assert.h>
#include <stdlib.h>
#include <algorithm>
#include <memory>
#include "Defines.h"
#include "Tile.h"
#include "PerlinNoise.h"
#include "TypeTile.h"
#include "SimplexNoise.h"
#include "GroundItemStack.h"
#include "TypeMaterial.h"
class Chunk
{
public:
Chunk(glm::ivec2 coord, std::vector<std::shared_ptr<TypeTile> >, std::vector<std::shared_ptr<TypeItem> >);
~Chunk(void);
std::shared_ptr<Tile> getTile(glm::ivec2);
std::vector<std::shared_ptr<GroundItemStack> > getGroundItemStacks(void);
void addGroundItem(std::shared_ptr<GroundItemStack>);
void removeGroundItem(int, glm::vec2, int);
glm::ivec2 getCoord(void);
private:
std::shared_ptr<Tile> tiles[TileAmount][TileAmount];
std::vector<std::shared_ptr<GroundItemStack> > groundItemStacks;
glm::ivec2 coord;
};
#endif