1
0
Fork 0
forked from NotAShelf/rogged

render: add player sprite. welcome to dude man

This commit is contained in:
A.M. Rowsell 2026-04-08 10:22:26 -04:00
commit 84dd0b5b7a
Signed by: amr
GPG key ID: E0879EDBDB0CA7B1
6 changed files with 8 additions and 5 deletions

View file

@ -29,9 +29,10 @@ void render_map(const Map *map) {
}
}
void render_player(const Player *p) {
Rectangle rect = {(float)(p->x * TILE_SIZE), (float)(p->y * TILE_SIZE), (float)TILE_SIZE, (float)TILE_SIZE};
DrawRectangleRec(rect, BLUE);
void render_player(const Player *p, Texture2D *ptile) {
// Rectangle rect = {(float)(p->x * TILE_SIZE), (float)(p->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});
}
void render_enemies(const Enemy *enemies, int count) {