diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/map_collision.cpp | 2 | ||||
-rw-r--r-- | src/components/map_render.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/components/map_collision.cpp b/src/components/map_collision.cpp index f385320..9afa6f8 100644 --- a/src/components/map_collision.cpp +++ b/src/components/map_collision.cpp | |||
@@ -7,7 +7,7 @@ MapCollisionComponent::MapCollisionComponent(const Map& map) : map(map) | |||
7 | addCollision(-6, 0, GAME_WIDTH, Direction::left, (map.getLeftMap() == nullptr) ? Collision::Type::wrap : Collision::Type::teleport); | 7 | addCollision(-6, 0, GAME_WIDTH, Direction::left, (map.getLeftMap() == nullptr) ? Collision::Type::wrap : Collision::Type::teleport); |
8 | addCollision(GAME_WIDTH+6, 0, GAME_WIDTH, Direction::right, (map.getRightMap() == nullptr) ? Collision::Type::reverse : Collision::Type::teleport); | 8 | addCollision(GAME_WIDTH+6, 0, GAME_WIDTH, Direction::right, (map.getRightMap() == nullptr) ? Collision::Type::reverse : Collision::Type::teleport); |
9 | 9 | ||
10 | for (int i=0; i<MAP_WIDTH*(MAP_HEIGHT-1); i++) | 10 | for (int i=0; i<MAP_WIDTH*MAP_HEIGHT; i++) |
11 | { | 11 | { |
12 | int x = i % MAP_WIDTH; | 12 | int x = i % MAP_WIDTH; |
13 | int y = i / MAP_WIDTH; | 13 | int y = i / MAP_WIDTH; |
diff --git a/src/components/map_render.cpp b/src/components/map_render.cpp index d93afe6..6fdfcc3 100644 --- a/src/components/map_render.cpp +++ b/src/components/map_render.cpp | |||
@@ -8,7 +8,7 @@ MapRenderComponent::MapRenderComponent(const Map& map) : screen(GAME_WIDTH, GAME | |||
8 | 8 | ||
9 | Texture tiles("../res/tiles.png"); | 9 | Texture tiles("../res/tiles.png"); |
10 | 10 | ||
11 | for (int i=0; i<MAP_WIDTH*(MAP_HEIGHT-1); i++) | 11 | for (int i=0; i<MAP_WIDTH*MAP_HEIGHT; i++) |
12 | { | 12 | { |
13 | int tile = map.getMapdata()[i]; | 13 | int tile = map.getMapdata()[i]; |
14 | int x = i % MAP_WIDTH; | 14 | int x = i % MAP_WIDTH; |