s/Pp/PP/g

This commit is contained in:
Martin Griffin
2026-06-18 20:58:49 +01:00
parent c2dcc629fd
commit e56dfdbc2b
22 changed files with 104 additions and 104 deletions

View File

@@ -2053,7 +2053,7 @@ BattleScript_EffectFakeOut::
BattleScript_FailedFromAtkString::
attackstring
BattleScript_FailedFromPpReduce::
BattleScript_FailedFromPPReduce::
ppreduce
BattleScript_ButItFailed::
pause B_WAIT_TIME_SHORT
@@ -2367,7 +2367,7 @@ BattleScript_EffectWish::
BattleScript_EffectAssist::
attackcanceler
attackstring
assistattackselect BattleScript_FailedFromPpReduce
assistattackselect BattleScript_FailedFromPPReduce
attackanimation
waitanimation
setbyte sB_ANIM_TURN, 0
@@ -3659,7 +3659,7 @@ BattleScript_SelectingImprisonedMoveInPalace::
printstring STRINGID_PKMNCANTUSEMOVESEALED
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_GrudgeTakesPp::
BattleScript_GrudgeTakesPP::
printstring STRINGID_PKMNLOSTPPGRUDGE
waitmessage B_WAIT_TIME_LONG
return

View File

@@ -165,7 +165,7 @@ struct HpAndStatus
u32 status;
};
struct MovePpInfo
struct MovePPInfo
{
u16 moves[MAX_MON_MOVES];
u8 pp[MAX_MON_MOVES];
@@ -175,8 +175,8 @@ struct MovePpInfo
struct ChooseMoveStruct
{
u16 moves[MAX_MON_MOVES];
u8 currentPp[MAX_MON_MOVES];
u8 maxPp[MAX_MON_MOVES];
u8 currentPP[MAX_MON_MOVES];
u8 maxPP[MAX_MON_MOVES];
u16 species;
u8 monTypes[2];
};
@@ -269,7 +269,7 @@ void BtlController_EmitPrintString(u8 bufferId, u16 stringId);
void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringId);
void BtlController_EmitChooseAction(u8 bufferId, u8 action, u16 itemId);
void BtlController_EmitYesNoBox(u8 bufferId);
void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 noPPNumber, struct ChooseMoveStruct *movePPData);
void BtlController_EmitChooseItem(u8 bufferId, u8 *battlePartyOrder);
void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8 *data);
void BtlController_EmitHealthBarUpdate(u8 bufferId, u16 hpValue);

View File

@@ -218,8 +218,8 @@ void BufferStringBattle(u16 stringID);
u32 BattleStringExpandPlaceholdersToDisplayedString(const u8 *src);
u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst);
void BattlePutTextOnWindow(const u8 *text, u8 windowId);
void SetPpNumbersPaletteInMoveSelection(void);
u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp);
void SetPPNumbersPaletteInMoveSelection(void);
u8 GetCurrentPPToMaxPPState(u8 currentPP, u8 maxPP);
extern struct BattleMsgData *gBattleMsgDataPtr;
@@ -241,7 +241,7 @@ extern const u8 gText_BattleMenu[];
extern const u8 gText_SafariZoneMenu[];
extern const u8 gText_MoveInterfacePP[];
extern const u8 gText_MoveInterfaceType[];
extern const u8 gText_MoveInterfacePpType[];
extern const u8 gText_MoveInterfacePPType[];
extern const u8 gText_MoveInterfaceDynamicColors[];
extern const u8 gText_WhichMoveToForget4[];
extern const u8 gText_BattleYesNoChoice[];

View File

@@ -90,7 +90,7 @@ extern const u8 BattleScript_KnockedOff[];
extern const u8 BattleScript_MoveUsedIsImprisoned[];
extern const u8 BattleScript_SelectingImprisonedMove[];
extern const u8 BattleScript_SelectingImprisonedMoveInPalace[];
extern const u8 BattleScript_GrudgeTakesPp[];
extern const u8 BattleScript_GrudgeTakesPP[];
extern const u8 BattleScript_MagicCoatBounce[];
extern const u8 BattleScript_SnatchedMove[];
extern const u8 BattleScript_EnduredMsg[];

View File

