| 535 | } |
| 536 | |
| 537 | BOOL S_StartSPBuy() |
| 538 | { |
| 539 | int i; |
| 540 | |
| 541 | storenumh = 0; |
| 542 | for (i = 0; i < 6; i++) { |
| 543 | if (premiumitem[i]._itype != ITYPE_NONE) |
| 544 | storenumh++; |
| 545 | } |
| 546 | if (!storenumh) { |
| 547 | StartStore(STORE_SMITH); |
| 548 | stextsel = 14; |
| 549 | return FALSE; |
| 550 | } |
| 551 | |
| 552 | stextsize = 1; |
| 553 | stextscrl = TRUE; |
| 554 | stextsval = 0; |
| 555 | |
| 556 | sprintf(tempstr, "I have these premium items for sale : Your gold : %i", plr[myplr]._pGold); |
| 557 | AddSText(0, 1, 1, tempstr, COL_GOLD, 0); |
| 558 | AddSLine(3); |
| 559 | AddSLine(21); |
| 560 | AddSText(0, 22, 1, "Back", COL_WHITE, 0); |
| 561 | OffsetSTextY(22, 6); |
| 562 | |
| 563 | stextsmax = storenumh - 4; |
| 564 | if (stextsmax < 0) |
| 565 | stextsmax = 0; |
| 566 | |
| 567 | S_ScrollSPBuy(stextsval); |
| 568 | |
| 569 | return TRUE; |
| 570 | } |
| 571 | |
| 572 | BOOL SmithSellOk(int i) |
| 573 | { |
no test coverage detected