summaryrefslogtreecommitdiff
path: root/src/map/map.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-02-18 19:20:35 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-02-20 18:27:30 -0800
commit25823b36905a84d92f9299ba7f9f0c713141c8fb (patch)
treea335120de1c4618c9b41391e70bc621a4218010c /src/map/map.hpp
parenta5d231b6a60a4ab868918850be24640e88843825 (diff)
downloadtmwa-25823b36905a84d92f9299ba7f9f0c713141c8fb.tar.gz
tmwa-25823b36905a84d92f9299ba7f9f0c713141c8fb.tar.bz2
tmwa-25823b36905a84d92f9299ba7f9f0c713141c8fb.tar.xz
tmwa-25823b36905a84d92f9299ba7f9f0c713141c8fb.zip
Strictify map cells
Also fix a small but major bug in map_randfreecell.
Diffstat (limited to 'src/map/map.hpp')
-rw-r--r--src/map/map.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/map.hpp b/src/map/map.hpp
index 72ded63..29680a6 100644
--- a/src/map/map.hpp
+++ b/src/map/map.hpp
@@ -398,7 +398,8 @@ struct map_data
{
char name[24];
char alias[24]; // [MouseJstr]
- unsigned char *gat; // NULLなら下のmap_data_other_serverとして扱う
+ // if NULL, actually a map_data_other_server
+ std::unique_ptr<MapCell[]> gat;
struct block_list **block;
struct block_list **block_mob;
int *block_count, *block_mob_count;
@@ -455,12 +456,12 @@ extern struct map_data map[];
extern int map_num;
inline
-uint8_t read_gatp(struct map_data *m, int x, int y)
+MapCell read_gatp(struct map_data *m, int x, int y)
{
return m->gat[x + y * m->xs];
}
inline
-uint8_t read_gat(int m, int x, int y)
+MapCell read_gat(int m, int x, int y)
{
return read_gatp(&map[m], x, y);
}
@@ -584,8 +585,8 @@ struct map_session_data *map_get_prev_session(
struct map_session_data *current);
// gat関連
-int map_getcell(int, int, int);
-int map_setcell(int, int, int, int);
+MapCell map_getcell(int, int, int);
+void map_setcell(int, int, int, MapCell);
// その他
bool map_check_dir(DIR s_dir, DIR t_dir);