7#if VERSION_US || VERSION_JP
s32 addPartnerEntry(s32 partner, s32 id)
Gives a partner Digimon id at level 1; 0 if it has it already or has no room.
PartnerStats * getPartnerStats(s32 partner)
A partner's name, stats and Digimon.
s32 getPartnerSlots(s32 partner, s16 *out)
Copies the ids of the Digimon a partner takes to battle; returns how many there are.
s32 listPartnerEntries(s32 partner, u16 *out)
Copies the ids of a partner's Digimon, zero-filled; returns how many there are.
void setPartnerSlots(s32 partner, s16 *ids)
Picks the Digimon a partner takes to battle (-1 for ids it does not have)
s32 setPartnerEntry(s32 partner, s32 id, PartnerEntry *in)
Overwrites a partner's Digimon id; returns its index, or -1.
s32 getPartnerEntry(s32 partner, s32 id, PartnerEntry *out)
Copies a partner's Digimon id; returns its index, or -1.
void newGame(void)
Clears the save data and sets up a new game.
void requestMode(s32 mode, s32 arg)
Asks for a mode change, applied when main recreates the mode task.
s32 getPrevMode(void)
The game mode before the current one.
s32 getMode(void)
The current game mode.
s32 isModeChangePending(void)
Whether a mode change was requested.
void commitMode(void)
Makes the requested mode current (main calls it before recreating the mode task)
GameState GAME
The save data, the game mode and the methods.
s32 getModeArg(void)
The argument the current mode was requested with.
s32 getPartyPartner(u32 index)
The partner id of party member index (its unlocked value - 3), or -1.
void computeStats(s32 partner, PartnerTotals *out)
A partner's stats with its equipment (and its equipment set bonus) added.
void addStat(s32 partner, u32 stat, s32 delta)
Adds to a partner's stat, kept within the same limits as setStat.
void setStat(s32 partner, u32 stat, s16 value)
Sets a partner's stat, kept within 0-99 (level, TP), 0-9999 (HP, MP) or 0-999.
What the stage overlays and the executable use of FIELDSTG (fieldstg.h has the rest): its layers and ...
#define MODE_COUNTRY_SELECT
CNTY_SEL, where the European version starts.
#define GAME_SAVE_SIZE
The saved part of the game state, GAME up to mode: a save's data section (stgmcard....
#define MODE_OPENING
STDWTITL's first movie.
Heap HEAP
The functions that return what a call left in v0 (allocMemHigh, findTask) and the ones that take othe...
void addCards(s32 card, s32 count)
Gives count copies of a card (up to CARD_COPIES_MAX) and marks it seen.
void giveStarterDeck(void)
Gives the starter deck's cards and puts them in every deck.
void initNewGameData(void)
The new game's player name, deck names, starter deck and partners.
s32 getPartyMember(u32 index)
The partner index of party member index, or -1.
void setParty(s32 set)
Gives the party STARTER_PARTIES[set], unlocking its partners.
void resetPlayTime(void)
Sets the play time to zero.
void updatePlayTime(void)
Turns the vsync-counted frames into seconds, minutes and hours, stopping at 999:59:59.
The game state (GAME): the first 0x26BC bytes are what newGame clears (the save data),...
s32 unusedC
newGame sets it to -1; nothing reads it
s32 battleSteps
to the next random battle, which each step lowers
void(* zero)(void *ptr, s32 size)
s32(* next)(void)
0 to RANDOM_COUNT - 1