mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-04-24 06:57:36 -05:00
Misc labeling
This commit is contained in:
parent
60b8bae449
commit
dfbde59cf4
|
|
@ -10,7 +10,7 @@ void PalParkTransfer_Init(PalParkTransfer *transferData);
|
|||
void sub_0202EF04(PalParkTransfer *transferData);
|
||||
void BoxMonToTransferData(PalParkTransfer *transfer, BoxPokemon *boxMon, int param2);
|
||||
void sub_0202EFB8(PalParkTransfer *transferData, u32 param1);
|
||||
void TransferDataToMon(const PalParkTransfer *transferData, int param1, Pokemon *param2);
|
||||
void TransferDataToMon(const PalParkTransfer *transferData, int slot, Pokemon *param2);
|
||||
int GetPalParkTransferMonCount(const PalParkTransfer *transferData);
|
||||
int sub_0202F050(const PalParkTransfer *transferData, u32 param1);
|
||||
BOOL sub_0202F088(const PalParkTransfer *transferData);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
#include "pokemon.h"
|
||||
#include "savedata.h"
|
||||
|
||||
void sub_0202F180(SaveData *param0, const Pokemon *param1);
|
||||
void sub_0202F180(SaveData *saveData, const Pokemon *mon);
|
||||
|
||||
#endif // POKEPLATINUM_UNK_0202F180_H
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
void PCBoxes_Init(PCBoxes *param0);
|
||||
u32 PCBoxes_SaveSize(void);
|
||||
BOOL sub_02079868(PCBoxes *param0, BoxPokemon *boxMon);
|
||||
BOOL sub_02079868(PCBoxes *boxes, BoxPokemon *boxMon);
|
||||
BOOL sub_020798A0(PCBoxes *param0, u32 param1, BoxPokemon *boxMon);
|
||||
BOOL sub_02079914(PCBoxes *param0, u32 param1, u32 param2, BoxPokemon *boxMon);
|
||||
void sub_02079968(PCBoxes *param0, u32 param1, u32 param2);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
PokemonInfoDisplayStruct *sub_02092494(Pokemon *param0, BOOL param1, int heapID);
|
||||
void sub_0209282C(PokemonInfoDisplayStruct *param0);
|
||||
void sub_0209304C(Pokemon *param0, TrainerInfo *param1, int param2, int param3, int param4);
|
||||
void UpdateMonStatusAndTrainerInfo(Pokemon *mon, TrainerInfo *trainerInfo, int sel, int metLocation, int heapID);
|
||||
void UpdateBoxMonStatusAndTrainerInfo(BoxPokemon *boxMon, TrainerInfo *trainerInfo, int sel, int metLocation, int heapID);
|
||||
|
||||
#endif // POKEPLATINUM_UNK_02092494_H
|
||||
|
|
|
|||
|
|
@ -2628,7 +2628,7 @@ void Egg_CreateEgg(Pokemon *egg, u16 species, u8 param2, TrainerInfo *trainerInf
|
|||
Strbuf_Free(otName);
|
||||
}
|
||||
|
||||
sub_0209304C(egg, trainerInfo, param4, metLocation, 0);
|
||||
UpdateMonStatusAndTrainerInfo(egg, trainerInfo, param4, metLocation, HEAP_ID_SYSTEM);
|
||||
}
|
||||
|
||||
void ov5_021E6DE8(Pokemon *param0, u16 param1, UnkStruct_02026310 *param2, u32 param3, u8 param4)
|
||||
|
|
@ -2693,7 +2693,7 @@ void ov5_021E6EA8(UnkStruct_02026310 *param0, Party *param1, TrainerInfo *param2
|
|||
ov5_021E67B0(v3, param0);
|
||||
ov5_021E6948(v3, ov5_021E622C(param0, v1[1]), ov5_021E622C(param0, v1[0]));
|
||||
|
||||
sub_0209304C(v3, param2, 3, SpecialMetLoc_GetId(1, 0), 4);
|
||||
UpdateMonStatusAndTrainerInfo(v3, param2, 3, SpecialMetLoc_GetId(1, 0), HEAP_ID_FIELD);
|
||||
|
||||
if (v0 == 172) {
|
||||
ov5_021E6BD0(v3, param0);
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ static void NpcTrade_CreateMon(Pokemon *mon, NpcTradeMon *npcTradeMon, u32 level
|
|||
Pokemon_SetValue(mon, MON_DATA_OT_GENDER, &npcTradeMon->otGender);
|
||||
Pokemon_SetValue(mon, MON_DATA_LANGUAGE, &npcTradeMon->language);
|
||||
|
||||
sub_0209304C(mon, NULL, 1, MapHeader_GetMapLabelTextID(mapID), heapID);
|
||||
UpdateMonStatusAndTrainerInfo(mon, NULL, 1, MapHeader_GetMapLabelTextID(mapID), heapID);
|
||||
Pokemon_CalcLevelAndStats(mon);
|
||||
|
||||
GF_ASSERT(!Pokemon_IsShiny(mon));
|
||||
|
|
|
|||
|
|
@ -2494,7 +2494,7 @@ static void ov88_0223E694(Party *param0, Party *param1, int param2, int param3,
|
|||
Pokemon_SetValue(v1, MON_DATA_FRIENDSHIP, &v3);
|
||||
}
|
||||
|
||||
sub_0209304C(v1, CommInfo_TrainerInfo(CommSys_CurNetId()), 5, 0, 11);
|
||||
UpdateMonStatusAndTrainerInfo(v1, CommInfo_TrainerInfo(CommSys_CurNetId()), 5, 0, HEAP_ID_FIELDMAP);
|
||||
sub_0207893C(v1);
|
||||
Pokemon_Copy(v0, param4->unk_3C);
|
||||
Pokemon_Copy(v1, param4->unk_40);
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ void ov104_0222E134(SaveData *param0, Pokemon *param1)
|
|||
Pokemon_UpdateAfterCatch(param1, SaveData_GetTrainerInfo(param0), 4, 0, 0, 11);
|
||||
|
||||
v3 = MapHeader_GetMapLabelTextID(562);
|
||||
sub_0209304C(param1, v5, v4, v3, 11);
|
||||
UpdateMonStatusAndTrainerInfo(param1, v5, v4, v3, HEAP_ID_FIELDMAP);
|
||||
|
||||
v2 = MessageLoader_Init(0, 26, 363, HEAP_ID_FIELDMAP);
|
||||
v1 = MessageLoader_GetNewStrbuf(v2, 0);
|
||||
|
|
|
|||
|
|
@ -3467,7 +3467,7 @@ static void ov109_021D3B70(UnkStruct_ov109_021D0F70 *param0, int param1)
|
|||
v4 = Party_GetPokemonBySlotIndex(v2, v0);
|
||||
v5 = Party_GetPokemonBySlotIndex(v3, v1);
|
||||
|
||||
sub_0209304C(v5, CommInfo_TrainerInfo(CommSys_CurNetId()), 5, 0, 11);
|
||||
UpdateMonStatusAndTrainerInfo(v5, CommInfo_TrainerInfo(CommSys_CurNetId()), 5, 0, HEAP_ID_FIELDMAP);
|
||||
Pokemon_Copy(v5, v4);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,12 +109,11 @@ int GetPalParkTransferMonCount(const PalParkTransfer *transferData)
|
|||
|
||||
int sub_0202F050(const PalParkTransfer *transferData, u32 gbaTrainerId)
|
||||
{
|
||||
int v0;
|
||||
s64 v1 = GetTimestamp();
|
||||
|
||||
for (v0 = 0; v0 < 20; v0++) {
|
||||
if (transferData->unk_288[v0] == gbaTrainerId) {
|
||||
return v1 - transferData->unk_2D8[v0];
|
||||
for (int i = 0; i < 20; i++) {
|
||||
if (transferData->unk_288[i] == gbaTrainerId) {
|
||||
return v1 - transferData->unk_2D8[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@
|
|||
#include "poketch.h"
|
||||
#include "savedata.h"
|
||||
|
||||
void sub_0202F180(SaveData *saveData, const Pokemon *pokemon)
|
||||
void sub_0202F180(SaveData *saveData, const Pokemon *mon)
|
||||
{
|
||||
if (Pokemon_GetValue((Pokemon *)pokemon, MON_DATA_IS_EGG, NULL) == 0) {
|
||||
if (Pokemon_GetValue((Pokemon *)mon, MON_DATA_IS_EGG, NULL) == FALSE) {
|
||||
Pokedex *pokedex = SaveData_GetPokedex(saveData);
|
||||
|
||||
GameRecords_IncrementTrainerScoreOnCatch(SaveData_GetGameRecordsPtr(saveData), pokedex, Pokemon_GetValue((Pokemon *)pokemon, MON_DATA_SPECIES, NULL));
|
||||
Pokedex_Capture(pokedex, (Pokemon *)pokemon);
|
||||
Poketch_PokemonHistoryEnqueue(SaveData_PoketchData(saveData), (const BoxPokemon *)pokemon);
|
||||
GameRecords_IncrementTrainerScoreOnCatch(SaveData_GetGameRecordsPtr(saveData), pokedex, Pokemon_GetValue((Pokemon *)mon, MON_DATA_SPECIES, NULL));
|
||||
Pokedex_Capture(pokedex, (Pokemon *)mon);
|
||||
Poketch_PokemonHistoryEnqueue(SaveData_PoketchData(saveData), (const BoxPokemon *)mon);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ static void sub_0204BAAC(FieldSystem *fieldSystem, void *param1)
|
|||
Strbuf_Free(v15);
|
||||
}
|
||||
|
||||
sub_0209304C(v4, v1, 4, SpecialMetLoc_GetId(2, v12), 32);
|
||||
UpdateMonStatusAndTrainerInfo(v4, v1, 4, SpecialMetLoc_GetId(2, v12), HEAP_ID_FIELD_TASK);
|
||||
|
||||
if (Pokemon_GetValue(v4, MON_DATA_SPECIES, NULL) == SPECIES_ARCEUS) {
|
||||
if (Pokemon_GetValue(v4, MON_DATA_FATEFUL_ENCOUNTER, NULL) == 1) {
|
||||
|
|
|
|||
|
|
@ -60,25 +60,24 @@ BOOL ScrCmd_254(ScriptContext *ctx)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_255(ScriptContext *param0)
|
||||
BOOL ScrCmd_255(ScriptContext *ctx)
|
||||
{
|
||||
PalParkTransfer *transferData = SaveData_PalParkTransfer(param0->fieldSystem->saveData);
|
||||
PCBoxes *v1 = SaveData_PCBoxes(param0->fieldSystem->saveData);
|
||||
Pokemon *v2 = Pokemon_New(HEAP_ID_FIELD_TASK);
|
||||
TrainerInfo *v3 = SaveData_GetTrainerInfo(param0->fieldSystem->saveData);
|
||||
Pokedex *pokedex = SaveData_GetPokedex(param0->fieldSystem->saveData);
|
||||
PalParkTransfer *transferData = SaveData_PalParkTransfer(ctx->fieldSystem->saveData);
|
||||
PCBoxes *boxes = SaveData_PCBoxes(ctx->fieldSystem->saveData);
|
||||
Pokemon *mon = Pokemon_New(HEAP_ID_FIELD_TASK);
|
||||
TrainerInfo *trainerInfo = SaveData_GetTrainerInfo(ctx->fieldSystem->saveData);
|
||||
Pokedex *pokedex = SaveData_GetPokedex(ctx->fieldSystem->saveData);
|
||||
BOOL v5;
|
||||
int v6;
|
||||
|
||||
for (v6 = 0; v6 < 6; v6++) {
|
||||
TransferDataToMon(transferData, v6, v2);
|
||||
sub_0209304C(v2, v3, 2, 0, 32);
|
||||
v5 = sub_02079868(v1, Pokemon_GetBoxPokemon(v2));
|
||||
for (int i = 0; i < CATCHING_SHOW_MONS; i++) {
|
||||
TransferDataToMon(transferData, i, mon);
|
||||
UpdateMonStatusAndTrainerInfo(mon, trainerInfo, 2, 0, HEAP_ID_FIELD_TASK);
|
||||
v5 = sub_02079868(boxes, Pokemon_GetBoxPokemon(mon));
|
||||
GF_ASSERT(v5);
|
||||
sub_0202F180(param0->fieldSystem->saveData, v2);
|
||||
sub_0202F180(ctx->fieldSystem->saveData, mon);
|
||||
}
|
||||
|
||||
Heap_FreeToHeap(v2);
|
||||
Heap_FreeToHeap(mon);
|
||||
sub_0202EF04(transferData);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -747,9 +747,9 @@ static int DeterminePokemonStatus(Pokemon *param0, BOOL param1, int param2)
|
|||
return v0;
|
||||
}
|
||||
|
||||
void sub_0209304C(Pokemon *param0, TrainerInfo *param1, int param2, int param3, int param4)
|
||||
void UpdateMonStatusAndTrainerInfo(Pokemon *mon, TrainerInfo *trainerInfo, int sel, int metLocation, int heapID)
|
||||
{
|
||||
UpdateBoxMonStatusAndTrainerInfo(¶m0->box, param1, param2, param3, param4);
|
||||
UpdateBoxMonStatusAndTrainerInfo(&mon->box, trainerInfo, sel, metLocation, heapID);
|
||||
}
|
||||
|
||||
void UpdateBoxMonStatusAndTrainerInfo(BoxPokemon *boxMon, TrainerInfo *trainerInfo, int sel, int metLocation, int heapID)
|
||||
|
|
|
|||
|
|
@ -208,16 +208,16 @@ static BOOL sub_0209843C(FieldTask *param0)
|
|||
FieldSystem *fieldSystem = FieldTask_GetFieldSystem(param0);
|
||||
|
||||
{
|
||||
Pokemon *v2 = v0->unk_0C.unk_00;
|
||||
TrainerInfo *v3 = SaveData_GetTrainerInfo(FieldSystem_GetSaveData(fieldSystem));
|
||||
Pokemon *mon = v0->unk_0C.unk_00;
|
||||
TrainerInfo *trainerInfo = SaveData_GetTrainerInfo(FieldSystem_GetSaveData(fieldSystem));
|
||||
int v4 = 6;
|
||||
int v5 = MapHeader_GetMapLabelTextID(fieldSystem->location->mapId);
|
||||
int v6 = 11;
|
||||
int v7 = 0;
|
||||
int location = MapHeader_GetMapLabelTextID(fieldSystem->location->mapId);
|
||||
int heapID = HEAP_ID_FIELDMAP;
|
||||
int isEgg = FALSE;
|
||||
|
||||
Pokemon_SetValue(v2, MON_DATA_IS_EGG, &v7);
|
||||
sub_0209304C(v2, v3, v4, v5, v6);
|
||||
Pokemon_SetValue(v2, MON_DATA_SPECIES_NAME, NULL);
|
||||
Pokemon_SetValue(mon, MON_DATA_IS_EGG, &isEgg);
|
||||
UpdateMonStatusAndTrainerInfo(mon, trainerInfo, v4, location, heapID);
|
||||
Pokemon_SetValue(mon, MON_DATA_SPECIES_NAME, NULL);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user