Document remainder of Battle Factory App (Overlay 105)#983
Document remainder of Battle Factory App (Overlay 105)#983lhearachel merged 3 commits intopret:mainfrom
Conversation
| @@ -97,239 +132,241 @@ typedef struct BattleFactoryApp { | |||
| PaletteData *plttData; | |||
| G3DPipelineBuffers *g3dPipeline; | |||
| PokemonSpriteManager *monSpriteMan; | |||
| PokemonSprite *unk_12C[3]; | |||
| PokemonSprite *monSprites[3]; | |||
There was a problem hiding this comment.
suggestion: Create a local constant for this 3 as a codified number of mon sprites. Might also apply to the personal party data?
Make sure to apply those constants to the dimensions of the coordinate-tables below so that they also have codified sizes for the compiler.
There was a problem hiding this comment.
In this case I am actually reluctant to add the sprite amount constants. While normally those constants would see additional use, for example in constructor and destructor for loops, I don't think there are any other places in this file where those would be used in this case. All the relevant for loops use function calls or variables that are ultimately set by NELEMS, not hardcoded.
I am also not sure what you mean regarding the coordinates tables. None of the coordinate tables are related to the mon sprites.
I have been thinking a little about how maybe it makes sense to create constants for the party sizes in the different battle facilities depending on challenge type, which could potentially help here, but that feels like something better addressed when more of the core logic of the facilities is documented, not now.
There was a problem hiding this comment.
The "coordinate tables" was in reference to ballSprites; aren't some of those related to the number of available mons that can be received?
There was a problem hiding this comment.
Ah I see. I mulled over this today, decided that to add constants here, it's probably best to add the additional constants for party size now - they can always be moved to a more general header file later. So now all the constant arrays should have meaningful length indicators.
| u16 unk_324[6]; | ||
| u16 *unk_330; | ||
| int unk_334; | ||
| BattleFactoryAppPokeballSprite *ballSprites[6]; |
There was a problem hiding this comment.
suggestion: Similar here as for the party sprites.
There was a problem hiding this comment.
See above discussion
| } | ||
|
|
||
| return 1; | ||
| return !!app->menuWasCancelled; |
Followup of #978