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

Function S_ScrollSPBuy

Source/stores.cpp:503–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503void S_ScrollSPBuy(int idx)
504{
505 int l, boughtitems;
506 char iclr;
507
508 ClearSText(5, 21);
509 boughtitems = idx;
510
511 stextup = 5;
512 for (idx = 0; boughtitems; idx++) {
513 if (premiumitem[idx]._itype != ITYPE_NONE)
514 boughtitems--;
515 }
516
517 for (l = 5; l < 20 && idx < 6; l += 4) {
518 if (premiumitem[idx]._itype != ITYPE_NONE) {
519 iclr = COL_WHITE;
520 if (premiumitem[idx]._iMagical)
521 iclr = COL_BLUE;
522 if (!premiumitem[idx]._iStatFlag)
523 iclr = COL_RED;
524 AddSText(20, l, 0, premiumitem[idx]._iIName, iclr, 1);
525 AddSTextVal(l, premiumitem[idx]._iIvalue);
526 PrintStoreItem(&premiumitem[idx], l + 1, iclr);
527 stextdown = l;
528 } else {
529 l -= 4;
530 }
531 idx++;
532 }
533 if (!stext[stextsel]._ssel && stextsel != 22)
534 stextsel = stextdown;
535}
536
537BOOL S_StartSPBuy()
538{

Callers 2

S_StartSPBuyFunction · 0.85
DrawSTextFunction · 0.85

Calls 4

ClearSTextFunction · 0.85
AddSTextFunction · 0.85
AddSTextValFunction · 0.85
PrintStoreItemFunction · 0.85

Tested by

no test coverage detected