From 0ec6d2ded86af44121fd469094124fcc8bd319c4 Mon Sep 17 00:00:00 2001 From: Bill Rossi Date: Sat, 8 Mar 2025 13:38:45 -0500 Subject: [PATCH] Stop drawing the level upside down lol --- game.c | 2 ++ level.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/game.c b/game.c index 2cd02eb..5ac998e 100644 --- a/game.c +++ b/game.c @@ -40,6 +40,8 @@ void initialize_game(Game *g) { g->level = malloc(sizeof(Level)); init_level(g, g->level, "levels/test_level.csv"); + + g->player->position.y = g->level->length * 32; } void add_entity(Entities *entities, Entity *e) { diff --git a/level.c b/level.c index 20df4fe..7b8410d 100644 --- a/level.c +++ b/level.c @@ -40,7 +40,7 @@ void draw_tile(Level *l, int x, int y) { size_t index = x + (y * l->width); size_t data = l->data[index] & 3; Color c = COLORS[data]; - DrawRectangle(x * 32, -y * 32, 32, 32, c); + DrawRectangle(x * 32, y * 32, 32, 32, c); } void draw_level(Level *l) {