mirror of
https://github.com/pret/pokefirered.git
synced 2026-09-29 20:38:15 -05:00
rename gItems to gItemsInfo
This commit is contained in:
@@ -41,7 +41,7 @@ enum {
|
||||
ITEM_TYPE_PARTY_MENU_MOVES,
|
||||
};
|
||||
|
||||
extern const struct Item gItems[];
|
||||
extern const struct Item gItemsInfo[];
|
||||
extern struct BagPocket gBagPockets[];
|
||||
|
||||
void GetBerryCountString(u8 *dst, const u8 *berryName, u32 quantity);
|
||||
|
||||
@@ -1265,7 +1265,7 @@ static bool32 IsMonGrounded(u16 heldItemEffect, u32 ability, u8 type1, u8 type2)
|
||||
static u32 GetSwitchinHazardsDamage(u32 battler, struct BattlePokemon *battleMon)
|
||||
{
|
||||
u8 defType1 = battleMon->type1, defType2 = battleMon->type2, tSpikesLayers;
|
||||
u16 heldItemEffect = gItems[battleMon->item].holdEffect;
|
||||
u16 heldItemEffect = gItemsInfo[battleMon->item].holdEffect;
|
||||
u32 maxHP = battleMon->maxHP, ability = battleMon->ability, status = battleMon->status1;
|
||||
u32 spikesDamage = 0, tSpikesDamage = 0, hazardDamage = 0;
|
||||
u32 hazardFlags = gSideStatuses[GetBattlerSide(battler)] & (SIDE_STATUS_SPIKES | SIDE_STATUS_STEALTH_ROCK | SIDE_STATUS_STICKY_WEB | SIDE_STATUS_TOXIC_SPIKES | SIDE_STATUS_SAFEGUARD);
|
||||
@@ -1448,7 +1448,7 @@ static u32 GetSwitchinStatusDamage(u32 battler)
|
||||
{
|
||||
u8 defType1 = AI_DATA->switchinCandidate.battleMon.type1, defType2 = AI_DATA->switchinCandidate.battleMon.type2;
|
||||
u8 tSpikesLayers = gSideTimers[GetBattlerSide(battler)].toxicSpikesAmount;
|
||||
u16 heldItemEffect = gItems[AI_DATA->switchinCandidate.battleMon.item].holdEffect;
|
||||
u16 heldItemEffect = gItemsInfo[AI_DATA->switchinCandidate.battleMon.item].holdEffect;
|
||||
u32 status = AI_DATA->switchinCandidate.battleMon.status1, ability = AI_DATA->switchinCandidate.battleMon.ability, maxHP = AI_DATA->switchinCandidate.battleMon.maxHP;
|
||||
u32 statusDamage = 0;
|
||||
|
||||
@@ -1525,8 +1525,8 @@ static u32 GetSwitchinHitsToKO(s32 damageTaken, u32 battler)
|
||||
u32 recurringHealing = GetSwitchinRecurringHealing();
|
||||
u32 statusDamage = GetSwitchinStatusDamage(battler);
|
||||
u32 hitsToKO = 0, singleUseItemHeal = 0;
|
||||
u16 maxHP = AI_DATA->switchinCandidate.battleMon.maxHP, item = AI_DATA->switchinCandidate.battleMon.item, heldItemEffect = gItems[AI_DATA->switchinCandidate.battleMon.item].holdEffect;
|
||||
u8 weatherDuration = gWishFutureKnock.weatherDuration, holdEffectParam = gItems[AI_DATA->switchinCandidate.battleMon.item].holdEffectParam;
|
||||
u16 maxHP = AI_DATA->switchinCandidate.battleMon.maxHP, item = AI_DATA->switchinCandidate.battleMon.item, heldItemEffect = gItemsInfo[AI_DATA->switchinCandidate.battleMon.item].holdEffect;
|
||||
u8 weatherDuration = gWishFutureKnock.weatherDuration, holdEffectParam = gItemsInfo[AI_DATA->switchinCandidate.battleMon.item].holdEffectParam;
|
||||
u32 opposingBattler = GetBattlerAtPosition(BATTLE_OPPOSITE(GetBattlerPosition(battler)));
|
||||
u32 opposingAbility = gBattleMons[opposingBattler].ability;
|
||||
bool32 usedSingleUseHealingItem = FALSE;
|
||||
|
||||
@@ -2357,7 +2357,7 @@ static bool32 PartyBattlerShouldAvoidHazards(u32 currBattler, u32 switchBattler)
|
||||
if (gFieldStatuses & STATUS_FIELD_MAGIC_ROOM || ability == ABILITY_KLUTZ)
|
||||
holdEffect = HOLD_EFFECT_NONE;
|
||||
else
|
||||
holdEffect = gItems[GetMonData(mon, MON_DATA_HELD_ITEM)].holdEffect;
|
||||
holdEffect = gItemsInfo[GetMonData(mon, MON_DATA_HELD_ITEM)].holdEffect;
|
||||
if (holdEffect == HOLD_EFFECT_HEAVY_DUTY_BOOTS)
|
||||
return FALSE;
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ static const u8 sGenericMulchDesc[] = _("A fertilizer that "
|
||||
"is unsuitable\nfor "
|
||||
"local soil.");
|
||||
|
||||
const struct Item gItems[] =
|
||||
const struct Item gItemsInfo[] =
|
||||
{
|
||||
[ITEM_NONE] =
|
||||
{
|
||||
|
||||
26
src/item.c
26
src/item.c
@@ -615,47 +615,47 @@ u16 SanitizeItemId(u16 itemId)
|
||||
|
||||
const u8 * ItemId_GetName(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].name;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].name;
|
||||
}
|
||||
|
||||
u16 ItemId_GetPrice(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].price;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].price;
|
||||
}
|
||||
|
||||
u8 ItemId_GetHoldEffect(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].holdEffect;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].holdEffect;
|
||||
}
|
||||
|
||||
u8 ItemId_GetHoldEffectParam(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].holdEffectParam;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].holdEffectParam;
|
||||
}
|
||||
|
||||
const u8 * ItemId_GetDescription(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].description;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].description;
|
||||
}
|
||||
|
||||
u8 ItemId_GetImportance(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].importance;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].importance;
|
||||
}
|
||||
|
||||
u8 ItemId_GetPocket(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].pocket;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].pocket;
|
||||
}
|
||||
|
||||
u8 ItemId_GetType(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].type;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].type;
|
||||
}
|
||||
|
||||
ItemUseFunc ItemId_GetFieldFunc(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].fieldUseFunc;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].fieldUseFunc;
|
||||
}
|
||||
|
||||
bool8 ItemId_GetBattleUsage(u16 itemId)
|
||||
@@ -685,17 +685,17 @@ bool8 ItemId_GetBattleUsage(u16 itemId)
|
||||
}
|
||||
}
|
||||
else
|
||||
return gItems[item].battleUsage;
|
||||
return gItemsInfo[item].battleUsage;
|
||||
}
|
||||
|
||||
u16 ItemId_GetSecondaryId(u16 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].secondaryId;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].secondaryId;
|
||||
}
|
||||
|
||||
u32 ItemId_GetFlingPower(u32 itemId)
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].flingPower;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].flingPower;
|
||||
}
|
||||
|
||||
const u8 *ItemId_GetEffect(u32 itemId)
|
||||
@@ -706,7 +706,7 @@ const u8 *ItemId_GetEffect(u32 itemId)
|
||||
}
|
||||
else
|
||||
{
|
||||
return gItems[SanitizeItemId(itemId)].effect;
|
||||
return gItemsInfo[SanitizeItemId(itemId)].effect;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5086,7 +5086,7 @@ void ItemUseCB_PPUp(u8 taskId, TaskFunc func)
|
||||
|
||||
u16 ItemIdToBattleMoveId(u16 item)
|
||||
{
|
||||
return (ItemId_GetPocket(item) == POCKET_TM_CASE) ? gItems[item].secondaryId : MOVE_NONE;
|
||||
return (ItemId_GetPocket(item) == POCKET_TM_CASE) ? gItemsInfo[item].secondaryId : MOVE_NONE;
|
||||
}
|
||||
|
||||
bool8 MonKnowsMove(struct Pokemon *mon, u16 move)
|
||||
|
||||
@@ -149,7 +149,7 @@ static const struct GFRomHeader sGFRomHeader = {
|
||||
.speciesInfo = gSpeciesInfo,
|
||||
// .abilityNames = gAbilityNames,
|
||||
// .abilityDescriptions = gAbilityDescriptionPointers,
|
||||
.items = gItems,
|
||||
.items = gItemsInfo,
|
||||
.moves = gMovesInfo,
|
||||
.ballGfx = gBallSpriteSheets,
|
||||
.ballPalettes = gBallSpritePalettes,
|
||||
|
||||
Reference in New Issue
Block a user