| 2474 | } |
| 2475 | |
| 2476 | void S_HBuyEnter() |
| 2477 | { |
| 2478 | int i, idx; |
| 2479 | BOOL done; |
| 2480 | |
| 2481 | if (stextsel == 22) { |
| 2482 | StartStore(STORE_HEALER); |
| 2483 | stextsel = 16; |
| 2484 | } else { |
| 2485 | stextlhold = stextsel; |
| 2486 | stextvhold = stextsval; |
| 2487 | stextshold = STORE_HBUY; |
| 2488 | idx = stextsval + ((stextsel - stextup) >> 2); |
| 2489 | if (plr[myplr]._pGold < healitem[idx]._iIvalue) { |
| 2490 | StartStore(STORE_NOMONEY); |
| 2491 | } else { |
| 2492 | plr[myplr].HoldItem = healitem[idx]; |
| 2493 | SetCursor_(plr[myplr].HoldItem._iCurs + CURSOR_FIRSTITEM); |
| 2494 | done = FALSE; |
| 2495 | i = 0; |
| 2496 | for (i = 0; i < 40 && !done; i++) { |
| 2497 | done = SpecialAutoPlace(myplr, i, cursW / 28, cursH / 28, FALSE); |
| 2498 | } |
| 2499 | if (done) |
| 2500 | StartStore(STORE_CONFIRM); |
| 2501 | else |
| 2502 | StartStore(STORE_NOROOM); |
| 2503 | SetCursor_(CURSOR_HAND); |
| 2504 | } |
| 2505 | } |
| 2506 | } |
| 2507 | |
| 2508 | void S_StoryEnter() |
| 2509 | { |
no test coverage detected