diff options
| author | esquizo <esquizo+noreply@esquizo.net> | 2026-06-03 19:24:29 -0300 |
|---|---|---|
| committer | esquizo <esquizo+noreply@esquizo.net> | 2026-06-03 19:24:29 -0300 |
| commit | 94bdded9102bc2e2b2e4bded8f180749efda1b72 (patch) | |
| tree | 1a1dac5472b2797980193ce1439a1ca24f47aabf /game.c | |
| parent | 022b9bd5f910629ecbf837b38b3cd761c2f703ea (diff) | |
game: adicionado entity teleporter
Diffstat (limited to 'game.c')
| -rw-r--r-- | game.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -63,6 +63,17 @@ entinit() e->life = 2; e->alive = true; } + + for(int i = 0; i < telessize; i++) { + Entity *e = allocentity(); + e->type = ETELEPORTER; + e->body.pos[0] = teles[i].x * ENTITY_SIZE * 2; + e->body.pos[1] = teles[i].y * ENTITY_SIZE * 2; + e->body.size[0] = ENTITY_SIZE; + e->body.size[1] = ENTITY_SIZE; + e->telex = floorf(teles[i].x); + e->teley = floorf(teles[i].y); + } } void |
