Addressing a bunch of small things

This commit is contained in:
Eduardo Quezada 2025-01-17 18:21:48 -03:00
parent b00b2a9ded
commit c363c28b22
10 changed files with 21 additions and 13 deletions

View File

@ -622,3 +622,4 @@ MtPyre_Summit_Text_HoennTrioTale:
.string "becalmed the two enraged POKéMON.\p"
.string "Then, its duty done, the green POKéMON\n"
.string "flew off into the wild blue yonder…$"

View File

@ -103,3 +103,4 @@ SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter:
walk_down
walk_in_place_faster_left
step_end

View File

@ -4,4 +4,4 @@
11
12
13
14
14

View File

@ -4,4 +4,4 @@
11
12
13
14
14

View File

@ -101,7 +101,7 @@ void BlendPalettesUnfaded(u32 selectedPalettes, u8 coeff, u32 color);
void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTarget, u16 color, u8 priority, u8 id);
void TimeBlendPalette(u16 palOffset, u32 coeff, u32 blendColor);
void TintPalette_RGB_Copy(u16 palOffset, u32 blendColor);
void TimeMixPalettes(u32, u16 *, u16 *, struct BlendSettings *, struct BlendSettings *, u16);
void TimeMixPalettes(u32 palettes, u16 *src, u16 *dst, struct BlendSettings *blend0, struct BlendSettings *blend1, u16 weight0);
void AvgPaletteWeighted(u16 *src0, u16 *src1, u16 *dst, u16 weight0);
void TintPalette_GrayScale(u16 *palette, u32 count);
void TintPalette_GrayScale2(u16 *palette, u32 count);

View File

@ -2613,6 +2613,8 @@ void GetFollowerAction(struct ScriptContext *ctx) // Essentially a big switch fo
gFollowerBasicMessages[emotion].script);
}
#define sLightType data[5]
// Sprite callback for light sprites
void UpdateLightSprite(struct Sprite *sprite)
{
@ -2641,7 +2643,7 @@ void UpdateLightSprite(struct Sprite *sprite)
return;
}
switch (sprite->data[5]) // lightType
switch (sprite->sLightType)
{
default:
case LIGHT_TYPE_BALL:
@ -2693,7 +2695,7 @@ static void SpawnLightSprite(s16 x, s16 y, s16 camX, s16 camY, u32 lightType)
else
UpdateSpritePaletteByTemplate(template, sprite);
GetMapCoordsFromSpritePos(x + camX, y + camY, &sprite->x, &sprite->y);
sprite->data[5] = lightType;
sprite->sLightType = lightType;
sprite->data[6] = x;
sprite->data[7] = y;
sprite->affineAnims = gDummySpriteAffineAnimTable;
@ -2718,9 +2720,12 @@ static void SpawnLightSprite(s16 x, s16 y, s16 camX, s16 camY, u32 lightType)
sprite->oam.priority = 2;
sprite->subpriority = 0xFF;
sprite->oam.objMode = ST_OAM_OBJ_BLEND;
break;
}
}
#undef sLightType
void TrySpawnLightSprites(s16 camX, s16 camY)
{
u32 i;

View File

@ -531,7 +531,6 @@ static void ApplyColorMap(u8 startPalIndex, u8 numPalettes, s8 colorMapIndex)
}
else
{
// copy
CpuFastCopy(&gPlttBufferUnfaded[PLTT_ID(startPalIndex)], &gPlttBufferFaded[PLTT_ID(startPalIndex)], numPalettes * PLTT_SIZE_4BPP);
}
}
@ -681,7 +680,7 @@ static void MarkFogSpritePalToLighten(u8 paletteIndex)
static bool8 LightenSpritePaletteInFog(u8 paletteIndex)
{
u16 i;
u32 i;
if (paletteIndex >= 16 && IS_BLEND_IMMUNE_TAG(GetSpritePaletteTagByPaletteNum(paletteIndex - 16)))
return FALSE;
@ -883,9 +882,9 @@ static bool8 UNUSED IsFirstFrameOfWeatherFadeIn(void)
void LoadCustomWeatherSpritePalette(const u16 *palette)
{
if (gWeatherPtr->weatherPicSpritePalIndex > 16) // haven't allocated palette yet
if ((gWeatherPtr->weatherPicSpritePalIndex = AllocSpritePalette(PALTAG_WEATHER_2)) > 16)
return;
if (gWeatherPtr->weatherPicSpritePalIndex > 16 // haven't allocated palette yet
&& (gWeatherPtr->weatherPicSpritePalIndex = AllocSpritePalette(PALTAG_WEATHER_2)) > 16)
return;
LoadPalette(palette, OBJ_PLTT_ID(gWeatherPtr->weatherPicSpritePalIndex), PLTT_SIZE_4BPP);
UpdateSpritePaletteWithWeather(gWeatherPtr->weatherPicSpritePalIndex, TRUE);
}

View File

@ -1415,8 +1415,8 @@ void FogHorizontal_Main(void)
CreateFogHorizontalSprites();
if (gWeatherPtr->currWeather == WEATHER_FOG_HORIZONTAL)
{
Weather_SetTargetBlendCoeffs(12, 8, 3);
UpdateShadowColor(RGB(15, 15, 15)); // Gray
Weather_SetTargetBlendCoeffs(12, 8, 3);
UpdateShadowColor(RGB(15, 15, 15)); // Gray
}
else
{

View File

@ -1653,8 +1653,10 @@ void UpdatePalettesWithTime(u32 palettes)
u32 mask = 1 << 16;
if (palettes >= (1 << 16))
for (i = 0; i < 16; i++, mask <<= 1)
{
if (IS_BLEND_IMMUNE_TAG(GetSpritePaletteTagByPaletteNum(i)))
palettes &= ~(mask);
}
palettes &= PALETTES_MAP | PALETTES_OBJECTS; // Don't blend UI pals
if (!palettes)

View File

@ -3955,7 +3955,7 @@ static void SetSpriteInvisibility(u8 spriteArrayId, bool8 invisible)
static void HidePageSpecificSprites(void)
{
// Keeps POKéMON, caught ball and status sprites visible.
// Keeps Pok<EFBFBD>mon, caught ball and status sprites visible.
u8 i;
for (i = SPRITE_ARR_ID_TYPE; i < ARRAY_COUNT(sMonSummaryScreen->spriteIds); i++)