Alchemy
Loading...
Searching...
No Matches

game.c File Reference

The game object: the rules of the party and its world. More...

Go to the source code of this file.

Detailed Description

The game object: the rules of the party and its world.

Units and their stats, a new game, items and inventories, Psynergy and levels, the game flags, enemy units and the party's counters, element levels and classes, battle arithmetic and the Djinn.

game_internal.h holds what every part shares (its includes and one inline helper); the code is in the files under game/, included here in the order it has in the ROM. Camelot's own files are not recoverable: the ROM shows one object, and these parts are ours, cut where one family ends and the next begins. Its tables are the .tsv files in this folder, built by the .s files beside them; README.md gives the words and prefixes. Where to start:

Units units.c: UnitGet, UnitCalc, GameState_InitDefaults Items inventory.c: Inventory_AddItem, Inventory_Equip, PartyInventory_Add Levels levels.c: Unit_RefreshPsynergy, Owner_LevelUp Flags flags.c: GameFlag_Test, GameFlag_SetBit Enemies, party party.c: BattleUnitSet, Party_AddActiveOwner, Party_AdjustCoins Classes classes.c: Class_Determine, Unit_UpdateClass Battle maths battle_calc.c: Battle_GetElementMultiplier, BattleRandom Djinn djinn.c: Djinn_AddToOwner, Djinn_Activate

Definition in file game.c.