Fixes

SonikkuA-DatH 2021-10-16 21:14:15 -07:00
parent 6551e681db
commit 18d04a44db
1 changed files with 31 additions and 2 deletions

@ -2,7 +2,13 @@ The summary screen in RSE is surprisingly wasteful, which for Castform in partic
Thanks to ShinyDragonHunter for this
First, we'll set up **InitMonSpritesGfx_Battle** (or **static void sub_806F160** if your pret version is old) function in [src/pokemon.c](../blob/master/src/pokemon.c) to do the following
First, we'll set up this struct in [src/pokemon.c](../blob/master/src/pokemon.c)
```diff
- EWRAM_DATA static struct MonSpritesGfxManager *sMonSpritesGfxManagers[MON_SPR_GFX_MANAGERS_COUNT] = {NULL};
+ EWRAM_DATA static struct MonSpritesGfxManager *sMonSpritesGfxManager = NULL;
```
Then, we'll set up **InitMonSpritesGfx_Battle** function near bottom to do the following
Change this
@ -392,4 +398,27 @@ And in **static u8 LoadMonGfxAndSprite**
+ MonSpritesGfxManager_GetSpritePtr(B_POSITION_OPPONENT_LEFT),
summary->species2,
summary->pid);
```
```
With all this set, you can edit the frames used on the summary screen to whatever you want
Going back to [src/pokemon.c](../blob/master/src/pokemon.c)
```
#define ALLOC_FAIL_BUFFER (1 << 0)
#define ALLOC_FAIL_STRUCT (1 << 1)
#define GFX_MANAGER_ACTIVE 0xA3 // Arbitrary value
#define GFX_MANAGER_SPR_SIZE (MON_PIC_SIZE * 4) // * 4 is unnecessary, MON_PIC_SIZE is sufficient
#define GFX_MANAGER_NUM_FRAMES 4 // Only 2 frames are needed
```
Change ``#define GFX_MANAGER_NUM_FRAMES 4`` to whatever value you want. 2 is typically preferred, but if you're crazy enough to add more Castform forms later, this will need to be increased to compensate added forms
Otherwise
```diff
- #define GFX_MANAGER_NUM_FRAMES 4
+ #define GFX_MANAGER_NUM_FRAMES 2
```
And you're done