Merge commit 'dc077e50d3a2d52964a52ce9a9e81fd99586dd4f' into pret-merge
Conflicts: .github/workflows/build.yml asm/macros/battle_script.inc include/constants/battle_script_commands.h src/battle_controllers.c src/battle_script_commands.c src/data/graphics/battle_environment.h src/party_menu.c
This commit is contained in:
commit
594a4c7ec3
@ -63,4 +63,11 @@ enum {
|
|||||||
bool32 CanThrowBall(void);
|
bool32 CanThrowBall(void);
|
||||||
bool32 CannotUseItemsInBattle(u16 itemId, struct Pokemon *mon);
|
bool32 CannotUseItemsInBattle(u16 itemId, struct Pokemon *mon);
|
||||||
|
|
||||||
|
enum ItemTMHMOrEvolutionStone
|
||||||
|
{
|
||||||
|
ITEM_IS_OTHER,
|
||||||
|
ITEM_IS_TM_HM,
|
||||||
|
ITEM_IS_EVOLUTION_STONE,
|
||||||
|
};
|
||||||
|
|
||||||
#endif // GUARD_ITEM_USE_H
|
#endif // GUARD_ITEM_USE_H
|
||||||
|
|||||||
@ -8,15 +8,15 @@ const u16 gBattleEnvironmentPalette_Building[] = INCBIN_U16("graphics/battle_env
|
|||||||
|
|
||||||
const u16 gBattleEnvironmentPalette_Kyogre[] = INCBIN_U16("graphics/battle_environment/water/kyogre.gbapal");
|
const u16 gBattleEnvironmentPalette_Kyogre[] = INCBIN_U16("graphics/battle_environment/water/kyogre.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_Groudon[] = INCBIN_U16("graphics/battle_environment/cave/groudon.gbapal");
|
const u16 gBattleEnvironmentPalette_Groudon[] = INCBIN_U16("graphics/battle_environment/cave/groudon.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_BuildingGym[] = INCBIN_U16("graphics/battle_environment/building/palette2.gbapal");
|
const u16 gBattleEnvironmentPalette_BuildingGym[] = INCBIN_U16("graphics/battle_environment/building/gym.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_BuildingLeader[] = INCBIN_U16("graphics/battle_environment/building/palette3.gbapal");
|
const u16 gBattleEnvironmentPalette_BuildingLeader[] = INCBIN_U16("graphics/battle_environment/building/leader.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_StadiumAqua[] = INCBIN_U16("graphics/battle_environment/stadium/palette1.gbapal");
|
const u16 gBattleEnvironmentPalette_StadiumAqua[] = INCBIN_U16("graphics/battle_environment/stadium/aqua.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_StadiumMagma[] = INCBIN_U16("graphics/battle_environment/stadium/palette2.gbapal");
|
const u16 gBattleEnvironmentPalette_StadiumMagma[] = INCBIN_U16("graphics/battle_environment/stadium/magma.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_StadiumSidney[] = INCBIN_U16("graphics/battle_environment/stadium/palette3.gbapal");
|
const u16 gBattleEnvironmentPalette_StadiumSidney[] = INCBIN_U16("graphics/battle_environment/stadium/sidney.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_StadiumPhoebe[] = INCBIN_U16("graphics/battle_environment/stadium/palette4.gbapal");
|
const u16 gBattleEnvironmentPalette_StadiumPhoebe[] = INCBIN_U16("graphics/battle_environment/stadium/phoebe.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_StadiumGlacia[] = INCBIN_U16("graphics/battle_environment/stadium/palette5.gbapal");
|
const u16 gBattleEnvironmentPalette_StadiumGlacia[] = INCBIN_U16("graphics/battle_environment/stadium/glacia.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_StadiumDrake[] = INCBIN_U16("graphics/battle_environment/stadium/palette6.gbapal");
|
const u16 gBattleEnvironmentPalette_StadiumDrake[] = INCBIN_U16("graphics/battle_environment/stadium/drake.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_StadiumWallace[] = INCBIN_U16("graphics/battle_environment/stadium/palette7.gbapal");
|
const u16 gBattleEnvironmentPalette_StadiumWallace[] = INCBIN_U16("graphics/battle_environment/stadium/wallace.gbapal");
|
||||||
const u16 gBattleEnvironmentPalette_Rayquaza[] = INCBIN_U16("graphics/battle_environment/sky/palette.gbapal");
|
const u16 gBattleEnvironmentPalette_Rayquaza[] = INCBIN_U16("graphics/battle_environment/sky/palette.gbapal");
|
||||||
|
|
||||||
const u32 gBattleEnvironmentAnimTiles_TallGrass[] = INCBIN_U32("graphics/battle_environment/tall_grass/anim_tiles.4bpp.smol");
|
const u32 gBattleEnvironmentAnimTiles_TallGrass[] = INCBIN_U32("graphics/battle_environment/tall_grass/anim_tiles.4bpp.smol");
|
||||||
|
|||||||
@ -277,7 +277,11 @@ static const u8 sRSAvatarGfxIds[GENDER_COUNT] =
|
|||||||
[FEMALE] = OBJ_EVENT_GFX_LINK_RS_MAY
|
[FEMALE] = OBJ_EVENT_GFX_LINK_RS_MAY
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u8 sPlayerAvatarGfxToStateFlag[GENDER_COUNT][5][2] =
|
static const struct __attribute__((packed))
|
||||||
|
{
|
||||||
|
u8 graphicsId;
|
||||||
|
u8 playerFlag;
|
||||||
|
} sPlayerAvatarGfxToStateFlag[GENDER_COUNT][5] =
|
||||||
{
|
{
|
||||||
[MALE] =
|
[MALE] =
|
||||||
{
|
{
|
||||||
@ -1577,8 +1581,8 @@ static u8 GetPlayerAvatarStateTransitionByGraphicsId(u16 graphicsId, u8 gender)
|
|||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(sPlayerAvatarGfxToStateFlag[0]); i++)
|
for (i = 0; i < ARRAY_COUNT(sPlayerAvatarGfxToStateFlag[0]); i++)
|
||||||
{
|
{
|
||||||
if (sPlayerAvatarGfxToStateFlag[gender][i][0] == graphicsId)
|
if (sPlayerAvatarGfxToStateFlag[gender][i].graphicsId == graphicsId)
|
||||||
return sPlayerAvatarGfxToStateFlag[gender][i][1];
|
return sPlayerAvatarGfxToStateFlag[gender][i].playerFlag;
|
||||||
}
|
}
|
||||||
return PLAYER_AVATAR_FLAG_ON_FOOT;
|
return PLAYER_AVATAR_FLAG_ON_FOOT;
|
||||||
}
|
}
|
||||||
@ -1590,8 +1594,8 @@ u16 GetPlayerAvatarGraphicsIdByCurrentState(void)
|
|||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(sPlayerAvatarGfxToStateFlag[0]); i++)
|
for (i = 0; i < ARRAY_COUNT(sPlayerAvatarGfxToStateFlag[0]); i++)
|
||||||
{
|
{
|
||||||
if (sPlayerAvatarGfxToStateFlag[gPlayerAvatar.gender][i][1] & flags)
|
if (sPlayerAvatarGfxToStateFlag[gPlayerAvatar.gender][i].playerFlag & flags)
|
||||||
return sPlayerAvatarGfxToStateFlag[gPlayerAvatar.gender][i][0];
|
return sPlayerAvatarGfxToStateFlag[gPlayerAvatar.gender][i].graphicsId;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -222,11 +222,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)
|
||||||
|
|||||||
@ -1152,10 +1152,10 @@ static bool8 DisplayPartyPokemonDataForMoveTutorOrEvolutionItem(u8 slot)
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
case 1: // TM/HM
|
case ITEM_IS_TM_HM: // TM/HM
|
||||||
DisplayPartyPokemonDataToTeachMove(slot, ItemIdToBattleMoveId(item));
|
DisplayPartyPokemonDataToTeachMove(slot, ItemIdToBattleMoveId(item));
|
||||||
break;
|
break;
|
||||||
case 2: // Evolution stone
|
case ITEM_IS_EVOLUTION_STONE: // Evolution stone
|
||||||
if (!GetMonData(currentPokemon, MON_DATA_IS_EGG) && GetEvolutionTargetSpecies(currentPokemon, EVO_MODE_ITEM_CHECK, item, NULL, NULL, CHECK_EVO) != SPECIES_NONE)
|
if (!GetMonData(currentPokemon, MON_DATA_IS_EGG) && GetEvolutionTargetSpecies(currentPokemon, EVO_MODE_ITEM_CHECK, item, NULL, NULL, CHECK_EVO) != SPECIES_NONE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NO_USE);
|
DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NO_USE);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user