Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
files.c File Reference

The overlay's images and the files of its image sets; the panels' fades; the gym levels' trainings; and the third object's data, with the state all three objects share. More...

Include dependency graph for files.c:

Go to the source code of this file.

Functions

void STGTRAIN_loadImages (void)
 Loads the overlay's TIM archive into VRAM.
 
s32 STGTRAIN_requestFile (s32 index)
 Starts loading a file of STGTRAIN_files, unless it is the one loaded.
 
u8 * STGTRAIN_getFile (void)
 The requested file, or NULL while it loads.
 
void STGTRAIN_freeFile (void)
 Frees the loaded file of STGTRAIN_files.
 
s32 STGTRAIN_readSetBank (TrainSetHeader *header, s32 set)
 The set's sprite bank, where its sprites start and its size: the two words after the set's offsets.
 
s32 STGTRAIN_readSetAnims (TrainSetHeader *header, s32 set)
 The set's animations.
 
s32 STGTRAIN_readSetImages (TrainSetHeader *header, s32 set)
 The images of a set: the rest of its offsets.
 
s32 STGTRAIN_readSet (s32 set)
 Reads an image set of the loaded file.
 
s32 STGTRAIN_loadSet (s32 set, s32 *pos)
 Loads the images of a set into VRAM side by side, unpacking the run-length encoded ones ("RLEN") first.
 
s32 STGTRAIN_getFileId (s32 index)
 The file of an entry of STGTRAIN_files.
 
s32 STGTRAIN_getFilePos (s32 index)
 Where the image of an entry of STGTRAIN_files goes (y << 16 | x)
 
s32 STGTRAIN_getFileEffectSameDepth (s32 index)
 Whether an entry of STGTRAIN_files draws its effect at the Digimon's depth.
 
TrainSpriteBank * STGTRAIN_getBank (s32 set)
 The sprite bank of an image set.
 
s32 STGTRAIN_getBankOffset (s32 set)
 Where an image set's sprites start in its bank.
 
s32 STGTRAIN_getBankSize (s32 set)
 The size of an image set's sprite bank (nothing calls it)
 
TrainAnim * STGTRAIN_getAnim (s32 set, s32 i)
 An animation of an image set.
 
TrainEntry * STGTRAIN_getGymTrainings (s32 index)
 The trainings of a gym level, counting them.
 
TrainEntry * STGTRAIN_findGymTraining (s32 index, s32 id)
 A training of a gym level, by its id.
 

Variables

s32 STGTRAIN_intensityCosts []
 the points each intensity of a training costs
 
TrainEntry STGTRAIN_gymTrainings [14][16]
 The trainings of each gym level, by STGTRAIN_findGymTraining: {id, stat, other}, 0 ends.
 
TrainInfo STGTRAIN_trainings []
 The trainings: their name and description in the text file, and the frames of their icon.
 
TrainFile STGTRAIN_files []
 the discs number their files differently
 
TrainState STGTRAIN_state
 
TrainCursor STGTRAIN_bankCursor = { ((void *)0) }
 
TrainCursor STGTRAIN_animCursor = { ((void *)0) }
 
TrainCursor STGTRAIN_imageCursor = { ((void *)0) }
 
TrainCursor STGTRAIN_setCursor = { ((void *)0) }
 

Detailed Description

The overlay's images and the files of its image sets; the panels' fades; the gym levels' trainings; and the third object's data, with the state all three objects share.

Definition in file files.c.

Function Documentation

◆ STGTRAIN_loadImages()

void STGTRAIN_loadImages ( void  )

Loads the overlay's TIM archive into VRAM.

files.c

Definition at line 8 of file files.c.

Here is the call graph for this function:

◆ STGTRAIN_requestFile()

s32 STGTRAIN_requestFile ( s32  index)

Starts loading a file of STGTRAIN_files, unless it is the one loaded.

Definition at line 22 of file files.c.

◆ STGTRAIN_getFile()

u8 * STGTRAIN_getFile ( void  )

The requested file, or NULL while it loads.