@@ -2118,7 +2118,7 @@ extern const u8 gText_PokemonCantBeSame[];
extern const u8 gText_NoIdenticalHoldItems[];
extern const u8 gText_DoWhatWithPokemon[];
extern const u8 gText_RestoreWhichMove[];
extern const u8 gText_BoostPp[];
extern const u8 gText_BoostPP[];
extern const u8 gText_DoWhatWithItem[];
extern const u8 gText_DoWhatWithMail[];
extern const u8 gText_AlreadyHoldingOne[];

View File

@@ -555,7 +555,7 @@ static void LinkOpponentHandleGetMonData(void)
static u32 CopyLinkOpponentMonData(u8 monId, u8 *dst)
{
struct BattlePokemon battleMon;
struct MovePpInfo moveData;
struct MovePPInfo moveData;
u8 nickname[POKEMON_NAME_BUFFER_SIZE];
u8 *src;
s16 data16;
@@ -888,7 +888,7 @@ static void LinkOpponentHandleSetMonData(void)
static void SetLinkOpponentMonData(u8 monId)
{
struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBattler][3];
struct MovePpInfo *moveData = (struct MovePpInfo *)&gBattleBufferA[gActiveBattler][3];
struct MovePPInfo *moveData = (struct MovePPInfo *)&gBattleBufferA[gActiveBattler][3];
s32 i;
switch (gBattleBufferA[gActiveBattler][1])

View File

@@ -449,7 +449,7 @@ static void LinkPartnerHandleGetMonData(void)
static u32 CopyLinkPartnerMonData(u8 monId, u8 *dst)
{
struct BattlePokemon battleMon;
struct MovePpInfo moveData;
struct MovePPInfo moveData;
u8 nickname[POKEMON_NAME_BUFFER_SIZE];
u8 *src;
s16 data16;
@@ -782,7 +782,7 @@ static void LinkPartnerHandleSetMonData(void)
static void SetLinkPartnerMonData(u8 monId)
{
struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBattler][3];
struct MovePpInfo *moveData = (struct MovePpInfo *)&gBattleBufferA[gActiveBattler][3];
struct MovePPInfo *moveData = (struct MovePPInfo *)&gBattleBufferA[gActiveBattler][3];
s32 i;
switch (gBattleBufferA[gActiveBattler][1])

View File

@@ -568,7 +568,7 @@ static void OpponentHandleGetMonData(void)
static u32 GetOpponentMonData(u8 monId, u8 *dst)
{
struct BattlePokemon battleMon;
struct MovePpInfo moveData;
struct MovePPInfo moveData;
u8 nickname[POKEMON_NAME_BUFFER_SIZE];
u8 *src;
s16 data16;
@@ -910,7 +910,7 @@ static void OpponentHandleSetMonData(void)
static void SetOpponentMonData(u8 monId)
{
struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBattler][3];
struct MovePpInfo *moveData = (struct MovePpInfo *)&gBattleBufferA[gActiveBattler][3];
struct MovePPInfo *moveData = (struct MovePPInfo *)&gBattleBufferA[gActiveBattler][3];
s32 i;
switch (gBattleBufferA[gActiveBattler][1])

View File

@@ -98,8 +98,8 @@ static void HandleInputChooseTarget(void);
static void HandleInputChooseMove(void);
static void MoveSelectionCreateCursorAt(u8, u8);
static void MoveSelectionDestroyCursorAt(u8);
static void MoveSelectionDisplayPpNumber(void);
static void MoveSelectionDisplayPpString(void);
static void MoveSelectionDisplayPPNumber(void);
static void MoveSelectionDisplayPPString(void);
static void MoveSelectionDisplayMoveType(void);
static void MoveSelectionDisplayMoveNames(void);
static void HandleMoveSwitching(void);
@@ -510,7 +510,7 @@ static void HandleInputChooseMove(void)
if (!(moveTarget & (MOVE_TARGET_RANDOM | MOVE_TARGET_BOTH | MOVE_TARGET_DEPENDS | MOVE_TARGET_FOES_AND_ALLY | MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_USER)))
canSelectTarget++; // either selected or user
if (moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]] == 0)
if (moveInfo->currentPP[gMoveSelectionCursor[gActiveBattler]] == 0)
{
canSelectTarget = FALSE;
}
@@ -554,7 +554,7 @@ static void HandleInputChooseMove(void)
gMoveSelectionCursor[gActiveBattler] ^= 1;
PlaySE(SE_SELECT);
MoveSelectionCreateCursorAt(gMoveSelectionCursor[gActiveBattler], 0);
MoveSelectionDisplayPpNumber();
MoveSelectionDisplayPPNumber();
MoveSelectionDisplayMoveType();
}
}
@@ -567,7 +567,7 @@ static void HandleInputChooseMove(void)
gMoveSelectionCursor[gActiveBattler] ^= 1;
PlaySE(SE_SELECT);
MoveSelectionCreateCursorAt(gMoveSelectionCursor[gActiveBattler], 0);
MoveSelectionDisplayPpNumber();
MoveSelectionDisplayPPNumber();
MoveSelectionDisplayMoveType();
}
}
@@ -579,7 +579,7 @@ static void HandleInputChooseMove(void)
gMoveSelectionCursor[gActiveBattler] ^= 2;
PlaySE(SE_SELECT);
MoveSelectionCreateCursorAt(gMoveSelectionCursor[gActiveBattler], 0);
MoveSelectionDisplayPpNumber();
MoveSelectionDisplayPPNumber();
MoveSelectionDisplayMoveType();
}
}
@@ -592,7 +592,7 @@ static void HandleInputChooseMove(void)
gMoveSelectionCursor[gActiveBattler] ^= 2;
PlaySE(SE_SELECT);
MoveSelectionCreateCursorAt(gMoveSelectionCursor[gActiveBattler], 0);
MoveSelectionDisplayPpNumber();
MoveSelectionDisplayPPNumber();
MoveSelectionDisplayMoveType();
}
}
@@ -684,13 +684,13 @@ static void HandleMoveSwitching(void)
moveInfo->moves[gMoveSelectionCursor[gActiveBattler]] = moveInfo->moves[gMultiUsePlayerCursor];
moveInfo->moves[gMultiUsePlayerCursor] = i;
i = moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]];
moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]] = moveInfo->currentPp[gMultiUsePlayerCursor];
moveInfo->currentPp[gMultiUsePlayerCursor] = i;
i = moveInfo->currentPP[gMoveSelectionCursor[gActiveBattler]];
moveInfo->currentPP[gMoveSelectionCursor[gActiveBattler]] = moveInfo->currentPP[gMultiUsePlayerCursor];
moveInfo->currentPP[gMultiUsePlayerCursor] = i;
i = moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]];
moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]] = moveInfo->maxPp[gMultiUsePlayerCursor];
moveInfo->maxPp[gMultiUsePlayerCursor] = i;
i = moveInfo->maxPP[gMoveSelectionCursor[gActiveBattler]];
moveInfo->maxPP[gMoveSelectionCursor[gActiveBattler]] = moveInfo->maxPP[gMultiUsePlayerCursor];
moveInfo->maxPP[gMultiUsePlayerCursor] = i;
if (gDisableStructs[gActiveBattler].mimickedMoves & gBitTable[gMoveSelectionCursor[gActiveBattler]])
{
@@ -716,7 +716,7 @@ static void HandleMoveSwitching(void)
for (i = 0; i < MAX_MON_MOVES; i++)
{
gBattleMons[gActiveBattler].moves[i] = moveInfo->moves[i];
gBattleMons[gActiveBattler].pp[i] = moveInfo->currentPp[i];
gBattleMons[gActiveBattler].pp[i] = moveInfo->currentPP[i];
}
if (!(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED))
@@ -724,7 +724,7 @@ static void HandleMoveSwitching(void)
for (i = 0; i < MAX_MON_MOVES; i++)
{
moveStruct.moves[i] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1 + i);
moveStruct.currentPp[i] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_PP1 + i);
moveStruct.currentPP[i] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_PP1 + i);
}
totalPPBonuses = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_PP_BONUSES);
@@ -735,9 +735,9 @@ static void HandleMoveSwitching(void)
moveStruct.moves[gMoveSelectionCursor[gActiveBattler]] = moveStruct.moves[gMultiUsePlayerCursor];
moveStruct.moves[gMultiUsePlayerCursor] = i;
i = moveStruct.currentPp[gMoveSelectionCursor[gActiveBattler]];
moveStruct.currentPp[gMoveSelectionCursor[gActiveBattler]] = moveStruct.currentPp[gMultiUsePlayerCursor];
moveStruct.currentPp[gMultiUsePlayerCursor] = i;
i = moveStruct.currentPP[gMoveSelectionCursor[gActiveBattler]];
moveStruct.currentPP[gMoveSelectionCursor[gActiveBattler]] = moveStruct.currentPP[gMultiUsePlayerCursor];
moveStruct.currentPP[gMultiUsePlayerCursor] = i;
totalPPBonuses = perMovePPBonuses[gMoveSelectionCursor[gActiveBattler]];
perMovePPBonuses[gMoveSelectionCursor[gActiveBattler]] = perMovePPBonuses[gMultiUsePlayerCursor];
@@ -750,7 +750,7 @@ static void HandleMoveSwitching(void)
for (i = 0; i < MAX_MON_MOVES; i++)
{
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1 + i, &moveStruct.moves[i]);
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_PP1 + i, &moveStruct.currentPp[i]);
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_PP1 + i, &moveStruct.currentPP[i]);
}
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_PP_BONUSES, &totalPPBonuses);
@@ -760,8 +760,8 @@ static void HandleMoveSwitching(void)
gBattlerControllerFuncs[gActiveBattler] = HandleInputChooseMove;
gMoveSelectionCursor[gActiveBattler] = gMultiUsePlayerCursor;
MoveSelectionCreateCursorAt(gMoveSelectionCursor[gActiveBattler], 0);
MoveSelectionDisplayPpString();
MoveSelectionDisplayPpNumber();
MoveSelectionDisplayPPString();
MoveSelectionDisplayPPNumber();
MoveSelectionDisplayMoveType();
}
else if (JOY_NEW(B_BUTTON | SELECT_BUTTON))
@@ -770,8 +770,8 @@ static void HandleMoveSwitching(void)
MoveSelectionDestroyCursorAt(gMultiUsePlayerCursor);
MoveSelectionCreateCursorAt(gMoveSelectionCursor[gActiveBattler], 0);
gBattlerControllerFuncs[gActiveBattler] = HandleInputChooseMove;
MoveSelectionDisplayPpString();
MoveSelectionDisplayPpNumber();
MoveSelectionDisplayPPString();
MoveSelectionDisplayPPNumber();
MoveSelectionDisplayMoveType();
}
else if (JOY_NEW(DPAD_LEFT))
@@ -1470,25 +1470,25 @@ static void MoveSelectionDisplayMoveNames(void)
}
}
static void MoveSelectionDisplayPpString(void)
static void MoveSelectionDisplayPPString(void)
{
StringCopy(gDisplayedStringBattle, gText_MoveInterfacePP);
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_PP);
}
static void MoveSelectionDisplayPpNumber(void)
static void MoveSelectionDisplayPPNumber(void)
{
u8 *txtPtr;
struct ChooseMoveStruct *moveInfo;
if (gBattleBufferA[gActiveBattler][2] == TRUE) // check if we didn't want to display pp number
if (gBattleBufferA[gActiveBattler][2] == TRUE) // check if we didn't want to display PP number
return;
SetPpNumbersPaletteInMoveSelection();
SetPPNumbersPaletteInMoveSelection();
moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
txtPtr = ConvertIntToDecimalStringN(gDisplayedStringBattle, moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
txtPtr = ConvertIntToDecimalStringN(gDisplayedStringBattle, moveInfo->currentPP[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
*(txtPtr)++ = CHAR_SLASH;
ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPP[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_PP_REMAINING);
}
@@ -1607,7 +1607,7 @@ static void PlayerHandleGetMonData(void)
static u32 CopyPlayerMonData(u8 monId, u8 *dst)
{
struct BattlePokemon battleMon;
struct MovePpInfo moveData;
struct MovePPInfo moveData;
u8 nickname[POKEMON_NAME_BUFFER_SIZE];
u8 *src;
s16 data16;
@@ -1949,7 +1949,7 @@ static void PlayerHandleSetMonData(void)
static void SetPlayerMonData(u8 monId)
{
struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBattler][3];
struct MovePpInfo *moveData = (struct MovePpInfo *)&gBattleBufferA[gActiveBattler][3];
struct MovePPInfo *moveData = (struct MovePPInfo *)&gBattleBufferA[gActiveBattler][3];
s32 i;
switch (gBattleBufferA[gActiveBattler][1])
@@ -2645,8 +2645,8 @@ void InitMoveSelectionsVarsAndStrings(void)
MoveSelectionDisplayMoveNames();
gMultiUsePlayerCursor = 0xFF;
MoveSelectionCreateCursorAt(gMoveSelectionCursor[gActiveBattler], 0);
MoveSelectionDisplayPpString();
MoveSelectionDisplayPpNumber();
MoveSelectionDisplayPPString();
MoveSelectionDisplayPPNumber();
MoveSelectionDisplayMoveType();
}

View File

@@ -633,7 +633,7 @@ static void PlayerPartnerHandleGetMonData(void)
static u32 CopyPlayerPartnerMonData(u8 monId, u8 *dst)
{
struct BattlePokemon battleMon;
struct MovePpInfo moveData;
struct MovePPInfo moveData;
u8 nickname[POKEMON_NAME_BUFFER_SIZE];
u8 *src;
s16 data16;
@@ -966,7 +966,7 @@ static void PlayerPartnerHandleSetMonData(void)
static void SetPlayerPartnerMonData(u8 monId)
{
struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBattler][3];
struct MovePpInfo *moveData = (struct MovePpInfo *)&gBattleBufferA[gActiveBattler][3];
struct MovePPInfo *moveData = (struct MovePPInfo *)&gBattleBufferA[gActiveBattler][3];
s32 i;
switch (gBattleBufferA[gActiveBattler][1])

View File

@@ -541,7 +541,7 @@ static void RecordedOpponentHandleGetMonData(void)
static u32 CopyRecordedOpponentMonData(u8 monId, u8 *dst)
{
struct BattlePokemon battleMon;
struct MovePpInfo moveData;
struct MovePPInfo moveData;
u8 nickname[POKEMON_NAME_BUFFER_SIZE];
u8 *src;
s16 data16;
@@ -874,7 +874,7 @@ static void RecordedOpponentHandleSetMonData(void)
static void SetRecordedOpponentMonData(u8 monId)
{
struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBattler][3];
struct MovePpInfo *moveData = (struct MovePpInfo *)&gBattleBufferA[gActiveBattler][3];
struct MovePPInfo *moveData = (struct MovePPInfo *)&gBattleBufferA[gActiveBattler][3];
s32 i;
switch (gBattleBufferA[gActiveBattler][1])

View File

@@ -524,7 +524,7 @@ static void RecordedPlayerHandleGetMonData(void)
static u32 CopyRecordedPlayerMonData(u8 monId, u8 *dst)
{
struct BattlePokemon battleMon;
struct MovePpInfo moveData;
struct MovePPInfo moveData;
u8 nickname[POKEMON_NAME_BUFFER_SIZE];
u8 *src;
s16 data16;
@@ -857,7 +857,7 @@ static void RecordedPlayerHandleSetMonData(void)
static void SetRecordedPlayerMonData(u8 monId)
{
struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBattler][3];
struct MovePpInfo *moveData = (struct MovePpInfo *)&gBattleBufferA[gActiveBattler][3];
struct MovePPInfo *moveData = (struct MovePPInfo *)&gBattleBufferA[gActiveBattler][3];
s32 i;
switch (gBattleBufferA[gActiveBattler][1])

View File

@@ -451,7 +451,7 @@ static void WallyHandleGetMonData(void)
static u32 CopyWallyMonData(u8 monId, u8 *dst)
{
struct BattlePokemon battleMon;
struct MovePpInfo moveData;
struct MovePPInfo moveData;
u8 nickname[POKEMON_NAME_BUFFER_SIZE];
u8 *src;
s16 data16;
@@ -784,7 +784,7 @@ static void WallyHandleSetMonData(void)
static void SetWallyMonData(u8 monId)
{
struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBattler][3];
struct MovePpInfo *moveData = (struct MovePpInfo *)&gBattleBufferA[gActiveBattler][3];
struct MovePPInfo *moveData = (struct MovePPInfo *)&gBattleBufferA[gActiveBattler][3];
s32 i;
switch (gBattleBufferA[gActiveBattler][1])

View File

@@ -1215,17 +1215,17 @@ void BtlController_EmitYesNoBox(u8 bufferId)
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
}
void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData)
void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 noPPNumber, struct ChooseMoveStruct *movePPData)
{
s32 i;
sBattleBuffersTransferData[0] = CONTROLLER_CHOOSEMOVE;
sBattleBuffersTransferData[1] = isDoubleBattle;
sBattleBuffersTransferData[2] = NoPpNumber;
sBattleBuffersTransferData[2] = noPPNumber;
sBattleBuffersTransferData[3] = 0;
for (i = 0; i < sizeof(*movePpData); i++)
sBattleBuffersTransferData[4 + i] = *((u8 *)(movePpData) + i);
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, sizeof(*movePpData) + 4);
for (i = 0; i < sizeof(*movePPData); i++)
sBattleBuffersTransferData[4 + i] = *((u8 *)(movePPData) + i);
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, sizeof(*movePPData) + 4);
}
void BtlController_EmitChooseItem(u8 bufferId, u8 *battlePartyOrder)

View File

@@ -150,7 +150,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void)
{
if (moveInfo->moves[i] == MOVE_NONE)
break;
if (selectedGroup == GetBattlePalaceMoveGroup(moveInfo->moves[i]) && moveInfo->currentPp[i] != 0)
if (selectedGroup == GetBattlePalaceMoveGroup(moveInfo->moves[i]) && moveInfo->currentPP[i] != 0)
selectedMoves |= gBitTable[i];
}

View File

@@ -4207,8 +4207,8 @@ static void HandleTurnActionSelectionState(void)
for (i = 0; i < MAX_MON_MOVES; i++)
{
moveInfo.moves[i] = gBattleMons[gActiveBattler].moves[i];
moveInfo.currentPp[i] = gBattleMons[gActiveBattler].pp[i];
moveInfo.maxPp[i] = CalculatePPWithBonus(
moveInfo.currentPP[i] = gBattleMons[gActiveBattler].pp[i];
moveInfo.maxPP[i] = CalculatePPWithBonus(
gBattleMons[gActiveBattler].moves[i],
gBattleMons[gActiveBattler].ppBonuses,
i);

View File

@@ -1276,7 +1276,7 @@ const u8 gText_BattleMenu[] = _("FIGHT{CLEAR_TO 56}BAG\nPOKéMON{CLEAR_TO 56}RUN
const u8 gText_SafariZoneMenu[] = _("BALL{CLEAR_TO 56}{POKEBLOCK}\nGO NEAR{CLEAR_TO 56}RUN");
const u8 gText_MoveInterfacePP[] = _("PP ");
const u8 gText_MoveInterfaceType[] = _("TYPE/");
const u8 gText_MoveInterfacePpType[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}PP\nTYPE/");
const u8 gText_MoveInterfacePPType[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}PP\nTYPE/");
const u8 gText_MoveInterfaceDynamicColors[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}");
const u8 gText_WhichMoveToForget4[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Which move should\nbe forgotten?");
const u8 gText_BattleYesNoChoice[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Yes\nNo");
@@ -3030,12 +3030,12 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
}
}
void SetPpNumbersPaletteInMoveSelection(void)
void SetPPNumbersPaletteInMoveSelection(void)
{
struct ChooseMoveStruct *chooseMoveStruct = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
const u16 *palPtr = gPPTextPalette;
u8 var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBattler]],
chooseMoveStruct->maxPp[gMoveSelectionCursor[gActiveBattler]]);
u8 var = GetCurrentPPToMaxPPState(chooseMoveStruct->currentPP[gMoveSelectionCursor[gActiveBattler]],
chooseMoveStruct->maxPP[gMoveSelectionCursor[gActiveBattler]]);
gPlttBufferUnfaded[BG_PLTT_ID(5) + 12] = palPtr[(var * 2) + 0];
gPlttBufferUnfaded[BG_PLTT_ID(5) + 11] = palPtr[(var * 2) + 1];
@@ -3044,33 +3044,33 @@ void SetPpNumbersPaletteInMoveSelection(void)
CpuCopy16(&gPlttBufferUnfaded[BG_PLTT_ID(5) + 11], &gPlttBufferFaded[BG_PLTT_ID(5) + 11], PLTT_SIZEOF(1));
}
u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp)
u8 GetCurrentPPToMaxPPState(u8 currentPP, u8 maxPP)
{
if (maxPp == currentPp)
if (maxPP == currentPP)
{
return 3;
}
else if (maxPp <= 2)
else if (maxPP <= 2)
{
if (currentPp > 1)
if (currentPP > 1)
return 3;
else
return 2 - currentPp;
return 2 - currentPP;
}
else if (maxPp <= 7)
else if (maxPP <= 7)
{
if (currentPp > 2)
if (currentPP > 2)
return 3;
else
return 2 - currentPp;
return 2 - currentPP;
}
else
{
if (currentPp == 0)
if (currentPP == 0)
return 2;
if (currentPp <= maxPp / 4)
if (currentPP <= maxPP / 4)
return 1;
if (currentPp > maxPp / 2)
if (currentPP > maxPP / 2)
return 3;
}

View File

@@ -3034,7 +3034,7 @@ static void Cmd_tryfaintmon(void)
gBattleMons[gBattlerAttacker].pp[moveIndex] = 0;
BattleScriptPush(gBattlescriptCurrInstr);
gBattlescriptCurrInstr = BattleScript_GrudgeTakesPp;
gBattlescriptCurrInstr = BattleScript_GrudgeTakesPP;
gActiveBattler = gBattlerAttacker;
BtlController_EmitSetMonData(B_COMM_TO_CONTROLLER, moveIndex + REQUEST_PPMOVE1_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].pp[moveIndex]), &gBattleMons[gActiveBattler].pp[moveIndex]);
MarkBattlerForControllerExec(gActiveBattler);
@@ -8166,7 +8166,7 @@ static void Cmd_copymovepermanently(void)
}
else // sketch worked
{
struct MovePpInfo movePpData;
struct MovePPInfo movePPData;
gBattleMons[gBattlerAttacker].moves[gCurrMovePos] = gLastPrintedMoves[gBattlerTarget];
gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = gBattleMoves[gLastPrintedMoves[gBattlerTarget]].pp;
@@ -8174,12 +8174,12 @@ static void Cmd_copymovepermanently(void)
for (i = 0; i < MAX_MON_MOVES; i++)
{
movePpData.moves[i] = gBattleMons[gBattlerAttacker].moves[i];
movePpData.pp[i] = gBattleMons[gBattlerAttacker].pp[i];
movePPData.moves[i] = gBattleMons[gBattlerAttacker].moves[i];
movePPData.pp[i] = gBattleMons[gBattlerAttacker].pp[i];
}
movePpData.ppBonuses = gBattleMons[gBattlerAttacker].ppBonuses;
movePPData.ppBonuses = gBattleMons[gBattlerAttacker].ppBonuses;
BtlController_EmitSetMonData(B_COMM_TO_CONTROLLER, REQUEST_MOVES_PP_BATTLE, 0, sizeof(movePpData), &movePpData);
BtlController_EmitSetMonData(B_COMM_TO_CONTROLLER, REQUEST_MOVES_PP_BATTLE, 0, sizeof(movePPData), &movePPData);
MarkBattlerForControllerExec(gActiveBattler);
PREPARE_MOVE_BUFFER(gBattleTextBuff1, gLastPrintedMoves[gBattlerTarget])

View File

@@ -620,7 +620,7 @@ static const u8 *const sActionStringTable[] =
[PARTY_MSG_UNUSED] = gText_EmptyString2,
[PARTY_MSG_DO_WHAT_WITH_MON] = gText_DoWhatWithPokemon,
[PARTY_MSG_RESTORE_WHICH_MOVE] = gText_RestoreWhichMove,
[PARTY_MSG_BOOST_PP_WHICH_MOVE] = gText_BoostPp,
[PARTY_MSG_BOOST_PP_WHICH_MOVE] = gText_BoostPP,
[PARTY_MSG_DO_WHAT_WITH_ITEM] = gText_DoWhatWithItem,
[PARTY_MSG_DO_WHAT_WITH_MAIL] = gText_DoWhatWithMail,
[PARTY_MSG_ALREADY_HOLDING_ONE] = gText_AlreadyHoldingOne,

View File

@@ -3545,7 +3545,7 @@ static void PrintMoveNameAndPP(u8 moveIndex)
DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, gStringVar2);
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, sMovesPPLayout);
text = gStringVar4;
ppState = GetCurrentPpToMaxPpState(summary->pp[moveIndex], pp) + 9;
ppState = GetCurrentPPToMaxPPState(summary->pp[moveIndex], pp) + 9;
x = GetStringRightAlignXOffset(FONT_NORMAL, text, 44);
}
else

