summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c
index c82a20a..9b19872 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -1082,6 +1082,8 @@ int drawtextwrap(pixel *vid, int x, int y, int w, const char *s, int r, int g, i
rw = 0;
y+=FONT_H+2;
rh+=FONT_H+2;
+ if (*s==' ')
+ continue;
}
x = drawchar(vid, x, y, *(unsigned char *)s, r, g, b, a);
}
@@ -1194,6 +1196,8 @@ void textnpos(char *s, int n, int w, int *cx, int *cy)
{
x = 0;
y += FONT_H+2;
+ if (*s==' ')
+ continue;
}
n--;
}
@@ -1236,6 +1240,8 @@ int textposxy(char *s, int width, int w, int h)
if (x>=width) {
x = 0;
y += FONT_H+2;
+ if (*s==' ')
+ continue;
}
n++;
}
@@ -1274,6 +1280,8 @@ int textwrapheight(char *s, int width)
{
x = 0;
height += FONT_H+2;
+ if (*s==' ')
+ continue;
}
x += cw;
}