Alchemy
Loading...
Searching...
No Matches

shop.c

Go to the documentation of this file.
1/// @file
2/// The shop object: every counter the party trades at. Shops that buy, sell
3/// and repair, the artifact and Game Ticket counters, the sanctum's healing
4/// services, the inn, and the item picker scenes use.
5///
6/// Everything lives in one work block, struct ShopRuntime, reached as
7/// gMenuWork while a counter is open. shop_internal.h holds what every part
8/// shares (includes, the shop actions and the values that differ by edition);
9/// the code is in the files under shop/, included here in the order it has in
10/// the ROM. Camelot's own files are not recoverable: the ROM shows one object,
11/// and these parts are ours, cut where one family ends and the next begins.
12/// README.md in this folder gives the words and prefixes. Where to start:
13///
14/// Shops run.c: Shop_Run; buy.c: Shop_SelectBuy; sell.c:
15/// Shop_SelectSell; repair.c: Shop_SelectRepair
16/// Stock artifacts.c: EventTable_ApplyRowAbilities,
17/// Shop_BuySpecialItem
18/// Sanctum sanctum.c: Sanctum_RunPartyService
19/// Inn inn.c: Inn_CheckIn
20/// Item picker item_picker.c: Shop_PickUnitItem
21
22#include "shop_internal.h"
23
24// The shop object's code, in ROM order. Each part is compiled here, as part
25// of this one object, never on its own: the order of these includes is the
26// order of the code in the ROM.
27#include "shop/run.c"
28#include "shop/cursor.c"
29#include "shop/buy.c"
30#include "shop/sell.c"
31#include "shop/repair.c"
32#include "shop/artifacts.c"
33#include "shop/sanctum.c"
34#include "shop/inn.c"
35#include "shop/item_picker.c"
The Game Ticket counter, the gift items and every shop's stock.
Buying: the stock list, the money and party windows, quantities and prices.
The selection frame and price digit tiles, and the hand cursor.
The inn: room prices, checking in and the night's sleep.
The item picker: which member's item to drop when every bag is full.
Repairing broken items.
Running a shop, its cursor work, and the message helpers every counter uses.
Selling: choosing a party member, the item grid and the sale.
The sanctum's services, their prices and their sparkles.
What every part of the shop object shares: its includes, the shop actions and sanctum services,...