Browse Source

Reorder help.cpp

pull/910/head
Anders Jenbo 5 years ago
parent
commit
e9ab91789f
  1. 40
      Source/help.cpp
  2. 8
      Source/help.h

40
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;

8
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__ */

Loading…
Cancel
Save