MCPcopy Create free account
hub / github.com/diasurgical/devilution / DrawHelp

Function DrawHelp

Source/help.cpp:447–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445}
446
447void 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 == '&') {

Callers 1

DrawViewFunction · 0.85

Calls 5

DrawSTextHelpFunction · 0.85
DrawQTextBackFunction · 0.85
PrintSStringFunction · 0.85
DrawSLineFunction · 0.85
DrawHelpLineFunction · 0.85

Tested by

no test coverage detected