mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Struct pointers star standarizing
This commit is contained in:
parent
13672680b0
commit
01558ff8f3
@ -94,7 +94,7 @@ static void ApplyAffineAnimFrame(u8 matrixNum, struct AffineAnimFrameCmd *frameC
|
|||||||
static u8 IndexOfSpriteTileTag(u16 tag);
|
static u8 IndexOfSpriteTileTag(u16 tag);
|
||||||
static void AllocSpriteTileRange(u16 tag, u16 start, u16 count);
|
static void AllocSpriteTileRange(u16 tag, u16 start, u16 count);
|
||||||
static void DoLoadSpritePalette(const u16 *src, u16 paletteOffset);
|
static void DoLoadSpritePalette(const u16 *src, u16 paletteOffset);
|
||||||
static void UpdateSpriteMatrixAnchorPos(struct Sprite*, s32, s32);
|
static void UpdateSpriteMatrixAnchorPos(struct Sprite *, s32, s32);
|
||||||
|
|
||||||
typedef void (*AnimFunc)(struct Sprite *);
|
typedef void (*AnimFunc)(struct Sprite *);
|
||||||
typedef void (*AnimCmdFunc)(struct Sprite *);
|
typedef void (*AnimCmdFunc)(struct Sprite *);
|
||||||
@ -1201,7 +1201,7 @@ u8 GetSpriteMatrixNum(struct Sprite *sprite)
|
|||||||
|
|
||||||
// Used to shift a sprite's position as it scales.
|
// Used to shift a sprite's position as it scales.
|
||||||
// Only used by the minigame countdown, so that for instance the numbers don't slide up as they squish down before jumping.
|
// Only used by the minigame countdown, so that for instance the numbers don't slide up as they squish down before jumping.
|
||||||
void SetSpriteMatrixAnchor(struct Sprite* sprite, s16 x, s16 y)
|
void SetSpriteMatrixAnchor(struct Sprite *sprite, s16 x, s16 y)
|
||||||
{
|
{
|
||||||
sprite->sAnchorX = x;
|
sprite->sAnchorX = x;
|
||||||
sprite->sAnchorY = y;
|
sprite->sAnchorY = y;
|
||||||
|
@ -282,7 +282,7 @@ void FreeSpritePalette(struct Sprite *sprite);
|
|||||||
void FreeSpriteOamMatrix(struct Sprite *sprite);
|
void FreeSpriteOamMatrix(struct Sprite *sprite);
|
||||||
void DestroySpriteAndFreeResources(struct Sprite *sprite);
|
void DestroySpriteAndFreeResources(struct Sprite *sprite);
|
||||||
void AnimateSprite(struct Sprite *sprite);
|
void AnimateSprite(struct Sprite *sprite);
|
||||||
void SetSpriteMatrixAnchor(struct Sprite* sprite, s16 x, s16 y);
|
void SetSpriteMatrixAnchor(struct Sprite *sprite, s16 x, s16 y);
|
||||||
void StartSpriteAnim(struct Sprite *sprite, u8 animNum);
|
void StartSpriteAnim(struct Sprite *sprite, u8 animNum);
|
||||||
void StartSpriteAnimIfDifferent(struct Sprite *sprite, u8 animNum);
|
void StartSpriteAnimIfDifferent(struct Sprite *sprite, u8 animNum);
|
||||||
void SeekSpriteAnim(struct Sprite *sprite, u8 animCmdIndex);
|
void SeekSpriteAnim(struct Sprite *sprite, u8 animCmdIndex);
|
||||||
|
@ -108,8 +108,8 @@ u8 GetBattlerSpriteBGPriority(u8 battlerId);
|
|||||||
void *LoadPointerFromVars(s16 bottom, s16 top);
|
void *LoadPointerFromVars(s16 bottom, s16 top);
|
||||||
void StorePointerInVars(s16 *bottom, s16 *top, const void *ptr);
|
void StorePointerInVars(s16 *bottom, s16 *top, const void *ptr);
|
||||||
void InitPrioritiesForVisibleBattlers(void);
|
void InitPrioritiesForVisibleBattlers(void);
|
||||||
void GetBattleAnimBg1Data(struct BattleAnimBgData*);
|
void GetBattleAnimBg1Data(struct BattleAnimBgData *);
|
||||||
void GetBattleAnimBgData(struct BattleAnimBgData*, u32 bgId);
|
void GetBattleAnimBgData(struct BattleAnimBgData *, u32 bgId);
|
||||||
u8 GetBattlerSpriteSubpriority(u8 battlerId);
|
u8 GetBattlerSpriteSubpriority(u8 battlerId);
|
||||||
bool8 TranslateAnimHorizontalArc(struct Sprite *sprite);
|
bool8 TranslateAnimHorizontalArc(struct Sprite *sprite);
|
||||||
void TranslateSpriteLinearByIdFixedPoint(struct Sprite *sprite);
|
void TranslateSpriteLinearByIdFixedPoint(struct Sprite *sprite);
|
||||||
@ -122,9 +122,9 @@ u32 GetBattlePalettesMask(bool8 battleBackground, bool8 attacker, bool8 target,
|
|||||||
u32 GetBattleMonSpritePalettesMask(u8 playerLeft, u8 playerRight, u8 opponentLeft, u8 opponentRight);
|
u32 GetBattleMonSpritePalettesMask(u8 playerLeft, u8 playerRight, u8 opponentLeft, u8 opponentRight);
|
||||||
u8 AnimDummyReturnArg(u8 battler);
|
u8 AnimDummyReturnArg(u8 battler);
|
||||||
s16 CloneBattlerSpriteWithBlend(u8);
|
s16 CloneBattlerSpriteWithBlend(u8);
|
||||||
void DestroySpriteWithActiveSheet(struct Sprite*);
|
void DestroySpriteWithActiveSheet(struct Sprite *);
|
||||||
u8 CreateInvisibleSpriteCopy(int, u8, int);
|
u8 CreateInvisibleSpriteCopy(int, u8, int);
|
||||||
void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const void *, bool32);
|
void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData *, const void *, bool32);
|
||||||
void AnimLoadCompressedBgGfx(u32, const u32 *, u32);
|
void AnimLoadCompressedBgGfx(u32, const u32 *, u32);
|
||||||
void UpdateAnimBg3ScreenSize(bool8);
|
void UpdateAnimBg3ScreenSize(bool8);
|
||||||
void TranslateSpriteInGrowingCircle(struct Sprite *);
|
void TranslateSpriteInGrowingCircle(struct Sprite *);
|
||||||
@ -186,7 +186,7 @@ u8 GetAnimBattlerSpriteId(u8 wantedBattler);
|
|||||||
bool8 IsDoubleBattle(void);
|
bool8 IsDoubleBattle(void);
|
||||||
u8 GetBattleBgPaletteNum(void);
|
u8 GetBattleBgPaletteNum(void);
|
||||||
u8 GetBattlerSpriteBGPriorityRank(u8 battlerId);
|
u8 GetBattlerSpriteBGPriorityRank(u8 battlerId);
|
||||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite*));
|
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite *));
|
||||||
void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite);
|
void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite);
|
||||||
u8 GetBattlerSpriteDefault_Y(u8 battlerId);
|
u8 GetBattlerSpriteDefault_Y(u8 battlerId);
|
||||||
u8 GetSubstituteSpriteDefault_Y(u8 battlerId);
|
u8 GetSubstituteSpriteDefault_Y(u8 battlerId);
|
||||||
@ -216,8 +216,8 @@ void InitStatsChangeAnimation(u8);
|
|||||||
void StartMonScrollingBgMask(u8 taskId, int unused, u16 scrollSpeed, u8 battler, bool8 includePartner, u8 numFadeSteps, u8 fadeStepDelay, u8 duration, const u32 *gfx, const u32 *tilemap, const u32 *palette);
|
void StartMonScrollingBgMask(u8 taskId, int unused, u16 scrollSpeed, u8 battler, bool8 includePartner, u8 numFadeSteps, u8 fadeStepDelay, u8 duration, const u32 *gfx, const u32 *tilemap, const u32 *palette);
|
||||||
|
|
||||||
// battle_anim_effects_1.c
|
// battle_anim_effects_1.c
|
||||||
void SetSpriteNextToMonHead(u8 battler, struct Sprite* sprite);
|
void SetSpriteNextToMonHead(u8 battler, struct Sprite *sprite);
|
||||||
void AnimMoveTwisterParticle(struct Sprite* sprite);
|
void AnimMoveTwisterParticle(struct Sprite *sprite);
|
||||||
void AnimParticleBurst(struct Sprite *);
|
void AnimParticleBurst(struct Sprite *);
|
||||||
|
|
||||||
// battle_anim_water.c
|
// battle_anim_water.c
|
||||||
|
@ -10,7 +10,7 @@ void LZDecompressVram(const u32 *src, void *dest);
|
|||||||
|
|
||||||
u16 LoadCompressedSpriteSheet(const struct CompressedSpriteSheet *src);
|
u16 LoadCompressedSpriteSheet(const struct CompressedSpriteSheet *src);
|
||||||
void LoadCompressedSpriteSheetOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer);
|
void LoadCompressedSpriteSheetOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer);
|
||||||
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src);
|
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet *src);
|
||||||
|
|
||||||
void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src);
|
void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src);
|
||||||
void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePalette *src, void *buffer);
|
void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePalette *src, void *buffer);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef GUARD_EVOLUTION_SCENE_H
|
#ifndef GUARD_EVOLUTION_SCENE_H
|
||||||
#define GUARD_EVOLUTION_SCENE_H
|
#define GUARD_EVOLUTION_SCENE_H
|
||||||
|
|
||||||
void BeginEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
|
void BeginEvolutionScene(struct Pokemon *mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
|
||||||
void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
|
void EvolutionScene(struct Pokemon *mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
|
||||||
void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpriteID, u8 partyID);
|
void TradeEvolutionScene(struct Pokemon *mon, u16 speciesToEvolve, u8 preEvoSpriteID, u8 partyID);
|
||||||
|
|
||||||
extern void (*gCB2_AfterEvolution)(void);
|
extern void (*gCB2_AfterEvolution)(void);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define GUARD_FARAWAY_ISLAND_H
|
#define GUARD_FARAWAY_ISLAND_H
|
||||||
|
|
||||||
u32 GetMewMoveDirection(void);
|
u32 GetMewMoveDirection(void);
|
||||||
bool8 ShouldMewShakeGrass(struct ObjectEvent*);
|
bool8 ShouldMewShakeGrass(struct ObjectEvent *);
|
||||||
void UpdateFarawayIslandStepCounter(void);
|
void UpdateFarawayIslandStepCounter(void);
|
||||||
bool8 ObjectEventIsFarawayIslandMew(struct ObjectEvent *);
|
bool8 ObjectEventIsFarawayIslandMew(struct ObjectEvent *);
|
||||||
bool8 IsMewPlayingHideAndSeek(void);
|
bool8 IsMewPlayingHideAndSeek(void);
|
||||||
|
@ -39,8 +39,8 @@ void StartEscalatorWarp(u8 metatileBehavior, u8 priority);
|
|||||||
void StartLavaridgeGymB1FWarp(u8 priority);
|
void StartLavaridgeGymB1FWarp(u8 priority);
|
||||||
void StartLavaridgeGym1FWarp(u8 priority);
|
void StartLavaridgeGym1FWarp(u8 priority);
|
||||||
|
|
||||||
void SpriteCB_AshPuff(struct Sprite*);
|
void SpriteCB_AshPuff(struct Sprite *);
|
||||||
void SpriteCB_AshLaunch(struct Sprite*);
|
void SpriteCB_AshLaunch(struct Sprite *);
|
||||||
|
|
||||||
void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b);
|
void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b);
|
||||||
void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId);
|
void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId);
|
||||||
|
@ -20,25 +20,25 @@ void SetSurfBlob_PlayerOffset(u8 spriteId, bool8 hasOffset, s16 offset);
|
|||||||
bool8 UpdateRevealDisguise(struct ObjectEvent *);
|
bool8 UpdateRevealDisguise(struct ObjectEvent *);
|
||||||
void StartRevealDisguise(struct ObjectEvent *);
|
void StartRevealDisguise(struct ObjectEvent *);
|
||||||
void StartAshFieldEffect(s16, s16, u16, s16);
|
void StartAshFieldEffect(s16, s16, u16, s16);
|
||||||
void SetUpReflection(struct ObjectEvent*, struct Sprite*, u8);
|
void SetUpReflection(struct ObjectEvent *, struct Sprite *, u8);
|
||||||
u32 StartFieldEffectForObjectEvent(u8, struct ObjectEvent*);
|
u32 StartFieldEffectForObjectEvent(u8, struct ObjectEvent *);
|
||||||
u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
||||||
void UpdateRayquazaSpotlightEffect(struct Sprite*);
|
void UpdateRayquazaSpotlightEffect(struct Sprite *);
|
||||||
void UpdateShadowFieldEffect(struct Sprite*);
|
void UpdateShadowFieldEffect(struct Sprite *);
|
||||||
void UpdateTallGrassFieldEffect(struct Sprite*);
|
void UpdateTallGrassFieldEffect(struct Sprite *);
|
||||||
void WaitFieldEffectSpriteAnim(struct Sprite*);
|
void WaitFieldEffectSpriteAnim(struct Sprite *);
|
||||||
void UpdateAshFieldEffect(struct Sprite*);
|
void UpdateAshFieldEffect(struct Sprite *);
|
||||||
void UpdateSurfBlobFieldEffect(struct Sprite*);
|
void UpdateSurfBlobFieldEffect(struct Sprite *);
|
||||||
void UpdateJumpImpactEffect(struct Sprite*);
|
void UpdateJumpImpactEffect(struct Sprite *);
|
||||||
void UpdateFootprintsTireTracksFieldEffect(struct Sprite*);
|
void UpdateFootprintsTireTracksFieldEffect(struct Sprite *);
|
||||||
void UpdateSplashFieldEffect(struct Sprite*);
|
void UpdateSplashFieldEffect(struct Sprite *);
|
||||||
void UpdateLongGrassFieldEffect(struct Sprite*);
|
void UpdateLongGrassFieldEffect(struct Sprite *);
|
||||||
void UpdateSandPileFieldEffect(struct Sprite*);
|
void UpdateSandPileFieldEffect(struct Sprite *);
|
||||||
void UpdateDisguiseFieldEffect(struct Sprite*);
|
void UpdateDisguiseFieldEffect(struct Sprite *);
|
||||||
void UpdateShortGrassFieldEffect(struct Sprite*);
|
void UpdateShortGrassFieldEffect(struct Sprite *);
|
||||||
void UpdateHotSpringsWaterFieldEffect(struct Sprite*);
|
void UpdateHotSpringsWaterFieldEffect(struct Sprite *);
|
||||||
void UpdateBubblesFieldEffect(struct Sprite*);
|
void UpdateBubblesFieldEffect(struct Sprite *);
|
||||||
void UpdateSparkleFieldEffect(struct Sprite*);
|
void UpdateSparkleFieldEffect(struct Sprite *);
|
||||||
void SetSpriteInvisible(u8 spriteId);
|
void SetSpriteInvisible(u8 spriteId);
|
||||||
void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y);
|
void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y);
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ void AddTextPrinterWithCallbackForMessage(bool8 canSpeedUp, void (*callback)(str
|
|||||||
void BgDmaFill(u32 bg, u8 value, int offset, int size);
|
void BgDmaFill(u32 bg, u8 value, int offset, int size);
|
||||||
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
|
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
|
||||||
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
|
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
|
||||||
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
|
void SetWindowTemplateFields(struct WindowTemplate *template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
|
||||||
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
|
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
|
||||||
void ScheduleBgCopyTilemapToVram(u8 bgNum);
|
void ScheduleBgCopyTilemapToVram(u8 bgNum);
|
||||||
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
|
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
|
||||||
|
@ -12,10 +12,10 @@ struct CryScreenWindow
|
|||||||
|
|
||||||
extern u8 gDexCryScreenState;
|
extern u8 gDexCryScreenState;
|
||||||
|
|
||||||
bool8 LoadCryWaveformWindow(struct CryScreenWindow*, u8);
|
bool8 LoadCryWaveformWindow(struct CryScreenWindow *, u8);
|
||||||
void UpdateCryWaveformWindow(u8);
|
void UpdateCryWaveformWindow(u8);
|
||||||
void CryScreenPlayButton(u16);
|
void CryScreenPlayButton(u16);
|
||||||
bool8 LoadCryMeter(struct CryScreenWindow*, u8);
|
bool8 LoadCryMeter(struct CryScreenWindow *, u8);
|
||||||
void FreeCryScreen(void);
|
void FreeCryScreen(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -426,11 +426,11 @@ void SetWildMonHeldItem(void);
|
|||||||
bool8 IsMonShiny(struct Pokemon *mon);
|
bool8 IsMonShiny(struct Pokemon *mon);
|
||||||
bool8 IsShinyOtIdPersonality(u32 otId, u32 personality);
|
bool8 IsShinyOtIdPersonality(u32 otId, u32 personality);
|
||||||
const u8 *GetTrainerPartnerName(void);
|
const u8 *GetTrainerPartnerName(void);
|
||||||
void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 panMode);
|
void BattleAnimateFrontSprite(struct Sprite *sprite, u16 species, bool8 noCry, u8 panMode);
|
||||||
void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 panModeAnimFlag);
|
void DoMonFrontSpriteAnimation(struct Sprite *sprite, u16 species, bool8 noCry, u8 panModeAnimFlag);
|
||||||
void PokemonSummaryDoMonAnimation(struct Sprite* sprite, u16 species, bool8 oneFrame);
|
void PokemonSummaryDoMonAnimation(struct Sprite *sprite, u16 species, bool8 oneFrame);
|
||||||
void StopPokemonAnimationDelayTask(void);
|
void StopPokemonAnimationDelayTask(void);
|
||||||
void BattleAnimateBackSprite(struct Sprite* sprite, u16 species);
|
void BattleAnimateBackSprite(struct Sprite *sprite, u16 species);
|
||||||
u8 GetOpposingLinkMultiBattlerId(bool8 rightSide, u8 multiplayerId);
|
u8 GetOpposingLinkMultiBattlerId(bool8 rightSide, u8 multiplayerId);
|
||||||
u16 FacilityClassToPicIndex(u16 facilityClass);
|
u16 FacilityClassToPicIndex(u16 facilityClass);
|
||||||
u16 PlayerGenderToFrontTrainerPicId(u8 playerGender);
|
u16 PlayerGenderToFrontTrainerPicId(u8 playerGender);
|
||||||
|
@ -14,7 +14,7 @@ void CB2_StartCreateTradeMenu(void);
|
|||||||
void CB2_LinkTrade(void);
|
void CB2_LinkTrade(void);
|
||||||
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal);
|
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal);
|
||||||
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal);
|
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal);
|
||||||
int CanSpinTradeMon(struct Pokemon*, u16);
|
int CanSpinTradeMon(struct Pokemon *, u16);
|
||||||
void InitTradeSequenceBgGpuRegs(void);
|
void InitTradeSequenceBgGpuRegs(void);
|
||||||
void LinkTradeDrawWindow(void);
|
void LinkTradeDrawWindow(void);
|
||||||
void InitTradeBg(void);
|
void InitTradeBg(void);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1534,7 +1534,7 @@ static void AnimAirWaveProjectile_Step2(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void AnimAirWaveProjectile_Step1(struct Sprite *sprite)
|
static void AnimAirWaveProjectile_Step1(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[sprite->data[7]];
|
struct Task *task = &gTasks[sprite->data[7]];
|
||||||
if (sprite->data[0] > task->data[5])
|
if (sprite->data[0] > task->data[5])
|
||||||
{
|
{
|
||||||
sprite->data[5] += sprite->data[3];
|
sprite->data[5] += sprite->data[3];
|
||||||
@ -1571,7 +1571,7 @@ static void AnimAirWaveProjectile(struct Sprite *sprite)
|
|||||||
s16 b;
|
s16 b;
|
||||||
s16 c;
|
s16 c;
|
||||||
|
|
||||||
struct Task* task = &gTasks[sprite->data[7]];
|
struct Task *task = &gTasks[sprite->data[7]];
|
||||||
sprite->data[1] += (-2 & task->data[7]);
|
sprite->data[1] += (-2 & task->data[7]);
|
||||||
sprite->data[2] += (-2 & task->data[8]);
|
sprite->data[2] += (-2 & task->data[8]);
|
||||||
if (1 & task->data[7])
|
if (1 & task->data[7])
|
||||||
@ -2035,7 +2035,7 @@ static void AnimTask_GrowAndGrayscale_Step(u8 taskId)
|
|||||||
// No args.
|
// No args.
|
||||||
void AnimTask_Minimize(u8 taskId)
|
void AnimTask_Minimize(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
task->data[0] = spriteId;
|
task->data[0] = spriteId;
|
||||||
PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_NORMAL);
|
PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_NORMAL);
|
||||||
@ -2051,7 +2051,7 @@ void AnimTask_Minimize(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_Minimize_Step(u8 taskId)
|
static void AnimTask_Minimize_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
switch (task->data[1])
|
switch (task->data[1])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -2115,7 +2115,7 @@ static void AnimTask_Minimize_Step(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CreateMinimizeSprite(struct Task* task, u8 taskId)
|
static void CreateMinimizeSprite(struct Task *task, u8 taskId)
|
||||||
{
|
{
|
||||||
u16 matrixNum;
|
u16 matrixNum;
|
||||||
s16 spriteId = CloneBattlerSpriteWithBlend(ANIM_ATTACKER);
|
s16 spriteId = CloneBattlerSpriteWithBlend(ANIM_ATTACKER);
|
||||||
@ -2160,7 +2160,7 @@ static void ClonedMinizeSprite_Step(struct Sprite *sprite)
|
|||||||
// arg 1: num hops
|
// arg 1: num hops
|
||||||
void AnimTask_Splash(u8 taskId)
|
void AnimTask_Splash(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
if (gBattleAnimArgs[1] == 0)
|
if (gBattleAnimArgs[1] == 0)
|
||||||
{
|
{
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
@ -2180,7 +2180,7 @@ void AnimTask_Splash(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_Splash_Step(u8 taskId)
|
static void AnimTask_Splash_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
switch (task->data[1])
|
switch (task->data[1])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -2234,7 +2234,7 @@ static void AnimTask_Splash_Step(u8 taskId)
|
|||||||
// No args.
|
// No args.
|
||||||
void AnimTask_GrowAndShrink(u8 taskId)
|
void AnimTask_GrowAndShrink(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
PrepareAffineAnimInTaskData(task, spriteId, gGrowAndShrinkAffineAnimCmds);
|
PrepareAffineAnimInTaskData(task, spriteId, gGrowAndShrinkAffineAnimCmds);
|
||||||
task->func = AnimTask_GrowAndShrink_Step;
|
task->func = AnimTask_GrowAndShrink_Step;
|
||||||
@ -2242,7 +2242,7 @@ void AnimTask_GrowAndShrink(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_GrowAndShrink_Step(u8 taskId)
|
static void AnimTask_GrowAndShrink_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
if (!RunAffineAnimFromTaskData(task))
|
if (!RunAffineAnimFromTaskData(task))
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
@ -2301,7 +2301,7 @@ static void AnimAngerMark(struct Sprite *sprite)
|
|||||||
// left/right movements
|
// left/right movements
|
||||||
void AnimTask_ThrashMoveMonHorizontal(u8 taskId)
|
void AnimTask_ThrashMoveMonHorizontal(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
task->data[0] = spriteId;
|
task->data[0] = spriteId;
|
||||||
task->data[1] = 0;
|
task->data[1] = 0;
|
||||||
@ -2311,7 +2311,7 @@ void AnimTask_ThrashMoveMonHorizontal(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_ThrashMoveMonHorizontal_Step(u8 taskId)
|
static void AnimTask_ThrashMoveMonHorizontal_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
if (!RunAffineAnimFromTaskData(task))
|
if (!RunAffineAnimFromTaskData(task))
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
@ -2319,7 +2319,7 @@ static void AnimTask_ThrashMoveMonHorizontal_Step(u8 taskId)
|
|||||||
// up/down movements
|
// up/down movements
|
||||||
void AnimTask_ThrashMoveMonVertical(u8 taskId)
|
void AnimTask_ThrashMoveMonVertical(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
task->data[0] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
task->data[0] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
task->data[1] = 0;
|
task->data[1] = 0;
|
||||||
task->data[2] = 4;
|
task->data[2] = 4;
|
||||||
@ -2338,7 +2338,7 @@ void AnimTask_ThrashMoveMonVertical(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_ThrashMoveMonVertical_Step(u8 taskId)
|
static void AnimTask_ThrashMoveMonVertical_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
if (++task->data[7] > 2)
|
if (++task->data[7] > 2)
|
||||||
{
|
{
|
||||||
task->data[7] = 0;
|
task->data[7] = 0;
|
||||||
@ -2389,7 +2389,7 @@ static void AnimTask_ThrashMoveMonVertical_Step(u8 taskId)
|
|||||||
|
|
||||||
void AnimTask_SketchDrawMon(u8 taskId)
|
void AnimTask_SketchDrawMon(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
struct ScanlineEffectParams params;
|
struct ScanlineEffectParams params;
|
||||||
|
|
||||||
s16 i;
|
s16 i;
|
||||||
@ -2430,7 +2430,7 @@ void AnimTask_SketchDrawMon(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_SketchDrawMon_Step(u8 taskId)
|
static void AnimTask_SketchDrawMon_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
switch (task->data[4])
|
switch (task->data[4])
|
||||||
{
|
{
|
||||||
@ -2791,7 +2791,7 @@ static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *sprite)
|
|||||||
// Used by Extremespeed
|
// Used by Extremespeed
|
||||||
void AnimTask_AttackerStretchAndDisappear(u8 taskId)
|
void AnimTask_AttackerStretchAndDisappear(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
task->data[0] = spriteId;
|
task->data[0] = spriteId;
|
||||||
PrepareAffineAnimInTaskData(task, spriteId, gStretchAttackerAffineAnimCmds);
|
PrepareAffineAnimInTaskData(task, spriteId, gStretchAttackerAffineAnimCmds);
|
||||||
@ -2800,7 +2800,7 @@ void AnimTask_AttackerStretchAndDisappear(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_AttackerStretchAndDisappear_Step(u8 taskId)
|
static void AnimTask_AttackerStretchAndDisappear_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
if (!RunAffineAnimFromTaskData(task))
|
if (!RunAffineAnimFromTaskData(task))
|
||||||
{
|
{
|
||||||
gSprites[task->data[0]].y2 = 0;
|
gSprites[task->data[0]].y2 = 0;
|
||||||
@ -2811,7 +2811,7 @@ static void AnimTask_AttackerStretchAndDisappear_Step(u8 taskId)
|
|||||||
|
|
||||||
void AnimTask_ExtremeSpeedImpact(u8 taskId)
|
void AnimTask_ExtremeSpeedImpact(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
task->data[0] = 0;
|
task->data[0] = 0;
|
||||||
task->data[1] = 0;
|
task->data[1] = 0;
|
||||||
task->data[2] = 0;
|
task->data[2] = 0;
|
||||||
@ -2834,7 +2834,7 @@ void AnimTask_ExtremeSpeedImpact(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_ExtremeSpeedImpact_Step(u8 taskId)
|
static void AnimTask_ExtremeSpeedImpact_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
switch (task->data[0])
|
switch (task->data[0])
|
||||||
{
|
{
|
||||||
@ -2880,7 +2880,7 @@ static void AnimTask_ExtremeSpeedImpact_Step(u8 taskId)
|
|||||||
|
|
||||||
void AnimTask_ExtremeSpeedMonReappear(u8 taskId)
|
void AnimTask_ExtremeSpeedMonReappear(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
task->data[0] = 0;
|
task->data[0] = 0;
|
||||||
task->data[1] = 0;
|
task->data[1] = 0;
|
||||||
task->data[2] = 0;
|
task->data[2] = 0;
|
||||||
@ -2894,7 +2894,7 @@ void AnimTask_ExtremeSpeedMonReappear(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_ExtremeSpeedMonReappear_Step(u8 taskId)
|
static void AnimTask_ExtremeSpeedMonReappear_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
if (task->data[0] == 0 && ++task->data[1] > task->data[4])
|
if (task->data[0] == 0 && ++task->data[1] > task->data[4])
|
||||||
{
|
{
|
||||||
task->data[1] = 0;
|
task->data[1] = 0;
|
||||||
@ -2922,7 +2922,7 @@ static void AnimTask_ExtremeSpeedMonReappear_Step(u8 taskId)
|
|||||||
|
|
||||||
void AnimTask_SpeedDust(u8 taskId)
|
void AnimTask_SpeedDust(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
task->data[0] = 0;
|
task->data[0] = 0;
|
||||||
task->data[1] = 4;
|
task->data[1] = 4;
|
||||||
task->data[2] = 0;
|
task->data[2] = 0;
|
||||||
@ -2940,7 +2940,7 @@ void AnimTask_SpeedDust(u8 taskId)
|
|||||||
|
|
||||||
static void AnimTask_SpeedDust_Step(u8 taskId)
|
static void AnimTask_SpeedDust_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
switch (task->data[8])
|
switch (task->data[8])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -14,7 +14,7 @@ static void AnimTask_TranslateMonElliptical_Step(u8 taskId);
|
|||||||
static void DoHorizontalLunge(struct Sprite *sprite);
|
static void DoHorizontalLunge(struct Sprite *sprite);
|
||||||
static void ReverseHorizontalLungeDirection(struct Sprite *sprite);
|
static void ReverseHorizontalLungeDirection(struct Sprite *sprite);
|
||||||
static void DoVerticalDip(struct Sprite *sprite);
|
static void DoVerticalDip(struct Sprite *sprite);
|
||||||
static void ReverseVerticalDipDirection(struct Sprite* sprite);
|
static void ReverseVerticalDipDirection(struct Sprite *sprite);
|
||||||
static void SlideMonToOriginalPos(struct Sprite *sprite);
|
static void SlideMonToOriginalPos(struct Sprite *sprite);
|
||||||
static void SlideMonToOriginalPos_Step(struct Sprite *sprite);
|
static void SlideMonToOriginalPos_Step(struct Sprite *sprite);
|
||||||
static void SlideMonToOffset(struct Sprite *sprite);
|
static void SlideMonToOffset(struct Sprite *sprite);
|
||||||
|
@ -414,7 +414,7 @@ u8 GetAnimBattlerSpriteId(u8 animBattler)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*callback)(struct Sprite*))
|
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*callback)(struct Sprite *))
|
||||||
{
|
{
|
||||||
sprite->data[6] = (u32)(callback) & 0xffff;
|
sprite->data[6] = (u32)(callback) & 0xffff;
|
||||||
sprite->data[7] = (u32)(callback) >> 16;
|
sprite->data[7] = (u32)(callback) >> 16;
|
||||||
|
@ -27,7 +27,7 @@ static void StartBlendAnimSpriteColor(u8, u32);
|
|||||||
static void AnimTask_BlendSpriteColor_Step2(u8);
|
static void AnimTask_BlendSpriteColor_Step2(u8);
|
||||||
static void AnimTask_HardwarePaletteFade_Step(u8);
|
static void AnimTask_HardwarePaletteFade_Step(u8);
|
||||||
static void AnimTask_TraceMonBlended_Step(u8);
|
static void AnimTask_TraceMonBlended_Step(u8);
|
||||||
static void AnimMonTrace(struct Sprite*);
|
static void AnimMonTrace(struct Sprite *);
|
||||||
static void AnimTask_DrawFallingWhiteLinesOnAttacker_Step(u8);
|
static void AnimTask_DrawFallingWhiteLinesOnAttacker_Step(u8);
|
||||||
static void StatsChangeAnimation_Step1(u8);
|
static void StatsChangeAnimation_Step1(u8);
|
||||||
static void StatsChangeAnimation_Step2(u8);
|
static void StatsChangeAnimation_Step2(u8);
|
||||||
|
@ -48,11 +48,11 @@ static void AnimTask_SurfWaveScanlineEffect(u8);
|
|||||||
static void AnimTask_WaterSpoutLaunch_Step(u8);
|
static void AnimTask_WaterSpoutLaunch_Step(u8);
|
||||||
static void AnimTask_WaterSpoutRain_Step(u8);
|
static void AnimTask_WaterSpoutRain_Step(u8);
|
||||||
static u8 GetWaterSpoutPowerForAnim(void);
|
static u8 GetWaterSpoutPowerForAnim(void);
|
||||||
static void CreateWaterSpoutLaunchDroplets(struct Task*, u8);
|
static void CreateWaterSpoutLaunchDroplets(struct Task *, u8);
|
||||||
static void CreateWaterSpoutRainDroplet(struct Task*, u8);
|
static void CreateWaterSpoutRainDroplet(struct Task *, u8);
|
||||||
static void AnimTask_WaterSport_Step(u8);
|
static void AnimTask_WaterSport_Step(u8);
|
||||||
static void CreateWaterSportDroplet(struct Task*);
|
static void CreateWaterSportDroplet(struct Task *);
|
||||||
static void CreateWaterPulseRingBubbles(struct Sprite*, int, int);
|
static void CreateWaterPulseRingBubbles(struct Sprite *, int, int);
|
||||||
|
|
||||||
static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused/water_gfx.4bpp");
|
static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused/water_gfx.4bpp");
|
||||||
static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused/water.bin");
|
static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused/water.bin");
|
||||||
|
@ -1552,7 +1552,7 @@ static void OpponentHandleChooseMove(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
u8 chosenMoveId;
|
u8 chosenMoveId;
|
||||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
|
|
||||||
if (gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER))
|
if (gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER))
|
||||||
{
|
{
|
||||||
|
@ -471,7 +471,7 @@ static void HandleInputChooseTarget(void)
|
|||||||
static void HandleInputChooseMove(void)
|
static void HandleInputChooseMove(void)
|
||||||
{
|
{
|
||||||
bool32 canSelectTarget = FALSE;
|
bool32 canSelectTarget = FALSE;
|
||||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
|
|
||||||
if (JOY_HELD(DPAD_ANY) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A)
|
if (JOY_HELD(DPAD_ANY) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A)
|
||||||
gPlayerDpadHoldFrames++;
|
gPlayerDpadHoldFrames++;
|
||||||
@ -676,7 +676,7 @@ static void HandleMoveSwitching(void)
|
|||||||
|
|
||||||
if (gMoveSelectionCursor[gActiveBattler] != gMultiUsePlayerCursor)
|
if (gMoveSelectionCursor[gActiveBattler] != gMultiUsePlayerCursor)
|
||||||
{
|
{
|
||||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
// swap moves and pp
|
// swap moves and pp
|
||||||
@ -1456,7 +1456,7 @@ static void PlayerHandleYesNoInput(void)
|
|||||||
static void MoveSelectionDisplayMoveNames(void)
|
static void MoveSelectionDisplayMoveNames(void)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
gNumberOfMovesToChoose = 0;
|
gNumberOfMovesToChoose = 0;
|
||||||
|
|
||||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||||
@ -1485,7 +1485,7 @@ static void MoveSelectionDisplayPpNumber(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
SetPpNumbersPaletteInMoveSelection();
|
SetPpNumbersPaletteInMoveSelection();
|
||||||
moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
txtPtr = ConvertIntToDecimalStringN(gDisplayedStringBattle, moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
|
txtPtr = ConvertIntToDecimalStringN(gDisplayedStringBattle, moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||||
*(txtPtr)++ = CHAR_SLASH;
|
*(txtPtr)++ = CHAR_SLASH;
|
||||||
ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
|
ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||||
@ -1496,7 +1496,7 @@ static void MoveSelectionDisplayPpNumber(void)
|
|||||||
static void MoveSelectionDisplayMoveType(void)
|
static void MoveSelectionDisplayMoveType(void)
|
||||||
{
|
{
|
||||||
u8 *txtPtr;
|
u8 *txtPtr;
|
||||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
|
|
||||||
txtPtr = StringCopy(gDisplayedStringBattle, gText_MoveInterfaceType);
|
txtPtr = StringCopy(gDisplayedStringBattle, gText_MoveInterfaceType);
|
||||||
*(txtPtr)++ = EXT_CTRL_CODE_BEGIN;
|
*(txtPtr)++ = EXT_CTRL_CODE_BEGIN;
|
||||||
|
@ -1513,7 +1513,7 @@ static void PlayerPartnerHandleYesNoBox(void)
|
|||||||
static void PlayerPartnerHandleChooseMove(void)
|
static void PlayerPartnerHandleChooseMove(void)
|
||||||
{
|
{
|
||||||
u8 chosenMoveId;
|
u8 chosenMoveId;
|
||||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
|
|
||||||
BattleAI_SetupAIData(0xF);
|
BattleAI_SetupAIData(0xF);
|
||||||
chosenMoveId = BattleAI_ChooseMoveOrAction();
|
chosenMoveId = BattleAI_ChooseMoveOrAction();
|
||||||
|
@ -1076,14 +1076,14 @@ void BtlController_EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 m
|
|||||||
void BtlController_EmitPrintString(u8 bufferId, u16 stringID)
|
void BtlController_EmitPrintString(u8 bufferId, u16 stringID)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
struct BattleMsgData* stringInfo;
|
struct BattleMsgData *stringInfo;
|
||||||
|
|
||||||
sBattleBuffersTransferData[0] = CONTROLLER_PRINTSTRING;
|
sBattleBuffersTransferData[0] = CONTROLLER_PRINTSTRING;
|
||||||
sBattleBuffersTransferData[1] = gBattleOutcome;
|
sBattleBuffersTransferData[1] = gBattleOutcome;
|
||||||
sBattleBuffersTransferData[2] = stringID;
|
sBattleBuffersTransferData[2] = stringID;
|
||||||
sBattleBuffersTransferData[3] = (stringID & 0xFF00) >> 8;
|
sBattleBuffersTransferData[3] = (stringID & 0xFF00) >> 8;
|
||||||
|
|
||||||
stringInfo = (struct BattleMsgData*)(&sBattleBuffersTransferData[4]);
|
stringInfo = (struct BattleMsgData *)(&sBattleBuffersTransferData[4]);
|
||||||
stringInfo->currentMove = gCurrentMove;
|
stringInfo->currentMove = gCurrentMove;
|
||||||
stringInfo->originallyUsedMove = gChosenMove;
|
stringInfo->originallyUsedMove = gChosenMove;
|
||||||
stringInfo->lastItem = gLastUsedItem;
|
stringInfo->lastItem = gLastUsedItem;
|
||||||
@ -1115,7 +1115,7 @@ void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringID)
|
|||||||
sBattleBuffersTransferData[2] = stringID;
|
sBattleBuffersTransferData[2] = stringID;
|
||||||
sBattleBuffersTransferData[3] = (stringID & 0xFF00) >> 8;
|
sBattleBuffersTransferData[3] = (stringID & 0xFF00) >> 8;
|
||||||
|
|
||||||
stringInfo = (struct BattleMsgData*)(&sBattleBuffersTransferData[4]);
|
stringInfo = (struct BattleMsgData *)(&sBattleBuffersTransferData[4]);
|
||||||
stringInfo->currentMove = gCurrentMove;
|
stringInfo->currentMove = gCurrentMove;
|
||||||
stringInfo->originallyUsedMove = gChosenMove;
|
stringInfo->originallyUsedMove = gChosenMove;
|
||||||
stringInfo->lastItem = gLastUsedItem;
|
stringInfo->lastItem = gLastUsedItem;
|
||||||
|
@ -110,7 +110,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void)
|
|||||||
{
|
{
|
||||||
s32 i, var1, var2;
|
s32 i, var1, var2;
|
||||||
s32 chosenMoveId = -1;
|
s32 chosenMoveId = -1;
|
||||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
u8 unusableMovesBits = CheckMoveLimitations(gActiveBattler, 0, MOVE_LIMITATIONS_ALL);
|
u8 unusableMovesBits = CheckMoveLimitations(gActiveBattler, 0, MOVE_LIMITATIONS_ALL);
|
||||||
s32 percent = Random() % 100;
|
s32 percent = Random() % 100;
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ static void HandleEndTurn_BattleLost(void);
|
|||||||
static void HandleEndTurn_RanFromBattle(void);
|
static void HandleEndTurn_RanFromBattle(void);
|
||||||
static void HandleEndTurn_MonFled(void);
|
static void HandleEndTurn_MonFled(void);
|
||||||
static void HandleEndTurn_FinishBattle(void);
|
static void HandleEndTurn_FinishBattle(void);
|
||||||
static void SpriteCB_UnusedBattleInit(struct Sprite* sprite);
|
static void SpriteCB_UnusedBattleInit(struct Sprite *sprite);
|
||||||
static void SpriteCB_UnusedBattleInit_Main(struct Sprite *sprite);
|
static void SpriteCB_UnusedBattleInit_Main(struct Sprite *sprite);
|
||||||
|
|
||||||
EWRAM_DATA u16 gBattle_BG0_X = 0;
|
EWRAM_DATA u16 gBattle_BG0_X = 0;
|
||||||
@ -1891,7 +1891,7 @@ void CB2_QuitRecordedBattle(void)
|
|||||||
#define sState data[0]
|
#define sState data[0]
|
||||||
#define sDelay data[4]
|
#define sDelay data[4]
|
||||||
|
|
||||||
static void SpriteCB_UnusedBattleInit(struct Sprite* sprite)
|
static void SpriteCB_UnusedBattleInit(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->sState = 0;
|
sprite->sState = 0;
|
||||||
sprite->callback = SpriteCB_UnusedBattleInit_Main;
|
sprite->callback = SpriteCB_UnusedBattleInit_Main;
|
||||||
|
@ -2059,7 +2059,7 @@ void BufferStringBattle(u16 stringID)
|
|||||||
s32 i;
|
s32 i;
|
||||||
const u8 *stringPtr = NULL;
|
const u8 *stringPtr = NULL;
|
||||||
|
|
||||||
gBattleMsgDataPtr = (struct BattleMsgData*)(&gBattleBufferA[gActiveBattler][4]);
|
gBattleMsgDataPtr = (struct BattleMsgData *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
gLastUsedItem = gBattleMsgDataPtr->lastItem;
|
gLastUsedItem = gBattleMsgDataPtr->lastItem;
|
||||||
gLastUsedAbility = gBattleMsgDataPtr->lastAbility;
|
gLastUsedAbility = gBattleMsgDataPtr->lastAbility;
|
||||||
gBattleScripting.battler = gBattleMsgDataPtr->scrActive;
|
gBattleScripting.battler = gBattleMsgDataPtr->scrActive;
|
||||||
@ -3119,7 +3119,7 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
|
|||||||
|
|
||||||
void SetPpNumbersPaletteInMoveSelection(void)
|
void SetPpNumbersPaletteInMoveSelection(void)
|
||||||
{
|
{
|
||||||
struct ChooseMoveStruct *chooseMoveStruct = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
struct ChooseMoveStruct *chooseMoveStruct = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||||
const u16 *palPtr = gPPTextPalette;
|
const u16 *palPtr = gPPTextPalette;
|
||||||
u8 var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBattler]],
|
u8 var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBattler]],
|
||||||
chooseMoveStruct->maxPp[gMoveSelectionCursor[gActiveBattler]]);
|
chooseMoveStruct->maxPp[gMoveSelectionCursor[gActiveBattler]]);
|
||||||
|
@ -74,7 +74,7 @@ static void DrawLevelUpWindow1(void);
|
|||||||
static void DrawLevelUpWindow2(void);
|
static void DrawLevelUpWindow2(void);
|
||||||
static void PutMonIconOnLvlUpBanner(void);
|
static void PutMonIconOnLvlUpBanner(void);
|
||||||
static void DrawLevelUpBannerText(void);
|
static void DrawLevelUpBannerText(void);
|
||||||
static void SpriteCB_MonIconOnLvlUpBanner(struct Sprite* sprite);
|
static void SpriteCB_MonIconOnLvlUpBanner(struct Sprite *sprite);
|
||||||
|
|
||||||
static void Cmd_attackcanceler(void);
|
static void Cmd_attackcanceler(void);
|
||||||
static void Cmd_accuracycheck(void);
|
static void Cmd_accuracycheck(void);
|
||||||
@ -5629,7 +5629,7 @@ static void Cmd_updatebattlermoves(void)
|
|||||||
if (gBattleControllerExecFlags == 0)
|
if (gBattleControllerExecFlags == 0)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
struct BattlePokemon *bufferPoke = (struct BattlePokemon*) &gBattleBufferB[gActiveBattler][4];
|
struct BattlePokemon *bufferPoke = (struct BattlePokemon *) &gBattleBufferB[gActiveBattler][4];
|
||||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||||
{
|
{
|
||||||
gBattleMons[gActiveBattler].moves[i] = bufferPoke->moves[i];
|
gBattleMons[gActiveBattler].moves[i] = bufferPoke->moves[i];
|
||||||
@ -6141,7 +6141,7 @@ static void PutMonIconOnLvlUpBanner(void)
|
|||||||
gSprites[spriteId].sXOffset = gBattle_BG2_X;
|
gSprites[spriteId].sXOffset = gBattle_BG2_X;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_MonIconOnLvlUpBanner(struct Sprite* sprite)
|
static void SpriteCB_MonIconOnLvlUpBanner(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->x2 = sprite->sXOffset - gBattle_BG2_X;
|
sprite->x2 = sprite->sXOffset - gBattle_BG2_X;
|
||||||
|
|
||||||
@ -7160,7 +7160,7 @@ static void Cmd_forcerandomswitch(void)
|
|||||||
s32 firstMonId;
|
s32 firstMonId;
|
||||||
s32 lastMonId = 0; // + 1
|
s32 lastMonId = 0; // + 1
|
||||||
s32 monsCount;
|
s32 monsCount;
|
||||||
struct Pokemon* party = NULL;
|
struct Pokemon *party = NULL;
|
||||||
s32 validMons = 0;
|
s32 validMons = 0;
|
||||||
s32 minNeeded;
|
s32 minNeeded;
|
||||||
|
|
||||||
@ -9368,7 +9368,7 @@ static void Cmd_weightdamagecalculation(void)
|
|||||||
static void Cmd_assistattackselect(void)
|
static void Cmd_assistattackselect(void)
|
||||||
{
|
{
|
||||||
s32 chooseableMovesNo = 0;
|
s32 chooseableMovesNo = 0;
|
||||||
struct Pokemon* party;
|
struct Pokemon *party;
|
||||||
s32 monId, moveId;
|
s32 monId, moveId;
|
||||||
u16 *validMoves = gBattleStruct->assistPossibleMoves;
|
u16 *validMoves = gBattleStruct->assistPossibleMoves;
|
||||||
|
|
||||||
|
@ -980,7 +980,7 @@ bool32 IsEnigmaBerryValid(void)
|
|||||||
const struct Berry *GetBerryInfo(u8 berry)
|
const struct Berry *GetBerryInfo(u8 berry)
|
||||||
{
|
{
|
||||||
if (berry == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) && IsEnigmaBerryValid())
|
if (berry == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) && IsEnigmaBerryValid())
|
||||||
return (struct Berry*)(&gSaveBlock1Ptr->enigmaBerry.berry);
|
return (struct Berry *)(&gSaveBlock1Ptr->enigmaBerry.berry);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (berry == BERRY_NONE || berry > ITEM_TO_BERRY(LAST_BERRY_INDEX))
|
if (berry == BERRY_NONE || berry > ITEM_TO_BERRY(LAST_BERRY_INDEX))
|
||||||
|
@ -1145,7 +1145,7 @@ static void CB2_LoadBerryBlender(void)
|
|||||||
#define sYDownSpeed data[7]
|
#define sYDownSpeed data[7]
|
||||||
|
|
||||||
// For throwing berries into the machine
|
// For throwing berries into the machine
|
||||||
static void SpriteCB_Berry(struct Sprite* sprite)
|
static void SpriteCB_Berry(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->sX += sprite->sXSpeed;
|
sprite->sX += sprite->sXSpeed;
|
||||||
sprite->sY -= sprite->sYUpSpeed;
|
sprite->sY -= sprite->sYUpSpeed;
|
||||||
@ -1166,7 +1166,7 @@ static void SpriteCB_Berry(struct Sprite* sprite)
|
|||||||
sprite->y = sprite->sY;
|
sprite->y = sprite->sY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetBerrySpriteData(struct Sprite* sprite, s16 x, s16 y, s16 bounceSpeed, s16 xSpeed, s16 ySpeed)
|
static void SetBerrySpriteData(struct Sprite *sprite, s16 x, s16 y, s16 bounceSpeed, s16 xSpeed, s16 ySpeed)
|
||||||
{
|
{
|
||||||
sprite->sTargetY = y;
|
sprite->sTargetY = y;
|
||||||
sprite->sX = x;
|
sprite->sX = x;
|
||||||
@ -2628,7 +2628,7 @@ static void CB2_EndBlenderGame(void)
|
|||||||
|
|
||||||
if (gReceivedRemoteLinkPlayers && gWirelessCommType)
|
if (gReceivedRemoteLinkPlayers && gWirelessCommType)
|
||||||
{
|
{
|
||||||
struct BlenderGameBlock *receivedBlock = (struct BlenderGameBlock*)(&gBlockRecvBuffer);
|
struct BlenderGameBlock *receivedBlock = (struct BlenderGameBlock *)(&gBlockRecvBuffer);
|
||||||
|
|
||||||
sBerryBlender->maxRPM = receivedBlock->timeRPM.maxRPM;
|
sBerryBlender->maxRPM = receivedBlock->timeRPM.maxRPM;
|
||||||
sBerryBlender->gameFrameTime = receivedBlock->timeRPM.time;
|
sBerryBlender->gameFrameTime = receivedBlock->timeRPM.time;
|
||||||
@ -2641,7 +2641,7 @@ static void CB2_EndBlenderGame(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct TimeAndRPM *receivedBlock = (struct TimeAndRPM*)(&gBlockRecvBuffer);
|
struct TimeAndRPM *receivedBlock = (struct TimeAndRPM *)(&gBlockRecvBuffer);
|
||||||
|
|
||||||
sBerryBlender->maxRPM = receivedBlock->maxRPM;
|
sBerryBlender->maxRPM = receivedBlock->maxRPM;
|
||||||
sBerryBlender->gameFrameTime = receivedBlock->time;
|
sBerryBlender->gameFrameTime = receivedBlock->time;
|
||||||
@ -3159,7 +3159,7 @@ static void SetBgPos(void)
|
|||||||
SetGpuReg(REG_OFFSET_BG0VOFS, sBerryBlender->bg_Y);
|
SetGpuReg(REG_OFFSET_BG0VOFS, sBerryBlender->bg_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_Particle(struct Sprite* sprite)
|
static void SpriteCB_Particle(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[2] += sprite->data[0];
|
sprite->data[2] += sprite->data[0];
|
||||||
sprite->data[3] += sprite->data[1];
|
sprite->data[3] += sprite->data[1];
|
||||||
@ -3194,7 +3194,7 @@ static void CreateParticleSprites(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_ScoreSymbol(struct Sprite* sprite)
|
static void SpriteCB_ScoreSymbol(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[0]++;
|
sprite->data[0]++;
|
||||||
sprite->y2 = -(sprite->data[0] / 3);
|
sprite->y2 = -(sprite->data[0] / 3);
|
||||||
@ -3203,7 +3203,7 @@ static void SpriteCB_ScoreSymbol(struct Sprite* sprite)
|
|||||||
DestroySprite(sprite);
|
DestroySprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_ScoreSymbolBest(struct Sprite* sprite)
|
static void SpriteCB_ScoreSymbolBest(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[0]++;
|
sprite->data[0]++;
|
||||||
sprite->y2 = -(sprite->data[0] * 2);
|
sprite->y2 = -(sprite->data[0] * 2);
|
||||||
@ -3225,7 +3225,7 @@ static void SetPlayerBerryData(u8 playerId, u16 itemId)
|
|||||||
#define sDelay data[2]
|
#define sDelay data[2]
|
||||||
#define sAnimId data[3]
|
#define sAnimId data[3]
|
||||||
|
|
||||||
static void SpriteCB_CountdownNumber(struct Sprite* sprite)
|
static void SpriteCB_CountdownNumber(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
switch (sprite->sState)
|
switch (sprite->sState)
|
||||||
{
|
{
|
||||||
@ -3272,7 +3272,7 @@ static void SpriteCB_CountdownNumber(struct Sprite* sprite)
|
|||||||
#undef sDelay
|
#undef sDelay
|
||||||
#undef sAnimId
|
#undef sAnimId
|
||||||
|
|
||||||
static void SpriteCB_Start(struct Sprite* sprite)
|
static void SpriteCB_Start(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
switch (sprite->data[0])
|
switch (sprite->data[0])
|
||||||
{
|
{
|
||||||
@ -3443,7 +3443,7 @@ static bool8 UpdateBlenderLandScreenShake(void)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_PlayerArrow(struct Sprite* sprite)
|
static void SpriteCB_PlayerArrow(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->x2 = -(sBerryBlender->bg_X);
|
sprite->x2 = -(sBerryBlender->bg_X);
|
||||||
sprite->y2 = -(sBerryBlender->bg_Y);
|
sprite->y2 = -(sBerryBlender->bg_Y);
|
||||||
|
@ -833,7 +833,7 @@ static void SetLinkBattleTypeFlags(int linkService)
|
|||||||
|
|
||||||
static void Task_StartWiredCableClubBattle(u8 taskId)
|
static void Task_StartWiredCableClubBattle(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
switch (task->tState)
|
switch (task->tState)
|
||||||
{
|
{
|
||||||
@ -1042,7 +1042,7 @@ void ExitLinkRoom(void)
|
|||||||
// Note: gSpecialVar_0x8005 contains the id of the seat the player entered
|
// Note: gSpecialVar_0x8005 contains the id of the seat the player entered
|
||||||
static void Task_EnterCableClubSeat(u8 taskId)
|
static void Task_EnterCableClubSeat(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
switch (task->tState)
|
switch (task->tState)
|
||||||
{
|
{
|
||||||
|
@ -263,7 +263,7 @@ u32 GetDecompressedDataSize(const u32 *ptr)
|
|||||||
return (ptr8[3] << 16) | (ptr8[2] << 8) | (ptr8[1]);
|
return (ptr8[3] << 16) | (ptr8[2] << 8) | (ptr8[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src)
|
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet *src)
|
||||||
{
|
{
|
||||||
struct SpriteSheet dest;
|
struct SpriteSheet dest;
|
||||||
void *buffer;
|
void *buffer;
|
||||||
|
@ -138,7 +138,7 @@ bool32 DigitObjUtil_CreatePrinter(u32 id, s32 num, const struct DigitObjUtilTemp
|
|||||||
{
|
{
|
||||||
struct CompressedSpriteSheet compSpriteSheet;
|
struct CompressedSpriteSheet compSpriteSheet;
|
||||||
|
|
||||||
compSpriteSheet = *(struct CompressedSpriteSheet*)(template->spriteSheet);
|
compSpriteSheet = *(struct CompressedSpriteSheet *)(template->spriteSheet);
|
||||||
compSpriteSheet.size = GetDecompressedDataSize(template->spriteSheet->data);
|
compSpriteSheet.size = GetDecompressedDataSize(template->spriteSheet->data);
|
||||||
sOamWork->array[id].tileStart = LoadCompressedSpriteSheet(&compSpriteSheet);
|
sOamWork->array[id].tileStart = LoadCompressedSpriteSheet(&compSpriteSheet);
|
||||||
}
|
}
|
||||||
|
@ -1795,7 +1795,7 @@ static void VBlankCB_DodrioGame(void)
|
|||||||
ProcessSpriteCopyRequests();
|
ProcessSpriteCopyRequests();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void InitMonInfo(struct DodrioGame_MonInfo * monInfo, struct Pokemon * mon)
|
static void InitMonInfo(struct DodrioGame_MonInfo * monInfo, struct Pokemon *mon)
|
||||||
{
|
{
|
||||||
monInfo->isShiny = IsMonShiny(mon);
|
monInfo->isShiny = IsMonShiny(mon);
|
||||||
}
|
}
|
||||||
|
@ -69,13 +69,13 @@ extern const u8 gText_NicknameHatchPrompt[];
|
|||||||
static void Task_EggHatch(u8);
|
static void Task_EggHatch(u8);
|
||||||
static void CB2_LoadEggHatch(void);
|
static void CB2_LoadEggHatch(void);
|
||||||
static void CB2_EggHatch(void);
|
static void CB2_EggHatch(void);
|
||||||
static void SpriteCB_Egg_Shake1(struct Sprite*);
|
static void SpriteCB_Egg_Shake1(struct Sprite *);
|
||||||
static void SpriteCB_Egg_Shake2(struct Sprite*);
|
static void SpriteCB_Egg_Shake2(struct Sprite *);
|
||||||
static void SpriteCB_Egg_Shake3(struct Sprite*);
|
static void SpriteCB_Egg_Shake3(struct Sprite *);
|
||||||
static void SpriteCB_Egg_WaitHatch(struct Sprite*);
|
static void SpriteCB_Egg_WaitHatch(struct Sprite *);
|
||||||
static void SpriteCB_Egg_Hatch(struct Sprite*);
|
static void SpriteCB_Egg_Hatch(struct Sprite *);
|
||||||
static void SpriteCB_Egg_Reveal(struct Sprite*);
|
static void SpriteCB_Egg_Reveal(struct Sprite *);
|
||||||
static void SpriteCB_EggShard(struct Sprite*);
|
static void SpriteCB_EggShard(struct Sprite *);
|
||||||
static void EggHatchPrintMessage(u8, u8 *, u8, u8, u8);
|
static void EggHatchPrintMessage(u8, u8 *, u8, u8, u8);
|
||||||
static void CreateRandomEggShardSprite(void);
|
static void CreateRandomEggShardSprite(void);
|
||||||
static void CreateEggShardSprite(u8, u8, s16, s16, s16, u8);
|
static void CreateEggShardSprite(u8, u8, s16, s16, s16, u8);
|
||||||
@ -363,7 +363,7 @@ static void AddHatchedMonToParty(u8 id)
|
|||||||
u16 ball;
|
u16 ball;
|
||||||
u16 metLevel;
|
u16 metLevel;
|
||||||
u8 metLocation;
|
u8 metLocation;
|
||||||
struct Pokemon* mon = &gPlayerParty[id];
|
struct Pokemon *mon = &gPlayerParty[id];
|
||||||
|
|
||||||
CreateHatchedMon(mon, &gEnemyParty[0]);
|
CreateHatchedMon(mon, &gEnemyParty[0]);
|
||||||
SetMonData(mon, MON_DATA_IS_EGG, &isEgg);
|
SetMonData(mon, MON_DATA_IS_EGG, &isEgg);
|
||||||
@ -424,7 +424,7 @@ static u8 EggHatchCreateMonSprite(u8 useAlt, u8 state, u8 partyId, u16 *speciesL
|
|||||||
{
|
{
|
||||||
u8 position = 0;
|
u8 position = 0;
|
||||||
u8 spriteId = 0;
|
u8 spriteId = 0;
|
||||||
struct Pokemon* mon = NULL;
|
struct Pokemon *mon = NULL;
|
||||||
|
|
||||||
if (useAlt == FALSE)
|
if (useAlt == FALSE)
|
||||||
{
|
{
|
||||||
@ -728,7 +728,7 @@ static void CB2_EggHatch(void)
|
|||||||
#define sSinIdx data[1]
|
#define sSinIdx data[1]
|
||||||
#define sDelayTimer data[2]
|
#define sDelayTimer data[2]
|
||||||
|
|
||||||
static void SpriteCB_Egg_Shake1(struct Sprite* sprite)
|
static void SpriteCB_Egg_Shake1(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (++sprite->sTimer > 20)
|
if (++sprite->sTimer > 20)
|
||||||
{
|
{
|
||||||
@ -750,7 +750,7 @@ static void SpriteCB_Egg_Shake1(struct Sprite* sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_Egg_Shake2(struct Sprite* sprite)
|
static void SpriteCB_Egg_Shake2(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (++sprite->sDelayTimer > 30)
|
if (++sprite->sDelayTimer > 30)
|
||||||
{
|
{
|
||||||
@ -775,7 +775,7 @@ static void SpriteCB_Egg_Shake2(struct Sprite* sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_Egg_Shake3(struct Sprite* sprite)
|
static void SpriteCB_Egg_Shake3(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (++sprite->sDelayTimer > 30)
|
if (++sprite->sDelayTimer > 30)
|
||||||
{
|
{
|
||||||
@ -813,7 +813,7 @@ static void SpriteCB_Egg_Shake3(struct Sprite* sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_Egg_WaitHatch(struct Sprite* sprite)
|
static void SpriteCB_Egg_WaitHatch(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (++sprite->sTimer > 50)
|
if (++sprite->sTimer > 50)
|
||||||
{
|
{
|
||||||
@ -822,7 +822,7 @@ static void SpriteCB_Egg_WaitHatch(struct Sprite* sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_Egg_Hatch(struct Sprite* sprite)
|
static void SpriteCB_Egg_Hatch(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
s16 i;
|
s16 i;
|
||||||
|
|
||||||
@ -849,7 +849,7 @@ static void SpriteCB_Egg_Hatch(struct Sprite* sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_Egg_Reveal(struct Sprite* sprite)
|
static void SpriteCB_Egg_Reveal(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->sTimer == 0)
|
if (sprite->sTimer == 0)
|
||||||
{
|
{
|
||||||
@ -877,7 +877,7 @@ static void SpriteCB_Egg_Reveal(struct Sprite* sprite)
|
|||||||
#define sDeltaX data[4]
|
#define sDeltaX data[4]
|
||||||
#define sDeltaY data[5]
|
#define sDeltaY data[5]
|
||||||
|
|
||||||
static void SpriteCB_EggShard(struct Sprite* sprite)
|
static void SpriteCB_EggShard(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->sDeltaX += sprite->sVelocX;
|
sprite->sDeltaX += sprite->sVelocX;
|
||||||
sprite->sDeltaY += sprite->sVelocY;
|
sprite->sDeltaY += sprite->sVelocY;
|
||||||
|
@ -93,33 +93,33 @@ static bool8 IsMetatileDirectionallyImpassable(struct ObjectEvent *, s16, s16, u
|
|||||||
static bool8 DoesObjectCollideWithObjectAt(struct ObjectEvent *, s16, s16);
|
static bool8 DoesObjectCollideWithObjectAt(struct ObjectEvent *, s16, s16);
|
||||||
static void UpdateObjectEventOffscreen(struct ObjectEvent *, struct Sprite *);
|
static void UpdateObjectEventOffscreen(struct ObjectEvent *, struct Sprite *);
|
||||||
static void UpdateObjectEventSpriteVisibility(struct ObjectEvent *, struct Sprite *);
|
static void UpdateObjectEventSpriteVisibility(struct ObjectEvent *, struct Sprite *);
|
||||||
static void ObjectEventUpdateMetatileBehaviors(struct ObjectEvent*);
|
static void ObjectEventUpdateMetatileBehaviors(struct ObjectEvent *);
|
||||||
static void GetGroundEffectFlags_Reflection(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_Reflection(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_TallGrassOnSpawn(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_TallGrassOnSpawn(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_LongGrassOnSpawn(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_LongGrassOnSpawn(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_SandHeap(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_SandHeap(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_ShallowFlowingWater(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_ShallowFlowingWater(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_ShortGrass(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_ShortGrass(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_HotSprings(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_HotSprings(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_TallGrassOnBeginStep(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_TallGrassOnBeginStep(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_LongGrassOnBeginStep(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_LongGrassOnBeginStep(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_Tracks(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_Tracks(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_Puddle(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_Puddle(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_Ripple(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_Ripple(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_Seaweed(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_Seaweed(struct ObjectEvent *, u32 *);
|
||||||
static void GetGroundEffectFlags_JumpLanding(struct ObjectEvent*, u32 *);
|
static void GetGroundEffectFlags_JumpLanding(struct ObjectEvent *, u32 *);
|
||||||
static u8 ObjectEventGetNearbyReflectionType(struct ObjectEvent*);
|
static u8 ObjectEventGetNearbyReflectionType(struct ObjectEvent *);
|
||||||
static u8 GetReflectionTypeByMetatileBehavior(u32);
|
static u8 GetReflectionTypeByMetatileBehavior(u32);
|
||||||
static void InitObjectPriorityByElevation(struct Sprite *, u8);
|
static void InitObjectPriorityByElevation(struct Sprite *, u8);
|
||||||
static void ObjectEventUpdateSubpriority(struct ObjectEvent*, struct Sprite*);
|
static void ObjectEventUpdateSubpriority(struct ObjectEvent *, struct Sprite *);
|
||||||
static void DoTracksGroundEffect_None(struct ObjectEvent*, struct Sprite*, u8);
|
static void DoTracksGroundEffect_None(struct ObjectEvent *, struct Sprite *, u8);
|
||||||
static void DoTracksGroundEffect_Footprints(struct ObjectEvent*, struct Sprite*, u8);
|
static void DoTracksGroundEffect_Footprints(struct ObjectEvent *, struct Sprite *, u8);
|
||||||
static void DoTracksGroundEffect_BikeTireTracks(struct ObjectEvent*, struct Sprite*, u8);
|
static void DoTracksGroundEffect_BikeTireTracks(struct ObjectEvent *, struct Sprite *, u8);
|
||||||
static void DoRippleFieldEffect(struct ObjectEvent*, struct Sprite*);
|
static void DoRippleFieldEffect(struct ObjectEvent *, struct Sprite *);
|
||||||
static void DoGroundEffects_OnSpawn(struct ObjectEvent*, struct Sprite*);
|
static void DoGroundEffects_OnSpawn(struct ObjectEvent *, struct Sprite *);
|
||||||
static void DoGroundEffects_OnBeginStep(struct ObjectEvent*, struct Sprite*);
|
static void DoGroundEffects_OnBeginStep(struct ObjectEvent *, struct Sprite *);
|
||||||
static void DoGroundEffects_OnFinishStep(struct ObjectEvent*, struct Sprite*);
|
static void DoGroundEffects_OnFinishStep(struct ObjectEvent *, struct Sprite *);
|
||||||
static void VirtualObject_UpdateAnim(struct Sprite*);
|
static void VirtualObject_UpdateAnim(struct Sprite *);
|
||||||
static void ApplyLevitateMovement(u8);
|
static void ApplyLevitateMovement(u8);
|
||||||
static bool8 MovementType_Disguise_Callback(struct ObjectEvent *, struct Sprite *);
|
static bool8 MovementType_Disguise_Callback(struct ObjectEvent *, struct Sprite *);
|
||||||
static bool8 MovementType_Buried_Callback(struct ObjectEvent *, struct Sprite *);
|
static bool8 MovementType_Buried_Callback(struct ObjectEvent *, struct Sprite *);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
#include "constants/rgb.h"
|
#include "constants/rgb.h"
|
||||||
|
|
||||||
static void SpriteCB_Sparkle_Dummy(struct Sprite* sprite);
|
static void SpriteCB_Sparkle_Dummy(struct Sprite *sprite);
|
||||||
|
|
||||||
static void Task_Sparkles_SpiralUpward_Init(u8 taskId);
|
static void Task_Sparkles_SpiralUpward_Init(u8 taskId);
|
||||||
static void Task_Sparkles_SpiralUpward(u8 taskId);
|
static void Task_Sparkles_SpiralUpward(u8 taskId);
|
||||||
@ -127,7 +127,7 @@ static void SetEvoSparklesMatrices(void)
|
|||||||
#define sTrigIdx data[6]
|
#define sTrigIdx data[6]
|
||||||
#define sTimer data[7]
|
#define sTimer data[7]
|
||||||
|
|
||||||
static void SpriteCB_Sparkle_SpiralUpward(struct Sprite* sprite)
|
static void SpriteCB_Sparkle_SpiralUpward(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->y > 8)
|
if (sprite->y > 8)
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ static void CreateSparkle_SpiralUpward(u8 trigIdx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_Sparkle_ArcDown(struct Sprite* sprite)
|
static void SpriteCB_Sparkle_ArcDown(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->y < 88)
|
if (sprite->y < 88)
|
||||||
{
|
{
|
||||||
@ -196,7 +196,7 @@ static void CreateSparkle_ArcDown(u8 trigIdx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_Sparkle_CircleInward(struct Sprite* sprite)
|
static void SpriteCB_Sparkle_CircleInward(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->sAmplitude > 8)
|
if (sprite->sAmplitude > 8)
|
||||||
{
|
{
|
||||||
@ -225,7 +225,7 @@ static void CreateSparkle_CircleInward(u8 trigIdx, u8 speed)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_Sparkle_Spray(struct Sprite* sprite)
|
static void SpriteCB_Sparkle_Spray(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (!(sprite->sTimer & 3))
|
if (!(sprite->sTimer & 3))
|
||||||
sprite->y++;
|
sprite->y++;
|
||||||
@ -492,7 +492,7 @@ static void Task_Sparkles_SprayAndFlashTrade(u8 taskId)
|
|||||||
#undef tTimer
|
#undef tTimer
|
||||||
#undef tSpecies
|
#undef tSpecies
|
||||||
|
|
||||||
static void SpriteCB_EvolutionMonSprite(struct Sprite* sprite)
|
static void SpriteCB_EvolutionMonSprite(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ static void CB2_BeginEvolutionScene(void)
|
|||||||
|
|
||||||
static void Task_BeginEvolutionScene(u8 taskId)
|
static void Task_BeginEvolutionScene(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Pokemon* mon = NULL;
|
struct Pokemon *mon = NULL;
|
||||||
switch (gTasks[taskId].tState)
|
switch (gTasks[taskId].tState)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -196,7 +196,7 @@ static void Task_BeginEvolutionScene(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BeginEvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u8 partyId)
|
void BeginEvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u8 partyId)
|
||||||
{
|
{
|
||||||
u8 taskId = CreateTask(Task_BeginEvolutionScene, 0);
|
u8 taskId = CreateTask(Task_BeginEvolutionScene, 0);
|
||||||
gTasks[taskId].tState = 0;
|
gTasks[taskId].tState = 0;
|
||||||
@ -206,7 +206,7 @@ void BeginEvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopE
|
|||||||
SetMainCallback2(CB2_BeginEvolutionScene);
|
SetMainCallback2(CB2_BeginEvolutionScene);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u8 partyId)
|
void EvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u8 partyId)
|
||||||
{
|
{
|
||||||
u8 name[20];
|
u8 name[20];
|
||||||
u16 currSpecies;
|
u16 currSpecies;
|
||||||
@ -314,7 +314,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
|||||||
const struct CompressedSpritePalette* pokePal;
|
const struct CompressedSpritePalette* pokePal;
|
||||||
u16 postEvoSpecies;
|
u16 postEvoSpecies;
|
||||||
u32 trainerId, personality;
|
u32 trainerId, personality;
|
||||||
struct Pokemon* mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskId].tPartyId];
|
struct Pokemon *mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskId].tPartyId];
|
||||||
|
|
||||||
postEvoSpecies = gTasks[sEvoStructPtr->evoTaskId].tPostEvoSpecies;
|
postEvoSpecies = gTasks[sEvoStructPtr->evoTaskId].tPostEvoSpecies;
|
||||||
trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
||||||
@ -381,7 +381,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
|||||||
|
|
||||||
static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
||||||
{
|
{
|
||||||
struct Pokemon* mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskId].tPartyId];
|
struct Pokemon *mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskId].tPartyId];
|
||||||
u16 postEvoSpecies = gTasks[sEvoStructPtr->evoTaskId].tPostEvoSpecies;
|
u16 postEvoSpecies = gTasks[sEvoStructPtr->evoTaskId].tPostEvoSpecies;
|
||||||
|
|
||||||
switch (gMain.state)
|
switch (gMain.state)
|
||||||
@ -465,7 +465,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TradeEvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, u8 preEvoSpriteId, u8 partyId)
|
void TradeEvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, u8 preEvoSpriteId, u8 partyId)
|
||||||
{
|
{
|
||||||
u8 name[20];
|
u8 name[20];
|
||||||
u16 currSpecies;
|
u16 currSpecies;
|
||||||
@ -545,13 +545,13 @@ static void CB2_TradeEvolutionSceneUpdate(void)
|
|||||||
RunTasks();
|
RunTasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
static void CreateShedinja(u16 preEvoSpecies, struct Pokemon *mon)
|
||||||
{
|
{
|
||||||
u32 data = 0;
|
u32 data = 0;
|
||||||
if (gEvolutionTable[preEvoSpecies][0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < PARTY_SIZE)
|
if (gEvolutionTable[preEvoSpecies][0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < PARTY_SIZE)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
struct Pokemon* shedinja = &gPlayerParty[gPlayerPartyCount];
|
struct Pokemon *shedinja = &gPlayerParty[gPlayerPartyCount];
|
||||||
|
|
||||||
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
|
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, &gEvolutionTable[preEvoSpecies][1].targetSpecies);
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, &gEvolutionTable[preEvoSpecies][1].targetSpecies);
|
||||||
@ -632,7 +632,7 @@ enum {
|
|||||||
static void Task_EvolutionScene(u8 taskId)
|
static void Task_EvolutionScene(u8 taskId)
|
||||||
{
|
{
|
||||||
u32 var;
|
u32 var;
|
||||||
struct Pokemon* mon = &gPlayerParty[gTasks[taskId].tPartyId];
|
struct Pokemon *mon = &gPlayerParty[gTasks[taskId].tPartyId];
|
||||||
|
|
||||||
// check if B Button was held, so the evolution gets stopped
|
// check if B Button was held, so the evolution gets stopped
|
||||||
if (gMain.heldKeys == B_BUTTON
|
if (gMain.heldKeys == B_BUTTON
|
||||||
@ -1081,7 +1081,7 @@ enum {
|
|||||||
static void Task_TradeEvolutionScene(u8 taskId)
|
static void Task_TradeEvolutionScene(u8 taskId)
|
||||||
{
|
{
|
||||||
u32 var = 0;
|
u32 var = 0;
|
||||||
struct Pokemon* mon = &gPlayerParty[gTasks[taskId].tPartyId];
|
struct Pokemon *mon = &gPlayerParty[gTasks[taskId].tPartyId];
|
||||||
|
|
||||||
switch (gTasks[taskId].tState)
|
switch (gTasks[taskId].tState)
|
||||||
{
|
{
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
#include "constants/metatile_behaviors.h"
|
#include "constants/metatile_behaviors.h"
|
||||||
|
|
||||||
static u8 GetValidMewMoveDirection(u8);
|
static u8 GetValidMewMoveDirection(u8);
|
||||||
static bool8 ShouldMewMoveNorth(struct ObjectEvent*, u8);
|
static bool8 ShouldMewMoveNorth(struct ObjectEvent *, u8);
|
||||||
static bool8 ShouldMewMoveSouth(struct ObjectEvent*, u8);
|
static bool8 ShouldMewMoveSouth(struct ObjectEvent *, u8);
|
||||||
static bool8 ShouldMewMoveEast(struct ObjectEvent*, u8);
|
static bool8 ShouldMewMoveEast(struct ObjectEvent *, u8);
|
||||||
static bool8 ShouldMewMoveWest(struct ObjectEvent*, u8);
|
static bool8 ShouldMewMoveWest(struct ObjectEvent *, u8);
|
||||||
static u8 GetRandomMewDirectionCandidate(u8);
|
static u8 GetRandomMewDirectionCandidate(u8);
|
||||||
static bool8 CanMewMoveToCoords(s16, s16);
|
static bool8 CanMewMoveToCoords(s16, s16);
|
||||||
|
|
||||||
|
@ -43,8 +43,8 @@ u8 gSelectedObjectEvent;
|
|||||||
static void GetPlayerPosition(struct MapPosition *);
|
static void GetPlayerPosition(struct MapPosition *);
|
||||||
static void GetInFrontOfPlayerPosition(struct MapPosition *);
|
static void GetInFrontOfPlayerPosition(struct MapPosition *);
|
||||||
static u16 GetPlayerCurMetatileBehavior(int);
|
static u16 GetPlayerCurMetatileBehavior(int);
|
||||||
static bool8 TryStartInteractionScript(struct MapPosition*, u16, u8);
|
static bool8 TryStartInteractionScript(struct MapPosition *, u16, u8);
|
||||||
static const u8 *GetInteractionScript(struct MapPosition*, u8, u8);
|
static const u8 *GetInteractionScript(struct MapPosition *, u8, u8);
|
||||||
static const u8 *GetInteractedObjectEventScript(struct MapPosition *, u8, u8);
|
static const u8 *GetInteractedObjectEventScript(struct MapPosition *, u8, u8);
|
||||||
static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *, u8, u8);
|
static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *, u8, u8);
|
||||||
static const u8 *GetInteractedMetatileScript(struct MapPosition *, u8, u8);
|
static const u8 *GetInteractedMetatileScript(struct MapPosition *, u8, u8);
|
||||||
|
@ -146,10 +146,10 @@ static void EscapeRopeWarpInEffect_Init(struct Task *);
|
|||||||
static void EscapeRopeWarpInEffect_Spin(struct Task *);
|
static void EscapeRopeWarpInEffect_Spin(struct Task *);
|
||||||
|
|
||||||
static void Task_TeleportWarpOut(u8);
|
static void Task_TeleportWarpOut(u8);
|
||||||
static void TeleportWarpOutFieldEffect_Init(struct Task*);
|
static void TeleportWarpOutFieldEffect_Init(struct Task *);
|
||||||
static void TeleportWarpOutFieldEffect_SpinGround(struct Task*);
|
static void TeleportWarpOutFieldEffect_SpinGround(struct Task *);
|
||||||
static void TeleportWarpOutFieldEffect_SpinExit(struct Task*);
|
static void TeleportWarpOutFieldEffect_SpinExit(struct Task *);
|
||||||
static void TeleportWarpOutFieldEffect_End(struct Task*);
|
static void TeleportWarpOutFieldEffect_End(struct Task *);
|
||||||
|
|
||||||
static void FieldCallback_TeleportWarpIn(void);
|
static void FieldCallback_TeleportWarpIn(void);
|
||||||
static void Task_TeleportWarpIn(u8);
|
static void Task_TeleportWarpIn(u8);
|
||||||
@ -226,8 +226,8 @@ static void Task_DestroyDeoxysRock(u8 taskId);
|
|||||||
static void DestroyDeoxysRockEffect_CameraShake(s16 *, u8);
|
static void DestroyDeoxysRockEffect_CameraShake(s16 *, u8);
|
||||||
static void DestroyDeoxysRockEffect_RockFragments(s16 *, u8);
|
static void DestroyDeoxysRockEffect_RockFragments(s16 *, u8);
|
||||||
static void DestroyDeoxysRockEffect_WaitAndEnd(s16 *, u8);
|
static void DestroyDeoxysRockEffect_WaitAndEnd(s16 *, u8);
|
||||||
static void CreateDeoxysRockFragments(struct Sprite*);
|
static void CreateDeoxysRockFragments(struct Sprite *);
|
||||||
static void SpriteCB_DeoxysRockFragment(struct Sprite* sprite);
|
static void SpriteCB_DeoxysRockFragment(struct Sprite *sprite);
|
||||||
|
|
||||||
static void Task_MoveDeoxysRock(u8 taskId);
|
static void Task_MoveDeoxysRock(u8 taskId);
|
||||||
|
|
||||||
@ -3776,7 +3776,7 @@ static const struct SpriteTemplate sSpriteTemplate_DeoxysRockFragment = {
|
|||||||
.callback = SpriteCB_DeoxysRockFragment
|
.callback = SpriteCB_DeoxysRockFragment
|
||||||
};
|
};
|
||||||
|
|
||||||
static void CreateDeoxysRockFragments(struct Sprite* sprite)
|
static void CreateDeoxysRockFragments(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int xPos = (s16)gTotalCameraPixelOffsetX + sprite->x + sprite->x2;
|
int xPos = (s16)gTotalCameraPixelOffsetX + sprite->x + sprite->x2;
|
||||||
@ -3794,7 +3794,7 @@ static void CreateDeoxysRockFragments(struct Sprite* sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_DeoxysRockFragment(struct Sprite* sprite)
|
static void SpriteCB_DeoxysRockFragment(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
// 1 case for each fragment, fly off in 4 different directions
|
// 1 case for each fragment, fly off in 4 different directions
|
||||||
switch (sprite->data[0])
|
switch (sprite->data[0])
|
||||||
@ -3820,7 +3820,7 @@ static void SpriteCB_DeoxysRockFragment(struct Sprite* sprite)
|
|||||||
DestroySprite(sprite);
|
DestroySprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 FldEff_MoveDeoxysRock(struct Sprite* sprite)
|
bool8 FldEff_MoveDeoxysRock(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u8 objectEventIdBuffer;
|
u8 objectEventIdBuffer;
|
||||||
if (!TryGetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2], &objectEventIdBuffer))
|
if (!TryGetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2], &objectEventIdBuffer))
|
||||||
|
@ -101,7 +101,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
|
|||||||
static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2);
|
static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2);
|
||||||
static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2);
|
static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2);
|
||||||
static void Task_DoDomeConfetti(u8 taskId);
|
static void Task_DoDomeConfetti(u8 taskId);
|
||||||
static void SpriteCB_HofConfetti(struct Sprite* sprite);
|
static void SpriteCB_HofConfetti(struct Sprite *sprite);
|
||||||
|
|
||||||
static const struct BgTemplate sHof_BgTemplates[] =
|
static const struct BgTemplate sHof_BgTemplates[] =
|
||||||
{
|
{
|
||||||
@ -484,7 +484,7 @@ static void Task_Hof_InitMonData(u8 taskId)
|
|||||||
static void Task_Hof_InitTeamSaveData(u8 taskId)
|
static void Task_Hof_InitTeamSaveData(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
struct HallofFameTeam* lastSavedTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
struct HallofFameTeam *lastSavedTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||||
|
|
||||||
if (!gHasHallOfFameRecords)
|
if (!gHasHallOfFameRecords)
|
||||||
{
|
{
|
||||||
@ -503,8 +503,8 @@ static void Task_Hof_InitTeamSaveData(u8 taskId)
|
|||||||
}
|
}
|
||||||
if (i >= HALL_OF_FAME_MAX_TEAMS)
|
if (i >= HALL_OF_FAME_MAX_TEAMS)
|
||||||
{
|
{
|
||||||
struct HallofFameTeam *afterTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
struct HallofFameTeam *afterTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||||
struct HallofFameTeam *beforeTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
struct HallofFameTeam *beforeTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||||
afterTeam++;
|
afterTeam++;
|
||||||
for (i = 0; i < HALL_OF_FAME_MAX_TEAMS - 1; i++, beforeTeam++, afterTeam++)
|
for (i = 0; i < HALL_OF_FAME_MAX_TEAMS - 1; i++, beforeTeam++, afterTeam++)
|
||||||
{
|
{
|
||||||
@ -821,7 +821,7 @@ void CB2_DoHallOfFamePC(void)
|
|||||||
case 3:
|
case 3:
|
||||||
if (!LoadHofBgs())
|
if (!LoadHofBgs())
|
||||||
{
|
{
|
||||||
struct HallofFameTeam *fameTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
struct HallofFameTeam *fameTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||||
fameTeam->mon[0] = sDummyFameMon;
|
fameTeam->mon[0] = sDummyFameMon;
|
||||||
ComputerScreenOpenEffect(0, 0, 0);
|
ComputerScreenOpenEffect(0, 0, 0);
|
||||||
SetVBlankCallback(VBlankCB_HallOfFame);
|
SetVBlankCallback(VBlankCB_HallOfFame);
|
||||||
@ -867,7 +867,7 @@ static void Task_HofPC_CopySaveData(u8 taskId)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
struct HallofFameTeam* savedTeams;
|
struct HallofFameTeam *savedTeams;
|
||||||
|
|
||||||
CpuCopy16(gDecompressionBuffer, sHofMonPtr, SECTOR_SIZE * NUM_HOF_SECTORS);
|
CpuCopy16(gDecompressionBuffer, sHofMonPtr, SECTOR_SIZE * NUM_HOF_SECTORS);
|
||||||
savedTeams = sHofMonPtr;
|
savedTeams = sHofMonPtr;
|
||||||
@ -890,7 +890,7 @@ static void Task_HofPC_CopySaveData(u8 taskId)
|
|||||||
|
|
||||||
static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||||
{
|
{
|
||||||
struct HallofFameTeam* savedTeams = sHofMonPtr;
|
struct HallofFameTeam *savedTeams = sHofMonPtr;
|
||||||
struct HallofFameMon* currMon;
|
struct HallofFameMon* currMon;
|
||||||
u16 i;
|
u16 i;
|
||||||
|
|
||||||
@ -956,7 +956,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
|||||||
|
|
||||||
static void Task_HofPC_PrintMonInfo(u8 taskId)
|
static void Task_HofPC_PrintMonInfo(u8 taskId)
|
||||||
{
|
{
|
||||||
struct HallofFameTeam* savedTeams = sHofMonPtr;
|
struct HallofFameTeam *savedTeams = sHofMonPtr;
|
||||||
struct HallofFameMon* currMon;
|
struct HallofFameMon* currMon;
|
||||||
u16 i;
|
u16 i;
|
||||||
u16 currMonID;
|
u16 currMonID;
|
||||||
@ -1042,10 +1042,10 @@ static void Task_HofPC_HandleInput(u8 taskId)
|
|||||||
|
|
||||||
static void Task_HofPC_HandlePaletteOnExit(u8 taskId)
|
static void Task_HofPC_HandlePaletteOnExit(u8 taskId)
|
||||||
{
|
{
|
||||||
struct HallofFameTeam* fameTeam;
|
struct HallofFameTeam *fameTeam;
|
||||||
|
|
||||||
CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
|
CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
|
||||||
fameTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
fameTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||||
fameTeam->mon[0] = sDummyFameMon;
|
fameTeam->mon[0] = sDummyFameMon;
|
||||||
ComputerScreenCloseEffect(0, 0, 0);
|
ComputerScreenCloseEffect(0, 0, 0);
|
||||||
gTasks[taskId].func = Task_HofPC_HandleExit;
|
gTasks[taskId].func = Task_HofPC_HandleExit;
|
||||||
@ -1369,7 +1369,7 @@ static void SpriteCB_GetOnScreenAndAnimate(struct Sprite *sprite)
|
|||||||
#define sSineIdx data[0]
|
#define sSineIdx data[0]
|
||||||
#define sExtraY data[1]
|
#define sExtraY data[1]
|
||||||
|
|
||||||
static void SpriteCB_HofConfetti(struct Sprite* sprite)
|
static void SpriteCB_HofConfetti(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->y2 > 120)
|
if (sprite->y2 > 120)
|
||||||
{
|
{
|
||||||
@ -1394,7 +1394,7 @@ static void SpriteCB_HofConfetti(struct Sprite* sprite)
|
|||||||
static bool8 CreateHofConfettiSprite(void)
|
static bool8 CreateHofConfettiSprite(void)
|
||||||
{
|
{
|
||||||
u8 spriteID;
|
u8 spriteID;
|
||||||
struct Sprite* sprite;
|
struct Sprite *sprite;
|
||||||
|
|
||||||
s16 posX = Random() % DISPLAY_WIDTH;
|
s16 posX = Random() % DISPLAY_WIDTH;
|
||||||
s16 posY = -(Random() % 8);
|
s16 posY = -(Random() % 8);
|
||||||
|
@ -1106,7 +1106,7 @@ static void SpriteCB_Player(struct Sprite *sprite)
|
|||||||
|
|
||||||
#define sPlayerSpriteId data[0]
|
#define sPlayerSpriteId data[0]
|
||||||
|
|
||||||
static void SpriteCB_Bicycle(struct Sprite* sprite)
|
static void SpriteCB_Bicycle(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->invisible = gSprites[sprite->sPlayerSpriteId].invisible;
|
sprite->invisible = gSprites[sprite->sPlayerSpriteId].invisible;
|
||||||
sprite->x = gSprites[sprite->sPlayerSpriteId].x;
|
sprite->x = gSprites[sprite->sPlayerSpriteId].x;
|
||||||
@ -1139,7 +1139,7 @@ static void SpriteCB_FlygonLeftHalf(struct Sprite *sprite)
|
|||||||
|
|
||||||
#define sLeftSpriteId data[0]
|
#define sLeftSpriteId data[0]
|
||||||
|
|
||||||
static void SpriteCB_FlygonRightHalf(struct Sprite* sprite)
|
static void SpriteCB_FlygonRightHalf(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->invisible = gSprites[sprite->sLeftSpriteId].invisible;
|
sprite->invisible = gSprites[sprite->sLeftSpriteId].invisible;
|
||||||
sprite->y = gSprites[sprite->sLeftSpriteId].y;
|
sprite->y = gSprites[sprite->sLeftSpriteId].y;
|
||||||
|
@ -189,7 +189,7 @@ static void InitPocketListPositions(void);
|
|||||||
static void InitPocketScrollPositions(void);
|
static void InitPocketScrollPositions(void);
|
||||||
static u8 CreateBagInputHandlerTask(u8);
|
static u8 CreateBagInputHandlerTask(u8);
|
||||||
static void DrawItemListBgRow(u8);
|
static void DrawItemListBgRow(u8);
|
||||||
static void BagMenu_MoveCursorCallback(s32, bool8, struct ListMenu*);
|
static void BagMenu_MoveCursorCallback(s32, bool8, struct ListMenu *);
|
||||||
static void BagMenu_ItemPrintCallback(u8, u32, u8);
|
static void BagMenu_ItemPrintCallback(u8, u32, u8);
|
||||||
static void ItemMenu_UseOutOfBattle(u8);
|
static void ItemMenu_UseOutOfBattle(u8);
|
||||||
static void ItemMenu_Toss(u8);
|
static void ItemMenu_Toss(u8);
|
||||||
|
@ -179,7 +179,7 @@ static void Task_MainMenuCheckSaveFile(u8);
|
|||||||
static void Task_MainMenuCheckBattery(u8);
|
static void Task_MainMenuCheckBattery(u8);
|
||||||
static void Task_WaitForSaveFileErrorWindow(u8);
|
static void Task_WaitForSaveFileErrorWindow(u8);
|
||||||
static void CreateMainMenuErrorWindow(const u8 *);
|
static void CreateMainMenuErrorWindow(const u8 *);
|
||||||
static void ClearMainMenuWindowTilemap(const struct WindowTemplate*);
|
static void ClearMainMenuWindowTilemap(const struct WindowTemplate *);
|
||||||
static void Task_DisplayMainMenu(u8);
|
static void Task_DisplayMainMenu(u8);
|
||||||
static void Task_WaitForBatteryDryErrorWindow(u8);
|
static void Task_WaitForBatteryDryErrorWindow(u8);
|
||||||
static void MainMenu_FormatSavegameText(void);
|
static void MainMenu_FormatSavegameText(void);
|
||||||
@ -209,7 +209,7 @@ static void Task_NewGameBirchSpeech_StartPlayerFadeIn(u8);
|
|||||||
static void Task_NewGameBirchSpeech_WaitForPlayerFadeIn(u8);
|
static void Task_NewGameBirchSpeech_WaitForPlayerFadeIn(u8);
|
||||||
static void Task_NewGameBirchSpeech_BoyOrGirl(u8);
|
static void Task_NewGameBirchSpeech_BoyOrGirl(u8);
|
||||||
static void LoadMainMenuWindowFrameTiles(u8, u16);
|
static void LoadMainMenuWindowFrameTiles(u8, u16);
|
||||||
static void DrawMainMenuWindowBorder(const struct WindowTemplate*, u16);
|
static void DrawMainMenuWindowBorder(const struct WindowTemplate *, u16);
|
||||||
static void Task_HighlightSelectedMainMenuItem(u8);
|
static void Task_HighlightSelectedMainMenuItem(u8);
|
||||||
static void Task_NewGameBirchSpeech_WaitToShowGenderMenu(u8);
|
static void Task_NewGameBirchSpeech_WaitToShowGenderMenu(u8);
|
||||||
static void Task_NewGameBirchSpeech_ChooseGender(u8);
|
static void Task_NewGameBirchSpeech_ChooseGender(u8);
|
||||||
@ -232,7 +232,7 @@ static void Task_NewGameBirchSpeech_ReshowBirchLotad(u8);
|
|||||||
static void Task_NewGameBirchSpeech_WaitForSpriteFadeInAndTextPrinter(u8);
|
static void Task_NewGameBirchSpeech_WaitForSpriteFadeInAndTextPrinter(u8);
|
||||||
static void Task_NewGameBirchSpeech_AreYouReady(u8);
|
static void Task_NewGameBirchSpeech_AreYouReady(u8);
|
||||||
static void Task_NewGameBirchSpeech_ShrinkPlayer(u8);
|
static void Task_NewGameBirchSpeech_ShrinkPlayer(u8);
|
||||||
static void SpriteCB_MovePlayerDownWhileShrinking(struct Sprite*);
|
static void SpriteCB_MovePlayerDownWhileShrinking(struct Sprite *);
|
||||||
static void Task_NewGameBirchSpeech_WaitForPlayerShrink(u8);
|
static void Task_NewGameBirchSpeech_WaitForPlayerShrink(u8);
|
||||||
static void Task_NewGameBirchSpeech_FadePlayerToWhite(u8);
|
static void Task_NewGameBirchSpeech_FadePlayerToWhite(u8);
|
||||||
static void Task_NewGameBirchSpeech_Cleanup(u8);
|
static void Task_NewGameBirchSpeech_Cleanup(u8);
|
||||||
|
@ -67,7 +67,7 @@ static void IncrementCeilingCrumbleFinishedCount(void);
|
|||||||
static void WaitCeilingCrumble(u8);
|
static void WaitCeilingCrumble(u8);
|
||||||
static void FinishCeilingCrumbleTask(u8);
|
static void FinishCeilingCrumbleTask(u8);
|
||||||
static void CreateCeilingCrumbleSprites(void);
|
static void CreateCeilingCrumbleSprites(void);
|
||||||
static void SpriteCB_CeilingCrumble(struct Sprite*);
|
static void SpriteCB_CeilingCrumble(struct Sprite *);
|
||||||
static void DoMirageTowerDisintegration(u8);
|
static void DoMirageTowerDisintegration(u8);
|
||||||
static void InitMirageTowerShake(u8);
|
static void InitMirageTowerShake(u8);
|
||||||
static void Task_FossilFallAndSink(u8);
|
static void Task_FossilFallAndSink(u8);
|
||||||
@ -463,7 +463,7 @@ static void CreateCeilingCrumbleSprites(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_CeilingCrumble(struct Sprite* sprite)
|
static void SpriteCB_CeilingCrumble(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[1] += 2;
|
sprite->data[1] += 2;
|
||||||
sprite->y2 = sprite->data[1] / 2;
|
sprite->y2 = sprite->data[1] / 2;
|
||||||
|
@ -248,15 +248,15 @@ static void UpdatePartySelectionDoubleLayout(s8 *, s8);
|
|||||||
static s8 GetNewSlotDoubleLayout(s8, s8);
|
static s8 GetNewSlotDoubleLayout(s8, s8);
|
||||||
static void PartyMenuPrintText(const u8 *);
|
static void PartyMenuPrintText(const u8 *);
|
||||||
static void Task_PrintAndWaitForText(u8);
|
static void Task_PrintAndWaitForText(u8);
|
||||||
static bool16 IsMonAllowedInPokemonJump(struct Pokemon*);
|
static bool16 IsMonAllowedInPokemonJump(struct Pokemon *);
|
||||||
static bool16 IsMonAllowedInDodrioBerryPicking(struct Pokemon*);
|
static bool16 IsMonAllowedInDodrioBerryPicking(struct Pokemon *);
|
||||||
static void Task_CancelParticipationYesNo(u8);
|
static void Task_CancelParticipationYesNo(u8);
|
||||||
static void Task_HandleCancelParticipationYesNoInput(u8);
|
static void Task_HandleCancelParticipationYesNoInput(u8);
|
||||||
static bool8 CanLearnTutorMove(u16, u8);
|
static bool8 CanLearnTutorMove(u16, u8);
|
||||||
static u16 GetTutorMove(u8);
|
static u16 GetTutorMove(u8);
|
||||||
static bool8 ShouldUseChooseMonText(void);
|
static bool8 ShouldUseChooseMonText(void);
|
||||||
static void SetPartyMonFieldSelectionActions(struct Pokemon*, u8);
|
static void SetPartyMonFieldSelectionActions(struct Pokemon *, u8);
|
||||||
static u8 GetPartyMenuActionsTypeInBattle(struct Pokemon*);
|
static u8 GetPartyMenuActionsTypeInBattle(struct Pokemon *);
|
||||||
static u8 GetPartySlotEntryStatus(s8);
|
static u8 GetPartySlotEntryStatus(s8);
|
||||||
static void Task_UpdateHeldItemSprite(u8);
|
static void Task_UpdateHeldItemSprite(u8);
|
||||||
static void Task_HandleSelectionMenuInput(u8);
|
static void Task_HandleSelectionMenuInput(u8);
|
||||||
@ -277,7 +277,7 @@ static void Task_HandleSwitchItemsYesNoInput(u8);
|
|||||||
static void Task_WriteMailToGiveMonAfterText(u8);
|
static void Task_WriteMailToGiveMonAfterText(u8);
|
||||||
static void CB2_ReturnToPartyMenuFromWritingMail(void);
|
static void CB2_ReturnToPartyMenuFromWritingMail(void);
|
||||||
static void Task_DisplayGaveMailFromPartyMessage(u8);
|
static void Task_DisplayGaveMailFromPartyMessage(u8);
|
||||||
static void UpdatePartyMonHeldItemSprite(struct Pokemon*, struct PartyMenuBox*);
|
static void UpdatePartyMonHeldItemSprite(struct Pokemon *, struct PartyMenuBox *);
|
||||||
static void Task_TossHeldItemYesNo(u8 taskId);
|
static void Task_TossHeldItemYesNo(u8 taskId);
|
||||||
static void Task_HandleTossHeldItemYesNoInput(u8);
|
static void Task_HandleTossHeldItemYesNoInput(u8);
|
||||||
static void Task_TossHeldItem(u8);
|
static void Task_TossHeldItem(u8);
|
||||||
@ -298,19 +298,19 @@ static void Task_FieldMoveExitAreaYesNo(u8);
|
|||||||
static void Task_HandleFieldMoveExitAreaYesNoInput(u8);
|
static void Task_HandleFieldMoveExitAreaYesNoInput(u8);
|
||||||
static void Task_FieldMoveWaitForFade(u8);
|
static void Task_FieldMoveWaitForFade(u8);
|
||||||
static u16 GetFieldMoveMonSpecies(void);
|
static u16 GetFieldMoveMonSpecies(void);
|
||||||
static void UpdatePartyMonHPBar(u8, struct Pokemon*);
|
static void UpdatePartyMonHPBar(u8, struct Pokemon *);
|
||||||
static void SpriteCB_UpdatePartyMonIcon(struct Sprite*);
|
static void SpriteCB_UpdatePartyMonIcon(struct Sprite *);
|
||||||
static void SpriteCB_BouncePartyMonIcon(struct Sprite*);
|
static void SpriteCB_BouncePartyMonIcon(struct Sprite *);
|
||||||
static void ShowOrHideHeldItemSprite(u16, struct PartyMenuBox*);
|
static void ShowOrHideHeldItemSprite(u16, struct PartyMenuBox *);
|
||||||
static void CreateHeldItemSpriteForTrade(u8, bool8);
|
static void CreateHeldItemSpriteForTrade(u8, bool8);
|
||||||
static void SpriteCB_HeldItem(struct Sprite*);
|
static void SpriteCB_HeldItem(struct Sprite *);
|
||||||
static void SetPartyMonAilmentGfx(struct Pokemon*, struct PartyMenuBox*);
|
static void SetPartyMonAilmentGfx(struct Pokemon *, struct PartyMenuBox *);
|
||||||
static void UpdatePartyMonAilmentGfx(u8, struct PartyMenuBox*);
|
static void UpdatePartyMonAilmentGfx(u8, struct PartyMenuBox *);
|
||||||
static u8 GetPartyLayoutFromBattleType(void);
|
static u8 GetPartyLayoutFromBattleType(void);
|
||||||
static void Task_SetSacredAshCB(u8);
|
static void Task_SetSacredAshCB(u8);
|
||||||
static void CB2_ReturnToBagMenu(void);
|
static void CB2_ReturnToBagMenu(void);
|
||||||
static void Task_DisplayHPRestoredMessage(u8);
|
static void Task_DisplayHPRestoredMessage(u8);
|
||||||
static u16 ItemEffectToMonEv(struct Pokemon*, u8);
|
static u16 ItemEffectToMonEv(struct Pokemon *, u8);
|
||||||
static void ItemEffectToStatString(u8, u8 *);
|
static void ItemEffectToStatString(u8, u8 *);
|
||||||
static void ReturnToUseOnWhichMon(u8);
|
static void ReturnToUseOnWhichMon(u8);
|
||||||
static void SetSelectedMoveForPPItem(u8);
|
static void SetSelectedMoveForPPItem(u8);
|
||||||
@ -331,8 +331,8 @@ static void Task_PartyMenuReplaceMove(u8);
|
|||||||
static void Task_StopLearningMoveYesNo(u8);
|
static void Task_StopLearningMoveYesNo(u8);
|
||||||
static void Task_HandleStopLearningMoveYesNoInput(u8);
|
static void Task_HandleStopLearningMoveYesNoInput(u8);
|
||||||
static void Task_TryLearningNextMoveAfterText(u8);
|
static void Task_TryLearningNextMoveAfterText(u8);
|
||||||
static void BufferMonStatsToTaskData(struct Pokemon*, s16 *);
|
static void BufferMonStatsToTaskData(struct Pokemon *, s16 *);
|
||||||
static void UpdateMonDisplayInfoAfterRareCandy(u8, struct Pokemon*);
|
static void UpdateMonDisplayInfoAfterRareCandy(u8, struct Pokemon *);
|
||||||
static void Task_DisplayLevelUpStatsPg1(u8);
|
static void Task_DisplayLevelUpStatsPg1(u8);
|
||||||
static void DisplayLevelUpStatsPg1(u8);
|
static void DisplayLevelUpStatsPg1(u8);
|
||||||
static void Task_DisplayLevelUpStatsPg2(u8);
|
static void Task_DisplayLevelUpStatsPg2(u8);
|
||||||
@ -356,7 +356,7 @@ static bool8 ReturnGiveItemToBagOrPC(u16);
|
|||||||
static void Task_DisplayGaveMailFromBagMessage(u8);
|
static void Task_DisplayGaveMailFromBagMessage(u8);
|
||||||
static void Task_HandleSwitchItemsFromBagYesNoInput(u8);
|
static void Task_HandleSwitchItemsFromBagYesNoInput(u8);
|
||||||
static void Task_ValidateChosenHalfParty(u8);
|
static void Task_ValidateChosenHalfParty(u8);
|
||||||
static bool8 GetBattleEntryEligibility(struct Pokemon*);
|
static bool8 GetBattleEntryEligibility(struct Pokemon *);
|
||||||
static bool8 HasPartySlotAlreadyBeenSelected(u8);
|
static bool8 HasPartySlotAlreadyBeenSelected(u8);
|
||||||
static u8 GetBattleEntryLevelCap(void);
|
static u8 GetBattleEntryLevelCap(void);
|
||||||
static u8 GetMaxBattleEntries(void);
|
static u8 GetMaxBattleEntries(void);
|
||||||
@ -376,7 +376,7 @@ static void Task_ChoosePartyMon(u8 taskId);
|
|||||||
static void Task_ChooseMonForMoveRelearner(u8);
|
static void Task_ChooseMonForMoveRelearner(u8);
|
||||||
static void CB2_ChooseMonForMoveRelearner(void);
|
static void CB2_ChooseMonForMoveRelearner(void);
|
||||||
static void Task_BattlePyramidChooseMonHeldItems(u8);
|
static void Task_BattlePyramidChooseMonHeldItems(u8);
|
||||||
static void ShiftMoveSlot(struct Pokemon*, u8, u8);
|
static void ShiftMoveSlot(struct Pokemon *, u8, u8);
|
||||||
static void BlitBitmapToPartyWindow_LeftColumn(u8, u8, u8, u8, u8, bool8);
|
static void BlitBitmapToPartyWindow_LeftColumn(u8, u8, u8, u8, u8, bool8);
|
||||||
static void BlitBitmapToPartyWindow_RightColumn(u8, u8, u8, u8, u8, bool8);
|
static void BlitBitmapToPartyWindow_RightColumn(u8, u8, u8, u8, u8, bool8);
|
||||||
static void CursorCb_Summary(u8);
|
static void CursorCb_Summary(u8);
|
||||||
@ -1732,7 +1732,7 @@ static void GiveItemToMon(struct Pokemon *mon, u16 item)
|
|||||||
SetMonData(mon, MON_DATA_HELD_ITEM, itemBytes);
|
SetMonData(mon, MON_DATA_HELD_ITEM, itemBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 TryTakeMonItem(struct Pokemon* mon)
|
static u8 TryTakeMonItem(struct Pokemon *mon)
|
||||||
{
|
{
|
||||||
u16 item = GetMonData(mon, MON_DATA_HELD_ITEM);
|
u16 item = GetMonData(mon, MON_DATA_HELD_ITEM);
|
||||||
|
|
||||||
|
@ -905,7 +905,7 @@ static void Task_FadeOutPokeblockFeed(u8 taskId)
|
|||||||
#define sAccel data[1]
|
#define sAccel data[1]
|
||||||
#define sSpecies data[2]
|
#define sSpecies data[2]
|
||||||
|
|
||||||
static u8 CreateMonSprite(struct Pokemon* mon)
|
static u8 CreateMonSprite(struct Pokemon *mon)
|
||||||
{
|
{
|
||||||
u16 species = GetMonData(mon, MON_DATA_SPECIES2);
|
u16 species = GetMonData(mon, MON_DATA_SPECIES2);
|
||||||
u8 spriteId = CreateSprite(&gMultiuseSpriteTemplate, MON_X, MON_Y, 2);
|
u8 spriteId = CreateSprite(&gMultiuseSpriteTemplate, MON_X, MON_Y, 2);
|
||||||
@ -937,7 +937,7 @@ static void StartMonJumpForPokeblock(u8 spriteId)
|
|||||||
gSprites[spriteId].callback = SpriteCB_MonJumpForPokeblock;
|
gSprites[spriteId].callback = SpriteCB_MonJumpForPokeblock;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_MonJumpForPokeblock(struct Sprite* sprite)
|
static void SpriteCB_MonJumpForPokeblock(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->x += 4;
|
sprite->x += 4;
|
||||||
sprite->y += sprite->sSpeed;
|
sprite->y += sprite->sSpeed;
|
||||||
@ -982,7 +982,7 @@ static u8 CreatePokeblockSprite(void)
|
|||||||
return spriteId;
|
return spriteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SpriteCB_ThrownPokeblock(struct Sprite* sprite)
|
static void SpriteCB_ThrownPokeblock(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->x -= 4;
|
sprite->x -= 4;
|
||||||
sprite->y += sprite->sSpeed;
|
sprite->y += sprite->sSpeed;
|
||||||
|
@ -239,9 +239,9 @@ static void SpriteCB_RotatingPokeBall(struct Sprite *sprite);
|
|||||||
static void SpriteCB_SeenOwnInfo(struct Sprite *sprite);
|
static void SpriteCB_SeenOwnInfo(struct Sprite *sprite);
|
||||||
static void SpriteCB_DexListStartMenuCursor(struct Sprite *sprite);
|
static void SpriteCB_DexListStartMenuCursor(struct Sprite *sprite);
|
||||||
static void SpriteCB_PokedexListMonSprite(struct Sprite *sprite);
|
static void SpriteCB_PokedexListMonSprite(struct Sprite *sprite);
|
||||||
static u8 LoadInfoScreen(struct PokedexListItem*, u8 monSpriteId);
|
static u8 LoadInfoScreen(struct PokedexListItem *, u8 monSpriteId);
|
||||||
static bool8 IsInfoScreenScrolling(u8);
|
static bool8 IsInfoScreenScrolling(u8);
|
||||||
static u8 StartInfoScreenScroll(struct PokedexListItem*, u8);
|
static u8 StartInfoScreenScroll(struct PokedexListItem *, u8);
|
||||||
static void Task_LoadInfoScreen(u8);
|
static void Task_LoadInfoScreen(u8);
|
||||||
static void Task_HandleInfoScreenInput(u8);
|
static void Task_HandleInfoScreenInput(u8);
|
||||||
static void Task_SwitchScreensFromInfoScreen(u8);
|
static void Task_SwitchScreensFromInfoScreen(u8);
|
||||||
@ -3177,7 +3177,7 @@ static void PrintInfoScreenText(const u8 *str, u8 left, u8 top)
|
|||||||
#define tMonSpriteId data[4]
|
#define tMonSpriteId data[4]
|
||||||
#define tTrainerSpriteId data[5]
|
#define tTrainerSpriteId data[5]
|
||||||
|
|
||||||
static u8 LoadInfoScreen(struct PokedexListItem* item, u8 monSpriteId)
|
static u8 LoadInfoScreen(struct PokedexListItem *item, u8 monSpriteId)
|
||||||
{
|
{
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ static void Task_PlayMapChosenOrBattleBGM(u8 taskId);
|
|||||||
static bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 battlerId);
|
static bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 battlerId);
|
||||||
static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move);
|
static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move);
|
||||||
static bool8 ShouldSkipFriendshipChange(void);
|
static bool8 ShouldSkipFriendshipChange(void);
|
||||||
static u8 SendMonToPC(struct Pokemon* mon);
|
static u8 SendMonToPC(struct Pokemon *mon);
|
||||||
|
|
||||||
EWRAM_DATA static u8 sLearningMoveTableID = 0;
|
EWRAM_DATA static u8 sLearningMoveTableID = 0;
|
||||||
EWRAM_DATA u8 gPlayerPartyCount = 0;
|
EWRAM_DATA u8 gPlayerPartyCount = 0;
|
||||||
@ -4390,7 +4390,7 @@ u8 GiveMonToPlayer(struct Pokemon *mon)
|
|||||||
return MON_GIVEN_TO_PARTY;
|
return MON_GIVEN_TO_PARTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 SendMonToPC(struct Pokemon* mon)
|
static u8 SendMonToPC(struct Pokemon *mon)
|
||||||
{
|
{
|
||||||
s32 boxNo, boxPos;
|
s32 boxNo, boxPos;
|
||||||
|
|
||||||
@ -6707,7 +6707,7 @@ static void Task_PokemonSummaryAnimateAfterDelay(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 panMode)
|
void BattleAnimateFrontSprite(struct Sprite *sprite, u16 species, bool8 noCry, u8 panMode)
|
||||||
{
|
{
|
||||||
if (gHitMarker & HITMARKER_NO_ANIMATIONS && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)))
|
if (gHitMarker & HITMARKER_NO_ANIMATIONS && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)))
|
||||||
DoMonFrontSpriteAnimation(sprite, species, noCry, panMode | SKIP_FRONT_ANIM);
|
DoMonFrontSpriteAnimation(sprite, species, noCry, panMode | SKIP_FRONT_ANIM);
|
||||||
@ -6715,7 +6715,7 @@ void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u
|
|||||||
DoMonFrontSpriteAnimation(sprite, species, noCry, panMode);
|
DoMonFrontSpriteAnimation(sprite, species, noCry, panMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 panModeAnimFlag)
|
void DoMonFrontSpriteAnimation(struct Sprite *sprite, u16 species, bool8 noCry, u8 panModeAnimFlag)
|
||||||
{
|
{
|
||||||
s8 pan;
|
s8 pan;
|
||||||
switch (panModeAnimFlag & (u8)~SKIP_FRONT_ANIM) // Exclude anim flag to get pan mode
|
switch (panModeAnimFlag & (u8)~SKIP_FRONT_ANIM) // Exclude anim flag to get pan mode
|
||||||
@ -6762,7 +6762,7 @@ void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PokemonSummaryDoMonAnimation(struct Sprite* sprite, u16 species, bool8 oneFrame)
|
void PokemonSummaryDoMonAnimation(struct Sprite *sprite, u16 species, bool8 oneFrame)
|
||||||
{
|
{
|
||||||
if (!oneFrame && HasTwoFramesAnimation(species))
|
if (!oneFrame && HasTwoFramesAnimation(species))
|
||||||
StartSpriteAnim(sprite, 1);
|
StartSpriteAnim(sprite, 1);
|
||||||
@ -6790,7 +6790,7 @@ void StopPokemonAnimationDelayTask(void)
|
|||||||
DestroyTask(delayTaskId);
|
DestroyTask(delayTaskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleAnimateBackSprite(struct Sprite* sprite, u16 species)
|
void BattleAnimateBackSprite(struct Sprite *sprite, u16 species)
|
||||||
{
|
{
|
||||||
if (gHitMarker & HITMARKER_NO_ANIMATIONS && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)))
|
if (gHitMarker & HITMARKER_NO_ANIMATIONS && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)))
|
||||||
{
|
{
|
||||||
|
@ -195,8 +195,8 @@ static bool8 LoadGraphics(void);
|
|||||||
static void CB2_InitSummaryScreen(void);
|
static void CB2_InitSummaryScreen(void);
|
||||||
static void InitBGs(void);
|
static void InitBGs(void);
|
||||||
static bool8 DecompressGraphics(void);
|
static bool8 DecompressGraphics(void);
|
||||||
static void CopyMonToSummaryStruct(struct Pokemon*);
|
static void CopyMonToSummaryStruct(struct Pokemon *);
|
||||||
static bool8 ExtractMonDataToSummaryStruct(struct Pokemon*);
|
static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *);
|
||||||
static void SetDefaultTilemaps(void);
|
static void SetDefaultTilemaps(void);
|
||||||
static void CloseSummaryScreen(u8);
|
static void CloseSummaryScreen(u8);
|
||||||
static void Task_HandleInput(u8);
|
static void Task_HandleInput(u8);
|
||||||
@ -204,7 +204,7 @@ static void ChangeSummaryPokemon(u8, s8);
|
|||||||
static void Task_ChangeSummaryMon(u8);
|
static void Task_ChangeSummaryMon(u8);
|
||||||
static s8 AdvanceMonIndex(s8);
|
static s8 AdvanceMonIndex(s8);
|
||||||
static s8 AdvanceMultiBattleMonIndex(s8);
|
static s8 AdvanceMultiBattleMonIndex(s8);
|
||||||
static bool8 IsValidToViewInMulti(struct Pokemon*);
|
static bool8 IsValidToViewInMulti(struct Pokemon *);
|
||||||
static void ChangePage(u8, s8);
|
static void ChangePage(u8, s8);
|
||||||
static void PssScrollRight(u8);
|
static void PssScrollRight(u8);
|
||||||
static void PssScrollRightEnd(u8);
|
static void PssScrollRightEnd(u8);
|
||||||
@ -234,8 +234,8 @@ static void Task_ShowAppealJamWindow(u8);
|
|||||||
static void HandleStatusTilemap(u16, s16);
|
static void HandleStatusTilemap(u16, s16);
|
||||||
static void Task_ShowStatusWindow(u8);
|
static void Task_ShowStatusWindow(u8);
|
||||||
static void TilemapFiveMovesDisplay(u16 *, u16, bool8);
|
static void TilemapFiveMovesDisplay(u16 *, u16, bool8);
|
||||||
static void DrawPokerusCuredSymbol(struct Pokemon*);
|
static void DrawPokerusCuredSymbol(struct Pokemon *);
|
||||||
static void DrawExperienceProgressBar(struct Pokemon*);
|
static void DrawExperienceProgressBar(struct Pokemon *);
|
||||||
static void DrawContestMoveHearts(u16);
|
static void DrawContestMoveHearts(u16);
|
||||||
static void LimitEggSummaryPageDisplay(void);
|
static void LimitEggSummaryPageDisplay(void);
|
||||||
static void ResetWindows(void);
|
static void ResetWindows(void);
|
||||||
@ -1725,7 +1725,7 @@ static s8 AdvanceMultiBattleMonIndex(s8 delta)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 IsValidToViewInMulti(struct Pokemon* mon)
|
static bool8 IsValidToViewInMulti(struct Pokemon *mon)
|
||||||
{
|
{
|
||||||
if (GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NONE)
|
if (GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NONE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -267,7 +267,7 @@ static u32 BuildPartyMonSearchResults(s32 state)
|
|||||||
item.boxId = TOTAL_BOXES_COUNT;
|
item.boxId = TOTAL_BOXES_COUNT;
|
||||||
for (i = 0; i < PARTY_SIZE; i++)
|
for (i = 0; i < PARTY_SIZE; i++)
|
||||||
{
|
{
|
||||||
struct Pokemon * pokemon = &gPlayerParty[i];
|
struct Pokemon *pokemon = &gPlayerParty[i];
|
||||||
if (!GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES))
|
if (!GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES))
|
||||||
return LT_INC_AND_CONTINUE;
|
return LT_INC_AND_CONTINUE;
|
||||||
if (!GetMonData(pokemon, MON_DATA_SANITY_IS_EGG))
|
if (!GetMonData(pokemon, MON_DATA_SANITY_IS_EGG))
|
||||||
@ -697,7 +697,7 @@ static void BufferSearchMonListItem(struct PokenavMonListItem * item, u8 * dest)
|
|||||||
// Mon is in party
|
// Mon is in party
|
||||||
if (item->boxId == TOTAL_BOXES_COUNT)
|
if (item->boxId == TOTAL_BOXES_COUNT)
|
||||||
{
|
{
|
||||||
struct Pokemon * mon = &gPlayerParty[item->monId];
|
struct Pokemon *mon = &gPlayerParty[item->monId];
|
||||||
gender = GetMonGender(mon);
|
gender = GetMonGender(mon);
|
||||||
level = GetLevelFromMonExp(mon);
|
level = GetLevelFromMonExp(mon);
|
||||||
GetMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
GetMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
||||||
|
@ -50,7 +50,7 @@ static void InitHelpBar(void);
|
|||||||
static u32 LoopedTask_SlideMenuHeaderUp(s32);
|
static u32 LoopedTask_SlideMenuHeaderUp(s32);
|
||||||
static u32 LoopedTask_SlideMenuHeaderDown(s32);
|
static u32 LoopedTask_SlideMenuHeaderDown(s32);
|
||||||
static void DrawHelpBar(u32);
|
static void DrawHelpBar(u32);
|
||||||
static void SpriteCB_SpinningPokenav(struct Sprite*);
|
static void SpriteCB_SpinningPokenav(struct Sprite *);
|
||||||
static u32 LoopedTask_InitPokenavMenu(s32);
|
static u32 LoopedTask_InitPokenavMenu(s32);
|
||||||
|
|
||||||
static const u16 sSpinningPokenav_Pal[] = INCBIN_U16("graphics/pokenav/nav_icon.gbapal");
|
static const u16 sSpinningPokenav_Pal[] = INCBIN_U16("graphics/pokenav/nav_icon.gbapal");
|
||||||
|
@ -24,7 +24,7 @@ struct Pokenav_MatchCallMenu
|
|||||||
u16 numSpecialTrainers;
|
u16 numSpecialTrainers;
|
||||||
bool32 initFinished;
|
bool32 initFinished;
|
||||||
u32 loopedTaskId;
|
u32 loopedTaskId;
|
||||||
u32 (*callback)(struct Pokenav_MatchCallMenu*);
|
u32 (*callback)(struct Pokenav_MatchCallMenu *);
|
||||||
struct PokenavMatchCallEntry matchCallEntries[MAX_REMATCH_ENTRIES - 1];
|
struct PokenavMatchCallEntry matchCallEntries[MAX_REMATCH_ENTRIES - 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ struct Pokenav_Menu
|
|||||||
u16 currMenuItem;
|
u16 currMenuItem;
|
||||||
u16 helpBarIndex;
|
u16 helpBarIndex;
|
||||||
u32 menuId;
|
u32 menuId;
|
||||||
u32 (*callback)(struct Pokenav_Menu*);
|
u32 (*callback)(struct Pokenav_Menu *);
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool32 UpdateMenuCursorPos(struct Pokenav_Menu *);
|
static bool32 UpdateMenuCursorPos(struct Pokenav_Menu *);
|
||||||
@ -28,7 +28,7 @@ static u32 HandleCantOpenRibbonsInput(struct Pokenav_Menu *);
|
|||||||
static u32 HandleMainMenuInputEndTutorial(struct Pokenav_Menu *);
|
static u32 HandleMainMenuInputEndTutorial(struct Pokenav_Menu *);
|
||||||
static u32 HandleMainMenuInputTutorial(struct Pokenav_Menu *);
|
static u32 HandleMainMenuInputTutorial(struct Pokenav_Menu *);
|
||||||
static u32 HandleMainMenuInput(struct Pokenav_Menu *);
|
static u32 HandleMainMenuInput(struct Pokenav_Menu *);
|
||||||
static u32 (*GetMainMenuInputHandler(void))(struct Pokenav_Menu*);
|
static u32 (*GetMainMenuInputHandler(void))(struct Pokenav_Menu *);
|
||||||
static void SetMenuInputHandler(struct Pokenav_Menu *);
|
static void SetMenuInputHandler(struct Pokenav_Menu *);
|
||||||
|
|
||||||
// Number of entries - 1 for that menu type
|
// Number of entries - 1 for that menu type
|
||||||
@ -186,7 +186,7 @@ static void SetMenuInputHandler(struct Pokenav_Menu *menu)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 (*GetMainMenuInputHandler(void))(struct Pokenav_Menu*)
|
static u32 (*GetMainMenuInputHandler(void))(struct Pokenav_Menu *)
|
||||||
{
|
{
|
||||||
switch (GetPokenavMode())
|
switch (GetPokenavMode())
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ enum
|
|||||||
|
|
||||||
struct Pokenav_RibbonsMonList
|
struct Pokenav_RibbonsMonList
|
||||||
{
|
{
|
||||||
u32 (*callback)(struct Pokenav_RibbonsMonList*);
|
u32 (*callback)(struct Pokenav_RibbonsMonList *);
|
||||||
u32 loopedTaskId;
|
u32 loopedTaskId;
|
||||||
u16 winid;
|
u16 winid;
|
||||||
s32 boxId;
|
s32 boxId;
|
||||||
@ -256,7 +256,7 @@ static u32 BuildPartyMonRibbonList(s32 state)
|
|||||||
item.boxId = TOTAL_BOXES_COUNT;
|
item.boxId = TOTAL_BOXES_COUNT;
|
||||||
for (i = 0; i < PARTY_SIZE; i++)
|
for (i = 0; i < PARTY_SIZE; i++)
|
||||||
{
|
{
|
||||||
struct Pokemon * pokemon = &gPlayerParty[i];
|
struct Pokemon *pokemon = &gPlayerParty[i];
|
||||||
if (!GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES))
|
if (!GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES))
|
||||||
return LT_INC_AND_CONTINUE;
|
return LT_INC_AND_CONTINUE;
|
||||||
if (!GetMonData(pokemon, MON_DATA_SANITY_IS_EGG) && !GetMonData(pokemon, MON_DATA_SANITY_IS_BAD_EGG))
|
if (!GetMonData(pokemon, MON_DATA_SANITY_IS_EGG) && !GetMonData(pokemon, MON_DATA_SANITY_IS_BAD_EGG))
|
||||||
@ -707,7 +707,7 @@ static void BufferRibbonMonInfoText(struct PokenavListItem * listItem, u8 * dest
|
|||||||
// Mon is in party
|
// Mon is in party
|
||||||
if (item->boxId == TOTAL_BOXES_COUNT)
|
if (item->boxId == TOTAL_BOXES_COUNT)
|
||||||
{
|
{
|
||||||
struct Pokemon * mon = &gPlayerParty[item->monId];
|
struct Pokemon *mon = &gPlayerParty[item->monId];
|
||||||
gender = GetMonGender(mon);
|
gender = GetMonGender(mon);
|
||||||
level = GetLevelFromMonExp(mon);
|
level = GetLevelFromMonExp(mon);
|
||||||
GetMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
GetMonData(mon, MON_DATA_NICKNAME, gStringVar3);
|
||||||
|
@ -63,7 +63,7 @@ static void BuyMenuBuildListMenuTemplate(void);
|
|||||||
static void BuyMenuInitBgs(void);
|
static void BuyMenuInitBgs(void);
|
||||||
static void BuyMenuInitWindows(void);
|
static void BuyMenuInitWindows(void);
|
||||||
static void BuyMenuDecompressBgGraphics(void);
|
static void BuyMenuDecompressBgGraphics(void);
|
||||||
static void BuyMenuSetListEntry(struct ListMenuItem*, u16, u8 *);
|
static void BuyMenuSetListEntry(struct ListMenuItem *, u16, u8 *);
|
||||||
static void BuyMenuAddItemIcon(u16, u8);
|
static void BuyMenuAddItemIcon(u16, u8);
|
||||||
static void BuyMenuRemoveItemIcon(u16, u8);
|
static void BuyMenuRemoveItemIcon(u16, u8);
|
||||||
static void BuyMenuPrint(u8 windowId, const u8 *text, u8 x, u8 y, s8 speed, u8 colorSet);
|
static void BuyMenuPrint(u8 windowId, const u8 *text, u8 x, u8 y, s8 speed, u8 colorSet);
|
||||||
|
@ -605,7 +605,7 @@ static bool8 IsReelTimeSmokeAnimFinished(void);
|
|||||||
static void DestroyReelTimeSmokeSprite(void);
|
static void DestroyReelTimeSmokeSprite(void);
|
||||||
static u8 CreatePikaPowerBoltSprite(s16, s16);
|
static u8 CreatePikaPowerBoltSprite(s16, s16);
|
||||||
static void DestroyPikaPowerBoltSprite(u8);
|
static void DestroyPikaPowerBoltSprite(u8);
|
||||||
static u8 CreateDigitalDisplaySprite(u8, void (*callback)(struct Sprite*), s16, s16, s16);
|
static u8 CreateDigitalDisplaySprite(u8, void (*callback)(struct Sprite *), s16, s16, s16);
|
||||||
static void LoadSlotMachineGfx(void);
|
static void LoadSlotMachineGfx(void);
|
||||||
static void LoadReelBackground(void);
|
static void LoadReelBackground(void);
|
||||||
static void LoadMenuGfx(void);
|
static void LoadMenuGfx(void);
|
||||||
|
@ -535,7 +535,7 @@ void ShowReturnToFieldStartMenu(void)
|
|||||||
|
|
||||||
void Task_ShowStartMenu(u8 taskId)
|
void Task_ShowStartMenu(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
switch(task->data[0])
|
switch(task->data[0])
|
||||||
{
|
{
|
||||||
|
@ -107,10 +107,10 @@ static bool8 LoadCardGfx(void);
|
|||||||
static void CB2_InitTrainerCard(void);
|
static void CB2_InitTrainerCard(void);
|
||||||
static u32 GetCappedGameStat(u8 statId, u32 maxValue);
|
static u32 GetCappedGameStat(u8 statId, u32 maxValue);
|
||||||
static bool8 HasAllFrontierSymbols(void);
|
static bool8 HasAllFrontierSymbols(void);
|
||||||
static u8 GetRubyTrainerStars(struct TrainerCard*);
|
static u8 GetRubyTrainerStars(struct TrainerCard *);
|
||||||
static u16 GetCaughtMonsCount(void);
|
static u16 GetCaughtMonsCount(void);
|
||||||
static void SetPlayerCardData(struct TrainerCard*, u8);
|
static void SetPlayerCardData(struct TrainerCard *, u8);
|
||||||
static void TrainerCard_GenerateCardForPlayer(struct TrainerCard*);
|
static void TrainerCard_GenerateCardForPlayer(struct TrainerCard *);
|
||||||
static u8 VersionToCardType(u8);
|
static u8 VersionToCardType(u8);
|
||||||
static void SetDataFromTrainerCard(void);
|
static void SetDataFromTrainerCard(void);
|
||||||
static void InitGpuRegs(void);
|
static void InitGpuRegs(void);
|
||||||
@ -152,12 +152,12 @@ static void LoadStickerGfx(void);
|
|||||||
static u8 SetCardBgsAndPals(void);
|
static u8 SetCardBgsAndPals(void);
|
||||||
static void DrawCardBackStats(void);
|
static void DrawCardBackStats(void);
|
||||||
static void Task_DoCardFlipTask(u8);
|
static void Task_DoCardFlipTask(u8);
|
||||||
static bool8 Task_BeginCardFlip(struct Task* task);
|
static bool8 Task_BeginCardFlip(struct Task *task);
|
||||||
static bool8 Task_AnimateCardFlipDown(struct Task* task);
|
static bool8 Task_AnimateCardFlipDown(struct Task *task);
|
||||||
static bool8 Task_DrawFlippedCardSide(struct Task* task);
|
static bool8 Task_DrawFlippedCardSide(struct Task *task);
|
||||||
static bool8 Task_SetCardFlipped(struct Task* task);
|
static bool8 Task_SetCardFlipped(struct Task *task);
|
||||||
static bool8 Task_AnimateCardFlipUp(struct Task* task);
|
static bool8 Task_AnimateCardFlipUp(struct Task *task);
|
||||||
static bool8 Task_EndCardFlip(struct Task* task);
|
static bool8 Task_EndCardFlip(struct Task *task);
|
||||||
static void UpdateCardFlipRegs(u16);
|
static void UpdateCardFlipRegs(u16);
|
||||||
static void LoadMonIconGfx(void);
|
static void LoadMonIconGfx(void);
|
||||||
|
|
||||||
@ -1570,7 +1570,7 @@ static void BlinkTimeColon(void)
|
|||||||
|
|
||||||
u8 GetTrainerCardStars(u8 cardId)
|
u8 GetTrainerCardStars(u8 cardId)
|
||||||
{
|
{
|
||||||
struct TrainerCard* trainerCards = gTrainerCards;
|
struct TrainerCard *trainerCards = gTrainerCards;
|
||||||
return trainerCards[cardId].stars;
|
return trainerCards[cardId].stars;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1598,7 +1598,7 @@ static void Task_DoCardFlipTask(u8 taskId)
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 Task_BeginCardFlip(struct Task* task)
|
static bool8 Task_BeginCardFlip(struct Task *task)
|
||||||
{
|
{
|
||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
@ -1615,7 +1615,7 @@ static bool8 Task_BeginCardFlip(struct Task* task)
|
|||||||
// Note: Cannot be DISPLAY_HEIGHT / 2, or cardHeight will be 0
|
// Note: Cannot be DISPLAY_HEIGHT / 2, or cardHeight will be 0
|
||||||
#define CARD_FLIP_Y ((DISPLAY_HEIGHT / 2) - 3)
|
#define CARD_FLIP_Y ((DISPLAY_HEIGHT / 2) - 3)
|
||||||
|
|
||||||
static bool8 Task_AnimateCardFlipDown(struct Task* task)
|
static bool8 Task_AnimateCardFlipDown(struct Task *task)
|
||||||
{
|
{
|
||||||
u32 cardHeight, r5, r10, cardTop, r6, var_24, cardBottom, var;
|
u32 cardHeight, r5, r10, cardTop, r6, var_24, cardBottom, var;
|
||||||
s16 i;
|
s16 i;
|
||||||
@ -1660,7 +1660,7 @@ static bool8 Task_AnimateCardFlipDown(struct Task* task)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 Task_DrawFlippedCardSide(struct Task* task)
|
static bool8 Task_DrawFlippedCardSide(struct Task *task)
|
||||||
{
|
{
|
||||||
sData->allowDMACopy = FALSE;
|
sData->allowDMACopy = FALSE;
|
||||||
if (Overworld_IsRecvQueueAtMax() == TRUE)
|
if (Overworld_IsRecvQueueAtMax() == TRUE)
|
||||||
@ -1714,7 +1714,7 @@ static bool8 Task_DrawFlippedCardSide(struct Task* task)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 Task_SetCardFlipped(struct Task* task)
|
static bool8 Task_SetCardFlipped(struct Task *task)
|
||||||
{
|
{
|
||||||
sData->allowDMACopy = FALSE;
|
sData->allowDMACopy = FALSE;
|
||||||
|
|
||||||
@ -1734,7 +1734,7 @@ static bool8 Task_SetCardFlipped(struct Task* task)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 Task_AnimateCardFlipUp(struct Task* task)
|
static bool8 Task_AnimateCardFlipUp(struct Task *task)
|
||||||
{
|
{
|
||||||
u32 cardHeight, r5, r10, cardTop, r6, var_24, cardBottom, var;
|
u32 cardHeight, r5, r10, cardTop, r6, var_24, cardBottom, var;
|
||||||
s16 i;
|
s16 i;
|
||||||
|
@ -275,7 +275,7 @@ static s32 IsRequestedTypeOrEggInPlayerParty(u32, u32);
|
|||||||
static bool32 UR_PrintFieldMessage(const u8 *);
|
static bool32 UR_PrintFieldMessage(const u8 *);
|
||||||
static s32 GetChatLeaderActionRequestMessage(u8 *, u32, u16 *, struct WirelessLink_URoom *);
|
static s32 GetChatLeaderActionRequestMessage(u8 *, u32, u16 *, struct WirelessLink_URoom *);
|
||||||
static void Task_InitUnionRoom(u8 taskId);
|
static void Task_InitUnionRoom(u8 taskId);
|
||||||
static bool8 ArePlayersDifferent(struct RfuPlayerData*, const struct RfuPlayerData*);
|
static bool8 ArePlayersDifferent(struct RfuPlayerData *, const struct RfuPlayerData *);
|
||||||
static void ItemPrintFunc_PossibleGroupMembers(u8, u32, u8);
|
static void ItemPrintFunc_PossibleGroupMembers(u8, u32, u8);
|
||||||
static void ListMenuItemPrintFunc_UnionRoomGroups(u8, u32, u8);
|
static void ListMenuItemPrintFunc_UnionRoomGroups(u8, u32, u8);
|
||||||
static void TradeBoardListMenuItemPrintFunc(u8, u32, u8);
|
static void TradeBoardListMenuItemPrintFunc(u8, u32, u8);
|
||||||
@ -1487,7 +1487,7 @@ static void Task_StartUnionRoomTrade(u8 taskId)
|
|||||||
case 1:
|
case 1:
|
||||||
if (GetBlockReceivedStatus() == 3)
|
if (GetBlockReceivedStatus() == 3)
|
||||||
{
|
{
|
||||||
gEnemyParty[0] = *(struct Pokemon*)(gBlockRecvBuffer[GetMultiplayerId() ^ 1]);
|
gEnemyParty[0] = *(struct Pokemon *)(gBlockRecvBuffer[GetMultiplayerId() ^ 1]);
|
||||||
IncrementGameStat(GAME_STAT_NUM_UNION_ROOM_BATTLES);
|
IncrementGameStat(GAME_STAT_NUM_UNION_ROOM_BATTLES);
|
||||||
ResetBlockReceivedFlags();
|
ResetBlockReceivedFlags();
|
||||||
gTasks[taskId].data[0]++;
|
gTasks[taskId].data[0]++;
|
||||||
|
Loading…
Reference in New Issue
Block a user