summaryrefslogtreecommitdiff
path: root/game.c
diff options
context:
space:
mode:
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