X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Feditor.c;h=e7d703496190a21ce327829015cf2e7418bac395;hp=2a26c09f67222d1d7c26b2351796f4aaba71ba41;hb=b645a25fff77d62a36c744fa4047a3c0e5929341;hpb=5fe60f460c869b600fe5c223aa7374b55450a949 diff --git a/src/editor.c b/src/editor.c index 2a26c09f..e7d70349 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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];