projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20081007-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
text.c
diff --git
a/src/libgame/text.c
b/src/libgame/text.c
index d5d67cda8bbc95cb76af0256851912018ca2456a..f0cdb01adaecedd75fb3325b440ba40dd840b1dd 100644
(file)
--- a/
src/libgame/text.c
+++ b/
src/libgame/text.c
@@
-192,9
+192,18
@@
void getFontCharSource(int font_nr, char c, Bitmap **bitmap, int *x, int *y)
/* simple text drawing functions */
/* ========================================================================= */
/* simple text drawing functions */
/* ========================================================================= */
-void DrawInitText
(char *text, int ypos, int font_nr
)
+void DrawInitText
Ext(char *text, int ypos, int font_nr, boolean force
)
{
{
+ static unsigned long progress_delay = 0;
+ unsigned long progress_delay_value = 100; /* (in milliseconds) */
+
+ UPDATE_BUSY_STATE();
+
+ if (!force && !DelayReached(&progress_delay, progress_delay_value))
+ return;
+
if (window != NULL &&
if (window != NULL &&
+ gfx.draw_init_text &&
gfx.num_fonts > 0 &&
gfx.font_bitmap_info[font_nr].bitmap != NULL)
{
gfx.num_fonts > 0 &&
gfx.font_bitmap_info[font_nr].bitmap != NULL)
{
@@
-211,6
+220,16
@@
void DrawInitText(char *text, int ypos, int font_nr)
}
}
}
}
+void DrawInitText(char *text, int ypos, int font_nr)
+{
+ DrawInitTextExt(text, ypos, font_nr, TRUE);
+}
+
+void DrawInitTextIfNeeded(char *text, int ypos, int font_nr)
+{
+ DrawInitTextExt(text, ypos, font_nr, FALSE);
+}
+
void DrawTextF(int x, int y, int font_nr, char *format, ...)
{
char buffer[MAX_OUTPUT_LINESIZE + 1];
void DrawTextF(int x, int y, int font_nr, char *format, ...)
{
char buffer[MAX_OUTPUT_LINESIZE + 1];