mirror of
https://github.com/pret/pokeemerald.git
synced 2026-03-21 17:54:57 -05:00
ItemTMHMOrEvolutionStone enum (#2192)
This commit is contained in:
parent
b11741855d
commit
a5ee0f2727
|
|
@ -33,4 +33,11 @@ void Task_UseDigEscapeRopeOnField(u8 taskId);
|
||||||
bool8 CanUseDigOrEscapeRopeOnCurMap(void);
|
bool8 CanUseDigOrEscapeRopeOnCurMap(void);
|
||||||
u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId);
|
u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId);
|
||||||
|
|
||||||
|
enum ItemTMHMOrEvolutionStone
|
||||||
|
{
|
||||||
|
ITEM_IS_OTHER,
|
||||||
|
ITEM_IS_TM_HM,
|
||||||
|
ITEM_IS_EVOLUTION_STONE,
|
||||||
|
};
|
||||||
|
|
||||||
#endif // GUARD_ITEM_USE_H
|
#endif // GUARD_ITEM_USE_H
|
||||||
|
|
|
||||||
|
|
@ -176,11 +176,11 @@ static void Task_CloseCantUseKeyItemMessage(u8 taskId)
|
||||||
u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId)
|
u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId)
|
||||||
{
|
{
|
||||||
if (GetItemFieldFunc(itemId) == ItemUseOutOfBattle_TMHM)
|
if (GetItemFieldFunc(itemId) == ItemUseOutOfBattle_TMHM)
|
||||||
return 1;
|
return ITEM_IS_TM_HM;
|
||||||
else if (GetItemFieldFunc(itemId) == ItemUseOutOfBattle_EvolutionStone)
|
else if (GetItemFieldFunc(itemId) == ItemUseOutOfBattle_EvolutionStone)
|
||||||
return 2;
|
return ITEM_IS_EVOLUTION_STONE;
|
||||||
else
|
else
|
||||||
return 0;
|
return ITEM_IS_OTHER;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mail in the bag menu can't have a message but it can be checked (view the mail background, no message)
|
// Mail in the bag menu can't have a message but it can be checked (view the mail background, no message)
|
||||||
|
|
|
||||||
|
|
@ -987,10 +987,10 @@ static bool8 DisplayPartyPokemonDataForMoveTutorOrEvolutionItem(u8 slot)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
case 1: // TM/HM
|
case ITEM_IS_TM_HM:
|
||||||
DisplayPartyPokemonDataToTeachMove(slot, item, 0);
|
DisplayPartyPokemonDataToTeachMove(slot, item, 0);
|
||||||
break;
|
break;
|
||||||
case 2: // Evolution stone
|
case ITEM_IS_EVOLUTION_STONE:
|
||||||
if (!GetMonData(currentPokemon, MON_DATA_IS_EGG) && GetEvolutionTargetSpecies(currentPokemon, EVO_MODE_ITEM_CHECK, item) != SPECIES_NONE)
|
if (!GetMonData(currentPokemon, MON_DATA_IS_EGG) && GetEvolutionTargetSpecies(currentPokemon, EVO_MODE_ITEM_CHECK, item) != SPECIES_NONE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NO_USE);
|
DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NO_USE);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user