Browse Source

Format help.cpp

pull/127/head
Anders Jenbo 7 years ago
parent
commit
83ccd8d6b6
  1. 42
      Source/help.cpp

42
Source/help.cpp

@ -96,20 +96,20 @@ void DrawHelp()
s = gszHelpText; s = gszHelpText;
for(i = 0; i < help_select_line; i++) { for (i = 0; i < help_select_line; i++) {
c = 0; c = 0;
w = 0; w = 0;
while(*s == '\0') { while (*s == '\0') {
s++; s++;
} }
if(*s == '$') { if (*s == '$') {
s++; s++;
} }
if(*s == '&') { if (*s == '&') {
continue; continue;
} }
while(*s != '|' && w < 577) { while (*s != '|' && w < 577) {
while(*s == '\0') { while (*s == '\0') {
s++; s++;
} }
tempstr[c] = *s; tempstr[c] = *s;
@ -117,35 +117,35 @@ void DrawHelp()
c++; c++;
s++; s++;
} }
if(w >= 577) { if (w >= 577) {
c--; c--;
while(tempstr[c] != ' ') { while (tempstr[c] != ' ') {
s--; s--;
c--; c--;
} }
} }
if(*s == '|') { if (*s == '|') {
s++; s++;
} }
} }
for(i = 7; i < 22; i++) { for (i = 7; i < 22; i++) {
c = 0; c = 0;
w = 0; w = 0;
while(*s == '\0') { while (*s == '\0') {
s++; s++;
} }
if(*s == '$') { if (*s == '$') {
s++; s++;
col = COL_RED; col = COL_RED;
} else { } else {
col = COL_WHITE; col = COL_WHITE;
} }
if(*s == '&') { if (*s == '&') {
HelpTop = help_select_line; HelpTop = help_select_line;
continue; continue;
} }
while(*s != '|' && w < 577) { while (*s != '|' && w < 577) {
while(*s == '\0') { while (*s == '\0') {
s++; s++;
} }
tempstr[c] = *s; tempstr[c] = *s;
@ -153,18 +153,18 @@ void DrawHelp()
c++; c++;
s++; s++;
} }
if(w >= 577) { if (w >= 577) {
c--; c--;
while(tempstr[c] != ' ') { while (tempstr[c] != ' ') {
s--; s--;
c--; c--;
} }
} }
if(c != 0) { if (c != 0) {
tempstr[c] = '\0'; tempstr[c] = '\0';
DrawHelpLine(0, i, tempstr, col); DrawHelpLine(0, i, tempstr, col);
} }
if(*s == '|') { if (*s == '|') {
s++; s++;
} }
} }
@ -206,14 +206,14 @@ void DisplayHelp()
void HelpScrollUp() void HelpScrollUp()
{ {
if (help_select_line > 0) if (help_select_line > 0)
--help_select_line; help_select_line--;
} }
// 634490: using guessed type int help_select_line; // 634490: using guessed type int help_select_line;
void HelpScrollDown() void HelpScrollDown()
{ {
if (help_select_line < HelpTop) if (help_select_line < HelpTop)
++help_select_line; help_select_line++;
} }
// 634490: using guessed type int help_select_line; // 634490: using guessed type int help_select_line;
// 634960: using guessed type int HelpTop; // 634960: using guessed type int HelpTop;

Loading…
Cancel
Save