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

Function S_ScrollSSell

Source/stores.cpp:590–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

588}
589
590void S_ScrollSSell(int idx)
591{
592 int l;
593 char iclr;
594
595 ClearSText(5, 21);
596 stextup = 5;
597
598 for (l = 5; l < 20; l += 4) {
599 if (idx >= storenumh)
600 break;
601 if (storehold[idx]._itype != ITYPE_NONE) {
602 iclr = COL_WHITE;
603 if (storehold[idx]._iMagical) {
604 iclr = COL_BLUE;
605 }
606
607 if (!storehold[idx]._iStatFlag) {
608 iclr = COL_RED;
609 }
610
611 if (storehold[idx]._iMagical && storehold[idx]._iIdentified) {
612 AddSText(20, l, 0, storehold[idx]._iIName, iclr, 1);
613 AddSTextVal(l, storehold[idx]._iIvalue);
614 } else {
615 AddSText(20, l, 0, storehold[idx]._iName, iclr, 1);
616 AddSTextVal(l, storehold[idx]._ivalue);
617 }
618
619 PrintStoreItem(&storehold[idx], l + 1, iclr);
620 stextdown = l;
621 }
622 idx++;
623 }
624
625 stextsmax = storenumh - 4;
626 if (stextsmax < 0)
627 stextsmax = 0;
628}
629
630void S_StartSSell()
631{

Callers 6

S_StartSSellFunction · 0.85
S_StartSRepairFunction · 0.85
S_StartWSellFunction · 0.85
S_StartWRechargeFunction · 0.85
S_StartSIdentifyFunction · 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