Fix SDH leaving out needing to change the declaration of `sBasePaletteGammaTypes` if dynamic pals are in.

Deokishisu 2024-08-28 21:26:04 -04:00
parent 64e30d0e24
commit e7da795663
1 changed files with 15 additions and 18 deletions

@ -120,7 +120,7 @@ void StartWeather(void)
} }
``` ```
If using dynamic palettes, you will need to make the above changes but with an added for loop like so: **If using dynamic palettes**, you will need to make the above changes but with an added for loop like so:
``` diff ``` diff
void StartWeather(void) void StartWeather(void)
{ {
@ -134,27 +134,24 @@ void StartWeather(void)
+ sPaletteColorMapTypes = sBasePaletteColorMapTypes; + sPaletteColorMapTypes = sBasePaletteColorMapTypes;
gWeatherPtr->contrastColorMapSpritePalIndex = index; gWeatherPtr->contrastColorMapSpritePalIndex = index;
gWeatherPtr->rainSpriteCount = 0; gWeatherPtr->rainSpriteCount = 0;
gWeatherPtr->curRainSpriteIndex = 0; //...
gWeatherPtr->cloudSpritesCreated = 0;
gWeatherPtr->snowflakeSpriteCount = 0;
gWeatherPtr->ashSpritesCreated = 0;
gWeatherPtr->fogHSpritesCreated = 0;
gWeatherPtr->fogDSpritesCreated = 0;
gWeatherPtr->sandstormSpritesCreated = 0;
gWeatherPtr->sandstormSwirlSpritesCreated = 0;
gWeatherPtr->bubblesSpritesCreated = 0;
gWeatherPtr->lightenedFogSpritePalsCount = 0;
Weather_SetBlendCoeffs(16, 0);
gWeatherPtr->currWeather = 0;
gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_IDLE;
gWeatherPtr->readyForInit = FALSE;
gWeatherPtr->weatherChangeComplete = TRUE;
gWeatherPtr->taskId = CreateTask(Task_WeatherInit, 80);
} }
} }
``` ```
And remove the `BuildColorMaps()` function itself: Also **if you have dynamic palettes**, make sure you change the definition of `sBasePaletteColorMapTypes`:
``` diff
-static const u8 ALIGNED(2) sBasePaletteColorMapTypes[32] =
+EWRAM_DATA u8 ALIGNED(2) sBasePaletteGammaTypes[32] = {
{
// background palettes
COLOR_MAP_DARK_CONTRAST,
COLOR_MAP_DARK_CONTRAST,
COLOR_MAP_DARK_CONTRAST,
//...
```
And (from now on for both dynamic palettes and vanilla) remove the `BuildColorMaps()` function itself:
``` diff ``` diff
//... //...