Stop drawing the level upside down lol
This commit is contained in:
parent
778af82724
commit
0ec6d2ded8
2
game.c
2
game.c
@ -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) {
|
||||||
|
2
level.c
2
level.c
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user