diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/battle_controllers.h | 26 | ||||
-rw-r--r-- | include/constants/battle.h | 64 | ||||
-rw-r--r-- | include/constants/battle_anim.h | 86 | ||||
-rw-r--r-- | include/constants/battle_string_ids.h | 2 | ||||
-rw-r--r-- | include/constants/pokemon.h | 3 | ||||
-rw-r--r-- | include/field_player_avatar.h | 10 | ||||
-rw-r--r-- | include/field_screen_effect.h | 8 | ||||
-rw-r--r-- | include/graphics.h | 9 | ||||
-rw-r--r-- | include/pokemon.h | 1 | ||||
-rw-r--r-- | include/recorded_battle.h | 2 | ||||
-rw-r--r-- | include/strings.h | 27 |
11 files changed, 137 insertions, 101 deletions
diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 32918fefb..5b1ada11a 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -85,8 +85,8 @@ enum struct UnusedControllerStruct { - u8 field_0:7; - u8 flag_x80:1; + u8 unk:7; + u8 flag:1; }; struct HpAndStatus @@ -145,19 +145,19 @@ enum CONTROLLER_STATUSXOR, CONTROLLER_DATATRANSFER, CONTROLLER_DMA3TRANSFER, - CONTROLLER_31, + CONTROLLER_PLAYBGM, CONTROLLER_32, CONTROLLER_TWORETURNVALUES, CONTROLLER_CHOSENMONRETURNVALUE, CONTROLLER_ONERETURNVALUE, CONTROLLER_ONERETURNVALUE_DUPLICATE, - CONTROLLER_37, - CONTROLLER_38, - CONTROLLER_39, - CONTROLLER_40, + CONTROLLER_CLEARUNKVAR, + CONTROLLER_SETUNKVAR, + CONTROLLER_CLEARUNKFLAG, + CONTROLLER_TOGGLEUNKFLAG, CONTROLLER_HITANIMATION, CONTROLLER_42, - CONTROLLER_EFFECTIVENESSSOUND, + CONTROLLER_PLAYSE, CONTROLLER_PLAYFANFAREORBGM, CONTROLLER_FAINTINGCRY, CONTROLLER_INTROSLIDE, @@ -175,7 +175,7 @@ enum CONTROLLER_CMDS_COUNT }; -extern struct UnusedControllerStruct gUnknown_02022D0C; +extern struct UnusedControllerStruct gUnusedControllerStruct; // general functions void HandleLinkBattleSetup(void); @@ -222,10 +222,10 @@ void BtlController_EmitTwoReturnValues(u8 bufferId, u8 arg1, u16 arg2); void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 b, u8 *c); void BtlController_EmitOneReturnValue(u8 bufferId, u16 arg1); void BtlController_EmitOneReturnValue_Duplicate(u8 bufferId, u16 b); -void BtlController_EmitCmd37(u8 bufferId); // unused -void BtlController_EmitCmd38(u8 bufferId, u8 b); // unused -void BtlController_EmitCmd39(u8 bufferId); // unused -void BtlController_EmitCmd40(u8 bufferId); // unused +void BtlController_EmitClearUnkVar(u8 bufferId); // unused +void BtlController_EmitSetUnkVar(u8 bufferId, u8 b); // unused +void BtlController_EmitClearUnkFlag(u8 bufferId); // unused +void BtlController_EmitToggleUnkFlag(u8 bufferId); // unused void BtlController_EmitHitAnimation(u8 bufferId); void BtlController_EmitCmd42(u8 bufferId); void BtlController_EmitPlaySE(u8 bufferId, u16 songId); diff --git a/include/constants/battle.h b/include/constants/battle.h index fa8f422c4..e6ebc85e4 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -44,38 +44,38 @@ #define BIT_FLANK 2 // Battle Type Flags -#define BATTLE_TYPE_DOUBLE (1 << 0) -#define BATTLE_TYPE_LINK (1 << 1) -#define BATTLE_TYPE_IS_MASTER (1 << 2) // In not-link battles, it's always set. -#define BATTLE_TYPE_TRAINER (1 << 3) -#define BATTLE_TYPE_FIRST_BATTLE (1 << 4) -#define BATTLE_TYPE_20 (1 << 5) -#define BATTLE_TYPE_MULTI (1 << 6) -#define BATTLE_TYPE_SAFARI (1 << 7) -#define BATTLE_TYPE_BATTLE_TOWER (1 << 8) -#define BATTLE_TYPE_WALLY_TUTORIAL (1 << 9) -#define BATTLE_TYPE_ROAMER (1 << 10) -#define BATTLE_TYPE_EREADER_TRAINER (1 << 11) -#define BATTLE_TYPE_KYOGRE_GROUDON (1 << 12) -#define BATTLE_TYPE_LEGENDARY (1 << 13) -#define BATTLE_TYPE_REGI (1 << 14) -#define BATTLE_TYPE_TWO_OPPONENTS (1 << 15) -#define BATTLE_TYPE_DOME (1 << 16) -#define BATTLE_TYPE_PALACE (1 << 17) -#define BATTLE_TYPE_ARENA (1 << 18) -#define BATTLE_TYPE_FACTORY (1 << 19) -#define BATTLE_TYPE_PIKE (1 << 20) -#define BATTLE_TYPE_PYRAMID (1 << 21) -#define BATTLE_TYPE_INGAME_PARTNER (1 << 22) -#define BATTLE_TYPE_x800000 (1 << 23) -#define BATTLE_TYPE_RECORDED (1 << 24) -#define BATTLE_TYPE_x2000000 (1 << 25) -#define BATTLE_TYPE_TRAINER_HILL (1 << 26) -#define BATTLE_TYPE_SECRET_BASE (1 << 27) -#define BATTLE_TYPE_GROUDON (1 << 28) -#define BATTLE_TYPE_KYOGRE (1 << 29) -#define BATTLE_TYPE_RAYQUAZA (1 << 30) -#define BATTLE_TYPE_x80000000 (1 << 31) +#define BATTLE_TYPE_DOUBLE (1 << 0) +#define BATTLE_TYPE_LINK (1 << 1) +#define BATTLE_TYPE_IS_MASTER (1 << 2) // In not-link battles, it's always set. +#define BATTLE_TYPE_TRAINER (1 << 3) +#define BATTLE_TYPE_FIRST_BATTLE (1 << 4) +#define BATTLE_TYPE_LINK_IN_BATTLE (1 << 5) // Set on battle entry, cleared on exit. Checked rarely +#define BATTLE_TYPE_MULTI (1 << 6) +#define BATTLE_TYPE_SAFARI (1 << 7) +#define BATTLE_TYPE_BATTLE_TOWER (1 << 8) +#define BATTLE_TYPE_WALLY_TUTORIAL (1 << 9) +#define BATTLE_TYPE_ROAMER (1 << 10) +#define BATTLE_TYPE_EREADER_TRAINER (1 << 11) +#define BATTLE_TYPE_KYOGRE_GROUDON (1 << 12) +#define BATTLE_TYPE_LEGENDARY (1 << 13) +#define BATTLE_TYPE_REGI (1 << 14) +#define BATTLE_TYPE_TWO_OPPONENTS (1 << 15) +#define BATTLE_TYPE_DOME (1 << 16) +#define BATTLE_TYPE_PALACE (1 << 17) +#define BATTLE_TYPE_ARENA (1 << 18) +#define BATTLE_TYPE_FACTORY (1 << 19) +#define BATTLE_TYPE_PIKE (1 << 20) +#define BATTLE_TYPE_PYRAMID (1 << 21) +#define BATTLE_TYPE_INGAME_PARTNER (1 << 22) +#define BATTLE_TYPE_TOWER_LINK_MULTI (1 << 23) +#define BATTLE_TYPE_RECORDED (1 << 24) +#define BATTLE_TYPE_RECORDED_LINK (1 << 25) +#define BATTLE_TYPE_TRAINER_HILL (1 << 26) +#define BATTLE_TYPE_SECRET_BASE (1 << 27) +#define BATTLE_TYPE_GROUDON (1 << 28) +#define BATTLE_TYPE_KYOGRE (1 << 29) +#define BATTLE_TYPE_RAYQUAZA (1 << 30) +#define BATTLE_TYPE_RECORDED_IS_MASTER (1 << 31) #define BATTLE_TYPE_FRONTIER (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_PIKE | BATTLE_TYPE_PYRAMID) #define BATTLE_TYPE_FRONTIER_NO_PYRAMID (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_PIKE) diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index ebc422b18..5f8900bf6 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -346,51 +346,51 @@ #define BG_SOLARBEAM_PLAYER 25 #define BG_SOLARBEAM_CONTESTS 26 -// table ids for general animations -#define B_ANIM_CASTFORM_CHANGE 0x0 -#define B_ANIM_STATS_CHANGE 0x1 -#define B_ANIM_SUBSTITUTE_FADE 0x2 -#define B_ANIM_SUBSTITUTE_APPEAR 0x3 -#define B_ANIM_POKEBLOCK_THROW 0x4 -#define B_ANIM_ITEM_KNOCKOFF 0x5 -#define B_ANIM_TURN_TRAP 0x6 -#define B_ANIM_HELD_ITEM_EFFECT 0x7 -#define B_ANIM_SMOKEBALL_ESCAPE 0x8 -#define B_ANIM_FOCUS_BAND 0x9 -#define B_ANIM_RAIN_CONTINUES 0xA -#define B_ANIM_SUN_CONTINUES 0xB -#define B_ANIM_SANDSTORM_CONTINUES 0xC -#define B_ANIM_HAIL_CONTINUES 0xD -#define B_ANIM_LEECH_SEED_DRAIN 0xE -#define B_ANIM_MON_HIT 0xF -#define B_ANIM_ITEM_STEAL 0x10 -#define B_ANIM_SNATCH_MOVE 0x11 -#define B_ANIM_FUTURE_SIGHT_HIT 0x12 -#define B_ANIM_DOOM_DESIRE_HIT 0x13 -#define B_ANIM_FOCUS_PUNCH_SETUP 0x14 -#define B_ANIM_INGRAIN_HEAL 0x15 -#define B_ANIM_WISH_HEAL 0x16 +// table ids for general animations (gBattleAnims_General) +#define B_ANIM_CASTFORM_CHANGE 0 +#define B_ANIM_STATS_CHANGE 1 +#define B_ANIM_SUBSTITUTE_FADE 2 +#define B_ANIM_SUBSTITUTE_APPEAR 3 +#define B_ANIM_POKEBLOCK_THROW 4 +#define B_ANIM_ITEM_KNOCKOFF 5 +#define B_ANIM_TURN_TRAP 6 +#define B_ANIM_HELD_ITEM_EFFECT 7 +#define B_ANIM_SMOKEBALL_ESCAPE 8 +#define B_ANIM_FOCUS_BAND 9 +#define B_ANIM_RAIN_CONTINUES 10 +#define B_ANIM_SUN_CONTINUES 11 +#define B_ANIM_SANDSTORM_CONTINUES 12 +#define B_ANIM_HAIL_CONTINUES 13 +#define B_ANIM_LEECH_SEED_DRAIN 14 +#define B_ANIM_MON_HIT 15 +#define B_ANIM_ITEM_STEAL 16 +#define B_ANIM_SNATCH_MOVE 17 +#define B_ANIM_FUTURE_SIGHT_HIT 18 +#define B_ANIM_DOOM_DESIRE_HIT 19 +#define B_ANIM_FOCUS_PUNCH_SETUP 20 +#define B_ANIM_INGRAIN_HEAL 21 +#define B_ANIM_WISH_HEAL 22 -// special animations table -#define B_ANIM_LVL_UP 0x0 -#define B_ANIM_SWITCH_OUT_PLAYER_MON 0x1 -#define B_ANIM_SWITCH_OUT_OPPONENT_MON 0x2 -#define B_ANIM_BALL_THROW 0x3 -#define B_ANIM_BALL_THROW_WITH_TRAINER 0x4 -#define B_ANIM_SUBSTITUTE_TO_MON 0x5 -#define B_ANIM_MON_TO_SUBSTITUTE 0x6 +// special animations table (gBattleAnims_Special) +#define B_ANIM_LVL_UP 0 +#define B_ANIM_SWITCH_OUT_PLAYER_MON 1 +#define B_ANIM_SWITCH_OUT_OPPONENT_MON 2 +#define B_ANIM_BALL_THROW 3 +#define B_ANIM_BALL_THROW_WITH_TRAINER 4 +#define B_ANIM_SUBSTITUTE_TO_MON 5 +#define B_ANIM_MON_TO_SUBSTITUTE 6 -// status animation table -#define B_ANIM_STATUS_PSN 0x0 -#define B_ANIM_STATUS_CONFUSION 0x1 -#define B_ANIM_STATUS_BRN 0x2 -#define B_ANIM_STATUS_INFATUATION 0x3 -#define B_ANIM_STATUS_SLP 0x4 -#define B_ANIM_STATUS_PRZ 0x5 -#define B_ANIM_STATUS_FRZ 0x6 -#define B_ANIM_STATUS_CURSED 0x7 -#define B_ANIM_STATUS_NIGHTMARE 0x8 -#define B_ANIM_STATUS_WRAPPED 0x9 // does not actually exist +// status animation table (gBattleAnims_StatusConditions) +#define B_ANIM_STATUS_PSN 0 +#define B_ANIM_STATUS_CONFUSION 1 +#define B_ANIM_STATUS_BRN 2 +#define B_ANIM_STATUS_INFATUATION 3 +#define B_ANIM_STATUS_SLP 4 +#define B_ANIM_STATUS_PRZ 5 +#define B_ANIM_STATUS_FRZ 6 +#define B_ANIM_STATUS_CURSED 7 +#define B_ANIM_STATUS_NIGHTMARE 8 +#define B_ANIM_STATUS_WRAPPED 9 // does not actually exist // Tasks with return values often assign them to gBattleAnimArgs[7]. #define ARG_RET_ID 7 diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 9e0d8e0be..1886043f1 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -124,7 +124,7 @@ #define STRINGID_PKMNSTORINGENERGY 120 #define STRINGID_PKMNUNLEASHEDENERGY 121 #define STRINGID_PKMNFATIGUECONFUSION 122 -#define STRINGID_PKMNPICKEDUPITEM 123 +#define STRINGID_PLAYERPICKEDUPMONEY 123 #define STRINGID_PKMNUNAFFECTED 124 #define STRINGID_PKMNTRANSFORMEDINTO 125 #define STRINGID_PKMNMADESUBSTITUTE 126 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index bac914fec..d4f6e5684 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -232,6 +232,9 @@ #define STATUS_PRIMARY_POKERUS 6 #define STATUS_PRIMARY_FAINTED 7 +#define MAX_PER_STAT_IVS 31 +#define MAX_IV_MASK 31 +#define USE_RANDOM_IVS (MAX_PER_STAT_IVS + 1) #define MAX_PER_STAT_EVS 255 #define MAX_TOTAL_EVS 510 #define EV_ITEM_RAISE_LIMIT 100 diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 722fe4444..aa1a2e0dc 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -36,7 +36,7 @@ void sub_808BCE8(void); void InitPlayerAvatar(s16 a, s16 b, u8 c, u8 d); void sub_808B864(void); void sub_808BCF4(void); -void sub_808D074(u8); +void SetSpinStartFacingDir(u8); void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr); u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8); void SetPlayerAvatarFieldMove(void); @@ -57,10 +57,10 @@ void PlayerWheelieMove(u8 direction); void PlayerPopWheelieWhileMoving(u8 direction); void PlayerUseAcroBikeOnBumpySlope(u8 direction); void PlayerEndWheelieWhileMoving(u8 direction); -void sub_808D194(void); -void sub_808D1C8(void); -bool32 sub_808D1B4(void); -bool32 sub_808D1E8(void); +void DoPlayerSpinEntrance(void); +void DoPlayerSpinExit(void); +bool32 IsPlayerSpinEntranceActive(void); +bool32 IsPlayerSpinExitActive(void); void SetPlayerInvisibility(bool8 invisible); u8 player_get_pos_including_state_based_drift(s16 *x, s16 *y); void StartFishing(u8 rod); diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index 951bf0788..4e4725041 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -18,8 +18,8 @@ void FieldCB_WarpExitFadeFromBlack(void); void FieldCB_WarpExitFadeFromWhite(void); bool8 FieldCB_ReturnToFieldOpenStartMenu(void); void ReturnToFieldOpenStartMenu(void); -void sub_80AF6D4(void); -void sub_80AF6F0(void); +void FieldCB_ReturnToFieldNoScript(void); +void FieldCB_ReturnToFieldNoScriptCheckMusic(void); void DoWarp(void); void DoDiveWarp(void); void DoSootopolisLegendWarp(void); @@ -35,8 +35,8 @@ void DoCableClubWarp(void); void DoContestHallWarp(void); void AnimateFlash(u8 flashLevel); void WriteBattlePyramidViewScanlineEffectBuffer(void); -void sub_80B0244(void); -void sub_80B0268(void); +void DoSpinEnterWarp(void); +void DoSpinExitWarp(void); void DoOrbEffect(void); void FadeOutOrbEffect(void); void sub_80B05B4(void); diff --git a/include/graphics.h b/include/graphics.h index 936f95aa8..d3d01bc57 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4087,8 +4087,8 @@ extern const u32 gConfetti_Gfx[]; extern const u32 gConfetti_Pal[]; extern const u32 gUnknown_08C093F0[]; -extern const u32 gSubstituteDollTilemap[]; -extern const u32 gSubstituteDollGfx[]; +extern const u32 gSubstituteDollBackGfx[]; +extern const u32 gSubstituteDollFrontGfx[]; extern const u32 gSubstituteDollPal[]; extern const u32 gHealthboxSinglesPlayerGfx[]; extern const u32 gHealthboxSinglesOpponentGfx[]; @@ -5014,6 +5014,11 @@ extern const u16 gPokenavMessageBox_Pal[]; extern const u32 gPokenavOptions_Gfx[]; extern const u16 gPokenavOptions_Pal[]; +// Battle Factory Screen +extern const u8 gFrontierFactorySelectMenu_Gfx[]; +extern const u8 gFrontierFactorySelectMenu_Tilemap[]; +extern const u16 gFrontierFactorySelectMenu_Pal[]; + // Object event pals extern const u16 gObjectEventPal_Brendan[]; extern const u16 gObjectEventPal_May[]; diff --git a/include/pokemon.h b/include/pokemon.h index 497e8070b..addf580e9 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -11,6 +11,7 @@ struct PokemonSubstruct0 u32 experience; u8 ppBonuses; u8 friendship; + u16 filler; }; struct PokemonSubstruct1 diff --git a/include/recorded_battle.h b/include/recorded_battle.h index 252b25502..55353a6d1 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -3,7 +3,7 @@ extern u32 gRecordedBattleRngSeed; extern u32 gBattlePalaceMoveSelectionRngValue; -extern u8 gUnknown_0203C7B4; +extern u8 gRecordedBattleMultiplayerId; void sub_8184DA4(u8 arg0); void sub_8184E58(void); diff --git a/include/strings.h b/include/strings.h index 7018f9e0d..294ab8aa6 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2988,4 +2988,31 @@ extern const u8 gText_SavingDontTurnOff2[]; extern const u8 gText_BlenderMaxSpeedRecord[]; extern const u8 gText_234Players[]; +// Battle Factory Screen +extern const u8 gText_RentalPkmn2[]; +extern const u8 gText_SelectFirstPkmn[]; +extern const u8 gText_SelectSecondPkmn[]; +extern const u8 gText_SelectThirdPkmn[]; +extern const u8 gText_TheseThreePkmnOkay[]; +extern const u8 gText_CantSelectSamePkmn[]; +extern const u8 gText_Summary[]; +extern const u8 gText_Rechoose[]; +extern const u8 gText_Deselect[]; +extern const u8 gText_Rent[]; +extern const u8 gText_Others2[]; +extern const u8 gText_Yes2[]; +extern const u8 gText_Yes3[]; +extern const u8 gText_No2[]; +extern const u8 gText_No3[]; +extern const u8 gText_QuitSwapping[]; +extern const u8 gText_AcceptThisPkmn[]; +extern const u8 gText_SelectPkmnToAccept[]; +extern const u8 gText_SelectPkmnToSwap[]; +extern const u8 gText_PkmnSwap[]; +extern const u8 gText_Swap[]; +extern const u8 gText_Summary2[]; +extern const u8 gText_PkmnForSwap[]; +extern const u8 gText_SamePkmnInPartyAlready[]; +extern const u8 gText_Cancel3[]; + #endif // GUARD_STRINGS_H |