summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-03-04 12:20:09 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-03-04 12:20:09 +0300
commitf9cc5b35e228eec935b15eb7575ffb0ef826111f (patch)
treebe6a1124184f2cfaa9bab0059531f7a0b72151cb /src
parent80eb56304c48f273adca0e11042b8501ab9f5ccc (diff)
downloadtakethis-f9cc5b35e228eec935b15eb7575ffb0ef826111f.tar
takethis-f9cc5b35e228eec935b15eb7575ffb0ef826111f.tar.xz
takethis-f9cc5b35e228eec935b15eb7575ffb0ef826111f.zip
Fix.
Diffstat (limited to 'src')
-rw-r--r--src/game.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game.c b/src/game.c
index af99694..1b693a9 100644
--- a/src/game.c
+++ b/src/game.c
@@ -1197,24 +1197,24 @@ void changeroom(int out)
SDL_Color c = { 255, 255, 255, 255 };
SDL_Surface *s =
TTF_RenderText_Blended(ttfont, b->msg, c);
- SDL_Texture *t = SDL_CreateTextureFromSurface(ttrdr, s);
- SDL_Rect dst = { 50 + b->x + fullx + transx,
- 20 + b->y + fully + transy, s->w, s->h };
+ SDL_Texture *t = SDL_CreateTextureFromSurface(ttrdr, s);
+ SDL_Rect dst = { 50 + b->x + transx, 20 + b->y + transy,
+ s->w, s->h };
SDL_RenderCopy(ttrdr, t, 0, &dst);
SDL_DestroyTexture(t);
SDL_FreeSurface(s);
}
}
- r = ttplayer.room;
+ r = ttplayer.room->neighbours[out];
for (i = 0; i != r->bodies_count; ++i) {
tt_body *b = r->bodies + i;
if (b->msg) {
SDL_Color c = { 255, 255, 255, 255 };
SDL_Surface *s =
TTF_RenderText_Blended(ttfont, b->msg, c);
- SDL_Texture *t = SDL_CreateTextureFromSurface(ttrdr, s);
- SDL_Rect dst = { 50 + b->x + transx, 20 + b->y + transy,
- s->w, s->h };
+ SDL_Texture *t = SDL_CreateTextureFromSurface(ttrdr, s);
+ SDL_Rect dst = { 50 + b->x + fullx + transx,
+ 20 + b->y + fully + transy, s->w, s->h };
SDL_RenderCopy(ttrdr, t, 0, &dst);
SDL_DestroyTexture(t);
SDL_FreeSurface(s);