Fix compiler errors with C17

This commit is contained in:
Andrew Strauss
2025-08-18 19:05:23 +00:00
parent ba5cada414
commit 70802c357e
9 changed files with 15 additions and 12 deletions

View File

@@ -45,15 +45,15 @@ void RtcCalcLocalTimeOffset(s32 days, s32 hours, s32 minutes, s32 seconds);
void CalcTimeDifference(struct Time *result, struct Time *t1, struct Time *t2);
u32 RtcGetMinuteCount(void);
u32 RtcGetLocalDayCount(void);
/*void RtcAdvanceTime(u32 hours, u32 minutes, u32 seconds);
void RtcAdvanceTimeTo(u32 hour, u32 minute, u32 second);
void RtcAdvanceTime(u32 hours, u32 minutes, u32 seconds);
void RtcGetInfoFake(struct SiiRtcInfo *rtc);
void RtcCalcTimeDifferenceFake(struct SiiRtcInfo *rtc, struct Time *result, struct Time *t);
/*void RtcAdvanceTimeTo(u32 hour, u32 minute, u32 second);
u16 ConvertDateToDayCountFake(u8 year, u8 month, u8 day);
u16 RtcGetDayCountFake(struct SiiRtcInfo *rtc);
void RtcInitFake(void);
u16 RtcGetErrorStatusFake(void);
void RtcGetInfoFake(struct SiiRtcInfo *rtc);
u16 RtcCheckInfoFake(struct SiiRtcInfo *rtc);
void RtcResetFake(void);
void RtcCalcTimeDifferenceFake(struct SiiRtcInfo *rtc, struct Time *result, struct Time *t);*/
void RtcResetFake(void);*/
#endif // GUARD_RTC_UTIL_H

0
src/data/region_map/region_map_entries.h Executable file → Normal file
View File

View File

@@ -2208,7 +2208,7 @@ static bool8 GetFollowerInfo(u16 *species, u8 *form, u8 *shiny)
if (gSaveBlock2Ptr->optionsfollowerEnable == 0)
return GetMonInfo(GetFirstLiveMon(), species, form, shiny);
else
return;
return FALSE;
}
void UpdateFollowingPokemon(void) { // Update following pokemon if any

View File

@@ -4367,16 +4367,17 @@ bool16 TryChangeDeoxysForm(void)
break;
default:
gSpecialVar_Result = FALSE;
return;
return FALSE;
}
SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES, &targetSpecies);
CalculateMonStats(&gPlayerParty[gSpecialVar_0x8004]);
gSpecialVar_Result = TRUE;
return;
return TRUE;
}
gSpecialVar_Result = FALSE;
return FALSE;
}
// Sets the HP EVs of the Pokémon in gSpecialVar_0x8004 according to the current value of var 0x8000

View File

@@ -42,6 +42,7 @@
#include "constants/item_effects.h"
#include "constants/items.h"
#include "constants/songs.h"
#include "script_pokemon_util.h"
#include "tx_randomizer_and_challenges.h"
#include "battle_setup.h" //tx_randomizer_and_challenges

View File

@@ -1,5 +1,6 @@
#include "global.h"
#include "play_time.h"
#include "rtc.h"
enum
{

View File

@@ -7097,7 +7097,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode)
sStorage->displayMonPalette = GetMonSpritePalFromSpeciesAndPersonality(sStorage->displayMonSpecies, otId, sStorage->displayMonPersonality);
gender = GetGenderFromSpeciesAndPersonality(sStorage->displayMonSpecies, sStorage->displayMonPersonality);
sStorage->displayMonItemId = GetBoxMonData(boxMon, MON_DATA_HELD_ITEM);
sStorage->displayMonNuzlockeRibbon = GetMonData(boxMon, MON_DATA_NUZLOCKE_RIBBON);
sStorage->displayMonNuzlockeRibbon = GetBoxMonData(boxMon, MON_DATA_NUZLOCKE_RIBBON);
}
}
else

View File

@@ -369,7 +369,7 @@ struct Time* GetFakeRtc(void)
u16 ConvertDateToDayCountFake(u8 year, u8 month, u8 day)
{
return &gSaveBlock2Ptr->fakeRTC;
return gSaveBlock2Ptr->fakeRTC.days;
}
u16 RtcGetDayCountFake(struct SiiRtcInfo *rtc)

View File

@@ -66,8 +66,8 @@ bool32 IsMirageIslandPresent(void)
return TRUE;
} while (++curMon < partyEnd);
struct BoxPokemon * curBoxMon = &gPokemonStoragePtr->boxes[0];
struct BoxPokemon * boxMonEnd = &gPokemonStoragePtr->boxes[TOTAL_BOXES_COUNT * IN_BOX_COUNT];
struct BoxPokemon * curBoxMon = &(gPokemonStoragePtr->boxes[0][0]);
struct BoxPokemon * boxMonEnd = &(gPokemonStoragePtr->boxes[TOTAL_BOXES_COUNT][IN_BOX_COUNT]);
do {
species = curBoxMon->hasSpecies;