summaryrefslogtreecommitdiffhomepage
path: root/src/wall.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wall.c')
-rw-r--r--src/wall.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wall.c b/src/wall.c
index a815fb6..68642b1 100644
--- a/src/wall.c
+++ b/src/wall.c
@@ -16,7 +16,6 @@ init_wall(void)
logo_texture = rodeo_gfx_texture_2d_create_from_path(cstr_lit("assets/tojam2023_tagline_header_clear.png"));
uint16_t window_width = 1600;
uint16_t window_height = 900;
- collision_wall_world = rodeo_collision_2d_collection_create();
float walls[][4] = {
{0, -10, window_width, 10},
{0, window_height, window_width, 10},
@@ -33,12 +32,13 @@ init_wall(void)
{764,200,72,500},
{550,414,501,72}
};
- int numwalls = sizeof(walls)/sizeof(walls[0]);
+ int32_t numwalls = sizeof(walls)/sizeof(walls[0]);
+ collision_wall_world = rodeo_collision_2d_collection_create(numwalls + 4);
new_wall(0, -10, window_width, 10);
new_wall(0, window_height, window_width, 10);
new_wall(-10, 0, 10, window_height);
new_wall(window_width, 0, 10, window_height);
- for (int i = 0; i < numwalls; ++i) {
+ for (int32_t i = 0; i < numwalls; ++i) {
new_wall(walls[i][0], walls[i][1], walls[i][2], walls[i][3]);
}
}