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