summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-03-01 14:35:11 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-03-01 14:35:11 +0300
commit3cd7f63de831f1e28776aeb0a1c10c52899d549f (patch)
tree306aba8aa9b955779372fd49bea780ffb389378e /src
parent116a0779b94f1240d6b977680150c66e7a08a794 (diff)
downloadtakethis-3cd7f63de831f1e28776aeb0a1c10c52899d549f.tar
takethis-3cd7f63de831f1e28776aeb0a1c10c52899d549f.tar.xz
takethis-3cd7f63de831f1e28776aeb0a1c10c52899d549f.zip
o_O
Diffstat (limited to 'src')
-rw-r--r--src/map.c40
1 files changed, 37 insertions, 3 deletions
diff --git a/src/map.c b/src/map.c
index d0575fb..9dd4759 100644
--- a/src/map.c
+++ b/src/map.c
@@ -90,7 +90,41 @@ static void loadroom(tt_room *r, FILE *f)
ttplayer.tobein_gulag = 0;
ttplayer.until_gulag = 5300;
r->floor[i][j] = newtile(0, default_floor_id);
- } else if (type == '#') {
+ } else if (type == 'y') {
+ r->walls[i][j] = malloc(sizeof(tt_body));
+ tt_body *b = r->walls[i][j];
+ b->x = j * 32;
+ b->y = i * 32;
+ b->xrem = 0;
+ b->yrem = 0;
+ b->xvel = 0;
+ b->yvel = 0;
+ b->rem = 0;
+ b->txrrow = 2;
+ b->txrcol = id;
+ b->anim = 1;
+ b->rate = 1;
+ b->collision_act = do_nothing;
+ b->msg = 0;
+ b->msglen = 0;
+ } else if (type == 'b') {
+ r->walls[i][j] = malloc(sizeof(tt_body));
+ tt_body *b = r->walls[i][j];
+ b->x = j * 32;
+ b->y = i * 32;
+ b->xrem = 0;
+ b->yrem = 0;
+ b->xvel = 0;
+ b->yvel = 0;
+ b->rem = 0;
+ b->txrrow = 3;
+ b->txrcol = id;
+ b->anim = 1;
+ b->rate = 1;
+ b->collision_act = do_nothing;
+ b->msg = 0;
+ b->msglen = 0;
+ } else if (type == 'r') {
r->walls[i][j] = malloc(sizeof(tt_body));
tt_body *b = r->walls[i][j];
b->x = j * 32;
@@ -107,7 +141,7 @@ static void loadroom(tt_room *r, FILE *f)
b->collision_act = do_nothing;
b->msg = 0;
b->msglen = 0;
- } else if (type == 'M') {
+ } else if (type == 'g') {
r->floor[i][j] = newtile(0, default_floor_id);
r->bodies_count++;
r->bodies = realloc(r->bodies,
@@ -145,7 +179,7 @@ static void loadroom(tt_room *r, FILE *f)
b->collision_act = do_nothing;
b->msg = 0;
b->msglen = 0;
- } else if (type == '&') {
+ } else if (type == ';') {
r->floor[i][j] = newtile(0, default_floor_id);
r->walls[i][j] = malloc(sizeof(tt_body));
tt_body *b = r->walls[i][j];