| 445 | } |
| 446 | |
| 447 | void DrawHelp() |
| 448 | { |
| 449 | int i, c, w; |
| 450 | char col; |
| 451 | const char *s; |
| 452 | |
| 453 | DrawSTextHelp(); |
| 454 | DrawQTextBack(); |
| 455 | PrintSString(0, 2, TRUE, "Diablo Help", COL_GOLD, 0); |
| 456 | DrawSLine(5); |
| 457 | |
| 458 | s = gszHelpText; |
| 459 | |
| 460 | for (i = 0; i < help_select_line; i++) { |
| 461 | c = 0; |
| 462 | w = 0; |
| 463 | while (*s == '\0') { |
| 464 | s++; |
| 465 | } |
| 466 | if (*s == '$') { |
| 467 | s++; |
| 468 | } |
| 469 | if (*s == '&') { |
| 470 | continue; |
| 471 | } |
| 472 | while (*s != '|' && w < 577) { |
| 473 | while (*s == '\0') { |
| 474 | s++; |
| 475 | } |
| 476 | tempstr[c] = *s; |
| 477 | w += fontkern[fontframe[gbFontTransTbl[(BYTE)tempstr[c]]]] + 1; |
| 478 | c++; |
| 479 | s++; |
| 480 | } |
| 481 | if (w >= 577) { |
| 482 | c--; |
| 483 | while (tempstr[c] != ' ') { |
| 484 | s--; |
| 485 | c--; |
| 486 | } |
| 487 | } |
| 488 | if (*s == '|') { |
| 489 | s++; |
| 490 | } |
| 491 | } |
| 492 | for (i = 7; i < 22; i++) { |
| 493 | c = 0; |
| 494 | w = 0; |
| 495 | while (*s == '\0') { |
| 496 | s++; |
| 497 | } |
| 498 | if (*s == '$') { |
| 499 | s++; |
| 500 | col = COL_RED; |
| 501 | } else { |
| 502 | col = COL_WHITE; |
| 503 | } |
| 504 | if (*s == '&') { |
no test coverage detected