diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/battle.h | 6 | ||||
-rw-r--r-- | include/battle_anim.h | 4 | ||||
-rw-r--r-- | include/constants/daycare.h | 2 | ||||
-rw-r--r-- | include/constants/pokemon.h | 2 | ||||
-rw-r--r-- | include/gba/m4a_internal.h | 92 | ||||
-rw-r--r-- | include/pokeball.h | 8 |
6 files changed, 61 insertions, 53 deletions
diff --git a/include/battle.h b/include/battle.h index 78e7b809a..0ebc9fe01 100644 --- a/include/battle.h +++ b/include/battle.h @@ -523,14 +523,14 @@ struct BattleAnimationInfo u8 field_7; u8 ballThrowCaseId; u8 field_9_x1:1; - u8 field_9_x2:1; + u8 wildMonInvisible:1; u8 field_9_x1C:3; u8 field_9_x20:1; u8 field_9_x40:1; u8 field_9_x80:1; - u8 field_A; + u8 numBallParticles; u8 field_B; - s16 field_C; + s16 ballSubpx; u8 field_E; u8 field_F; }; diff --git a/include/battle_anim.h b/include/battle_anim.h index 18727cc73..096d533e2 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -207,8 +207,8 @@ void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId); // battle_anim_ground.c void AnimTask_HorizontalShake(u8 taskId); -// battle_anim_special.c -void sub_8172EF0(u8 battler, struct Pokemon *mon); +// battle_anim_throw.c +void TryShinyAnimation(u8 battler, struct Pokemon *mon); u8 ItemIdToBallId(u16 itemId); u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId); u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 selectedPalettes, u8 ballId); diff --git a/include/constants/daycare.h b/include/constants/daycare.h index 103f920f2..adb62fab5 100644 --- a/include/constants/daycare.h +++ b/include/constants/daycare.h @@ -22,6 +22,6 @@ // Array buffers #define EGG_MOVES_ARRAY_COUNT 10 -#define EGG_LVL_UP_MOVES_ARRAY_COUNT 50 +#define EGG_LVL_UP_MOVES_ARRAY_COUNT (MAX_LEVEL_UP_MOVES > 50 ? MAX_LEVEL_UP_MOVES : 50) #endif //GUARD_DAYCARE_CONSTANTS_H diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index f026fa0e3..52eabe71b 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -204,6 +204,8 @@ #define LEVEL_UP_MOVE_LV 0xFE00 #define LEVEL_UP_END 0xFFFF +#define MAX_LEVEL_UP_MOVES 20 + #define MON_MALE 0x00 #define MON_FEMALE 0xFE #define MON_GENDERLESS 0xFF diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h index e2836c6f6..bdff1b865 100644 --- a/include/gba/m4a_internal.h +++ b/include/gba/m4a_internal.h @@ -140,55 +140,13 @@ struct SoundChannel struct WaveData *wav; u32 cp; struct MusicPlayerTrack *track; - u32 pp; - u32 np; - u32 d4; + void *pp; + void *np; + void *d4; u16 xpi; u16 xpc; }; -#define MAX_DIRECTSOUND_CHANNELS 12 - -#define PCM_DMA_BUF_SIZE 1584 // size of Direct Sound buffer - -struct SoundInfo -{ - // This field is normally equal to ID_NUMBER but it is set to other - // values during sensitive operations for locking purposes. - // This field should be volatile but isn't. This could potentially cause - // race conditions. - u32 ident; - - vu8 pcmDmaCounter; - - // Direct Sound - u8 reverb; - u8 maxChans; - u8 masterVolume; - u8 freq; - - u8 mode; - u8 c15; - u8 pcmDmaPeriod; // number of V-blanks per PCM DMA - u8 maxLines; - u8 gap[3]; - s32 pcmSamplesPerVBlank; - s32 pcmFreq; - s32 divFreq; - struct CgbChannel *cgbChans; - u32 func; - u32 intp; - void (*CgbSound)(void); - void (*CgbOscOff)(u8); - u32 (*MidiKeyToCgbFreq)(u8, u8, u8); - u32 MPlayJumpTable; - u32 plynote; - u32 ExtVolPit; - u8 gap2[16]; - struct SoundChannel chans[MAX_DIRECTSOUND_CHANNELS]; - s8 pcmBuffer[PCM_DMA_BUF_SIZE * 2]; -}; - struct SongHeader { u8 trackCount; @@ -312,7 +270,7 @@ struct MusicPlayerInfo struct MusicPlayerTrack *tracks; struct ToneData *tone; u32 ident; - u32 func; + void (*func)(); u32 intp; }; @@ -334,7 +292,47 @@ struct Song extern const struct MusicPlayer gMPlayTable[]; extern const struct Song gSongTable[]; +#define MAX_DIRECTSOUND_CHANNELS 12 + +#define PCM_DMA_BUF_SIZE 1584 // size of Direct Sound buffer + +struct SoundInfo +{ + // This field is normally equal to ID_NUMBER but it is set to other + // values during sensitive operations for locking purposes. + // This field should be volatile but isn't. This could potentially cause + // race conditions. + u32 ident; + + vu8 pcmDmaCounter; + + // Direct Sound + u8 reverb; + u8 maxChans; + u8 masterVolume; + u8 freq; + u8 mode; + u8 c15; + u8 pcmDmaPeriod; // number of V-blanks per PCM DMA + u8 maxLines; + u8 gap[3]; + s32 pcmSamplesPerVBlank; + s32 pcmFreq; + s32 divFreq; + struct CgbChannel *cgbChans; + void (*func)(); + u32 intp; + void (*CgbSound)(); + void (*CgbOscOff)(u8); + u32 (*MidiKeyToCgbFreq)(u8, u8, u8); + void (**MPlayJumpTable)(); + void (*plynote)(u8, struct MusicPlayerInfo *, struct MusicPlayerTrack *); + void (*ExtVolPit)(struct MusicPlayerInfo *, struct MusicPlayerTrack *); + u32 gap2[4]; + struct SoundChannel chans[MAX_DIRECTSOUND_CHANNELS]; + s8 pcmBuffer[PCM_DMA_BUF_SIZE * 2]; +}; extern u8 gMPlayMemAccArea[]; @@ -448,7 +446,7 @@ void ply_tune(struct MusicPlayerInfo *, struct MusicPlayerTrack *); void ply_port(struct MusicPlayerInfo *, struct MusicPlayerTrack *); void ply_xcmd(struct MusicPlayerInfo *, struct MusicPlayerTrack *); void ply_endtie(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_note(struct MusicPlayerInfo *, struct MusicPlayerTrack *); +void ply_note(u8, struct MusicPlayerInfo *, struct MusicPlayerTrack *); // extended sound command handler functions void ply_xxx(struct MusicPlayerInfo *, struct MusicPlayerTrack *); diff --git a/include/pokeball.h b/include/pokeball.h index 12b9b1eff..1cdb08f94 100644 --- a/include/pokeball.h +++ b/include/pokeball.h @@ -18,6 +18,14 @@ enum POKEBALL_COUNT }; +enum { + BALL_AFFINE_ANIM_0, + BALL_ROTATE_RIGHT, + BALL_ROTATE_LEFT, + BALL_AFFINE_ANIM_3, + BALL_AFFINE_ANIM_4 +}; + extern const struct SpriteTemplate gBallSpriteTemplates[]; #define POKEBALL_PLAYER_SENDOUT 0xFF |