summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/.game.c.swpbin0 -> 16384 bytes
-rw-r--r--src/game.c51
2 files changed, 29 insertions, 22 deletions
diff --git a/src/.game.c.swp b/src/.game.c.swp
new file mode 100644
index 0000000..8016c6d
--- /dev/null
+++ b/src/.game.c.swp
Binary files differ
diff --git a/src/game.c b/src/game.c
index 0b9edc0..e5daeee 100644
--- a/src/game.c
+++ b/src/game.c
@@ -903,17 +903,6 @@ void changeroom(int out)
SDL_Rect d = { 14 + b->x + fullx + transx,
14 + b->y + fully + transy, 32, 32 };
SDL_RenderCopy(ttrdr, tttxr, &s, &d);
- 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 + fullx + transx,
- 20 + b->y + fully + transy, s->w, s->h };
- SDL_RenderCopy(ttrdr, t, 0, &dst);
- SDL_DestroyTexture(t);
- SDL_FreeSurface(s);
- }
}
}
{
@@ -945,17 +934,6 @@ void changeroom(int out)
SDL_Rect d = { 14 + b->x + transx, 14 + b->y + transy, 32,
32 };
SDL_RenderCopy(ttrdr, tttxr, &s, &d);
- 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_RenderCopy(ttrdr, t, 0, &dst);
- SDL_DestroyTexture(t);
- SDL_FreeSurface(s);
- }
}
SDL_Rect d = { 14 + ttplayer.x + transx + playx,
@@ -1212,6 +1190,35 @@ void changeroom(int out)
SDL_SetTextureBlendMode(tttxr, bm);
SDL_SetRenderDrawColor(ttrdr, 0, 0, 0, 255);
}
+ 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 + fullx + transx,
+ 20 + b->y + fully + transy, s->w, s->h };
+ SDL_RenderCopy(ttrdr, t, 0, &dst);
+ SDL_DestroyTexture(t);
+ SDL_FreeSurface(s);
+ }
+ }
+ r = ttplayer.room;
+ 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_RenderCopy(ttrdr, t, 0, &dst);
+ SDL_DestroyTexture(t);
+ SDL_FreeSurface(s);
+ }
+ }
}
{
SDL_Rect d = { 0, 0, 14, 540 };