return wrapped_text;
}
-int DrawWrappedText(int x, int y, struct WrappedTextInfo *wrapped_text, int start_pos)
+static int DrawWrappedTextExt(int x, int y, struct WrappedTextInfo *wrapped_text, int start_pos,
+ boolean init_only)
{
int current_line = 0;
int current_ypos = 0;
if (current_ypos + font_height > wrapped_text->max_height)
break;
- DrawTextBuffer_Flush(x, y, wrapped_text->line[i].text, font_nr, line_length,
- wrapped_text->cut_length, wrapped_text->mask_mode,
- wrapped_text->line[i].centered, current_ypos);
+ if (!init_only)
+ DrawTextBuffer_Flush(x, y, wrapped_text->line[i].text, font_nr, line_length,
+ wrapped_text->cut_length, wrapped_text->mask_mode,
+ wrapped_text->line[i].centered, current_ypos);
current_ypos += line_height;
current_line++;
return current_line;
}
+int InitWrappedText(int x, int y, struct WrappedTextInfo *wrapped_text, int start_pos)
+{
+ return DrawWrappedTextExt(x, y, wrapped_text, start_pos, TRUE);
+}
+
+int DrawWrappedText(int x, int y, struct WrappedTextInfo *wrapped_text, int start_pos)
+{
+ return DrawWrappedTextExt(x, y, wrapped_text, start_pos, FALSE);
+}
+
void FreeWrappedText(struct WrappedTextInfo *wrapped_text)
{
int i;
boolean, boolean, boolean);
struct WrappedTextInfo *GetWrappedTextFile(char *, int, int, int, int, int, int, int, int, int,
boolean, boolean, boolean);
+int InitWrappedText(int, int, struct WrappedTextInfo *, int);
int DrawWrappedText(int, int, struct WrappedTextInfo *, int);
void FreeWrappedText(struct WrappedTextInfo *);