Skip to Content
The Alchemy Project

src/shop/shop_stock.c

The Game Ticket counter, the gift items and every shop's stock. More…

Included by shop.c.

Functions

NameDescription
voidmnShopGiveGameTicket (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.
Sint32mnShopStockGetRowCount (void)Returns how many stock rows there are; mnShopRun refuses a row past them.
voidmnShopStockAddArtifacts (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.
Sint32mnShopStockCopyItems (Sint32 stockRow, Sint16 *output)Copies the shop's ordinary stock, up to 24 items, to output with a 0 after, and returns how many.
Sint32mnShopStockGetType (Sint32 stockRow)Returns the shop's type from the last column of its stock row (enum SHOP_TYPE).

Description

The Game Ticket counter, the gift items 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, mnCursorPlace(), mnMessageArgumentPushStub(), mnShopDrawCarriedItem(), mnShopDrawParty(), mnShopShowKeeperMessage(), mnShopShowKeeperMessageHidingCursor(), PerPush, PerRepeat, ShopGameTicketCreditCosts, Sint32, sySoundPlayStub() and sySynch().

Referenced by mnShopSelectBuy().

Definition at line 8 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 107 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 gmFlagGetStub(), gmFlagSetStub(), gmItemAdjustRareItemStockStub(), ShopStockTable and Sint32.

Referenced by mnShopRun().

Definition at line 114 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.

References ShopStockTable and Sint32.

Referenced by mnShopRun().

Definition at line 147 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 176 of file shop_stock.c.