From db58d5e24a89d9c411231a74ce01daed7a303d67 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 2 Oct 2017 23:32:39 +0200 Subject: battle2 3500 C lines --- include/battle_controllers.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/battle_controllers.h') diff --git a/include/battle_controllers.h b/include/battle_controllers.h index b2846d7cf..61e8bec29 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -47,11 +47,15 @@ void EmitTrainerSlideBack(u8 bufferId); void EmitFaintingCry(u8 bufferId); void Emit_x37(u8 bufferId, u8 arg1); void EmitHitAnimation(u8 bufferId); -void EmitCmd48(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2); +void EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2); 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 EmitIntroSlide(u8 bufferId, u8 terrainId); +void EmitDrawTrainerPic(u8 bufferId); +void EmitLoadMonSprite(u8 bufferId); +void EmitIntroTrainerBallThrow(u8 bufferId); #define RESET_ACTION_MOVE_SELECTION 0 #define RESET_ACTION_SELECTION 1 -- cgit v1.2.3 From 46fe1f441f1f40633b538c9db7d24aa4439629cf Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 3 Oct 2017 21:35:27 +0200 Subject: giant battle handler is done wohohohhohoho --- include/battle_controllers.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'include/battle_controllers.h') diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 61e8bec29..9a7f947fa 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -14,6 +14,16 @@ struct MovePpInfo u8 ppBonuses; }; +struct ChooseMoveStruct +{ + u16 moves[4]; + u8 ppNumbers[4]; + u8 ppWithBonusNumbers[4]; + u16 species; + u8 monType1; + u8 monType2; +}; + #define REQUEST_ALL_BATTLE 0x0 #define REQUEST_SPECIES_BATTLE 0x1 #define REQUEST_HELDITEM_BATTLE 0x2 @@ -40,8 +50,8 @@ void EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible); void EmitReturnPokeToBall(u8 bufferId, u8 arg1); void EmitGetMonData(u8 bufferId, u8 arg1, u8 arg2); 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 EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, u8* arg4); +void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, bool32 arg2); void EmitTrainerSlide(u8 bufferId); void EmitTrainerSlideBack(u8 bufferId); void EmitFaintingCry(u8 bufferId); @@ -56,6 +66,10 @@ void EmitIntroSlide(u8 bufferId, u8 terrainId); void EmitDrawTrainerPic(u8 bufferId); void EmitLoadMonSprite(u8 bufferId); void EmitIntroTrainerBallThrow(u8 bufferId); +void EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2); +void EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct* movePpData); +void EmitOpenBag(u8 bufferId, u8* arg1); +void Emit_x32(u8 bufferId); #define RESET_ACTION_MOVE_SELECTION 0 #define RESET_ACTION_SELECTION 1 -- cgit v1.2.3 From 3cc20c7c3f9c3b6a3c0fc8b47c0128c067f34a4a Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 6 Oct 2017 17:06:45 +0200 Subject: battle 2 is done --- include/battle_controllers.h | 49 +++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 26 deletions(-) (limited to 'include/battle_controllers.h') diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 9a7f947fa..2281fdaff 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -1,6 +1,28 @@ #ifndef GUARD_BATTLE_CONTROLLERS_H #define GUARD_BATTLE_CONTROLLERS_H +#define REQUEST_ALL_BATTLE 0x0 +#define REQUEST_SPECIES_BATTLE 0x1 +#define REQUEST_HELDITEM_BATTLE 0x2 +#define REQUEST_MOVES_PP_BATTLE 0x3 +#define REQUEST_PPMOVE1_BATTLE 0x9 +#define REQUEST_PPMOVE2_BATTLE 0xA +#define REQUEST_PPMOVE3_BATTLE 0xB +#define REQUEST_PPMOVE4_BATTLE 0xC +#define REQUEST_STATUS_BATTLE 0x28 +#define REQUEST_HP_BATTLE 0x2A + +#define RESET_ACTION_MOVE_SELECTION 0 +#define RESET_ACTION_SELECTION 1 +#define RESET_MOVE_SELECTION 2 + +#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 + struct HpAndStatus { u16 hp; @@ -24,17 +46,6 @@ struct ChooseMoveStruct u8 monType2; }; -#define REQUEST_ALL_BATTLE 0x0 -#define REQUEST_SPECIES_BATTLE 0x1 -#define REQUEST_HELDITEM_BATTLE 0x2 -#define REQUEST_MOVES_PP_BATTLE 0x3 -#define REQUEST_PPMOVE1_BATTLE 0x9 -#define REQUEST_PPMOVE2_BATTLE 0xA -#define REQUEST_PPMOVE3_BATTLE 0xB -#define REQUEST_PPMOVE4_BATTLE 0xC -#define REQUEST_STATUS_BATTLE 0x28 -#define REQUEST_HP_BATTLE 0x2A - // rom3.s, emitters void EmitSetMonData(u8 bufferId, u8 request, u8 c, u8 bytes, void *data); void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct* disableStructPtr, u8 multihit); @@ -70,22 +81,8 @@ void EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2); void EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct* movePpData); void EmitOpenBag(u8 bufferId, u8* arg1); void Emit_x32(u8 bufferId); - -#define RESET_ACTION_MOVE_SELECTION 0 -#define RESET_ACTION_SELECTION 1 -#define RESET_MOVE_SELECTION 2 - +void EmitPrintString(u8 bufferId, u16 stringId); 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 -- cgit v1.2.3