Definition at line 36 of file files.c.

◆ STGTRAIN_freeFile()

void STGTRAIN_freeFile ( void  )

Frees the loaded file of STGTRAIN_files.

Definition at line 44 of file files.c.

◆ STGTRAIN_readSetBank()

s32 STGTRAIN_readSetBank ( TrainSetHeader *  header,
s32  set 
)

The set's sprite bank, where its sprites start and its size: the two words after the set's offsets.

Definition at line 52 of file files.c.

Referenced by STGTRAIN_readSet().

Here is the caller graph for this function:

◆ STGTRAIN_readSetAnims()

s32 STGTRAIN_readSetAnims ( TrainSetHeader *  header,
s32  set 
)

The set's animations.

Definition at line 63 of file files.c.

Referenced by STGTRAIN_readSet().

Here is the caller graph for this function:

◆ STGTRAIN_readSetImages()

s32 STGTRAIN_readSetImages ( TrainSetHeader *  header,
s32  set 
)

The images of a set: the rest of its offsets.

Definition at line 79 of file files.c.

Referenced by STGTRAIN_readSet().

Here is the caller graph for this function:

◆ STGTRAIN_readSet()

s32 STGTRAIN_readSet ( s32  set)

Reads an image set of the loaded file.

Definition at line 91 of file files.c.

Here is the call graph for this function:

◆ STGTRAIN_loadSet()

s32 STGTRAIN_loadSet ( s32  set,
s32 *  pos 
)

Loads the images of a set into VRAM side by side, unpacking the run-length encoded ones ("RLEN") first.

Definition at line 112 of file files.c.

Here is the call graph for this function:

◆ STGTRAIN_getFileId()

s32 STGTRAIN_getFileId ( s32  index)

The file of an entry of STGTRAIN_files.

Definition at line 177 of file files.c.

◆ STGTRAIN_getFilePos()

s32 STGTRAIN_getFilePos ( s32  index)

Where the image of an entry of STGTRAIN_files goes (y << 16 | x)

Definition at line 182 of file files.c.

◆ STGTRAIN_getFileEffectSameDepth()

s32 STGTRAIN_getFileEffectSameDepth ( s32  index)

Whether an entry of STGTRAIN_files draws its effect at the Digimon's depth.

Definition at line 187 of file files.c.

◆ STGTRAIN_getBank()

TrainSpriteBank * STGTRAIN_getBank ( s32  set)

The sprite bank of an image set.

Definition at line 192 of file files.c.

◆ STGTRAIN_getBankOffset()

s32 STGTRAIN_getBankOffset ( s32  set)

Where an image set's sprites start in its bank.

Definition at line 197 of file files.c.

◆ STGTRAIN_getBankSize()

s32 STGTRAIN_getBankSize ( s32  set)

The size of an image set's sprite bank (nothing calls it)

Definition at line 202 of file files.c.

◆ STGTRAIN_getAnim()

TrainAnim * STGTRAIN_getAnim ( s32  set,
s32  i 
)

An animation of an image set.

Definition at line 207 of file files.c.

◆ STGTRAIN_getGymTrainings()

TrainEntry * STGTRAIN_getGymTrainings ( s32  index)

The trainings of a gym level, counting them.

Definition at line 212 of file files.c.

◆ STGTRAIN_findGymTraining()

TrainEntry * STGTRAIN_findGymTraining ( s32  index,
s32  id 
)

A training of a gym level, by its id.

Definition at line 228 of file files.c.

Variable Documentation

◆ STGTRAIN_intensityCosts

s32 STGTRAIN_intensityCosts[]
Initial value:
= {
1, 5, 10,
}

the points each intensity of a training costs

Definition at line 245 of file files.c.

Referenced by STGTRAIN_answerToTrain(), and STGTRAIN_pickIntensity().

◆ STGTRAIN_gymTrainings

TrainEntry STGTRAIN_gymTrainings[14][16]

The trainings of each gym level, by STGTRAIN_findGymTraining: {id, stat, other}, 0 ends.

