rnd-20031202-1-src
[rocksndiamonds.git] / src / editor.c
index 2a26c09f67222d1d7c26b2351796f4aaba71ba41..e7d703496190a21ce327829015cf2e7418bac395 100644 (file)
@@ -5547,6 +5547,26 @@ static boolean PrintInfoText(char *text, int font_nr, int start_line)
   return TRUE;
 }
 
+#if 1
+
+static int PrintElementDescriptionFromFile(char *filename, int start_line)
+{
+  int font_nr = FONT_TEXT_2;
+  int font_width = getFontWidth(font_nr);
+  int font_height = getFontHeight(font_nr);
+  int pad_x = ED_SETTINGS_XPOS(0);
+  int pad_y = ED_SETTINGS_YPOS(0) + ED_BORDER_SIZE;
+  int sx = SX + pad_x;
+  int sy = SY + pad_y + start_line * font_height;
+  int max_chars_per_line = (SXSIZE - 2 * pad_x) / font_width;
+  int max_lines_per_screen = (SYSIZE - pad_y) / font_height - 1;
+
+  return DrawTextFromFile(sx, sy, filename, font_nr, max_chars_per_line,
+                         max_lines_per_screen);
+}
+
+#else
+
 static int PrintElementDescriptionFromFile(char *filename, int start_line)
 {
   int font_nr = FONT_TEXT_2;
@@ -5634,6 +5654,8 @@ static int PrintElementDescriptionFromFile(char *filename, int start_line)
   return (current_line - start_line);
 }
 
+#endif
+
 static void DrawPropertiesTabulatorGadgets()
 {
   struct GadgetInfo *gd_gi = level_editor_gadget[GADGET_ID_PROPERTIES_INFO];