1
0
Fork 0
forked from NotAShelf/rogged

render: updated player display code to use new position field

This commit is contained in:
A.M. Rowsell 2026-04-09 17:06:39 -04:00
commit d757dfd90f
Signed by: amr
GPG key ID: E0879EDBDB0CA7B1

View file

@ -30,11 +30,12 @@ void render_map(const Map *map) {
}
void render_player(const Player *p, Texture2D *ptile) {
//Rectangle rect = {(float)(p->position.x * TILE_SIZE), (float)(p->position.y * TILE_SIZE), (float)TILE_SIZE,
// (float)TILE_SIZE};
//DrawRectangleRec(rect, BLUE);
// Rectangle rect = {(float)(p->position.x * TILE_SIZE), (float)(p->position.y * TILE_SIZE), (float)TILE_SIZE,
// (float)TILE_SIZE};
// DrawRectangleRec(rect, BLUE);
DrawTexture(*ptile, (float)(p->x * TILE_SIZE), (float)(p->y * TILE_SIZE), (Color){255, 255, 255, 255});
DrawTexture(*ptile, (float)(p->position.x * TILE_SIZE), (float)(p->position.y * TILE_SIZE),
(Color){255, 255, 255, 255});
}
void render_enemies(const Enemy *enemies, int count) {