summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-07-12 16:50:35 +0200 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-07-12 16:50:35 +0200 |
commit | 73bea4600f5bb3ad748d9bfa65ef6cd14e6bbd55 (patch) | |
tree | 14c6448e2fc0ff8714c51caaed273ffeb6bd5b59 /src/map/reply/map_set_map.erl | |
parent | b6e8cc8606b288970d7cdf577c6dd36950adac91 (diff) |
Starting work on the Map handler...
Diffstat (limited to 'src/map/reply/map_set_map.erl')
-rw-r--r-- | src/map/reply/map_set_map.erl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/map/reply/map_set_map.erl b/src/map/reply/map_set_map.erl new file mode 100644 index 0000000..37c6331 --- /dev/null +++ b/src/map/reply/map_set_map.erl @@ -0,0 +1,31 @@ +-module(btl_set_map). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-export([generate/1]). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-spec generate (btl_battlemap:type()) -> {list(any())}. +generate (Battlemap) -> + { + [ + {<<"msg">>, <<"set_map">>}, + {<<"w">>, btl_battlemap:get_width(Battlemap)}, + {<<"h">>, btl_battlemap:get_height(Battlemap)}, + { + <<"t">>, + array:sparse_to_list(btl_battlemap:get_tile_class_ids(Battlemap)) + } + ] + }. |