-
Notifications
You must be signed in to change notification settings - Fork 6
/
MapSection.h
55 lines (47 loc) · 1.68 KB
/
MapSection.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
#pragma once
#include <vector>
#include "common.h"
#include "c_tile.h"
#include "TileSet.h"
#include "s_map_block.h"
#include "isoworldremote.pb.h"
class MapSection
{
s_map_block * block_array;
unsigned int board_width, board_height;
unsigned int num_tiles;
public:
int board_center_x;
int board_top_y;
vector<TileSet> tileset_list;
int current_tileset;
clock_t draw_time;
clock_t load_time;
clock_t tile_fetch_time;
bool set_size(int x, int y);
void clear_tiles(void);
void flood_fill(c_tile * tile, int height);
void pointToScreen(int *inx, int *iny);
void pointToSprite(float *inx, float *iny, int inz);
void load_heights(ALLEGRO_BITMAP * heightmap);
void load_water_level(ALLEGRO_BITMAP * watermap);
void load_colors(s_maplist * map_list);
void load_level(ALLEGRO_BITMAP * levelmap, int level);
void load_biome_tiles(s_maplist * maplist);
void load_structure_tiles(ALLEGRO_BITMAP * structuremap);
void generate_special_tile_borders(void);
void generate_noise(void);
void generate_ambient_lighting(void);
void draw(int inx, int iny);
void propogate_tiles(s_maplist * maplist);
void load_tilesets(const char * index_file);
void increment_tileset(void);
void make_tile(isoworldremote::EmbarkTile * input, isoworldremote::MapReply * region);
bool query_tile(isoworldremote::MapReply * reply, int local_x, int local_y);
void draw_debug_info(void);
int snap_height(int in);
double get_average_heights(int distance, int x, int y);
unsigned int coords_to_index(int x, int y);
MapSection(void);
~MapSection(void);
};