14 drawer.
draw(sheet, 0x1F, 0x18, 0xAB);
15 drawer.
draw(sheet, 0x20, 0x48, 0xAB);
24 windows[1]->
setString(windows[1], text, 0x11);
27 windows[2]->
setString(windows[2], text, 0x12);
40 drawer.
draw(sheet, 0x23, 0x18, 0x51);
43 drawer.
draw(sheet, 0x25, 0x10, 0x4A);
70 for (i = 0; i < 13; i++) {
76 windows[i + 5]->
setNumber(windows[i + 5], 0, value);
79 if (task->
stats[19]) {
82 if (task->
stats[20]) {
85 if (task->
stats[21]) {
101 for (i = 0; i < 6; i++) {
104 drawer.
draw(sheet,
TECHS[tech - 1].icon + 0x37, 0x18, 0x51 + i * 0xE);
109 drawer.
draw(sheet, 0x26, 0x10, 0x4A);
121 windows[3]->
setString(windows[3], text, 0x19);
123 if (task->
level >= 0) {
126 windows[4]->
setString(windows[4], text, 0x1A);
129 for (i = 0; i < 6; i++) {
131 tech = task->
techs[i];
158 switch (task->
state) {
162 switch (task->
page) {
165 if (task->
slot != 0) {
169 for (j = 0; j < 6; j++) {
172 for (j = 0; j < 7; j++) {
178 if (task->
slot == 0) {
186 for (j = 0, n = 0; j < 6; j++) {
194 if (task->
slot == 0) {
197 for (k = 0; k < 10; k++) {
202 for (i = 0; i < count; i++) {
204 i != task->
slot - 1) {
205 for (j = 0; j < 6; j++) {
214 for (m = 0; m < 10; m++) {
216 for (k = 0; k < 6; k++) {
217 if (task->
techs[k] == list[m]) {
223 task->
techs[n++] = tech;
231 switch (task->
page) {
244 switch (task->
page) {
256 switch (task->
page) {
#define BATTLE_LAYER_MENUS
the HUD, the menus and the messages
FIGHTSTG.PRO: the battle.
DigimonData DIGIMON_DATA[55]
55 entries: the 52 Digimon, then three placeholders (0x1D4-0x1D6)
GfxState GFX
GFX: the graphics state and its methods.
GameState GAME
The save data, the game mode and the methods.
#define TEXT_BATTLE_MENU
MFIGHT: WFIGHTMN's.
#define TEXT_SKILL_NAMES
SKLNAM.
#define FILE_BATTLE_MENU
The battle menu's files (WFIGHTMN, WFIGHTTS): FILE_BATTLE_IMAGES is an archive whose entries go throu...
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
#define STAT_STRENGTH
the six battle stats
#define SKILL_MARKED
marked in the lab (STGDGLAB_updateSkillPanel)
#define STAT_RESISTS
the first of the seven resistances
#define SKILL_ID
PartnerEntry.skills.
DigimonData *(* GET_DIGIMON)(s32 id)
getDigimon for the overlays, in the small data (.sdata) between game/items.c's and file/file_table....
TechData TECHS[443]
The techniques, from 1: technique n is TECHS[n - 1].
void FIGHTSTG_drawPageArrows(PartnerInfo *task)
Draws the PartnerInfo's blinking page arrows.
PartnerInfo * FIGHTSTG_createPartnerInfo(s32 partner, s32 page, s32 slot)
Shows page page about the partner in slot (0 for itself)
void FIGHTSTG_updatePartnerInfo(PartnerInfo *task, TextWindow **windows)
The PartnerInfo's task: works out its page (the stats with the slot's Digimon's added,...
void FIGHTSTG_showStats(PartnerInfo *task, TextWindow **windows)
Creates the thirteen stat numbers of FIGHTSTG_statLines (up to 999), right aligned,...
void FIGHTSTG_drawTechIcons(PartnerInfo *task)
Draws the techniques page's icons and frame.
void FIGHTSTG_showPageButtons(PartnerInfo *task, TextWindow **windows)
Shows the PartnerInfo's page buttons (texts 0x11 and 0x12)
StatLine FIGHTSTG_statLines[13]
the stat numbers of FIGHTSTG_showStats
void FIGHTSTG_showTechs(PartnerInfo *task, TextWindow **windows)
Shows the techniques page: the level (text 0x1A for none) and the six techniques' names,...
void FIGHTSTG_drawStatsFrame(PartnerInfo *task)
Draws the frame of the stats page.
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
Digimon definition (DIGIMON_DATA, 52 of them; the first 8 are the partners)
u16 skills[7]
[1]-[6] are learnt at skillLevels
void *(* getEntry)(u32 fileAndIndex)
s32(* getPartnerEntry)()
-1 if it hasn't the Digimon
void(* computeStats)(s32 partner, union PartnerTotals *out)
s32(* getPartnerSlots)()
(partner, s16 *out): the count
s8 level
shown in the lab; 1 when added
s16 skills[6]
SKILL_ID and the flags below, 0 for none.
A page about a partner in one of its Digimon (FIGHTSTG_createPartnerInfo): its stats,...
s32 page
what it shows: 0 the stats, 1 and 2 techniques
s32 slot
from 1, or 0 for the partner itself
s16 slots[4]
GAME.funcs.getPartnerSlots's.
s32 level
the Digimon's (PartnerEntry.level), or -1 for none: text 0x1A
s16 stats[0x16]
the 22 of a PartnerTotals computeStats fills, shown up to 999
void(* nextState)(struct PartnerInfo *task)
PartnerEntry entries[3]
skills with SKILL_MARKED can be passed on
s32 techs[6]
a technique in the low 13 bits
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setLayerId)()
(id, depth)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
A line of FIGHTSTG_showStats's stat list (FIGHTSTG_statLines): where its number goes and the stat it ...
u8 stat
of PartnerInfo.stats
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
void(* setPalette)(struct TextWindow *obj, u8 arg)
void(* setRightAlign)()
no prototype: callers would truncate u8 args
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
#define PALETTE_DARK_BLUE
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)
computeStats' result: the stats with the equipment added, by STAT_* or by name.