fixed drawing initial header and item text to screen
[rocksndiamonds.git] / src / libgame / text.c
index c10583d3564ec2baea82324cb8cb9545627bad42..17475e8c721247b0d92a51532229275e6676e78b 100644 (file)
@@ -136,7 +136,7 @@ int maxWordLengthInRequestString(char *text)
 // simple text drawing functions
 // ============================================================================
 
-void DrawInitText(char *text, int ypos, int font_nr)
+static void DrawInitTextExt(char *text, int ypos, int font_nr, boolean update)
 {
   LimitScreenUpdates(TRUE);
 
@@ -155,10 +155,26 @@ void DrawInitText(char *text, int ypos, int font_nr)
     ClearRectangle(drawto, 0, y, width, height);
     DrawTextExt(drawto, x, y, text, font_nr, BLIT_OPAQUE);
 
-    BlitBitmap(drawto, window, 0, 0, video.width, video.height, 0, 0);
+    if (update)
+      BlitBitmap(drawto, window, 0, 0, video.width, video.height, 0, 0);
   }
 }
 
+void DrawInitText(char *text, int ypos, int font_nr)
+{
+  DrawInitTextExt(text, ypos, font_nr, FALSE);
+}
+
+void DrawInitTextHead(char *text)
+{
+  DrawInitTextExt(text, 120, FC_GREEN, FALSE);
+}
+
+void DrawInitTextItem(char *text)
+{
+  DrawInitTextExt(text, 150, FC_YELLOW, TRUE);
+}
+
 void DrawTextF(int x, int y, int font_nr, char *format, ...)
 {
   char buffer[MAX_OUTPUT_LINESIZE + 1];