Deprecate GetBerryCountString (#4012)

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
This commit is contained in:
Bassoonian 2024-01-18 18:59:42 +01:00 committed by GitHub
parent 9efdd9e0cd
commit 1aff65029f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 24 deletions

View File

@ -39,7 +39,6 @@ void ApplyNewEncryptionKeyToBagItems_(u32 newKey);
void SetBagItemsPointers(void);
void CopyItemName(u16 itemId, u8 *dst);
void CopyItemNameHandlePlural(u16 itemId, u8 *dst, u32 quantity);
void GetBerryCountString(u8 *dst, const u8 *berryName, u32 quantity);
bool8 IsBagPocketNonEmpty(u8 pocket);
bool8 CheckBagHasItem(u16 itemId, u16 count);
bool8 HasAtLeastOneBerry(void);

View File

@ -1982,11 +1982,6 @@ void GetBerryNameByBerryType(u8 berry, u8 *string)
string[BERRY_NAME_LENGTH] = EOS;
}
void GetBerryCountStringByBerryType(u8 berry, u8 *dest, u32 berryCount)
{
GetBerryCountString(dest, GetBerryInfo(berry)->name, berryCount);
}
void AllowBerryTreeGrowth(u8 id)
{
GetBerryTreeInfo(id)->stopGrowth = FALSE;
@ -2122,7 +2117,7 @@ void ObjectEventInteractionGetBerryTreeData(void)
gSpecialVar_0x8004 = GetStageByBerryTreeId(id);
gSpecialVar_0x8005 = GetNumStagesWateredByBerryTreeId(id);
gSpecialVar_0x8006 = GetBerryCountByBerryTreeId(id);
GetBerryCountStringByBerryType(berry, gStringVar1, gSpecialVar_0x8006);
CopyItemNameHandlePlural(BerryTypeToItemId(berry), gStringVar1, gSpecialVar_0x8006);
}
void ObjectEventInteractionGetBerryName(void)
@ -2136,12 +2131,12 @@ void ObjectEventInteractionGetBerryCountString(void)
u8 treeId = GetObjectEventBerryTreeId(gSelectedObjectEvent);
u8 berry = GetBerryTypeByBerryTreeId(treeId);
u8 count = GetBerryCountByBerryTreeId(treeId);
GetBerryCountStringByBerryType(berry, gStringVar1, count);
CopyItemNameHandlePlural(BerryTypeToItemId(berry), gStringVar1, count);
berry = GetTreeMutationValue(treeId);
if (berry > 0)
{
count = 1;
GetBerryCountStringByBerryType(berry, gStringVar3, count);
CopyItemNameHandlePlural(BerryTypeToItemId(berry), gStringVar3, count);
gSpecialVar_Result = TRUE;
}
else

View File

@ -101,21 +101,6 @@ void CopyItemNameHandlePlural(u16 itemId, u8 *dst, u32 quantity)
StringAppend(end, sText_s);
}
void GetBerryCountString(u8 *dst, const u8 *berryName, u32 quantity)
{
const u8 *berryString;
u8 *txtPtr;
if (quantity < 2)
berryString = gText_Berry;
else
berryString = gText_Berries;
txtPtr = StringCopy(dst, berryName);
*txtPtr = CHAR_SPACE;
StringCopy(txtPtr + 1, berryString);
}
bool8 IsBagPocketNonEmpty(u8 pocket)
{
u8 i;