mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Bugfixes from #591
This commit is contained in:
parent
c9d2fcabef
commit
e03595a10d
@ -39,10 +39,10 @@ struct SiiRtcInfo
|
||||
u8 alarmMinute;
|
||||
};
|
||||
|
||||
void SiiRtcUnprotect();
|
||||
void SiiRtcProtect();
|
||||
u8 SiiRtcProbe();
|
||||
bool8 SiiRtcReset();
|
||||
void SiiRtcUnprotect(void);
|
||||
void SiiRtcProtect(void);
|
||||
u8 SiiRtcProbe(void);
|
||||
bool8 SiiRtcReset(void);
|
||||
bool8 SiiRtcGetStatus(struct SiiRtcInfo *rtc);
|
||||
bool8 SiiRtcSetStatus(struct SiiRtcInfo *rtc);
|
||||
bool8 SiiRtcGetDateTime(struct SiiRtcInfo *rtc);
|
||||
|
@ -1741,7 +1741,7 @@ static void Select_CopyMonsToPlayerParty(void)
|
||||
{
|
||||
gPlayerParty[i] = sFactorySelectScreen->mons[j].monData;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].monId = sFactorySelectScreen->mons[j].monSetId;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].personality = GetMonData(&gPlayerParty[i].box, MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].abilityBit = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ALT_ABILITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].ivs = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||
break;
|
||||
|
@ -6501,7 +6501,7 @@ static void InitCanRelaseMonVars(void)
|
||||
}
|
||||
|
||||
sub_80CE350(sPSSData->field_2176);
|
||||
sPSSData->field_2174 = GetMonData(&sPSSData->field_2108, MON_DATA_KNOWN_MOVES, sPSSData->field_2176);
|
||||
sPSSData->field_2174 = GetMonData(&sPSSData->field_2108, MON_DATA_KNOWN_MOVES, (u8*)sPSSData->field_2176);
|
||||
if (sPSSData->field_2174 != 0)
|
||||
{
|
||||
sPSSData->field_216D = 0;
|
||||
@ -6559,7 +6559,7 @@ static s8 RunCanReleaseMon(void)
|
||||
{
|
||||
if (sPSSData->field_2170 != TOTAL_BOXES_COUNT || sPSSData->field_2171 != i)
|
||||
{
|
||||
knownMoves = GetMonData(gPlayerParty + i, MON_DATA_KNOWN_MOVES, sPSSData->field_2176);
|
||||
knownMoves = GetMonData(gPlayerParty + i, MON_DATA_KNOWN_MOVES, (u8*)sPSSData->field_2176);
|
||||
sPSSData->field_2174 &= ~(knownMoves);
|
||||
}
|
||||
}
|
||||
@ -6578,7 +6578,7 @@ static s8 RunCanReleaseMon(void)
|
||||
case 1:
|
||||
for (i = 0; i < IN_BOX_COUNT; i++)
|
||||
{
|
||||
knownMoves = GetAndCopyBoxMonDataAt(sPSSData->field_216E, sPSSData->field_216F, MON_DATA_KNOWN_MOVES, sPSSData->field_2176);
|
||||
knownMoves = GetAndCopyBoxMonDataAt(sPSSData->field_216E, sPSSData->field_216F, MON_DATA_KNOWN_MOVES, (u8*)sPSSData->field_2176);
|
||||
if (knownMoves != 0
|
||||
&& !(sPSSData->field_2170 == sPSSData->field_216E && sPSSData->field_2171 == sPSSData->field_216F))
|
||||
{
|
||||
@ -10357,7 +10357,7 @@ bool32 AnyStorageMonWithMove(u16 moveId)
|
||||
{
|
||||
if (GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_SANITY_HAS_SPECIES)
|
||||
&& !GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_SANITY_IS_EGG)
|
||||
&& GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_KNOWN_MOVES, moves))
|
||||
&& GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_KNOWN_MOVES, (u8*)moves))
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -1349,7 +1349,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *a)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
GetMonData(a, MON_DATA_OT_NAME, &sum->OTName);
|
||||
GetMonData(a, MON_DATA_OT_NAME, sum->OTName);
|
||||
ConvertInternationalString((u8*)&sum->OTName, GetMonData(a, MON_DATA_LANGUAGE));
|
||||
sum->unk7 = sub_81B205C(a);
|
||||
sum->OTGender = GetMonData(a, MON_DATA_OT_GENDER);
|
||||
|
@ -76,19 +76,19 @@ static void DisableGpioPortRead();
|
||||
|
||||
static const char AgbLibRtcVersion[] = "SIIRTC_V001";
|
||||
|
||||
void SiiRtcUnprotect()
|
||||
void SiiRtcUnprotect(void)
|
||||
{
|
||||
EnableGpioPortRead();
|
||||
sLocked = FALSE;
|
||||
}
|
||||
|
||||
void SiiRtcProtect()
|
||||
void SiiRtcProtect(void)
|
||||
{
|
||||
DisableGpioPortRead();
|
||||
sLocked = TRUE;
|
||||
}
|
||||
|
||||
u8 SiiRtcProbe()
|
||||
u8 SiiRtcProbe(void)
|
||||
{
|
||||
u8 errorCode;
|
||||
struct SiiRtcInfo rtc;
|
||||
@ -129,7 +129,7 @@ u8 SiiRtcProbe()
|
||||
return (errorCode << 4) | 1;
|
||||
}
|
||||
|
||||
bool8 SiiRtcReset()
|
||||
bool8 SiiRtcReset(void)
|
||||
{
|
||||
u8 result;
|
||||
struct SiiRtcInfo rtc;
|
||||
|
Loading…
Reference in New Issue
Block a user