battle 4 commands are decompiled
This commit is contained in:
@@ -205,6 +205,7 @@
|
||||
#define WEATHER_SUN_ANY ((WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT))
|
||||
#define WEATHER_HAIL (1 << 7)
|
||||
#define WEATHER_HAIL_ANY ((WEATHER_HAIL))
|
||||
#define WEATHER_ANY ((WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUN_ANY | WEATHER_HAIL_ANY))
|
||||
|
||||
#define BATTLE_TERRAIN_GRASS 0
|
||||
#define BATTLE_TERRAIN_LONG_GRASS 1
|
||||
@@ -216,7 +217,9 @@
|
||||
#define BATTLE_TERRAIN_CAVE 7
|
||||
|
||||
// array entries for battle communication
|
||||
#define MULTIUSE_STATE 0x0
|
||||
#define CURSOR_POSITION 0x1
|
||||
#define TASK_ID 0x1 // task Id and cursor position share the same field
|
||||
#define MOVE_EFFECT_BYTE 0x3
|
||||
#define MULTISTRING_CHOOSER 0x5
|
||||
#define MSG_DISPLAY 0x7
|
||||
@@ -531,6 +534,9 @@ struct BattleResults
|
||||
u8 unk4; // 0x4
|
||||
u8 unk5_0:1; // 0x5
|
||||
u8 unk5_1:1; // 0x5
|
||||
u8 caughtMonBall:4; // 0x5
|
||||
u8 unk5_6:1; // 0x5
|
||||
u8 unk5_7:1; // 0x5
|
||||
u16 poke1Species; // 0x6
|
||||
u8 pokeString1[10]; // 0x8
|
||||
u8 unk12;
|
||||
@@ -542,10 +548,10 @@ struct BattleResults
|
||||
u16 lastUsedMove; // 0x22
|
||||
u16 opponentMove; // 0x24
|
||||
u16 opponentSpecies; // 0x26
|
||||
u16 caughtPoke; // 0x28
|
||||
u8 caughtNick[10]; // 0x2A
|
||||
u16 caughtMonSpecies; // 0x28
|
||||
u8 caughtMonNick[10]; // 0x2A
|
||||
u8 filler34[2];
|
||||
u8 unk36[10]; // usedBalls?
|
||||
u8 catchAttempts[10]; // 0x36
|
||||
};
|
||||
|
||||
extern struct BattleResults gBattleResults;
|
||||
@@ -588,17 +594,7 @@ struct BattleStruct
|
||||
u8 field_5C[4];
|
||||
u8 field_60[4][3];
|
||||
u8 field_6C;
|
||||
u8 field_6D;
|
||||
u8 field_6E;
|
||||
u8 field_6F;
|
||||
u8 field_70;
|
||||
u8 field_71;
|
||||
u8 field_72;
|
||||
u8 field_73;
|
||||
u8 field_74;
|
||||
u8 field_75;
|
||||
u8 field_76;
|
||||
u8 field_77;
|
||||
u8 caughtMonNick[11];
|
||||
u8 field_78;
|
||||
u8 field_79;
|
||||
u8 field_7A;
|
||||
@@ -845,6 +841,7 @@ struct BattleScripting
|
||||
u8 field_1D;
|
||||
u8 atk6C_state;
|
||||
u8 learnMoveState;
|
||||
u8 field_20;
|
||||
};
|
||||
|
||||
extern struct BattleScripting gBattleScripting;
|
||||
@@ -862,6 +859,7 @@ void SwitchInClearStructs(void);
|
||||
void sub_803BDA0(u8 bank);
|
||||
void sub_803FA70(u8 bank);
|
||||
void BattleMainCB2(void);
|
||||
void VBlankCB_Battle(void);
|
||||
void ResetSentPokesToOpponentValue(void);
|
||||
bool8 CanRunFromBattle(u8 bank);
|
||||
bool8 IsRunningFromBattleImpossible(void);
|
||||
@@ -892,8 +890,8 @@ u8 AtkCanceller_UnableToUseMove(void);
|
||||
bool8 sub_80423F4(u8 bank, u8 r1, u8 r2);
|
||||
u8 CastformDataTypeChange(u8 bank);
|
||||
u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg);
|
||||
void b_call_bc_move_exec(const u8* BS_ptr);
|
||||
void b_push_move_exec(const u8* BS_ptr);
|
||||
void BattleScriptExecute(const u8* BS_ptr);
|
||||
void BattleScriptPushCursorAndCallback(const u8* BS_ptr);
|
||||
u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn);
|
||||
void sub_8045868(u8 bank);
|
||||
void sub_80458B4(void);
|
||||
@@ -905,9 +903,12 @@ void AI_CalcDmg(u8 bankAtk, u8 bankDef);
|
||||
u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef);
|
||||
u8 AI_TypeCalc(u16 move, u16 species, u8 ability);
|
||||
u8 BankGetTurnOrder(u8 bank);
|
||||
void SetMoveEffect(bool8 primary, u8 certain);
|
||||
void BattleDestroyCursorAt(u8 cursorPosition);
|
||||
void BattleCreateCursorAt(u8 cursorPosition);
|
||||
void BufferMoveToLearnIntoBattleTextBuff2(void);
|
||||
void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags);
|
||||
bool8 UproarWakeUpCheck(u8 bank);
|
||||
|
||||
// battle_5
|
||||
void AdjustFriendshipOnBattleFaint(u8 bank);
|
||||
|
||||
@@ -43,6 +43,7 @@ void EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit);
|
||||
void EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, const u8* arg4);
|
||||
void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, u8 arg2);
|
||||
void EmitTrainerSlide(u8 bufferId);
|
||||
void EmitTrainerSlideBack(u8 bufferId);
|
||||
void EmitFaintingCry(u8 bufferId);
|
||||
void Emit_x37(u8 bufferId, u8 arg1);
|
||||
void EmitHitAnimation(u8 bufferId);
|
||||
@@ -51,12 +52,22 @@ void EmitCmd49(u8 bufferId);
|
||||
void EmitStatusAnimation(u8 bufferId, bool8 status2, u32 status);
|
||||
void EmitCmd13(u8 bufferId);
|
||||
void EmitStatusIconUpdate(u8 bufferId, u32 status1, u32 status2);
|
||||
void EmitResetActionMoveSelection(u8 bufferId, u8 caseId);
|
||||
|
||||
#define RESET_ACTION_MOVE_SELECTION 0
|
||||
#define RESET_ACTION_SELECTION 1
|
||||
#define RESET_MOVE_SELECTION 2
|
||||
|
||||
void EmitResetActionMoveSelection(u8 bufferId, u8 caseId);
|
||||
|
||||
#define BALL_NO_SHAKES 0
|
||||
#define BALL_1_SHAKE 1
|
||||
#define BALL_2_SHAKES 2
|
||||
#define BALL_3_SHAKES_FAIL 3
|
||||
#define BALL_3_SHAKES_SUCCESS 4
|
||||
#define BALL_TRAINER_BLOCK 5
|
||||
|
||||
void EmitBallThrow(u8 bufferId, u8 caseId);
|
||||
|
||||
void MarkBufferBankForExecution(u8 bank);
|
||||
|
||||
#endif // GUARD_BATTLE_CONTROLLERS_H
|
||||
|
||||
@@ -211,4 +211,6 @@ extern u8 gBattleTextBuff2[];
|
||||
extern u8 gBattleTextBuff3[];
|
||||
extern u8 gDisplayedStringBattle[];
|
||||
|
||||
extern const u8* const gRefereeStringsTable[];
|
||||
|
||||
#endif // GUARD_BATTLE_MESSAGE_H
|
||||
|
||||
12
include/naming_screen.h
Normal file
12
include/naming_screen.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef GUARD_NAMING_SCREEN_H
|
||||
#define GUARD_NAMING_SCREEN_H
|
||||
|
||||
#define NAMING_SCREEN_PLAYER 0
|
||||
#define NAMING_SCREEN_BOX 1
|
||||
#define NAMING_SCREEN_CAUGHT_MON 2
|
||||
#define NAMING_SCREEN_3 3
|
||||
#define NAMING_SCREEN_WANDA 4
|
||||
|
||||
void DoNamingScreen(u8 caseId, u8* dst, u16 monSpecies, u8 monGender, u32 monPersonality, void (*callback)(void));
|
||||
|
||||
#endif // GUARD_NAMING_SCREEN_H
|
||||
@@ -6,6 +6,7 @@ const u8 *GetPokemonCategory(u16);
|
||||
u16 GetPokedexHeightWeight(u16 dexNum, u8 data);
|
||||
u16 GetNationalPokedexCount(u8);
|
||||
u16 GetHoennPokedexCount(u8);
|
||||
u8 CreateDexDisplayMonDataTask(u16 dexNum, u32 trainerId, u32 personality);
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
6
include/pokemon_storage_system.h
Normal file
6
include/pokemon_storage_system.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_POKEMON_STORAGE_SYSTEM_H
|
||||
#define GUARD_POKEMON_STORAGE_SYSTEM_H
|
||||
|
||||
u8* GetBoxNamePtr(u8 boxNumber);
|
||||
|
||||
#endif // GUARD_POKEMON_STORAGE_SYSTEM_H
|
||||
Reference in New Issue
Block a user