Stop drawing the level upside down lol

This commit is contained in:
Bill Rossi 2025-03-08 13:38:45 -05:00
parent 778af82724
commit 0ec6d2ded8
2 changed files with 3 additions and 1 deletions

2
game.c
View File

@ -40,6 +40,8 @@ void initialize_game(Game *g) {
g->level = malloc(sizeof(Level)); g->level = malloc(sizeof(Level));
init_level(g, g->level, "levels/test_level.csv"); init_level(g, g->level, "levels/test_level.csv");
g->player->position.y = g->level->length * 32;
} }
void add_entity(Entities *entities, Entity *e) { void add_entity(Entities *entities, Entity *e) {

View File

@ -40,7 +40,7 @@ void draw_tile(Level *l, int x, int y) {
size_t index = x + (y * l->width); size_t index = x + (y * l->width);
size_t data = l->data[index] & 3; size_t data = l->data[index] & 3;
Color c = COLORS[data]; 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) { void draw_level(Level *l) {