From e9ab91789f5cd118453cec4d08fcf92db261557a Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 2 Nov 2020 20:06:42 +0100 Subject: [PATCH] Reorder help.cpp --- Source/help.cpp | 40 ++++++++++++++++++++-------------------- Source/help.h | 8 -------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/Source/help.cpp b/Source/help.cpp index ba01dff56..b7194e613 100644 --- a/Source/help.cpp +++ b/Source/help.cpp @@ -447,6 +447,26 @@ void InitHelp() displayinghelp[0] = 0; } +static void DrawHelpLine(int x, int y, char *text, char color) +{ + int off, width; + BYTE c; + + width = 0; + off = PitchTbl[SStringY[y] + 44 + SCREEN_Y] + x + 32 + PANEL_X; + while (*text) { + c = gbFontTransTbl[(BYTE)*text]; + text++; + c = fontframe[c]; + width += fontkern[c] + 1; + if (c) { + if (width <= 577) + PrintChar(off, c, color); + } + off += fontkern[c] + 1; + } +} + void DrawHelp() { int i, c, w; @@ -541,26 +561,6 @@ void DrawHelp() PrintSString(0, 23, TRUE, "Press ESC to end or the arrow keys to scroll.", COL_GOLD, 0); } -void DrawHelpLine(int x, int y, char *text, char color) -{ - int off, width; - BYTE c; - - width = 0; - off = PitchTbl[SStringY[y] + 44 + SCREEN_Y] + x + 32 + PANEL_X; - while (*text) { - c = gbFontTransTbl[(BYTE)*text]; - text++; - c = fontframe[c]; - width += fontkern[c] + 1; - if (c) { - if (width <= 577) - PrintChar(off, c, color); - } - off += fontkern[c] + 1; - } -} - void DisplayHelp() { help_select_line = 0; diff --git a/Source/help.h b/Source/help.h index 32175f9a6..e7a16583d 100644 --- a/Source/help.h +++ b/Source/help.h @@ -6,20 +6,12 @@ #ifndef __HELP_H__ #define __HELP_H__ -extern int help_select_line; -extern int dword_634494; extern BOOL helpflag; -extern int displayinghelp[22]; -extern int HelpTop; void InitHelp(); void DrawHelp(); -void DrawHelpLine(int x, int y, char *text, char color); void DisplayHelp(); void HelpScrollUp(); void HelpScrollDown(); -/* rdata */ -extern const char gszHelpText[]; - #endif /* __HELP_H__ */