diff options
Diffstat (limited to 'src/systems/mapping.cpp')
-rw-r--r-- | src/systems/mapping.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/systems/mapping.cpp b/src/systems/mapping.cpp index 120a27a..05167c1 100644 --- a/src/systems/mapping.cpp +++ b/src/systems/mapping.cpp | |||
@@ -93,6 +93,34 @@ void MappingSystem::loadMap(size_t mapId) | |||
93 | 93 | ||
94 | const Map& map = game_.getWorld().getMap(mappable.getMapId()); | 94 | const Map& map = game_.getWorld().getMap(mappable.getMapId()); |
95 | 95 | ||
96 | addBoundary( | ||
97 | mappable.getLeftBoundaries(), | ||
98 | -WALL_GAP, | ||
99 | 0, | ||
100 | MAP_HEIGHT * TILE_HEIGHT, | ||
101 | MappableComponent::Boundary::Type::adjacency); | ||
102 | |||
103 | addBoundary( | ||
104 | mappable.getRightBoundaries(), | ||
105 | GAME_WIDTH + WALL_GAP, | ||
106 | 0, | ||
107 | MAP_HEIGHT * TILE_HEIGHT, | ||
108 | MappableComponent::Boundary::Type::adjacency); | ||
109 | |||
110 | addBoundary( | ||
111 | mappable.getUpBoundaries(), | ||
112 | -WALL_GAP, | ||
113 | 0, | ||
114 | GAME_WIDTH, | ||
115 | MappableComponent::Boundary::Type::adjacency); | ||
116 | |||
117 | addBoundary( | ||
118 | mappable.getDownBoundaries(), | ||
119 | MAP_HEIGHT * TILE_HEIGHT + WALL_GAP, | ||
120 | 0, | ||
121 | GAME_WIDTH, | ||
122 | MappableComponent::Boundary::Type::adjacency); | ||
123 | |||
96 | for (size_t i = 0; i < MAP_WIDTH * MAP_HEIGHT; i++) | 124 | for (size_t i = 0; i < MAP_WIDTH * MAP_HEIGHT; i++) |
97 | { | 125 | { |
98 | size_t x = i % MAP_WIDTH; | 126 | size_t x = i % MAP_WIDTH; |