20 2, 4, 7, 8, 8, 10, 12, 15, 20, 0, 18, 25,
36 return pricePerGuest * guestCount;
56 state->specialActive = 1;
66 messageBase = MsgInnWelcome;
104 s16 partyMemberIds[8];
114 for (memberIndex = 0; memberIndex < memberCount; memberIndex++) {
115 unit =
UnitGetFar(partyMemberIds[memberIndex]);
void Shop_DrawMoney(void)
Draws the party's coins in the coins window, in the edition's layout.
struct BattleUnit * UnitGetFar(u32 owner)
s32 Party_ListActiveOwnersFar(s16 *owners)
void UnitRatioFar(s32 owner_id)
s32 Party_AdjustCoinsFar(s32 amount)
void Event_FinishScreenTransitionFar(void)
void Event_WaitTransitionFramesFar(void)
void Event_StartScreenTransitionFar(void)
struct FieldActor * Object_GetByIdFar(s32 objectId)
void AudioCommand_PlayFar(s32 id)
struct UiWindow * UiWindow_CreateFar(s32 x, s32 y, s32 width, s32 height, s32 attrs)
void UiWork_FinalizeFar(struct UiWindow *work, s32 release)
struct UiWindow * UiWindow_CreateWithSideObjectFar(s32 arg0, s32 arg1, s32 x, s32 y)
void UiWork_PushValueSlotFar(u32 value, u32 kind)
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
struct GameState gGameState
InnMessageId
The innkeeper's lines, in message order from MsgInnWelcome.
@ INN_MESSAGE_NOT_ENOUGH_COINS
@ INN_MESSAGE_STAY_COMPLETE
@ INN_MESSAGE_REST_COMPLETE
void Inn_PlaySleep(s32 roomPrice)
Charges roomPrice, restores the HP and PP of each member still standing, and plays the night: a fade ...
static const s8 sInnPricesPerGuest[12]
The coins a night costs each living guest, by inn: Vale, Vault, Bilibin, Kolima, Imil,...
s32 Inn_CheckIn(s32 innId, s32 objectId)
Runs an inn's counter: the innkeeper names the price, and on Yes, with the coins, the party sleeps (I...
s32 Inn_RoomPrice(s32 innId)
Returns the night's price: the inn's price per guest times the party members still standing.
void Shop_ReleaseCursorWork(void)
Stops the cursor task, frees the six cursor icons and the work block.
s32 UiMessage_ShowChoice(s32 choice)
Runs the Yes or No choice beside the shopkeeper's line and returns it, keeping the hand cursor's moti...
void AudioCommand_WaitForStateByteClear(void)
Waits one frame at a time until the sound driver has finished the last command.
void Shop_InitializeCursorWork(void)
Allocates and clears the work block in the menu's heap slot, lists the party, loads the six cursor ic...
void UiMessage_ShowAndWait(s32 messageId)
Shows a shopkeeper's line and waits for its window to finish, one more frame included.
What every part of the shop object shares: its includes, the shop actions and sanctum services,...
#define SHOP_MONEY_WINDOW_WIDTH
struct EventWork * gEventWork
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
struct AnimationEntry * entries[4]
its layers; empty ones null
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
s16 maxPp
0 to 1999 for a character, 9999 for an enemy (UnitCalc)
s16 hp
current HP, 0 when downed
s16 maxHp
0 to 1999 for a character, 9999 for an enemy (UnitCalc)
A field actor: a person or thing on the field with a position, motion toward a target,...
Full event work allocated by Field_RunScene (heap slot 27).
s32 transition
SCENE_TRANSITION(style, variant); 0x100 on entry.
s32 transitionFrames
frames; 16 on entry and at each event
An inn's work, in the menu work: the coins window and the innkeeper's portrait.
struct UiWindow * window
the coins window: ShopRuntime's moneyWindow
u16 resourceId
The innkeeper's animation, which picks the portrait: ShopRuntime's keeperResource.
A shop's work: its windows, the party members' icons, the stock, the cursor and its icons,...
s16 partyMemberIds[9]
the party in order (Party_ListActiveOwners)
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
u16 state
0 while a message channel is typing into the window; 1 once its text has ended or closed the window,...