forked from NotAShelf/rogged
render: add player sprite. welcome to dude man
This commit is contained in:
parent
4178c540a6
commit
84dd0b5b7a
6 changed files with 8 additions and 5 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue