-
Notifications
You must be signed in to change notification settings - Fork 6
/
TileSet.h
45 lines (35 loc) · 887 Bytes
/
TileSet.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
#pragma once
#include "common.h"
#include <vector>
#include "c_tile.h"
#include "s_map_block.h"
class DetailedTile;
enum DetailDrawMode {
NORMAL,
MAX_ELEVATION,
CURRENT_ELEVATION,
};
class TileSet
{
public:
TileSet(void);
~TileSet(void);
void load_ini(ALLEGRO_PATH * _path);
void load_palette(ALLEGRO_BITMAP *);
c_tile * get_tile(s_map_block block);
c_tile * get_structure_tile(s_map_block block);
DetailedMap * rendered_map;
vector<vector<ALLEGRO_COLOR>> palette;
ALLEGRO_COLOR get_palette_color(int x, int y);
vector<c_tile> tile_set;
c_tile grid_tile;
int tile_width;
int tile_height;
int snap_height;
//variables controlling how the detailed tiles are drawn.
std::string tileset_folder;
DetailDrawMode draw_mode;
int elevation_palette;
int water_depth_palette;
bool draw_water;
};