thru sub_8011B94

This commit is contained in:
jiangzhengwenjz
2019-10-16 13:38:21 +08:00
parent a6c0088073
commit f03807931f
17 changed files with 1236 additions and 3707 deletions
+1191
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -134,7 +134,7 @@ bool32 IsEnigmaBerryValid(void)
return TRUE;
}
const struct Berry * sub_809C8A0(u8 berryIdx)
const struct Berry * GetBerryInfo(u8 berryIdx)
{
if (berryIdx == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) && IsEnigmaBerryValid())
return (struct Berry *)&gSaveBlock1Ptr->enigmaBerry.berry;
@@ -163,7 +163,7 @@ u16 BerryTypeToItemId(u16 berryType)
void GetBerryNameByBerryType(u8 berryType, u8 * dest)
{
const struct Berry * berry = sub_809C8A0(berryType);
const struct Berry * berry = GetBerryInfo(berryType);
memcpy(dest, berry->name, 6);
dest[6] = EOS;
}
+1 -1
View File
@@ -73,7 +73,7 @@ void CopyItemName(u16 itemId, u8 * dest)
{
if (itemId == ITEM_ENIGMA_BERRY)
{
StringCopy(dest, sub_809C8A0(43)->name);
StringCopy(dest, GetBerryInfo(43)->name);
StringAppend(dest, gUnknown_84162BD);
}
else
+1 -1
View File
@@ -1025,7 +1025,7 @@ bool8 IsLinkTaskFinished(void)
{
if (gWirelessCommType == 1)
{
return IsRfuTaskFinished();
return IsLinkRfuTaskFinished();
}
return gLinkCallback == NULL;
}
+2 -2
View File
@@ -1374,7 +1374,7 @@ void task00_mystery_gift(u8 taskId)
}
break;
case 13:
if (IsRfuTaskFinished())
if (IsLinkRfuTaskFinished())
{
DestroyWirelessStatusIndicatorSprite();
data->state = 14;
@@ -1650,7 +1650,7 @@ void task00_mystery_gift(u8 taskId)
data->state = 34;
break;
case 34:
if (IsRfuTaskFinished())
if (IsLinkRfuTaskFinished())
{
DestroyWirelessStatusIndicatorSprite();
data->state = 35;
+3 -3
View File
@@ -141,7 +141,7 @@ void sub_812C224(void)
}
for (r3 = 0; r3 < 7; r3++)
{
r5->v1[0][r3] = gLinkPlayers[gBattleStruct->field_B5 ^ 1].name[r3];
r5->v1[0][r3] = gLinkPlayers[gBattleStruct->multiplayerId ^ 1].name[r3];
}
}
sub_8113550(r8, (const u16 *)r5);
@@ -153,12 +153,12 @@ void sub_812C334(s32 * a0, s32 * a1)
{
s32 r5;
s32 _optimized_out = 0;
u8 r2 = gLinkPlayers[gBattleStruct->field_B5].id ^ 2;
u8 r2 = gLinkPlayers[gBattleStruct->multiplayerId].id ^ 2;
for (r5 = 0; r5 < 4; r5++)
{
if (r2 == gLinkPlayers[r5].id)
a0[0] = r5;
else if (r5 != gBattleStruct->field_B5)
else if (r5 != gBattleStruct->multiplayerId)
a1[_optimized_out++] = r5;
}
}