View File

@@ -749,7 +749,7 @@ void RecordedBattle_CheckMovesetChanges(u8 mode)
u8 ppBonuses[MAX_MON_MOVES];
u8 moveSlots[MAX_MON_MOVES];
u8 mimickedMoveSlots[MAX_MON_MOVES];
struct ChooseMoveStruct movePp;
struct ChooseMoveStruct movePP;
u8 ppBonusSet;
// We know the current action is ACTION_MOVE_CHANGE, retrieve
@@ -762,21 +762,21 @@ void RecordedBattle_CheckMovesetChanges(u8 mode)
for (j = 0; j < MAX_MON_MOVES; j++)
{
moveSlots[j] = RecordedBattle_GetBattlerAction(battler);
movePp.moves[j] = gBattleMons[battler].moves[moveSlots[j]];
movePp.currentPp[j] = gBattleMons[battler].pp[moveSlots[j]];
movePp.maxPp[j] = ppBonuses[moveSlots[j]];
movePP.moves[j] = gBattleMons[battler].moves[moveSlots[j]];
movePP.currentPP[j] = gBattleMons[battler].pp[moveSlots[j]];
movePP.maxPP[j] = ppBonuses[moveSlots[j]];
mimickedMoveSlots[j] = (gDisableStructs[battler].mimickedMoves & gBitTable[j]) >> j;
}
for (j = 0; j < MAX_MON_MOVES; j++)
{
gBattleMons[battler].moves[j] = movePp.moves[j];
gBattleMons[battler].pp[j] = movePp.currentPp[j];
gBattleMons[battler].moves[j] = movePP.moves[j];
gBattleMons[battler].pp[j] = movePP.currentPP[j];
}
gBattleMons[battler].ppBonuses = 0;
gDisableStructs[battler].mimickedMoves = 0;
for (j = 0; j < MAX_MON_MOVES; j++)
{
gBattleMons[battler].ppBonuses |= movePp.maxPp[j] << (j << 1);
gBattleMons[battler].ppBonuses |= movePP.maxPP[j] << (j << 1);
gDisableStructs[battler].mimickedMoves |= mimickedMoveSlots[j] << j;
}
@@ -787,18 +787,18 @@ void RecordedBattle_CheckMovesetChanges(u8 mode)
for (j = 0; j < MAX_MON_MOVES; j++)
{
movePp.moves[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_MOVE1 + moveSlots[j], NULL);
movePp.currentPp[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_PP1 + moveSlots[j], NULL);
movePp.maxPp[j] = ppBonuses[moveSlots[j]];
movePP.moves[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_MOVE1 + moveSlots[j], NULL);
movePP.currentPP[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_PP1 + moveSlots[j], NULL);
movePP.maxPP[j] = ppBonuses[moveSlots[j]];
}
for (j = 0; j < MAX_MON_MOVES; j++)
{
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_MOVE1 + j, &movePp.moves[j]);
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_PP1 + j, &movePp.currentPp[j]);
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_MOVE1 + j, &movePP.moves[j]);
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_PP1 + j, &movePP.currentPP[j]);
}
ppBonusSet = 0;
for (j = 0; j < MAX_MON_MOVES; j++)
ppBonusSet |= movePp.maxPp[j] << (j << 1);
ppBonusSet |= movePP.maxPP[j] << (j << 1);
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_PP_BONUSES, &ppBonusSet);
}

View File

@@ -437,7 +437,7 @@ const u8 gText_CantSurfHere[] = _("You can't SURF here.");
const u8 gText_AlreadySurfing[] = _("You're already SURFING.");
const u8 gText_CantUseHere[] = _("Can't use that here.");
const u8 gText_RestoreWhichMove[] = _("Restore which move?");
const u8 gText_BoostPp[] = _("Boost PP of which move?");
const u8 gText_BoostPP[] = _("Boost PP of which move?");
const u8 gText_DoWhatWithItem[] = _("Do what with an item?");
const u8 gText_NoPokemonForBattle[] = _("No POKéMON for battle!");
const u8 gText_ChoosePokemon2[] = _("Choose a POKéMON.");