start working on battle controllers, especially player
This commit is contained in:
@@ -2257,7 +2257,7 @@ static void sub_803939C(void)
|
||||
sub_8056A3C(0x18, 8, 0x1D, 0xD, 0);
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
break;
|
||||
@@ -2267,9 +2267,9 @@ static void sub_803939C(void)
|
||||
if (gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
@@ -2277,9 +2277,9 @@ static void sub_803939C(void)
|
||||
if (gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & A_BUTTON)
|
||||
|
||||
143
src/battle_controller_linkopponent.c
Normal file
143
src/battle_controller_linkopponent.c
Normal file
@@ -0,0 +1,143 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "battle_controllers.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle_interface.h"
|
||||
#include "battle_anim.h"
|
||||
#include "link.h"
|
||||
|
||||
extern u8 gActiveBank;
|
||||
extern bool8 gDoingBattleAnim;
|
||||
extern u8 gUnknown_020244CC;
|
||||
extern void (*gBattleBankFunc[BATTLE_BANKS_COUNT])(void);
|
||||
|
||||
// this file's functions
|
||||
void LinkOpponentHandleGetMonData(void);
|
||||
void LinkOpponentHandleGetRawMonData(void);
|
||||
void LinkOpponentHandleSetMonData(void);
|
||||
void LinkOpponentHandleSetRawMonData(void);
|
||||
void LinkOpponentHandleLoadMonSprite(void);
|
||||
void LinkOpponentHandleSwitchInAnim(void);
|
||||
void LinkOpponentHandleReturnMonToBall(void);
|
||||
void LinkOpponentHandleDrawTrainerPic(void);
|
||||
void LinkOpponentHandleTrainerSlide(void);
|
||||
void LinkOpponentHandleTrainerSlideBack(void);
|
||||
void LinkOpponentHandleFaintAnimation(void);
|
||||
void LinkOpponentHandleCmd11(void);
|
||||
void LinkOpponentHandleCmd12(void);
|
||||
void LinkOpponentHandleBallThrow(void);
|
||||
void LinkOpponentHandlePause(void);
|
||||
void LinkOpponentHandleMoveAnimation(void);
|
||||
void LinkOpponentHandlePrintString(void);
|
||||
void LinkOpponentHandlePrintStringPlayerOnly(void);
|
||||
void LinkOpponentHandleChooseAction(void);
|
||||
void LinkOpponentHandleCmd19(void);
|
||||
void LinkOpponentHandleChooseMove(void);
|
||||
void LinkOpponentHandleOpenBag(void);
|
||||
void LinkOpponentHandleChoosePokemon(void);
|
||||
void LinkOpponentHandleCmd23(void);
|
||||
void LinkOpponentHandleHealthBarUpdate(void);
|
||||
void LinkOpponentHandleExpUpdate(void);
|
||||
void LinkOpponentHandleStatusIconUpdate(void);
|
||||
void LinkOpponentHandleStatusAnimation(void);
|
||||
void LinkOpponentHandleStatusXor(void);
|
||||
void LinkOpponentHandleDataTransfer(void);
|
||||
void LinkOpponentHandleDMA3Transfer(void);
|
||||
void LinkOpponentHandlePlayBGM(void);
|
||||
void LinkOpponentHandleCmd32(void);
|
||||
void LinkOpponentHandleCmd33(void);
|
||||
void LinkOpponentHandleCmd34(void);
|
||||
void LinkOpponentHandleCmd35(void);
|
||||
void LinkOpponentHandleCmd36(void);
|
||||
void LinkOpponentHandleCmd37(void);
|
||||
void LinkOpponentHandleCmd38(void);
|
||||
void LinkOpponentHandleCmd39(void);
|
||||
void LinkOpponentHandleCmd40(void);
|
||||
void LinkOpponentHandleHitAnimation(void);
|
||||
void LinkOpponentHandleCmd42(void);
|
||||
void LinkOpponentHandleEffectivenessSound(void);
|
||||
void LinkOpponentHandlePlayFanfareOrBGM(void);
|
||||
void LinkOpponentHandleFaintingCry(void);
|
||||
void LinkOpponentHandleIntroSlide(void);
|
||||
void LinkOpponentHandleIntroTrainerBallThrow(void);
|
||||
void LinkOpponentHandleDrawPartyStatusSummary(void);
|
||||
void LinkOpponentHandleCmd49(void);
|
||||
void LinkOpponentHandleCmd50(void);
|
||||
void LinkOpponentHandleSpriteInvisibility(void);
|
||||
void LinkOpponentHandleBattleAnimation(void);
|
||||
void LinkOpponentHandleLinkStandbyMsg(void);
|
||||
void LinkOpponentHandleResetActionMoveSelection(void);
|
||||
void LinkOpponentHandleCmd55(void);
|
||||
void nullsub_92(void);
|
||||
|
||||
void LinkOpponentBufferRunCommand(void);
|
||||
|
||||
void (*const gLinkOpponentBufferCommands[CONTOLLER_CMDS_CONT])(void) =
|
||||
{
|
||||
LinkOpponentHandleGetMonData,
|
||||
LinkOpponentHandleGetRawMonData,
|
||||
LinkOpponentHandleSetMonData,
|
||||
LinkOpponentHandleSetRawMonData,
|
||||
LinkOpponentHandleLoadMonSprite,
|
||||
LinkOpponentHandleSwitchInAnim,
|
||||
LinkOpponentHandleReturnMonToBall,
|
||||
LinkOpponentHandleDrawTrainerPic,
|
||||
LinkOpponentHandleTrainerSlide,
|
||||
LinkOpponentHandleTrainerSlideBack,
|
||||
LinkOpponentHandleFaintAnimation,
|
||||
LinkOpponentHandleCmd11,
|
||||
LinkOpponentHandleCmd12,
|
||||
LinkOpponentHandleBallThrow,
|
||||
LinkOpponentHandlePause,
|
||||
LinkOpponentHandleMoveAnimation,
|
||||
LinkOpponentHandlePrintString,
|
||||
LinkOpponentHandlePrintStringPlayerOnly,
|
||||
LinkOpponentHandleChooseAction,
|
||||
LinkOpponentHandleCmd19,
|
||||
LinkOpponentHandleChooseMove,
|
||||
LinkOpponentHandleOpenBag,
|
||||
LinkOpponentHandleChoosePokemon,
|
||||
LinkOpponentHandleCmd23,
|
||||
LinkOpponentHandleHealthBarUpdate,
|
||||
LinkOpponentHandleExpUpdate,
|
||||
LinkOpponentHandleStatusIconUpdate,
|
||||
LinkOpponentHandleStatusAnimation,
|
||||
LinkOpponentHandleStatusXor,
|
||||
LinkOpponentHandleDataTransfer,
|
||||
LinkOpponentHandleDMA3Transfer,
|
||||
LinkOpponentHandlePlayBGM,
|
||||
LinkOpponentHandleCmd32,
|
||||
LinkOpponentHandleCmd33,
|
||||
LinkOpponentHandleCmd34,
|
||||
LinkOpponentHandleCmd35,
|
||||
LinkOpponentHandleCmd36,
|
||||
LinkOpponentHandleCmd37,
|
||||
LinkOpponentHandleCmd38,
|
||||
LinkOpponentHandleCmd39,
|
||||
LinkOpponentHandleCmd40,
|
||||
LinkOpponentHandleHitAnimation,
|
||||
LinkOpponentHandleCmd42,
|
||||
LinkOpponentHandleEffectivenessSound,
|
||||
LinkOpponentHandlePlayFanfareOrBGM,
|
||||
LinkOpponentHandleFaintingCry,
|
||||
LinkOpponentHandleIntroSlide,
|
||||
LinkOpponentHandleIntroTrainerBallThrow,
|
||||
LinkOpponentHandleDrawPartyStatusSummary,
|
||||
LinkOpponentHandleCmd49,
|
||||
LinkOpponentHandleCmd50,
|
||||
LinkOpponentHandleSpriteInvisibility,
|
||||
LinkOpponentHandleBattleAnimation,
|
||||
LinkOpponentHandleLinkStandbyMsg,
|
||||
LinkOpponentHandleResetActionMoveSelection,
|
||||
LinkOpponentHandleCmd55,
|
||||
nullsub_92
|
||||
};
|
||||
|
||||
void nullsub_28(void)
|
||||
{
|
||||
}
|
||||
|
||||
void SetBankFuncToLinkOpponentBufferRunCommand(void)
|
||||
{
|
||||
gBattleBankFunc[gActiveBank] = LinkOpponentBufferRunCommand;
|
||||
}
|
||||
146
src/battle_controller_opponent.c
Normal file
146
src/battle_controller_opponent.c
Normal file
@@ -0,0 +1,146 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "battle_controllers.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle_interface.h"
|
||||
#include "battle_anim.h"
|
||||
#include "link.h"
|
||||
|
||||
extern u8 gActiveBank;
|
||||
extern bool8 gDoingBattleAnim;
|
||||
extern u8 gUnknown_020244CC;
|
||||
extern void (*gBattleBankFunc[BATTLE_BANKS_COUNT])(void);
|
||||
|
||||
// this file's functions
|
||||
void OpponentHandleGetMonData(void);
|
||||
void OpponentHandleGetRawMonData(void);
|
||||
void OpponentHandleSetMonData(void);
|
||||
void OpponentHandleSetRawMonData(void);
|
||||
void OpponentHandleLoadMonSprite(void);
|
||||
void OpponentHandleSwitchInAnim(void);
|
||||
void OpponentHandleReturnMonToBall(void);
|
||||
void OpponentHandleDrawTrainerPic(void);
|
||||
void OpponentHandleTrainerSlide(void);
|
||||
void OpponentHandleTrainerSlideBack(void);
|
||||
void OpponentHandleFaintAnimation(void);
|
||||
void OpponentHandleCmd11(void);
|
||||
void OpponentHandleCmd12(void);
|
||||
void OpponentHandleBallThrow(void);
|
||||
void OpponentHandlePause(void);
|
||||
void OpponentHandleMoveAnimation(void);
|
||||
void OpponentHandlePrintString(void);
|
||||
void OpponentHandlePrintStringPlayerOnly(void);
|
||||
void OpponentHandleChooseAction(void);
|
||||
void OpponentHandleCmd19(void);
|
||||
void OpponentHandleChooseMove(void);
|
||||
void OpponentHandleOpenBag(void);
|
||||
void OpponentHandleChoosePokemon(void);
|
||||
void OpponentHandleCmd23(void);
|
||||
void OpponentHandleHealthBarUpdate(void);
|
||||
void OpponentHandleExpUpdate(void);
|
||||
void OpponentHandleStatusIconUpdate(void);
|
||||
void OpponentHandleStatusAnimation(void);
|
||||
void OpponentHandleStatusXor(void);
|
||||
void OpponentHandleDataTransfer(void);
|
||||
void OpponentHandleDMA3Transfer(void);
|
||||
void OpponentHandlePlayBGM(void);
|
||||
void OpponentHandleCmd32(void);
|
||||
void OpponentHandleCmd33(void);
|
||||
void OpponentHandleCmd34(void);
|
||||
void OpponentHandleCmd35(void);
|
||||
void OpponentHandleCmd36(void);
|
||||
void OpponentHandleCmd37(void);
|
||||
void OpponentHandleCmd38(void);
|
||||
void OpponentHandleCmd39(void);
|
||||
void OpponentHandleCmd40(void);
|
||||
void OpponentHandleHitAnimation(void);
|
||||
void OpponentHandleCmd42(void);
|
||||
void OpponentHandleEffectivenessSound(void);
|
||||
void OpponentHandlePlayFanfareOrBGM(void);
|
||||
void OpponentHandleFaintingCry(void);
|
||||
void OpponentHandleIntroSlide(void);
|
||||
void OpponentHandleIntroTrainerBallThrow(void);
|
||||
void OpponentHandleDrawPartyStatusSummary(void);
|
||||
void OpponentHandleCmd49(void);
|
||||
void OpponentHandleCmd50(void);
|
||||
void OpponentHandleSpriteInvisibility(void);
|
||||
void OpponentHandleBattleAnimation(void);
|
||||
void OpponentHandleLinkStandbyMsg(void);
|
||||
void OpponentHandleResetActionMoveSelection(void);
|
||||
void OpponentHandleCmd55(void);
|
||||
void nullsub_91(void);
|
||||
|
||||
void OpponentBufferRunCommand(void);
|
||||
|
||||
void (*const gOpponentBufferCommands[CONTOLLER_CMDS_CONT])(void) =
|
||||
{
|
||||
OpponentHandleGetMonData,
|
||||
OpponentHandleGetRawMonData,
|
||||
OpponentHandleSetMonData,
|
||||
OpponentHandleSetRawMonData,
|
||||
OpponentHandleLoadMonSprite,
|
||||
OpponentHandleSwitchInAnim,
|
||||
OpponentHandleReturnMonToBall,
|
||||
OpponentHandleDrawTrainerPic,
|
||||
OpponentHandleTrainerSlide,
|
||||
OpponentHandleTrainerSlideBack,
|
||||
OpponentHandleFaintAnimation,
|
||||
OpponentHandleCmd11,
|
||||
OpponentHandleCmd12,
|
||||
OpponentHandleBallThrow,
|
||||
OpponentHandlePause,
|
||||
OpponentHandleMoveAnimation,
|
||||
OpponentHandlePrintString,
|
||||
OpponentHandlePrintStringPlayerOnly,
|
||||
OpponentHandleChooseAction,
|
||||
OpponentHandleCmd19,
|
||||
OpponentHandleChooseMove,
|
||||
OpponentHandleOpenBag,
|
||||
OpponentHandleChoosePokemon,
|
||||
OpponentHandleCmd23,
|
||||
OpponentHandleHealthBarUpdate,
|
||||
OpponentHandleExpUpdate,
|
||||
OpponentHandleStatusIconUpdate,
|
||||
OpponentHandleStatusAnimation,
|
||||
OpponentHandleStatusXor,
|
||||
OpponentHandleDataTransfer,
|
||||
OpponentHandleDMA3Transfer,
|
||||
OpponentHandlePlayBGM,
|
||||
OpponentHandleCmd32,
|
||||
OpponentHandleCmd33,
|
||||
OpponentHandleCmd34,
|
||||
OpponentHandleCmd35,
|
||||
OpponentHandleCmd36,
|
||||
OpponentHandleCmd37,
|
||||
OpponentHandleCmd38,
|
||||
OpponentHandleCmd39,
|
||||
OpponentHandleCmd40,
|
||||
OpponentHandleHitAnimation,
|
||||
OpponentHandleCmd42,
|
||||
OpponentHandleEffectivenessSound,
|
||||
OpponentHandlePlayFanfareOrBGM,
|
||||
OpponentHandleFaintingCry,
|
||||
OpponentHandleIntroSlide,
|
||||
OpponentHandleIntroTrainerBallThrow,
|
||||
OpponentHandleDrawPartyStatusSummary,
|
||||
OpponentHandleCmd49,
|
||||
OpponentHandleCmd50,
|
||||
OpponentHandleSpriteInvisibility,
|
||||
OpponentHandleBattleAnimation,
|
||||
OpponentHandleLinkStandbyMsg,
|
||||
OpponentHandleResetActionMoveSelection,
|
||||
OpponentHandleCmd55,
|
||||
nullsub_91
|
||||
};
|
||||
|
||||
// unknown unused data
|
||||
static const u8 gUnknown_0831C7AC[] = {0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20};
|
||||
|
||||
void nullsub_26(void)
|
||||
{
|
||||
}
|
||||
|
||||
void SetBankFuncToOpponentBufferRunCommand(void)
|
||||
{
|
||||
gBattleBankFunc[gActiveBank] = OpponentBufferRunCommand;
|
||||
}
|
||||
1600
src/battle_controller_player.c
Normal file
1600
src/battle_controller_player.c
Normal file
File diff suppressed because it is too large
Load Diff
147
src/battle_controller_wally.c
Normal file
147
src/battle_controller_wally.c
Normal file
@@ -0,0 +1,147 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "battle_controllers.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle_interface.h"
|
||||
#include "battle_anim.h"
|
||||
#include "link.h"
|
||||
|
||||
extern u8 gActiveBank;
|
||||
extern bool8 gDoingBattleAnim;
|
||||
extern u8 gUnknown_020244CC;
|
||||
extern void (*gBattleBankFunc[BATTLE_BANKS_COUNT])(void);
|
||||
|
||||
// this file's functions
|
||||
void WallyHandleGetMonData(void);
|
||||
void WallyHandleGetRawMonData(void);
|
||||
void WallyHandleSetMonData(void);
|
||||
void WallyHandleSetRawMonData(void);
|
||||
void WallyHandleLoadMonSprite(void);
|
||||
void WallyHandleSwitchInAnim(void);
|
||||
void WallyHandleReturnMonToBall(void);
|
||||
void WallyHandleDrawTrainerPic(void);
|
||||
void WallyHandleTrainerSlide(void);
|
||||
void WallyHandleTrainerSlideBack(void);
|
||||
void WallyHandleFaintAnimation(void);
|
||||
void WallyHandleCmd11(void);
|
||||
void WallyHandleCmd12(void);
|
||||
void WallyHandleBallThrow(void);
|
||||
void WallyHandlePause(void);
|
||||
void WallyHandleMoveAnimation(void);
|
||||
void WallyHandlePrintString(void);
|
||||
void WallyHandlePrintStringPlayerOnly(void);
|
||||
void WallyHandleChooseAction(void);
|
||||
void WallyHandleCmd19(void);
|
||||
void WallyHandleChooseMove(void);
|
||||
void WallyHandleOpenBag(void);
|
||||
void WallyHandleChoosePokemon(void);
|
||||
void WallyHandleCmd23(void);
|
||||
void WallyHandleHealthBarUpdate(void);
|
||||
void WallyHandleExpUpdate(void);
|
||||
void WallyHandleStatusIconUpdate(void);
|
||||
void WallyHandleStatusAnimation(void);
|
||||
void WallyHandleStatusXor(void);
|
||||
void WallyHandleDataTransfer(void);
|
||||
void WallyHandleDMA3Transfer(void);
|
||||
void WallyHandlePlayBGM(void);
|
||||
void WallyHandleCmd32(void);
|
||||
void WallyHandleCmd33(void);
|
||||
void WallyHandleCmd34(void);
|
||||
void WallyHandleCmd35(void);
|
||||
void WallyHandleCmd36(void);
|
||||
void WallyHandleCmd37(void);
|
||||
void WallyHandleCmd38(void);
|
||||
void WallyHandleCmd39(void);
|
||||
void WallyHandleCmd40(void);
|
||||
void WallyHandleHitAnimation(void);
|
||||
void WallyHandleCmd42(void);
|
||||
void WallyHandleEffectivenessSound(void);
|
||||
void WallyHandlePlayFanfareOrBGM(void);
|
||||
void WallyHandleFaintingCry(void);
|
||||
void WallyHandleIntroSlide(void);
|
||||
void WallyHandleIntroTrainerBallThrow(void);
|
||||
void WallyHandleDrawPartyStatusSummary(void);
|
||||
void WallyHandleCmd49(void);
|
||||
void WallyHandleCmd50(void);
|
||||
void WallyHandleSpriteInvisibility(void);
|
||||
void WallyHandleBattleAnimation(void);
|
||||
void WallyHandleLinkStandbyMsg(void);
|
||||
void WallyHandleResetActionMoveSelection(void);
|
||||
void WallyHandleCmd55(void);
|
||||
void nullsub_118(void);
|
||||
|
||||
void WallyBufferRunCommand(void);
|
||||
|
||||
void (*const gWallyBufferCommands[CONTOLLER_CMDS_CONT])(void) =
|
||||
{
|
||||
WallyHandleGetMonData,
|
||||
WallyHandleGetRawMonData,
|
||||
WallyHandleSetMonData,
|
||||
WallyHandleSetRawMonData,
|
||||
WallyHandleLoadMonSprite,
|
||||
WallyHandleSwitchInAnim,
|
||||
WallyHandleReturnMonToBall,
|
||||
WallyHandleDrawTrainerPic,
|
||||
WallyHandleTrainerSlide,
|
||||
WallyHandleTrainerSlideBack,
|
||||
WallyHandleFaintAnimation,
|
||||
WallyHandleCmd11,
|
||||
WallyHandleCmd12,
|
||||
WallyHandleBallThrow,
|
||||
WallyHandlePause,
|
||||
WallyHandleMoveAnimation,
|
||||
WallyHandlePrintString,
|
||||
WallyHandlePrintStringPlayerOnly,
|
||||
WallyHandleChooseAction,
|
||||
WallyHandleCmd19,
|
||||
WallyHandleChooseMove,
|
||||
WallyHandleOpenBag,
|
||||
WallyHandleChoosePokemon,
|
||||
WallyHandleCmd23,
|
||||
WallyHandleHealthBarUpdate,
|
||||
WallyHandleExpUpdate,
|
||||
WallyHandleStatusIconUpdate,
|
||||
WallyHandleStatusAnimation,
|
||||
WallyHandleStatusXor,
|
||||
WallyHandleDataTransfer,
|
||||
WallyHandleDMA3Transfer,
|
||||
WallyHandlePlayBGM,
|
||||
WallyHandleCmd32,
|
||||
WallyHandleCmd33,
|
||||
WallyHandleCmd34,
|
||||
WallyHandleCmd35,
|
||||
WallyHandleCmd36,
|
||||
WallyHandleCmd37,
|
||||
WallyHandleCmd38,
|
||||
WallyHandleCmd39,
|
||||
WallyHandleCmd40,
|
||||
WallyHandleHitAnimation,
|
||||
WallyHandleCmd42,
|
||||
WallyHandleEffectivenessSound,
|
||||
WallyHandlePlayFanfareOrBGM,
|
||||
WallyHandleFaintingCry,
|
||||
WallyHandleIntroSlide,
|
||||
WallyHandleIntroTrainerBallThrow,
|
||||
WallyHandleDrawPartyStatusSummary,
|
||||
WallyHandleCmd49,
|
||||
WallyHandleCmd50,
|
||||
WallyHandleSpriteInvisibility,
|
||||
WallyHandleBattleAnimation,
|
||||
WallyHandleLinkStandbyMsg,
|
||||
WallyHandleResetActionMoveSelection,
|
||||
WallyHandleCmd55,
|
||||
nullsub_118
|
||||
};
|
||||
|
||||
void nullsub_117(void)
|
||||
{
|
||||
}
|
||||
|
||||
void SetBankFuncToWallyBufferRunCommand(void)
|
||||
{
|
||||
gBattleBankFunc[gActiveBank] = WallyBufferRunCommand;
|
||||
gBattleStruct->field_94 = 0;
|
||||
gBattleStruct->field_95 = 0;
|
||||
gBattleStruct->field_96 = 0;
|
||||
gBattleStruct->field_97 = 0;
|
||||
}
|
||||
@@ -27,12 +27,6 @@ enum
|
||||
EXP_BAR
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
HP_CURRENT,
|
||||
HP_MAX
|
||||
};
|
||||
|
||||
struct TestingBar
|
||||
{
|
||||
s32 maxValue;
|
||||
|
||||
@@ -6118,22 +6118,22 @@ static void atk5A_yesnoboxlearnmove(void)
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleScripting.learnMoveState++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
@@ -6235,22 +6235,22 @@ static void atk5B_yesnoboxstoplearningmove(void)
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleScripting.learnMoveState++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
@@ -6531,22 +6531,22 @@ static void atk67_yesnobox(void)
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleCommunication[0]++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
@@ -11286,7 +11286,7 @@ void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags)
|
||||
}
|
||||
}
|
||||
|
||||
void BattleCreateCursorAt(u8 cursorPosition)
|
||||
void BattleCreateYesNoCursorAt(u8 cursorPosition)
|
||||
{
|
||||
u16 src[2];
|
||||
src[0] = 1;
|
||||
@@ -11296,7 +11296,7 @@ void BattleCreateCursorAt(u8 cursorPosition)
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
}
|
||||
|
||||
void BattleDestroyCursorAt(u8 cursorPosition)
|
||||
void BattleDestroyYesNoCursorAt(u8 cursorPosition)
|
||||
{
|
||||
u16 src[2];
|
||||
src[0] = 0x1016;
|
||||
@@ -11315,22 +11315,22 @@ static void atkF3_nickname_caught_poke(void)
|
||||
sub_814F9EC(gText_BattleYesNoChoice, 0xC);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateCursorAt(0);
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateCursorAt(1);
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
|
||||
@@ -84,7 +84,7 @@ bool8 ShouldGetStatBadgeBoost(u16 badgeFlag, u8 bank)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u8 sub_8069F34(u8 bank)
|
||||
u8 GetDefaultMoveTarget(u8 bank)
|
||||
{
|
||||
u8 status = GetBankIdentity(bank) & 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user