diff options
| author | esquizo <esquizo+noreply@esquizo.net> | 2026-05-03 20:52:32 -0300 |
|---|---|---|
| committer | esquizo <esquizo+noreply@esquizo.net> | 2026-05-03 20:52:32 -0300 |
| commit | e4a5b88262430a77bf0c9b47acdc8398ff06c899 (patch) | |
| tree | 8150028eba2c994da04afdf3ab87f00bb3830a72 /game.c | |
| parent | caefbf2e217e9a14ea62fa82caa796e924e52074 (diff) | |
posições de entidades
Diffstat (limited to 'game.c')
| -rw-r--r-- | game.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -33,13 +33,16 @@ entinit() { player = allocentity(); player->type = EPLAYER; + player->body.pos[0] = player_x; + player->body.pos[1] = player_x; player->body.size[0] = ENTITY_SIZE; player->body.size[1] = ENTITY_SIZE; - for(int i = 0; i < 10; i++) { + + for(int i = 0; i < ghostcount; i++) { Entity *e = allocentity(); e->type = EGHOST; - e->body.pos[0] = rand() % 800; - e->body.pos[1] = rand() % 600; + e->body.pos[0] = ghostpositions[i][0] * ENTITY_SIZE * 2; + e->body.pos[1] = ghostpositions[i][1] * ENTITY_SIZE * 2; e->body.size[0] = ENTITY_SIZE; e->body.size[1] = ENTITY_SIZE; } |