Definition at line 249 of file files.c.

Referenced by STGTRAIN_findGymTraining(), and STGTRAIN_getGymTrainings().

◆ STGTRAIN_trainings

TrainInfo STGTRAIN_trainings[]
Initial value:
= {
{0, 0, {0, 0, 0, 0}},
{19, 43, {0, 1, 2, 3}},
{20, 44, {4, 5, 6, 7}},
{21, 45, {8, 9, 10, 11}},
{22, 46, {12, 13, 14, 15}},
{23, 47, {16, 17, 18, 19}},
{29, 53, {20, 21, 22, 23}},
{30, 54, {24, 25, 26, 27}},
{31, 55, {28, 29, 30, 31}},
{32, 56, {32, 33, 34, 35}},
{33, 57, {36, 37, 38, 39}},
{34, 58, {40, 41, 42, 43}},
{35, 59, {95, 96, 97, 98}},
{24, 48, {45, 46, 47, 48}},
{25, 49, {49, 50, 51, 52}},
{26, 50, {53, 54, 55, 56}},
{27, 51, {57, 58, 59, 60}},
{28, 52, {61, 62, 63, 64}},
{36, 60, {65, 66, 67, 68}},
{37, 61, {71, 72, 73, 74}},
{38, 62, {75, 76, 77, 78}},
{39, 63, {79, 80, 81, 82}},
{40, 64, {83, 84, 85, 86}},
{41, 65, {87, 88, 89, 90}},
{42, 66, {91, 92, 93, 94}},
}

The trainings: their name and description in the text file, and the frames of their icon.

Definition at line 337 of file files.c.

◆ STGTRAIN_files

TrainFile STGTRAIN_files[]
Initial value:
= {
{606, 82, 31, 0},
{606, 82, 31, 0},
{1086, 79, 31, 0},
{640, 78, 27, 0},
{641, 79, 24, 1},
{642, 79, 31, 0},
{643, 79, 31, 0},
{770, 79, 31, 0},
{771, 81, 31, 1},
{1087, 79, 31, 0},
{644, 47, 35, 1},
{645, 79, 31, 0},
{772, 79, 31, 1},
{606, 82, 31, 0},
{1086, 79, 31, 0},
{640, 78, 27, 0},
{641, 79, 24, 1},
{642, 79, 31, 0},
{643, 79, 31, 0},
{770, 79, 31, 0},
{771, 81, 31, 1},
{1087, 79, 31, 0},
{644, 47, 35, 1},
{645, 79, 31, 0},
{772, 79, 31, 1},
}

the discs number their files differently

Definition at line 394 of file files.c.

Referenced by STGTRAIN_freeFile(), STGTRAIN_getFile(), STGTRAIN_getFileEffectSameDepth(), STGTRAIN_getFileId(), STGTRAIN_getFilePos(), and STGTRAIN_requestFile().

◆ STGTRAIN_state

