forked from NotAShelf/rogged
render: updated player display code to use new position field
This commit is contained in:
parent
0b3608b18c
commit
d757dfd90f
1 changed files with 5 additions and 4 deletions
|
|
@ -30,11 +30,12 @@ void render_map(const Map *map) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void render_player(const Player *p, Texture2D *ptile) {
|
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,
|
// Rectangle rect = {(float)(p->position.x * TILE_SIZE), (float)(p->position.y * TILE_SIZE), (float)TILE_SIZE,
|
||||||
// (float)TILE_SIZE};
|
// (float)TILE_SIZE};
|
||||||
//DrawRectangleRec(rect, BLUE);
|
// 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) {
|
void render_enemies(const Enemy *enemies, int count) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue