Fixes for make modern.

This commit is contained in:
Ariel A 2023-10-15 00:52:34 -04:00
parent a63242d96f
commit 4689f0b0d0
4 changed files with 7 additions and 4 deletions

View File

@ -1387,7 +1387,7 @@ static void DestroyFogHorizontalSprites(void);
// Updates just the color of shadows to match special weather blending
u8 UpdateShadowColor(u16 color) {
u8 paletteNum = IndexOfSpritePaletteTag(TAG_WEATHER_START);
u16 tempBuffer[16];
u16 ALIGNED(4) tempBuffer[16];
u16 blendedColor;
if (paletteNum != 0xFF) {
u16 index = (paletteNum+16)*16+SHADOW_COLOR_INDEX;

View File

@ -892,8 +892,10 @@ static void LoadTilesetPalette(struct Tileset const *tileset, u16 destOffset, u1
}
else if (tileset->isSecondary == TRUE)
{
// (void*) is to silence 'source potentially unaligned' error
// All 'gTilesetPalettes_' arrays should have ALIGNED(4) in them
if (skipFaded)
CpuFastCopy(tileset->palettes[NUM_PALS_IN_PRIMARY], &gPlttBufferUnfaded[destOffset], size);
CpuFastCopy((void*)tileset->palettes[NUM_PALS_IN_PRIMARY], &gPlttBufferUnfaded[destOffset], size);
else
LoadPaletteFast(tileset->palettes[NUM_PALS_IN_PRIMARY], destOffset, size);
low = NUM_PALS_IN_PRIMARY;

View File

@ -297,7 +297,7 @@ const struct FollowerMsgInfoExtended gFollowerConditionalMessages[COND_MSG_COUNT
[COND_MSG_BURN] =
{
.text = sCondMsg42,
.st = {.status STATUS1_BURN},
.st = {.status = STATUS1_BURN},
.stFlags = ST_FLAGS_STATUS,
.emotion = FOLLOWER_EMOTION_SAD,
},

View File

@ -1227,7 +1227,8 @@ void AvgPaletteWeighted(u16 *src0, u16 *src1, u16 *dst, u16 weight0) {
r0 = r1 + (((r0 - r1) * weight0) >> 8);
g0 = g1 + (((g0 - g1) * weight0) >> 8);
b0 = b1 + (((b0 - b1) * weight0) >> 8);
*dst++ = (*dst & RGB_ALPHA) | RGB2(r0, g0, b0); // preserve high bit of dst
*dst = (*dst & RGB_ALPHA) | RGB2(r0, g0, b0); // preserve high bit of dst
dst++;
}
}