diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2021-03-02 14:52:14 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2021-03-02 14:52:14 +0300 |
commit | 8889468f6af3ad184acfc39e0beaff503b10e3c1 (patch) | |
tree | f96071472318cd61db8818d37bf3a5e62c19dd90 /src/map.c | |
parent | 31f5b4cb47f0ac3d2b1f94979725d48340b5c57b (diff) | |
download | takethis-8889468f6af3ad184acfc39e0beaff503b10e3c1.tar takethis-8889468f6af3ad184acfc39e0beaff503b10e3c1.tar.xz takethis-8889468f6af3ad184acfc39e0beaff503b10e3c1.zip |
The UI!
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 34 |
1 files changed, 33 insertions, 1 deletions
@@ -62,7 +62,7 @@ static void loadroom(tt_room *r, FILE *f) ttplayer.keys[1] = 0; ttplayer.lenin_pos = 32 * 9; ttplayer.lenin_pos_rem = 0; - ttplayer.zhiv_lenin = 0; + ttplayer.lenin_zhiv = 0; ttplayer.lenin_rem = 0; ttplayer.lenin_vel = -53; ttplayer.variant = 0; @@ -211,6 +211,38 @@ static void loadroom(tt_room *r, FILE *f) b->anim = 1; b->rate = 100; b->collision_act = 0; + } else if (type == 'k') { + r->floor[i][j] = newtile(0, default_floor_id); + r->bodies_count++; + r->bodies = realloc(r->bodies, + sizeof(tt_body) * r->bodies_count); + tt_body *b = r->bodies + r->bodies_count - 1; + b->x = j * 32; + b->y = i * 32; + b->xrem = 0; + b->yrem = 0; + b->rem = 0; + b->txrrow = 11; + b->txrcol = id; + b->anim = 1; + b->rate = 100; + b->collision_act = colact_key; + } else if (type == 'd') { + r->floor[i][j] = newtile(0, default_floor_id); + r->bodies_count++; + r->bodies = realloc(r->bodies, + sizeof(tt_body) * r->bodies_count); + tt_body *b = r->bodies + r->bodies_count - 1; + b->x = j * 32; + b->y = i * 32; + b->xrem = 0; + b->yrem = 0; + b->rem = 0; + b->txrrow = 4; + b->txrcol = id; + b->anim = 1; + b->rate = 100; + b->collision_act = colact_door; } else if (type == '$') { r->floor[i][j] = newtile(0, default_floor_id); r->bodies_count++; |