Skip to Content
The Alchemy Project

src/shop/shop_inn.c

The inn: room prices, checking in and the night's sleep. More…

Included by shop.c.

Enumerations

NameDescription
enumINN_MESSAGE_ID { INN_MESSAGE_WELCOME, INN_MESSAGE_ENJOY_STAY, INN_MESSAGE_NOT … }The innkeeper's lines, in message order from MsgInnWelcome ("Welcome to our inn.").

Functions

NameDescription
Sint32mnInnRoomPrice (Sint32 innId)Returns the night's price: the inn's price per guest times the party members still standing.
Sint32mnInnQuoteRoomPrice (Sint32 innId)Returns the night's price at inn innId with the shop's state opened for it, for a script to quote before checking in.
Sint32mnInnCheckIn (Sint32 innId, Sint32 actorId)Runs an inn's counter: the innkeeper names the price, and on Yes the party sleeps.
voidmnInnPlaySleep (Sint32 roomPrice)Charges the room and restores the HP and PP of each party member still standing over a night: a fade to black, the inn's music and a fade back.

Description

The inn: room prices, checking in and the night's sleep. Part of shop.c.

Enumerations in detail

INN_MESSAGE_ID

enum INN_MESSAGE_ID

The innkeeper's lines, in message order from MsgInnWelcome ("Welcome to our inn.").

EnumeratorValueDescription
INN_MESSAGE_WELCOME"Welcome to our inn."
INN_MESSAGE_ENJOY_STAY"Please enjoy your stay."
INN_MESSAGE_NOT_ENOUGH_COINS"I'm afraid you don't have enough."
INN_MESSAGE_COME_AGAIN"Please come again."
INN_MESSAGE_SLEPT_WELL"I hope you slept well."

Definition at line 5 of file shop_inn.c.

Functions in detail

mnInnRoomPrice

Sint32 mnInnRoomPrice(Sint32 innId)

Returns the night's price: the inn's price per guest times the party members still standing.

References gmUnitGet(), InnPricesPerGuest and Sint32.

Referenced by mnInnCheckIn() and mnInnQuoteRoomPrice().

Definition at line 16 of file shop_inn.c.

mnInnQuoteRoomPrice

Sint32 mnInnQuoteRoomPrice(Sint32 innId)

Returns the night's price at inn innId with the shop's state opened for it, for a script to quote before checking in.

References mnInnRoomPrice(), mnShopInitState(), mnShopReleaseState() and Sint32.

Referenced by scShamanVillageTalkToInnkeeper().

Definition at line 36 of file shop_inn.c.

mnInnCheckIn

Sint32 mnInnCheckIn(Sint32 innId, Sint32 actorId)

Runs an inn's counter: the innkeeper names the price, and on Yes the party sleeps. innId is the row of InnPricesPerGuest and actorId the innkeeper, whose portrait the lines show.

References fdActorGetByIdStub(), MainRoutineStateWork, mnInnPlaySleep(), mnInnRoomPrice(), mnMessageArgumentPushStub(), mnPortraitOpenWindowStub(), mnShopAskYesNo(), mnShopDrawMoney(), mnShopInitState(), mnShopReleaseState(), mnShopShowKeeperMessage(), mnWindowCloseStub(), mnWindowCreateStub() and Sint32.

Referenced by dbPsynergyTestOpenInn(), dbShopTestOpenInn(), scAlhafraRoomsTalkToInnkeeper(), scApojiiIslandsTalkToInnkeeper(), scChampaRoomsTalkToInnkeeper(), scContigoTalkToInnkeeper(), scDailaRoomsTalkToInnkeeper(), scDailaRoomsTalkToInnkeeperOnceTaviIsRescued(), scGarohRoomsTalkToInnkeeper(), scIzumoRoomsTalkToInnkeeper(), scKibomboOpenInn(), scLohoTalkToInnkeeper(), scMadraRoomsTalkToInnkeeper(), scMikasallaRoomsTalkToInnkeeper(), scNaribweRoomsTalkToInnkeeper(), scNaribweRoomsTalkToInnkeeperOnReturn(), scProxTalkToInnkeeper(), scShamanVillageTalkToInnkeeper() and scYallamRoomsTalkToInnkeeper().

Definition at line 51 of file shop_inn.c.

mnInnPlaySleep

void mnInnPlaySleep(Sint32 roomPrice)

Charges the room and restores the HP and PP of each party member still standing over a night: a fade to black, the inn's music and a fade back.

References fdScriptFinishScreenTransitionStub(), fdScriptStartScreenTransitionStub(), fdScriptWaitTransitionTicksStub(), gmPartyAdjustCoinsStub(), gmPartyListMembersStub(), gmUnitGet(), gmUnitRecalculateGaugesStub(), mnSoundWaitForJingle(), Sint32, sySoundPlayStub() and sySynch().

Referenced by mnInnCheckIn() and scShamanVillageTalkToInnkeeper().

Definition at line 107 of file shop_inn.c.