TrainState STGTRAIN_state
Initial value:
= {
0, ((void *)0) , 0, {{0}}, STGTRAIN_trainings,
}
s32 STGTRAIN_requestFile(s32 index)
Starts loading a file of STGTRAIN_files, unless it is the one loaded.
Definition files.c:22
void STGTRAIN_freeFile(void)
Frees the loaded file of STGTRAIN_files.
Definition files.c:44
s32 STGTRAIN_readSet(s32 set)
Reads an image set of the loaded file.
Definition files.c:91
TrainEntry * STGTRAIN_findGymTraining(s32 index, s32 id)
A training of a gym level, by its id.
Definition files.c:228
TrainSpriteBank * STGTRAIN_getBank(s32 set)
The sprite bank of an image set.
Definition files.c:192
TrainEntry * STGTRAIN_getGymTrainings(s32 index)
The trainings of a gym level, counting them.
Definition files.c:212
s32 STGTRAIN_getFileId(s32 index)
The file of an entry of STGTRAIN_files.
Definition files.c:177
TrainInfo STGTRAIN_trainings[]
The trainings: their name and description in the text file, and the frames of their icon.
Definition files.c:337
u8 * STGTRAIN_getFile(void)
The requested file, or NULL while it loads.
Definition files.c:36
s32 STGTRAIN_getFileEffectSameDepth(s32 index)
Whether an entry of STGTRAIN_files draws its effect at the Digimon's depth.
Definition files.c:187
TrainAnim * STGTRAIN_getAnim(s32 set, s32 i)
An animation of an image set.
Definition files.c:207
void STGTRAIN_loadImages(void)
Loads the overlay's TIM archive into VRAM.
Definition files.c:8
s32 STGTRAIN_loadSet(s32 set, s32 *pos)
Loads the images of a set into VRAM side by side, unpacking the run-length encoded ones ("RLEN") firs...
Definition files.c:112
s32 STGTRAIN_getBankSize(s32 set)
The size of an image set's sprite bank (nothing calls it)
Definition files.c:202
s32 STGTRAIN_getFilePos(s32 index)
Where the image of an entry of STGTRAIN_files goes (y << 16 | x)
Definition files.c:182
s32 STGTRAIN_getBankOffset(s32 set)
Where an image set's sprites start in its bank.
Definition files.c:197
void STGTRAIN_startFade(PanelAnim *fade, s32 fadeIn)
s32 STGTRAIN_updateLerp(MenuLerp *lerp)
void STGTRAIN_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames)
s32 STGTRAIN_updateFade(PanelAnim *fade)

Definition at line 422 of file files.c.

Referenced by STGTRAIN_applyTry(), STGTRAIN_askToTrain(), STGTRAIN_closeIntensities(), STGTRAIN_closeNotice(), STGTRAIN_closePartnerPick(), STGTRAIN_closeQuestion(), STGTRAIN_drawMenu(), STGTRAIN_drawSession(), STGTRAIN_endSession(), STGTRAIN_freeFile(), STGTRAIN_getAnim(), STGTRAIN_getBank(), STGTRAIN_getBankOffset(), STGTRAIN_getBankSize(), STGTRAIN_getFile(), STGTRAIN_getGymTrainings(), STGTRAIN_loadSet(), STGTRAIN_openBattleStats(), STGTRAIN_openParty(), STGTRAIN_openTp(), STGTRAIN_partnerPickClosed(), STGTRAIN_pickTraining(), STGTRAIN_playTraining(), STGTRAIN_playTrainingEnd(), STGTRAIN_readSet(), STGTRAIN_readSetAnims(), STGTRAIN_readSetBank(), STGTRAIN_readSetImages(), STGTRAIN_requestFile(), STGTRAIN_runMenu(), STGTRAIN_runScreen(), STGTRAIN_runSession(), STGTRAIN_runTraining(), STGTRAIN_screenClosed(), STGTRAIN_setUpActor(), STGTRAIN_showGains(), STGTRAIN_showIntensities(), STGTRAIN_showTrainingInfo(), STGTRAIN_showTrainingName(), STGTRAIN_startBonusTry(), STGTRAIN_startClosing(), STGTRAIN_startLeaving(), STGTRAIN_startTraining(), STGTRAIN_updateActor(), STGTRAIN_updateMenu(), and STGTRAIN_updateScreen().

◆ STGTRAIN_bankCursor

TrainCursor STGTRAIN_bankCursor = { ((void *)0) }

Definition at line 430 of file files.c.

Referenced by STGTRAIN_readSetBank().

◆ STGTRAIN_animCursor

TrainCursor STGTRAIN_animCursor = { ((void *)0) }

Definition at line 431 of file files.c.

Referenced by STGTRAIN_readSetAnims().

◆ STGTRAIN_imageCursor

TrainCursor STGTRAIN_imageCursor = { ((void *)0) }

Definition at line 432 of file files.c.

Referenced by STGTRAIN_readSetImages().

◆ STGTRAIN_setCursor

TrainCursor STGTRAIN_setCursor = { ((void *)0) }

Definition at line 433 of file files.c.

Referenced by STGTRAIN_readSet().