summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-07-12 17:48:41 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-07-12 17:48:41 +0200
commita132188ccc244a6d802bd1c32fbf196d4cb53cbd (patch)
treebd54e576ea8164d3efc801d9c56420218a74e591 /src/battle/struct/btl_map.erl
parentb853df7a1c3efef6b84b90fe8c492611564f8b53 (diff)
Got it to load the map (full of "error" tiles).
Diffstat (limited to 'src/battle/struct/btl_map.erl')
-rw-r--r--src/battle/struct/btl_map.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/battle/struct/btl_map.erl b/src/battle/struct/btl_map.erl
index ef34833..83cf455 100644
--- a/src/battle/struct/btl_map.erl
+++ b/src/battle/struct/btl_map.erl
@@ -64,21 +64,21 @@ location_to_array_index (ArrayWidth, {X, Y}) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Accessors
-spec get_id (type()) -> id().
-get_id (Battlemap) -> Battlemap#map.id.
+get_id (Map) -> Map#map.id.
-spec get_width (type()) -> integer().
-get_width (Battlemap) -> Battlemap#map.width.
+get_width (Map) -> Map#map.width.
-spec get_height (type()) -> integer().
-get_height (Battlemap) -> Battlemap#map.height.
+get_height (Map) -> Map#map.height.
-spec get_tile_class_ids (type()) -> array:array(btl_tile:class_id()).
-get_tile_class_ids (Battlemap) -> Battlemap#map.tile_class_ids.
+get_tile_class_ids (Map) -> Map#map.tile_class_ids.
-spec get_tile_class_id (btl_location:type(), type()) -> btl_tile:class_id().
-get_tile_class_id (Location, Battlemap) ->
- TileIX = location_to_array_index(Battlemap#map.width, Location),
- array:get(TileIX, Battlemap#map.tile_class_ids).
+get_tile_class_id (Location, Map) ->
+ TileIX = location_to_array_index(Map#map.width, Location),
+ array:get(TileIX, Map#map.tile_class_ids).
-spec from_list
(