src/shop/shop_stock.c
The Game Ticket counter and every shop's stock. More…
Included by shop.c.
Functions
| Name | Description | |
|---|---|---|
void | mnShopGiveGameTicket (WINDOW *window, WINDOW *itemWindow) | Gives a Game Ticket once the party's spending in shops reaches the next ticket's cost, and lets the player choose who takes it. |
Sint32 | mnShopStockGetRowCount (void) | Returns how many stock rows there are; mnShopRun refuses a row past them. |
void | mnShopStockAddArtifacts (Sint32 stockRow) | Adds a shop's artifacts to the shared stock on its first visit, so an item two shops list can be bought twice. |
Sint32 | mnShopStockCopyItems (Sint32 stockRow, Sint16 *output) | Copies the shop's ordinary stock, up to 24 items, to output with a 0 after, and returns how many. |
Sint32 | mnShopStockGetType (Sint32 stockRow) | Returns the shop's type from the last column of its stock row (enum SHOP_TYPE). |
Description
The Game Ticket counter and every shop's stock. Part of shop.c.
Functions in detail
mnShopGiveGameTicket
void mnShopGiveGameTicket(WINDOW *window, WINDOW *itemWindow)
Gives a Game Ticket once the party's spending in shops reaches the next ticket's cost, and lets the player choose who takes it.
References gmInventoryAddItemStub(), gmInventoryCountStub(), gmInventoryRemoveStub(), gmPartyAdjustShopCreditStub(), gmPartyAdjustShopGiftsStub(), MainRoutineStateWork, mnCreatePartyFiguresStub(), mnCursorPlace(), mnGridMoveCursor(), mnMessageArgumentPushStub(), mnShopDrawCarriedItem(), mnShopDrawParty(), mnShopShowKeeperMessage(), mnShopShowKeeperMessageHidingCursor(), PerWork, ShopGameTicketCreditCosts, Sint32, sySoundPlayStub() and sySynch().
Referenced by mnShopSelectBuy().
Definition at line 5 of file shop_stock.c.
mnShopStockGetRowCount
Sint32 mnShopStockGetRowCount(void)
Returns how many stock rows there are; mnShopRun refuses a row past them.
References Sint32.
Referenced by mnShopRun().
Definition at line 94 of file shop_stock.c.
mnShopStockAddArtifacts
void mnShopStockAddArtifacts(Sint32 stockRow)
Adds a shop's artifacts to the shared stock on its first visit, so an item two shops list can be bought twice.
References gmItemAdjustRareItemStockStub(), ShopStockTable, Sint32, syGameFlagGet() and syGameFlagSet().
Referenced by mnShopRun().
Definition at line 101 of file shop_stock.c.
mnShopStockCopyItems
Sint32 mnShopStockCopyItems(Sint32 stockRow, Sint16 *output)
Copies the shop's ordinary stock, up to 24 items, to output with a 0 after,
and returns how many. Called by mnShopRun for Buy.
References ShopStockTable and Sint32.
Referenced by mnShopRun().
Definition at line 138 of file shop_stock.c.
mnShopStockGetType
Sint32 mnShopStockGetType(Sint32 stockRow)
Returns the shop's type from the last column of its stock row (enum
SHOP_TYPE).
References ShopStockTable and Sint32.
Referenced by mnShopRun().
Definition at line 167 of file shop_stock.c.