summaryrefslogtreecommitdiff
path: root/game.c
diff options
context:
space:
mode:
authoresquizo <esquizo+noreply@esquizo.net>2026-06-03 19:24:29 -0300
committeresquizo <esquizo+noreply@esquizo.net>2026-06-03 19:24:29 -0300
commit94bdded9102bc2e2b2e4bded8f180749efda1b72 (patch)
tree1a1dac5472b2797980193ce1439a1ca24f47aabf /game.c
parent022b9bd5f910629ecbf837b38b3cd761c2f703ea (diff)
game: adicionado entity teleporter
Diffstat (limited to 'game.c')
-rw-r--r--game.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/game.c b/game.c
index d305318..a7ab79d 100644
--- a/game.c
+++ b/game.c
@@ -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