mirror of
https://github.com/pret/pokefirered.git
synced 2026-10-01 13:29:23 -05:00
added trainer slide, fixed follower and trainer see font color, refactoring
This commit is contained in:
@@ -45,16 +45,27 @@ enum
|
||||
BATTLER_COORD_ATTR_RAW_BOTTOM,
|
||||
};
|
||||
|
||||
// battle_anim_status_effects.s
|
||||
#define STAT_ANIM_PLUS1 15
|
||||
#define STAT_ANIM_PLUS2 39
|
||||
#define STAT_ANIM_MINUS1 22
|
||||
#define STAT_ANIM_MINUS2 46
|
||||
// battle_anim_status_effects.c
|
||||
#define STAT_ANIM_PLUS1 (MOVE_EFFECT_ATK_PLUS_1 - 1)
|
||||
#define STAT_ANIM_PLUS2 (MOVE_EFFECT_ATK_PLUS_2 - 1)
|
||||
#define STAT_ANIM_MINUS1 (MOVE_EFFECT_ATK_MINUS_1 - 1)
|
||||
#define STAT_ANIM_MINUS2 (MOVE_EFFECT_ATK_MINUS_2 - 1)
|
||||
#define STAT_ANIM_MULTIPLE_PLUS1 55
|
||||
#define STAT_ANIM_MULTIPLE_PLUS2 56
|
||||
#define STAT_ANIM_MULTIPLE_MINUS1 57
|
||||
#define STAT_ANIM_MULTIPLE_MINUS2 58
|
||||
|
||||
enum {
|
||||
STAT_ANIM_PAL_ATK,
|
||||
STAT_ANIM_PAL_DEF,
|
||||
STAT_ANIM_PAL_ACC,
|
||||
STAT_ANIM_PAL_SPEED,
|
||||
STAT_ANIM_PAL_EVASION,
|
||||
STAT_ANIM_PAL_SPATK,
|
||||
STAT_ANIM_PAL_SPDEF,
|
||||
STAT_ANIM_PAL_MULTIPLE = 0xFF
|
||||
};
|
||||
|
||||
struct BattleAnimBgData
|
||||
{
|
||||
u8 *bgTiles;
|
||||
|
||||
@@ -15,7 +15,6 @@ void DecompressTrainerFrontPic(u16 frontPicId, u8 battlerId);
|
||||
void DecompressTrainerBackPic(u16 backPicId, u8 battler);
|
||||
void DecompressTrainerBackPalette(u16 a1, u8 a2);
|
||||
void BattleGfxSfxDummy3(u8 gender);
|
||||
void FreeTrainerFrontPicPaletteAndTile(u16 frontPicId);
|
||||
void FreeTrainerFrontPicPalette(u16 frontPicId);
|
||||
bool8 BattleLoadAllHealthBoxesGfx(u8 state);
|
||||
void LoadBattleBarGfx(u8 arg0);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#ifndef GUARD_BATTLE_MESSAGE_H
|
||||
#define GUARD_BATTLE_MESSAGE_H
|
||||
|
||||
#include "global.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#define TEXT_BUFF_ARRAY_COUNT max(16, \
|
||||
max(MOVE_NAME_LENGTH + 2, /* +2 to hold the "!" and EOS. */ \
|
||||
max(POKEMON_NAME_LENGTH + 1, \
|
||||
ABILITY_NAME_LENGTH + 1)))
|
||||
|
||||
// for 0xFD
|
||||
|
||||
@@ -216,8 +218,24 @@ struct BattleMsgData
|
||||
u8 hpScale;
|
||||
u8 itemEffectBattler;
|
||||
u8 moveType;
|
||||
u16 abilities[4];
|
||||
u8 textBuffs[3][0x10];
|
||||
u16 abilities[MAX_BATTLERS_COUNT];
|
||||
u8 textBuffs[3][TEXT_BUFF_ARRAY_COUNT];
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
TRAINER_SLIDE_LAST_SWITCHIN,
|
||||
TRAINER_SLIDE_LAST_LOW_HP,
|
||||
TRAINER_SLIDE_FIRST_DOWN,
|
||||
TRAINER_SLIDE_LAST_HALF_HP,
|
||||
TRAINER_SLIDE_FIRST_CRITICAL_HIT,
|
||||
TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT,
|
||||
TRAINER_SLIDE_FIRST_STAB_MOVE,
|
||||
TRAINER_SLIDE_PLAYER_MON_UNAFFECTED,
|
||||
TRAINER_SLIDE_MEGA_EVOLUTION,
|
||||
TRAINER_SLIDE_Z_MOVE,
|
||||
TRAINER_SLIDE_BEFORE_FIRST_TURN,
|
||||
TRAINER_SLIDE_DYNAMAX,
|
||||
};
|
||||
|
||||
void BufferStringBattle(u32 battler, u16 stringID);
|
||||
@@ -228,12 +246,11 @@ void SetPpNumbersPaletteInMoveSelection(u32 battler);
|
||||
u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp);
|
||||
void BattlePutTextOnWindow(const u8 *text, u8 windowId_flags);
|
||||
bool8 BattleStringShouldBeColored(u16);
|
||||
u32 ShouldDoTrainerSlide(u32 battler, u32 which); // return 1 for TrainerA, 2 forTrainerB
|
||||
void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst);
|
||||
|
||||
extern struct BattleMsgData *gBattleMsgDataPtr;
|
||||
|
||||
#define TEXT_BUFF_ARRAY_COUNT 16
|
||||
|
||||
extern u8 gDisplayedStringBattle[478];
|
||||
extern u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT];
|
||||
extern u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT];
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
// (You should not use 48x48 sprites/tables for compressed gfx)
|
||||
// 16x32, 32x32, 64x64 etc are fine
|
||||
// Follower Pokémon
|
||||
#define OW_FOLLOWERS_ENABLED FALSE // Enables follower Pokémon, HGSS style. Requires OW_POKEMON_OBJECT_EVENTS. Note that additional scripting may be required for them to be fully supported!
|
||||
#define OW_FOLLOWERS_ENABLED TRUE // Enables follower Pokémon, HGSS style. Requires OW_POKEMON_OBJECT_EVENTS. Note that additional scripting may be required for them to be fully supported!
|
||||
#define OW_FOLLOWERS_BOBBING TRUE // If true, follower pokemon will bob up and down during their idle & walking animations
|
||||
#define OW_FOLLOWERS_POKEBALLS TRUE // Followers will emerge from the pokeball they are stored in, instead of a normal pokeball
|
||||
|
||||
|
||||
@@ -115,7 +115,6 @@ struct FollowerMessagePool
|
||||
u16 length;
|
||||
};
|
||||
|
||||
extern const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[];
|
||||
extern const struct MonCoords gTrainerFrontPicCoords[];
|
||||
extern const struct CompressedSpriteSheet gTrainerFrontPicTable[];
|
||||
extern const struct CompressedSpriteSheet gTrainerBackPicTable[];
|
||||
@@ -128,6 +127,7 @@ extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow;
|
||||
extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow;
|
||||
|
||||
extern const union AnimCmd *const gAnims_MonPic[];
|
||||
extern const union AnimCmd *const sAnims_Trainer[];
|
||||
extern const union AffineAnimCmd *const gAffineAnims_BattleSpritePlayerSide[];
|
||||
extern const union AffineAnimCmd *const gAffineAnims_BattleSpriteOpponentSide[];
|
||||
extern const struct SpriteFrameImage gBattlerPicTable_PlayerLeft[];
|
||||
|
||||
@@ -27,6 +27,8 @@ void RestartWildEncounterImmunitySteps(void);
|
||||
void ClearPoisonStepCounter(void);
|
||||
int SetCableClubWarp(void);
|
||||
void HandleBoulderFallThroughHole(struct ObjectEvent *);
|
||||
const u8 *GetObjectEventScriptPointerPlayerFacing(void);
|
||||
void GetInFrontOfPlayerPosition(struct MapPosition * position);
|
||||
bool8 dive_warp(struct MapPosition * pos, u16 behavior);
|
||||
bool8 IsDirectionalStairWarpMetatileBehavior(u16 metatileBehavior, u8 playerDirection);
|
||||
const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, u8 direction);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
void ClearPlayerAvatarInfo(void);
|
||||
void SetPlayerAvatarExtraStateTransition(u16 graphicsId, u8 extras);
|
||||
u8 GetPlayerAvatarGenderByGraphicsId(u8);
|
||||
u8 GetPlayerAvatarGenderByGraphicsId(u16 graphicsId);
|
||||
bool8 TestPlayerAvatarFlags(u8);
|
||||
void PlayerGetDestCoords(s16 *, s16 *);
|
||||
u8 GetPlayerFacingDirection(void);
|
||||
|
||||
@@ -6699,19 +6699,6 @@ static void AnimTask_DoubleTeam_Step(u8 taskId)
|
||||
else
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
// TODO: remove old if not needed anymore
|
||||
// struct Task* task = &gTasks[taskId];
|
||||
|
||||
// if (!task->data[3])
|
||||
// {
|
||||
// if (GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) == 1)
|
||||
// SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG1_ON);
|
||||
// else
|
||||
// SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG2_ON);
|
||||
|
||||
// FreeSpritePaletteByTag(ANIM_TAG_BENT_SPOON);
|
||||
// DestroyAnimVisualTask(taskId);
|
||||
// }
|
||||
}
|
||||
|
||||
static void AnimDoubleTeam(struct Sprite* sprite)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
#include "util.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
@@ -423,8 +423,6 @@ static void AnimTask_FrozenIceCube_Step4(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
#define CASE(by, stat) case (STAT_ANIM_##by + stat - 1)
|
||||
|
||||
void AnimTask_StatsChange(u8 taskId)
|
||||
{
|
||||
bool16 goesDown = FALSE;
|
||||
@@ -433,42 +431,42 @@ void AnimTask_StatsChange(u8 taskId)
|
||||
|
||||
switch (gBattleSpritesDataPtr->animationData->animArg)
|
||||
{
|
||||
CASE(PLUS1, STAT_ATK): goesDown = FALSE; animStatId = 0; break;
|
||||
CASE(PLUS1, STAT_DEF): goesDown = FALSE; animStatId = 1; break;
|
||||
CASE(PLUS1, STAT_SPEED): goesDown = FALSE; animStatId = 3; break;
|
||||
CASE(PLUS1, STAT_SPATK): goesDown = FALSE; animStatId = 5; break;
|
||||
CASE(PLUS1, STAT_SPDEF): goesDown = FALSE; animStatId = 6; break;
|
||||
CASE(PLUS1, STAT_ACC): goesDown = FALSE; animStatId = 2; break;
|
||||
CASE(PLUS1, STAT_EVASION): goesDown = FALSE; animStatId = 4; break;
|
||||
case STAT_ANIM_PLUS1 + STAT_ATK: goesDown = FALSE; animStatId = STAT_ANIM_PAL_ATK; break;
|
||||
case STAT_ANIM_PLUS1 + STAT_DEF: goesDown = FALSE; animStatId = STAT_ANIM_PAL_DEF; break;
|
||||
case STAT_ANIM_PLUS1 + STAT_SPEED: goesDown = FALSE; animStatId = STAT_ANIM_PAL_SPEED; break;
|
||||
case STAT_ANIM_PLUS1 + STAT_SPATK: goesDown = FALSE; animStatId = STAT_ANIM_PAL_SPATK; break;
|
||||
case STAT_ANIM_PLUS1 + STAT_SPDEF: goesDown = FALSE; animStatId = STAT_ANIM_PAL_SPDEF; break;
|
||||
case STAT_ANIM_PLUS1 + STAT_ACC: goesDown = FALSE; animStatId = STAT_ANIM_PAL_ACC; break;
|
||||
case STAT_ANIM_PLUS1 + STAT_EVASION: goesDown = FALSE; animStatId = STAT_ANIM_PAL_EVASION; break;
|
||||
|
||||
CASE(MINUS1, STAT_ATK): goesDown = TRUE; animStatId = 0; break;
|
||||
CASE(MINUS1, STAT_DEF): goesDown = TRUE; animStatId = 1; break;
|
||||
CASE(MINUS1, STAT_SPEED): goesDown = TRUE; animStatId = 3; break;
|
||||
CASE(MINUS1, STAT_SPATK): goesDown = TRUE; animStatId = 5; break;
|
||||
CASE(MINUS1, STAT_SPDEF): goesDown = TRUE; animStatId = 6; break;
|
||||
CASE(MINUS1, STAT_ACC): goesDown = TRUE; animStatId = 2; break;
|
||||
CASE(MINUS1, STAT_EVASION): goesDown = TRUE; animStatId = 4; break;
|
||||
case STAT_ANIM_MINUS1 + STAT_ATK: goesDown = TRUE; animStatId = STAT_ANIM_PAL_ATK; break;
|
||||
case STAT_ANIM_MINUS1 + STAT_DEF: goesDown = TRUE; animStatId = STAT_ANIM_PAL_DEF; break;
|
||||
case STAT_ANIM_MINUS1 + STAT_SPEED: goesDown = TRUE; animStatId = STAT_ANIM_PAL_SPEED; break;
|
||||
case STAT_ANIM_MINUS1 + STAT_SPATK: goesDown = TRUE; animStatId = STAT_ANIM_PAL_SPATK; break;
|
||||
case STAT_ANIM_MINUS1 + STAT_SPDEF: goesDown = TRUE; animStatId = STAT_ANIM_PAL_SPDEF; break;
|
||||
case STAT_ANIM_MINUS1 + STAT_ACC: goesDown = TRUE; animStatId = STAT_ANIM_PAL_ACC; break;
|
||||
case STAT_ANIM_MINUS1 + STAT_EVASION: goesDown = TRUE; animStatId = STAT_ANIM_PAL_EVASION; break;
|
||||
|
||||
CASE(PLUS2, STAT_ATK): goesDown = FALSE; animStatId = 0; sharply = TRUE; break;
|
||||
CASE(PLUS2, STAT_DEF): goesDown = FALSE; animStatId = 1; sharply = TRUE; break;
|
||||
CASE(PLUS2, STAT_SPEED): goesDown = FALSE; animStatId = 3; sharply = TRUE; break;
|
||||
CASE(PLUS2, STAT_SPATK): goesDown = FALSE; animStatId = 5; sharply = TRUE; break;
|
||||
CASE(PLUS2, STAT_SPDEF): goesDown = FALSE; animStatId = 6; sharply = TRUE; break;
|
||||
CASE(PLUS2, STAT_ACC): goesDown = FALSE; animStatId = 2; sharply = TRUE; break;
|
||||
CASE(PLUS2, STAT_EVASION): goesDown = FALSE; animStatId = 4; sharply = TRUE; break;
|
||||
case STAT_ANIM_PLUS2 + STAT_ATK: goesDown = FALSE; animStatId = STAT_ANIM_PAL_ATK; sharply = TRUE; break;
|
||||
case STAT_ANIM_PLUS2 + STAT_DEF: goesDown = FALSE; animStatId = STAT_ANIM_PAL_DEF; sharply = TRUE; break;
|
||||
case STAT_ANIM_PLUS2 + STAT_SPEED: goesDown = FALSE; animStatId = STAT_ANIM_PAL_SPEED; sharply = TRUE; break;
|
||||
case STAT_ANIM_PLUS2 + STAT_SPATK: goesDown = FALSE; animStatId = STAT_ANIM_PAL_SPATK; sharply = TRUE; break;
|
||||
case STAT_ANIM_PLUS2 + STAT_SPDEF: goesDown = FALSE; animStatId = STAT_ANIM_PAL_SPDEF; sharply = TRUE; break;
|
||||
case STAT_ANIM_PLUS2 + STAT_ACC: goesDown = FALSE; animStatId = STAT_ANIM_PAL_ACC; sharply = TRUE; break;
|
||||
case STAT_ANIM_PLUS2 + STAT_EVASION: goesDown = FALSE; animStatId = STAT_ANIM_PAL_EVASION; sharply = TRUE; break;
|
||||
|
||||
CASE(MINUS2, STAT_ATK): goesDown = TRUE; animStatId = 0; sharply = TRUE; break;
|
||||
CASE(MINUS2, STAT_DEF): goesDown = TRUE; animStatId = 1; sharply = TRUE; break;
|
||||
CASE(MINUS2, STAT_SPEED): goesDown = TRUE; animStatId = 3; sharply = TRUE; break;
|
||||
CASE(MINUS2, STAT_SPATK): goesDown = TRUE; animStatId = 5; sharply = TRUE; break;
|
||||
CASE(MINUS2, STAT_SPDEF): goesDown = TRUE; animStatId = 6; sharply = TRUE; break;
|
||||
CASE(MINUS2, STAT_ACC): goesDown = TRUE; animStatId = 2; sharply = TRUE; break;
|
||||
CASE(MINUS2, STAT_EVASION): goesDown = TRUE; animStatId = 4; sharply = TRUE; break;
|
||||
case STAT_ANIM_MINUS2 + STAT_ATK: goesDown = TRUE; animStatId = STAT_ANIM_PAL_ATK; sharply = TRUE; break;
|
||||
case STAT_ANIM_MINUS2 + STAT_DEF: goesDown = TRUE; animStatId = STAT_ANIM_PAL_DEF; sharply = TRUE; break;
|
||||
case STAT_ANIM_MINUS2 + STAT_SPEED: goesDown = TRUE; animStatId = STAT_ANIM_PAL_SPEED; sharply = TRUE; break;
|
||||
case STAT_ANIM_MINUS2 + STAT_SPATK: goesDown = TRUE; animStatId = STAT_ANIM_PAL_SPATK; sharply = TRUE; break;
|
||||
case STAT_ANIM_MINUS2 + STAT_SPDEF: goesDown = TRUE; animStatId = STAT_ANIM_PAL_SPDEF; sharply = TRUE; break;
|
||||
case STAT_ANIM_MINUS2 + STAT_ACC: goesDown = TRUE; animStatId = STAT_ANIM_PAL_ACC; sharply = TRUE; break;
|
||||
case STAT_ANIM_MINUS2 + STAT_EVASION: goesDown = TRUE; animStatId = STAT_ANIM_PAL_EVASION; sharply = TRUE; break;
|
||||
|
||||
case STAT_ANIM_MULTIPLE_PLUS1: goesDown = FALSE; animStatId = 0xFF; sharply = FALSE; break;
|
||||
case STAT_ANIM_MULTIPLE_PLUS2: goesDown = FALSE; animStatId = 0xFF; sharply = TRUE; break;
|
||||
case STAT_ANIM_MULTIPLE_MINUS1: goesDown = TRUE; animStatId = 0xFF; sharply = FALSE; break;
|
||||
case STAT_ANIM_MULTIPLE_MINUS2: goesDown = TRUE; animStatId = 0xFF; sharply = TRUE; break;
|
||||
case STAT_ANIM_MULTIPLE_PLUS1: goesDown = FALSE; animStatId = STAT_ANIM_PAL_MULTIPLE; sharply = FALSE; break;
|
||||
case STAT_ANIM_MULTIPLE_PLUS2: goesDown = FALSE; animStatId = STAT_ANIM_PAL_MULTIPLE; sharply = TRUE; break;
|
||||
case STAT_ANIM_MULTIPLE_MINUS1: goesDown = TRUE; animStatId = STAT_ANIM_PAL_MULTIPLE; sharply = FALSE; break;
|
||||
case STAT_ANIM_MULTIPLE_MINUS2: goesDown = TRUE; animStatId = STAT_ANIM_PAL_MULTIPLE; sharply = TRUE; break;
|
||||
|
||||
default:
|
||||
DestroyAnimVisualTask(taskId);
|
||||
@@ -477,15 +475,13 @@ void AnimTask_StatsChange(u8 taskId)
|
||||
|
||||
gBattleAnimArgs[0] = goesDown;
|
||||
gBattleAnimArgs[1] = animStatId;
|
||||
gBattleAnimArgs[2] = 0;
|
||||
gBattleAnimArgs[3] = 0;
|
||||
gBattleAnimArgs[2] = FALSE; // Whether it's the target, rather than attacker
|
||||
gBattleAnimArgs[3] = FALSE; // Whether it hits multiple battlers
|
||||
gBattleAnimArgs[4] = sharply;
|
||||
gTasks[taskId].func = InitStatsChangeAnimation;
|
||||
InitStatsChangeAnimation(taskId);
|
||||
}
|
||||
|
||||
#undef CASE
|
||||
|
||||
void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
@@ -397,8 +397,9 @@ void InitStatsChangeAnimation(u8 taskId)
|
||||
u8 i;
|
||||
|
||||
sAnimStatsChangeData = AllocZeroed(sizeof(struct AnimStatsChangeData));
|
||||
for (i = 0; i < 8; ++i)
|
||||
for (i = 0; i < ARRAY_COUNT(sAnimStatsChangeData->data); i++)
|
||||
sAnimStatsChangeData->data[i] = gBattleAnimArgs[i];
|
||||
|
||||
gTasks[taskId].func = StatsChangeAnimation_Step1;
|
||||
}
|
||||
|
||||
@@ -467,25 +468,25 @@ static void StatsChangeAnimation_Step2(u8 taskId)
|
||||
AnimLoadCompressedBgGfx(animBgData.bgId, gBattleStatMask_Gfx, animBgData.tilesOffset);
|
||||
switch (sAnimStatsChangeData->data[1])
|
||||
{
|
||||
case 0:
|
||||
case STAT_ANIM_PAL_ATK:
|
||||
LoadCompressedPalette(gBattleStatMask2_Pal, BG_PLTT_ID(animBgData.paletteId), PLTT_SIZE_4BPP);
|
||||
break;
|
||||
case 1:
|
||||
case STAT_ANIM_PAL_DEF:
|
||||
LoadCompressedPalette(gBattleStatMask1_Pal, BG_PLTT_ID(animBgData.paletteId), PLTT_SIZE_4BPP);
|
||||
break;
|
||||
case 2:
|
||||
case STAT_ANIM_PAL_ACC:
|
||||
LoadCompressedPalette(gBattleStatMask3_Pal, BG_PLTT_ID(animBgData.paletteId), PLTT_SIZE_4BPP);
|
||||
break;
|
||||
case 3:
|
||||
case STAT_ANIM_PAL_SPEED:
|
||||
LoadCompressedPalette(gBattleStatMask4_Pal, BG_PLTT_ID(animBgData.paletteId), PLTT_SIZE_4BPP);
|
||||
break;
|
||||
case 4:
|
||||
case STAT_ANIM_PAL_EVASION:
|
||||
LoadCompressedPalette(gBattleStatMask6_Pal, BG_PLTT_ID(animBgData.paletteId), PLTT_SIZE_4BPP);
|
||||
break;
|
||||
case 5:
|
||||
case STAT_ANIM_PAL_SPATK:
|
||||
LoadCompressedPalette(gBattleStatMask7_Pal, BG_PLTT_ID(animBgData.paletteId), PLTT_SIZE_4BPP);
|
||||
break;
|
||||
case 6:
|
||||
case STAT_ANIM_PAL_SPDEF:
|
||||
LoadCompressedPalette(gBattleStatMask8_Pal, BG_PLTT_ID(animBgData.paletteId), PLTT_SIZE_4BPP);
|
||||
break;
|
||||
default:
|
||||
@@ -554,7 +555,7 @@ static void StatsChangeAnimation_Step3(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[12], 16 - gTasks[taskId].data[12]));
|
||||
if (gTasks[taskId].data[12] == 0)
|
||||
{
|
||||
ResetBattleAnimBg(0);
|
||||
ResetBattleAnimBg(FALSE);
|
||||
++gTasks[taskId].data[15];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "battle_interface.h"
|
||||
#include "battle_message.h"
|
||||
#include "reshow_battle_screen.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "battle_message.h"
|
||||
#include "reshow_battle_screen.h"
|
||||
#include "teachy_tv.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/pokemon.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "text.h"
|
||||
#include "util.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/sound.h"
|
||||
|
||||
@@ -2000,10 +2001,7 @@ static void Controller_HandleTrainerSlideBack(u32 battler)
|
||||
if (gSprites[gBattlerSpriteIds[battler]].callback == SpriteCallbackDummy)
|
||||
{
|
||||
if (GetBattlerSide(battler) == B_SIDE_OPPONENT)
|
||||
{
|
||||
FreeTrainerFrontPicPaletteAndTile(gSprites[gBattlerSpriteIds[battler]].oam.affineParam);
|
||||
gSprites[gBattlerSpriteIds[battler]].oam.tileNum = gSprites[gBattlerSpriteIds[battler]].data[5];
|
||||
}
|
||||
FreeTrainerFrontPicPalette(gSprites[gBattlerSpriteIds[battler]].oam.affineParam);
|
||||
FreeSpriteOamMatrix(&gSprites[gBattlerSpriteIds[battler]]);
|
||||
DestroySprite(&gSprites[gBattlerSpriteIds[battler]]);
|
||||
BattleControllerComplete(battler);
|
||||
@@ -2271,8 +2269,6 @@ void BtlController_HandleDrawTrainerPic(u32 battler, u32 trainerPicId, bool32 is
|
||||
gSprites[gBattlerSpriteIds[battler]].x2 = -DISPLAY_WIDTH;
|
||||
gSprites[gBattlerSpriteIds[battler]].sSpeedX = 2;
|
||||
gSprites[gBattlerSpriteIds[battler]].oam.affineParam = trainerPicId;
|
||||
gSprites[gBattlerSpriteIds[battler]].data[5] = gSprites[gBattlerSpriteIds[battler]].oam.tileNum;
|
||||
gSprites[gBattlerSpriteIds[battler]].oam.tileNum = GetSpriteTileStartByTag(gTrainerFrontPicTable[trainerPicId].tag);
|
||||
}
|
||||
else // Player's side
|
||||
{
|
||||
@@ -2775,7 +2771,7 @@ static void SpriteCB_FreePlayerSpriteLoadMonSprite(struct Sprite *sprite)
|
||||
|
||||
static void SpriteCB_FreeOpponentSprite(struct Sprite *sprite)
|
||||
{
|
||||
FreeTrainerFrontPicPaletteAndTile(sprite->oam.affineParam);
|
||||
FreeTrainerFrontPicPalette(sprite->oam.affineParam);
|
||||
FreeSpriteOamMatrix(sprite);
|
||||
DestroySprite(sprite);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ static bool8 ShouldAnimBeDoneRegardlessOfSubstitute(u8 animId);
|
||||
static void Task_ClearBitWhenBattleTableAnimDone(u8 taskId);
|
||||
static void Task_ClearBitWhenSpecialAnimDone(u8 taskId);
|
||||
static void ClearSpritesBattlerHealthboxAnimData(void);
|
||||
static void SpriteCB_TrainerSlideVertical(struct Sprite *sprite);
|
||||
|
||||
static const struct CompressedSpriteSheet sSpriteSheet_SinglesPlayerHealthbox =
|
||||
{
|
||||
@@ -154,16 +155,33 @@ static void UNUSED DoBattleSpriteAffineAnim(struct Sprite *sprite, bool8 arg1)
|
||||
AnimateSprite(sprite);
|
||||
}
|
||||
|
||||
#define sSpeedX data[0]
|
||||
|
||||
void SpriteCB_TrainerSlideIn(struct Sprite *sprite)
|
||||
{
|
||||
if (!(gIntroSlideFlags & 1))
|
||||
{
|
||||
sprite->x2 += sprite->data[0];
|
||||
sprite->x2 += sprite->sSpeedX;
|
||||
if (sprite->x2 == 0)
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
{
|
||||
if (sprite->y2 != 0)
|
||||
sprite->callback = SpriteCB_TrainerSlideVertical;
|
||||
else
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Slide up to 0 if necessary (used by multi battle intro)
|
||||
static void SpriteCB_TrainerSlideVertical(struct Sprite *sprite)
|
||||
{
|
||||
sprite->y2 -= 2;
|
||||
if (sprite->y2 == 0)
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
}
|
||||
|
||||
#undef sSpeedX
|
||||
|
||||
void InitAndLaunchChosenStatusAnimation(u32 battler, bool8 isStatus2, u32 status)
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[battler].statusAnimActive = 1;
|
||||
@@ -408,17 +426,12 @@ void DecompressGhostFrontPic(struct Pokemon *unused, u8 battlerId)
|
||||
Free(buffer);
|
||||
}
|
||||
|
||||
void DecompressTrainerFrontPic(u16 frontPicId, u8 battlerId)
|
||||
void DecompressTrainerFrontPic(u16 frontPicId, u8 battler)
|
||||
{
|
||||
struct SpriteSheet sheet;
|
||||
u8 position = GetBattlerPosition(battlerId);
|
||||
u8 position = GetBattlerPosition(battler);
|
||||
|
||||
DecompressPicFromTable(&gTrainerFrontPicTable[frontPicId], gMonSpritesGfxPtr->sprites[position]);
|
||||
sheet.data = gMonSpritesGfxPtr->sprites[position];
|
||||
sheet.size = gTrainerFrontPicTable[frontPicId].size;
|
||||
sheet.tag = gTrainerFrontPicTable[frontPicId].tag;
|
||||
LoadSpriteSheet(&sheet);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gTrainerFrontPicPaletteTable[frontPicId]);
|
||||
LoadCompressedSpritePalette(&gTrainerFrontPicPaletteTable[frontPicId]);
|
||||
}
|
||||
|
||||
void DecompressTrainerBackPic(u16 backPicId, u8 battler)
|
||||
@@ -439,12 +452,6 @@ void BattleGfxSfxDummy3(u8 gender)
|
||||
{
|
||||
}
|
||||
|
||||
void FreeTrainerFrontPicPaletteAndTile(u16 frontPicId)
|
||||
{
|
||||
FreeSpritePaletteByTag(gTrainerFrontPicPaletteTable[frontPicId].tag);
|
||||
FreeSpriteTilesByTag(gTrainerFrontPicTable[frontPicId].tag);
|
||||
}
|
||||
|
||||
void FreeTrainerFrontPicPalette(u16 frontPicId)
|
||||
{
|
||||
FreeSpritePaletteByTag(gTrainerFrontPicPaletteTable[frontPicId].tag);
|
||||
|
||||
@@ -681,18 +681,18 @@ void UpdateOamPriorityInAllHealthboxes(u8 priority, bool32 hideHPBoxes)
|
||||
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
u8 healthboxSpriteId = gHealthboxSpriteIds[i];
|
||||
u8 healthboxOtherSpriteId = gSprites[gHealthboxSpriteIds[i]].sHealthboxOtherSpriteId;
|
||||
u8 healthboxLeftSpriteId = gHealthboxSpriteIds[i];
|
||||
u8 healthboxRightSpriteId = gSprites[gHealthboxSpriteIds[i]].oam.affineParam;
|
||||
u8 healthbarSpriteId = gSprites[gHealthboxSpriteIds[i]].sHealthBarSpriteId;
|
||||
|
||||
gSprites[healthboxSpriteId].oam.priority = priority;
|
||||
gSprites[healthboxOtherSpriteId].oam.priority = priority;
|
||||
gSprites[healthboxLeftSpriteId].oam.priority = priority;
|
||||
gSprites[healthboxRightSpriteId].oam.priority = priority;
|
||||
gSprites[healthbarSpriteId].oam.priority = priority;
|
||||
|
||||
UpdateIndicatorOamPriority(healthbarSpriteId, priority);
|
||||
UpdateIndicatorOamPriority(healthboxLeftSpriteId, priority);
|
||||
|
||||
if (B_HIDE_HEALTHBOX_IN_ANIMS == TRUE && hideHPBoxes && IsBattlerAlive(i))
|
||||
TryToggleHealboxVisibility(priority, healthboxSpriteId, healthboxOtherSpriteId, healthbarSpriteId);
|
||||
TryToggleHealboxVisibility(priority, healthboxLeftSpriteId, healthboxRightSpriteId, healthbarSpriteId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "constants/battle_ai.h"
|
||||
#include "constants/battle_move_effects.h"
|
||||
#include "constants/battle_setup.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/hold_effects.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
@@ -3160,9 +3161,8 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||
SetShellSideArmCategory();
|
||||
SetAiLogicDataForTurn(AI_DATA); // get assumed abilities, hold effects, etc of all battlers
|
||||
|
||||
// TODO: Trainer slide
|
||||
// if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_BEFORE_FIRST_TURN)))
|
||||
// BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
|
||||
if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_BEFORE_FIRST_TURN)))
|
||||
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
|
||||
gBattleStruct->eventsBeforeFirstTurnState = 0;
|
||||
break;
|
||||
}
|
||||
@@ -3251,6 +3251,19 @@ void BattleTurnPassed(void)
|
||||
SetShellSideArmCategory();
|
||||
SetAiLogicDataForTurn(AI_DATA); // get assumed abilities, hold effects, etc of all battlers
|
||||
gBattleMainFunc = HandleTurnActionSelectionState;
|
||||
|
||||
if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_LOW_HP)))
|
||||
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
|
||||
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_HALF_HP)))
|
||||
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
|
||||
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_CRITICAL_HIT)))
|
||||
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
|
||||
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT)))
|
||||
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
|
||||
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_STAB_MOVE)))
|
||||
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
|
||||
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_PLAYER_MON_UNAFFECTED)))
|
||||
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
|
||||
}
|
||||
|
||||
u8 IsRunningFromBattleImpossible(u32 battler)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "recorded_battle.h"
|
||||
#include "test_runner.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/trainers.h"
|
||||
@@ -2864,7 +2865,8 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
{
|
||||
u32 dstId = 0; // if they used dstId, why not use srcId as well?
|
||||
const u8 *toCpy = NULL;
|
||||
u8 text[30];
|
||||
// This buffer may hold either the name of a trainer, Pokémon, or item.
|
||||
u8 text[max(max(max(32, TRAINER_NAME_LENGTH + 1), POKEMON_NAME_LENGTH + 1), ITEM_NAME_LENGTH)];
|
||||
u8 multiplayerId;
|
||||
s32 i;
|
||||
|
||||
@@ -3957,3 +3959,241 @@ u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct TrainerSlide
|
||||
{
|
||||
u16 trainerId;
|
||||
bool8 isFrontierTrainer;
|
||||
const u8 *msgLastSwitchIn;
|
||||
const u8 *msgLastLowHp;
|
||||
const u8 *msgFirstDown;
|
||||
const u8 *msgLastHalfHp;
|
||||
const u8 *msgFirstCriticalHit;
|
||||
const u8 *msgFirstSuperEffectiveHit;
|
||||
const u8 *msgFirstSTABMove;
|
||||
const u8 *msgPlayerMonUnaffected;
|
||||
const u8 *msgMegaEvolution;
|
||||
const u8 *msgZMove;
|
||||
const u8 *msgBeforeFirstTurn;
|
||||
const u8 *msgDynamax;
|
||||
};
|
||||
|
||||
static const struct TrainerSlide sTrainerSlides[] =
|
||||
{
|
||||
/* Put any trainer slide-in messages inside this array.
|
||||
Example:
|
||||
{
|
||||
.trainerId = TRAINER_WALLY_VR_2,
|
||||
.isFrontierTrainer = FALSE,
|
||||
.msgLastSwitchIn = sText_AarghAlmostHadIt,
|
||||
.msgLastLowHp = sText_BoxIsFull,
|
||||
.msgFirstDown = sText_123Poof,
|
||||
.msgLastHalfHp = sText_ShootSoClose,
|
||||
.msgFirstCriticalHit = sText_CriticalHit,
|
||||
.msgFirstSuperEffectiveHit = sText_SuperEffective,
|
||||
.msgFirstSTABMove = sText_ABoosted,
|
||||
.msgPlayerMonUnaffected = sText_ButNoEffect,
|
||||
.msgMegaEvolution = sText_PowderExplodes,
|
||||
.msgZMove = sText_Electromagnetism,
|
||||
.msgBeforeFirstTurn = sText_GravityIntensified,
|
||||
.msgDynamax = sText_TargetWokeUp,
|
||||
},
|
||||
*/
|
||||
};
|
||||
|
||||
static u32 GetEnemyMonCount(u32 firstId, u32 lastId, bool32 onlyAlive)
|
||||
{
|
||||
u32 i, count = 0;
|
||||
|
||||
for (i = firstId; i < lastId; i++)
|
||||
{
|
||||
u32 species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG, NULL);
|
||||
if (species != SPECIES_NONE
|
||||
&& species != SPECIES_EGG
|
||||
&& (!onlyAlive || GetMonData(&gEnemyParty[i], MON_DATA_HP, NULL)))
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
LESS_THAN,
|
||||
EQUAL,
|
||||
GREATER_THAN,
|
||||
LESS_THAN_OR_EQUAL,
|
||||
GREATER_THAN_OR_EQUAL,
|
||||
NOT_EQUAL,
|
||||
};
|
||||
|
||||
u32 BattlerHPPercentage(u32 battler, u32 operation, u32 threshold)
|
||||
{
|
||||
switch (operation)
|
||||
{
|
||||
case LESS_THAN:
|
||||
return gBattleMons[battler].hp < (gBattleMons[battler].maxHP / threshold);
|
||||
case EQUAL:
|
||||
return gBattleMons[battler].hp == (gBattleMons[battler].maxHP / threshold);
|
||||
case GREATER_THAN:
|
||||
return gBattleMons[battler].hp > (gBattleMons[battler].maxHP / threshold);
|
||||
case LESS_THAN_OR_EQUAL:
|
||||
return gBattleMons[battler].hp <= (gBattleMons[battler].maxHP / threshold);
|
||||
case GREATER_THAN_OR_EQUAL:
|
||||
return gBattleMons[battler].hp >= (gBattleMons[battler].maxHP / threshold);
|
||||
case NOT_EQUAL:
|
||||
default:
|
||||
return gBattleMons[battler].hp != (gBattleMons[battler].maxHP / threshold);
|
||||
}
|
||||
}
|
||||
|
||||
u32 ShouldDoTrainerSlide(u32 battler, u32 which)
|
||||
{
|
||||
u32 i, firstId, lastId, trainerId, retValue = 1;
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_TRAINER) || GetBattlerSide(battler) != B_SIDE_OPPONENT)
|
||||
return 0;
|
||||
|
||||
// Two opponents support.
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
||||
{
|
||||
if (gBattlerPartyIndexes[battler] >= 3)
|
||||
{
|
||||
firstId = 3, lastId = PARTY_SIZE;
|
||||
trainerId = gTrainerBattleOpponent_B;
|
||||
retValue = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
firstId = 0, lastId = 3;
|
||||
trainerId = gTrainerBattleOpponent_A;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
firstId = 0, lastId = PARTY_SIZE;
|
||||
trainerId = gTrainerBattleOpponent_A;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sTrainerSlides); i++)
|
||||
{
|
||||
if (trainerId == sTrainerSlides[i].trainerId
|
||||
&& (((gBattleTypeFlags & BATTLE_TYPE_FRONTIER) && sTrainerSlides[i].isFrontierTrainer)
|
||||
|| (!(gBattleTypeFlags & BATTLE_TYPE_FRONTIER) && !sTrainerSlides[i].isFrontierTrainer)))
|
||||
{
|
||||
gBattleScripting.battler = battler;
|
||||
switch (which)
|
||||
{
|
||||
case TRAINER_SLIDE_LAST_SWITCHIN:
|
||||
if (sTrainerSlides[i].msgLastSwitchIn != NULL && !CanBattlerSwitch(battler))
|
||||
{
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgLastSwitchIn;
|
||||
return retValue;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_LAST_LOW_HP:
|
||||
if (sTrainerSlides[i].msgLastLowHp != NULL
|
||||
&& GetEnemyMonCount(firstId, lastId, TRUE) == 1
|
||||
&& BattlerHPPercentage(battler, LESS_THAN_OR_EQUAL, 4)
|
||||
&& !gBattleStruct->trainerSlideLowHpMsgDone)
|
||||
{
|
||||
gBattleStruct->trainerSlideLowHpMsgDone = TRUE;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgLastLowHp;
|
||||
return retValue;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_FIRST_DOWN:
|
||||
if (sTrainerSlides[i].msgFirstDown != NULL && GetEnemyMonCount(firstId, lastId, TRUE) == GetEnemyMonCount(firstId, lastId, FALSE) - 1)
|
||||
{
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgFirstDown;
|
||||
return retValue;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_LAST_HALF_HP:
|
||||
if (sTrainerSlides[i].msgLastHalfHp != NULL
|
||||
&& GetEnemyMonCount(firstId, lastId, TRUE) == GetEnemyMonCount(firstId, lastId, FALSE) - 1
|
||||
&& BattlerHPPercentage(battler, LESS_THAN_OR_EQUAL, 2) && BattlerHPPercentage(battler, GREATER_THAN, 4)
|
||||
&& !gBattleStruct->trainerSlideHalfHpMsgDone)
|
||||
{
|
||||
gBattleStruct->trainerSlideHalfHpMsgDone = TRUE;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgLastHalfHp;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_FIRST_CRITICAL_HIT:
|
||||
if (sTrainerSlides[i].msgFirstCriticalHit != NULL && gBattleStruct->trainerSlideFirstCriticalHitMsgState == 1)
|
||||
{
|
||||
gBattleStruct->trainerSlideFirstCriticalHitMsgState = 2;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgFirstCriticalHit;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT:
|
||||
if (sTrainerSlides[i].msgFirstSuperEffectiveHit != NULL
|
||||
&& gBattleStruct->trainerSlideFirstSuperEffectiveHitMsgState == 1
|
||||
&& gBattleMons[battler].hp)
|
||||
{
|
||||
gBattleStruct->trainerSlideFirstSuperEffectiveHitMsgState = 2;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgFirstSuperEffectiveHit;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_FIRST_STAB_MOVE:
|
||||
if (sTrainerSlides[i].msgFirstSTABMove != NULL
|
||||
&& gBattleStruct->trainerSlideFirstSTABMoveMsgState == 1
|
||||
&& GetEnemyMonCount(firstId, lastId, TRUE) == GetEnemyMonCount(firstId, lastId, FALSE))
|
||||
{
|
||||
gBattleStruct->trainerSlideFirstSTABMoveMsgState = 2;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgFirstSTABMove;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_PLAYER_MON_UNAFFECTED:
|
||||
if (sTrainerSlides[i].msgPlayerMonUnaffected != NULL
|
||||
&& gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState == 1
|
||||
&& GetEnemyMonCount(firstId, lastId, TRUE) == GetEnemyMonCount(firstId, lastId, FALSE))
|
||||
{
|
||||
gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState = 2;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgPlayerMonUnaffected;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_MEGA_EVOLUTION:
|
||||
if (sTrainerSlides[i].msgMegaEvolution != NULL && !gBattleStruct->trainerSlideMegaEvolutionMsgDone)
|
||||
{
|
||||
gBattleStruct->trainerSlideMegaEvolutionMsgDone = TRUE;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgMegaEvolution;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_Z_MOVE:
|
||||
if (sTrainerSlides[i].msgZMove != NULL && !gBattleStruct->trainerSlideZMoveMsgDone)
|
||||
{
|
||||
gBattleStruct->trainerSlideZMoveMsgDone = TRUE;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgZMove;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_BEFORE_FIRST_TURN:
|
||||
if (sTrainerSlides[i].msgBeforeFirstTurn != NULL && !gBattleStruct->trainerSlideBeforeFirstTurnMsgDone)
|
||||
{
|
||||
gBattleStruct->trainerSlideBeforeFirstTurnMsgDone = TRUE;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgBeforeFirstTurn;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case TRAINER_SLIDE_DYNAMAX:
|
||||
if (sTrainerSlides[i].msgDynamax != NULL && !gBattleStruct->trainerSlideDynamaxMsgDone)
|
||||
{
|
||||
gBattleStruct->trainerSlideDynamaxMsgDone = TRUE;
|
||||
gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgDynamax;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9826,61 +9826,61 @@ static void Cmd_various(void)
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
return;
|
||||
}
|
||||
case VARIOUS_HANDLE_TRAINER_SLIDE_MSG: // unused for now
|
||||
case VARIOUS_HANDLE_TRAINER_SLIDE_MSG:
|
||||
{
|
||||
VARIOUS_ARGS(u8 case_);
|
||||
// if (cmd->case_ == 0)
|
||||
// {
|
||||
// // Save sprite IDs, because trainer slide in will overwrite gBattlerSpriteIds variable.
|
||||
// gBattleScripting.savedDmg = (gBattlerSpriteIds[battler] & 0xFF) | (gBattlerSpriteIds[BATTLE_PARTNER(battler)] << 8);
|
||||
// HideBattlerShadowSprite(battler);
|
||||
// }
|
||||
// else if (cmd->case_ == 1)
|
||||
// {
|
||||
// BtlController_EmitPrintString(battler, BUFFER_A, STRINGID_TRAINERSLIDE);
|
||||
// MarkBattlerForControllerExec(battler);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// gBattlerSpriteIds[BATTLE_PARTNER(battler)] = gBattleScripting.savedDmg >> 8;
|
||||
// gBattlerSpriteIds[battler] = gBattleScripting.savedDmg & 0xFF;
|
||||
// if (IsBattlerAlive(battler))
|
||||
// {
|
||||
// SetBattlerShadowSpriteCallback(battler, gBattleMons[battler].species);
|
||||
// BattleLoadMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battler]], battler);
|
||||
// }
|
||||
// i = BATTLE_PARTNER(battler);
|
||||
// if (IsBattlerAlive(i))
|
||||
// {
|
||||
// SetBattlerShadowSpriteCallback(i, gBattleMons[i].species);
|
||||
// BattleLoadMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[i]], i);
|
||||
// }
|
||||
// }
|
||||
if (cmd->case_ == 0)
|
||||
{
|
||||
// Save sprite IDs, because trainer slide in will overwrite gBattlerSpriteIds variable.
|
||||
gBattleScripting.savedDmg = (gBattlerSpriteIds[battler] & 0xFF) | (gBattlerSpriteIds[BATTLE_PARTNER(battler)] << 8);
|
||||
HideBattlerShadowSprite(battler);
|
||||
}
|
||||
else if (cmd->case_ == 1)
|
||||
{
|
||||
BtlController_EmitPrintString(battler, BUFFER_A, STRINGID_TRAINERSLIDE);
|
||||
MarkBattlerForControllerExec(battler);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattlerSpriteIds[BATTLE_PARTNER(battler)] = gBattleScripting.savedDmg >> 8;
|
||||
gBattlerSpriteIds[battler] = gBattleScripting.savedDmg & 0xFF;
|
||||
if (IsBattlerAlive(battler))
|
||||
{
|
||||
SetBattlerShadowSpriteCallback(battler, gBattleMons[battler].species);
|
||||
BattleLoadMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battler]], battler);
|
||||
}
|
||||
i = BATTLE_PARTNER(battler);
|
||||
if (IsBattlerAlive(i))
|
||||
{
|
||||
SetBattlerShadowSpriteCallback(i, gBattleMons[i].species);
|
||||
BattleLoadMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[i]], i);
|
||||
}
|
||||
}
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
return;
|
||||
}
|
||||
case VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF: // unused for now
|
||||
case VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF:
|
||||
{
|
||||
VARIOUS_ARGS();
|
||||
// if ((i = ShouldDoTrainerSlide(battler, TRAINER_SLIDE_FIRST_DOWN)))
|
||||
// {
|
||||
// gBattleScripting.battler = battler;
|
||||
// BattleScriptPush(cmd->nextInstr);
|
||||
// gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
// return;
|
||||
// }
|
||||
if ((i = ShouldDoTrainerSlide(battler, TRAINER_SLIDE_FIRST_DOWN)))
|
||||
{
|
||||
gBattleScripting.battler = battler;
|
||||
BattleScriptPush(cmd->nextInstr);
|
||||
gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON: // unused for now
|
||||
case VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON:
|
||||
{
|
||||
VARIOUS_ARGS();
|
||||
// if ((i = ShouldDoTrainerSlide(battler, TRAINER_SLIDE_LAST_SWITCHIN)))
|
||||
// {
|
||||
// gBattleScripting.battler = battler;
|
||||
// BattleScriptPush(cmd->nextInstr);
|
||||
// gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
// return;
|
||||
// }
|
||||
if ((i = ShouldDoTrainerSlide(battler, TRAINER_SLIDE_LAST_SWITCHIN)))
|
||||
{
|
||||
gBattleScripting.battler = battler;
|
||||
BattleScriptPush(cmd->nextInstr);
|
||||
gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VARIOUS_SET_AURORA_VEIL:
|
||||
@@ -16555,52 +16555,45 @@ void BS_SetPledgeStatus(void)
|
||||
void BS_TryTrainerSlideZMoveMsg(void)
|
||||
{
|
||||
NATIVE_ARGS();
|
||||
// TODO: trainer slide
|
||||
// s32 shouldSlide;
|
||||
s32 shouldSlide;
|
||||
|
||||
// if ((shouldSlide = ShouldDoTrainerSlide(gBattlerAttacker, TRAINER_SLIDE_Z_MOVE)))
|
||||
// {
|
||||
// gBattleScripting.battler = gBattlerAttacker;
|
||||
// BattleScriptPush(cmd->nextInstr);
|
||||
// gBattlescriptCurrInstr = (shouldSlide == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
// }
|
||||
// else
|
||||
// gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
if ((shouldSlide = ShouldDoTrainerSlide(gBattlerAttacker, TRAINER_SLIDE_Z_MOVE)))
|
||||
{
|
||||
gBattleScripting.battler = gBattlerAttacker;
|
||||
BattleScriptPush(cmd->nextInstr);
|
||||
gBattlescriptCurrInstr = (shouldSlide == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
}
|
||||
else
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
void BS_TryTrainerSlideMegaEvolutionMsg(void)
|
||||
{
|
||||
NATIVE_ARGS();
|
||||
// TODO: trainer slide
|
||||
// s32 shouldSlide;
|
||||
s32 shouldSlide;
|
||||
|
||||
// if ((shouldSlide = ShouldDoTrainerSlide(gBattlerAttacker, TRAINER_SLIDE_MEGA_EVOLUTION)))
|
||||
// {
|
||||
// gBattleScripting.battler = gBattlerAttacker;
|
||||
// BattleScriptPush(cmd->nextInstr);
|
||||
// gBattlescriptCurrInstr = (shouldSlide == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
// }
|
||||
// else
|
||||
// gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
if ((shouldSlide = ShouldDoTrainerSlide(gBattlerAttacker, TRAINER_SLIDE_MEGA_EVOLUTION)))
|
||||
{
|
||||
gBattleScripting.battler = gBattlerAttacker;
|
||||
BattleScriptPush(cmd->nextInstr);
|
||||
gBattlescriptCurrInstr = (shouldSlide == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
}
|
||||
else
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
void BS_TryTrainerSlideDynamaxMsg(void)
|
||||
{
|
||||
NATIVE_ARGS();
|
||||
// TODO: trainer slide
|
||||
// s32 shouldSlide;
|
||||
s32 shouldSlide;
|
||||
|
||||
// if ((shouldSlide = ShouldDoTrainerSlide(gBattlerAttacker, TRAINER_SLIDE_DYNAMAX)))
|
||||
// {
|
||||
// gBattleScripting.battler = gBattlerAttacker;
|
||||
// BattleScriptPush(cmd->nextInstr);
|
||||
// gBattlescriptCurrInstr = (shouldSlide == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
// }
|
||||
// else
|
||||
// gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
if ((shouldSlide = ShouldDoTrainerSlide(gBattleScripting.battler, TRAINER_SLIDE_DYNAMAX)))
|
||||
{
|
||||
BattleScriptPush(cmd->nextInstr);
|
||||
gBattlescriptCurrInstr = (shouldSlide == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
|
||||
}
|
||||
else
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
void BS_TryHealPulse(void)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "text.h"
|
||||
#include "event_data.h"
|
||||
#include "string_util.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle.h"
|
||||
#include "data.h"
|
||||
#include "pokedex.h"
|
||||
#include "overworld.h"
|
||||
|
||||
@@ -1098,12 +1098,11 @@ void PrepareStringBattle(u16 stringId, u32 battler)
|
||||
SET_STATCHANGER(STAT_SPEED, 1, FALSE);
|
||||
}
|
||||
|
||||
// TODO: trainer slide
|
||||
// Signal for the trainer slide-in system.
|
||||
// if ((stringId == STRINGID_ITDOESNTAFFECT || stringId == STRINGID_PKMNWASNTAFFECTED || stringId == STRINGID_PKMNUNAFFECTED)
|
||||
// && GetBattlerSide(gBattlerTarget) == B_SIDE_OPPONENT
|
||||
// && gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState != 2)
|
||||
// gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState = 1;
|
||||
if ((stringId == STRINGID_ITDOESNTAFFECT || stringId == STRINGID_PKMNWASNTAFFECTED || stringId == STRINGID_PKMNUNAFFECTED)
|
||||
&& GetBattlerSide(gBattlerTarget) == B_SIDE_OPPONENT
|
||||
&& gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState != 2)
|
||||
gBattleStruct->trainerSlidePlayerMonUnaffectedMsgState = 1;
|
||||
|
||||
BtlController_EmitPrintString(battler, BUFFER_A, stringId);
|
||||
MarkBattlerForControllerExec(battler);
|
||||
|
||||
@@ -278,6 +278,11 @@ const union AnimCmd *const gAnims_MonPic[] =
|
||||
sAnim_MonPic_3,
|
||||
};
|
||||
|
||||
const union AnimCmd *const sAnims_Trainer[] ={
|
||||
sAnim_GeneralFrame0,
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
#define SPECIES_SPRITE(species, sprite) [SPECIES_##species] = {sprite, 0x800, SPECIES_##species}
|
||||
#define SPECIES_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species}
|
||||
#define SPECIES_SHINY_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species + SPECIES_SHINY_TAG}
|
||||
@@ -285,7 +290,6 @@ const union AnimCmd *const gAnims_MonPic[] =
|
||||
#define TRAINER_SPRITE(trainerPic, sprite, size) [TRAINER_PIC_##trainerPic] = {sprite, size, TRAINER_PIC_##trainerPic}
|
||||
#define TRAINER_PAL(trainerPic, pal) [TRAINER_PIC_##trainerPic] = {pal, TRAINER_PIC_##trainerPic}
|
||||
|
||||
#include "data/trainer_graphics/front_pic_anims.h"
|
||||
#include "data/trainer_graphics/front_pic_tables.h"
|
||||
#include "data/trainer_graphics/back_pic_anims.h"
|
||||
#include "data/trainer_graphics/back_pic_tables.h"
|
||||
|
||||
@@ -1,891 +0,0 @@
|
||||
static const union AnimCmd *const sAnims_AquaLeaderArchie[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_AquaGruntM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_AquaGruntF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSAromaLady[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSRuinManiac[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Interviewer[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSTuberF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSTuberM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSCooltrainerM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSCooltrainerF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_HexManiac[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSLady[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSBeauty[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RichBoy[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSPokemaniac[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSSwimmerM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSBlackBelt[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Guitarist[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Kindler[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSCamper[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_BugManiac[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSPsychicM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSPsychicF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSGentleman[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_EliteFourSidney[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_EliteFourPhoebe[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderRoxanne[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderBrawly[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderTateAndLiza[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SchoolKidM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SchoolKidF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SrAndJr[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_PokefanM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_PokefanF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_ExpertM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_ExpertF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSYoungster[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_ChampionSteven[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSFisherman[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_CyclingTriathleteM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_CyclingTriathleteF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RunningTriathleteM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RunningTriathleteF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SwimmingTriathleteM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SwimmingTriathleteF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_DragonTamer[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSBirdKeeper[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_NinjaBoy[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_BattleGirl[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_ParasolLady[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSSwimmerF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSPicnicker[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSTwins[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSSailor[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Collector[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Wally[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSBrendan1[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSMay1[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSPokemonBreederM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSPokemonBreederF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSPokemonRangerM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSPokemonRangerF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_MagmaLeaderMaxie[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_MagmaGruntM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_MagmaGruntF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSLass[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSBugCatcher[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSHiker[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSYoungCouple[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_OldCouple[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSSisAndBro[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_AquaAdminM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_AquaAdminF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_MagmaAdminM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_MagmaAdminF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderWattson[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderFlannery[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderNorman[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderWinona[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderWallace[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_EliteFourGlacia[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_EliteFourDrake[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Youngster[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_BugCatcher[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Lass[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Sailor[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Camper[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Picnicker[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Pokemaniac[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SuperNerd[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Hiker[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Biker[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Burglar[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Engineer[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Fisherman[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SwimmerM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_CueBall[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Gamer[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Beauty[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SwimmerF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_PsychicM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Rocker[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Juggler[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Tamer[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_BirdKeeper[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_BlackBelt[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RivalEarly[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Scientist[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderGiovanni[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RocketGruntM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_CooltrainerM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_CooltrainerF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_EliteFourLorelei[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_EliteFourBruno[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_EliteFourAgatha[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_EliteFourLance[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderBrock[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderMisty[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderLtSurge[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderErika[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderKoga[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderBlaine[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_LeaderSabrina[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Gentleman[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RivalLate[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_ChampionRival[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Channeler[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Twins[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_CoolCouple[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_YoungCouple[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_CrushKin[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SisAndBro[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_ProfessorOak[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSBrendan2[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RSMay2[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Red[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Leaf[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RocketGruntF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_PsychicF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_CrushGirl[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_TuberF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_PokemonBreeder[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_PokemonRangerM[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_PokemonRangerF[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_AromaLady[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_RuinManiac[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Lady[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_Painter[] =
|
||||
{
|
||||
sAnim_GeneralFrame0,
|
||||
};
|
||||
|
||||
const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[] =
|
||||
{
|
||||
[TRAINER_PIC_AQUA_LEADER_ARCHIE] = sAnims_AquaLeaderArchie,
|
||||
[TRAINER_PIC_AQUA_GRUNT_M] = sAnims_AquaGruntM,
|
||||
[TRAINER_PIC_AQUA_GRUNT_F] = sAnims_AquaGruntF,
|
||||
[TRAINER_PIC_RS_AROMA_LADY] = sAnims_RSAromaLady,
|
||||
[TRAINER_PIC_RS_RUIN_MANIAC] = sAnims_RSRuinManiac,
|
||||
[TRAINER_PIC_INTERVIEWER] = sAnims_Interviewer,
|
||||
[TRAINER_PIC_RS_TUBER_F] = sAnims_RSTuberF,
|
||||
[TRAINER_PIC_RS_TUBER_M] = sAnims_RSTuberM,
|
||||
[TRAINER_PIC_RS_COOLTRAINER_M] = sAnims_RSCooltrainerM,
|
||||
[TRAINER_PIC_RS_COOLTRAINER_F] = sAnims_RSCooltrainerF,
|
||||
[TRAINER_PIC_HEX_MANIAC] = sAnims_HexManiac,
|
||||
[TRAINER_PIC_RS_LADY] = sAnims_RSLady,
|
||||
[TRAINER_PIC_RS_BEAUTY] = sAnims_RSBeauty,
|
||||
[TRAINER_PIC_RICH_BOY] = sAnims_RichBoy,
|
||||
[TRAINER_PIC_RS_POKEMANIAC] = sAnims_RSPokemaniac,
|
||||
[TRAINER_PIC_RS_SWIMMER_M] = sAnims_RSSwimmerM,
|
||||
[TRAINER_PIC_RS_BLACK_BELT] = sAnims_RSBlackBelt,
|
||||
[TRAINER_PIC_GUITARIST] = sAnims_Guitarist,
|
||||
[TRAINER_PIC_KINDLER] = sAnims_Kindler,
|
||||
[TRAINER_PIC_RS_CAMPER] = sAnims_RSCamper,
|
||||
[TRAINER_PIC_BUG_MANIAC] = sAnims_BugManiac,
|
||||
[TRAINER_PIC_RS_PSYCHIC_M] = sAnims_RSPsychicM,
|
||||
[TRAINER_PIC_RS_PSYCHIC_F] = sAnims_RSPsychicF,
|
||||
[TRAINER_PIC_RS_GENTLEMAN] = sAnims_RSGentleman,
|
||||
[TRAINER_PIC_ELITE_FOUR_SIDNEY] = sAnims_EliteFourSidney,
|
||||
[TRAINER_PIC_ELITE_FOUR_PHOEBE] = sAnims_EliteFourPhoebe,
|
||||
[TRAINER_PIC_LEADER_ROXANNE] = sAnims_LeaderRoxanne,
|
||||
[TRAINER_PIC_LEADER_BRAWLY] = sAnims_LeaderBrawly,
|
||||
[TRAINER_PIC_LEADER_TATE_AND_LIZA] = sAnims_LeaderTateAndLiza,
|
||||
[TRAINER_PIC_SCHOOL_KID_M] = sAnims_SchoolKidM,
|
||||
[TRAINER_PIC_SCHOOL_KID_F] = sAnims_SchoolKidF,
|
||||
[TRAINER_PIC_SR_AND_JR] = sAnims_SrAndJr,
|
||||
[TRAINER_PIC_POKEFAN_M] = sAnims_PokefanM,
|
||||
[TRAINER_PIC_POKEFAN_F] = sAnims_PokefanF,
|
||||
[TRAINER_PIC_EXPERT_M] = sAnims_ExpertM,
|
||||
[TRAINER_PIC_EXPERT_F] = sAnims_ExpertF,
|
||||
[TRAINER_PIC_RS_YOUNGSTER] = sAnims_RSYoungster,
|
||||
[TRAINER_PIC_CHAMPION_STEVEN] = sAnims_ChampionSteven,
|
||||
[TRAINER_PIC_RS_FISHERMAN] = sAnims_RSFisherman,
|
||||
[TRAINER_PIC_CYCLING_TRIATHLETE_M] = sAnims_CyclingTriathleteM,
|
||||
[TRAINER_PIC_CYCLING_TRIATHLETE_F] = sAnims_CyclingTriathleteF,
|
||||
[TRAINER_PIC_RUNNING_TRIATHLETE_M] = sAnims_RunningTriathleteM,
|
||||
[TRAINER_PIC_RUNNING_TRIATHLETE_F] = sAnims_RunningTriathleteF,
|
||||
[TRAINER_PIC_SWIMMING_TRIATHLETE_M] = sAnims_SwimmingTriathleteM,
|
||||
[TRAINER_PIC_SWIMMING_TRIATHLETE_F] = sAnims_SwimmingTriathleteF,
|
||||
[TRAINER_PIC_DRAGON_TAMER] = sAnims_DragonTamer,
|
||||
[TRAINER_PIC_RS_BIRD_KEEPER] = sAnims_RSBirdKeeper,
|
||||
[TRAINER_PIC_NINJA_BOY] = sAnims_NinjaBoy,
|
||||
[TRAINER_PIC_BATTLE_GIRL] = sAnims_BattleGirl,
|
||||
[TRAINER_PIC_PARASOL_LADY] = sAnims_ParasolLady,
|
||||
[TRAINER_PIC_RS_SWIMMER_F] = sAnims_RSSwimmerF,
|
||||
[TRAINER_PIC_RS_PICNICKER] = sAnims_RSPicnicker,
|
||||
[TRAINER_PIC_RS_TWINS] = sAnims_RSTwins,
|
||||
[TRAINER_PIC_RS_SAILOR] = sAnims_RSSailor,
|
||||
[TRAINER_PIC_COLLECTOR] = sAnims_Collector,
|
||||
[TRAINER_PIC_WALLY] = sAnims_Wally,
|
||||
[TRAINER_PIC_RS_BRENDAN_1] = sAnims_RSBrendan1,
|
||||
[TRAINER_PIC_RS_MAY_1] = sAnims_RSMay1,
|
||||
[TRAINER_PIC_RS_POKEMON_BREEDER_M] = sAnims_RSPokemonBreederM,
|
||||
[TRAINER_PIC_RS_POKEMON_BREEDER_F] = sAnims_RSPokemonBreederF,
|
||||
[TRAINER_PIC_RS_POKEMON_RANGER_M] = sAnims_RSPokemonRangerM,
|
||||
[TRAINER_PIC_RS_POKEMON_RANGER_F] = sAnims_RSPokemonRangerF,
|
||||
[TRAINER_PIC_MAGMA_LEADER_MAXIE] = sAnims_MagmaLeaderMaxie,
|
||||
[TRAINER_PIC_MAGMA_GRUNT_M] = sAnims_MagmaGruntM,
|
||||
[TRAINER_PIC_MAGMA_GRUNT_F] = sAnims_MagmaGruntF,
|
||||
[TRAINER_PIC_RS_LASS] = sAnims_RSLass,
|
||||
[TRAINER_PIC_RS_BUG_CATCHER] = sAnims_RSBugCatcher,
|
||||
[TRAINER_PIC_RS_HIKER] = sAnims_RSHiker,
|
||||
[TRAINER_PIC_RS_YOUNG_COUPLE] = sAnims_RSYoungCouple,
|
||||
[TRAINER_PIC_OLD_COUPLE] = sAnims_OldCouple,
|
||||
[TRAINER_PIC_RS_SIS_AND_BRO] = sAnims_RSSisAndBro,
|
||||
[TRAINER_PIC_AQUA_ADMIN_M] = sAnims_AquaAdminM,
|
||||
[TRAINER_PIC_AQUA_ADMIN_F] = sAnims_AquaAdminF,
|
||||
[TRAINER_PIC_MAGMA_ADMIN_M] = sAnims_MagmaAdminM,
|
||||
[TRAINER_PIC_MAGMA_ADMIN_F] = sAnims_MagmaAdminF,
|
||||
[TRAINER_PIC_LEADER_WATTSON] = sAnims_LeaderWattson,
|
||||
[TRAINER_PIC_LEADER_FLANNERY] = sAnims_LeaderFlannery,
|
||||
[TRAINER_PIC_LEADER_NORMAN] = sAnims_LeaderNorman,
|
||||
[TRAINER_PIC_LEADER_WINONA] = sAnims_LeaderWinona,
|
||||
[TRAINER_PIC_LEADER_WALLACE] = sAnims_LeaderWallace,
|
||||
[TRAINER_PIC_ELITE_FOUR_GLACIA] = sAnims_EliteFourGlacia,
|
||||
[TRAINER_PIC_ELITE_FOUR_DRAKE] = sAnims_EliteFourDrake,
|
||||
[TRAINER_PIC_YOUNGSTER] = sAnims_Youngster,
|
||||
[TRAINER_PIC_BUG_CATCHER] = sAnims_BugCatcher,
|
||||
[TRAINER_PIC_LASS] = sAnims_Lass,
|
||||
[TRAINER_PIC_SAILOR] = sAnims_Sailor,
|
||||
[TRAINER_PIC_CAMPER] = sAnims_Camper,
|
||||
[TRAINER_PIC_PICNICKER] = sAnims_Picnicker,
|
||||
[TRAINER_PIC_POKEMANIAC] = sAnims_Pokemaniac,
|
||||
[TRAINER_PIC_SUPER_NERD] = sAnims_SuperNerd,
|
||||
[TRAINER_PIC_HIKER] = sAnims_Hiker,
|
||||
[TRAINER_PIC_BIKER] = sAnims_Biker,
|
||||
[TRAINER_PIC_BURGLAR] = sAnims_Burglar,
|
||||
[TRAINER_PIC_ENGINEER] = sAnims_Engineer,
|
||||
[TRAINER_PIC_FISHERMAN] = sAnims_Fisherman,
|
||||
[TRAINER_PIC_SWIMMER_M] = sAnims_SwimmerM,
|
||||
[TRAINER_PIC_CUE_BALL] = sAnims_CueBall,
|
||||
[TRAINER_PIC_GAMER] = sAnims_Gamer,
|
||||
[TRAINER_PIC_BEAUTY] = sAnims_Beauty,
|
||||
[TRAINER_PIC_SWIMMER_F] = sAnims_SwimmerF,
|
||||
[TRAINER_PIC_PSYCHIC_M] = sAnims_PsychicM,
|
||||
[TRAINER_PIC_ROCKER] = sAnims_Rocker,
|
||||
[TRAINER_PIC_JUGGLER] = sAnims_Juggler,
|
||||
[TRAINER_PIC_TAMER] = sAnims_Tamer,
|
||||
[TRAINER_PIC_BIRD_KEEPER] = sAnims_BirdKeeper,
|
||||
[TRAINER_PIC_BLACK_BELT] = sAnims_BlackBelt,
|
||||
[TRAINER_PIC_RIVAL_EARLY] = sAnims_RivalEarly,
|
||||
[TRAINER_PIC_SCIENTIST] = sAnims_Scientist,
|
||||
[TRAINER_PIC_LEADER_GIOVANNI] = sAnims_LeaderGiovanni,
|
||||
[TRAINER_PIC_ROCKET_GRUNT_M] = sAnims_RocketGruntM,
|
||||
[TRAINER_PIC_COOLTRAINER_M] = sAnims_CooltrainerM,
|
||||
[TRAINER_PIC_COOLTRAINER_F] = sAnims_CooltrainerF,
|
||||
[TRAINER_PIC_ELITE_FOUR_LORELEI] = sAnims_EliteFourLorelei,
|
||||
[TRAINER_PIC_ELITE_FOUR_BRUNO] = sAnims_EliteFourBruno,
|
||||
[TRAINER_PIC_ELITE_FOUR_AGATHA] = sAnims_EliteFourAgatha,
|
||||
[TRAINER_PIC_ELITE_FOUR_LANCE] = sAnims_EliteFourLance,
|
||||
[TRAINER_PIC_LEADER_BROCK] = sAnims_LeaderBrock,
|
||||
[TRAINER_PIC_LEADER_MISTY] = sAnims_LeaderMisty,
|
||||
[TRAINER_PIC_LEADER_LT_SURGE] = sAnims_LeaderLtSurge,
|
||||
[TRAINER_PIC_LEADER_ERIKA] = sAnims_LeaderErika,
|
||||
[TRAINER_PIC_LEADER_KOGA] = sAnims_LeaderKoga,
|
||||
[TRAINER_PIC_LEADER_BLAINE] = sAnims_LeaderBlaine,
|
||||
[TRAINER_PIC_LEADER_SABRINA] = sAnims_LeaderSabrina,
|
||||
[TRAINER_PIC_GENTLEMAN] = sAnims_Gentleman,
|
||||
[TRAINER_PIC_RIVAL_LATE] = sAnims_RivalLate,
|
||||
[TRAINER_PIC_CHAMPION_RIVAL] = sAnims_ChampionRival,
|
||||
[TRAINER_PIC_CHANNELER] = sAnims_Channeler,
|
||||
[TRAINER_PIC_TWINS] = sAnims_Twins,
|
||||
[TRAINER_PIC_COOL_COUPLE] = sAnims_CoolCouple,
|
||||
[TRAINER_PIC_YOUNG_COUPLE] = sAnims_YoungCouple,
|
||||
[TRAINER_PIC_CRUSH_KIN] = sAnims_CrushKin,
|
||||
[TRAINER_PIC_SIS_AND_BRO] = sAnims_SisAndBro,
|
||||
[TRAINER_PIC_PROFESSOR_OAK] = sAnims_ProfessorOak,
|
||||
[TRAINER_PIC_RS_BRENDAN_2] = sAnims_RSBrendan2,
|
||||
[TRAINER_PIC_RS_MAY_2] = sAnims_RSMay2,
|
||||
[TRAINER_PIC_RED] = sAnims_Red,
|
||||
[TRAINER_PIC_LEAF] = sAnims_Leaf,
|
||||
[TRAINER_PIC_ROCKET_GRUNT_F] = sAnims_RocketGruntF,
|
||||
[TRAINER_PIC_PSYCHIC_F] = sAnims_PsychicF,
|
||||
[TRAINER_PIC_CRUSH_GIRL] = sAnims_CrushGirl,
|
||||
[TRAINER_PIC_TUBER_F] = sAnims_TuberF,
|
||||
[TRAINER_PIC_POKEMON_BREEDER] = sAnims_PokemonBreeder,
|
||||
[TRAINER_PIC_POKEMON_RANGER_M] = sAnims_PokemonRangerM,
|
||||
[TRAINER_PIC_POKEMON_RANGER_F] = sAnims_PokemonRangerF,
|
||||
[TRAINER_PIC_AROMA_LADY] = sAnims_AromaLady,
|
||||
[TRAINER_PIC_RUIN_MANIAC] = sAnims_RuinManiac,
|
||||
[TRAINER_PIC_LADY] = sAnims_Lady,
|
||||
[TRAINER_PIC_PAINTER] = sAnims_Painter,
|
||||
};
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "task.h"
|
||||
#include "text_window.h"
|
||||
#include "trig.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/pokemon.h"
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
static void QuestLogOverrideJoyVars(struct FieldInput *input, u16 *newKeys, u16 *heldKeys);
|
||||
static void Task_QuestLogPlayback_OpenStartMenu(u8 taskId);
|
||||
static void GetPlayerPosition(struct MapPosition * position);
|
||||
static void GetInFrontOfPlayerPosition(struct MapPosition * position);
|
||||
static u16 GetPlayerCurMetatileBehavior(void);
|
||||
static bool8 TryStartInteractionScript(struct MapPosition * position, u16 metatileBehavior, u8 playerDirection);
|
||||
static const u8 *GetInteractionScript(struct MapPosition * position, u8 metatileBehavior, u8 playerDirection);
|
||||
@@ -371,7 +370,7 @@ static void GetPlayerPosition(struct MapPosition *position)
|
||||
position->elevation = PlayerGetElevation();
|
||||
}
|
||||
|
||||
static void GetInFrontOfPlayerPosition(struct MapPosition *position)
|
||||
void GetInFrontOfPlayerPosition(struct MapPosition *position)
|
||||
{
|
||||
s16 x, y;
|
||||
|
||||
|
||||
@@ -1127,9 +1127,9 @@ u8 GetPlayerAvatarGraphicsIdByStateId(u8 state)
|
||||
return GetPlayerAvatarGraphicsIdByStateIdAndGender(state, gPlayerAvatar.gender);
|
||||
}
|
||||
|
||||
u8 GetPlayerAvatarGenderByGraphicsId(u8 gfxId)
|
||||
u8 GetPlayerAvatarGenderByGraphicsId(u16 graphicsId)
|
||||
{
|
||||
switch (gfxId)
|
||||
switch (graphicsId)
|
||||
{
|
||||
case OBJ_EVENT_GFX_GREEN_NORMAL:
|
||||
case OBJ_EVENT_GFX_GREEN_BIKE:
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "script.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "overworld.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "field_message_box.h"
|
||||
#include "event_data.h"
|
||||
#include "strings.h"
|
||||
@@ -1583,9 +1584,31 @@ void ResetContextNpcTextColor(void)
|
||||
gSpecialVar_TextColor = NPC_TEXT_COLOR_DEFAULT;
|
||||
}
|
||||
|
||||
static u8 GetFollowerGender(void)
|
||||
{
|
||||
struct Pokemon *firstLiveMon = GetFirstLiveMon();
|
||||
if (firstLiveMon == NULL)
|
||||
return MON_GENDERLESS;
|
||||
return GetMonGender(firstLiveMon);
|
||||
}
|
||||
|
||||
static u8 GetFollowerTextColor(void)
|
||||
{
|
||||
switch (GetFollowerGender())
|
||||
{
|
||||
case MON_FEMALE:
|
||||
return NPC_TEXT_COLOR_FEMALE;
|
||||
case MON_MALE:
|
||||
return NPC_TEXT_COLOR_MALE;
|
||||
case MON_GENDERLESS:
|
||||
default:
|
||||
return NPC_TEXT_COLOR_NEUTRAL;
|
||||
}
|
||||
}
|
||||
|
||||
u8 ContextNpcGetTextColor(void)
|
||||
{
|
||||
u8 gfxId;
|
||||
u16 gfxId;
|
||||
if (gSpecialVar_TextColor != NPC_TEXT_COLOR_DEFAULT)
|
||||
{
|
||||
// A text color has been specified, use that
|
||||
@@ -1600,7 +1623,18 @@ u8 ContextNpcGetTextColor(void)
|
||||
{
|
||||
// An object is selected and no color has been specified.
|
||||
// Use the text color normally associated with this object's sprite.
|
||||
gfxId = gObjectEvents[gSelectedObjectEvent].graphicsId;
|
||||
struct MapPosition position;
|
||||
u8 objEventId;
|
||||
GetInFrontOfPlayerPosition(&position);
|
||||
objEventId = GetObjectEventIdByPosition(position.x, position.y, position.elevation);
|
||||
if (objEventId < OBJECT_EVENTS_COUNT)
|
||||
gfxId = gObjectEvents[objEventId].graphicsId;
|
||||
else
|
||||
gfxId = gObjectEvents[gSelectedObjectEvent].graphicsId;
|
||||
|
||||
if (gfxId >= OBJ_EVENT_GFX_MON_BASE)
|
||||
return GetFollowerTextColor();
|
||||
|
||||
if (gfxId >= OBJ_EVENT_GFX_VAR_0)
|
||||
gfxId = VarGetObjectEventGraphicsId(gfxId - OBJ_EVENT_GFX_VAR_0);
|
||||
return GetColorFromTextColorTable(gfxId);
|
||||
|
||||
@@ -3548,9 +3548,12 @@ static void Task_DexScreen_RegisterMonToPokedex(u8 taskId)
|
||||
sPokedexScreenData->state = 8;
|
||||
break;
|
||||
case 8:
|
||||
FreeAllWindowBuffers(); // fixed crash after catching mon and pokedex is shown
|
||||
DexScreen_DrawMonDexPage(TRUE);
|
||||
sPokedexScreenData->state = 9;
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
FreeAllWindowBuffers(); // fixed crash after catching mon and pokedex is shown
|
||||
DexScreen_DrawMonDexPage(TRUE);
|
||||
sPokedexScreenData->state = 9;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
sPokedexScreenData->data[0] = 0;
|
||||
|
||||
@@ -2078,7 +2078,7 @@ void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerSpriteId, u8 battlerPosit
|
||||
gMultiuseSpriteTemplate = gMonSpritesGfxPtr->templates[battlerPosition];
|
||||
else
|
||||
gMultiuseSpriteTemplate = gBattlerSpriteTemplates[battlerPosition];
|
||||
gMultiuseSpriteTemplate.anims = gTrainerFrontAnimsPtrTable[trainerSpriteId];
|
||||
gMultiuseSpriteTemplate.anims = sAnims_Trainer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2090,7 +2090,7 @@ void SetMultiuseSpriteTemplateToTrainerFront(u16 trainerPicId, u8 battlerPositio
|
||||
gMultiuseSpriteTemplate = gBattlerSpriteTemplates[battlerPosition];
|
||||
|
||||
gMultiuseSpriteTemplate.paletteTag = trainerPicId;
|
||||
gMultiuseSpriteTemplate.anims = gTrainerFrontAnimsPtrTable[trainerPicId];
|
||||
gMultiuseSpriteTemplate.anims = sAnims_Trainer;
|
||||
}
|
||||
|
||||
static void EncryptBoxMon(struct BoxPokemon *boxMon)
|
||||
|
||||
@@ -107,7 +107,7 @@ void AssignSpriteAnimsTable(bool8 isTrainer)
|
||||
if (!isTrainer)
|
||||
sCreatingSpriteTemplate.anims = gAnims_MonPic;
|
||||
else
|
||||
sCreatingSpriteTemplate.anims = gTrainerFrontAnimsPtrTable[0];
|
||||
sCreatingSpriteTemplate.anims = sAnims_Trainer;
|
||||
}
|
||||
|
||||
u16 CreatePicSprite(u16 species, bool32 isShiny, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer)
|
||||
|
||||
Reference in New Issue
Block a user