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

Function S_BBuyEnter

Source/stores.cpp:2349–2377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2347}
2348
2349void S_BBuyEnter()
2350{
2351 BOOL done;
2352 int i;
2353
2354 if (stextsel == 10) {
2355 stextshold = STORE_BBOY;
2356 stextvhold = stextsval;
2357 stextlhold = 10;
2358 if (plr[myplr]._pGold < boyitem._iIvalue + (boyitem._iIvalue >> 1)) {
2359 StartStore(STORE_NOMONEY);
2360 } else {
2361 plr[myplr].HoldItem = boyitem;
2362 plr[myplr].HoldItem._iIvalue += plr[myplr].HoldItem._iIvalue >> 1;
2363 SetCursor_(plr[myplr].HoldItem._iCurs + CURSOR_FIRSTITEM);
2364 done = FALSE;
2365 for (i = 0; i < 40 && !done; i++) {
2366 done = AutoPlace(myplr, i, cursW / 28, cursH / 28, FALSE);
2367 }
2368 if (done)
2369 StartStore(STORE_CONFIRM);
2370 else
2371 StartStore(STORE_NOROOM);
2372 SetCursor_(CURSOR_HAND);
2373 }
2374 } else {
2375 stextflag = STORE_NONE;
2376 }
2377}
2378
2379void StoryIdItem()
2380{

Callers 1

STextEnterFunction · 0.85

Calls 3

StartStoreFunction · 0.85
SetCursor_Function · 0.85
AutoPlaceFunction · 0.85

Tested by

no test coverage detected