From 825cc22c0b64d5dda4de902979fd92aa157e3169 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 11:04:51 -0800 Subject: [PATCH 01/16] Clean up + document BattleIO_SlideHealthbar[In,Out] --- include/battle/battle_display.h | 5 +-- include/battle/battle_io.h | 20 ++++++++- include/constants/battle/battle_io.h | 3 ++ include/overlay016/struct_ov16_0225C23C.h | 19 -------- include/struct_defs/battle_io.h | 15 +++++++ src/overlay016/battle_display.c | 27 ++++++------ src/overlay016/battle_io.c | 53 +++++++++++------------ src/overlay016/battle_io_command.c | 3 +- src/overlay016/battle_script.c | 24 +++++----- 9 files changed, 90 insertions(+), 79 deletions(-) delete mode 100644 include/overlay016/struct_ov16_0225C23C.h diff --git a/include/battle/battle_display.h b/include/battle/battle_display.h index 2fb2969ab8..687f24b88a 100644 --- a/include/battle/battle_display.h +++ b/include/battle/battle_display.h @@ -3,10 +3,10 @@ #include "struct_decls/sprite_decl.h" #include "struct_decls/battle_system.h" +#include "struct_defs/battle_io.h" #include "overlay016/struct_ov16_0225BFFC_decl.h" #include "overlay016/struct_ov16_0225C168.h" #include "overlay016/struct_ov16_0225C17C.h" -#include "overlay016/struct_ov16_0225C23C.h" #include "overlay016/struct_ov16_0225C260.h" #include "overlay016/struct_ov16_0225C29C.h" #include "overlay016/struct_ov16_0225C2B0.h" @@ -27,7 +27,6 @@ #include "overlay016/struct_ov16_0225C454.h" #include "overlay016/struct_ov16_0225C468.h" #include "overlay016/struct_ov16_0225C65C.h" -#include "struct_defs/battle_io.h" #include "overlay016/struct_ov16_0225C9F0.h" #include "overlay016/struct_ov16_0225CA4C.h" #include "overlay016/struct_ov16_0225CA60.h" @@ -52,7 +51,7 @@ void ov16_0225D228(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0 void ov16_0225D360(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02265154 * param2); void ov16_0225D3CC(BattleSystem * param0, BattlerData * param1); void ov16_0225D414(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_022651A8 * param2); -void ov16_0225D4A8(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C23C * param2); +void ov16_0225D4A8(BattleSystem * param0, BattlerData * param1, HealthbarData * param2); void ov16_0225D570(BattleSystem * param0, BattlerData * param1); void ov16_0225D5B8(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C260 * param2); void ov16_0225D698(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_022656F0 * param2); diff --git a/include/battle/battle_io.h b/include/battle/battle_io.h index dd1dbe39ae..9cdf01e02f 100644 --- a/include/battle/battle_io.h +++ b/include/battle/battle_io.h @@ -19,8 +19,24 @@ void BattleIO_SetTrainerEncounter(BattleSystem * param0, int param1); void BattleIO_ThrowTrainerBall(BattleSystem * param0, int param1, int param2); void BattleIO_SlideTrainerOut(BattleSystem * param0, int param1); void BattleIO_SlideTrainerIn(BattleSystem * param0, int param1, int param2); -void BattleIO_SlideHPGaugeIn(BattleSystem * param0, BattleContext * param1, int param2, int param3); -void BattleIO_SlideHPGaugeOut(BattleSystem * param0, int param1); + +/** + * @brief Slide the healthbar into the screen for a given battler. + * + * @param battleSys + * @param battleCtx + * @param battler + * @param delay Optional frame-delay to wait until execution. + */ +void BattleIO_SlideHealthbarIn(BattleSystem *battleSys, BattleContext *battleCtx, int battler, int delay); + +/** + * @brief Slide the healthbar out of the screen for a given battler. + * + * @param battleSys + * @param battler + */ +void BattleIO_SlideHealthbarOut(BattleSystem *battleSys, int battler); void BattleIO_SetCommandSelection(BattleSystem *battleSys, BattleContext *battleCtx, int battler, int partySlot); void ov16_022656D4(BattleSystem * param0, int param1, int param2); void BattleIO_ShowMoveSelectScreen(BattleSystem *battleSys, BattleContext *battleCtx, int battler); diff --git a/include/constants/battle/battle_io.h b/include/constants/battle/battle_io.h index 1d62a7250f..0a2b11cf55 100644 --- a/include/constants/battle/battle_io.h +++ b/include/constants/battle/battle_io.h @@ -2,6 +2,9 @@ #define POKEPLATINUM_CONSTANTS_BATTLE_BATTLE_IO_H enum BattleIOCommand { + BTLIOCMD_SLIDE_HEALTHBAR_IN = 12, + BTLIOCMD_SLIDE_HEALTHBAR_OUT, + BTLIOCMD_PRINT_MESSAGE = 21, BTLIOCMD_SHOW_BATTLE_START_PARTY_GAUGE = 48, diff --git a/include/overlay016/struct_ov16_0225C23C.h b/include/overlay016/struct_ov16_0225C23C.h deleted file mode 100644 index 1789172e8a..0000000000 --- a/include/overlay016/struct_ov16_0225C23C.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_OV16_0225C23C_H -#define POKEPLATINUM_STRUCT_OV16_0225C23C_H - -typedef struct { - u8 unk_00; - u8 unk_01; - s16 unk_02; - u16 unk_04; - u8 unk_06; - u8 unk_07_0 : 5; - u8 unk_07_5 : 2; - u8 unk_07_7 : 1; - u32 unk_08; - u32 unk_0C; - int unk_10; - u8 unk_14; -} UnkStruct_ov16_0225C23C; - -#endif // POKEPLATINUM_STRUCT_OV16_0225C23C_H diff --git a/include/struct_defs/battle_io.h b/include/struct_defs/battle_io.h index 7d568956ee..6c1c72d376 100644 --- a/include/struct_defs/battle_io.h +++ b/include/struct_defs/battle_io.h @@ -17,4 +17,19 @@ typedef struct PartyGaugeData { u8 status[MAX_PARTY_SIZE]; } PartyGaugeData; +typedef struct HealthbarData { + u8 command; + u8 level; + s16 curHP; + u16 maxHP; + u8 selectedPartySlot; + u8 status : 5; + u8 gender : 2; + u8 speciesCaught : 1; + u32 expFromLastLevel; + u32 expToNextLevel; + int numSafariBalls; + u8 delay; +} HealthbarData; + #endif // POKEPLATINUM_STRUCT_BATTLE_IO_H diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index 7b75daca60..0280e69e70 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -46,7 +46,6 @@ #include "overlay016/struct_ov16_0225BFFC_t.h" #include "overlay016/struct_ov16_0225C168.h" #include "overlay016/struct_ov16_0225C17C.h" -#include "overlay016/struct_ov16_0225C23C.h" #include "overlay016/struct_ov16_0225C260.h" #include "overlay016/struct_ov16_0225C29C.h" #include "overlay016/struct_ov16_0225C2B0.h" @@ -622,7 +621,7 @@ void ov16_0225D414 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ SysTask_Start(ov16_02260384, v3, 0); } -void ov16_0225D4A8 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C23C * param2) +void ov16_0225D4A8 (BattleSystem * param0, BattlerData * param1, HealthbarData * param2) { UnkStruct_ov16_022674C4 * v0; @@ -632,19 +631,19 @@ void ov16_0225D4A8 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_0C = param0; v0->unk_24 = param1->battler; v0->unk_25 = ov16_0226825C(param1->battlerType, BattleSystem_BattleType(param0)); - v0->unk_4C = param2->unk_00; - v0->unk_28 = param2->unk_02; - v0->unk_2C = param2->unk_04; - v0->unk_48 = param2->unk_01; - v0->unk_49 = param2->unk_07_5; + v0->unk_4C = param2->command; + v0->unk_28 = param2->curHP; + v0->unk_2C = param2->maxHP; + v0->unk_48 = param2->level; + v0->unk_49 = param2->gender; v0->unk_30 = 0; - v0->unk_38 = param2->unk_08; - v0->unk_3C = param2->unk_0C; - v0->unk_26 = param2->unk_06; - v0->unk_4A = param2->unk_07_0; - v0->unk_4B = param2->unk_07_7; - v0->unk_4D = param2->unk_14; - v0->unk_27 = param2->unk_10; + v0->unk_38 = param2->expFromLastLevel; + v0->unk_3C = param2->expToNextLevel; + v0->unk_26 = param2->selectedPartySlot; + v0->unk_4A = param2->status; + v0->unk_4B = param2->speciesCaught; + v0->unk_4D = param2->delay; + v0->unk_27 = param2->numSafariBalls; ov16_02267620(v0, 0); ov16_02267084(v0, v0->unk_28, 0xffffffff); diff --git a/src/overlay016/battle_io.c b/src/overlay016/battle_io.c index ceaa37077a..9ffbcc40d7 100644 --- a/src/overlay016/battle_io.c +++ b/src/overlay016/battle_io.c @@ -1,6 +1,8 @@ #include #include +#include "consts/generated/c/gender.h" + #include "constants/pokemon.h" #include "constants/species.h" #include "constants/battle/battle_io.h" @@ -18,7 +20,6 @@ #include "overlay016/struct_ov16_0225BFFC_t.h" #include "overlay016/struct_ov16_0225C168.h" #include "overlay016/struct_ov16_0225C17C.h" -#include "overlay016/struct_ov16_0225C23C.h" #include "overlay016/struct_ov16_0225C260.h" #include "overlay016/struct_ov16_0225C29C.h" #include "overlay016/struct_ov16_0225C2B0.h" @@ -458,43 +459,41 @@ void BattleIO_SlideTrainerIn (BattleSystem * param0, int param1, int param2) SendMessage(param0, 1, param1, &v0, sizeof(UnkStruct_ov16_022651A8)); } -void BattleIO_SlideHPGaugeIn (BattleSystem * param0, BattleContext * param1, int param2, int param3) +void BattleIO_SlideHealthbarIn(BattleSystem *battleSys, BattleContext *battleCtx, int battler, int delay) { - UnkStruct_ov16_0225C23C v0; - Pokemon * v1; - int v2; - int v3; + HealthbarData healthbar; - v1 = BattleSystem_PartyPokemon(param0, param2, param1->selectedPartySlot[param2]); - v2 = Pokemon_GetValue(v1, MON_DATA_SPECIES, NULL); - v3 = Pokemon_GetValue(v1, MON_DATA_LEVEL, NULL); + Pokemon *mon = BattleSystem_PartyPokemon(battleSys, battler, battleCtx->selectedPartySlot[battler]); + int species = Pokemon_GetValue(mon, MON_DATA_SPECIES, NULL); + int level = Pokemon_GetValue(mon, MON_DATA_LEVEL, NULL); - v0.unk_00 = 12; - v0.unk_01 = param1->battleMons[param2].level; - v0.unk_02 = param1->battleMons[param2].curHP; - v0.unk_04 = param1->battleMons[param2].maxHP; - v0.unk_06 = param1->selectedPartySlot[param2]; - v0.unk_07_0 = Battler_StatusCondition(param1, param2); + healthbar.command = BTLIOCMD_SLIDE_HEALTHBAR_IN; + healthbar.level = battleCtx->battleMons[battler].level; + healthbar.curHP = battleCtx->battleMons[battler].curHP; + healthbar.maxHP = battleCtx->battleMons[battler].maxHP; + healthbar.selectedPartySlot = battleCtx->selectedPartySlot[battler]; + healthbar.status = Battler_StatusCondition(battleCtx, battler); - if (((param1->battleMons[param2].species == 29) || (param1->battleMons[param2].species == 32)) && (param1->battleMons[param2].hasNickname == 0)) { - v0.unk_07_5 = 2; + if ((battleCtx->battleMons[battler].species == SPECIES_NIDORAN_F || battleCtx->battleMons[battler].species == SPECIES_NIDORAN_M) + && battleCtx->battleMons[battler].hasNickname == FALSE) { + healthbar.gender = GENDER_NONE; // don't show the Gender marker for base-Nidoran forms } else { - v0.unk_07_5 = param1->battleMons[param2].gender; + healthbar.gender = battleCtx->battleMons[battler].gender; } - v0.unk_08 = param1->battleMons[param2].exp - Pokemon_GetSpeciesBaseExpAt(v2, v3); - v0.unk_0C = Pokemon_GetSpeciesBaseExpAt(v2, v3 + 1) - Pokemon_GetSpeciesBaseExpAt(v2, v3); - v0.unk_07_7 = BattleSystem_CaughtSpecies(param0, param1->battleMons[param2].species); - v0.unk_10 = BattleSystem_NumSafariBalls(param0); - v0.unk_14 = param3; + healthbar.expFromLastLevel = battleCtx->battleMons[battler].exp - Pokemon_GetSpeciesBaseExpAt(species, level); + healthbar.expToNextLevel = Pokemon_GetSpeciesBaseExpAt(species, level + 1) - Pokemon_GetSpeciesBaseExpAt(species, level); + healthbar.speciesCaught = BattleSystem_CaughtSpecies(battleSys, battleCtx->battleMons[battler].species); + healthbar.numSafariBalls = BattleSystem_NumSafariBalls(battleSys); + healthbar.delay = delay; - SendMessage(param0, 1, param2, &v0, sizeof(UnkStruct_ov16_0225C23C)); + SendMessage(battleSys, BTLIO_RECIPIENT_ENQUEUE, battler, &healthbar, sizeof(HealthbarData)); } -void BattleIO_SlideHPGaugeOut (BattleSystem * param0, int param1) +void BattleIO_SlideHealthbarOut(BattleSystem *battleSys, int battler) { - int v0 = 13; - SendMessage(param0, 1, param1, &v0, 4); + int command = BTLIOCMD_SLIDE_HEALTHBAR_OUT; + SendMessage(battleSys, BTLIO_RECIPIENT_ENQUEUE, battler, &command, sizeof(int)); } void BattleIO_SetCommandSelection (BattleSystem *battleSys, BattleContext *battleCtx, int battler, int partySlot) diff --git a/src/overlay016/battle_io_command.c b/src/overlay016/battle_io_command.c index 393cd0dc01..f1d4b6b65d 100644 --- a/src/overlay016/battle_io_command.c +++ b/src/overlay016/battle_io_command.c @@ -20,7 +20,6 @@ #include "overlay016/struct_ov16_0225BFFC_t.h" #include "overlay016/struct_ov16_0225C168.h" #include "overlay016/struct_ov16_0225C17C.h" -#include "overlay016/struct_ov16_0225C23C.h" #include "overlay016/struct_ov16_0225C260.h" #include "overlay016/struct_ov16_0225C29C.h" #include "overlay016/struct_ov16_0225C2B0.h" @@ -394,7 +393,7 @@ static void ov16_0225C228 (BattleSystem * param0, BattlerData * param1) static void ov16_0225C23C (BattleSystem * param0, BattlerData * param1) { - UnkStruct_ov16_0225C23C * v0 = (UnkStruct_ov16_0225C23C *)¶m1->data[0]; + HealthbarData * v0 = (HealthbarData *)¶m1->data[0]; ov16_0225D4A8(param0, param1, v0); ZeroDataBuffer(param1); diff --git a/src/overlay016/battle_script.c b/src/overlay016/battle_script.c index 8df9045236..fb6b022d1d 100644 --- a/src/overlay016/battle_script.c +++ b/src/overlay016/battle_script.c @@ -1369,7 +1369,7 @@ static BOOL BtlCmd_HealthbarSlideIn(BattleSystem *battleSys, BattleContext *batt switch (battlerIn) { case BTLSCR_ALL_BATTLERS: for (i = 0; i < maxBattlers; i++) { - BattleIO_SlideHPGaugeIn(battleSys, battleCtx, i, 0); + BattleIO_SlideHealthbarIn(battleSys, battleCtx, i, 0); } break; @@ -1378,7 +1378,7 @@ static BOOL BtlCmd_HealthbarSlideIn(BattleSystem *battleSys, BattleContext *batt battlerData = BattleSystem_BattlerData(battleSys, i); if ((battlerData->battlerType & BATTLER_TYPE_SOLO_ENEMY) == FALSE) { - BattleIO_SlideHPGaugeIn(battleSys, battleCtx, i, 0); + BattleIO_SlideHealthbarIn(battleSys, battleCtx, i, 0); } } break; @@ -1388,14 +1388,14 @@ static BOOL BtlCmd_HealthbarSlideIn(BattleSystem *battleSys, BattleContext *batt battlerData = BattleSystem_BattlerData(battleSys, i); if (battlerData->battlerType & BATTLER_TYPE_SOLO_ENEMY) { - BattleIO_SlideHPGaugeIn(battleSys, battleCtx, i, 0); + BattleIO_SlideHealthbarIn(battleSys, battleCtx, i, 0); } } break; default: i = BattleScript_Battler(battleSys, battleCtx, battlerIn); - BattleIO_SlideHPGaugeIn(battleSys, battleCtx, i, 0); + BattleIO_SlideHealthbarIn(battleSys, battleCtx, i, 0); break; } @@ -1427,7 +1427,7 @@ static BOOL BtlCmd_HealthbarSlideInDelay(BattleSystem *battleSys, BattleContext switch (battlerIn) { case BTLSCR_ALL_BATTLERS: for (i = 0; i < maxBattlers; i++) { - BattleIO_SlideHPGaugeIn(battleSys, battleCtx, i, 0); + BattleIO_SlideHealthbarIn(battleSys, battleCtx, i, 0); } break; @@ -1436,7 +1436,7 @@ static BOOL BtlCmd_HealthbarSlideInDelay(BattleSystem *battleSys, BattleContext battlerData = BattleSystem_BattlerData(battleSys, i); if ((battlerData->battlerType & BATTLER_TYPE_SOLO_ENEMY) == FALSE) { - BattleIO_SlideHPGaugeIn(battleSys, battleCtx, i, wait); + BattleIO_SlideHealthbarIn(battleSys, battleCtx, i, wait); wait += 4; } } @@ -1447,7 +1447,7 @@ static BOOL BtlCmd_HealthbarSlideInDelay(BattleSystem *battleSys, BattleContext battlerData = BattleSystem_BattlerData(battleSys, i); if (battlerData->battlerType & BATTLER_TYPE_SOLO_ENEMY) { - BattleIO_SlideHPGaugeIn(battleSys, battleCtx, i, wait); + BattleIO_SlideHealthbarIn(battleSys, battleCtx, i, wait); wait += 4; } } @@ -1455,7 +1455,7 @@ static BOOL BtlCmd_HealthbarSlideInDelay(BattleSystem *battleSys, BattleContext default: i = BattleScript_Battler(battleSys, battleCtx, battlerIn); - BattleIO_SlideHPGaugeIn(battleSys, battleCtx, i, wait); + BattleIO_SlideHealthbarIn(battleSys, battleCtx, i, wait); break; } @@ -1485,7 +1485,7 @@ static BOOL BtlCmd_HealthbarSlideOut(BattleSystem *battleSys, BattleContext *bat switch (battlerIn) { case BTLSCR_ALL_BATTLERS: for (i = 0; i < maxBattlers; i++) { - BattleIO_SlideHPGaugeOut(battleSys, i); + BattleIO_SlideHealthbarOut(battleSys, i); } break; @@ -1495,7 +1495,7 @@ static BOOL BtlCmd_HealthbarSlideOut(BattleSystem *battleSys, BattleContext *bat if ((battlerData->battlerType & BATTLER_TYPE_SOLO_ENEMY) == FALSE && (battleCtx->battlersSwitchingMask & FlagIndex(i)) == FALSE) { - BattleIO_SlideHPGaugeOut(battleSys, i); + BattleIO_SlideHealthbarOut(battleSys, i); } } break; @@ -1505,14 +1505,14 @@ static BOOL BtlCmd_HealthbarSlideOut(BattleSystem *battleSys, BattleContext *bat battlerData = BattleSystem_BattlerData(battleSys, i); if (battlerData->battlerType & BATTLER_TYPE_SOLO_ENEMY) { - BattleIO_SlideHPGaugeOut(battleSys, i); + BattleIO_SlideHealthbarOut(battleSys, i); } } break; default: i = BattleScript_Battler(battleSys, battleCtx, battlerIn); - BattleIO_SlideHPGaugeOut(battleSys, i); + BattleIO_SlideHealthbarOut(battleSys, i); break; } From 40e08d5f5d33a881acfb32b4e236d82a46d70ef8 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 11:17:15 -0800 Subject: [PATCH 02/16] Document BtlIOCmd_SlideHealthbar[In,Out] --- include/battle/battle_display.h | 4 ++-- src/overlay016/battle_display.c | 4 ++-- src/overlay016/battle_io_command.c | 34 ++++++++++++++++++++---------- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/include/battle/battle_display.h b/include/battle/battle_display.h index 687f24b88a..d5779ad05e 100644 --- a/include/battle/battle_display.h +++ b/include/battle/battle_display.h @@ -51,8 +51,8 @@ void ov16_0225D228(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0 void ov16_0225D360(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02265154 * param2); void ov16_0225D3CC(BattleSystem * param0, BattlerData * param1); void ov16_0225D414(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_022651A8 * param2); -void ov16_0225D4A8(BattleSystem * param0, BattlerData * param1, HealthbarData * param2); -void ov16_0225D570(BattleSystem * param0, BattlerData * param1); +void BattleDisplay_SlideHealthbarIn(BattleSystem * param0, BattlerData * param1, HealthbarData * param2); +void BattleDisplay_SlideHealthbarOut(BattleSystem * param0, BattlerData * param1); void ov16_0225D5B8(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C260 * param2); void ov16_0225D698(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_022656F0 * param2); void ov16_0225D708(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C29C * param2); diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index 0280e69e70..c637268a19 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -621,7 +621,7 @@ void ov16_0225D414 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ SysTask_Start(ov16_02260384, v3, 0); } -void ov16_0225D4A8 (BattleSystem * param0, BattlerData * param1, HealthbarData * param2) +void BattleDisplay_SlideHealthbarIn (BattleSystem * param0, BattlerData * param1, HealthbarData * param2) { UnkStruct_ov16_022674C4 * v0; @@ -651,7 +651,7 @@ void ov16_0225D4A8 (BattleSystem * param0, BattlerData * param1, HealthbarData * v0->unk_10 = SysTask_Start(ov16_0226040C, v0, 1000); } -void ov16_0225D570 (BattleSystem * param0, BattlerData * param1) +void BattleDisplay_SlideHealthbarOut (BattleSystem * param0, BattlerData * param1) { UnkStruct_ov16_022674C4 * v0; diff --git a/src/overlay016/battle_io_command.c b/src/overlay016/battle_io_command.c index f1d4b6b65d..44493a136c 100644 --- a/src/overlay016/battle_io_command.c +++ b/src/overlay016/battle_io_command.c @@ -100,8 +100,8 @@ static void ov16_0225C1F0(BattleSystem * param0, BattlerData * param1); static void ov16_0225C204(BattleSystem * param0, BattlerData * param1); static void ov16_0225C218(BattleSystem * param0, BattlerData * param1); static void ov16_0225C228(BattleSystem * param0, BattlerData * param1); -static void ov16_0225C23C(BattleSystem * param0, BattlerData * param1); -static void ov16_0225C250(BattleSystem * param0, BattlerData * param1); +static void BtlIOCmd_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battlerData); +static void BtlIOCmd_SlideHealthbarOut(BattleSystem *battleSys, BattlerData *battlerData); static void ov16_0225C260(BattleSystem * param0, BattlerData * param1); static void ov16_0225C288(BattleSystem * param0, BattlerData * param1); static void ov16_0225C29C(BattleSystem * param0, BattlerData * param1); @@ -218,8 +218,8 @@ static const UnkFuncPtr_ov16_0226F068 Unk_ov16_0226F068[] = { ov16_0225C204, ov16_0225C218, ov16_0225C228, - ov16_0225C23C, - ov16_0225C250, + [BTLIOCMD_SLIDE_HEALTHBAR_IN] = BtlIOCmd_SlideHealthbarIn, + [BTLIOCMD_SLIDE_HEALTHBAR_OUT] = BtlIOCmd_SlideHealthbarOut, ov16_0225C260, ov16_0225C288, ov16_0225C29C, @@ -391,18 +391,30 @@ static void ov16_0225C228 (BattleSystem * param0, BattlerData * param1) ZeroDataBuffer(param1); } -static void ov16_0225C23C (BattleSystem * param0, BattlerData * param1) +/** + * @brief Slide a healthbar in on the screen. + * + * @param battleSys + * @param battlerData + */ +static void BtlIOCmd_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battlerData) { - HealthbarData * v0 = (HealthbarData *)¶m1->data[0]; + HealthbarData *healthbar = (HealthbarData *)&battlerData->data[0]; - ov16_0225D4A8(param0, param1, v0); - ZeroDataBuffer(param1); + BattleDisplay_SlideHealthbarIn(battleSys, battlerData, healthbar); + ZeroDataBuffer(battlerData); } -static void ov16_0225C250 (BattleSystem * param0, BattlerData * param1) +/** + * @brief Slide a healthbar out of the screen. + * + * @param battleSys + * @param battlerData + */ +static void BtlIOCmd_SlideHealthbarOut(BattleSystem *battleSys, BattlerData *battlerData) { - ov16_0225D570(param0, param1); - ZeroDataBuffer(param1); + BattleDisplay_SlideHealthbarOut(battleSys, battlerData); + ZeroDataBuffer(battlerData); } static void ov16_0225C260 (BattleSystem * param0, BattlerData * param1) From 92b461ab86b38e51fcff145f0d3c3160ffee98c8 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 18:26:10 -0800 Subject: [PATCH 03/16] Clean up and document BattleDisplay_SlideHealthbar[In,Out] --- include/battle/battle_display.h | 21 +- include/overlay016/ov16_02266F1C.h | 44 ++-- include/overlay016/struct_ov16_0225BFFC_t.h | 2 +- include/overlay016/struct_ov16_022674C4.h | 5 +- .../overlay016/struct_ov16_022674C4_sub1.h | 8 - src/overlay016/battle_display.c | 209 ++++++++++-------- src/overlay016/battle_io_command.c | 2 +- src/overlay016/ov16_0223B140.c | 2 +- src/overlay016/ov16_0223DF00.c | 18 +- src/overlay016/ov16_02266F1C.c | 118 +++++----- 10 files changed, 229 insertions(+), 200 deletions(-) delete mode 100644 include/overlay016/struct_ov16_022674C4_sub1.h diff --git a/include/battle/battle_display.h b/include/battle/battle_display.h index d5779ad05e..2e6bb3d1fb 100644 --- a/include/battle/battle_display.h +++ b/include/battle/battle_display.h @@ -51,8 +51,23 @@ void ov16_0225D228(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0 void ov16_0225D360(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02265154 * param2); void ov16_0225D3CC(BattleSystem * param0, BattlerData * param1); void ov16_0225D414(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_022651A8 * param2); -void BattleDisplay_SlideHealthbarIn(BattleSystem * param0, BattlerData * param1, HealthbarData * param2); -void BattleDisplay_SlideHealthbarOut(BattleSystem * param0, BattlerData * param1); + +/** + * @brief Slide the healthbar into the screen. + * + * @param battleSys + * @param battlerData + * @param healthbarData + */ +void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battlerData, HealthbarData *healthbarData); + +/** + * @brief Slide the healthbar out of the screen. + * + * @param battleSys + * @param battlerData + */ +void BattleDisplay_SlideHealthbarOut(BattleSystem *battleSys, BattlerData *battlerData); void ov16_0225D5B8(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C260 * param2); void ov16_0225D698(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_022656F0 * param2); void ov16_0225D708(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C29C * param2); @@ -138,7 +153,7 @@ void ov16_02263730(BattleSystem * param0, BattlerData * param1); u8 Battler_Type(BattlerData * param0); u8 Battler_BootState(BattlerData * param0); Sprite * ov16_02263AFC(BattlerData * param0); -UnkStruct_ov16_022674C4 * ov16_02263B08(BattlerData * param0); +Healthbar * ov16_02263B08(BattlerData * param0); UnkStruct_ov16_0226C378 * ov16_02263B0C(BattlerData * param0); void ov16_02263B10(BattlerData * param0); void ov16_02263B20(BattlerData * param0, int param1); diff --git a/include/overlay016/ov16_02266F1C.h b/include/overlay016/ov16_02266F1C.h index a65807938d..95d66c9bbe 100644 --- a/include/overlay016/ov16_02266F1C.h +++ b/include/overlay016/ov16_02266F1C.h @@ -10,27 +10,27 @@ void ov16_02266F1C(SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4); CellActorData * ov16_02267060(SpriteRenderer * param0, SpriteGfxHandler * param1, int param2); -void ov16_02267084(UnkStruct_ov16_022674C4 * param0, u32 param1, u32 param2); -void ov16_02267220(UnkStruct_ov16_022674C4 * param0); -void ov16_02267258(UnkStruct_ov16_022674C4 * param0); -void ov16_022672C4(UnkStruct_ov16_022674C4 * param0); -void ov16_02267360(UnkStruct_ov16_022674C4 * param0); -void ov16_0226737C(UnkStruct_ov16_022674C4 * param0); -void ov16_022674C4(UnkStruct_ov16_022674C4 * param0, int param1); -s32 ov16_022674F8(UnkStruct_ov16_022674C4 * param0); -void ov16_0226752C(UnkStruct_ov16_022674C4 * param0, int param1); -s32 ov16_02267560(UnkStruct_ov16_022674C4 * param0); -void ov16_0226757C(UnkStruct_ov16_022674C4 * param0); -void ov16_022675AC(UnkStruct_ov16_022674C4 * param0); -void ov16_022675D8(UnkStruct_ov16_022674C4 * param0, int param1); -void ov16_02267620(UnkStruct_ov16_022674C4 * param0, int param1); -void ov16_0226763C(UnkStruct_ov16_022674C4 * param0, int param1, int param2); -void ov16_022676A8(UnkStruct_ov16_022674C4 * param0, int param1); -u8 ov16_0226825C(int param0, u32 param1); -void ov16_0226834C(UnkStruct_ov16_022674C4 * param0, u8 * param1); -void ov16_02268468(UnkStruct_ov16_022674C4 * param0); -void ov16_0226846C(UnkStruct_ov16_022674C4 * param0); -void ov16_02268470(UnkStruct_ov16_022674C4 * param0); -void ov16_02268498(UnkStruct_ov16_022674C4 * param0); +void Healthbar_Draw(Healthbar * param0, u32 param1, u32 param2); +void ov16_02267220(Healthbar * param0); +void ov16_02267258(Healthbar * param0); +void ov16_022672C4(Healthbar * param0); +void ov16_02267360(Healthbar * param0); +void ov16_0226737C(Healthbar * param0); +void ov16_022674C4(Healthbar * param0, int param1); +s32 ov16_022674F8(Healthbar * param0); +void ov16_0226752C(Healthbar * param0, int param1); +s32 ov16_02267560(Healthbar * param0); +void ov16_0226757C(Healthbar * param0); +void ov16_022675AC(Healthbar * param0); +void ov16_022675D8(Healthbar * param0, int param1); +void Healthbar_Enable(Healthbar * param0, int param1); +void ov16_0226763C(Healthbar * param0, int param1, int param2); +void Healthbar_SetScrollEffect(Healthbar * param0, int param1); +u8 Healthbar_Type(int param0, u32 param1); +void ov16_0226834C(Healthbar * param0, u8 * param1); +void ov16_02268468(Healthbar * param0); +void ov16_0226846C(Healthbar * param0); +void ov16_02268470(Healthbar * param0); +void ov16_02268498(Healthbar * param0); #endif // POKEPLATINUM_OV16_02266F1C_H diff --git a/include/overlay016/struct_ov16_0225BFFC_t.h b/include/overlay016/struct_ov16_0225BFFC_t.h index 0534bdb766..f662bdaf1d 100644 --- a/include/overlay016/struct_ov16_0225BFFC_t.h +++ b/include/overlay016/struct_ov16_0225BFFC_t.h @@ -20,7 +20,7 @@ struct BattlerData { Sprite * unk_1C; Sprite * unk_20; Window * unk_24; - UnkStruct_ov16_022674C4 unk_28; + Healthbar unk_28; UnkStruct_ov16_0226C378 unk_7B; BallRotation * unk_84; UnkStruct_ov12_02223764 * unk_88; diff --git a/include/overlay016/struct_ov16_022674C4.h b/include/overlay016/struct_ov16_022674C4.h index 3567d3e782..fba48c6d54 100644 --- a/include/overlay016/struct_ov16_022674C4.h +++ b/include/overlay016/struct_ov16_022674C4.h @@ -5,10 +5,9 @@ #include "struct_decls/sys_task.h" #include "struct_defs/struct_0205AA50.h" #include "struct_decls/battle_system.h" -#include "overlay016/struct_ov16_022674C4_sub1.h" typedef struct { - UnkStruct_ov16_022674C4_sub1 unk_00; + u8 unk_00; CellActorData * unk_04; CellActorData * unk_08; BattleSystem * unk_0C; @@ -40,6 +39,6 @@ typedef struct { u8 : 4; SysTask * unk_50; u16 unk_54; -} UnkStruct_ov16_022674C4; +} Healthbar; #endif // POKEPLATINUM_STRUCT_OV16_022674C4_H diff --git a/include/overlay016/struct_ov16_022674C4_sub1.h b/include/overlay016/struct_ov16_022674C4_sub1.h deleted file mode 100644 index 694baf8fde..0000000000 --- a/include/overlay016/struct_ov16_022674C4_sub1.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_OV16_022674C4_SUB1_H -#define POKEPLATINUM_STRUCT_OV16_022674C4_SUB1_H - -typedef struct { - u8 unk_00; -} UnkStruct_ov16_022674C4_sub1; - -#endif // POKEPLATINUM_STRUCT_OV16_022674C4_SUB1_H diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index c637268a19..5eddf85b15 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -110,7 +110,6 @@ #include "overlay016/struct_ov16_02265BBC.h" #include "overlay016/struct_ov16_022664F8.h" #include "overlay016/struct_ov16_022674C4.h" -#include "overlay016/struct_ov16_022674C4_sub1.h" #include "overlay016/struct_ov16_02269668.h" #include "overlay016/struct_ov16_0226AC98.h" #include "overlay016/struct_ov16_0226C378.h" @@ -165,8 +164,8 @@ static void ov16_0225FA70(SysTask * param0, void * param1); static void ov16_0225FD5C(SysTask * param0, void * param1); static void ov16_02260384(SysTask * param0, void * param1); static void ov16_02260284(SysTask * param0, void * param1); -static void ov16_0226040C(SysTask * param0, void * param1); -static void ov16_02260480(SysTask * param0, void * param1); +static void SlideHealthbarInTask(SysTask *task, void *data); +static void SlideHealthbarOutTask(SysTask *task, void *data); static void ov16_022604C8(SysTask * param0, void * param1); static void ov16_02260AB4(SysTask * param0, void * param1); static void ov16_02260AE4(SysTask * param0, void * param1); @@ -621,48 +620,46 @@ void ov16_0225D414 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ SysTask_Start(ov16_02260384, v3, 0); } -void BattleDisplay_SlideHealthbarIn (BattleSystem * param0, BattlerData * param1, HealthbarData * param2) +void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battlerData, HealthbarData *healthbarData) { - UnkStruct_ov16_022674C4 * v0; + Healthbar *healthbar = &battlerData->unk_28; + MI_CpuClearFast(&healthbar->unk_00, sizeof(u8)); - v0 = ¶m1->unk_28; - MI_CpuClearFast(&v0->unk_00, sizeof(UnkStruct_ov16_022674C4_sub1)); - - v0->unk_0C = param0; - v0->unk_24 = param1->battler; - v0->unk_25 = ov16_0226825C(param1->battlerType, BattleSystem_BattleType(param0)); - v0->unk_4C = param2->command; - v0->unk_28 = param2->curHP; - v0->unk_2C = param2->maxHP; - v0->unk_48 = param2->level; - v0->unk_49 = param2->gender; - v0->unk_30 = 0; - v0->unk_38 = param2->expFromLastLevel; - v0->unk_3C = param2->expToNextLevel; - v0->unk_26 = param2->selectedPartySlot; - v0->unk_4A = param2->status; - v0->unk_4B = param2->speciesCaught; - v0->unk_4D = param2->delay; - v0->unk_27 = param2->numSafariBalls; + healthbar->unk_0C = battleSys; + healthbar->unk_24 = battlerData->battler; + healthbar->unk_25 = Healthbar_Type(battlerData->battlerType, BattleSystem_BattleType(battleSys)); + healthbar->unk_4C = healthbarData->command; + healthbar->unk_28 = healthbarData->curHP; + healthbar->unk_2C = healthbarData->maxHP; + healthbar->unk_48 = healthbarData->level; + healthbar->unk_49 = healthbarData->gender; + healthbar->unk_30 = 0; + healthbar->unk_38 = healthbarData->expFromLastLevel; + healthbar->unk_3C = healthbarData->expToNextLevel; + healthbar->unk_26 = healthbarData->selectedPartySlot; + healthbar->unk_4A = healthbarData->status; + healthbar->unk_4B = healthbarData->speciesCaught; + healthbar->unk_4D = healthbarData->delay; + healthbar->unk_27 = healthbarData->numSafariBalls; - ov16_02267620(v0, 0); - ov16_02267084(v0, v0->unk_28, 0xffffffff); + Healthbar_Enable(healthbar, FALSE); + Healthbar_Draw(healthbar, healthbar->unk_28, 0xffffffff); - v0->unk_10 = SysTask_Start(ov16_0226040C, v0, 1000); + healthbar->unk_10 = SysTask_Start(SlideHealthbarInTask, healthbar, 1000); } -void BattleDisplay_SlideHealthbarOut (BattleSystem * param0, BattlerData * param1) +void BattleDisplay_SlideHealthbarOut(BattleSystem *battleSys, BattlerData *battlerData) { - UnkStruct_ov16_022674C4 * v0; + Healthbar * healthbar = &battlerData->unk_28; + MI_CpuClearFast(&healthbar->unk_00, sizeof(u8)); - v0 = ¶m1->unk_28; - MI_CpuClearFast(&v0->unk_00, sizeof(UnkStruct_ov16_022674C4_sub1)); - v0->unk_0C = param0; - v0->unk_24 = param1->battler; - v0->unk_4C = param1->data[0]; + healthbar->unk_0C = battleSys; + healthbar->unk_24 = battlerData->battler; + healthbar->unk_4C = battlerData->data[0]; - ov16_022676A8(v0, 1); - v0->unk_10 = SysTask_Start(ov16_02260480, v0, 1000); + Healthbar_SetScrollEffect(healthbar, TRUE); + + healthbar->unk_10 = SysTask_Start(SlideHealthbarOutTask, healthbar, 1000); } void ov16_0225D5B8 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C260 * param2) @@ -934,17 +931,17 @@ void ov16_0225DA44 (BattleSystem * param0, BattlerData * param1) void ov16_0225DA74 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C35C * param2) { - UnkStruct_ov16_022674C4 * v0; + Healthbar * v0; GF_ASSERT(param1->unk_28.unk_04 != NULL); v0 = ¶m1->unk_28; - MI_CpuClear8(&v0->unk_00, sizeof(UnkStruct_ov16_022674C4_sub1)); + MI_CpuClear8(&v0->unk_00, sizeof(u8)); v0->unk_0C = param0; v0->unk_4C = param2->unk_00; v0->unk_24 = param1->battler; - v0->unk_25 = ov16_0226825C(param1->battlerType, BattleSystem_BattleType(param0)); + v0->unk_25 = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); v0->unk_28 = param2->unk_02; v0->unk_2C = param2->unk_04; v0->unk_30 = param2->unk_08; @@ -960,13 +957,13 @@ void ov16_0225DA74 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ void ov16_0225DB00 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C370 * param2) { - UnkStruct_ov16_022674C4 * v0; + Healthbar * v0; GF_ASSERT(param1->unk_28.unk_04 != NULL); v0 = ¶m1->unk_28; - MI_CpuClear8(&v0->unk_00, sizeof(UnkStruct_ov16_022674C4_sub1)); + MI_CpuClear8(&v0->unk_00, sizeof(u8)); v0->unk_0C = param0; v0->unk_4C = param2->unk_00; @@ -1080,7 +1077,7 @@ void ov16_0225DD44 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ param1->unk_28.unk_4A = param2->unk_01; - ov16_02267084(¶m1->unk_28, param1->unk_28.unk_28, (1 << 8)); + Healthbar_Draw(¶m1->unk_28, param1->unk_28.unk_28, (1 << 8)); ClearCommand(param0, param1->battler, param2->unk_00); } @@ -1221,15 +1218,15 @@ void ov16_0225DF6C (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C468 * param2) { - UnkStruct_ov16_022674C4 * v0; + Healthbar * v0; v0 = ¶m1->unk_28; - MI_CpuClearFast(&v0->unk_00, sizeof(UnkStruct_ov16_022674C4_sub1)); + MI_CpuClearFast(&v0->unk_00, sizeof(u8)); v0->unk_0C = param0; v0->unk_24 = param1->battler; - v0->unk_25 = ov16_0226825C(param1->battlerType, BattleSystem_BattleType(param0)); + v0->unk_25 = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); v0->unk_4C = param2->unk_00; v0->unk_28 = param2->unk_02; v0->unk_2C = param2->unk_04; @@ -1243,7 +1240,7 @@ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_4B = param2->unk_07_7; v0->unk_27 = param2->unk_10; - ov16_02267084(v0, v0->unk_28, 0xffffffff ^ (1 << 5)); + Healthbar_Draw(v0, v0->unk_28, 0xffffffff ^ (1 << 5)); ClearCommand(v0->unk_0C, v0->unk_24, v0->unk_4C); } @@ -2812,49 +2809,75 @@ static void ov16_02260384 (SysTask * param0, void * param1) } } -static void ov16_0226040C (SysTask * param0, void * param1) +enum { + SLIDE_HEALTHBAR_IN_STATE_ENABLE = 0, + SLIDE_HEALTHBAR_IN_STATE_WAIT, + SLIDE_HEALTHBAR_IN_STATE_DONE, +}; + +/** + * @brief Slide the healthbar in, then wait until it is done. + * + * @param task + * @param data + */ +static void SlideHealthbarInTask(SysTask *task, void *data) { - UnkStruct_ov16_022674C4 * v0 = param1; + Healthbar *healthbar = data; - switch (v0->unk_00.unk_00) { - case 0: - if (v0->unk_4D > 0) { - v0->unk_4D--; + switch (healthbar->unk_00) { + case SLIDE_HEALTHBAR_IN_STATE_ENABLE: + if (healthbar->unk_4D > 0) { + healthbar->unk_4D--; break; } - ov16_022676A8(v0, 0); - ov16_02267620(v0, 1); - v0->unk_00.unk_00++; + Healthbar_SetScrollEffect(healthbar, 0); + Healthbar_Enable(healthbar, TRUE); + healthbar->unk_00++; break; - case 1: - if (v0->unk_4F_1 == 1) { - v0->unk_00.unk_00++; + + case SLIDE_HEALTHBAR_IN_STATE_WAIT: + if (healthbar->unk_4F_1 == 1) { + healthbar->unk_00++; } break; + default: - ClearCommand(v0->unk_0C, v0->unk_24, v0->unk_4C); - v0->unk_10 = NULL; - SysTask_Done(param0); + ClearCommand(healthbar->unk_0C, healthbar->unk_24, healthbar->unk_4C); + healthbar->unk_10 = NULL; + SysTask_Done(task); break; } } -static void ov16_02260480 (SysTask * param0, void * param1) +enum { + SLIDE_HEALTHBAR_OUT_STATE_WAIT = 0, + SLIDE_HEALTHBAR_OUT_STATE_DONE, +}; + +/** + * @brief Wait until the healthbar has slid out. + * + * @param task + * @param data + */ +static void SlideHealthbarOutTask(SysTask *task, void *data) { - UnkStruct_ov16_022674C4 * v0 = param1; + Healthbar *healthbar = data; - switch (v0->unk_00.unk_00) { - case 0: - if (v0->unk_4F_1 == 1) { - v0->unk_00.unk_00++; + switch (healthbar->unk_00) { + case SLIDE_HEALTHBAR_OUT_STATE_WAIT: + if (healthbar->unk_4F_1 == TRUE) { + healthbar->unk_00++; } break; + default: - ClearCommand(v0->unk_0C, v0->unk_24, v0->unk_4C); - v0->unk_10 = NULL; - SysTask_Done(param0); - ov16_02267620(v0, 0); + ClearCommand(healthbar->unk_0C, healthbar->unk_24, healthbar->unk_4C); + healthbar->unk_10 = NULL; + SysTask_Done(task); + Healthbar_Enable(healthbar, FALSE); break; } } @@ -2867,7 +2890,7 @@ static void ov16_022604C8 (SysTask * param0, void * param1) BattlerData * v3; u32 v4; int v5; - UnkStruct_ov16_022674C4 * v6; + Healthbar * v6; v0 = (UnkStruct_ov16_0225D5B8 *)param1; v1 = BattleSystem_BGL(v0->unk_00); @@ -3225,7 +3248,7 @@ static void ov16_02260C00 (SysTask * param0, void * param1) BGL * v1 = BattleSystem_BGL(v0->unk_00); UnkStruct_ov16_02268A14 * v2; int v3; - UnkStruct_ov16_022674C4 * v4; + Healthbar * v4; BattlerData * v5; v2 = ov16_0223E02C(v0->unk_00); @@ -3408,7 +3431,7 @@ static void ov16_02260F14 (SysTask * param0, void * param1) BGL * v1 = BattleSystem_BGL(v0->unk_00); UnkStruct_ov16_02268A14 * v2; int v3; - UnkStruct_ov16_022674C4 * v4; + Healthbar * v4; BattlerData * v5; v5 = BattleSystem_BattlerData(v0->unk_00, v0->unk_0D); @@ -3933,7 +3956,7 @@ static void ov16_022611DC (SysTask * param0, void * param1) break; case 21: { - UnkStruct_ov16_022674C4 * v18; + Healthbar * v18; Pokemon * v19; int v20; int v21; @@ -3942,8 +3965,8 @@ static void ov16_022611DC (SysTask * param0, void * param1) v21 = v0->unk_08->unk_04->unk_2C[v0->unk_08->unk_04->unk_11]; v18 = ov16_0223F35C(v0->unk_00, v20); - MI_CpuClear8(&v18->unk_00, sizeof(UnkStruct_ov16_022674C4_sub1)); - v18->unk_25 = ov16_0226825C(BattleSystem_BattlerSlot(v0->unk_00, v20), BattleSystem_BattleType(v0->unk_00)); + MI_CpuClear8(&v18->unk_00, sizeof(u8)); + v18->unk_25 = Healthbar_Type(BattleSystem_BattlerSlot(v0->unk_00, v20), BattleSystem_BattleType(v0->unk_00)); v19 = BattleSystem_PartyPokemon(v0->unk_00, v20, v21); v18->unk_28 = Pokemon_GetValue(v19, MON_DATA_CURRENT_HP, NULL) - v0->unk_08->unk_04->unk_20; @@ -3960,14 +3983,14 @@ static void ov16_022611DC (SysTask * param0, void * param1) break; case 22: { - UnkStruct_ov16_022674C4 * v22; + Healthbar * v22; int v23; v23 = v0->unk_08->unk_04->unk_11 * 2; v22 = ov16_0223F35C(v0->unk_00, v23); if (ov16_022674F8(v22) == -1) { - ov16_02267084(v22, NULL, (1 << 8)); + Healthbar_Draw(v22, NULL, (1 << 8)); v0->unk_0E++; } } @@ -4000,7 +4023,7 @@ static void ov16_022611DC (SysTask * param0, void * param1) break; case 29: { - UnkStruct_ov16_022674C4 * v27; + Healthbar * v27; int v28; MessageLoader * v29; BattleMessage v30; @@ -4018,7 +4041,7 @@ static void ov16_022611DC (SysTask * param0, void * param1) v27->unk_4A = 0; } - ov16_02267084(v27, v27->unk_28, (1 << 8)); + Healthbar_Draw(v27, v27->unk_28, (1 << 8)); v30.tags = 2; v30.params[0] = v28 | (v0->unk_08->unk_0C[v28] << 8); @@ -4441,7 +4464,7 @@ static void ov16_022623F0 (SysTask * param0, void * param1) BGL * v1 = BattleSystem_BGL(v0->unk_00); UnkStruct_ov16_02268A14 * v2 = ov16_0223E02C(v0->unk_00); int v3; - UnkStruct_ov16_022674C4 * v4; + Healthbar * v4; BattlerData * v5; v5 = BattleSystem_BattlerData(v0->unk_00, v0->unk_0D); @@ -4732,18 +4755,18 @@ static void ov16_0226292C (SysTask * param0, void * param1) static void ov16_02262988 (SysTask * param0, void * param1) { - UnkStruct_ov16_022674C4 * v0 = param1; + Healthbar * v0 = param1; int v1; - switch (v0->unk_00.unk_00) { + switch (v0->unk_00) { case 0: ov16_022674C4(v0, v0->unk_30); - v0->unk_00.unk_00++; + v0->unk_00++; case 1: v1 = ov16_022674F8(v0); if (v1 == -1) { - v0->unk_00.unk_00++; + v0->unk_00++; } break; default: @@ -4756,15 +4779,15 @@ static void ov16_02262988 (SysTask * param0, void * param1) static void ov16_022629DC (SysTask * param0, void * param1) { - UnkStruct_ov16_022674C4 * v0 = param1; + Healthbar * v0 = param1; int v1; - switch (v0->unk_00.unk_00) { + switch (v0->unk_00) { case 0: v0->unk_4E = 0; Sound_PlayEffect(1803); ov16_0226752C(v0, v0->unk_40); - v0->unk_00.unk_00++; + v0->unk_00++; case 1: if (v0->unk_4E < 8) { v0->unk_4E++; @@ -4775,9 +4798,9 @@ static void ov16_022629DC (SysTask * param0, void * param1) if (v1 == -1) { if (v0->unk_4E >= 8) { sub_020057A4(1803, 0); - v0->unk_00.unk_00 = 100; + v0->unk_00 = 100; } else { - v0->unk_00.unk_00++; + v0->unk_00++; } } break; @@ -4786,7 +4809,7 @@ static void ov16_022629DC (SysTask * param0, void * param1) if (v0->unk_4E >= 8) { sub_020057A4(1803, 0); - v0->unk_00.unk_00 = 100; + v0->unk_00 = 100; } break; default: @@ -5701,7 +5724,7 @@ Sprite * ov16_02263AFC (BattlerData * param0) } } -UnkStruct_ov16_022674C4 * ov16_02263B08 (BattlerData * param0) +Healthbar * ov16_02263B08 (BattlerData * param0) { return ¶m0->unk_28; } diff --git a/src/overlay016/battle_io_command.c b/src/overlay016/battle_io_command.c index 44493a136c..b5a6b08e39 100644 --- a/src/overlay016/battle_io_command.c +++ b/src/overlay016/battle_io_command.c @@ -776,7 +776,7 @@ static void ov16_0225C79C (BattleSystem * param0, BattlerData * param1) { UnkStruct_ov16_02268A14 * v0; int v1; - UnkStruct_ov16_022674C4 * v2; + Healthbar * v2; NARC * v3; NARC * v4; diff --git a/src/overlay016/ov16_0223B140.c b/src/overlay016/ov16_0223B140.c index 6f7f4845a5..7c1448312f 100644 --- a/src/overlay016/ov16_0223B140.c +++ b/src/overlay016/ov16_0223B140.c @@ -1572,7 +1572,7 @@ static void ov16_0223CF8C (SysTask * param0, void * param1) { BattleSystem * v0 = param1; BattlerData * v1; - UnkStruct_ov16_022674C4 * v2; + Healthbar * v2; int v3; int v4; int v5; diff --git a/src/overlay016/ov16_0223DF00.c b/src/overlay016/ov16_0223DF00.c index e7fc3afb24..c2e7f593c9 100644 --- a/src/overlay016/ov16_0223DF00.c +++ b/src/overlay016/ov16_0223DF00.c @@ -1367,29 +1367,29 @@ void * ov16_0223F35C (BattleSystem * param0, int param1) void ov16_0223F36C (BattleSystem * param0) { int v0; - UnkStruct_ov16_022674C4 * v1; + Healthbar * v1; for (v0 = 0; v0 < param0->maxBattlers; v0++) { v1 = ov16_02263B08(param0->battlers[v0]); v1->unk_0C = param0; - v1->unk_25 = ov16_0226825C(Battler_Type(param0->battlers[v0]), BattleSystem_BattleType(param0)); + v1->unk_25 = Healthbar_Type(Battler_Type(param0->battlers[v0]), BattleSystem_BattleType(param0)); ov16_022672C4(v1); - ov16_02267620(v1, 0); + Healthbar_Enable(v1, 0); } } void ov16_0223F3BC (BattleSystem * param0) { int v0; - UnkStruct_ov16_022674C4 * v1; + Healthbar * v1; for (v0 = 0; v0 < param0->maxBattlers; v0++) { v1 = ov16_02263B08(param0->battlers[v0]); if (v1->unk_28) { - ov16_02267620(v1, 1); + Healthbar_Enable(v1, 1); } } } @@ -1397,18 +1397,18 @@ void ov16_0223F3BC (BattleSystem * param0) void ov16_0223F3EC (BattleSystem * param0) { int v0; - UnkStruct_ov16_022674C4 * v1; + Healthbar * v1; for (v0 = 0; v0 < param0->maxBattlers; v0++) { v1 = ov16_02263B08(param0->battlers[v0]); - ov16_02267620(v1, 0); + Healthbar_Enable(v1, 0); } } void ov16_0223F414 (BattleSystem * param0) { int v0; - UnkStruct_ov16_022674C4 * v1; + Healthbar * v1; for (v0 = 0; v0 < param0->maxBattlers; v0++) { v1 = ov16_02263B08(param0->battlers[v0]); @@ -1653,7 +1653,7 @@ void ov16_0223F8AC (BattleSystem * param0, Sprite ** param1) void BattleSystem_SetGaugePriority (BattleSystem * param0, int param1) { int v0; - UnkStruct_ov16_022674C4 * v1; + Healthbar * v1; for (v0 = 0; v0 < param0->maxBattlers; v0++) { v1 = ov16_02263B08(param0->battlers[v0]); diff --git a/src/overlay016/ov16_02266F1C.c b/src/overlay016/ov16_02266F1C.c index 2ee799d627..f24f26e4bd 100644 --- a/src/overlay016/ov16_02266F1C.c +++ b/src/overlay016/ov16_02266F1C.c @@ -45,39 +45,39 @@ typedef struct { } UnkStruct_ov16_0226F64C; typedef struct { - UnkStruct_ov16_022674C4 * unk_00; + Healthbar * unk_00; u8 * unk_04; u8 unk_08; u8 unk_09; s8 unk_0A; } UnkStruct_ov16_0226834C; -static s32 ov16_02267EDC(UnkStruct_ov16_022674C4 * param0, int param1); +static s32 ov16_02267EDC(Healthbar * param0, int param1); static s32 ov16_022680D8(s32 param0, s32 param1, s32 param2, s32 * param3, u8 param4, u16 param5); static u8 ov16_02268194(s32 param0, s32 param1, s32 param2, s32 * param3, u8 * param4, u8 param5); static u32 ov16_02268210(s32 param0, s32 param1, s32 param2, u8 param3); static const u8 * ov16_02268250(int param0); -static void ov16_02267F70(UnkStruct_ov16_022674C4 * param0, u8 param1); -static void ov16_02267864(UnkStruct_ov16_022674C4 * param0); -static void ov16_022679C8(UnkStruct_ov16_022674C4 * param0); -static void ov16_02267A4C(UnkStruct_ov16_022674C4 * param0); -static void ov16_02267B6C(UnkStruct_ov16_022674C4 * param0, u32 param1); -static void ov16_02267BF8(UnkStruct_ov16_022674C4 * param0); -static void ov16_02267C58(UnkStruct_ov16_022674C4 * param0); -static void ov16_02267CA8(UnkStruct_ov16_022674C4 * param0, int param1); -static void ov16_02267CE8(UnkStruct_ov16_022674C4 * param0, u32 param1); -static void ov16_02267DC4(UnkStruct_ov16_022674C4 * param0, u32 param1); +static void ov16_02267F70(Healthbar * param0, u8 param1); +static void ov16_02267864(Healthbar * param0); +static void ov16_022679C8(Healthbar * param0); +static void ov16_02267A4C(Healthbar * param0); +static void ov16_02267B6C(Healthbar * param0, u32 param1); +static void ov16_02267BF8(Healthbar * param0); +static void ov16_02267C58(Healthbar * param0); +static void ov16_02267CA8(Healthbar * param0, int param1); +static void ov16_02267CE8(Healthbar * param0, u32 param1); +static void ov16_02267DC4(Healthbar * param0, u32 param1); static void ov16_02266FE4(SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4); -static void ov16_02267244(UnkStruct_ov16_022674C4 * param0); -static void ov16_0226728C(UnkStruct_ov16_022674C4 * param0); +static void ov16_02267244(Healthbar * param0); +static void ov16_0226728C(Healthbar * param0); static const SpriteTemplate * ov16_022682B0(u8 param0); static const SpriteTemplate * ov16_02268314(u8 param0); static void ov16_0226774C(SysTask * param0, void * param1); static void ov16_02268380(SysTask * param0, void * param1); -void ov16_02268470(UnkStruct_ov16_022674C4 * param0); -void ov16_02268498(UnkStruct_ov16_022674C4 * param0); +void ov16_02268470(Healthbar * param0); +void ov16_02268498(Healthbar * param0); static void ov16_022684BC(SysTask * param0, void * param1); -static void ov16_022675F8(UnkStruct_ov16_022674C4 * param0, int param1); +static void ov16_022675F8(Healthbar * param0, int param1); __attribute__((aligned(4))) static const s8 Unk_ov16_0226F334[] = { 0x48, @@ -452,7 +452,7 @@ CellActorData * ov16_02267060 (SpriteRenderer * param0, SpriteGfxHandler * param return v1; } -void ov16_02267084 (UnkStruct_ov16_022674C4 * param0, u32 param1, u32 param2) +void Healthbar_Draw (Healthbar * param0, u32 param1, u32 param2) { int v0 = 0; u32 v1; @@ -565,7 +565,7 @@ void ov16_02267084 (UnkStruct_ov16_022674C4 * param0, u32 param1, u32 param2) } } -void ov16_02267220 (UnkStruct_ov16_022674C4 * param0) +void ov16_02267220 (Healthbar * param0) { if (param0->unk_50 != NULL) { SysTask_Done(param0->unk_50); @@ -580,7 +580,7 @@ void ov16_02267220 (UnkStruct_ov16_022674C4 * param0) param0->unk_04 = NULL; } -static void ov16_02267244 (UnkStruct_ov16_022674C4 * param0) +static void ov16_02267244 (Healthbar * param0) { if (param0->unk_08 == NULL) { return; @@ -590,7 +590,7 @@ static void ov16_02267244 (UnkStruct_ov16_022674C4 * param0) param0->unk_08 = NULL; } -void ov16_02267258 (UnkStruct_ov16_022674C4 * param0) +void ov16_02267258 (Healthbar * param0) { SpriteRenderer * v0; SpriteGfxHandler * v1; @@ -605,7 +605,7 @@ void ov16_02267258 (UnkStruct_ov16_022674C4 * param0) SpriteGfxHandler_UnloadAnimObjById(v1, v2->resources[3]); } -static void ov16_0226728C (UnkStruct_ov16_022674C4 * param0) +static void ov16_0226728C (Healthbar * param0) { SpriteRenderer * v0; SpriteGfxHandler * v1; @@ -625,7 +625,7 @@ static void ov16_0226728C (UnkStruct_ov16_022674C4 * param0) SpriteGfxHandler_UnloadAnimObjById(v1, v2->resources[3]); } -void ov16_022672C4 (UnkStruct_ov16_022674C4 * param0) +void ov16_022672C4 (Healthbar * param0) { const SpriteTemplate * v0; SpriteRenderer * v1; @@ -651,7 +651,7 @@ void ov16_022672C4 (UnkStruct_ov16_022674C4 * param0) NARC_dtor(v4); } -void ov16_02267360 (UnkStruct_ov16_022674C4 * param0) +void ov16_02267360 (Healthbar * param0) { ov16_02267220(param0); ov16_02267258(param0); @@ -659,7 +659,7 @@ void ov16_02267360 (UnkStruct_ov16_022674C4 * param0) ov16_0226728C(param0); } -void ov16_0226737C (UnkStruct_ov16_022674C4 * param0) +void ov16_0226737C (Healthbar * param0) { const u8 * v0; NNSG2dImageProxy * v1; @@ -687,7 +687,7 @@ void ov16_0226737C (UnkStruct_ov16_022674C4 * param0) v0 = ov16_02268250(69); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3D4[param0->unk_25].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3D4[param0->unk_25].unk_02); - ov16_02267084(param0, param0->unk_28, (1 << 1) | (1 << 2)); + Healthbar_Draw(param0, param0->unk_28, (1 << 1) | (1 << 2)); } else { v0 = ov16_02268250(66); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->unk_25].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F374[param0->unk_25].unk_02); @@ -698,11 +698,11 @@ void ov16_0226737C (UnkStruct_ov16_022674C4 * param0) v0 = ov16_02268250(38); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->unk_25].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); - ov16_02267084(param0, param0->unk_28, (1 << 0)); + Healthbar_Draw(param0, param0->unk_28, (1 << 0)); } } -void ov16_022674C4 (UnkStruct_ov16_022674C4 * param0, int param1) +void ov16_022674C4 (Healthbar * param0, int param1) { param0->unk_34 = -2147483648; @@ -725,7 +725,7 @@ void ov16_022674C4 (UnkStruct_ov16_022674C4 * param0, int param1) } } -s32 ov16_022674F8 (UnkStruct_ov16_022674C4 * param0) +s32 ov16_022674F8 (Healthbar * param0) { s32 v0; @@ -733,15 +733,15 @@ s32 ov16_022674F8 (UnkStruct_ov16_022674C4 * param0) if (v0 == -1) { param0->unk_28 -= param0->unk_30; - ov16_02267084(param0, param0->unk_28, (1 << 1)); + Healthbar_Draw(param0, param0->unk_28, (1 << 1)); } else { - ov16_02267084(param0, v0, (1 << 1)); + Healthbar_Draw(param0, v0, (1 << 1)); } return v0; } -void ov16_0226752C (UnkStruct_ov16_022674C4 * param0, int param1) +void ov16_0226752C (Healthbar * param0, int param1) { param0->unk_44 = -2147483648; @@ -764,7 +764,7 @@ void ov16_0226752C (UnkStruct_ov16_022674C4 * param0, int param1) } } -s32 ov16_02267560 (UnkStruct_ov16_022674C4 * param0) +s32 ov16_02267560 (Healthbar * param0) { s32 v0; @@ -777,7 +777,7 @@ s32 ov16_02267560 (UnkStruct_ov16_022674C4 * param0) return v0; } -void ov16_0226757C (UnkStruct_ov16_022674C4 * param0) +void ov16_0226757C (Healthbar * param0) { if (param0->unk_08 != NULL) { sub_02021CC8(param0->unk_08->unk_00, 1); @@ -789,7 +789,7 @@ void ov16_0226757C (UnkStruct_ov16_022674C4 * param0) } } -void ov16_022675AC (UnkStruct_ov16_022674C4 * param0) +void ov16_022675AC (Healthbar * param0) { if (param0->unk_08 != NULL) { sub_02021CC8(param0->unk_08->unk_00, 0); @@ -800,7 +800,7 @@ void ov16_022675AC (UnkStruct_ov16_022674C4 * param0) ov16_02268498(param0); } -void ov16_022675D8 (UnkStruct_ov16_022674C4 * param0, int param1) +void ov16_022675D8 (Healthbar * param0, int param1) { if (param0->unk_04 == NULL) { return; @@ -813,7 +813,7 @@ void ov16_022675D8 (UnkStruct_ov16_022674C4 * param0, int param1) } } -static void ov16_022675F8 (UnkStruct_ov16_022674C4 * param0, int param1) +static void ov16_022675F8 (Healthbar * param0, int param1) { if (param0->unk_08 != NULL) { if ((BattleSystem_BattleType(param0->unk_0C) & (0x20 | 0x200)) && (param1 == 1)) { @@ -824,7 +824,7 @@ static void ov16_022675F8 (UnkStruct_ov16_022674C4 * param0, int param1) } } -void ov16_02267620 (UnkStruct_ov16_022674C4 * param0, int param1) +void Healthbar_Enable (Healthbar * param0, int param1) { if (param0->unk_04 == NULL) { return; @@ -834,7 +834,7 @@ void ov16_02267620 (UnkStruct_ov16_022674C4 * param0, int param1) ov16_022675F8(param0, param1); } -void ov16_0226763C (UnkStruct_ov16_022674C4 * param0, int param1, int param2) +void ov16_0226763C (Healthbar * param0, int param1, int param2) { const SpriteTemplate * v0; @@ -848,7 +848,7 @@ void ov16_0226763C (UnkStruct_ov16_022674C4 * param0, int param1, int param2) } } -void ov16_022676A8 (UnkStruct_ov16_022674C4 * param0, int param1) +void Healthbar_SetScrollEffect (Healthbar * param0, int param1) { GF_ASSERT(param0 != NULL); GF_ASSERT(param0->unk_04 != NULL); @@ -878,7 +878,7 @@ void ov16_022676A8 (UnkStruct_ov16_022674C4 * param0, int param1) static void ov16_0226774C (SysTask * param0, void * param1) { - UnkStruct_ov16_022674C4 * v0 = param1; + Healthbar * v0 = param1; s16 v1, v2; const SpriteTemplate * v3; int v4; @@ -942,7 +942,7 @@ static void ov16_0226774C (SysTask * param0, void * param1) } } -static void ov16_02267864 (UnkStruct_ov16_022674C4 * param0) +static void ov16_02267864 (Healthbar * param0) { BGL * v0; u8 * v1; @@ -990,7 +990,7 @@ static void ov16_02267864 (UnkStruct_ov16_022674C4 * param0) Strbuf_Free(v6); } -static void ov16_022679C8 (UnkStruct_ov16_022674C4 * param0) +static void ov16_022679C8 (Healthbar * param0) { NNSG2dImageProxy * v0; const u8 * v1; @@ -1022,7 +1022,7 @@ static void ov16_022679C8 (UnkStruct_ov16_022674C4 * param0) } } -static void ov16_02267A4C (UnkStruct_ov16_022674C4 * param0) +static void ov16_02267A4C (Healthbar * param0) { u8 * v0, * v1; NNSG2dImageProxy * v2; @@ -1068,7 +1068,7 @@ static void ov16_02267A4C (UnkStruct_ov16_022674C4 * param0) Heap_FreeToHeap(v1); } -static void ov16_02267B6C (UnkStruct_ov16_022674C4 * param0, u32 param1) +static void ov16_02267B6C (Healthbar * param0, u32 param1) { u8 * v0; NNSG2dImageProxy * v1; @@ -1093,7 +1093,7 @@ static void ov16_02267B6C (UnkStruct_ov16_022674C4 * param0, u32 param1) Heap_FreeToHeap(v0); } -static void ov16_02267BF8 (UnkStruct_ov16_022674C4 * param0) +static void ov16_02267BF8 (Healthbar * param0) { u8 * v0; NNSG2dImageProxy * v1; @@ -1117,7 +1117,7 @@ static void ov16_02267BF8 (UnkStruct_ov16_022674C4 * param0) Heap_FreeToHeap(v0); } -static void ov16_02267C58 (UnkStruct_ov16_022674C4 * param0) +static void ov16_02267C58 (Healthbar * param0) { NNSG2dImageProxy * v0; const u8 * v1; @@ -1138,7 +1138,7 @@ static void ov16_02267C58 (UnkStruct_ov16_022674C4 * param0) } } -static void ov16_02267CA8 (UnkStruct_ov16_022674C4 * param0, int param1) +static void ov16_02267CA8 (Healthbar * param0, int param1) { NNSG2dImageProxy * v0; const u8 * v1; @@ -1155,7 +1155,7 @@ static void ov16_02267CA8 (UnkStruct_ov16_022674C4 * param0, int param1) } } -static void ov16_02267CE8 (UnkStruct_ov16_022674C4 * param0, u32 param1) +static void ov16_02267CE8 (Healthbar * param0, u32 param1) { BGL * v0; u8 * v1; @@ -1198,7 +1198,7 @@ static void ov16_02267CE8 (UnkStruct_ov16_022674C4 * param0, u32 param1) Strbuf_Free(v5); } -static void ov16_02267DC4 (UnkStruct_ov16_022674C4 * param0, u32 param1) +static void ov16_02267DC4 (Healthbar * param0, u32 param1) { BGL * v0; u8 * v1; @@ -1246,7 +1246,7 @@ static void ov16_02267DC4 (UnkStruct_ov16_022674C4 * param0, u32 param1) Strbuf_Free(v6); } -static s32 ov16_02267EDC (UnkStruct_ov16_022674C4 * param0, int param1) +static s32 ov16_02267EDC (Healthbar * param0, int param1) { s32 v0; s32 v1; @@ -1281,7 +1281,7 @@ static s32 ov16_02267EDC (UnkStruct_ov16_022674C4 * param0, int param1) return v0; } -static void ov16_02267F70 (UnkStruct_ov16_022674C4 * param0, u8 param1) +static void ov16_02267F70 (Healthbar * param0, u8 param1) { u8 v0; u8 v1[12]; @@ -1506,7 +1506,7 @@ static const u8 * ov16_02268250 (int param0) return &Unk_ov16_0226F6AC[param0 * 0x20]; } -u8 ov16_0226825C (int param0, u32 param1) +u8 Healthbar_Type (int param0, u32 param1) { switch (param0) { case 0: @@ -1596,7 +1596,7 @@ static const SpriteTemplate * ov16_02268314 (u8 param0) return v0; } -void ov16_0226834C (UnkStruct_ov16_022674C4 * param0, u8 * param1) +void ov16_0226834C (Healthbar * param0, u8 * param1) { UnkStruct_ov16_0226834C * v0; @@ -1660,17 +1660,17 @@ static void ov16_02268380 (SysTask * param0, void * param1) } } -void ov16_02268468 (UnkStruct_ov16_022674C4 * param0) +void ov16_02268468 (Healthbar * param0) { return; } -void ov16_0226846C (UnkStruct_ov16_022674C4 * param0) +void ov16_0226846C (Healthbar * param0) { return; } -void ov16_02268470 (UnkStruct_ov16_022674C4 * param0) +void ov16_02268470 (Healthbar * param0) { if (param0->unk_50 != NULL) { return; @@ -1680,7 +1680,7 @@ void ov16_02268470 (UnkStruct_ov16_022674C4 * param0) param0->unk_50 = SysTask_Start(ov16_022684BC, param0, 1010); } -void ov16_02268498 (UnkStruct_ov16_022674C4 * param0) +void ov16_02268498 (Healthbar * param0) { if (param0->unk_50 != NULL) { SysTask_Done(param0->unk_50); @@ -1693,7 +1693,7 @@ void ov16_02268498 (UnkStruct_ov16_022674C4 * param0) static void ov16_022684BC (SysTask * param0, void * param1) { - UnkStruct_ov16_022674C4 * v0 = param1; + Healthbar * v0 = param1; int v1; v0->unk_54 += 20; From 282f216aa922ebe1ca143c9859c41f3739c0cfb0 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 18:30:18 -0800 Subject: [PATCH 04/16] Rename ov16_02266F1C -> healthbar --- include/{overlay016/ov16_02266F1C.h => battle/healthbar.h} | 0 platinum.us/main.lsf | 2 +- src/meson.build | 2 +- src/overlay016/battle_display.c | 2 +- src/overlay016/battle_io_command.c | 2 +- src/overlay016/{ov16_02266F1C.c => healthbar.c} | 4 ++-- src/overlay016/ov16_0223DF00.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename include/{overlay016/ov16_02266F1C.h => battle/healthbar.h} (100%) rename src/overlay016/{ov16_02266F1C.c => healthbar.c} (99%) diff --git a/include/overlay016/ov16_02266F1C.h b/include/battle/healthbar.h similarity index 100% rename from include/overlay016/ov16_02266F1C.h rename to include/battle/healthbar.h diff --git a/platinum.us/main.lsf b/platinum.us/main.lsf index 77d9b06077..a835165f36 100644 --- a/platinum.us/main.lsf +++ b/platinum.us/main.lsf @@ -699,7 +699,7 @@ Overlay overlay16 Object main.nef.p/src_overlay016_battle_display.c.o Object main.nef.p/src_overlay016_ov16_02264798.c.o Object main.nef.p/src_overlay016_battle_io.c.o - Object main.nef.p/src_overlay016_ov16_02266F1C.c.o + Object main.nef.p/src_overlay016_healthbar.c.o Object main.nef.p/src_overlay016_ov16_02268520.c.o Object main.nef.p/src_overlay016_ov16_0226871C.c.o Object main.nef.p/src_overlay016_party_gauge.c.o diff --git a/src/meson.build b/src/meson.build index d2d4cfb280..ff53806ed2 100644 --- a/src/meson.build +++ b/src/meson.build @@ -537,7 +537,7 @@ pokeplatinum_c = files( 'overlay016/battle_display.c', 'overlay016/ov16_02264798.c', 'overlay016/battle_io.c', - 'overlay016/ov16_02266F1C.c', + 'overlay016/healthbar.c', 'overlay016/ov16_02268520.c', 'overlay016/ov16_0226871C.c', 'overlay016/party_gauge.c', diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index 5eddf85b15..02e238191f 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -150,7 +150,7 @@ #include "battle/battle_display.h" #include "overlay016/ov16_02264798.h" #include "battle/battle_io.h" -#include "overlay016/ov16_02266F1C.h" +#include "battle/healthbar.h" #include "overlay016/ov16_0226871C.h" #include "battle/party_gauge.h" diff --git a/src/overlay016/battle_io_command.c b/src/overlay016/battle_io_command.c index b5a6b08e39..8892b0486e 100644 --- a/src/overlay016/battle_io_command.c +++ b/src/overlay016/battle_io_command.c @@ -78,7 +78,7 @@ #include "battle/battle_display.h" #include "overlay016/ov16_02264798.h" #include "battle/battle_io.h" -#include "overlay016/ov16_02266F1C.h" +#include "battle/healthbar.h" #include "overlay016/ov16_0226871C.h" #include "battle/party_gauge.h" diff --git a/src/overlay016/ov16_02266F1C.c b/src/overlay016/healthbar.c similarity index 99% rename from src/overlay016/ov16_02266F1C.c rename to src/overlay016/healthbar.c index f24f26e4bd..182116b250 100644 --- a/src/overlay016/ov16_02266F1C.c +++ b/src/overlay016/healthbar.c @@ -1,7 +1,7 @@ #include #include -#include +#include #include "assert.h" @@ -37,7 +37,7 @@ #include "pokemon.h" #include "unk_0208C098.h" #include "overlay016/ov16_0223DF00.h" -#include "overlay016/ov16_02266F1C.h" +#include "battle/healthbar.h" typedef struct { u16 unk_00; diff --git a/src/overlay016/ov16_0223DF00.c b/src/overlay016/ov16_0223DF00.c index c2e7f593c9..e2f5e40d86 100644 --- a/src/overlay016/ov16_0223DF00.c +++ b/src/overlay016/ov16_0223DF00.c @@ -76,7 +76,7 @@ #include "overlay016/ov16_0223DF00.h" #include "battle/battle_lib.h" #include "battle/battle_display.h" -#include "overlay016/ov16_02266F1C.h" +#include "battle/healthbar.h" #include "overlay016/ov16_02268520.h" #include "overlay016/ov16_0226871C.h" #include "overlay016/ov16_0226E148.h" From 751c1cd6880f2a57413d4829312515b0ee32a937 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 18:43:17 -0800 Subject: [PATCH 05/16] sub_0200D3F4 -> SpriteActor_EnableObject --- include/battle/healthbar.h | 24 ++++++++++++- include/unk_0200C6E4.h | 2 +- src/overlay010/ov10_0221F800.c | 18 +++++----- src/overlay012/ov12_0221FC20.c | 22 ++++++------ src/overlay012/ov12_02225864.c | 6 ++-- src/overlay012/ov12_02226B84.c | 16 ++++----- src/overlay012/ov12_0222AC70.c | 26 +++++++------- src/overlay012/ov12_0222D6B0.c | 32 ++++++++--------- src/overlay012/ov12_0222E784.c | 6 ++-- src/overlay012/ov12_0222E91C.c | 6 ++-- src/overlay012/ov12_0222F700.c | 62 ++++++++++++++++----------------- src/overlay012/ov12_022346A4.c | 18 +++++----- src/overlay012/ov12_02234E44.c | 10 +++--- src/overlay012/ov12_02235E94.c | 6 ++-- src/overlay013/ov13_0221FC20.c | 4 +-- src/overlay013/ov13_02224500.c | 4 +-- src/overlay013/ov13_02227BDC.c | 4 +-- src/overlay016/battle_display.c | 2 +- src/overlay016/healthbar.c | 50 ++++++++++++++------------ src/overlay016/ov16_02268520.c | 2 +- src/overlay016/ov16_0226DB7C.c | 10 +++--- src/overlay016/ov16_0226DE44.c | 6 ++-- src/overlay017/ov17_022413D8.c | 22 ++++++------ src/overlay017/ov17_0224A0FC.c | 22 ++++++------ src/overlay017/ov17_02250744.c | 4 +-- src/overlay017/ov17_02252AB0.c | 6 ++-- src/overlay062/ov62_022300D8.c | 16 ++++----- src/overlay062/ov62_02231690.c | 26 +++++++------- src/overlay062/ov62_02235278.c | 2 +- src/overlay062/ov62_02236CBC.c | 18 +++++----- src/overlay062/ov62_02237D24.c | 4 +-- src/overlay062/ov62_02239D60.c | 6 ++-- src/overlay062/ov62_0223CAEC.c | 4 +-- src/overlay062/ov62_0223DFA8.c | 6 ++-- src/overlay062/ov62_02241204.c | 10 +++--- src/overlay062/ov62_02246B00.c | 4 +-- src/overlay075/ov75_021D0D80.c | 2 +- src/overlay076/ov76_0223B140.c | 2 +- src/overlay076/ov76_0223B870.c | 8 ++--- src/overlay076/ov76_0223D338.c | 6 ++-- src/overlay079/ov79_021D0D80.c | 2 +- src/overlay079/ov79_021D183C.c | 4 +-- src/overlay079/ov79_021D2268.c | 2 +- src/overlay084/ov84_0223B5A0.c | 28 +++++++-------- src/overlay084/ov84_022403F4.c | 26 +++++++------- src/overlay091/ov91_021D0D80.c | 30 ++++++++-------- src/overlay099/ov99_021D1A54.c | 4 +-- src/overlay099/ov99_021D340C.c | 10 +++--- src/overlay100/ov100_021D13E4.c | 2 +- src/overlay104/ov104_0222FBE4.c | 4 +-- src/overlay104/ov104_0223C2D4.c | 2 +- src/overlay104/ov104_0223DC7C.c | 6 ++-- src/overlay113/ov113_0225C700.c | 16 ++++----- src/overlay116/ov116_022604C4.c | 2 +- src/overlay116/ov116_02261870.c | 8 ++--- src/overlay116/ov116_0226432C.c | 38 ++++++++++---------- src/overlay117/ov117_022626B0.c | 2 +- src/overlay117/ov117_02263AF0.c | 54 ++++++++++++++-------------- src/overlay119/ov119_021D191C.c | 16 ++++----- src/unk_0200C6E4.c | 2 +- src/unk_0206A780.c | 2 +- src/unk_0206F314.c | 16 ++++----- src/unk_0208A3F4.c | 4 +-- src/unk_0208B284.c | 2 +- 64 files changed, 406 insertions(+), 380 deletions(-) diff --git a/include/battle/healthbar.h b/include/battle/healthbar.h index 95d66c9bbe..fc6b67e704 100644 --- a/include/battle/healthbar.h +++ b/include/battle/healthbar.h @@ -8,6 +8,17 @@ #include "struct_decls/cell_actor_data.h" #include "overlay016/struct_ov16_022674C4.h" +enum HealthbarType { + HEALTHBAR_TYPE_PLAYER_SOLO = 0, + HEALTHBAR_TYPE_ENEMY_SOLO, + HEALTHBAR_TYPE_PLAYER_SLOT_1, + HEALTHBAR_TYPE_ENEMY_SLOT_1, + HEALTHBAR_TYPE_PLAYER_SLOT_2, + HEALTHBAR_TYPE_ENEMY_SLOT_2, + HEALTHBAR_TYPE_SAFARI_ZONE, + HEALTHBAR_TYPE_PAL_PARK, +}; + void ov16_02266F1C(SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4); CellActorData * ov16_02267060(SpriteRenderer * param0, SpriteGfxHandler * param1, int param2); void Healthbar_Draw(Healthbar * param0, u32 param1, u32 param2); @@ -26,7 +37,18 @@ void ov16_022675D8(Healthbar * param0, int param1); void Healthbar_Enable(Healthbar * param0, int param1); void ov16_0226763C(Healthbar * param0, int param1, int param2); void Healthbar_SetScrollEffect(Healthbar * param0, int param1); -u8 Healthbar_Type(int param0, u32 param1); + +/** + * @brief Determine the type of healthbar to be displayed for a given battler type + * (solo player, solo enemy, or any slot in doubles) and battle type. + * + * Pal Park and Safari Zone use a different healthbar type than normal battles. + * + * @param battlerType The type of battler which the healthbar represents. + * @param battleType The type of battle in which the healthbar will be used. + * @return The resulting healthbar type; see enum HealthbarType. + */ +u8 Healthbar_Type(int battlerType, u32 battleType); void ov16_0226834C(Healthbar * param0, u8 * param1); void ov16_02268468(Healthbar * param0); void ov16_0226846C(Healthbar * param0); diff --git a/include/unk_0200C6E4.h b/include/unk_0200C6E4.h index 5787e98a7b..ae8df02515 100644 --- a/include/unk_0200C6E4.h +++ b/include/unk_0200C6E4.h @@ -79,7 +79,7 @@ void sub_0200D3CC(CellActorData * param0, u16 param1); u16 sub_0200D3D8(GraphicElementData * param0); u16 sub_0200D3E0(CellActorData * param0); void SpriteActor_DrawSprite(GraphicElementData * param0, int param1); -void sub_0200D3F4(CellActorData * param0, int param1); +void SpriteActor_EnableObject(CellActorData * param0, int param1); int sub_0200D400(GraphicElementData * param0); int sub_0200D408(CellActorData * param0); void sub_0200D414(GraphicElementData * param0, int param1); diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index f9d7a16f07..bb41f4adc8 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -989,8 +989,8 @@ static u8 ov10_02220604 (UnkStruct_ov10_0221FB28 * param0) static u8 ov10_02220698 (UnkStruct_ov10_0221FB28 * param0) { Sound_PlayEffect(1818); - sub_0200D3F4(param0->unk_198[12], 1); - sub_0200D3F4(param0->unk_198[13], 1); + SpriteActor_EnableObject(param0->unk_198[12], 1); + SpriteActor_EnableObject(param0->unk_198[13], 1); sub_0200D364(param0->unk_198[12], 0); param0->unk_B75 = 32; return 1; @@ -999,7 +999,7 @@ static u8 ov10_02220698 (UnkStruct_ov10_0221FB28 * param0) static u8 ov10_022206D8 (UnkStruct_ov10_0221FB28 * param0) { Sound_PlayEffect(1818); - sub_0200D3F4(param0->unk_198[12], 1); + SpriteActor_EnableObject(param0->unk_198[12], 1); param0->unk_B75 = 64; return 1; } @@ -1716,8 +1716,8 @@ static void ov10_0222166C (UnkStruct_ov10_0221FB28 * param0) static void ov10_022216E0 (UnkStruct_ov10_0221FB28 * param0) { - sub_0200D3F4(param0->unk_198[12], 0); - sub_0200D3F4(param0->unk_198[13], 0); + SpriteActor_EnableObject(param0->unk_198[12], 0); + SpriteActor_EnableObject(param0->unk_198[13], 0); if (param0->unk_00->unk_2A == 3) { SpriteActor_SetSpritePositionXY(param0->unk_198[12], 128, (96 - 24)); @@ -2108,14 +2108,14 @@ static void ov10_02221EEC (UnkStruct_ov10_0221FB28 * param0, u32 param1) if (param0->unk_214[param1].unk_04 == 0) { for (v0 = 0; v0 < 5; v0++) { - sub_0200D3F4(param0->unk_198[param1 * 5 + v0], 0); + SpriteActor_EnableObject(param0->unk_198[param1 * 5 + v0], 0); } } else { sub_0200D41C(param0->unk_198[param1 * 5 + 0], PokeIconPaletteIndex(param0->unk_214[param1].unk_04, param0->unk_214[param1].unk_11, param0->unk_214[param1].unk_0F)); sub_0200D364(param0->unk_198[param1 * 5 + 0], ov10_02221E84(param0, param1)); if (param0->unk_214[param1].unk_0A == 0) { - sub_0200D3F4(param0->unk_198[param1 * 5 + 1], 0); + SpriteActor_EnableObject(param0->unk_198[param1 * 5 + 1], 0); } else if (Item_IsMail(param0->unk_214[param1].unk_0A) == 1) { sub_0200D364(param0->unk_198[param1 * 5 + 1], 1); } else { @@ -2123,13 +2123,13 @@ static void ov10_02221EEC (UnkStruct_ov10_0221FB28 * param0, u32 param1) } if (param0->unk_214[param1].unk_10 == 0) { - sub_0200D3F4(param0->unk_198[param1 * 5 + 2], 0); + SpriteActor_EnableObject(param0->unk_198[param1 * 5 + 2], 0); } else { sub_0200D364(param0->unk_198[param1 * 5 + 2], 2); } if (param0->unk_214[param1].unk_14 == 7) { - sub_0200D3F4(param0->unk_198[param1 * 5 + 3], 0); + SpriteActor_EnableObject(param0->unk_198[param1 * 5 + 3], 0); } else { sub_0200D364(param0->unk_198[param1 * 5 + 3], param0->unk_214[v0].unk_14); } diff --git a/src/overlay012/ov12_0221FC20.c b/src/overlay012/ov12_0221FC20.c index db68fd8089..c8d71af0df 100644 --- a/src/overlay012/ov12_0221FC20.c +++ b/src/overlay012/ov12_0221FC20.c @@ -2216,12 +2216,12 @@ static void ov12_02221580 (UnkStruct_ov12_0221FCDC * param0) v1 = SpriteActor_LoadResources(param0->unk_BC->unk_AC, param0->unk_134, &v11); if (v12 == NULL) { - sub_0200D3F4(v1, 0); + SpriteActor_EnableObject(v1, 0); } else { int v17 = sub_020080C0(v12, 6); if (v17 == 1) { - sub_0200D3F4(v1, 0); + SpriteActor_EnableObject(v1, 0); } } @@ -2335,7 +2335,7 @@ static void ov12_02221834 (UnkStruct_ov12_0221FCDC * param0) param0->unk_48[v1].unk_08 = param0->unk_138[v2]; param0->unk_48[v1].unk_0C = 1; - sub_0200D3F4(param0->unk_48[v1].unk_08, 0); + SpriteActor_EnableObject(param0->unk_48[v1].unk_08, 0); if (ov12_02223364(param0) == 1) { int v3, v4; @@ -2358,9 +2358,9 @@ static void ov12_02221834 (UnkStruct_ov12_0221FCDC * param0) } if (v5 == 1) { - sub_0200D3F4(param0->unk_48[v1].unk_08, 0); + SpriteActor_EnableObject(param0->unk_48[v1].unk_08, 0); } else { - sub_0200D3F4(param0->unk_48[v1].unk_08, 1); + SpriteActor_EnableObject(param0->unk_48[v1].unk_08, 1); } } @@ -2369,7 +2369,7 @@ static void ov12_02221834 (UnkStruct_ov12_0221FCDC * param0) if ((v3 == 3) || (v3 == 4)) { sub_0200D474(param0->unk_48[v1].unk_08, 1); } else { - sub_0200D3F4(param0->unk_48[v1].unk_08, 0); + SpriteActor_EnableObject(param0->unk_48[v1].unk_08, 0); sub_0200D474(param0->unk_48[v1].unk_08, 255); } break; @@ -2377,7 +2377,7 @@ static void ov12_02221834 (UnkStruct_ov12_0221FCDC * param0) if ((v3 == 5) || (v3 == 2)) { sub_0200D474(param0->unk_48[v1].unk_08, 1); } else { - sub_0200D3F4(param0->unk_48[v1].unk_08, 0); + SpriteActor_EnableObject(param0->unk_48[v1].unk_08, 0); sub_0200D474(param0->unk_48[v1].unk_08, 255); } break; @@ -3805,7 +3805,7 @@ static void ov12_022230A8 (UnkStruct_ov12_0221FCDC * param0) v1 = inline_ov12_022204C4(param0->unk_18); param0->unk_18 += 1; - sub_0200D3F4(param0->unk_138[v0], v1); + SpriteActor_EnableObject(param0->unk_138[v0], v1); } static void ov12_022230CC (UnkStruct_ov12_0221FCDC * param0) @@ -4311,14 +4311,14 @@ UnkStruct_ov12_02223764 * ov12_022234F8 (BattleSystem * param0, int param1, int v2->unk_24[v5] = v10; if (v13 == NULL) { - sub_0200D3F4(v10, 0); + SpriteActor_EnableObject(v10, 0); } else if (sub_02008B38(v13) == 0) { - sub_0200D3F4(v10, 0); + SpriteActor_EnableObject(v10, 0); } else { int v16 = sub_020080C0(v13, 6); if (v16 == 1) { - sub_0200D3F4(v10, 0); + SpriteActor_EnableObject(v10, 0); } } diff --git a/src/overlay012/ov12_02225864.c b/src/overlay012/ov12_02225864.c index 50ada81015..b7c987039c 100644 --- a/src/overlay012/ov12_02225864.c +++ b/src/overlay012/ov12_02225864.c @@ -749,7 +749,7 @@ void ov12_022261C4 (UnkStruct_ov12_02226274 * param0, UnkStruct_ov12_02225F6C * param0->unk_98[3] = param11; for (v0 = 0; v0 < param0->unk_AC; v0++) { - sub_0200D3F4(param0->unk_98[v0], 0); + SpriteActor_EnableObject(param0->unk_98[v0], 0); } } @@ -764,7 +764,7 @@ BOOL ov12_02226274 (UnkStruct_ov12_02226274 * param0) } if (param0->unk_A8 <= param0->unk_AA) { - sub_0200D3F4(param0->unk_98[param0->unk_AD], 1); + SpriteActor_EnableObject(param0->unk_98[param0->unk_AD], 1); param0->unk_AD++; param0->unk_AA = 0; } @@ -784,7 +784,7 @@ BOOL ov12_02226274 (UnkStruct_ov12_02226274 * param0) sub_0200D6E8(param0->unk_98[v0], v2, v3); } } else { - sub_0200D3F4(param0->unk_98[v0], 0); + SpriteActor_EnableObject(param0->unk_98[v0], 0); } } diff --git a/src/overlay012/ov12_02226B84.c b/src/overlay012/ov12_02226B84.c index 656446d01d..2a1954873b 100644 --- a/src/overlay012/ov12_02226B84.c +++ b/src/overlay012/ov12_02226B84.c @@ -962,7 +962,7 @@ void ov12_02227534 (UnkStruct_ov12_0221FCDC * param0) static void ov12_02227620 (UnkStruct_ov12_02227620 * param0, s16 param1, s16 param2) { - sub_0200D3F4(param0->unk_14, 1); + SpriteActor_EnableObject(param0->unk_14, 1); SpriteActor_SetSpritePositionXY(param0->unk_14, param1, param2); param0->unk_40 = 0; ov12_02225E68(¶m0->unk_18, 10, 10, 14, 4); @@ -972,7 +972,7 @@ static BOOL ov12_02227658 (UnkStruct_ov12_02227620 * param0) { if (ov12_022260A8(¶m0->unk_18, param0->unk_14) == 0) { if (param0->unk_40) { - sub_0200D3F4(param0->unk_14, 0); + SpriteActor_EnableObject(param0->unk_14, 0); return 1; } else { param0->unk_40 = 1; @@ -1053,7 +1053,7 @@ void ov12_0222777C (UnkStruct_ov12_0221FCDC * param0, SpriteRenderer * param1, S sub_0200D474(v0->unk_14, 100); sub_0200D460(v0->unk_14, 1); sub_0200D6A4(v0->unk_14, 2); - sub_0200D3F4(v0->unk_14, 0); + SpriteActor_EnableObject(v0->unk_14, 0); v0->unk_44 = 4; v0->unk_3C = ov12_02225964(v0->unk_00, ov12_02220240(v0->unk_00)); @@ -2825,7 +2825,7 @@ void ov12_02229908 (UnkStruct_ov12_0221FCDC * param0) v0->unk_28 = ov12_02220280(v0->unk_00.unk_04, 3); v0->unk_1C = ov12_022202C0(v0->unk_00.unk_04, ov12_02220280(v0->unk_00.unk_04, 0)); - sub_0200D3F4(v0->unk_1C, 1); + SpriteActor_EnableObject(v0->unk_1C, 1); if (v0->unk_20 < 0) { v0->unk_2C = 0; @@ -3619,13 +3619,13 @@ static void ov12_0222A624 (UnkStruct_ov12_0222A624 * param0) SpriteActor_GetSpritePositionXY(param0->unk_1C, &v0, &v1); if (v1 > 130) { - sub_0200D3F4(param0->unk_1C, 0); + SpriteActor_EnableObject(param0->unk_1C, 0); } } param0->unk_38++; } else { - sub_0200D3F4(param0->unk_1C, 0); + SpriteActor_EnableObject(param0->unk_1C, 0); } } @@ -3649,7 +3649,7 @@ static void ov12_0222A878 (SysTask * param0, void * param1) G2_SetWndOutsidePlane(GX_WND_PLANEMASK_NONE, 0); G2_SetWnd0Position(0, 0, 0, 0); - sub_0200D3F4(v0->unk_1C, 0); + SpriteActor_EnableObject(v0->unk_1C, 0); sub_0200C7EC(v0->unk_00.unk_0C); ov12_02220220(v0->unk_00.unk_04, param0); @@ -3692,7 +3692,7 @@ void ov12_0222A8F4 (UnkStruct_ov12_0221FCDC * param0) if (ov12_02223364(param0) != 1) { if ((ov12_02220280(param0, 4) == 2) || (ov12_02220280(param0, 4) == 3)) { - sub_0200D3F4(v0->unk_1C, 0); + SpriteActor_EnableObject(v0->unk_1C, 0); Heap_FreeToHeap(v0); return; } diff --git a/src/overlay012/ov12_0222AC70.c b/src/overlay012/ov12_0222AC70.c index 4852074a09..8947715464 100644 --- a/src/overlay012/ov12_0222AC70.c +++ b/src/overlay012/ov12_0222AC70.c @@ -310,19 +310,19 @@ static void ov12_0222AC70 (SysTask * param0, void * param1) v1->unk_01[v0] = 0; if (sub_0200D408(v1->unk_14[v0]) == 1) { - sub_0200D3F4(v1->unk_14[v0], 0); + SpriteActor_EnableObject(v1->unk_14[v0], 0); } else { - sub_0200D3F4(v1->unk_14[v0], 1); + SpriteActor_EnableObject(v1->unk_14[v0], 1); } } } else { - sub_0200D3F4(v1->unk_14[v0], 0); + SpriteActor_EnableObject(v1->unk_14[v0], 0); } } if (v1->unk_04 >= 45) { for (v0 = 0; v0 < ov12_02220280(v1->unk_08, 0); v0++) { - sub_0200D3F4(v1->unk_14[v0], 1); + SpriteActor_EnableObject(v1->unk_14[v0], 1); } v1->unk_04 = 0; @@ -1095,8 +1095,8 @@ static void ov12_0222BFF4 (SysTask * param0, void * param1) } break; case 1: - sub_0200D3F4(v0->unk_0C, 1); - sub_0200D3F4(v0->unk_10, 1); + SpriteActor_EnableObject(v0->unk_0C, 1); + SpriteActor_EnableObject(v0->unk_10, 1); SpriteActor_SetOAMMode(v0->unk_10, GX_OAM_MODE_OBJWND); v0->unk_00++; break; @@ -1104,8 +1104,8 @@ static void ov12_0222BFF4 (SysTask * param0, void * param1) if ((++v0->unk_01) >= 10) { G2_SetWndOutsidePlane((GX_WND_PLANEMASK_BG0 | GX_WND_PLANEMASK_BG1 | GX_WND_PLANEMASK_BG2 | GX_WND_PLANEMASK_BG3 | GX_WND_PLANEMASK_OBJ), 0); G2_SetWndOBJInsidePlane((GX_WND_PLANEMASK_BG0 | GX_WND_PLANEMASK_BG1 | GX_WND_PLANEMASK_BG2 | GX_WND_PLANEMASK_BG3 | GX_WND_PLANEMASK_OBJ), 0); - sub_0200D3F4(v0->unk_0C, 0); - sub_0200D3F4(v0->unk_10, 0); + SpriteActor_EnableObject(v0->unk_0C, 0); + SpriteActor_EnableObject(v0->unk_10, 0); v0->unk_01 = 0; v0->unk_00++; } @@ -1146,8 +1146,8 @@ void ov12_0222C0C0 (UnkStruct_ov12_0221FCDC * param0) sub_02003B08(ov12_0222332C(v0->unk_04), v3, v2, ov12_0221FDE4(param0), 2, 0x20, v1 * 16, 256, 256, 256); } - sub_0200D3F4(v0->unk_0C, 0); - sub_0200D3F4(v0->unk_10, 0); + SpriteActor_EnableObject(v0->unk_0C, 0); + SpriteActor_EnableObject(v0->unk_10, 0); ov12_022201E8(v0->unk_04, ov12_0222BFF4, v0); } @@ -1888,7 +1888,7 @@ void ov12_0222CFA0 (UnkStruct_ov12_0221FCDC * param0) if (ov12_0221FDD4(param0) == 1) { v0->unk_40 = v0->unk_44[0]; - sub_0200D3F4(v0->unk_44[1], 0); + SpriteActor_EnableObject(v0->unk_44[1], 0); sub_0200D364(v0->unk_40, 0); v0->unk_14.unk_00 = 255 - 76; v0->unk_14.unk_02 = 120; @@ -1897,13 +1897,13 @@ void ov12_0222CFA0 (UnkStruct_ov12_0221FCDC * param0) } else { if (ov12_0223525C(param0, ov12_02220240(param0)) == 0x4) { v0->unk_40 = v0->unk_44[1]; - sub_0200D3F4(v0->unk_44[0], 0); + SpriteActor_EnableObject(v0->unk_44[0], 0); sub_0200D364(v0->unk_40, 1); v0->unk_14.unk_00 = 144; v0->unk_14.unk_02 = 64; } else { v0->unk_40 = v0->unk_44[0]; - sub_0200D3F4(v0->unk_44[1], 0); + SpriteActor_EnableObject(v0->unk_44[1], 0); sub_0200D364(v0->unk_40, 0); v0->unk_14.unk_00 = 76; v0->unk_14.unk_02 = 120; diff --git a/src/overlay012/ov12_0222D6B0.c b/src/overlay012/ov12_0222D6B0.c index 2a0e5342e4..80d2141b42 100644 --- a/src/overlay012/ov12_0222D6B0.c +++ b/src/overlay012/ov12_0222D6B0.c @@ -313,21 +313,21 @@ static void ov12_0222D934 (SysTask * param0, void * param1) case 0: v2->unk_34 = v2->unk_18[0]; v2->unk_38 = v2->unk_18[3]; - sub_0200D3F4(v2->unk_34, 1); - sub_0200D3F4(v2->unk_38, 1); + SpriteActor_EnableObject(v2->unk_34, 1); + SpriteActor_EnableObject(v2->unk_38, 1); break; case 1: v2->unk_34 = v2->unk_18[1]; v2->unk_38 = v2->unk_18[2]; - sub_0200D3F4(v2->unk_34, 1); - sub_0200D3F4(v2->unk_38, 1); + SpriteActor_EnableObject(v2->unk_34, 1); + SpriteActor_EnableObject(v2->unk_38, 1); break; case 2: case 3: v2->unk_34 = v2->unk_18[4]; v2->unk_38 = v2->unk_18[5]; - sub_0200D3F4(v2->unk_34, 1); - sub_0200D3F4(v2->unk_38, 1); + SpriteActor_EnableObject(v2->unk_34, 1); + SpriteActor_EnableObject(v2->unk_38, 1); break; } @@ -362,8 +362,8 @@ static void ov12_0222D934 (SysTask * param0, void * param1) if (v5 >= 2) { if (v2->unk_30 <= 3) { - sub_0200D3F4(v2->unk_34, 0); - sub_0200D3F4(v2->unk_38, 0); + SpriteActor_EnableObject(v2->unk_34, 0); + SpriteActor_EnableObject(v2->unk_38, 0); v2->unk_00--; } else { v2->unk_00++; @@ -458,10 +458,10 @@ void ov12_0222DB60 (UnkStruct_ov12_0221FCDC * param0, SpriteRenderer * param1, S SpriteActor_SetOAMMode(v1->unk_18[v0], GX_OAM_MODE_XLU); } - sub_0200D3F4(v1->unk_18[1], 0); - sub_0200D3F4(v1->unk_18[2], 0); - sub_0200D3F4(v1->unk_18[4], 0); - sub_0200D3F4(v1->unk_18[5], 0); + SpriteActor_EnableObject(v1->unk_18[1], 0); + SpriteActor_EnableObject(v1->unk_18[2], 0); + SpriteActor_EnableObject(v1->unk_18[4], 0); + SpriteActor_EnableObject(v1->unk_18[5], 0); ov12_022201CC(param0, ov12_0222D934, v1, 1100); } @@ -487,7 +487,7 @@ static void ov12_0222DC98 (SysTask * param0, void * param1) break; case 1: if ((++v0->unk_0D) >= 3) { - sub_0200D3F4(v0->unk_10, 1); + SpriteActor_EnableObject(v0->unk_10, 1); v0->unk_0D = 0; v0->unk_0C++; } @@ -547,7 +547,7 @@ static void ov12_0222DC98 (SysTask * param0, void * param1) v3 = ov12_02225C50(&v0->unk_14, v0->unk_10); if (v3 == 0) { - sub_0200D3F4(v0->unk_10, 0); + SpriteActor_EnableObject(v0->unk_10, 0); v0->unk_0C++; } else { break; @@ -684,7 +684,7 @@ void ov12_0222DEFC (UnkStruct_ov12_0221FCDC * param0, SpriteRenderer * param1, S SpriteActor_SetSpritePositionXY(v6, v4, v5); sub_0200D6A4(v6, 2); sub_0200D6E8(v6, v2->unk_14[v1].unk_38, v2->unk_14[v1].unk_38); - sub_0200D3F4(v6, 0); + SpriteActor_EnableObject(v6, 0); ov12_022201CC(param0, ov12_0222DC98, &v2->unk_14[v1], 1100 - 1); @@ -809,7 +809,7 @@ static void ov12_0222E25C (SysTask * param0, void * param1) v0->unk_1E[v1]++; if (v0->unk_1E[v1] >= 40) { - sub_0200D3F4(v0->unk_28[v1], 0); + SpriteActor_EnableObject(v0->unk_28[v1], 0); v2++; } } diff --git a/src/overlay012/ov12_0222E784.c b/src/overlay012/ov12_0222E784.c index 6cb615eda0..04c0ebfe9a 100644 --- a/src/overlay012/ov12_0222E784.c +++ b/src/overlay012/ov12_0222E784.c @@ -32,9 +32,9 @@ static void ov12_0222E784 (SysTask * param0, void * param1) switch (v0->unk_00.unk_00) { case 0: if (ov12_02225F6C(&v0->unk_60) == 0) { - sub_0200D3F4(v0->unk_1C.unk_0C, 0); - sub_0200D3F4(v0->unk_30[0].unk_0C, 0); - sub_0200D3F4(v0->unk_30[0].unk_0C, 0); + SpriteActor_EnableObject(v0->unk_1C.unk_0C, 0); + SpriteActor_EnableObject(v0->unk_30[0].unk_0C, 0); + SpriteActor_EnableObject(v0->unk_30[0].unk_0C, 0); ov12_02220220(v0->unk_00.unk_04, param0); ov12_02235E80(v0); diff --git a/src/overlay012/ov12_0222E91C.c b/src/overlay012/ov12_0222E91C.c index d59cce5ed8..55e8a85286 100644 --- a/src/overlay012/ov12_0222E91C.c +++ b/src/overlay012/ov12_0222E91C.c @@ -209,7 +209,7 @@ static void ov12_0222EC18 (SysTask * param0, void * param1) ov12_0222E248(v0->unk_30[v1]); if (v0->unk_1E[v1] >= 160) { - sub_0200D3F4(v0->unk_30[v1], 0); + SpriteActor_EnableObject(v0->unk_30[v1], 0); v2++; } } @@ -344,7 +344,7 @@ static void ov12_0222EE50 (SysTask * param0, void * param1) if (v0->unk_30 <= 0.2) { v0->unk_00.unk_00++; - sub_0200D3F4(v0->unk_1C[0], 0); + SpriteActor_EnableObject(v0->unk_1C[0], 0); } else { sub_0200D6E8(v0->unk_1C[0], v0->unk_2C * v0->unk_36, v0->unk_30); } @@ -466,7 +466,7 @@ void ov12_0222EFB0 (UnkStruct_ov12_0221FCDC * param0) SpriteActor_SetSpritePositionXY(v0->unk_1C[0], v12.unk_00, v11.unk_02 + v7); } - sub_0200D3F4(v0->unk_1C[0], 1); + SpriteActor_EnableObject(v0->unk_1C[0], 1); v0->unk_34 = 0; v0->unk_35 = 15; diff --git a/src/overlay012/ov12_0222F700.c b/src/overlay012/ov12_0222F700.c index d16e526b03..b1d2df53df 100644 --- a/src/overlay012/ov12_0222F700.c +++ b/src/overlay012/ov12_0222F700.c @@ -682,7 +682,7 @@ static void ov12_0222FAFC (UnkStruct_ov12_0222FAFC * param0, SpriteRenderer * pa param0->unk_44 = param4->unk_44; param0->unk_48 = 0; - sub_0200D3F4(param0->unk_00, 0); + SpriteActor_EnableObject(param0->unk_00, 0); sub_0200D474(param0->unk_00, 100); sub_0200D460(param0->unk_00, 1); } @@ -694,7 +694,7 @@ static void ov12_0222FB6C (UnkStruct_ov12_0222FAFC * param0) static void ov12_0222FB78 (UnkStruct_ov12_0222FAFC * param0, BOOL param1) { - sub_0200D3F4(param0->unk_00, param1); + SpriteActor_EnableObject(param0->unk_00, param1); } static BOOL ov12_0222FB84 (UnkStruct_ov12_0222FAFC * param0) @@ -758,7 +758,7 @@ static void ov12_0222FC44 (SysTask * param0, void * param1) case 3: if (v0->unk_F0 <= 0) { v0->unk_58[v0->unk_F4].unk_48 = 1; - sub_0200D3F4(v0->unk_58[v0->unk_F4].unk_00, 1); + SpriteActor_EnableObject(v0->unk_58[v0->unk_F4].unk_00, 1); v0->unk_F4++; v0->unk_F0 = 8; } @@ -1131,7 +1131,7 @@ static void ov12_02230540 (SysTask * param0, void * param1) sub_0200D6E8(v0->unk_10, v2, v3); if (v1 == 0) { - sub_0200D3F4(v0->unk_10, 0); + SpriteActor_EnableObject(v0->unk_10, 0); v0->unk_08++; } break; @@ -1378,12 +1378,12 @@ void ov12_02230A8C (UnkStruct_ov12_0221FCDC * param0) v5 = ov12_02235254(v0->unk_00, ov12_02220248(v0->unk_00)); if ((v5 == 5) || (v5 == 2)) { - sub_0200D3F4(v0->unk_48, 1); + SpriteActor_EnableObject(v0->unk_48, 1); sub_0200D460(v0->unk_48, 2); } else { BGL_SetPriority(ov12_022233B0(v0->unk_00, 1), ov12_0222339C(v0->unk_00)); BGL_SetPriority(0, ov12_0222339C(v0->unk_00) + 1); - sub_0200D3F4(v0->unk_48, 0); + SpriteActor_EnableObject(v0->unk_48, 0); } v0->unk_14 = ov12_0222662C(v3, v3 + 80, (((5 * 0xffff) / 360)), (5 * FX32_ONE), 100, ov12_022233EC(param0, 1), 0, ov12_022266E8(-v2, -v3), ov12_0221FDE4(param0)); @@ -1529,7 +1529,7 @@ static void ov12_02230E24 (UnkStruct_ov12_02230E24 * param0, CellActorData * par sub_0200D6E8(param0->unk_00, -1, 1); } - sub_0200D3F4(param0->unk_00, 0); + SpriteActor_EnableObject(param0->unk_00, 0); } static void ov12_02230E9C (UnkStruct_ov12_02230E24 * param0) @@ -1539,7 +1539,7 @@ static void ov12_02230E9C (UnkStruct_ov12_02230E24 * param0) static void ov12_02230EA8 (UnkStruct_ov12_02230E24 * param0) { - sub_0200D3F4(param0->unk_00, 1); + SpriteActor_EnableObject(param0->unk_00, 1); sub_0200D390(param0->unk_00, 1); } @@ -1698,7 +1698,7 @@ static void ov12_022310D4 (SysTask * param0, void * param1) break; case 3: if (ov12_02225D2C(&v0->unk_4C, &v0->unk_70, v0->unk_48) == 0) { - sub_0200D3F4(v0->unk_48, 0); + SpriteActor_EnableObject(v0->unk_48, 0); v0->unk_0C++; } break; @@ -1782,7 +1782,7 @@ static void ov12_02231390 (SysTask * param0, void * param1) break; case 2: if (ov12_02226454(&v0->unk_40)) { - sub_0200D3F4(v0->unk_14, 1); + SpriteActor_EnableObject(v0->unk_14, 1); sub_02007DEC(v0->unk_10, 6, 0); v0->unk_08++; } @@ -1877,7 +1877,7 @@ static BOOL ov12_02231584 (UnkStruct_ov12_02231508 * param0) break; case 1: if (ov12_02226454(¶m0->unk_8C)) { - sub_0200D3F4(param0->unk_3C, 0); + SpriteActor_EnableObject(param0->unk_3C, 0); param0->unk_40++; } break; @@ -2023,7 +2023,7 @@ static void ov12_0223181C (SysTask * param0, void * param1) break; case 2: if (ov12_02226454(&v0->unk_3C)) { - sub_0200D3F4(v0->unk_14, 0); + SpriteActor_EnableObject(v0->unk_14, 0); } if (sub_020087B4(v0->unk_10) == 0) { @@ -2165,7 +2165,7 @@ static void ov12_02231A38 (SysTask * param0, void * param1) if (v0->unk_50 < 0) { v0->unk_0C++; } else { - sub_0200D3F4(v0->unk_24, v0->unk_58); + SpriteActor_EnableObject(v0->unk_24, v0->unk_58); v0->unk_58 ^= 1; } } @@ -2545,7 +2545,7 @@ static void ov12_0223223C (SysTask * param0, void * param1) break; case 3: if (ov12_02226454(&v0->unk_3C)) { - sub_0200D3F4(v0->unk_14, 0); + SpriteActor_EnableObject(v0->unk_14, 0); v0->unk_0C++; } break; @@ -2776,7 +2776,7 @@ static void ov12_0223283C (CellActorData * param0, int * param1, fx32 param2) sub_0200D474(param0, 100); sub_0200D460(param0, 1); - sub_0200D3F4(param0, 1); + SpriteActor_EnableObject(param0, 1); sub_0200D390(param0, 1); sub_0200D3A4(param0, param2); sub_0200D364(param0, 0); @@ -2901,7 +2901,7 @@ void ov12_022329E0 (UnkStruct_ov12_0221FCDC * param0, SpriteRenderer * param1, S v0->unk_48[v2] = SpriteActor_LoadResources(param1, param2, &v1); } - sub_0200D3F4(v0->unk_48[v2], 0); + SpriteActor_EnableObject(v0->unk_48[v2], 0); v5 = FX_Mul(FX_CosIdx((((90 * 0xffff) / 360) / (6 / 2)) * (v2 / 2)), (48 * FX32_ONE)) >> FX32_SHIFT; v6 = FX_Mul(FX_SinIdx((((90 * 0xffff) / 360) / (6 / 2)) * (v2 / 2)), (48 * FX32_ONE)) >> FX32_SHIFT; @@ -3036,8 +3036,8 @@ static void ov12_02232D64 (UnkStruct_ov12_02232D38 * param0) v0 = ov12_02235254(param0->unk_00, ov12_02220240(param0->unk_00)); - sub_0200D3F4(param0->unk_20, Unk_ov12_0223A1CC[v0]); - sub_0200D3F4(param0->unk_18, 1); + SpriteActor_EnableObject(param0->unk_20, Unk_ov12_0223A1CC[v0]); + SpriteActor_EnableObject(param0->unk_18, 1); ov12_02225FA4(¶m0->unk_28, &v1, &v2); @@ -3089,8 +3089,8 @@ static BOOL ov12_02232E04 (UnkStruct_ov12_02232D38 * param0) } else { param0->unk_94++; - sub_0200D3F4(param0->unk_20, 0); - sub_0200D3F4(param0->unk_18, 0); + SpriteActor_EnableObject(param0->unk_20, 0); + SpriteActor_EnableObject(param0->unk_18, 0); v0 = 1; } @@ -3127,8 +3127,8 @@ static void ov12_02232F30 (UnkStruct_ov12_02232D38 * param0) v4 = ov12_02235254(param0->unk_00, ov12_02220248(param0->unk_00)); - sub_0200D3F4(param0->unk_24, Unk_ov12_0223A1CC[v4]); - sub_0200D3F4(param0->unk_1C, 1); + SpriteActor_EnableObject(param0->unk_24, Unk_ov12_0223A1CC[v4]); + SpriteActor_EnableObject(param0->unk_1C, 1); ov12_02232D38(param0, param0->unk_1C); } @@ -3253,7 +3253,7 @@ void ov12_02233178 (UnkStruct_ov12_0221FCDC * param0) sub_0200D474(v0->unk_18, 100); sub_0200D460(v0->unk_18, 1); SpriteActor_SetSpritePositionXY(v0->unk_18, v2, v3); - sub_0200D3F4(v0->unk_18, 0); + SpriteActor_EnableObject(v0->unk_18, 0); SpriteActor_SetOAMMode(v0->unk_18, GX_OAM_MODE_XLU); sub_0200D6A4(v0->unk_18, 2); @@ -3262,7 +3262,7 @@ void ov12_02233178 (UnkStruct_ov12_0221FCDC * param0) sub_0200D474(v0->unk_1C, 100); sub_0200D460(v0->unk_1C, 1); SpriteActor_SetSpritePositionXY(v0->unk_1C, v4, v5); - sub_0200D3F4(v0->unk_1C, 0); + SpriteActor_EnableObject(v0->unk_1C, 0); SpriteActor_SetOAMMode(v0->unk_1C, GX_OAM_MODE_XLU); sub_0200D6A4(v0->unk_1C, 2); sub_0200D7E0(v0->unk_1C, 0, 80 / 2); @@ -3272,8 +3272,8 @@ void ov12_02233178 (UnkStruct_ov12_0221FCDC * param0) v0->unk_20 = ov12_022202C0(v0->unk_00, 2); v0->unk_24 = ov12_022202C0(v0->unk_00, 3); - sub_0200D3F4(v0->unk_20, 0); - sub_0200D3F4(v0->unk_24, 0); + SpriteActor_EnableObject(v0->unk_20, 0); + SpriteActor_EnableObject(v0->unk_24, 0); ov12_022201E8(v0->unk_00, ov12_02233094, v0); } @@ -3288,7 +3288,7 @@ static void ov12_02233338 (UnkStruct_ov12_022332E8 * param0) { ov12_02225E68(¶m0->unk_F8, 10, 10, 25, 6); ov12_022261C4(¶m0->unk_48, ¶m0->unk_F8, ov12_02225EB8, param0->unk_38, param0->unk_3A, 5, 3, 1, param0->unk_3C[0], param0->unk_3C[1], param0->unk_3C[2], NULL); - sub_0200D3F4(param0->unk_3C[0], 1); + SpriteActor_EnableObject(param0->unk_3C[0], 1); } static void ov12_02233394 (SysTask * param0, void * param1) @@ -3303,7 +3303,7 @@ static void ov12_02233394 (SysTask * param0, void * param1) break; case 1: if (ov12_02226274(&v0->unk_48) == 0) { - sub_0200D3F4(v0->unk_3C[0], 1); + SpriteActor_EnableObject(v0->unk_3C[0], 1); v0->unk_0C++; ov12_02226108(&v0->unk_14, 4, 0, 1, 6); } @@ -3362,7 +3362,7 @@ void ov12_02233454 (UnkStruct_ov12_0221FCDC * param0, SpriteRenderer * param1, S sub_0200D474(v0->unk_3C[v1], 100); sub_0200D460(v0->unk_3C[v1], 1); SpriteActor_SetSpritePositionXY(v0->unk_3C[v1], v0->unk_38, v0->unk_3A); - sub_0200D3F4(v0->unk_3C[v1], 0); + SpriteActor_EnableObject(v0->unk_3C[v1], 0); sub_0200D6A4(v0->unk_3C[v1], 2); } @@ -3497,7 +3497,7 @@ static void ov12_022337E0 (CellActorData * param0, UnkStruct_ov12_02225F6C * par SpriteActor_GetSpritePositionXY(param0, &v0, &v1); ov12_02225BC8(param1, v0 + (0 * param2), v0 + (256 * param2), v1 + (0 * param3), v1 + (-128 * param3), 59); - sub_0200D3F4(param0, 1); + SpriteActor_EnableObject(param0, 1); } static BOOL ov12_02233834 (CellActorData * param0, UnkStruct_ov12_02225F6C * param1) @@ -3602,7 +3602,7 @@ void ov12_022339C4 (UnkStruct_ov12_0221FCDC * param0, SpriteRenderer * param1, S sub_0200D474(v0->unk_18[v1], 100); sub_0200D460(v0->unk_18[v1], 1); sub_0200D6A4(v0->unk_18[v1], 2); - sub_0200D3F4(v0->unk_18[v1], 0); + SpriteActor_EnableObject(v0->unk_18[v1], 0); SpriteActor_SetSpritePositionXY(v0->unk_18[v1], v2, v3); sub_0200D364(v0->unk_18[v1], v1 % 3); } diff --git a/src/overlay012/ov12_022346A4.c b/src/overlay012/ov12_022346A4.c index ed4c39ab64..b7dc60d373 100644 --- a/src/overlay012/ov12_022346A4.c +++ b/src/overlay012/ov12_022346A4.c @@ -99,7 +99,7 @@ void ov12_022346A4 (UnkStruct_ov12_0221FCDC * param0, SpriteRenderer * param1, S v1->unk_14[v2] = SpriteActor_LoadResources(param1, param2, &v0); } - sub_0200D3F4(v1->unk_14[v2], 0); + SpriteActor_EnableObject(v1->unk_14[v2], 0); sub_0200D474(v1->unk_14[v2], 100); sub_0200D460(v1->unk_14[v2], 1); } @@ -158,7 +158,7 @@ static void ov12_0223483C (CellActorData * param0, UnkStruct_ov12_02225F6C * par s16 v0, v1; sub_0200D6A4(param0, 2); - sub_0200D3F4(param0, 1); + SpriteActor_EnableObject(param0, 1); SpriteActor_GetSpritePositionXY(param0, &v0, &v1); ov12_02225BC8(param1, v0, v0 + (16 * param3), v1, v1 + -32, 32); @@ -176,7 +176,7 @@ static BOOL ov12_0223489C (CellActorData * param0, UnkStruct_ov12_02225F6C * par return 0; } - sub_0200D3F4(param0, 0); + SpriteActor_EnableObject(param0, 0); return 1; } @@ -191,7 +191,7 @@ void ov12_022348C8 (UnkStruct_ov12_0221FCDC * param0, SpriteRenderer * param1, S v0->unk_0C = param2; v0->unk_10 = param3; - sub_0200D3F4(v0->unk_10, 0); + SpriteActor_EnableObject(v0->unk_10, 0); SpriteActor_SetOAMMode(v0->unk_10, GX_OAM_MODE_XLU); sub_0200D474(v0->unk_10, 100); sub_0200D460(v0->unk_10, 1); @@ -209,7 +209,7 @@ static void ov12_02234918 (SysTask * param0, void * param1) switch (v0->unk_04) { case 0: ov12_02226424(&v0->unk_14, 0, 16, 20 - 0, 20 - 16, 10); - sub_0200D3F4(v0->unk_10, 1); + SpriteActor_EnableObject(v0->unk_10, 1); ov12_02235780(v0->unk_00, 0, 20 - 0); v0->unk_04++; break; @@ -235,7 +235,7 @@ static void ov12_02234918 (SysTask * param0, void * param1) case 3: if (ov12_02226454(&v0->unk_14)) { v0->unk_04++; - sub_0200D3F4(v0->unk_10, 0); + SpriteActor_EnableObject(v0->unk_10, 0); } break; case 4: @@ -278,7 +278,7 @@ void ov12_02234A10 (UnkStruct_ov12_0221FCDC * param0, SpriteRenderer * param1, S sub_0200D474(v1->unk_0C[v3], 100); sub_0200D460(v1->unk_0C[v3], 1); - sub_0200D3F4(v1->unk_0C[v3], 0); + SpriteActor_EnableObject(v1->unk_0C[v3], 0); ov12_02234AE0(v1->unk_0C[v3], &v1->unk_24[v3], &v1->unk_3C[v3], v3, v4); } @@ -309,13 +309,13 @@ static BOOL ov12_02234B34 (CellActorData * param0, int * param1, int * param2) (*param2)--; if (*param2 == 0) { - sub_0200D3F4(param0, 1); + SpriteActor_EnableObject(param0, 1); } } else { if (*param1 > 0) { (*param1)--; } else { - sub_0200D3F4(param0, 0); + SpriteActor_EnableObject(param0, 0); return 1; } } diff --git a/src/overlay012/ov12_02234E44.c b/src/overlay012/ov12_02234E44.c index da422ce9c5..451f9b3845 100644 --- a/src/overlay012/ov12_02234E44.c +++ b/src/overlay012/ov12_02234E44.c @@ -101,9 +101,9 @@ static void ov12_02234EF0 (SysTask * param0, void * param1) if ((v0->unk_00.unk_14 == 0) && (v0->unk_00.unk_16 == 16)) { sub_02019EBC(v0->unk_18.unk_14, 2); - sub_0200D3F4(v0->unk_34, 0); - sub_0200D3F4(v0->unk_38, 0); - sub_0200D3F4(v0->unk_3C, 0); + SpriteActor_EnableObject(v0->unk_34, 0); + SpriteActor_EnableObject(v0->unk_38, 0); + SpriteActor_EnableObject(v0->unk_3C, 0); v0->unk_18.unk_00++; } @@ -173,13 +173,13 @@ static void ov12_0223507C (UnkStruct_ov12_0221FCDC * param0, UnkStruct_ov12_0223 v2 = ov12_02235254(param0, v3); if (ov12_0221FDD4(param0) == 1) { - sub_0200D3F4(v0->unk_3C, 0); + SpriteActor_EnableObject(v0->unk_3C, 0); v1 = ov12_02223428(v0->unk_18.unk_04, 2); sub_0200D460(v0->unk_34, v1); sub_0200D460(v0->unk_38, v1); } else { if ((v2 == 0) || (v2 == 1)) { - sub_0200D3F4(v0->unk_3C, 0); + SpriteActor_EnableObject(v0->unk_3C, 0); } else if ((v2 == 4) || (v2 == 3)) { if (v0->unk_00.unk_08 == 0) { sub_0200D460(v0->unk_3C, v1 + 1); diff --git a/src/overlay012/ov12_02235E94.c b/src/overlay012/ov12_02235E94.c index 4ac6354f91..0604a8173d 100644 --- a/src/overlay012/ov12_02235E94.c +++ b/src/overlay012/ov12_02235E94.c @@ -1554,7 +1554,7 @@ static BOOL ov12_02236E7C (BallRotation * param0) } else { param0->unk_20 = 0; param0->unk_21 = 15; - sub_0200D3F4(param0->unk_30, 0); + SpriteActor_EnableObject(param0->unk_30, 0); param0->unk_08++; } @@ -2335,7 +2335,7 @@ static void ov12_02237D8C (BallRotation * param0) param0->unk_30 = SpriteActor_LoadResources(param0->unk_90.cellActorSys, param0->unk_2C, &v1); - sub_0200D3F4(param0->unk_30, 1); + SpriteActor_EnableObject(param0->unk_30, 1); sub_0200D6A4(param0->unk_30, 2); sub_0200D3CC(param0->unk_30, 0); sub_0200D364(param0->unk_30, 0); @@ -2346,7 +2346,7 @@ static void ov12_02237D8C (BallRotation * param0) void ov12_02237E0C (BallRotation * param0, int param1) { - sub_0200D3F4(param0->unk_30, param1); + SpriteActor_EnableObject(param0->unk_30, param1); } void ov12_02237E18 (BallRotation * param0, s16 param1, s16 param2) diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index ca46f26f86..49d338ade0 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -893,7 +893,7 @@ static u8 ov13_022208A4 (UnkStruct_ov13_022213F0 * param0) param0->unk_04[v0->unk_11].unk_17_3 = sub_0208E9F0(param0->unk_04[v0->unk_11].unk_00); if (param0->unk_04[v0->unk_11].unk_17_3 == 7) { - sub_0200D3F4(param0->unk_1FB4[13 + v0->unk_11], 0); + SpriteActor_EnableObject(param0->unk_1FB4[13 + v0->unk_11], 0); ov13_022234A8(param0, v0->unk_11); } @@ -1725,7 +1725,7 @@ static u8 ov13_022219DC (UnkStruct_ov13_022213F0 * param0) static void ov13_02221A04 (UnkStruct_ov13_022213F0 * param0) { - sub_0200D3F4(param0->unk_1FB4[26], 0); + SpriteActor_EnableObject(param0->unk_1FB4[26], 0); sub_0201AD10(¶m0->unk_206C[10]); sub_0201AD10(¶m0->unk_206C[6]); sub_0201AD10(¶m0->unk_206C[7]); diff --git a/src/overlay013/ov13_02224500.c b/src/overlay013/ov13_02224500.c index d38376ac09..fae514b2be 100644 --- a/src/overlay013/ov13_02224500.c +++ b/src/overlay013/ov13_02224500.c @@ -379,7 +379,7 @@ void ov13_02224970 (UnkStruct_ov13_022213F0 * param0) static void ov13_022249AC (CellActorData * param0, const int param1, const int param2) { - sub_0200D3F4(param0, 1); + SpriteActor_EnableObject(param0, 1); SpriteActor_SetSpritePositionXY(param0, param1, param2); } @@ -463,7 +463,7 @@ void ov13_02224B7C (UnkStruct_ov13_022213F0 * param0, u32 param1) u32 v0; for (v0 = 0; v0 < 38; v0++) { - sub_0200D3F4(param0->unk_1FB4[v0], 0); + SpriteActor_EnableObject(param0->unk_1FB4[v0], 0); } switch (param1) { diff --git a/src/overlay013/ov13_02227BDC.c b/src/overlay013/ov13_02227BDC.c index 09d1cdd873..b3fc0975f6 100644 --- a/src/overlay013/ov13_02227BDC.c +++ b/src/overlay013/ov13_02227BDC.c @@ -168,7 +168,7 @@ void ov13_02227E08 (UnkStruct_ov13_02227244 * param0) static void ov13_02227E48 (CellActorData * param0, const int param1, const int param2) { - sub_0200D3F4(param0, 1); + SpriteActor_EnableObject(param0, 1); SpriteActor_SetSpritePositionXY(param0, param1, param2); } @@ -177,7 +177,7 @@ void ov13_02227E68 (UnkStruct_ov13_02227244 * param0, u32 param1) u32 v0; for (v0 = 0; v0 < 6; v0++) { - sub_0200D3F4(param0->unk_310[v0], 0); + SpriteActor_EnableObject(param0->unk_310[v0], 0); } switch (param1) { diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index 02e238191f..fc46ddd38a 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -5745,7 +5745,7 @@ void ov16_02263B20 (BattlerData * param0, int param1) return; } - sub_0200D3F4(param0->unk_18, param1); + SpriteActor_EnableObject(param0->unk_18, param1); } static Sprite * ov16_02263B30 (BattleSystem * param0, UnkStruct_02007768 * param1, ArchivedSprite * param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, SpriteAnimationFrame * param11, UnkFuncPtr_02007C34 * param12) diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index 182116b250..1c162f3fc5 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -819,7 +819,7 @@ static void ov16_022675F8 (Healthbar * param0, int param1) if ((BattleSystem_BattleType(param0->unk_0C) & (0x20 | 0x200)) && (param1 == 1)) { (void)0; } else { - sub_0200D3F4(param0->unk_08, param1); + SpriteActor_EnableObject(param0->unk_08, param1); } } } @@ -830,7 +830,7 @@ void Healthbar_Enable (Healthbar * param0, int param1) return; } - sub_0200D3F4(param0->unk_04, param1); + SpriteActor_EnableObject(param0->unk_04, param1); ov16_022675F8(param0, param1); } @@ -1506,35 +1506,39 @@ static const u8 * ov16_02268250 (int param0) return &Unk_ov16_0226F6AC[param0 * 0x20]; } -u8 Healthbar_Type (int param0, u32 param1) +u8 Healthbar_Type(int battlerType, u32 battleType) { - switch (param0) { - case 0: - if (param1 & 0x200) { - return 7; + switch (battlerType) { + case BATTLER_TYPE_SOLO_PLAYER: + if (battleType & BATTLE_TYPE_PAL_PARK) { + return HEALTHBAR_TYPE_PAL_PARK; } - if (param1 & 0x20) { - return 6; + if (battleType & BATTLE_TYPE_SAFARI) { + return HEALTHBAR_TYPE_SAFARI_ZONE; } - return 0; - case 1: - return 1; - case 2: - return 2; - case 3: - return 3; - case 4: - return 4; - case 5: - return 5; + return HEALTHBAR_TYPE_PLAYER_SOLO; + + case BATTLER_TYPE_SOLO_ENEMY: + return HEALTHBAR_TYPE_ENEMY_SOLO; + + case BATTLER_TYPE_PLAYER_SIDE_SLOT_1: + return HEALTHBAR_TYPE_PLAYER_SLOT_1; + + case BATTLER_TYPE_ENEMY_SIDE_SLOT_1: + return HEALTHBAR_TYPE_ENEMY_SLOT_1; + + case BATTLER_TYPE_PLAYER_SIDE_SLOT_2: + return HEALTHBAR_TYPE_PLAYER_SLOT_2; + + case BATTLER_TYPE_ENEMY_SIDE_SLOT_2: + return HEALTHBAR_TYPE_ENEMY_SLOT_2; + default: - GF_ASSERT(0); + GF_ASSERT(FALSE); return NULL; } - - return 0; } static const SpriteTemplate * ov16_022682B0 (u8 param0) diff --git a/src/overlay016/ov16_02268520.c b/src/overlay016/ov16_02268520.c index dfffd9e24a..35e99dcd8c 100644 --- a/src/overlay016/ov16_02268520.c +++ b/src/overlay016/ov16_02268520.c @@ -264,7 +264,7 @@ void ov16_022686BC (UnkStruct_ov16_02268520 * param0, int param1) return; } - sub_0200D3F4(param0->unk_00, param1); + SpriteActor_EnableObject(param0->unk_00, param1); } void ov16_022686CC (UnkStruct_ov16_02268520 * param0, BattleSystem * param1, u16 param2, int param3) diff --git a/src/overlay016/ov16_0226DB7C.c b/src/overlay016/ov16_0226DB7C.c index 597248493c..447293ed0a 100644 --- a/src/overlay016/ov16_0226DB7C.c +++ b/src/overlay016/ov16_0226DB7C.c @@ -82,7 +82,7 @@ UnkStruct_ov16_0226DC24 * ov16_0226DC24 (SpriteRenderer * param0, SpriteGfxHandl for (v2 = 0; v2 < 5; v2++) { v0->unk_00[v2] = SpriteActor_LoadResources(param0, param1, &v1); - sub_0200D3F4(v0->unk_00[v2], 0); + SpriteActor_EnableObject(v0->unk_00[v2], 0); } v0->unk_14 = SysTask_Start(ov16_0226DE10, v0, 40000); @@ -116,7 +116,7 @@ void ov16_0226DCCC (UnkStruct_ov16_0226DC24 * param0, int param1, int param2, in sub_0200D364(param0->unk_00[3], 3); for (v0 = 0; v0 < 4; v0++) { - sub_0200D3F4(param0->unk_00[v0], 1); + SpriteActor_EnableObject(param0->unk_00[v0], 1); } } @@ -139,7 +139,7 @@ void ov16_0226DDC0 (UnkStruct_ov16_0226DC24 * param0, int param1, int param2, in { sub_0200D500(param0->unk_00[4], param1, param2, param4); sub_0200D364(param0->unk_00[4], param3); - sub_0200D3F4(param0->unk_00[4], 1); + SpriteActor_EnableObject(param0->unk_00[4], 1); } void ov16_0226DDE8 (UnkStruct_ov16_0226DC24 * param0) @@ -147,13 +147,13 @@ void ov16_0226DDE8 (UnkStruct_ov16_0226DC24 * param0) int v0; for (v0 = 0; v0 < 5; v0++) { - sub_0200D3F4(param0->unk_00[v0], 0); + SpriteActor_EnableObject(param0->unk_00[v0], 0); } } void ov16_0226DE04 (UnkStruct_ov16_0226DC24 * param0) { - sub_0200D3F4(param0->unk_00[4], 0); + SpriteActor_EnableObject(param0->unk_00[4], 0); } static void ov16_0226DE10 (SysTask * param0, void * param1) diff --git a/src/overlay016/ov16_0226DE44.c b/src/overlay016/ov16_0226DE44.c index ae66135702..b81ad302bb 100644 --- a/src/overlay016/ov16_0226DE44.c +++ b/src/overlay016/ov16_0226DE44.c @@ -91,7 +91,7 @@ UnkStruct_ov16_0226DEEC * ov16_0226DEEC (SpriteRenderer * param0, SpriteGfxHandl MI_CpuClear8(v0, sizeof(UnkStruct_ov16_0226DEEC)); v0->unk_00 = SpriteActor_LoadResources(param0, param1, &v1); - sub_0200D3F4(v0->unk_00, 0); + SpriteActor_EnableObject(v0->unk_00, 0); v0->unk_14 = (192 << FX32_SHIFT); v0->unk_04 = SysTask_Start(ov16_0226DFD8, v0, 999); @@ -115,7 +115,7 @@ void ov16_0226DF80 (UnkStruct_ov16_0226DEEC * param0, int param1, int param2, fx param0->unk_14 = param3; sub_0200D500(param0->unk_00, param1, param2, param3); - sub_0200D3F4(param0->unk_00, 1); + SpriteActor_EnableObject(param0->unk_00, 1); } void ov16_0226DFB0 (UnkStruct_ov16_0226DEEC * param0, int param1, int param2) @@ -125,7 +125,7 @@ void ov16_0226DFB0 (UnkStruct_ov16_0226DEEC * param0, int param1, int param2) void ov16_0226DFBC (UnkStruct_ov16_0226DEEC * param0) { - sub_0200D3F4(param0->unk_00, 0); + SpriteActor_EnableObject(param0->unk_00, 0); ov16_0226E13C(param0); } diff --git a/src/overlay017/ov17_022413D8.c b/src/overlay017/ov17_022413D8.c index 472c4efbb6..164095680d 100644 --- a/src/overlay017/ov17_022413D8.c +++ b/src/overlay017/ov17_022413D8.c @@ -698,7 +698,7 @@ void ov17_02241A24 (UnkStruct_ov17_0223F88C * param0) v1 = Unk_ov17_022537B8; v0 = SpriteActor_LoadResources(param0->unk_18, param0->unk_1C, &v1); - sub_0200D3F4(v0, 0); + SpriteActor_EnableObject(v0, 0); SpriteActor_UpdateObject(v0->unk_00); param0->unk_17C = v0; @@ -718,7 +718,7 @@ void ov17_02241A8C (UnkStruct_ov17_0223F88C * param0, int param1, int param2) SpriteActor_SetSpritePositionXY(param0->unk_17C, Unk_ov17_022536E4[param1].unk_00, Unk_ov17_022536E4[param1].unk_02); sub_0200D364(param0->unk_17C, param2); - sub_0200D3F4(param0->unk_17C, 1); + SpriteActor_EnableObject(param0->unk_17C, 1); switch (param2) { case 0: @@ -739,7 +739,7 @@ void ov17_02241A8C (UnkStruct_ov17_0223F88C * param0, int param1, int param2) void ov17_02241B1C (UnkStruct_ov17_0223F88C * param0) { GF_ASSERT(param0->unk_17C != NULL); - sub_0200D3F4(param0->unk_17C, 0); + SpriteActor_EnableObject(param0->unk_17C, 0); } void ov17_02241B3C (UnkStruct_ov17_02246F24 * param0, int param1, int param2, u8 * param3) @@ -984,7 +984,7 @@ static void ov17_02242048 (CellActorData * param0) MI_CpuClear8(v0, sizeof(UnkStruct_ov17_02242048)); v0->unk_00 = param0; - sub_0200D3F4(param0, 0); + SpriteActor_EnableObject(param0, 0); SysTask_Start(ov17_0224207C, v0, 40000); } @@ -997,7 +997,7 @@ static void ov17_0224207C (SysTask * param0, void * param1) sub_0200D6A4(v0->unk_00, 2); v0->unk_04 = (0.1f); v0->unk_08 = (0.1f); - sub_0200D3F4(v0->unk_00, 1); + SpriteActor_EnableObject(v0->unk_00, 1); v0->unk_0C++; case 1: v0->unk_04 += (0.3f); @@ -1156,7 +1156,7 @@ static void ov17_022422B8 (SysTask * param0, void * param1) break; default: sub_0200D0F4(v0->unk_04); - sub_0200D3F4(v0->unk_08, 1); + SpriteActor_EnableObject(v0->unk_08, 1); Sound_PlayEffect(1760); Heap_FreeToHeap(param1); SysTask_Done(param0); @@ -1193,7 +1193,7 @@ void ov17_022424D4 (UnkStruct_ov17_0223F88C * param0, int param1, int param2) for (v1 = 0; v1 < v0; v1++) { if (param0->unk_124[param1][v1] == NULL) { param0->unk_124[param1][v1] = ov17_02242260(param0->unk_18, param0->unk_1C, Unk_ov17_022536D8[param1][0] + v1 * 5, Unk_ov17_022536D8[param1][1]); - sub_0200D3F4(param0->unk_124[param1][v1], 0); + SpriteActor_EnableObject(param0->unk_124[param1][v1], 0); v2 = Heap_AllocFromHeap(21, sizeof(UnkStruct_ov17_022422B8)); MI_CpuClear8(v2, sizeof(UnkStruct_ov17_022422B8)); @@ -1236,13 +1236,13 @@ static void ov17_0224262C (UnkStruct_ov17_02246F24 * param0, GXOamMode param1, i for (v1 = 0; v1 < 6; v1++) { if (param0->unk_0C.unk_C4[v0][v1] != NULL) { SpriteActor_SetOAMMode(param0->unk_0C.unk_C4[v0][v1], param1); - sub_0200D3F4(param0->unk_0C.unk_C4[v0][v1], v2); + SpriteActor_EnableObject(param0->unk_0C.unk_C4[v0][v1], v2); } } if (param0->unk_0C.unk_160[v0] != NULL) { SpriteActor_SetOAMMode(param0->unk_0C.unk_160[v0], param1); - sub_0200D3F4(param0->unk_0C.unk_160[v0], v2); + SpriteActor_EnableObject(param0->unk_0C.unk_160[v0], v2); } sub_02012AF0(param0->unk_0C.unk_180[v0].unk_00, param1); @@ -1922,7 +1922,7 @@ static void ov17_022434E0 (SysTask * param0, void * param1) SpriteActor_SetSpritePositionXY(v0->unk_08, v0->unk_21 + v1, v0->unk_22 + v2); break; default: - sub_0200D3F4(v0->unk_08, 0); + SpriteActor_EnableObject(v0->unk_08, 0); Sound_PlayEffect(1505); ov17_022414B0(v0->unk_04); @@ -2068,7 +2068,7 @@ static void ov17_02243750 (SysTask * param0, void * param1) SpriteActor_SetSpritePositionXY(v0->unk_04, v0->unk_1C >> 8, v0->unk_20 >> 8); break; default: - sub_0200D3F4(v0->unk_04, 0); + SpriteActor_EnableObject(v0->unk_04, 0); Sound_PlayEffect(1505); (*(v0->unk_08))--; Heap_FreeToHeap(param1); diff --git a/src/overlay017/ov17_0224A0FC.c b/src/overlay017/ov17_0224A0FC.c index c9aeaf4d63..484faed40b 100644 --- a/src/overlay017/ov17_0224A0FC.c +++ b/src/overlay017/ov17_0224A0FC.c @@ -626,7 +626,7 @@ void ov17_0224A61C (UnkStruct_ov17_0224A1EC * param0, SpriteRenderer * param1, S for (v1 = 0; v1 < 3; v1++) { param0->unk_960[v1] = SpriteActor_LoadResources(param1, param2, &Unk_ov17_02254794); - sub_0200D3F4(param0->unk_960[v1], 0); + SpriteActor_EnableObject(param0->unk_960[v1], 0); } } @@ -700,7 +700,7 @@ void ov17_0224A7E0 (UnkStruct_ov17_0224A1EC * param0, SpriteRenderer * param1, S sub_0200D364(v5->unk_00, param3); sub_0200D500(v5->unk_00, v2, v3, (256 * FX32_ONE)); SpriteActor_UpdateObject(v5->unk_00->unk_00); - sub_0200D3F4(v5->unk_00, 1); + SpriteActor_EnableObject(v5->unk_00, 1); for (v1 = 0; v1 < 3; v1++) { sub_020129D0(param0->unk_96C[v1][v4].unk_00, 0); @@ -743,7 +743,7 @@ static void ov17_0224A8D4 (SysTask * param0, void * param1) break; default: sub_020129D0(v0->unk_04->unk_00, 0); - sub_0200D3F4(v0->unk_00, 0); + SpriteActor_EnableObject(v0->unk_00, 0); v0->unk_08 = NULL; SysTask_Done(param0); return; @@ -866,7 +866,7 @@ void ov17_0224ABDC (UnkStruct_ov17_0224A1EC * param0, int param1) int v0; for (v0 = 0; v0 < 4; v0++) { - sub_0200D3F4(param0->unk_200[v0].unk_04, param1); + SpriteActor_EnableObject(param0->unk_200[v0].unk_04, param1); } } @@ -1089,7 +1089,7 @@ BOOL ov17_0224B01C (UnkStruct_ov17_0224DF54 * param0) sub_0200D500(v0, -1, (0x16 * 8), (256 * FX32_ONE)); SpriteActor_UpdateObject(v0->unk_00); - sub_0200D3F4(v0, 0); + SpriteActor_EnableObject(v0, 0); v1->unk_04 = v0; return 1; @@ -1997,7 +1997,7 @@ void ov17_0224C384 (UnkStruct_ov17_0224DF54 * param0, SpriteRenderer * param1, S v0->unk_04 = SpriteActor_LoadResources(param0->unk_14.unk_58, param0->unk_14.unk_5C, &Unk_ov17_022547FC); SpriteActor_UpdateObject(v0->unk_04->unk_00); - sub_0200D3F4(v0->unk_04, 0); + SpriteActor_EnableObject(v0->unk_04, 0); v0->unk_00 = SysTask_Start(ov17_0224C414, v0, ((30000 + 10000) + 15)); } @@ -2038,13 +2038,13 @@ void ov17_0224C434 (UnkStruct_ov17_0224B058 * param0, u32 param1, u32 param2, in v0 = param1 * v1 / param2; sub_0200D500(param0->unk_04, v0 - 1 + v2, (0x16 * 8), (256 * FX32_ONE)); - sub_0200D3F4(param0->unk_04, 1); + SpriteActor_EnableObject(param0->unk_04, 1); } void ov17_0224C47C (UnkStruct_ov17_0224B058 * param0, int param1) { sub_0200D500(param0->unk_04, -1, (0x16 * 8), (256 * FX32_ONE)); - sub_0200D3F4(param0->unk_04, param1); + SpriteActor_EnableObject(param0->unk_04, param1); } void ov17_0224C49C (UnkStruct_ov17_0224C384 * param0, u32 param1, u32 param2, int param3) @@ -2070,12 +2070,12 @@ void ov17_0224C49C (UnkStruct_ov17_0224C384 * param0, u32 param1, u32 param2, in v4 -= sub_0201D15C(v5) * 10 / FX32_ONE; sub_0200D500(param0->unk_04, v3, v4, (256 * FX32_ONE)); - sub_0200D3F4(param0->unk_04, 1); + SpriteActor_EnableObject(param0->unk_04, 1); } void ov17_0224C540 (UnkStruct_ov17_0224C384 * param0) { - sub_0200D3F4(param0->unk_04, 0); + SpriteActor_EnableObject(param0->unk_04, 0); } void ov17_0224C54C (UnkStruct_ov17_0224C384 * param0, int param1) @@ -2085,7 +2085,7 @@ void ov17_0224C54C (UnkStruct_ov17_0224C384 * param0, int param1) v0 = ov17_0223F0BC(param1, 3); v1 = (256 - v0) / 2; - sub_0200D3F4(param0->unk_04, 1); + SpriteActor_EnableObject(param0->unk_04, 1); sub_0200D500(param0->unk_04, v1, (0x12 * 8), (256 * FX32_ONE)); } diff --git a/src/overlay017/ov17_02250744.c b/src/overlay017/ov17_02250744.c index 15c355978e..2fdfb5303e 100644 --- a/src/overlay017/ov17_02250744.c +++ b/src/overlay017/ov17_02250744.c @@ -585,7 +585,7 @@ void ov17_0225122C (UnkStruct_ov17_0224FCA0 * param0, NARC * param1) for (v0 = 0; v0 < 4; v0++) { param0->unk_10.unk_138[v0] = SpriteActor_LoadResources(param0->unk_10.unk_18, param0->unk_10.unk_1C, &Unk_ov17_02254C90); sub_0200D330(param0->unk_10.unk_138[v0]); - sub_0200D3F4(param0->unk_10.unk_138[v0], 0); + SpriteActor_EnableObject(param0->unk_10.unk_138[v0], 0); } for (v0 = 0; v0 < 4; v0++) { @@ -613,7 +613,7 @@ void ov17_022512E0 (UnkStruct_ov17_0224FCA0 * param0) void ov17_0225131C (UnkStruct_ov17_0224FCA0 * param0, int param1, int param2) { sub_0200D364(param0->unk_10.unk_138[param1], param2); - sub_0200D3F4(param0->unk_10.unk_138[param1], 1); + SpriteActor_EnableObject(param0->unk_10.unk_138[param1], 1); Sound_PlayEffect(1501); } diff --git a/src/overlay017/ov17_02252AB0.c b/src/overlay017/ov17_02252AB0.c index 857ac7daec..ac9b4a3f0f 100644 --- a/src/overlay017/ov17_02252AB0.c +++ b/src/overlay017/ov17_02252AB0.c @@ -74,7 +74,7 @@ UnkStruct_ov17_02252B48 * ov17_02252B48 (SpriteRenderer * param0, SpriteGfxHandl for (v2 = 0; v2 < 5; v2++) { v0->unk_00[v2] = SpriteActor_LoadResources(param0, param1, &v1); - sub_0200D3F4(v0->unk_00[v2], 0); + SpriteActor_EnableObject(v0->unk_00[v2], 0); } v0->unk_14 = SysTask_Start(ov17_02252CB8, v0, 40000); @@ -108,7 +108,7 @@ void ov17_02252BF0 (UnkStruct_ov17_02252B48 * param0, int param1, int param2, in sub_0200D364(param0->unk_00[3], 3); for (v0 = 0; v0 < 4; v0++) { - sub_0200D3F4(param0->unk_00[v0], 1); + SpriteActor_EnableObject(param0->unk_00[v0], 1); } } @@ -122,7 +122,7 @@ void ov17_02252C9C (UnkStruct_ov17_02252B48 * param0) int v0; for (v0 = 0; v0 < 5; v0++) { - sub_0200D3F4(param0->unk_00[v0], 0); + SpriteActor_EnableObject(param0->unk_00[v0], 0); } } diff --git a/src/overlay062/ov62_022300D8.c b/src/overlay062/ov62_022300D8.c index 009a9a332a..b9cc68d578 100644 --- a/src/overlay062/ov62_022300D8.c +++ b/src/overlay062/ov62_022300D8.c @@ -388,7 +388,7 @@ void ov62_0223088C (UnkStruct_0208C06C * param0) v1->unk_00[v0].unk_00 = SpriteActor_LoadResources(v3, v4, &v2); sub_0200D330(v1->unk_00[v0].unk_00); - sub_0200D3F4(v1->unk_00[v0].unk_00, 1); + SpriteActor_EnableObject(v1->unk_00[v0].unk_00, 1); ov62_02230E68(v1->unk_00[v0].unk_00, v2.x + 8, v2.y); v2.vramType = NNS_G2D_VRAM_TYPE_2DMAIN; @@ -401,7 +401,7 @@ void ov62_0223088C (UnkStruct_0208C06C * param0) sub_0200D330(v1->unk_C8[v0].unk_00); ov62_02230E68(v1->unk_C8[v0].unk_00, v2.x, v2.y); - sub_0200D3F4(v1->unk_C8[v0].unk_00, param0->unk_818[v0].unk_00); + SpriteActor_EnableObject(v1->unk_C8[v0].unk_00, param0->unk_818[v0].unk_00); } v0 = 0; @@ -438,7 +438,7 @@ void ov62_02230A5C (UnkStruct_0208C06C * param0) int v0; for (v0 = 0; v0 < 5; v0++) { - sub_0200D3F4(param0->unk_534.unk_C8[v0].unk_00, param0->unk_818[v0].unk_00); + SpriteActor_EnableObject(param0->unk_534.unk_C8[v0].unk_00, param0->unk_818[v0].unk_00); if (param0->unk_818[v0].unk_00 == 0) { continue; @@ -472,7 +472,7 @@ void ov62_02230AF0 (UnkStruct_0208C06C * param0) ov62_02230FC8(param0, ¶m0->unk_534.unk_00[v0], param0->unk_534.unk_190[v0]->unk_08, param0->unk_534.unk_190[v0]); sub_020128C4(param0->unk_534.unk_00[v0].unk_14, 36, -8); sub_020129D0(param0->unk_534.unk_00[v0].unk_14, 1); - sub_0200D3F4(param0->unk_534.unk_00[v0].unk_00, 1); + SpriteActor_EnableObject(param0->unk_534.unk_00[v0].unk_00, 1); } } @@ -494,18 +494,18 @@ void ov62_02230B9C (UnkStruct_0208C06C * param0, BOOL param1) for (v0 = 0; v0 < 5; v0++) { if (param0->unk_534.unk_00[v0].unk_0C == 0) { sub_020129D0(param0->unk_534.unk_00[v0].unk_14, 0); - sub_0200D3F4(param0->unk_534.unk_00[v0].unk_00, 0); + SpriteActor_EnableObject(param0->unk_534.unk_00[v0].unk_00, 0); } else { sub_020129D0(param0->unk_534.unk_00[v0].unk_14, param1); - sub_0200D3F4(param0->unk_534.unk_00[v0].unk_00, param1); + SpriteActor_EnableObject(param0->unk_534.unk_00[v0].unk_00, param1); } if (param0->unk_534.unk_C8[v0].unk_0C == 0) { sub_020129D0(param0->unk_534.unk_C8[v0].unk_14, 0); - sub_0200D3F4(param0->unk_534.unk_C8[v0].unk_00, 0); + SpriteActor_EnableObject(param0->unk_534.unk_C8[v0].unk_00, 0); } else { sub_020129D0(param0->unk_534.unk_C8[v0].unk_14, param1); - sub_0200D3F4(param0->unk_534.unk_C8[v0].unk_00, param1); + SpriteActor_EnableObject(param0->unk_534.unk_C8[v0].unk_00, param1); } } } diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index 28538b851f..1781cd0cc9 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -808,7 +808,7 @@ static void ov62_02232080 (UnkStruct_ov62_022323B8 * param0, UnkStruct_0208C06C static void ov62_022320A0 (UnkStruct_ov62_022323B8 * param0, int param1) { if (param0->unk_04) { - sub_0200D3F4(param0->unk_04, param1); + SpriteActor_EnableObject(param0->unk_04, param1); } } @@ -894,7 +894,7 @@ static void ov62_022320EC (UnkStruct_ov62_022323B8 * param0, UnkStruct_0208C06C static void ov62_022321F4 (UnkStruct_ov62_022323B8 * param0, int param1) { - sub_0200D3F4(param0->unk_08, param1); + SpriteActor_EnableObject(param0->unk_08, param1); } static void ov62_02232200 (UnkStruct_ov62_022323B8 * param0, UnkStruct_0208C06C * param1) @@ -2310,15 +2310,15 @@ void ov62_02233434 (UnkStruct_ov62_02233310 * param0, s16 param1, s16 param2) void ov62_02233454 (UnkStruct_ov62_02233310 * param0) { - sub_0200D3F4(param0->unk_2C[0], 1); - sub_0200D3F4(param0->unk_2C[1], 1); + SpriteActor_EnableObject(param0->unk_2C[0], 1); + SpriteActor_EnableObject(param0->unk_2C[1], 1); if (param0->unk_08 == 0) { - sub_0200D3F4(param0->unk_2C[0], 0); + SpriteActor_EnableObject(param0->unk_2C[0], 0); } if (param0->unk_08 + param0->unk_10 >= param0->unk_04) { - sub_0200D3F4(param0->unk_2C[1], 0); + SpriteActor_EnableObject(param0->unk_2C[1], 0); } sub_0200D33C(param0->unk_2C[0]); @@ -2327,20 +2327,20 @@ void ov62_02233454 (UnkStruct_ov62_02233310 * param0) void ov62_0223349C (UnkStruct_ov62_02233310 * param0) { - sub_0200D3F4(param0->unk_2C[0], 1); - sub_0200D3F4(param0->unk_2C[1], 1); + SpriteActor_EnableObject(param0->unk_2C[0], 1); + SpriteActor_EnableObject(param0->unk_2C[1], 1); if (param0->unk_08 == 0) { - sub_0200D3F4(param0->unk_2C[0], 0); + SpriteActor_EnableObject(param0->unk_2C[0], 0); } if (param0->unk_08 + param0->unk_10 >= param0->unk_04) { - sub_0200D3F4(param0->unk_2C[1], 0); + SpriteActor_EnableObject(param0->unk_2C[1], 0); } if (param0->unk_10 >= param0->unk_04) { - sub_0200D3F4(param0->unk_2C[0], 0); - sub_0200D3F4(param0->unk_2C[1], 0); + SpriteActor_EnableObject(param0->unk_2C[0], 0); + SpriteActor_EnableObject(param0->unk_2C[1], 0); } sub_0200D33C(param0->unk_2C[0]); @@ -3176,7 +3176,7 @@ void ov62_0223427C (UnkStruct_ov62_02233F74 * param0, int param1) for (v0 = 0; v0 < 12; v0++) { if (param0->unk_0C[v0]) { - sub_0200D3F4(param0->unk_0C[v0], param1); + SpriteActor_EnableObject(param0->unk_0C[v0], param1); } } } diff --git a/src/overlay062/ov62_02235278.c b/src/overlay062/ov62_02235278.c index 8025ebc9ee..3c0b735f0b 100644 --- a/src/overlay062/ov62_02235278.c +++ b/src/overlay062/ov62_02235278.c @@ -310,7 +310,7 @@ static BOOL ov62_02235580 (UnkStruct_0208C06C * param0) sub_0200D364(param0->unk_534.unk_00[v4].unk_00, param0->unk_818[param0->unk_534.unk_1B0].unk_0C); ov62_02230FC8(param0, ¶m0->unk_534.unk_00[param0->unk_534.unk_1A4], param0->unk_818[param0->unk_534.unk_1B0].unk_08, ¶m0->unk_818[param0->unk_534.unk_1B0]); sub_020129D0(param0->unk_534.unk_00[param0->unk_534.unk_1A4].unk_14, 1); - sub_0200D3F4(param0->unk_534.unk_00[v4].unk_00, 1); + SpriteActor_EnableObject(param0->unk_534.unk_00[v4].unk_00, 1); } else { v5->unk_04 = v5->unk_00 - 4; v5->unk_06 = (16 * (param0->unk_534.unk_1A4 - v4)) + (25 + (36 * (5 - (param0->unk_534.unk_1A4 - v4) - 1))); diff --git a/src/overlay062/ov62_02236CBC.c b/src/overlay062/ov62_02236CBC.c index 8038fc76d4..fc7aa572b9 100644 --- a/src/overlay062/ov62_02236CBC.c +++ b/src/overlay062/ov62_02236CBC.c @@ -117,7 +117,7 @@ static void ov62_02236D48 (UnkStruct_0208C06C * param0) SpriteActor_SetSpritePositionXY(v0->unk_94[1], 220, 160 + 64); sub_0200D364(v0->unk_94[1], 2); - sub_0200D3F4(v0->unk_94[1], 0); + SpriteActor_EnableObject(v0->unk_94[1], 0); ov62_02236CBC(param0, 1); } @@ -341,8 +341,8 @@ static void ov62_022371CC (UnkStruct_0208C06C * param0) if (v3[v0] == 0) { sub_0200D364(v4->unk_68[v0], 5); sub_0200D41C(v4->unk_68[v0], 4 + 5); - sub_0200D3F4(v4->unk_54[v0], 0); - sub_0200D3F4(v4->unk_40[v0], 0); + SpriteActor_EnableObject(v4->unk_54[v0], 0); + SpriteActor_EnableObject(v4->unk_40[v0], 0); } else { int v11[] = {0, 1, 4, 3, 2}; @@ -388,7 +388,7 @@ static void ov62_022371CC (UnkStruct_0208C06C * param0) if (v2[v0] == 0) { if (v0 < v1) { - sub_0200D3F4(v4->unk_7C[v0], 0); + SpriteActor_EnableObject(v4->unk_7C[v0], 0); } } @@ -397,8 +397,8 @@ static void ov62_022371CC (UnkStruct_0208C06C * param0) sub_0200D330(v4->unk_7C[v0]); } - sub_0200D3F4(v4->unk_7C[4 - 1], 1); - sub_0200D3F4(v4->unk_7C[4 - 0], 1); + SpriteActor_EnableObject(v4->unk_7C[4 - 1], 1); + SpriteActor_EnableObject(v4->unk_7C[4 - 0], 1); for (v0 = 0; v0 < 5; v0++) { sub_0200D6A4(v4->unk_40[v0], 2); @@ -520,9 +520,9 @@ static BOOL ov62_022376C4 (UnkStruct_0208C06C * param0) if (v0->unk_2C[0] != 0) { v0->unk_04[v1] -= 0.05f; } else { - sub_0200D3F4(v0->unk_68[v1], 0); - sub_0200D3F4(v0->unk_40[v1], 0); - sub_0200D3F4(v0->unk_54[v1], 0); + SpriteActor_EnableObject(v0->unk_68[v1], 0); + SpriteActor_EnableObject(v0->unk_40[v1], 0); + SpriteActor_EnableObject(v0->unk_54[v1], 0); } v4 = (128 << FX32_SHIFT) - sub_0201D250(v0->unk_2C[v1]) * v0->unk_18[v1]; diff --git a/src/overlay062/ov62_02237D24.c b/src/overlay062/ov62_02237D24.c index 7b861c7307..e176641be5 100644 --- a/src/overlay062/ov62_02237D24.c +++ b/src/overlay062/ov62_02237D24.c @@ -1305,11 +1305,11 @@ static void ov62_0223958C (UnkStruct_0208C06C * param0, int param1) UnkStruct_ov62_02237D24 * v0 = param0->unk_860; if (param1 == 0) { - sub_0200D3F4(v0->unk_198[1].unk_08, 1); + SpriteActor_EnableObject(v0->unk_198[1].unk_08, 1); sub_020129D0(v0->unk_198[1].unk_0C, 1); SpriteActor_SetSpritePositionXY(v0->unk_198[0].unk_08, 32, 232); } else { - sub_0200D3F4(v0->unk_198[1].unk_08, 0); + SpriteActor_EnableObject(v0->unk_198[1].unk_08, 0); sub_020129D0(v0->unk_198[1].unk_0C, 0); SpriteActor_SetSpritePositionXY(v0->unk_198[0].unk_08, 80, 232); } diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index d62a914f08..28631ca684 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -583,11 +583,11 @@ static void ov62_0223A4C8 (UnkStruct_0208C06C * param0, int param1) UnkStruct_ov62_02239DBC * v0 = param0->unk_860; if (param1 == 0) { - sub_0200D3F4(v0->unk_348[1].unk_08, 1); + SpriteActor_EnableObject(v0->unk_348[1].unk_08, 1); sub_020129D0(v0->unk_348[1].unk_0C, 1); SpriteActor_SetSpritePositionXY(v0->unk_348[0].unk_08, 32, 232); } else { - sub_0200D3F4(v0->unk_348[1].unk_08, 0); + SpriteActor_EnableObject(v0->unk_348[1].unk_08, 0); sub_020129D0(v0->unk_348[1].unk_0C, 0); SpriteActor_SetSpritePositionXY(v0->unk_348[0].unk_08, 80, 232); } @@ -1144,7 +1144,7 @@ static void ov62_0223AFC0 (UnkStruct_0208C06C * param0, int param1) continue; } - sub_0200D3F4(v0->unk_2B4[v1], param1); + SpriteActor_EnableObject(v0->unk_2B4[v1], param1); } } diff --git a/src/overlay062/ov62_0223CAEC.c b/src/overlay062/ov62_0223CAEC.c index 3e1741de66..e0e9bdb48b 100644 --- a/src/overlay062/ov62_0223CAEC.c +++ b/src/overlay062/ov62_0223CAEC.c @@ -794,11 +794,11 @@ static void ov62_0223D3A8 (UnkStruct_0208C06C * param0, int param1) UnkStruct_ov62_0223D518 * v0 = param0->unk_860; if (param1 == 0) { - sub_0200D3F4(v0->unk_A4[0].unk_08, 1); + SpriteActor_EnableObject(v0->unk_A4[0].unk_08, 1); sub_020129D0(v0->unk_A4[0].unk_0C, 1); SpriteActor_SetSpritePositionXY(v0->unk_A4[1].unk_08, 128, 232); } else { - sub_0200D3F4(v0->unk_A4[0].unk_08, 0); + SpriteActor_EnableObject(v0->unk_A4[0].unk_08, 0); sub_020129D0(v0->unk_A4[0].unk_0C, 0); SpriteActor_SetSpritePositionXY(v0->unk_A4[1].unk_08, 80, 232); } diff --git a/src/overlay062/ov62_0223DFA8.c b/src/overlay062/ov62_0223DFA8.c index a3c50b7bf7..358dd6e984 100644 --- a/src/overlay062/ov62_0223DFA8.c +++ b/src/overlay062/ov62_0223DFA8.c @@ -909,11 +909,11 @@ static void ov62_0223F0A8 (UnkStruct_0208C06C * param0, int param1) UnkStruct_ov62_0223E01C * v0 = param0->unk_860; if (param1 == 0) { - sub_0200D3F4(v0->unk_114[1].unk_08, 1); + SpriteActor_EnableObject(v0->unk_114[1].unk_08, 1); sub_020129D0(v0->unk_114[1].unk_0C, 1); SpriteActor_SetSpritePositionXY(v0->unk_114[0].unk_08, 32, 232); } else { - sub_0200D3F4(v0->unk_114[1].unk_08, 0); + SpriteActor_EnableObject(v0->unk_114[1].unk_08, 0); sub_020129D0(v0->unk_114[1].unk_0C, 0); SpriteActor_SetSpritePositionXY(v0->unk_114[0].unk_08, 80, 232); } @@ -2605,7 +2605,7 @@ static void ov62_02240D98 (UnkStruct_0208C06C * param0, BOOL param1) for (v0 = 0; v0 < 5; v0++) { for (v1 = 0; v1 < 6; v1++) { if (v2->unk_2008.unk_0C[v0][v1].unk_04) { - sub_0200D3F4(v2->unk_2008.unk_0C[v0][v1].unk_04, param1); + SpriteActor_EnableObject(v2->unk_2008.unk_0C[v0][v1].unk_04, param1); } } } diff --git a/src/overlay062/ov62_02241204.c b/src/overlay062/ov62_02241204.c index 817b0484f4..1c927959db 100644 --- a/src/overlay062/ov62_02241204.c +++ b/src/overlay062/ov62_02241204.c @@ -419,7 +419,7 @@ static void ov62_0224141C (UnkStruct_0208C06C * param0, BOOL param1) for (v0 = 0; v0 < 5; v0++) { for (v1 = 0; v1 < 6; v1++) { if (v2->unk_50C.unk_0C[v0][v1].unk_04) { - sub_0200D3F4(v2->unk_50C.unk_0C[v0][v1].unk_04, param1); + SpriteActor_EnableObject(v2->unk_50C.unk_0C[v0][v1].unk_04, param1); } } } @@ -4027,11 +4027,11 @@ static void ov62_02245AC8 (UnkStruct_0208C06C * param0, int param1) UnkStruct_ov62_02241204 * v0 = param0->unk_860; if (param1 == 0) { - sub_0200D3F4(v0->unk_10[0].unk_08, 1); + SpriteActor_EnableObject(v0->unk_10[0].unk_08, 1); sub_020129D0(v0->unk_10[0].unk_0C, 1); SpriteActor_SetSpritePositionXY(v0->unk_10[1].unk_08, 128, 232 - 64); } else { - sub_0200D3F4(v0->unk_10[0].unk_08, 0); + SpriteActor_EnableObject(v0->unk_10[0].unk_08, 0); sub_020129D0(v0->unk_10[0].unk_0C, 0); SpriteActor_SetSpritePositionXY(v0->unk_10[1].unk_08, 80, 232 - 64); } @@ -4084,11 +4084,11 @@ static void ov62_02245C08 (UnkStruct_0208C06C * param0, int param1) UnkStruct_ov62_02241204 * v0 = param0->unk_860; if (param1 == 0) { - sub_0200D3F4(v0->unk_10[1].unk_08, 1); + SpriteActor_EnableObject(v0->unk_10[1].unk_08, 1); sub_020129D0(v0->unk_10[1].unk_0C, 1); SpriteActor_SetSpritePositionXY(v0->unk_10[0].unk_08, 32, 232); } else { - sub_0200D3F4(v0->unk_10[1].unk_08, 0); + SpriteActor_EnableObject(v0->unk_10[1].unk_08, 0); sub_020129D0(v0->unk_10[1].unk_0C, 0); SpriteActor_SetSpritePositionXY(v0->unk_10[0].unk_08, 80, 232); } diff --git a/src/overlay062/ov62_02246B00.c b/src/overlay062/ov62_02246B00.c index 1e42ef7d2a..e3a88c029a 100644 --- a/src/overlay062/ov62_02246B00.c +++ b/src/overlay062/ov62_02246B00.c @@ -740,9 +740,9 @@ void ov62_0224784C (UnkStruct_ov62_02246BF4 * param0) void ov62_02247968 (UnkStruct_ov62_02246BF4 * param0, int param1, BOOL param2) { if (param2 == 1) { - sub_0200D3F4(param0->unk_188[param1].unk_0C, 1); + SpriteActor_EnableObject(param0->unk_188[param1].unk_0C, 1); } else { - sub_0200D3F4(param0->unk_188[param1].unk_0C, 0); + SpriteActor_EnableObject(param0->unk_188[param1].unk_0C, 0); } } diff --git a/src/overlay075/ov75_021D0D80.c b/src/overlay075/ov75_021D0D80.c index a729788c93..7e97c8f9b4 100644 --- a/src/overlay075/ov75_021D0D80.c +++ b/src/overlay075/ov75_021D0D80.c @@ -934,7 +934,7 @@ static void ov75_021D1ADC (UnkStruct_ov75_021D1184 * param0) param0->unk_B0[v0] = SpriteActor_LoadResources(param0->unk_A8, param0->unk_AC, &v2); if (param0->unk_1C->unk_14[v0].val1_0 == 7) { - sub_0200D3F4(param0->unk_B0[v0], 0); + SpriteActor_EnableObject(param0->unk_B0[v0], 0); } } } diff --git a/src/overlay076/ov76_0223B140.c b/src/overlay076/ov76_0223B140.c index 8e6ff66f60..fb2e80a31b 100644 --- a/src/overlay076/ov76_0223B140.c +++ b/src/overlay076/ov76_0223B140.c @@ -390,7 +390,7 @@ void ov76_0223B69C (UnkStruct_ov76_0223DE00 * param0, int param1) continue; } - sub_0200D3F4(param0->unk_324[v0].unk_08, param1); + SpriteActor_EnableObject(param0->unk_324[v0].unk_08, param1); } } diff --git a/src/overlay076/ov76_0223B870.c b/src/overlay076/ov76_0223B870.c index d7f7f51143..f5b0899f25 100644 --- a/src/overlay076/ov76_0223B870.c +++ b/src/overlay076/ov76_0223B870.c @@ -612,7 +612,7 @@ void ov76_0223C288 (UnkStruct_ov76_0223DE00 * param0) s16 v2, v3; for (v0 = 0; v0 < param0->unk_00->unk_00; v0++) { - sub_0200D3F4(param0->unk_2FC[v0], 0); + SpriteActor_EnableObject(param0->unk_2FC[v0], 0); } for (v0 = 0; v0 < 12; v0++) { @@ -621,7 +621,7 @@ void ov76_0223C288 (UnkStruct_ov76_0223DE00 * param0) if (v1 != 0xff) { ov76_0223C0EC(v0, &v2, &v3); SpriteActor_SetSpritePositionXY(param0->unk_2FC[v1], v2 + -16, v3 + (+12)); - sub_0200D3F4(param0->unk_2FC[v1], 1); + SpriteActor_EnableObject(param0->unk_2FC[v1], 1); } } } @@ -756,7 +756,7 @@ void ov76_0223C568 (UnkStruct_ov76_0223DE00 * param0, int param1) int v0; for (v0 = 0; v0 < 4; v0++) { - sub_0200D3F4(param0->unk_314[v0], param1); + SpriteActor_EnableObject(param0->unk_314[v0], param1); } } @@ -1273,7 +1273,7 @@ void ov76_0223D2F4 (UnkStruct_ov76_0223DE00 * param0, int param1) continue; } - sub_0200D3F4(param0->unk_3E4.unk_00[v0], param1); + SpriteActor_EnableObject(param0->unk_3E4.unk_00[v0], param1); } } diff --git a/src/overlay076/ov76_0223D338.c b/src/overlay076/ov76_0223D338.c index e7d412280b..eb8fab0c7f 100644 --- a/src/overlay076/ov76_0223D338.c +++ b/src/overlay076/ov76_0223D338.c @@ -1151,7 +1151,7 @@ static BOOL ov76_0223DF94 (UnkStruct_ov76_0223DE00 * param0) break; } - sub_0200D3F4(param0->unk_2F4[1], 0); + SpriteActor_EnableObject(param0->unk_2F4[1], 0); ov76_0223D494(param0, 0, 0xff, 0); ov76_0223CA30(¶m0->unk_D4.unk_18[0], 7); ov76_0223CDA4(param0); @@ -1284,7 +1284,7 @@ static BOOL ov76_0223E9C4 (UnkStruct_ov76_0223DE00 * param0) sub_0200D474(param0->unk_2F4[1], 20); sub_0200D364(param0->unk_2F4[0], 1); ov76_0223CA30(¶m0->unk_D4.unk_18[0], 10); - sub_0200D3F4(param0->unk_2F4[1], 1); + SpriteActor_EnableObject(param0->unk_2F4[1], 1); param0->unk_3D4++; case 1: { @@ -1303,7 +1303,7 @@ static BOOL ov76_0223E9C4 (UnkStruct_ov76_0223DE00 * param0) param0->unk_3D4 = 2; Sound_PlayEffect(1500); } else if (gCoreSys.pressedKeys & PAD_BUTTON_B) { - sub_0200D3F4(param0->unk_2F4[1], 0); + SpriteActor_EnableObject(param0->unk_2F4[1], 0); ov76_0223D600(param0, 0, 1); param0->unk_3D4 = 3; Sound_PlayEffect(1501); diff --git a/src/overlay079/ov79_021D0D80.c b/src/overlay079/ov79_021D0D80.c index a0efd7017a..4f72f8c7fb 100644 --- a/src/overlay079/ov79_021D0D80.c +++ b/src/overlay079/ov79_021D0D80.c @@ -803,7 +803,7 @@ static void ov79_021D167C (UnkStruct_ov79_021D0E1C * param0) param0->unk_1FC = sub_0209916C(param0->unk_1F8, 0, 231, 76, 0, 1, 0, 0); - sub_0200D3F4(param0->unk_1FC->unk_04, 0); + SpriteActor_EnableObject(param0->unk_1FC->unk_04, 0); } static void ov79_021D17E8 (UnkStruct_ov79_021D0E1C * param0) diff --git a/src/overlay079/ov79_021D183C.c b/src/overlay079/ov79_021D183C.c index ffc230c2ff..b9fa75bf97 100644 --- a/src/overlay079/ov79_021D183C.c +++ b/src/overlay079/ov79_021D183C.c @@ -346,7 +346,7 @@ static void ov79_021D1D94 (UnkStruct_0200112C * param0, u32 param1, u8 param2) if (param1 == 0xFF) { ov79_021D1D20(v0, NULL); sub_0201A954(&v0->unk_E8[1]); - sub_0200D3F4(v0->unk_1FC->unk_04, 0); + SpriteActor_EnableObject(v0->unk_1FC->unk_04, 0); return; } @@ -363,7 +363,7 @@ static void ov79_021D1D94 (UnkStruct_0200112C * param0, u32 param1, u8 param2) StringFormatter_Format(v0->unk_30.unk_00, v0->unk_30.unk_04, v0->unk_30.unk_10); sub_0201D78C(&v0->unk_E8[1], 0, v0->unk_30.unk_04, 8, 0, 0, v1, NULL); sub_0209933C(v0->unk_1F8, v0->unk_1FC, v0->unk_20->unk_1C[param1].unk_02); - sub_0200D3F4(v0->unk_1FC->unk_04, 1); + SpriteActor_EnableObject(v0->unk_1FC->unk_04, 1); } void ov79_021D1ED8 (UnkStruct_ov79_021D0E1C * param0) diff --git a/src/overlay079/ov79_021D2268.c b/src/overlay079/ov79_021D2268.c index d15ab601cf..adfdbe9c5d 100644 --- a/src/overlay079/ov79_021D2268.c +++ b/src/overlay079/ov79_021D2268.c @@ -564,7 +564,7 @@ static void ov79_021D2864 (UnkStruct_ov79_021D2928 * param0) param0->unk_5C = sub_02098FFC(param0->unk_00, 2, 2, (NNS_G2D_VRAM_TYPE_2DMAIN), 0); param0->unk_60[0] = sub_0209916C(param0->unk_5C, param0->unk_10->unk_08, 100, 90, 0, 1, 0, 0); - sub_0200D3F4(param0->unk_60[0]->unk_04, 0); + SpriteActor_EnableObject(param0->unk_60[0]->unk_04, 0); if (sub_02035E38()) { sub_02039734(); diff --git a/src/overlay084/ov84_0223B5A0.c b/src/overlay084/ov84_0223B5A0.c index ce849f0c32..f8d00d068b 100644 --- a/src/overlay084/ov84_0223B5A0.c +++ b/src/overlay084/ov84_0223B5A0.c @@ -1385,8 +1385,8 @@ static void ov84_0223C89C (UnkStruct_ov84_0223B5A0 * param0) BGL_FillWindow(¶m0->unk_04[1], 0); sub_0201A9A4(¶m0->unk_04[0]); sub_0201A9A4(¶m0->unk_04[1]); - sub_0200D3F4(param0->unk_E0[4], 0); - sub_0200D3F4(param0->unk_E0[7], 0); + SpriteActor_EnableObject(param0->unk_E0[4], 0); + SpriteActor_EnableObject(param0->unk_E0[7], 0); ov84_0223F3AC(param0, param0->unk_C4->unk_64, 0); ov84_0223CF20(param0, param0->unk_C4->unk_64, 0); } @@ -1449,7 +1449,7 @@ static u8 ov84_0223C920 (UnkStruct_ov84_0223B5A0 * param0) sub_0201C3C0(param0->unk_00, 4); } - sub_0200D3F4(param0->unk_E0[7], 1); + SpriteActor_EnableObject(param0->unk_E0[7], 1); return 1; } @@ -1559,7 +1559,7 @@ static u8 ov84_0223CBD8 (UnkStruct_ov84_0223B5A0 * param0) ov84_0223C1D0(¶m0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_06, ¶m0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_04, param0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_09, 9); ov84_0223C224(param0, param0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_06, param0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_04); SpriteActor_SetSpritePositionXY(param0->unk_E0[4], 177, 24 + (param0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_04 - 1) * 16); - sub_0200D3F4(param0->unk_E0[4], 1); + SpriteActor_EnableObject(param0->unk_E0[4], 1); v0->unk_02++; return 1; @@ -1955,21 +1955,21 @@ static void ov84_0223D4E8 (UnkStruct_ov84_0223B5A0 * param0) if (param0->unk_47A == 0) { SpriteActor_SetSpritePositionXY(param0->unk_E0[4], 177, 24 + (v0->unk_04 - 1) * 16); - sub_0200D3F4(param0->unk_E0[4], 1); - sub_0200D3F4(param0->unk_E0[5], 0); + SpriteActor_EnableObject(param0->unk_E0[4], 1); + SpriteActor_EnableObject(param0->unk_E0[5], 0); if (param0->unk_424 != 1) { - sub_0200D3F4(param0->unk_E0[2], 1); - sub_0200D3F4(param0->unk_E0[3], 1); + SpriteActor_EnableObject(param0->unk_E0[2], 1); + SpriteActor_EnableObject(param0->unk_E0[3], 1); } } else { SpriteActor_SetSpritePositionXY(param0->unk_E0[5], 177, 24 + (v0->unk_04 - 1) * 16 - 8); - sub_0200D3F4(param0->unk_E0[4], 0); - sub_0200D3F4(param0->unk_E0[5], 1); + SpriteActor_EnableObject(param0->unk_E0[4], 0); + SpriteActor_EnableObject(param0->unk_E0[5], 1); if (param0->unk_424 != 1) { - sub_0200D3F4(param0->unk_E0[2], 0); - sub_0200D3F4(param0->unk_E0[3], 0); + SpriteActor_EnableObject(param0->unk_E0[2], 0); + SpriteActor_EnableObject(param0->unk_E0[3], 0); } } } @@ -2096,10 +2096,10 @@ static void ov84_0223D7E8 (UnkStruct_ov84_0223B5A0 * param0, u8 param1) { if (param1 == 0) { sub_020198C0(param0->unk_00, 1, Unk_ov84_02241064, 0, 18, 5, 5); - sub_0200D3F4(param0->unk_E0[7], 1); + SpriteActor_EnableObject(param0->unk_E0[7], 1); } else { sub_020198C0(param0->unk_00, 1, Unk_ov84_02241096, 0, 18, 5, 5); - sub_0200D3F4(param0->unk_E0[7], 0); + SpriteActor_EnableObject(param0->unk_E0[7], 0); } sub_0201C3C0(param0->unk_00, 1); diff --git a/src/overlay084/ov84_022403F4.c b/src/overlay084/ov84_022403F4.c index 9536519915..6d8c959659 100644 --- a/src/overlay084/ov84_022403F4.c +++ b/src/overlay084/ov84_022403F4.c @@ -270,18 +270,18 @@ static void ov84_02240950 (UnkStruct_ov84_0223B5A0 * param0) param0->unk_E0[v0] = SpriteActor_LoadResources(param0->unk_D8, param0->unk_DC, &Unk_ov84_022411B0[v0]); } - sub_0200D3F4(param0->unk_E0[5], 0); - sub_0200D3F4(param0->unk_E0[6], 0); - sub_0200D3F4(param0->unk_E0[10], 0); - sub_0200D3F4(param0->unk_E0[11], 0); + SpriteActor_EnableObject(param0->unk_E0[5], 0); + SpriteActor_EnableObject(param0->unk_E0[6], 0); + SpriteActor_EnableObject(param0->unk_E0[10], 0); + SpriteActor_EnableObject(param0->unk_E0[11], 0); if ((param0->unk_C4->unk_65 == 4) || (param0->unk_C4->unk_65 == 5)) { - sub_0200D3F4(param0->unk_E0[1], 0); + SpriteActor_EnableObject(param0->unk_E0[1], 0); } if (param0->unk_424 == 1) { - sub_0200D3F4(param0->unk_E0[2], 0); - sub_0200D3F4(param0->unk_E0[3], 0); + SpriteActor_EnableObject(param0->unk_E0[2], 0); + SpriteActor_EnableObject(param0->unk_E0[3], 0); } ov84_02240D3C(param0, 0); @@ -425,8 +425,8 @@ void ov84_02240CF0 (UnkStruct_ov84_0223B5A0 * param0, u8 param1) void ov84_02240D3C (UnkStruct_ov84_0223B5A0 * param0, u8 param1) { - sub_0200D3F4(param0->unk_E0[8], param1); - sub_0200D3F4(param0->unk_E0[9], param1); + SpriteActor_EnableObject(param0->unk_E0[8], param1); + SpriteActor_EnableObject(param0->unk_E0[9], param1); } void ov84_02240D5C (UnkStruct_ov84_0223B5A0 * param0, u16 param1, u8 param2) @@ -435,8 +435,8 @@ void ov84_02240D5C (UnkStruct_ov84_0223B5A0 * param0, u16 param1, u8 param2) u16 v1; u16 v2; - sub_0200D3F4(param0->unk_E0[10], param2); - sub_0200D3F4(param0->unk_E0[11], param2); + SpriteActor_EnableObject(param0->unk_E0[10], param2); + SpriteActor_EnableObject(param0->unk_E0[11], param2); if (param2 == 0) { return; @@ -454,7 +454,7 @@ void ov84_02240D5C (UnkStruct_ov84_0223B5A0 * param0, u16 param1, u8 param2) void ov84_02240E24 (UnkStruct_ov84_0223B5A0 * param0, s16 param1, s16 param2) { - sub_0200D3F4(param0->unk_E0[6], 1); + SpriteActor_EnableObject(param0->unk_E0[6], 1); SpriteActor_SetSpritePositionXY(param0->unk_E0[6], param1, param2); sub_0200D3CC(param0->unk_E0[6], 0); sub_0200D364(param0->unk_E0[6], 0); @@ -466,7 +466,7 @@ void ov84_02240E5C (UnkStruct_ov84_0223B5A0 * param0) sub_0200D34C(param0->unk_E0[6], FX32_ONE); if (sub_0200D3E0(param0->unk_E0[6]) == 2) { - sub_0200D3F4(param0->unk_E0[6], 0); + SpriteActor_EnableObject(param0->unk_E0[6], 0); } } } diff --git a/src/overlay091/ov91_021D0D80.c b/src/overlay091/ov91_021D0D80.c index f846d7d4af..a443627c53 100644 --- a/src/overlay091/ov91_021D0D80.c +++ b/src/overlay091/ov91_021D0D80.c @@ -835,7 +835,7 @@ static void ov91_021D1498 (UnkStruct_ov91_021D0ED8 * param0) ov91_021D1A68(param0, 0xfffffffe); } - sub_0200D3F4(param0->unk_118[5], 0); + SpriteActor_EnableObject(param0->unk_118[5], 0); } ov91_021D2314(param0); @@ -983,7 +983,7 @@ static void ov91_021D18C8 (UnkStruct_ov91_021D0ED8 * param0, u32 param1) BGL_FillWindow(¶m0->unk_08[7], 0); BGL_FillWindow(¶m0->unk_08[8], 0); BGL_FillWindow(¶m0->unk_08[9], 0); - sub_0200D3F4(param0->unk_118[5], 0); + SpriteActor_EnableObject(param0->unk_118[5], 0); if (param1 != 0xfffffffe) { MessageLoader * v0; @@ -1018,7 +1018,7 @@ static void ov91_021D18C8 (UnkStruct_ov91_021D0ED8 * param0, u32 param1) ov91_021D1580(param0, 10, 0, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0))), 0); MessageLoader_Free(v0); ov91_021D24B4(param0, param1); - sub_0200D3F4(param0->unk_118[5], 1); + SpriteActor_EnableObject(param0->unk_118[5], 1); sub_0201A9A4(¶m0->unk_08[2]); sub_0201A9A4(¶m0->unk_08[3]); sub_0201A9A4(¶m0->unk_08[4]); @@ -1388,9 +1388,9 @@ static void ov91_021D2314 (UnkStruct_ov91_021D0ED8 * param0) param0->unk_118[6 + v0], 152, 32 + 16 * v0); if (param0->unk_00->unk_12 + v0 >= param0->unk_184 - 1) { - sub_0200D3F4(param0->unk_118[6 + v0], 0); + SpriteActor_EnableObject(param0->unk_118[6 + v0], 0); } else { - sub_0200D3F4(param0->unk_118[6 + v0], 1); + SpriteActor_EnableObject(param0->unk_118[6 + v0], 1); ov91_021D22A0(param0, param0->unk_00->unk_0C[param0->unk_00->unk_12 + v0], v0); } } @@ -1442,9 +1442,9 @@ static void ov91_021D237C (UnkStruct_ov91_021D0ED8 * param0, u16 param1, u16 par v2 = (v2 - 32) / 16; if (param2 + v2 >= param0->unk_184 - 1) { - sub_0200D3F4(param0->unk_118[6 + v0], 0); + SpriteActor_EnableObject(param0->unk_118[6 + v0], 0); } else { - sub_0200D3F4(param0->unk_118[6 + v0], 1); + SpriteActor_EnableObject(param0->unk_118[6 + v0], 1); } } } @@ -1477,29 +1477,29 @@ static void ov91_021D2548 (UnkStruct_ov91_021D0ED8 * param0, u8 param1, u8 param static void ov91_021D2574 (UnkStruct_ov91_021D0ED8 * param0, u8 param1) { - sub_0200D3F4(param0->unk_118[0], param1); - sub_0200D3F4(param0->unk_118[1], param1); + SpriteActor_EnableObject(param0->unk_118[0], param1); + SpriteActor_EnableObject(param0->unk_118[1], param1); } static void ov91_021D2594 (UnkStruct_ov91_021D0ED8 * param0) { if (param0->unk_00->unk_12 != 0) { - sub_0200D3F4(param0->unk_118[2], 1); + SpriteActor_EnableObject(param0->unk_118[2], 1); } else { - sub_0200D3F4(param0->unk_118[2], 0); + SpriteActor_EnableObject(param0->unk_118[2], 0); } if (param0->unk_00->unk_12 + 7 < param0->unk_184) { - sub_0200D3F4(param0->unk_118[3], 1); + SpriteActor_EnableObject(param0->unk_118[3], 1); } else { - sub_0200D3F4(param0->unk_118[3], 0); + SpriteActor_EnableObject(param0->unk_118[3], 0); } } static void ov91_021D25E4 (UnkStruct_ov91_021D0ED8 * param0) { - sub_0200D3F4(param0->unk_118[2], 0); - sub_0200D3F4(param0->unk_118[3], 0); + SpriteActor_EnableObject(param0->unk_118[2], 0); + SpriteActor_EnableObject(param0->unk_118[3], 0); } static int ov91_021D2604 (UnkStruct_ov91_021D0ED8 * param0) diff --git a/src/overlay099/ov99_021D1A54.c b/src/overlay099/ov99_021D1A54.c index 138a04b9ed..2a1ccf36fe 100644 --- a/src/overlay099/ov99_021D1A54.c +++ b/src/overlay099/ov99_021D1A54.c @@ -873,7 +873,7 @@ static void ov99_021D2714 (UnkStruct_ov99_021D2CB0 * param0) param0->unk_10E0[3] = SpriteActor_LoadResources(param0->unk_18, param0->unk_1C, &Unk_ov99_021D49D0); sub_0200D390(param0->unk_10E0[3], 1); - sub_0200D3F4(param0->unk_10E0[3], 0); + SpriteActor_EnableObject(param0->unk_10E0[3], 0); SpriteActor_UpdateObject(param0->unk_10E0[3]->unk_00); } @@ -912,7 +912,7 @@ static void ov99_021D2828 (UnkStruct_ov99_021D2CB0 * param0) param0->unk_10E0[4] = SpriteActor_LoadResources(param0->unk_18, param0->unk_1C, &Unk_ov99_021D48CC); sub_0200D390(param0->unk_10E0[4], 1); - sub_0200D3F4(param0->unk_10E0[4], 0); + SpriteActor_EnableObject(param0->unk_10E0[4], 0); SpriteActor_UpdateObject(param0->unk_10E0[4]->unk_00); } diff --git a/src/overlay099/ov99_021D340C.c b/src/overlay099/ov99_021D340C.c index b3b76cd917..004b57c3b0 100644 --- a/src/overlay099/ov99_021D340C.c +++ b/src/overlay099/ov99_021D340C.c @@ -250,8 +250,8 @@ static void ov99_021D372C (UnkStruct_ov99_021D2CB0 * param0, UnkStruct_ov99_021D param1->unk_11F = 31; sub_0200D500(param0->unk_10E0[4], Unk_ov99_021D4C84[param2].unk_00, Unk_ov99_021D4C84[param2].unk_02, ((192 + 80) << FX32_SHIFT)); - sub_0200D3F4(param0->unk_10E0[4], 1); - sub_0200D3F4(param0->unk_10E0[3], 0); + SpriteActor_EnableObject(param0->unk_10E0[4], 1); + SpriteActor_EnableObject(param0->unk_10E0[3], 0); G2S_SetBlendAlpha(0, GX_BLEND_PLANEMASK_BG0 | GX_BLEND_PLANEMASK_BG1 | GX_BLEND_PLANEMASK_BG2 | GX_BLEND_PLANEMASK_BG3 | GX_BLEND_PLANEMASK_BD | GX_BLEND_PLANEMASK_OBJ, param1->unk_11E, param1->unk_11F); G2_SetBlendAlpha(0, GX_BLEND_PLANEMASK_BG0 | GX_BLEND_PLANEMASK_BG1 | GX_BLEND_PLANEMASK_BG2 | GX_BLEND_PLANEMASK_BG3 | GX_BLEND_PLANEMASK_BD | GX_BLEND_PLANEMASK_OBJ, param1->unk_11F, param1->unk_11E); @@ -283,8 +283,8 @@ static void ov99_021D37E0 (UnkStruct_ov99_021D2CB0 * param0, UnkStruct_ov99_021D sub_0200D5A0(param0->unk_10E0[4], &v0, &v1, ((192 + 80) << FX32_SHIFT)); if (v1 > 192 + 32) { - sub_0200D3F4(param0->unk_10E0[4], 0); - sub_0200D3F4(param0->unk_10E0[3], 1); + SpriteActor_EnableObject(param0->unk_10E0[4], 0); + SpriteActor_EnableObject(param0->unk_10E0[3], 1); sub_0200D500(param0->unk_10E0[3], v0, -32, ((192 + 80) << FX32_SHIFT)); param1->unk_11D = 1; } @@ -306,7 +306,7 @@ static void ov99_021D37E0 (UnkStruct_ov99_021D2CB0 * param0, UnkStruct_ov99_021D sub_0200D5A0(param0->unk_10E0[3], &v0, &v1, ((192 + 80) << FX32_SHIFT)); if (v1 > 192 + 32) { - sub_0200D3F4(param0->unk_10E0[3], 0); + SpriteActor_EnableObject(param0->unk_10E0[3], 0); param1->unk_11D = 0; param1->unk_11C = 0; } diff --git a/src/overlay100/ov100_021D13E4.c b/src/overlay100/ov100_021D13E4.c index 412584a601..3421ba0dd3 100644 --- a/src/overlay100/ov100_021D13E4.c +++ b/src/overlay100/ov100_021D13E4.c @@ -316,7 +316,7 @@ static void ov100_021D1A54 (UnkStruct_ov100_021D1808 * param0) param0->unk_0C.unk_D4[v0].unk_00 = SpriteActor_LoadResources(v3, v4, &v6); sub_0200D330(param0->unk_0C.unk_D4[v0].unk_00); - sub_0200D3F4(param0->unk_0C.unk_D4[v0].unk_00, 0); + SpriteActor_EnableObject(param0->unk_0C.unk_D4[v0].unk_00, 0); sub_0200D430(param0->unk_0C.unk_D4[v0].unk_00, v0); SpriteActor_SetSpritePositionXY(param0->unk_0C.unk_D4[v0].unk_00, 0, 0); diff --git a/src/overlay104/ov104_0222FBE4.c b/src/overlay104/ov104_0222FBE4.c index e181f3469d..c7cc28d7e9 100644 --- a/src/overlay104/ov104_0222FBE4.c +++ b/src/overlay104/ov104_0222FBE4.c @@ -1333,7 +1333,7 @@ static BOOL ov104_0223066C (UnkStruct_ov104_0222E930 * param0) v10 = ov104_0223D2FC(v1, v9, v4); SpriteActor_SetSpritePositionXY(v10, v5, v6); - sub_0200D3F4(v10, v7); + SpriteActor_EnableObject(v10, v7); ov104_0223D378(v1, v9, v8); } @@ -1365,7 +1365,7 @@ static BOOL ov104_02230728 (UnkStruct_ov104_0222E930 * param0) v4 = ov104_0223D370(v1, v2); GF_ASSERT(v4 != NULL); - sub_0200D3F4(v4, v3); + SpriteActor_EnableObject(v4, v3); return 0; } diff --git a/src/overlay104/ov104_0223C2D4.c b/src/overlay104/ov104_0223C2D4.c index 3eba32b822..242ee92820 100644 --- a/src/overlay104/ov104_0223C2D4.c +++ b/src/overlay104/ov104_0223C2D4.c @@ -1113,7 +1113,7 @@ static void ov104_0223D498 (UnkStruct_ov104_0223C4CC * param0) if (v2->unk_10[v0].unk_06_15 == 1) { v3 = ov104_0223D2FC(param0, v0, v2->unk_10[v0].unk_04); SpriteActor_SetSpritePositionXY(v3, v2->unk_10[v0].unk_00, v2->unk_10[v0].unk_02); - sub_0200D3F4(v3, v2->unk_10[v0].unk_06_14); + SpriteActor_EnableObject(v3, v2->unk_10[v0].unk_06_14); ov104_0223D378(param0, v0, v2->unk_10[v0].unk_06_13); diff --git a/src/overlay104/ov104_0223DC7C.c b/src/overlay104/ov104_0223DC7C.c index 928282418f..f04469fcc7 100644 --- a/src/overlay104/ov104_0223DC7C.c +++ b/src/overlay104/ov104_0223DC7C.c @@ -303,7 +303,7 @@ static BOOL ov104_0223DDE4 (UnkStruct_ov104_0223DD30 * param0, u32 param1, const v0->unk_90 = SpriteActor_LoadResources(param0->unk_14, param0->unk_18, &Unk_ov104_022418B4); - sub_0200D3F4(v0->unk_90, 0); + SpriteActor_EnableObject(v0->unk_90, 0); SpriteActor_UpdateObject(v0->unk_90->unk_00); ov104_0223E3FC(param0, &v0->unk_14, (FX32_CONST(72)) + FX32_CONST(param0->unk_28), (FX32_CONST(82)) + FX32_CONST(param0->unk_2A), param1); param0->unk_00++; @@ -528,7 +528,7 @@ static void ov104_0223E3FC (UnkStruct_ov104_0223DD30 * param0, UnkStruct_ov104_0 for (v0 = 0; v0 < 4; v0++) { param1->unk_04[v0] = SpriteActor_LoadResources(param0->unk_14, param0->unk_18, &v1); - sub_0200D3F4(param1->unk_04[v0], 0); + SpriteActor_EnableObject(param1->unk_04[v0], 0); if (v0 != 3) { sub_02021CF8(param1->unk_04[v0]->unk_00, 2); @@ -756,7 +756,7 @@ static BOOL ov104_0223E804 (UnkStruct_ov104_0223DD30 * param0, UnkStruct_ov104_0 switch (param2->unk_04) { case 0: sub_0200D500(param1->unk_90, 256 + param0->unk_28, 80 + param0->unk_2A, (512 * FX32_ONE)); - sub_0200D3F4(param1->unk_90, 1); + SpriteActor_EnableObject(param1->unk_90, 1); param2->unk_00 = 256 << 8; param2->unk_04++; break; diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index 37488c0f07..37bbbf9611 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -1066,7 +1066,7 @@ static void ov113_0225D6F8 (UnkStruct_ov113_0225DBCC * param0) param0->unk_96C = SpriteActor_LoadResources(param0->unk_1C, param0->unk_20, &Unk_ov113_0226099C); SpriteActor_UpdateObject(param0->unk_96C->unk_00); - sub_0200D3F4(param0->unk_96C, 0); + SpriteActor_EnableObject(param0->unk_96C, 0); v1 = Unk_ov113_022609D0; @@ -1076,7 +1076,7 @@ static void ov113_0225D6F8 (UnkStruct_ov113_0225DBCC * param0) sub_0200D500(param0->unk_970[v0], Unk_ov113_02260934[v0][0], Unk_ov113_02260934[v0][1], ((192 + 80) << FX32_SHIFT)); SpriteActor_UpdateObject(param0->unk_970[v0]->unk_00); - sub_0200D3F4(param0->unk_970[v0], 0); + SpriteActor_EnableObject(param0->unk_970[v0], 0); } } @@ -1102,9 +1102,9 @@ static void ov113_0225D7CC (UnkStruct_ov113_0225DBCC * param0) for (v0 = 0; v0 < 6; v0++) { if ((param0->unk_8D8[v0].unk_02 == 0) || (param0->unk_8D8[v0].unk_02 > NATIONAL_DEX_COUNT)) { - sub_0200D3F4(param0->unk_924[v0], 0); - sub_0200D3F4(param0->unk_93C[v0], 0); - sub_0200D3F4(param0->unk_954[v0], 0); + SpriteActor_EnableObject(param0->unk_924[v0], 0); + SpriteActor_EnableObject(param0->unk_93C[v0], 0); + SpriteActor_EnableObject(param0->unk_954[v0], 0); for (v1 = 0; v1 < 4; v1++) { sub_02019CB8(param0->unk_08, 2, Unk_ov113_022608AC[v1], 0 + 4 * v0, 0x14 + v1, 4, 1, 17); @@ -1375,7 +1375,7 @@ BOOL ov113_0225DDC0 (UnkStruct_ov113_0225DBCC * param0, const UnkStruct_ov113_02 param0->unk_99C[v1] = param1->unk_02; param0->unk_9AC[v1] = param1->unk_00; ov113_0225D938(param1->unk_02, param1->unk_08, param0->unk_970[v1], param0->unk_160, param0->unk_164, NNS_G2D_VRAM_TYPE_2DSUB, param0->unk_19E0); - sub_0200D3F4(param0->unk_970[v1], 1); + SpriteActor_EnableObject(param0->unk_970[v1], 1); sub_020038B0(param0->unk_0C, 1, 2, param1->unk_00, (2 * 16 + 1) + v1, (2 * 16 + 1) + v1 + 1); } } @@ -1421,7 +1421,7 @@ static int ov113_0225DE98 (UnkStruct_ov113_0225DBCC * param0) param0->unk_99C[v1] = 0; param0->unk_9AC[v1] = 0; - sub_0200D3F4(param0->unk_970[v1], 0); + SpriteActor_EnableObject(param0->unk_970[v1], 0); sub_02019CB8(param0->unk_08, 6, 0, Unk_ov113_02260AD4[v1][0], Unk_ov113_02260AD4[v1][1], Unk_ov113_02260AD4[v1][2], Unk_ov113_02260AD4[v1][3], 16); sub_0201C3C0(param0->unk_08, 6); v3++; @@ -1429,7 +1429,7 @@ static int ov113_0225DE98 (UnkStruct_ov113_0225DBCC * param0) if (v0.unk_04[v1] == param0->unk_168.unk_04) { sub_0200D500(param0->unk_96C, Unk_ov113_02260914[v1][0], Unk_ov113_02260914[v1][1], ((192 + 80) << FX32_SHIFT)); - sub_0200D3F4(param0->unk_96C, 1); + SpriteActor_EnableObject(param0->unk_96C, 1); } } diff --git a/src/overlay116/ov116_022604C4.c b/src/overlay116/ov116_022604C4.c index b3ce0b8db2..a50f7bba70 100644 --- a/src/overlay116/ov116_022604C4.c +++ b/src/overlay116/ov116_022604C4.c @@ -416,7 +416,7 @@ static BOOL ov116_02260B6C (UnkStruct_ov116_02262A8C * param0) param0->unk_08 = 0; param0->unk_0C = 0; - sub_0200D3F4(param0->unk_D8, 0); + SpriteActor_EnableObject(param0->unk_D8, 0); ov116_02266FEC(¶m0->unk_FC.unk_190); ov116_02266FEC(¶m0->unk_FC.unk_1A0); diff --git a/src/overlay116/ov116_02261870.c b/src/overlay116/ov116_02261870.c index dafd34aee0..b44102b4d0 100644 --- a/src/overlay116/ov116_02261870.c +++ b/src/overlay116/ov116_02261870.c @@ -282,7 +282,7 @@ void ov116_02261E0C (UnkStruct_ov116_02262A8C * param0, BOOL param1, int param2) int v0; for (v0 = 0; v0 < (3 * 12); v0++) { - sub_0200D3F4(param0->unk_28[v0], param1); + SpriteActor_EnableObject(param0->unk_28[v0], param1); } } @@ -758,7 +758,7 @@ void ov116_02262724 (UnkStruct_ov116_02262A8C * param0) sub_0200D330(param0->unk_D0[v0]); sub_0200D430(param0->unk_D0[v0], 4); SpriteActor_SetOAMMode(param0->unk_D0[v0], GX_OAM_MODE_XLU); - sub_0200D3F4(param0->unk_D0[v0], 0); + SpriteActor_EnableObject(param0->unk_D0[v0], 0); ov116_02261CD8(&v2, 0, 0, 2, 0, 9000); @@ -770,7 +770,7 @@ void ov116_02262724 (UnkStruct_ov116_02262A8C * param0) sub_0200D330(param0->unk_C8[v0]); sub_0200D430(param0->unk_C8[v0], 0); SpriteActor_SetOAMMode(param0->unk_C8[v0], GX_OAM_MODE_XLU); - sub_0200D3F4(param0->unk_C8[v0], 0); + SpriteActor_EnableObject(param0->unk_C8[v0], 0); } } @@ -800,7 +800,7 @@ void ov116_02262840 (UnkStruct_ov116_02262A8C * param0) param0->unk_D8 = SpriteActor_LoadResources(v3, v4, &v2); sub_0200D364(param0->unk_D8, 1); - sub_0200D3F4(param0->unk_D8, 1); + SpriteActor_EnableObject(param0->unk_D8, 1); sub_0200D330(param0->unk_D8); sub_0200D430(param0->unk_D8, 7); } diff --git a/src/overlay116/ov116_0226432C.c b/src/overlay116/ov116_0226432C.c index 2f0f75e438..a267d3a03a 100644 --- a/src/overlay116/ov116_0226432C.c +++ b/src/overlay116/ov116_0226432C.c @@ -521,7 +521,7 @@ static void ov116_022649E4 (SysTask * param0, void * param1) } } - sub_0200D3F4(v0->unk_14[v6].unk_00, v0->unk_14[v6].unk_25); + SpriteActor_EnableObject(v0->unk_14[v6].unk_00, v0->unk_14[v6].unk_25); switch (v0->unk_14[v6].unk_27) { case 0: @@ -1249,7 +1249,7 @@ static void ov116_02265AA4 (SysTask * param0, void * param1) v1->unk_00[0].unk_18 = 64; v1->unk_00[0].unk_1C = 24; - sub_0200D3F4(v1->unk_00[0].unk_00, 1); + SpriteActor_EnableObject(v1->unk_00[0].unk_00, 1); v1->unk_A0[0].unk_08 = 0; v1->unk_A0[0].unk_14 = 128; @@ -1257,7 +1257,7 @@ static void ov116_02265AA4 (SysTask * param0, void * param1) v1->unk_A0[0].unk_18 = 64; v1->unk_A0[0].unk_1C = 24; - sub_0200D3F4(v1->unk_A0[0].unk_00, 1); + SpriteActor_EnableObject(v1->unk_A0[0].unk_00, 1); { sub_0200D67C(v1->unk_00[0].unk_00, &v5, &v6, ((192 + 64) << FX32_SHIFT)); @@ -1515,7 +1515,7 @@ static void ov116_022660A8 (SysTask * param0, void * param1) v2->unk_00[v0].unk_18 = 64; v2->unk_00[v0].unk_1C = 24; - sub_0200D3F4(v2->unk_00[v0].unk_00, 1); + SpriteActor_EnableObject(v2->unk_00[v0].unk_00, 1); v2->unk_A0[v0].unk_08 = 0; v2->unk_A0[v0].unk_14 = 128; @@ -1523,7 +1523,7 @@ static void ov116_022660A8 (SysTask * param0, void * param1) v2->unk_A0[v0].unk_18 = 64; v2->unk_A0[v0].unk_1C = 24; - sub_0200D3F4(v2->unk_A0[v0].unk_00, 1); + SpriteActor_EnableObject(v2->unk_A0[v0].unk_00, 1); sub_0200D67C(v2->unk_00[v0].unk_00, &v6, &v7, ((192 + 64) << FX32_SHIFT)); v4 = (v2->unk_00[v0].unk_14 << FX32_SHIFT) + (sub_0201D250(v2->unk_00[v0].unk_08) * v2->unk_00[v0].unk_18); @@ -1540,7 +1540,7 @@ static void ov116_022660A8 (SysTask * param0, void * param1) ov116_02265D84(&v2->unk_A0[1]); ov116_02265D84(&v2->unk_00[0]); ov116_02265D84(&v2->unk_00[1]); - sub_0200D3F4(v2->unk_00[1].unk_00, 0); + SpriteActor_EnableObject(v2->unk_00[1].unk_00, 0); v1->unk_1C++; case 1: v3[0] = ov116_02265D8C(&v2->unk_A0[0], v2->unk_144, 0, 3); @@ -1553,7 +1553,7 @@ static void ov116_022660A8 (SysTask * param0, void * param1) ov116_02265D84(&v2->unk_A0[1]); ov116_02265D84(&v2->unk_00[0]); ov116_02265D84(&v2->unk_00[1]); - sub_0200D3F4(v2->unk_00[1].unk_00, 1); + SpriteActor_EnableObject(v2->unk_00[1].unk_00, 1); v1->unk_1C++; } else { break; @@ -1642,7 +1642,7 @@ static void ov116_0226644C (SysTask * param0, void * param1) v2->unk_00[v0].unk_18 = 64; v2->unk_00[v0].unk_1C = 24; - sub_0200D3F4(v2->unk_00[v0].unk_00, 1); + SpriteActor_EnableObject(v2->unk_00[v0].unk_00, 1); v2->unk_A0[v0].unk_08 = 0; v2->unk_A0[v0].unk_14 = 128; @@ -1650,7 +1650,7 @@ static void ov116_0226644C (SysTask * param0, void * param1) v2->unk_A0[v0].unk_18 = 64; v2->unk_A0[v0].unk_1C = 24; - sub_0200D3F4(v2->unk_A0[v0].unk_00, 1); + SpriteActor_EnableObject(v2->unk_A0[v0].unk_00, 1); sub_0200D67C(v2->unk_00[v0].unk_00, &v6, &v7, ((192 + 64) << FX32_SHIFT)); v4 = (v2->unk_00[v0].unk_14 << FX32_SHIFT) + (sub_0201D250(v2->unk_00[v0].unk_08) * v2->unk_00[v0].unk_18); @@ -1667,7 +1667,7 @@ static void ov116_0226644C (SysTask * param0, void * param1) ov116_02265D84(&v2->unk_A0[1]); ov116_02265D84(&v2->unk_00[0]); ov116_02265D84(&v2->unk_00[1]); - sub_0200D3F4(v2->unk_00[1].unk_00, 0); + SpriteActor_EnableObject(v2->unk_00[1].unk_00, 0); v1->unk_1C++; case 1: v3[0] = ov116_02265D8C(&v2->unk_A0[0], v2->unk_144, 0, 3); @@ -1679,7 +1679,7 @@ static void ov116_0226644C (SysTask * param0, void * param1) ov116_02265D84(&v2->unk_A0[1]); ov116_02265D84(&v2->unk_00[0]); ov116_02265D84(&v2->unk_00[1]); - sub_0200D3F4(v2->unk_00[1].unk_00, 1); + SpriteActor_EnableObject(v2->unk_00[1].unk_00, 1); v1->unk_1C++; } else { break; @@ -1760,7 +1760,7 @@ static void ov116_022667F4 (SysTask * param0, void * param1) v2->unk_00[v0].unk_18 = 64; v2->unk_00[v0].unk_1C = 24; - sub_0200D3F4(v2->unk_00[v0].unk_00, 1); + SpriteActor_EnableObject(v2->unk_00[v0].unk_00, 1); v2->unk_A0[v0].unk_08 = 0; v2->unk_A0[v0].unk_14 = 128; @@ -1768,7 +1768,7 @@ static void ov116_022667F4 (SysTask * param0, void * param1) v2->unk_A0[v0].unk_18 = 64; v2->unk_A0[v0].unk_1C = 24; - sub_0200D3F4(v2->unk_A0[v0].unk_00, 1); + SpriteActor_EnableObject(v2->unk_A0[v0].unk_00, 1); sub_0200D67C(v2->unk_00[v0].unk_00, &v6, &v7, ((192 + 64) << FX32_SHIFT)); v4 = (v2->unk_00[v0].unk_14 << FX32_SHIFT) + (sub_0201D250(v2->unk_00[v0].unk_08) * v2->unk_00[v0].unk_18); @@ -1785,7 +1785,7 @@ static void ov116_022667F4 (SysTask * param0, void * param1) ov116_02265D84(&v2->unk_A0[1]); ov116_02265D84(&v2->unk_00[0]); ov116_02265D84(&v2->unk_00[1]); - sub_0200D3F4(v2->unk_00[1].unk_00, 0); + SpriteActor_EnableObject(v2->unk_00[1].unk_00, 0); v1->unk_1C++; case 1: @@ -1799,7 +1799,7 @@ static void ov116_022667F4 (SysTask * param0, void * param1) ov116_02265D84(&v2->unk_A0[1]); ov116_02265D84(&v2->unk_00[0]); ov116_02265D84(&v2->unk_00[1]); - sub_0200D3F4(v2->unk_00[1].unk_00, 1); + SpriteActor_EnableObject(v2->unk_00[1].unk_00, 1); v1->unk_1C++; } else { break; @@ -1906,7 +1906,7 @@ static void ov116_02266BF0 (SysTask * param0, void * param1) v2->unk_00[v0].unk_18 = 64; v2->unk_00[v0].unk_1C = 24; - sub_0200D3F4(v2->unk_00[v0].unk_00, 1); + SpriteActor_EnableObject(v2->unk_00[v0].unk_00, 1); v2->unk_A0[v0].unk_08 = 0; v2->unk_A0[v0].unk_14 = 128; @@ -1914,7 +1914,7 @@ static void ov116_02266BF0 (SysTask * param0, void * param1) v2->unk_A0[v0].unk_18 = 64; v2->unk_A0[v0].unk_1C = 24; - sub_0200D3F4(v2->unk_A0[v0].unk_00, 1); + SpriteActor_EnableObject(v2->unk_A0[v0].unk_00, 1); sub_0200D67C(v2->unk_00[v0].unk_00, &v6, &v7, ((192 + 64) << FX32_SHIFT)); v4 = (v2->unk_00[v0].unk_14 << FX32_SHIFT) + (sub_0201D250(v2->unk_00[v0].unk_08) * v2->unk_00[v0].unk_18); @@ -1931,7 +1931,7 @@ static void ov116_02266BF0 (SysTask * param0, void * param1) ov116_02265D84(&v2->unk_A0[1]); ov116_02265D84(&v2->unk_00[0]); ov116_02265D84(&v2->unk_00[1]); - sub_0200D3F4(v2->unk_00[1].unk_00, 0); + SpriteActor_EnableObject(v2->unk_00[1].unk_00, 0); v1->unk_1C++; case 1: v3[0] = ov116_02265D8C(&v2->unk_A0[0], v2->unk_144, 0, 3); @@ -1944,7 +1944,7 @@ static void ov116_02266BF0 (SysTask * param0, void * param1) ov116_02265D84(&v2->unk_A0[1]); ov116_02265D84(&v2->unk_00[0]); ov116_02265D84(&v2->unk_00[1]); - sub_0200D3F4(v2->unk_00[1].unk_00, 1); + SpriteActor_EnableObject(v2->unk_00[1].unk_00, 1); v1->unk_1C++; } else { break; diff --git a/src/overlay117/ov117_022626B0.c b/src/overlay117/ov117_022626B0.c index 3a3ecd20e4..191a59fa9c 100644 --- a/src/overlay117/ov117_022626B0.c +++ b/src/overlay117/ov117_022626B0.c @@ -943,7 +943,7 @@ static CellActorData * ov117_02263A00 (UnkStruct_ov117_02261280 * param0) v1 = Unk_ov117_02266B38; v0 = SpriteActor_LoadResources(param0->unk_24, param0->unk_28, &v1); - sub_0200D3F4(v0, 0); + SpriteActor_EnableObject(v0, 0); SpriteActor_UpdateObject(v0->unk_00); return v0; diff --git a/src/overlay117/ov117_02263AF0.c b/src/overlay117/ov117_02263AF0.c index 631ff3be9f..58095648ff 100644 --- a/src/overlay117/ov117_02263AF0.c +++ b/src/overlay117/ov117_02263AF0.c @@ -593,7 +593,7 @@ static int ov117_02263E1C (UnkStruct_ov117_02261280 * param0, const UnkStruct_ov if (param1->unk_00 == sub_0203608C()) { ov117_02261E38(param0, param1->unk_04); param2->unk_0C = 25; - sub_0200D3F4(param2->unk_10, 0); + SpriteActor_EnableObject(param2->unk_10, 0); } param2->unk_00 = 1; @@ -637,7 +637,7 @@ void ov117_02263EF8 (UnkStruct_ov117_02261280 * param0) v1->unk_0C--; if (v1->unk_0C == 0) { - sub_0200D3F4(v1->unk_10, 1); + SpriteActor_EnableObject(v1->unk_10, 1); } } else if (ov117_02263F80(param0, v1) == 1) { if ((param0->unk_2FCC == 1) && (param0->unk_2FBC == 0)) { @@ -1466,11 +1466,11 @@ void ov117_02264FB0 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_0226504C switch (param0->unk_00->unk_30) { case 2: - sub_0200D3F4(param1->unk_00[2], 0); - sub_0200D3F4(param1->unk_00[3], 0); + SpriteActor_EnableObject(param1->unk_00[2], 0); + SpriteActor_EnableObject(param1->unk_00[3], 0); break; case 3: - sub_0200D3F4(param1->unk_00[1], 0); + SpriteActor_EnableObject(param1->unk_00[1], 0); break; } } @@ -1500,13 +1500,13 @@ void ov117_02265064 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_022653F4 sub_0200D500(param1->unk_00[v1].unk_00, v3, v4 + -24, ((192 + 160) << FX32_SHIFT)); sub_0200D364(param1->unk_00[v1].unk_00, Unk_ov117_02266B7A[v1 + 1]); SpriteActor_UpdateObject(param1->unk_00[v1].unk_00->unk_00); - sub_0200D3F4(param1->unk_00[v1].unk_00, 0); + SpriteActor_EnableObject(param1->unk_00[v1].unk_00, 0); param1->unk_00[v1].unk_04 = SpriteActor_LoadResources(param0->unk_24, param0->unk_28, &Unk_ov117_02266DD0); sub_0200D500(param1->unk_00[v1].unk_04, 0, 0, ((192 + 160) << FX32_SHIFT)); sub_0200D364(param1->unk_00[v1].unk_04, 33); SpriteActor_UpdateObject(param1->unk_00[v1].unk_04->unk_00); - sub_0200D3F4(param1->unk_00[v1].unk_04, 0); + SpriteActor_EnableObject(param1->unk_00[v1].unk_04, 0); param1->unk_00[v1].unk_08 = SpriteActor_LoadResources(param0->unk_24, param0->unk_28, &Unk_ov117_02266E04); sub_0200D500(param1->unk_00[v1].unk_08, v3, v4 + -24 + 24, ((192 + 160) << FX32_SHIFT)); @@ -1515,13 +1515,13 @@ void ov117_02265064 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_022653F4 sub_0200D6E8(param1->unk_00[v1].unk_08, 1.0f, 1.0f); sub_0200D364(param1->unk_00[v1].unk_08, 34 + v1); SpriteActor_UpdateObject(param1->unk_00[v1].unk_08->unk_00); - sub_0200D3F4(param1->unk_00[v1].unk_08, 0); + SpriteActor_EnableObject(param1->unk_00[v1].unk_08, 0); ov117_02266344(param0, ¶m1->unk_00[v1].unk_30); } - sub_0200D3F4(param1->unk_00[0].unk_00, 1); - sub_0200D3F4(param1->unk_00[0].unk_08, 1); + SpriteActor_EnableObject(param1->unk_00[0].unk_00, 1); + SpriteActor_EnableObject(param1->unk_00[0].unk_08, 1); } void ov117_022651E0 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_022653F4 * param1) @@ -1663,8 +1663,8 @@ static int ov117_02265454 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_02 switch (param2->unk_11) { case 0: - sub_0200D3F4(param2->unk_00, 1); - sub_0200D3F4(param2->unk_08, 1); + SpriteActor_EnableObject(param2->unk_00, 1); + SpriteActor_EnableObject(param2->unk_08, 1); sub_0200D5A0(param2->unk_00, &v0, &v1, ((192 + 160) << FX32_SHIFT)); param2->unk_1C = v0; param2->unk_1E = v1; @@ -1776,7 +1776,7 @@ static int ov117_022657C4 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_02 sub_0200D5A0(param2->unk_00, &v0, &v1, ((192 + 160) << FX32_SHIFT)); sub_0200D500(param2->unk_04, v0, v1 + -32, ((192 + 160) << FX32_SHIFT)); sub_0200D364(param2->unk_04, 33); - sub_0200D3F4(param2->unk_04, 1); + SpriteActor_EnableObject(param2->unk_04, 1); sub_0200D364(param2->unk_00, Unk_ov117_02266B7A[param2->unk_14] + 2); param2->unk_12 = Unk_ov117_02266BC4[param1->unk_F4].unk_02; @@ -1786,12 +1786,12 @@ static int ov117_022657C4 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_02 case 1: if (param2->unk_12 == param2->unk_13) { sub_0200D364(param2->unk_00, Unk_ov117_02266B7A[param2->unk_14] + 1); - sub_0200D3F4(param2->unk_04, 0); + SpriteActor_EnableObject(param2->unk_04, 0); sub_0200D34C(param2->unk_04, (4 * FX32_ONE)); } if (param2->unk_12 == 0) { - sub_0200D3F4(param2->unk_04, 0); + SpriteActor_EnableObject(param2->unk_04, 0); sub_0200D364(param2->unk_00, Unk_ov117_02266B7A[param2->unk_14] + 0); param2->unk_11++; break; @@ -1876,14 +1876,14 @@ void ov117_02265ABC (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_02265C3C param1->unk_00[v1].unk_00 = SpriteActor_LoadResources(param0->unk_24, param0->unk_28, &v0); sub_0200D500(param1->unk_00[v1].unk_00, 0, 0, ((192 + 160) << FX32_SHIFT)); - sub_0200D3F4(param1->unk_00[v1].unk_00, 0); + SpriteActor_EnableObject(param1->unk_00[v1].unk_00, 0); param1->unk_00[v1].unk_04 = SpriteActor_LoadResources(param0->unk_24, param0->unk_28, &Unk_ov117_02266DD0); sub_0200D500(param1->unk_00[v1].unk_04, 0, 0, ((192 + 160) << FX32_SHIFT)); sub_0200D364(param1->unk_00[v1].unk_04, 33); SpriteActor_UpdateObject(param1->unk_00[v1].unk_04->unk_00); - sub_0200D3F4(param1->unk_00[v1].unk_04, 0); + SpriteActor_EnableObject(param1->unk_00[v1].unk_04, 0); } } @@ -1964,7 +1964,7 @@ static BOOL ov117_02265C3C (UnkStruct_ov117_02265C3C * param0, UnkStruct_ov117_0 break; } - sub_0200D3F4(param1->unk_00, 1); + SpriteActor_EnableObject(param1->unk_00, 1); param1->unk_0C += 0x8000; if ((param1->unk_0C / FX32_ONE) >= param1->unk_10) { @@ -1976,7 +1976,7 @@ static BOOL ov117_02265C3C (UnkStruct_ov117_02265C3C * param0, UnkStruct_ov117_0 sub_0200D5A0(param1->unk_00, &v0, &v1, ((192 + 160) << FX32_SHIFT)); sub_0200D500(param1->unk_04, v0, v1 + -32, ((192 + 160) << FX32_SHIFT)); sub_0200D364(param1->unk_04, 33); - sub_0200D3F4(param1->unk_04, 1); + SpriteActor_EnableObject(param1->unk_04, 1); Sound_PlayEffect(1403); sub_0200D364(param1->unk_00, Unk_ov117_02266B7A[param1->unk_12] + 2); @@ -1991,7 +1991,7 @@ static BOOL ov117_02265C3C (UnkStruct_ov117_02265C3C * param0, UnkStruct_ov117_0 } if (param1->unk_14 == 0) { - sub_0200D3F4(param1->unk_04, 0); + SpriteActor_EnableObject(param1->unk_04, 0); sub_0200D364(param1->unk_00, Unk_ov117_02266B7A[param1->unk_12] + 0); param1->unk_13++; } @@ -2000,7 +2000,7 @@ static BOOL ov117_02265C3C (UnkStruct_ov117_02265C3C * param0, UnkStruct_ov117_0 param1->unk_0C -= 0x8000; if ((param1->unk_0C / FX32_ONE) <= param1->unk_10 + -96) { - sub_0200D3F4(param1->unk_00, 0); + SpriteActor_EnableObject(param1->unk_00, 0); param1->unk_13 = 0; param1->unk_15 = 0; return 0; @@ -2278,7 +2278,7 @@ CellActorData * ov117_02266244 (UnkStruct_ov117_02261280 * param0) v0 = SpriteActor_LoadResources(param0->unk_24, param0->unk_28, &Unk_ov117_02266EA0); - sub_0200D3F4(v0, 0); + SpriteActor_EnableObject(v0, 0); SpriteActor_UpdateObject(v0->unk_00); return v0; @@ -2295,7 +2295,7 @@ BOOL ov117_02266274 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_02266274 case 0: case 5: sub_0200D500(param1->unk_00, 128, 16, ((192 + 160) << FX32_SHIFT)); - sub_0200D3F4(param1->unk_00, 1); + SpriteActor_EnableObject(param1->unk_00, 1); param1->unk_04++; break; case 1: @@ -2327,7 +2327,7 @@ BOOL ov117_02266274 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_02266274 case 3: case 8: param1->unk_14 = 0; - sub_0200D3F4(param1->unk_00, 0); + SpriteActor_EnableObject(param1->unk_00, 0); param1->unk_04++; case 4: @@ -2357,7 +2357,7 @@ static void ov117_02266344 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_0 sub_0200D364(v0, 27); SpriteActor_SetOAMMode(v0, GX_OAM_MODE_XLU); - sub_0200D3F4(v0, 0); + SpriteActor_EnableObject(v0, 0); SpriteActor_UpdateObject(v0->unk_00); param1->unk_00[v1] = v0; @@ -2384,7 +2384,7 @@ static void ov117_0226639C (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_0 sub_0200D500(param2->unk_00[v2], v0, v1 + 28, ((192 + 160) << FX32_SHIFT)); sub_0200D364(param2->unk_00[v2], 27); SpriteActor_SetOAMMode(param2->unk_00[v2], GX_OAM_MODE_XLU); - sub_0200D3F4(param2->unk_00[v2], 1); + SpriteActor_EnableObject(param2->unk_00[v2], 1); param2->unk_08[v2] = LCRNG_Next() % 0x1000 + 0x1000; param2->unk_10[v2] = LCRNG_Next() % 0x400 + 0x400; @@ -2415,7 +2415,7 @@ static void ov117_02266440 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_0 if (param2->unk_19 > 8) { for (v0 = 0; v0 < 2; v0++) { - sub_0200D3F4(param2->unk_00[v0], 0); + SpriteActor_EnableObject(param2->unk_00[v0], 0); } param2->unk_18 = 0; diff --git a/src/overlay119/ov119_021D191C.c b/src/overlay119/ov119_021D191C.c index d9d461202f..877f360ec4 100644 --- a/src/overlay119/ov119_021D191C.c +++ b/src/overlay119/ov119_021D191C.c @@ -251,7 +251,7 @@ static BOOL ov119_021D1BD0 (UnkStruct_ov119_021D0FD0 * param0) ov119_021D1514(param0); ov119_021D161C(param0); - sub_0200D3F4(param0->unk_74, 0); + SpriteActor_EnableObject(param0->unk_74, 0); ov119_021D1858(param0); ov119_021D190C(param0, 1); @@ -558,7 +558,7 @@ static BOOL ov119_021D1FAC (UnkStruct_ov119_021D0FD0 * param0) } if (v0 == 2) { - sub_0200D3F4(param0->unk_74, 0); + SpriteActor_EnableObject(param0->unk_74, 0); param0->unk_64 = 0; param0->unk_68++; } @@ -611,9 +611,9 @@ static BOOL ov119_021D1FAC (UnkStruct_ov119_021D0FD0 * param0) GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG1, 1); ov119_021D190C(param0, 0); - sub_0200D3F4(param0->unk_74, 0); - sub_0200D3F4(param0->unk_78, 0); - sub_0200D3F4(param0->unk_7C, 0); + SpriteActor_EnableObject(param0->unk_74, 0); + SpriteActor_EnableObject(param0->unk_78, 0); + SpriteActor_EnableObject(param0->unk_7C, 0); param0->unk_68++; } @@ -720,9 +720,9 @@ static BOOL ov119_021D21BC (UnkStruct_ov119_021D0FD0 * param0) ov119_021D190C(param0, 0); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG1, 1); - sub_0200D3F4(param0->unk_74, 0); - sub_0200D3F4(param0->unk_78, 0); - sub_0200D3F4(param0->unk_7C, 0); + SpriteActor_EnableObject(param0->unk_74, 0); + SpriteActor_EnableObject(param0->unk_78, 0); + SpriteActor_EnableObject(param0->unk_7C, 0); param0->unk_68++; } diff --git a/src/unk_0200C6E4.c b/src/unk_0200C6E4.c index 3619ec97df..5da37485a9 100644 --- a/src/unk_0200C6E4.c +++ b/src/unk_0200C6E4.c @@ -883,7 +883,7 @@ void SpriteActor_DrawSprite (GraphicElementData * param0, int param1) sub_02021CAC(param0, param1); } -void sub_0200D3F4 (CellActorData * param0, int param1) +void SpriteActor_EnableObject (CellActorData * param0, int param1) { SpriteActor_DrawSprite(param0->unk_00, param1); } diff --git a/src/unk_0206A780.c b/src/unk_0206A780.c index 229c7fd648..6521002d9c 100644 --- a/src/unk_0206A780.c +++ b/src/unk_0206A780.c @@ -109,5 +109,5 @@ void sub_0206A8C4 (UnkStruct_0206A844 * param0, u16 param1, BOOL param2) return; } - sub_0200D3F4(param0->unk_1C8[param1], param2); + SpriteActor_EnableObject(param0->unk_1C8[param1], param2); } diff --git a/src/unk_0206F314.c b/src/unk_0206F314.c index 73130fd6e5..db05adb24d 100644 --- a/src/unk_0206F314.c +++ b/src/unk_0206F314.c @@ -671,7 +671,7 @@ static void sub_0206FCC4 (UnkStruct_0206F7F8 * param0) param0->unk_2FC[v0] = ov5_021D3584(¶m0->unk_134, &v2[v0]); } - sub_0200D3F4(param0->unk_2FC[1], 0); + SpriteActor_EnableObject(param0->unk_2FC[1], 0); } static void sub_0206FD94 (UnkStruct_0206F7F8 * param0) @@ -718,7 +718,7 @@ static void sub_0206FDC0 (UnkStruct_0206F7F8 * param0, u16 param1, u16 param2) sub_0200E060(¶m0->unk_E4, 1, (1024 - (18 + 12)), 10); BGL_FillWindow(¶m0->unk_E4, (((15 << 4) | 15))); sub_0201D78C(¶m0->unk_E4, 1, param0->unk_2C.unk_10, 0, 0, 0, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | (((15 & 0xff) << 0)))), NULL); - sub_0200D3F4(param0->unk_2FC[0], 1); + SpriteActor_EnableObject(param0->unk_2FC[0], 1); sub_0201C3C0(param0->unk_D0, 3); } @@ -729,7 +729,7 @@ static void sub_0206FF10 (UnkStruct_0206F7F8 * param0) sub_0201ACF4(&(param0->unk_D4)); Window_Clear(&(param0->unk_D4), 0); BGL_DeleteWindow(&(param0->unk_D4)); - sub_0200D3F4(param0->unk_2FC[0], 0); + SpriteActor_EnableObject(param0->unk_2FC[0], 0); sub_0201C3C0(param0->unk_D0, 3); } @@ -758,14 +758,14 @@ static void sub_0206FFE4 (UnkStruct_0206F7F8 * param0) { sub_0206FFB4(param0); SpriteActor_SetSpritePositionXY(param0->unk_2FC[0], 126, 16 + param0->unk_28 * 16); - sub_0200D3F4(param0->unk_2FC[0], 1); + SpriteActor_EnableObject(param0->unk_2FC[0], 1); } static void sub_02070010 (UnkStruct_0206F7F8 * param0) { BGL_FillWindow(¶m0->unk_E4, (((15 << 4) | 15))); sub_0201D78C(¶m0->unk_E4, 1, param0->unk_2C.unk_50[param0->unk_1F], 0, 0, 0, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | (((15 & 0xff) << 0)))), NULL); - sub_0200D3F4(param0->unk_2FC[0], 0); + SpriteActor_EnableObject(param0->unk_2FC[0], 0); } static void sub_02070050 (UnkStruct_0206F7F8 * param0, BOOL param1) @@ -835,7 +835,7 @@ static void sub_020701DC (UnkStruct_0206F7F8 * param0, u16 param1) BGL_AddWindow(param0->unk_D0, ¶m0->unk_D4, 1, 4, 1, 24, 12, 13, 1); Window_Show(¶m0->unk_D4, 1, (1024 - (18 + 12) - 9), 11); sub_02070050(param0, 0); - sub_0200D3F4(param0->unk_2FC[1], 1); + SpriteActor_EnableObject(param0->unk_2FC[1], 1); BGL_AddWindow(param0->unk_D0, ¶m0->unk_F4, 3, 8, 14, 8, 2, 13, (((((1024 - (18 + 12) - 9) - 27 * 4) - 6 * 4)) - (8 * 2))); BGL_FillWindow(¶m0->unk_F4, (((0 << 4) | 0))); sub_0201D78C(¶m0->unk_F4, 0, param0->unk_2C.unk_14, 0, 0, 0, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | (((0 & 0xff) << 0)))), NULL); @@ -849,8 +849,8 @@ static void sub_02070288 (UnkStruct_0206F7F8 * param0) BGL_DeleteWindow(¶m0->unk_D4); sub_0201ACF4(¶m0->unk_F4); BGL_DeleteWindow(¶m0->unk_F4); - sub_0200D3F4(param0->unk_2FC[0], 0); - sub_0200D3F4(param0->unk_2FC[1], 0); + SpriteActor_EnableObject(param0->unk_2FC[0], 0); + SpriteActor_EnableObject(param0->unk_2FC[1], 0); } static BOOL sub_020702D0 (UnkStruct_020508D4 * param0) diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index 5a54051400..d580bb49b6 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -409,9 +409,9 @@ void sub_0208A9BC (UnkStruct_02089688 * param0) void sub_0208AAB4 (UnkStruct_02089688 * param0, int param1, BOOL param2) { if (param2 == 1) { - sub_0200D3F4(param0->unk_1F0[param1].unk_0C, 1); + SpriteActor_EnableObject(param0->unk_1F0[param1].unk_0C, 1); } else { - sub_0200D3F4(param0->unk_1F0[param1].unk_0C, 0); + SpriteActor_EnableObject(param0->unk_1F0[param1].unk_0C, 0); } } diff --git a/src/unk_0208B284.c b/src/unk_0208B284.c index 6f6acd1e23..25225cddec 100644 --- a/src/unk_0208B284.c +++ b/src/unk_0208B284.c @@ -385,7 +385,7 @@ BOOL sub_0208B9E0 (UnkStruct_0208B878 * param0, BOOL param1) int v0; for (v0 = 0; v0 < param0->unk_10.unk_00; v0++) { - sub_0200D3F4(param0->unk_24[v0].unk_00, param1); + SpriteActor_EnableObject(param0->unk_24[v0].unk_00, param1); } } From 0c75103c939135ebb8b88a9843d71ede6ddba308 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 18:47:47 -0800 Subject: [PATCH 06/16] BattlerData::unk_28 -> healthbar --- include/overlay016/struct_ov16_0225BFFC_t.h | 2 +- src/overlay016/battle_display.c | 34 ++++++++++----------- src/overlay016/battle_io_command.c | 6 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/overlay016/struct_ov16_0225BFFC_t.h b/include/overlay016/struct_ov16_0225BFFC_t.h index f662bdaf1d..1e6ae6551d 100644 --- a/include/overlay016/struct_ov16_0225BFFC_t.h +++ b/include/overlay016/struct_ov16_0225BFFC_t.h @@ -20,7 +20,7 @@ struct BattlerData { Sprite * unk_1C; Sprite * unk_20; Window * unk_24; - Healthbar unk_28; + Healthbar healthbar; UnkStruct_ov16_0226C378 unk_7B; BallRotation * unk_84; UnkStruct_ov12_02223764 * unk_88; diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index fc46ddd38a..e621b8779a 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -622,7 +622,7 @@ void ov16_0225D414 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battlerData, HealthbarData *healthbarData) { - Healthbar *healthbar = &battlerData->unk_28; + Healthbar *healthbar = &battlerData->healthbar; MI_CpuClearFast(&healthbar->unk_00, sizeof(u8)); healthbar->unk_0C = battleSys; @@ -650,7 +650,7 @@ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battle void BattleDisplay_SlideHealthbarOut(BattleSystem *battleSys, BattlerData *battlerData) { - Healthbar * healthbar = &battlerData->unk_28; + Healthbar * healthbar = &battlerData->healthbar; MI_CpuClearFast(&healthbar->unk_00, sizeof(u8)); healthbar->unk_0C = battleSys; @@ -676,7 +676,7 @@ void ov16_0225D5B8 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_08 = param2->unk_00; v0->unk_09 = param1->battler; v0->unk_34 = param1->battlerType; - v0->unk_04 = ¶m1->unk_28; + v0->unk_04 = ¶m1->healthbar; v0->unk_23 = param2->unk_01; v0->unk_36 = param2->unk_24; v0->unk_38 = param2->unk_26; @@ -722,7 +722,7 @@ void ov16_0225D698 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_1C = param1->data[0]; v0->unk_1D = param1->battler; v0->unk_1E = param1->battlerType; - v0->unk_04 = ¶m1->unk_28; + v0->unk_04 = ¶m1->healthbar; v0->unk_1F = param2->unk_01; for (v1 = 0; v1 < 4; v1++) { @@ -751,7 +751,7 @@ void ov16_0225D708 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_0D = param1->battler; v0->unk_0E = param1->battlerType; v0->unk_30 = param2->unk_02; - v0->unk_04 = ¶m1->unk_28; + v0->unk_04 = ¶m1->healthbar; v0->unk_32 = param2->unk_01; ov16_0223F87C(param0, &v4[0]); @@ -836,7 +836,7 @@ void ov16_0225D8AC (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_00 = param0; v0->unk_0C = param2->unk_00; v0->unk_0D = param1->battler; - v0->unk_04 = ¶m1->unk_28; + v0->unk_04 = ¶m1->healthbar; v0->unk_10 = param2->unk_02; v0->unk_0F = param2->unk_01; v0->unk_18 = param2->unk_04; @@ -933,9 +933,9 @@ void ov16_0225DA74 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ { Healthbar * v0; - GF_ASSERT(param1->unk_28.unk_04 != NULL); + GF_ASSERT(param1->healthbar.unk_04 != NULL); - v0 = ¶m1->unk_28; + v0 = ¶m1->healthbar; MI_CpuClear8(&v0->unk_00, sizeof(u8)); v0->unk_0C = param0; @@ -959,9 +959,9 @@ void ov16_0225DB00 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov { Healthbar * v0; - GF_ASSERT(param1->unk_28.unk_04 != NULL); + GF_ASSERT(param1->healthbar.unk_04 != NULL); - v0 = ¶m1->unk_28; + v0 = ¶m1->healthbar; MI_CpuClear8(&v0->unk_00, sizeof(u8)); @@ -1073,11 +1073,11 @@ void ov16_0225DCB0 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ void ov16_0225DD44 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C3D0 * param2) { - GF_ASSERT(param1->unk_28.unk_04 != NULL); + GF_ASSERT(param1->healthbar.unk_04 != NULL); - param1->unk_28.unk_4A = param2->unk_01; + param1->healthbar.unk_4A = param2->unk_01; - Healthbar_Draw(¶m1->unk_28, param1->unk_28.unk_28, (1 << 8)); + Healthbar_Draw(¶m1->healthbar, param1->healthbar.unk_28, (1 << 8)); ClearCommand(param0, param1->battler, param2->unk_00); } @@ -1183,7 +1183,7 @@ void ov16_0225DF34 (BattleSystem * param0, BattlerData * param1) v0->unk_08 = param1->data[0]; v0->unk_09 = param1->battler; v0->unk_0A = 0; - v0->unk_04 = ¶m1->unk_28; + v0->unk_04 = ¶m1->healthbar; SysTask_Start(ov16_02262F30, v0, 0); } @@ -1220,7 +1220,7 @@ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ { Healthbar * v0; - v0 = ¶m1->unk_28; + v0 = ¶m1->healthbar; MI_CpuClearFast(&v0->unk_00, sizeof(u8)); @@ -3047,7 +3047,7 @@ static void ov16_022604C8 (SysTask * param0, void * param1) for (v15 = 0; v15 < BattleSystem_MaxBattlers(v0->unk_00); v15++) { v14 = BattleSystem_BattlerData(v0->unk_00, v15); - ov16_0226737C(&v14->unk_28); + ov16_0226737C(&v14->healthbar); } } @@ -5726,7 +5726,7 @@ Sprite * ov16_02263AFC (BattlerData * param0) Healthbar * ov16_02263B08 (BattlerData * param0) { - return ¶m0->unk_28; + return ¶m0->healthbar; } UnkStruct_ov16_0226C378 * ov16_02263B0C (BattlerData * param0) diff --git a/src/overlay016/battle_io_command.c b/src/overlay016/battle_io_command.c index 8892b0486e..46e351fdae 100644 --- a/src/overlay016/battle_io_command.c +++ b/src/overlay016/battle_io_command.c @@ -286,7 +286,7 @@ void ov16_0225C0DC (BattleSystem * param0, BattlerData * param1) void ov16_0225C104 (BattleSystem * param0, BattlerData * param1, int param2) { if (param2 != 2) { - ov16_02267360(¶m1->unk_28); + ov16_02267360(¶m1->healthbar); } if (param1->unk_18) { @@ -678,7 +678,7 @@ static void ov16_0225C558 (BattleSystem * param0, BattlerData * param1) static void ov16_0225C5B0 (BattleSystem * param0, BattlerData * param1) { - ov16_022675AC(¶m1->unk_28); + ov16_022675AC(¶m1->healthbar); ov16_022647D8(param1); ClearCommand(param0, param1->battler, param1->data[0]); ZeroDataBuffer(param1); @@ -797,7 +797,7 @@ static void ov16_0225C79C (BattleSystem * param0, BattlerData * param1) ov16_0226846C(v2); } - ov16_022675AC(¶m1->unk_28); + ov16_022675AC(¶m1->healthbar); ov16_02269218(v0); ov16_022647D8(param1); } From 9961ee355a9b8d9ec6a6bc8d41a33d5e11f9e430 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 19:02:26 -0800 Subject: [PATCH 07/16] Label Healthbar member fields used by Healthbar_Enable --- include/overlay016/struct_ov16_022674C4.h | 8 +- src/overlay016/battle_display.c | 66 +++++------ src/overlay016/healthbar.c | 138 +++++++++++----------- src/overlay016/ov16_0223DF00.c | 2 +- 4 files changed, 107 insertions(+), 107 deletions(-) diff --git a/include/overlay016/struct_ov16_022674C4.h b/include/overlay016/struct_ov16_022674C4.h index fba48c6d54..b21fc5c3ff 100644 --- a/include/overlay016/struct_ov16_022674C4.h +++ b/include/overlay016/struct_ov16_022674C4.h @@ -7,10 +7,10 @@ #include "struct_decls/battle_system.h" typedef struct { - u8 unk_00; - CellActorData * unk_04; - CellActorData * unk_08; - BattleSystem * unk_0C; + u8 state; + CellActorData *mainActor; + CellActorData *arrowActor; + BattleSystem *battleSys; SysTask * unk_10; Window unk_14; u8 unk_24; diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index e621b8779a..9a561777f5 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -623,9 +623,9 @@ void ov16_0225D414 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battlerData, HealthbarData *healthbarData) { Healthbar *healthbar = &battlerData->healthbar; - MI_CpuClearFast(&healthbar->unk_00, sizeof(u8)); + MI_CpuClearFast(&healthbar->state, sizeof(u8)); - healthbar->unk_0C = battleSys; + healthbar->battleSys = battleSys; healthbar->unk_24 = battlerData->battler; healthbar->unk_25 = Healthbar_Type(battlerData->battlerType, BattleSystem_BattleType(battleSys)); healthbar->unk_4C = healthbarData->command; @@ -651,9 +651,9 @@ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battle void BattleDisplay_SlideHealthbarOut(BattleSystem *battleSys, BattlerData *battlerData) { Healthbar * healthbar = &battlerData->healthbar; - MI_CpuClearFast(&healthbar->unk_00, sizeof(u8)); + MI_CpuClearFast(&healthbar->state, sizeof(u8)); - healthbar->unk_0C = battleSys; + healthbar->battleSys = battleSys; healthbar->unk_24 = battlerData->battler; healthbar->unk_4C = battlerData->data[0]; @@ -933,12 +933,12 @@ void ov16_0225DA74 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ { Healthbar * v0; - GF_ASSERT(param1->healthbar.unk_04 != NULL); + GF_ASSERT(param1->healthbar.mainActor != NULL); v0 = ¶m1->healthbar; - MI_CpuClear8(&v0->unk_00, sizeof(u8)); + MI_CpuClear8(&v0->state, sizeof(u8)); - v0->unk_0C = param0; + v0->battleSys = param0; v0->unk_4C = param2->unk_00; v0->unk_24 = param1->battler; v0->unk_25 = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); @@ -959,13 +959,13 @@ void ov16_0225DB00 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov { Healthbar * v0; - GF_ASSERT(param1->healthbar.unk_04 != NULL); + GF_ASSERT(param1->healthbar.mainActor != NULL); v0 = ¶m1->healthbar; - MI_CpuClear8(&v0->unk_00, sizeof(u8)); + MI_CpuClear8(&v0->state, sizeof(u8)); - v0->unk_0C = param0; + v0->battleSys = param0; v0->unk_4C = param2->unk_00; v0->unk_24 = param1->battler; v0->unk_38 = param2->unk_04; @@ -976,7 +976,7 @@ void ov16_0225DB00 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov v0->unk_10 = SysTask_Start(ov16_022629DC, v0, 1000); return; } else { - ClearCommand(v0->unk_0C, v0->unk_24, v0->unk_4C); + ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); } } @@ -1073,7 +1073,7 @@ void ov16_0225DCB0 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ void ov16_0225DD44 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C3D0 * param2) { - GF_ASSERT(param1->healthbar.unk_04 != NULL); + GF_ASSERT(param1->healthbar.mainActor != NULL); param1->healthbar.unk_4A = param2->unk_01; @@ -1222,9 +1222,9 @@ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0 = ¶m1->healthbar; - MI_CpuClearFast(&v0->unk_00, sizeof(u8)); + MI_CpuClearFast(&v0->state, sizeof(u8)); - v0->unk_0C = param0; + v0->battleSys = param0; v0->unk_24 = param1->battler; v0->unk_25 = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); v0->unk_4C = param2->unk_00; @@ -1241,7 +1241,7 @@ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_27 = param2->unk_10; Healthbar_Draw(v0, v0->unk_28, 0xffffffff ^ (1 << 5)); - ClearCommand(v0->unk_0C, v0->unk_24, v0->unk_4C); + ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); } void ov16_0225E0BC (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C65C * param2) @@ -2825,7 +2825,7 @@ static void SlideHealthbarInTask(SysTask *task, void *data) { Healthbar *healthbar = data; - switch (healthbar->unk_00) { + switch (healthbar->state) { case SLIDE_HEALTHBAR_IN_STATE_ENABLE: if (healthbar->unk_4D > 0) { healthbar->unk_4D--; @@ -2834,17 +2834,17 @@ static void SlideHealthbarInTask(SysTask *task, void *data) Healthbar_SetScrollEffect(healthbar, 0); Healthbar_Enable(healthbar, TRUE); - healthbar->unk_00++; + healthbar->state++; break; case SLIDE_HEALTHBAR_IN_STATE_WAIT: if (healthbar->unk_4F_1 == 1) { - healthbar->unk_00++; + healthbar->state++; } break; default: - ClearCommand(healthbar->unk_0C, healthbar->unk_24, healthbar->unk_4C); + ClearCommand(healthbar->battleSys, healthbar->unk_24, healthbar->unk_4C); healthbar->unk_10 = NULL; SysTask_Done(task); break; @@ -2866,15 +2866,15 @@ static void SlideHealthbarOutTask(SysTask *task, void *data) { Healthbar *healthbar = data; - switch (healthbar->unk_00) { + switch (healthbar->state) { case SLIDE_HEALTHBAR_OUT_STATE_WAIT: if (healthbar->unk_4F_1 == TRUE) { - healthbar->unk_00++; + healthbar->state++; } break; default: - ClearCommand(healthbar->unk_0C, healthbar->unk_24, healthbar->unk_4C); + ClearCommand(healthbar->battleSys, healthbar->unk_24, healthbar->unk_4C); healthbar->unk_10 = NULL; SysTask_Done(task); Healthbar_Enable(healthbar, FALSE); @@ -3965,7 +3965,7 @@ static void ov16_022611DC (SysTask * param0, void * param1) v21 = v0->unk_08->unk_04->unk_2C[v0->unk_08->unk_04->unk_11]; v18 = ov16_0223F35C(v0->unk_00, v20); - MI_CpuClear8(&v18->unk_00, sizeof(u8)); + MI_CpuClear8(&v18->state, sizeof(u8)); v18->unk_25 = Healthbar_Type(BattleSystem_BattlerSlot(v0->unk_00, v20), BattleSystem_BattleType(v0->unk_00)); v19 = BattleSystem_PartyPokemon(v0->unk_00, v20, v21); @@ -4758,19 +4758,19 @@ static void ov16_02262988 (SysTask * param0, void * param1) Healthbar * v0 = param1; int v1; - switch (v0->unk_00) { + switch (v0->state) { case 0: ov16_022674C4(v0, v0->unk_30); - v0->unk_00++; + v0->state++; case 1: v1 = ov16_022674F8(v0); if (v1 == -1) { - v0->unk_00++; + v0->state++; } break; default: - ClearCommand(v0->unk_0C, v0->unk_24, v0->unk_4C); + ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); v0->unk_10 = NULL; SysTask_Done(param0); return; @@ -4782,12 +4782,12 @@ static void ov16_022629DC (SysTask * param0, void * param1) Healthbar * v0 = param1; int v1; - switch (v0->unk_00) { + switch (v0->state) { case 0: v0->unk_4E = 0; Sound_PlayEffect(1803); ov16_0226752C(v0, v0->unk_40); - v0->unk_00++; + v0->state++; case 1: if (v0->unk_4E < 8) { v0->unk_4E++; @@ -4798,9 +4798,9 @@ static void ov16_022629DC (SysTask * param0, void * param1) if (v1 == -1) { if (v0->unk_4E >= 8) { sub_020057A4(1803, 0); - v0->unk_00 = 100; + v0->state = 100; } else { - v0->unk_00++; + v0->state++; } } break; @@ -4809,11 +4809,11 @@ static void ov16_022629DC (SysTask * param0, void * param1) if (v0->unk_4E >= 8) { sub_020057A4(1803, 0); - v0->unk_00 = 100; + v0->state = 100; } break; default: - ClearCommand(v0->unk_0C, v0->unk_24, v0->unk_4C); + ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); v0->unk_10 = NULL; SysTask_Done(param0); break; diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index 1c162f3fc5..b78bbb52b4 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -457,7 +457,7 @@ void Healthbar_Draw (Healthbar * param0, u32 param1, u32 param2) int v0 = 0; u32 v1; - GF_ASSERT(param0->unk_04 != NULL); + GF_ASSERT(param0->mainActor != NULL); v1 = param2; @@ -494,7 +494,7 @@ void Healthbar_Draw (Healthbar * param0, u32 param1, u32 param2) break; } - if (BattleSystem_BattleType(param0->unk_0C) & 0x1) { + if (BattleSystem_BattleType(param0->battleSys) & 0x1) { param2 &= 0xffffffff ^ ((1 << 9)); } @@ -572,22 +572,22 @@ void ov16_02267220 (Healthbar * param0) param0->unk_50 = NULL; } - if (param0->unk_04 == NULL) { + if (param0->mainActor == NULL) { return; } - sub_0200D0F4(param0->unk_04); - param0->unk_04 = NULL; + sub_0200D0F4(param0->mainActor); + param0->mainActor = NULL; } static void ov16_02267244 (Healthbar * param0) { - if (param0->unk_08 == NULL) { + if (param0->arrowActor == NULL) { return; } - sub_0200D0F4(param0->unk_08); - param0->unk_08 = NULL; + sub_0200D0F4(param0->arrowActor); + param0->arrowActor = NULL; } void ov16_02267258 (Healthbar * param0) @@ -597,8 +597,8 @@ void ov16_02267258 (Healthbar * param0) const SpriteTemplate * v2; v2 = ov16_022682B0(param0->unk_25); - v0 = ov16_0223E010(param0->unk_0C); - v1 = ov16_0223E018(param0->unk_0C); + v0 = ov16_0223E010(param0->battleSys); + v1 = ov16_0223E018(param0->battleSys); SpriteGfxHandler_UnloadCharObjById(v1, v2->resources[0]); SpriteGfxHandler_UnloadCellObjById(v1, v2->resources[2]); @@ -617,8 +617,8 @@ static void ov16_0226728C (Healthbar * param0) return; } - v0 = ov16_0223E010(param0->unk_0C); - v1 = ov16_0223E018(param0->unk_0C); + v0 = ov16_0223E010(param0->battleSys); + v1 = ov16_0223E018(param0->battleSys); SpriteGfxHandler_UnloadCharObjById(v1, v2->resources[0]); SpriteGfxHandler_UnloadCellObjById(v1, v2->resources[2]); @@ -634,18 +634,18 @@ void ov16_022672C4 (Healthbar * param0) NARC * v4; v4 = NARC_ctor(NARC_INDEX_BATTLE__GRAPHIC__PL_BATT_OBJ, 5); - v1 = ov16_0223E010(param0->unk_0C); - v2 = ov16_0223E018(param0->unk_0C); - v3 = BattleSystem_PaletteSys(param0->unk_0C); + v1 = ov16_0223E010(param0->battleSys); + v2 = ov16_0223E018(param0->battleSys); + v3 = BattleSystem_PaletteSys(param0->battleSys); v0 = ov16_022682B0(param0->unk_25); ov16_02266F1C(v1, v2, v4, v3, param0->unk_25); - param0->unk_04 = ov16_02267060(v1, v2, param0->unk_25); + param0->mainActor = ov16_02267060(v1, v2, param0->unk_25); ov16_02266FE4(v1, v2, v4, v3, param0->unk_25); - if (param0->unk_08 != NULL) { - sub_0200D494(param0->unk_08->unk_00, v0->x - Unk_ov16_0226F334[param0->unk_25], v0->y + 0); + if (param0->arrowActor != NULL) { + sub_0200D494(param0->arrowActor->unk_00, v0->x - Unk_ov16_0226F334[param0->unk_25], v0->y + 0); } NARC_dtor(v4); @@ -676,7 +676,7 @@ void ov16_0226737C (Healthbar * param0) param0->unk_4F_3 ^= 1; v2 = G2_GetOBJCharPtr(); - v1 = sub_02021F98(param0->unk_04->unk_00); + v1 = sub_02021F98(param0->mainActor->unk_00); if (param0->unk_4F_3 == 1) { v0 = ov16_02268250(70); @@ -779,21 +779,21 @@ s32 ov16_02267560 (Healthbar * param0) void ov16_0226757C (Healthbar * param0) { - if (param0->unk_08 != NULL) { - sub_02021CC8(param0->unk_08->unk_00, 1); + if (param0->arrowActor != NULL) { + sub_02021CC8(param0->arrowActor->unk_00, 1); ov16_022675F8(param0, 1); } - if ((BattleSystem_BattleType(param0->unk_0C) & (0x20 | 0x200)) == 0) { + if ((BattleSystem_BattleType(param0->battleSys) & (0x20 | 0x200)) == 0) { ov16_02268470(param0); } } void ov16_022675AC (Healthbar * param0) { - if (param0->unk_08 != NULL) { - sub_02021CC8(param0->unk_08->unk_00, 0); - SpriteActor_SetAnimFrame(param0->unk_08->unk_00, 0); + if (param0->arrowActor != NULL) { + sub_02021CC8(param0->arrowActor->unk_00, 0); + SpriteActor_SetAnimFrame(param0->arrowActor->unk_00, 0); ov16_022675F8(param0, 0); } @@ -802,35 +802,35 @@ void ov16_022675AC (Healthbar * param0) void ov16_022675D8 (Healthbar * param0, int param1) { - if (param0->unk_04 == NULL) { + if (param0->mainActor == NULL) { return; } - sub_0200D460(param0->unk_04, param1); + sub_0200D460(param0->mainActor, param1); - if (param0->unk_08 != NULL) { - sub_0200D460(param0->unk_08, param1); + if (param0->arrowActor != NULL) { + sub_0200D460(param0->arrowActor, param1); } } static void ov16_022675F8 (Healthbar * param0, int param1) { - if (param0->unk_08 != NULL) { - if ((BattleSystem_BattleType(param0->unk_0C) & (0x20 | 0x200)) && (param1 == 1)) { + if (param0->arrowActor != NULL) { + if ((BattleSystem_BattleType(param0->battleSys) & (0x20 | 0x200)) && (param1 == 1)) { (void)0; } else { - SpriteActor_EnableObject(param0->unk_08, param1); + SpriteActor_EnableObject(param0->arrowActor, param1); } } } void Healthbar_Enable (Healthbar * param0, int param1) { - if (param0->unk_04 == NULL) { + if (param0->mainActor == NULL) { return; } - SpriteActor_EnableObject(param0->unk_04, param1); + SpriteActor_EnableObject(param0->mainActor, param1); ov16_022675F8(param0, param1); } @@ -838,20 +838,20 @@ void ov16_0226763C (Healthbar * param0, int param1, int param2) { const SpriteTemplate * v0; - GF_ASSERT(param0->unk_04 != NULL); + GF_ASSERT(param0->mainActor != NULL); v0 = ov16_022682B0(param0->unk_25); - sub_0200D494(param0->unk_04->unk_00, v0->x + param1, v0->y + param2); + sub_0200D494(param0->mainActor->unk_00, v0->x + param1, v0->y + param2); - if (param0->unk_08 != NULL) { - sub_0200D494(param0->unk_08->unk_00, v0->x + param1 - Unk_ov16_0226F334[param0->unk_25], v0->y + param2 + 0); + if (param0->arrowActor != NULL) { + sub_0200D494(param0->arrowActor->unk_00, v0->x + param1 - Unk_ov16_0226F334[param0->unk_25], v0->y + param2 + 0); } } void Healthbar_SetScrollEffect (Healthbar * param0, int param1) { GF_ASSERT(param0 != NULL); - GF_ASSERT(param0->unk_04 != NULL); + GF_ASSERT(param0->mainActor != NULL); param0->unk_4F_1 = 0; param0->unk_4F_0 = param1; @@ -886,7 +886,7 @@ static void ov16_0226774C (SysTask * param0, void * param1) v4 = 0; v3 = ov16_022682B0(v0->unk_25); - SpriteActor_GetSpritePositionXY(v0->unk_04, &v1, &v2); + SpriteActor_GetSpritePositionXY(v0->mainActor, &v1, &v2); switch (v0->unk_25) { case 0: @@ -929,10 +929,10 @@ static void ov16_0226774C (SysTask * param0, void * param1) break; } - SpriteActor_SetSpritePositionXY(v0->unk_04, v1, v2); + SpriteActor_SetSpritePositionXY(v0->mainActor, v1, v2); - if (v0->unk_08 != NULL) { - SpriteActor_SetSpritePositionXY(v0->unk_08, v1 - Unk_ov16_0226F334[v0->unk_25], v2 + 0); + if (v0->arrowActor != NULL) { + SpriteActor_SetSpritePositionXY(v0->arrowActor, v1 - Unk_ov16_0226F334[v0->unk_25], v2 + 0); } if (v4 > 0) { @@ -954,12 +954,12 @@ static void ov16_02267864 (Healthbar * param0) BoxPokemon * v8; UnkStruct_0200B358 * v9; - v0 = BattleSystem_BGL(param0->unk_0C); - v4 = BattleSystem_MessageLoader(param0->unk_0C); - v9 = ov16_0223E0D0(param0->unk_0C); + v0 = BattleSystem_BGL(param0->battleSys); + v4 = BattleSystem_MessageLoader(param0->battleSys); + v9 = ov16_0223E0D0(param0->battleSys); v5 = Strbuf_Init((12 + (5 * 2)), 5); v6 = MessageLoader_GetNewStrbuf(v4, 964); - v7 = BattleSystem_PartyPokemon(param0->unk_0C, param0->unk_24, param0->unk_26); + v7 = BattleSystem_PartyPokemon(param0->battleSys, param0->unk_24, param0->unk_26); v8 = Pokemon_GetBoxPokemon(v7); sub_0200B5CC(v9, 0, v8); @@ -974,7 +974,7 @@ static void ov16_02267864 (Healthbar * param0) u8 * v11, * v12; v10 = G2_GetOBJCharPtr(); - v2 = sub_02021F98(param0->unk_04->unk_00); + v2 = sub_02021F98(param0->mainActor->unk_00); v11 = v1; v12 = &v1[8 * 0x20]; @@ -1015,7 +1015,7 @@ static void ov16_022679C8 (Healthbar * param0) void * v5; v5 = G2_GetOBJCharPtr(); - v0 = sub_02021F98(param0->unk_04->unk_00); + v0 = sub_02021F98(param0->mainActor->unk_00); MI_CpuCopy16(v2, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->unk_25][0].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->unk_25][0].unk_02); MI_CpuCopy16(v1, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->unk_25][1].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->unk_25][1].unk_02); @@ -1033,14 +1033,14 @@ static void ov16_02267A4C (Healthbar * param0) v1 = Heap_AllocFromHeap(5, v3 * 2); MI_CpuFill8(v0, 0xf | (0xf << 4), v3); - sub_0200C67C(ov16_0223E054(param0->unk_0C), param0->unk_48, 3, 0, v0); + sub_0200C67C(ov16_0223E054(param0->battleSys), param0->unk_48, 3, 0, v0); { void * v7; u8 * v8, * v9; v7 = G2_GetOBJCharPtr(); - v2 = sub_02021F98(param0->unk_04->unk_00); + v2 = sub_02021F98(param0->mainActor->unk_00); MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->unk_25][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), v1, Unk_ov16_0226F3EC[param0->unk_25][0].unk_02); MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->unk_25][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), &v1[v3], Unk_ov16_0226F3EC[param0->unk_25][1].unk_02); @@ -1076,14 +1076,14 @@ static void ov16_02267B6C (Healthbar * param0, u32 param1) v0 = Heap_AllocFromHeap(5, 3 * 0x20); MI_CpuFill8(v0, 0xf | (0xf << 4), 3 * 0x20); - sub_0200C67C(ov16_0223E04C(param0->unk_0C), param1, 3, 1, v0); + sub_0200C67C(ov16_0223E04C(param0->battleSys), param1, 3, 1, v0); { void * v2; u8 * v3; v2 = G2_GetOBJCharPtr(); - v1 = sub_02021F98(param0->unk_04->unk_00); + v1 = sub_02021F98(param0->mainActor->unk_00); v3 = v0; MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F41C[param0->unk_25][0].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->unk_25][0].unk_02); @@ -1101,14 +1101,14 @@ static void ov16_02267BF8 (Healthbar * param0) v0 = Heap_AllocFromHeap(5, 3 * 0x20); MI_CpuFill8(v0, 0xf | (0xf << 4), 3 * 0x20); - sub_0200C67C(ov16_0223E04C(param0->unk_0C), param0->unk_2C, 3, 0, v0); + sub_0200C67C(ov16_0223E04C(param0->battleSys), param0->unk_2C, 3, 0, v0); { void * v2; u8 * v3; v2 = G2_GetOBJCharPtr(); - v1 = sub_02021F98(param0->unk_04->unk_00); + v1 = sub_02021F98(param0->mainActor->unk_00); v3 = v0; MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F3BC[param0->unk_25].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3BC[param0->unk_25].unk_02); @@ -1132,7 +1132,7 @@ static void ov16_02267C58 (Healthbar * param0) void * v2; v2 = G2_GetOBJCharPtr(); - v0 = sub_02021F98(param0->unk_04->unk_00); + v0 = sub_02021F98(param0->mainActor->unk_00); MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F38C[param0->unk_25].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F38C[param0->unk_25].unk_02); } @@ -1149,7 +1149,7 @@ static void ov16_02267CA8 (Healthbar * param0, int param1) void * v2; v2 = G2_GetOBJCharPtr(); - v0 = sub_02021F98(param0->unk_04->unk_00); + v0 = sub_02021F98(param0->mainActor->unk_00); MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F35C[param0->unk_25].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F35C[param0->unk_25].unk_02); } @@ -1164,8 +1164,8 @@ static void ov16_02267CE8 (Healthbar * param0, u32 param1) MessageLoader * v4; Strbuf* v5; - v0 = BattleSystem_BGL(param0->unk_0C); - v4 = BattleSystem_MessageLoader(param0->unk_0C); + v0 = BattleSystem_BGL(param0->battleSys); + v4 = BattleSystem_MessageLoader(param0->battleSys); if (param1 & (1 << 10)) { v5 = MessageLoader_GetNewStrbuf(v4, 950); @@ -1183,7 +1183,7 @@ static void ov16_02267CE8 (Healthbar * param0, u32 param1) u8 * v7, * v8; v6 = G2_GetOBJCharPtr(); - v2 = sub_02021F98(param0->unk_04->unk_00); + v2 = sub_02021F98(param0->mainActor->unk_00); v7 = v1; v8 = &v1[13 * 0x20]; @@ -1208,9 +1208,9 @@ static void ov16_02267DC4 (Healthbar * param0, u32 param1) Strbuf* v5, * v6; UnkStruct_0200B358 * v7; - v0 = BattleSystem_BGL(param0->unk_0C); - v4 = BattleSystem_MessageLoader(param0->unk_0C); - v7 = ov16_0223E0D0(param0->unk_0C); + v0 = BattleSystem_BGL(param0->battleSys); + v4 = BattleSystem_MessageLoader(param0->battleSys); + v7 = ov16_0223E0D0(param0->battleSys); v5 = Strbuf_Init(30, 5); if (param1 & (1 << 10)) { @@ -1231,7 +1231,7 @@ static void ov16_02267DC4 (Healthbar * param0, u32 param1) u8 * v9, * v10; v8 = G2_GetOBJCharPtr(); - v2 = sub_02021F98(param0->unk_04->unk_00); + v2 = sub_02021F98(param0->mainActor->unk_00); v9 = v1; v10 = &v1[13 * 0x20]; @@ -1294,7 +1294,7 @@ static void ov16_02267F70 (Healthbar * param0, u8 param1) int v9; v7 = G2_GetOBJCharPtr(); - v8 = sub_02021F98(param0->unk_04->unk_00); + v8 = sub_02021F98(param0->mainActor->unk_00); switch (param1) { case 0: @@ -1622,13 +1622,13 @@ static void ov16_02268380 (SysTask * param0, void * param1) int v2; PaletteData * v3; - v1 = ov16_0223E018(v0->unk_00->unk_0C); - v3 = BattleSystem_PaletteSys(v0->unk_00->unk_0C); + v1 = ov16_0223E018(v0->unk_00->battleSys); + v3 = BattleSystem_PaletteSys(v0->unk_00->battleSys); switch (v0->unk_08) { case 0: v2 = sub_0200D05C(v1, 20007, NNS_G2D_VRAM_TYPE_2DMAIN); - sub_0200D41C(v0->unk_00->unk_04, v2); + sub_0200D41C(v0->unk_00->mainActor, v2); v0->unk_09 = v2; v0->unk_08++; case 1: @@ -1653,7 +1653,7 @@ static void ov16_02268380 (SysTask * param0, void * param1) break; default: v2 = sub_0200D05C(v1, 20006, NNS_G2D_VRAM_TYPE_2DMAIN); - sub_0200D41C(v0->unk_00->unk_04, v2); + sub_0200D41C(v0->unk_00->mainActor, v2); (*(v0->unk_04)) = 1; diff --git a/src/overlay016/ov16_0223DF00.c b/src/overlay016/ov16_0223DF00.c index e2f5e40d86..7a645a3dd0 100644 --- a/src/overlay016/ov16_0223DF00.c +++ b/src/overlay016/ov16_0223DF00.c @@ -1372,7 +1372,7 @@ void ov16_0223F36C (BattleSystem * param0) for (v0 = 0; v0 < param0->maxBattlers; v0++) { v1 = ov16_02263B08(param0->battlers[v0]); - v1->unk_0C = param0; + v1->battleSys = param0; v1->unk_25 = Healthbar_Type(Battler_Type(param0->battlers[v0]), BattleSystem_BattleType(param0)); ov16_022672C4(v1); From 70cb3c61d416bde011e7a170d4a34eb003815cf6 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 19:07:57 -0800 Subject: [PATCH 08/16] Document Healthbar_Enable --- include/battle/healthbar.h | 9 ++++++++- src/overlay016/healthbar.c | 38 ++++++++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/include/battle/healthbar.h b/include/battle/healthbar.h index fc6b67e704..fb104db61d 100644 --- a/include/battle/healthbar.h +++ b/include/battle/healthbar.h @@ -34,7 +34,14 @@ s32 ov16_02267560(Healthbar * param0); void ov16_0226757C(Healthbar * param0); void ov16_022675AC(Healthbar * param0); void ov16_022675D8(Healthbar * param0, int param1); -void Healthbar_Enable(Healthbar * param0, int param1); + +/** + * @brief Enable (or disable) the healthbar. + * + * @param battleSys + * @param enable If TRUE, enable the healthbar; otherwise, disable it. + */ +void Healthbar_Enable(Healthbar *battleSys, BOOL enable); void ov16_0226763C(Healthbar * param0, int param1, int param2); void Healthbar_SetScrollEffect(Healthbar * param0, int param1); diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index b78bbb52b4..b60dae170c 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -77,7 +77,7 @@ static void ov16_02268380(SysTask * param0, void * param1); void ov16_02268470(Healthbar * param0); void ov16_02268498(Healthbar * param0); static void ov16_022684BC(SysTask * param0, void * param1); -static void ov16_022675F8(Healthbar * param0, int param1); +static void Healthbar_EnableArrow(Healthbar * param0, int param1); __attribute__((aligned(4))) static const s8 Unk_ov16_0226F334[] = { 0x48, @@ -781,7 +781,7 @@ void ov16_0226757C (Healthbar * param0) { if (param0->arrowActor != NULL) { sub_02021CC8(param0->arrowActor->unk_00, 1); - ov16_022675F8(param0, 1); + Healthbar_EnableArrow(param0, 1); } if ((BattleSystem_BattleType(param0->battleSys) & (0x20 | 0x200)) == 0) { @@ -794,7 +794,7 @@ void ov16_022675AC (Healthbar * param0) if (param0->arrowActor != NULL) { sub_02021CC8(param0->arrowActor->unk_00, 0); SpriteActor_SetAnimFrame(param0->arrowActor->unk_00, 0); - ov16_022675F8(param0, 0); + Healthbar_EnableArrow(param0, 0); } ov16_02268498(param0); @@ -813,25 +813,35 @@ void ov16_022675D8 (Healthbar * param0, int param1) } } -static void ov16_022675F8 (Healthbar * param0, int param1) +/** + * @brief Enable the extended arrow-graphic used by the healthbar for Pokemon battlers. + * + * @param battleSys + * @param enable + */ +static void Healthbar_EnableArrow(Healthbar *battleSys, BOOL enable) { - if (param0->arrowActor != NULL) { - if ((BattleSystem_BattleType(param0->battleSys) & (0x20 | 0x200)) && (param1 == 1)) { - (void)0; - } else { - SpriteActor_EnableObject(param0->arrowActor, param1); - } + if (battleSys->arrowActor == NULL) { + return; } + + // Safari battles don't get an arrow. + if ((BattleSystem_BattleType(battleSys->battleSys) & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_PAL_PARK)) + && enable == TRUE) { + return; + } + + SpriteActor_EnableObject(battleSys->arrowActor, enable); } -void Healthbar_Enable (Healthbar * param0, int param1) +void Healthbar_Enable(Healthbar *battleSys, BOOL enable) { - if (param0->mainActor == NULL) { + if (battleSys->mainActor == NULL) { return; } - SpriteActor_EnableObject(param0->mainActor, param1); - ov16_022675F8(param0, param1); + SpriteActor_EnableObject(battleSys->mainActor, enable); + Healthbar_EnableArrow(battleSys, enable); } void ov16_0226763C (Healthbar * param0, int param1, int param2) From 6c2d8d998f84e09b349207dc184345e26b543d25 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 19:10:05 -0800 Subject: [PATCH 09/16] sub_0200D494 -> SpriteActor_SetPositionXY --- include/unk_0200C6E4.h | 2 +- src/overlay007/ov7_0224CD28.c | 10 +++--- src/overlay016/healthbar.c | 6 ++-- src/overlay079/ov79_021D0D80.c | 4 +-- src/overlay079/ov79_021D183C.c | 2 +- src/overlay080/ov80_021D1458.c | 10 +++--- src/overlay080/ov80_021D2AF4.c | 2 +- src/overlay090/ov90_021D0D80.c | 2 +- src/unk_0200C6E4.c | 4 +-- src/unk_0207E0B8.c | 10 +++--- src/unk_02082C2C.c | 12 +++---- src/unk_02083370.c | 14 ++++---- src/unk_0208EA44.c | 64 +++++++++++++++++----------------- 13 files changed, 71 insertions(+), 71 deletions(-) diff --git a/include/unk_0200C6E4.h b/include/unk_0200C6E4.h index ae8df02515..106782a4e5 100644 --- a/include/unk_0200C6E4.h +++ b/include/unk_0200C6E4.h @@ -94,7 +94,7 @@ void sub_0200D46C(GraphicElementData * param0, int param1); void sub_0200D474(CellActorData * param0, int param1); u32 sub_0200D480(GraphicElementData * param0); u32 sub_0200D488(CellActorData * param0); -void sub_0200D494(GraphicElementData * param0, s16 param1, s16 param2); +void SpriteActor_SetPositionXY(GraphicElementData * param0, s16 param1, s16 param2); void SpriteActor_SetSpritePositionXY(CellActorData * param0, s16 param1, s16 param2); void sub_0200D4D0(GraphicElementData * param0, s16 param1, s16 param2, fx32 param3); void sub_0200D500(CellActorData * param0, s16 param1, s16 param2, fx32 param3); diff --git a/src/overlay007/ov7_0224CD28.c b/src/overlay007/ov7_0224CD28.c index dab10982d3..626eb5111e 100644 --- a/src/overlay007/ov7_0224CD28.c +++ b/src/overlay007/ov7_0224CD28.c @@ -831,7 +831,7 @@ static u8 ov7_0224DC84 (UnkStruct_ov7_0224D008 * param0) sub_020014DC(param0->unk_78, NULL, &v2); if (v1 != v2) { - sub_0200D494(param0->unk_25C[2], (176 - 4), 24 + v2 * 16); + SpriteActor_SetPositionXY(param0->unk_25C[2], (176 - 4), 24 + v2 * 16); } switch (v0) { @@ -1492,11 +1492,11 @@ static void ov7_0224EB14 (UnkStruct_ov7_0224D008 * param0) static void ov7_0224EB38 (UnkStruct_ov7_0224D008 * param0, u8 param1) { if (param1 == 0) { - sub_0200D494(param0->unk_25C[0], 177, 8); - sub_0200D494(param0->unk_25C[1], 177, 132); + SpriteActor_SetPositionXY(param0->unk_25C[0], 177, 8); + SpriteActor_SetPositionXY(param0->unk_25C[1], 177, 132); } else { - sub_0200D494(param0->unk_25C[0], 162, 108); - sub_0200D494(param0->unk_25C[1], 162, 132); + SpriteActor_SetPositionXY(param0->unk_25C[0], 162, 108); + SpriteActor_SetPositionXY(param0->unk_25C[1], 162, 132); } } diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index b60dae170c..dd1078314b 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -645,7 +645,7 @@ void ov16_022672C4 (Healthbar * param0) ov16_02266FE4(v1, v2, v4, v3, param0->unk_25); if (param0->arrowActor != NULL) { - sub_0200D494(param0->arrowActor->unk_00, v0->x - Unk_ov16_0226F334[param0->unk_25], v0->y + 0); + SpriteActor_SetPositionXY(param0->arrowActor->unk_00, v0->x - Unk_ov16_0226F334[param0->unk_25], v0->y + 0); } NARC_dtor(v4); @@ -851,10 +851,10 @@ void ov16_0226763C (Healthbar * param0, int param1, int param2) GF_ASSERT(param0->mainActor != NULL); v0 = ov16_022682B0(param0->unk_25); - sub_0200D494(param0->mainActor->unk_00, v0->x + param1, v0->y + param2); + SpriteActor_SetPositionXY(param0->mainActor->unk_00, v0->x + param1, v0->y + param2); if (param0->arrowActor != NULL) { - sub_0200D494(param0->arrowActor->unk_00, v0->x + param1 - Unk_ov16_0226F334[param0->unk_25], v0->y + param2 + 0); + SpriteActor_SetPositionXY(param0->arrowActor->unk_00, v0->x + param1 - Unk_ov16_0226F334[param0->unk_25], v0->y + param2 + 0); } } diff --git a/src/overlay079/ov79_021D0D80.c b/src/overlay079/ov79_021D0D80.c index 4f72f8c7fb..935d09633e 100644 --- a/src/overlay079/ov79_021D0D80.c +++ b/src/overlay079/ov79_021D0D80.c @@ -776,7 +776,7 @@ static void ov79_021D167C (UnkStruct_ov79_021D0E1C * param0) sub_02021CAC(param0->unk_1CC[v0], 1); SpriteActor_SetSpriteAnimActive(param0->unk_1CC[v0], v0 + 3); - sub_0200D494(param0->unk_1CC[v0], v2[v0].unk_00, v2[v0].unk_02); + SpriteActor_SetPositionXY(param0->unk_1CC[v0], v2[v0].unk_00, v2[v0].unk_02); } for (v0 = 0; v0 < 6; v0++) { @@ -798,7 +798,7 @@ static void ov79_021D167C (UnkStruct_ov79_021D0E1C * param0) sub_02021CE4(param0->unk_1E0[v0], FX32_CONST(2)); sub_02021E90(param0->unk_1E0[v0], v0 + 2); sub_02021CC8(param0->unk_1E0[v0], 0); - sub_0200D494(param0->unk_1E0[v0], v3[v0].unk_00, v3[v0].unk_02); + SpriteActor_SetPositionXY(param0->unk_1E0[v0], v3[v0].unk_00, v3[v0].unk_02); } param0->unk_1FC = sub_0209916C(param0->unk_1F8, 0, 231, 76, 0, 1, 0, 0); diff --git a/src/overlay079/ov79_021D183C.c b/src/overlay079/ov79_021D183C.c index b9fa75bf97..2d5c175e11 100644 --- a/src/overlay079/ov79_021D183C.c +++ b/src/overlay079/ov79_021D183C.c @@ -327,7 +327,7 @@ static void ov79_021D1D94 (UnkStruct_0200112C * param0, u32 param1, u8 param2) } sub_020014DC(param0, &v2, &v3); - sub_0200D494(v0->unk_1C0[0], 105, v3 * 16 + 40); + SpriteActor_SetPositionXY(v0->unk_1C0[0], 105, v3 * 16 + 40); if (v2 == 0) { sub_02021CAC(v0->unk_1C0[1], 0); diff --git a/src/overlay080/ov80_021D1458.c b/src/overlay080/ov80_021D1458.c index c3e9d3d138..fc92381307 100644 --- a/src/overlay080/ov80_021D1458.c +++ b/src/overlay080/ov80_021D1458.c @@ -627,7 +627,7 @@ static void ov80_021D1C24 (UnkStruct_ov80_021D2A08 * param0) } if (v1->unk_13-- == 3) { - sub_0200D494(v1->unk_104, v1->unk_18 * 7 + (48 - 23), v1->unk_1C * 7 + (6 - 40)); + SpriteActor_SetPositionXY(v1->unk_104, v1->unk_18 * 7 + (48 - 23), v1->unk_1C * 7 + (6 - 40)); sub_02021E2C(v1->unk_104, FX32_ONE); ov80_021D1A30(param0); @@ -919,14 +919,14 @@ static void ov80_021D2398 (UnkStruct_ov80_021D2A08 * param0) sub_02021CAC(v0->unk_100, 0); sub_02021CE4(v0->unk_100, FX32_ONE); - sub_0200D494(v0->unk_100, 128, 108); + SpriteActor_SetPositionXY(v0->unk_100, 128, 108); v0->unk_104 = sub_0200CA08(param0->unk_D8, param0->unk_DC, &Unk_ov80_021D30E8[1]); sub_02021CAC(v0->unk_104, 1); sub_02021CE4(v0->unk_104, FX32_CONST(2)); sub_02021CC8(v0->unk_104, 1); - sub_0200D494(v0->unk_104, v0->unk_18 * 7 + (48 - 23), v0->unk_1C * 7 + (6 - 40)); + SpriteActor_SetPositionXY(v0->unk_104, v0->unk_18 * 7 + (48 - 23), v0->unk_1C * 7 + (6 - 40)); if (param0->unk_2C->unk_0C == 0) { v1.unk_10 = 1; @@ -938,7 +938,7 @@ static void ov80_021D2398 (UnkStruct_ov80_021D2A08 * param0) sub_02021CAC(v0->unk_108, 1); SpriteActor_SetAnimFrame(v0->unk_108, param0->unk_2C->unk_0C); - sub_0200D494(v0->unk_108, v0->unk_18 * 7 + (48 - 23), v0->unk_1C * 7 + (6 - 40)); + SpriteActor_SetPositionXY(v0->unk_108, v0->unk_18 * 7 + (48 - 23), v0->unk_1C * 7 + (6 - 40)); } static void ov80_021D24BC (UnkStruct_ov80_021D2A08 * param0, int param1, int param2) @@ -1027,7 +1027,7 @@ static void ov80_021D259C (UnkStruct_ov80_021D2A08 * param0) v2->unk_0C = sub_0200CA08(param0->unk_D8, param0->unk_DC, &(Unk_ov80_021D30E8)); - sub_0200D494(v2->unk_0C, v2->unk_00 * 7 + 25, v2->unk_04 * 7 + -34); + SpriteActor_SetPositionXY(v2->unk_0C, v2->unk_00 * 7 + 25, v2->unk_04 * 7 + -34); sub_02021F58(v2->unk_0C, 2); sub_02021CAC(v2->unk_0C, 0); } diff --git a/src/overlay080/ov80_021D2AF4.c b/src/overlay080/ov80_021D2AF4.c index f739bfca4d..1fadf53dff 100644 --- a/src/overlay080/ov80_021D2AF4.c +++ b/src/overlay080/ov80_021D2AF4.c @@ -82,7 +82,7 @@ UnkStruct_ov80_021D2C1C * ov80_021D2AF4 (SpriteRenderer * param0, SpriteGfxHandl } sub_02021E2C(v1->unk_18, FX32_CONST(v1->unk_00.unk_08)); - sub_0200D494(v1->unk_18, v1->unk_00.unk_0C + 25, v1->unk_00.unk_10 + -34); + SpriteActor_SetPositionXY(v1->unk_18, v1->unk_00.unk_0C + 25, v1->unk_00.unk_10 + -34); } return v0; diff --git a/src/overlay090/ov90_021D0D80.c b/src/overlay090/ov90_021D0D80.c index cf2a5ac61e..77c90bbff0 100644 --- a/src/overlay090/ov90_021D0D80.c +++ b/src/overlay090/ov90_021D0D80.c @@ -1002,5 +1002,5 @@ static void ov90_021D1C90 (UnkStruct_ov90_021D0ECC * param0, u8 param1, u8 param break; } - sub_0200D494(param0->unk_2A4[0], param2 * 72 + 54, param3 * 24 + 68); + SpriteActor_SetPositionXY(param0->unk_2A4[0], param2 * 72 + 54, param3 * 24 + 68); } diff --git a/src/unk_0200C6E4.c b/src/unk_0200C6E4.c index 5da37485a9..17fe201036 100644 --- a/src/unk_0200C6E4.c +++ b/src/unk_0200C6E4.c @@ -958,7 +958,7 @@ u32 sub_0200D488 (CellActorData * param0) return sub_0200D480(param0->unk_00); } -void sub_0200D494 (GraphicElementData * param0, s16 param1, s16 param2) +void SpriteActor_SetPositionXY (GraphicElementData * param0, s16 param1, s16 param2) { VecFx32 v0; @@ -976,7 +976,7 @@ void sub_0200D494 (GraphicElementData * param0, s16 param1, s16 param2) void SpriteActor_SetSpritePositionXY (CellActorData * param0, s16 param1, s16 param2) { - sub_0200D494(param0->unk_00, param1, param2); + SpriteActor_SetPositionXY(param0->unk_00, param1, param2); } void sub_0200D4D0 (GraphicElementData * param0, s16 param1, s16 param2, fx32 param3) diff --git a/src/unk_0207E0B8.c b/src/unk_0207E0B8.c index c1bba69df9..5f03370654 100644 --- a/src/unk_0207E0B8.c +++ b/src/unk_0207E0B8.c @@ -1023,7 +1023,7 @@ static void sub_0207EE14 (GameWindowLayout * param0) s16 v1, v2; sub_0200D50C(param0->unk_5B0[9], &v1, &v2); - sub_0200D494(param0->unk_5B0[9], v1, v2 - 8); + SpriteActor_SetPositionXY(param0->unk_5B0[9], v1, v2 - 8); } v0 ^= 1; @@ -1403,7 +1403,7 @@ static void sub_0207F9A0 (GameWindowLayout * param0) sub_0201E028(param0->unk_7F4, &v0, &v1, NULL, NULL, param0->unk_B11, 4); SpriteActor_SetSpriteAnimActive(param0->unk_5B0[6], sub_020805D0(param0->unk_5A4->unk_21, param0->unk_B11)); - sub_0200D494(param0->unk_5B0[6], v0, v1); + SpriteActor_SetPositionXY(param0->unk_5B0[6], v0, v1); } static const u8 Unk_020F1BD4[][6] = { @@ -1474,7 +1474,7 @@ static u8 sub_0207FA24 (GameWindowLayout * param0) } else { SpriteActor_SetSpriteAnimActive(param0->unk_5B0[6], sub_020805D0(param0->unk_5A4->unk_21, v0)); sub_02021CAC(param0->unk_5B0[6], 1); - sub_0200D494(param0->unk_5B0[6], v2, v3); + SpriteActor_SetPositionXY(param0->unk_5B0[6], v2, v3); } { @@ -1562,7 +1562,7 @@ static u8 sub_0207FC94 (GameWindowLayout * param0) sub_0201E028(param0->unk_7F4, &v1, &v2, NULL, NULL, param0->unk_B11, 4); SpriteActor_SetSpriteAnimActive(param0->unk_5B0[6], sub_020805D0(param0->unk_5A4->unk_21, param0->unk_B11)); sub_02021CAC(param0->unk_5B0[6], 1); - sub_0200D494(param0->unk_5B0[6], v1, v2); + SpriteActor_SetPositionXY(param0->unk_5B0[6], v1, v2); param0->unk_B0C = 1; param0->unk_B0D = param0->unk_B11; @@ -1589,7 +1589,7 @@ void sub_0207FD68 (GameWindowLayout * param0, u8 param1) sub_0201E028(param0->unk_7F4, &v0, &v1, NULL, NULL, param0->unk_B11, 4); SpriteActor_SetSpriteAnimActive(param0->unk_5B0[6], sub_020805D0(param0->unk_5A4->unk_21, param1)); sub_02021CAC(param0->unk_5B0[6], 1); - sub_0200D494(param0->unk_5B0[6], v0, v1); + SpriteActor_SetPositionXY(param0->unk_5B0[6], v0, v1); } { diff --git a/src/unk_02082C2C.c b/src/unk_02082C2C.c index dc73505a6d..b2ab2f31c9 100644 --- a/src/unk_02082C2C.c +++ b/src/unk_02082C2C.c @@ -251,12 +251,12 @@ void sub_020830A0 (GameWindowLayout * param0, u8 param1, s16 param2, s16 param3) param0->unk_704[param1].unk_1E = param2 + 8; param0->unk_704[param1].unk_20 = param3 + 8; - sub_0200D494(*v0, param0->unk_704[param1].unk_1E, param0->unk_704[param1].unk_20); + SpriteActor_SetPositionXY(*v0, param0->unk_704[param1].unk_1E, param0->unk_704[param1].unk_20); } void sub_020830D4 (GameWindowLayout * param0, u8 param1) { - sub_0200D494(param0->unk_5B0[22 + param1], param0->unk_704[param1].unk_1E + 8, param0->unk_704[param1].unk_20); + SpriteActor_SetPositionXY(param0->unk_5B0[22 + param1], param0->unk_704[param1].unk_1E + 8, param0->unk_704[param1].unk_20); } void sub_02083104 (GameWindowLayout * param0, u8 param1) @@ -329,15 +329,15 @@ void sub_020831B4 (GameWindowLayout * param0) if ((param0->unk_B11 == v1) && (v2 != 0) && (v2 != 5)) { if (sub_02021E74(v0->unk_24) == 0) { - sub_0200D494(v0->unk_24, v0->unk_16, v0->unk_18 - 3); + SpriteActor_SetPositionXY(v0->unk_24, v0->unk_16, v0->unk_18 - 3); } else { - sub_0200D494(v0->unk_24, v0->unk_16, v0->unk_18 + 1); + SpriteActor_SetPositionXY(v0->unk_24, v0->unk_16, v0->unk_18 + 1); } continue; } - sub_0200D494(v0->unk_24, v0->unk_16, v0->unk_18); + SpriteActor_SetPositionXY(v0->unk_24, v0->unk_16, v0->unk_18); } } @@ -348,7 +348,7 @@ void sub_0208327C (GameWindowLayout * param0, u8 param1, u8 param2) sub_0201E010(¶m0->unk_7F4[param1], &v0, &v1); SpriteActor_SetSpriteAnimActive(param0->unk_5B0[6], sub_020805D0(param0->unk_5A4->unk_21, param1)); sub_02021CAC(param0->unk_5B0[6], 1); - sub_0200D494(param0->unk_5B0[6], v0, v1); + SpriteActor_SetPositionXY(param0->unk_5B0[6], v0, v1); sub_0200D414(param0->unk_5B0[6], param2); } diff --git a/src/unk_02083370.c b/src/unk_02083370.c index 9b6257ff73..1a94b7ffd7 100644 --- a/src/unk_02083370.c +++ b/src/unk_02083370.c @@ -440,7 +440,7 @@ static void sub_02083AD0 (GameWindowLayout * param0, int * param1) sub_0200D414(param0->unk_5B0[6], 0); sub_0200D50C(param0->unk_5B0[6], &v0, &v1); - sub_0200D494(param0->unk_5B0[7], v0, v1); + SpriteActor_SetPositionXY(param0->unk_5B0[7], v0, v1); SpriteActor_SetSpriteAnimActive(param0->unk_5B0[7], sub_020805D0(param0->unk_5A4->unk_21, param0->unk_B0F_0) + 2); sub_02021CAC(param0->unk_5B0[7], 1); sub_0207F8F8(param0, param0->unk_B0F_0); @@ -612,11 +612,11 @@ static void sub_02083FDC (GameWindowLayout * param0, u8 param1, u8 param2) v1 += 8; } - sub_0200D494(param0->unk_704[v0->unk_300[param1]].unk_24, param0->unk_704[v0->unk_300[param1]].unk_16, param0->unk_704[v0->unk_300[param1]].unk_18); - sub_0200D494(param0->unk_5B0[10 + v0->unk_300[param1]], param0->unk_704[v0->unk_300[param1]].unk_1A, param0->unk_704[v0->unk_300[param1]].unk_1C); - sub_0200D494(param0->unk_5B0[16 + v0->unk_300[param1]], param0->unk_704[v0->unk_300[param1]].unk_1E, param0->unk_704[v0->unk_300[param1]].unk_20); - sub_0200D494(param0->unk_5B0[22 + v0->unk_300[param1]], param0->unk_704[v0->unk_300[param1]].unk_1E + 8, param0->unk_704[v0->unk_300[param1]].unk_20); - sub_0200D494(param0->unk_5B0[0 + v0->unk_300[param1]], v1, v2); + SpriteActor_SetPositionXY(param0->unk_704[v0->unk_300[param1]].unk_24, param0->unk_704[v0->unk_300[param1]].unk_16, param0->unk_704[v0->unk_300[param1]].unk_18); + SpriteActor_SetPositionXY(param0->unk_5B0[10 + v0->unk_300[param1]], param0->unk_704[v0->unk_300[param1]].unk_1A, param0->unk_704[v0->unk_300[param1]].unk_1C); + SpriteActor_SetPositionXY(param0->unk_5B0[16 + v0->unk_300[param1]], param0->unk_704[v0->unk_300[param1]].unk_1E, param0->unk_704[v0->unk_300[param1]].unk_20); + SpriteActor_SetPositionXY(param0->unk_5B0[22 + v0->unk_300[param1]], param0->unk_704[v0->unk_300[param1]].unk_1E + 8, param0->unk_704[v0->unk_300[param1]].unk_20); + SpriteActor_SetPositionXY(param0->unk_5B0[0 + v0->unk_300[param1]], v1, v2); } static void sub_02084134 (GameWindowLayout * param0) @@ -1019,7 +1019,7 @@ static int sub_02084A18 (GameWindowLayout * param0) sub_0200D414(param0->unk_5B0[6], 0); sub_0200D50C(param0->unk_5B0[6], &v0, &v1); - sub_0200D494(param0->unk_5B0[7], v0, v1); + SpriteActor_SetPositionXY(param0->unk_5B0[7], v0, v1); SpriteActor_SetSpriteAnimActive(param0->unk_5B0[7], sub_020805D0(param0->unk_5A4->unk_21, param0->unk_B0F_0) + 2); sub_02021CAC(param0->unk_5B0[7], 1); sub_0207F8F8(param0, param0->unk_B0F_0); diff --git a/src/unk_0208EA44.c b/src/unk_0208EA44.c index c6fe518593..07e143ad10 100644 --- a/src/unk_0208EA44.c +++ b/src/unk_0208EA44.c @@ -279,7 +279,7 @@ void sub_0208ECF4 (UnkStruct_0208D7BC * param0) v1 = v3 + 24 + (v6 - 1) * 16; } - sub_0200D494(param0->unk_41C[v5], v1, v2); + SpriteActor_SetPositionXY(param0->unk_41C[v5], v1, v2); sub_02021CAC(v0[v5], 1); v6++; @@ -296,8 +296,8 @@ void sub_0208EDC4 (UnkStruct_0208D7BC * param0) v0 = sub_0208ECB8(param0); - sub_0200D494(param0->unk_41C[21], v0 + -12, 24); - sub_0200D494(param0->unk_41C[22], (23 * 8 + 4) + ((23 * 8 + 4) - v0) + -4, 24); + SpriteActor_SetPositionXY(param0->unk_41C[21], v0 + -12, 24); + SpriteActor_SetPositionXY(param0->unk_41C[22], (23 * 8 + 4) + ((23 * 8 + 4) - v0) + -4, 24); } void sub_0208EE10 (UnkStruct_0208D7BC * param0, u8 param1) @@ -369,11 +369,11 @@ void sub_0208EF58 (UnkStruct_0208D7BC * param0) SpriteActor_DrawSprite(param0->unk_41C[11], 1); if (param0->unk_250.unk_10 == param0->unk_250.unk_11) { - sub_0200D494(param0->unk_41C[11], 216, 80); + SpriteActor_SetPositionXY(param0->unk_41C[11], 216, 80); } else { - sub_0200D494(param0->unk_41C[11], 199, 80); + SpriteActor_SetPositionXY(param0->unk_41C[11], 199, 80); SpriteActor_DrawSprite(param0->unk_41C[12], 1); - sub_0200D494( + SpriteActor_SetPositionXY( param0->unk_41C[12], 233, 80); } break; @@ -385,18 +385,18 @@ void sub_0208EF58 (UnkStruct_0208D7BC * param0) sub_0208F194(param0, 13 + v0, 5 + v0, MoveTable_LoadParam(param0->unk_250.unk_34[v0], MOVEATTRIBUTE_TYPE)); SpriteActor_DrawSprite(param0->unk_41C[13 + v0], 1); - sub_0200D494(param0->unk_41C[13 + v0], 151, 42 + v0 * 32); + SpriteActor_SetPositionXY(param0->unk_41C[13 + v0], 151, 42 + v0 * 32); } if (param0->unk_24C->unk_18 != 0) { sub_0208F194(param0, 13 + 4, 5 + 4, MoveTable_LoadParam(param0->unk_24C->unk_18, MOVEATTRIBUTE_TYPE)); SpriteActor_DrawSprite(param0->unk_41C[13 + 4], 1); - sub_0200D494(param0->unk_41C[13 + 4], 151, 42 + 4 * 32); + SpriteActor_SetPositionXY(param0->unk_41C[13 + 4], 151, 42 + 4 * 32); } - sub_0200D494(param0->unk_41C[11], 63, 52); - sub_0200D494(param0->unk_41C[12], 63 + 34, 52); - sub_0200D494(param0->unk_41C[18], (92 + 16), 72); + SpriteActor_SetPositionXY(param0->unk_41C[11], 63, 52); + SpriteActor_SetPositionXY(param0->unk_41C[12], 63 + 34, 52); + SpriteActor_SetPositionXY(param0->unk_41C[18], (92 + 16), 72); break; case 5: for (v0 = 0; v0 < 4; v0++) { @@ -406,18 +406,18 @@ void sub_0208EF58 (UnkStruct_0208D7BC * param0) sub_0208F194(param0, 13 + v0, 5 + v0, MoveTable_LoadParam(param0->unk_250.unk_34[v0], MOVEATTRIBUTE_CONTEST_TYPE) + 18); SpriteActor_DrawSprite(param0->unk_41C[13 + v0], 1); - sub_0200D494(param0->unk_41C[13 + v0], 151, 42 + v0 * 32); + SpriteActor_SetPositionXY(param0->unk_41C[13 + v0], 151, 42 + v0 * 32); } if (param0->unk_24C->unk_18 != 0) { sub_0208F194(param0, 13 + 4, 5 + 4, MoveTable_LoadParam(param0->unk_24C->unk_18, MOVEATTRIBUTE_CONTEST_TYPE) + 18); SpriteActor_DrawSprite(param0->unk_41C[13 + 4], 1); - sub_0200D494(param0->unk_41C[13 + 4], 151, 42 + 4 * 32); + SpriteActor_SetPositionXY(param0->unk_41C[13 + 4], 151, 42 + 4 * 32); } - sub_0200D494(param0->unk_41C[11], 63, 52); - sub_0200D494(param0->unk_41C[12], 63 + 34, 52); - sub_0200D494(param0->unk_41C[18], (92 + 16), 72); + SpriteActor_SetPositionXY(param0->unk_41C[11], 63, 52); + SpriteActor_SetPositionXY(param0->unk_41C[12], 63 + 34, 52); + SpriteActor_SetPositionXY(param0->unk_41C[18], (92 + 16), 72); break; } } @@ -457,8 +457,8 @@ void sub_0208F22C (UnkStruct_0208D7BC * param0, u8 param1, u8 param2) sub_0208F1E4(param0, ¶m1, &v0, &v1); sub_0208F1E4(param0, ¶m2, &v2, &v3); - sub_0200D494(param0->unk_41C[13 + param1], v2, v3); - sub_0200D494(param0->unk_41C[13 + param2], v0, v1); + SpriteActor_SetPositionXY(param0->unk_41C[13 + param1], v2, v3); + SpriteActor_SetPositionXY(param0->unk_41C[13 + param2], v0, v1); } void sub_0208F294 (UnkStruct_0208D7BC * param0, u32 param1) @@ -471,7 +471,7 @@ void sub_0208F294 (UnkStruct_0208D7BC * param0, u32 param1) void sub_0208F2E8 (UnkStruct_0208D7BC * param0) { - sub_0200D494(param0->unk_41C[9], 194, 48 + param0->unk_6A5_0 * 32); + SpriteActor_SetPositionXY(param0->unk_41C[9], 194, 48 + param0->unk_6A5_0 * 32); } void sub_0208F310 (UnkStruct_0208D7BC * param0) @@ -479,7 +479,7 @@ void sub_0208F310 (UnkStruct_0208D7BC * param0) s16 v0, v1; sub_0200D50C(param0->unk_41C[9], &v0, &v1); - sub_0200D494(param0->unk_41C[10], v0, v1); + SpriteActor_SetPositionXY(param0->unk_41C[10], v0, v1); sub_02021CAC(param0->unk_41C[10], 1); } @@ -624,9 +624,9 @@ void sub_0208F600 (UnkStruct_0208D7BC * param0) sub_02092368(param0, &v0, &v1); if (param0->unk_6A7_0 == 0) { - sub_0200D494(param0->unk_41C[41], v0, v1 + 192); + SpriteActor_SetPositionXY(param0->unk_41C[41], v0, v1 + 192); } else { - sub_0200D494(param0->unk_41C[41], v0 - 4, v1 + 192); + SpriteActor_SetPositionXY(param0->unk_41C[41], v0 - 4, v1 + 192); } } @@ -655,7 +655,7 @@ void sub_0208F6DC (UnkStruct_0208D7BC * param0, Window * param1) return; } - sub_0200D494(param0->unk_41C[47], sub_0201C29C(param1) * 8 - 10, 8); + SpriteActor_SetPositionXY(param0->unk_41C[47], sub_0201C29C(param1) * 8 - 10, 8); sub_02021CAC(param0->unk_41C[47], 1); } @@ -680,9 +680,9 @@ void sub_0208F7A4 (UnkStruct_0208D7BC * param0) sub_0200D97C(param0->unk_414, param0->unk_418, 19, PokeIconPalettesFileIndex(), 0, 5); if (param0->unk_6A4 == 3) { - sub_0200D494(param0->unk_41C[19], 24, 48); + SpriteActor_SetPositionXY(param0->unk_41C[19], 24, 48); } else { - sub_0200D494(param0->unk_41C[19], 32, 68); + SpriteActor_SetPositionXY(param0->unk_41C[19], 32, 68); } SpriteActor_DrawSprite(param0->unk_41C[19], 1); @@ -709,11 +709,11 @@ static s16 sub_0208F800 (u32 param0, s16 param1, s16 param2) void sub_0208F844 (UnkStruct_0208D7BC * param0) { - sub_0200D494(param0->unk_41C[48], sub_0208F800(param0->unk_250.unk_45, 88, 88), sub_0208F800(param0->unk_250.unk_45, 49, 73)); - sub_0200D494(param0->unk_41C[49], sub_0208F800(param0->unk_250.unk_46, 110, 88), sub_0208F800(param0->unk_250.unk_46, 65, 73)); - sub_0200D494(param0->unk_41C[50], sub_0208F800(param0->unk_250.unk_47, 103, 88), sub_0208F800(param0->unk_250.unk_47, 92, 73)); - sub_0200D494(param0->unk_41C[51], sub_0208F800(param0->unk_250.unk_48, 72, 87), sub_0208F800(param0->unk_250.unk_48, 92, 73)); - sub_0200D494(param0->unk_41C[52], sub_0208F800(param0->unk_250.unk_49, 65, 87), sub_0208F800(param0->unk_250.unk_49, 65, 73)); + SpriteActor_SetPositionXY(param0->unk_41C[48], sub_0208F800(param0->unk_250.unk_45, 88, 88), sub_0208F800(param0->unk_250.unk_45, 49, 73)); + SpriteActor_SetPositionXY(param0->unk_41C[49], sub_0208F800(param0->unk_250.unk_46, 110, 88), sub_0208F800(param0->unk_250.unk_46, 65, 73)); + SpriteActor_SetPositionXY(param0->unk_41C[50], sub_0208F800(param0->unk_250.unk_47, 103, 88), sub_0208F800(param0->unk_250.unk_47, 92, 73)); + SpriteActor_SetPositionXY(param0->unk_41C[51], sub_0208F800(param0->unk_250.unk_48, 72, 87), sub_0208F800(param0->unk_250.unk_48, 92, 73)); + SpriteActor_SetPositionXY(param0->unk_41C[52], sub_0208F800(param0->unk_250.unk_49, 65, 87), sub_0208F800(param0->unk_250.unk_49, 65, 73)); sub_02021CAC(param0->unk_41C[48], 1); sub_02021CAC(param0->unk_41C[49], 1); @@ -777,7 +777,7 @@ void sub_0208FAA4 (UnkStruct_0208D7BC * param0) void sub_0208FB00 (UnkStruct_0208D7BC * param0) { - sub_0200D494( + SpriteActor_SetPositionXY( param0->unk_41C[67], 132 + (param0->unk_6AF & 3) * 32, 56 + (param0->unk_6AF / 4) * 40); } @@ -854,7 +854,7 @@ static void sub_0208FC30 (GraphicElementData * param0, u32 param1, u32 param2, c v1 = param3[3] - (((((param3[3] - param3[1]) << 8) / 256) * param1) >> 8); } - sub_0200D494(param0, v0, v1); + SpriteActor_SetPositionXY(param0, v0, v1); SpriteActor_SetAnimFrame(param0, 0); SpriteActor_SetSpriteAnimActive(param0, 0); } From c3a72122b910d2316668c44619c125a78ca0d895 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 21:08:35 -0800 Subject: [PATCH 10/16] Document routines for the healthbar scroll --- include/battle/healthbar.h | 24 +- include/overlay016/struct_ov16_022674C4.h | 6 +- src/overlay016/battle_display.c | 16 +- src/overlay016/healthbar.c | 525 +++++++++++++--------- src/overlay016/ov16_0223DF00.c | 2 +- 5 files changed, 335 insertions(+), 238 deletions(-) diff --git a/include/battle/healthbar.h b/include/battle/healthbar.h index fb104db61d..399843468f 100644 --- a/include/battle/healthbar.h +++ b/include/battle/healthbar.h @@ -19,6 +19,11 @@ enum HealthbarType { HEALTHBAR_TYPE_PAL_PARK, }; +enum HealthbarScrollDirection { + HEALTHBAR_SCROLL_IN = 0, + HEALTHBAR_SCROLL_OUT, +}; + void ov16_02266F1C(SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4); CellActorData * ov16_02267060(SpriteRenderer * param0, SpriteGfxHandler * param1, int param2); void Healthbar_Draw(Healthbar * param0, u32 param1, u32 param2); @@ -42,8 +47,23 @@ void ov16_022675D8(Healthbar * param0, int param1); * @param enable If TRUE, enable the healthbar; otherwise, disable it. */ void Healthbar_Enable(Healthbar *battleSys, BOOL enable); -void ov16_0226763C(Healthbar * param0, int param1, int param2); -void Healthbar_SetScrollEffect(Healthbar * param0, int param1); + +/** + * @brief Offset the healthbar's position by a given value along the X and Y axes. + * + * @param healthbar + * @param x X-axis offset for the healthbar from its current position. + * @param y Y-axis offset for the healthbar from its current position. + */ +void Healthbar_OffsetPositionXY(Healthbar *healthbar, int x, int y); + +/** + * @brief Scroll the healthbar in or out. + * + * @param healthbar + * @param direction The direction to scroll the healthbar. + */ +void Healthbar_Scroll(Healthbar *healthbar, enum HealthbarScrollDirection direction); /** * @brief Determine the type of healthbar to be displayed for a given battler type diff --git a/include/overlay016/struct_ov16_022674C4.h b/include/overlay016/struct_ov16_022674C4.h index b21fc5c3ff..3899c3e117 100644 --- a/include/overlay016/struct_ov16_022674C4.h +++ b/include/overlay016/struct_ov16_022674C4.h @@ -14,7 +14,7 @@ typedef struct { SysTask * unk_10; Window unk_14; u8 unk_24; - u8 unk_25; + u8 type; u8 unk_26; u8 unk_27; s32 unk_28; @@ -32,8 +32,8 @@ typedef struct { u8 unk_4C; u8 unk_4D; u8 unk_4E; - u8 unk_4F_0 : 1; - u8 unk_4F_1 : 1; + u8 scrollDirection : 1; + u8 doneScrolling : 1; u8 unk_4F_2 : 1; u8 unk_4F_3 : 1; u8 : 4; diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index 9a561777f5..a1b73ecf79 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -627,7 +627,7 @@ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battle healthbar->battleSys = battleSys; healthbar->unk_24 = battlerData->battler; - healthbar->unk_25 = Healthbar_Type(battlerData->battlerType, BattleSystem_BattleType(battleSys)); + healthbar->type = Healthbar_Type(battlerData->battlerType, BattleSystem_BattleType(battleSys)); healthbar->unk_4C = healthbarData->command; healthbar->unk_28 = healthbarData->curHP; healthbar->unk_2C = healthbarData->maxHP; @@ -657,7 +657,7 @@ void BattleDisplay_SlideHealthbarOut(BattleSystem *battleSys, BattlerData *battl healthbar->unk_24 = battlerData->battler; healthbar->unk_4C = battlerData->data[0]; - Healthbar_SetScrollEffect(healthbar, TRUE); + Healthbar_Scroll(healthbar, HEALTHBAR_SCROLL_OUT); healthbar->unk_10 = SysTask_Start(SlideHealthbarOutTask, healthbar, 1000); } @@ -941,7 +941,7 @@ void ov16_0225DA74 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->battleSys = param0; v0->unk_4C = param2->unk_00; v0->unk_24 = param1->battler; - v0->unk_25 = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); + v0->type = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); v0->unk_28 = param2->unk_02; v0->unk_2C = param2->unk_04; v0->unk_30 = param2->unk_08; @@ -1226,7 +1226,7 @@ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->battleSys = param0; v0->unk_24 = param1->battler; - v0->unk_25 = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); + v0->type = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); v0->unk_4C = param2->unk_00; v0->unk_28 = param2->unk_02; v0->unk_2C = param2->unk_04; @@ -2832,13 +2832,13 @@ static void SlideHealthbarInTask(SysTask *task, void *data) break; } - Healthbar_SetScrollEffect(healthbar, 0); + Healthbar_Scroll(healthbar, HEALTHBAR_SCROLL_IN); Healthbar_Enable(healthbar, TRUE); healthbar->state++; break; case SLIDE_HEALTHBAR_IN_STATE_WAIT: - if (healthbar->unk_4F_1 == 1) { + if (healthbar->doneScrolling == TRUE) { healthbar->state++; } break; @@ -2868,7 +2868,7 @@ static void SlideHealthbarOutTask(SysTask *task, void *data) switch (healthbar->state) { case SLIDE_HEALTHBAR_OUT_STATE_WAIT: - if (healthbar->unk_4F_1 == TRUE) { + if (healthbar->doneScrolling == TRUE) { healthbar->state++; } break; @@ -3966,7 +3966,7 @@ static void ov16_022611DC (SysTask * param0, void * param1) v18 = ov16_0223F35C(v0->unk_00, v20); MI_CpuClear8(&v18->state, sizeof(u8)); - v18->unk_25 = Healthbar_Type(BattleSystem_BattlerSlot(v0->unk_00, v20), BattleSystem_BattleType(v0->unk_00)); + v18->type = Healthbar_Type(BattleSystem_BattlerSlot(v0->unk_00, v20), BattleSystem_BattleType(v0->unk_00)); v19 = BattleSystem_PartyPokemon(v0->unk_00, v20, v21); v18->unk_28 = Pokemon_GetValue(v19, MON_DATA_CURRENT_HP, NULL) - v0->unk_08->unk_04->unk_20; diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index dd1078314b..0634026ea8 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -39,6 +39,22 @@ #include "overlay016/ov16_0223DF00.h" #include "battle/healthbar.h" +#define HEALTHBAR_SCROLL_SPEED 24 +#define HEALTHBAR_SCROLL_OUT_OFFSET 160 + +#define HEALTHBAR_X_OFFSET_SOLO_PLAYER 192 +#define HEALTHBAR_Y_OFFSET_SOLO_PLAYER 116 +#define HEALTHBAR_X_OFFSET_SOLO_ENEMY 58 +#define HEALTHBAR_Y_OFFSET_SOLO_ENEMY 36 +#define HEALTHBAR_X_OFFSET_PLAYER_SLOT_1 HEALTHBAR_X_OFFSET_SOLO_PLAYER +#define HEALTHBAR_Y_OFFSET_PLAYER_SLOT_1 HEALTHBAR_Y_OFFSET_SOLO_PLAYER - 13 +#define HEALTHBAR_X_OFFSET_PLAYER_SLOT_2 HEALTHBAR_X_OFFSET_SOLO_PLAYER + 6 +#define HEALTHBAR_Y_OFFSET_PLAYER_SLOT_2 HEALTHBAR_Y_OFFSET_SOLO_PLAYER + 16 +#define HEALTHBAR_X_OFFSET_ENEMY_SLOT_1 HEALTHBAR_X_OFFSET_SOLO_ENEMY + 6 +#define HEALTHBAR_Y_OFFSET_ENEMY_SLOT_1 HEALTHBAR_Y_OFFSET_SOLO_ENEMY - 20 +#define HEALTHBAR_X_OFFSET_ENEMY_SLOT_2 HEALTHBAR_X_OFFSET_SOLO_ENEMY +#define HEALTHBAR_Y_OFFSET_ENEMY_SLOT_2 HEALTHBAR_Y_OFFSET_SOLO_ENEMY + 9 + typedef struct { u16 unk_00; u16 unk_02; @@ -70,22 +86,22 @@ static void ov16_02267DC4(Healthbar * param0, u32 param1); static void ov16_02266FE4(SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4); static void ov16_02267244(Healthbar * param0); static void ov16_0226728C(Healthbar * param0); -static const SpriteTemplate * ov16_022682B0(u8 param0); +static const SpriteTemplate* Healthbar_SpriteTemplate(u8 type); static const SpriteTemplate * ov16_02268314(u8 param0); -static void ov16_0226774C(SysTask * param0, void * param1); +static void ScrollHealthbarTask(SysTask *task, void *data); static void ov16_02268380(SysTask * param0, void * param1); void ov16_02268470(Healthbar * param0); void ov16_02268498(Healthbar * param0); static void ov16_022684BC(SysTask * param0, void * param1); static void Healthbar_EnableArrow(Healthbar * param0, int param1); -__attribute__((aligned(4))) static const s8 Unk_ov16_0226F334[] = { - 0x48, - 0x0, - 0x48, - 0x0, - 0x48, - 0x0 +__attribute__((aligned(4))) static const s8 sArrowOffsetX[] = { + [HEALTHBAR_TYPE_PLAYER_SOLO] = 72, + [HEALTHBAR_TYPE_ENEMY_SOLO] = 0, + [HEALTHBAR_TYPE_PLAYER_SLOT_1] = 72, + [HEALTHBAR_TYPE_ENEMY_SLOT_1] = 0, + [HEALTHBAR_TYPE_PLAYER_SLOT_2] = 72, + [HEALTHBAR_TYPE_ENEMY_SLOT_2] = 0, }; static const UnkStruct_ov16_0226F64C Unk_ov16_0226F64C[][4] = { @@ -303,82 +319,124 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F3D4[] = { {0x0, 0x0} }; -static const SpriteTemplate Unk_ov16_0226F5B0 = { - 0xC0, - 0x74, - 0x0, - 0x0, - 23, - 0x0, - NNS_G2D_VRAM_TYPE_2DMAIN, - {0xBF, 0x4E26, 0xBE, 0xBD, 0xFFFFFFFF, 0xFFFFFFFF}, - 0x0, - 0x0 +static const SpriteTemplate sHealthbarTemplate_SoloPlayer = { + .x = HEALTHBAR_X_OFFSET_SOLO_PLAYER, + .y = HEALTHBAR_Y_OFFSET_SOLO_PLAYER, + .z = 0, + .animIdx = 0, + .priority = 23, + .plttIdx = 0, + .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, + .resources = { + 0xBF, + 0x4E26, + 0xBE, + 0xBD, + SPRITE_RESOURCE_NONE, + SPRITE_RESOURCE_NONE, + }, + .bgPriority = 0, + .transferToVRAM = FALSE, }; -static const SpriteTemplate Unk_ov16_0226F5E4 = { - 0x3A, - 0x24, - 0x0, - 0x0, - 24, - 0x0, - NNS_G2D_VRAM_TYPE_2DMAIN, - {0xBC, 0x4E26, 0xBB, 0xBA, 0xFFFFFFFF, 0xFFFFFFFF}, - 0x0, - 0x0 +static const SpriteTemplate sHealthbarTemplate_SoloEnemy = { + .x = HEALTHBAR_X_OFFSET_SOLO_ENEMY, + .y = HEALTHBAR_Y_OFFSET_SOLO_ENEMY, + .z = 0, + .animIdx = 0, + .priority = 24, + .plttIdx = 0, + .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, + .resources = { + 0xBC, + 0x4E26, + 0xBB, + 0xBA, + SPRITE_RESOURCE_NONE, + SPRITE_RESOURCE_NONE, + }, + .bgPriority = 0, + .transferToVRAM = FALSE, }; -static const SpriteTemplate Unk_ov16_0226F4AC = { - 0xC0, - 0x67, - 0x0, - 0x0, - 28, - 0x0, - NNS_G2D_VRAM_TYPE_2DMAIN, - {0xC8, 0x4E26, 0xC7, 0xC6, 0xFFFFFFFF, 0xFFFFFFFF}, - 0x0, - 0x0 +static const SpriteTemplate sHealthbarTemplate_PlayerSlot1 = { + .x = HEALTHBAR_X_OFFSET_PLAYER_SLOT_1, + .y = HEALTHBAR_Y_OFFSET_PLAYER_SLOT_1, + .z = 0, + .animIdx = 0, + .priority = 28, + .plttIdx = 0, + .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, + .resources = { + 0xC8, + 0x4E26, + 0xC7, + 0xC6, + SPRITE_RESOURCE_NONE, + SPRITE_RESOURCE_NONE, + }, + .bgPriority = 0, + .transferToVRAM = FALSE, }; -static const SpriteTemplate Unk_ov16_0226F4E0 = { - 0x40, - 0x10, - 0x0, - 0x0, - 25, - 0x0, - NNS_G2D_VRAM_TYPE_2DMAIN, - {0xC2, 0x4E26, 0xC1, 0xC0, 0xFFFFFFFF, 0xFFFFFFFF}, - 0x0, - 0x0 +static const SpriteTemplate sHealthbarTemplate_EnemySlot1 = { + .x = HEALTHBAR_X_OFFSET_ENEMY_SLOT_1, + .y = HEALTHBAR_Y_OFFSET_ENEMY_SLOT_1, + .z = 0, + .animIdx = 0, + .priority = 25, + .plttIdx = 0, + .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, + .resources = { + 0xC2, + 0x4E26, + 0xC1, + 0xC0, + SPRITE_RESOURCE_NONE, + SPRITE_RESOURCE_NONE, + }, + .bgPriority = 0, + .transferToVRAM = FALSE, }; -static const SpriteTemplate Unk_ov16_0226F548 = { - 0xC6, - 0x84, - 0x0, - 0x0, - 26, - 0x0, - NNS_G2D_VRAM_TYPE_2DMAIN, - {0xCB, 0x4E26, 0xCA, 0xC9, 0xFFFFFFFF, 0xFFFFFFFF}, - 0x0, - 0x0 +static const SpriteTemplate sHealthbarTemplate_PlayerSlot2 = { + .x = HEALTHBAR_X_OFFSET_PLAYER_SLOT_2, + .y = HEALTHBAR_Y_OFFSET_PLAYER_SLOT_2, + .z = 0, + .animIdx = 0, + .priority = 26, + .plttIdx = 0, + .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, + .resources = { + 0xCB, + 0x4E26, + 0xCA, + 0xC9, + SPRITE_RESOURCE_NONE, + SPRITE_RESOURCE_NONE, + }, + .bgPriority = 0, + .transferToVRAM = FALSE, }; -static const SpriteTemplate Unk_ov16_0226F618 = { - 0x3A, - 0x2D, - 0x0, - 0x0, - 27, - 0x0, - NNS_G2D_VRAM_TYPE_2DMAIN, - {0xC5, 0x4E26, 0xC4, 0xC3, 0xFFFFFFFF, 0xFFFFFFFF}, - 0x0, - 0x0 +static const SpriteTemplate sHealthbarTemplate_EnemySlot2 = { + .x = HEALTHBAR_X_OFFSET_ENEMY_SLOT_2, + .y = HEALTHBAR_Y_OFFSET_ENEMY_SLOT_2, + .z = 0, + .animIdx = 0, + .priority = 27, + .plttIdx = 0, + .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, + .resources = { + 0xC5, + 0x4E26, + 0xC4, + 0xC3, + SPRITE_RESOURCE_NONE, + SPRITE_RESOURCE_NONE, + }, + .bgPriority = 0, + .transferToVRAM = FALSE, }; static const SpriteTemplate Unk_ov16_0226F514 = { @@ -394,17 +452,24 @@ static const SpriteTemplate Unk_ov16_0226F514 = { 0x0 }; -static const SpriteTemplate Unk_ov16_0226F57C = { - 0xC0, - 0x74, - 0x0, - 0x0, - 23, - 0x0, - NNS_G2D_VRAM_TYPE_2DMAIN, - {0xFD, 0x4E28, 0xFE, 0xFF, 0xFFFFFFFF, 0xFFFFFFFF}, - 0x0, - 0x0 +static const SpriteTemplate sHealthbarTemplate_NoPlayerMon = { + .x = HEALTHBAR_X_OFFSET_SOLO_PLAYER, + .y = HEALTHBAR_Y_OFFSET_SOLO_PLAYER, + .z = 0, + .animIdx = 0, + .priority = 23, + .plttIdx = 0, + .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, + .resources = { + 0xFD, + 0x4E28, + 0xFE, + 0xFF, + SPRITE_RESOURCE_NONE, + SPRITE_RESOURCE_NONE, + }, + .bgPriority = 0, + .transferToVRAM = FALSE, }; #include "overlay016/rodata_ov16_0226F6AC.h" @@ -413,7 +478,7 @@ void ov16_02266F1C (SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * p { const SpriteTemplate * v0; - v0 = ov16_022682B0(param4); + v0 = Healthbar_SpriteTemplate(param4); SpriteRenderer_LoadCharResObjFromOpenNarc(param0, param1, param2, v0->resources[0], 1, NNS_G2D_VRAM_TYPE_2DMAIN, v0->resources[0]); SpriteRenderer_LoadPalette(param3, 2, param0, param1, param2, 71, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20006); @@ -445,7 +510,7 @@ CellActorData * ov16_02267060 (SpriteRenderer * param0, SpriteGfxHandler * param const SpriteTemplate * v0; CellActorData * v1; - v0 = ov16_022682B0(param2); + v0 = Healthbar_SpriteTemplate(param2); v1 = SpriteActor_LoadResources(param0, param1, v0); SpriteActor_UpdateObject(v1->unk_00); @@ -461,15 +526,15 @@ void Healthbar_Draw (Healthbar * param0, u32 param1, u32 param2) v1 = param2; - if (param0->unk_25 == 6) { + if (param0->type == 6) { param2 &= ((1 << 10) | (1 << 11)); - } else if (param0->unk_25 == 7) { + } else if (param0->type == 7) { param2 &= ((1 << 12) | (1 << 13)); } else { param2 &= 0xffffffff ^ (((1 << 10) | (1 << 11)) | ((1 << 12) | (1 << 13))); } - switch (param0->unk_25) { + switch (param0->type) { case 1: case 3: case 5: @@ -596,7 +661,7 @@ void ov16_02267258 (Healthbar * param0) SpriteGfxHandler * v1; const SpriteTemplate * v2; - v2 = ov16_022682B0(param0->unk_25); + v2 = Healthbar_SpriteTemplate(param0->type); v0 = ov16_0223E010(param0->battleSys); v1 = ov16_0223E018(param0->battleSys); @@ -611,7 +676,7 @@ static void ov16_0226728C (Healthbar * param0) SpriteGfxHandler * v1; const SpriteTemplate * v2; - v2 = ov16_02268314(param0->unk_25); + v2 = ov16_02268314(param0->type); if (v2 == NULL) { return; @@ -637,15 +702,15 @@ void ov16_022672C4 (Healthbar * param0) v1 = ov16_0223E010(param0->battleSys); v2 = ov16_0223E018(param0->battleSys); v3 = BattleSystem_PaletteSys(param0->battleSys); - v0 = ov16_022682B0(param0->unk_25); + v0 = Healthbar_SpriteTemplate(param0->type); - ov16_02266F1C(v1, v2, v4, v3, param0->unk_25); - param0->mainActor = ov16_02267060(v1, v2, param0->unk_25); + ov16_02266F1C(v1, v2, v4, v3, param0->type); + param0->mainActor = ov16_02267060(v1, v2, param0->type); - ov16_02266FE4(v1, v2, v4, v3, param0->unk_25); + ov16_02266FE4(v1, v2, v4, v3, param0->type); if (param0->arrowActor != NULL) { - SpriteActor_SetPositionXY(param0->arrowActor->unk_00, v0->x - Unk_ov16_0226F334[param0->unk_25], v0->y + 0); + SpriteActor_SetPositionXY(param0->arrowActor->unk_00, v0->x - sArrowOffsetX[param0->type], v0->y + 0); } NARC_dtor(v4); @@ -665,7 +730,7 @@ void ov16_0226737C (Healthbar * param0) NNSG2dImageProxy * v1; void * v2; - switch (param0->unk_25) { + switch (param0->type) { case 2: case 4: break; @@ -680,23 +745,23 @@ void ov16_0226737C (Healthbar * param0) if (param0->unk_4F_3 == 1) { v0 = ov16_02268250(70); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->unk_25].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->type].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); v0 = ov16_02268250(71); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->unk_25].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); v0 = ov16_02268250(69); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3D4[param0->unk_25].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3D4[param0->unk_25].unk_02); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3D4[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3D4[param0->type].unk_02); Healthbar_Draw(param0, param0->unk_28, (1 << 1) | (1 << 2)); } else { v0 = ov16_02268250(66); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->unk_25].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F374[param0->unk_25].unk_02); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F374[param0->type].unk_02); v0 = ov16_02268250(68); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->unk_25].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3A4[param0->unk_25].unk_02); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3A4[param0->type].unk_02); v0 = ov16_02268250(38); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->unk_25].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); Healthbar_Draw(param0, param0->unk_28, (1 << 0)); } @@ -844,111 +909,120 @@ void Healthbar_Enable(Healthbar *battleSys, BOOL enable) Healthbar_EnableArrow(battleSys, enable); } -void ov16_0226763C (Healthbar * param0, int param1, int param2) +void Healthbar_OffsetPositionXY(Healthbar *healthbar, int x, int y) { - const SpriteTemplate * v0; - - GF_ASSERT(param0->mainActor != NULL); - v0 = ov16_022682B0(param0->unk_25); - - SpriteActor_SetPositionXY(param0->mainActor->unk_00, v0->x + param1, v0->y + param2); + GF_ASSERT(healthbar->mainActor != NULL); + const SpriteTemplate *template = Healthbar_SpriteTemplate(healthbar->type); - if (param0->arrowActor != NULL) { - SpriteActor_SetPositionXY(param0->arrowActor->unk_00, v0->x + param1 - Unk_ov16_0226F334[param0->unk_25], v0->y + param2 + 0); + SpriteActor_SetPositionXY(healthbar->mainActor->unk_00, template->x + x, template->y + y); + if (healthbar->arrowActor != NULL) { + SpriteActor_SetPositionXY(healthbar->arrowActor->unk_00, + template->x + x - sArrowOffsetX[healthbar->type], + template->y + y + 0); } } -void Healthbar_SetScrollEffect (Healthbar * param0, int param1) +void Healthbar_Scroll(Healthbar *healthbar, enum HealthbarScrollDirection direction) { - GF_ASSERT(param0 != NULL); - GF_ASSERT(param0->mainActor != NULL); - - param0->unk_4F_1 = 0; - param0->unk_4F_0 = param1; - - if (param1 == 0) { - switch (param0->unk_25) { - case 0: - case 2: - case 4: - case 6: - case 7: - ov16_0226763C(param0, 160, 0); + GF_ASSERT(healthbar != NULL); + GF_ASSERT(healthbar->mainActor != NULL); + + healthbar->doneScrolling = 0; + healthbar->scrollDirection = direction; + + if (direction == HEALTHBAR_SCROLL_IN) { + switch (healthbar->type) { + case HEALTHBAR_TYPE_PLAYER_SOLO: + case HEALTHBAR_TYPE_PLAYER_SLOT_1: + case HEALTHBAR_TYPE_PLAYER_SLOT_2: + case HEALTHBAR_TYPE_SAFARI_ZONE: + case HEALTHBAR_TYPE_PAL_PARK: + // Player-side healthbar + Healthbar_OffsetPositionXY(healthbar, HEALTHBAR_SCROLL_OUT_OFFSET, 0); break; + default: - ov16_0226763C(param0, -160, 0); + // Enemy-side healthbar + Healthbar_OffsetPositionXY(healthbar, -HEALTHBAR_SCROLL_OUT_OFFSET, 0); break; } } else { - ov16_0226763C(param0, 0, 0); + Healthbar_OffsetPositionXY(healthbar, 0, 0); } - SysTask_Start(ov16_0226774C, param0, 990); + SysTask_Start(ScrollHealthbarTask, healthbar, 990); } -static void ov16_0226774C (SysTask * param0, void * param1) +/** + * @brief Scroll the healthbar in or out by the configured scroll-speed value. + * + * @param task + * @param data + */ +static void ScrollHealthbarTask(SysTask *task, void *data) { - Healthbar * v0 = param1; - s16 v1, v2; - const SpriteTemplate * v3; - int v4; - - v4 = 0; - v3 = ov16_022682B0(v0->unk_25); - - SpriteActor_GetSpritePositionXY(v0->mainActor, &v1, &v2); - - switch (v0->unk_25) { - case 0: - case 2: - case 4: - case 6: - case 7: - if (v0->unk_4F_0 == 0) { - v1 -= 24; - - if (v1 < v3->x) { - v1 = v3->x; - v4++; + Healthbar *healthbar = data; + int done = 0; + const SpriteTemplate *template = Healthbar_SpriteTemplate(healthbar->type); + + s16 x, y; + SpriteActor_GetSpritePositionXY(healthbar->mainActor, &x, &y); + + // Determine new X and Y based on the type of healthbar + switch (healthbar->type) { + case HEALTHBAR_TYPE_PLAYER_SOLO: + case HEALTHBAR_TYPE_PLAYER_SLOT_1: + case HEALTHBAR_TYPE_PLAYER_SLOT_2: + case HEALTHBAR_TYPE_SAFARI_ZONE: + case HEALTHBAR_TYPE_PAL_PARK: + // Player-side healthbar + if (healthbar->scrollDirection == HEALTHBAR_SCROLL_IN) { + x -= HEALTHBAR_SCROLL_SPEED; + + if (x < template->x) { + x = template->x; + done++; } } else { - v1 += 24; + x += HEALTHBAR_SCROLL_SPEED; - if (v1 > v3->x + 160) { - v1 = v3->x + 160; - v4++; + if (x > template->x + HEALTHBAR_SCROLL_OUT_OFFSET) { + x = template->x + HEALTHBAR_SCROLL_OUT_OFFSET; + done++; } } break; + default: - if (v0->unk_4F_0 == 0) { - v1 += 24; + // Enemy-side healthbar + if (healthbar->scrollDirection == HEALTHBAR_SCROLL_IN) { + x += HEALTHBAR_SCROLL_SPEED; - if (v1 > v3->x) { - v1 = v3->x; - v4++; + if (x > template->x) { + x = template->x; + done++; } } else { - v1 -= 24; + x -= HEALTHBAR_SCROLL_SPEED; - if (v1 < v3->x - 24) { - v1 = v3->x - 24; - v4++; + if (x < template->x - HEALTHBAR_SCROLL_SPEED) { + x = template->x - HEALTHBAR_SCROLL_SPEED; + done++; } } break; } - SpriteActor_SetSpritePositionXY(v0->mainActor, v1, v2); - - if (v0->arrowActor != NULL) { - SpriteActor_SetSpritePositionXY(v0->arrowActor, v1 - Unk_ov16_0226F334[v0->unk_25], v2 + 0); + // Update positions of the sprites on the screen + SpriteActor_SetSpritePositionXY(healthbar->mainActor, x, y); + if (healthbar->arrowActor != NULL) { + SpriteActor_SetSpritePositionXY(healthbar->arrowActor, x - sArrowOffsetX[healthbar->type], y + 0); } - if (v4 > 0) { - v0->unk_4F_1 = 1; - SysTask_Done(param0); - return; + // If the sprites are now in position, we're done + if (done > 0) { + healthbar->doneScrolling = TRUE; + SysTask_Done(task); } } @@ -988,11 +1062,11 @@ static void ov16_02267864 (Healthbar * param0) v11 = v1; v12 = &v1[8 * 0x20]; - MI_CpuCopy16(v11, (void *)((u32)v10 + Unk_ov16_0226F64C[param0->unk_25][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->unk_25][0].unk_02); - MI_CpuCopy16(v12, (void *)((u32)v10 + Unk_ov16_0226F64C[param0->unk_25][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->unk_25][1].unk_02); + MI_CpuCopy16(v11, (void *)((u32)v10 + Unk_ov16_0226F64C[param0->type][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->type][0].unk_02); + MI_CpuCopy16(v12, (void *)((u32)v10 + Unk_ov16_0226F64C[param0->type][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->type][1].unk_02); - MI_CpuCopy16(&v11[Unk_ov16_0226F64C[param0->unk_25][0].unk_02], (void *)((u32)v10 + Unk_ov16_0226F64C[param0->unk_25][2].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->unk_25][2].unk_02); - MI_CpuCopy16(&v12[Unk_ov16_0226F64C[param0->unk_25][1].unk_02], (void *)((u32)v10 + Unk_ov16_0226F64C[param0->unk_25][3].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->unk_25][3].unk_02); + MI_CpuCopy16(&v11[Unk_ov16_0226F64C[param0->type][0].unk_02], (void *)((u32)v10 + Unk_ov16_0226F64C[param0->type][2].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->type][2].unk_02); + MI_CpuCopy16(&v12[Unk_ov16_0226F64C[param0->type][1].unk_02], (void *)((u32)v10 + Unk_ov16_0226F64C[param0->type][3].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->type][3].unk_02); } BGL_DeleteWindow(&v3); @@ -1027,8 +1101,8 @@ static void ov16_022679C8 (Healthbar * param0) v5 = G2_GetOBJCharPtr(); v0 = sub_02021F98(param0->mainActor->unk_00); - MI_CpuCopy16(v2, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->unk_25][0].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->unk_25][0].unk_02); - MI_CpuCopy16(v1, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->unk_25][1].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->unk_25][1].unk_02); + MI_CpuCopy16(v2, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->type][0].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->type][0].unk_02); + MI_CpuCopy16(v1, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->type][1].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->type][1].unk_02); } } @@ -1052,8 +1126,8 @@ static void ov16_02267A4C (Healthbar * param0) v7 = G2_GetOBJCharPtr(); v2 = sub_02021F98(param0->mainActor->unk_00); - MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->unk_25][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), v1, Unk_ov16_0226F3EC[param0->unk_25][0].unk_02); - MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->unk_25][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), &v1[v3], Unk_ov16_0226F3EC[param0->unk_25][1].unk_02); + MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), v1, Unk_ov16_0226F3EC[param0->type][0].unk_02); + MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), &v1[v3], Unk_ov16_0226F3EC[param0->type][1].unk_02); v6 = 0; @@ -1070,8 +1144,8 @@ static void ov16_02267A4C (Healthbar * param0) v8 = v1; v9 = &v1[v3]; - MI_CpuCopy16(v8, (void *)((u32)v7 + Unk_ov16_0226F3EC[param0->unk_25][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3EC[param0->unk_25][0].unk_02); - MI_CpuCopy16(v9, (void *)((u32)v7 + Unk_ov16_0226F3EC[param0->unk_25][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3EC[param0->unk_25][1].unk_02); + MI_CpuCopy16(v8, (void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3EC[param0->type][0].unk_02); + MI_CpuCopy16(v9, (void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3EC[param0->type][1].unk_02); } Heap_FreeToHeap(v0); @@ -1096,8 +1170,8 @@ static void ov16_02267B6C (Healthbar * param0, u32 param1) v1 = sub_02021F98(param0->mainActor->unk_00); v3 = v0; - MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F41C[param0->unk_25][0].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->unk_25][0].unk_02); - MI_CpuCopy16(&v3[Unk_ov16_0226F41C[param0->unk_25][0].unk_02], (void *)((u32)v2 + Unk_ov16_0226F41C[param0->unk_25][1].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->unk_25][1].unk_02); + MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F41C[param0->type][0].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->type][0].unk_02); + MI_CpuCopy16(&v3[Unk_ov16_0226F41C[param0->type][0].unk_02], (void *)((u32)v2 + Unk_ov16_0226F41C[param0->type][1].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->type][1].unk_02); } Heap_FreeToHeap(v0); @@ -1121,7 +1195,7 @@ static void ov16_02267BF8 (Healthbar * param0) v1 = sub_02021F98(param0->mainActor->unk_00); v3 = v0; - MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F3BC[param0->unk_25].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3BC[param0->unk_25].unk_02); + MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F3BC[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3BC[param0->type].unk_02); } Heap_FreeToHeap(v0); @@ -1144,7 +1218,7 @@ static void ov16_02267C58 (Healthbar * param0) v2 = G2_GetOBJCharPtr(); v0 = sub_02021F98(param0->mainActor->unk_00); - MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F38C[param0->unk_25].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F38C[param0->unk_25].unk_02); + MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F38C[param0->type].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F38C[param0->type].unk_02); } } @@ -1161,7 +1235,7 @@ static void ov16_02267CA8 (Healthbar * param0, int param1) v2 = G2_GetOBJCharPtr(); v0 = sub_02021F98(param0->mainActor->unk_00); - MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F35C[param0->unk_25].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F35C[param0->unk_25].unk_02); + MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F35C[param0->type].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F35C[param0->type].unk_02); } } @@ -1330,13 +1404,13 @@ static void ov16_02267F70 (Healthbar * param0, u8 param1) } v6 = ov16_02268250(v3); - v9 = Unk_ov16_0226F44C[param0->unk_25][0].unk_02 / 0x20; + v9 = Unk_ov16_0226F44C[param0->type][0].unk_02 / 0x20; for (v0 = 0; v0 < 6; v0++) { if (v0 < v9) { - MI_CpuCopy16(v6 + (v1[v0] << 5), (void *)((u32)v7 + Unk_ov16_0226F44C[param0->unk_25][0].unk_00 + (v0 * 0x20) + v8->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v6 + (v1[v0] << 5), (void *)((u32)v7 + Unk_ov16_0226F44C[param0->type][0].unk_00 + (v0 * 0x20) + v8->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); } else { - MI_CpuCopy16(v6 + (v1[v0] << 5), (void *)((u32)v7 + Unk_ov16_0226F44C[param0->unk_25][1].unk_00 + ((v0 - v9) * 0x20) + v8->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v6 + (v1[v0] << 5), (void *)((u32)v7 + Unk_ov16_0226F44C[param0->type][1].unk_00 + ((v0 - v9) * 0x20) + v8->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); } } break; @@ -1551,39 +1625,42 @@ u8 Healthbar_Type(int battlerType, u32 battleType) } } -static const SpriteTemplate * ov16_022682B0 (u8 param0) +/** + * @brief Grab the sprite template that applies to a given healthbar type. + * + * @param type The healthbar type. See enum HealthbarType for accepted values. + * @return Address of the SpriteTemplate struct which applies to this + * healthbar type. + */ +static const SpriteTemplate* Healthbar_SpriteTemplate(u8 type) { - const SpriteTemplate * v0; + switch (type) { + case HEALTHBAR_TYPE_PLAYER_SOLO: + return &sHealthbarTemplate_SoloPlayer; + + case HEALTHBAR_TYPE_ENEMY_SOLO: + return &sHealthbarTemplate_SoloEnemy; + + case HEALTHBAR_TYPE_PLAYER_SLOT_1: + return &sHealthbarTemplate_PlayerSlot1; + + case HEALTHBAR_TYPE_ENEMY_SLOT_1: + return &sHealthbarTemplate_EnemySlot1; + + case HEALTHBAR_TYPE_PLAYER_SLOT_2: + return &sHealthbarTemplate_PlayerSlot2; + + case HEALTHBAR_TYPE_ENEMY_SLOT_2: + return &sHealthbarTemplate_EnemySlot2; + + case HEALTHBAR_TYPE_SAFARI_ZONE: + case HEALTHBAR_TYPE_PAL_PARK: + return &sHealthbarTemplate_NoPlayerMon; - switch (param0) { - case 0: - v0 = &Unk_ov16_0226F5B0; - break; - case 1: - v0 = &Unk_ov16_0226F5E4; - break; - case 2: - v0 = &Unk_ov16_0226F4AC; - break; - case 3: - v0 = &Unk_ov16_0226F4E0; - break; - case 4: - v0 = &Unk_ov16_0226F548; - break; - case 5: - v0 = &Unk_ov16_0226F618; - break; - case 6: - case 7: - v0 = &Unk_ov16_0226F57C; - break; default: - GF_ASSERT(0); + GF_ASSERT(FALSE); return NULL; } - - return v0; } static const SpriteTemplate * ov16_02268314 (u8 param0) @@ -1702,7 +1779,7 @@ void ov16_02268498 (Healthbar * param0) } param0->unk_54 = 0; - ov16_0226763C(param0, 0, 0); + Healthbar_OffsetPositionXY(param0, 0, 0); } static void ov16_022684BC (SysTask * param0, void * param1) @@ -1717,5 +1794,5 @@ static void ov16_022684BC (SysTask * param0, void * param1) } v1 = FX_Mul(sub_0201D15C(v0->unk_54), 0x1800) / FX32_ONE; - ov16_0226763C(v0, 0, v1); + Healthbar_OffsetPositionXY(v0, 0, v1); } diff --git a/src/overlay016/ov16_0223DF00.c b/src/overlay016/ov16_0223DF00.c index 7a645a3dd0..16988d29b4 100644 --- a/src/overlay016/ov16_0223DF00.c +++ b/src/overlay016/ov16_0223DF00.c @@ -1373,7 +1373,7 @@ void ov16_0223F36C (BattleSystem * param0) v1 = ov16_02263B08(param0->battlers[v0]); v1->battleSys = param0; - v1->unk_25 = Healthbar_Type(Battler_Type(param0->battlers[v0]), BattleSystem_BattleType(param0)); + v1->type = Healthbar_Type(Battler_Type(param0->battlers[v0]), BattleSystem_BattleType(param0)); ov16_022672C4(v1); Healthbar_Enable(v1, 0); From b7abc09f4d26ea930ddd6c6cdd8dc5bbebe6d28c Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 21:52:22 -0800 Subject: [PATCH 11/16] Document Healthbar_DrawInfo --- include/battle/healthbar.h | 33 +++++- include/overlay016/struct_ov16_022674C4.h | 4 +- src/overlay016/battle_display.c | 20 ++-- src/overlay016/healthbar.c | 137 ++++++++++++---------- 4 files changed, 116 insertions(+), 78 deletions(-) diff --git a/include/battle/healthbar.h b/include/battle/healthbar.h index 399843468f..aa2643fba7 100644 --- a/include/battle/healthbar.h +++ b/include/battle/healthbar.h @@ -8,6 +8,28 @@ #include "struct_decls/cell_actor_data.h" #include "overlay016/struct_ov16_022674C4.h" +#define HEALTHBAR_INFO_NONE 0 +#define HEALTHBAR_INFO_HP_GAUGE (1 << 0) +#define HEALTHBAR_INFO_CURRENT_HP (1 << 1) +#define HEALTHBAR_INFO_MAX_HP (1 << 2) +#define HEALTHBAR_INFO_LEVEL (1 << 3) +#define HEALTHBAR_INFO_NAME (1 << 4) +#define HEALTHBAR_INFO_EXP_GAUGE (1 << 5) +#define HEALTHBAR_INFO_GENDER (1 << 6) +#define HEALTHBAR_INFO_LEVEL_TEXT (1 << 7) +#define HEALTHBAR_INFO_STATUS (1 << 8) +#define HEALTHBAR_INFO_CAUGHT_SPECIES (1 << 9) +#define HEALTHBAR_INFO_COUNT_SAFARI_BALLS (1 << 10) +#define HEALTHBAR_INFO_REMAINING_SAFARI_BALLS (1 << 11) +#define HEALTHBAR_INFO_COUNT_PARK_BALLS (1 << 12) +#define HEALTHBAR_INFO_REMAINING_PARK_BALLS (1 << 13) + +#define HEALTHBAR_INFO_ALL ~0 + +#define HEALTHBAR_INFO_ALL_SAFARI (HEALTHBAR_INFO_COUNT_SAFARI_BALLS | HEALTHBAR_INFO_REMAINING_SAFARI_BALLS) +#define HEALTHBAR_INFO_ALL_PARK (HEALTHBAR_INFO_COUNT_PARK_BALLS | HEALTHBAR_INFO_REMAINING_PARK_BALLS) +#define HEALTHBAR_INFO_NOT_ON_ENEMY (HEALTHBAR_INFO_CURRENT_HP | HEALTHBAR_INFO_MAX_HP | HEALTHBAR_INFO_EXP_GAUGE) + enum HealthbarType { HEALTHBAR_TYPE_PLAYER_SOLO = 0, HEALTHBAR_TYPE_ENEMY_SOLO, @@ -26,7 +48,16 @@ enum HealthbarScrollDirection { void ov16_02266F1C(SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4); CellActorData * ov16_02267060(SpriteRenderer * param0, SpriteGfxHandler * param1, int param2); -void Healthbar_Draw(Healthbar * param0, u32 param1, u32 param2); + +/** + * @brief Draw the informational parts of the healthbar, according to a set + * of input flags which control exactly what components to draw. + * + * @param healthbar + * @param hp + * @param flags The components to be drawn, as a bitmask. + */ +void Healthbar_DrawInfo(Healthbar *healthbar, u32 hp, u32 flags); void ov16_02267220(Healthbar * param0); void ov16_02267258(Healthbar * param0); void ov16_022672C4(Healthbar * param0); diff --git a/include/overlay016/struct_ov16_022674C4.h b/include/overlay016/struct_ov16_022674C4.h index 3899c3e117..9f4d044a59 100644 --- a/include/overlay016/struct_ov16_022674C4.h +++ b/include/overlay016/struct_ov16_022674C4.h @@ -27,7 +27,7 @@ typedef struct { s32 unk_44; u8 unk_48; u8 unk_49; - u8 unk_4A; + u8 status; u8 unk_4B; u8 unk_4C; u8 unk_4D; @@ -35,7 +35,7 @@ typedef struct { u8 scrollDirection : 1; u8 doneScrolling : 1; u8 unk_4F_2 : 1; - u8 unk_4F_3 : 1; + u8 numberMode : 1; u8 : 4; SysTask * unk_50; u16 unk_54; diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index a1b73ecf79..991c50d624 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -637,13 +637,13 @@ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battle healthbar->unk_38 = healthbarData->expFromLastLevel; healthbar->unk_3C = healthbarData->expToNextLevel; healthbar->unk_26 = healthbarData->selectedPartySlot; - healthbar->unk_4A = healthbarData->status; + healthbar->status = healthbarData->status; healthbar->unk_4B = healthbarData->speciesCaught; healthbar->unk_4D = healthbarData->delay; healthbar->unk_27 = healthbarData->numSafariBalls; Healthbar_Enable(healthbar, FALSE); - Healthbar_Draw(healthbar, healthbar->unk_28, 0xffffffff); + Healthbar_DrawInfo(healthbar, healthbar->unk_28, HEALTHBAR_INFO_ALL); healthbar->unk_10 = SysTask_Start(SlideHealthbarInTask, healthbar, 1000); } @@ -1075,9 +1075,9 @@ void ov16_0225DD44 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ { GF_ASSERT(param1->healthbar.mainActor != NULL); - param1->healthbar.unk_4A = param2->unk_01; + param1->healthbar.status = param2->unk_01; - Healthbar_Draw(¶m1->healthbar, param1->healthbar.unk_28, (1 << 8)); + Healthbar_DrawInfo(¶m1->healthbar, param1->healthbar.unk_28, HEALTHBAR_INFO_STATUS); ClearCommand(param0, param1->battler, param2->unk_00); } @@ -1236,11 +1236,11 @@ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_38 = param2->unk_08; v0->unk_3C = param2->unk_0C; v0->unk_26 = param2->unk_06; - v0->unk_4A = param2->unk_07_0; + v0->status = param2->unk_07_0; v0->unk_4B = param2->unk_07_7; v0->unk_27 = param2->unk_10; - Healthbar_Draw(v0, v0->unk_28, 0xffffffff ^ (1 << 5)); + Healthbar_DrawInfo(v0, v0->unk_28, ~HEALTHBAR_INFO_EXP_GAUGE); ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); } @@ -3974,7 +3974,7 @@ static void ov16_022611DC (SysTask * param0, void * param1) v18->unk_30 = v0->unk_08->unk_04->unk_20; if (Pokemon_GetValue(v19, MON_DATA_STATUS_CONDITION, NULL) == 0) { - v18->unk_4A = 0; + v18->status = 0; } ov16_022674C4(v18, v18->unk_30); @@ -3990,7 +3990,7 @@ static void ov16_022611DC (SysTask * param0, void * param1) v22 = ov16_0223F35C(v0->unk_00, v23); if (ov16_022674F8(v22) == -1) { - Healthbar_Draw(v22, NULL, (1 << 8)); + Healthbar_DrawInfo(v22, NULL, HEALTHBAR_INFO_STATUS); v0->unk_0E++; } } @@ -4038,10 +4038,10 @@ static void ov16_022611DC (SysTask * param0, void * param1) v33 = BattleSystem_PartyPokemon(v0->unk_00, v28, v34); if (Pokemon_GetValue(v33, MON_DATA_STATUS_CONDITION, NULL) == 0) { - v27->unk_4A = 0; + v27->status = 0; } - Healthbar_Draw(v27, v27->unk_28, (1 << 8)); + Healthbar_DrawInfo(v27, v27->unk_28, HEALTHBAR_INFO_STATUS); v30.tags = 2; v30.params[0] = v28 | (v0->unk_08->unk_0C[v28] << 8); diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index 0634026ea8..895ad1e5e5 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -517,116 +517,123 @@ CellActorData * ov16_02267060 (SpriteRenderer * param0, SpriteGfxHandler * param return v1; } -void Healthbar_Draw (Healthbar * param0, u32 param1, u32 param2) +void Healthbar_DrawInfo(Healthbar *healthbar, u32 hp, u32 flags) { - int v0 = 0; - u32 v1; + BOOL caughtSpecies = FALSE; - GF_ASSERT(param0->mainActor != NULL); + GF_ASSERT(healthbar->mainActor != NULL); - v1 = param2; + u32 flagsCopy = flags; - if (param0->type == 6) { - param2 &= ((1 << 10) | (1 << 11)); - } else if (param0->type == 7) { - param2 &= ((1 << 12) | (1 << 13)); + if (healthbar->type == HEALTHBAR_TYPE_SAFARI_ZONE) { + flags &= HEALTHBAR_INFO_ALL_SAFARI; + } else if (healthbar->type == HEALTHBAR_TYPE_PAL_PARK) { + flags &= HEALTHBAR_INFO_ALL_PARK; } else { - param2 &= 0xffffffff ^ (((1 << 10) | (1 << 11)) | ((1 << 12) | (1 << 13))); + flags &= ~(HEALTHBAR_INFO_ALL_SAFARI | HEALTHBAR_INFO_ALL_PARK); } - switch (param0->type) { - case 1: - case 3: - case 5: - param2 &= 0xffffffff ^ ((1 << 1) | (1 << 2) | (1 << 5)); - v0 = 1; + switch (healthbar->type) { + case HEALTHBAR_TYPE_ENEMY_SOLO: + case HEALTHBAR_TYPE_ENEMY_SLOT_1: + case HEALTHBAR_TYPE_ENEMY_SLOT_2: + // Never display current HP, max HP, or the EXP bar on an enemy healthbar + flags &= ~HEALTHBAR_INFO_NOT_ON_ENEMY; + caughtSpecies = TRUE; break; - case 2: - case 4: - param2 &= 0xffffffff ^ ((1 << 5) | (1 << 9)); - if (param0->unk_4F_3 == 0) { - param2 &= 0xffffffff ^ ((1 << 1) | (1 << 2)); + case HEALTHBAR_TYPE_PLAYER_SLOT_1: + case HEALTHBAR_TYPE_PLAYER_SLOT_2: + // Never display the EXP bar in doubles + flags &= ~(HEALTHBAR_INFO_EXP_GAUGE | HEALTHBAR_INFO_CAUGHT_SPECIES); + + // Allow toggling between showing the HP bar and raw current/max numbers + if (healthbar->numberMode == FALSE) { + flags &= ~(HEALTHBAR_INFO_CURRENT_HP | HEALTHBAR_INFO_MAX_HP); } else { - param2 &= 0xffffffff ^ ((1 << 0)); + flags &= ~HEALTHBAR_INFO_HP_GAUGE; } break; - case 0: - param2 &= 0xffffffff ^ ((1 << 9)); + + case HEALTHBAR_TYPE_PLAYER_SOLO: + // Never show the pokeball icon on a player's healthbar for a captured species + flags &= ~HEALTHBAR_INFO_CAUGHT_SPECIES; break; - case 6: - case 7: + + case HEALTHBAR_TYPE_SAFARI_ZONE: + case HEALTHBAR_TYPE_PAL_PARK: break; } - if (BattleSystem_BattleType(param0->battleSys) & 0x1) { - param2 &= 0xffffffff ^ ((1 << 9)); + if (BattleSystem_BattleType(healthbar->battleSys) & BATTLE_TYPE_TRAINER) { + // Never show the pokeball icon on an enemy trainer's healthbar + flags &= ~HEALTHBAR_INFO_CAUGHT_SPECIES; } - if (param2 & (1 << 0)) { - ov16_022674C4(param0, 0); - ov16_02267EDC(param0, 0); + if (flags & HEALTHBAR_INFO_HP_GAUGE) { + ov16_022674C4(healthbar, 0); + ov16_02267EDC(healthbar, 0); } - if (param2 & (1 << 1)) { - ov16_02267B6C(param0, param1); + if (flags & HEALTHBAR_INFO_CURRENT_HP) { + ov16_02267B6C(healthbar, hp); } - if (param2 & (1 << 2)) { - ov16_02267BF8(param0); + if (flags & HEALTHBAR_INFO_MAX_HP) { + ov16_02267BF8(healthbar); } - if ((param2 & (1 << 7)) || (param2 & (1 << 6))) { - ov16_022679C8(param0); + if ((flags & HEALTHBAR_INFO_LEVEL_TEXT) || (flags & HEALTHBAR_INFO_GENDER)) { + ov16_022679C8(healthbar); } - if (param2 & (1 << 3)) { - ov16_02267A4C(param0); + if (flags & HEALTHBAR_INFO_LEVEL) { + ov16_02267A4C(healthbar); } - if (param2 & (1 << 4)) { - ov16_02267864(param0); + if (flags & HEALTHBAR_INFO_NAME) { + ov16_02267864(healthbar); } - if (param2 & (1 << 5)) { - ov16_0226752C(param0, 0); - ov16_02267EDC(param0, 1); + if (flags & HEALTHBAR_INFO_EXP_GAUGE) { + ov16_0226752C(healthbar, 0); + ov16_02267EDC(healthbar, 1); } - if (param2 & (1 << 9)) { - ov16_02267C58(param0); + if (flags & HEALTHBAR_INFO_CAUGHT_SPECIES) { + ov16_02267C58(healthbar); } - if (param2 & (1 << 8)) { - switch (param0->unk_4A) { + if (flags & HEALTHBAR_INFO_STATUS) { + switch (healthbar->status) { default: case 0: - ov16_02267CA8(param0, 38); + ov16_02267CA8(healthbar, 38); break; case 1: - ov16_02267CA8(param0, 47); + ov16_02267CA8(healthbar, 47); break; case 2: - ov16_02267CA8(param0, 50); + ov16_02267CA8(healthbar, 50); break; case 3: - ov16_02267CA8(param0, 53); + ov16_02267CA8(healthbar, 53); break; case 4: - ov16_02267CA8(param0, 44); + ov16_02267CA8(healthbar, 44); break; case 5: - ov16_02267CA8(param0, 41); + ov16_02267CA8(healthbar, 41); break; } } - if (param2 & ((1 << 10) | (1 << 12))) { - ov16_02267CE8(param0, param2); + if (flags & (HEALTHBAR_INFO_COUNT_SAFARI_BALLS | HEALTHBAR_INFO_COUNT_PARK_BALLS)) { + ov16_02267CE8(healthbar, flags); } - if (param2 & ((1 << 11) | (1 << 13))) { - ov16_02267DC4(param0, param2); + if (flags & (HEALTHBAR_INFO_REMAINING_SAFARI_BALLS | HEALTHBAR_INFO_REMAINING_PARK_BALLS)) { + ov16_02267DC4(healthbar, flags); } } @@ -738,12 +745,12 @@ void ov16_0226737C (Healthbar * param0) return; } - param0->unk_4F_3 ^= 1; + param0->numberMode ^= 1; v2 = G2_GetOBJCharPtr(); v1 = sub_02021F98(param0->mainActor->unk_00); - if (param0->unk_4F_3 == 1) { + if (param0->numberMode == 1) { v0 = ov16_02268250(70); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->type].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); v0 = ov16_02268250(71); @@ -752,7 +759,7 @@ void ov16_0226737C (Healthbar * param0) v0 = ov16_02268250(69); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3D4[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3D4[param0->type].unk_02); - Healthbar_Draw(param0, param0->unk_28, (1 << 1) | (1 << 2)); + Healthbar_DrawInfo(param0, param0->unk_28, HEALTHBAR_INFO_CURRENT_HP | HEALTHBAR_INFO_MAX_HP); } else { v0 = ov16_02268250(66); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F374[param0->type].unk_02); @@ -763,7 +770,7 @@ void ov16_0226737C (Healthbar * param0) v0 = ov16_02268250(38); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); - Healthbar_Draw(param0, param0->unk_28, (1 << 0)); + Healthbar_DrawInfo(param0, param0->unk_28, HEALTHBAR_INFO_HP_GAUGE); } } @@ -798,9 +805,9 @@ s32 ov16_022674F8 (Healthbar * param0) if (v0 == -1) { param0->unk_28 -= param0->unk_30; - Healthbar_Draw(param0, param0->unk_28, (1 << 1)); + Healthbar_DrawInfo(param0, param0->unk_28, HEALTHBAR_INFO_CURRENT_HP); } else { - Healthbar_Draw(param0, v0, (1 << 1)); + Healthbar_DrawInfo(param0, v0, HEALTHBAR_INFO_CURRENT_HP); } return v0; @@ -1348,7 +1355,7 @@ static s32 ov16_02267EDC (Healthbar * param0, int param1) v0 = ov16_022680D8(param0->unk_3C, param0->unk_38, param0->unk_40, ¶m0->unk_44, 12, v1); } - if ((param1 == 0) && (param0->unk_4F_3 == 1)) { + if ((param1 == 0) && (param0->numberMode == 1)) { (void)0; } else { ov16_02267F70(param0, param1); From 72f8e8be5601453cafdc0696a3c71a3bd322203c Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 22:42:31 -0800 Subject: [PATCH 12/16] Clean up Healthbar_DrawGauge --- include/battle/healthbar.h | 20 ++- include/overlay016/struct_ov16_022674C4.h | 16 +-- src/overlay016/battle_display.c | 56 ++++---- src/overlay016/healthbar.c | 155 +++++++++++----------- src/overlay016/ov16_0223B140.c | 2 +- src/overlay016/ov16_0223DF00.c | 2 +- 6 files changed, 137 insertions(+), 114 deletions(-) diff --git a/include/battle/healthbar.h b/include/battle/healthbar.h index aa2643fba7..487945548f 100644 --- a/include/battle/healthbar.h +++ b/include/battle/healthbar.h @@ -46,6 +46,11 @@ enum HealthbarScrollDirection { HEALTHBAR_SCROLL_OUT, }; +enum HealthbarGaugeType { + HEALTHBAR_GAUGE_HP = 0, + HEALTHBAR_GAUGE_EXP, +}; + void ov16_02266F1C(SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4); CellActorData * ov16_02267060(SpriteRenderer * param0, SpriteGfxHandler * param1, int param2); @@ -54,7 +59,7 @@ CellActorData * ov16_02267060(SpriteRenderer * param0, SpriteGfxHandler * param1 * of input flags which control exactly what components to draw. * * @param healthbar - * @param hp + * @param hp The battler's current HP * @param flags The components to be drawn, as a bitmask. */ void Healthbar_DrawInfo(Healthbar *healthbar, u32 hp, u32 flags); @@ -63,7 +68,18 @@ void ov16_02267258(Healthbar * param0); void ov16_022672C4(Healthbar * param0); void ov16_02267360(Healthbar * param0); void ov16_0226737C(Healthbar * param0); -void ov16_022674C4(Healthbar * param0, int param1); + +/** + * @brief Compute the battler's new HP after taking a given amount of + * damage or restoring a certain amount of health. Additionally, cache + * this difference, flooring it to the bounds of the battler's current + * and maximum HP. + * + * @param healthbar + * @param damage The amount of damage dealt to a battler. Negative + * values are damage, positive values are recovery. + */ +void Healthbar_CalcHP(Healthbar *healthbar, int damage); s32 ov16_022674F8(Healthbar * param0); void ov16_0226752C(Healthbar * param0, int param1); s32 ov16_02267560(Healthbar * param0); diff --git a/include/overlay016/struct_ov16_022674C4.h b/include/overlay016/struct_ov16_022674C4.h index 9f4d044a59..3cf28b5e76 100644 --- a/include/overlay016/struct_ov16_022674C4.h +++ b/include/overlay016/struct_ov16_022674C4.h @@ -17,14 +17,14 @@ typedef struct { u8 type; u8 unk_26; u8 unk_27; - s32 unk_28; - s32 unk_2C; - s32 unk_30; - s32 unk_34; - s32 unk_38; - s32 unk_3C; - s32 unk_40; - s32 unk_44; + s32 curHP; + s32 maxHP; + s32 damage; + s32 hpTemp; + s32 curExp; + s32 maxExp; + s32 expReward; + s32 expTemp; u8 unk_48; u8 unk_49; u8 status; diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index 991c50d624..429e127f53 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -629,13 +629,13 @@ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battle healthbar->unk_24 = battlerData->battler; healthbar->type = Healthbar_Type(battlerData->battlerType, BattleSystem_BattleType(battleSys)); healthbar->unk_4C = healthbarData->command; - healthbar->unk_28 = healthbarData->curHP; - healthbar->unk_2C = healthbarData->maxHP; + healthbar->curHP = healthbarData->curHP; + healthbar->maxHP = healthbarData->maxHP; healthbar->unk_48 = healthbarData->level; healthbar->unk_49 = healthbarData->gender; - healthbar->unk_30 = 0; - healthbar->unk_38 = healthbarData->expFromLastLevel; - healthbar->unk_3C = healthbarData->expToNextLevel; + healthbar->damage = 0; + healthbar->curExp = healthbarData->expFromLastLevel; + healthbar->maxExp = healthbarData->expToNextLevel; healthbar->unk_26 = healthbarData->selectedPartySlot; healthbar->status = healthbarData->status; healthbar->unk_4B = healthbarData->speciesCaught; @@ -643,7 +643,7 @@ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battle healthbar->unk_27 = healthbarData->numSafariBalls; Healthbar_Enable(healthbar, FALSE); - Healthbar_DrawInfo(healthbar, healthbar->unk_28, HEALTHBAR_INFO_ALL); + Healthbar_DrawInfo(healthbar, healthbar->curHP, HEALTHBAR_INFO_ALL); healthbar->unk_10 = SysTask_Start(SlideHealthbarInTask, healthbar, 1000); } @@ -942,14 +942,14 @@ void ov16_0225DA74 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_4C = param2->unk_00; v0->unk_24 = param1->battler; v0->type = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); - v0->unk_28 = param2->unk_02; - v0->unk_2C = param2->unk_04; - v0->unk_30 = param2->unk_08; + v0->curHP = param2->unk_02; + v0->maxHP = param2->unk_04; + v0->damage = param2->unk_08; v0->unk_48 = param2->unk_01; if (param2->unk_08 == 0x7fff) { - v0->unk_28 = 0; - v0->unk_30 = 0; + v0->curHP = 0; + v0->damage = 0; } v0->unk_10 = SysTask_Start(ov16_02262988, v0, 1000); @@ -968,9 +968,9 @@ void ov16_0225DB00 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov v0->battleSys = param0; v0->unk_4C = param2->unk_00; v0->unk_24 = param1->battler; - v0->unk_38 = param2->unk_04; - v0->unk_3C = param2->unk_0C; - v0->unk_40 = param2->unk_08 - v0->unk_38; + v0->curExp = param2->unk_04; + v0->maxExp = param2->unk_0C; + v0->expReward = param2->unk_08 - v0->curExp; if (param1->battlerType == 0) { v0->unk_10 = SysTask_Start(ov16_022629DC, v0, 1000); @@ -1077,7 +1077,7 @@ void ov16_0225DD44 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ param1->healthbar.status = param2->unk_01; - Healthbar_DrawInfo(¶m1->healthbar, param1->healthbar.unk_28, HEALTHBAR_INFO_STATUS); + Healthbar_DrawInfo(¶m1->healthbar, param1->healthbar.curHP, HEALTHBAR_INFO_STATUS); ClearCommand(param0, param1->battler, param2->unk_00); } @@ -1228,19 +1228,19 @@ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->unk_24 = param1->battler; v0->type = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); v0->unk_4C = param2->unk_00; - v0->unk_28 = param2->unk_02; - v0->unk_2C = param2->unk_04; + v0->curHP = param2->unk_02; + v0->maxHP = param2->unk_04; v0->unk_48 = param2->unk_01; v0->unk_49 = param2->unk_07_5; - v0->unk_30 = 0; - v0->unk_38 = param2->unk_08; - v0->unk_3C = param2->unk_0C; + v0->damage = 0; + v0->curExp = param2->unk_08; + v0->maxExp = param2->unk_0C; v0->unk_26 = param2->unk_06; v0->status = param2->unk_07_0; v0->unk_4B = param2->unk_07_7; v0->unk_27 = param2->unk_10; - Healthbar_DrawInfo(v0, v0->unk_28, ~HEALTHBAR_INFO_EXP_GAUGE); + Healthbar_DrawInfo(v0, v0->curHP, ~HEALTHBAR_INFO_EXP_GAUGE); ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); } @@ -3969,15 +3969,15 @@ static void ov16_022611DC (SysTask * param0, void * param1) v18->type = Healthbar_Type(BattleSystem_BattlerSlot(v0->unk_00, v20), BattleSystem_BattleType(v0->unk_00)); v19 = BattleSystem_PartyPokemon(v0->unk_00, v20, v21); - v18->unk_28 = Pokemon_GetValue(v19, MON_DATA_CURRENT_HP, NULL) - v0->unk_08->unk_04->unk_20; - v18->unk_2C = Pokemon_GetValue(v19, MON_DATA_MAX_HP, NULL); - v18->unk_30 = v0->unk_08->unk_04->unk_20; + v18->curHP = Pokemon_GetValue(v19, MON_DATA_CURRENT_HP, NULL) - v0->unk_08->unk_04->unk_20; + v18->maxHP = Pokemon_GetValue(v19, MON_DATA_MAX_HP, NULL); + v18->damage = v0->unk_08->unk_04->unk_20; if (Pokemon_GetValue(v19, MON_DATA_STATUS_CONDITION, NULL) == 0) { v18->status = 0; } - ov16_022674C4(v18, v18->unk_30); + Healthbar_CalcHP(v18, v18->damage); } v0->unk_0E++; break; @@ -4041,7 +4041,7 @@ static void ov16_022611DC (SysTask * param0, void * param1) v27->status = 0; } - Healthbar_DrawInfo(v27, v27->unk_28, HEALTHBAR_INFO_STATUS); + Healthbar_DrawInfo(v27, v27->curHP, HEALTHBAR_INFO_STATUS); v30.tags = 2; v30.params[0] = v28 | (v0->unk_08->unk_0C[v28] << 8); @@ -4760,7 +4760,7 @@ static void ov16_02262988 (SysTask * param0, void * param1) switch (v0->state) { case 0: - ov16_022674C4(v0, v0->unk_30); + Healthbar_CalcHP(v0, v0->damage); v0->state++; case 1: v1 = ov16_022674F8(v0); @@ -4786,7 +4786,7 @@ static void ov16_022629DC (SysTask * param0, void * param1) case 0: v0->unk_4E = 0; Sound_PlayEffect(1803); - ov16_0226752C(v0, v0->unk_40); + ov16_0226752C(v0, v0->expReward); v0->state++; case 1: if (v0->unk_4E < 8) { diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index 895ad1e5e5..4a899d3b0f 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -55,6 +55,8 @@ #define HEALTHBAR_X_OFFSET_ENEMY_SLOT_2 HEALTHBAR_X_OFFSET_SOLO_ENEMY #define HEALTHBAR_Y_OFFSET_ENEMY_SLOT_2 HEALTHBAR_Y_OFFSET_SOLO_ENEMY + 9 +#define S32_MIN -2147483648 + typedef struct { u16 unk_00; u16 unk_02; @@ -68,12 +70,12 @@ typedef struct { s8 unk_0A; } UnkStruct_ov16_0226834C; -static s32 ov16_02267EDC(Healthbar * param0, int param1); -static s32 ov16_022680D8(s32 param0, s32 param1, s32 param2, s32 * param3, u8 param4, u16 param5); +static s32 Healthbar_DrawGauge(Healthbar *healthbar, enum HealthbarGaugeType gaugeType); +static s32 UpdateGauge(s32 param0, s32 param1, s32 param2, s32 * param3, u8 param4, u16 param5); static u8 ov16_02268194(s32 param0, s32 param1, s32 param2, s32 * param3, u8 * param4, u8 param5); -static u32 ov16_02268210(s32 param0, s32 param1, s32 param2, u8 param3); +static u32 CalcGaugeFill(s32 param0, s32 param1, s32 param2, u8 param3); static const u8 * ov16_02268250(int param0); -static void ov16_02267F70(Healthbar * param0, u8 param1); +static void DrawGauge(Healthbar * param0, u8 param1); static void ov16_02267864(Healthbar * param0); static void ov16_022679C8(Healthbar * param0); static void ov16_02267A4C(Healthbar * param0); @@ -571,8 +573,8 @@ void Healthbar_DrawInfo(Healthbar *healthbar, u32 hp, u32 flags) } if (flags & HEALTHBAR_INFO_HP_GAUGE) { - ov16_022674C4(healthbar, 0); - ov16_02267EDC(healthbar, 0); + Healthbar_CalcHP(healthbar, 0); + Healthbar_DrawGauge(healthbar, 0); } if (flags & HEALTHBAR_INFO_CURRENT_HP) { @@ -597,7 +599,7 @@ void Healthbar_DrawInfo(Healthbar *healthbar, u32 hp, u32 flags) if (flags & HEALTHBAR_INFO_EXP_GAUGE) { ov16_0226752C(healthbar, 0); - ov16_02267EDC(healthbar, 1); + Healthbar_DrawGauge(healthbar, 1); } if (flags & HEALTHBAR_INFO_CAUGHT_SPECIES) { @@ -759,7 +761,7 @@ void ov16_0226737C (Healthbar * param0) v0 = ov16_02268250(69); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3D4[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3D4[param0->type].unk_02); - Healthbar_DrawInfo(param0, param0->unk_28, HEALTHBAR_INFO_CURRENT_HP | HEALTHBAR_INFO_MAX_HP); + Healthbar_DrawInfo(param0, param0->curHP, HEALTHBAR_INFO_CURRENT_HP | HEALTHBAR_INFO_MAX_HP); } else { v0 = ov16_02268250(66); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F374[param0->type].unk_02); @@ -770,30 +772,31 @@ void ov16_0226737C (Healthbar * param0) v0 = ov16_02268250(38); MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); - Healthbar_DrawInfo(param0, param0->unk_28, HEALTHBAR_INFO_HP_GAUGE); + Healthbar_DrawInfo(param0, param0->curHP, HEALTHBAR_INFO_HP_GAUGE); } } -void ov16_022674C4 (Healthbar * param0, int param1) +void Healthbar_CalcHP(Healthbar *healthbar, int damage) { - param0->unk_34 = -2147483648; + healthbar->hpTemp = S32_MIN; - if (param0->unk_28 + param1 < 0) { - param1 -= param0->unk_28 + param1; + // bound the damage input to [0, maxHP] + if (healthbar->curHP + damage < 0) { + damage -= healthbar->curHP + damage; } - - if (param0->unk_28 + param1 > param0->unk_2C) { - param1 -= (param0->unk_28 + param1) - param0->unk_2C; + if (healthbar->curHP + damage > healthbar->maxHP) { + damage -= (healthbar->curHP + damage) - healthbar->maxHP; } - param0->unk_30 = -param1; + // update cached values + healthbar->damage = -damage; - if (param0->unk_28 < 0) { - param0->unk_28 = 0; + if (healthbar->curHP < 0) { + healthbar->curHP = 0; } - if (param0->unk_28 > param0->unk_2C) { - param0->unk_28 = param0->unk_2C; + if (healthbar->curHP > healthbar->maxHP) { + healthbar->curHP = healthbar->maxHP; } } @@ -801,11 +804,11 @@ s32 ov16_022674F8 (Healthbar * param0) { s32 v0; - v0 = ov16_02267EDC(param0, 0); + v0 = Healthbar_DrawGauge(param0, 0); if (v0 == -1) { - param0->unk_28 -= param0->unk_30; - Healthbar_DrawInfo(param0, param0->unk_28, HEALTHBAR_INFO_CURRENT_HP); + param0->curHP -= param0->damage; + Healthbar_DrawInfo(param0, param0->curHP, HEALTHBAR_INFO_CURRENT_HP); } else { Healthbar_DrawInfo(param0, v0, HEALTHBAR_INFO_CURRENT_HP); } @@ -815,24 +818,24 @@ s32 ov16_022674F8 (Healthbar * param0) void ov16_0226752C (Healthbar * param0, int param1) { - param0->unk_44 = -2147483648; + param0->expTemp = -2147483648; - if (param0->unk_38 + param1 < 0) { - param1 -= param0->unk_38 + param1; + if (param0->curExp + param1 < 0) { + param1 -= param0->curExp + param1; } - if (param0->unk_38 + param1 > param0->unk_3C) { - param1 -= (param0->unk_38 + param1) - param0->unk_3C; + if (param0->curExp + param1 > param0->maxExp) { + param1 -= (param0->curExp + param1) - param0->maxExp; } - param0->unk_40 = -param1; + param0->expReward = -param1; - if (param0->unk_38 < 0) { - param0->unk_38 = 0; + if (param0->curExp < 0) { + param0->curExp = 0; } - if (param0->unk_38 > param0->unk_3C) { - param0->unk_38 = param0->unk_3C; + if (param0->curExp > param0->maxExp) { + param0->curExp = param0->maxExp; } } @@ -840,10 +843,10 @@ s32 ov16_02267560 (Healthbar * param0) { s32 v0; - v0 = ov16_02267EDC(param0, 1); + v0 = Healthbar_DrawGauge(param0, 1); if (v0 == -1) { - param0->unk_38 -= param0->unk_40; + param0->curExp -= param0->expReward; } return v0; @@ -1192,7 +1195,7 @@ static void ov16_02267BF8 (Healthbar * param0) v0 = Heap_AllocFromHeap(5, 3 * 0x20); MI_CpuFill8(v0, 0xf | (0xf << 4), 3 * 0x20); - sub_0200C67C(ov16_0223E04C(param0->battleSys), param0->unk_2C, 3, 0, v0); + sub_0200C67C(ov16_0223E04C(param0->battleSys), param0->maxHP, 3, 0, v0); { void * v2; @@ -1337,42 +1340,40 @@ static void ov16_02267DC4 (Healthbar * param0, u32 param1) Strbuf_Free(v6); } -static s32 ov16_02267EDC (Healthbar * param0, int param1) +static s32 Healthbar_DrawGauge(Healthbar *healthbar, enum HealthbarGaugeType gaugeType) { - s32 v0; - s32 v1; + s32 result; + s32 fillOffset; - if (param1 == 0) { - v0 = ov16_022680D8(param0->unk_2C, param0->unk_28, param0->unk_30, ¶m0->unk_34, 6, 1); + if (gaugeType == HEALTHBAR_GAUGE_HP) { + result = UpdateGauge(healthbar->maxHP, healthbar->curHP, healthbar->damage, &healthbar->hpTemp, 6, 1); } else { - v1 = ov16_02268210(param0->unk_38, param0->unk_40, param0->unk_3C, 12); + fillOffset = CalcGaugeFill(healthbar->curExp, healthbar->expReward, healthbar->maxExp, 12); - if (v1 == 0) { - v1 = 1; + if (fillOffset == 0) { + fillOffset = 1; } - v1 = abs(param0->unk_40 / v1); - v0 = ov16_022680D8(param0->unk_3C, param0->unk_38, param0->unk_40, ¶m0->unk_44, 12, v1); + fillOffset = abs(healthbar->expReward / fillOffset); + result = UpdateGauge(healthbar->maxExp, healthbar->curExp, healthbar->expReward, &healthbar->expTemp, 12, fillOffset); } - if ((param1 == 0) && (param0->numberMode == 1)) { - (void)0; - } else { - ov16_02267F70(param0, param1); + if (gaugeType != HEALTHBAR_GAUGE_HP || healthbar->numberMode != TRUE) { + DrawGauge(healthbar, gaugeType); } - if (v0 == -1) { - if (param1 == 0) { - param0->unk_34 = 0; + if (result == -1) { + if (gaugeType == HEALTHBAR_GAUGE_HP) { + healthbar->hpTemp = 0; } else { - param0->unk_44 = 0; + healthbar->expTemp = 0; } } - return v0; + return result; } -static void ov16_02267F70 (Healthbar * param0, u8 param1) +static void DrawGauge (Healthbar * param0, u8 param1) { u8 v0; u8 v1[12]; @@ -1389,7 +1390,7 @@ static void ov16_02267F70 (Healthbar * param0, u8 param1) switch (param1) { case 0: - v4 = ov16_02268194(param0->unk_2C, param0->unk_28, param0->unk_30, ¶m0->unk_34, v1, 6); + v4 = ov16_02268194(param0->maxHP, param0->curHP, param0->damage, ¶m0->hpTemp, v1, 6); { int v10; @@ -1422,7 +1423,7 @@ static void ov16_02267F70 (Healthbar * param0, u8 param1) } break; case 1: - ov16_02268194(param0->unk_3C, param0->unk_38, param0->unk_40, ¶m0->unk_44, v1, 12); + ov16_02268194(param0->maxExp, param0->curExp, param0->expReward, ¶m0->expTemp, v1, 12); v5 = param0->unk_48; if (v5 == 100) { @@ -1444,7 +1445,7 @@ static void ov16_02267F70 (Healthbar * param0, u8 param1) } } -static s32 ov16_022680D8 (s32 param0, s32 param1, s32 param2, s32 * param3, u8 param4, u16 param5) +static s32 UpdateGauge (s32 param0, s32 param1, s32 param2, s32 * param3, u8 param4, u16 param5) { s32 v0; s32 v1; @@ -1571,25 +1572,31 @@ static u8 ov16_02268194 (s32 param0, s32 param1, s32 param2, s32 * param3, u8 * return v3; } -static u32 ov16_02268210 (s32 param0, s32 param1, s32 param2, u8 param3) +/** + * @brief Calculate the number of pixels that will need to be filled to account + * for a change in the current value of a gauge. + * + * @param curVal Current value of the gauge + * @param diff Change to be applied to the current value + * @param maxVal Max value of the gauge + * @param gaugeSize Size of the gauge, in squares of fill + * @return Number of pixels to be filled + */ +static u32 CalcGaugeFill(s32 curVal, s32 diff, s32 maxVal, u8 gaugeSize) { - s8 v0, v1; - u8 v2; - s32 v3; - - v2 = param3 * 8; - v3 = param0 - param1; + u8 gaugeSizePixels = gaugeSize * 8; // gauges have 8 pixels per "square" of fill + s32 newVal = curVal - diff; - if (v3 < 0) { - v3 = 0; - } else if (v3 > param2) { - v3 = param2; + if (newVal < 0) { + newVal = 0; + } else if (newVal > maxVal) { + newVal = maxVal; } - v0 = param0 * v2 / param2; - v1 = v3 * v2 / param2; + s8 curPixels = curVal * gaugeSizePixels / maxVal; + s8 newPixels = newVal * gaugeSizePixels / maxVal; - return abs(v0 - v1); + return abs(curPixels - newPixels); } static const u8 * ov16_02268250 (int param0) diff --git a/src/overlay016/ov16_0223B140.c b/src/overlay016/ov16_0223B140.c index 7c1448312f..44d66c68c9 100644 --- a/src/overlay016/ov16_0223B140.c +++ b/src/overlay016/ov16_0223B140.c @@ -1603,7 +1603,7 @@ static void ov16_0223CF8C (SysTask * param0, void * param1) v2 = ov16_02263B08(v1); if (v2 != NULL) { - if (HealthBar_Color(v2->unk_28, v2->unk_2C, (8 * 6)) == 1) { + if (HealthBar_Color(v2->curHP, v2->maxHP, (8 * 6)) == 1) { v5 |= FlagIndex(v3); } } diff --git a/src/overlay016/ov16_0223DF00.c b/src/overlay016/ov16_0223DF00.c index 16988d29b4..1265351365 100644 --- a/src/overlay016/ov16_0223DF00.c +++ b/src/overlay016/ov16_0223DF00.c @@ -1388,7 +1388,7 @@ void ov16_0223F3BC (BattleSystem * param0) for (v0 = 0; v0 < param0->maxBattlers; v0++) { v1 = ov16_02263B08(param0->battlers[v0]); - if (v1->unk_28) { + if (v1->curHP) { Healthbar_Enable(v1, 1); } } From 337d0192bb13f239bcfe6db582791c972fd47463 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 22:45:34 -0800 Subject: [PATCH 13/16] Label routines used by Healthbar_DrawInfo --- include/battle/healthbar.h | 2 +- src/overlay016/battle_display.c | 2 +- src/overlay016/healthbar.c | 68 ++++++++++++++++----------------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/include/battle/healthbar.h b/include/battle/healthbar.h index 487945548f..72d2304737 100644 --- a/include/battle/healthbar.h +++ b/include/battle/healthbar.h @@ -81,7 +81,7 @@ void ov16_0226737C(Healthbar * param0); */ void Healthbar_CalcHP(Healthbar *healthbar, int damage); s32 ov16_022674F8(Healthbar * param0); -void ov16_0226752C(Healthbar * param0, int param1); +void Healthbar_CalcExp(Healthbar * param0, int param1); s32 ov16_02267560(Healthbar * param0); void ov16_0226757C(Healthbar * param0); void ov16_022675AC(Healthbar * param0); diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index 429e127f53..dfb788ee20 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -4786,7 +4786,7 @@ static void ov16_022629DC (SysTask * param0, void * param1) case 0: v0->unk_4E = 0; Sound_PlayEffect(1803); - ov16_0226752C(v0, v0->expReward); + Healthbar_CalcExp(v0, v0->expReward); v0->state++; case 1: if (v0->unk_4E < 8) { diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index 4a899d3b0f..63b329e461 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -76,15 +76,15 @@ static u8 ov16_02268194(s32 param0, s32 param1, s32 param2, s32 * param3, u8 * p static u32 CalcGaugeFill(s32 param0, s32 param1, s32 param2, u8 param3); static const u8 * ov16_02268250(int param0); static void DrawGauge(Healthbar * param0, u8 param1); -static void ov16_02267864(Healthbar * param0); -static void ov16_022679C8(Healthbar * param0); -static void ov16_02267A4C(Healthbar * param0); -static void ov16_02267B6C(Healthbar * param0, u32 param1); -static void ov16_02267BF8(Healthbar * param0); -static void ov16_02267C58(Healthbar * param0); -static void ov16_02267CA8(Healthbar * param0, int param1); -static void ov16_02267CE8(Healthbar * param0, u32 param1); -static void ov16_02267DC4(Healthbar * param0, u32 param1); +static void Healthbar_DrawBattlerName(Healthbar * param0); +static void Healthbar_DrawLevelText(Healthbar * param0); +static void Healthbar_DrawLevelNumber(Healthbar * param0); +static void Healthbar_DrawCurrentHP(Healthbar * param0, u32 param1); +static void Healthbar_DrawMaxHP(Healthbar * param0); +static void Healthbar_DrawCaughtIcon(Healthbar * param0); +static void Healthbar_DrawStatusIcon(Healthbar * param0, int param1); +static void Healthbar_DrawBallCount(Healthbar * param0, u32 param1); +static void Healthbar_DrawBallsLeftMessage(Healthbar * param0, u32 param1); static void ov16_02266FE4(SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4); static void ov16_02267244(Healthbar * param0); static void ov16_0226728C(Healthbar * param0); @@ -578,64 +578,64 @@ void Healthbar_DrawInfo(Healthbar *healthbar, u32 hp, u32 flags) } if (flags & HEALTHBAR_INFO_CURRENT_HP) { - ov16_02267B6C(healthbar, hp); + Healthbar_DrawCurrentHP(healthbar, hp); } if (flags & HEALTHBAR_INFO_MAX_HP) { - ov16_02267BF8(healthbar); + Healthbar_DrawMaxHP(healthbar); } if ((flags & HEALTHBAR_INFO_LEVEL_TEXT) || (flags & HEALTHBAR_INFO_GENDER)) { - ov16_022679C8(healthbar); + Healthbar_DrawLevelText(healthbar); } if (flags & HEALTHBAR_INFO_LEVEL) { - ov16_02267A4C(healthbar); + Healthbar_DrawLevelNumber(healthbar); } if (flags & HEALTHBAR_INFO_NAME) { - ov16_02267864(healthbar); + Healthbar_DrawBattlerName(healthbar); } if (flags & HEALTHBAR_INFO_EXP_GAUGE) { - ov16_0226752C(healthbar, 0); + Healthbar_CalcExp(healthbar, 0); Healthbar_DrawGauge(healthbar, 1); } if (flags & HEALTHBAR_INFO_CAUGHT_SPECIES) { - ov16_02267C58(healthbar); + Healthbar_DrawCaughtIcon(healthbar); } if (flags & HEALTHBAR_INFO_STATUS) { switch (healthbar->status) { default: case 0: - ov16_02267CA8(healthbar, 38); + Healthbar_DrawStatusIcon(healthbar, 38); break; case 1: - ov16_02267CA8(healthbar, 47); + Healthbar_DrawStatusIcon(healthbar, 47); break; case 2: - ov16_02267CA8(healthbar, 50); + Healthbar_DrawStatusIcon(healthbar, 50); break; case 3: - ov16_02267CA8(healthbar, 53); + Healthbar_DrawStatusIcon(healthbar, 53); break; case 4: - ov16_02267CA8(healthbar, 44); + Healthbar_DrawStatusIcon(healthbar, 44); break; case 5: - ov16_02267CA8(healthbar, 41); + Healthbar_DrawStatusIcon(healthbar, 41); break; } } if (flags & (HEALTHBAR_INFO_COUNT_SAFARI_BALLS | HEALTHBAR_INFO_COUNT_PARK_BALLS)) { - ov16_02267CE8(healthbar, flags); + Healthbar_DrawBallCount(healthbar, flags); } if (flags & (HEALTHBAR_INFO_REMAINING_SAFARI_BALLS | HEALTHBAR_INFO_REMAINING_PARK_BALLS)) { - ov16_02267DC4(healthbar, flags); + Healthbar_DrawBallsLeftMessage(healthbar, flags); } } @@ -816,7 +816,7 @@ s32 ov16_022674F8 (Healthbar * param0) return v0; } -void ov16_0226752C (Healthbar * param0, int param1) +void Healthbar_CalcExp (Healthbar * param0, int param1) { param0->expTemp = -2147483648; @@ -1036,7 +1036,7 @@ static void ScrollHealthbarTask(SysTask *task, void *data) } } -static void ov16_02267864 (Healthbar * param0) +static void Healthbar_DrawBattlerName (Healthbar * param0) { BGL * v0; u8 * v1; @@ -1084,7 +1084,7 @@ static void ov16_02267864 (Healthbar * param0) Strbuf_Free(v6); } -static void ov16_022679C8 (Healthbar * param0) +static void Healthbar_DrawLevelText (Healthbar * param0) { NNSG2dImageProxy * v0; const u8 * v1; @@ -1116,7 +1116,7 @@ static void ov16_022679C8 (Healthbar * param0) } } -static void ov16_02267A4C (Healthbar * param0) +static void Healthbar_DrawLevelNumber (Healthbar * param0) { u8 * v0, * v1; NNSG2dImageProxy * v2; @@ -1162,7 +1162,7 @@ static void ov16_02267A4C (Healthbar * param0) Heap_FreeToHeap(v1); } -static void ov16_02267B6C (Healthbar * param0, u32 param1) +static void Healthbar_DrawCurrentHP (Healthbar * param0, u32 param1) { u8 * v0; NNSG2dImageProxy * v1; @@ -1187,7 +1187,7 @@ static void ov16_02267B6C (Healthbar * param0, u32 param1) Heap_FreeToHeap(v0); } -static void ov16_02267BF8 (Healthbar * param0) +static void Healthbar_DrawMaxHP (Healthbar * param0) { u8 * v0; NNSG2dImageProxy * v1; @@ -1211,7 +1211,7 @@ static void ov16_02267BF8 (Healthbar * param0) Heap_FreeToHeap(v0); } -static void ov16_02267C58 (Healthbar * param0) +static void Healthbar_DrawCaughtIcon (Healthbar * param0) { NNSG2dImageProxy * v0; const u8 * v1; @@ -1232,7 +1232,7 @@ static void ov16_02267C58 (Healthbar * param0) } } -static void ov16_02267CA8 (Healthbar * param0, int param1) +static void Healthbar_DrawStatusIcon (Healthbar * param0, int param1) { NNSG2dImageProxy * v0; const u8 * v1; @@ -1249,7 +1249,7 @@ static void ov16_02267CA8 (Healthbar * param0, int param1) } } -static void ov16_02267CE8 (Healthbar * param0, u32 param1) +static void Healthbar_DrawBallCount (Healthbar * param0, u32 param1) { BGL * v0; u8 * v1; @@ -1292,7 +1292,7 @@ static void ov16_02267CE8 (Healthbar * param0, u32 param1) Strbuf_Free(v5); } -static void ov16_02267DC4 (Healthbar * param0, u32 param1) +static void Healthbar_DrawBallsLeftMessage (Healthbar * param0, u32 param1) { BGL * v0; u8 * v1; From 0422c043a1531d13fe345a546f057e93f8ce01b4 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 10 Feb 2024 23:32:08 -0800 Subject: [PATCH 14/16] Document Healthbar_LoadResources --- include/battle/healthbar.h | 14 ++++- src/overlay016/healthbar.c | 114 +++++++++++++++++++++++-------------- 2 files changed, 85 insertions(+), 43 deletions(-) diff --git a/include/battle/healthbar.h b/include/battle/healthbar.h index 72d2304737..9d0d14f19b 100644 --- a/include/battle/healthbar.h +++ b/include/battle/healthbar.h @@ -51,7 +51,19 @@ enum HealthbarGaugeType { HEALTHBAR_GAUGE_EXP, }; -void ov16_02266F1C(SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4); +/** + * @brief Load the resources required to display a healthbar. + * + * Though a NARC handle is required as a parameter, it is assumed to always be + * an open handle to pl_batt_obj.narc. + * + * @param renderer + * @param gfxHandler + * @param narc + * @param palette + * @param healthbarType + */ +void Healthbar_LoadResources(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, NARC *narc, PaletteData *palette, enum HealthbarType healthbarType); CellActorData * ov16_02267060(SpriteRenderer * param0, SpriteGfxHandler * param1, int param2); /** diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index 63b329e461..f5376c46ad 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -321,6 +321,38 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F3D4[] = { {0x0, 0x0} }; +#define HEALTHBAR_MAIN_PALETTE_NCLR 71 +#define HEALTHBAR_SAFARI_PALETTE_NCLR 81 + +#define HEALTHBAR_MAIN_PALETTE_RESID 20006 +#define HEALTHBAR_EFFECTS_PALETTE_RESID 20007 +#define HEALTHBAR_SAFARI_PALETTE_RESID 20008 + +enum { + HEALTHBAR_SOLO_ENEMY_NANR = 186, + HEALTHBAR_SOLO_ENEMY_NCER, + HEALTHBAR_SOLO_ENEMY_NCGR, + HEALTHBAR_SOLO_PLAYER_NANR, + HEALTHBAR_SOLO_PLAYER_NCER, + HEALTHBAR_SOLO_PLAYER_NCGR, + HEALTHBAR_ENEMY_SLOT_1_NANR, + HEALTHBAR_ENEMY_SLOT_1_NCER, + HEALTHBAR_ENEMY_SLOT_1_NCGR, + HEALTHBAR_ENEMY_SLOT_2_NANR, + HEALTHBAR_ENEMY_SLOT_2_NCER, + HEALTHBAR_ENEMY_SLOT_2_NCGR, + HEALTHBAR_PLAYER_SLOT_1_NANR, + HEALTHBAR_PLAYER_SLOT_1_NCER, + HEALTHBAR_PLAYER_SLOT_1_NCGR, + HEALTHBAR_PLAYER_SLOT_2_NANR, + HEALTHBAR_PLAYER_SLOT_2_NCER, + HEALTHBAR_PLAYER_SLOT_2_NCGR, + + HEALTHBAR_SAFARI_NCGR = 253, + HEALTHBAR_SAFARI_NCER, + HEALTHBAR_SAFARI_NANR, +}; + static const SpriteTemplate sHealthbarTemplate_SoloPlayer = { .x = HEALTHBAR_X_OFFSET_SOLO_PLAYER, .y = HEALTHBAR_Y_OFFSET_SOLO_PLAYER, @@ -330,10 +362,10 @@ static const SpriteTemplate sHealthbarTemplate_SoloPlayer = { .plttIdx = 0, .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, .resources = { - 0xBF, - 0x4E26, - 0xBE, - 0xBD, + HEALTHBAR_SOLO_PLAYER_NCGR, + HEALTHBAR_MAIN_PALETTE_RESID, + HEALTHBAR_SOLO_PLAYER_NCER, + HEALTHBAR_SOLO_PLAYER_NANR, SPRITE_RESOURCE_NONE, SPRITE_RESOURCE_NONE, }, @@ -350,10 +382,10 @@ static const SpriteTemplate sHealthbarTemplate_SoloEnemy = { .plttIdx = 0, .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, .resources = { - 0xBC, - 0x4E26, - 0xBB, - 0xBA, + HEALTHBAR_SOLO_ENEMY_NCGR, + HEALTHBAR_MAIN_PALETTE_RESID, + HEALTHBAR_SOLO_ENEMY_NCER, + HEALTHBAR_SOLO_ENEMY_NANR, SPRITE_RESOURCE_NONE, SPRITE_RESOURCE_NONE, }, @@ -370,10 +402,10 @@ static const SpriteTemplate sHealthbarTemplate_PlayerSlot1 = { .plttIdx = 0, .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, .resources = { - 0xC8, - 0x4E26, - 0xC7, - 0xC6, + HEALTHBAR_PLAYER_SLOT_1_NCGR, + HEALTHBAR_MAIN_PALETTE_RESID, + HEALTHBAR_PLAYER_SLOT_1_NCER, + HEALTHBAR_PLAYER_SLOT_1_NANR, SPRITE_RESOURCE_NONE, SPRITE_RESOURCE_NONE, }, @@ -390,10 +422,10 @@ static const SpriteTemplate sHealthbarTemplate_EnemySlot1 = { .plttIdx = 0, .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, .resources = { - 0xC2, - 0x4E26, - 0xC1, - 0xC0, + HEALTHBAR_ENEMY_SLOT_1_NCGR, + HEALTHBAR_MAIN_PALETTE_RESID, + HEALTHBAR_ENEMY_SLOT_1_NCER, + HEALTHBAR_ENEMY_SLOT_1_NANR, SPRITE_RESOURCE_NONE, SPRITE_RESOURCE_NONE, }, @@ -410,10 +442,10 @@ static const SpriteTemplate sHealthbarTemplate_PlayerSlot2 = { .plttIdx = 0, .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, .resources = { - 0xCB, - 0x4E26, - 0xCA, - 0xC9, + HEALTHBAR_PLAYER_SLOT_2_NCGR, + HEALTHBAR_MAIN_PALETTE_RESID, + HEALTHBAR_PLAYER_SLOT_2_NCER, + HEALTHBAR_PLAYER_SLOT_2_NANR, SPRITE_RESOURCE_NONE, SPRITE_RESOURCE_NONE, }, @@ -430,10 +462,10 @@ static const SpriteTemplate sHealthbarTemplate_EnemySlot2 = { .plttIdx = 0, .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, .resources = { - 0xC5, - 0x4E26, - 0xC4, - 0xC3, + HEALTHBAR_ENEMY_SLOT_2_NCGR, + HEALTHBAR_MAIN_PALETTE_RESID, + HEALTHBAR_ENEMY_SLOT_2_NCER, + HEALTHBAR_ENEMY_SLOT_2_NANR, SPRITE_RESOURCE_NONE, SPRITE_RESOURCE_NONE, }, @@ -463,10 +495,10 @@ static const SpriteTemplate sHealthbarTemplate_NoPlayerMon = { .plttIdx = 0, .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, .resources = { - 0xFD, - 0x4E28, - 0xFE, - 0xFF, + HEALTHBAR_SAFARI_NCGR, + HEALTHBAR_SAFARI_PALETTE_RESID, + HEALTHBAR_SAFARI_NCER, + HEALTHBAR_SAFARI_NANR, SPRITE_RESOURCE_NONE, SPRITE_RESOURCE_NONE, }, @@ -476,20 +508,18 @@ static const SpriteTemplate sHealthbarTemplate_NoPlayerMon = { #include "overlay016/rodata_ov16_0226F6AC.h" -void ov16_02266F1C (SpriteRenderer * param0, SpriteGfxHandler * param1, NARC * param2, PaletteData * param3, int param4) +void Healthbar_LoadResources(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, NARC *narc, PaletteData *palette, enum HealthbarType healthbarType) { - const SpriteTemplate * v0; - - v0 = Healthbar_SpriteTemplate(param4); + const SpriteTemplate *template = Healthbar_SpriteTemplate(healthbarType); - SpriteRenderer_LoadCharResObjFromOpenNarc(param0, param1, param2, v0->resources[0], 1, NNS_G2D_VRAM_TYPE_2DMAIN, v0->resources[0]); - SpriteRenderer_LoadPalette(param3, 2, param0, param1, param2, 71, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20006); - SpriteRenderer_LoadCellResObjFromOpenNarc(param0, param1, param2, v0->resources[2], 1, v0->resources[2]); - SpriteRenderer_LoadAnimResObjFromOpenNarc(param0, param1, param2, v0->resources[3], 1, v0->resources[3]); - SpriteRenderer_LoadPalette(param3, 2, param0, param1, param2, 71, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20007); + SpriteRenderer_LoadCharResObjFromOpenNarc(renderer, gfxHandler, narc, template->resources[0], TRUE, NNS_G2D_VRAM_TYPE_2DMAIN, template->resources[0]); + SpriteRenderer_LoadPalette(palette, PLTTBUF_MAIN_OBJ, renderer, gfxHandler, narc, 71, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, HEALTHBAR_MAIN_PALETTE_RESID); + SpriteRenderer_LoadCellResObjFromOpenNarc(renderer, gfxHandler, narc, template->resources[2], TRUE, template->resources[2]); + SpriteRenderer_LoadAnimResObjFromOpenNarc(renderer, gfxHandler, narc, template->resources[3], TRUE, template->resources[3]); + SpriteRenderer_LoadPalette(palette, PLTTBUF_MAIN_OBJ, renderer, gfxHandler, narc, 71, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, HEALTHBAR_EFFECTS_PALETTE_RESID); - if ((param4 == 6) || (param4 == 7)) { - SpriteRenderer_LoadPalette(param3, 2, param0, param1, param2, 81, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20008); + if (healthbarType == HEALTHBAR_TYPE_SAFARI_ZONE || healthbarType == HEALTHBAR_TYPE_PAL_PARK) { + SpriteRenderer_LoadPalette(palette, PLTTBUF_MAIN_OBJ, renderer, gfxHandler, narc, 81, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, HEALTHBAR_SAFARI_PALETTE_RESID); } } @@ -574,7 +604,7 @@ void Healthbar_DrawInfo(Healthbar *healthbar, u32 hp, u32 flags) if (flags & HEALTHBAR_INFO_HP_GAUGE) { Healthbar_CalcHP(healthbar, 0); - Healthbar_DrawGauge(healthbar, 0); + Healthbar_DrawGauge(healthbar, HEALTHBAR_GAUGE_HP); } if (flags & HEALTHBAR_INFO_CURRENT_HP) { @@ -599,7 +629,7 @@ void Healthbar_DrawInfo(Healthbar *healthbar, u32 hp, u32 flags) if (flags & HEALTHBAR_INFO_EXP_GAUGE) { Healthbar_CalcExp(healthbar, 0); - Healthbar_DrawGauge(healthbar, 1); + Healthbar_DrawGauge(healthbar, HEALTHBAR_GAUGE_EXP); } if (flags & HEALTHBAR_INFO_CAUGHT_SPECIES) { @@ -713,7 +743,7 @@ void ov16_022672C4 (Healthbar * param0) v3 = BattleSystem_PaletteSys(param0->battleSys); v0 = Healthbar_SpriteTemplate(param0->type); - ov16_02266F1C(v1, v2, v4, v3, param0->type); + Healthbar_LoadResources(v1, v2, v4, v3, param0->type); param0->mainActor = ov16_02267060(v1, v2, param0->type); ov16_02266FE4(v1, v2, v4, v3, param0->type); From ec274059e8e236c981b49af484f6512dd5494809 Mon Sep 17 00:00:00 2001 From: Rachel Date: Sun, 11 Feb 2024 10:19:57 -0800 Subject: [PATCH 15/16] Label structs and functions used by Healthbar_DrawBattlerName MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - UnkStruct_0200B358 → StringFormatter - ov16_0223E0D0 → BattleSystem_StringFormatter - sub_0200B5CC → StringFormatter_BufferNickname - sub_0201D7E0 → PrintStringWithColorAndMargins - sub_0201A870 → BGL_AddFramelessWindow - sub_02021F98 → SpriteActor_ImageProxy --- include/overlay005/ov5_021DB888.h | 2 +- include/overlay005/ov5_021DC018.h | 8 +- include/overlay005/ov5_021DD42C.h | 2 +- include/overlay005/ov5_021E622C.h | 16 +- include/overlay006/ov6_022465FC.h | 2 +- include/overlay007/struct_ov7_0224D008.h | 2 +- include/overlay013/struct_ov13_022213F0.h | 2 +- include/overlay013/struct_ov13_02227244.h | 2 +- include/overlay016/ov16_0223DF00.h | 2 +- include/overlay017/struct_ov17_0223F88C.h | 2 +- include/overlay017/struct_ov17_022476F8.h | 2 +- include/overlay017/struct_ov17_0224A1EC.h | 2 +- include/overlay017/struct_ov17_022507C4.h | 2 +- include/overlay019/ov19_021D0D80.h | 2 +- include/overlay019/ov19_021DB2FC.h | 2 +- include/overlay019/struct_ov19_021DB6F0.h | 2 +- include/overlay023/struct_ov23_02250CD4.h | 2 +- include/overlay062/ov62_02231690.h | 2 +- include/overlay062/struct_ov62_022349A8.h | 2 +- include/overlay065/struct_ov65_0222EBE0_t.h | 2 +- include/overlay065/struct_ov65_02234E50.h | 2 +- include/overlay072/struct_ov72_0223DB98_t.h | 2 +- .../overlay079/struct_ov79_021D0E1C_sub1.h | 2 +- include/overlay081/struct_ov81_021D1610.h | 2 +- include/overlay083/struct_ov83_0223DEA0.h | 2 +- include/overlay084/struct_ov84_0223B5A0.h | 2 +- include/overlay088/ov88_0223E9C4.h | 2 +- include/overlay094/ov94_0223D0C4.h | 2 +- include/overlay094/ov94_022414B8.h | 4 +- include/overlay094/struct_ov94_0223FD4C.h | 2 +- include/overlay095/ov95_02246C20.h | 2 +- include/overlay096/struct_ov96_0223BF40_t.h | 2 +- include/overlay097/struct_ov97_0222D04C.h | 2 +- include/overlay097/struct_ov97_02237808.h | 2 +- include/overlay101/struct_ov101_021D148C.h | 2 +- include/overlay104/ov104_0222DCE0.h | 2 +- include/overlay104/ov104_02231F74.h | 4 +- include/overlay104/struct_ov104_022320B4_t.h | 2 +- include/overlay107/ov107_02249C98.h | 2 +- include/overlay109/struct_ov109_021D5140.h | 2 +- include/overlay113/ov113_02260620.h | 2 +- include/overlay117/struct_ov117_02261280.h | 2 +- include/struct_decls/struct_0200B358_decl.h | 2 +- include/struct_defs/battle_system.h | 2 +- include/struct_defs/struct_0207AE68_t.h | 2 +- include/struct_defs/struct_0207F248.h | 2 +- include/struct_defs/struct_0208D7BC.h | 2 +- include/struct_defs/struct_02090800.h | 2 +- include/struct_defs/struct_02095E80_t.h | 8 +- include/struct_defs/struct_02095EAC_t.h | 2 +- include/struct_defs/struct_020961E8_t.h | 2 +- include/unk_0200B29C.h | 2 +- include/unk_0200B358.h | 148 +++++++------- include/unk_02018340.h | 2 +- include/unk_0201D670.h | 2 +- include/unk_020218BC.h | 2 +- include/unk_0204AEE8.h | 2 +- include/unk_0205B33C.h | 8 +- include/unk_0205C980.h | 2 +- include/unk_0206CCB0.h | 2 +- include/unk_020933F8.h | 16 +- src/overlay005/ov5_021DB888.c | 6 +- src/overlay005/ov5_021DC018.c | 28 +-- src/overlay005/ov5_021DD42C.c | 10 +- src/overlay005/ov5_021E1D20.c | 4 +- src/overlay005/ov5_021E2338.c | 2 +- src/overlay005/ov5_021E622C.c | 40 ++-- src/overlay005/ov5_021EA874.c | 2 +- src/overlay005/ov5_021EE7D4.c | 2 +- src/overlay005/ov5_021F08CC.c | 2 +- src/overlay005/ov5_021F6454.c | 12 +- src/overlay005/ov5_021F77A8.c | 14 +- src/overlay006/ov6_022465FC.c | 2 +- src/overlay006/ov6_02247A0C.c | 2 +- src/overlay007/ov7_02249960.c | 6 +- src/overlay007/ov7_0224B4E8.c | 4 +- src/overlay007/ov7_0224BE9C.c | 8 +- src/overlay010/ov10_0221F800.c | 16 +- src/overlay012/ov12_0221FC20.c | 4 +- src/overlay013/ov13_0221FC20.c | 8 +- src/overlay013/ov13_02221A88.c | 26 +-- src/overlay013/ov13_022264F4.c | 2 +- src/overlay016/battle_script.c | 8 +- src/overlay016/healthbar.c | 44 ++--- src/overlay016/ov16_0223DF00.c | 10 +- src/overlay016/ov16_0226871C.c | 32 +-- src/overlay017/ov17_0223F118.c | 4 +- src/overlay017/ov17_0223F7E4.c | 8 +- src/overlay017/ov17_022413D8.c | 48 ++--- src/overlay017/ov17_022476F8.c | 2 +- src/overlay017/ov17_022492DC.c | 4 +- src/overlay017/ov17_0224A0FC.c | 8 +- src/overlay017/ov17_02250744.c | 4 +- src/overlay019/ov19_021D0D80.c | 8 +- src/overlay019/ov19_021DB2FC.c | 2 +- src/overlay020/ov20_021D2EA4.c | 2 +- src/overlay021/ov21_021D4C0C.c | 2 +- src/overlay022/ov22_02255D44.c | 2 +- src/overlay022/ov22_02259C58.c | 2 +- src/overlay022/ov22_0225B660.c | 6 +- src/overlay023/ov23_022416A8.c | 2 +- src/overlay023/ov23_02241F74.c | 8 +- src/overlay023/ov23_02253598.c | 2 +- src/overlay023/ov23_02253D40.c | 2 +- src/overlay023/ov23_022542CC.c | 2 +- src/overlay056/ov56_022561C0.c | 6 +- src/overlay061/ov61_0222BF44.c | 2 +- src/overlay062/ov62_022300D8.c | 10 +- src/overlay062/ov62_02231690.c | 8 +- src/overlay062/ov62_02239D60.c | 2 +- src/overlay062/ov62_0223DFA8.c | 10 +- src/overlay062/ov62_02241204.c | 14 +- src/overlay062/ov62_02247D74.c | 2 +- src/overlay064/ov64_0222DCE0.c | 2 +- src/overlay065/ov65_0222DCE0.c | 2 +- src/overlay065/ov65_0223648C.c | 2 +- src/overlay066/ov66_0223177C.c | 36 ++-- src/overlay067/ov67_0225C700.c | 2 +- src/overlay068/ov68_0225C700.c | 2 +- src/overlay069/ov69_0225C700.c | 2 +- src/overlay070/ov70_0225D9A4.c | 4 +- src/overlay071/ov71_0223C69C.c | 4 +- src/overlay073/ov73_021D0D80.c | 2 +- src/overlay076/ov76_0223B870.c | 2 +- src/overlay077/ov77_021D0D80.c | 2 +- src/overlay079/ov79_021D2268.c | 2 +- src/overlay085/ov85_02241440.c | 2 +- src/overlay086/ov86_0223B140.c | 6 +- src/overlay087/ov87_021D106C.c | 2 +- src/overlay088/ov88_0223B140.c | 18 +- src/overlay088/ov88_0223E9C4.c | 2 +- src/overlay090/ov90_021D0D80.c | 2 +- src/overlay091/ov91_021D0D80.c | 16 +- src/overlay092/ov92_021D0D80.c | 2 +- src/overlay094/ov94_0223D0C4.c | 2 +- src/overlay094/ov94_0223FB48.c | 4 +- src/overlay094/ov94_022414B8.c | 8 +- src/overlay094/ov94_02242AD0.c | 4 +- src/overlay095/ov95_02246C20.c | 12 +- src/overlay095/ov95_02247B6C.c | 4 +- src/overlay095/ov95_0224B3D8.c | 4 +- src/overlay097/ov97_0222AE60.c | 6 +- src/overlay097/ov97_0222C174.c | 4 +- src/overlay097/ov97_0222D30C.c | 4 +- src/overlay097/ov97_02230410.c | 6 +- src/overlay097/ov97_02233B18.c | 6 +- src/overlay097/ov97_02237694.c | 4 +- src/overlay098/ov98_022471C8.c | 2 +- src/overlay099/ov99_021D1A54.c | 2 +- src/overlay099/ov99_021D4134.c | 2 +- src/overlay100/ov100_021D46C8.c | 2 +- src/overlay102/ov102_021D0D80.c | 2 +- src/overlay104/ov104_0222DCE0.c | 2 +- src/overlay104/ov104_02231F74.c | 16 +- src/overlay104/ov104_0223DC7C.c | 4 +- src/overlay105/ov105_02241AE0.c | 2 +- src/overlay106/ov106_02241AE0.c | 2 +- src/overlay107/ov107_02241AE0.c | 2 +- src/overlay107/ov107_02245EB0.c | 2 +- src/overlay107/ov107_02249C98.c | 4 +- src/overlay108/ov108_02241AE0.c | 2 +- src/overlay109/ov109_021D0D80.c | 2 +- src/overlay110/ov110_021D0D80.c | 2 +- src/overlay111/ov111_021D0D80.c | 2 +- src/overlay113/ov113_0225C700.c | 8 +- src/overlay113/ov113_02260620.c | 2 +- src/overlay114/ov114_0225C700.c | 2 +- src/overlay115/ov115_02260CEC.c | 8 +- src/overlay116/ov116_02261870.c | 4 +- src/overlay117/ov117_02263AF0.c | 4 +- src/overlay118/ov118_021D0D80.c | 2 +- src/overlay119/ov119_021D0D80.c | 2 +- src/unk_0200112C.c | 4 +- src/unk_0200B29C.c | 2 +- src/unk_0200B358.c | 186 +++++++++--------- src/unk_02012744.c | 2 +- src/unk_02014A84.c | 2 +- src/unk_02018340.c | 2 +- src/unk_0201D670.c | 2 +- src/unk_020218BC.c | 2 +- src/unk_02039814.c | 2 +- src/unk_0203A9C8.c | 4 +- src/unk_0203E880.c | 2 +- src/unk_0203F6C4.c | 38 ++-- src/unk_02046C7C.c | 18 +- src/unk_020474B8.c | 96 ++++----- src/unk_02048BD0.c | 2 +- src/unk_02048DD8.c | 22 +-- src/unk_0204AEE8.c | 4 +- src/unk_0204B830.c | 8 +- src/unk_0204CA84.c | 12 +- src/unk_0204F13C.c | 2 +- src/unk_020528D0.c | 2 +- src/unk_02052C6C.c | 2 +- src/unk_0205A0D8.c | 4 +- src/unk_0205B33C.c | 12 +- src/unk_0205C980.c | 2 +- src/unk_0206CCB0.c | 128 ++++++------ src/unk_0206F314.c | 2 +- src/unk_020722AC.c | 2 +- src/unk_0207AE68.c | 18 +- src/unk_0207CB08.c | 4 +- src/unk_0207E0B8.c | 10 +- src/unk_020819DC.c | 4 +- src/unk_02082C2C.c | 2 +- src/unk_02083370.c | 4 +- src/unk_02084B70.c | 18 +- src/unk_0208694C.c | 2 +- src/unk_0208A3F4.c | 2 +- src/unk_0208C324.c | 2 +- src/unk_020933F8.c | 24 +-- src/unk_020989DC.c | 2 +- src/unk_0209ACF4.c | 2 +- src/unk_0209B344.c | 2 +- 214 files changed, 856 insertions(+), 856 deletions(-) diff --git a/include/overlay005/ov5_021DB888.h b/include/overlay005/ov5_021DB888.h index 62a3ecb4bd..107bfe36de 100644 --- a/include/overlay005/ov5_021DB888.h +++ b/include/overlay005/ov5_021DB888.h @@ -6,7 +6,7 @@ #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_02061AB4_decl.h" -void ov5_021DB888(UnkStruct_020508D4 * param0, UnkStruct_0200B358 * param1, u16 * param2); +void ov5_021DB888(UnkStruct_020508D4 * param0, StringFormatter * param1, u16 * param2); BOOL ov5_021DBB94(UnkStruct_0203CDB0 * param0); u16 ov5_021DBD98(UnkStruct_0203CDB0 * param0, UnkStruct_02061AB4 * param1, u16 param2); void ov5_021DBED4(UnkStruct_0203CDB0 * param0, UnkStruct_02061AB4 * param1); diff --git a/include/overlay005/ov5_021DC018.h b/include/overlay005/ov5_021DC018.h index ca902d7bff..003ea7d342 100644 --- a/include/overlay005/ov5_021DC018.h +++ b/include/overlay005/ov5_021DC018.h @@ -7,16 +7,16 @@ #include "struct_defs/struct_0205AA50.h" #include "overlay005/struct_ov5_021DC1A4_decl.h" -UnkStruct_ov5_021DC1A4 * ov5_021DC150(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8); +UnkStruct_ov5_021DC1A4 * ov5_021DC150(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8); void ov5_021DC1A4(UnkStruct_ov5_021DC1A4 * param0, u32 param1, u32 param2); void ov5_021DC1AC(UnkStruct_ov5_021DC1A4 * param0); void ov5_021DC424(UnkStruct_ov5_021DC1A4 * param0); -UnkStruct_ov5_021DC1A4 * ov5_021DC48C(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8); +UnkStruct_ov5_021DC1A4 * ov5_021DC48C(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8); void ov5_021DC4B0(UnkStruct_ov5_021DC1A4 * param0, u32 param1, u32 param2, u32 param3); void ov5_021DC4B8(UnkStruct_ov5_021DC1A4 * param0); void ov5_021DC528(UnkStruct_ov5_021DC1A4 * param0, u16 param1); void ov5_021DC600(UnkStruct_ov5_021DC1A4 * param0, u16 * param1, u16 * param2); -void ov5_021DCB24(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, UnkStruct_0200B358 * param4, u16 param5); +void ov5_021DCB24(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, StringFormatter * param4, u16 param5); u16 ov5_021DCCC8(int param0); void ov5_021DCD94(UnkStruct_ov5_021DC1A4 * param0, u8 param1); Window * ov5_021DCEB0(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2); @@ -27,7 +27,7 @@ void ov5_021DD084(Window * param0); void ov5_021DD098(UnkStruct_0203CDB0 * param0, Window * param1); Window * ov5_021DD140(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2); void ov5_021DD1A4(UnkStruct_0203CDB0 * param0, Window * param1); -UnkStruct_ov5_021DC1A4 * ov5_021DD250(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, UnkStruct_0200B358 * param4, u8 param5, u8 param6, u8 param7, u8 param8); +UnkStruct_ov5_021DC1A4 * ov5_021DD250(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, StringFormatter * param4, u8 param5, u8 param6, u8 param7, u8 param8); void ov5_021DD3A8(UnkStruct_ov5_021DC1A4 * param0); void ov5_021DD3F4(UnkStruct_ov5_021DC1A4 * param0, BOOL param1); void ov5_021DD410(UnkStruct_ov5_021DC1A4 * param0, BOOL param1); diff --git a/include/overlay005/ov5_021DD42C.h b/include/overlay005/ov5_021DD42C.h index 0364881892..30fbaf5c42 100644 --- a/include/overlay005/ov5_021DD42C.h +++ b/include/overlay005/ov5_021DD42C.h @@ -10,6 +10,6 @@ void ov5_021DD42C(UnkStruct_ov5_021DD42C * param0, UnkStruct_0203E724 * param1); void ov5_021DD444(UnkStruct_0203E724 * param0, const MessageLoader * param1, u16 param2, u8 param3, UnkStruct_ov5_021DD42C * param4); void ov5_021DD498(UnkStruct_0203E724 * param0, const MessageLoader * param1, int param2); void ov5_021DD4CC(UnkStruct_0203E724 * param0, u16 param1, u16 param2, u16 param3, s16 param4, u8 param5); -void ov5_021DD530(UnkStruct_0203E724 * param0, UnkStruct_0200B358 * param1, u8 param2, u8 param3); +void ov5_021DD530(UnkStruct_0203E724 * param0, StringFormatter * param1, u8 param2, u8 param3); #endif // POKEPLATINUM_OV5_021DD42C_H diff --git a/include/overlay005/ov5_021E622C.h b/include/overlay005/ov5_021E622C.h index da3fd8695e..6bf7ea8be4 100644 --- a/include/overlay005/ov5_021E622C.h +++ b/include/overlay005/ov5_021E622C.h @@ -13,14 +13,14 @@ u8 ov5_021E6238(UnkStruct_02026310 * param0); int ov5_021E6270(UnkStruct_02026310 * param0); void ov5_021E6358(Party * param0, int param1, UnkStruct_02026310 * param2, SaveData * param3); -u16 ov5_021E64F8(Party * param0, UnkStruct_0200B358 * param1, UnkStruct_02026310 * param2, u8 param3); +u16 ov5_021E64F8(Party * param0, StringFormatter * param1, UnkStruct_02026310 * param2, u8 param3); int ov5_021E6520(BoxPokemon * param0, u32 param1); int ov5_021E6568(UnkStruct_02026218 * param0); int ov5_021E6590(UnkStruct_02026218 * param0); -u8 ov5_021E65B0(UnkStruct_02026218 * param0, UnkStruct_0200B358 * param1); -int ov5_021E65EC(UnkStruct_02026218 * param0, UnkStruct_0200B358 * param1); -int ov5_021E6630(UnkStruct_02026310 * param0, u8 param1, UnkStruct_0200B358 * param2); -u8 ov5_021E6640(UnkStruct_02026310 * param0, int param1, UnkStruct_0200B358 * param2); +u8 ov5_021E65B0(UnkStruct_02026218 * param0, StringFormatter * param1); +int ov5_021E65EC(UnkStruct_02026218 * param0, StringFormatter * param1); +int ov5_021E6630(UnkStruct_02026310 * param0, u8 param1, StringFormatter * param2); +u8 ov5_021E6640(UnkStruct_02026310 * param0, int param1, StringFormatter * param2); void ov5_021E6720(UnkStruct_02026310 * param0); void ov5_021E6B40(UnkStruct_02026310 * param0); void ov5_021E6CF0(Pokemon * param0, u16 param1, u8 param2, TrainerInfo * param3, int param4, int param5); @@ -28,9 +28,9 @@ void ov5_021E6DE8(Pokemon * param0, u16 param1, UnkStruct_02026310 * param2, u32 void ov5_021E6EA8(UnkStruct_02026310 * param0, Party * param1, TrainerInfo * param2); BOOL ov5_021E7154(UnkStruct_02026310 * param0, Party * param1, UnkStruct_0203CDB0 * param2); Pokemon * ov5_021E7278(Party * param0); -void ov5_021E72BC(UnkStruct_02026310 * param0, UnkStruct_0200B358 * param1); -void ov5_021E7308(UnkStruct_02026310 * param0, u32 param1, u32 param2, u32 param3, u8 param4, UnkStruct_0200B358 * param5); -u16 ov5_021E73A0(Party * param0, int param1, UnkStruct_0200B358 * param2); +void ov5_021E72BC(UnkStruct_02026310 * param0, StringFormatter * param1); +void ov5_021E7308(UnkStruct_02026310 * param0, u32 param1, u32 param2, u32 param3, u8 param4, StringFormatter * param5); +u16 ov5_021E73A0(Party * param0, int param1, StringFormatter * param2); u8 ov5_021E73C8(UnkStruct_02026310 * param0); u8 ov5_021E73F0(u32 param0); u32 ov5_021E7420(UnkStruct_02026310 * param0); diff --git a/include/overlay006/ov6_022465FC.h b/include/overlay006/ov6_022465FC.h index 2ea5392934..0c0b5056cf 100644 --- a/include/overlay006/ov6_022465FC.h +++ b/include/overlay006/ov6_022465FC.h @@ -9,6 +9,6 @@ int ov6_0224660C(UnkStruct_0203CDB0 * param0); int ov6_022468B0(UnkStruct_0203CDB0 * param0, BOOL param1, BOOL param2); int ov6_02246920(UnkStruct_0203CDB0 * param0); int ov6_02246978(UnkStruct_0203CDB0 * param0, int param1); -BOOL ov6_022469E0(UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, int param2, u16 * param3, u16 * param4); +BOOL ov6_022469E0(UnkStruct_0203CDB0 * param0, StringFormatter * param1, int param2, u16 * param3, u16 * param4); #endif // POKEPLATINUM_OV6_022465FC_H diff --git a/include/overlay007/struct_ov7_0224D008.h b/include/overlay007/struct_ov7_0224D008.h index 2c1cd68f22..4305ae2f92 100644 --- a/include/overlay007/struct_ov7_0224D008.h +++ b/include/overlay007/struct_ov7_0224D008.h @@ -30,7 +30,7 @@ typedef struct { UIControlData * unk_80; ResourceMetadata * unk_84; MessageLoader * unk_88; - UnkStruct_0200B358 * unk_8C; + StringFormatter * unk_8C; UnkStruct_020203AC * unk_90; UnkStruct_ov5_021D30A8 unk_94; GraphicElementData * unk_25C[4]; diff --git a/include/overlay013/struct_ov13_022213F0.h b/include/overlay013/struct_ov13_022213F0.h index 13a44ecd65..157cb880d0 100644 --- a/include/overlay013/struct_ov13_022213F0.h +++ b/include/overlay013/struct_ov13_022213F0.h @@ -39,7 +39,7 @@ typedef struct { u8 unk_1F9F_7 : 1; UnkStruct_0200C440 * unk_1FA0; MessageLoader * unk_1FA4; - UnkStruct_0200B358 * unk_1FA8; + StringFormatter * unk_1FA8; Strbuf* unk_1FAC; SpriteGfxHandler * unk_1FB0; CellActorData * unk_1FB4[38]; diff --git a/include/overlay013/struct_ov13_02227244.h b/include/overlay013/struct_ov13_02227244.h index 45eb840750..93817a206c 100644 --- a/include/overlay013/struct_ov13_02227244.h +++ b/include/overlay013/struct_ov13_02227244.h @@ -21,7 +21,7 @@ typedef struct { PaletteData * unk_08; UnkStruct_0200C440 * unk_0C; MessageLoader * unk_10; - UnkStruct_0200B358 * unk_14; + StringFormatter * unk_14; Strbuf* unk_18; Window unk_1C; Window * unk_2C; diff --git a/include/overlay016/ov16_0223DF00.h b/include/overlay016/ov16_0223DF00.h index d92c53e861..17621f67b4 100644 --- a/include/overlay016/ov16_0223DF00.h +++ b/include/overlay016/ov16_0223DF00.h @@ -111,7 +111,7 @@ u16 * ov16_0223E0A4(BattleSystem * param0); u16 * ov16_0223E0B0(BattleSystem * param0); u16 * ov16_0223E0BC(BattleSystem * param0); UnkStruct_ov16_0223E0C8 * ov16_0223E0C8(BattleSystem * param0); -UnkStruct_0200B358 * ov16_0223E0D0(BattleSystem * param0); +StringFormatter * BattleSystem_StringFormatter(BattleSystem * param0); Strbuf* ov16_0223E0D4(BattleSystem * param0); /** diff --git a/include/overlay017/struct_ov17_0223F88C.h b/include/overlay017/struct_ov17_0223F88C.h index 7b014478f8..485b32a229 100644 --- a/include/overlay017/struct_ov17_0223F88C.h +++ b/include/overlay017/struct_ov17_0223F88C.h @@ -31,7 +31,7 @@ typedef struct { MessageLoader * unk_3C; MessageLoader * unk_40; MessageLoader * unk_44; - UnkStruct_0200B358 * unk_48; + StringFormatter * unk_48; Strbuf* unk_4C; PaletteData * unk_50; UnkStruct_02012744 * unk_54; diff --git a/include/overlay017/struct_ov17_022476F8.h b/include/overlay017/struct_ov17_022476F8.h index 6f9937623d..de451704d7 100644 --- a/include/overlay017/struct_ov17_022476F8.h +++ b/include/overlay017/struct_ov17_022476F8.h @@ -26,7 +26,7 @@ typedef struct { BGL * unk_24; Window unk_28[1]; MessageLoader * unk_38; - UnkStruct_0200B358 * unk_3C; + StringFormatter * unk_3C; Strbuf* unk_40; PaletteData * unk_44; UnkStruct_ov16_0223E0C8 unk_48[4]; diff --git a/include/overlay017/struct_ov17_0224A1EC.h b/include/overlay017/struct_ov17_0224A1EC.h index 285d58ab1b..5a84b9b5b3 100644 --- a/include/overlay017/struct_ov17_0224A1EC.h +++ b/include/overlay017/struct_ov17_0224A1EC.h @@ -37,7 +37,7 @@ typedef struct { BGL * unk_60; Window unk_64[2]; MessageLoader * unk_84; - UnkStruct_0200B358 * unk_88; + StringFormatter * unk_88; Strbuf* unk_8C; PaletteData * unk_90; UnkStruct_02012744 * unk_94; diff --git a/include/overlay017/struct_ov17_022507C4.h b/include/overlay017/struct_ov17_022507C4.h index c3cf6ac8f1..74ab9db613 100644 --- a/include/overlay017/struct_ov17_022507C4.h +++ b/include/overlay017/struct_ov17_022507C4.h @@ -27,7 +27,7 @@ typedef struct { BGL * unk_20; Window unk_24[9]; MessageLoader * unk_B4; - UnkStruct_0200B358 * unk_B8; + StringFormatter * unk_B8; Strbuf* unk_BC; PaletteData * unk_C0; UnkStruct_02012744 * unk_C4; diff --git a/include/overlay019/ov19_021D0D80.h b/include/overlay019/ov19_021D0D80.h index 82b7b791b7..3886b87844 100644 --- a/include/overlay019/ov19_021D0D80.h +++ b/include/overlay019/ov19_021D0D80.h @@ -18,7 +18,7 @@ int ov19_021D0E58(UnkStruct_020067E8 * param0, int * param1); BOOL ov19_021D3B18(const UnkStruct_ov19_021D5DF8 * param0); BOOL ov19_021D3B20(const UnkStruct_ov19_021D5DF8 * param0); MessageLoader * ov19_021D5DE8(const UnkStruct_ov19_021D5DF8 * param0); -const UnkStruct_0200B358 * ov19_021D5DF0(const UnkStruct_ov19_021D5DF8 * param0); +const StringFormatter * ov19_021D5DF0(const UnkStruct_ov19_021D5DF8 * param0); int ov19_021D5DF8(const UnkStruct_ov19_021D5DF8 * param0); u32 ov19_021D5E08(const UnkStruct_ov19_021D4DF0 * param0); u32 ov19_021D5E10(const UnkStruct_ov19_021D4DF0 * param0); diff --git a/include/overlay019/ov19_021DB2FC.h b/include/overlay019/ov19_021DB2FC.h index e062aa48e4..07fceb0c46 100644 --- a/include/overlay019/ov19_021DB2FC.h +++ b/include/overlay019/ov19_021DB2FC.h @@ -11,7 +11,7 @@ #include "overlay019/struct_ov19_021DB6F0.h" #include "overlay019/struct_ov19_021DF964.h" -BOOL ov19_021DB2FC(UnkStruct_ov19_021DB6F0 * param0, UnkStruct_ov19_021D61B0 * param1, const UnkStruct_ov19_021D4DF0 * param2, BGL * param3, GraphicElementManager * param4, MessageLoader * param5, const UnkStruct_0200B358 * param6, int param7, NARC * param8); +BOOL ov19_021DB2FC(UnkStruct_ov19_021DB6F0 * param0, UnkStruct_ov19_021D61B0 * param1, const UnkStruct_ov19_021D4DF0 * param2, BGL * param3, GraphicElementManager * param4, MessageLoader * param5, const StringFormatter * param6, int param7, NARC * param8); void ov19_021DB370(UnkStruct_ov19_021DB6F0 * param0); void ov19_021DB3C4(UnkStruct_ov19_021DB6F0 * param0); void ov19_021DB448(UnkStruct_ov19_021DB6F0 * param0, u32 param1); diff --git a/include/overlay019/struct_ov19_021DB6F0.h b/include/overlay019/struct_ov19_021DB6F0.h index a1a3285376..f9b14a2699 100644 --- a/include/overlay019/struct_ov19_021DB6F0.h +++ b/include/overlay019/struct_ov19_021DB6F0.h @@ -24,7 +24,7 @@ typedef struct { int unk_20; void * unk_24; NNSG2dCharacterData * unk_28; - const UnkStruct_0200B358 * unk_2C; + const StringFormatter * unk_2C; Strbuf* unk_30; Strbuf* unk_34; } UnkStruct_ov19_021DB6F0; diff --git a/include/overlay023/struct_ov23_02250CD4.h b/include/overlay023/struct_ov23_02250CD4.h index 396968cf9c..58aef81163 100644 --- a/include/overlay023/struct_ov23_02250CD4.h +++ b/include/overlay023/struct_ov23_02250CD4.h @@ -39,7 +39,7 @@ typedef struct { UnkFuncPtr_ov23_022515D8 unk_64; Strbuf* unk_68; Strbuf* unk_6C; - UnkStruct_0200B358 * unk_70; + StringFormatter * unk_70; UnkStruct_ov5_021D30A8 unk_74; CellActorData * unk_23C[8]; u32 unk_25C; diff --git a/include/overlay062/ov62_02231690.h b/include/overlay062/ov62_02231690.h index 91f4c1ce2d..103f633f9e 100644 --- a/include/overlay062/ov62_02231690.h +++ b/include/overlay062/ov62_02231690.h @@ -18,7 +18,7 @@ #include "overlay062/struct_ov62_0223CAA4.h" #include "overlay062/struct_ov62_02248CDC.h" -UnkStruct_0200B358 * ov62_02231690(u32 param0); +StringFormatter * ov62_02231690(u32 param0); int ov62_022316A0(UnkStruct_0208C06C * param0); int ov62_022316D0(UnkStruct_0208C06C * param0); int ov62_02231710(UnkStruct_0208C06C * param0, int param1); diff --git a/include/overlay062/struct_ov62_022349A8.h b/include/overlay062/struct_ov62_022349A8.h index 0273107352..e6d59da6f8 100644 --- a/include/overlay062/struct_ov62_022349A8.h +++ b/include/overlay062/struct_ov62_022349A8.h @@ -40,7 +40,7 @@ typedef struct { int unk_3EC; int unk_3F0; MessageLoader * unk_3F4; - UnkStruct_0200B358 * unk_3F8; + StringFormatter * unk_3F8; Strbuf* unk_3FC; UnkStruct_ov61_0222B920 unk_400; u8 unk_40D; diff --git a/include/overlay065/struct_ov65_0222EBE0_t.h b/include/overlay065/struct_ov65_0222EBE0_t.h index 640397c4f7..c0cd8eeb61 100644 --- a/include/overlay065/struct_ov65_0222EBE0_t.h +++ b/include/overlay065/struct_ov65_0222EBE0_t.h @@ -38,7 +38,7 @@ struct UnkStruct_ov65_0222EBE0_t { UnkStruct_0200112C * unk_158; BGL * unk_15C; SaveData * unk_160; - UnkStruct_0200B358 * unk_164; + StringFormatter * unk_164; MessageLoader * unk_168; MessageLoader * unk_16C; Strbuf* unk_170; diff --git a/include/overlay065/struct_ov65_02234E50.h b/include/overlay065/struct_ov65_02234E50.h index e8c2a82272..186ccee2f0 100644 --- a/include/overlay065/struct_ov65_02234E50.h +++ b/include/overlay065/struct_ov65_02234E50.h @@ -12,7 +12,7 @@ #include typedef struct { - UnkStruct_0200B358 * unk_00; + StringFormatter * unk_00; void * unk_04; NNSG2dScreenData * unk_08; void * unk_0C[7]; diff --git a/include/overlay072/struct_ov72_0223DB98_t.h b/include/overlay072/struct_ov72_0223DB98_t.h index 37e3f857e9..4836aba4ae 100644 --- a/include/overlay072/struct_ov72_0223DB98_t.h +++ b/include/overlay072/struct_ov72_0223DB98_t.h @@ -24,7 +24,7 @@ struct UnkStruct_ov72_0223DB98_t { BOOL unk_04; UnkStruct_0202CD88 * unk_08; AnimationControlFlags * unk_0C; - UnkStruct_0200B358 * unk_10; + StringFormatter * unk_10; MessageLoader * unk_14; Strbuf* unk_18[5]; Strbuf* unk_2C; diff --git a/include/overlay079/struct_ov79_021D0E1C_sub1.h b/include/overlay079/struct_ov79_021D0E1C_sub1.h index f237799b1c..4c4883b5c9 100644 --- a/include/overlay079/struct_ov79_021D0E1C_sub1.h +++ b/include/overlay079/struct_ov79_021D0E1C_sub1.h @@ -5,7 +5,7 @@ #include "strbuf.h" typedef struct { - UnkStruct_0200B358 * unk_00; + StringFormatter * unk_00; Strbuf* unk_04; Strbuf* unk_08; Strbuf* unk_0C; diff --git a/include/overlay081/struct_ov81_021D1610.h b/include/overlay081/struct_ov81_021D1610.h index 3e26baee40..57e4c1b87a 100644 --- a/include/overlay081/struct_ov81_021D1610.h +++ b/include/overlay081/struct_ov81_021D1610.h @@ -17,7 +17,7 @@ typedef struct { TrainerInfo * unk_48; SaveData * unk_4C; MessageLoader * unk_50; - UnkStruct_0200B358 * unk_54; + StringFormatter * unk_54; Strbuf* unk_58; u16 unk_5C[1024]; u16 unk_85C[1024]; diff --git a/include/overlay083/struct_ov83_0223DEA0.h b/include/overlay083/struct_ov83_0223DEA0.h index b02b169a99..699a078cb9 100644 --- a/include/overlay083/struct_ov83_0223DEA0.h +++ b/include/overlay083/struct_ov83_0223DEA0.h @@ -7,7 +7,7 @@ typedef struct { MessageLoader * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; Strbuf* unk_08; Strbuf* unk_0C; Strbuf* unk_10; diff --git a/include/overlay084/struct_ov84_0223B5A0.h b/include/overlay084/struct_ov84_0223B5A0.h index 5af1903303..f578577898 100644 --- a/include/overlay084/struct_ov84_0223B5A0.h +++ b/include/overlay084/struct_ov84_0223B5A0.h @@ -35,7 +35,7 @@ typedef struct { CellActorData * unk_E0[12]; UnkStruct_0200C440 * unk_110; MessageLoader * unk_114; - UnkStruct_0200B358 * unk_118; + StringFormatter * unk_118; MessageLoader * unk_11C; MessageLoader * unk_120; Strbuf* unk_124[12]; diff --git a/include/overlay088/ov88_0223E9C4.h b/include/overlay088/ov88_0223E9C4.h index 137f2b3aad..e15460aeee 100644 --- a/include/overlay088/ov88_0223E9C4.h +++ b/include/overlay088/ov88_0223E9C4.h @@ -14,7 +14,7 @@ void ov88_0223E9C4(BGL * param0, Window * param1, AnimationControlFlags * param2); void ov88_0223EC04(Window * param0); void ov88_0223EC78(Window * param0, Strbuf *param1, int param2, u32 param3, int param4, int param5); -int ov88_0223ECBC(Window * param0, int param1, int param2, MessageLoader * param3, UnkStruct_0200B358 * param4); +int ov88_0223ECBC(Window * param0, int param1, int param2, MessageLoader * param3, StringFormatter * param4); u32 ov88_0223ED2C(BGL * param0, UIControlData ** param1, int * param2); void ov88_0223ED80(Window * param0); UnkStruct_0200112C * ov88_0223ED94(ResourceMetadata * param0, int param1, Window * param2, BGL * param3); diff --git a/include/overlay094/ov94_0223D0C4.h b/include/overlay094/ov94_0223D0C4.h index 5f023ffa8f..747bccfcfd 100644 --- a/include/overlay094/ov94_0223D0C4.h +++ b/include/overlay094/ov94_0223D0C4.h @@ -11,7 +11,7 @@ int ov94_0223D0C4(UnkStruct_ov94_0223FD4C * param0, int param1); int ov94_0223D19C(UnkStruct_ov94_0223FD4C * param0, int param1); int ov94_0223D1B0(UnkStruct_ov94_0223FD4C * param0, int param1); -void ov94_0223D910(MessageLoader * param0, MessageLoader * param1, UnkStruct_0200B358 * param2, Window param3[], BoxPokemon * param4, UnkStruct_ov94_0223BA88_sub2 * param5); +void ov94_0223D910(MessageLoader * param0, MessageLoader * param1, StringFormatter * param2, Window param3[], BoxPokemon * param4, UnkStruct_ov94_0223BA88_sub2 * param5); void ov94_0223DA78(MessageLoader * param0, Window param1[], u16 * param2, Pokemon * param3, Window param4[]); void ov94_0223DB2C(Pokemon * param0); diff --git a/include/overlay094/ov94_022414B8.h b/include/overlay094/ov94_022414B8.h index d9b2decdd7..950afd5804 100644 --- a/include/overlay094/ov94_022414B8.h +++ b/include/overlay094/ov94_022414B8.h @@ -22,8 +22,8 @@ void ov94_0224218C(Window * param0, MessageLoader * param1, MessageLoader * para void ov94_02242204(Window * param0, MessageLoader * param1, int param2, int param3, int param4, int param5, u32 param6); void ov94_0224226C(Window * param0, MessageLoader * param1, int param2, int param3, int param4, u32 param5, int param6, int param7); void ov94_022422B8(Window * param0, MessageLoader * param1, int param2, int param3, int param4, u32 param5, int param6); -void ov94_022422D4(MessageLoader * param0, MessageLoader * param1, UnkStruct_0200B358 * param2, Window param3[], int param4, int param5, int param6); -void ov94_02242368(MessageLoader * param0, MessageLoader * param1, UnkStruct_0200B358 * param2, Window param3[], int param4, int param5, int param6); +void ov94_022422D4(MessageLoader * param0, MessageLoader * param1, StringFormatter * param2, Window param3[], int param4, int param5, int param6); +void ov94_02242368(MessageLoader * param0, MessageLoader * param1, StringFormatter * param2, Window param3[], int param4, int param5, int param6); u16 * ov94_02242524(int param0, int param1, int * param2); u8 * ov94_02242548(int param0); void ov94_022425A8(UnkStruct_ov94_0223BA88 * param0, UnkStruct_ov94_0223FD4C * param1); diff --git a/include/overlay094/struct_ov94_0223FD4C.h b/include/overlay094/struct_ov94_0223FD4C.h index e9bac0f55c..fc60271aa5 100644 --- a/include/overlay094/struct_ov94_0223FD4C.h +++ b/include/overlay094/struct_ov94_0223FD4C.h @@ -87,7 +87,7 @@ typedef struct UnkStruct_ov94_0223FD4C_t { UnkStruct_ov94_0223BA88_sub3 unk_B7A; UnkStruct_ov94_0223BA88_sub3 unk_B80; int unk_B88; - UnkStruct_0200B358 * unk_B8C; + StringFormatter * unk_B8C; MessageLoader * unk_B90; MessageLoader * unk_B94; MessageLoader * unk_B98; diff --git a/include/overlay095/ov95_02246C20.h b/include/overlay095/ov95_02246C20.h index 955073e289..b6a4d83850 100644 --- a/include/overlay095/ov95_02246C20.h +++ b/include/overlay095/ov95_02246C20.h @@ -29,7 +29,7 @@ void ov95_022475A0(UnkStruct_ov95_02247568 * param0); void ov95_022475C4(UnkStruct_ov19_021DA864 * param0, UnkStruct_ov95_02247568 * param1, NNSG2dImageProxy * param2, NNSG2dImagePaletteProxy * param3, u32 param4); GraphicElementData * ov95_022475E4(UnkStruct_ov95_02247628 * param0, UnkStruct_ov19_021DA864 * param1, u32 param2, u32 param3, u32 param4, int param5); BGL * ov95_02247628(UnkStruct_ov95_02247628 * param0); -UnkStruct_0200B358 * ov95_0224762C(UnkStruct_ov95_02247628 * param0); +StringFormatter * ov95_0224762C(UnkStruct_ov95_02247628 * param0); MessageLoader * ov95_02247630(UnkStruct_ov95_02247628 * param0); const BoxPokemon * ov95_02247634(UnkStruct_ov95_02247628 * param0); const BoxPokemon * ov95_0224763C(UnkStruct_ov95_02247628 * param0); diff --git a/include/overlay096/struct_ov96_0223BF40_t.h b/include/overlay096/struct_ov96_0223BF40_t.h index 76144ba11b..4ba4dc62a7 100644 --- a/include/overlay096/struct_ov96_0223BF40_t.h +++ b/include/overlay096/struct_ov96_0223BF40_t.h @@ -50,7 +50,7 @@ struct UnkStruct_ov96_0223BF40_t { BoxPokemon * unk_BC0; int unk_BC4; int unk_BC8; - UnkStruct_0200B358 * unk_BCC; + StringFormatter * unk_BCC; MessageLoader * unk_BD0; MessageLoader * unk_BD4; MessageLoader * unk_BD8; diff --git a/include/overlay097/struct_ov97_0222D04C.h b/include/overlay097/struct_ov97_0222D04C.h index f6bceb543c..6abfebdfaa 100644 --- a/include/overlay097/struct_ov97_0222D04C.h +++ b/include/overlay097/struct_ov97_0222D04C.h @@ -25,7 +25,7 @@ typedef struct { BGL * unk_00; SaveData * unk_04; AnimationControlFlags * unk_08; - UnkStruct_0200B358 * unk_0C; + StringFormatter * unk_0C; MessageLoader * unk_10; Strbuf* unk_14; Window unk_18; diff --git a/include/overlay097/struct_ov97_02237808.h b/include/overlay097/struct_ov97_02237808.h index 995473d78e..907e9328c0 100644 --- a/include/overlay097/struct_ov97_02237808.h +++ b/include/overlay097/struct_ov97_02237808.h @@ -10,7 +10,7 @@ typedef struct { int unk_08; int unk_0C; Window * unk_10; - UnkStruct_0200B358 * unk_14; + StringFormatter * unk_14; int unk_18; int unk_1C; int unk_20; diff --git a/include/overlay101/struct_ov101_021D148C.h b/include/overlay101/struct_ov101_021D148C.h index c1cab63bea..758a1c0b3f 100644 --- a/include/overlay101/struct_ov101_021D148C.h +++ b/include/overlay101/struct_ov101_021D148C.h @@ -7,7 +7,7 @@ typedef struct { MessageLoader * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; Window unk_08[1]; void * unk_18; } UnkStruct_ov101_021D148C; diff --git a/include/overlay104/ov104_0222DCE0.h b/include/overlay104/ov104_0222DCE0.h index ead5ebcb12..7bec84f376 100644 --- a/include/overlay104/ov104_0222DCE0.h +++ b/include/overlay104/ov104_0222DCE0.h @@ -32,7 +32,7 @@ void ov104_0222E330(UnkStruct_ov104_0223A348_sub2 * param0, u16 param1[], u8 par u8 ov104_0222E3A8(u16 param0); BOOL ov104_0222E3E4(UnkStruct_0204B184 * param0, const u16 param1[], const u16 param2[], int param3, int param4, u16 param5[], int param6); void ov104_0222E4BC(u8 param0, u16 param1, u16 param2, u16 * param3, UnkStruct_ov104_0223A348_sub2 * param4, u8 * param5, u32 * param6, u8 param7); -void ov104_0222E5D0(UnkStruct_0200B358 * param0, u32 param1); +void ov104_0222E5D0(StringFormatter * param0, u32 param1); int ov104_0222E5F0(const TrainerInfo * param0); void ov104_0222E630(SaveData * param0); diff --git a/include/overlay104/ov104_02231F74.h b/include/overlay104/ov104_02231F74.h index b029afb464..18183084f2 100644 --- a/include/overlay104/ov104_02231F74.h +++ b/include/overlay104/ov104_02231F74.h @@ -17,10 +17,10 @@ void ov104_02231F74(UnkStruct_ov104_022320B4 * param0, const MessageLoader * param1, u16 param2, u8 param3, UnkStruct_ov104_0222FEDC * param4); void ov104_02232088(UnkStruct_ov104_022320B4 * param0); void ov104_022320B4(UnkStruct_ov104_022320B4 * param0, u8 param1, u16 param2, u16 param3, u16 param4, s16 param5, u8 param6); -UnkStruct_ov104_02232B5C * ov104_02232258(UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, MessageLoader * param7); +UnkStruct_ov104_02232B5C * ov104_02232258(UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, MessageLoader * param7); void ov104_022322A8(UnkStruct_ov104_02232B5C * param0, u32 param1, u32 param2, u32 param3); void ov104_022322B0(UnkStruct_ov104_02232B5C * param0); -UnkStruct_ov104_02232B5C * ov104_022325FC(UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, MessageLoader * param7); +UnkStruct_ov104_02232B5C * ov104_022325FC(UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, MessageLoader * param7); void ov104_0223261C(UnkStruct_ov104_02232B5C * param0, u32 param1, u32 param2, u32 param3); void ov104_02232624(UnkStruct_ov104_02232B5C * param0); void ov104_02232B5C(UnkStruct_ov104_02232B5C * param0); diff --git a/include/overlay104/struct_ov104_022320B4_t.h b/include/overlay104/struct_ov104_022320B4_t.h index 64a1ef1594..b528f02834 100644 --- a/include/overlay104/struct_ov104_022320B4_t.h +++ b/include/overlay104/struct_ov104_022320B4_t.h @@ -19,7 +19,7 @@ struct UnkStruct_ov104_022320B4_t { u8 unk_38; MessageLoader * unk_3C; u8 * unk_40; - UnkStruct_0200B358 * unk_44; + StringFormatter * unk_44; Strbuf* unk_48; Strbuf* unk_4C; u8 unk_50; diff --git a/include/overlay107/ov107_02249C98.h b/include/overlay107/ov107_02249C98.h index 10f4820d26..83aac0c91e 100644 --- a/include/overlay107/ov107_02249C98.h +++ b/include/overlay107/ov107_02249C98.h @@ -8,6 +8,6 @@ u8 ov107_02249C98(u8 param0, u8 param1); u8 ov107_02249C9C(u8 param0, u8 param1); u8 ov107_02249CAC(SaveData * param0, u8 param1, u8 param2); void ov107_02249CE0(u32 param0, u16 param1); -void ov107_02249CF4(UnkStruct_0200B358 * param0, u32 param1); +void ov107_02249CF4(StringFormatter * param0, u32 param1); #endif // POKEPLATINUM_OV107_02249C98_H diff --git a/include/overlay109/struct_ov109_021D5140.h b/include/overlay109/struct_ov109_021D5140.h index 1b93d0db78..91cb29a67f 100644 --- a/include/overlay109/struct_ov109_021D5140.h +++ b/include/overlay109/struct_ov109_021D5140.h @@ -33,7 +33,7 @@ typedef struct UnkStruct_ov109_021D5140_t { BOOL unk_18; UnkStruct_ov109_021D5140_sub1 unk_1C; SysTask * unk_30; - UnkStruct_0200B358 * unk_34; + StringFormatter * unk_34; MessageLoader * unk_38; Strbuf* unk_3C[5]; Strbuf* unk_50; diff --git a/include/overlay113/ov113_02260620.h b/include/overlay113/ov113_02260620.h index b2e3fba95a..b3fb5217bc 100644 --- a/include/overlay113/ov113_02260620.h +++ b/include/overlay113/ov113_02260620.h @@ -7,7 +7,7 @@ #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay113/struct_ov113_02260818.h" -void ov113_02260620(MessageLoader * param0, UnkStruct_0200B358 * param1, Window param2[], UnkStruct_ov66_0222DFF8 * param3, s32 param4); +void ov113_02260620(MessageLoader * param0, StringFormatter * param1, Window param2[], UnkStruct_ov66_0222DFF8 * param3, s32 param4); void ov113_02260714(Window param0[], u32 param1); u16 ov113_0226072C(int param0, u32 param1); int ov113_02260748(UnkStruct_ov113_02260818 * param0, int param1); diff --git a/include/overlay117/struct_ov117_02261280.h b/include/overlay117/struct_ov117_02261280.h index 7cd89f0c2b..c34062db55 100644 --- a/include/overlay117/struct_ov117_02261280.h +++ b/include/overlay117/struct_ov117_02261280.h @@ -47,7 +47,7 @@ typedef struct UnkStruct_ov117_02261280_t { BGL * unk_2C; Window unk_30[5]; MessageLoader * unk_80; - UnkStruct_0200B358 * unk_84; + StringFormatter * unk_84; Strbuf* unk_88; PaletteData * unk_8C; UnkStruct_02012744 * unk_90; diff --git a/include/struct_decls/struct_0200B358_decl.h b/include/struct_decls/struct_0200B358_decl.h index 42630693e1..285fed1bad 100644 --- a/include/struct_decls/struct_0200B358_decl.h +++ b/include/struct_decls/struct_0200B358_decl.h @@ -1,6 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_0200B358_DECL_H #define POKEPLATINUM_STRUCT_0200B358_DECL_H -typedef struct UnkStruct_0200B358_t UnkStruct_0200B358; +typedef struct UnkStruct_0200B358_t StringFormatter; #endif // POKEPLATINUM_STRUCT_0200B358_DECL_H diff --git a/include/struct_defs/battle_system.h b/include/struct_defs/battle_system.h index 2be3f4cf95..d41d5aff08 100644 --- a/include/struct_defs/battle_system.h +++ b/include/struct_defs/battle_system.h @@ -49,7 +49,7 @@ struct BattleSystem { Window *windows; MessageLoader * unk_0C; MessageLoader * unk_10; - UnkStruct_0200B358 *strFormatter; + StringFormatter *strFormatter; Strbuf *msgBuffer; SysTask * unk_1C; SysTask * unk_20; diff --git a/include/struct_defs/struct_0207AE68_t.h b/include/struct_defs/struct_0207AE68_t.h index 8bc38e4949..06c785c7f1 100644 --- a/include/struct_defs/struct_0207AE68_t.h +++ b/include/struct_defs/struct_0207AE68_t.h @@ -27,7 +27,7 @@ struct UnkStruct_0207AE68_t { BGL * unk_00; Window * unk_04; MessageLoader * unk_08; - UnkStruct_0200B358 * unk_0C; + StringFormatter * unk_0C; Strbuf* unk_10; PaletteData * unk_14; UnkStruct_02007768 * unk_18; diff --git a/include/struct_defs/struct_0207F248.h b/include/struct_defs/struct_0207F248.h index c0f0d271d2..64fbe0246d 100644 --- a/include/struct_defs/struct_0207F248.h +++ b/include/struct_defs/struct_0207F248.h @@ -38,7 +38,7 @@ typedef struct { CellActorData * unk_624[29]; UnkStruct_0200C440 * unk_698; MessageLoader * unk_69C; - UnkStruct_0200B358 * unk_6A0; + StringFormatter * unk_6A0; Strbuf* unk_6A4; Strbuf* unk_6A8; Strbuf* unk_6AC[20]; diff --git a/include/struct_defs/struct_0208D7BC.h b/include/struct_defs/struct_0208D7BC.h index d1255729f2..43560e0ef6 100644 --- a/include/struct_defs/struct_0208D7BC.h +++ b/include/struct_defs/struct_0208D7BC.h @@ -36,7 +36,7 @@ typedef struct { UnkStruct_0200C440 * unk_684; MessageLoader * unk_688; MessageLoader * unk_68C; - UnkStruct_0200B358 * unk_690; + StringFormatter * unk_690; Strbuf* unk_694; Strbuf* unk_698; MessageLoader * unk_69C; diff --git a/include/struct_defs/struct_02090800.h b/include/struct_defs/struct_02090800.h index 67d43abc98..edced91b19 100644 --- a/include/struct_defs/struct_02090800.h +++ b/include/struct_defs/struct_02090800.h @@ -9,7 +9,7 @@ typedef struct { int unk_00; MessageLoader * unk_04; - UnkStruct_0200B358 * unk_08; + StringFormatter * unk_08; Pokemon * unk_0C; BOOL unk_10; PokemonInfoDisplayStruct_sub1 unk_14; diff --git a/include/struct_defs/struct_02095E80_t.h b/include/struct_defs/struct_02095E80_t.h index d186acd68c..1e360dd0f7 100644 --- a/include/struct_defs/struct_02095E80_t.h +++ b/include/struct_defs/struct_02095E80_t.h @@ -64,9 +64,9 @@ struct UnkStruct_02095E80_t { int unk_16C; int unk_170; BGL * unk_174; - UnkStruct_0200B358 * unk_178; - UnkStruct_0200B358 * unk_17C; - UnkStruct_0200B358 * unk_180; + StringFormatter * unk_178; + StringFormatter * unk_17C; + StringFormatter * unk_180; MessageLoader * unk_184; Strbuf* unk_188; Strbuf* unk_18C; @@ -125,7 +125,7 @@ struct UnkStruct_02095E80_t { int unk_3644[32]; int unk_36C4; int unk_36C8; - UnkStruct_0200B358 * unk_36CC; + StringFormatter * unk_36CC; MessageLoader * unk_36D0; ResourceMetadata * unk_36D4; UnkStruct_0200112C * unk_36D8; diff --git a/include/struct_defs/struct_02095EAC_t.h b/include/struct_defs/struct_02095EAC_t.h index 9a3106d0d5..d5b2662249 100644 --- a/include/struct_defs/struct_02095EAC_t.h +++ b/include/struct_defs/struct_02095EAC_t.h @@ -23,7 +23,7 @@ struct UnkStruct_02095EAC_t { BGL * unk_00; BOOL unk_04; UnkStruct_0203DDFC * unk_08; - UnkStruct_0200B358 * unk_0C; + StringFormatter * unk_0C; MessageLoader * unk_10; Strbuf* unk_14[5]; Strbuf* unk_28; diff --git a/include/struct_defs/struct_020961E8_t.h b/include/struct_defs/struct_020961E8_t.h index b123b2c5fe..12efb8de98 100644 --- a/include/struct_defs/struct_020961E8_t.h +++ b/include/struct_defs/struct_020961E8_t.h @@ -29,7 +29,7 @@ struct UnkStruct_020961E8_t { UnkStruct_0203DE34 * unk_08; UnkStruct_ov59_021D109C unk_0C; SysTask * unk_20; - UnkStruct_0200B358 * unk_24; + StringFormatter * unk_24; MessageLoader * unk_28; Strbuf* unk_2C[5]; Strbuf* unk_40; diff --git a/include/unk_0200B29C.h b/include/unk_0200B29C.h index 23e7e56724..2a70fd8f10 100644 --- a/include/unk_0200B29C.h +++ b/include/unk_0200B29C.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "strbuf.h" -Strbuf* sub_0200B29C(UnkStruct_0200B358 * param0, MessageLoader * param1, u32 param2, u32 param3); +Strbuf* sub_0200B29C(StringFormatter * param0, MessageLoader * param1, u32 param2, u32 param3); Strbuf* sub_0200B2EC(u32 param0, u32 param1); Strbuf* sub_0200B32C(u32 param0, u32 param1); diff --git a/include/unk_0200B358.h b/include/unk_0200B358.h index aa80d515e4..9f089af015 100644 --- a/include/unk_0200B358.h +++ b/include/unk_0200B358.h @@ -11,79 +11,79 @@ #include "enums.h" -UnkStruct_0200B358 * sub_0200B358(u32 param0); -UnkStruct_0200B358 * sub_0200B368(u32 param0, u32 param1, u32 param2); -void sub_0200B3F0(UnkStruct_0200B358 * param0); -void sub_0200B48C(UnkStruct_0200B358 * param0, u32 param1, const Strbuf *param2, u32 param3, BOOL param4, u32 param5); -void sub_0200B498(UnkStruct_0200B358 * param0, u32 param1, const TrainerInfo * param2); -void sub_0200B4BC(UnkStruct_0200B358 * param0, u32 param1, const SaveData * param2); -void sub_0200B4E4(UnkStruct_0200B358 * param0, u32 param1, const SaveData * param2); -void sub_0200B538(UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2); -void sub_0200B578(UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2); -void sub_0200B594(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B5CC(UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2); -void sub_0200B5EC(UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2); -void sub_0200B60C(UnkStruct_0200B358 * param0, u32 param1, s32 param2, u32 param3, int param4, int param5); -void sub_0200B630(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B668(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B6A0(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B6D8(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B70C(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B744(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B77C(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B7B4(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B7EC(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B824(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B85C(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B890(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B8C8(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B928(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B960(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B998(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B9D0(UnkStruct_0200B358 * param0, u32 param1, TrainerData * param2); -void sub_0200BA08(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BA40(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BA74(UnkStruct_0200B358 * param0, u32 param1, TrainerData * param2); -void sub_0200BA94(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BACC(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BB04(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BB3C(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BB74(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BBA8(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BBDC(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BC10(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BC48(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BC80(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BCB8(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BCF0(UnkStruct_0200B358 * param0, u32 param1, u8 param2); -void sub_0200BD40(UnkStruct_0200B358 * param0, u32 param1, const PCBoxes * param2, u32 param3); -void sub_0200BD60(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BD98(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BDD0(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BE08(UnkStruct_0200B358 * param0, u32 param1, u32 param2, u32 param3); -void sub_0200BE48(UnkStruct_0200B358 * param0, u32 param1, u16 param2); -void sub_0200BE64(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BE98(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BECC(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BF74(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BFAC(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BFE4(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C01C(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C054(UnkStruct_0200B358 * param0, SaveData * param1, int param2, int param3, int param4); -void sub_0200C0B0(UnkStruct_0200B358 * param0, u32 param1, UnkEnum_ov66_022324D0 param2); -void sub_0200C0E8(UnkStruct_0200B358 * param0, u32 param1, int param2); -void sub_0200C120(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C158(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C190(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C1C8(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C200(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C238(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C270(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C2A8(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C2E0(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C324(UnkStruct_0200B358 * param0, u32 param1); -void sub_0200C338(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void StringFormatter_Format(const UnkStruct_0200B358 * param0, Strbuf *param1, const Strbuf *param2); -void sub_0200C41C(UnkStruct_0200B358 * param0); +StringFormatter * sub_0200B358(u32 param0); +StringFormatter * sub_0200B368(u32 param0, u32 param1, u32 param2); +void sub_0200B3F0(StringFormatter * param0); +void sub_0200B48C(StringFormatter * param0, u32 param1, const Strbuf *param2, u32 param3, BOOL param4, u32 param5); +void sub_0200B498(StringFormatter * param0, u32 param1, const TrainerInfo * param2); +void sub_0200B4BC(StringFormatter * param0, u32 param1, const SaveData * param2); +void sub_0200B4E4(StringFormatter * param0, u32 param1, const SaveData * param2); +void sub_0200B538(StringFormatter * param0, u32 param1, BoxPokemon * param2); +void sub_0200B578(StringFormatter * param0, u32 param1, BoxPokemon * param2); +void sub_0200B594(StringFormatter * param0, u32 param1, u32 param2); +void StringFormatter_BufferNickname(StringFormatter * param0, u32 param1, BoxPokemon * param2); +void sub_0200B5EC(StringFormatter * param0, u32 param1, BoxPokemon * param2); +void sub_0200B60C(StringFormatter * param0, u32 param1, s32 param2, u32 param3, int param4, int param5); +void sub_0200B630(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B668(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B6A0(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B6D8(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B70C(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B744(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B77C(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B7B4(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B7EC(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B824(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B85C(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B890(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B8C8(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B928(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B960(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B998(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B9D0(StringFormatter * param0, u32 param1, TrainerData * param2); +void sub_0200BA08(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BA40(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BA74(StringFormatter * param0, u32 param1, TrainerData * param2); +void sub_0200BA94(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BACC(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BB04(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BB3C(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BB74(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BBA8(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BBDC(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BC10(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BC48(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BC80(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BCB8(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BCF0(StringFormatter * param0, u32 param1, u8 param2); +void sub_0200BD40(StringFormatter * param0, u32 param1, const PCBoxes * param2, u32 param3); +void sub_0200BD60(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BD98(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BDD0(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BE08(StringFormatter * param0, u32 param1, u32 param2, u32 param3); +void sub_0200BE48(StringFormatter * param0, u32 param1, u16 param2); +void sub_0200BE64(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BE98(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BECC(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BF74(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BFAC(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BFE4(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C01C(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C054(StringFormatter * param0, SaveData * param1, int param2, int param3, int param4); +void sub_0200C0B0(StringFormatter * param0, u32 param1, UnkEnum_ov66_022324D0 param2); +void sub_0200C0E8(StringFormatter * param0, u32 param1, int param2); +void sub_0200C120(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C158(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C190(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C1C8(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C200(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C238(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C270(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C2A8(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C2E0(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C324(StringFormatter * param0, u32 param1); +void sub_0200C338(StringFormatter * param0, u32 param1, u32 param2); +void StringFormatter_Format(const StringFormatter * param0, Strbuf *param1, const Strbuf *param2); +void sub_0200C41C(StringFormatter * param0); #endif // POKEPLATINUM_UNK_0200B358_H diff --git a/include/unk_02018340.h b/include/unk_02018340.h index 7652745b23..f4fee8a483 100644 --- a/include/unk_02018340.h +++ b/include/unk_02018340.h @@ -55,7 +55,7 @@ Window * sub_0201A778(u32 param0, u8 param1); void sub_0201A7A0(Window * param0); u8 sub_0201A7CC(Window * param0); void BGL_AddWindow(BGL * param0, Window * param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6, u8 param7, u16 param8); -void sub_0201A870(BGL * param0, Window * param1, u8 param2, u8 param3, u16 param4, u8 param5); +void BGL_AddFramelessWindow(BGL * param0, Window * param1, u8 param2, u8 param3, u16 param4, u8 param5); void sub_0201A8D4(BGL * param0, Window * param1, const UnkStruct_ov61_0222C884 * param2); void BGL_DeleteWindow(Window * param0); void sub_0201A928(Window * param0, u8 param1); diff --git a/include/unk_0201D670.h b/include/unk_0201D670.h index 7b43787527..b36270126c 100644 --- a/include/unk_0201D670.h +++ b/include/unk_0201D670.h @@ -27,7 +27,7 @@ void sub_0201D730(u8 param0); */ u8 PrintStringSimple(Window *window, u32 fontID, const Strbuf *strbuf, u32 xOffset, u32 yOffset, u32 renderDelay, UnkFuncPtr_0201D834 callback); u8 sub_0201D78C(Window * param0, u32 param1, const Strbuf *param2, u32 param3, u32 param4, u32 param5, u32 param6, UnkFuncPtr_0201D834 param7); -u8 sub_0201D7E0(Window * param0, u32 param1, const Strbuf *param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, UnkFuncPtr_0201D834 param9); +u8 PrintStringWithColorAndMargins(Window * param0, u32 param1, const Strbuf *param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, UnkFuncPtr_0201D834 param9); u8 sub_0201D834(const UnkStruct_0201D738 * param0, u32 param1, UnkFuncPtr_0201D834 param2); void sub_0201D9FC(u8 param0, u8 param1, u8 param2); void sub_0201DAA0(u32 param0, u32 param1); diff --git a/include/unk_020218BC.h b/include/unk_020218BC.h index 9c55878430..28464d49cb 100644 --- a/include/unk_020218BC.h +++ b/include/unk_020218BC.h @@ -55,7 +55,7 @@ u32 sub_02021F48(const GraphicElementData * param0); void sub_02021F58(GraphicElementData * param0, u32 param1); u32 sub_02021F74(const GraphicElementData * param0); void sub_02021F7C(GraphicElementData * param0, const NNSG2dImageProxy * param1); -NNSG2dImageProxy * sub_02021F98(GraphicElementData * param0); +NNSG2dImageProxy * SpriteActor_ImageProxy(GraphicElementData * param0); NNSG2dImagePaletteProxy * sub_02021F9C(GraphicElementData * param0); void sub_02021FA0(GraphicElementData * param0, BOOL param1); NNS_G2D_VRAM_TYPE sub_02021FC8(const GraphicElementData * param0); diff --git a/include/unk_0204AEE8.h b/include/unk_0204AEE8.h index d96571d0fa..621626d643 100644 --- a/include/unk_0204AEE8.h +++ b/include/unk_0204AEE8.h @@ -8,7 +8,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay104/struct_ov104_0223A348.h" -UnkStruct_0200B358 * sub_0204AEE8(SaveData * param0, u16 param1, u16 param2, u8 param3, u8 * param4); +StringFormatter * sub_0204AEE8(SaveData * param0, u16 param1, u16 param2, u8 param3, u8 * param4); u16 sub_0204AF9C(u8 param0); u16 sub_0204AFC4(UnkStruct_0203CDB0 * param0, const u16 * param1); u16 sub_0204B020(UnkStruct_0203CDB0 * param0, const u16 * param1); diff --git a/include/unk_0205B33C.h b/include/unk_0205B33C.h index b87c08ebca..05239f9ff2 100644 --- a/include/unk_0205B33C.h +++ b/include/unk_0205B33C.h @@ -35,14 +35,14 @@ u8 * sub_0205BA5C(int param0, void * param1, int param2); void sub_0205BA6C(int param0, int param1, void * param2, void * param3); u16 sub_0205BA7C(UnkStruct_0205B43C * param0); void sub_0205BAAC(int param0); -int sub_0205BC50(UnkStruct_0200B358 * param0); -int sub_0205BCF4(UnkStruct_0205B43C * param0, int param1, int param2, UnkStruct_0200B358 * param3); +int sub_0205BC50(StringFormatter * param0); +int sub_0205BCF4(UnkStruct_0205B43C * param0, int param1, int param2, StringFormatter * param3); u8 sub_0205BE38(void); void sub_0205BEA8(int param0); -int sub_0205BF44(UnkStruct_0205B43C * param0, UnkStruct_0200B358 * param1); +int sub_0205BF44(UnkStruct_0205B43C * param0, StringFormatter * param1); void sub_0205C010(UnkStruct_0205B43C * param0, Sentence * param1); Sentence * sub_0205C028(UnkStruct_0205B43C * param0); -void sub_0205C040(UnkStruct_0200B358 * param0, int param1, int param2, TrainerInfo * param3, UnkStruct_02014EC4 * param4); +void sub_0205C040(StringFormatter * param0, int param1, int param2, TrainerInfo * param3, UnkStruct_02014EC4 * param4); void sub_0205C12C(Sentence * param0); void sub_0205C154(UnkStruct_0205B43C * param0); void * sub_0205C17C(UnkStruct_0205B43C * param0); diff --git a/include/unk_0205C980.h b/include/unk_0205C980.h index 688e73cf35..b1d5befd6d 100644 --- a/include/unk_0205C980.h +++ b/include/unk_0205C980.h @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B358_decl.h" -void sub_0205C980(u32 param0, int param1, UnkStruct_0200B358 * param2); +void sub_0205C980(u32 param0, int param1, StringFormatter * param2); int sub_0205C9BC(u32 param0, int param1, u32 param2); int sub_0205CA0C(int param0, int param1); int sub_0205CA14(int param0, int param1, int param2); diff --git a/include/unk_0206CCB0.h b/include/unk_0206CCB0.h index d97fb2ed67..30034d0cfa 100644 --- a/include/unk_0206CCB0.h +++ b/include/unk_0206CCB0.h @@ -10,7 +10,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay006/struct_ov6_022465F4_decl.h" -int sub_0206CD00(int param0, UnkStruct_0203CDB0 * param1, UnkStruct_0200B358 * param2, UnkStruct_ov6_022465F4 * param3, u16 * param4); +int sub_0206CD00(int param0, UnkStruct_0203CDB0 * param1, StringFormatter * param2, UnkStruct_ov6_022465F4 * param3, u16 * param4); BOOL sub_0206CD2C(int param0, UnkStruct_0203CDB0 * param1, UnkStruct_ov6_022465F4 * param2); void sub_0206CF14(TVBroadcast * param0, Pokemon * param1, int param2, int param3, int param4); void sub_0206CF48(TVBroadcast * param0, Pokemon * param1, int param2); diff --git a/include/unk_020933F8.h b/include/unk_020933F8.h index 6663f33e76..78b7fe580f 100644 --- a/include/unk_020933F8.h +++ b/include/unk_020933F8.h @@ -13,13 +13,13 @@ UnkStruct_02095C48 * sub_02093800(const UnkStruct_02093800 * param0); void sub_02093AD4(UnkStruct_02095C48 * param0); BOOL sub_020943B0(UnkStruct_02095C48 * param0); BOOL sub_020944CC(UnkStruct_02095C48 * param0); -void sub_02094630(UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * param2, u32 param3); -void sub_02094648(UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * param2, u32 param3); -void sub_02094680(UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * param2, u32 param3); -void sub_020946A4(UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2); -void sub_020946CC(UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2); -void sub_020946F0(UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2); -void sub_02094720(UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2); +void sub_02094630(UnkStruct_02095C48 * param0, int param1, StringFormatter * param2, u32 param3); +void sub_02094648(UnkStruct_02095C48 * param0, int param1, StringFormatter * param2, u32 param3); +void sub_02094680(UnkStruct_02095C48 * param0, int param1, StringFormatter * param2, u32 param3); +void sub_020946A4(UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2); +void sub_020946CC(UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2); +void sub_020946F0(UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2); +void sub_02094720(UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2); u32 sub_02094750(UnkStruct_02095C48 * param0); void sub_02094754(UnkStruct_02095C48 * param0, u8 param1); BOOL sub_0209476C(UnkStruct_02095C48 * param0, u8 param1); @@ -33,7 +33,7 @@ void sub_02094828(UnkStruct_02095C48 * param0, u16 * param1, u16 * param2, u16 * void sub_02094850(UnkStruct_02095C48 * param0); void sub_02094860(UnkStruct_02095C48 * param0); BOOL sub_02094868(UnkStruct_02095C48 * param0); -void sub_02094898(UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2, int param3); +void sub_02094898(UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2, int param3); u32 sub_02094904(UnkStruct_02095C48 * param0); void sub_02094A58(UnkStruct_02095C48 * param0, int param1); BOOL sub_02094B1C(UnkStruct_02095C48 * param0); diff --git a/src/overlay005/ov5_021DB888.c b/src/overlay005/ov5_021DB888.c index 07dc906e58..285b29ef2c 100644 --- a/src/overlay005/ov5_021DB888.c +++ b/src/overlay005/ov5_021DB888.c @@ -41,7 +41,7 @@ typedef struct { u16 unk_110; u16 unk_112; u16 * unk_114; - UnkStruct_0200B358 * unk_118; + StringFormatter * unk_118; SysTask * unk_11C; } UnkStruct_ov5_021DBA58; @@ -51,7 +51,7 @@ typedef struct { UnkStruct_ov5_021DBA58 * unk_08; } UnkStruct_ov5_021DBC64; -void ov5_021DB888(UnkStruct_020508D4 * param0, UnkStruct_0200B358 * param1, u16 * param2); +void ov5_021DB888(UnkStruct_020508D4 * param0, StringFormatter * param1, u16 * param2); u16 ov5_021DBD98(UnkStruct_0203CDB0 * param0, UnkStruct_02061AB4 * param1, u16 param2); BOOL ov5_021DBB94(UnkStruct_0203CDB0 * param0); static BOOL ov5_021DBB70(u32 param0); @@ -331,7 +331,7 @@ static const UnkStruct_ov5_021F8E3C Unk_ov5_021F8E34[] = { {0xfe, 0x0} }; -void ov5_021DB888 (UnkStruct_020508D4 * param0, UnkStruct_0200B358 * param1, u16 * param2) +void ov5_021DB888 (UnkStruct_020508D4 * param0, StringFormatter * param1, u16 * param2) { UnkStruct_ov5_021DBA58 * v0; UnkStruct_0203CDB0 * v1 = sub_02050A60(param0); diff --git a/src/overlay005/ov5_021DC018.c b/src/overlay005/ov5_021DC018.c index 248bce68ee..d436800a0b 100644 --- a/src/overlay005/ov5_021DC018.c +++ b/src/overlay005/ov5_021DC018.c @@ -44,7 +44,7 @@ struct UnkStruct_ov5_021DC1A4_t { Window * unk_18; Strbuf* unk_1C[28]; MessageLoader * unk_8C; - UnkStruct_0200B358 * unk_90; + StringFormatter * unk_90; u8 unk_94; u8 unk_95; u8 unk_96; @@ -73,8 +73,8 @@ struct UnkStruct_ov5_021DC1A4_t { u16 unk_2DC; }; -static void ov5_021DC018(UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021DC1A4 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, UnkStruct_0200B358 * param7, Window * param8, MessageLoader * param9); -UnkStruct_ov5_021DC1A4 * ov5_021DC150(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8); +static void ov5_021DC018(UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021DC1A4 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, StringFormatter * param7, Window * param8, MessageLoader * param9); +UnkStruct_ov5_021DC1A4 * ov5_021DC150(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8); void ov5_021DC1A4(UnkStruct_ov5_021DC1A4 * param0, u32 param1, u32 param2); void ov5_021DC1AC(UnkStruct_ov5_021DC1A4 * param0); void ov5_021DCD94(UnkStruct_ov5_021DC1A4 * param0, u8 param1); @@ -83,7 +83,7 @@ static void ov5_021DC290(UnkStruct_ov5_021DC1A4 * param0, u32 param1, u32 param2 static u32 ov5_021DC300(UnkStruct_ov5_021DC1A4 * param0); static void ov5_021DC33C(UnkStruct_ov5_021DC1A4 * param0); static void ov5_021DC3B0(SysTask * param0, void * param1); -UnkStruct_ov5_021DC1A4 * ov5_021DC48C(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8); +UnkStruct_ov5_021DC1A4 * ov5_021DC48C(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8); void ov5_021DC4B0(UnkStruct_ov5_021DC1A4 * param0, u32 param1, u32 param2, u32 param3); void ov5_021DC4B8(UnkStruct_ov5_021DC1A4 * param0); void ov5_021DC528(UnkStruct_ov5_021DC1A4 * param0, u16 param1); @@ -98,13 +98,13 @@ static void ov5_021DCA28(UnkStruct_ov5_021DC1A4 * param0); static void ov5_021DCA90(UnkStruct_ov5_021DC1A4 * param0, u16 param1, u32 param2); static void ov5_021DCAF4(UnkStruct_ov5_021DC1A4 * param0); static void ov5_021DCC64(SysTask * param0, void * param1); -void ov5_021DCB24(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, UnkStruct_0200B358 * param4, u16 param5); +void ov5_021DCB24(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, StringFormatter * param4, u16 param5); static void ov5_021DCC00(UnkStruct_ov5_021DC1A4 * param0, u16 param1, u8 param2, u8 param3); u16 ov5_021DCCC8(int param0); -UnkStruct_ov5_021DC1A4 * ov5_021DD250(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, UnkStruct_0200B358 * param4, u8 param5, u8 param6, u8 param7, u8 param8); +UnkStruct_ov5_021DC1A4 * ov5_021DD250(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, StringFormatter * param4, u8 param5, u8 param6, u8 param7, u8 param8); void ov5_021DD3A8(UnkStruct_ov5_021DC1A4 * param0); -static void ov5_021DC018 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021DC1A4 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, UnkStruct_0200B358 * param7, Window * param8, MessageLoader * param9) +static void ov5_021DC018 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021DC1A4 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, StringFormatter * param7, Window * param8, MessageLoader * param9) { int v0; @@ -155,7 +155,7 @@ static void ov5_021DC018 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021DC1A4 * return; } -UnkStruct_ov5_021DC1A4 * ov5_021DC150 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8) +UnkStruct_ov5_021DC1A4 * ov5_021DC150 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8) { UnkStruct_ov5_021DC1A4 * v0; int v1; @@ -331,7 +331,7 @@ void ov5_021DC424 (UnkStruct_ov5_021DC1A4 * param0) return; } -UnkStruct_ov5_021DC1A4 * ov5_021DC48C (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8) +UnkStruct_ov5_021DC1A4 * ov5_021DC48C (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8) { return ov5_021DC150(param0, param1, param2, param3, param4, param5, param6, param7, param8); } @@ -633,7 +633,7 @@ static void ov5_021DCAF4 (UnkStruct_ov5_021DC1A4 * param0) return; } -void ov5_021DCB24 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, UnkStruct_0200B358 * param4, u16 param5) +void ov5_021DCB24 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, StringFormatter * param4, u16 param5) { u8 v0; u32 v1, v2; @@ -848,7 +848,7 @@ void ov5_021DCF58 (Window * param0) void ov5_021DCF6C (UnkStruct_0203CDB0 * param0, Window * param1) { MessageLoader * v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; Strbuf* v2; Strbuf* v3; u32 v4; @@ -897,7 +897,7 @@ void ov5_021DD084 (Window * param0) void ov5_021DD098 (UnkStruct_0203CDB0 * param0, Window * param1) { MessageLoader * v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; Strbuf* v2; Strbuf* v3; u32 v4; @@ -940,7 +940,7 @@ Window * ov5_021DD140 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2) void ov5_021DD1A4 (UnkStruct_0203CDB0 * param0, Window * param1) { MessageLoader * v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; Strbuf* v2; Strbuf* v3; u16 v4; @@ -967,7 +967,7 @@ void ov5_021DD1A4 (UnkStruct_0203CDB0 * param0, Window * param1) sub_0201A9A4(param1); } -UnkStruct_ov5_021DC1A4 * ov5_021DD250 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, UnkStruct_0200B358 * param4, u8 param5, u8 param6, u8 param7, u8 param8) +UnkStruct_ov5_021DC1A4 * ov5_021DD250 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 * param3, StringFormatter * param4, u8 param5, u8 param6, u8 param7, u8 param8) { UnkStruct_ov5_021DC1A4 * v0; diff --git a/src/overlay005/ov5_021DD42C.c b/src/overlay005/ov5_021DD42C.c index 4f91a230b4..c955c2dd08 100644 --- a/src/overlay005/ov5_021DD42C.c +++ b/src/overlay005/ov5_021DD42C.c @@ -27,7 +27,7 @@ typedef struct { Strbuf* unk_00; Strbuf* unk_04; - UnkStruct_0200B358 * unk_08; + StringFormatter * unk_08; Window * unk_0C; u8 * unk_10; u8 * unk_14; @@ -35,7 +35,7 @@ typedef struct { static u8 ov5_021DD574(UnkStruct_0203E724 * param0); static void ov5_021DD588(UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021DD648 * param1); -static void ov5_021DD5D0(UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov5_021DD648 * param2); +static void ov5_021DD5D0(UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov5_021DD648 * param2); static void ov5_021DD610(UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021DD648 * param1); static void ov5_021DD648(UnkStruct_ov5_021DD648 * param0, const MessageLoader * param1, u32 param2); static void ov5_021DD664(UnkStruct_ov5_021DD648 * param0, u16 param1, u16 param2, u16 param3, u16 param4); @@ -99,7 +99,7 @@ void ov5_021DD4CC (UnkStruct_0203E724 * param0, u16 param1, u16 param2, u16 para } } -void ov5_021DD530 (UnkStruct_0203E724 * param0, UnkStruct_0200B358 * param1, u8 param2, u8 param3) +void ov5_021DD530 (UnkStruct_0203E724 * param0, StringFormatter * param1, u8 param2, u8 param3) { UnkStruct_ov5_021DD648 v0; @@ -118,13 +118,13 @@ static void ov5_021DD588 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021DD648 * { param1->unk_00 = *((Strbuf **)(sub_0203F098(param0, 16))); param1->unk_04 = *((Strbuf **)(sub_0203F098(param0, 17))); - param1->unk_08 = *((UnkStruct_0200B358 **)(sub_0203F098(param0, 15))); + param1->unk_08 = *((StringFormatter **)(sub_0203F098(param0, 15))); param1->unk_0C = sub_0203F098(param0, 1); param1->unk_10 = sub_0203F098(param0, 6); param1->unk_14 = sub_0203F098(param0, 3); } -static void ov5_021DD5D0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov5_021DD648 * param2) +static void ov5_021DD5D0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov5_021DD648 * param2) { param2->unk_00 = *((Strbuf **)(sub_0203F098(param0, 16))); param2->unk_04 = *((Strbuf **)(sub_0203F098(param0, 17))); diff --git a/src/overlay005/ov5_021E1D20.c b/src/overlay005/ov5_021E1D20.c index 697072c600..fe1ba97660 100644 --- a/src/overlay005/ov5_021E1D20.c +++ b/src/overlay005/ov5_021E1D20.c @@ -49,7 +49,7 @@ struct UnkStruct_ov5_021E1FF4_t { u8 unk_08; BGL * unk_0C; Window * unk_10; - UnkStruct_0200B358 * unk_14; + StringFormatter * unk_14; MessageLoader * unk_18; UnkStruct_ov5_021E1D20 unk_1C; int unk_2C; @@ -91,7 +91,7 @@ static void ov5_021E1D20 (UnkStruct_ov5_021E1D20 * param0, const UnkStruct_0203C param0->unk_0C = sub_02025E5C(v0); } -static void ov5_021E1D6C (UnkStruct_0200B358 * param0, const UnkStruct_ov5_021E1D20 * param1) +static void ov5_021E1D6C (StringFormatter * param0, const UnkStruct_ov5_021E1D20 * param1) { int v0, v1, v2; diff --git a/src/overlay005/ov5_021E2338.c b/src/overlay005/ov5_021E2338.c index 7ffdcb47f3..b1cef5d458 100644 --- a/src/overlay005/ov5_021E2338.c +++ b/src/overlay005/ov5_021E2338.c @@ -2620,7 +2620,7 @@ static BOOL ov5_021E51B4 (UnkStruct_ov5_021E5128 * param0) static Strbuf* ov5_021E5240 (u32 param0, u32 param1) { - UnkStruct_0200B358 * v0; + StringFormatter * v0; MessageLoader * v1; Strbuf* v2; Strbuf* v3; diff --git a/src/overlay005/ov5_021E622C.c b/src/overlay005/ov5_021E622C.c index 901c1a4e6c..abdd72c52c 100644 --- a/src/overlay005/ov5_021E622C.c +++ b/src/overlay005/ov5_021E622C.c @@ -1962,11 +1962,11 @@ static u8 ov5_021E70FC(UnkStruct_02026310 * param0); static int ov5_021E6F6C(Party * param0); static u8 ov5_021E6FF0(BoxPokemon ** param0); void ov5_021E6B40(UnkStruct_02026310 * param0); -int ov5_021E6630(UnkStruct_02026310 * param0, u8 param1, UnkStruct_0200B358 * param2); -u8 ov5_021E6640(UnkStruct_02026310 * param0, int param1, UnkStruct_0200B358 * param2); -u16 ov5_021E73A0(Party * param0, int param1, UnkStruct_0200B358 * param2); +int ov5_021E6630(UnkStruct_02026310 * param0, u8 param1, StringFormatter * param2); +u8 ov5_021E6640(UnkStruct_02026310 * param0, int param1, StringFormatter * param2); +u16 ov5_021E73A0(Party * param0, int param1, StringFormatter * param2); u8 ov5_021E73C8(UnkStruct_02026310 * param0); -void ov5_021E72BC(UnkStruct_02026310 * param0, UnkStruct_0200B358 * param1); +void ov5_021E72BC(UnkStruct_02026310 * param0, StringFormatter * param1); static void ov5_021E62C4(Party * param0, int param1, UnkStruct_02026218 * param2, SaveData * param3); static int ov5_021E7110(UnkStruct_0203CDB0 * param0); @@ -2098,7 +2098,7 @@ static void ov5_021E63E0 (Pokemon * param0) Pokemon_CalcLevelAndStats(param0); } -static int ov5_021E6444 (Party * param0, UnkStruct_02026218 * param1, UnkStruct_0200B358 * param2) +static int ov5_021E6444 (Party * param0, UnkStruct_02026218 * param1, StringFormatter * param2) { Pokemon * v0 = Pokemon_New(4); BoxPokemon * v1 = sub_02026220(param1); @@ -2106,7 +2106,7 @@ static int ov5_021E6444 (Party * param0, UnkStruct_02026218 * param1, UnkStruct_ u32 v3; u16 v4; - sub_0200B5CC(param2, 0, v1); + StringFormatter_BufferNickname(param2, 0, v1); v4 = BoxPokemon_GetValue(v1, MON_DATA_SPECIES, NULL); Pokemon_FromBoxPokemon(v1, v0); @@ -2129,7 +2129,7 @@ static int ov5_021E6444 (Party * param0, UnkStruct_02026218 * param1, UnkStruct_ return v4; } -u16 ov5_021E64F8 (Party * param0, UnkStruct_0200B358 * param1, UnkStruct_02026310 * param2, u8 param3) +u16 ov5_021E64F8 (Party * param0, StringFormatter * param1, UnkStruct_02026310 * param2, u8 param3) { u16 v0; UnkStruct_02026218 * v1 = sub_02026218(param2, param3); @@ -2182,7 +2182,7 @@ int ov5_021E6590 (UnkStruct_02026218 * param0) return v0; } -u8 ov5_021E65B0 (UnkStruct_02026218 * param0, UnkStruct_0200B358 * param1) +u8 ov5_021E65B0 (UnkStruct_02026218 * param0, StringFormatter * param1) { int v0; Strbuf* v1; @@ -2192,18 +2192,18 @@ u8 ov5_021E65B0 (UnkStruct_02026218 * param0, UnkStruct_0200B358 * param1) v0 = ov5_021E6568(param0); sub_0200B60C(param1, 1, v0, 3, 0, 1); - sub_0200B5CC(param1, 0, v3); + StringFormatter_BufferNickname(param1, 0, v3); return v0; } -int ov5_021E65EC (UnkStruct_02026218 * param0, UnkStruct_0200B358 * param1) +int ov5_021E65EC (UnkStruct_02026218 * param0, StringFormatter * param1) { u16 v0; BoxPokemon * v1 = sub_02026220(param0); v0 = ov5_021E6568(param0); - sub_0200B5CC(param1, 0, v1); + StringFormatter_BufferNickname(param1, 0, v1); v0 = v0 * 100 + 100; sub_0200B60C(param1, 1, v0, 5, 0, 1); @@ -2211,7 +2211,7 @@ int ov5_021E65EC (UnkStruct_02026218 * param0, UnkStruct_0200B358 * param1) return v0; } -int ov5_021E6630 (UnkStruct_02026310 * param0, u8 param1, UnkStruct_0200B358 * param2) +int ov5_021E6630 (UnkStruct_02026310 * param0, u8 param1, StringFormatter * param2) { UnkStruct_02026218 * v0; @@ -2219,7 +2219,7 @@ int ov5_021E6630 (UnkStruct_02026310 * param0, u8 param1, UnkStruct_0200B358 * p return ov5_021E65EC(v0, param2); } -u8 ov5_021E6640 (UnkStruct_02026310 * param0, int param1, UnkStruct_0200B358 * param2) +u8 ov5_021E6640 (UnkStruct_02026310 * param0, int param1, StringFormatter * param2) { UnkStruct_02026218 * v0 = sub_02026218(param0, param1); BoxPokemon * v1 = sub_02026220(v0); @@ -2934,7 +2934,7 @@ Pokemon * ov5_021E7278 (Party * param0) return NULL; } -void ov5_021E72BC (UnkStruct_02026310 * param0, UnkStruct_0200B358 * param1) +void ov5_021E72BC (UnkStruct_02026310 * param0, StringFormatter * param1) { BoxPokemon * v0[2]; u16 v1[10 + 1]; @@ -2942,16 +2942,16 @@ void ov5_021E72BC (UnkStruct_02026310 * param0, UnkStruct_0200B358 * param1) ov5_021E6668(param0, v0); if (BoxPokemon_GetValue(v0[0], MON_DATA_SPECIES, NULL) != 0) { - sub_0200B5CC(param1, 0, v0[0]); + StringFormatter_BufferNickname(param1, 0, v0[0]); sub_0200B5EC(param1, 2, v0[0]); } if (BoxPokemon_GetValue(v0[1], MON_DATA_SPECIES, NULL) != 0) { - sub_0200B5CC(param1, 1, v0[1]); + StringFormatter_BufferNickname(param1, 1, v0[1]); } } -void ov5_021E7308 (UnkStruct_02026310 * param0, u32 param1, u32 param2, u32 param3, u8 param4, UnkStruct_0200B358 * param5) +void ov5_021E7308 (UnkStruct_02026310 * param0, u32 param1, u32 param2, u32 param3, u8 param4, StringFormatter * param5) { UnkStruct_02026218 * v0; BoxPokemon * v1; @@ -2961,7 +2961,7 @@ void ov5_021E7308 (UnkStruct_02026310 * param0, u32 param1, u32 param2, u32 para v0 = sub_02026218(param0, param4); v1 = ov5_021E622C(param0, param4); - sub_0200B5CC(param5, param1, v1); + StringFormatter_BufferNickname(param5, param1, v1); v2 = ov5_021E6520(v1, sub_02026228(v0)); sub_0200B60C(param5, param2, v2, 3, 0, 1); @@ -2978,11 +2978,11 @@ void ov5_021E7308 (UnkStruct_02026310 * param0, u32 param1, u32 param2, u32 para sub_0200BCF0(param5, param3, v3); } -u16 ov5_021E73A0 (Party * param0, int param1, UnkStruct_0200B358 * param2) +u16 ov5_021E73A0 (Party * param0, int param1, StringFormatter * param2) { Pokemon * v0 = Party_GetPokemonBySlotIndex(param0, param1); - sub_0200B5CC(param2, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param2, 0, Pokemon_GetBoxPokemon(v0)); return Pokemon_GetValue(v0, MON_DATA_SPECIES, NULL); } diff --git a/src/overlay005/ov5_021EA874.c b/src/overlay005/ov5_021EA874.c index 619d860a3f..04ded13fee 100644 --- a/src/overlay005/ov5_021EA874.c +++ b/src/overlay005/ov5_021EA874.c @@ -52,7 +52,7 @@ typedef struct { Window unk_20; UnkStruct_0203CDB0 * unk_30; SaveData * unk_34; - UnkStruct_0200B358 * unk_38; + StringFormatter * unk_38; MessageLoader * unk_3C; int unk_40; UIControlData * unk_44; diff --git a/src/overlay005/ov5_021EE7D4.c b/src/overlay005/ov5_021EE7D4.c index e274414ecf..158f88aa4d 100644 --- a/src/overlay005/ov5_021EE7D4.c +++ b/src/overlay005/ov5_021EE7D4.c @@ -146,7 +146,7 @@ void ov5_021EE9BC (UnkStruct_0203CDB0 * param0, u16 param1) static void ov5_021EE9E8 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u16 param3, vu16 param4) { u32 v0; - UnkStruct_0200B358 ** v1 = sub_0203F098(param0, 15); + StringFormatter ** v1 = sub_0203F098(param0, 15); v0 = ov5_021EE8A8(param3, param4); diff --git a/src/overlay005/ov5_021F08CC.c b/src/overlay005/ov5_021F08CC.c index 29c11ab87b..51edaa4c71 100644 --- a/src/overlay005/ov5_021F08CC.c +++ b/src/overlay005/ov5_021F08CC.c @@ -68,7 +68,7 @@ typedef struct { u8 unk_28; Strbuf* unk_2C; Strbuf* unk_30; - UnkStruct_0200B358 * unk_34; + StringFormatter * unk_34; Window unk_38; MessageLoader * unk_48; } UnkStruct_ov5_021F0D6C; diff --git a/src/overlay005/ov5_021F6454.c b/src/overlay005/ov5_021F6454.c index c5a29f6c98..23d186c4a9 100644 --- a/src/overlay005/ov5_021F6454.c +++ b/src/overlay005/ov5_021F6454.c @@ -75,7 +75,7 @@ struct UnkStruct_ov5_021F6704_t { Window * unk_18; Strbuf* unk_1C[120]; MessageLoader * unk_1FC; - UnkStruct_0200B358 * unk_200; + StringFormatter * unk_200; u8 unk_204; u8 unk_205; u8 unk_206; @@ -109,8 +109,8 @@ BOOL ov5_021F72B8(UnkStruct_0203E724 * param0); BOOL ov5_021F6B3C(UnkStruct_0203E724 * param0); BOOL ov5_021F6E50(UnkStruct_0203E724 * param0); static void ov5_021F661C(UnkStruct_ov5_021F6704 * param0, MessageLoader * param1); -static void ov5_021F6624(UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F6704 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, UnkStruct_0200B358 * param7, Window * param8, MessageLoader * param9, u16 * param10, u16 * param11); -UnkStruct_ov5_021F6704 * ov5_021F6704(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8, u16 * param9, u16 * param10); +static void ov5_021F6624(UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F6704 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, StringFormatter * param7, Window * param8, MessageLoader * param9, u16 * param10, u16 * param11); +UnkStruct_ov5_021F6704 * ov5_021F6704(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8, u16 * param9, u16 * param10); void ov5_021F6760(UnkStruct_ov5_021F6704 * param0, u32 param1, u32 param2, u32 param3); static void ov5_021F6768(UnkStruct_ov5_021F6704 * param0); static void ov5_021F6830(UnkStruct_ov5_021F6704 * param0, u32 param1, u32 param2, u32 param3); @@ -143,7 +143,7 @@ BOOL ov5_021F6454 (UnkStruct_0203E724 * param0) MessageLoader * v7; UnkStruct_0203CDB0 * v8 = param0->unk_34; UnkStruct_ov5_021F6704 * v9; - UnkStruct_0200B358 ** v10 = sub_0203F098(v8, 15); + StringFormatter ** v10 = sub_0203F098(v8, 15); u16 v11 = inline_02049538(param0); u16 v12 = inline_02049538(param0); u16 v13 = sub_0203E838(param0); @@ -219,7 +219,7 @@ static void ov5_021F661C (UnkStruct_ov5_021F6704 * param0, MessageLoader * param return; } -static void ov5_021F6624 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F6704 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, UnkStruct_0200B358 * param7, Window * param8, MessageLoader * param9, u16 * param10, u16 * param11) +static void ov5_021F6624 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F6704 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, StringFormatter * param7, Window * param8, MessageLoader * param9, u16 * param10, u16 * param11) { int v0; @@ -256,7 +256,7 @@ static void ov5_021F6624 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F6704 * return; } -UnkStruct_ov5_021F6704 * ov5_021F6704 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8, u16 * param9, u16 * param10) +UnkStruct_ov5_021F6704 * ov5_021F6704 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8, u16 * param9, u16 * param10) { UnkStruct_ov5_021F6704 * v0; int v1; diff --git a/src/overlay005/ov5_021F77A8.c b/src/overlay005/ov5_021F77A8.c index 905f44c9bb..a87a7c504b 100644 --- a/src/overlay005/ov5_021F77A8.c +++ b/src/overlay005/ov5_021F77A8.c @@ -617,7 +617,7 @@ struct UnkStruct_ov5_021F7ED8_t { Window * unk_18; Strbuf* unk_1C[39]; MessageLoader * unk_B8; - UnkStruct_0200B358 * unk_BC; + StringFormatter * unk_BC; u8 unk_C0; u8 unk_C1; u8 unk_C2; @@ -650,8 +650,8 @@ static u16 ov5_021F7A4C(u16 param0); static u8 ReadMovesetMaskByte(Pokemon * param0, u8 param1); static u16 ov5_021F7B60(Pokemon * param0, u16 param1); static void ov5_021F7E10(UnkStruct_ov5_021F7ED8 * param0, MessageLoader * param1); -static void ov5_021F7E18(UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F7ED8 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, UnkStruct_0200B358 * param7, Window * param8, MessageLoader * param9); -UnkStruct_ov5_021F7ED8 * ov5_021F7ED8(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8); +static void ov5_021F7E18(UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F7ED8 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, StringFormatter * param7, Window * param8, MessageLoader * param9); +UnkStruct_ov5_021F7ED8 * ov5_021F7ED8(UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8); void ov5_021F7F2C(UnkStruct_ov5_021F7ED8 * param0, u32 param1, u32 param2, u32 param3); static void ov5_021F7F34(UnkStruct_ov5_021F7ED8 * param0); static void ov5_021F7FF8(UnkStruct_ov5_021F7ED8 * param0, u32 param1, u32 param2, u32 param3); @@ -896,7 +896,7 @@ BOOL ov5_021F7C04 (UnkStruct_0203E724 * param0) UnkStruct_ov5_021F7ED8 * v10; u16 v11[4]; u16 v12[(NELEMS(sTeachableMoves))]; - UnkStruct_0200B358 ** v13 = sub_0203F098(v9, 15); + StringFormatter ** v13 = sub_0203F098(v9, 15); u16 v14 = inline_02049538(param0); u16 v15 = inline_02049538(param0); u16 v16 = sub_0203E838(param0); @@ -986,7 +986,7 @@ static void ov5_021F7E10 (UnkStruct_ov5_021F7ED8 * param0, MessageLoader * param return; } -static void ov5_021F7E18 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F7ED8 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, UnkStruct_0200B358 * param7, Window * param8, MessageLoader * param9) +static void ov5_021F7E18 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F7ED8 * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, StringFormatter * param7, Window * param8, MessageLoader * param9) { int v0; @@ -1019,7 +1019,7 @@ static void ov5_021F7E18 (UnkStruct_0203CDB0 * param0, UnkStruct_ov5_021F7ED8 * return; } -UnkStruct_ov5_021F7ED8 * ov5_021F7ED8 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, Window * param7, MessageLoader * param8) +UnkStruct_ov5_021F7ED8 * ov5_021F7ED8 (UnkStruct_0203CDB0 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, Window * param7, MessageLoader * param8) { UnkStruct_ov5_021F7ED8 * v0; int v1; @@ -1194,7 +1194,7 @@ static void ov5_021F8250 (UnkStruct_ov5_021F7ED8 * param0) BOOL ov5_021F82B8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); UnkStruct_ov5_021DC1A4 ** v2 = sub_0203F098(v0, 0); u8 v3 = (*((param0)->unk_08++)); u8 v4 = (*((param0)->unk_08++)); diff --git a/src/overlay006/ov6_022465FC.c b/src/overlay006/ov6_022465FC.c index 89609432e8..4e833ce5ff 100644 --- a/src/overlay006/ov6_022465FC.c +++ b/src/overlay006/ov6_022465FC.c @@ -322,7 +322,7 @@ int ov6_02246978 (UnkStruct_0203CDB0 * param0, int param1) } } -BOOL ov6_022469E0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, int param2, u16 * param3, u16 * param4) +BOOL ov6_022469E0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, int param2, u16 * param3, u16 * param4) { int v0 = ov6_0224663C(param0); int v1 = ov6_0224669C(v0); diff --git a/src/overlay006/ov6_02247A0C.c b/src/overlay006/ov6_02247A0C.c index 6380c77ab3..8903109a8f 100644 --- a/src/overlay006/ov6_02247A0C.c +++ b/src/overlay006/ov6_02247A0C.c @@ -30,7 +30,7 @@ typedef struct { Window unk_00; MessageLoader * unk_10; - UnkStruct_0200B358 * unk_14; + StringFormatter * unk_14; } UnkStruct_ov6_02247A90; typedef struct { diff --git a/src/overlay007/ov7_02249960.c b/src/overlay007/ov7_02249960.c index 47b1034bb7..c78fcffbaa 100644 --- a/src/overlay007/ov7_02249960.c +++ b/src/overlay007/ov7_02249960.c @@ -52,9 +52,9 @@ typedef struct UnkStruct_ov7_02249C2C_t { Window unk_20; Window unk_30; Window unk_40; - UnkStruct_0200B358 * unk_50; - UnkStruct_0200B358 * unk_54; - UnkStruct_0200B358 * unk_58; + StringFormatter * unk_50; + StringFormatter * unk_54; + StringFormatter * unk_58; UnkStruct_0200112C * unk_5C; UIControlData * unk_60; ResourceMetadata * unk_64; diff --git a/src/overlay007/ov7_0224B4E8.c b/src/overlay007/ov7_0224B4E8.c index 0c5a85c206..5454f02458 100644 --- a/src/overlay007/ov7_0224B4E8.c +++ b/src/overlay007/ov7_0224B4E8.c @@ -52,7 +52,7 @@ typedef struct { Window unk_34; Window unk_44; Window unk_54; - UnkStruct_0200B358 * unk_64; + StringFormatter * unk_64; MessageLoader * unk_68; HeightWeightData * unk_6C; u16 * unk_70; @@ -323,7 +323,7 @@ static u8 Unk_ov7_0224F4CC[] = { static void ov7_0224B8DC (UnkStruct_ov7_0224B4E8 * param0) { MessageLoader * v0; - UnkStruct_0200B358 * v1 = param0->unk_64; + StringFormatter * v1 = param0->unk_64; Strbuf* v2; Strbuf* v3; Window * v4; diff --git a/src/overlay007/ov7_0224BE9C.c b/src/overlay007/ov7_0224BE9C.c index c5823cab6b..b9a1ca6f15 100644 --- a/src/overlay007/ov7_0224BE9C.c +++ b/src/overlay007/ov7_0224BE9C.c @@ -95,7 +95,7 @@ typedef struct { typedef struct { u32 unk_00; Window * unk_04; - UnkStruct_0200B358 * unk_08; + StringFormatter * unk_08; Strbuf* unk_0C; Strbuf* unk_10[3]; } UnkStruct_ov7_0224C620; @@ -107,7 +107,7 @@ typedef struct { ResourceMetadata unk_0C[23]; Strbuf* unk_C4[23]; s32 unk_120; - UnkStruct_0200B358 * unk_124; + StringFormatter * unk_124; Strbuf* unk_128; u16 unk_12C; u16 unk_12E; @@ -462,7 +462,7 @@ static void ov7_0224C4E0 (UnkStruct_ov7_0224C3EC * param0, MessageLoader * param { Strbuf* v0; Strbuf* v1; - UnkStruct_0200B358 * v2; + StringFormatter * v2; v2 = sub_0200B358(param2); v1 = Strbuf_Init(200, param2); @@ -489,7 +489,7 @@ static void ov7_0224C580 (UnkStruct_ov7_0224C3EC * param0, MessageLoader * param { Strbuf* v0; Strbuf* v1; - UnkStruct_0200B358 * v2; + StringFormatter * v2; v2 = sub_0200B358(param2); v1 = Strbuf_Init(200, param2); diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index bb41f4adc8..d2109d8bfd 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -140,7 +140,7 @@ typedef struct UnkStruct_ov10_0221FB28_t { Window unk_B8C; GXBG0As unk_B9C; MessageLoader * unk_BA0; - UnkStruct_0200B358 * unk_BA4; + StringFormatter * unk_BA4; Strbuf* unk_BA8; int unk_BAC; int unk_BB0; @@ -1576,7 +1576,7 @@ static void ov10_0222130C (UnkStruct_ov10_0221FB28 * param0, u32 param1, Strbuf v0 = ¶m0->unk_10[0]; - sub_0201A870(param0->unk_0C, v0, 8, 2, 0, 0); + BGL_AddFramelessWindow(param0->unk_0C, v0, 8, 2, 0, 0); sub_0201D78C(v0, 0, param2, 0, 0, 0xff, (u32)(((3 & 0xff) << 16) | ((4 & 0xff) << 8) | ((0 & 0xff) << 0)), NULL); v1.unk_00 = param0->unk_B38; @@ -2253,7 +2253,7 @@ static void ov10_022223E8 (UnkStruct_ov10_0221FB28 * param0) } } -static void ov10_02222400 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * param1, UnkStruct_0200C440 * param2, UnkStruct_0200B358 * param3, Strbuf *param4, u32 param5) +static void ov10_02222400 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * param1, UnkStruct_0200C440 * param2, StringFormatter * param3, Strbuf *param4, u32 param5) { Pokemon * v0; Window * v1; @@ -2269,7 +2269,7 @@ static void ov10_02222400 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * par v2 = MessageLoader_GetNewStrbuf(param1, 8 + param5); - sub_0200B5CC(param3, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param3, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param3, param4, v2); Strbuf_Free(v2); sub_0201D78C(v1, 0, param4, 0, 0, 0xff, ((u32)(((15 & 0xff) << 16) | ((14 & 0xff) << 8) | ((0 & 0xff) << 0))), NULL); @@ -2285,7 +2285,7 @@ static void ov10_02222400 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * par } } -static void ov10_022224F0 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * param1, UnkStruct_0200C440 * param2, UnkStruct_0200B358 * param3, Strbuf *param4, u32 param5) +static void ov10_022224F0 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * param1, UnkStruct_0200C440 * param2, StringFormatter * param3, Strbuf *param4, u32 param5) { Window * v0; Strbuf* v1; @@ -2295,7 +2295,7 @@ static void ov10_022224F0 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * par sub_0200C648(param2, 1, param0->unk_214[param5].unk_0C, 3, 0, v0, 0, 5 - 3); } -static void ov10_02222528 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * param1, UnkStruct_0200C440 * param2, UnkStruct_0200B358 * param3, Strbuf *param4, u32 param5) +static void ov10_02222528 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * param1, UnkStruct_0200C440 * param2, StringFormatter * param3, Strbuf *param4, u32 param5) { Window * v0; Strbuf* v1; @@ -2344,7 +2344,7 @@ static void ov10_02222594 (UnkStruct_ov10_0221FB28 * param0, u32 param1) BGL_WindowColor(v0, 10, 0, 5, v1, 1); } -static void ov10_02222684 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * param1, UnkStruct_0200C440 * param2, UnkStruct_0200B358 * param3, Strbuf *param4, u32 param5) +static void ov10_02222684 (UnkStruct_ov10_0221FB28 * param0, MessageLoader * param1, UnkStruct_0200C440 * param2, StringFormatter * param3, Strbuf *param4, u32 param5) { Pokemon * v0; Window * v1; @@ -2373,7 +2373,7 @@ static void ov10_02222720 (UnkStruct_ov10_0221FB28 * param0) { MessageLoader * v0; UnkStruct_0200C440 * v1; - UnkStruct_0200B358 * v2; + StringFormatter * v2; Strbuf* v3; u32 v4; diff --git a/src/overlay012/ov12_0221FC20.c b/src/overlay012/ov12_0221FC20.c index c8d71af0df..52240a7c49 100644 --- a/src/overlay012/ov12_0221FC20.c +++ b/src/overlay012/ov12_0221FC20.c @@ -2233,7 +2233,7 @@ static void ov12_02221580 (UnkStruct_ov12_0221FCDC * param0) if (ov12_022232FC(param0, v7) != NULL) { NNSG2dImageProxy * v18; - v18 = sub_02021F98(v1->unk_00); + v18 = SpriteActor_ImageProxy(v1->unk_00); sub_0201DC68(NNS_GFD_DST_2D_OBJ_CHAR_MAIN, v18->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN], v0, (10 * 10 * ((8 / 2) * 8))); } @@ -4325,7 +4325,7 @@ UnkStruct_ov12_02223764 * ov12_022234F8 (BattleSystem * param0, int param1, int if (v13 != NULL) { NNSG2dImageProxy * v17; - v17 = sub_02021F98(v10->unk_00); + v17 = SpriteActor_ImageProxy(v10->unk_00); sub_0201DC68(NNS_GFD_DST_2D_OBJ_CHAR_MAIN, v17->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN], v8, (10 * 10 * ((8 / 2) * 8))); } diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index 49d338ade0..7b834bc13a 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -1620,7 +1620,7 @@ static u8 ov13_022217A4 (UnkStruct_ov13_022213F0 * param0) if (v0->unk_10 == 0) { v1 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 77); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0->unk_00)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0->unk_00)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v1); Strbuf_Free(v1); return 0; @@ -1628,7 +1628,7 @@ static u8 ov13_022217A4 (UnkStruct_ov13_022213F0 * param0) if ((param0->unk_00->unk_2C[param0->unk_00->unk_11] == param0->unk_00->unk_14) || (param0->unk_00->unk_2C[param0->unk_00->unk_11] == param0->unk_00->unk_15)) { v1 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 76); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0->unk_00)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0->unk_00)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v1); Strbuf_Free(v1); return 0; @@ -1643,7 +1643,7 @@ static u8 ov13_022217A4 (UnkStruct_ov13_022213F0 * param0) v0 = ¶m0->unk_04[param0->unk_00->unk_11]; v1 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 93); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0->unk_00)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0->unk_00)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v1); Strbuf_Free(v1); return 0; @@ -1653,7 +1653,7 @@ static u8 ov13_022217A4 (UnkStruct_ov13_022213F0 * param0) v0 = ¶m0->unk_04[param0->unk_2072]; v1 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 78); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0->unk_00)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0->unk_00)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v1); Strbuf_Free(v1); return 0; diff --git a/src/overlay013/ov13_02221A88.c b/src/overlay013/ov13_02221A88.c index 016adf9764..a9b421b5e2 100644 --- a/src/overlay013/ov13_02221A88.c +++ b/src/overlay013/ov13_02221A88.c @@ -318,7 +318,7 @@ static void ov13_02221C54 (UnkStruct_ov13_022213F0 * param0, u32 param1, u32 par v2 = Strbuf_Init(12, param0->unk_00->unk_0C); v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, Unk_ov13_02228EC4[param3]); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v1->unk_00)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v1->unk_00)); StringFormatter_Format(param0->unk_1FA8, v2, v3); if (param2 == 0) { @@ -1204,7 +1204,7 @@ static void ov13_02223550 (UnkStruct_ov13_022213F0 * param0, u32 param1) v2 = Strbuf_Init(12, param0->unk_00->unk_0C); v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, Unk_ov13_02228EC4[param1]); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v1->unk_00)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v1->unk_00)); StringFormatter_Format(param0->unk_1FA8, v2, v3); Strbuf_Free(v3); @@ -1597,12 +1597,12 @@ void ov13_02224144 (UnkStruct_ov13_022213F0 * param0) if ((param0->unk_04[v1->unk_11].unk_10 == 0) && (v4 != 0)) { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 88); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); } else if (param0->unk_04[v1->unk_11].unk_10 != v4) { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 82); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); sub_0200B60C(param0->unk_1FA8, 1, v4 - param0->unk_04[v1->unk_11].unk_10, 3, 0, 1); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); @@ -1610,42 +1610,42 @@ void ov13_02224144 (UnkStruct_ov13_022213F0 * param0) MessageLoader_GetStrbuf(param0->unk_1FA4, 87, param0->unk_1FAC); } else if (v5 == 0x1) { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 92); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); } else if (v5 == 0x2) { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 83); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); } else if (v5 == 0x4) { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 85); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); } else if (v5 == 0x8) { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 86); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); } else if (v5 == 0x10) { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 84); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); } else if (v5 == 0x20) { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 90); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); } else if (v5 == 0x40) { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 91); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); } else { v3 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 89); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); } @@ -1663,7 +1663,7 @@ void ov13_0222449C (UnkStruct_ov13_022213F0 * param0) v0 = BattleSystem_PartyPokemon(v1->unk_08, v1->unk_28, v1->unk_2C[v1->unk_11]); v2 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, 95); - sub_0200B5CC(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_1FA8, 0, Pokemon_GetBoxPokemon(v0)); sub_0200B630(param0->unk_1FA8, 1, 373); StringFormatter_Format(param0->unk_1FA8, param0->unk_1FAC, v2); Strbuf_Free(v2); diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index 89050e1214..fa60a8a65a 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -415,7 +415,7 @@ static u8 ov13_02226A5C (UnkStruct_ov13_02227244 * param0) v3 = BattleSystem_PartyPokemon(v0->unk_00, v0->unk_10, v1); v4 = MessageLoader_GetNewStrbuf(param0->unk_10, 46); - sub_0200B5CC(param0->unk_14, 0, Pokemon_GetBoxPokemon(v3)); + StringFormatter_BufferNickname(param0->unk_14, 0, Pokemon_GetBoxPokemon(v3)); sub_0200B630(param0->unk_14, 1, 373); StringFormatter_Format(param0->unk_14, param0->unk_18, v4); Strbuf_Free(v4); diff --git a/src/overlay016/battle_script.c b/src/overlay016/battle_script.c index fb6b022d1d..ae0fa39519 100644 --- a/src/overlay016/battle_script.c +++ b/src/overlay016/battle_script.c @@ -12217,7 +12217,7 @@ static void BattleScript_LoadPartyLevelUpIcon (BattleSystem * param0, BattleScri SpriteGfxHandler * v2; PaletteData * v3; MessageLoader * v4; - UnkStruct_0200B358 * v5; + StringFormatter * v5; Strbuf* v6, * v7; BGL * v8; Window v9; @@ -12228,7 +12228,7 @@ static void BattleScript_LoadPartyLevelUpIcon (BattleSystem * param0, BattleScri v4 = BattleSystem_MessageLoader(param0); v7 = ov16_0223E0D4(param0); - v5 = ov16_0223E0D0(param0); + v5 = BattleSystem_StringFormatter(param0); v8 = BattleSystem_BGL(param0); v1 = ov16_0223E010(param0); v2 = ov16_0223E018(param0); @@ -12268,12 +12268,12 @@ static void BattleScript_LoadPartyLevelUpIcon (BattleSystem * param0, BattleScri v6 = MessageLoader_GetNewStrbuf(v4, 946); } - sub_0200B5CC(v5, 0, Pokemon_GetBoxPokemon(param2)); + StringFormatter_BufferNickname(v5, 0, Pokemon_GetBoxPokemon(param2)); sub_0200B60C(v5, 1, Pokemon_GetValue(param2, MON_DATA_LEVEL, NULL), 3, 0, 1); StringFormatter_Format(v5, v7, v6); Strbuf_Free(v6); sub_0201A7A0(&v9); - sub_0201A870(v8, &v9, 12, 4, 0, 0); + BGL_AddFramelessWindow(v8, &v9, 12, 4, 0, 0); sub_0201D78C(&v9, 0, v7, 0, 0, 0xff, (u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0)), NULL); v10 = sub_02012898(&v9, NNS_G2D_VRAM_TYPE_2DMAIN, 5); diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index f5376c46ad..9b24263b30 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -780,7 +780,7 @@ void ov16_0226737C (Healthbar * param0) param0->numberMode ^= 1; v2 = G2_GetOBJCharPtr(); - v1 = sub_02021F98(param0->mainActor->unk_00); + v1 = SpriteActor_ImageProxy(param0->mainActor->unk_00); if (param0->numberMode == 1) { v0 = ov16_02268250(70); @@ -1076,20 +1076,20 @@ static void Healthbar_DrawBattlerName (Healthbar * param0) Strbuf* v5, * v6; Pokemon * v7; BoxPokemon * v8; - UnkStruct_0200B358 * v9; + StringFormatter * v9; v0 = BattleSystem_BGL(param0->battleSys); v4 = BattleSystem_MessageLoader(param0->battleSys); - v9 = ov16_0223E0D0(param0->battleSys); + v9 = BattleSystem_StringFormatter(param0->battleSys); v5 = Strbuf_Init((12 + (5 * 2)), 5); v6 = MessageLoader_GetNewStrbuf(v4, 964); v7 = BattleSystem_PartyPokemon(param0->battleSys, param0->unk_24, param0->unk_26); v8 = Pokemon_GetBoxPokemon(v7); - sub_0200B5CC(v9, 0, v8); + StringFormatter_BufferNickname(v9, 0, v8); StringFormatter_Format(v9, v5, v6); - sub_0201A870(v0, &v3, 8, 2, 0, 0xf); - sub_0201D7E0(&v3, 0, v5, 0, 0, 0xff, ((u32)(((0xe & 0xff) << 16) | ((2 & 0xff) << 8) | (((0xf & 0xff) << 0)))), 0, 0, NULL); + BGL_AddFramelessWindow(v0, &v3, 8, 2, 0, 0xf); + PrintStringWithColorAndMargins(&v3, 0, v5, 0, 0, 0xff, ((u32)(((0xe & 0xff) << 16) | ((2 & 0xff) << 8) | (((0xf & 0xff) << 0)))), 0, 0, NULL); v1 = v3.unk_0C; @@ -1098,7 +1098,7 @@ static void Healthbar_DrawBattlerName (Healthbar * param0) u8 * v11, * v12; v10 = G2_GetOBJCharPtr(); - v2 = sub_02021F98(param0->mainActor->unk_00); + v2 = SpriteActor_ImageProxy(param0->mainActor->unk_00); v11 = v1; v12 = &v1[8 * 0x20]; @@ -1139,7 +1139,7 @@ static void Healthbar_DrawLevelText (Healthbar * param0) void * v5; v5 = G2_GetOBJCharPtr(); - v0 = sub_02021F98(param0->mainActor->unk_00); + v0 = SpriteActor_ImageProxy(param0->mainActor->unk_00); MI_CpuCopy16(v2, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->type][0].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->type][0].unk_02); MI_CpuCopy16(v1, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->type][1].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->type][1].unk_02); @@ -1164,7 +1164,7 @@ static void Healthbar_DrawLevelNumber (Healthbar * param0) u8 * v8, * v9; v7 = G2_GetOBJCharPtr(); - v2 = sub_02021F98(param0->mainActor->unk_00); + v2 = SpriteActor_ImageProxy(param0->mainActor->unk_00); MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), v1, Unk_ov16_0226F3EC[param0->type][0].unk_02); MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), &v1[v3], Unk_ov16_0226F3EC[param0->type][1].unk_02); @@ -1207,7 +1207,7 @@ static void Healthbar_DrawCurrentHP (Healthbar * param0, u32 param1) u8 * v3; v2 = G2_GetOBJCharPtr(); - v1 = sub_02021F98(param0->mainActor->unk_00); + v1 = SpriteActor_ImageProxy(param0->mainActor->unk_00); v3 = v0; MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F41C[param0->type][0].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->type][0].unk_02); @@ -1232,7 +1232,7 @@ static void Healthbar_DrawMaxHP (Healthbar * param0) u8 * v3; v2 = G2_GetOBJCharPtr(); - v1 = sub_02021F98(param0->mainActor->unk_00); + v1 = SpriteActor_ImageProxy(param0->mainActor->unk_00); v3 = v0; MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F3BC[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3BC[param0->type].unk_02); @@ -1256,7 +1256,7 @@ static void Healthbar_DrawCaughtIcon (Healthbar * param0) void * v2; v2 = G2_GetOBJCharPtr(); - v0 = sub_02021F98(param0->mainActor->unk_00); + v0 = SpriteActor_ImageProxy(param0->mainActor->unk_00); MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F38C[param0->type].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F38C[param0->type].unk_02); } @@ -1273,7 +1273,7 @@ static void Healthbar_DrawStatusIcon (Healthbar * param0, int param1) void * v2; v2 = G2_GetOBJCharPtr(); - v0 = sub_02021F98(param0->mainActor->unk_00); + v0 = SpriteActor_ImageProxy(param0->mainActor->unk_00); MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F35C[param0->type].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F35C[param0->type].unk_02); } @@ -1297,8 +1297,8 @@ static void Healthbar_DrawBallCount (Healthbar * param0, u32 param1) v5 = MessageLoader_GetNewStrbuf(v4, 1220); } - sub_0201A870(v0, &v3, 13, 2, 0, 0xf); - sub_0201D7E0(&v3, 0, v5, 0, 0, 0xff, ((u32)(((0xe & 0xff) << 16) | ((2 & 0xff) << 8) | (((0xf & 0xff) << 0)))), 0, 0, NULL); + BGL_AddFramelessWindow(v0, &v3, 13, 2, 0, 0xf); + PrintStringWithColorAndMargins(&v3, 0, v5, 0, 0, 0xff, ((u32)(((0xe & 0xff) << 16) | ((2 & 0xff) << 8) | (((0xf & 0xff) << 0)))), 0, 0, NULL); v1 = v3.unk_0C; @@ -1307,7 +1307,7 @@ static void Healthbar_DrawBallCount (Healthbar * param0, u32 param1) u8 * v7, * v8; v6 = G2_GetOBJCharPtr(); - v2 = sub_02021F98(param0->mainActor->unk_00); + v2 = SpriteActor_ImageProxy(param0->mainActor->unk_00); v7 = v1; v8 = &v1[13 * 0x20]; @@ -1330,11 +1330,11 @@ static void Healthbar_DrawBallsLeftMessage (Healthbar * param0, u32 param1) Window v3; MessageLoader * v4; Strbuf* v5, * v6; - UnkStruct_0200B358 * v7; + StringFormatter * v7; v0 = BattleSystem_BGL(param0->battleSys); v4 = BattleSystem_MessageLoader(param0->battleSys); - v7 = ov16_0223E0D0(param0->battleSys); + v7 = BattleSystem_StringFormatter(param0->battleSys); v5 = Strbuf_Init(30, 5); if (param1 & (1 << 10)) { @@ -1345,8 +1345,8 @@ static void Healthbar_DrawBallsLeftMessage (Healthbar * param0, u32 param1) sub_0200B60C(v7, 0, param0->unk_27, 2, 1, 1); StringFormatter_Format(v7, v5, v6); - sub_0201A870(v0, &v3, 13, 2, 0, 0xf); - sub_0201D7E0(&v3, 0, v5, 0, 0, 0xff, ((u32)(((0xe & 0xff) << 16) | ((2 & 0xff) << 8) | (((0xf & 0xff) << 0)))), 0, 0, NULL); + BGL_AddFramelessWindow(v0, &v3, 13, 2, 0, 0xf); + PrintStringWithColorAndMargins(&v3, 0, v5, 0, 0, 0xff, ((u32)(((0xe & 0xff) << 16) | ((2 & 0xff) << 8) | (((0xf & 0xff) << 0)))), 0, 0, NULL); v1 = v3.unk_0C; @@ -1355,7 +1355,7 @@ static void Healthbar_DrawBallsLeftMessage (Healthbar * param0, u32 param1) u8 * v9, * v10; v8 = G2_GetOBJCharPtr(); - v2 = sub_02021F98(param0->mainActor->unk_00); + v2 = SpriteActor_ImageProxy(param0->mainActor->unk_00); v9 = v1; v10 = &v1[13 * 0x20]; @@ -1416,7 +1416,7 @@ static void DrawGauge (Healthbar * param0, u8 param1) int v9; v7 = G2_GetOBJCharPtr(); - v8 = sub_02021F98(param0->mainActor->unk_00); + v8 = SpriteActor_ImageProxy(param0->mainActor->unk_00); switch (param1) { case 0: diff --git a/src/overlay016/ov16_0223DF00.c b/src/overlay016/ov16_0223DF00.c index 1265351365..4af4430698 100644 --- a/src/overlay016/ov16_0223DF00.c +++ b/src/overlay016/ov16_0223DF00.c @@ -110,7 +110,7 @@ u16 * ov16_0223E0A4(BattleSystem * param0); u16 * ov16_0223E0B0(BattleSystem * param0); u16 * ov16_0223E0BC(BattleSystem * param0); UnkStruct_ov16_0223E0C8 * ov16_0223E0C8(BattleSystem * param0); -UnkStruct_0200B358 * ov16_0223E0D0(BattleSystem * param0); +StringFormatter * BattleSystem_StringFormatter(BattleSystem * param0); Strbuf* ov16_0223E0D4(BattleSystem * param0); u16 Battler_TrainerID(BattleSystem * param0, int param1); TrainerData * BattleSystem_TrainerData(BattleSystem * param0, int param1); @@ -416,7 +416,7 @@ UnkStruct_ov16_0223E0C8 * ov16_0223E0C8 (BattleSystem * param0) return ¶m0->unk_1CC[0]; } -UnkStruct_0200B358 * ov16_0223E0D0 (BattleSystem * param0) +StringFormatter * BattleSystem_StringFormatter (BattleSystem * param0) { return param0->strFormatter; } @@ -1146,7 +1146,7 @@ void ov16_0223EF8C (BattleSystem * param0) MI_CpuCopy32(sub_02003164(param0->unk_28, 0), param0->unk_220, HW_BG_PLTT_SIZE); v7 = G2_GetOBJCharPtr(); - v0 = sub_02021F98(param0->unk_17C[1].unk_00->unk_00); + v0 = SpriteActor_ImageProxy(param0->unk_17C[1].unk_00->unk_00); v7 += v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]; for (v2 = 20; v2 < 20 + 8; v2++) { @@ -1177,7 +1177,7 @@ void ov16_0223EF8C (BattleSystem * param0) } v7 = G2_GetOBJCharPtr(); - v0 = sub_02021F98(param0->unk_17C[0].unk_00->unk_00); + v0 = SpriteActor_ImageProxy(param0->unk_17C[0].unk_00->unk_00); v7 += v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]; for (v6 = 0; v6 < 0x40 * 32; v6++) { @@ -2341,7 +2341,7 @@ static void BattleMessage_Nickname (BattleSystem * param0, u32 param1, int param Pokemon * v0; v0 = BattleSystem_PartyPokemon(param0, param2 & 0xff, (param2 & 0xff00) >> 8); - sub_0200B5CC(param0->strFormatter, param1, &v0->box); + StringFormatter_BufferNickname(param0->strFormatter, param1, &v0->box); } static void BattleMessage_MoveName (BattleSystem * param0, u32 param1, int param2) diff --git a/src/overlay016/ov16_0226871C.c b/src/overlay016/ov16_0226871C.c index f2d7bc9a6e..ec00ad289d 100644 --- a/src/overlay016/ov16_0226871C.c +++ b/src/overlay016/ov16_0226871C.c @@ -2005,12 +2005,12 @@ static void ov16_02269DB0 (UnkStruct_ov16_02268A14 * param0, int param1, int par { MessageLoader * v0; Strbuf* v1, * v2, * v3, * v4; - UnkStruct_0200B358 * v5; + StringFormatter * v5; UnkStruct_ov16_022623F0 * v6; v6 = ¶m0->unk_1A.val4; v0 = BattleSystem_MessageLoader(param0->unk_00); - v5 = ov16_0223E0D0(param0->unk_00); + v5 = BattleSystem_StringFormatter(param0->unk_00); v1 = MessageLoader_GetNewStrbuf(v0, 1186); v2 = MessageLoader_GetNewStrbuf(v0, 1187); v3 = Strbuf_Init(100, 5); @@ -2069,12 +2069,12 @@ static void ov16_02269F68 (UnkStruct_ov16_02268A14 * param0, int param1, int par { MessageLoader * v0; Strbuf* v1, * v2, * v3, * v4; - UnkStruct_0200B358 * v5; + StringFormatter * v5; UnkStruct_ov16_022623F0 * v6; v6 = ¶m0->unk_1A.val4; v0 = BattleSystem_MessageLoader(param0->unk_00); - v5 = ov16_0223E0D0(param0->unk_00); + v5 = BattleSystem_StringFormatter(param0->unk_00); v1 = MessageLoader_GetNewStrbuf(v0, 1217); v2 = MessageLoader_GetNewStrbuf(v0, 1218); v3 = Strbuf_Init(100, 5); @@ -2097,12 +2097,12 @@ static void ov16_0226A04C (UnkStruct_ov16_02268A14 * param0, int param1, int par { MessageLoader * v0; Strbuf* v1, * v2, * v3, * v4; - UnkStruct_0200B358 * v5; + StringFormatter * v5; UnkStruct_ov16_022623F0 * v6; v6 = ¶m0->unk_1A.val4; v0 = BattleSystem_MessageLoader(param0->unk_00); - v5 = ov16_0223E0D0(param0->unk_00); + v5 = BattleSystem_StringFormatter(param0->unk_00); v1 = MessageLoader_GetNewStrbuf(v0, 1215); v2 = MessageLoader_GetNewStrbuf(v0, 1216); v3 = Strbuf_Init(100, 5); @@ -2130,7 +2130,7 @@ static void ov16_0226A12C (UnkStruct_ov16_02268A14 * param0, int param1, int par Strbuf* v4, * v5; Pokemon * v6; BoxPokemon * v7; - UnkStruct_0200B358 * v8; + StringFormatter * v8; u32 v9; u8 v10[6]; u8 v11[6]; @@ -2142,7 +2142,7 @@ static void ov16_0226A12C (UnkStruct_ov16_02268A14 * param0, int param1, int par param0->unk_66A = v0->unk_20; v2 = BattleSystem_MessageLoader(param0->unk_00); - v8 = ov16_0223E0D0(param0->unk_00); + v8 = BattleSystem_StringFormatter(param0->unk_00); ov16_0226B20C(param0, v3, 0); ov16_0226A698(param0); @@ -2167,7 +2167,7 @@ static void ov16_0226A12C (UnkStruct_ov16_02268A14 * param0, int param1, int par v6 = BattleSystem_PartyPokemon(param0->unk_00, v12, v0->unk_00[v12].unk_00); v7 = Pokemon_GetBoxPokemon(v6); - sub_0200B5CC(v8, 0, v7); + StringFormatter_BufferNickname(v8, 0, v7); StringFormatter_Format(v8, v4, v5); if (v1 & 1) { @@ -2637,8 +2637,8 @@ static void ov16_0226A98C (UnkStruct_ov16_02268A14 * param0, UnkStruct_ov16_0226 if (param10 == NULL) { sub_0201A7A0(&v1); - sub_0201A870(v5, &v1, v8, 16 / 8, 0, 0); - sub_0201D7E0(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); + BGL_AddFramelessWindow(v5, &v1, v8, 16 / 8, 0, 0); + PrintStringWithColorAndMargins(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); } else { v1 = param10->unk_00; } @@ -2795,7 +2795,7 @@ void ov16_0226AC98 (UnkStruct_ov16_02268A14 * param0, int param1, const UnkStruc Strbuf* v7; Strbuf* v8; Strbuf* v9; - UnkStruct_0200B358 * v10; + StringFormatter * v10; u32 v11; MessageLoader * v12; @@ -2803,7 +2803,7 @@ void ov16_0226AC98 (UnkStruct_ov16_02268A14 * param0, int param1, const UnkStruc v0 = ov16_0226ABD4(param0, param1); v3 = sub_0208C098(6); v9 = MessageLoader_GetNewStrbuf(v12, 938); - v10 = ov16_0223E0D0(param0->unk_00); + v10 = BattleSystem_StringFormatter(param0->unk_00); v7 = Strbuf_Init(((2 + 2 + 1 + 2) * 2 + 2), 5); v8 = MessageLoader_GetNewStrbuf(v12, 937); @@ -2859,8 +2859,8 @@ static void ov16_0226AEA0 (UnkStruct_ov16_02268A14 * param0, const Strbuf *param } sub_0201A7A0(¶m3->unk_00); - sub_0201A870(BattleSystem_BGL(param0->unk_00), ¶m3->unk_00, v1, 16 / 8, 0, 0); - sub_0201D7E0(¶m3->unk_00, param2, param1, 0, 0, 0xff, param4, 0, 0, NULL); + BGL_AddFramelessWindow(BattleSystem_BGL(param0->unk_00), ¶m3->unk_00, v1, 16 / 8, 0, 0); + PrintStringWithColorAndMargins(¶m3->unk_00, param2, param1, 0, 0, 0xff, param4, 0, 0, NULL); } static void ov16_0226AF0C (UnkStruct_ov16_02268A14 * param0) @@ -2898,7 +2898,7 @@ static void ov16_0226AF0C (UnkStruct_ov16_02268A14 * param0) NNSG2dImageProxy * v9; v8 = G2S_GetOBJCharPtr(); - v9 = sub_02021F98(param0->unk_5EC[v0]->unk_00); + v9 = SpriteActor_ImageProxy(param0->unk_5EC[v0]->unk_00); MI_CpuCopy16(v7->unk_18[v0], (void *)((u32)v8 + v9->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DSUB]), sub_0208C098(6)); } diff --git a/src/overlay017/ov17_0223F118.c b/src/overlay017/ov17_0223F118.c index 5dd2859a75..6881de42bb 100644 --- a/src/overlay017/ov17_0223F118.c +++ b/src/overlay017/ov17_0223F118.c @@ -132,8 +132,8 @@ void ov17_0223F1E8 (int param0, BGL * param1, SpriteGfxHandler * param2, UnkStru { sub_0201A7A0(&v1); - sub_0201A870(param1, &v1, v6, 16 / 8, 0, 0); - sub_0201D7E0(&v1, param6, param5, 0, 0, 0xff, param7, v7, 0, NULL); + BGL_AddFramelessWindow(param1, &v1, v6, 16 / 8, 0, 0); + PrintStringWithColorAndMargins(&v1, param6, param5, 0, 0, 0xff, param7, v7, 0, NULL); } v3 = sub_02012898(&v1, NNS_G2D_VRAM_TYPE_2DMAIN, param0); diff --git a/src/overlay017/ov17_0223F7E4.c b/src/overlay017/ov17_0223F7E4.c index 7348513094..8a1148f757 100644 --- a/src/overlay017/ov17_0223F7E4.c +++ b/src/overlay017/ov17_0223F7E4.c @@ -977,8 +977,8 @@ static void ov17_02240138 (UnkStruct_ov17_0223F7E4 * param0, UnkStruct_ov17_0224 if (param10 == NULL) { sub_0201A7A0(&v1); - sub_0201A870(v5, &v1, v8, 16 / 8, 0, 0); - sub_0201D7E0(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); + BGL_AddFramelessWindow(v5, &v1, v8, 16 / 8, 0, 0); + PrintStringWithColorAndMargins(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); } else { v1 = param10->unk_00; } @@ -1509,8 +1509,8 @@ static void ov17_02240BF4 (UnkStruct_ov17_0223F7E4 * param0, const Strbuf *param } sub_0201A7A0(¶m3->unk_00); - sub_0201A870(param0->unk_04->unk_24, ¶m3->unk_00, v1, 16 / 8, 0, 0); - sub_0201D7E0(¶m3->unk_00, param2, param1, 0, 0, 0xff, param4, 0, 0, NULL); + BGL_AddFramelessWindow(param0->unk_04->unk_24, ¶m3->unk_00, v1, 16 / 8, 0, 0); + PrintStringWithColorAndMargins(¶m3->unk_00, param2, param1, 0, 0, 0xff, param4, 0, 0, NULL); } static void ov17_02240C60 (const Strbuf *param0, int param1, int * param2, int * param3) diff --git a/src/overlay017/ov17_022413D8.c b/src/overlay017/ov17_022413D8.c index 164095680d..44ddebe84a 100644 --- a/src/overlay017/ov17_022413D8.c +++ b/src/overlay017/ov17_022413D8.c @@ -1381,13 +1381,13 @@ static void ov17_0224290C (UnkStruct_ov17_02246F24 * param0, int param1, const U case 0: break; case 1: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param0->unk_304.unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param0->unk_304.unk_00])); break; case 2: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); break; case 3: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); break; case 4: sub_0200B630(param0->unk_0C.unk_48, 0, param2->unk_02); @@ -1399,44 +1399,44 @@ static void ov17_0224290C (UnkStruct_ov17_02246F24 * param0, int param1, const U sub_0200BB74(param0->unk_0C.unk_48, 0, param0->unk_0C.unk_00->unk_C0[param2->unk_05].unk_00); break; case 7: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); break; case 8: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); sub_0200B630(param0->unk_0C.unk_48, 1, param2->unk_02); break; case 9: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); sub_0200B60C(param0->unk_0C.unk_48, 1, param2->unk_04, 1, 0, 1); break; case 10: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); sub_0200BB74(param0->unk_0C.unk_48, 1, param0->unk_0C.unk_00->unk_C0[param2->unk_05].unk_00); break; case 11: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); break; case 12: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); sub_0200B630(param0->unk_0C.unk_48, 1, param2->unk_02); break; case 13: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); sub_0200B60C(param0->unk_0C.unk_48, 1, param2->unk_04, 1, 0, 1); break; case 14: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); break; case 15: sub_0200B630(param0->unk_0C.unk_48, 0, param2->unk_02); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); break; case 16: sub_0200B630(param0->unk_0C.unk_48, 0, param2->unk_02); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); break; case 17: sub_0200B630(param0->unk_0C.unk_48, 0, param2->unk_02); @@ -1444,15 +1444,15 @@ static void ov17_0224290C (UnkStruct_ov17_02246F24 * param0, int param1, const U break; case 18: sub_0200B630(param0->unk_0C.unk_48, 0, param2->unk_02); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); break; case 19: sub_0200B60C(param0->unk_0C.unk_48, 0, param2->unk_04, 1, 0, 1); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); break; case 20: sub_0200B60C(param0->unk_0C.unk_48, 0, param2->unk_04, 1, 0, 1); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); break; case 21: sub_0200B60C(param0->unk_0C.unk_48, 0, param2->unk_04, 1, 0, 1); @@ -1460,15 +1460,15 @@ static void ov17_0224290C (UnkStruct_ov17_02246F24 * param0, int param1, const U break; case 22: sub_0200B60C(param0->unk_0C.unk_48, 0, param2->unk_04, 1, 0, 1); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); break; case 23: sub_0200BB74(param0->unk_0C.unk_48, 0, param0->unk_0C.unk_00->unk_C0[param2->unk_05].unk_00); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); break; case 24: sub_0200BB74(param0->unk_0C.unk_48, 0, param0->unk_0C.unk_00->unk_C0[param2->unk_05].unk_00); - sub_0200B5CC(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_01])); break; case 25: sub_0200BB74(param0->unk_0C.unk_48, 0, param0->unk_0C.unk_00->unk_C0[param2->unk_05].unk_00); @@ -1479,7 +1479,7 @@ static void ov17_0224290C (UnkStruct_ov17_02246F24 * param0, int param1, const U sub_0200B60C(param0->unk_0C.unk_48, 1, param2->unk_04, 1, 0, 1); break; case 27: - sub_0200B5CC(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 0, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); sub_0200BB74(param0->unk_0C.unk_48, 1, param0->unk_0C.unk_00->unk_C0[param2->unk_05].unk_00); sub_0200B630(param0->unk_0C.unk_48, 2, param2->unk_02); break; @@ -1495,7 +1495,7 @@ static void ov17_0224290C (UnkStruct_ov17_02246F24 * param0, int param1, const U break; } - sub_0200B5CC(param0->unk_0C.unk_48, 1 + v1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[v0->unk_01[v1]])); + StringFormatter_BufferNickname(param0->unk_0C.unk_48, 1 + v1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[v0->unk_01[v1]])); } } break; diff --git a/src/overlay017/ov17_022476F8.c b/src/overlay017/ov17_022476F8.c index a8b5a43ab0..93cbeb4771 100644 --- a/src/overlay017/ov17_022476F8.c +++ b/src/overlay017/ov17_022476F8.c @@ -196,7 +196,7 @@ static void ov17_0224792C (UnkStruct_ov17_02247A48 * param0, int param1, const U break; case 1: sub_0200B48C(param0->unk_0C.unk_3C, 0, param0->unk_00->unk_00.unk_D8[param2->unk_00], param0->unk_00->unk_00.unk_F8[param2->unk_00], 1, GAME_LANGUAGE); - sub_0200B5CC(param0->unk_0C.unk_3C, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_0C.unk_3C, 1, Pokemon_GetBoxPokemon(param0->unk_0C.unk_00->unk_00[param2->unk_00])); break; default: GF_ASSERT(FALSE); diff --git a/src/overlay017/ov17_022492DC.c b/src/overlay017/ov17_022492DC.c index bb1cc5c463..ed60d03db2 100644 --- a/src/overlay017/ov17_022492DC.c +++ b/src/overlay017/ov17_022492DC.c @@ -707,8 +707,8 @@ static void ov17_02249BC4 (UnkStruct_ov17_022492DC * param0, UnkStruct_ov17_0224 { sub_0201A7A0(&v1); - sub_0201A870(v5, &v1, v8, 16 / 8, 0, 0); - sub_0201D7E0(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); + BGL_AddFramelessWindow(v5, &v1, v8, 16 / 8, 0, 0); + PrintStringWithColorAndMargins(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); } v3 = sub_02012898(&v1, NNS_G2D_VRAM_TYPE_2DSUB, 23); diff --git a/src/overlay017/ov17_0224A0FC.c b/src/overlay017/ov17_0224A0FC.c index 484faed40b..cb69e30700 100644 --- a/src/overlay017/ov17_0224A0FC.c +++ b/src/overlay017/ov17_0224A0FC.c @@ -1900,7 +1900,7 @@ static void ov17_0224C0C0 (UnkStruct_ov17_0224DF54 * param0, int param1, const U case 0: break; case 1: - sub_0200B5CC(param0->unk_14.unk_88, 0, Pokemon_GetBoxPokemon(param0->unk_14.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_14.unk_88, 0, Pokemon_GetBoxPokemon(param0->unk_14.unk_00->unk_00[param2->unk_00])); break; case 2: v0 = sub_02095848(param0->unk_00->unk_00.unk_110, param0->unk_00->unk_00.unk_111, param0->unk_00->unk_155); @@ -1911,10 +1911,10 @@ static void ov17_0224C0C0 (UnkStruct_ov17_0224DF54 * param0, int param1, const U break; case 4: sub_0200B48C(param0->unk_14.unk_88, 0, param0->unk_00->unk_00.unk_D8[param2->unk_00], param0->unk_00->unk_00.unk_F8[param2->unk_00], 1, GAME_LANGUAGE); - sub_0200B5CC(param0->unk_14.unk_88, 1, Pokemon_GetBoxPokemon(param0->unk_14.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_14.unk_88, 1, Pokemon_GetBoxPokemon(param0->unk_14.unk_00->unk_00[param2->unk_00])); break; case 5: - sub_0200B5CC(param0->unk_14.unk_88, 0, Pokemon_GetBoxPokemon(param0->unk_14.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_14.unk_88, 0, Pokemon_GetBoxPokemon(param0->unk_14.unk_00->unk_00[param2->unk_00])); sub_0200B60C(param0->unk_14.unk_88, 1, param2->unk_04, 1, 0, 1); break; case 6: @@ -1922,7 +1922,7 @@ static void ov17_0224C0C0 (UnkStruct_ov17_0224DF54 * param0, int param1, const U sub_0200BBA8(param0->unk_14.unk_88, 0, v0); sub_0200B60C(param0->unk_14.unk_88, 1, param2->unk_04, 1, 0, 1); sub_0200B48C(param0->unk_14.unk_88, 2, param0->unk_00->unk_00.unk_D8[param2->unk_00], param0->unk_00->unk_00.unk_F8[param2->unk_00], 1, GAME_LANGUAGE); - sub_0200B5CC(param0->unk_14.unk_88, 3, Pokemon_GetBoxPokemon(param0->unk_14.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_14.unk_88, 3, Pokemon_GetBoxPokemon(param0->unk_14.unk_00->unk_00[param2->unk_00])); break; default: GF_ASSERT(FALSE); diff --git a/src/overlay017/ov17_02250744.c b/src/overlay017/ov17_02250744.c index 2fdfb5303e..994d8f09ef 100644 --- a/src/overlay017/ov17_02250744.c +++ b/src/overlay017/ov17_02250744.c @@ -226,12 +226,12 @@ static void ov17_022507F0 (UnkStruct_ov17_0224FCA0 * param0, int param1, const U break; case 2: sub_0200B48C(param0->unk_10.unk_B8, 0, param0->unk_00->unk_00.unk_D8[param2->unk_00], param0->unk_00->unk_00.unk_F8[param2->unk_00], 1, GAME_LANGUAGE); - sub_0200B5CC(param0->unk_10.unk_B8, 1, Pokemon_GetBoxPokemon(param0->unk_10.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_10.unk_B8, 1, Pokemon_GetBoxPokemon(param0->unk_10.unk_00->unk_00[param2->unk_00])); break; case 3: sub_0200B60C(param0->unk_10.unk_B8, 0, param2->unk_04, 1, 0, 1); sub_0200B48C(param0->unk_10.unk_B8, 1, param0->unk_00->unk_00.unk_D8[param2->unk_00], param0->unk_00->unk_00.unk_F8[param2->unk_00], 1, GAME_LANGUAGE); - sub_0200B5CC(param0->unk_10.unk_B8, 2, Pokemon_GetBoxPokemon(param0->unk_10.unk_00->unk_00[param2->unk_00])); + StringFormatter_BufferNickname(param0->unk_10.unk_B8, 2, Pokemon_GetBoxPokemon(param0->unk_10.unk_00->unk_00[param2->unk_00])); break; default: GF_ASSERT(FALSE); diff --git a/src/overlay019/ov19_021D0D80.c b/src/overlay019/ov19_021D0D80.c index bc429d423e..69a8ab010d 100644 --- a/src/overlay019/ov19_021D0D80.c +++ b/src/overlay019/ov19_021D0D80.c @@ -141,7 +141,7 @@ typedef struct UnkStruct_ov19_021D5DF8_t { MessageLoader * unk_190; MessageLoader * unk_194; MessageLoader * unk_198; - UnkStruct_0200B358 * unk_19C; + StringFormatter * unk_19C; Pokemon * unk_1A0; AnimationControlFlags * unk_1A4; int (* unk_1A8)(struct UnkStruct_ov19_021D5DF8_t * param0); @@ -1036,7 +1036,7 @@ static void ov19_021D20A4 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) { switch ((*param1)) { case 0: - sub_0200B5CC(param0->unk_19C, 0, ov19_021D5E9C(¶m0->unk_00)); + StringFormatter_BufferNickname(param0->unk_19C, 0, ov19_021D5E9C(¶m0->unk_00)); ov19_021D5408(¶m0->unk_00, 0); ov19_021DF990(¶m0->unk_00); @@ -2278,7 +2278,7 @@ static void ov19_021D35F8 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; case 2: if (ov19_021D6600(param0->unk_114, 26)) { - sub_0200B5CC(param0->unk_19C, 0, ov19_021D5E9C(¶m0->unk_00)); + StringFormatter_BufferNickname(param0->unk_19C, 0, ov19_021D5E9C(¶m0->unk_00)); ov19_021D38E0(param0); if (ov19_021D5E38(¶m0->unk_00) == 2) { @@ -4425,7 +4425,7 @@ MessageLoader * ov19_021D5DE8 (const UnkStruct_ov19_021D5DF8 * param0) return param0->unk_18C; } -const UnkStruct_0200B358 * ov19_021D5DF0 (const UnkStruct_ov19_021D5DF8 * param0) +const StringFormatter * ov19_021D5DF0 (const UnkStruct_ov19_021D5DF8 * param0) { return param0->unk_19C; } diff --git a/src/overlay019/ov19_021DB2FC.c b/src/overlay019/ov19_021DB2FC.c index 8b01140faa..68bbd755e9 100644 --- a/src/overlay019/ov19_021DB2FC.c +++ b/src/overlay019/ov19_021DB2FC.c @@ -34,7 +34,7 @@ static void ov19_021DB7BC(BGL * param0, u32 param1, u32 param2, u32 param3, u32 static void ov19_021DB84C(BGL * param0, Window * param1); static void ov19_021DB898(BGL * param0, Window * param1); -BOOL ov19_021DB2FC (UnkStruct_ov19_021DB6F0 * param0, UnkStruct_ov19_021D61B0 * param1, const UnkStruct_ov19_021D4DF0 * param2, BGL * param3, GraphicElementManager * param4, MessageLoader * param5, const UnkStruct_0200B358 * param6, int param7, NARC * param8) +BOOL ov19_021DB2FC (UnkStruct_ov19_021DB6F0 * param0, UnkStruct_ov19_021D61B0 * param1, const UnkStruct_ov19_021D4DF0 * param2, BGL * param3, GraphicElementManager * param4, MessageLoader * param5, const StringFormatter * param6, int param7, NARC * param8) { param0->unk_0C = param1; param0->unk_00 = param3; diff --git a/src/overlay020/ov20_021D2EA4.c b/src/overlay020/ov20_021D2EA4.c index 79bb7c1014..550bba6341 100644 --- a/src/overlay020/ov20_021D2EA4.c +++ b/src/overlay020/ov20_021D2EA4.c @@ -435,7 +435,7 @@ void ov20_021D3578 (UnkStruct_ov20_021D30F8 * param0, u32 param1) case 0: { - UnkStruct_0200B358 * v0 = sub_0200B368(2, 60, 0); + StringFormatter * v0 = sub_0200B368(2, 60, 0); Strbuf* v1 = Strbuf_Init(300, 0); sub_0200B7B4(v0, 0, 0); diff --git a/src/overlay021/ov21_021D4C0C.c b/src/overlay021/ov21_021D4C0C.c index 714785c8da..4eef710bff 100644 --- a/src/overlay021/ov21_021D4C0C.c +++ b/src/overlay021/ov21_021D4C0C.c @@ -133,7 +133,7 @@ Window * ov21_021D4D6C (UnkStruct_ov21_021D4C0C * param0, int param1, int param2 v0 = sub_0201A778(param0->unk_14, 1); sub_0201A7A0(v0); - sub_0201A870(param0->unk_08, v0, param1, param2, 0, 0); + BGL_AddFramelessWindow(param0->unk_08, v0, param1, param2, 0, 0); return v0; } diff --git a/src/overlay022/ov22_02255D44.c b/src/overlay022/ov22_02255D44.c index ee24b9b975..f60448e69f 100644 --- a/src/overlay022/ov22_02255D44.c +++ b/src/overlay022/ov22_02255D44.c @@ -113,7 +113,7 @@ typedef struct { const AnimationControlFlags * unk_738; u32 unk_73C; Strbuf* unk_740; - UnkStruct_0200B358 * unk_744; + StringFormatter * unk_744; } UnkStruct_ov22_02255D44; typedef struct { diff --git a/src/overlay022/ov22_02259C58.c b/src/overlay022/ov22_02259C58.c index 37e5db0627..2643f44b2f 100644 --- a/src/overlay022/ov22_02259C58.c +++ b/src/overlay022/ov22_02259C58.c @@ -522,7 +522,7 @@ static Window * ov22_0225A348 (UnkStruct_ov22_0225A0E4 * param0, u32 param1, u32 v2 = sub_0201A778(14, 1); sub_0201A7A0(v2); - sub_0201A870(param0->unk_40, v2, param4, param5, 0, 0); + BGL_AddFramelessWindow(param0->unk_40, v2, param4, param5, 0, 0); { u32 v3 = sub_02002EEC(2, v1, 0, param4 * 8); diff --git a/src/overlay022/ov22_0225B660.c b/src/overlay022/ov22_0225B660.c index 8af9308335..f1335bfa16 100644 --- a/src/overlay022/ov22_0225B660.c +++ b/src/overlay022/ov22_0225B660.c @@ -280,7 +280,7 @@ static void ov22_0225BB00 (UnkStruct_ov22_0225B85C * param0) int v1, v2; int v3; u16 v4; - UnkStruct_0200B358 * v5; + StringFormatter * v5; Strbuf* v6; Strbuf* v7; MessageLoader * v8; @@ -326,7 +326,7 @@ static void ov22_0225BB00 (UnkStruct_ov22_0225B85C * param0) static void ov22_0225BC18 (UnkStruct_ov22_0225B85C * param0) { int v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; Strbuf* v2; Strbuf* v3; int v4; @@ -352,7 +352,7 @@ static void ov22_0225BC18 (UnkStruct_ov22_0225B85C * param0) v5 = Pokemon_New(13); sub_0202A560(param0->unk_04, v5); v6 = Pokemon_GetBoxPokemon(v5); - sub_0200B5CC(v1, 4, v6); + StringFormatter_BufferNickname(v1, 4, v6); Heap_FreeToHeap(v5); v7 = MessageLoader_Init(0, 26, 385, 13); diff --git a/src/overlay023/ov23_022416A8.c b/src/overlay023/ov23_022416A8.c index d6361ae4fa..3aa5fdb714 100644 --- a/src/overlay023/ov23_022416A8.c +++ b/src/overlay023/ov23_022416A8.c @@ -489,7 +489,7 @@ int ov23_02241D38 (int param0) BOOL ov23_02241D58 (Strbuf *param0) { int v0; - UnkStruct_0200B358 * v1 = NULL; + StringFormatter * v1 = NULL; Strbuf* v2 = NULL; BOOL v3 = 0; diff --git a/src/overlay023/ov23_02241F74.c b/src/overlay023/ov23_02241F74.c index 9ff5b50080..3bcc926c79 100644 --- a/src/overlay023/ov23_02241F74.c +++ b/src/overlay023/ov23_02241F74.c @@ -220,7 +220,7 @@ void ov23_022421EC (void) BOOL ov23_0224223C (TrainerInfo * param0, TrainerInfo * param1, int param2, Strbuf *param3) { - UnkStruct_0200B358 * v0; + StringFormatter * v0; Strbuf* v1; if (param0 && param1) { @@ -242,7 +242,7 @@ BOOL ov23_0224223C (TrainerInfo * param0, TrainerInfo * param1, int param2, Strb BOOL ov23_022422A8 (TrainerInfo * param0, int param1, int param2, Strbuf *param3) { - UnkStruct_0200B358 * v0; + StringFormatter * v0; Strbuf* v1; if (param0) { @@ -264,7 +264,7 @@ BOOL ov23_022422A8 (TrainerInfo * param0, int param1, int param2, Strbuf *param3 static BOOL ov23_02242308 (Strbuf *param0) { int v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; Strbuf* v2; TrainerInfo * v3; TrainerInfo * v4; @@ -1053,7 +1053,7 @@ void ov23_02243020 (int param0) void ov23_02243038 (int param0) { - UnkStruct_0200B358 * v0; + StringFormatter * v0; Strbuf* v1; if (Unk_ov23_02257748) { diff --git a/src/overlay023/ov23_02253598.c b/src/overlay023/ov23_02253598.c index e814c83c77..dfcbe0ce6a 100644 --- a/src/overlay023/ov23_02253598.c +++ b/src/overlay023/ov23_02253598.c @@ -476,7 +476,7 @@ void ov23_02253A00 (UnkStruct_0202855C * param0, int param1) static void ov23_02253A78 (Window * param0, MessageLoader * param1, TrainerInfo * param2, const UnkStruct_0202855C * param3, const UnkStruct_020298B0 * param4) { - UnkStruct_0200B358 * v0; + StringFormatter * v0; Strbuf* v1; Strbuf* v2; int v3, v4; diff --git a/src/overlay023/ov23_02253D40.c b/src/overlay023/ov23_02253D40.c index 4f0bd96e91..1daa49ae00 100644 --- a/src/overlay023/ov23_02253D40.c +++ b/src/overlay023/ov23_02253D40.c @@ -33,7 +33,7 @@ typedef struct UnkStruct_ov23_02253E2C_t { UnkStruct_ov23_02253F60 unk_1C; SysTask * unk_20; MessageLoader * unk_24; - UnkStruct_0200B358 * unk_28; + StringFormatter * unk_28; int unk_2C; int unk_30; int unk_34; diff --git a/src/overlay023/ov23_022542CC.c b/src/overlay023/ov23_022542CC.c index 4750eccbb6..235e7f35ab 100644 --- a/src/overlay023/ov23_022542CC.c +++ b/src/overlay023/ov23_022542CC.c @@ -428,7 +428,7 @@ static void ov23_022546E0 (UnkStruct_ov23_02254594 * param0) Strbuf* v13; Strbuf* v14; Strbuf* v15; - UnkStruct_0200B358 * v16; + StringFormatter * v16; v12 = MessageLoader_Init(0, 26, 637, 4); diff --git a/src/overlay056/ov56_022561C0.c b/src/overlay056/ov56_022561C0.c index dcdd818151..5ba4a3ca51 100644 --- a/src/overlay056/ov56_022561C0.c +++ b/src/overlay056/ov56_022561C0.c @@ -83,7 +83,7 @@ struct UnkStruct_ov56_02256468_t { UnkStruct_0203CDB0 * unk_0C; TrainerInfo * unk_10; BGL * unk_14; - UnkStruct_0200B358 * unk_18; + StringFormatter * unk_18; MessageLoader * unk_1C; u16 * unk_20; NNSG2dScreenData * unk_24; @@ -133,7 +133,7 @@ static int ov56_02256A68(UnkStruct_ov56_02256468 * param0); static int ov56_02256BC0(UnkStruct_ov56_02256468 * param0); static void ov56_02257100(UnkStruct_ov56_02256468 * param0); static void ov56_02257048(UnkStruct_ov56_02256468 * param0, TrainerInfo * param1, Sentence * param2, u32 param3); -static Strbuf* ov56_02256E5C(UnkStruct_02027F8C * param0, u32 param1, UnkStruct_0200B358 * param2, MessageLoader * param3, TrainerInfo * param4); +static Strbuf* ov56_02256E5C(UnkStruct_02027F8C * param0, u32 param1, StringFormatter * param2, MessageLoader * param3, TrainerInfo * param4); static void ov56_02256D64(BGL * param0, NNSG2dScreenData * param1, UnkStruct_ov56_022562EC * param2, int param3, int param4, int * param5); static void ov56_0225710C(UnkStruct_ov56_02256468 * param0); static void ov56_0225712C(UnkStruct_ov56_02256468 * param0); @@ -774,7 +774,7 @@ static void ov56_02256D64 (BGL * param0, NNSG2dScreenData * param1, UnkStruct_ov sub_02019460(param0, 7, sub_02019FE4(param0, 7), 32 * 24 * 2, 0); } -static Strbuf* ov56_02256E5C (UnkStruct_02027F8C * param0, u32 param1, UnkStruct_0200B358 * param2, MessageLoader * param3, TrainerInfo * param4) +static Strbuf* ov56_02256E5C (UnkStruct_02027F8C * param0, u32 param1, StringFormatter * param2, MessageLoader * param3, TrainerInfo * param4) { Strbuf* v0 = NULL; Strbuf* v1; diff --git a/src/overlay061/ov61_0222BF44.c b/src/overlay061/ov61_0222BF44.c index 44cbe5629e..116a575f6e 100644 --- a/src/overlay061/ov61_0222BF44.c +++ b/src/overlay061/ov61_0222BF44.c @@ -64,7 +64,7 @@ typedef struct { int unk_14; int unk_18; int unk_1C; - UnkStruct_0200B358 * unk_20; + StringFormatter * unk_20; MessageLoader * unk_24; MessageLoader * unk_28; MessageLoader * unk_2C; diff --git a/src/overlay062/ov62_022300D8.c b/src/overlay062/ov62_022300D8.c index b9cc68d578..b362a8d417 100644 --- a/src/overlay062/ov62_022300D8.c +++ b/src/overlay062/ov62_022300D8.c @@ -653,7 +653,7 @@ void ov62_02230E80 (UnkStruct_0208C06C * param0) for (v11 = 0; v11 < 2; v11++) { sub_0201A7A0(&v6); - sub_0201A870(param0->unk_14.unk_10, &v6, 20, 2, 0, 0); + BGL_AddFramelessWindow(param0->unk_14.unk_10, &v6, 20, 2, 0, 0); v7[v11]->unk_18 = sub_02012B20(&v6, 102); v4 = sub_02012898(&v6, v8[v11], 102); @@ -687,7 +687,7 @@ void ov62_02230FC8 (UnkStruct_0208C06C * param0, UnkStruct_ov62_022307C0_sub1 * Strbuf* v0; MessageLoader * v1; Window v2; - UnkStruct_0200B358 * v3; + StringFormatter * v3; Strbuf* v4; Strbuf* v5; @@ -730,7 +730,7 @@ void ov62_02230FC8 (UnkStruct_0208C06C * param0, UnkStruct_ov62_022307C0_sub1 * } sub_0201A7A0(&v2); - sub_0201A870(param0->unk_14.unk_10, &v2, 20, 2, 0, 0); + BGL_AddFramelessWindow(param0->unk_14.unk_10, &v2, 20, 2, 0, 0); sub_0201D78C(&v2, 0, v0, 0, 0, 0xff, ((u32)(((14 & 0xff) << 16) | ((13 & 0xff) << 8) | ((0 & 0xff) << 0))), NULL); sub_02012BE0(param1->unk_14, param1->unk_18, &v2, 102); Strbuf_Free(v0); @@ -769,7 +769,7 @@ void ov62_0223118C (UnkStruct_ov62_022312B0 * param0, UnkStruct_ov62_0223118C * } sub_0201A7A0(&v6); - sub_0201A870(param1->unk_10, &v6, 20, 2, 0, 0); + BGL_AddFramelessWindow(param1->unk_10, &v6, 20, 2, 0, 0); param0->unk_10 = sub_02012B20(&v6, 102); v4 = sub_02012898(&v6, param2, 102); @@ -807,7 +807,7 @@ void ov62_0223124C (UnkStruct_ov62_022312B0 * param0, UnkStruct_ov62_0223118C * v0 = MessageLoader_GetNewStrbuf(v1, param2); sub_0201A7A0(&v2); - sub_0201A870(param1->unk_10, &v2, 20, 2, 0, 0); + BGL_AddFramelessWindow(param1->unk_10, &v2, 20, 2, 0, 0); sub_0201D78C(&v2, 0, v0, 0, 0, 0xff, ((u32)(((14 & 0xff) << 16) | ((13 & 0xff) << 8) | ((0 & 0xff) << 0))), NULL); sub_02012BE0(param0->unk_0C, param0->unk_10, &v2, 102); Strbuf_Free(v0); diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index 1781cd0cc9..248e1034ea 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -73,9 +73,9 @@ static void ov62_022349E4(Strbuf *param0, int param1); -UnkStruct_0200B358 * ov62_02231690 (u32 param0) +StringFormatter * ov62_02231690 (u32 param0) { - UnkStruct_0200B358 * v0 = sub_0200B368(4, 64, param0); + StringFormatter * v0 = sub_0200B368(4, 64, param0); return v0; } @@ -1029,7 +1029,7 @@ static void ov62_022323CC (UnkStruct_ov62_02233310 * param0, UnkStruct_0208C06C { Strbuf* v0; Strbuf* v1; - UnkStruct_0200B358 * v2; + StringFormatter * v2; Window * v3; int v4 = sub_02030BFC(param1->unk_88C[0]); int v5 = sub_02030C08(param1->unk_88C[0]); @@ -2840,7 +2840,7 @@ static void ov62_02233B50 (UnkStruct_ov62_02233F74 * param0, UnkStruct_0208C06C Strbuf* v6; Strbuf* v7; Strbuf* v8; - UnkStruct_0200B358 * v9; + StringFormatter * v9; Window * v10; UnkStruct_02030A80 * v11; diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index 28631ca684..e0d4500c5e 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -976,7 +976,7 @@ static void ov62_0223AC58 (UnkStruct_0208C06C * param0, int param1) Strbuf* v2; Strbuf* v3; Strbuf* v4; - UnkStruct_0200B358 * v5; + StringFormatter * v5; int v6 = 28 + v0->unk_380.unk_00; v1 = &v0->unk_1B4[2]; diff --git a/src/overlay062/ov62_0223DFA8.c b/src/overlay062/ov62_0223DFA8.c index 358dd6e984..3d6fd56ce9 100644 --- a/src/overlay062/ov62_0223DFA8.c +++ b/src/overlay062/ov62_0223DFA8.c @@ -246,7 +246,7 @@ static void ov62_0223E0FC (UnkStruct_0208C06C * param0, int param1, int param2) UnkStruct_ov62_0223E01C * v2 = param0->unk_860; if (param1 == 100) { - UnkStruct_0200B358 * v3; + StringFormatter * v3; Strbuf* v4; Strbuf* v5; UnkStruct_02030A80 * v6 = v2->unk_194.unk_00; @@ -262,7 +262,7 @@ static void ov62_0223E0FC (UnkStruct_0208C06C * param0, int param1, int param2) Strbuf_Free(v5); sub_0200B3F0(v3); } else if (param1 == 102) { - UnkStruct_0200B358 * v7; + StringFormatter * v7; Strbuf* v8; Strbuf* v9; UnkStruct_02030A80 * v10 = param0->unk_88C[param2]; @@ -825,7 +825,7 @@ static void ov62_0223EE88 (UnkStruct_ov62_022312B0 * param0, UnkStruct_0208C06C Strbuf* v0; MessageLoader * v1; Window v2; - UnkStruct_0200B358 * v3; + StringFormatter * v3; Strbuf* v4; Strbuf* v5; @@ -848,7 +848,7 @@ static void ov62_0223EE88 (UnkStruct_ov62_022312B0 * param0, UnkStruct_0208C06C } sub_0201A7A0(&v2); - sub_0201A870(param1->unk_14.unk_10, &v2, 20, 2, 0, 0); + BGL_AddFramelessWindow(param1->unk_14.unk_10, &v2, 20, 2, 0, 0); sub_0201D78C(&v2, 0, v0, 0, 0, 0xff, ((u32)(((14 & 0xff) << 16) | ((13 & 0xff) << 8) | ((0 & 0xff) << 0))), NULL); sub_02012BE0(param0->unk_0C, param0->unk_10, &v2, 102); Strbuf_Free(v0); @@ -1770,7 +1770,7 @@ static void ov62_022402FC (UnkStruct_0208C06C * param0, int param1, BOOL param2) BGL_AddWindow(param0->unk_14.unk_10, v1, 2, 1, 19, 30, 4, 14, 300); if (param1 == 100) { - UnkStruct_0200B358 * v3; + StringFormatter * v3; Strbuf* v4; Strbuf* v5; UnkStruct_02030A80 * v6 = v2->unk_194.unk_00; diff --git a/src/overlay062/ov62_02241204.c b/src/overlay062/ov62_02241204.c index 1c927959db..8ae0143291 100644 --- a/src/overlay062/ov62_02241204.c +++ b/src/overlay062/ov62_02241204.c @@ -707,7 +707,7 @@ static void ov62_022419D4 (UnkStruct_0208C06C * param0, int param1, int param2) Window * v1; Strbuf* v2; Strbuf* v3; - UnkStruct_0200B358 * v4; + StringFormatter * v4; v1 = &v0->unk_614[5]; BGL_FillWindow(v1, 0x0); @@ -3122,7 +3122,7 @@ static void ov62_022448E0 (UnkStruct_ov62_022312B0 * param0, UnkStruct_0208C06C Strbuf* v0; MessageLoader * v1; Window v2; - UnkStruct_0200B358 * v3; + StringFormatter * v3; Strbuf* v4; Strbuf* v5; @@ -3144,7 +3144,7 @@ static void ov62_022448E0 (UnkStruct_ov62_022312B0 * param0, UnkStruct_0208C06C } sub_0201A7A0(&v2); - sub_0201A870(param1->unk_14.unk_10, &v2, 20, 2, 0, 0); + BGL_AddFramelessWindow(param1->unk_14.unk_10, &v2, 20, 2, 0, 0); sub_0201D78C(&v2, 0, v0, 0, 0, 0xff, ((u32)(((14 & 0xff) << 16) | ((13 & 0xff) << 8) | ((0 & 0xff) << 0))), NULL); sub_02012BE0(param0->unk_0C, param0->unk_10, &v2, 102); Strbuf_Free(v0); @@ -3163,7 +3163,7 @@ static void ov62_022449B8 (UnkStruct_0208C06C * param0, int param1, BOOL param2) BGL_AddWindow(param0->unk_14.unk_10, v1, 2, 1, 19, 30, 4, 14, 300); if (param1 == 100) { - UnkStruct_0200B358 * v3; + StringFormatter * v3; Strbuf* v4; Strbuf* v5; UnkStruct_02030A80 * v6 = v2->unk_80.unk_00; @@ -3195,7 +3195,7 @@ static void ov62_02244AB4 (UnkStruct_0208C06C * param0, int param1, int param2) UnkStruct_ov62_02241204 * v2 = param0->unk_860; if (param1 == 100) { - UnkStruct_0200B358 * v3; + StringFormatter * v3; Strbuf* v4; Strbuf* v5; UnkStruct_02030A80 * v6 = v2->unk_80.unk_00; @@ -3211,7 +3211,7 @@ static void ov62_02244AB4 (UnkStruct_0208C06C * param0, int param1, int param2) Strbuf_Free(v5); sub_0200B3F0(v3); } else if (param1 == 102) { - UnkStruct_0200B358 * v7; + StringFormatter * v7; Strbuf* v8; Strbuf* v9; UnkStruct_02030A80 * v10 = param0->unk_88C[param2]; @@ -4695,7 +4695,7 @@ static void ov62_022469A0 (UnkStruct_ov62_02241204 * param0, UnkStruct_0208C06C Strbuf* v0; Strbuf* v1; Strbuf* v2; - UnkStruct_0200B358 * v3; + StringFormatter * v3; Window * v4; v3 = ov62_02231690(102); diff --git a/src/overlay062/ov62_02247D74.c b/src/overlay062/ov62_02247D74.c index 06af39fee3..2a7a621b63 100644 --- a/src/overlay062/ov62_02247D74.c +++ b/src/overlay062/ov62_02247D74.c @@ -66,7 +66,7 @@ static void ov62_02247DD8 (UnkStruct_0208C06C * param0, int param1, int param2) Window * v1 = ¶m0->unk_8A4; if (param1 == 282) { - UnkStruct_0200B358 * v2; + StringFormatter * v2; Strbuf* v3; Strbuf* v4; UnkStruct_02030A80 * v5 = param0->unk_88C[param2]; diff --git a/src/overlay064/ov64_0222DCE0.c b/src/overlay064/ov64_0222DCE0.c index 701fb97b66..2342dd11ee 100644 --- a/src/overlay064/ov64_0222DCE0.c +++ b/src/overlay064/ov64_0222DCE0.c @@ -144,7 +144,7 @@ typedef struct { NNSG2dRenderSurface unk_08; UnkStruct_0200C738 unk_78; UnkStruct_02009714 * unk_204[4]; - UnkStruct_0200B358 * unk_214; + StringFormatter * unk_214; MessageLoader * unk_218; NARC * unk_21C; Window unk_220; diff --git a/src/overlay065/ov65_0222DCE0.c b/src/overlay065/ov65_0222DCE0.c index f4128f110a..5258f15837 100644 --- a/src/overlay065/ov65_0222DCE0.c +++ b/src/overlay065/ov65_0222DCE0.c @@ -6714,7 +6714,7 @@ static void ov65_02234A68 (UnkStruct_ov65_0222EBE0 * param0, NARC * param1, u32 sub_02002BB8(2, param2); sub_0201A7A0(&v3); - sub_0201A870(param0->unk_15C, &v3, 8, 2, 0, 0); + BGL_AddFramelessWindow(param0->unk_15C, &v3, 8, 2, 0, 0); v4 = Strbuf_Init(64, param2); MessageLoader_GetStrbuf(param0->unk_168, 73, v4); diff --git a/src/overlay065/ov65_0223648C.c b/src/overlay065/ov65_0223648C.c index 10d6e024c8..dfe0da00fd 100644 --- a/src/overlay065/ov65_0223648C.c +++ b/src/overlay065/ov65_0223648C.c @@ -112,7 +112,7 @@ typedef struct { typedef struct { BGL * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; MessageLoader * unk_08; Strbuf* unk_0C; Strbuf* unk_10; diff --git a/src/overlay066/ov66_0223177C.c b/src/overlay066/ov66_0223177C.c index 2adc5c72a0..ee9a2456d0 100644 --- a/src/overlay066/ov66_0223177C.c +++ b/src/overlay066/ov66_0223177C.c @@ -84,14 +84,14 @@ static void ov66_02231FB0(UnkStruct_ov66_02231FB0 * param0, UnkStruct_ov66_02231 static void ov66_02231FC0(UnkStruct_ov66_02231E94 * param0, UnkStruct_ov66_02231FB0 * param1); static void ov66_02231FE8(UnkStruct_ov66_02231E94 * param0, UnkStruct_ov66_02231FB0 * param1); static void ov66_02231FFC(UnkStruct_ov66_02231FB0 * param0, u32 param1, u32 param2, u32 param3, const TrainerInfo * param4, const TrainerInfo * param5, const TrainerInfo * param6, const TrainerInfo * param7, u16 param8, u16 param9, u16 param10, u16 param11, u32 param12, u32 param13, u32 param14); -static BOOL ov66_02232068(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5); -static BOOL ov66_022320BC(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5); -static BOOL ov66_0223211C(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5); -static BOOL ov66_02232258(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5); -static BOOL ov66_022322B8(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5); -static BOOL ov66_02232330(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5); -static BOOL ov66_022323A0(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5); -static BOOL ov66_022323C4(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5); +static BOOL ov66_02232068(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5); +static BOOL ov66_022320BC(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5); +static BOOL ov66_0223211C(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5); +static BOOL ov66_02232258(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5); +static BOOL ov66_022322B8(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5); +static BOOL ov66_02232330(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5); +static BOOL ov66_022323A0(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5); +static BOOL ov66_022323C4(UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5); static u32 ov66_0223245C(const UnkStruct_ov66_02231FB0 * param0, u32 param1); static u32 ov66_0223246C(const UnkStruct_ov66_02231FB0 * param0, u32 param1); static u32 ov66_0223247C(const UnkStruct_ov66_02231FB0 * param0, u32 param1); @@ -409,12 +409,12 @@ int ov66_02231C78 (const UnkStruct_ov66_0223177C * param0) BOOL ov66_02231C94 (const UnkStruct_ov66_0223177C * param0, const UnkStruct_ov66_02232068 * param1, int param2, Strbuf *param3, u32 param4) { - UnkStruct_0200B358 * v0; + StringFormatter * v0; MessageLoader * v1; UnkStruct_ov66_02231FB0 * v2; BOOL v3; - static BOOL(*const v4[])(UnkStruct_ov66_02231FB0 *, const UnkStruct_ov66_02232068 *, UnkStruct_0200B358 *, MessageLoader *, Strbuf *, u32) = { + static BOOL(*const v4[])(UnkStruct_ov66_02231FB0 *, const UnkStruct_ov66_02232068 *, StringFormatter *, MessageLoader *, Strbuf *, u32) = { ov66_02232068, ov66_022320BC, ov66_0223211C, @@ -733,7 +733,7 @@ static void ov66_02231FFC (UnkStruct_ov66_02231FB0 * param0, u32 param1, u32 par } } -static BOOL ov66_02232068 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5) +static BOOL ov66_02232068 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5) { Strbuf* v0; @@ -748,7 +748,7 @@ static BOOL ov66_02232068 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov6 return 1; } -static BOOL ov66_022320BC (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5) +static BOOL ov66_022320BC (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5) { Strbuf* v0; @@ -764,7 +764,7 @@ static BOOL ov66_022320BC (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov6 return 1; } -static BOOL ov66_0223211C (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5) +static BOOL ov66_0223211C (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5) { Strbuf* v0; @@ -810,7 +810,7 @@ static BOOL ov66_0223211C (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov6 return 1; } -static BOOL ov66_02232258 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5) +static BOOL ov66_02232258 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5) { Strbuf* v0; @@ -826,7 +826,7 @@ static BOOL ov66_02232258 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov6 return 1; } -static BOOL ov66_022322B8 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5) +static BOOL ov66_022322B8 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5) { Strbuf* v0; int v1; @@ -850,7 +850,7 @@ static BOOL ov66_022322B8 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov6 return 1; } -static BOOL ov66_02232330 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5) +static BOOL ov66_02232330 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5) { Strbuf* v0; u32 v1; @@ -885,7 +885,7 @@ static BOOL ov66_02232330 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov6 return 1; } -static BOOL ov66_022323A0 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5) +static BOOL ov66_022323A0 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5) { if (param0->unk_04[0] >= 20) { return 0; @@ -900,7 +900,7 @@ static BOOL ov66_022323A0 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov6 return 1; } -static BOOL ov66_022323C4 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, UnkStruct_0200B358 * param2, MessageLoader * param3, Strbuf *param4, u32 param5) +static BOOL ov66_022323C4 (UnkStruct_ov66_02231FB0 * param0, const UnkStruct_ov66_02232068 * param1, StringFormatter * param2, MessageLoader * param3, Strbuf *param4, u32 param5) { Strbuf* v0; u32 v1; diff --git a/src/overlay067/ov67_0225C700.c b/src/overlay067/ov67_0225C700.c index 4fcf9d3343..b976701ff2 100644 --- a/src/overlay067/ov67_0225C700.c +++ b/src/overlay067/ov67_0225C700.c @@ -54,7 +54,7 @@ #include "overlay067/ov67_0225C700.h" typedef struct { - UnkStruct_0200B358 * unk_00; + StringFormatter * unk_00; MessageLoader * unk_04; Window unk_08; Strbuf* unk_18; diff --git a/src/overlay068/ov68_0225C700.c b/src/overlay068/ov68_0225C700.c index 6622f07983..6a37056eb7 100644 --- a/src/overlay068/ov68_0225C700.c +++ b/src/overlay068/ov68_0225C700.c @@ -120,7 +120,7 @@ typedef struct { typedef struct { MessageLoader * unk_00[9]; - UnkStruct_0200B358 * unk_24; + StringFormatter * unk_24; Strbuf* unk_28; Strbuf* unk_2C; UnkStruct_ov66_0222DFF8 * unk_30; diff --git a/src/overlay069/ov69_0225C700.c b/src/overlay069/ov69_0225C700.c index b38c3a90ca..4387f71943 100644 --- a/src/overlay069/ov69_0225C700.c +++ b/src/overlay069/ov69_0225C700.c @@ -258,7 +258,7 @@ typedef struct { typedef struct { MessageLoader * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; Strbuf* unk_08; Strbuf* unk_0C; } UnkStruct_ov69_0225EF54; diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index 8f0d3a5941..8b7afe3707 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -161,7 +161,7 @@ typedef struct { } UnkStruct_ov70_0225EFD4; typedef struct { - UnkStruct_0200B358 * unk_00; + StringFormatter * unk_00; MessageLoader * unk_04[4]; Strbuf* unk_14; Strbuf* unk_18; @@ -2832,7 +2832,7 @@ static void ov70_02260080 (UnkStruct_ov70_0225FA84 * param0, UnkStruct_ov70_0225 static void ov70_02260228 (UnkStruct_ov70_0225FA84 * param0, UnkStruct_ov70_0225E4EC * param1) { - sub_0201ED1C(sub_02021F98(param0->unk_68)); + sub_0201ED1C(SpriteActor_ImageProxy(param0->unk_68)); sub_02021BD4(param0->unk_68); param0->unk_68 = NULL; diff --git a/src/overlay071/ov71_0223C69C.c b/src/overlay071/ov71_0223C69C.c index 4a7fabe5b3..beca965b84 100644 --- a/src/overlay071/ov71_0223C69C.c +++ b/src/overlay071/ov71_0223C69C.c @@ -97,7 +97,7 @@ void ov71_0223C6F0 (Window * param0, const UnkStruct_02072014 * param1) { Strbuf* v3 = Strbuf_Init(32, 25); - UnkStruct_0200B358 * v4 = sub_0200B368(6, 32, 25); + StringFormatter * v4 = sub_0200B368(6, 32, 25); ov71_0223CD64(¶m0[0], (8 * 17), 0, 0, v2, param1->unk_28, 5, 2); Strbuf_CopyChars(v2, param1->unk_08); @@ -568,7 +568,7 @@ void ov71_0223CDE8 (Window * param0, const UnkStruct_02072014 * param1, Strbuf * MessageLoader * v2 = MessageLoader_Init(0, 26, 616, 25); Strbuf* v3 = Strbuf_Init(32, 25); Strbuf* v4 = Strbuf_Init(32, 25); - UnkStruct_0200B358 * v5 = sub_0200B368((1 + 1), 32, 25); + StringFormatter * v5 = sub_0200B368((1 + 1), 32, 25); sub_0200B60C(v5, 0, sub_0202CC58(param1->unk_18), 3, 1, 1); sub_0200B60C(v5, 1, sub_0202CC5C(param1->unk_18), 2, 2, 1); diff --git a/src/overlay073/ov73_021D0D80.c b/src/overlay073/ov73_021D0D80.c index 795373f82b..aa49c7ac45 100644 --- a/src/overlay073/ov73_021D0D80.c +++ b/src/overlay073/ov73_021D0D80.c @@ -85,7 +85,7 @@ typedef struct { int unk_58; Strbuf* unk_5C; void * unk_60; - UnkStruct_0200B358 * unk_64; + StringFormatter * unk_64; UnkStruct_02015920 * unk_68; SysTask * unk_6C; UnkStruct_0208737C * unk_70; diff --git a/src/overlay076/ov76_0223B870.c b/src/overlay076/ov76_0223B870.c index f5b0899f25..18b9c46497 100644 --- a/src/overlay076/ov76_0223B870.c +++ b/src/overlay076/ov76_0223B870.c @@ -160,7 +160,7 @@ void ov76_0223B98C (UnkStruct_ov76_0223DE00 * param0, int param1, int param2, in { sub_0201A7A0(&v5); - sub_0201A870(param0->unk_D4.unk_10, &v5, 10, 2, 0, 0); + BGL_AddFramelessWindow(param0->unk_D4.unk_10, &v5, 10, 2, 0, 0); sub_0201D78C(&v5, 2, v1, 0, 0, 0xff, ((u32)(((15 & 0xff) << 16) | ((13 & 0xff) << 8) | ((2 & 0xff) << 0))), NULL); } diff --git a/src/overlay077/ov77_021D0D80.c b/src/overlay077/ov77_021D0D80.c index 61565f342b..bbac16a9ce 100644 --- a/src/overlay077/ov77_021D0D80.c +++ b/src/overlay077/ov77_021D0D80.c @@ -1276,7 +1276,7 @@ static void ov77_021D2214 (BGL * param0, int param1, UnkStruct_ov77_021D1568 * p v6 = sub_02002EEC(0, v5, 1, param2->unk_22C.unk_07 * 8); - sub_0201D7E0(¶m2->unk_22C, 0, v5, v6, 0, 0, (u32)(((1 & 0xff) << 16) | ((1 & 0xff) << 8) | (((0 & 0xff) << 0))), 1, 0, NULL); + PrintStringWithColorAndMargins(¶m2->unk_22C, 0, v5, v6, 0, 0, (u32)(((1 & 0xff) << 16) | ((1 & 0xff) << 8) | (((0 & 0xff) << 0))), 1, 0, NULL); Strbuf_Free(v5); MessageLoader_Free(v4); diff --git a/src/overlay079/ov79_021D2268.c b/src/overlay079/ov79_021D2268.c index adfdbe9c5d..f6dd816d6d 100644 --- a/src/overlay079/ov79_021D2268.c +++ b/src/overlay079/ov79_021D2268.c @@ -62,7 +62,7 @@ #include "overlay079/ov79_021D3768.h" typedef struct { - UnkStruct_0200B358 * unk_00; + StringFormatter * unk_00; Strbuf* unk_04; Strbuf* unk_08[3]; } UnkStruct_ov79_021D2928_sub1; diff --git a/src/overlay085/ov85_02241440.c b/src/overlay085/ov85_02241440.c index 887b1a8334..fcfbfc4769 100644 --- a/src/overlay085/ov85_02241440.c +++ b/src/overlay085/ov85_02241440.c @@ -55,7 +55,7 @@ typedef struct { BGL * unk_00; Window unk_04[12]; MessageLoader * unk_C4; - UnkStruct_0200B358 * unk_C8; + StringFormatter * unk_C8; UnkStruct_0200C440 * unk_CC; UnkStruct_020203AC * unk_D0; UnkStruct_ov85_022420A8 unk_D4[4]; diff --git a/src/overlay086/ov86_0223B140.c b/src/overlay086/ov86_0223B140.c index 894c996c7f..ff1c5905d0 100644 --- a/src/overlay086/ov86_0223B140.c +++ b/src/overlay086/ov86_0223B140.c @@ -93,7 +93,7 @@ typedef struct { SysTask * unk_1C2C; SysTask * unk_1C30; SysTask * unk_1C34[4]; - UnkStruct_0200B358 * unk_1C44; + StringFormatter * unk_1C44; Strbuf* unk_1C48; Strbuf* unk_1C4C; MessageLoader * unk_1C50; @@ -185,7 +185,7 @@ typedef struct { UnkStruct_ov86_0223B3C8 * unk_08; BGL * unk_0C; Window * unk_10; - UnkStruct_0200B358 * unk_14; + StringFormatter * unk_14; Strbuf* unk_18; Strbuf* unk_1C; MessageLoader * unk_20; @@ -1231,7 +1231,7 @@ static void ov86_0223C2CC (UnkStruct_ov86_0223B3C8 * param0, int param1, BOOL pa v0->unk_6C = param2; v0->unk_70 = param0->unk_2E0[param1]; v0->unk_74 = param0->unk_2F8[param1]; - v0->unk_24[0] = *sub_02021F98(v0->unk_08); + v0->unk_24[0] = *SpriteActor_ImageProxy(v0->unk_08); v0->unk_24[1] = v0->unk_24[0]; NNS_G2dInitImageProxy(&v0->unk_24[1]); diff --git a/src/overlay087/ov87_021D106C.c b/src/overlay087/ov87_021D106C.c index d6b4c07381..082c35a0a1 100644 --- a/src/overlay087/ov87_021D106C.c +++ b/src/overlay087/ov87_021D106C.c @@ -60,7 +60,7 @@ typedef struct UnkStruct_ov87_021D106C_t { MessageLoader * unk_1E4; MessageLoader * unk_1E8; MessageLoader * unk_1EC; - UnkStruct_0200B358 * unk_1F0; + StringFormatter * unk_1F0; Strbuf* unk_1F4; Strbuf* unk_1F8; Pokemon * unk_1FC; diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index 730b1b80e7..59142128bc 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -131,8 +131,8 @@ static int ov88_0223E8D0(UnkStruct_02095E80 * param0); static int ov88_0223E914(UnkStruct_02095E80 * param0); static void ov88_0223E984(UnkStruct_02095E80 * param0); static void ov88_0223E998(UnkStruct_02095E80 * param0); -static void ov88_0223B710(UnkStruct_0200B358 * param0, Party * param1, int param2); -static void ov88_0223B748(Window * param0, UnkStruct_0200B358 * param1, MessageLoader * param2, Party * param3, int param4); +static void ov88_0223B710(StringFormatter * param0, Party * param1, int param2); +static void ov88_0223B748(Window * param0, StringFormatter * param1, MessageLoader * param2, Party * param3, int param4); static void ov88_0223C8D8(Window * param0, int param1, Party * param2, int param3, UnkStruct_02095E80 * param4); static void ov88_0223E694(Party * param0, Party * param1, int param2, int param3, UnkStruct_ov88_0223C370 * param4); static void ov88_0223BF7C(UnkStruct_02095E80 * param0); @@ -513,16 +513,16 @@ int ov88_0223B57C (UnkStruct_020067E8 * param0, int * param1) return v1; } -static void ov88_0223B710 (UnkStruct_0200B358 * param0, Party * param1, int param2) +static void ov88_0223B710 (StringFormatter * param0, Party * param1, int param2) { int v0; for (v0 = 0; v0 < Party_GetCurrentCount(param1); v0++) { - sub_0200B5CC(param0, v0 + param2, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param1, v0))); + StringFormatter_BufferNickname(param0, v0 + param2, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param1, v0))); } } -static void ov88_0223B748 (Window * param0, UnkStruct_0200B358 * param1, MessageLoader * param2, Party * param3, int param4) +static void ov88_0223B748 (Window * param0, StringFormatter * param1, MessageLoader * param2, Party * param3, int param4) { int v0; @@ -2101,7 +2101,7 @@ static int ov88_0223DA3C (UnkStruct_02095E80 * param0) v0.unk_0B_4 = 0; v0.unk_0B_6 = 0; - sub_0200B5CC(param0->unk_17C, 0, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param0->unk_2270, param0->unk_88[0]))); + StringFormatter_BufferNickname(param0->unk_17C, 0, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param0->unk_2270, param0->unk_88[0]))); sub_02019CB8(param0->unk_174, 0, 0, 0, 0, 32, 24, 0); ov88_0223ECBC(¶m0->unk_49C[22], 16, 1, param0->unk_184, param0->unk_17C); @@ -2311,8 +2311,8 @@ static void ov88_0223DFF4 (UnkStruct_02095E80 * param0) static int ov88_0223E110 (UnkStruct_02095E80 * param0) { sub_02019CB8(param0->unk_174, 0, 0, 0, 0, 32, 24, 0); - sub_0200B5CC(param0->unk_17C, 0, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param0->unk_2270, param0->unk_88[0]))); - sub_0200B5CC(param0->unk_17C, 1, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param0->unk_2274, param0->unk_88[1] - 6))); + StringFormatter_BufferNickname(param0->unk_17C, 0, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param0->unk_2270, param0->unk_88[0]))); + StringFormatter_BufferNickname(param0->unk_17C, 1, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param0->unk_2274, param0->unk_88[1] - 6))); ov88_0223ECBC(¶m0->unk_49C[23], 21, 1, param0->unk_184, param0->unk_17C); param0->unk_226C = ov88_0223E20C; @@ -2449,7 +2449,7 @@ static int ov88_0223E4BC (UnkStruct_02095E80 * param0) v0.unk_0B_4 = 0; v0.unk_0B_6 = 0; - sub_0200B5CC(param0->unk_17C, 0, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param0->unk_2274, param0->unk_88[0] - 6))); + StringFormatter_BufferNickname(param0->unk_17C, 0, Pokemon_GetBoxPokemon(Party_GetPokemonBySlotIndex(param0->unk_2274, param0->unk_88[0] - 6))); sub_02019CB8(param0->unk_174, 0, 0, 0, 0, 32, 24, 0); ov88_0223ECBC(¶m0->unk_49C[22], 16, 1, param0->unk_184, param0->unk_17C); diff --git a/src/overlay088/ov88_0223E9C4.c b/src/overlay088/ov88_0223E9C4.c index f93000d452..186833b4ef 100644 --- a/src/overlay088/ov88_0223E9C4.c +++ b/src/overlay088/ov88_0223E9C4.c @@ -135,7 +135,7 @@ void ov88_0223EC78 (Window * param0, Strbuf *param1, int param2, u32 param3, int sub_0201D78C(param0, 0, param1, v0, param5, param3, (u32)(((11 & 0xff) << 16) | ((12 & 0xff) << 8) | ((0 & 0xff) << 0)), NULL); } -int ov88_0223ECBC (Window * param0, int param1, int param2, MessageLoader * param3, UnkStruct_0200B358 * param4) +int ov88_0223ECBC (Window * param0, int param1, int param2, MessageLoader * param3, StringFormatter * param4) { Strbuf* v0; int v1; diff --git a/src/overlay090/ov90_021D0D80.c b/src/overlay090/ov90_021D0D80.c index 77c90bbff0..61c30c8eb6 100644 --- a/src/overlay090/ov90_021D0D80.c +++ b/src/overlay090/ov90_021D0D80.c @@ -58,7 +58,7 @@ typedef struct { MessageLoader * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; Strbuf* unk_08; Strbuf* unk_0C; Strbuf* unk_10; diff --git a/src/overlay091/ov91_021D0D80.c b/src/overlay091/ov91_021D0D80.c index a443627c53..c2da57b713 100644 --- a/src/overlay091/ov91_021D0D80.c +++ b/src/overlay091/ov91_021D0D80.c @@ -69,7 +69,7 @@ typedef struct { BGL * unk_04; Window unk_08[15]; MessageLoader * unk_F8; - UnkStruct_0200B358 * unk_FC; + StringFormatter * unk_FC; Strbuf* unk_100; UnkStruct_0200112C * unk_104; ResourceMetadata * unk_108; @@ -1107,35 +1107,35 @@ static void ov91_021D1C10 (UnkStruct_ov91_021D0ED8 * param0, u32 param1) switch (param1) { case 0: - sub_0200B5CC(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); + StringFormatter_BufferNickname(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); break; case 1: sub_0200B630(param0->unk_FC, 1, ov91_021D1DD0(param0)); break; case 2: - sub_0200B5CC(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); + StringFormatter_BufferNickname(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); break; case 3: - sub_0200B5CC(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); + StringFormatter_BufferNickname(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); sub_0200B630(param0->unk_FC, 1, ov91_021D1DD0(param0)); break; case 4: - sub_0200B5CC(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); + StringFormatter_BufferNickname(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); sub_0200B630(param0->unk_FC, 1, ov91_021D1DD0(param0)); break; case 5: - sub_0200B5CC(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); + StringFormatter_BufferNickname(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); sub_0200B630(param0->unk_FC, 1, ov91_021D1DE0(param0)); break; case 6: - sub_0200B5CC(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); + StringFormatter_BufferNickname(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); sub_0200B630(param0->unk_FC, 1, ov91_021D1DD0(param0)); break; case 7: sub_0200B630(param0->unk_FC, 1, ov91_021D1DD0(param0)); break; case 8: - sub_0200B5CC(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); + StringFormatter_BufferNickname(param0->unk_FC, 0, Pokemon_GetBoxPokemon(param0->unk_00->unk_00)); sub_0200B630(param0->unk_FC, 1, ov91_021D1DD0(param0)); break; case 9: diff --git a/src/overlay092/ov92_021D0D80.c b/src/overlay092/ov92_021D0D80.c index 58ba6e3891..70a319ba67 100644 --- a/src/overlay092/ov92_021D0D80.c +++ b/src/overlay092/ov92_021D0D80.c @@ -99,7 +99,7 @@ typedef struct { int unk_B864; int unk_B868; Strbuf* unk_B86C; - UnkStruct_0200B358 * unk_B870; + StringFormatter * unk_B870; NNSG3dRenderObj unk_B874; NNSG3dResMdl * unk_B8C8; NNSG3dResFileHeader * unk_B8CC; diff --git a/src/overlay094/ov94_0223D0C4.c b/src/overlay094/ov94_0223D0C4.c index 54c38bf500..e51c5c4526 100644 --- a/src/overlay094/ov94_0223D0C4.c +++ b/src/overlay094/ov94_0223D0C4.c @@ -522,7 +522,7 @@ static u32 Unk_ov94_022467FC[] = { (u32)(((3 & 0xff) << 16) | ((4 & 0xff) << 8) | ((0 & 0xff) << 0)) }; -void ov94_0223D910 (MessageLoader * param0, MessageLoader * param1, UnkStruct_0200B358 * param2, Window param3[], BoxPokemon * param4, UnkStruct_ov94_0223BA88_sub2 * param5) +void ov94_0223D910 (MessageLoader * param0, MessageLoader * param1, StringFormatter * param2, Window param3[], BoxPokemon * param4, UnkStruct_ov94_0223BA88_sub2 * param5) { Strbuf* v0, * v1, * v2, * v3; Strbuf* v4 = Strbuf_Init((10 + 1) * 2, 62); diff --git a/src/overlay094/ov94_0223FB48.c b/src/overlay094/ov94_0223FB48.c index 74fb8a1f75..5576faa619 100644 --- a/src/overlay094/ov94_0223FB48.c +++ b/src/overlay094/ov94_0223FB48.c @@ -567,7 +567,7 @@ static int ov94_022402BC (UnkStruct_ov94_0223FD4C * param0) switch (ov94_022412F4(param0->unk_00->unk_08, param0->unk_00->unk_0C, param0->unk_110, param0->unk_112)) { case 1: if (ov94_0224121C(param0->unk_00->unk_08, param0->unk_00->unk_0C, param0->unk_110, param0->unk_112)) { - sub_0200B5CC(param0->unk_B8C, 0, ov94_022411DC(param0->unk_00->unk_08, param0->unk_00->unk_0C, param0->unk_110, param0->unk_112)); + StringFormatter_BufferNickname(param0->unk_B8C, 0, ov94_022411DC(param0->unk_00->unk_08, param0->unk_00->unk_0C, param0->unk_110, param0->unk_112)); ov94_02240D58(param0, 22, 1, 0, 0xf0f, 0); ov94_0223C3F4(param0, 3, 7); } else { @@ -602,7 +602,7 @@ static int ov94_022402BC (UnkStruct_ov94_0223FD4C * param0) if (ov94_02241384(v0, ¶m0->unk_250[param0->unk_11C].unk_F0)) { if (ov94_0224121C(param0->unk_00->unk_08, param0->unk_00->unk_0C, param0->unk_110, param0->unk_112)) { - sub_0200B5CC(param0->unk_B8C, 0, v0); + StringFormatter_BufferNickname(param0->unk_B8C, 0, v0); ov94_02240D58(param0, 18, 1, 0, 0xf0f, 0); ov94_0223C3F4(param0, 3, 9); Sound_PlayEffect(1500); diff --git a/src/overlay094/ov94_022414B8.c b/src/overlay094/ov94_022414B8.c index cd331c1d5a..012b1e3646 100644 --- a/src/overlay094/ov94_022414B8.c +++ b/src/overlay094/ov94_022414B8.c @@ -78,7 +78,7 @@ static int ov94_02241B2C(UnkStruct_ov94_0223FD4C * param0); static int ov94_02241BAC(UnkStruct_ov94_0223FD4C * param0); static int ov94_022420E4(UnkStruct_ov94_0223FD4C * param0); static int ov94_02242138(UnkStruct_ov94_0223FD4C * param0); -static void ov94_022423FC(MessageLoader * param0, UnkStruct_0200B358 * param1, Window param2[], BoxPokemon * param3, UnkStruct_ov94_0223BA88_sub2 * param4); +static void ov94_022423FC(MessageLoader * param0, StringFormatter * param1, Window param2[], BoxPokemon * param3, UnkStruct_ov94_0223BA88_sub2 * param4); static int ov94_02241DA0(UnkStruct_ov94_0223FD4C * param0); static int ov94_02241D64(UnkStruct_ov94_0223FD4C * param0); static int ov94_02241D08(UnkStruct_ov94_0223FD4C * param0); @@ -925,7 +925,7 @@ void ov94_022422B8 (Window * param0, MessageLoader * param1, int param2, int par ov94_0224226C(param0, param1, param2, param3, param4, param5, param6, 0); } -void ov94_022422D4 (MessageLoader * param0, MessageLoader * param1, UnkStruct_0200B358 * param2, Window param3[], int param4, int param5, int param6) +void ov94_022422D4 (MessageLoader * param0, MessageLoader * param1, StringFormatter * param2, Window param3[], int param4, int param5, int param6) { Strbuf* v0; int v1; @@ -949,7 +949,7 @@ void ov94_022422D4 (MessageLoader * param0, MessageLoader * param1, UnkStruct_02 Strbuf_Free(v0); } -void ov94_02242368 (MessageLoader * param0, MessageLoader * param1, UnkStruct_0200B358 * param2, Window param3[], int param4, int param5, int param6) +void ov94_02242368 (MessageLoader * param0, MessageLoader * param1, StringFormatter * param2, Window param3[], int param4, int param5, int param6) { Strbuf* v0; int v1; @@ -973,7 +973,7 @@ void ov94_02242368 (MessageLoader * param0, MessageLoader * param1, UnkStruct_02 Strbuf_Free(v0); } -static void ov94_022423FC (MessageLoader * param0, UnkStruct_0200B358 * param1, Window param2[], BoxPokemon * param3, UnkStruct_ov94_0223BA88_sub2 * param4) +static void ov94_022423FC (MessageLoader * param0, StringFormatter * param1, Window param2[], BoxPokemon * param3, UnkStruct_ov94_0223BA88_sub2 * param4) { Strbuf* v0, * v1; Strbuf* v2 = Strbuf_Init(10 + 1, 62); diff --git a/src/overlay094/ov94_02242AD0.c b/src/overlay094/ov94_02242AD0.c index d300a0806a..814232b410 100644 --- a/src/overlay094/ov94_02242AD0.c +++ b/src/overlay094/ov94_02242AD0.c @@ -798,7 +798,7 @@ static int ov94_02243398 (UnkStruct_ov94_0223FD4C * param0) Pokemon * v1 = Pokemon_New(62); sub_0202DA70(param0->unk_00->unk_00, v1); - sub_0200B5CC(param0->unk_B8C, 0, Pokemon_GetBoxPokemon(v1)); + StringFormatter_BufferNickname(param0->unk_B8C, 0, Pokemon_GetBoxPokemon(v1)); param0->unk_28 = 2; param0->unk_2C = 34; @@ -818,7 +818,7 @@ static int ov94_02243398 (UnkStruct_ov94_0223FD4C * param0) Pokemon * v2 = Pokemon_New(62); sub_0202DA70(param0->unk_00->unk_00, v2); - sub_0200B5CC(param0->unk_B8C, 0, Pokemon_GetBoxPokemon(v2)); + StringFormatter_BufferNickname(param0->unk_B8C, 0, Pokemon_GetBoxPokemon(v2)); param0->unk_28 = 3; param0->unk_2C = 34; diff --git a/src/overlay095/ov95_02246C20.c b/src/overlay095/ov95_02246C20.c index b8311c206b..d4bd031207 100644 --- a/src/overlay095/ov95_02246C20.c +++ b/src/overlay095/ov95_02246C20.c @@ -56,7 +56,7 @@ struct UnkStruct_ov95_02247628_t { const UnkStruct_ov6_02246254 * unk_00; int unk_04; BGL * unk_08; - UnkStruct_0200B358 * unk_0C; + StringFormatter * unk_0C; MessageLoader * unk_10; Strbuf* unk_14; GraphicElementManager * unk_18; @@ -157,16 +157,16 @@ int ov95_02246C20 (UnkStruct_020067E8 * param0, int * param1) switch (v0->unk_00->unk_10) { case 1: - sub_0200B5CC(v0->unk_0C, 0, (BoxPokemon *)(v0->unk_00->unk_00)); - sub_0200B5CC(v0->unk_0C, 1, (BoxPokemon *)(v0->unk_00->unk_04)); + StringFormatter_BufferNickname(v0->unk_0C, 0, (BoxPokemon *)(v0->unk_00->unk_00)); + StringFormatter_BufferNickname(v0->unk_0C, 1, (BoxPokemon *)(v0->unk_00->unk_04)); sub_0200B498(v0->unk_0C, 2, v0->unk_00->unk_08); v0->unk_1AC = ov95_02246DEC((BoxPokemon *)(v0->unk_00->unk_04)); break; case 2: - sub_0200B5CC(v0->unk_0C, 0, (BoxPokemon *)(v0->unk_00->unk_00)); + StringFormatter_BufferNickname(v0->unk_0C, 0, (BoxPokemon *)(v0->unk_00->unk_00)); break; case 4: - sub_0200B5CC(v0->unk_0C, 1, (BoxPokemon *)(v0->unk_00->unk_04)); + StringFormatter_BufferNickname(v0->unk_0C, 1, (BoxPokemon *)(v0->unk_00->unk_04)); v0->unk_1AC = ov95_02246DEC((BoxPokemon *)(v0->unk_00->unk_04)); break; } @@ -679,7 +679,7 @@ BGL * ov95_02247628 (UnkStruct_ov95_02247628 * param0) return param0->unk_08; } -UnkStruct_0200B358 * ov95_0224762C (UnkStruct_ov95_02247628 * param0) +StringFormatter * ov95_0224762C (UnkStruct_ov95_02247628 * param0) { return param0->unk_0C; } diff --git a/src/overlay095/ov95_02247B6C.c b/src/overlay095/ov95_02247B6C.c index 6a007cee03..bc386bb046 100644 --- a/src/overlay095/ov95_02247B6C.c +++ b/src/overlay095/ov95_02247B6C.c @@ -329,7 +329,7 @@ static int ov95_02247F04 (UnkStruct_ov95_02247C6C * param0, int * param1) case 1: if (++(param0->unk_08) > 10) { MessageLoader * v0 = ov95_02247630(param0->unk_00); - UnkStruct_0200B358 * v1 = ov95_0224762C(param0->unk_00); + StringFormatter * v1 = ov95_0224762C(param0->unk_00); int v2, v3; if (ov95_02247680(param0->unk_00) == 1) { @@ -352,7 +352,7 @@ static int ov95_02247F04 (UnkStruct_ov95_02247C6C * param0, int * param1) case 2: if (++(param0->unk_08) > 60) { MessageLoader * v4 = ov95_02247630(param0->unk_00); - UnkStruct_0200B358 * v5 = ov95_0224762C(param0->unk_00); + StringFormatter * v5 = ov95_0224762C(param0->unk_00); MessageLoader_GetStrbuf(v4, 1, param0->unk_68); StringFormatter_Format(v5, param0->unk_6C, param0->unk_68); diff --git a/src/overlay095/ov95_0224B3D8.c b/src/overlay095/ov95_0224B3D8.c index 28443fd044..6b635e34a4 100644 --- a/src/overlay095/ov95_0224B3D8.c +++ b/src/overlay095/ov95_0224B3D8.c @@ -404,7 +404,7 @@ static int ov95_0224B81C (UnkStruct_ov95_0224B4D4 * param0, int * param1) case 1: if (++(param0->unk_08) > 10) { MessageLoader * v0 = ov95_02247630(param0->unk_00); - UnkStruct_0200B358 * v1 = ov95_0224762C(param0->unk_00); + StringFormatter * v1 = ov95_0224762C(param0->unk_00); int v2, v3; if (ov95_02247680(param0->unk_00) == 1) { @@ -431,7 +431,7 @@ static int ov95_0224B81C (UnkStruct_ov95_0224B4D4 * param0, int * param1) case 2: if (ov95_0224B990(param0, 60)) { MessageLoader * v4 = ov95_02247630(param0->unk_00); - UnkStruct_0200B358 * v5 = ov95_0224762C(param0->unk_00); + StringFormatter * v5 = ov95_0224762C(param0->unk_00); MessageLoader_GetStrbuf(v4, 3, param0->unk_6C); StringFormatter_Format(v5, param0->unk_70, param0->unk_6C); diff --git a/src/overlay097/ov97_0222AE60.c b/src/overlay097/ov97_0222AE60.c index 54cc1e5041..7dd79cf481 100644 --- a/src/overlay097/ov97_0222AE60.c +++ b/src/overlay097/ov97_0222AE60.c @@ -540,7 +540,7 @@ static void ov97_0222B4FC (UnkStruct_0222AE60 * param0, int param1, int param2) sub_02019448(param0->unk_00, 2); } -static void ov97_0222B53C (Window * param0, MessageLoader * param1, UnkStruct_0200B358 * param2, u32 param3, u32 param4, int param5) +static void ov97_0222B53C (Window * param0, MessageLoader * param1, StringFormatter * param2, u32 param3, u32 param4, int param5) { int v0, v1; Strbuf* v2; @@ -553,7 +553,7 @@ static void ov97_0222B53C (Window * param0, MessageLoader * param1, UnkStruct_02 Strbuf_Free(v2); } -static void ov97_0222B590 (UnkStruct_0200B358 * param0, int param1) +static void ov97_0222B590 (StringFormatter * param0, int param1) { int v0, v1; @@ -572,7 +572,7 @@ static BOOL ov97_0222B5C0 (void * param0, int param1, UnkStruct_ov97_02237808 * { int v0, v1, v2; Strbuf* v3; - UnkStruct_0200B358 * v4; + StringFormatter * v4; MessageLoader * v5; UnkStruct_0222AE60 * v6 = (UnkStruct_0222AE60 *)param0; u32 v7; diff --git a/src/overlay097/ov97_0222C174.c b/src/overlay097/ov97_0222C174.c index b406386ccc..7246611aea 100644 --- a/src/overlay097/ov97_0222C174.c +++ b/src/overlay097/ov97_0222C174.c @@ -631,7 +631,7 @@ static void ov97_0222C578 (UnkStruct_ov97_0222C388 * param0) u32 v0, v1, v2, v3; u8 v4[6]; UnkStruct_ov97_022335A8 v5; - UnkStruct_0200B358 * v6; + StringFormatter * v6; v6 = sub_0200B358(param0->unk_00); @@ -807,7 +807,7 @@ static void ov97_0222C974 (UnkStruct_ov97_0222C388 * param0) { RTCDate v0; Strbuf* v1; - UnkStruct_0200B358 * v2; + StringFormatter * v2; MessageLoader * v3; UnkStruct_0202DBAC * v4 = ¶m0->unk_3180; diff --git a/src/overlay097/ov97_0222D30C.c b/src/overlay097/ov97_0222D30C.c index ed39c8879e..9b5f28404e 100644 --- a/src/overlay097/ov97_0222D30C.c +++ b/src/overlay097/ov97_0222D30C.c @@ -993,7 +993,7 @@ static void ov97_0222E080 (UnkStruct_020067E8 * param0, int * param1) void ov97_0222E13C (UnkStruct_ov97_0222D04C * param0) { - UnkStruct_0200B358 * v0; + StringFormatter * v0; UnkStruct_ov97_02237808 v1; int v2; @@ -1043,7 +1043,7 @@ static int ov97_0222E1D8 (UnkStruct_020067E8 * param0) static int ov97_0222E228 (UnkStruct_020067E8 * param0, Window * param1, int param2, int param3) { - UnkStruct_0200B358 * v0; + StringFormatter * v0; MessageLoader * v1; UnkStruct_ov97_0222D04C * v2 = sub_0200682C(param0); diff --git a/src/overlay097/ov97_02230410.c b/src/overlay097/ov97_02230410.c index 18c27e6ec9..685bdd8af3 100644 --- a/src/overlay097/ov97_02230410.c +++ b/src/overlay097/ov97_02230410.c @@ -86,7 +86,7 @@ typedef struct { int unk_00; UnkStruct_ov97_0222D04C unk_04; BGL * unk_2A5C; - UnkStruct_0200B358 * unk_2A60; + StringFormatter * unk_2A60; MessageLoader * unk_2A64; Window unk_2A68[20]; int unk_2BA8[20]; @@ -338,7 +338,7 @@ static void ov97_022305EC (Window * param0, int param1) { Strbuf* v0; MessageLoader * v1 = MessageLoader_Init(1, 26, 421, 87); - UnkStruct_0200B358 * v2 = sub_0200B358(87); + StringFormatter * v2 = sub_0200B358(87); BGL_FillWindow(param0, sub_02002DF8(1, 6)); @@ -1335,7 +1335,7 @@ static int ov97_02231CA0 (UnkStruct_ov97_02230868 * param0, Window * param1) u32 v4; TrainerInfo * v5; Strbuf* v6; - UnkStruct_0200B358 * v7; + StringFormatter * v7; MessageLoader * v8; int v9[4]; int v10[4]; diff --git a/src/overlay097/ov97_02233B18.c b/src/overlay097/ov97_02233B18.c index 4a72a7ca7d..da780c7bea 100644 --- a/src/overlay097/ov97_02233B18.c +++ b/src/overlay097/ov97_02233B18.c @@ -102,7 +102,7 @@ typedef struct { int unk_34; u16 * unk_38; Strbuf* unk_3C; - UnkStruct_0200B358 * unk_40; + StringFormatter * unk_40; int unk_44; int unk_48; } UnkStruct_ov97_02233DAC; @@ -436,7 +436,7 @@ static int ov97_02233DAC (UnkStruct_ov97_02233DAC * param0, Strbuf *param1, int static void ov97_02233DD0 (UnkStruct_ov97_02234A2C * param0, UnkStruct_ov97_02233DAC * param1, int param2) { Strbuf* v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; MessageLoader * v2; int v3, v4, v5; Strbuf* v6; @@ -1622,7 +1622,7 @@ static void ov97_02235310 (UnkStruct_ov97_02234A2C * param0) static void ov97_02235344 (UnkStruct_ov97_02234A2C * param0) { UnkStruct_ov97_02233DAC v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; Strbuf* v2; u16 v3[7 + 1]; diff --git a/src/overlay097/ov97_02237694.c b/src/overlay097/ov97_02237694.c index 043b3489b9..19cbb91d62 100644 --- a/src/overlay097/ov97_02237694.c +++ b/src/overlay097/ov97_02237694.c @@ -225,7 +225,7 @@ static int ov97_02237870 (UnkStruct_ov97_02237808 * param0, int param1) { int v0; Strbuf* v1; - UnkStruct_0200B358 * v2; + StringFormatter * v2; MessageLoader * v3; UnkStruct_ov97_0223F550 * v4 = &Unk_ov97_0223F550; @@ -591,7 +591,7 @@ static void ov97_02237EF8 (GraphicElementData * param0, Pokemon * param1, int pa DC_FlushRange(param4, 0x20 * 10 * 10); { - NNSG2dImageProxy * v4 = sub_02021F98(param0); + NNSG2dImageProxy * v4 = SpriteActor_ImageProxy(param0); u32 v5 = NNS_G2dGetImageLocation(v4, NNS_G2D_VRAM_TYPE_2DSUB); GXS_LoadOBJ(param4, v5 + 1 * (0x20 * 10 * 10), (0x20 * 10 * 10)); diff --git a/src/overlay098/ov98_022471C8.c b/src/overlay098/ov98_022471C8.c index f9a2a44cc9..02318566b0 100644 --- a/src/overlay098/ov98_022471C8.c +++ b/src/overlay098/ov98_022471C8.c @@ -75,7 +75,7 @@ typedef struct { int unk_14; int unk_18; int unk_1C; - UnkStruct_0200B358 * unk_20; + StringFormatter * unk_20; MessageLoader * unk_24; MessageLoader * unk_28; MessageLoader * unk_2C; diff --git a/src/overlay099/ov99_021D1A54.c b/src/overlay099/ov99_021D1A54.c index 2a1ccf36fe..e22ec12e1d 100644 --- a/src/overlay099/ov99_021D1A54.c +++ b/src/overlay099/ov99_021D1A54.c @@ -1081,7 +1081,7 @@ static void ov99_021D2AAC (UnkStruct_ov99_021D2CB0 * param0) v1 = MessageLoader_GetNewStrbuf(param0->unk_20, ov99_021D4130()); v2 = (256 - sub_02002D7C(0, v1, 0)) / 2; - sub_0201D7E0(param0->unk_24, 0, v1, v2, 80, 0xff, (u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((15 & 0xff) << 0)), 3, 0, NULL); + PrintStringWithColorAndMargins(param0->unk_24, 0, v1, v2, 80, 0xff, (u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((15 & 0xff) << 0)), 3, 0, NULL); sub_0201ACCC(param0->unk_24); Strbuf_Free(v1); } diff --git a/src/overlay099/ov99_021D4134.c b/src/overlay099/ov99_021D4134.c index 13dedb0340..f7c27a442a 100644 --- a/src/overlay099/ov99_021D4134.c +++ b/src/overlay099/ov99_021D4134.c @@ -219,7 +219,7 @@ void ov99_021D44CC (UnkStruct_ov99_021D2CB0 * param0, CellActorData * param1) param0->unk_1114.unk_00--; } else { v0 = G2_GetOBJCharPtr(); - v2 = sub_02021F98(param1->unk_00); + v2 = SpriteActor_ImageProxy(param1->unk_00); if (param0->unk_00->unk_00 == 0) { MI_CpuCopy32(¶m0->unk_10F4[param0->unk_1114.unk_02 * ((0x20 * 8) / 2)], (void *)((u32)v0 + 0x1d * 0x20 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); diff --git a/src/overlay100/ov100_021D46C8.c b/src/overlay100/ov100_021D46C8.c index 949afc82be..7a775e7d20 100644 --- a/src/overlay100/ov100_021D46C8.c +++ b/src/overlay100/ov100_021D46C8.c @@ -43,7 +43,7 @@ int ov100_021D46C8 (UnkStruct_ov100_021D46C8 * param0, UnkStruct_020985E4 * para if (param2 == 22) { Strbuf* v5 = TrainerInfo_NameNewStrbuf(param1->unk_08, 111); - UnkStruct_0200B358 * v6 = sub_0200B358(111); + StringFormatter * v6 = sub_0200B358(111); sub_0200B48C(v6, 0, v5, 0, 1, GAME_LANGUAGE); StringFormatter_Format(v6, v3, v2); diff --git a/src/overlay102/ov102_021D0D80.c b/src/overlay102/ov102_021D0D80.c index 858006300d..5c7ed99b0b 100644 --- a/src/overlay102/ov102_021D0D80.c +++ b/src/overlay102/ov102_021D0D80.c @@ -44,7 +44,7 @@ typedef struct { Window unk_14; Window unk_24; MessageLoader * unk_34; - UnkStruct_0200B358 * unk_38; + StringFormatter * unk_38; s16 unk_3C; int unk_40; } UnkStruct_ov102_021D0F8C; diff --git a/src/overlay104/ov104_0222DCE0.c b/src/overlay104/ov104_0222DCE0.c index 8d84dd70bc..3c510d3350 100644 --- a/src/overlay104/ov104_0222DCE0.c +++ b/src/overlay104/ov104_0222DCE0.c @@ -613,7 +613,7 @@ void ov104_0222E4BC (u8 param0, u16 param1, u16 param2, u16 * param3, UnkStruct_ return; } -void ov104_0222E5D0 (UnkStruct_0200B358 * param0, u32 param1) +void ov104_0222E5D0 (StringFormatter * param0, u32 param1) { sub_0200B498(param0, param1, sub_02032EE8((sub_0203608C() ^ 1))); return; diff --git a/src/overlay104/ov104_02231F74.c b/src/overlay104/ov104_02231F74.c index 022ad2dd8e..d28efe063d 100644 --- a/src/overlay104/ov104_02231F74.c +++ b/src/overlay104/ov104_02231F74.c @@ -78,7 +78,7 @@ typedef struct UnkStruct_ov104_02232B5C_t { Window * unk_18; Strbuf* unk_1C[28]; MessageLoader * unk_8C; - UnkStruct_0200B358 * unk_90; + StringFormatter * unk_90; u8 unk_94; u8 unk_95; u8 unk_96; @@ -113,8 +113,8 @@ typedef struct { static void ov104_02231FC4(UnkStruct_ov104_022320B4 * param0); static void ov104_02232034(UnkStruct_ov104_022320B4 * param0, const MessageLoader * param1, u32 param2); static void ov104_02232050(UnkStruct_ov104_022320B4 * param0, int param1, int param2, int param3, int param4); -static void ov104_0223214C(UnkStruct_ov104_022320B4 * param0, UnkStruct_ov104_02232B5C * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, UnkStruct_0200B358 * param7, MessageLoader * param8); -UnkStruct_ov104_02232B5C * ov104_02232258(UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, MessageLoader * param7); +static void ov104_0223214C(UnkStruct_ov104_022320B4 * param0, UnkStruct_ov104_02232B5C * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, StringFormatter * param7, MessageLoader * param8); +UnkStruct_ov104_02232B5C * ov104_02232258(UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, MessageLoader * param7); void ov104_022322A8(UnkStruct_ov104_02232B5C * param0, u32 param1, u32 param2, u32 param3); void ov104_022322B0(UnkStruct_ov104_02232B5C * param0); static void ov104_02232390(UnkStruct_ov104_02232B5C * param0, u32 param1, u32 param2, u32 param3); @@ -127,7 +127,7 @@ static void ov104_02232AC4(UnkStruct_ov104_02232B5C * param0, u16 param1, u32 pa void ov104_022320B4(UnkStruct_ov104_022320B4 * param0, u8 param1, u16 param2, u16 param3, u16 param4, s16 param5, u8 param6); static void ov104_022320FC(Strbuf *param0, u16 param1, u16 param2, u16 param3, u16 param4); static BOOL ov104_02233184(UnkStruct_ov104_0222E930 * param0); -UnkStruct_ov104_02232B5C * ov104_022325FC(UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, MessageLoader * param7); +UnkStruct_ov104_02232B5C * ov104_022325FC(UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, MessageLoader * param7); void ov104_0223261C(UnkStruct_ov104_02232B5C * param0, u32 param1, u32 param2, u32 param3); void ov104_02232624(UnkStruct_ov104_02232B5C * param0); static void ov104_02232750(UnkStruct_ov104_02232B5C * param0, u32 param1, u32 param2, u32 param3); @@ -241,7 +241,7 @@ static void ov104_022320FC (Strbuf *param0, u16 param1, u16 param2, u16 param3, Strbuf_Free(v1); } -static void ov104_0223214C (UnkStruct_ov104_022320B4 * param0, UnkStruct_ov104_02232B5C * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, UnkStruct_0200B358 * param7, MessageLoader * param8) +static void ov104_0223214C (UnkStruct_ov104_022320B4 * param0, UnkStruct_ov104_02232B5C * param1, u8 param2, u8 param3, u8 param4, u8 param5, u16 * param6, StringFormatter * param7, MessageLoader * param8) { int v0; @@ -289,7 +289,7 @@ static void ov104_0223214C (UnkStruct_ov104_022320B4 * param0, UnkStruct_ov104_0 return; } -UnkStruct_ov104_02232B5C * ov104_02232258 (UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, MessageLoader * param7) +UnkStruct_ov104_02232B5C * ov104_02232258 (UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, MessageLoader * param7) { UnkStruct_ov104_02232B5C * v0; int v1; @@ -478,7 +478,7 @@ static void ov104_022325D8 (UnkStruct_ov104_02232B5C * param0) return; } -UnkStruct_ov104_02232B5C * ov104_022325FC (UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, UnkStruct_0200B358 * param6, MessageLoader * param7) +UnkStruct_ov104_02232B5C * ov104_022325FC (UnkStruct_ov104_022320B4 * param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 * param5, StringFormatter * param6, MessageLoader * param7) { return ov104_02232258(param0, param1, param2, param3, param4, param5, param6, param7); } @@ -932,7 +932,7 @@ void ov104_02232CE0 (UnkStruct_ov104_0223C4CC * param0, Pokemon * param1, int pa NNSG2dImagePaletteProxy * v12; int v13; - v11 = sub_02021F98(v5->unk_00); + v11 = SpriteActor_ImageProxy(v5->unk_00); DC_FlushRange(v4, sizeof((10 * 10 * ((8 / 2) * 8)))); GX_LoadOBJ(v4, v11->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN], (10 * 10 * ((8 / 2) * 8))); diff --git a/src/overlay104/ov104_0223DC7C.c b/src/overlay104/ov104_0223DC7C.c index f04469fcc7..4402fb9ec4 100644 --- a/src/overlay104/ov104_0223DC7C.c +++ b/src/overlay104/ov104_0223DC7C.c @@ -452,8 +452,8 @@ static void ov104_0223E29C (UnkStruct_ov104_0223DD30 * param0, UnkStruct_ov104_0 if (param10 == NULL) { sub_0201A7A0(&v1); - sub_0201A870(v5, &v1, v8, 16 / 8, 0, 0); - sub_0201D7E0(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); + BGL_AddFramelessWindow(v5, &v1, v8, 16 / 8, 0, 0); + PrintStringWithColorAndMargins(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); } else { v1 = param10->unk_00; } diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index d77817b479..2e6eedda53 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -106,7 +106,7 @@ struct UnkStruct_ov105_02241FF4_t { u8 unk_1A; u8 unk_1B; MessageLoader * unk_1C; - UnkStruct_0200B358 * unk_20; + StringFormatter * unk_20; Strbuf* unk_24; Strbuf* unk_28; Strbuf* unk_2C[4]; diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index 038cb31540..0b2ceecd63 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -97,7 +97,7 @@ struct UnkStruct_ov106_02243118_t { u8 unk_1E; u8 unk_1F; MessageLoader * unk_20; - UnkStruct_0200B358 * unk_24; + StringFormatter * unk_24; Strbuf* unk_28; Strbuf* unk_2C; Strbuf* unk_30[2]; diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index 066d584a51..7064e6b47e 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -255,7 +255,7 @@ struct UnkStruct_ov107_02241D6C_t { u16 unk_1A; MessageLoader * unk_1C; MessageLoader * unk_20; - UnkStruct_0200B358 * unk_24; + StringFormatter * unk_24; Strbuf* unk_28; Strbuf* unk_2C; Strbuf* unk_30[3]; diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index 4a2abec829..63dbcf8d64 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -110,7 +110,7 @@ struct UnkStruct_ov107_02246170_t { u16 unk_1C; u16 unk_1E; MessageLoader * unk_20; - UnkStruct_0200B358 * unk_24; + StringFormatter * unk_24; Strbuf* unk_28; Strbuf* unk_2C; Strbuf* unk_30[3]; diff --git a/src/overlay107/ov107_02249C98.c b/src/overlay107/ov107_02249C98.c index 29ae4099e2..e4b9fb6368 100644 --- a/src/overlay107/ov107_02249C98.c +++ b/src/overlay107/ov107_02249C98.c @@ -19,7 +19,7 @@ u8 ov107_02249C98(u8 param0, u8 param1); u8 ov107_02249C9C(u8 param0, u8 param1); u8 ov107_02249CAC(SaveData * param0, u8 param1, u8 param2); void ov107_02249CE0(u32 param0, u16 param1); -void ov107_02249CF4(UnkStruct_0200B358 * param0, u32 param1); +void ov107_02249CF4(StringFormatter * param0, u32 param1); u8 ov107_02249C98 (u8 param0, u8 param1) { @@ -49,7 +49,7 @@ void ov107_02249CE0 (u32 param0, u16 param1) return; } -void ov107_02249CF4 (UnkStruct_0200B358 * param0, u32 param1) +void ov107_02249CF4 (StringFormatter * param0, u32 param1) { TrainerInfo * v0; u32 v1; diff --git a/src/overlay108/ov108_02241AE0.c b/src/overlay108/ov108_02241AE0.c index 725aea9321..18c7088300 100644 --- a/src/overlay108/ov108_02241AE0.c +++ b/src/overlay108/ov108_02241AE0.c @@ -201,7 +201,7 @@ struct UnkStruct_ov108_02241DB0_t { u8 unk_44[32]; u8 unk_64; MessageLoader * unk_68; - UnkStruct_0200B358 * unk_6C; + StringFormatter * unk_6C; Strbuf* unk_70; Strbuf* unk_74; Strbuf* unk_78[2]; diff --git a/src/overlay109/ov109_021D0D80.c b/src/overlay109/ov109_021D0D80.c index 9bd7e5d63e..311cd9dda6 100644 --- a/src/overlay109/ov109_021D0D80.c +++ b/src/overlay109/ov109_021D0D80.c @@ -148,7 +148,7 @@ typedef struct { typedef struct { int unk_00; MessageLoader * unk_04; - UnkStruct_0200B358 * unk_08; + StringFormatter * unk_08; Window unk_0C[1]; Window unk_1C[5]; void * unk_6C; diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index 8e211b4ed5..1d37f1c5f1 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -58,7 +58,7 @@ typedef struct { BGL * unk_0C; Window unk_10[16]; MessageLoader * unk_110; - UnkStruct_0200B358 * unk_114; + StringFormatter * unk_114; Strbuf* unk_118; Strbuf* unk_11C; PaletteData * unk_120; diff --git a/src/overlay111/ov111_021D0D80.c b/src/overlay111/ov111_021D0D80.c index ca50ba932c..df991d7343 100644 --- a/src/overlay111/ov111_021D0D80.c +++ b/src/overlay111/ov111_021D0D80.c @@ -86,7 +86,7 @@ struct UnkStruct_ov111_021D0F7C_t { VecFx32 unk_28; void * unk_34; MessageLoader * unk_38; - UnkStruct_0200B358 * unk_3C; + StringFormatter * unk_3C; Strbuf* unk_40; Strbuf* unk_44; u16 unk_48[8]; diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index 37bbbf9611..2625342474 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -116,7 +116,7 @@ typedef struct UnkStruct_ov113_0225DBCC_t { UnkStruct_02015920 * unk_24; u8 unk_28; u8 unk_29; - UnkStruct_0200B358 * unk_2C; + StringFormatter * unk_2C; MessageLoader * unk_30; Window unk_34[8]; Window unk_B4; @@ -1161,7 +1161,7 @@ static BOOL ov113_0225D938 (int param0, int param1, CellActorData * param2, NARC v0 = G2S_GetOBJCharPtr(); } - v1 = sub_02021F98(param2->unk_00); + v1 = SpriteActor_ImageProxy(param2->unk_00); MI_CpuCopy16(v4, (void *)((u32)v0 + v1->vramLocation.baseAddrOfVram[param5]), 0x20 * 2); MI_CpuCopy16(v5, (void *)((u32)v0 + 0x20 * 2 + v1->vramLocation.baseAddrOfVram[param5]), 0x20 * 2); @@ -1534,8 +1534,8 @@ static void ov113_0225E15C (UnkStruct_ov113_0225DBCC * param0, UnkStruct_ov113_0 ov113_0225E264(param2, param3, &v7, &v8); sub_0201A7A0(&v1); - sub_0201A870(v5, &v1, v8, 16 / 8, 0, 0); - sub_0201D7E0(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); + BGL_AddFramelessWindow(v5, &v1, v8, 16 / 8, 0, 0); + PrintStringWithColorAndMargins(&v1, param3, param2, 0, 0, 0xff, param4, 0, 0, NULL); v3 = sub_02012898(&v1, NNS_G2D_VRAM_TYPE_2DMAIN, 118); sub_0201ED94(v3, 1, NNS_G2D_VRAM_TYPE_2DMAIN, &v2); diff --git a/src/overlay113/ov113_02260620.c b/src/overlay113/ov113_02260620.c index 552912cec7..5481c4d93b 100644 --- a/src/overlay113/ov113_02260620.c +++ b/src/overlay113/ov113_02260620.c @@ -547,7 +547,7 @@ static const UnkUnion_02022594 Unk_ov113_02260D4C[] = { {0xFF, 0x0, 0x0, 0x0} }; -void ov113_02260620 (MessageLoader * param0, UnkStruct_0200B358 * param1, Window param2[], UnkStruct_ov66_0222DFF8 * param3, s32 param4) +void ov113_02260620 (MessageLoader * param0, StringFormatter * param1, Window param2[], UnkStruct_ov66_0222DFF8 * param3, s32 param4) { const UnkStruct_ov66_0222E71C * v0; TrainerInfo * v1; diff --git a/src/overlay114/ov114_0225C700.c b/src/overlay114/ov114_0225C700.c index 6dd004bc86..c1e7aedfe1 100644 --- a/src/overlay114/ov114_0225C700.c +++ b/src/overlay114/ov114_0225C700.c @@ -114,7 +114,7 @@ typedef struct { typedef struct { MessageLoader * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; Strbuf* unk_08; Strbuf* unk_0C; } UnkStruct_ov114_0225D084; diff --git a/src/overlay115/ov115_02260CEC.c b/src/overlay115/ov115_02260CEC.c index 60143f1c23..66f3999653 100644 --- a/src/overlay115/ov115_02260CEC.c +++ b/src/overlay115/ov115_02260CEC.c @@ -291,7 +291,7 @@ typedef struct { typedef struct { BGL * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; MessageLoader * unk_08; Strbuf* unk_0C; Strbuf* unk_10; @@ -4426,7 +4426,7 @@ static void ov115_02265478 (UnkStruct_ov115_02265788 * param0, UnkStruct_ov115_0 UnkStruct_020127E8 v4; param0->unk_5C = Strbuf_Init(16, param3); - sub_0201A870(param1->unk_00, ¶m0->unk_38, 3, 2, 0, 0); + BGL_AddFramelessWindow(param1->unk_00, ¶m0->unk_38, 3, 2, 0, 0); param0->unk_4C = sub_02012B20(¶m0->unk_38, param3); v2 = sub_02012B58(param0->unk_4C, NNS_G2D_VRAM_TYPE_2DMAIN); @@ -4492,7 +4492,7 @@ static void ov115_02265700 (UnkStruct_ov115_02265788 * param0, UnkStruct_ov115_0 { { Strbuf_FormatInt(param0->unk_5C, param2, 2, 2, 1); - sub_0201A870(param1->unk_00, ¶m0->unk_38, 3, 2, 0, 0); + BGL_AddFramelessWindow(param1->unk_00, ¶m0->unk_38, 3, 2, 0, 0); sub_0201D78C(¶m0->unk_38, 0, param0->unk_5C, 0, 0, 0xff, ((u32)(((15 & 0xff) << 16) | ((14 & 0xff) << 8) | ((0 & 0xff) << 0))), NULL); sub_02012BE0(param0->unk_48, param0->unk_4C, ¶m0->unk_38, param0->unk_9C); BGL_DeleteWindow(¶m0->unk_38); @@ -4521,7 +4521,7 @@ static void ov115_022657A8 (UnkStruct_ov115_02265788 * param0, UnkStruct_ov115_0 if (param0->unk_98 != 3) { { Strbuf_FormatInt(param0->unk_5C, param2, 2, 2, 1); - sub_0201A870(param1->unk_00, ¶m0->unk_38, 3, 2, 0, 0); + BGL_AddFramelessWindow(param1->unk_00, ¶m0->unk_38, 3, 2, 0, 0); sub_0201D78C(¶m0->unk_38, 0, param0->unk_5C, 0, 0, 0xff, ((u32)(((15 & 0xff) << 16) | ((14 & 0xff) << 8) | ((0 & 0xff) << 0))), NULL); sub_02012BE0(param0->unk_48, param0->unk_4C, ¶m0->unk_38, param0->unk_9C); BGL_DeleteWindow(¶m0->unk_38); diff --git a/src/overlay116/ov116_02261870.c b/src/overlay116/ov116_02261870.c index b44102b4d0..15657804c0 100644 --- a/src/overlay116/ov116_02261870.c +++ b/src/overlay116/ov116_02261870.c @@ -536,9 +536,9 @@ void ov116_022620AC (UnkStruct_ov116_0226139C * param0, UnkStruct_ov116_02262A8C v12 = ov116_0226208C(v3, v11); if (v10) { - sub_0201D7E0(v3, 0, v11, v12, 0, 0, ((u32)(((5 & 0xff) << 16) | ((6 & 0xff) << 8) | ((15 & 0xff) << 0))), 0, 0, NULL); + PrintStringWithColorAndMargins(v3, 0, v11, v12, 0, 0, ((u32)(((5 & 0xff) << 16) | ((6 & 0xff) << 8) | ((15 & 0xff) << 0))), 0, 0, NULL); } else { - sub_0201D7E0(v3, 0, v11, v12, 0, 0, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((15 & 0xff) << 0))), 0, 0, NULL); + PrintStringWithColorAndMargins(v3, 0, v11, v12, 0, 0, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((15 & 0xff) << 0))), 0, 0, NULL); } Strbuf_Free(v11); diff --git a/src/overlay117/ov117_02263AF0.c b/src/overlay117/ov117_02263AF0.c index 58095648ff..18ff1bb857 100644 --- a/src/overlay117/ov117_02263AF0.c +++ b/src/overlay117/ov117_02263AF0.c @@ -2033,8 +2033,8 @@ void ov117_02265DB8 (BGL * param0, SpriteGfxHandler * param1, UnkStruct_02012744 { sub_0201A7A0(&v1); - sub_0201A870(param0, &v1, v6, param14, 0, 0); - sub_0201D7E0(&v1, param5, param4, 0, 0, 0xff, param6, v7, 0, NULL); + BGL_AddFramelessWindow(param0, &v1, v6, param14, 0, 0); + PrintStringWithColorAndMargins(&v1, param5, param4, 0, 0, 0xff, param6, v7, 0, NULL); } v3 = sub_02012898(&v1, NNS_G2D_VRAM_TYPE_2DMAIN, 110); diff --git a/src/overlay118/ov118_021D0D80.c b/src/overlay118/ov118_021D0D80.c index 4adc62e3b0..c6b753c408 100644 --- a/src/overlay118/ov118_021D0D80.c +++ b/src/overlay118/ov118_021D0D80.c @@ -146,7 +146,7 @@ int ov118_021D0DBC (GameWindowLayout * param0) v2 = MessageLoader_GetNewStrbuf(param0->unk_69C, 202); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, v2); Strbuf_Free(v2); sub_02082708(param0, 0xffffffff, 1); diff --git a/src/overlay119/ov119_021D0D80.c b/src/overlay119/ov119_021D0D80.c index d0333ddba3..38654894af 100644 --- a/src/overlay119/ov119_021D0D80.c +++ b/src/overlay119/ov119_021D0D80.c @@ -312,7 +312,7 @@ int ov119_021D1158 (Window * param0, int param1, Pokemon * param2, int param3) int v0; Strbuf* v1; Strbuf* v2; - UnkStruct_0200B358 * v3; + StringFormatter * v3; BoxPokemon * v4; MessageLoader * v5; diff --git a/src/unk_0200112C.c b/src/unk_0200112C.c index b71aa19355..7b0d2a90cd 100644 --- a/src/unk_0200112C.c +++ b/src/unk_0200112C.c @@ -321,9 +321,9 @@ static void sub_020015D0 (UnkStruct_0200112C * param0, void * param1, u8 param2, } if (param0->unk_1F.unk_04_7) { - sub_0201D7E0(param0->unk_00.unk_0C, param0->unk_1F.unk_04_0, param1, param2, param3, 0xff, (u32)((((param0->unk_1F.unk_00_0) & 0xff) << 16) | (((param0->unk_1F.unk_01_0) & 0xff) << 8) | (((param0->unk_1F.unk_00_4) & 0xff) << 0)), param0->unk_1F.unk_02_0, 0, NULL); + PrintStringWithColorAndMargins(param0->unk_00.unk_0C, param0->unk_1F.unk_04_0, param1, param2, param3, 0xff, (u32)((((param0->unk_1F.unk_00_0) & 0xff) << 16) | (((param0->unk_1F.unk_01_0) & 0xff) << 8) | (((param0->unk_1F.unk_00_4) & 0xff) << 0)), param0->unk_1F.unk_02_0, 0, NULL); } else { - sub_0201D7E0(param0->unk_00.unk_0C, param0->unk_00.unk_1A_9, param1, param2, param3, 0xff, (u32)((((param0->unk_00.unk_17_4) & 0xff) << 16) | (((param0->unk_00.unk_18_4) & 0xff) << 8) | (((param0->unk_00.unk_18_0) & 0xff) << 0)), param0->unk_00.unk_1A_0, 0, NULL); + PrintStringWithColorAndMargins(param0->unk_00.unk_0C, param0->unk_00.unk_1A_9, param1, param2, param3, 0xff, (u32)((((param0->unk_00.unk_17_4) & 0xff) << 16) | (((param0->unk_00.unk_18_4) & 0xff) << 8) | (((param0->unk_00.unk_18_0) & 0xff) << 0)), param0->unk_00.unk_1A_0, 0, NULL); } } diff --git a/src/unk_0200B29C.c b/src/unk_0200B29C.c index 60a59bacef..11566b1197 100644 --- a/src/unk_0200B29C.c +++ b/src/unk_0200B29C.c @@ -10,7 +10,7 @@ #include "unk_0200B358.h" #include "strbuf.h" -Strbuf* sub_0200B29C (UnkStruct_0200B358 * param0, MessageLoader * param1, u32 param2, u32 param3) +Strbuf* sub_0200B29C (StringFormatter * param0, MessageLoader * param1, u32 param2, u32 param3) { Strbuf* v0 = NULL; Strbuf* v1; diff --git a/src/unk_0200B358.c b/src/unk_0200B358.c index acaec3a7e1..9b0b6b6b1a 100644 --- a/src/unk_0200B358.c +++ b/src/unk_0200B358.c @@ -46,39 +46,39 @@ typedef struct UnkStruct_0200B358_t { u32 unk_04; UnkStruct_0200B358_sub1 * unk_08; Strbuf* unk_0C; -} UnkStruct_0200B358; +} StringFormatter; -static void sub_0200B448(UnkStruct_0200B358 * param0, u32 param1, const Strbuf *param2, const UnkStruct_0200B444 * param3); +static void sub_0200B448(StringFormatter * param0, u32 param1, const Strbuf *param2, const UnkStruct_0200B444 * param3); static void sub_0200B444(UnkStruct_0200B444 * param0); -void sub_0200B578(UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2); -void sub_0200B594(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B744(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B77C(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200B998(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BACC(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BB3C(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BCB8(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BE98(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200BFE4(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C2E0(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C324(UnkStruct_0200B358 * param0, u32 param1); -void sub_0200C338(UnkStruct_0200B358 * param0, u32 param1, u32 param2); - -UnkStruct_0200B358 * sub_0200B358 (u32 param0) +void sub_0200B578(StringFormatter * param0, u32 param1, BoxPokemon * param2); +void sub_0200B594(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B744(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B77C(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200B998(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BACC(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BB3C(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BCB8(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BE98(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200BFE4(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C2E0(StringFormatter * param0, u32 param1, u32 param2); +void sub_0200C324(StringFormatter * param0, u32 param1); +void sub_0200C338(StringFormatter * param0, u32 param1, u32 param2); + +StringFormatter * sub_0200B358 (u32 param0) { return sub_0200B368(8, 32, param0); } -UnkStruct_0200B358 * sub_0200B368 (u32 param0, u32 param1, u32 param2) +StringFormatter * sub_0200B368 (u32 param0, u32 param1, u32 param2) { - UnkStruct_0200B358 * v0 = NULL; + StringFormatter * v0 = NULL; u32 v1; GF_ASSERT(param0); GF_ASSERT(param1); do { - UnkStruct_0200B358 * v2 = Heap_AllocFromHeapAtEnd(param2, sizeof(UnkStruct_0200B358)); + StringFormatter * v2 = Heap_AllocFromHeapAtEnd(param2, sizeof(StringFormatter)); if (v2 == NULL) { break; @@ -119,7 +119,7 @@ UnkStruct_0200B358 * sub_0200B368 (u32 param0, u32 param1, u32 param2) return NULL; } -void sub_0200B3F0 (UnkStruct_0200B358 * param0) +void sub_0200B3F0 (StringFormatter * param0) { u32 v0; @@ -150,7 +150,7 @@ static void sub_0200B444 (UnkStruct_0200B444 * param0) return; } -static void sub_0200B448 (UnkStruct_0200B358 * param0, u32 param1, const Strbuf *param2, const UnkStruct_0200B444 * param3) +static void sub_0200B448 (StringFormatter * param0, u32 param1, const Strbuf *param2, const UnkStruct_0200B444 * param3) { GF_ASSERT(param1 < param0->unk_00); @@ -163,12 +163,12 @@ static void sub_0200B448 (UnkStruct_0200B358 * param0, u32 param1, const Strbuf } } -void sub_0200B48C (UnkStruct_0200B358 * param0, u32 param1, const Strbuf *param2, u32 param3, BOOL param4, u32 param5) +void sub_0200B48C (StringFormatter * param0, u32 param1, const Strbuf *param2, u32 param3, BOOL param4, u32 param5) { sub_0200B448(param0, param1, param2, NULL); } -void sub_0200B498 (UnkStruct_0200B358 * param0, u32 param1, const TrainerInfo * param2) +void sub_0200B498 (StringFormatter * param0, u32 param1, const TrainerInfo * param2) { const u16 * v0; @@ -178,7 +178,7 @@ void sub_0200B498 (UnkStruct_0200B358 * param0, u32 param1, const TrainerInfo * sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200B4BC (UnkStruct_0200B358 * param0, u32 param1, const SaveData * param2) +void sub_0200B4BC (StringFormatter * param0, u32 param1, const SaveData * param2) { const u16 * v0 = MiscSave_RivalName(Save_MiscRO(param2)); @@ -186,7 +186,7 @@ void sub_0200B4BC (UnkStruct_0200B358 * param0, u32 param1, const SaveData * par sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200B4E4 (UnkStruct_0200B358 * param0, u32 param1, const SaveData * param2) +void sub_0200B4E4 (StringFormatter * param0, u32 param1, const SaveData * param2) { const TrainerInfo * v0 = sub_02025E38((SaveData *)param2); MessageLoader * v1; @@ -203,7 +203,7 @@ void sub_0200B4E4 (UnkStruct_0200B358 * param0, u32 param1, const SaveData * par MessageLoader_Free(v1); } -void sub_0200B538 (UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2) +void sub_0200B538 (StringFormatter * param0, u32 param1, BoxPokemon * param2) { MessageLoader * v0; u32 v1; @@ -216,7 +216,7 @@ void sub_0200B538 (UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2) MessageLoader_Free(v0); } -void sub_0200B578 (UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2) +void sub_0200B578 (StringFormatter * param0, u32 param1, BoxPokemon * param2) { u32 v0; @@ -224,7 +224,7 @@ void sub_0200B578 (UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2) sub_0200B594(param0, param1, v0); } -void sub_0200B594 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B594 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0; @@ -235,25 +235,25 @@ void sub_0200B594 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) MessageLoader_Free(v0); } -void sub_0200B5CC (UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2) +void StringFormatter_BufferNickname (StringFormatter * param0, u32 param1, BoxPokemon * param2) { BoxPokemon_GetValue(param2, MON_DATA_NICKNAME_STRBUF, param0->unk_0C); sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200B5EC (UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2) +void sub_0200B5EC (StringFormatter * param0, u32 param1, BoxPokemon * param2) { BoxPokemon_GetValue(param2, MON_DATA_OTNAME_STRBUF, param0->unk_0C); sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200B60C (UnkStruct_0200B358 * param0, u32 param1, s32 param2, u32 param3, int param4, int param5) +void sub_0200B60C (StringFormatter * param0, u32 param1, s32 param2, u32 param3, int param4, int param5) { Strbuf_FormatInt(param0->unk_0C, param2, param3, param4, param5); sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200B630 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B630 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 647, param0->unk_04); @@ -264,7 +264,7 @@ void sub_0200B630 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B668 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B668 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 535, param0->unk_04); @@ -275,7 +275,7 @@ void sub_0200B668 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B6A0 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B6A0 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 610, param0->unk_04); @@ -286,7 +286,7 @@ void sub_0200B6A0 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B6D8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B6D8 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0; @@ -297,7 +297,7 @@ void sub_0200B6D8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) MessageLoader_Free(v0); } -void sub_0200B70C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B70C (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 392, param0->unk_04); @@ -308,7 +308,7 @@ void sub_0200B70C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B744 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B744 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 393, param0->unk_04); @@ -319,7 +319,7 @@ void sub_0200B744 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B77C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B77C (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 394, param0->unk_04); @@ -330,7 +330,7 @@ void sub_0200B77C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B7B4 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B7B4 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 396, param0->unk_04); @@ -341,7 +341,7 @@ void sub_0200B7B4 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B7EC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B7EC (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 624, param0->unk_04); @@ -352,7 +352,7 @@ void sub_0200B7EC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B824 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B824 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 551, param0->unk_04); @@ -363,7 +363,7 @@ void sub_0200B824 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B85C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B85C (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 219, param0->unk_04); @@ -374,7 +374,7 @@ void sub_0200B85C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B890 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B890 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 606, param0->unk_04); @@ -385,7 +385,7 @@ void sub_0200B890 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B8C8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B8C8 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 433, param0->unk_04); @@ -402,7 +402,7 @@ void sub_0200B8C8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B928 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B928 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 457, param0->unk_04); @@ -413,7 +413,7 @@ void sub_0200B928 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B960 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B960 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 619, param0->unk_04); @@ -424,7 +424,7 @@ void sub_0200B960 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B998 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200B998 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 620, param0->unk_04); @@ -435,7 +435,7 @@ void sub_0200B998 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200B9D0 (UnkStruct_0200B358 * param0, u32 param1, TrainerData * param2) +void sub_0200B9D0 (StringFormatter * param0, u32 param1, TrainerData * param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 619, param0->unk_04); @@ -446,7 +446,7 @@ void sub_0200B9D0 (UnkStruct_0200B358 * param0, u32 param1, TrainerData * param2 } } -void sub_0200BA08 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BA08 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 618, param0->unk_04); @@ -457,7 +457,7 @@ void sub_0200BA08 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BA40 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BA40 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 21, param0->unk_04); @@ -468,13 +468,13 @@ void sub_0200BA40 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BA74 (UnkStruct_0200B358 * param0, u32 param1, TrainerData * param2) +void sub_0200BA74 (StringFormatter * param0, u32 param1, TrainerData * param2) { Strbuf_CopyChars(param0->unk_0C, ¶m2->name[0]); sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200BA94 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BA94 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 628, param0->unk_04); @@ -485,7 +485,7 @@ void sub_0200BA94 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BACC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BACC (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 629, param0->unk_04); @@ -496,7 +496,7 @@ void sub_0200BACC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BB04 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BB04 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 630, param0->unk_04); @@ -507,7 +507,7 @@ void sub_0200BB04 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BB3C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BB3C (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 631, param0->unk_04); @@ -518,7 +518,7 @@ void sub_0200BB3C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BB74 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BB74 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 207, param0->unk_04); @@ -529,7 +529,7 @@ void sub_0200BB74 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BBA8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BBA8 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 204, param0->unk_04); @@ -540,7 +540,7 @@ void sub_0200BBA8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BBDC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BBDC (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 204, param0->unk_04); @@ -551,7 +551,7 @@ void sub_0200BBDC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BC10 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BC10 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 633, param0->unk_04); @@ -562,7 +562,7 @@ void sub_0200BC10 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BC48 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BC48 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 632, param0->unk_04); @@ -573,7 +573,7 @@ void sub_0200BC48 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BC80 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BC80 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 626, param0->unk_04); @@ -584,7 +584,7 @@ void sub_0200BC80 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BCB8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BCB8 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 627, param0->unk_04); @@ -595,7 +595,7 @@ void sub_0200BCB8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BCF0 (UnkStruct_0200B358 * param0, u32 param1, u8 param2) +void sub_0200BCF0 (StringFormatter * param0, u32 param1, u8 param2) { MessageLoader * v0; @@ -616,13 +616,13 @@ void sub_0200BCF0 (UnkStruct_0200B358 * param0, u32 param1, u8 param2) MessageLoader_Free(v0); } -void sub_0200BD40 (UnkStruct_0200B358 * param0, u32 param1, const PCBoxes * param2, u32 param3) +void sub_0200BD40 (StringFormatter * param0, u32 param1, const PCBoxes * param2, u32 param3) { sub_02079AF4(param2, param3, param0->unk_0C); sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200BD60 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BD60 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 378, param0->unk_04); @@ -633,7 +633,7 @@ void sub_0200BD60 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BD98 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BD98 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 608, param0->unk_04); @@ -644,7 +644,7 @@ void sub_0200BD98 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BDD0 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BDD0 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 694, param0->unk_04); @@ -655,7 +655,7 @@ void sub_0200BDD0 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BE08 (UnkStruct_0200B358 * param0, u32 param1, u32 param2, u32 param3) +void sub_0200BE08 (StringFormatter * param0, u32 param1, u32 param2, u32 param3) { u32 v0; @@ -674,13 +674,13 @@ void sub_0200BE08 (UnkStruct_0200B358 * param0, u32 param1, u32 param2, u32 para } } -void sub_0200BE48 (UnkStruct_0200B358 * param0, u32 param1, u16 param2) +void sub_0200BE48 (StringFormatter * param0, u32 param1, u16 param2) { sub_02014DB8(param2, param0->unk_0C); sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200BE64 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BE64 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 12, param0->unk_04); @@ -691,7 +691,7 @@ void sub_0200BE64 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BE98 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BE98 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 13, param0->unk_04); @@ -702,7 +702,7 @@ void sub_0200BE98 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BECC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BECC (StringFormatter * param0, u32 param1, u32 param2) { static const u16 v0[] = { 433, 435, 434, @@ -744,7 +744,7 @@ void sub_0200BECC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BF74 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BF74 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 465, param0->unk_04); @@ -755,7 +755,7 @@ void sub_0200BF74 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BFAC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BFAC (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 386, param0->unk_04); @@ -766,7 +766,7 @@ void sub_0200BFAC (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200BFE4 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200BFE4 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 387, param0->unk_04); @@ -777,7 +777,7 @@ void sub_0200BFE4 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C01C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C01C (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 388, param0->unk_04); @@ -788,7 +788,7 @@ void sub_0200C01C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C054 (UnkStruct_0200B358 * param0, SaveData * param1, int param2, int param3, int param4) +void sub_0200C054 (StringFormatter * param0, SaveData * param1, int param2, int param3, int param4) { int v0, v1; Strbuf* v2; @@ -803,7 +803,7 @@ void sub_0200C054 (UnkStruct_0200B358 * param0, SaveData * param1, int param2, i Strbuf_Free(v2); } -void sub_0200C0B0 (UnkStruct_0200B358 * param0, u32 param1, UnkEnum_ov66_022324D0 param2) +void sub_0200C0B0 (StringFormatter * param0, u32 param1, UnkEnum_ov66_022324D0 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 651, param0->unk_04); @@ -814,7 +814,7 @@ void sub_0200C0B0 (UnkStruct_0200B358 * param0, u32 param1, UnkEnum_ov66_022324D } } -void sub_0200C0E8 (UnkStruct_0200B358 * param0, u32 param1, int param2) +void sub_0200C0E8 (StringFormatter * param0, u32 param1, int param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 649, param0->unk_04); @@ -825,7 +825,7 @@ void sub_0200C0E8 (UnkStruct_0200B358 * param0, u32 param1, int param2) } } -void sub_0200C120 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C120 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 652, param0->unk_04); @@ -836,7 +836,7 @@ void sub_0200C120 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C158 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C158 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 667, param0->unk_04); @@ -847,7 +847,7 @@ void sub_0200C158 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C190 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C190 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 663, param0->unk_04); @@ -858,7 +858,7 @@ void sub_0200C190 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C1C8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C1C8 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 664, param0->unk_04); @@ -869,7 +869,7 @@ void sub_0200C1C8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C200 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C200 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 666, param0->unk_04); @@ -880,7 +880,7 @@ void sub_0200C200 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C238 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C238 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 665, param0->unk_04); @@ -891,7 +891,7 @@ void sub_0200C238 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C270 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C270 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 668, param0->unk_04); @@ -902,7 +902,7 @@ void sub_0200C270 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C2A8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C2A8 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0; @@ -913,7 +913,7 @@ void sub_0200C2A8 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) MessageLoader_Free(v0); } -void sub_0200C2E0 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C2E0 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 414, param0->unk_04); @@ -928,12 +928,12 @@ void sub_0200C2E0 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C324 (UnkStruct_0200B358 * param0, u32 param1) +void sub_0200C324 (StringFormatter * param0, u32 param1) { Strbuf_UpperChar(param0->unk_08[param1].unk_04, 0); } -void sub_0200C338 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) +void sub_0200C338 (StringFormatter * param0, u32 param1, u32 param2) { MessageLoader * v0 = MessageLoader_Init(1, 26, 361, param0->unk_04); @@ -952,7 +952,7 @@ void sub_0200C338 (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void StringFormatter_Format (const UnkStruct_0200B358 * param0, Strbuf *param1, const Strbuf *param2) +void StringFormatter_Format (const StringFormatter * param0, Strbuf *param1, const Strbuf *param2) { const u16 * v0; u16 * v1; @@ -985,7 +985,7 @@ void StringFormatter_Format (const UnkStruct_0200B358 * param0, Strbuf *param1, } } -void sub_0200C41C (UnkStruct_0200B358 * param0) +void sub_0200C41C (StringFormatter * param0) { u32 v0; diff --git a/src/unk_02012744.c b/src/unk_02012744.c index ddf73f1fcb..3944f212b3 100644 --- a/src/unk_02012744.c +++ b/src/unk_02012744.c @@ -408,7 +408,7 @@ void sub_02012BE0 (FontOAM * param0, const UnkStruct_02012B20 * param1, const Wi sub_02012F98(param2, v1, ¶m1->unk_00, v4, param3); DC_FlushRange(v1, v0); - v2 = sub_02021F98(v3); + v2 = SpriteActor_ImageProxy(v3); if (v4 == NNS_G2D_VRAM_TYPE_2DMAIN) { GX_LoadOBJ(v1, NNS_G2dGetImageLocation(v2, NNS_G2D_VRAM_TYPE_2DMAIN), v0); diff --git a/src/unk_02014A84.c b/src/unk_02014A84.c index 239f9d932f..e375ad7c41 100644 --- a/src/unk_02014A84.c +++ b/src/unk_02014A84.c @@ -91,7 +91,7 @@ void sub_02014AC4 (Sentence * param0, int param1) Strbuf* sub_02014B34 (const Sentence * param0, u32 param1) { Strbuf* v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; MessageLoader * v2; int v3; diff --git a/src/unk_02018340.c b/src/unk_02018340.c index 3390307f56..334e8b6e64 100644 --- a/src/unk_02018340.c +++ b/src/unk_02018340.c @@ -1670,7 +1670,7 @@ void BGL_AddWindow (BGL * param0, Window * param1, u8 param2, u8 param3, u8 para param1->unk_0A_15 = (param0->unk_08[param2].unk_16 == GX_BG_COLORMODE_16) ? UnkEnum_00 : UnkEnum_01; } -void sub_0201A870 (BGL * param0, Window * param1, u8 param2, u8 param3, u16 param4, u8 param5) +void BGL_AddFramelessWindow (BGL * param0, Window * param1, u8 param2, u8 param3, u16 param4, u8 param5) { void * v0; u32 v1; diff --git a/src/unk_0201D670.c b/src/unk_0201D670.c index 94f6f97bc7..73b1d4ef6d 100644 --- a/src/unk_0201D670.c +++ b/src/unk_0201D670.c @@ -147,7 +147,7 @@ u8 sub_0201D78C (Window * param0, u32 param1, const Strbuf *param2, u32 param3, return sub_0201D834(&v0, param5, param7); } -u8 sub_0201D7E0 (Window * param0, u32 param1, const Strbuf *param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, UnkFuncPtr_0201D834 param9) +u8 PrintStringWithColorAndMargins (Window * param0, u32 param1, const Strbuf *param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, UnkFuncPtr_0201D834 param9) { UnkStruct_0201D738 v0; diff --git a/src/unk_020218BC.c b/src/unk_020218BC.c index 4ed066fa51..3145780903 100644 --- a/src/unk_020218BC.c +++ b/src/unk_020218BC.c @@ -616,7 +616,7 @@ void sub_02021F7C (GraphicElementData * param0, const NNSG2dImageProxy * param1) param0->unk_B4 = *param1; } -NNSG2dImageProxy * sub_02021F98 (GraphicElementData * param0) +NNSG2dImageProxy * SpriteActor_ImageProxy (GraphicElementData * param0) { return ¶m0->unk_B4; } diff --git a/src/unk_02039814.c b/src/unk_02039814.c index 159bb3688a..ac489b7131 100644 --- a/src/unk_02039814.c +++ b/src/unk_02039814.c @@ -89,7 +89,7 @@ void sub_02039834 (int param0, int param1, int param2) MessageLoader * v2; Strbuf* v3; Strbuf* v4; - UnkStruct_0200B358 * v5; + StringFormatter * v5; int v6; switch (param1) { diff --git a/src/unk_0203A9C8.c b/src/unk_0203A9C8.c index 78f31443ba..7c9dda2563 100644 --- a/src/unk_0203A9C8.c +++ b/src/unk_0203A9C8.c @@ -531,7 +531,7 @@ static void sub_0203ADFC (UnkStruct_020508D4 * param0) for (v4 = 0; v4 < v5; v4++) { if (v1->unk_30[v4] == 3) { - UnkStruct_0200B358 * v6; + StringFormatter * v6; Strbuf* v7; Strbuf* v8; @@ -644,7 +644,7 @@ static void sub_0203B094 (UnkStruct_020508D4 * param0) UnkStruct_0203CDB0 * v0; UnkStruct_020708E0 * v1; MessageLoader * v2; - UnkStruct_0200B358 * v3; + StringFormatter * v3; Strbuf* v4; Strbuf* v5; u8 v6; diff --git a/src/unk_0203E880.c b/src/unk_0203E880.c index bd4fd6c2e3..726584e946 100644 --- a/src/unk_0203E880.c +++ b/src/unk_0203E880.c @@ -70,7 +70,7 @@ struct UnkStruct_0203EF60_t { UnkStruct_02061AB4 * unk_30; u16 * unk_34; UnkStruct_0203E724 * unk_38[2]; - UnkStruct_0200B358 * unk_40; + StringFormatter * unk_40; Strbuf* unk_44; Strbuf* unk_48; void * unk_4C; diff --git a/src/unk_0203F6C4.c b/src/unk_0203F6C4.c index e4cb24528c..6df950ecb4 100644 --- a/src/unk_0203F6C4.c +++ b/src/unk_0203F6C4.c @@ -2233,7 +2233,7 @@ static BOOL sub_0203FF34 (UnkStruct_0203E724 * param0) u16 v3 = sub_0203E838(param0); u8 v4 = (*((param0)->unk_08++)); u8 v5; - UnkStruct_0200B358 * v6; + StringFormatter * v6; v5 = 0; v6 = sub_0204AEE8(v0->unk_0C, v2, v3, v4, &v5); @@ -2534,7 +2534,7 @@ static BOOL sub_020404A4 (UnkStruct_0203E724 * param0) UnkStruct_0203CDB0 * v0; Strbuf ** v1; Strbuf ** v2; - UnkStruct_0200B358 ** v3; + StringFormatter ** v3; u16 v4; u16 v5; u8 v6; @@ -2624,7 +2624,7 @@ static BOOL sub_020405DC (UnkStruct_0203E724 * param0) u8 * v1 = sub_0203F098(v0, 3); Strbuf ** v2 = sub_0203F098(v0, 17); Strbuf ** v3 = sub_0203F098(v0, 16); - UnkStruct_0200B358 ** v4 = sub_0203F098(v0, 15); + StringFormatter ** v4 = sub_0203F098(v0, 15); u8 v5 = (*((param0)->unk_08++)); u16 v6 = sub_0203E838(param0); @@ -2794,7 +2794,7 @@ static BOOL sub_020408B0 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; UnkStruct_ov5_021DC1A4 ** v1 = sub_0203F098(v0, 0); - UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); + StringFormatter ** v2 = sub_0203F098(v0, 15); u8 v3 = (*((param0)->unk_08++)); u8 v4 = (*((param0)->unk_08++)); u8 v5 = (*((param0)->unk_08++)); @@ -2811,7 +2811,7 @@ static BOOL sub_02040938 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; UnkStruct_ov5_021DC1A4 ** v1 = sub_0203F098(v0, 0); - UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); + StringFormatter ** v2 = sub_0203F098(v0, 15); u8 v3 = (*((param0)->unk_08++)); u8 v4 = (*((param0)->unk_08++)); u8 v5 = (*((param0)->unk_08++)); @@ -2907,7 +2907,7 @@ static BOOL sub_02040AE8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; UnkStruct_ov5_021DC1A4 ** v1 = sub_0203F098(v0, 0); - UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); + StringFormatter ** v2 = sub_0203F098(v0, 15); u8 v3 = (*((param0)->unk_08++)); u8 v4 = (*((param0)->unk_08++)); u8 v5 = (*((param0)->unk_08++)); @@ -2924,7 +2924,7 @@ static BOOL sub_02040B70 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; UnkStruct_ov5_021DC1A4 ** v1 = sub_0203F098(v0, 0); - UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); + StringFormatter ** v2 = sub_0203F098(v0, 15); u8 v3 = (*((param0)->unk_08++)); u8 v4 = (*((param0)->unk_08++)); u8 v5 = (*((param0)->unk_08++)); @@ -4191,7 +4191,7 @@ static BOOL sub_02041FF8 (UnkStruct_0203E724 * param0) static BOOL sub_02042028 (UnkStruct_0203E724 * param0) { u16 v0 = sub_0203E838(param0); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); ov5_021DB888(param0->unk_28, *v1, sub_0203F118(param0->unk_34, v0)); return 1; @@ -4665,7 +4665,7 @@ static BOOL sub_02042868 (UnkStruct_0203E724 * param0) static BOOL sub_020428D4 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v0 = sub_0203F098(param0->unk_34, 15); u16 v1 = inline_02049538(param0); u16 v2 = inline_02049538(param0); @@ -5086,7 +5086,7 @@ static BOOL sub_02043100 (UnkStruct_0203E724 * param0) static BOOL sub_02043130 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u8 v3 = (*((param0)->unk_08++)); u16 * v4 = inline_0204FCAC(param0); @@ -5366,7 +5366,7 @@ static BOOL sub_02043694 (UnkStruct_0203E724 * param0) static BOOL sub_020436A0 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u16 * v2 = inline_0204FCAC(param0); *v2 = sub_0205BC50(*v1); @@ -5377,7 +5377,7 @@ static BOOL sub_020436D0 (UnkStruct_0203E724 * param0) { u16 * v0 = inline_0204FCAC(param0); UnkStruct_0203CDB0 * v1 = param0->unk_34; - UnkStruct_0200B358 ** v2 = sub_0203F098(v1, 15); + StringFormatter ** v2 = sub_0203F098(v1, 15); *v0 = sub_0205BF44(param0->unk_34->unk_7C, *v2); return 0; @@ -5403,7 +5403,7 @@ static BOOL sub_02043708 (UnkStruct_0203E724 * param0) static BOOL sub_02043748 (UnkStruct_0203E724 * param0) { UnkStruct_02061AB4 ** v0 = sub_0203F098(param0->unk_34, 10); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = sub_0203E838(param0); TrainerInfo * v3 = sub_02025E38(sub_0203D174(param0->unk_34)); UnkStruct_02014EC4 * v4 = sub_02014EC4(sub_0203D174(param0->unk_34)); @@ -5446,7 +5446,7 @@ static BOOL sub_020437FC (UnkStruct_0203E724 * param0) UnkStruct_02061AB4 ** v0 = sub_0203F098(param0->unk_34, 10); u16 v1 = sub_0203E838(param0); u16 * v2 = inline_0204FCAC(param0); - UnkStruct_0200B358 ** v3 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v3 = sub_0203F098(param0->unk_34, 15); *v2 = sub_0205BCF4(param0->unk_34->unk_7C, sub_02062910(*v0), v1, *v3); return 0; @@ -5616,7 +5616,7 @@ static BOOL sub_02043A94 (UnkStruct_0203E724 * param0) static BOOL sub_02043AA4 (UnkStruct_0203E724 * param0) { TrainerInfo * v0 = sub_02025E38(sub_0203D174(param0->unk_34)); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); sub_0205C980(TrainerInfo_ID(v0), TrainerInfo_Gender(v0), *v1); return 0; @@ -7228,7 +7228,7 @@ static BOOL sub_02045720 (UnkStruct_0203E724 * param0) static BOOL sub_02045760 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v0 = sub_0203F098(param0->unk_34, 15); u8 v1 = (*((param0)->unk_08++)); u16 v2 = inline_02049538(param0); @@ -7299,7 +7299,7 @@ static BOOL sub_02045860 (UnkStruct_0203E724 * param0) u32 v1; u16 * v2 = inline_0204FCAC(param0); u16 v3 = inline_02049538(param0); - UnkStruct_0200B358 ** v4 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v4 = sub_0203F098(param0->unk_34, 15); v0 = sub_02014EC4(param0->unk_34->unk_0C); v1 = sub_02014EE4(v0); @@ -7760,7 +7760,7 @@ static BOOL sub_02045F48 (UnkStruct_0203E724 * param0) u16 v3 = inline_02049538(param0); u16 v4 = inline_02049538(param0); u16 v5 = inline_02049538(param0); - UnkStruct_0200B358 * v6 = sub_0200B358(32); + StringFormatter * v6 = sub_0200B358(32); MessageLoader * v7 = MessageLoader_Init(0, 26, 372, 32); Strbuf* v8; Strbuf* v9; @@ -7797,7 +7797,7 @@ static BOOL sub_02046050 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; u16 * v1 = inline_0204FCAC(param0); - UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); + StringFormatter ** v2 = sub_0203F098(v0, 15); *v1 = sub_0205BC50(*v2); return 0; diff --git a/src/unk_02046C7C.c b/src/unk_02046C7C.c index d8a271781a..b8d653a7aa 100644 --- a/src/unk_02046C7C.c +++ b/src/unk_02046C7C.c @@ -146,7 +146,7 @@ BOOL sub_02046E14 (UnkStruct_0203E724 * param0) BOOL sub_02046E60 (UnkStruct_0203E724 * param0) { void ** v0 = sub_0203F098(param0->unk_34, 20); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = inline_02049538(param0); u16 v3 = inline_02049538(param0); @@ -158,7 +158,7 @@ BOOL sub_02046E60 (UnkStruct_0203E724 * param0) BOOL sub_02046EB4 (UnkStruct_0203E724 * param0) { void ** v0 = sub_0203F098(param0->unk_34, 20); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = inline_02049538(param0); u16 v3 = inline_02049538(param0); @@ -170,7 +170,7 @@ BOOL sub_02046EB4 (UnkStruct_0203E724 * param0) BOOL sub_02046F08 (UnkStruct_0203E724 * param0) { void ** v0 = sub_0203F098(param0->unk_34, 20); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = inline_02049538(param0); u16 v3 = inline_02049538(param0); @@ -182,7 +182,7 @@ BOOL sub_02046F08 (UnkStruct_0203E724 * param0) BOOL sub_02046F5C (UnkStruct_0203E724 * param0) { void ** v0 = sub_0203F098(param0->unk_34, 20); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = inline_02049538(param0); u16 v3 = inline_02049538(param0); @@ -217,7 +217,7 @@ BOOL sub_02046FF0 (UnkStruct_0203E724 * param0) BOOL sub_0204700C (UnkStruct_0203E724 * param0) { void ** v0 = sub_0203F098(param0->unk_34, 20); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = inline_02049538(param0); sub_020946A4(*v0, *v1, v2); @@ -227,7 +227,7 @@ BOOL sub_0204700C (UnkStruct_0203E724 * param0) BOOL sub_02047048 (UnkStruct_0203E724 * param0) { void ** v0 = sub_0203F098(param0->unk_34, 20); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = inline_02049538(param0); sub_020946CC(*v0, *v1, v2); @@ -237,7 +237,7 @@ BOOL sub_02047048 (UnkStruct_0203E724 * param0) BOOL sub_02047084 (UnkStruct_0203E724 * param0) { void ** v0 = sub_0203F098(param0->unk_34, 20); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = inline_02049538(param0); sub_020946F0(*v0, *v1, v2); @@ -256,7 +256,7 @@ BOOL sub_020470C0 (UnkStruct_0203E724 * param0) BOOL sub_020470F0 (UnkStruct_0203E724 * param0) { void ** v0 = sub_0203F098(param0->unk_34, 20); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = inline_02049538(param0); sub_02094720(*v0, *v1, v2); @@ -343,7 +343,7 @@ BOOL sub_020472E8 (UnkStruct_0203E724 * param0) BOOL sub_02047318 (UnkStruct_0203E724 * param0) { void ** v0 = sub_0203F098(param0->unk_34, 20); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u16 v2 = inline_02049538(param0); sub_02094898(*v0, *v1, v2, 11); diff --git a/src/unk_020474B8.c b/src/unk_020474B8.c index d42a4124f3..ec446a8796 100644 --- a/src/unk_020474B8.c +++ b/src/unk_020474B8.c @@ -44,7 +44,7 @@ static Strbuf* sub_02047998(u16 param0, u32 param1); BOOL sub_020474B8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u8 v3 = inline_02049538(param0); @@ -55,7 +55,7 @@ BOOL sub_020474B8 (UnkStruct_0203E724 * param0) BOOL sub_020474F4 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); sub_0200B498(*v1, v2, sub_02025E38(sub_0203D174(v0))); @@ -65,7 +65,7 @@ BOOL sub_020474F4 (UnkStruct_0203E724 * param0) BOOL sub_02047528 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); sub_0200B4BC(*v1, v2, v0->unk_0C); @@ -75,7 +75,7 @@ BOOL sub_02047528 (UnkStruct_0203E724 * param0) BOOL sub_0204754C (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); sub_0200B4E4(*v1, v2, v0->unk_0C); @@ -86,7 +86,7 @@ BOOL sub_02047570 (UnkStruct_0203E724 * param0) { Pokemon * v0; UnkStruct_0203CDB0 * v1 = param0->unk_34; - UnkStruct_0200B358 ** v2 = sub_0203F098(v1, 15); + StringFormatter ** v2 = sub_0203F098(v1, 15); u8 v3 = (*((param0)->unk_08++)); u16 v4 = inline_02049538(param0); @@ -99,7 +99,7 @@ BOOL sub_02047570 (UnkStruct_0203E724 * param0) BOOL sub_020475B8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -110,7 +110,7 @@ BOOL sub_020475B8 (UnkStruct_0203E724 * param0) BOOL sub_020475F0 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -121,7 +121,7 @@ BOOL sub_020475F0 (UnkStruct_0203E724 * param0) BOOL sub_02047628 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -133,7 +133,7 @@ BOOL sub_02047628 (UnkStruct_0203E724 * param0) BOOL sub_02047660 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); u16 v4; @@ -147,7 +147,7 @@ BOOL sub_02047660 (UnkStruct_0203E724 * param0) BOOL sub_0204769C (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -158,7 +158,7 @@ BOOL sub_0204769C (UnkStruct_0203E724 * param0) BOOL sub_020476D4 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -169,7 +169,7 @@ BOOL sub_020476D4 (UnkStruct_0203E724 * param0) BOOL sub_0204771C (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); u8 v4 = (*((param0)->unk_08++)); @@ -186,7 +186,7 @@ BOOL sub_0204771C (UnkStruct_0203E724 * param0) BOOL sub_0204777C (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u32 v3 = sub_0203E850(param0); u8 v4 = (*((param0)->unk_08++)); @@ -204,12 +204,12 @@ BOOL sub_020477D0 (UnkStruct_0203E724 * param0) { Pokemon * v0; UnkStruct_0203CDB0 * v1 = param0->unk_34; - UnkStruct_0200B358 ** v2 = sub_0203F098(v1, 15); + StringFormatter ** v2 = sub_0203F098(v1, 15); u8 v3 = (*((param0)->unk_08++)); u16 v4 = inline_02049538(param0); v0 = Party_GetPokemonBySlotIndex(Party_GetFromSavedata(v1->unk_0C), v4); - sub_0200B5CC(*v2, v3, (BoxPokemon *)v0); + StringFormatter_BufferNickname(*v2, v3, (BoxPokemon *)v0); return 0; } @@ -219,7 +219,7 @@ BOOL sub_02047818 (UnkStruct_0203E724 * param0) BoxPokemon * v0; UnkStruct_0203CDB0 * v1 = param0->unk_34; PCBoxes * v2 = SaveData_PCBoxes(v1->unk_0C); - UnkStruct_0200B358 ** v3 = sub_0203F098(v1, 15); + StringFormatter ** v3 = sub_0203F098(v1, 15); u8 v4 = (*((param0)->unk_08++)); u16 v5 = inline_02049538(param0); u32 v6, v7; @@ -228,7 +228,7 @@ BOOL sub_02047818 (UnkStruct_0203E724 * param0) v7 = v5 / (5 * 6); v0 = sub_02079C9C(v2, v7, v6); - sub_0200B5CC(*v3, v4, v0); + StringFormatter_BufferNickname(*v3, v4, v0); return 0; } @@ -236,7 +236,7 @@ BOOL sub_02047874 (UnkStruct_0203E724 * param0) { Pokemon * v0; UnkStruct_0203CDB0 * v1 = param0->unk_34; - UnkStruct_0200B358 ** v2 = sub_0203F098(v1, 15); + StringFormatter ** v2 = sub_0203F098(v1, 15); u8 v3 = (*((param0)->unk_08++)); u16 v4 = inline_02049538(param0); @@ -247,7 +247,7 @@ BOOL sub_02047874 (UnkStruct_0203E724 * param0) BOOL sub_020478AC (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -260,7 +260,7 @@ BOOL sub_020478E4 (UnkStruct_0203E724 * param0) int v0; UnkStruct_0203CDB0 * v1 = param0->unk_34; TrainerInfo * v2 = sub_02025E38(sub_0203D174(param0->unk_34)); - UnkStruct_0200B358 ** v3 = sub_0203F098(v1, 15); + StringFormatter ** v3 = sub_0203F098(v1, 15); u8 v4 = (*((param0)->unk_08++)); v0 = sub_0205CA14(TrainerInfo_Gender(v2), TrainerInfo_Appearance(v2), 2); @@ -272,7 +272,7 @@ BOOL sub_020478E4 (UnkStruct_0203E724 * param0) BOOL sub_02047930 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); u16 v4 = sub_0203E838(param0); @@ -299,7 +299,7 @@ static Strbuf* sub_02047998 (u16 param0, u32 param1) BOOL sub_020479C0 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v0 = sub_0203F098(param0->unk_34, 15); u8 v1 = (*((param0)->unk_08++)); u16 v2 = sub_0206B054(sub_020507E4(param0->unk_34->unk_0C)); Strbuf* v3 = sub_02047998(v2, 4); @@ -312,7 +312,7 @@ BOOL sub_020479C0 (UnkStruct_0203E724 * param0) BOOL sub_02047A10 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v0 = sub_0203F098(param0->unk_34, 15); u8 v1 = (*((param0)->unk_08++)); u16 v2 = sub_0206B064(sub_020507E4(param0->unk_34->unk_0C)); Strbuf* v3 = sub_02047998(v2, 4); @@ -325,7 +325,7 @@ BOOL sub_02047A10 (UnkStruct_0203E724 * param0) BOOL sub_02047A60 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v0 = sub_0203F098(param0->unk_34, 15); u8 v1 = (*((param0)->unk_08++)); u16 v2 = sub_0206B08C(sub_020507E4(param0->unk_34->unk_0C)); Strbuf* v3 = sub_02047998(v2, 4); @@ -339,7 +339,7 @@ BOOL sub_02047A60 (UnkStruct_0203E724 * param0) BOOL sub_02047AB0 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -350,7 +350,7 @@ BOOL sub_02047AB0 (UnkStruct_0203E724 * param0) BOOL sub_02047AE8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -361,7 +361,7 @@ BOOL sub_02047AE8 (UnkStruct_0203E724 * param0) BOOL sub_02047B20 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -372,7 +372,7 @@ BOOL sub_02047B20 (UnkStruct_0203E724 * param0) BOOL sub_02047B58 (UnkStruct_0203E724 * param0) { Strbuf* v0 = Strbuf_Init(22, 4); - UnkStruct_0200B358 ** v1 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v1 = sub_0203F098(param0->unk_34, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -385,7 +385,7 @@ BOOL sub_02047B58 (UnkStruct_0203E724 * param0) BOOL sub_02047BB8 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v0 = sub_0203F098(param0->unk_34, 15); u8 v1 = (*((param0)->unk_08++)); u16 v2 = inline_02049538(param0); u16 v3 = inline_02049538(param0); @@ -399,7 +399,7 @@ BOOL sub_02047BB8 (UnkStruct_0203E724 * param0) BOOL sub_02047C30 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v0 = sub_0203F098(param0->unk_34, 15); u8 v1 = (*((param0)->unk_08++)); u16 v2 = inline_02049538(param0); @@ -410,7 +410,7 @@ BOOL sub_02047C30 (UnkStruct_0203E724 * param0) BOOL sub_02047C68 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -422,7 +422,7 @@ BOOL sub_02047CA0 (UnkStruct_0203E724 * param0) { Strbuf* v0; UnkStruct_0203CDB0 * v1 = param0->unk_34; - UnkStruct_0200B358 ** v2 = sub_0203F098(v1, 15); + StringFormatter ** v2 = sub_0203F098(v1, 15); u8 v3 = (*((param0)->unk_08++)); v0 = Strbuf_Init(10 + 1, 11); @@ -438,7 +438,7 @@ BOOL sub_02047D00 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; Pokemon * v1; - UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); + StringFormatter ** v2 = sub_0203F098(v0, 15); u8 v3 = (*((param0)->unk_08++)); u16 v4 = inline_02049538(param0); u16 v5 = inline_02049538(param0); @@ -454,7 +454,7 @@ BOOL sub_02047D00 (UnkStruct_0203E724 * param0) BOOL sub_02047D68 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); u16 v4; @@ -468,7 +468,7 @@ BOOL sub_02047D68 (UnkStruct_0203E724 * param0) BOOL sub_02047DAC (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -481,7 +481,7 @@ BOOL sub_02047DAC (UnkStruct_0203E724 * param0) BOOL sub_02047DE8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -492,7 +492,7 @@ BOOL sub_02047DE8 (UnkStruct_0203E724 * param0) BOOL sub_02047E20 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -503,7 +503,7 @@ BOOL sub_02047E20 (UnkStruct_0203E724 * param0) BOOL sub_02047E58 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -514,7 +514,7 @@ BOOL sub_02047E58 (UnkStruct_0203E724 * param0) BOOL sub_02047E90 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -525,7 +525,7 @@ BOOL sub_02047E90 (UnkStruct_0203E724 * param0) BOOL sub_02047EC8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -536,7 +536,7 @@ BOOL sub_02047EC8 (UnkStruct_0203E724 * param0) BOOL sub_02047F00 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -547,7 +547,7 @@ BOOL sub_02047F00 (UnkStruct_0203E724 * param0) BOOL sub_02047F38 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); u16 v4 = sub_0203E838(param0); @@ -559,7 +559,7 @@ BOOL sub_02047F38 (UnkStruct_0203E724 * param0) BOOL sub_02047F80 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v0 = sub_0203F098(param0->unk_34, 15); u8 v1 = (*((param0)->unk_08++)); u16 v2 = sub_0206B08C(sub_020507E4(param0->unk_34->unk_0C)); @@ -570,7 +570,7 @@ BOOL sub_02047F80 (UnkStruct_0203E724 * param0) BOOL sub_02047FB4 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -581,7 +581,7 @@ BOOL sub_02047FB4 (UnkStruct_0203E724 * param0) BOOL sub_02047FEC (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -592,7 +592,7 @@ BOOL sub_02047FEC (UnkStruct_0203E724 * param0) BOOL sub_02048024 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u16 v3 = inline_02049538(param0); @@ -605,7 +605,7 @@ BOOL sub_02048024 (UnkStruct_0203E724 * param0) BOOL sub_02048060 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); sub_0200C324(*v1, v2); @@ -615,7 +615,7 @@ BOOL sub_02048060 (UnkStruct_0203E724 * param0) BOOL sub_02048080 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_0200B358 ** v1 = sub_0203F098(v0, 15); + StringFormatter ** v1 = sub_0203F098(v0, 15); u8 v2 = (*((param0)->unk_08++)); u8 v3 = (*((param0)->unk_08++)); diff --git a/src/unk_02048BD0.c b/src/unk_02048BD0.c index 57b5cf43ea..b192152b72 100644 --- a/src/unk_02048BD0.c +++ b/src/unk_02048BD0.c @@ -26,7 +26,7 @@ BOOL sub_02048BD0 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v0 = sub_0203F098(param0->unk_34, 15); UnkStruct_0202B4A0 * v1 = sub_0202B4A0(param0->unk_34->unk_0C); SaveData * v2 = param0->unk_34->unk_0C; diff --git a/src/unk_02048DD8.c b/src/unk_02048DD8.c index a245752f49..f44a766314 100644 --- a/src/unk_02048DD8.c +++ b/src/unk_02048DD8.c @@ -44,7 +44,7 @@ #include "overlay025/ov25_02253CE0.h" typedef void (* UnkFuncPtr_020EBB48)(UnkStruct_0203CDB0 *, u16); -typedef void (* UnkFuncPtr_020EBB48_1)(UnkStruct_0203CDB0 *, UnkStruct_0200B358 *); +typedef void (* UnkFuncPtr_020EBB48_1)(UnkStruct_0203CDB0 *, StringFormatter *); typedef BOOL (* UnkFuncPtr_020EBB48_2)(UnkStruct_0203CDB0 *); typedef struct { @@ -54,7 +54,7 @@ typedef struct { u32 unk_0C; } UnkStruct_020EBB48; -static int sub_020491D0(int param0, UnkStruct_0203CDB0 * param1, UnkStruct_0200B358 * param2); +static int sub_020491D0(int param0, UnkStruct_0203CDB0 * param1, StringFormatter * param2); static void sub_020491B8(UnkStruct_0203CDB0 * param0, int param1, u16 param2, u16 param3); static BOOL sub_020491F4(UnkStruct_0203CDB0 * param0, int param1); BOOL sub_020493C8(UnkStruct_0203E724 * param0); @@ -82,7 +82,7 @@ BOOL sub_02048DD8 (UnkStruct_0203E724 * param0) break; case 3: { - UnkStruct_0200B358 ** v4 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v4 = sub_0203F098(param0->unk_34, 15); u16 v5 = inline_02049538(param0); u16 * v6 = inline_0204FCAC(param0); u16 * v7 = inline_0204FCAC(param0); @@ -161,7 +161,7 @@ static const UnkStruct_020EBB48 Unk_020EBB48[19]; BOOL sub_02049018 (UnkStruct_0203E724 * param0) { - UnkStruct_0200B358 ** v0; + StringFormatter ** v0; v0 = sub_0203F098(param0->unk_34, 15); @@ -245,7 +245,7 @@ static void sub_020491B8 (UnkStruct_0203CDB0 * param0, int param1, u16 param2, u } } -static int sub_020491D0 (int param0, UnkStruct_0203CDB0 * param1, UnkStruct_0200B358 * param2) +static int sub_020491D0 (int param0, UnkStruct_0203CDB0 * param1, StringFormatter * param2) { UnkFuncPtr_020EBB48_1 v0; @@ -276,7 +276,7 @@ static BOOL sub_020491F4 (UnkStruct_0203CDB0 * param0, int param1) return v0(param0); } -static void sub_0204922C (UnkStruct_0200B358 * param0, int param1, const u16 * param2, int param3, int param4, int param5) +static void sub_0204922C (StringFormatter * param0, int param1, const u16 * param2, int param3, int param4, int param5) { Strbuf* v0 = Strbuf_Init(64, 4); @@ -285,7 +285,7 @@ static void sub_0204922C (UnkStruct_0200B358 * param0, int param1, const u16 * p Strbuf_Free(v0); } -static void sub_02049268 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1) +static void sub_02049268 (UnkStruct_0203CDB0 * param0, StringFormatter * param1) { Party * v0 = Party_GetFromSavedata(param0->unk_0C); Pokemon * v1 = sub_02054A74(v0); @@ -293,7 +293,7 @@ static void sub_02049268 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * para sub_0200B538(param1, 0, Pokemon_GetBoxPokemon(v1)); } -static void sub_02049288 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1) +static void sub_02049288 (UnkStruct_0203CDB0 * param0, StringFormatter * param1) { int v0; @@ -301,7 +301,7 @@ static void sub_02049288 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * para sub_0200B928(param1, 0, v0); } -static void sub_020492A0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1) +static void sub_020492A0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1) { u16 v0[10 + 1]; TVBroadcast * v1 = SaveData_TVBroadcast(param0->unk_0C); @@ -311,7 +311,7 @@ static void sub_020492A0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * para sub_0204922C(param1, 0, v0, 0, GAME_LANGUAGE, 1); } -static void sub_020492D4 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1) +static void sub_020492D4 (UnkStruct_0203CDB0 * param0, StringFormatter * param1) { u16 v0[10 + 1]; TVBroadcast * v1 = SaveData_TVBroadcast(param0->unk_0C); @@ -321,7 +321,7 @@ static void sub_020492D4 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * para sub_0204922C(param1, 0, v0, 0, GAME_LANGUAGE, 1); } -static void sub_02049308 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1) +static void sub_02049308 (UnkStruct_0203CDB0 * param0, StringFormatter * param1) { Strbuf* v0; TVBroadcast * v1 = SaveData_TVBroadcast(param0->unk_0C); diff --git a/src/unk_0204AEE8.c b/src/unk_0204AEE8.c index 31c81af3d7..384cdbf0fd 100644 --- a/src/unk_0204AEE8.c +++ b/src/unk_0204AEE8.c @@ -106,13 +106,13 @@ static const u16 Unk_020EBD98[][2] = { {0x16, 0x47} }; -UnkStruct_0200B358 * sub_0204AEE8 (SaveData * param0, u16 param1, u16 param2, u8 param3, u8 * param4) +StringFormatter * sub_0204AEE8 (SaveData * param0, u16 param1, u16 param2, u8 param3, u8 * param4) { u8 v0; u16 v1; Strbuf* v2, * v3; PokedexData * v4; - UnkStruct_0200B358 * v5; + StringFormatter * v5; MessageLoader * v6; v2 = Strbuf_Init(12 + 2, 4); diff --git a/src/unk_0204B830.c b/src/unk_0204B830.c index 14412e9ab5..07a6a994db 100644 --- a/src/unk_0204B830.c +++ b/src/unk_0204B830.c @@ -48,7 +48,7 @@ typedef struct { UnkStruct_0203CDB0 * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; void * unk_08; } UnkStruct_0204B830; @@ -66,7 +66,7 @@ typedef struct { static const UnkStruct_020EBE94 Unk_020EBE94[13]; -static void sub_0204B830 (UnkStruct_0204B830 * param0, UnkStruct_0203CDB0 * param1, UnkStruct_0200B358 * param2, void * param3) +static void sub_0204B830 (UnkStruct_0204B830 * param0, UnkStruct_0203CDB0 * param1, StringFormatter * param2, void * param3) { param0->unk_00 = param1; param0->unk_04 = param2; @@ -137,7 +137,7 @@ BOOL sub_0204B85C (UnkStruct_0203E724 * param0) { UnkStruct_0204B830 v5; const UnkStruct_020EBE94 * v6 = &Unk_020EBE94[sub_0204B838(param0->unk_34) - 1]; - UnkStruct_0200B358 ** v7 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v7 = sub_0203F098(param0->unk_34, 15); u16 * v8 = inline_0204FCAC(param0); u16 * v9 = inline_0204FCAC(param0); @@ -149,7 +149,7 @@ BOOL sub_0204B85C (UnkStruct_0203E724 * param0) { UnkStruct_0204B830 v10; const UnkStruct_020EBE94 * v11 = &Unk_020EBE94[sub_0204B838(param0->unk_34) - 1]; - UnkStruct_0200B358 ** v12 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v12 = sub_0203F098(param0->unk_34, 15); u16 * v13 = inline_0204FCAC(param0); u16 * v14 = inline_0204FCAC(param0); diff --git a/src/unk_0204CA84.c b/src/unk_0204CA84.c index 6ba988a87b..4e5efa2ff7 100644 --- a/src/unk_0204CA84.c +++ b/src/unk_0204CA84.c @@ -27,7 +27,7 @@ BOOL sub_0204CA84 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; SaveData * v1 = v0->unk_0C; - UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); + StringFormatter ** v2 = sub_0203F098(v0, 15); ov5_021E72BC(sub_02026310(v1), *v2); @@ -77,7 +77,7 @@ BOOL sub_0204CB20 (UnkStruct_0203E724 * param0) UnkStruct_0203CDB0 * v0 = param0->unk_34; UnkStruct_02026310 * v1; Party * v2; - UnkStruct_0200B358 ** v3 = sub_0203F098(v0, 15); + StringFormatter ** v3 = sub_0203F098(v0, 15); SaveData * v4 = v0->unk_0C; u16 * v5 = inline_0204FCAC(param0); u8 v6 = inline_02049538(param0); @@ -93,7 +93,7 @@ BOOL sub_0204CB80 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; UnkStruct_02026310 * v1; - UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); + StringFormatter ** v2 = sub_0203F098(v0, 15); SaveData * v3 = v0->unk_0C; u16 * v4 = inline_0204FCAC(param0); u8 v5 = inline_02049538(param0); @@ -109,7 +109,7 @@ BOOL sub_0204CBD4 (UnkStruct_0203E724 * param0) UnkStruct_0203CDB0 * v0 = param0->unk_34; SaveData * v1 = v0->unk_0C; UnkStruct_02026310 * v2; - UnkStruct_0200B358 ** v3 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v3 = sub_0203F098(param0->unk_34, 15); u16 * v4 = inline_0204FCAC(param0); u16 v5 = inline_02049538(param0); @@ -123,7 +123,7 @@ BOOL sub_0204CC24 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; Party * v1; - UnkStruct_0200B358 ** v2 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v2 = sub_0203F098(param0->unk_34, 15); u16 v3 = sub_0203E838(param0); u16 v4 = inline_02049538(param0); u16 * v5 = inline_0204FCAC(param0); @@ -154,7 +154,7 @@ BOOL sub_0204CCB8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; SaveData * v1 = v0->unk_0C; - UnkStruct_0200B358 ** v2 = sub_0203F098(param0->unk_34, 15); + StringFormatter ** v2 = sub_0203F098(param0->unk_34, 15); u8 v3 = inline_02049538(param0); u8 v4 = inline_02049538(param0); u8 v5 = inline_02049538(param0); diff --git a/src/unk_0204F13C.c b/src/unk_0204F13C.c index 7782c29ad5..eb795ec917 100644 --- a/src/unk_0204F13C.c +++ b/src/unk_0204F13C.c @@ -533,7 +533,7 @@ BOOL sub_0204F6D8 (UnkStruct_0203E724 * param0) u32 v4, v5, v6; u16 v7, v8; UnkStruct_0203CDB0 * v9 = param0->unk_34; - UnkStruct_0200B358 ** v10 = sub_0203F098(v9, 15); + StringFormatter ** v10 = sub_0203F098(v9, 15); u8 v11 = (*((param0)->unk_08++)); u8 v12 = (*((param0)->unk_08++)); u8 v13 = (*((param0)->unk_08++)); diff --git a/src/unk_020528D0.c b/src/unk_020528D0.c index 76076ac607..266e411621 100644 --- a/src/unk_020528D0.c +++ b/src/unk_020528D0.c @@ -51,7 +51,7 @@ typedef struct { BGL * unk_08; Window unk_0C; MessageLoader * unk_1C; - UnkStruct_0200B358 * unk_20; + StringFormatter * unk_20; } UnkStruct_02052AA4; static void sub_02052914(UnkStruct_0203CDB0 * param0, UnkStruct_020508D4 * param1); diff --git a/src/unk_02052C6C.c b/src/unk_02052C6C.c index dd75167b57..6495fe1e86 100644 --- a/src/unk_02052C6C.c +++ b/src/unk_02052C6C.c @@ -305,7 +305,7 @@ static void sub_02053028 (UnkStruct_0203CDB0 * param0, UnkStruct_0205300C * para MessageLoader * v0 = MessageLoader_Init(1, 26, 213, 4); if (param2 == 2) { - UnkStruct_0200B358 * v1; + StringFormatter * v1; v1 = sub_0200B358(4); sub_0200B498(v1, 0, sub_02025E38(param0->unk_0C)); diff --git a/src/unk_0205A0D8.c b/src/unk_0205A0D8.c index 6664c40183..0be73419c6 100644 --- a/src/unk_0205A0D8.c +++ b/src/unk_0205A0D8.c @@ -65,7 +65,7 @@ typedef struct { Strbuf* unk_10; Window unk_14; UnkStruct_0203CDB0 * unk_24; - UnkStruct_0200B358 * unk_28; + StringFormatter * unk_28; MessageLoader * unk_2C; int unk_30; int unk_34; @@ -101,7 +101,7 @@ typedef struct { Strbuf* unk_00; Strbuf* unk_04; Window unk_08; - UnkStruct_0200B358 * unk_18; + StringFormatter * unk_18; MessageLoader * unk_1C; int unk_20; int unk_24; diff --git a/src/unk_0205B33C.c b/src/unk_0205B33C.c index 11884813dd..153180f17c 100644 --- a/src/unk_0205B33C.c +++ b/src/unk_0205B33C.c @@ -102,7 +102,7 @@ static void sub_0205B694(UnkStruct_0205B43C * param0); static void sub_0205C160(UnkStruct_0205B43C * param0); static int sub_0205B4D4(void); static int sub_0205BAE8(UnkStruct_0205B43C * param0, int param1); -static int sub_0205BCD4(int param0, int param1, UnkStruct_0200B358 * param2); +static int sub_0205BCD4(int param0, int param1, StringFormatter * param2); static void sub_0205B408(UnkStruct_0205B43C * param0); static void sub_0205BFF0(UnkStruct_0205B4F8 * param0); @@ -962,7 +962,7 @@ static int sub_0205BAE8 (UnkStruct_0205B43C * param0, int param1) return 40; } -int sub_0205BC50 (UnkStruct_0200B358 * param0) +int sub_0205BC50 (StringFormatter * param0) { u8 v0, v1; u8 v2, v3; @@ -1003,7 +1003,7 @@ int sub_0205BC50 (UnkStruct_0200B358 * param0) return 15; } -static int sub_0205BCD4 (int param0, int param1, UnkStruct_0200B358 * param2) +static int sub_0205BCD4 (int param0, int param1, StringFormatter * param2) { if (param0 != (1 - 1)) { return Unk_020ED6E8[param0][param1]; @@ -1012,7 +1012,7 @@ static int sub_0205BCD4 (int param0, int param1, UnkStruct_0200B358 * param2) return sub_0205BC50(param2); } -int sub_0205BCF4 (UnkStruct_0205B43C * param0, int param1, int param2, UnkStruct_0200B358 * param3) +int sub_0205BCF4 (UnkStruct_0205B43C * param0, int param1, int param2, StringFormatter * param3) { int v0; TrainerInfo * v1; @@ -1199,7 +1199,7 @@ static const int Unk_020ED720[] = { 0xBC }; -int sub_0205BF44 (UnkStruct_0205B43C * param0, UnkStruct_0200B358 * param1) +int sub_0205BF44 (UnkStruct_0205B43C * param0, StringFormatter * param1) { int v0, v1 = 0, v2; u16 v3; @@ -1270,7 +1270,7 @@ Sentence * sub_0205C028 (UnkStruct_0205B43C * param0) return ¶m0->unk_178; } -void sub_0205C040 (UnkStruct_0200B358 * param0, int param1, int param2, TrainerInfo * param3, UnkStruct_02014EC4 * param4) +void sub_0205C040 (StringFormatter * param0, int param1, int param2, TrainerInfo * param3, UnkStruct_02014EC4 * param4) { TrainerInfo * v0; Strbuf* v1; diff --git a/src/unk_0205C980.c b/src/unk_0205C980.c index 2eb5d8990b..df5677b7fd 100644 --- a/src/unk_0205C980.c +++ b/src/unk_0205C980.c @@ -38,7 +38,7 @@ static const int Unk_020ED770[][4] = { {0x7, 0x4, 0x5, 0x6} }; -void sub_0205C980 (u32 param0, int param1, UnkStruct_0200B358 * param2) +void sub_0205C980 (u32 param0, int param1, StringFormatter * param2) { int v0 = param0 % 8; int v1; diff --git a/src/unk_0206CCB0.c b/src/unk_0206CCB0.c index ef1508f197..72ba3c3392 100644 --- a/src/unk_0206CCB0.c +++ b/src/unk_0206CCB0.c @@ -349,7 +349,7 @@ typedef union { UnkStruct_0206E768 val39; } UnkUnion_0206D1B8; -typedef int (* UnkFuncPtr_0206CD00)(UnkStruct_0203CDB0 *, UnkStruct_0200B358 *, UnkStruct_ov6_022465F4 *); +typedef int (* UnkFuncPtr_0206CD00)(UnkStruct_0203CDB0 *, StringFormatter *, UnkStruct_ov6_022465F4 *); typedef BOOL (* UnkFuncPtr_0206CD2C)(UnkStruct_0203CDB0 *, UnkStruct_ov6_022465F4 *); typedef struct { @@ -399,7 +399,7 @@ static const UnkStruct_020EFFA4 * sub_0206CCDC (const UnkStruct_020EFD60 * param return &(param0->unk_08[v0 - 1]); } -int sub_0206CD00 (int param0, UnkStruct_0203CDB0 * param1, UnkStruct_0200B358 * param2, UnkStruct_ov6_022465F4 * param3, u16 * param4) +int sub_0206CD00 (int param0, UnkStruct_0203CDB0 * param1, StringFormatter * param2, UnkStruct_ov6_022465F4 * param3, u16 * param4) { UnkFuncPtr_0206CD00 v0; const UnkStruct_020EFD60 * v1; @@ -457,7 +457,7 @@ static void sub_0206CD7C (SaveData * param0, int param1, int param2, const void sub_0202E43C(v0, param1, param2, (const u8 *)param3); } -static void sub_0206CD94 (UnkStruct_0200B358 * param0, int param1, const u16 * param2, int param3, int param4, int param5) +static void sub_0206CD94 (StringFormatter * param0, int param1, const u16 * param2, int param3, int param4, int param5) { Strbuf* v0 = Strbuf_Init(64, 4); @@ -466,7 +466,7 @@ static void sub_0206CD94 (UnkStruct_0200B358 * param0, int param1, const u16 * p Strbuf_Free(v0); } -static void sub_0206CDD0 (UnkStruct_0200B358 * param0, int param1, const UnkStruct_ov6_022465F4 * param2) +static void sub_0206CDD0 (StringFormatter * param0, int param1, const UnkStruct_ov6_022465F4 * param2) { sub_0206CD94(param0, param1, ov6_02246494(param2), ov6_0224648C(param2), ov6_02246490(param2), 1); } @@ -488,7 +488,7 @@ static void sub_0206CE38 (Pokemon * param0, u16 * param1, u8 * param2, u8 * para *param4 = Pokemon_GetValue(param0, MON_DATA_MET_GAME, NULL); } -static void sub_0206CE74 (UnkStruct_0200B358 * param0, int param1, u16 param2, u8 param3, u8 param4, u8 param5) +static void sub_0206CE74 (StringFormatter * param0, int param1, u16 param2, u8 param3, u8 param4, u8 param5) { u16 v0[11]; @@ -496,7 +496,7 @@ static void sub_0206CE74 (UnkStruct_0200B358 * param0, int param1, u16 param2, u sub_0206CD94(param0, param1, v0, param3, param4, 1); } -static void sub_0206CEA4 (UnkStruct_0200B358 * param0, int param1, u16 param2) +static void sub_0206CEA4 (StringFormatter * param0, int param1, u16 param2) { u16 v0[11]; @@ -740,7 +740,7 @@ void sub_0206D1B8 (UnkStruct_0203CDB0 * param0, const UnkStruct_0206D140 * param } } -static int sub_0206D230 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D230 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D140 * v0 = ov6_02246498(param2); @@ -760,7 +760,7 @@ static int sub_0206D230 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param } } -static int sub_0206D2E0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D2E0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D140 * v0 = ov6_02246498(param2); @@ -797,7 +797,7 @@ void sub_0206D340 (UnkStruct_0203CDB0 * param0, BOOL param1, u16 param2, Pokemon sub_0206CD70(param0, 2, 3, v1); } -static int sub_0206D374 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D374 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D374 * v0 = (UnkStruct_0206D374 * )ov6_02246498(param2); @@ -846,7 +846,7 @@ void sub_0206D430 (UnkStruct_0203CDB0 * param0) sub_0206D3E4(param0, 4); } -static int sub_0206D43C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D43C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D43C * v0 = (UnkStruct_0206D43C * )ov6_02246498(param2); @@ -856,7 +856,7 @@ static int sub_0206D43C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param return 6; } -static int sub_0206D474 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D474 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D43C * v0 = (UnkStruct_0206D43C * )ov6_02246498(param2); @@ -877,7 +877,7 @@ void sub_0206D4AC (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 2, 6, v1); } -static int sub_0206D4D4 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D4D4 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D4D4 * v0 = (UnkStruct_0206D4D4 *)ov6_02246498(param2); @@ -905,7 +905,7 @@ void sub_0206D504 (SaveData * param0, u16 param1, u8 param2) } } -static int sub_0206D530 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D530 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D530 * v0 = (UnkStruct_0206D530 *)ov6_02246498(param2); @@ -927,7 +927,7 @@ void sub_0206D578 (UnkStruct_0203CDB0 * param0, Pokemon * param1) sub_0206CD70(param0, 2, 8, v1); } -static int sub_0206D5B0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D5B0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D5B0 * v0 = (UnkStruct_0206D5B0 *)ov6_02246498(param2); @@ -954,7 +954,7 @@ void sub_0206D60C (UnkStruct_0203CDB0 * param0, Pokemon * param1) sub_0206CD70(param0, 2, 10, v1); } -static int sub_0206D644 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D644 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D644 * v0 = (UnkStruct_0206D644 *)ov6_02246498(param2); @@ -984,7 +984,7 @@ void sub_0206D6C8 (UnkStruct_0203CDB0 * param0, int param1, int param2) sub_0206CD70(param0, 2, 13, v1); } -static int sub_0206D6E0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D6E0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D6E0 * v0 = (UnkStruct_0206D6E0 *)ov6_02246498(param2); @@ -1015,7 +1015,7 @@ void sub_0206D720 (UnkStruct_0203CDB0 * param0) sub_0206CD70(param0, 2, 15, v1); } -static int sub_0206D75C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D75C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D75C * v0 = (UnkStruct_0206D75C *)ov6_02246498(param2); @@ -1080,7 +1080,7 @@ void sub_0206D7C4 (UnkStruct_0203CDB0 * param0) return; } -static int sub_0206D8B0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D8B0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D8B0 * v0 = (UnkStruct_0206D8B0 *)ov6_02246498(param2); @@ -1129,7 +1129,7 @@ void sub_0206D914 (UnkStruct_0203CDB0 * param0, u16 param1, u8 param2, u16 param } } -static int sub_0206D94C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D94C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D94C * v0 = ov6_02246498(param2); @@ -1140,7 +1140,7 @@ static int sub_0206D94C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param return 30; } -static int sub_0206D98C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D98C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D94C * v0 = ov6_02246498(param2); @@ -1162,7 +1162,7 @@ void sub_0206D9B4 (TVBroadcast * param0, Pokemon * param1, u8 param2) sub_0202E43C(param0, 2, 21, (const u8 *)v1); } -static int sub_0206D9F4 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206D9F4 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206D9F4 * v0 = (UnkStruct_0206D9F4 *)ov6_02246498(param2); @@ -1186,7 +1186,7 @@ static void sub_0206DA6C (UnkStruct_0206DA6C * param0, const TrainerInfo * param TrainerInfo_Copy(param1, (TrainerInfo *)param0->unk_04); } -static void sub_0206DA84 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static void sub_0206DA84 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206DA6C * v0 = (UnkStruct_0206DA6C *)ov6_02246498(param2); TrainerInfo * v1 = (TrainerInfo *)&v0->unk_04; @@ -1215,13 +1215,13 @@ void sub_0206DAD4 (UnkStruct_0203CDB0 * param0, const TrainerInfo * param1) sub_0206CD70(param0, 2, 23, v1); } -static int sub_0206DAF0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DAF0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { sub_0206DA84(param0, param1, param2); return 36; } -static int sub_0206DAFC (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DAFC (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { sub_0206DA84(param0, param1, param2); return 37; @@ -1242,7 +1242,7 @@ void sub_0206DB20 (UnkStruct_0203CDB0 * param0) sub_0206CD70(param0, 2, 25, v1); } -static int sub_0206DB38 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DB38 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { sub_0206CDD0(param1, 0, param2); return 38; @@ -1263,7 +1263,7 @@ void sub_0206DB5C (UnkStruct_0203CDB0 * param0, u8 param1) sub_0206CD70(param0, 2, 26, v1); } -static int sub_0206DB74 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DB74 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206DB74 * v0 = (UnkStruct_0206DB74 *)ov6_02246498(param2); @@ -1291,7 +1291,7 @@ void sub_0206DBB0 (SaveData * param0, u32 param1, Pokemon * param2, BOOL param3) sub_0206CD58(param0, 3, 1, v1); } -static int sub_0206DBE8 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DBE8 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206DBE8 * v0 = (UnkStruct_0206DBE8 *)ov6_02246498(param2); @@ -1327,7 +1327,7 @@ void sub_0206DC6C (UnkStruct_0203CDB0 * param0, u32 param1, Pokemon * param2) sub_0206CD70(param0, 3, 3, v1); } -static int sub_0206DC9C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DC9C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206DC9C * v0 = (UnkStruct_0206DC9C *)ov6_02246498(param2); @@ -1366,7 +1366,7 @@ void sub_0206DD38 (UnkStruct_0203CDB0 * param0, u32 param1, u32 param2, u32 para sub_0206CD70(param0, 3, 4, v1); } -static int sub_0206DD5C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DD5C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206DD5C * v0 = ov6_02246498(param2); @@ -1466,7 +1466,7 @@ static u8 sub_0206DE4C (Pokemon * param0) return v0; } -static int sub_0206DE80 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DE80 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206DE80 * v0 = ov6_02246498(param2); @@ -1499,7 +1499,7 @@ void sub_0206DEEC (UnkStruct_0203CDB0 * param0, u16 param1, u16 param2) sub_0206CD70(param0, 3, 8, v1); } -static int sub_0206DF14 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DF14 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { u16 v0; UnkStruct_0206DF14 * v1 = ov6_02246498(param2); @@ -1533,7 +1533,7 @@ void sub_0206DF60 (UnkStruct_0203CDB0 * param0, u16 param1) } } -static int sub_0206DF88 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206DF88 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { u16 v0; UnkStruct_0206DF88 * v1 = ov6_02246498(param2); @@ -1571,7 +1571,7 @@ void sub_0206DFE0 (SaveData * param0) } } -static int sub_0206E018 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E018 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E018 * v0 = ov6_02246498(param2); @@ -1601,7 +1601,7 @@ void sub_0206E060 (SaveData * param0) } } -static int sub_0206E098 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E098 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E098 * v0 = ov6_02246498(param2); @@ -1630,7 +1630,7 @@ void sub_0206E0E0 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 2, v1); } -static int sub_0206E118 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E118 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E118 * v0 = ov6_02246498(param2); @@ -1665,7 +1665,7 @@ void sub_0206E174 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 4, v1); } -static int sub_0206E1C0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E1C0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E1C0 * v0 = ov6_02246498(param2); @@ -1702,7 +1702,7 @@ void sub_0206E264 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 6, v1); } -static int sub_0206E28C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E28C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E28C * v0 = ov6_02246498(param2); @@ -1727,7 +1727,7 @@ void sub_0206E2BC (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 7, v1); } -static int sub_0206E300 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E300 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E300 * v0 = ov6_02246498(param2); @@ -1768,7 +1768,7 @@ void sub_0206E398 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 9, v1); } -static int sub_0206E3C8 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E3C8 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E3C8 * v0 = ov6_02246498(param2); @@ -1794,7 +1794,7 @@ void sub_0206E414 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 10, v1); } -static int sub_0206E428 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E428 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E428 * v0 = ov6_02246498(param2); @@ -1816,7 +1816,7 @@ void sub_0206E448 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 11, v1); } -static int sub_0206E480 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E480 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E480 * v0 = ov6_02246498(param2); int v1 = v0->unk_00.unk_01; @@ -1853,7 +1853,7 @@ void sub_0206E4DC (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 13, v1); } -static int sub_0206E520 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E520 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E520 * v0 = ov6_02246498(param2); @@ -1890,7 +1890,7 @@ void sub_0206E5A0 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 14, v1); } -static int sub_0206E5E4 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E5E4 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E5E4 * v0 = ov6_02246498(param2); @@ -1921,7 +1921,7 @@ void sub_0206E668 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 15, v1); } -static int sub_0206E680 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E680 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E680 * v0 = ov6_02246498(param2); @@ -1940,7 +1940,7 @@ void sub_0206E6A8 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 16, v1); } -static int sub_0206E6C0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E6C0 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E6C0 * v0 = ov6_02246498(param2); @@ -1959,7 +1959,7 @@ void sub_0206E6E8 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 17, v1); } -static int sub_0206E700 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E700 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E700 * v0 = ov6_02246498(param2); @@ -1978,7 +1978,7 @@ void sub_0206E728 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 18, v1); } -static int sub_0206E740 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E740 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206E740 * v0 = ov6_02246498(param2); @@ -2002,7 +2002,7 @@ void sub_0206E768 (UnkStruct_0203CDB0 * param0, u16 param1) sub_0206CD70(param0, 1, 19, v1); } -static int sub_0206E7AC (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E7AC (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { int v0; UnkStruct_0206E768 * v1 = ov6_02246498(param2); @@ -2062,7 +2062,7 @@ static int sub_0206E848 (UnkStruct_0202B4A0 * param0) return v1; } -static int sub_0206E870 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E870 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { int v0, v1, v2; int v3; @@ -2122,7 +2122,7 @@ static u16 Unk_02100BA4[] = { 0xA5 }; -static int sub_0206E940 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206E940 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { int v0, v1; @@ -2170,7 +2170,7 @@ static BOOL sub_0206EA0C (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * return 1; } -static int sub_0206EA10 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206EA10 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { TrainerInfo * v0 = sub_02025E38(sub_0203D174(param0)); int v1 = param0->unk_1C->unk_00; @@ -2240,7 +2240,7 @@ static int sub_0206EA10 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param return 27; } -static int sub_0206EB94 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206EB94 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { u16 v0, v1; UnkStruct_0202D7B0 * v2 = sub_0202D834(param0->unk_0C); @@ -2544,7 +2544,7 @@ static int sub_0206EBE8 (UnkStruct_0203CDB0 * param0) return v1[inline_020564D0(v3)]; } -static int sub_0206EC90 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206EC90 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_02027854 * v0 = sub_02027854(param0->unk_0C); int v1, v2; @@ -2580,7 +2580,7 @@ static BOOL sub_0206ED10 (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * return 0; } -static int sub_0206ED14 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206ED14 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { u32 v0, v1; u8 v2; @@ -2622,7 +2622,7 @@ static int sub_0206ED14 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param return 44; } -static int sub_0206EDAC (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206EDAC (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_0206C638 * v0; UnkStruct_0202D7B0 * v1; @@ -2682,7 +2682,7 @@ static int sub_0206EE9C (UnkStruct_0202A750 * param0) return v1; } -static int sub_0206EEBC (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206EEBC (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { UnkStruct_02029C68 * v0; int v1, v2, v3, v4; @@ -2737,7 +2737,7 @@ static BOOL sub_0206EF64 (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * } } -static int sub_0206EF7C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206EF7C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { u16 v0; @@ -2756,7 +2756,7 @@ static int sub_0206EF7C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param return 0 + v0; } -static int sub_0206F01C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206F01C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { Strbuf* v0; u16 v1, v2, v3; @@ -2818,7 +2818,7 @@ static BOOL sub_0206F100 (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * } } -static int sub_0206F118 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206F118 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { u16 v0; @@ -2833,7 +2833,7 @@ static int sub_0206F118 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param } } -static int sub_0206F13C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206F13C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { u16 v0; @@ -2848,7 +2848,7 @@ static int sub_0206F13C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param } } -static int sub_0206F160 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206F160 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { Strbuf* v0; u16 v1, v2; @@ -2896,12 +2896,12 @@ static BOOL sub_0206F260 (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * } } -static int sub_0206F278 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206F278 (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { return 18; } -static int sub_0206F27C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206F27C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { return 19; } @@ -2915,7 +2915,7 @@ static BOOL sub_0206F280 (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * } } -static int sub_0206F29C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, UnkStruct_ov6_022465F4 * param2) +static int sub_0206F29C (UnkStruct_0203CDB0 * param0, StringFormatter * param1, UnkStruct_ov6_022465F4 * param2) { u16 v0; diff --git a/src/unk_0206F314.c b/src/unk_0206F314.c index db05adb24d..6dafa66b02 100644 --- a/src/unk_0206F314.c +++ b/src/unk_0206F314.c @@ -51,7 +51,7 @@ typedef struct { MessageLoader * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; Strbuf* unk_08; Strbuf* unk_0C; Strbuf* unk_10; diff --git a/src/unk_020722AC.c b/src/unk_020722AC.c index 1f3c6273c3..0114fed499 100644 --- a/src/unk_020722AC.c +++ b/src/unk_020722AC.c @@ -79,7 +79,7 @@ typedef struct { } UnkStruct_020F0524; typedef struct { - UnkStruct_0200B358 * unk_00; + StringFormatter * unk_00; Strbuf* unk_04; Strbuf* unk_08; Strbuf* unk_0C; diff --git a/src/unk_0207AE68.c b/src/unk_0207AE68.c index d60c54d63f..47c7e8e295 100644 --- a/src/unk_0207AE68.c +++ b/src/unk_0207AE68.c @@ -295,7 +295,7 @@ static void sub_0207B180 (UnkStruct_0207AE68 * param0) } sub_0200590C(param0->unk_60, param0->unk_84, param0->unk_86); - sub_0200B5CC(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); + StringFormatter_BufferNickname(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); if (param0->unk_7C & 0x2) { param0->unk_65 = sub_0207C584(param0, 917); @@ -407,7 +407,7 @@ static void sub_0207B180 (UnkStruct_0207AE68 * param0) Pokemon_SetValue(param0->unk_28, 5, (u8 *)¶m0->unk_62); Pokemon_CalcAbility(param0->unk_28); Pokemon_CalcLevelAndStats(param0->unk_28); - sub_0200B5CC(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); + StringFormatter_BufferNickname(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); sub_0200B538(param0->unk_0C, 1, Pokemon_GetBoxPokemon(param0->unk_28)); param0->unk_65 = sub_0207C584(param0, 918); param0->unk_66 = 40; @@ -445,7 +445,7 @@ static void sub_0207B180 (UnkStruct_0207AE68 * param0) param0->unk_64 = 14; break; default: - sub_0200B5CC(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); + StringFormatter_BufferNickname(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); sub_0200B630(param0->unk_0C, 1, v3); param0->unk_65 = sub_0207C584(param0, 4); param0->unk_66 = 30; @@ -455,14 +455,14 @@ static void sub_0207B180 (UnkStruct_0207AE68 * param0) } break; case 14: - sub_0200B5CC(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); + StringFormatter_BufferNickname(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); sub_0200B630(param0->unk_0C, 1, param0->unk_6C); param0->unk_65 = sub_0207C584(param0, 1193); param0->unk_66 = 30; param0->unk_64++; break; case 16: - sub_0200B5CC(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); + StringFormatter_BufferNickname(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); param0->unk_65 = sub_0207C584(param0, 1194); param0->unk_66 = 30; param0->unk_64++; @@ -562,7 +562,7 @@ static void sub_0207B180 (UnkStruct_0207AE68 * param0) case 35: switch (sub_02002114(param0->unk_40, param0->unk_5C)) { case 0: - sub_0200B5CC(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); + StringFormatter_BufferNickname(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); sub_0200B630(param0->unk_0C, 1, param0->unk_6C); param0->unk_65 = sub_0207C584(param0, 1198); param0->unk_66 = 30; @@ -587,7 +587,7 @@ static void sub_0207B180 (UnkStruct_0207AE68 * param0) param0->unk_64++; break; case 27: - sub_0200B5CC(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); + StringFormatter_BufferNickname(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); sub_0200B630(param0->unk_0C, 1, Pokemon_GetValue(param0->unk_28, 54 + param0->unk_6E, NULL)); param0->unk_65 = sub_0207C584(param0, 1200); param0->unk_66 = 30; @@ -599,7 +599,7 @@ static void sub_0207B180 (UnkStruct_0207AE68 * param0) param0->unk_64++; break; case 31: - sub_0200B5CC(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); + StringFormatter_BufferNickname(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); sub_0200B630(param0->unk_0C, 1, param0->unk_6C); param0->unk_65 = sub_0207C584(param0, 1202); param0->unk_66 = 0; @@ -668,7 +668,7 @@ static void sub_0207B180 (UnkStruct_0207AE68 * param0) break; case 43: if ((sub_0200598C() == 0) && (sub_020160F4(param0->unk_44, 0) == 1) && (sub_02007C24(param0->unk_1C[0]) == 0)) { - sub_0200B5CC(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); + StringFormatter_BufferNickname(param0->unk_0C, 0, Pokemon_GetBoxPokemon(param0->unk_28)); param0->unk_65 = sub_0207C584(param0, 919); param0->unk_66 = 20; param0->unk_64++; diff --git a/src/unk_0207CB08.c b/src/unk_0207CB08.c index 0fb0199329..0586097989 100644 --- a/src/unk_0207CB08.c +++ b/src/unk_0207CB08.c @@ -139,7 +139,7 @@ static u32 sub_0207CC00 (SaveData * param0) BOOL sub_0207CC10 (SaveData * param0, Strbuf *param1, u16 param2, u32 param3) { MessageLoader * v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; Strbuf* v2; v0 = MessageLoader_Init(0, 26, 7, param3); @@ -177,7 +177,7 @@ BOOL sub_0207CC10 (SaveData * param0, Strbuf *param1, u16 param2, u32 param3) void sub_0207CD34 (void * param0, Strbuf *param1, u16 param2, u32 param3, u32 param4) { MessageLoader * v0; - UnkStruct_0200B358 * v1; + StringFormatter * v1; Strbuf* v2; switch (param3) { diff --git a/src/unk_0207E0B8.c b/src/unk_0207E0B8.c index 5f03370654..0d5729d873 100644 --- a/src/unk_0207E0B8.c +++ b/src/unk_0207E0B8.c @@ -2464,7 +2464,7 @@ static int ProcessWindowInput (GameWindowLayout * param0) v0 = Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11); v1 = MessageLoader_GetNewStrbuf(param0->unk_69C, 64); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); sub_0200B60C(param0->unk_6A0, 1, param0->unk_B14[2], 3, 0, 1); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, v1); Strbuf_Free(v1); @@ -2656,7 +2656,7 @@ static int ProcessItemApplication (GameWindowLayout * param0) if (param0->unk_5A4->unk_24 == 112) { if (Pokemon_GetValue(v0, MON_DATA_SPECIES, NULL) != 487) { MessageLoader_GetStrbuf(param0->unk_69C, 203, param0->unk_6A8); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); sub_0200B744(param0->unk_6A0, 1, param0->unk_5A4->unk_24); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, param0->unk_6A8); v2 = 11; @@ -2681,13 +2681,13 @@ static int ProcessItemApplication (GameWindowLayout * param0) v2 = UpdatePokemonWithItem(param0, v0, &v3); MessageLoader_GetStrbuf(param0->unk_69C, 118, param0->unk_6A8); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); sub_0200B70C(param0->unk_6A0, 1, param0->unk_5A4->unk_24); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, param0->unk_6A8); break; case 1: MessageLoader_GetStrbuf(param0->unk_69C, 78, param0->unk_6A8); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); sub_0200B744(param0->unk_6A0, 1, param0->unk_704[param0->unk_B11].unk_0C); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, param0->unk_6A8); v2 = 9; @@ -2875,7 +2875,7 @@ static int UpdatePokemonFormWithItem (GameWindowLayout * param0) if (v3 == 0) { MessageLoader_GetStrbuf(param0->unk_69C, 118, param0->unk_6A8); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); sub_0200B70C(param0->unk_6A0, 1, param0->unk_5A4->unk_24); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, param0->unk_6A8); } else { diff --git a/src/unk_020819DC.c b/src/unk_020819DC.c index 58e6cadaa2..6074807c20 100644 --- a/src/unk_020819DC.c +++ b/src/unk_020819DC.c @@ -249,7 +249,7 @@ void sub_02081E08 (GameWindowLayout * param0) v0 = Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11); v1 = MessageLoader_GetNewStrbuf(param0->unk_69C, 37); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, v1); Strbuf_Free(v1); } @@ -275,7 +275,7 @@ void sub_02081ED8 (GameWindowLayout * param0, Pokemon * param1, u32 param2) v0 = MessageLoader_GetNewStrbuf(param0->unk_69C, Unk_020F1EA0[param2][0]); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(param1)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(param1)); StringFormatter_Format(param0->unk_6A0, param0->unk_704[param2].unk_00, v0); Strbuf_Free(v0); } diff --git a/src/unk_02082C2C.c b/src/unk_02082C2C.c index b2ab2f31c9..e826229748 100644 --- a/src/unk_02082C2C.c +++ b/src/unk_02082C2C.c @@ -116,7 +116,7 @@ void sub_02082DA8 (GameWindowLayout * param0, u8 param1) v2 = Pokemon_GetValue(v0, MON_DATA_SPECIES, NULL); v3 = Pokemon_GetValue(v0, MON_DATA_FORM, NULL); v1 = NARC_ctor(NARC_INDEX_POKETOOL__ICONGRA__PL_POKE_ICON, 12); - v4 = NNS_G2dGetImageLocation(sub_02021F98(param0->unk_704[param1].unk_24), NNS_G2D_VRAM_TYPE_2DMAIN); + v4 = NNS_G2dGetImageLocation(SpriteActor_ImageProxy(param0->unk_704[param1].unk_24), NNS_G2D_VRAM_TYPE_2DMAIN); v5 = sub_0200723C(v1, Pokemon_IconSpriteIndex(v0), 0, 12, 1); v7 = NNS_G2dGetUnpackedCharacterData(v5, &v6); diff --git a/src/unk_02083370.c b/src/unk_02083370.c index 1a94b7ffd7..efdcf489be 100644 --- a/src/unk_02083370.c +++ b/src/unk_02083370.c @@ -177,7 +177,7 @@ static void sub_020834B0 (GameWindowLayout * param0, int * param1) if (param0->unk_704[param0->unk_B11].unk_0C == 0) { v0 = Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11); MessageLoader_GetStrbuf(param0->unk_69C, 81, param0->unk_6A8); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, param0->unk_6A8); } else if (sub_0207D570(param0->unk_5A4->unk_04, param0->unk_704[param0->unk_B11].unk_0C, 1, 12) == 1) { u32 v4; @@ -197,7 +197,7 @@ static void sub_020834B0 (GameWindowLayout * param0, int * param1) } MessageLoader_GetStrbuf(param0->unk_69C, 82, param0->unk_6A8); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); sub_0200B70C(param0->unk_6A0, 1, param0->unk_704[param0->unk_B11].unk_0C); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, param0->unk_6A8); diff --git a/src/unk_02084B70.c b/src/unk_02084B70.c index a9cb201f4e..1f5042e624 100644 --- a/src/unk_02084B70.c +++ b/src/unk_02084B70.c @@ -225,7 +225,7 @@ static void sub_02084E58 (GameWindowLayout * param0, u16 param1, u32 param2) Strbuf* v1; v0 = Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); switch (sub_02084B70(param1)) { case 4: @@ -495,7 +495,7 @@ static int sub_020855C4 (void * param0) v2 = MessageLoader_GetNewStrbuf(v0->unk_69C, 64); } - sub_0200B5CC(v0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); + StringFormatter_BufferNickname(v0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); sub_0200B60C(v0->unk_6A0, 1, v3 - v0->unk_704[v0->unk_B11].unk_06, 3, 0, 1); StringFormatter_Format(v0->unk_6A0, v0->unk_6A4, v2); Strbuf_Free(v2); @@ -599,7 +599,7 @@ int sub_02085804 (GameWindowLayout * param0) v2 = Pokemon_GetValue(v0, MON_DATA_CURRENT_HP, NULL); v1 = MessageLoader_GetNewStrbuf(param0->unk_69C, 70); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); StringFormatter_Format(param0->unk_6A0, param0->unk_6A4, v1); Strbuf_Free(v1); @@ -682,7 +682,7 @@ static int sub_02085A70 (void * param0) v2 = MessageLoader_GetNewStrbuf(v0->unk_69C, 193); - sub_0200B5CC(v0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); + StringFormatter_BufferNickname(v0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); sub_0200B60C(v0->unk_6A0, 1, v0->unk_704[v0->unk_B11].unk_0A, 3, 0, 1); StringFormatter_Format(v0->unk_6A0, v0->unk_6A4, v2); Strbuf_Free(v2); @@ -750,7 +750,7 @@ static int sub_02085C50 (void * param0) v0->unk_B13 = 6; break; case 0xffff: - sub_0200B5CC(v0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); + StringFormatter_BufferNickname(v0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); sub_0200B630(v0->unk_6A0, 1, v0->unk_5A4->unk_26); v2 = MessageLoader_GetNewStrbuf(v0->unk_69C, 52); @@ -767,7 +767,7 @@ static int sub_02085C50 (void * param0) case 0xfffe: break; default: - sub_0200B5CC(v0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); + StringFormatter_BufferNickname(v0->unk_6A0, 0, Pokemon_GetBoxPokemon(v1)); sub_0200B630(v0->unk_6A0, 1, v0->unk_5A4->unk_26); v2 = MessageLoader_GetNewStrbuf(v0->unk_69C, 194); @@ -833,7 +833,7 @@ int sub_02085EF4 (GameWindowLayout * param0) param0->unk_B13 = 3; v0 = Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); if (param0->unk_5A4->unk_28 == 4) { sub_0200B630(param0->unk_6A0, 1, param0->unk_5A4->unk_26); @@ -963,7 +963,7 @@ int sub_0208615C (GameWindowLayout * param0) v0 = Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11); v2 = sub_02086104(param0, v0); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); sub_0200B630(param0->unk_6A0, 1, param0->unk_5A4->unk_26); switch (v2) { @@ -1017,7 +1017,7 @@ int sub_020862F8 (GameWindowLayout * param0) Strbuf* v1; v0 = Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11); - sub_0200B5CC(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); + StringFormatter_BufferNickname(param0->unk_6A0, 0, Pokemon_GetBoxPokemon(v0)); if (param0->unk_5A4->unk_28 == 4) { sub_0200B630(param0->unk_6A0, 1, param0->unk_5A4->unk_26); diff --git a/src/unk_0208694C.c b/src/unk_0208694C.c index 723fa8794a..812be3c3e3 100644 --- a/src/unk_0208694C.c +++ b/src/unk_0208694C.c @@ -96,7 +96,7 @@ struct UnkStruct_02087A10_t { u16 unk_15A[3]; BGL * unk_160; BOOL unk_164; - UnkStruct_0200B358 * unk_168; + StringFormatter * unk_168; MessageLoader * unk_16C; MessageLoader * unk_170; MessageLoader * unk_174; diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index d580bb49b6..db95602b1f 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -714,7 +714,7 @@ void sub_0208B090 (UnkStruct_02089688 * param0, int param1, int param2, int para { sub_0201A7A0(&v7); - sub_0201A870(param0->unk_2C0.unk_0C, &v7, 10, 2, 0, 0); + BGL_AddFramelessWindow(param0->unk_2C0.unk_0C, &v7, 10, 2, 0, 0); sub_0201D78C(&v7, 2, v3, sub_02002EEC(2, v3, 0, 80), 0, 0xff, ((u32)(((15 & 0xff) << 16) | ((13 & 0xff) << 8) | ((2 & 0xff) << 0))), NULL); } diff --git a/src/unk_0208C324.c b/src/unk_0208C324.c index 2f3e08f831..c93d388244 100644 --- a/src/unk_0208C324.c +++ b/src/unk_0208C324.c @@ -1034,7 +1034,7 @@ static void sub_0208D200 (UnkStruct_0208D7BC * param0, Pokemon * param1, UnkStru StringFormatter_Format(param0->unk_690, param0->unk_250.unk_00, param0->unk_694); MessageLoader_GetStrbuf(param0->unk_688, 0, param0->unk_694); - sub_0200B5CC(param0->unk_690, 0, v0); + StringFormatter_BufferNickname(param0->unk_690, 0, v0); StringFormatter_Format(param0->unk_690, param0->unk_250.unk_04, param0->unk_694); MessageLoader_GetStrbuf(param0->unk_688, 14, param0->unk_694); diff --git a/src/unk_020933F8.c b/src/unk_020933F8.c index a423f15710..b78088ac6e 100644 --- a/src/unk_020933F8.c +++ b/src/unk_020933F8.c @@ -86,9 +86,9 @@ BOOL sub_020944D4(UnkStruct_02095C48 * param0); static void sub_02093C6C(SysTask * param0, void * param1); UnkStruct_02095C48 * sub_02093800(const UnkStruct_02093800 * param0); void sub_02093AD4(UnkStruct_02095C48 * param0); -void sub_02094630(UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * param2, u32 param3); -void sub_02094648(UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * param2, u32 param3); -void sub_02094680(UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * param2, u32 param3); +void sub_02094630(UnkStruct_02095C48 * param0, int param1, StringFormatter * param2, u32 param3); +void sub_02094648(UnkStruct_02095C48 * param0, int param1, StringFormatter * param2, u32 param3); +void sub_02094680(UnkStruct_02095C48 * param0, int param1, StringFormatter * param2, u32 param3); static BOOL sub_02093448(UnkStruct_020508D4 * param0); static BOOL sub_020935EC(UnkStruct_020508D4 * param0); void sub_02093BBC(UnkStruct_02095C48 * param0); @@ -1129,12 +1129,12 @@ static void sub_0209451C (SysTask * param0, void * param1) } } -void sub_02094630 (UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * param2, u32 param3) +void sub_02094630 (UnkStruct_02095C48 * param0, int param1, StringFormatter * param2, u32 param3) { sub_0200BB74(param2, param3, param0->unk_00.unk_C0[param1].unk_00); } -void sub_02094648 (UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * param2, u32 param3) +void sub_02094648 (UnkStruct_02095C48 * param0, int param1, StringFormatter * param2, u32 param3) { int v0, v1; @@ -1142,7 +1142,7 @@ void sub_02094648 (UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * sub_0200B48C(param2, param3, param0->unk_00.unk_D8[v1], param0->unk_00.unk_F8[v1], 1, GAME_LANGUAGE); } -void sub_02094680 (UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * param2, u32 param3) +void sub_02094680 (UnkStruct_02095C48 * param0, int param1, StringFormatter * param2, u32 param3) { BoxPokemon * v0; int v1; @@ -1150,10 +1150,10 @@ void sub_02094680 (UnkStruct_02095C48 * param0, int param1, UnkStruct_0200B358 * v1 = sub_02095904(param1); v0 = Pokemon_GetBoxPokemon(param0->unk_00.unk_00[v1]); - sub_0200B5CC(param2, param3, v0); + StringFormatter_BufferNickname(param2, param3, v0); } -void sub_020946A4 (UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2) +void sub_020946A4 (UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2) { u32 v0; @@ -1161,7 +1161,7 @@ void sub_020946A4 (UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 sub_0200BBA8(param1, param2, v0); } -void sub_020946CC (UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2) +void sub_020946CC (UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2) { u32 v0; @@ -1169,7 +1169,7 @@ void sub_020946CC (UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 sub_0200BBDC(param1, param2, v0); } -void sub_020946F0 (UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2) +void sub_020946F0 (UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2) { int v0, v1; int v2; @@ -1186,7 +1186,7 @@ void sub_020946F0 (UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 sub_02094648(param0, v1, param1, param2); } -void sub_02094720 (UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2) +void sub_02094720 (UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2) { int v0, v1; int v2; @@ -1325,7 +1325,7 @@ BOOL sub_02094868 (UnkStruct_02095C48 * param0) return 1; } -void sub_02094898 (UnkStruct_02095C48 * param0, UnkStruct_0200B358 * param1, u32 param2, int param3) +void sub_02094898 (UnkStruct_02095C48 * param0, StringFormatter * param1, u32 param2, int param3) { u32 v0, v1; diff --git a/src/unk_020989DC.c b/src/unk_020989DC.c index bf4c331796..b0dd8bf694 100644 --- a/src/unk_020989DC.c +++ b/src/unk_020989DC.c @@ -100,7 +100,7 @@ UnkStruct_0203D9B8 * sub_020989DC (SaveData * param0, int param1) UnkStruct_0203D9B8 * v0; Poffin * v1; UnkStruct_020989DC * v2; - UnkStruct_0200B358 * v3; + StringFormatter * v3; u8 v4[7]; u8 v5 = 0, v6 = 0, v7 = 0; u8 v8 = 0; diff --git a/src/unk_0209ACF4.c b/src/unk_0209ACF4.c index badca45648..c028256b9d 100644 --- a/src/unk_0209ACF4.c +++ b/src/unk_0209ACF4.c @@ -38,7 +38,7 @@ typedef struct { UnkStruct_0203CDB0 * unk_00; Strbuf* unk_04; Strbuf* unk_08; - UnkStruct_0200B358 * unk_0C; + StringFormatter * unk_0C; MessageLoader * unk_10; UnkStruct_020149F0 * unk_14; Window unk_18; diff --git a/src/unk_0209B344.c b/src/unk_0209B344.c index d367d749ec..076856d0e0 100644 --- a/src/unk_0209B344.c +++ b/src/unk_0209B344.c @@ -22,7 +22,7 @@ typedef struct { UnkStruct_0203CDB0 * unk_00; - UnkStruct_0200B358 * unk_04; + StringFormatter * unk_04; Sentence unk_08; UnkStruct_0209747C * unk_10; UnkStruct_0202783C * unk_14; From 59163ac8e9ca52d265bc77a7a3e8ae9e28e8c64b Mon Sep 17 00:00:00 2001 From: Rachel Date: Sun, 11 Feb 2024 12:12:16 -0800 Subject: [PATCH 16/16] Document Healthbar_DrawBattlerName --- include/constants/font.h | 26 +++ include/overlay016/struct_ov16_022674C4.h | 4 +- src/overlay016/battle_display.c | 26 +-- src/overlay016/healthbar.c | 272 ++++++++++++---------- 4 files changed, 194 insertions(+), 134 deletions(-) create mode 100644 include/constants/font.h diff --git a/include/constants/font.h b/include/constants/font.h new file mode 100644 index 0000000000..aa928be208 --- /dev/null +++ b/include/constants/font.h @@ -0,0 +1,26 @@ +#ifndef POKEPLATINUM_CONSTANTS_FONT_H +#define POKEPLATINUM_CONSTANTS_FONT_H + +typedef u32 FONT_COLOR; + +#define FONT_COLOR_MASK 0xFF +#define FONT_COLOR_LETTER_SHIFT 16 +#define FONT_COLOR_SHADOW_SHIFT 8 +#define FONT_COLOR_BG_SHIFT 0 + +#define MAKE_FONT_COLOR(letter, shadow, bg) ((FONT_COLOR)( \ + ((letter & FONT_COLOR_MASK) << FONT_COLOR_LETTER_SHIFT) \ + | ((shadow & FONT_COLOR_MASK) << FONT_COLOR_SHADOW_SHIFT) \ + | ((bg & FONT_COLOR_MASK) << FONT_COLOR_BG_SHIFT) \ +)) + +enum FontType { + FONT_SYSTEM = 0, + FONT_NPC_TALK, + FONT_BUTTONS, + FONT_UNK, + + FONT_MAX, +}; + +#endif // POKEPLATINUM_CONSTANTS_FONT_H diff --git a/include/overlay016/struct_ov16_022674C4.h b/include/overlay016/struct_ov16_022674C4.h index 3cf28b5e76..d6cbe406eb 100644 --- a/include/overlay016/struct_ov16_022674C4.h +++ b/include/overlay016/struct_ov16_022674C4.h @@ -13,9 +13,9 @@ typedef struct { BattleSystem *battleSys; SysTask * unk_10; Window unk_14; - u8 unk_24; + u8 battler; u8 type; - u8 unk_26; + u8 selectedPartySlot; u8 unk_27; s32 curHP; s32 maxHP; diff --git a/src/overlay016/battle_display.c b/src/overlay016/battle_display.c index dfb788ee20..298875be3c 100644 --- a/src/overlay016/battle_display.c +++ b/src/overlay016/battle_display.c @@ -626,7 +626,7 @@ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battle MI_CpuClearFast(&healthbar->state, sizeof(u8)); healthbar->battleSys = battleSys; - healthbar->unk_24 = battlerData->battler; + healthbar->battler = battlerData->battler; healthbar->type = Healthbar_Type(battlerData->battlerType, BattleSystem_BattleType(battleSys)); healthbar->unk_4C = healthbarData->command; healthbar->curHP = healthbarData->curHP; @@ -636,7 +636,7 @@ void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battle healthbar->damage = 0; healthbar->curExp = healthbarData->expFromLastLevel; healthbar->maxExp = healthbarData->expToNextLevel; - healthbar->unk_26 = healthbarData->selectedPartySlot; + healthbar->selectedPartySlot = healthbarData->selectedPartySlot; healthbar->status = healthbarData->status; healthbar->unk_4B = healthbarData->speciesCaught; healthbar->unk_4D = healthbarData->delay; @@ -654,7 +654,7 @@ void BattleDisplay_SlideHealthbarOut(BattleSystem *battleSys, BattlerData *battl MI_CpuClearFast(&healthbar->state, sizeof(u8)); healthbar->battleSys = battleSys; - healthbar->unk_24 = battlerData->battler; + healthbar->battler = battlerData->battler; healthbar->unk_4C = battlerData->data[0]; Healthbar_Scroll(healthbar, HEALTHBAR_SCROLL_OUT); @@ -940,7 +940,7 @@ void ov16_0225DA74 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->battleSys = param0; v0->unk_4C = param2->unk_00; - v0->unk_24 = param1->battler; + v0->battler = param1->battler; v0->type = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); v0->curHP = param2->unk_02; v0->maxHP = param2->unk_04; @@ -967,7 +967,7 @@ void ov16_0225DB00 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov v0->battleSys = param0; v0->unk_4C = param2->unk_00; - v0->unk_24 = param1->battler; + v0->battler = param1->battler; v0->curExp = param2->unk_04; v0->maxExp = param2->unk_0C; v0->expReward = param2->unk_08 - v0->curExp; @@ -976,7 +976,7 @@ void ov16_0225DB00 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov v0->unk_10 = SysTask_Start(ov16_022629DC, v0, 1000); return; } else { - ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); + ClearCommand(v0->battleSys, v0->battler, v0->unk_4C); } } @@ -1225,7 +1225,7 @@ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ MI_CpuClearFast(&v0->state, sizeof(u8)); v0->battleSys = param0; - v0->unk_24 = param1->battler; + v0->battler = param1->battler; v0->type = Healthbar_Type(param1->battlerType, BattleSystem_BattleType(param0)); v0->unk_4C = param2->unk_00; v0->curHP = param2->unk_02; @@ -1235,13 +1235,13 @@ void ov16_0225E008 (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_ v0->damage = 0; v0->curExp = param2->unk_08; v0->maxExp = param2->unk_0C; - v0->unk_26 = param2->unk_06; + v0->selectedPartySlot = param2->unk_06; v0->status = param2->unk_07_0; v0->unk_4B = param2->unk_07_7; v0->unk_27 = param2->unk_10; Healthbar_DrawInfo(v0, v0->curHP, ~HEALTHBAR_INFO_EXP_GAUGE); - ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); + ClearCommand(v0->battleSys, v0->battler, v0->unk_4C); } void ov16_0225E0BC (BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C65C * param2) @@ -2844,7 +2844,7 @@ static void SlideHealthbarInTask(SysTask *task, void *data) break; default: - ClearCommand(healthbar->battleSys, healthbar->unk_24, healthbar->unk_4C); + ClearCommand(healthbar->battleSys, healthbar->battler, healthbar->unk_4C); healthbar->unk_10 = NULL; SysTask_Done(task); break; @@ -2874,7 +2874,7 @@ static void SlideHealthbarOutTask(SysTask *task, void *data) break; default: - ClearCommand(healthbar->battleSys, healthbar->unk_24, healthbar->unk_4C); + ClearCommand(healthbar->battleSys, healthbar->battler, healthbar->unk_4C); healthbar->unk_10 = NULL; SysTask_Done(task); Healthbar_Enable(healthbar, FALSE); @@ -4770,7 +4770,7 @@ static void ov16_02262988 (SysTask * param0, void * param1) } break; default: - ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); + ClearCommand(v0->battleSys, v0->battler, v0->unk_4C); v0->unk_10 = NULL; SysTask_Done(param0); return; @@ -4813,7 +4813,7 @@ static void ov16_022629DC (SysTask * param0, void * param1) } break; default: - ClearCommand(v0->battleSys, v0->unk_24, v0->unk_4C); + ClearCommand(v0->battleSys, v0->battler, v0->unk_4C); v0->unk_10 = NULL; SysTask_Done(param0); break; diff --git a/src/overlay016/healthbar.c b/src/overlay016/healthbar.c index 9b24263b30..5fb4354650 100644 --- a/src/overlay016/healthbar.c +++ b/src/overlay016/healthbar.c @@ -5,6 +5,11 @@ #include "assert.h" +#include "constants/font.h" +#include "constants/heap.h" + +#include "gmm/pl_msg_0368.h" + #include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "message.h" @@ -55,12 +60,25 @@ #define HEALTHBAR_X_OFFSET_ENEMY_SLOT_2 HEALTHBAR_X_OFFSET_SOLO_ENEMY #define HEALTHBAR_Y_OFFSET_ENEMY_SLOT_2 HEALTHBAR_Y_OFFSET_SOLO_ENEMY + 9 +#define HEALTHBAR_WINDOW_BLOCK_SIZE 32 + +#define HEALTHBAR_NAME_BLOCK_COUNT_X 8 +#define HEALTHBAR_NAME_BLOCK_COUNT_Y 2 +#define HEALTHBAR_NAME_WINDOW_OFFSET 0 +#define HEALTHBAR_NAME_BYTE_SIZE (HEALTHBAR_NAME_BLOCK_COUNT_X * HEALTHBAR_NAME_BLOCK_COUNT_Y * HEALTHBAR_WINDOW_BLOCK_SIZE) +#define HEALTHBAR_NAME_BACKGROUND_COLOR 0xF +#define HEALTHBAR_NAME_FONT_COLOR MAKE_FONT_COLOR(14, 2, HEALTHBAR_NAME_BACKGROUND_COLOR) + +#define VRAM_TRANSFER_DST(vram, transferTable, index_0, index_1, imgProxy) (\ + (void *)((u32)vram + transferTable[index_0][index_1].pos + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN])\ +) + #define S32_MIN -2147483648 -typedef struct { - u16 unk_00; - u16 unk_02; -} UnkStruct_ov16_0226F64C; +typedef struct VRAMTransfer { + u16 pos; + u16 size; +} VRAMTransfer; typedef struct { Healthbar * unk_00; @@ -106,46 +124,46 @@ __attribute__((aligned(4))) static const s8 sArrowOffsetX[] = { [HEALTHBAR_TYPE_ENEMY_SLOT_2] = 0, }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F64C[][4] = { - { - {0x260, 0xA0}, - {0x360, 0xA0}, - {0xA00, 0x60}, - {0xB00, 0x60} +static const VRAMTransfer sBattlerNameVRAMTransfer[][4] = { + [HEALTHBAR_TYPE_PLAYER_SOLO] = { + {19 * HEALTHBAR_WINDOW_BLOCK_SIZE, 5 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {27 * HEALTHBAR_WINDOW_BLOCK_SIZE, 5 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {80 * HEALTHBAR_WINDOW_BLOCK_SIZE, 3 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {88 * HEALTHBAR_WINDOW_BLOCK_SIZE, 3 * HEALTHBAR_WINDOW_BLOCK_SIZE}, }, - { - {0x220, 0xE0}, - {0x320, 0xE0}, - {0xA00, 0x20}, - {0xB00, 0x20} + [HEALTHBAR_TYPE_ENEMY_SOLO] = { + {17 * HEALTHBAR_WINDOW_BLOCK_SIZE, 7 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {25 * HEALTHBAR_WINDOW_BLOCK_SIZE, 7 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {80 * HEALTHBAR_WINDOW_BLOCK_SIZE, 1 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {88 * HEALTHBAR_WINDOW_BLOCK_SIZE, 1 * HEALTHBAR_WINDOW_BLOCK_SIZE}, }, - { - {0x240, 0xC0}, - {0x340, 0xC0}, - {0xA00, 0x40}, - {0xB00, 0x40} + [HEALTHBAR_TYPE_PLAYER_SLOT_1] = { + {18 * HEALTHBAR_WINDOW_BLOCK_SIZE, 6 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {26 * HEALTHBAR_WINDOW_BLOCK_SIZE, 6 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {80 * HEALTHBAR_WINDOW_BLOCK_SIZE, 2 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {88 * HEALTHBAR_WINDOW_BLOCK_SIZE, 2 * HEALTHBAR_WINDOW_BLOCK_SIZE}, }, - { - {0x220, 0xE0}, - {0x320, 0xE0}, - {0xA00, 0x20}, - {0xB00, 0x20} + [HEALTHBAR_TYPE_ENEMY_SLOT_1] = { + {17 * HEALTHBAR_WINDOW_BLOCK_SIZE, 7 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {25 * HEALTHBAR_WINDOW_BLOCK_SIZE, 7 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {80 * HEALTHBAR_WINDOW_BLOCK_SIZE, 1 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {88 * HEALTHBAR_WINDOW_BLOCK_SIZE, 1 * HEALTHBAR_WINDOW_BLOCK_SIZE}, }, - { - {0x240, 0xC0}, - {0x340, 0xC0}, - {0xA00, 0x40}, - {0xB00, 0x40} + [HEALTHBAR_TYPE_PLAYER_SLOT_2] = { + {18 * HEALTHBAR_WINDOW_BLOCK_SIZE, 6 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {26 * HEALTHBAR_WINDOW_BLOCK_SIZE, 6 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {80 * HEALTHBAR_WINDOW_BLOCK_SIZE, 2 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {88 * HEALTHBAR_WINDOW_BLOCK_SIZE, 2 * HEALTHBAR_WINDOW_BLOCK_SIZE}, }, - { - {0x220, 0xE0}, - {0x320, 0xE0}, - {0xA00, 0x20}, - {0xB00, 0x20} + [HEALTHBAR_TYPE_ENEMY_SLOT_2] = { + {17 * HEALTHBAR_WINDOW_BLOCK_SIZE, 7 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {25 * HEALTHBAR_WINDOW_BLOCK_SIZE, 7 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {80 * HEALTHBAR_WINDOW_BLOCK_SIZE, 1 * HEALTHBAR_WINDOW_BLOCK_SIZE}, + {88 * HEALTHBAR_WINDOW_BLOCK_SIZE, 1 * HEALTHBAR_WINDOW_BLOCK_SIZE}, } }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F47C[][2] = { +static const VRAMTransfer Unk_ov16_0226F47C[][2] = { { {0xA60, 0x40}, {0xB60, 0x40} @@ -172,7 +190,7 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F47C[][2] = { } }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F3EC[][2] = { +static const VRAMTransfer Unk_ov16_0226F3EC[][2] = { { {0xAA0, 0x60}, {0xBA0, 0x60} @@ -199,7 +217,7 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F3EC[][2] = { } }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F41C[][2] = { +static const VRAMTransfer Unk_ov16_0226F41C[][2] = { { {0x0, 0x0}, {0xD00, 0x60} @@ -226,7 +244,7 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F41C[][2] = { } }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F3BC[] = { +static const VRAMTransfer Unk_ov16_0226F3BC[] = { {0xD80, 0x60}, {0x6A0, 0x60}, {0xC80, 0x60}, @@ -235,7 +253,7 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F3BC[] = { {0x6A0, 0x60} }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F44C[][2] = { +static const VRAMTransfer Unk_ov16_0226F44C[][2] = { { {0x4E0, 0x0}, {0xC20, 0xC0} @@ -262,7 +280,7 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F44C[][2] = { } }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F38C[] = { +static const VRAMTransfer Unk_ov16_0226F38C[] = { {0x460, 0x20}, {0x420, 0x20}, {0x440, 0x20}, @@ -271,7 +289,7 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F38C[] = { {0x420, 0x20} }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F35C[] = { +static const VRAMTransfer Unk_ov16_0226F35C[] = { {0x480, 0x60}, {0x440, 0x60}, {0x460, 0x60}, @@ -280,21 +298,21 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F35C[] = { {0x440, 0x60} }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F33C[4] = { +static const VRAMTransfer Unk_ov16_0226F33C[4] = { {0x240, 0xC0}, {0x340, 0xC0}, {0xA00, 0xE0}, {0xB00, 0xE0} }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F34C[4] = { +static const VRAMTransfer Unk_ov16_0226F34C[4] = { {0x440, 0xC0}, {0x540, 0xC0}, {0xC00, 0xE0}, {0xD00, 0xE0} }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F374[] = { +static const VRAMTransfer Unk_ov16_0226F374[] = { {0x0, 0x0}, {0x0, 0x0}, {0x4C0, 0x40}, @@ -303,7 +321,7 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F374[] = { {0x0, 0x0} }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F3A4[] = { +static const VRAMTransfer Unk_ov16_0226F3A4[] = { {0x0, 0x0}, {0x0, 0x0}, {0xCC0, 0x20}, @@ -312,7 +330,7 @@ static const UnkStruct_ov16_0226F64C Unk_ov16_0226F3A4[] = { {0x0, 0x0} }; -static const UnkStruct_ov16_0226F64C Unk_ov16_0226F3D4[] = { +static const VRAMTransfer Unk_ov16_0226F3D4[] = { {0x0, 0x0}, {0x0, 0x0}, {0xC60, 0x20}, @@ -784,23 +802,23 @@ void ov16_0226737C (Healthbar * param0) if (param0->numberMode == 1) { v0 = ov16_02268250(70); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->type].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->type].pos + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); v0 = ov16_02268250(71); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].pos + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); v0 = ov16_02268250(69); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3D4[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3D4[param0->type].unk_02); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3D4[param0->type].pos + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3D4[param0->type].size); Healthbar_DrawInfo(param0, param0->curHP, HEALTHBAR_INFO_CURRENT_HP | HEALTHBAR_INFO_MAX_HP); } else { v0 = ov16_02268250(66); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F374[param0->type].unk_02); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F374[param0->type].pos + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F374[param0->type].size); v0 = ov16_02268250(68); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3A4[param0->type].unk_02); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].pos + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3A4[param0->type].size); v0 = ov16_02268250(38); - MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].unk_00 + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v0, (void *)((u32)v2 + Unk_ov16_0226F3A4[param0->type].pos + 0x20 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); Healthbar_DrawInfo(param0, param0->curHP, HEALTHBAR_INFO_HP_GAUGE); } @@ -1066,52 +1084,68 @@ static void ScrollHealthbarTask(SysTask *task, void *data) } } -static void Healthbar_DrawBattlerName (Healthbar * param0) +/** + * @brief Draw the battler's name onto the healthbar. + * + * @param healthbar + */ +static void Healthbar_DrawBattlerName(Healthbar *healthbar) { - BGL * v0; - u8 * v1; - NNSG2dImageProxy * v2; - Window v3; - MessageLoader * v4; - Strbuf* v5, * v6; - Pokemon * v7; - BoxPokemon * v8; - StringFormatter * v9; - - v0 = BattleSystem_BGL(param0->battleSys); - v4 = BattleSystem_MessageLoader(param0->battleSys); - v9 = BattleSystem_StringFormatter(param0->battleSys); - v5 = Strbuf_Init((12 + (5 * 2)), 5); - v6 = MessageLoader_GetNewStrbuf(v4, 964); - v7 = BattleSystem_PartyPokemon(param0->battleSys, param0->unk_24, param0->unk_26); - v8 = Pokemon_GetBoxPokemon(v7); - - StringFormatter_BufferNickname(v9, 0, v8); - StringFormatter_Format(v9, v5, v6); - BGL_AddFramelessWindow(v0, &v3, 8, 2, 0, 0xf); - PrintStringWithColorAndMargins(&v3, 0, v5, 0, 0, 0xff, ((u32)(((0xe & 0xff) << 16) | ((2 & 0xff) << 8) | (((0xf & 0xff) << 0)))), 0, 0, NULL); - - v1 = v3.unk_0C; - + BGL *bgl; + u8 *buf; + NNSG2dImageProxy *imgProxy; + Window window; + MessageLoader *msgLoader; + Strbuf *nickname, *template; + Pokemon *mon; + BoxPokemon *boxMon; + StringFormatter *strFormatter; + + bgl = BattleSystem_BGL(healthbar->battleSys); + msgLoader = BattleSystem_MessageLoader(healthbar->battleSys); + strFormatter = BattleSystem_StringFormatter(healthbar->battleSys); + + nickname = Strbuf_Init(MON_NAME_LEN + 12, HEAP_ID_BATTLE); // TODO: not sure why there is a +12 here + template = MessageLoader_GetNewStrbuf(msgLoader, pl_msg_00000368_00964); + + mon = BattleSystem_PartyPokemon(healthbar->battleSys, healthbar->battler, healthbar->selectedPartySlot); + boxMon = Pokemon_GetBoxPokemon(mon); + + StringFormatter_BufferNickname(strFormatter, 0, boxMon); + StringFormatter_Format(strFormatter, nickname, template); + + BGL_AddFramelessWindow(bgl, &window, + HEALTHBAR_NAME_BLOCK_COUNT_X, + HEALTHBAR_NAME_BLOCK_COUNT_Y, + HEALTHBAR_NAME_WINDOW_OFFSET, + HEALTHBAR_NAME_BACKGROUND_COLOR); + PrintStringWithColorAndMargins(&window, FONT_SYSTEM, nickname, 0, 0, 0xFF, HEALTHBAR_NAME_FONT_COLOR, 0, 0, NULL); + buf = window.unk_0C; + + // copy the window's data into VRAM over the painted healthbar { - void * v10; - u8 * v11, * v12; - - v10 = G2_GetOBJCharPtr(); - v2 = SpriteActor_ImageProxy(param0->mainActor->unk_00); - v11 = v1; - v12 = &v1[8 * 0x20]; - - MI_CpuCopy16(v11, (void *)((u32)v10 + Unk_ov16_0226F64C[param0->type][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->type][0].unk_02); - MI_CpuCopy16(v12, (void *)((u32)v10 + Unk_ov16_0226F64C[param0->type][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->type][1].unk_02); - - MI_CpuCopy16(&v11[Unk_ov16_0226F64C[param0->type][0].unk_02], (void *)((u32)v10 + Unk_ov16_0226F64C[param0->type][2].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->type][2].unk_02); - MI_CpuCopy16(&v12[Unk_ov16_0226F64C[param0->type][1].unk_02], (void *)((u32)v10 + Unk_ov16_0226F64C[param0->type][3].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F64C[param0->type][3].unk_02); - } - - BGL_DeleteWindow(&v3); - Strbuf_Free(v5); - Strbuf_Free(v6); + void *vram = G2_GetOBJCharPtr(); + imgProxy = SpriteActor_ImageProxy(healthbar->mainActor->unk_00); + u8 *hiHalf = buf; + u8 *loHalf = &buf[HEALTHBAR_NAME_BLOCK_COUNT_X * HEALTHBAR_WINDOW_BLOCK_SIZE]; + + MI_CpuCopy16(hiHalf, + VRAM_TRANSFER_DST(vram, sBattlerNameVRAMTransfer, healthbar->type, 0, imgProxy), + sBattlerNameVRAMTransfer[healthbar->type][0].size); + MI_CpuCopy16(loHalf, + VRAM_TRANSFER_DST(vram, sBattlerNameVRAMTransfer, healthbar->type, 1, imgProxy), + sBattlerNameVRAMTransfer[healthbar->type][1].size); + MI_CpuCopy16(&hiHalf[sBattlerNameVRAMTransfer[healthbar->type][0].size], + VRAM_TRANSFER_DST(vram, sBattlerNameVRAMTransfer, healthbar->type, 2, imgProxy), + sBattlerNameVRAMTransfer[healthbar->type][2].size); + MI_CpuCopy16(&loHalf[sBattlerNameVRAMTransfer[healthbar->type][1].size], + VRAM_TRANSFER_DST(vram, sBattlerNameVRAMTransfer, healthbar->type, 3, imgProxy), + sBattlerNameVRAMTransfer[healthbar->type][3].size); + } + + BGL_DeleteWindow(&window); + Strbuf_Free(nickname); + Strbuf_Free(template); } static void Healthbar_DrawLevelText (Healthbar * param0) @@ -1141,8 +1175,8 @@ static void Healthbar_DrawLevelText (Healthbar * param0) v5 = G2_GetOBJCharPtr(); v0 = SpriteActor_ImageProxy(param0->mainActor->unk_00); - MI_CpuCopy16(v2, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->type][0].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->type][0].unk_02); - MI_CpuCopy16(v1, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->type][1].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->type][1].unk_02); + MI_CpuCopy16(v2, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->type][0].pos + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->type][0].size); + MI_CpuCopy16(v1, (void *)((u32)v5 + Unk_ov16_0226F47C[param0->type][1].pos + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F47C[param0->type][1].size); } } @@ -1166,8 +1200,8 @@ static void Healthbar_DrawLevelNumber (Healthbar * param0) v7 = G2_GetOBJCharPtr(); v2 = SpriteActor_ImageProxy(param0->mainActor->unk_00); - MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), v1, Unk_ov16_0226F3EC[param0->type][0].unk_02); - MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), &v1[v3], Unk_ov16_0226F3EC[param0->type][1].unk_02); + MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][0].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), v1, Unk_ov16_0226F3EC[param0->type][0].size); + MI_CpuCopy16((void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][1].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), &v1[v3], Unk_ov16_0226F3EC[param0->type][1].size); v6 = 0; @@ -1184,8 +1218,8 @@ static void Healthbar_DrawLevelNumber (Healthbar * param0) v8 = v1; v9 = &v1[v3]; - MI_CpuCopy16(v8, (void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3EC[param0->type][0].unk_02); - MI_CpuCopy16(v9, (void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3EC[param0->type][1].unk_02); + MI_CpuCopy16(v8, (void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][0].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3EC[param0->type][0].size); + MI_CpuCopy16(v9, (void *)((u32)v7 + Unk_ov16_0226F3EC[param0->type][1].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3EC[param0->type][1].size); } Heap_FreeToHeap(v0); @@ -1210,8 +1244,8 @@ static void Healthbar_DrawCurrentHP (Healthbar * param0, u32 param1) v1 = SpriteActor_ImageProxy(param0->mainActor->unk_00); v3 = v0; - MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F41C[param0->type][0].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->type][0].unk_02); - MI_CpuCopy16(&v3[Unk_ov16_0226F41C[param0->type][0].unk_02], (void *)((u32)v2 + Unk_ov16_0226F41C[param0->type][1].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->type][1].unk_02); + MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F41C[param0->type][0].pos + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->type][0].size); + MI_CpuCopy16(&v3[Unk_ov16_0226F41C[param0->type][0].size], (void *)((u32)v2 + Unk_ov16_0226F41C[param0->type][1].pos + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F41C[param0->type][1].size); } Heap_FreeToHeap(v0); @@ -1235,7 +1269,7 @@ static void Healthbar_DrawMaxHP (Healthbar * param0) v1 = SpriteActor_ImageProxy(param0->mainActor->unk_00); v3 = v0; - MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F3BC[param0->type].unk_00 + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3BC[param0->type].unk_02); + MI_CpuCopy16(v3, (void *)((u32)v2 + Unk_ov16_0226F3BC[param0->type].pos + v1->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F3BC[param0->type].size); } Heap_FreeToHeap(v0); @@ -1258,7 +1292,7 @@ static void Healthbar_DrawCaughtIcon (Healthbar * param0) v2 = G2_GetOBJCharPtr(); v0 = SpriteActor_ImageProxy(param0->mainActor->unk_00); - MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F38C[param0->type].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F38C[param0->type].unk_02); + MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F38C[param0->type].pos + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F38C[param0->type].size); } } @@ -1275,7 +1309,7 @@ static void Healthbar_DrawStatusIcon (Healthbar * param0, int param1) v2 = G2_GetOBJCharPtr(); v0 = SpriteActor_ImageProxy(param0->mainActor->unk_00); - MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F35C[param0->type].unk_00 + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F35C[param0->type].unk_02); + MI_CpuCopy16(v1, (void *)((u32)v2 + Unk_ov16_0226F35C[param0->type].pos + v0->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F35C[param0->type].size); } } @@ -1311,11 +1345,11 @@ static void Healthbar_DrawBallCount (Healthbar * param0, u32 param1) v7 = v1; v8 = &v1[13 * 0x20]; - MI_CpuCopy16(v7, (void *)((u32)v6 + Unk_ov16_0226F33C[0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F33C[0].unk_02); - MI_CpuCopy16(v8, (void *)((u32)v6 + Unk_ov16_0226F33C[1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F33C[1].unk_02); + MI_CpuCopy16(v7, (void *)((u32)v6 + Unk_ov16_0226F33C[0].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F33C[0].size); + MI_CpuCopy16(v8, (void *)((u32)v6 + Unk_ov16_0226F33C[1].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F33C[1].size); - MI_CpuCopy16(&v7[Unk_ov16_0226F33C[0].unk_02], (void *)((u32)v6 + Unk_ov16_0226F33C[2].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F33C[2].unk_02); - MI_CpuCopy16(&v8[Unk_ov16_0226F33C[1].unk_02], (void *)((u32)v6 + Unk_ov16_0226F33C[3].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F33C[3].unk_02); + MI_CpuCopy16(&v7[Unk_ov16_0226F33C[0].size], (void *)((u32)v6 + Unk_ov16_0226F33C[2].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F33C[2].size); + MI_CpuCopy16(&v8[Unk_ov16_0226F33C[1].size], (void *)((u32)v6 + Unk_ov16_0226F33C[3].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F33C[3].size); } BGL_DeleteWindow(&v3); @@ -1359,10 +1393,10 @@ static void Healthbar_DrawBallsLeftMessage (Healthbar * param0, u32 param1) v9 = v1; v10 = &v1[13 * 0x20]; - MI_CpuCopy16(v9, (void *)((u32)v8 + Unk_ov16_0226F34C[0].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F34C[0].unk_02); - MI_CpuCopy16(v10, (void *)((u32)v8 + Unk_ov16_0226F34C[1].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F34C[1].unk_02); - MI_CpuCopy16(&v9[Unk_ov16_0226F34C[0].unk_02], (void *)((u32)v8 + Unk_ov16_0226F34C[2].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F34C[2].unk_02); - MI_CpuCopy16(&v10[Unk_ov16_0226F34C[1].unk_02], (void *)((u32)v8 + Unk_ov16_0226F34C[3].unk_00 + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F34C[3].unk_02); + MI_CpuCopy16(v9, (void *)((u32)v8 + Unk_ov16_0226F34C[0].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F34C[0].size); + MI_CpuCopy16(v10, (void *)((u32)v8 + Unk_ov16_0226F34C[1].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F34C[1].size); + MI_CpuCopy16(&v9[Unk_ov16_0226F34C[0].size], (void *)((u32)v8 + Unk_ov16_0226F34C[2].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F34C[2].size); + MI_CpuCopy16(&v10[Unk_ov16_0226F34C[1].size], (void *)((u32)v8 + Unk_ov16_0226F34C[3].pos + v2->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), Unk_ov16_0226F34C[3].size); } BGL_DeleteWindow(&v3); @@ -1442,13 +1476,13 @@ static void DrawGauge (Healthbar * param0, u8 param1) } v6 = ov16_02268250(v3); - v9 = Unk_ov16_0226F44C[param0->type][0].unk_02 / 0x20; + v9 = Unk_ov16_0226F44C[param0->type][0].size / 0x20; for (v0 = 0; v0 < 6; v0++) { if (v0 < v9) { - MI_CpuCopy16(v6 + (v1[v0] << 5), (void *)((u32)v7 + Unk_ov16_0226F44C[param0->type][0].unk_00 + (v0 * 0x20) + v8->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v6 + (v1[v0] << 5), (void *)((u32)v7 + Unk_ov16_0226F44C[param0->type][0].pos + (v0 * 0x20) + v8->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); } else { - MI_CpuCopy16(v6 + (v1[v0] << 5), (void *)((u32)v7 + Unk_ov16_0226F44C[param0->type][1].unk_00 + ((v0 - v9) * 0x20) + v8->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); + MI_CpuCopy16(v6 + (v1[v0] << 5), (void *)((u32)v7 + Unk_ov16_0226F44C[param0->type][1].pos + ((v0 - v9) * 0x20) + v8->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); } } break;