Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync
@ -1 +1 @@
|
||||
gUnknown_030062E8
|
||||
gFactorySelect_CurrentOptionFunc
|
||||
|
@ -1,6 +1,7 @@
|
||||
.equiv ID_NUMBER, 0x68736d53
|
||||
|
||||
.equiv PCM_DMA_BUF_SIZE, 1584
|
||||
.equiv MAX_DIRECTSOUND_CHANNELS, 12
|
||||
|
||||
.equiv C_V, 0x40
|
||||
|
||||
@ -93,7 +94,7 @@
|
||||
struct_field o_SoundInfo_plynote, 4
|
||||
struct_field o_SoundInfo_ExtVolPit, 4
|
||||
struct_field o_SoundInfo_gap2, 16
|
||||
struct_field o_SoundInfo_chans, 768
|
||||
struct_field o_SoundInfo_chans, MAX_DIRECTSOUND_CHANNELS * 64
|
||||
struct_field o_SoundInfo_pcmBuffer, PCM_DMA_BUF_SIZE * 2
|
||||
struct_field SoundInfo_size, 0
|
||||
|
||||
|
@ -788,16 +788,16 @@ AI_IsOppositeGender:
|
||||
get_ability AI_TARGET
|
||||
if_equal ABILITY_OBLIVIOUS, Score_Minus10
|
||||
get_gender AI_USER
|
||||
if_equal 0, AI_IsOppositeGenderFemale
|
||||
if_equal 254, AI_IsOppositeGenderMale
|
||||
if_equal MON_MALE, AI_IsOppositeGenderFemale
|
||||
if_equal MON_FEMALE, AI_IsOppositeGenderMale
|
||||
goto Score_Minus10
|
||||
AI_IsOppositeGenderFemale: @ 82DC61A
|
||||
get_gender AI_TARGET
|
||||
if_equal 254, AI_CBM_Attract_End
|
||||
if_equal MON_FEMALE, AI_CBM_Attract_End
|
||||
goto Score_Minus10
|
||||
AI_IsOppositeGenderMale: @ 82DC627
|
||||
get_gender AI_TARGET
|
||||
if_equal 0, AI_CBM_Attract_End
|
||||
if_equal MON_MALE, AI_CBM_Attract_End
|
||||
goto Score_Minus10
|
||||
end
|
||||
|
||||
|
@ -4992,7 +4992,7 @@ BattleScript_FaintedMonTryChooseAnother:
|
||||
switchhandleorder BS_FAINTED, 0x2
|
||||
jumpifnotbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonChooseAnother
|
||||
jumpifbattletype BATTLE_TYPE_LINK, BattleScript_FaintedMonChooseAnother
|
||||
jumpifbattletype BATTLE_TYPE_x2000000, BattleScript_FaintedMonChooseAnother
|
||||
jumpifbattletype BATTLE_TYPE_RECORDED_LINK, BattleScript_FaintedMonChooseAnother
|
||||
jumpifbattletype BATTLE_TYPE_FRONTIER, BattleScript_FaintedMonChooseAnother
|
||||
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonChooseAnother
|
||||
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_x400000, BattleScript_FaintedMonChooseAnother
|
||||
@ -5119,7 +5119,7 @@ BattleScript_LocalBattleLostPrintTrainersWinText::
|
||||
trainerslidein BS_ATTACKER
|
||||
waitstate
|
||||
printstring STRINGID_TRAINER1WINTEXT
|
||||
jumpifbattletype BATTLE_TYPE_x800000, BattleScript_LocalBattleLostDoTrainer2WinText
|
||||
jumpifbattletype BATTLE_TYPE_TOWER_LINK_MULTI, BattleScript_LocalBattleLostDoTrainer2WinText
|
||||
jumpifnotbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_LocalBattleLostEnd_
|
||||
BattleScript_LocalBattleLostDoTrainer2WinText::
|
||||
trainerslideout B_POSITION_OPPONENT_LEFT
|
||||
@ -6437,7 +6437,7 @@ BattleScript_MoveUsedIsConfusedNoMore::
|
||||
return
|
||||
|
||||
BattleScript_PrintPayDayMoneyString::
|
||||
printstring STRINGID_PKMNPICKEDUPITEM
|
||||
printstring STRINGID_PLAYERPICKEDUPMONEY
|
||||
waitmessage 0x40
|
||||
return
|
||||
|
||||
|
@ -168,7 +168,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SwapMons:: @ 8259DF2
|
||||
fadescreen FADE_TO_BLACK
|
||||
factory_swapmons
|
||||
waitstate
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, TRUE @ Did player keep current pokemon
|
||||
goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom
|
||||
factory_setswapped
|
||||
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT
|
||||
|
@ -3,5 +3,5 @@ CaveOfOrigin_1F_MapScripts:: @ 8235768
|
||||
.byte 0
|
||||
|
||||
CaveOfOrigin_1F_OnTransition: @ 823576E
|
||||
call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_SetTempVars
|
||||
call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_DisableTriggers
|
||||
end
|
||||
|
@ -3,5 +3,5 @@ CaveOfOrigin_UnusedRubySapphireMap1_MapScripts:: @ 8235778
|
||||
.byte 0
|
||||
|
||||
CaveOfOrigin_UnusedRubySapphireMap1_OnTransition: @ 823577E
|
||||
call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_SetTempVars
|
||||
call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_DisableTriggers
|
||||
end
|
||||
|
@ -3,6 +3,6 @@ CaveOfOrigin_UnusedRubySapphireMap2_MapScripts:: @ 8235788
|
||||
.byte 0
|
||||
|
||||
CaveOfOrigin_UnusedRubySapphireMap2_OnTransition: @ 823578E
|
||||
call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_SetTempVars
|
||||
call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_DisableTriggers
|
||||
end
|
||||
|
||||
|
@ -3,6 +3,6 @@ CaveOfOrigin_UnusedRubySapphireMap3_MapScripts:: @ 8235798
|
||||
.byte 0
|
||||
|
||||
CaveOfOrigin_UnusedRubySapphireMap3_OnTransition: @ 823579E
|
||||
call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_SetTempVars
|
||||
call_if_set FLAG_UNUSED_RS_LEGENDARY_BATTLE_DONE, CaveOfOrigin_EventScript_DisableTriggers
|
||||
end
|
||||
|
||||
|
@ -209,7 +209,7 @@ gScriptCmdTable:: @ 81DB67C
|
||||
.4byte ScrCmd_checkmonobedience @ 0xce
|
||||
.4byte ScrCmd_gotoram @ 0xcf
|
||||
.4byte ScrCmd_nop1 @ 0xd0
|
||||
.4byte ScrCmd_warpD1 @ 0xd1
|
||||
.4byte ScrCmd_warpspinenter @ 0xd1
|
||||
.4byte ScrCmd_setmonmetlocation @ 0xd2
|
||||
.4byte ScrCmd_moverotatingtileobjects @ 0xd3
|
||||
.4byte ScrCmd_turnrotatingtileobjects @ 0xd4
|
||||
|
@ -36,7 +36,7 @@ CaveOfOrigin_EventScript_Shake:: @ 82722A7
|
||||
releaseall
|
||||
end
|
||||
|
||||
CaveOfOrigin_EventScript_SetTempVars:: @ 82722C1
|
||||
CaveOfOrigin_EventScript_DisableTriggers:: @ 82722C1
|
||||
setvar VAR_TEMP_1, 1
|
||||
setvar VAR_TEMP_2, 1
|
||||
setvar VAR_TEMP_3, 1
|
||||
|
@ -65,7 +65,7 @@ EventScript_PkmnCenterNurse_ReturnPkmn:: @ 82719E2
|
||||
goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn2
|
||||
message gText_RestoredPkmnToFullHealth
|
||||
waitmessage
|
||||
applymovement VAR_0x800B, EventScript_PkmnCenterNurse_Bow
|
||||
applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow
|
||||
waitmovement 0
|
||||
message gText_WeHopeToSeeYouAgain
|
||||
return
|
||||
@ -73,7 +73,7 @@ EventScript_PkmnCenterNurse_ReturnPkmn:: @ 82719E2
|
||||
EventScript_PkmnCenterNurse_ReturnPkmn2:: @ 8271A03
|
||||
message gText_ThankYouForWaiting
|
||||
waitmessage
|
||||
applymovement VAR_0x800B, EventScript_PkmnCenterNurse_Bow
|
||||
applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow
|
||||
waitmovement 0
|
||||
message gText_WeHopeToSeeYouAgain2
|
||||
return
|
||||
@ -84,7 +84,7 @@ EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom:: @ 8271A19
|
||||
setflag FLAG_NURSE_UNION_ROOM_REMINDER
|
||||
message CableClub_Text_PlayerIsWaiting
|
||||
waitmessage
|
||||
applymovement VAR_0x800B, EventScript_PkmnCenterNurse_Bow
|
||||
applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow
|
||||
waitmovement 0
|
||||
message gText_WeHopeToSeeYouAgain
|
||||
return
|
||||
@ -129,7 +129,7 @@ EventScript_PkmnCenterNurse_GoldCardHealPkmn:: @ 8271AC5
|
||||
goto EventScript_PkmnCenterNurse_HealPkmn
|
||||
end
|
||||
|
||||
EventScript_PkmnCenterNurse_Bow: @ 8271AD0
|
||||
Movement_PkmnCenterNurse_Bow: @ 8271AD0
|
||||
nurse_joy_bow
|
||||
delay_4
|
||||
step_end
|
||||
|
@ -6,16 +6,15 @@ EventScript_MixRecordsPrompt:: @ 8271D5E
|
||||
compare VAR_RESULT, YES
|
||||
goto_if_eq EventScript_MixRecords
|
||||
compare VAR_RESULT, NO
|
||||
goto_if_eq EventScript_DeclineMixRecords
|
||||
goto EventScript_DeclineMixRecords
|
||||
goto_if_eq EventScript_EndMixRecords
|
||||
goto EventScript_EndMixRecords
|
||||
|
||||
EventScript_MixRecords:: @ 8271D83
|
||||
special RecordMixingPlayerSpotTriggered
|
||||
waitstate
|
||||
lock
|
||||
faceplayer
|
||||
|
||||
EventScript_DeclineMixRecords:: @ 8271D89
|
||||
EventScript_EndMixRecords:: @ 8271D89
|
||||
message Text_WeHopeToSeeYouAgain
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
# Bugs and Glitches
|
||||
|
||||
These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. Defining the `BUGFIX` preprocessor variable will fix some of these automatically.
|
||||
These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. Defining the `BUGFIX` and `UBFIX` preprocessor variables will fix some of these automatically. `UBFIX` will already be defined for MODERN builds.
|
||||
|
||||
Fixes are written in the `diff` format. If you've used Git before, this should look familiar:
|
||||
|
||||
@ -13,55 +13,9 @@ Fixes are written in the `diff` format. If you've used Git before, this should l
|
||||
|
||||
## Contents
|
||||
|
||||
- [RNG does not get seeded](#rng-does-not-get-seeded)
|
||||
- [Scrolling through items in the bag causes the image to flicker](#scrolling-through-items-in-the-bag-causes-the-image-to-flicker)
|
||||
|
||||
|
||||
## RNG does not get seeded
|
||||
|
||||
**Fix:** Add the following function to [src/main.c](https://github.com/pret/pokeemerald/blob/master/src/main.c):
|
||||
```diff
|
||||
+static void SeedRngWithRtc(void)
|
||||
+{
|
||||
+ u32 seed = RtcGetMinuteCount();
|
||||
+ seed = (seed >> 16) ^ (seed & 0xFFFF);
|
||||
+ SeedRng(seed);
|
||||
+}
|
||||
```
|
||||
|
||||
And edit `AgbMain`:
|
||||
|
||||
```diff
|
||||
...
|
||||
RtcInit();
|
||||
CheckForFlashMemory();
|
||||
InitMainCallbacks();
|
||||
InitMapMusic();
|
||||
+ SeedRngWithRtc();
|
||||
ClearDma3Requests();
|
||||
...
|
||||
```
|
||||
|
||||
This restores the code of Ruby/Sapphire.
|
||||
|
||||
**Alternate Fix:** Edit the following function in [src/title_screen.c](https://github.com/pret/pokeemerald/blob/master/src/title_screen.c):
|
||||
|
||||
```diff
|
||||
void CB2_InitTitleScreen(void)
|
||||
{
|
||||
switch (gMain.state)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
SetVBlankCallback(NULL);
|
||||
+ StartTimer1();
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
...
|
||||
```
|
||||
This matches what FRLG does and obtains the seed differently than RS, independently of the RTC.
|
||||
|
||||
## Scrolling through items in the bag causes the image to flicker
|
||||
|
||||
**Fix:** Add the following function to [src/item_menu_icons.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu_icons.c):
|
||||
@ -89,27 +43,9 @@ Then edit `BagMenu_MoveCursorCallback` in [src/item_menu.c](https://github.com/p
|
||||
```diff
|
||||
...
|
||||
{
|
||||
- RemoveBagItemIconSprite(1 ^ gBagMenu->unk81B_1);
|
||||
+ HideBagItemIconSprite(gBagMenu->unk81B_1 ^ 1);
|
||||
+ RemoveBagItemIconSprite(gBagMenu->unk81B_1);
|
||||
if (a != -2)
|
||||
- RemoveBagItemIconSprite(1 ^ gBagMenu->itemIconSlot);
|
||||
+ HideBagItemIconSprite(gBagMenu->itemIconSlot ^ 1);
|
||||
+ RemoveBagItemIconSprite(gBagMenu->itemIconSlot);
|
||||
if (itemIndex != LIST_CANCEL)
|
||||
...
|
||||
```
|
||||
|
||||
## Pokémon that have an affine transform as part of their entry animation glitch when going in and out of Poké Balls without a screen transition in between
|
||||
|
||||
**Fix:** Edit `sub_817F77C` in [src/pokemon_animation.c](https://github.com/pret/pokeemerald/blob/master/src/pokemon_animation.c#L1028):
|
||||
|
||||
```diff
|
||||
...
|
||||
-#ifdef BUGFIX
|
||||
else
|
||||
{
|
||||
// FIX: Reset these back to normal after they were changed so Poké Ball catch/release
|
||||
// animations without a screen transition in between don't break
|
||||
sprite->affineAnimPaused = FALSE;
|
||||
sprite->affineAnims = gUnknown_082FF694;
|
||||
}
|
||||
-#endif // BUGFIX
|
||||
}
|
||||
```
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
static void *sHeapStart;
|
||||
static u32 sHeapSize;
|
||||
static u32 malloc_c_unused_0300000c; // needed to align dma3_manager.o(.bss)
|
||||
static u32 sFiller; // needed to align dma3_manager.o(.bss)
|
||||
|
||||
#define MALLOC_SYSTEM_ID 0xA3A3
|
||||
|
||||
|
@ -1320,6 +1320,11 @@ void ApplyAffineAnimFrameRelativeAndUpdateMatrix(u8 matrixNum, struct AffineAnim
|
||||
s16 ConvertScaleParam(s16 scale)
|
||||
{
|
||||
s32 val = 0x10000;
|
||||
// UB: possible division by zero
|
||||
#ifdef UBFIX
|
||||
if (scale == 0)
|
||||
return 0;
|
||||
#endif //UBFIX
|
||||
return val / scale;
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,6 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
|
||||
{
|
||||
int i;
|
||||
u16 j;
|
||||
u8 *ptr;
|
||||
|
||||
if (!gFonts)
|
||||
return FALSE;
|
||||
@ -1235,7 +1234,6 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
bool8 isJapanese;
|
||||
int minGlyphWidth;
|
||||
u32 (*func)(u16 glyphId, bool32 isJapanese);
|
||||
s32 result;
|
||||
int localLetterSpacing;
|
||||
u32 lineWidth;
|
||||
const u8 *bufferPointer;
|
||||
|
BIN
graphics/battle_anims/sprites/substitute_back.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
graphics/battle_frontier/factory_screen/action_box_left.png
Normal file
After Width: | Height: | Size: 156 B |
BIN
graphics/battle_frontier/factory_screen/action_box_right.png
Normal file
After Width: | Height: | Size: 134 B |
After Width: | Height: | Size: 165 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 139 B |
BIN
graphics/battle_frontier/factory_screen/arrow.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
graphics/battle_frontier/factory_screen/menu_highlight_left.png
Normal file
After Width: | Height: | Size: 135 B |
BIN
graphics/battle_frontier/factory_screen/menu_highlight_right.png
Normal file
After Width: | Height: | Size: 132 B |
BIN
graphics/battle_frontier/factory_screen/mon_pic_bg.png
Normal file
After Width: | Height: | Size: 138 B |
BIN
graphics/battle_frontier/factory_screen/mon_pic_bg_anim.png
Normal file
After Width: | Height: | Size: 158 B |
BIN
graphics/battle_frontier/factory_screen/pokeball.png
Normal file
After Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 75 B |
Before Width: | Height: | Size: 72 B |
Before Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 77 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 98 B |
Before Width: | Height: | Size: 78 B |
@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
||||
213 255 238
|
@ -86,8 +86,8 @@ enum
|
||||
|
||||
struct UnusedControllerStruct
|
||||
{
|
||||
u8 field_0:7;
|
||||
u8 flag_x80:1;
|
||||
u8 unk:7;
|
||||
u8 flag:1;
|
||||
};
|
||||
|
||||
struct HpAndStatus
|
||||
@ -148,19 +148,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,
|
||||
@ -179,7 +179,7 @@ enum
|
||||
CONTROLLER_CMDS_COUNT
|
||||
};
|
||||
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
extern struct UnusedControllerStruct gUnusedControllerStruct;
|
||||
|
||||
// general functions
|
||||
void HandleLinkBattleSetup(void);
|
||||
@ -226,10 +226,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);
|
||||
|
@ -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)
|
||||
|
||||
|
@ -493,62 +493,62 @@
|
||||
#define BG_DYNAMAX_CANNON 76
|
||||
#define BG_AURA_SPHERE 77
|
||||
|
||||
// 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_HANGED_ON 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
|
||||
#define B_ANIM_MEGA_EVOLUTION 0x17
|
||||
#define B_ANIM_TERRAIN_MISTY 0x18
|
||||
#define B_ANIM_TERRAIN_GRASSY 0x19
|
||||
#define B_ANIM_TERRAIN_ELECTRIC 0x1A
|
||||
#define B_ANIM_TERRAIN_PSYCHIC 0x1B
|
||||
#define B_ANIM_ILLUSION_OFF 0x1C
|
||||
#define B_ANIM_FORM_CHANGE 0x1D
|
||||
#define B_ANIM_SLIDE_OFFSCREEN 0x1E // for Emergency Exit
|
||||
#define B_ANIM_RESTORE_BG 0x1F // for Terrain Endings
|
||||
#define B_ANIM_TOTEM_FLARE 0x20 // Totem boosts aura flare
|
||||
// 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_HANGED_ON 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
|
||||
#define B_ANIM_MEGA_EVOLUTION 23
|
||||
#define B_ANIM_TERRAIN_MISTY 24
|
||||
#define B_ANIM_TERRAIN_GRASSY 25
|
||||
#define B_ANIM_TERRAIN_ELECTRIC 26
|
||||
#define B_ANIM_TERRAIN_PSYCHIC 27
|
||||
#define B_ANIM_ILLUSION_OFF 28
|
||||
#define B_ANIM_FORM_CHANGE 29
|
||||
#define B_ANIM_SLIDE_OFFSCREEN 30 // for Emergency Exit
|
||||
#define B_ANIM_RESTORE_BG 31 // for Terrain Endings
|
||||
#define B_ANIM_TOTEM_FLARE 32 // Totem boosts aura flare
|
||||
|
||||
// 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
|
||||
#define B_ANIM_CRITICAL_CAPTURE_THROW 0x7
|
||||
// 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
|
||||
#define B_ANIM_CRITICAL_CAPTURE_THROW 7
|
||||
|
||||
// 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
|
||||
|
@ -352,4 +352,6 @@
|
||||
#define EFFECT_ALLY_SWITCH 346
|
||||
#define EFFECT_SLEEP_HIT 347 // Relic Song
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 348
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -123,7 +123,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
|
||||
|
@ -17,7 +17,11 @@
|
||||
#define ITEM_LUXURY_BALL 11
|
||||
#define ITEM_PREMIER_BALL 12
|
||||
|
||||
#define LAST_BALL ITEM_PREMIER_BALL
|
||||
// Note: If moving ball IDs around, updating FIRST_BALL/LAST_BALL is not sufficient
|
||||
// Several places expect the ball IDs to be first and contiguous (e.g. gBattlescriptsForBallThrow and MON_DATA_POKEBALL)
|
||||
// If adding new balls, it's easiest to insert them after the last ball and increment the below IDs (and removing ITEM_034 for example)
|
||||
#define FIRST_BALL ITEM_MASTER_BALL
|
||||
#define LAST_BALL ITEM_PREMIER_BALL
|
||||
|
||||
// Pokemon Items
|
||||
#define ITEM_POTION 13
|
||||
@ -145,6 +149,8 @@
|
||||
#define ITEM_FAB_MAIL 131
|
||||
#define ITEM_RETRO_MAIL 132
|
||||
|
||||
#define FIRST_MAIL_INDEX ITEM_ORANGE_MAIL
|
||||
|
||||
// Berries
|
||||
#define ITEM_CHERI_BERRY 133
|
||||
#define ITEM_CHESTO_BERRY 134
|
||||
@ -189,6 +195,10 @@
|
||||
#define ITEM_LANSAT_BERRY 173
|
||||
#define ITEM_STARF_BERRY 174
|
||||
#define ITEM_ENIGMA_BERRY 175
|
||||
|
||||
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
|
||||
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
|
||||
|
||||
#define ITEM_0B0 176
|
||||
#define ITEM_0B1 177
|
||||
#define ITEM_0B2 178
|
||||
@ -467,9 +477,6 @@
|
||||
#define ITEMS_COUNT 377
|
||||
#define ITEM_FIELD_ARROW ITEMS_COUNT
|
||||
|
||||
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
|
||||
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
|
||||
|
||||
// Range of berries given out by various NPCS
|
||||
#define FIRST_BERRY_MASTER_BERRY ITEM_POMEG_BERRY
|
||||
#define LAST_BERRY_MASTER_BERRY ITEM_NOMEL_BERRY
|
||||
@ -506,6 +513,21 @@
|
||||
#define GOOD_ROD 1
|
||||
#define SUPER_ROD 2
|
||||
|
||||
// Secondary IDs for bikes
|
||||
#define MACH_BIKE 0
|
||||
#define ACRO_BIKE 1
|
||||
|
||||
// Item type IDs (used to determine the exit callback)
|
||||
#define ITEM_USE_MAIL 0
|
||||
#define ITEM_USE_PARTY_MENU 1
|
||||
#define ITEM_USE_FIELD 2
|
||||
#define ITEM_USE_PBLOCK_CASE 3
|
||||
#define ITEM_USE_BAG_MENU 4 // No exit callback, stays in bag menu
|
||||
|
||||
// Item battle usage IDs (only checked to see if nonzero)
|
||||
#define ITEM_B_USE_MEDICINE 1
|
||||
#define ITEM_B_USE_OTHER 2
|
||||
|
||||
// Check if the item is one that can be used on a Pokemon.
|
||||
#define ITEM_HAS_EFFECT(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2)
|
||||
|
||||
|
@ -233,6 +233,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
|
||||
|
@ -5,18 +5,21 @@
|
||||
#define GET_G(color) (((color) >> 5) & 0x1F)
|
||||
#define GET_B(color) (((color) >> 10) & 0x1F)
|
||||
|
||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||
#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r))
|
||||
#define _RGB(r, g, b) ((((b) & 0x1F) << 10) + (((g) & 0x1F) << 5) + ((r) & 0x1F))
|
||||
|
||||
#define RGB_BLACK RGB(0, 0, 0)
|
||||
#define RGB_WHITE RGB(31, 31, 31)
|
||||
#define RGB_RED RGB(31, 0, 0)
|
||||
#define RGB_GREEN RGB(0, 31, 0)
|
||||
#define RGB_BLUE RGB(0, 0, 31)
|
||||
#define RGB_YELLOW RGB(31, 31, 0)
|
||||
#define RGB_MAGENTA RGB(31, 0, 31)
|
||||
#define RGB_CYAN RGB(0, 31, 31)
|
||||
#define RGB_WHITEALPHA (RGB_WHITE | 0x8000)
|
||||
#define RGB_ALPHA (1 << 15)
|
||||
#define IS_ALPHA(color) ((color) & RGB_ALPHA)
|
||||
|
||||
#define RGB_BLACK RGB(0, 0, 0)
|
||||
#define RGB_WHITE RGB(31, 31, 31)
|
||||
#define RGB_RED RGB(31, 0, 0)
|
||||
#define RGB_GREEN RGB(0, 31, 0)
|
||||
#define RGB_BLUE RGB(0, 0, 31)
|
||||
#define RGB_YELLOW RGB(31, 31, 0)
|
||||
#define RGB_MAGENTA RGB(31, 0, 31)
|
||||
#define RGB_CYAN RGB(0, 31, 31)
|
||||
#define RGB_WHITEALPHA (RGB_WHITE | RGB_ALPHA)
|
||||
|
||||
#endif // GUARD_RGB_H
|
||||
|
@ -16,14 +16,22 @@ enum SpinnerRunnerFollowPatterns
|
||||
RUNFOLLOW_SOUTH_EAST_WEST
|
||||
};
|
||||
|
||||
enum ReflectionTypes
|
||||
{
|
||||
REFL_TYPE_NONE,
|
||||
REFL_TYPE_ICE,
|
||||
REFL_TYPE_WATER,
|
||||
NUM_REFLECTION_TYPES
|
||||
};
|
||||
|
||||
#define FIGURE_8_LENGTH 72
|
||||
|
||||
#define GROUND_EFFECT_FLAG_TALL_GRASS_ON_SPAWN (1 << 0)
|
||||
#define GROUND_EFFECT_FLAG_TALL_GRASS_ON_MOVE (1 << 1)
|
||||
#define GROUND_EFFECT_FLAG_LONG_GRASS_ON_SPAWN (1 << 2)
|
||||
#define GROUND_EFFECT_FLAG_LONG_GRASS_ON_MOVE (1 << 3)
|
||||
#define GROUND_EFFECT_FLAG_ICE_REFLECTION (1 << 4)
|
||||
#define GROUND_EFFECT_FLAG_REFLECTION (1 << 5)
|
||||
#define GROUND_EFFECT_FLAG_WATER_REFLECTION (1 << 4)
|
||||
#define GROUND_EFFECT_FLAG_ICE_REFLECTION (1 << 5)
|
||||
#define GROUND_EFFECT_FLAG_SHALLOW_FLOWING_WATER (1 << 6)
|
||||
#define GROUND_EFFECT_FLAG_SAND (1 << 7)
|
||||
#define GROUND_EFFECT_FLAG_DEEP_SAND (1 << 8)
|
||||
@ -414,10 +422,10 @@ u8 MovementType_RunInPlace_Step0(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_Invisible_Step0(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_Invisible_Step1(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_Invisible_Step2(struct ObjectEvent *, struct Sprite *);
|
||||
void SetObjectEventSpriteInvisibility(u8 var, bool32 var2);
|
||||
bool32 IsObjectEventSpriteInvisible(u8 var);
|
||||
void SetObjectEventSpriteGraphics(u8 var1, u8 graphicsId);
|
||||
void SetObjectEventSpriteAnim(u8 var1, u8 var2);
|
||||
bool32 IsObjectEventSpriteAnimating(u8 var);
|
||||
void SetObjectEventSpriteInvisibility(u8 objectEventId, bool32 invisible);
|
||||
bool32 IsObjectEventSpriteInvisible(u8 objectEventId);
|
||||
void SetObjectEventSpriteGraphics(u8 objectEventId, u8 graphicsId);
|
||||
void SetObjectEventSpriteAnim(u8 objectEventId, u8 animNum);
|
||||
bool32 IsObjectEventSpriteAnimating(u8 objectEventId);
|
||||
|
||||
#endif //GUARD_EVENT_OBJECT_MOVEMENT_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);
|
||||
|
@ -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);
|
||||
|
@ -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[];
|
||||
@ -5343,6 +5343,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[];
|
||||
|
@ -13,6 +13,7 @@ struct PokemonSubstruct0
|
||||
u32 experience;
|
||||
u8 ppBonuses;
|
||||
u8 friendship;
|
||||
u16 filler;
|
||||
};
|
||||
|
||||
struct PokemonSubstruct1
|
||||
@ -244,6 +245,15 @@ struct Evolution
|
||||
u16 targetSpecies;
|
||||
};
|
||||
|
||||
#define NUM_UNOWN_FORMS 28
|
||||
|
||||
#define GET_UNOWN_LETTER(personality) (( \
|
||||
(((personality) & 0x03000000) >> 18) \
|
||||
| (((personality) & 0x00030000) >> 12) \
|
||||
| (((personality) & 0x00000300) >> 6) \
|
||||
| (((personality) & 0x00000003) >> 0) \
|
||||
) % NUM_UNOWN_FORMS)
|
||||
|
||||
extern u8 gPlayerPartyCount;
|
||||
extern struct Pokemon gPlayerParty[PARTY_SIZE];
|
||||
extern u8 gEnemyPartyCount;
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -8,7 +8,7 @@ extern u8 *const gTVStringVarPtrs[3];
|
||||
|
||||
void ClearTVShowData(void);
|
||||
void sub_80EE184(void);
|
||||
void sub_80EE35C(u16 foeSpecies, u16 species, u8 moveIdx, const u16 *movePtr, u16 betterMove);
|
||||
void TryPutBattleSeminarOnAir(u16 foeSpecies, u16 species, u8 moveIdx, const u16 *movePtr, u16 betterMove);
|
||||
void TryPutFrontierTVShowOnAir(u16 winStreak, u8 facility);
|
||||
void DoTVShow(void);
|
||||
void DoTVShowInSearchOfTrainers(void);
|
||||
|
@ -25,8 +25,8 @@ const struct BardSound *GetWordSounds(u16 word)
|
||||
{
|
||||
return gBardSound_InvalidWord;
|
||||
}
|
||||
category = word >> 9;
|
||||
subword = word & 0x1ff;
|
||||
category = EC_GROUP(word);
|
||||
subword = EC_INDEX(word);
|
||||
switch (category)
|
||||
{
|
||||
case EC_GROUP_POKEMON:
|
||||
|
@ -342,7 +342,7 @@ void BattleAI_SetupItems(void)
|
||||
if ((gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_SAFARI | BATTLE_TYPE_BATTLE_TOWER
|
||||
| BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_SECRET_BASE | BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_INGAME_PARTNER | BATTLE_TYPE_x2000000)
|
||||
| BATTLE_TYPE_INGAME_PARTNER | BATTLE_TYPE_RECORDED_LINK)
|
||||
)
|
||||
)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ void GetAIPartyIndexes(u32 battlerId, s32 *firstId, s32 *lastId)
|
||||
{
|
||||
*firstId = 0, *lastId = 6;
|
||||
}
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_INGAME_PARTNER | BATTLE_TYPE_x800000))
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_INGAME_PARTNER | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if ((battlerId & BIT_FLANK) == B_FLANK_LEFT)
|
||||
*firstId = 0, *lastId = 3;
|
||||
|
@ -4998,7 +4998,6 @@ static void AnimTask_OdorSleuthMovementWaitFinish(u8 taskId)
|
||||
|
||||
static void MoveOdorSleuthClone(struct Sprite *sprite)
|
||||
{
|
||||
int zero = 0;
|
||||
if (++sprite->data[1] > 1)
|
||||
{
|
||||
sprite->data[1] = 0;
|
||||
|
@ -704,7 +704,6 @@ static void sub_810E520(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
data->unk0_0d = 0;
|
||||
data->unk2;
|
||||
}
|
||||
data->unk0_1 = 0;
|
||||
break;
|
||||
|
@ -16,13 +16,6 @@
|
||||
#include "util.h"
|
||||
#include "constants/battle_anim.h"
|
||||
|
||||
#define GET_UNOWN_LETTER(personality) (( \
|
||||
(((personality & 0x03000000) >> 24) << 6) \
|
||||
| (((personality & 0x00030000) >> 16) << 4) \
|
||||
| (((personality & 0x00000300) >> 8) << 2) \
|
||||
| (((personality & 0x00000003) >> 0) << 0) \
|
||||
) % 28)
|
||||
|
||||
#define IS_DOUBLE_BATTLE() ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
||||
|
||||
extern const struct OamData gOamData_AffineNormal_ObjNormal_64x64;
|
||||
|
@ -649,8 +649,6 @@ static void AnimTask_BlendColorCycleExcludeLoop(u8 taskId)
|
||||
// See AnimTask_BlendColorCycle. Same, but selects palette by ANIM_TAG_*
|
||||
void AnimTask_BlendColorCycleByTag(u8 taskId)
|
||||
{
|
||||
u8 paletteIndex;
|
||||
|
||||
gTasks[taskId].tPalTag = gBattleAnimArgs[0];
|
||||
gTasks[taskId].tDelay = gBattleAnimArgs[1];
|
||||
gTasks[taskId].tNumBlends = gBattleAnimArgs[2];
|
||||
|
@ -1568,8 +1568,6 @@ static void SpriteCB_Ball_Block_Step(struct Sprite *sprite)
|
||||
|
||||
static void LoadBallParticleGfx(u8 ballId)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
if (GetSpriteTileStartByTag(sBallParticleSpriteSheets[ballId].tag) == 0xFFFF)
|
||||
{
|
||||
LoadCompressedSpriteSheetUsingHeap(&sBallParticleSpriteSheets[ballId]);
|
||||
|
@ -1074,8 +1074,6 @@ static void AnimTask_CreateSurfWave_Step1(u8 taskId)
|
||||
u16 rgbBuffer;
|
||||
u16 *BGptrX = &gBattle_BG1_X;
|
||||
u16 *BGptrY = &gBattle_BG1_Y;
|
||||
u32 palOffset;
|
||||
u16 palNum;
|
||||
|
||||
*BGptrX += gTasks[taskId].data[0];
|
||||
*BGptrY += gTasks[taskId].data[1];
|
||||
|
@ -761,7 +761,7 @@ void LoadBattleMenuWindowGfx(void)
|
||||
|
||||
void DrawMainBattleBackground(void)
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
@ -1146,7 +1146,7 @@ void DrawBattleEntryBackground(void)
|
||||
gBattle_BG2_Y = 0xFF5C;
|
||||
LoadCompressedSpriteSheetUsingHeap(&sVsLettersSpriteSheet);
|
||||
}
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_EREADER_TRAINER))
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_EREADER_TRAINER))
|
||||
{
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) || gPartnerTrainerId == TRAINER_STEVEN_PARTNER || gPartnerTrainerId >= TRAINER_CUSTOM_PARTNER)
|
||||
{
|
||||
@ -1227,7 +1227,7 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
LoadCompressedPalette(gBattleTextboxPalette, 0, 0x40);
|
||||
break;
|
||||
case 3:
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_EREADER_TRAINER))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_EREADER_TRAINER))
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
}
|
||||
@ -1286,7 +1286,7 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_EREADER_TRAINER))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_EREADER_TRAINER))
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
}
|
||||
@ -1348,7 +1348,7 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_EREADER_TRAINER))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_EREADER_TRAINER))
|
||||
{
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60);
|
||||
}
|
||||
|
@ -69,10 +69,10 @@ static void LinkOpponentHandleTwoReturnValues(void);
|
||||
static void LinkOpponentHandleChosenMonReturnValue(void);
|
||||
static void LinkOpponentHandleOneReturnValue(void);
|
||||
static void LinkOpponentHandleOneReturnValue_Duplicate(void);
|
||||
static void LinkOpponentHandleCmd37(void);
|
||||
static void LinkOpponentHandleCmd38(void);
|
||||
static void LinkOpponentHandleCmd39(void);
|
||||
static void LinkOpponentHandleCmd40(void);
|
||||
static void LinkOpponentHandleClearUnkVar(void);
|
||||
static void LinkOpponentHandleSetUnkVar(void);
|
||||
static void LinkOpponentHandleClearUnkFlag(void);
|
||||
static void LinkOpponentHandleToggleUnkFlag(void);
|
||||
static void LinkOpponentHandleHitAnimation(void);
|
||||
static void LinkOpponentHandleCmd42(void);
|
||||
static void LinkOpponentHandlePlaySE(void);
|
||||
@ -105,64 +105,64 @@ static void sub_806782C(void);
|
||||
|
||||
static void (*const sLinkOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
LinkOpponentHandleGetMonData,
|
||||
LinkOpponentHandleGetRawMonData,
|
||||
LinkOpponentHandleSetMonData,
|
||||
LinkOpponentHandleSetRawMonData,
|
||||
LinkOpponentHandleLoadMonSprite,
|
||||
LinkOpponentHandleSwitchInAnim,
|
||||
LinkOpponentHandleReturnMonToBall,
|
||||
LinkOpponentHandleDrawTrainerPic,
|
||||
LinkOpponentHandleTrainerSlide,
|
||||
LinkOpponentHandleTrainerSlideBack,
|
||||
LinkOpponentHandleFaintAnimation,
|
||||
LinkOpponentHandlePaletteFade,
|
||||
LinkOpponentHandleSuccessBallThrowAnim,
|
||||
LinkOpponentHandleBallThrowAnim,
|
||||
LinkOpponentHandlePause,
|
||||
LinkOpponentHandleMoveAnimation,
|
||||
LinkOpponentHandlePrintString,
|
||||
LinkOpponentHandlePrintSelectionString,
|
||||
LinkOpponentHandleChooseAction,
|
||||
LinkOpponentHandleUnknownYesNoBox,
|
||||
LinkOpponentHandleChooseMove,
|
||||
LinkOpponentHandleChooseItem,
|
||||
LinkOpponentHandleChoosePokemon,
|
||||
LinkOpponentHandleCmd23,
|
||||
LinkOpponentHandleHealthBarUpdate,
|
||||
LinkOpponentHandleExpUpdate,
|
||||
LinkOpponentHandleStatusIconUpdate,
|
||||
LinkOpponentHandleStatusAnimation,
|
||||
LinkOpponentHandleStatusXor,
|
||||
LinkOpponentHandleDataTransfer,
|
||||
LinkOpponentHandleDMA3Transfer,
|
||||
LinkOpponentHandlePlayBGM,
|
||||
LinkOpponentHandleCmd32,
|
||||
LinkOpponentHandleTwoReturnValues,
|
||||
LinkOpponentHandleChosenMonReturnValue,
|
||||
LinkOpponentHandleOneReturnValue,
|
||||
LinkOpponentHandleOneReturnValue_Duplicate,
|
||||
LinkOpponentHandleCmd37,
|
||||
LinkOpponentHandleCmd38,
|
||||
LinkOpponentHandleCmd39,
|
||||
LinkOpponentHandleCmd40,
|
||||
LinkOpponentHandleHitAnimation,
|
||||
LinkOpponentHandleCmd42,
|
||||
LinkOpponentHandlePlaySE,
|
||||
LinkOpponentHandlePlayFanfareOrBGM,
|
||||
LinkOpponentHandleFaintingCry,
|
||||
LinkOpponentHandleIntroSlide,
|
||||
LinkOpponentHandleIntroTrainerBallThrow,
|
||||
LinkOpponentHandleDrawPartyStatusSummary,
|
||||
LinkOpponentHandleHidePartyStatusSummary,
|
||||
LinkOpponentHandleEndBounceEffect,
|
||||
LinkOpponentHandleSpriteInvisibility,
|
||||
LinkOpponentHandleBattleAnimation,
|
||||
LinkOpponentHandleLinkStandbyMsg,
|
||||
LinkOpponentHandleResetActionMoveSelection,
|
||||
LinkOpponentHandleCmd55,
|
||||
LinkOpponentHandleBattleDebug,
|
||||
LinkOpponentCmdEnd
|
||||
[CONTROLLER_GETMONDATA] = LinkOpponentHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = LinkOpponentHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = LinkOpponentHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = LinkOpponentHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = LinkOpponentHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = LinkOpponentHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = LinkOpponentHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = LinkOpponentHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = LinkOpponentHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = LinkOpponentHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = LinkOpponentHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = LinkOpponentHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = LinkOpponentHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = LinkOpponentHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = LinkOpponentHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = LinkOpponentHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = LinkOpponentHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = LinkOpponentHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = LinkOpponentHandleChooseAction,
|
||||
[CONTROLLER_UNKNOWNYESNOBOX] = LinkOpponentHandleUnknownYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = LinkOpponentHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = LinkOpponentHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = LinkOpponentHandleChoosePokemon,
|
||||
[CONTROLLER_23] = LinkOpponentHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = LinkOpponentHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = LinkOpponentHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = LinkOpponentHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = LinkOpponentHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = LinkOpponentHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = LinkOpponentHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = LinkOpponentHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = LinkOpponentHandlePlayBGM,
|
||||
[CONTROLLER_32] = LinkOpponentHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = LinkOpponentHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = LinkOpponentHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = LinkOpponentHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = LinkOpponentHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = LinkOpponentHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = LinkOpponentHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = LinkOpponentHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = LinkOpponentHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = LinkOpponentHandleHitAnimation,
|
||||
[CONTROLLER_42] = LinkOpponentHandleCmd42,
|
||||
[CONTROLLER_PLAYSE] = LinkOpponentHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = LinkOpponentHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = LinkOpponentHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = LinkOpponentHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = LinkOpponentHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = LinkOpponentHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = LinkOpponentHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = LinkOpponentHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = LinkOpponentHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = LinkOpponentHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = LinkOpponentHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = LinkOpponentHandleResetActionMoveSelection,
|
||||
[CONTROLLER_55] = LinkOpponentHandleCmd55,
|
||||
[CONTROLLER_DEBUGMENU] = LinkOpponentHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = LinkOpponentCmdEnd
|
||||
};
|
||||
|
||||
static void nullsub_28(void)
|
||||
@ -1605,27 +1605,27 @@ static void LinkOpponentHandleOneReturnValue_Duplicate(void)
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void LinkOpponentHandleCmd37(void)
|
||||
static void LinkOpponentHandleClearUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = 0;
|
||||
gUnusedControllerStruct.unk = 0;
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void LinkOpponentHandleCmd38(void)
|
||||
static void LinkOpponentHandleSetUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = gBattleResources->bufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleResources->bufferA[gActiveBattler][1];
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void LinkOpponentHandleCmd39(void)
|
||||
static void LinkOpponentHandleClearUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 = 0;
|
||||
gUnusedControllerStruct.flag = 0;
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void LinkOpponentHandleCmd40(void)
|
||||
static void LinkOpponentHandleToggleUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 ^= 1;
|
||||
gUnusedControllerStruct.flag ^= 1;
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@ -1694,7 +1694,6 @@ static void LinkOpponentHandleIntroSlide(void)
|
||||
|
||||
static void LinkOpponentHandleIntroTrainerBallThrow(void)
|
||||
{
|
||||
u8 paletteNum;
|
||||
u8 taskId;
|
||||
|
||||
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||
|
@ -67,10 +67,10 @@ static void LinkPartnerHandleTwoReturnValues(void);
|
||||
static void LinkPartnerHandleChosenMonReturnValue(void);
|
||||
static void LinkPartnerHandleOneReturnValue(void);
|
||||
static void LinkPartnerHandleOneReturnValue_Duplicate(void);
|
||||
static void LinkPartnerHandleCmd37(void);
|
||||
static void LinkPartnerHandleCmd38(void);
|
||||
static void LinkPartnerHandleCmd39(void);
|
||||
static void LinkPartnerHandleCmd40(void);
|
||||
static void LinkPartnerHandleClearUnkVar(void);
|
||||
static void LinkPartnerHandleSetUnkVar(void);
|
||||
static void LinkPartnerHandleClearUnkFlag(void);
|
||||
static void LinkPartnerHandleToggleUnkFlag(void);
|
||||
static void LinkPartnerHandleHitAnimation(void);
|
||||
static void LinkPartnerHandleCmd42(void);
|
||||
static void LinkPartnerHandlePlaySE(void);
|
||||
@ -102,64 +102,64 @@ static void sub_814DE9C(void);
|
||||
|
||||
static void (*const sLinkPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
LinkPartnerHandleGetMonData,
|
||||
LinkPartnerHandleGetRawMonData,
|
||||
LinkPartnerHandleSetMonData,
|
||||
LinkPartnerHandleSetRawMonData,
|
||||
LinkPartnerHandleLoadMonSprite,
|
||||
LinkPartnerHandleSwitchInAnim,
|
||||
LinkPartnerHandleReturnMonToBall,
|
||||
LinkPartnerHandleDrawTrainerPic,
|
||||
LinkPartnerHandleTrainerSlide,
|
||||
LinkPartnerHandleTrainerSlideBack,
|
||||
LinkPartnerHandleFaintAnimation,
|
||||
LinkPartnerHandlePaletteFade,
|
||||
LinkPartnerHandleSuccessBallThrowAnim,
|
||||
LinkPartnerHandleBallThrowAnim,
|
||||
LinkPartnerHandlePause,
|
||||
LinkPartnerHandleMoveAnimation,
|
||||
LinkPartnerHandlePrintString,
|
||||
LinkPartnerHandlePrintSelectionString,
|
||||
LinkPartnerHandleChooseAction,
|
||||
LinkPartnerHandleUnknownYesNoBox,
|
||||
LinkPartnerHandleChooseMove,
|
||||
LinkPartnerHandleChooseItem,
|
||||
LinkPartnerHandleChoosePokemon,
|
||||
LinkPartnerHandleCmd23,
|
||||
LinkPartnerHandleHealthBarUpdate,
|
||||
LinkPartnerHandleExpUpdate,
|
||||
LinkPartnerHandleStatusIconUpdate,
|
||||
LinkPartnerHandleStatusAnimation,
|
||||
LinkPartnerHandleStatusXor,
|
||||
LinkPartnerHandleDataTransfer,
|
||||
LinkPartnerHandleDMA3Transfer,
|
||||
LinkPartnerHandlePlayBGM,
|
||||
LinkPartnerHandleCmd32,
|
||||
LinkPartnerHandleTwoReturnValues,
|
||||
LinkPartnerHandleChosenMonReturnValue,
|
||||
LinkPartnerHandleOneReturnValue,
|
||||
LinkPartnerHandleOneReturnValue_Duplicate,
|
||||
LinkPartnerHandleCmd37,
|
||||
LinkPartnerHandleCmd38,
|
||||
LinkPartnerHandleCmd39,
|
||||
LinkPartnerHandleCmd40,
|
||||
LinkPartnerHandleHitAnimation,
|
||||
LinkPartnerHandleCmd42,
|
||||
LinkPartnerHandlePlaySE,
|
||||
LinkPartnerHandlePlayFanfareOrBGM,
|
||||
LinkPartnerHandleFaintingCry,
|
||||
LinkPartnerHandleIntroSlide,
|
||||
LinkPartnerHandleIntroTrainerBallThrow,
|
||||
LinkPartnerHandleDrawPartyStatusSummary,
|
||||
LinkPartnerHandleHidePartyStatusSummary,
|
||||
LinkPartnerHandleEndBounceEffect,
|
||||
LinkPartnerHandleSpriteInvisibility,
|
||||
LinkPartnerHandleBattleAnimation,
|
||||
LinkPartnerHandleLinkStandbyMsg,
|
||||
LinkPartnerHandleResetActionMoveSelection,
|
||||
LinkPartnerHandleCmd55,
|
||||
LinkPartnerHandleBattleDebug,
|
||||
LinkPartnerCmdEnd
|
||||
[CONTROLLER_GETMONDATA] = LinkPartnerHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = LinkPartnerHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = LinkPartnerHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = LinkPartnerHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = LinkPartnerHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = LinkPartnerHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = LinkPartnerHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = LinkPartnerHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = LinkPartnerHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = LinkPartnerHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = LinkPartnerHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = LinkPartnerHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = LinkPartnerHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = LinkPartnerHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = LinkPartnerHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = LinkPartnerHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = LinkPartnerHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = LinkPartnerHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = LinkPartnerHandleChooseAction,
|
||||
[CONTROLLER_UNKNOWNYESNOBOX] = LinkPartnerHandleUnknownYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = LinkPartnerHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = LinkPartnerHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = LinkPartnerHandleChoosePokemon,
|
||||
[CONTROLLER_23] = LinkPartnerHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = LinkPartnerHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = LinkPartnerHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = LinkPartnerHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = LinkPartnerHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = LinkPartnerHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = LinkPartnerHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = LinkPartnerHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = LinkPartnerHandlePlayBGM,
|
||||
[CONTROLLER_32] = LinkPartnerHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = LinkPartnerHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = LinkPartnerHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = LinkPartnerHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = LinkPartnerHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = LinkPartnerHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = LinkPartnerHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = LinkPartnerHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = LinkPartnerHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = LinkPartnerHandleHitAnimation,
|
||||
[CONTROLLER_42] = LinkPartnerHandleCmd42,
|
||||
[CONTROLLER_PLAYSE] = LinkPartnerHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = LinkPartnerHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = LinkPartnerHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = LinkPartnerHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = LinkPartnerHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = LinkPartnerHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = LinkPartnerHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = LinkPartnerHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = LinkPartnerHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = LinkPartnerHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = LinkPartnerHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = LinkPartnerHandleResetActionMoveSelection,
|
||||
[CONTROLLER_55] = LinkPartnerHandleCmd55,
|
||||
[CONTROLLER_DEBUGMENU] = LinkPartnerHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = LinkPartnerCmdEnd
|
||||
};
|
||||
|
||||
static void SpriteCB_Null2(void)
|
||||
@ -1429,27 +1429,27 @@ static void LinkPartnerHandleOneReturnValue_Duplicate(void)
|
||||
LinkPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void LinkPartnerHandleCmd37(void)
|
||||
static void LinkPartnerHandleClearUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = 0;
|
||||
gUnusedControllerStruct.unk = 0;
|
||||
LinkPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void LinkPartnerHandleCmd38(void)
|
||||
static void LinkPartnerHandleSetUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = gBattleResources->bufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleResources->bufferA[gActiveBattler][1];
|
||||
LinkPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void LinkPartnerHandleCmd39(void)
|
||||
static void LinkPartnerHandleClearUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 = 0;
|
||||
gUnusedControllerStruct.flag = 0;
|
||||
LinkPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void LinkPartnerHandleCmd40(void)
|
||||
static void LinkPartnerHandleToggleUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 ^= 1;
|
||||
gUnusedControllerStruct.flag ^= 1;
|
||||
LinkPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
@ -74,10 +74,10 @@ static void OpponentHandleTwoReturnValues(void);
|
||||
static void OpponentHandleChosenMonReturnValue(void);
|
||||
static void OpponentHandleOneReturnValue(void);
|
||||
static void OpponentHandleOneReturnValue_Duplicate(void);
|
||||
static void OpponentHandleCmd37(void);
|
||||
static void OpponentHandleCmd38(void);
|
||||
static void OpponentHandleCmd39(void);
|
||||
static void OpponentHandleCmd40(void);
|
||||
static void OpponentHandleClearUnkVar(void);
|
||||
static void OpponentHandleSetUnkVar(void);
|
||||
static void OpponentHandleClearUnkFlag(void);
|
||||
static void OpponentHandleToggleUnkFlag(void);
|
||||
static void OpponentHandleHitAnimation(void);
|
||||
static void OpponentHandleCmd42(void);
|
||||
static void OpponentHandlePlaySE(void);
|
||||
@ -110,68 +110,68 @@ static void sub_8062A2C(void);
|
||||
|
||||
static void (*const sOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
OpponentHandleGetMonData,
|
||||
OpponentHandleGetRawMonData,
|
||||
OpponentHandleSetMonData,
|
||||
OpponentHandleSetRawMonData,
|
||||
OpponentHandleLoadMonSprite,
|
||||
OpponentHandleSwitchInAnim,
|
||||
OpponentHandleReturnMonToBall,
|
||||
OpponentHandleDrawTrainerPic,
|
||||
OpponentHandleTrainerSlide,
|
||||
OpponentHandleTrainerSlideBack,
|
||||
OpponentHandleFaintAnimation,
|
||||
OpponentHandlePaletteFade,
|
||||
OpponentHandleSuccessBallThrowAnim,
|
||||
OpponentHandleBallThrow,
|
||||
OpponentHandlePause,
|
||||
OpponentHandleMoveAnimation,
|
||||
OpponentHandlePrintString,
|
||||
OpponentHandlePrintSelectionString,
|
||||
OpponentHandleChooseAction,
|
||||
OpponentHandleUnknownYesNoBox,
|
||||
OpponentHandleChooseMove,
|
||||
OpponentHandleChooseItem,
|
||||
OpponentHandleChoosePokemon,
|
||||
OpponentHandleCmd23,
|
||||
OpponentHandleHealthBarUpdate,
|
||||
OpponentHandleExpUpdate,
|
||||
OpponentHandleStatusIconUpdate,
|
||||
OpponentHandleStatusAnimation,
|
||||
OpponentHandleStatusXor,
|
||||
OpponentHandleDataTransfer,
|
||||
OpponentHandleDMA3Transfer,
|
||||
OpponentHandlePlayBGM,
|
||||
OpponentHandleCmd32,
|
||||
OpponentHandleTwoReturnValues,
|
||||
OpponentHandleChosenMonReturnValue,
|
||||
OpponentHandleOneReturnValue,
|
||||
OpponentHandleOneReturnValue_Duplicate,
|
||||
OpponentHandleCmd37,
|
||||
OpponentHandleCmd38,
|
||||
OpponentHandleCmd39,
|
||||
OpponentHandleCmd40,
|
||||
OpponentHandleHitAnimation,
|
||||
OpponentHandleCmd42,
|
||||
OpponentHandlePlaySE,
|
||||
OpponentHandlePlayFanfareOrBGM,
|
||||
OpponentHandleFaintingCry,
|
||||
OpponentHandleIntroSlide,
|
||||
OpponentHandleIntroTrainerBallThrow,
|
||||
OpponentHandleDrawPartyStatusSummary,
|
||||
OpponentHandleHidePartyStatusSummary,
|
||||
OpponentHandleEndBounceEffect,
|
||||
OpponentHandleSpriteInvisibility,
|
||||
OpponentHandleBattleAnimation,
|
||||
OpponentHandleLinkStandbyMsg,
|
||||
OpponentHandleResetActionMoveSelection,
|
||||
OpponentHandleCmd55,
|
||||
OpponentHandleDebugMenu,
|
||||
OpponentCmdEnd
|
||||
[CONTROLLER_GETMONDATA] = OpponentHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = OpponentHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = OpponentHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = OpponentHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = OpponentHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = OpponentHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = OpponentHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = OpponentHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = OpponentHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = OpponentHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = OpponentHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = OpponentHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = OpponentHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = OpponentHandleBallThrow,
|
||||
[CONTROLLER_PAUSE] = OpponentHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = OpponentHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = OpponentHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = OpponentHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = OpponentHandleChooseAction,
|
||||
[CONTROLLER_UNKNOWNYESNOBOX] = OpponentHandleUnknownYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = OpponentHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = OpponentHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = OpponentHandleChoosePokemon,
|
||||
[CONTROLLER_23] = OpponentHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = OpponentHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = OpponentHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = OpponentHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = OpponentHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = OpponentHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = OpponentHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = OpponentHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = OpponentHandlePlayBGM,
|
||||
[CONTROLLER_32] = OpponentHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = OpponentHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = OpponentHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = OpponentHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = OpponentHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = OpponentHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = OpponentHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = OpponentHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = OpponentHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = OpponentHandleHitAnimation,
|
||||
[CONTROLLER_42] = OpponentHandleCmd42,
|
||||
[CONTROLLER_PLAYSE] = OpponentHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = OpponentHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = OpponentHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = OpponentHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = OpponentHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = OpponentHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = OpponentHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = OpponentHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = OpponentHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = OpponentHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = OpponentHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = OpponentHandleResetActionMoveSelection,
|
||||
[CONTROLLER_55] = OpponentHandleCmd55,
|
||||
[CONTROLLER_DEBUGMENU] = OpponentHandleDebugMenu,
|
||||
[CONTROLLER_TERMINATOR_NOP] = OpponentCmdEnd
|
||||
};
|
||||
|
||||
// unknown unused data
|
||||
static const u8 sUnknown_0831C7AC[] = {0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20};
|
||||
static const u8 sUnused[] = {0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20};
|
||||
|
||||
static void nullsub_26(void)
|
||||
{
|
||||
@ -1261,7 +1261,7 @@ static void OpponentHandleDrawTrainerPic(void)
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if (gActiveBattler == 1)
|
||||
trainerPicId = GetFrontierTrainerFrontSpriteId(gTrainerBattleOpponent_A);
|
||||
@ -1345,7 +1345,7 @@ static void OpponentHandleTrainerSlide(void)
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if (gActiveBattler == 1)
|
||||
trainerPicId = GetFrontierTrainerFrontSpriteId(gTrainerBattleOpponent_A);
|
||||
@ -1765,27 +1765,27 @@ static void OpponentHandleOneReturnValue_Duplicate(void)
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void OpponentHandleCmd37(void)
|
||||
static void OpponentHandleClearUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = 0;
|
||||
gUnusedControllerStruct.unk = 0;
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void OpponentHandleCmd38(void)
|
||||
static void OpponentHandleSetUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = gBattleResources->bufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleResources->bufferA[gActiveBattler][1];
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void OpponentHandleCmd39(void)
|
||||
static void OpponentHandleClearUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 = 0;
|
||||
gUnusedControllerStruct.flag = 0;
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void OpponentHandleCmd40(void)
|
||||
static void OpponentHandleToggleUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 ^= 1;
|
||||
gUnusedControllerStruct.flag ^= 1;
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@ -1854,7 +1854,6 @@ static void OpponentHandleIntroSlide(void)
|
||||
|
||||
static void OpponentHandleIntroTrainerBallThrow(void)
|
||||
{
|
||||
u8 paletteNum;
|
||||
u8 taskId;
|
||||
|
||||
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||
|
@ -76,10 +76,10 @@ static void PlayerHandleTwoReturnValues(void);
|
||||
static void PlayerHandleChosenMonReturnValue(void);
|
||||
static void PlayerHandleOneReturnValue(void);
|
||||
static void PlayerHandleOneReturnValue_Duplicate(void);
|
||||
static void PlayerHandleCmd37(void);
|
||||
static void PlayerHandleCmd38(void);
|
||||
static void PlayerHandleCmd39(void);
|
||||
static void PlayerHandleCmd40(void);
|
||||
static void PlayerHandleClearUnkVar(void);
|
||||
static void PlayerHandleSetUnkVar(void);
|
||||
static void PlayerHandleClearUnkFlag(void);
|
||||
static void PlayerHandleToggleUnkFlag(void);
|
||||
static void PlayerHandleHitAnimation(void);
|
||||
static void PlayerHandleCmd42(void);
|
||||
static void PlayerHandlePlaySE(void);
|
||||
@ -127,68 +127,68 @@ static void sub_805CE38(void);
|
||||
|
||||
static void (*const sPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
PlayerHandleGetMonData,
|
||||
PlayerHandleGetRawMonData,
|
||||
PlayerHandleSetMonData,
|
||||
PlayerHandleSetRawMonData,
|
||||
PlayerHandleLoadMonSprite,
|
||||
PlayerHandleSwitchInAnim,
|
||||
PlayerHandleReturnMonToBall,
|
||||
PlayerHandleDrawTrainerPic,
|
||||
PlayerHandleTrainerSlide,
|
||||
PlayerHandleTrainerSlideBack,
|
||||
PlayerHandleFaintAnimation,
|
||||
PlayerHandlePaletteFade,
|
||||
PlayerHandleSuccessBallThrowAnim,
|
||||
PlayerHandleBallThrowAnim,
|
||||
PlayerHandlePause,
|
||||
PlayerHandleMoveAnimation,
|
||||
PlayerHandlePrintString,
|
||||
PlayerHandlePrintSelectionString,
|
||||
PlayerHandleChooseAction,
|
||||
PlayerHandleUnknownYesNoBox,
|
||||
PlayerHandleChooseMove,
|
||||
PlayerHandleChooseItem,
|
||||
PlayerHandleChoosePokemon,
|
||||
PlayerHandleCmd23,
|
||||
PlayerHandleHealthBarUpdate,
|
||||
PlayerHandleExpUpdate,
|
||||
PlayerHandleStatusIconUpdate,
|
||||
PlayerHandleStatusAnimation,
|
||||
PlayerHandleStatusXor,
|
||||
PlayerHandleDataTransfer,
|
||||
PlayerHandleDMA3Transfer,
|
||||
PlayerHandlePlayBGM,
|
||||
PlayerHandleCmd32,
|
||||
PlayerHandleTwoReturnValues,
|
||||
PlayerHandleChosenMonReturnValue,
|
||||
PlayerHandleOneReturnValue,
|
||||
PlayerHandleOneReturnValue_Duplicate,
|
||||
PlayerHandleCmd37,
|
||||
PlayerHandleCmd38,
|
||||
PlayerHandleCmd39,
|
||||
PlayerHandleCmd40,
|
||||
PlayerHandleHitAnimation,
|
||||
PlayerHandleCmd42,
|
||||
PlayerHandlePlaySE,
|
||||
PlayerHandlePlayFanfareOrBGM,
|
||||
PlayerHandleFaintingCry,
|
||||
PlayerHandleIntroSlide,
|
||||
PlayerHandleIntroTrainerBallThrow,
|
||||
PlayerHandleDrawPartyStatusSummary,
|
||||
PlayerHandleHidePartyStatusSummary,
|
||||
PlayerHandleEndBounceEffect,
|
||||
PlayerHandleSpriteInvisibility,
|
||||
PlayerHandleBattleAnimation,
|
||||
PlayerHandleLinkStandbyMsg,
|
||||
PlayerHandleResetActionMoveSelection,
|
||||
PlayerHandleCmd55,
|
||||
PlayerHandleBattleDebug,
|
||||
PlayerCmdEnd
|
||||
[CONTROLLER_GETMONDATA] = PlayerHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = PlayerHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = PlayerHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = PlayerHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = PlayerHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = PlayerHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = PlayerHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = PlayerHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = PlayerHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = PlayerHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = PlayerHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = PlayerHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = PlayerHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = PlayerHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = PlayerHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = PlayerHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = PlayerHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = PlayerHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = PlayerHandleChooseAction,
|
||||
[CONTROLLER_UNKNOWNYESNOBOX] = PlayerHandleUnknownYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = PlayerHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = PlayerHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = PlayerHandleChoosePokemon,
|
||||
[CONTROLLER_23] = PlayerHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = PlayerHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = PlayerHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = PlayerHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = PlayerHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = PlayerHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = PlayerHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = PlayerHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = PlayerHandlePlayBGM,
|
||||
[CONTROLLER_32] = PlayerHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = PlayerHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = PlayerHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = PlayerHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = PlayerHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = PlayerHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = PlayerHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = PlayerHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = PlayerHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = PlayerHandleHitAnimation,
|
||||
[CONTROLLER_42] = PlayerHandleCmd42,
|
||||
[CONTROLLER_PLAYSE] = PlayerHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = PlayerHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = PlayerHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = PlayerHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = PlayerHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = PlayerHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = PlayerHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = PlayerHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = PlayerHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = PlayerHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = PlayerHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = PlayerHandleResetActionMoveSelection,
|
||||
[CONTROLLER_55] = PlayerHandleCmd55,
|
||||
[CONTROLLER_DEBUGMENU] = PlayerHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = PlayerCmdEnd
|
||||
};
|
||||
|
||||
// unknown unused data
|
||||
static const u8 sUnknown_0831C5FC[] = {0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58};
|
||||
static const u8 sUnused[] = {0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58};
|
||||
|
||||
void nullsub_21(void)
|
||||
{
|
||||
@ -2932,27 +2932,27 @@ static void PlayerHandleOneReturnValue_Duplicate(void)
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerHandleCmd37(void)
|
||||
static void PlayerHandleClearUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = 0;
|
||||
gUnusedControllerStruct.unk = 0;
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerHandleCmd38(void)
|
||||
static void PlayerHandleSetUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = gBattleResources->bufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleResources->bufferA[gActiveBattler][1];
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerHandleCmd39(void)
|
||||
static void PlayerHandleClearUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 = 0;
|
||||
gUnusedControllerStruct.flag = 0;
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerHandleCmd40(void)
|
||||
static void PlayerHandleToggleUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 ^= 1;
|
||||
gUnusedControllerStruct.flag ^= 1;
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
@ -65,10 +65,10 @@ static void PlayerPartnerHandleTwoReturnValues(void);
|
||||
static void PlayerPartnerHandleChosenMonReturnValue(void);
|
||||
static void PlayerPartnerHandleOneReturnValue(void);
|
||||
static void PlayerPartnerHandleOneReturnValue_Duplicate(void);
|
||||
static void PlayerPartnerHandleCmd37(void);
|
||||
static void PlayerPartnerHandleCmd38(void);
|
||||
static void PlayerPartnerHandleCmd39(void);
|
||||
static void PlayerPartnerHandleCmd40(void);
|
||||
static void PlayerPartnerHandleClearUnkVar(void);
|
||||
static void PlayerPartnerHandleSetUnkVar(void);
|
||||
static void PlayerPartnerHandleClearUnkFlag(void);
|
||||
static void PlayerPartnerHandleToggleUnkFlag(void);
|
||||
static void PlayerPartnerHandleHitAnimation(void);
|
||||
static void PlayerPartnerHandleCmd42(void);
|
||||
static void PlayerPartnerHandlePlaySE(void);
|
||||
@ -106,68 +106,68 @@ static void sub_81BE498(void);
|
||||
|
||||
static void (*const sPlayerPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
PlayerPartnerHandleGetMonData,
|
||||
PlayerPartnerHandleGetRawMonData,
|
||||
PlayerPartnerHandleSetMonData,
|
||||
PlayerPartnerHandleSetRawMonData,
|
||||
PlayerPartnerHandleLoadMonSprite,
|
||||
PlayerPartnerHandleSwitchInAnim,
|
||||
PlayerPartnerHandleReturnMonToBall,
|
||||
PlayerPartnerHandleDrawTrainerPic,
|
||||
PlayerPartnerHandleTrainerSlide,
|
||||
PlayerPartnerHandleTrainerSlideBack,
|
||||
PlayerPartnerHandleFaintAnimation,
|
||||
PlayerPartnerHandlePaletteFade,
|
||||
PlayerPartnerHandleSuccessBallThrowAnim,
|
||||
PlayerPartnerHandleBallThrowAnim,
|
||||
PlayerPartnerHandlePause,
|
||||
PlayerPartnerHandleMoveAnimation,
|
||||
PlayerPartnerHandlePrintString,
|
||||
PlayerPartnerHandlePrintSelectionString,
|
||||
PlayerPartnerHandleChooseAction,
|
||||
PlayerPartnerHandleUnknownYesNoBox,
|
||||
PlayerPartnerHandleChooseMove,
|
||||
PlayerPartnerHandleChooseItem,
|
||||
PlayerPartnerHandleChoosePokemon,
|
||||
PlayerPartnerHandleCmd23,
|
||||
PlayerPartnerHandleHealthBarUpdate,
|
||||
PlayerPartnerHandleExpUpdate,
|
||||
PlayerPartnerHandleStatusIconUpdate,
|
||||
PlayerPartnerHandleStatusAnimation,
|
||||
PlayerPartnerHandleStatusXor,
|
||||
PlayerPartnerHandleDataTransfer,
|
||||
PlayerPartnerHandleDMA3Transfer,
|
||||
PlayerPartnerHandlePlayBGM,
|
||||
PlayerPartnerHandleCmd32,
|
||||
PlayerPartnerHandleTwoReturnValues,
|
||||
PlayerPartnerHandleChosenMonReturnValue,
|
||||
PlayerPartnerHandleOneReturnValue,
|
||||
PlayerPartnerHandleOneReturnValue_Duplicate,
|
||||
PlayerPartnerHandleCmd37,
|
||||
PlayerPartnerHandleCmd38,
|
||||
PlayerPartnerHandleCmd39,
|
||||
PlayerPartnerHandleCmd40,
|
||||
PlayerPartnerHandleHitAnimation,
|
||||
PlayerPartnerHandleCmd42,
|
||||
PlayerPartnerHandlePlaySE,
|
||||
PlayerPartnerHandlePlayFanfareOrBGM,
|
||||
PlayerPartnerHandleFaintingCry,
|
||||
PlayerPartnerHandleIntroSlide,
|
||||
PlayerPartnerHandleIntroTrainerBallThrow,
|
||||
PlayerPartnerHandleDrawPartyStatusSummary,
|
||||
PlayerPartnerHandleHidePartyStatusSummary,
|
||||
PlayerPartnerHandleEndBounceEffect,
|
||||
PlayerPartnerHandleSpriteInvisibility,
|
||||
PlayerPartnerHandleBattleAnimation,
|
||||
PlayerPartnerHandleLinkStandbyMsg,
|
||||
PlayerPartnerHandleResetActionMoveSelection,
|
||||
PlayerPartnerHandleCmd55,
|
||||
PlayerPartnerHandleBattleDebug,
|
||||
PlayerPartnerCmdEnd
|
||||
[CONTROLLER_GETMONDATA] = PlayerPartnerHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = PlayerPartnerHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = PlayerPartnerHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = PlayerPartnerHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = PlayerPartnerHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = PlayerPartnerHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = PlayerPartnerHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = PlayerPartnerHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = PlayerPartnerHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = PlayerPartnerHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = PlayerPartnerHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = PlayerPartnerHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = PlayerPartnerHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = PlayerPartnerHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = PlayerPartnerHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = PlayerPartnerHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = PlayerPartnerHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = PlayerPartnerHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = PlayerPartnerHandleChooseAction,
|
||||
[CONTROLLER_UNKNOWNYESNOBOX] = PlayerPartnerHandleUnknownYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = PlayerPartnerHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = PlayerPartnerHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = PlayerPartnerHandleChoosePokemon,
|
||||
[CONTROLLER_23] = PlayerPartnerHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = PlayerPartnerHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = PlayerPartnerHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = PlayerPartnerHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = PlayerPartnerHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = PlayerPartnerHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = PlayerPartnerHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = PlayerPartnerHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = PlayerPartnerHandlePlayBGM,
|
||||
[CONTROLLER_32] = PlayerPartnerHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = PlayerPartnerHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = PlayerPartnerHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = PlayerPartnerHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = PlayerPartnerHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = PlayerPartnerHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = PlayerPartnerHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = PlayerPartnerHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = PlayerPartnerHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = PlayerPartnerHandleHitAnimation,
|
||||
[CONTROLLER_42] = PlayerPartnerHandleCmd42,
|
||||
[CONTROLLER_PLAYSE] = PlayerPartnerHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = PlayerPartnerHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = PlayerPartnerHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = PlayerPartnerHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = PlayerPartnerHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = PlayerPartnerHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = PlayerPartnerHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = PlayerPartnerHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = PlayerPartnerHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = PlayerPartnerHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = PlayerPartnerHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = PlayerPartnerHandleResetActionMoveSelection,
|
||||
[CONTROLLER_55] = PlayerPartnerHandleCmd55,
|
||||
[CONTROLLER_DEBUGMENU] = PlayerPartnerHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = PlayerPartnerCmdEnd
|
||||
};
|
||||
|
||||
// unknown unused data
|
||||
static const u8 sUnknown_08617254[] =
|
||||
static const u8 sUnused[] =
|
||||
{
|
||||
0x83, 0x4d, 0xf3, 0x5f, 0x6f, 0x4f, 0xeb, 0x3e,
|
||||
0x67, 0x2e, 0x10, 0x46, 0x8c, 0x3d, 0x28, 0x35,
|
||||
@ -1689,27 +1689,27 @@ static void PlayerPartnerHandleOneReturnValue_Duplicate(void)
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleCmd37(void)
|
||||
static void PlayerPartnerHandleClearUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = 0;
|
||||
gUnusedControllerStruct.unk = 0;
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleCmd38(void)
|
||||
static void PlayerPartnerHandleSetUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = gBattleResources->bufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleResources->bufferA[gActiveBattler][1];
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleCmd39(void)
|
||||
static void PlayerPartnerHandleClearUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 = 0;
|
||||
gUnusedControllerStruct.flag = 0;
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleCmd40(void)
|
||||
static void PlayerPartnerHandleToggleUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 ^= 1;
|
||||
gUnusedControllerStruct.flag ^= 1;
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
@ -69,10 +69,10 @@ static void RecordedOpponentHandleTwoReturnValues(void);
|
||||
static void RecordedOpponentHandleChosenMonReturnValue(void);
|
||||
static void RecordedOpponentHandleOneReturnValue(void);
|
||||
static void RecordedOpponentHandleOneReturnValue_Duplicate(void);
|
||||
static void RecordedOpponentHandleCmd37(void);
|
||||
static void RecordedOpponentHandleCmd38(void);
|
||||
static void RecordedOpponentHandleCmd39(void);
|
||||
static void RecordedOpponentHandleCmd40(void);
|
||||
static void RecordedOpponentHandleClearUnkVar(void);
|
||||
static void RecordedOpponentHandleSetUnkVar(void);
|
||||
static void RecordedOpponentHandleClearUnkFlag(void);
|
||||
static void RecordedOpponentHandleToggleUnkFlag(void);
|
||||
static void RecordedOpponentHandleHitAnimation(void);
|
||||
static void RecordedOpponentHandleCmd42(void);
|
||||
static void RecordedOpponentHandlePlaySE(void);
|
||||
@ -105,64 +105,64 @@ static void sub_818975C(void);
|
||||
|
||||
static void (*const sRecordedOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
RecordedOpponentHandleGetMonData,
|
||||
RecordedOpponentHandleGetRawMonData,
|
||||
RecordedOpponentHandleSetMonData,
|
||||
RecordedOpponentHandleSetRawMonData,
|
||||
RecordedOpponentHandleLoadMonSprite,
|
||||
RecordedOpponentHandleSwitchInAnim,
|
||||
RecordedOpponentHandleReturnMonToBall,
|
||||
RecordedOpponentHandleDrawTrainerPic,
|
||||
RecordedOpponentHandleTrainerSlide,
|
||||
RecordedOpponentHandleTrainerSlideBack,
|
||||
RecordedOpponentHandleFaintAnimation,
|
||||
RecordedOpponentHandlePaletteFade,
|
||||
RecordedOpponentHandleSuccessBallThrowAnim,
|
||||
RecordedOpponentHandleBallThrowAnim,
|
||||
RecordedOpponentHandlePause,
|
||||
RecordedOpponentHandleMoveAnimation,
|
||||
RecordedOpponentHandlePrintString,
|
||||
RecordedOpponentHandlePrintSelectionString,
|
||||
RecordedOpponentHandleChooseAction,
|
||||
RecordedOpponentHandleUnknownYesNoBox,
|
||||
RecordedOpponentHandleChooseMove,
|
||||
RecordedOpponentHandleChooseItem,
|
||||
RecordedOpponentHandleChoosePokemon,
|
||||
RecordedOpponentHandleCmd23,
|
||||
RecordedOpponentHandleHealthBarUpdate,
|
||||
RecordedOpponentHandleExpUpdate,
|
||||
RecordedOpponentHandleStatusIconUpdate,
|
||||
RecordedOpponentHandleStatusAnimation,
|
||||
RecordedOpponentHandleStatusXor,
|
||||
RecordedOpponentHandleDataTransfer,
|
||||
RecordedOpponentHandleDMA3Transfer,
|
||||
RecordedOpponentHandlePlayBGM,
|
||||
RecordedOpponentHandleCmd32,
|
||||
RecordedOpponentHandleTwoReturnValues,
|
||||
RecordedOpponentHandleChosenMonReturnValue,
|
||||
RecordedOpponentHandleOneReturnValue,
|
||||
RecordedOpponentHandleOneReturnValue_Duplicate,
|
||||
RecordedOpponentHandleCmd37,
|
||||
RecordedOpponentHandleCmd38,
|
||||
RecordedOpponentHandleCmd39,
|
||||
RecordedOpponentHandleCmd40,
|
||||
RecordedOpponentHandleHitAnimation,
|
||||
RecordedOpponentHandleCmd42,
|
||||
RecordedOpponentHandlePlaySE,
|
||||
RecordedOpponentHandlePlayFanfareOrBGM,
|
||||
RecordedOpponentHandleFaintingCry,
|
||||
RecordedOpponentHandleIntroSlide,
|
||||
RecordedOpponentHandleIntroTrainerBallThrow,
|
||||
RecordedOpponentHandleDrawPartyStatusSummary,
|
||||
RecordedOpponentHandleHidePartyStatusSummary,
|
||||
RecordedOpponentHandleEndBounceEffect,
|
||||
RecordedOpponentHandleSpriteInvisibility,
|
||||
RecordedOpponentHandleBattleAnimation,
|
||||
RecordedOpponentHandleLinkStandbyMsg,
|
||||
RecordedOpponentHandleResetActionMoveSelection,
|
||||
RecordedOpponentHandleCmd55,
|
||||
RecordedOpponentHandleBattleDebug,
|
||||
RecordedOpponentCmdEnd
|
||||
[CONTROLLER_GETMONDATA] = RecordedOpponentHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = RecordedOpponentHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = RecordedOpponentHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = RecordedOpponentHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = RecordedOpponentHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = RecordedOpponentHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = RecordedOpponentHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = RecordedOpponentHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = RecordedOpponentHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = RecordedOpponentHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = RecordedOpponentHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = RecordedOpponentHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = RecordedOpponentHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = RecordedOpponentHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = RecordedOpponentHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = RecordedOpponentHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = RecordedOpponentHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = RecordedOpponentHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = RecordedOpponentHandleChooseAction,
|
||||
[CONTROLLER_UNKNOWNYESNOBOX] = RecordedOpponentHandleUnknownYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = RecordedOpponentHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = RecordedOpponentHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = RecordedOpponentHandleChoosePokemon,
|
||||
[CONTROLLER_23] = RecordedOpponentHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = RecordedOpponentHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = RecordedOpponentHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = RecordedOpponentHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = RecordedOpponentHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = RecordedOpponentHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = RecordedOpponentHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = RecordedOpponentHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = RecordedOpponentHandlePlayBGM,
|
||||
[CONTROLLER_32] = RecordedOpponentHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = RecordedOpponentHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = RecordedOpponentHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = RecordedOpponentHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = RecordedOpponentHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = RecordedOpponentHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = RecordedOpponentHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = RecordedOpponentHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = RecordedOpponentHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = RecordedOpponentHandleHitAnimation,
|
||||
[CONTROLLER_42] = RecordedOpponentHandleCmd42,
|
||||
[CONTROLLER_PLAYSE] = RecordedOpponentHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = RecordedOpponentHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = RecordedOpponentHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = RecordedOpponentHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = RecordedOpponentHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = RecordedOpponentHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = RecordedOpponentHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = RecordedOpponentHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = RecordedOpponentHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = RecordedOpponentHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = RecordedOpponentHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = RecordedOpponentHandleResetActionMoveSelection,
|
||||
[CONTROLLER_55] = RecordedOpponentHandleCmd55,
|
||||
[CONTROLLER_DEBUGMENU] = RecordedOpponentHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = RecordedOpponentCmdEnd
|
||||
};
|
||||
|
||||
static void nullsub_70(void)
|
||||
@ -1237,7 +1237,7 @@ static void RecordedOpponentHandleDrawTrainerPic(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
trainerPicId = PlayerGenderToFrontTrainerPicId(gLinkPlayers[gUnknown_0203C7B4 ^ BIT_SIDE].gender);
|
||||
trainerPicId = PlayerGenderToFrontTrainerPicId(gLinkPlayers[gRecordedBattleMultiplayerId ^ BIT_SIDE].gender);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1545,27 +1545,27 @@ static void RecordedOpponentHandleOneReturnValue_Duplicate(void)
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void RecordedOpponentHandleCmd37(void)
|
||||
static void RecordedOpponentHandleClearUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = 0;
|
||||
gUnusedControllerStruct.unk = 0;
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void RecordedOpponentHandleCmd38(void)
|
||||
static void RecordedOpponentHandleSetUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = gBattleResources->bufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleResources->bufferA[gActiveBattler][1];
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void RecordedOpponentHandleCmd39(void)
|
||||
static void RecordedOpponentHandleClearUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 = 0;
|
||||
gUnusedControllerStruct.flag = 0;
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void RecordedOpponentHandleCmd40(void)
|
||||
static void RecordedOpponentHandleToggleUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 ^= 1;
|
||||
gUnusedControllerStruct.flag ^= 1;
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@ -1634,7 +1634,6 @@ static void RecordedOpponentHandleIntroSlide(void)
|
||||
|
||||
static void RecordedOpponentHandleIntroTrainerBallThrow(void)
|
||||
{
|
||||
u8 paletteNum;
|
||||
u8 taskId;
|
||||
|
||||
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||
|
@ -65,10 +65,10 @@ static void RecordedPlayerHandleTwoReturnValues(void);
|
||||
static void RecordedPlayerHandleChosenMonReturnValue(void);
|
||||
static void RecordedPlayerHandleOneReturnValue(void);
|
||||
static void RecordedPlayerHandleOneReturnValue_Duplicate(void);
|
||||
static void RecordedPlayerHandleCmd37(void);
|
||||
static void RecordedPlayerHandleCmd38(void);
|
||||
static void RecordedPlayerHandleCmd39(void);
|
||||
static void RecordedPlayerHandleCmd40(void);
|
||||
static void RecordedPlayerHandleClearUnkVar(void);
|
||||
static void RecordedPlayerHandleSetUnkVar(void);
|
||||
static void RecordedPlayerHandleClearUnkFlag(void);
|
||||
static void RecordedPlayerHandleToggleUnkFlag(void);
|
||||
static void RecordedPlayerHandleHitAnimation(void);
|
||||
static void RecordedPlayerHandleCmd42(void);
|
||||
static void RecordedPlayerHandlePlaySE(void);
|
||||
@ -99,63 +99,63 @@ static void sub_818CDF4(void);
|
||||
|
||||
static void (*const sRecordedPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
RecordedPlayerHandleGetMonData,
|
||||
RecordedPlayerHandleGetRawMonData,
|
||||
RecordedPlayerHandleSetMonData,
|
||||
RecordedPlayerHandleSetRawMonData,
|
||||
RecordedPlayerHandleLoadMonSprite,
|
||||
RecordedPlayerHandleSwitchInAnim,
|
||||
RecordedPlayerHandleReturnMonToBall,
|
||||
RecordedPlayerHandleDrawTrainerPic,
|
||||
RecordedPlayerHandleTrainerSlide,
|
||||
RecordedPlayerHandleTrainerSlideBack,
|
||||
RecordedPlayerHandleFaintAnimation,
|
||||
RecordedPlayerHandlePaletteFade,
|
||||
RecordedPlayerHandleSuccessBallThrowAnim,
|
||||
RecordedPlayerHandleBallThrowAnim,
|
||||
RecordedPlayerHandlePause,
|
||||
RecordedPlayerHandleMoveAnimation,
|
||||
RecordedPlayerHandlePrintString,
|
||||
RecordedPlayerHandlePrintSelectionString,
|
||||
RecordedPlayerHandleChooseAction,
|
||||
RecordedPlayerHandleUnknownYesNoBox,
|
||||
RecordedPlayerHandleChooseMove,
|
||||
RecordedPlayerHandleChooseItem,
|
||||
RecordedPlayerHandleChoosePokemon,
|
||||
RecordedPlayerHandleCmd23,
|
||||
RecordedPlayerHandleHealthBarUpdate,
|
||||
RecordedPlayerHandleExpUpdate,
|
||||
RecordedPlayerHandleStatusIconUpdate,
|
||||
RecordedPlayerHandleStatusAnimation,
|
||||
RecordedPlayerHandleStatusXor,
|
||||
RecordedPlayerHandleDataTransfer,
|
||||
RecordedPlayerHandleDMA3Transfer,
|
||||
RecordedPlayerHandlePlayBGM,
|
||||
RecordedPlayerHandleCmd32,
|
||||
RecordedPlayerHandleTwoReturnValues,
|
||||
RecordedPlayerHandleChosenMonReturnValue,
|
||||
RecordedPlayerHandleOneReturnValue,
|
||||
RecordedPlayerHandleOneReturnValue_Duplicate,
|
||||
RecordedPlayerHandleCmd37,
|
||||
RecordedPlayerHandleCmd38,
|
||||
RecordedPlayerHandleCmd39,
|
||||
RecordedPlayerHandleCmd40,
|
||||
RecordedPlayerHandleHitAnimation,
|
||||
RecordedPlayerHandleCmd42,
|
||||
RecordedPlayerHandlePlaySE,
|
||||
RecordedPlayerHandlePlayFanfareOrBGM,
|
||||
RecordedPlayerHandleFaintingCry,
|
||||
RecordedPlayerHandleIntroSlide,
|
||||
RecordedPlayerHandleIntroTrainerBallThrow,
|
||||
RecordedPlayerHandleDrawPartyStatusSummary,
|
||||
RecordedPlayerHandleHidePartyStatusSummary,
|
||||
RecordedPlayerHandleEndBounceEffect,
|
||||
RecordedPlayerHandleSpriteInvisibility,
|
||||
RecordedPlayerHandleBattleAnimation,
|
||||
RecordedPlayerHandleLinkStandbyMsg,
|
||||
RecordedPlayerHandleResetActionMoveSelection,
|
||||
RecordedPlayerHandleCmd55,
|
||||
RecordedPlayerCmdEnd
|
||||
[CONTROLLER_GETMONDATA] = RecordedPlayerHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = RecordedPlayerHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = RecordedPlayerHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = RecordedPlayerHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = RecordedPlayerHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = RecordedPlayerHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = RecordedPlayerHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = RecordedPlayerHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = RecordedPlayerHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = RecordedPlayerHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = RecordedPlayerHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = RecordedPlayerHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = RecordedPlayerHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = RecordedPlayerHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = RecordedPlayerHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = RecordedPlayerHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = RecordedPlayerHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = RecordedPlayerHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = RecordedPlayerHandleChooseAction,
|
||||
[CONTROLLER_UNKNOWNYESNOBOX] = RecordedPlayerHandleUnknownYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = RecordedPlayerHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = RecordedPlayerHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = RecordedPlayerHandleChoosePokemon,
|
||||
[CONTROLLER_23] = RecordedPlayerHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = RecordedPlayerHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = RecordedPlayerHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = RecordedPlayerHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = RecordedPlayerHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = RecordedPlayerHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = RecordedPlayerHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = RecordedPlayerHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = RecordedPlayerHandlePlayBGM,
|
||||
[CONTROLLER_32] = RecordedPlayerHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = RecordedPlayerHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = RecordedPlayerHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = RecordedPlayerHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = RecordedPlayerHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = RecordedPlayerHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = RecordedPlayerHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = RecordedPlayerHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = RecordedPlayerHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = RecordedPlayerHandleHitAnimation,
|
||||
[CONTROLLER_42] = RecordedPlayerHandleCmd42,
|
||||
[CONTROLLER_PLAYSE] = RecordedPlayerHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = RecordedPlayerHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = RecordedPlayerHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = RecordedPlayerHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = RecordedPlayerHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = RecordedPlayerHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = RecordedPlayerHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = RecordedPlayerHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = RecordedPlayerHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = RecordedPlayerHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = RecordedPlayerHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = RecordedPlayerHandleResetActionMoveSelection,
|
||||
[CONTROLLER_55] = RecordedPlayerHandleCmd55,
|
||||
[CONTROLLER_TERMINATOR_NOP] = RecordedPlayerCmdEnd
|
||||
};
|
||||
|
||||
static void nullsub_120(void)
|
||||
@ -1186,12 +1186,12 @@ static void RecordedPlayerHandleDrawTrainerPic(void)
|
||||
s16 xPos, yPos;
|
||||
u32 trainerPicId;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
trainerPicId = GetActiveBattlerLinkPlayerGender();
|
||||
else
|
||||
trainerPicId = gLinkPlayers[gUnknown_0203C7B4].gender;
|
||||
trainerPicId = gLinkPlayers[gRecordedBattleMultiplayerId].gender;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1560,27 +1560,27 @@ static void RecordedPlayerHandleOneReturnValue_Duplicate(void)
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void RecordedPlayerHandleCmd37(void)
|
||||
static void RecordedPlayerHandleClearUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = 0;
|
||||
gUnusedControllerStruct.unk = 0;
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void RecordedPlayerHandleCmd38(void)
|
||||
static void RecordedPlayerHandleSetUnkVar(void)
|
||||
{
|
||||
gUnknown_02022D0C.field_0 = gBattleResources->bufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleResources->bufferA[gActiveBattler][1];
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void RecordedPlayerHandleCmd39(void)
|
||||
static void RecordedPlayerHandleClearUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 = 0;
|
||||
gUnusedControllerStruct.flag = 0;
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void RecordedPlayerHandleCmd40(void)
|
||||
static void RecordedPlayerHandleToggleUnkFlag(void)
|
||||
{
|
||||
gUnknown_02022D0C.flag_x80 ^= 1;
|
||||
gUnusedControllerStruct.flag ^= 1;
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@ -1665,7 +1665,7 @@ static void RecordedPlayerHandleIntroTrainerBallThrow(void)
|
||||
StartSpriteAnim(&gSprites[gBattlerSpriteIds[gActiveBattler]], 1);
|
||||
|
||||
paletteNum = AllocSpritePalette(0xD6F9);
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
trainerPicId = gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender;
|
||||
else
|
||||
trainerPicId = gSaveBlock2Ptr->playerGender;
|
||||
|
@ -62,10 +62,10 @@ static void SafariHandleTwoReturnValues(void);
|
||||
static void SafariHandleChosenMonReturnValue(void);
|
||||
static void SafariHandleOneReturnValue(void);
|
||||
static void SafariHandleOneReturnValue_Duplicate(void);
|
||||
static void SafariHandleCmd37(void);
|
||||
static void SafariHandleCmd38(void);
|
||||
static void SafariHandleCmd39(void);
|
||||
static void SafariHandleCmd40(void);
|
||||
static void SafariHandleClearUnkVar(void);
|
||||
static void SafariHandleSetUnkVar(void);
|
||||
static void SafariHandleClearUnkFlag(void);
|
||||
static void SafariHandleToggleUnkFlag(void);
|
||||
static void SafariHandleHitAnimation(void);
|
||||
static void SafariHandleCmd42(void);
|
||||
static void SafariHandlePlaySE(void);
|
||||
@ -90,64 +90,64 @@ static void CompleteWhenChosePokeblock(void);
|
||||
|
||||
static void (*const sSafariBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
SafariHandleGetMonData,
|
||||
SafariHandleGetRawMonData,
|
||||
SafariHandleSetMonData,
|
||||
SafariHandleSetRawMonData,
|
||||
SafariHandleLoadMonSprite,
|
||||
SafariHandleSwitchInAnim,
|
||||
SafariHandleReturnMonToBall,
|
||||
SafariHandleDrawTrainerPic,
|
||||
SafariHandleTrainerSlide,
|
||||
SafariHandleTrainerSlideBack,
|
||||
SafariHandleFaintAnimation,
|
||||
SafariHandlePaletteFade,
|
||||
SafariHandleSuccessBallThrowAnim,
|
||||
SafariHandleBallThrowAnim,
|
||||
SafariHandlePause,
|
||||
SafariHandleMoveAnimation,
|
||||
SafariHandlePrintString,
|
||||
SafariHandlePrintSelectionString,
|
||||
SafariHandleChooseAction,
|
||||
SafariHandleUnknownYesNoBox,
|
||||
SafariHandleChooseMove,
|
||||
SafariHandleChooseItem,
|
||||
SafariHandleChoosePokemon,
|
||||
SafariHandleCmd23,
|
||||
SafariHandleHealthBarUpdate,
|
||||
SafariHandleExpUpdate,
|
||||
SafariHandleStatusIconUpdate,
|
||||
SafariHandleStatusAnimation,
|
||||
SafariHandleStatusXor,
|
||||
SafariHandleDataTransfer,
|
||||
SafariHandleDMA3Transfer,
|
||||
SafariHandlePlayBGM,
|
||||
SafariHandleCmd32,
|
||||
SafariHandleTwoReturnValues,
|
||||
SafariHandleChosenMonReturnValue,
|
||||
SafariHandleOneReturnValue,
|
||||
SafariHandleOneReturnValue_Duplicate,
|
||||
SafariHandleCmd37,
|
||||
SafariHandleCmd38,
|
||||
SafariHandleCmd39,
|
||||
SafariHandleCmd40,
|
||||
SafariHandleHitAnimation,
|
||||
SafariHandleCmd42,
|
||||
SafariHandlePlaySE,
|
||||
SafariHandlePlayFanfareOrBGM,
|
||||
SafariHandleFaintingCry,
|
||||
SafariHandleIntroSlide,
|
||||
SafariHandleIntroTrainerBallThrow,
|
||||
SafariHandleDrawPartyStatusSummary,
|
||||
SafariHandleHidePartyStatusSummary,
|
||||
SafariHandleEndBounceEffect,
|
||||
SafariHandleSpriteInvisibility,
|
||||
SafariHandleBattleAnimation,
|
||||
SafariHandleLinkStandbyMsg,
|
||||
SafariHandleResetActionMoveSelection,
|
||||
SafariHandleCmd55,
|
||||
SafariHandleBattleDebug,
|
||||
SafariCmdEnd
|
||||
[CONTROLLER_GETMONDATA] = SafariHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = SafariHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = SafariHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = SafariHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = SafariHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = SafariHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = SafariHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = SafariHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = SafariHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = SafariHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = SafariHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = SafariHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = SafariHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = SafariHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = SafariHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = SafariHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = SafariHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = SafariHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = SafariHandleChooseAction,
|
||||
[CONTROLLER_UNKNOWNYESNOBOX] = SafariHandleUnknownYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = SafariHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = SafariHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = SafariHandleChoosePokemon,
|
||||
[CONTROLLER_23] = SafariHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = SafariHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = SafariHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = SafariHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = SafariHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = SafariHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = SafariHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = SafariHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = SafariHandlePlayBGM,
|
||||
[CONTROLLER_32] = SafariHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = SafariHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = SafariHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = SafariHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = SafariHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = SafariHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = SafariHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = SafariHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = SafariHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = SafariHandleHitAnimation,
|
||||
[CONTROLLER_42] = SafariHandleCmd42,
|
||||
[CONTROLLER_PLAYSE] = SafariHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = SafariHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = SafariHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = SafariHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = SafariHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = SafariHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = SafariHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = SafariHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = SafariHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = SafariHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = SafariHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = SafariHandleResetActionMoveSelection,
|
||||
[CONTROLLER_55] = SafariHandleCmd55,
|
||||
[CONTROLLER_DEBUGMENU] = SafariHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = SafariCmdEnd
|
||||
};
|
||||
|
||||
static void SpriteCB_Null4(void)
|
||||
@ -472,8 +472,6 @@ static void SafariHandleChooseMove(void)
|
||||
|
||||
static void SafariHandleChooseItem(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattlerControllerFuncs[gActiveBattler] = SafariOpenPokeblockCase;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
@ -555,22 +553,22 @@ static void SafariHandleOneReturnValue_Duplicate(void)
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleCmd37(void)
|
||||
static void SafariHandleClearUnkVar(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleCmd38(void)
|
||||
static void SafariHandleSetUnkVar(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleCmd39(void)
|
||||
static void SafariHandleClearUnkFlag(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleCmd40(void)
|
||||
static void SafariHandleToggleUnkFlag(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
@ -70,10 +70,10 @@ static void WallyHandleTwoReturnValues(void);
|
||||
static void WallyHandleChosenMonReturnValue(void);
|
||||
static void WallyHandleOneReturnValue(void);
|
||||
static void WallyHandleOneReturnValue_Duplicate(void);
|
||||
static void WallyHandleCmd37(void);
|
||||
static void WallyHandleCmd38(void);
|
||||
static void WallyHandleCmd39(void);
|
||||
static void WallyHandleCmd40(void);
|
||||
static void WallyHandleClearUnkVar(void);
|
||||
static void WallyHandleSetUnkVar(void);
|
||||
static void WallyHandleClearUnkFlag(void);
|
||||
static void WallyHandleToggleUnkFlag(void);
|
||||
static void WallyHandleHitAnimation(void);
|
||||
static void WallyHandleCmd42(void);
|
||||
static void WallyHandlePlaySE(void);
|
||||
@ -103,64 +103,64 @@ static void sub_816AC04(u8 taskId);
|
||||
|
||||
static void (*const sWallyBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
WallyHandleGetMonData,
|
||||
WallyHandleGetRawMonData,
|
||||
WallyHandleSetMonData,
|
||||
WallyHandleSetRawMonData,
|
||||
WallyHandleLoadMonSprite,
|
||||
WallyHandleSwitchInAnim,
|
||||
WallyHandleReturnMonToBall,
|
||||
WallyHandleDrawTrainerPic,
|
||||
WallyHandleTrainerSlide,
|
||||
WallyHandleTrainerSlideBack,
|
||||
WallyHandleFaintAnimation,
|
||||
WallyHandlePaletteFade,
|
||||
WallyHandleSuccessBallThrowAnim,
|
||||
WallyHandleBallThrowAnim,
|
||||
WallyHandlePause,
|
||||
WallyHandleMoveAnimation,
|
||||
WallyHandlePrintString,
|
||||
WallyHandlePrintSelectionString,
|
||||
WallyHandleChooseAction,
|
||||
WallyHandleUnknownYesNoBox,
|
||||
WallyHandleChooseMove,
|
||||
WallyHandleChooseItem,
|
||||
WallyHandleChoosePokemon,
|
||||
WallyHandleCmd23,
|
||||
WallyHandleHealthBarUpdate,
|
||||
WallyHandleExpUpdate,
|
||||
WallyHandleStatusIconUpdate,
|
||||
WallyHandleStatusAnimation,
|
||||
WallyHandleStatusXor,
|
||||
WallyHandleDataTransfer,
|
||||
WallyHandleDMA3Transfer,
|
||||
WallyHandlePlayBGM,
|
||||
WallyHandleCmd32,
|
||||
WallyHandleTwoReturnValues,
|
||||
WallyHandleChosenMonReturnValue,
|
||||
WallyHandleOneReturnValue,
|
||||
WallyHandleOneReturnValue_Duplicate,
|
||||
WallyHandleCmd37,
|
||||
WallyHandleCmd38,
|
||||
WallyHandleCmd39,
|
||||
WallyHandleCmd40,
|
||||
WallyHandleHitAnimation,
|
||||
WallyHandleCmd42,
|
||||
WallyHandlePlaySE,
|
||||
WallyHandlePlayFanfareOrBGM,
|
||||
WallyHandleFaintingCry,
|
||||
WallyHandleIntroSlide,
|
||||
WallyHandleIntroTrainerBallThrow,
|
||||
WallyHandleDrawPartyStatusSummary,
|
||||
WallyHandleHidePartyStatusSummary,
|
||||
WallyHandleEndBounceEffect,
|
||||
WallyHandleSpriteInvisibility,
|
||||
WallyHandleBattleAnimation,
|
||||
WallyHandleLinkStandbyMsg,
|
||||
WallyHandleResetActionMoveSelection,
|
||||
WallyHandleCmd55,
|
||||
WallyHandleBattleDebug,
|
||||
WallyCmdEnd
|
||||
[CONTROLLER_GETMONDATA] = WallyHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = WallyHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = WallyHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = WallyHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = WallyHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = WallyHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = WallyHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = WallyHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = WallyHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = WallyHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = WallyHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = WallyHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = WallyHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = WallyHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = WallyHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = WallyHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = WallyHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = WallyHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = WallyHandleChooseAction,
|
||||
[CONTROLLER_UNKNOWNYESNOBOX] = WallyHandleUnknownYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = WallyHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = WallyHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = WallyHandleChoosePokemon,
|
||||
[CONTROLLER_23] = WallyHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = WallyHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = WallyHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = WallyHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = WallyHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = WallyHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = WallyHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = WallyHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = WallyHandlePlayBGM,
|
||||
[CONTROLLER_32] = WallyHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = WallyHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = WallyHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = WallyHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = WallyHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = WallyHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = WallyHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = WallyHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = WallyHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = WallyHandleHitAnimation,
|
||||
[CONTROLLER_42] = WallyHandleCmd42,
|
||||
[CONTROLLER_PLAYSE] = WallyHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = WallyHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = WallyHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = WallyHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = WallyHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = WallyHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = WallyHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = WallyHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = WallyHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = WallyHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = WallyHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = WallyHandleResetActionMoveSelection,
|
||||
[CONTROLLER_55] = WallyHandleCmd55,
|
||||
[CONTROLLER_DEBUGMENU] = WallyHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = WallyCmdEnd
|
||||
};
|
||||
|
||||
static void SpriteCB_Null7(void)
|
||||
@ -1347,22 +1347,22 @@ static void WallyHandleOneReturnValue_Duplicate(void)
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleCmd37(void)
|
||||
static void WallyHandleClearUnkVar(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleCmd38(void)
|
||||
static void WallyHandleSetUnkVar(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleCmd39(void)
|
||||
static void WallyHandleClearUnkFlag(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleCmd40(void)
|
||||
static void WallyHandleToggleUnkFlag(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
static EWRAM_DATA u8 sLinkSendTaskId = 0;
|
||||
static EWRAM_DATA u8 sLinkReceiveTaskId = 0;
|
||||
static EWRAM_DATA u8 sUnknown_02022D0A = 0;
|
||||
EWRAM_DATA struct UnusedControllerStruct gUnknown_02022D0C = {};
|
||||
EWRAM_DATA struct UnusedControllerStruct gUnusedControllerStruct = {}; // Debug? Unused code that writes to it, never read
|
||||
static EWRAM_DATA u8 sBattleBuffersTransferData[0x100] = {};
|
||||
|
||||
// this file's funcionts
|
||||
@ -66,7 +66,7 @@ void SetUpBattleVarsAndBirchZigzagoon(void)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
|
||||
{
|
||||
ZeroEnemyPartyMons();
|
||||
CreateMon(&gEnemyParty[0], SPECIES_ZIGZAGOON, 2, 32, 0, 0, OT_ID_PLAYER_ID, 0);
|
||||
CreateMon(&gEnemyParty[0], SPECIES_ZIGZAGOON, 2, USE_RANDOM_IVS, 0, 0, OT_ID_PLAYER_ID, 0);
|
||||
i = 0;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &i);
|
||||
}
|
||||
@ -184,9 +184,9 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x80000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER)
|
||||
{
|
||||
gBattleMainFunc = BeginBattleIntro;
|
||||
|
||||
@ -269,9 +269,9 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
{
|
||||
u8 var; // multiplayer Id in a recorded battle?
|
||||
u8 multiplayerId;
|
||||
|
||||
for (var = gUnknown_0203C7B4, i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
for (multiplayerId = gRecordedBattleMultiplayerId, i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
switch (gLinkPlayers[i].id)
|
||||
{
|
||||
@ -285,7 +285,7 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == var)
|
||||
if (i == multiplayerId)
|
||||
{
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToRecordedPlayer;
|
||||
switch (gLinkPlayers[i].id)
|
||||
@ -302,8 +302,8 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[var].id & 1))
|
||||
|| ((gLinkPlayers[i].id & 1) && (gLinkPlayers[var].id & 1)))
|
||||
else if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[multiplayerId].id & 1))
|
||||
|| ((gLinkPlayers[i].id & 1) && (gLinkPlayers[multiplayerId].id & 1)))
|
||||
{
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToRecordedPlayer;
|
||||
switch (gLinkPlayers[i].id)
|
||||
@ -347,7 +347,7 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
gBattlerControllerFuncs[2] = SetControllerToRecordedPlayer;
|
||||
gBattlerPositions[2] = B_POSITION_PLAYER_RIGHT;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
gBattlerControllerFuncs[1] = SetControllerToRecordedOpponent;
|
||||
gBattlerPositions[1] = B_POSITION_OPPONENT_LEFT;
|
||||
@ -372,7 +372,7 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
gBattlerControllerFuncs[3] = SetControllerToRecordedPlayer;
|
||||
gBattlerPositions[3] = B_POSITION_PLAYER_RIGHT;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
gBattlerControllerFuncs[0] = SetControllerToRecordedOpponent;
|
||||
gBattlerPositions[0] = B_POSITION_OPPONENT_LEFT;
|
||||
@ -835,7 +835,7 @@ void sub_8033648(void)
|
||||
s32 j;
|
||||
u8 *recvBuffer;
|
||||
|
||||
if (gReceivedRemoteLinkPlayers != 0 && (gBattleTypeFlags & BATTLE_TYPE_20))
|
||||
if (gReceivedRemoteLinkPlayers != 0 && (gBattleTypeFlags & BATTLE_TYPE_LINK_IN_BATTLE))
|
||||
{
|
||||
DestroyTask_RfuIdle();
|
||||
for (i = 0; i < GetLinkPlayerCount(); i++)
|
||||
@ -1293,7 +1293,7 @@ void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *unusedDumbDataPara
|
||||
{
|
||||
s32 i;
|
||||
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_31;
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_PLAYBGM;
|
||||
sBattleBuffersTransferData[1] = songId;
|
||||
sBattleBuffersTransferData[2] = (songId & 0xFF00) >> 8;
|
||||
for (i = 0; i < songId; i++) // ????
|
||||
@ -1351,37 +1351,37 @@ void BtlController_EmitOneReturnValue_Duplicate(u8 bufferId, u16 b)
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitCmd37(u8 bufferId)
|
||||
void BtlController_EmitClearUnkVar(u8 bufferId)
|
||||
{
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_37;
|
||||
sBattleBuffersTransferData[1] = CONTROLLER_37;
|
||||
sBattleBuffersTransferData[2] = CONTROLLER_37;
|
||||
sBattleBuffersTransferData[3] = CONTROLLER_37;
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_CLEARUNKVAR;
|
||||
sBattleBuffersTransferData[1] = CONTROLLER_CLEARUNKVAR;
|
||||
sBattleBuffersTransferData[2] = CONTROLLER_CLEARUNKVAR;
|
||||
sBattleBuffersTransferData[3] = CONTROLLER_CLEARUNKVAR;
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitCmd38(u8 bufferId, u8 b)
|
||||
void BtlController_EmitSetUnkVar(u8 bufferId, u8 b)
|
||||
{
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_38;
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_SETUNKVAR;
|
||||
sBattleBuffersTransferData[1] = b;
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 2);
|
||||
}
|
||||
|
||||
void BtlController_EmitCmd39(u8 bufferId)
|
||||
void BtlController_EmitClearUnkFlag(u8 bufferId)
|
||||
{
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_39;
|
||||
sBattleBuffersTransferData[1] = CONTROLLER_39;
|
||||
sBattleBuffersTransferData[2] = CONTROLLER_39;
|
||||
sBattleBuffersTransferData[3] = CONTROLLER_39;
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_CLEARUNKFLAG;
|
||||
sBattleBuffersTransferData[1] = CONTROLLER_CLEARUNKFLAG;
|
||||
sBattleBuffersTransferData[2] = CONTROLLER_CLEARUNKFLAG;
|
||||
sBattleBuffersTransferData[3] = CONTROLLER_CLEARUNKFLAG;
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitCmd40(u8 bufferId)
|
||||
void BtlController_EmitToggleUnkFlag(u8 bufferId)
|
||||
{
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_40;
|
||||
sBattleBuffersTransferData[1] = CONTROLLER_40;
|
||||
sBattleBuffersTransferData[2] = CONTROLLER_40;
|
||||
sBattleBuffersTransferData[3] = CONTROLLER_40;
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_TOGGLEUNKFLAG;
|
||||
sBattleBuffersTransferData[1] = CONTROLLER_TOGGLEUNKFLAG;
|
||||
sBattleBuffersTransferData[2] = CONTROLLER_TOGGLEUNKFLAG;
|
||||
sBattleBuffersTransferData[3] = CONTROLLER_TOGGLEUNKFLAG;
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
|
||||
}
|
||||
|
||||
@ -1405,7 +1405,7 @@ void BtlController_EmitCmd42(u8 bufferId)
|
||||
|
||||
void BtlController_EmitPlaySE(u8 bufferId, u16 songId)
|
||||
{
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_EFFECTIVENESSSOUND;
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_PLAYSE;
|
||||
sBattleBuffersTransferData[1] = songId;
|
||||
sBattleBuffersTransferData[2] = (songId & 0xFF00) >> 8;
|
||||
sBattleBuffersTransferData[3] = 0;
|
||||
|
@ -2866,7 +2866,7 @@ static u8 GetDomeTrainerMonIvs(u16 trainerId)
|
||||
else if (trainerId <= FRONTIER_TRAINER_TESS) // 200 - 219
|
||||
fixedIv = 21;
|
||||
else // 220+ (- 299)
|
||||
fixedIv = 31;
|
||||
fixedIv = MAX_PER_STAT_IVS;
|
||||
|
||||
return fixedIv;
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ static void InitFactoryChallenge(void);
|
||||
static void GetBattleFactoryData(void);
|
||||
static void SetBattleFactoryData(void);
|
||||
static void SaveFactoryChallenge(void);
|
||||
static void nullsub_75(void);
|
||||
static void nullsub_123(void);
|
||||
static void FactoryDummy1(void);
|
||||
static void FactoryDummy2(void);
|
||||
static void SelectInitialRentalMons(void);
|
||||
static void SwapRentalMons(void);
|
||||
static void SetPerformedRentalSwap(void);
|
||||
@ -41,8 +41,16 @@ static void RestorePlayerPartyHeldItems(void);
|
||||
static u16 GetFactoryMonId(u8 lvlMode, u8 challengeNum, bool8 arg2);
|
||||
static u8 GetMoveBattleStyle(u16 move);
|
||||
|
||||
// Const rom data.
|
||||
static const u8 sRequiredMoveCounts[] = {3, 3, 3, 2, 2, 2, 2};
|
||||
// Number of moves needed on the team to be considered using a certain battle style
|
||||
static const u8 sRequiredMoveCounts[FACTORY_NUM_STYLES - 1] = {
|
||||
[FACTORY_STYLE_PREPARATION - 1] = 3,
|
||||
[FACTORY_STYLE_SLOW_STEADY - 1] = 3,
|
||||
[FACTORY_STYLE_ENDURANCE - 1] = 3,
|
||||
[FACTORY_STYLE_HIGH_RISK - 1] = 2,
|
||||
[FACTORY_STYLE_WEAKENING - 1] = 2,
|
||||
[FACTORY_STYLE_UNPREDICTABLE - 1] = 2,
|
||||
[FACTORY_STYLE_WEATHER - 1] = 2
|
||||
};
|
||||
|
||||
static const u16 sMoves_TotalPreparation[] =
|
||||
{
|
||||
@ -119,8 +127,8 @@ static void (* const sBattleFactoryFunctions[])(void) =
|
||||
[BATTLE_FACTORY_FUNC_GET_DATA] = GetBattleFactoryData,
|
||||
[BATTLE_FACTORY_FUNC_SET_DATA] = SetBattleFactoryData,
|
||||
[BATTLE_FACTORY_FUNC_SAVE] = SaveFactoryChallenge,
|
||||
[BATTLE_FACTORY_FUNC_NULL] = nullsub_75,
|
||||
[BATTLE_FACTORY_FUNC_NULL2] = nullsub_123,
|
||||
[BATTLE_FACTORY_FUNC_NULL] = FactoryDummy1,
|
||||
[BATTLE_FACTORY_FUNC_NULL2] = FactoryDummy2,
|
||||
[BATTLE_FACTORY_FUNC_SELECT_RENT_MONS] = SelectInitialRentalMons,
|
||||
[BATTLE_FACTORY_FUNC_SWAP_RENT_MONS] = SwapRentalMons,
|
||||
[BATTLE_FACTORY_FUNC_SET_SWAPPED] = SetPerformedRentalSwap,
|
||||
@ -266,12 +274,12 @@ static void SaveFactoryChallenge(void)
|
||||
SaveGameFrontier();
|
||||
}
|
||||
|
||||
static void nullsub_75(void)
|
||||
static void FactoryDummy1(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void nullsub_123(void)
|
||||
static void FactoryDummy2(void)
|
||||
{
|
||||
|
||||
}
|
||||
@ -376,10 +384,10 @@ static void SetRentalsToOpponentParty(void)
|
||||
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gFrontierTempParty[i];
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].personality = GetMonData(&gEnemyParty[i], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].monId = gFrontierTempParty[i];
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].personality = GetMonData(&gEnemyParty[i], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].abilityNum = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gFrontierTempParty[i]].itemTableId]);
|
||||
}
|
||||
}
|
||||
@ -455,13 +463,13 @@ static void SetPlayerAndOpponentParties(void)
|
||||
case 2:
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
monId = gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId;
|
||||
ivs = gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs;
|
||||
monId = gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].monId;
|
||||
ivs = gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].ivs;
|
||||
CreateMon(&gEnemyParty[i],
|
||||
gFacilityTrainerMons[monId].species,
|
||||
monLevel,
|
||||
ivs,
|
||||
TRUE, gSaveBlock2Ptr->frontier.rentalMons[i + 3].personality,
|
||||
TRUE, gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].personality,
|
||||
OT_ID_PLAYER_ID, 0);
|
||||
|
||||
count = 0;
|
||||
@ -484,7 +492,7 @@ static void SetPlayerAndOpponentParties(void)
|
||||
for (k = 0; k < MAX_MON_MOVES; k++)
|
||||
SetMonMoveAvoidReturn(&gEnemyParty[i], gFacilityTrainerMons[monId].moves[k], k);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId]);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].abilityNum);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -639,7 +647,7 @@ static void GetOpponentBattleStyle(void)
|
||||
}
|
||||
}
|
||||
|
||||
gSpecialVar_Result = 0;
|
||||
gSpecialVar_Result = FACTORY_STYLE_NONE;
|
||||
for (i = 1; i < FACTORY_NUM_STYLES; i++)
|
||||
{
|
||||
if (stylePoints[i] >= sRequiredMoveCounts[i - 1])
|
||||
|
@ -964,11 +964,11 @@ void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite)
|
||||
position = GetBattlerPosition(battlerId);
|
||||
|
||||
if (IsContest())
|
||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpritesGfxPtr->sprites.ptr[position]);
|
||||
LZDecompressVram(gSubstituteDollBackGfx, gMonSpritesGfxPtr->sprites.ptr[position]);
|
||||
else if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
LZDecompressVram(gSubstituteDollGfx, gMonSpritesGfxPtr->sprites.ptr[position]);
|
||||
LZDecompressVram(gSubstituteDollFrontGfx, gMonSpritesGfxPtr->sprites.ptr[position]);
|
||||
else
|
||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpritesGfxPtr->sprites.ptr[position]);
|
||||
LZDecompressVram(gSubstituteDollBackGfx, gMonSpritesGfxPtr->sprites.ptr[position]);
|
||||
|
||||
for (i = 1; i < 4; i++)
|
||||
{
|
||||
|
@ -2059,7 +2059,6 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
{
|
||||
u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
void *ptr;
|
||||
const u8 *genderTxt;
|
||||
u32 windowId, spriteTileNum, species;
|
||||
u8 *windowTileData;
|
||||
u8 gender;
|
||||
|
@ -357,7 +357,7 @@ static void BattleIntroSlide3(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(8, 8));
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
gTasks[taskId].data[4] = BLDALPHA_BLEND(8, 8);
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
gTasks[taskId].data[2] = 16;
|
||||
gTasks[taskId].data[0]++;
|
||||
|
@ -975,7 +975,7 @@ static void CB2_HandleStartBattle(void)
|
||||
SetMainCallback2(BattleMainCB2);
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
gBattleTypeFlags |= BATTLE_TYPE_20;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_LINK_IN_BATTLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1229,7 +1229,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
SetMainCallback2(BattleMainCB2);
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
gBattleTypeFlags |= BATTLE_TYPE_20;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_LINK_IN_BATTLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1682,7 +1682,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
gTrainerBattleOpponent_A = TRAINER_LINK_OPPONENT;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_20;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_LINK_IN_BATTLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1835,7 +1835,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
|
||||
nameHash += gSpeciesNames[partyData[i].species][j];
|
||||
|
||||
personalityValue += nameHash << 8;
|
||||
fixedIV = partyData[i].iv * 31 / 255;
|
||||
fixedIV = partyData[i].iv * MAX_PER_STAT_IVS / 255;
|
||||
CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0);
|
||||
break;
|
||||
}
|
||||
@ -1847,7 +1847,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
|
||||
nameHash += gSpeciesNames[partyData[i].species][j];
|
||||
|
||||
personalityValue += nameHash << 8;
|
||||
fixedIV = partyData[i].iv * 31 / 255;
|
||||
fixedIV = partyData[i].iv * MAX_PER_STAT_IVS / 255;
|
||||
CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0);
|
||||
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
@ -1865,7 +1865,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
|
||||
nameHash += gSpeciesNames[partyData[i].species][j];
|
||||
|
||||
personalityValue += nameHash << 8;
|
||||
fixedIV = partyData[i].iv * 31 / 255;
|
||||
fixedIV = partyData[i].iv * MAX_PER_STAT_IVS / 255;
|
||||
CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0);
|
||||
|
||||
SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem);
|
||||
@ -1879,7 +1879,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
|
||||
nameHash += gSpeciesNames[partyData[i].species][j];
|
||||
|
||||
personalityValue += nameHash << 8;
|
||||
fixedIV = partyData[i].iv * 31 / 255;
|
||||
fixedIV = partyData[i].iv * MAX_PER_STAT_IVS / 255;
|
||||
CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0);
|
||||
|
||||
SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem);
|
||||
@ -2040,7 +2040,7 @@ void sub_8038D64(void)
|
||||
|
||||
SetHBlankCallback(NULL);
|
||||
SetVBlankCallback(NULL);
|
||||
gBattleTypeFlags &= ~(BATTLE_TYPE_20);
|
||||
gBattleTypeFlags &= ~(BATTLE_TYPE_LINK_IN_BATTLE);
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
{
|
||||
@ -2581,7 +2581,7 @@ void SpriteCB_FaintOpponentMon(struct Sprite *sprite)
|
||||
if (species == SPECIES_UNOWN)
|
||||
{
|
||||
u32 personalityValue = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_PERSONALITY);
|
||||
u16 unownForm = ((((personalityValue & 0x3000000) >> 18) | ((personalityValue & 0x30000) >> 12) | ((personalityValue & 0x300) >> 6) | (personalityValue & 3)) % 0x1C);
|
||||
u16 unownForm = GET_UNOWN_LETTER(personalityValue);
|
||||
u16 unownSpecies;
|
||||
|
||||
if (unownForm == 0)
|
||||
@ -2662,7 +2662,7 @@ void SpriteCb_OpponentMonFromBall(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
if (!(gHitMarker & HITMARKER_NO_ANIMATIONS) || gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (!(gHitMarker & HITMARKER_NO_ANIMATIONS) || gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
if (HasTwoFramesAnimation(sprite->sSpeciesId))
|
||||
StartSpriteAnim(sprite, 1);
|
||||
@ -2902,7 +2902,7 @@ static void BattleStartClearSetData(void)
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_LINK) && gSaveBlock2Ptr->optionsBattleSceneOff == TRUE)
|
||||
gHitMarker |= HITMARKER_NO_ANIMATIONS;
|
||||
}
|
||||
else if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) && GetBattleSceneInRecordedBattle())
|
||||
else if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)) && GetBattleSceneInRecordedBattle())
|
||||
{
|
||||
gHitMarker |= HITMARKER_NO_ANIMATIONS;
|
||||
}
|
||||
@ -3335,7 +3335,7 @@ static void DoBattleIntro(void)
|
||||
}
|
||||
break;
|
||||
case 9: // print opponent sends out
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000 && !(gBattleTypeFlags & BATTLE_TYPE_x80000000))
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && !(gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER))
|
||||
PrepareStringBattle(STRINGID_INTROSENDOUT, GetBattlerAtPosition(B_POSITION_PLAYER_LEFT));
|
||||
else
|
||||
PrepareStringBattle(STRINGID_INTROSENDOUT, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT));
|
||||
@ -3346,7 +3346,7 @@ static void DoBattleIntro(void)
|
||||
(*state)++;
|
||||
break;
|
||||
case 11: // first opponent's mon send out animation
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000 && !(gBattleTypeFlags & BATTLE_TYPE_x80000000))
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && !(gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER))
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
else
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
|
||||
@ -3360,7 +3360,7 @@ static void DoBattleIntro(void)
|
||||
case 13: // second opponent's mon send out
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_TWO_OPPONENTS) && !BATTLE_TWO_VS_ONE_OPPONENT)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000 && !(gBattleTypeFlags & BATTLE_TYPE_x80000000))
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && !(gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER))
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
||||
else
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
|
||||
@ -3368,7 +3368,7 @@ static void DoBattleIntro(void)
|
||||
BtlController_EmitIntroTrainerBallThrow(0);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
if (B_FAST_INTRO && !(gBattleTypeFlags & (BATTLE_TYPE_RECORDED | BATTLE_TYPE_x2000000 | BATTLE_TYPE_x80000000 | BATTLE_TYPE_LINK)))
|
||||
if (B_FAST_INTRO && !(gBattleTypeFlags & (BATTLE_TYPE_RECORDED | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_RECORDED_IS_MASTER | BATTLE_TYPE_LINK)))
|
||||
*state = 15; // Print at the same time as trainer sends out second mon.
|
||||
else
|
||||
(*state)++;
|
||||
@ -3384,7 +3384,7 @@ static void DoBattleIntro(void)
|
||||
case 16: // print player sends out
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI))
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000 && !(gBattleTypeFlags & BATTLE_TYPE_x80000000))
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && !(gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER))
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
|
||||
else
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
@ -3392,7 +3392,7 @@ static void DoBattleIntro(void)
|
||||
// A hack that makes fast intro work in trainer battles too.
|
||||
if (B_FAST_INTRO
|
||||
&& gBattleTypeFlags & BATTLE_TYPE_TRAINER
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_RECORDED | BATTLE_TYPE_x2000000 | BATTLE_TYPE_x80000000 | BATTLE_TYPE_LINK))
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_RECORDED | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_RECORDED_IS_MASTER | BATTLE_TYPE_LINK))
|
||||
&& gSprites[gHealthboxSpriteIds[gActiveBattler ^ BIT_SIDE]].callback == SpriteCallbackDummy)
|
||||
{
|
||||
return;
|
||||
@ -3405,7 +3405,7 @@ static void DoBattleIntro(void)
|
||||
case 17: // wait for player send out message
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleControllerExecFlags))
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000 && !(gBattleTypeFlags & BATTLE_TYPE_x80000000))
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && !(gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER))
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
|
||||
else
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
@ -3415,7 +3415,7 @@ static void DoBattleIntro(void)
|
||||
}
|
||||
break;
|
||||
case 18: // player 1 send out
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000 && !(gBattleTypeFlags & BATTLE_TYPE_x80000000))
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && !(gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER))
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
|
||||
else
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
@ -3427,7 +3427,7 @@ static void DoBattleIntro(void)
|
||||
case 19: // player 2 send out
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER))
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000 && !(gBattleTypeFlags & BATTLE_TYPE_x80000000))
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && !(gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER))
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
|
||||
else
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
||||
@ -3446,7 +3446,7 @@ static void DoBattleIntro(void)
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_RECORDED_LINK
|
||||
| BATTLE_TYPE_TRAINER_HILL)))
|
||||
{
|
||||
HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality);
|
||||
@ -3489,7 +3489,7 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||
gBattleStruct->overworldWeatherDone = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Totem boosts
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
@ -3501,7 +3501,7 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||
}
|
||||
}
|
||||
memset(gTotemBoosts, 0, sizeof(gTotemBoosts)); // erase all totem boosts just to be safe
|
||||
|
||||
|
||||
// Check all switch in abilities happening from the fastest mon to slowest.
|
||||
while (gBattleStruct->switchInAbilitiesCounter < gBattlersCount)
|
||||
{
|
||||
@ -3519,7 +3519,7 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||
if (ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, gBattlerByTurnOrder[gBattleStruct->switchInItemsCounter++], FALSE))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
*(gBattleStruct->monToSwitchIntoId + i) = PARTY_SIZE;
|
||||
@ -3845,7 +3845,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_FRONTIER_NO_PYRAMID
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_x2000000))
|
||||
| BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
RecordedBattle_ClearBattlerAction(gActiveBattler, 1);
|
||||
gSelectionBattleScripts[gActiveBattler] = BattleScript_ActionSelectionItemsCantBeUsed;
|
||||
@ -3953,7 +3953,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
return;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
&& gBattleResources->bufferB[gActiveBattler][1] == B_ACTION_RUN)
|
||||
{
|
||||
BattleScriptExecute(BattleScript_PrintCantRunFromTrainer);
|
||||
@ -4258,7 +4258,7 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId)
|
||||
speed /= gStatStageRatios[gBattleMons[battlerId].statStages[STAT_SPEED]][1];
|
||||
|
||||
// player's badge boost
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_FRONTIER))
|
||||
&& ShouldGetStatBadgeBoost(FLAG_BADGE03_GET, battlerId)
|
||||
&& GetBattlerSide(battlerId) == B_SIDE_PLAYER)
|
||||
{
|
||||
@ -4656,7 +4656,7 @@ static void HandleEndTurn_BattleWon(void)
|
||||
{
|
||||
gCurrentActionFuncId = 0;
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
gSpecialVar_Result = gBattleOutcome;
|
||||
gBattleTextBuff1[0] = gBattleOutcome;
|
||||
@ -4714,7 +4714,7 @@ static void HandleEndTurn_BattleLost(void)
|
||||
{
|
||||
gCurrentActionFuncId = 0;
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
{
|
||||
@ -4797,7 +4797,7 @@ static void HandleEndTurn_FinishBattle(void)
|
||||
if (gCurrentActionFuncId == B_ACTION_TRY_FINISH || gCurrentActionFuncId == B_ACTION_FINISHED)
|
||||
{
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_RECORDED_LINK
|
||||
| BATTLE_TYPE_FIRST_BATTLE
|
||||
| BATTLE_TYPE_SAFARI
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
@ -4824,7 +4824,7 @@ static void HandleEndTurn_FinishBattle(void)
|
||||
}
|
||||
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_RECORDED_LINK
|
||||
| BATTLE_TYPE_TRAINER
|
||||
| BATTLE_TYPE_FIRST_BATTLE
|
||||
| BATTLE_TYPE_SAFARI
|
||||
@ -5072,13 +5072,13 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk)
|
||||
|
||||
// special to set a field's totem boost(s)
|
||||
// inputs:
|
||||
// var8000: battlerId
|
||||
// var8000: battlerId
|
||||
// var8001 - var8007: stat changes
|
||||
void SetTotemBoost(void)
|
||||
{
|
||||
u8 battlerId = gSpecialVar_0x8000;
|
||||
u8 i;
|
||||
|
||||
|
||||
for (i = 0; i < (NUM_BATTLE_STATS - 1); i++)
|
||||
{
|
||||
if (*(&gSpecialVar_0x8001 + i))
|
||||
|
@ -182,7 +182,7 @@ static const u8 sText_PkmnStayedAwakeUsing[] = _("{B_DEF_NAME_WITH_PREFIX} staye
|
||||
static const u8 sText_PkmnStoringEnergy[] = _("{B_ATK_NAME_WITH_PREFIX} is storing\nenergy!");
|
||||
static const u8 sText_PkmnUnleashedEnergy[] = _("{B_ATK_NAME_WITH_PREFIX} unleashed\nenergy!");
|
||||
static const u8 sText_PkmnFatigueConfusion[] = _("{B_ATK_NAME_WITH_PREFIX} became\nconfused due to fatigue!");
|
||||
static const u8 sText_PkmnPickedUpItem[] = _("{B_PLAYER_NAME} picked up\n¥{B_BUFF1}!\p");
|
||||
static const u8 sText_PlayerPickedUpMoney[] = _("{B_PLAYER_NAME} picked up\n¥{B_BUFF1}!\p");
|
||||
static const u8 sText_PkmnUnaffected[] = _("{B_DEF_NAME_WITH_PREFIX} is\nunaffected!");
|
||||
static const u8 sText_PkmnTransformedInto[] = _("{B_ATK_NAME_WITH_PREFIX} transformed\ninto {B_BUFF1}!");
|
||||
static const u8 sText_PkmnMadeSubstitute[] = _("{B_ATK_NAME_WITH_PREFIX} made\na SUBSTITUTE!");
|
||||
@ -343,9 +343,9 @@ static const u8 sText_ButItFailed[] = _("But it failed!");
|
||||
static const u8 sText_ItHurtConfusion[] = _("It hurt itself in its\nconfusion!");
|
||||
static const u8 sText_MirrorMoveFailed[] = _("The MIRROR MOVE failed!");
|
||||
static const u8 sText_StartedToRain[] = _("It started to rain!");
|
||||
static const u8 sText_DownpourStarted[] = _("A downpour started!");
|
||||
static const u8 sText_DownpourStarted[] = _("A downpour started!"); // corresponds to DownpourText in pokegold and pokecrystal and is used by Rain Dance in GSC
|
||||
static const u8 sText_RainContinues[] = _("Rain continues to fall.");
|
||||
static const u8 sText_DownpourContinues[] = _("The downpour continues.");
|
||||
static const u8 sText_DownpourContinues[] = _("The downpour continues."); // unused
|
||||
static const u8 sText_RainStopped[] = _("The rain stopped.");
|
||||
static const u8 sText_SandstormBrewed[] = _("A sandstorm brewed!");
|
||||
static const u8 sText_SandstormRages[] = _("The sandstorm rages.");
|
||||
@ -839,7 +839,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
[STRINGID_PKMNSTORINGENERGY - 12] = sText_PkmnStoringEnergy,
|
||||
[STRINGID_PKMNUNLEASHEDENERGY - 12] = sText_PkmnUnleashedEnergy,
|
||||
[STRINGID_PKMNFATIGUECONFUSION - 12] = sText_PkmnFatigueConfusion,
|
||||
[STRINGID_PKMNPICKEDUPITEM - 12] = sText_PkmnPickedUpItem,
|
||||
[STRINGID_PLAYERPICKEDUPMONEY - 12] = sText_PlayerPickedUpMoney,
|
||||
[STRINGID_PKMNUNAFFECTED - 12] = sText_PkmnUnaffected,
|
||||
[STRINGID_PKMNTRANSFORMEDINTO - 12] = sText_PkmnTransformedInto,
|
||||
[STRINGID_PKMNMADESUBSTITUTE - 12] = sText_PkmnMadeSubstitute,
|
||||
@ -2415,9 +2415,9 @@ void BufferStringBattle(u16 stringID)
|
||||
case STRINGID_INTROMSG: // first battle msg
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x800000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TOWER_LINK_MULTI)
|
||||
{
|
||||
stringPtr = sText_TwoTrainersWantToBattle;
|
||||
}
|
||||
@ -2489,18 +2489,18 @@ void BufferStringBattle(u16 stringID)
|
||||
stringPtr = sText_Trainer1SentOutTwoPkmn;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
||||
stringPtr = sText_TwoTrainersSentPkmn;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x800000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TOWER_LINK_MULTI)
|
||||
stringPtr = sText_TwoTrainersSentPkmn;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
stringPtr = sText_TwoLinkTrainersSentOutPkmn;
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
stringPtr = sText_LinkTrainerSentOutTwoPkmn;
|
||||
else
|
||||
stringPtr = sText_Trainer1SentOutTwoPkmn;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)))
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)))
|
||||
stringPtr = sText_Trainer1SentOutPkmn;
|
||||
else if (gTrainerBattleOpponent_A == TRAINER_UNION_ROOM)
|
||||
stringPtr = sText_Trainer1SentOutPkmn;
|
||||
@ -2523,7 +2523,7 @@ void BufferStringBattle(u16 stringID)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gTrainerBattleOpponent_A == TRAINER_LINK_OPPONENT || gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
if (gTrainerBattleOpponent_A == TRAINER_LINK_OPPONENT || gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
stringPtr = sText_LinkTrainer2WithdrewPkmn;
|
||||
@ -2550,9 +2550,9 @@ void BufferStringBattle(u16 stringID)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x800000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TOWER_LINK_MULTI)
|
||||
{
|
||||
if (gBattleScripting.battler == 1)
|
||||
stringPtr = sText_Trainer1SentOutPkmn2;
|
||||
@ -2617,7 +2617,7 @@ void BufferStringBattle(u16 stringID)
|
||||
switch (gBattleTextBuff1[0])
|
||||
{
|
||||
case B_OUTCOME_WON:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x800000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TOWER_LINK_MULTI)
|
||||
stringPtr = sText_TwoInGameTrainersDefeated;
|
||||
else
|
||||
stringPtr = sText_TwoLinkTrainersDefeated;
|
||||
@ -2891,8 +2891,8 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
u8 multiplayerId;
|
||||
s32 i;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
multiplayerId = gUnknown_0203C7B4;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
multiplayerId = gRecordedBattleMultiplayerId;
|
||||
else
|
||||
multiplayerId = GetMultiplayerId();
|
||||
|
||||
@ -3026,7 +3026,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
toCpy = gMoveNames[gBattleMsgDataPtr->originallyUsedMove];
|
||||
break;
|
||||
case B_TXT_LAST_ITEM: // last used item
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
if (gLastUsedItem == ITEM_ENIGMA_BERRY)
|
||||
{
|
||||
@ -3448,7 +3448,7 @@ static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst)
|
||||
break;
|
||||
case B_BUFF_ITEM: // item name
|
||||
hword = T1_READ_16(&src[srcID + 1]);
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
if (hword == ITEM_ENIGMA_BERRY)
|
||||
{
|
||||
@ -3608,7 +3608,7 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
|
||||
|
||||
if (windowId == 0 || windowId == 0x16)
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
speed = 1;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RECORDED)
|
||||
speed = sRecordedBattleTextSpeeds[GetTextSpeedInRecordedBattle()];
|
||||
|
@ -61,7 +61,7 @@ extern const u8* const gBattleScriptsForMoveEffects[];
|
||||
// table to avoid ugly powing on gba (courtesy of doesnt)
|
||||
// this returns (i^2.5)/4
|
||||
// the quarters cancel so no need to re-quadruple them in actual calculation
|
||||
static const s32 sExperienceScalingFactors[] =
|
||||
static const s32 sExperienceScalingFactors[] =
|
||||
{
|
||||
0,
|
||||
0,
|
||||
@ -332,7 +332,7 @@ static void Cmd_jumpifstat(void);
|
||||
static void Cmd_jumpifstatus3condition(void);
|
||||
static void Cmd_jumpbasedontype(void);
|
||||
static void Cmd_getexp(void);
|
||||
static void atk24(void);
|
||||
static void Cmd_unknown_24(void);
|
||||
static void Cmd_movevaluescleanup(void);
|
||||
static void Cmd_setmultihit(void);
|
||||
static void Cmd_decrementmultihit(void);
|
||||
@ -355,7 +355,7 @@ static void Cmd_bichalfword(void);
|
||||
static void Cmd_bicword(void);
|
||||
static void Cmd_pause(void);
|
||||
static void Cmd_waitstate(void);
|
||||
static void Cmd_update(void);
|
||||
static void Cmd_healthbar_update(void);
|
||||
static void Cmd_return(void);
|
||||
static void Cmd_end(void);
|
||||
static void Cmd_end2(void);
|
||||
@ -383,14 +383,14 @@ static void Cmd_trainerslidein(void);
|
||||
static void Cmd_playse(void);
|
||||
static void Cmd_fanfare(void);
|
||||
static void Cmd_playfaintcry(void);
|
||||
static void atk57(void);
|
||||
static void Cmd_unknown_57(void);
|
||||
static void Cmd_returntoball(void);
|
||||
static void Cmd_handlelearnnewmove(void);
|
||||
static void Cmd_yesnoboxlearnmove(void);
|
||||
static void Cmd_yesnoboxstoplearningmove(void);
|
||||
static void Cmd_hitanimation(void);
|
||||
static void Cmd_getmoneyreward(void);
|
||||
static void atk5E(void);
|
||||
static void Cmd_unknown_5E(void);
|
||||
static void Cmd_swapattackerwithtarget(void);
|
||||
static void Cmd_incrementgamestat(void);
|
||||
static void Cmd_drawpartystatussummary(void);
|
||||
@ -555,262 +555,262 @@ static void Cmd_metalburstdamagecalculator(void);
|
||||
|
||||
void (* const gBattleScriptingCommandsTable[])(void) =
|
||||
{
|
||||
Cmd_attackcanceler, // 0x0
|
||||
Cmd_accuracycheck, // 0x1
|
||||
Cmd_attackstring, // 0x2
|
||||
Cmd_ppreduce, // 0x3
|
||||
Cmd_critcalc, // 0x4
|
||||
Cmd_damagecalc, // 0x5
|
||||
Cmd_typecalc, // 0x6
|
||||
Cmd_adjustdamage, // 0x7
|
||||
Cmd_multihitresultmessage, // 0x8
|
||||
Cmd_attackanimation, // 0x9
|
||||
Cmd_waitanimation, // 0xA
|
||||
Cmd_healthbarupdate, // 0xB
|
||||
Cmd_datahpupdate, // 0xC
|
||||
Cmd_critmessage, // 0xD
|
||||
Cmd_effectivenesssound, // 0xE
|
||||
Cmd_resultmessage, // 0xF
|
||||
Cmd_printstring, // 0x10
|
||||
Cmd_printselectionstring, // 0x11
|
||||
Cmd_waitmessage, // 0x12
|
||||
Cmd_printfromtable, // 0x13
|
||||
Cmd_printselectionstringfromtable, // 0x14
|
||||
Cmd_seteffectwithchance, // 0x15
|
||||
Cmd_seteffectprimary, // 0x16
|
||||
Cmd_seteffectsecondary, // 0x17
|
||||
Cmd_clearstatusfromeffect, // 0x18
|
||||
Cmd_tryfaintmon, // 0x19
|
||||
Cmd_dofaintanimation, // 0x1A
|
||||
Cmd_cleareffectsonfaint, // 0x1B
|
||||
Cmd_jumpifstatus, // 0x1C
|
||||
Cmd_jumpifstatus2, // 0x1D
|
||||
Cmd_jumpifability, // 0x1E
|
||||
Cmd_jumpifsideaffecting, // 0x1F
|
||||
Cmd_jumpifstat, // 0x20
|
||||
Cmd_jumpifstatus3condition, // 0x21
|
||||
Cmd_jumpbasedontype, // 0x22
|
||||
Cmd_getexp, // 0x23
|
||||
atk24, // 0x24
|
||||
Cmd_movevaluescleanup, // 0x25
|
||||
Cmd_setmultihit, // 0x26
|
||||
Cmd_decrementmultihit, // 0x27
|
||||
Cmd_goto, // 0x28
|
||||
Cmd_jumpifbyte, // 0x29
|
||||
Cmd_jumpifhalfword, // 0x2A
|
||||
Cmd_jumpifword, // 0x2B
|
||||
Cmd_jumpifarrayequal, // 0x2C
|
||||
Cmd_jumpifarraynotequal, // 0x2D
|
||||
Cmd_setbyte, // 0x2E
|
||||
Cmd_addbyte, // 0x2F
|
||||
Cmd_subbyte, // 0x30
|
||||
Cmd_copyarray, // 0x31
|
||||
Cmd_copyarraywithindex, // 0x32
|
||||
Cmd_orbyte, // 0x33
|
||||
Cmd_orhalfword, // 0x34
|
||||
Cmd_orword, // 0x35
|
||||
Cmd_bicbyte, // 0x36
|
||||
Cmd_bichalfword, // 0x37
|
||||
Cmd_bicword, // 0x38
|
||||
Cmd_pause, // 0x39
|
||||
Cmd_waitstate, // 0x3A
|
||||
Cmd_update, // 0x3B
|
||||
Cmd_return, // 0x3C
|
||||
Cmd_end, // 0x3D
|
||||
Cmd_end2, // 0x3E
|
||||
Cmd_end3, // 0x3F
|
||||
Cmd_jumpifaffectedbyprotect, // 0x40
|
||||
Cmd_call, // 0x41
|
||||
Cmd_setroost, // 0x42
|
||||
Cmd_jumpifabilitypresent, // 0x43
|
||||
Cmd_endselectionscript, // 0x44
|
||||
Cmd_playanimation, // 0x45
|
||||
Cmd_playanimation2, // 0x46
|
||||
Cmd_setgraphicalstatchangevalues, // 0x47
|
||||
Cmd_playstatchangeanimation, // 0x48
|
||||
Cmd_moveend, // 0x49
|
||||
Cmd_sethealblock, // 0x4A
|
||||
Cmd_returnatktoball, // 0x4B
|
||||
Cmd_getswitchedmondata, // 0x4C
|
||||
Cmd_switchindataupdate, // 0x4D
|
||||
Cmd_switchinanim, // 0x4E
|
||||
Cmd_jumpifcantswitch, // 0x4F
|
||||
Cmd_openpartyscreen, // 0x50
|
||||
Cmd_switchhandleorder, // 0x51
|
||||
Cmd_switchineffects, // 0x52
|
||||
Cmd_trainerslidein, // 0x53
|
||||
Cmd_playse, // 0x54
|
||||
Cmd_fanfare, // 0x55
|
||||
Cmd_playfaintcry, // 0x56
|
||||
atk57, // 0x57
|
||||
Cmd_returntoball, // 0x58
|
||||
Cmd_handlelearnnewmove, // 0x59
|
||||
Cmd_yesnoboxlearnmove, // 0x5A
|
||||
Cmd_yesnoboxstoplearningmove, // 0x5B
|
||||
Cmd_hitanimation, // 0x5C
|
||||
Cmd_getmoneyreward, // 0x5D
|
||||
atk5E, // 0x5E
|
||||
Cmd_swapattackerwithtarget, // 0x5F
|
||||
Cmd_incrementgamestat, // 0x60
|
||||
Cmd_drawpartystatussummary, // 0x61
|
||||
Cmd_hidepartystatussummary, // 0x62
|
||||
Cmd_jumptocalledmove, // 0x63
|
||||
Cmd_statusanimation, // 0x64
|
||||
Cmd_status2animation, // 0x65
|
||||
Cmd_chosenstatusanimation, // 0x66
|
||||
Cmd_yesnobox, // 0x67
|
||||
Cmd_cancelallactions, // 0x68
|
||||
Cmd_setgravity, // 0x69
|
||||
Cmd_removeitem, // 0x6A
|
||||
Cmd_atknameinbuff1, // 0x6B
|
||||
Cmd_drawlvlupbox, // 0x6C
|
||||
Cmd_resetsentmonsvalue, // 0x6D
|
||||
Cmd_setatktoplayer0, // 0x6E
|
||||
Cmd_makevisible, // 0x6F
|
||||
Cmd_recordability, // 0x70
|
||||
Cmd_buffermovetolearn, // 0x71
|
||||
Cmd_jumpifplayerran, // 0x72
|
||||
Cmd_hpthresholds, // 0x73
|
||||
Cmd_hpthresholds2, // 0x74
|
||||
Cmd_useitemonopponent, // 0x75
|
||||
Cmd_various, // 0x76
|
||||
Cmd_setprotectlike, // 0x77
|
||||
Cmd_faintifabilitynotdamp, // 0x78
|
||||
Cmd_setatkhptozero, // 0x79
|
||||
Cmd_jumpifnexttargetvalid, // 0x7A
|
||||
Cmd_tryhealhalfhealth, // 0x7B
|
||||
Cmd_trymirrormove, // 0x7C
|
||||
Cmd_setrain, // 0x7D
|
||||
Cmd_setreflect, // 0x7E
|
||||
Cmd_setseeded, // 0x7F
|
||||
Cmd_manipulatedamage, // 0x80
|
||||
Cmd_trysetrest, // 0x81
|
||||
Cmd_jumpifnotfirstturn, // 0x82
|
||||
Cmd_setmiracleeye, // 0x83
|
||||
Cmd_jumpifcantmakeasleep, // 0x84
|
||||
Cmd_stockpile, // 0x85
|
||||
Cmd_stockpiletobasedamage, // 0x86
|
||||
Cmd_stockpiletohpheal, // 0x87
|
||||
Cmd_setdrainedhp, // 0x88
|
||||
Cmd_statbuffchange, // 0x89
|
||||
Cmd_normalisebuffs, // 0x8A
|
||||
Cmd_setbide, // 0x8B
|
||||
Cmd_confuseifrepeatingattackends, // 0x8C
|
||||
Cmd_setmultihitcounter, // 0x8D
|
||||
Cmd_initmultihitstring, // 0x8E
|
||||
Cmd_forcerandomswitch, // 0x8F
|
||||
Cmd_tryconversiontypechange, // 0x90
|
||||
Cmd_givepaydaymoney, // 0x91
|
||||
Cmd_setlightscreen, // 0x92
|
||||
Cmd_tryKO, // 0x93
|
||||
Cmd_damagetohalftargethp, // 0x94
|
||||
Cmd_setsandstorm, // 0x95
|
||||
Cmd_weatherdamage, // 0x96
|
||||
Cmd_tryinfatuating, // 0x97
|
||||
Cmd_updatestatusicon, // 0x98
|
||||
Cmd_setmist, // 0x99
|
||||
Cmd_setfocusenergy, // 0x9A
|
||||
Cmd_transformdataexecution, // 0x9B
|
||||
Cmd_setsubstitute, // 0x9C
|
||||
Cmd_mimicattackcopy, // 0x9D
|
||||
Cmd_metronome, // 0x9E
|
||||
Cmd_dmgtolevel, // 0x9F
|
||||
Cmd_psywavedamageeffect, // 0xA0
|
||||
Cmd_counterdamagecalculator, // 0xA1
|
||||
Cmd_mirrorcoatdamagecalculator, // 0xA2
|
||||
Cmd_disablelastusedattack, // 0xA3
|
||||
Cmd_trysetencore, // 0xA4
|
||||
Cmd_painsplitdmgcalc, // 0xA5
|
||||
Cmd_settypetorandomresistance, // 0xA6
|
||||
Cmd_setalwayshitflag, // 0xA7
|
||||
Cmd_copymovepermanently, // 0xA8
|
||||
Cmd_trychoosesleeptalkmove, // 0xA9
|
||||
Cmd_setdestinybond, // 0xAA
|
||||
Cmd_trysetdestinybondtohappen, // 0xAB
|
||||
Cmd_settailwind, // 0xAC
|
||||
Cmd_tryspiteppreduce, // 0xAD
|
||||
Cmd_healpartystatus, // 0xAE
|
||||
Cmd_cursetarget, // 0xAF
|
||||
Cmd_trysetspikes, // 0xB0
|
||||
Cmd_setforesight, // 0xB1
|
||||
Cmd_trysetperishsong, // 0xB2
|
||||
Cmd_handlerollout, // 0xB3
|
||||
Cmd_jumpifconfusedandstatmaxed, // 0xB4
|
||||
Cmd_handlefurycutter, // 0xB5
|
||||
Cmd_setembargo, // 0xB6
|
||||
Cmd_presentdamagecalculation, // 0xB7
|
||||
Cmd_setsafeguard, // 0xB8
|
||||
Cmd_magnitudedamagecalculation, // 0xB9
|
||||
Cmd_jumpifnopursuitswitchdmg, // 0xBA
|
||||
Cmd_setsunny, // 0xBB
|
||||
Cmd_maxattackhalvehp, // 0xBC
|
||||
Cmd_copyfoestats, // 0xBD
|
||||
Cmd_rapidspinfree, // 0xBE
|
||||
Cmd_setdefensecurlbit, // 0xBF
|
||||
Cmd_recoverbasedonsunlight, // 0xC0
|
||||
Cmd_setstickyweb, // 0xC1
|
||||
Cmd_selectfirstvalidtarget, // 0xC2
|
||||
Cmd_trysetfutureattack, // 0xC3
|
||||
Cmd_trydobeatup, // 0xC4
|
||||
Cmd_setsemiinvulnerablebit, // 0xC5
|
||||
Cmd_clearsemiinvulnerablebit, // 0xC6
|
||||
Cmd_setminimize, // 0xC7
|
||||
Cmd_sethail, // 0xC8
|
||||
Cmd_jumpifattackandspecialattackcannotfall, // 0xC9
|
||||
Cmd_setforcedtarget, // 0xCA
|
||||
Cmd_setcharge, // 0xCB
|
||||
Cmd_callterrainattack, // 0xCC
|
||||
Cmd_cureifburnedparalysedorpoisoned, // 0xCD
|
||||
Cmd_settorment, // 0xCE
|
||||
Cmd_jumpifnodamage, // 0xCF
|
||||
Cmd_settaunt, // 0xD0
|
||||
Cmd_trysethelpinghand, // 0xD1
|
||||
Cmd_tryswapitems, // 0xD2
|
||||
Cmd_trycopyability, // 0xD3
|
||||
Cmd_trywish, // 0xD4
|
||||
Cmd_settoxicspikes, // 0xD5
|
||||
Cmd_setgastroacid, // 0xD6
|
||||
Cmd_setyawn, // 0xD7
|
||||
Cmd_setdamagetohealthdifference, // 0xD8
|
||||
Cmd_setroom, // 0xD9
|
||||
Cmd_tryswapabilities, // 0xDA
|
||||
Cmd_tryimprison, // 0xDB
|
||||
Cmd_setstealthrock, // 0xDC
|
||||
Cmd_setuserstatus3, // 0xDD
|
||||
Cmd_assistattackselect, // 0xDE
|
||||
Cmd_trysetmagiccoat, // 0xDF
|
||||
Cmd_trysetsnatch, // 0xE0
|
||||
Cmd_trygetintimidatetarget, // 0xE1
|
||||
Cmd_switchoutabilities, // 0xE2
|
||||
Cmd_jumpifhasnohp, // 0xE3
|
||||
Cmd_getsecretpowereffect, // 0xE4
|
||||
Cmd_pickup, // 0xE5
|
||||
Cmd_docastformchangeanimation, // 0xE6
|
||||
Cmd_trycastformdatachange, // 0xE7
|
||||
Cmd_settypebasedhalvers, // 0xE8
|
||||
Cmd_jumpifsubstituteblocks, // 0xE9
|
||||
Cmd_tryrecycleitem, // 0xEA
|
||||
Cmd_settypetoterrain, // 0xEB
|
||||
Cmd_pursuitrelated, // 0xEC
|
||||
Cmd_snatchsetbattlers, // 0xED
|
||||
Cmd_removelightscreenreflect, // 0xEE
|
||||
Cmd_handleballthrow, // 0xEF
|
||||
Cmd_givecaughtmon, // 0xF0
|
||||
Cmd_trysetcaughtmondexflags, // 0xF1
|
||||
Cmd_displaydexinfo, // 0xF2
|
||||
Cmd_trygivecaughtmonnick, // 0xF3
|
||||
Cmd_subattackerhpbydmg, // 0xF4
|
||||
Cmd_removeattackerstatus1, // 0xF5
|
||||
Cmd_finishaction, // 0xF6
|
||||
Cmd_finishturn, // 0xF7
|
||||
Cmd_trainerslideout, // 0xF8
|
||||
Cmd_settelekinesis, // 0xF9
|
||||
Cmd_swapstatstages, // 0xFA
|
||||
Cmd_averagestats, // 0xFB
|
||||
Cmd_jumpifoppositegenders, // 0xFC
|
||||
Cmd_trygetbaddreamstarget, // 0xFD
|
||||
Cmd_tryworryseed, // 0xFE
|
||||
Cmd_metalburstdamagecalculator, // 0xFF
|
||||
Cmd_attackcanceler, //0x0
|
||||
Cmd_accuracycheck, //0x1
|
||||
Cmd_attackstring, //0x2
|
||||
Cmd_ppreduce, //0x3
|
||||
Cmd_critcalc, //0x4
|
||||
Cmd_damagecalc, //0x5
|
||||
Cmd_typecalc, //0x6
|
||||
Cmd_adjustdamage, //0x7
|
||||
Cmd_multihitresultmessage, //0x8
|
||||
Cmd_attackanimation, //0x9
|
||||
Cmd_waitanimation, //0xA
|
||||
Cmd_healthbarupdate, //0xB
|
||||
Cmd_datahpupdate, //0xC
|
||||
Cmd_critmessage, //0xD
|
||||
Cmd_effectivenesssound, //0xE
|
||||
Cmd_resultmessage, //0xF
|
||||
Cmd_printstring, //0x10
|
||||
Cmd_printselectionstring, //0x11
|
||||
Cmd_waitmessage, //0x12
|
||||
Cmd_printfromtable, //0x13
|
||||
Cmd_printselectionstringfromtable, //0x14
|
||||
Cmd_seteffectwithchance, //0x15
|
||||
Cmd_seteffectprimary, //0x16
|
||||
Cmd_seteffectsecondary, //0x17
|
||||
Cmd_clearstatusfromeffect, //0x18
|
||||
Cmd_tryfaintmon, //0x19
|
||||
Cmd_dofaintanimation, //0x1A
|
||||
Cmd_cleareffectsonfaint, //0x1B
|
||||
Cmd_jumpifstatus, //0x1C
|
||||
Cmd_jumpifstatus2, //0x1D
|
||||
Cmd_jumpifability, //0x1E
|
||||
Cmd_jumpifsideaffecting, //0x1F
|
||||
Cmd_jumpifstat, //0x20
|
||||
Cmd_jumpifstatus3condition, //0x21
|
||||
Cmd_jumpbasedontype, //0x22
|
||||
Cmd_getexp, //0x23
|
||||
Cmd_unknown_24, //0x24
|
||||
Cmd_movevaluescleanup, //0x25
|
||||
Cmd_setmultihit, //0x26
|
||||
Cmd_decrementmultihit, //0x27
|
||||
Cmd_goto, //0x28
|
||||
Cmd_jumpifbyte, //0x29
|
||||
Cmd_jumpifhalfword, //0x2A
|
||||
Cmd_jumpifword, //0x2B
|
||||
Cmd_jumpifarrayequal, //0x2C
|
||||
Cmd_jumpifarraynotequal, //0x2D
|
||||
Cmd_setbyte, //0x2E
|
||||
Cmd_addbyte, //0x2F
|
||||
Cmd_subbyte, //0x30
|
||||
Cmd_copyarray, //0x31
|
||||
Cmd_copyarraywithindex, //0x32
|
||||
Cmd_orbyte, //0x33
|
||||
Cmd_orhalfword, //0x34
|
||||
Cmd_orword, //0x35
|
||||
Cmd_bicbyte, //0x36
|
||||
Cmd_bichalfword, //0x37
|
||||
Cmd_bicword, //0x38
|
||||
Cmd_pause, //0x39
|
||||
Cmd_waitstate, //0x3A
|
||||
Cmd_healthbar_update, //0x3B
|
||||
Cmd_return, //0x3C
|
||||
Cmd_end, //0x3D
|
||||
Cmd_end2, //0x3E
|
||||
Cmd_end3, //0x3F
|
||||
Cmd_jumpifaffectedbyprotect, //0x40
|
||||
Cmd_call, //0x41
|
||||
Cmd_setroost, //0x42
|
||||
Cmd_jumpifabilitypresent, //0x43
|
||||
Cmd_endselectionscript, //0x44
|
||||
Cmd_playanimation, //0x45
|
||||
Cmd_playanimation2, //0x46
|
||||
Cmd_setgraphicalstatchangevalues, //0x47
|
||||
Cmd_playstatchangeanimation, //0x48
|
||||
Cmd_moveend, //0x49
|
||||
Cmd_sethealblock, //0x4A
|
||||
Cmd_returnatktoball, //0x4B
|
||||
Cmd_getswitchedmondata, //0x4C
|
||||
Cmd_switchindataupdate, //0x4D
|
||||
Cmd_switchinanim, //0x4E
|
||||
Cmd_jumpifcantswitch, //0x4F
|
||||
Cmd_openpartyscreen, //0x50
|
||||
Cmd_switchhandleorder, //0x51
|
||||
Cmd_switchineffects, //0x52
|
||||
Cmd_trainerslidein, //0x53
|
||||
Cmd_playse, //0x54
|
||||
Cmd_fanfare, //0x55
|
||||
Cmd_playfaintcry, //0x56
|
||||
Cmd_unknown_57, //0x57
|
||||
Cmd_returntoball, //0x58
|
||||
Cmd_handlelearnnewmove, //0x59
|
||||
Cmd_yesnoboxlearnmove, //0x5A
|
||||
Cmd_yesnoboxstoplearningmove, //0x5B
|
||||
Cmd_hitanimation, //0x5C
|
||||
Cmd_getmoneyreward, //0x5D
|
||||
Cmd_unknown_5E, //0x5E
|
||||
Cmd_swapattackerwithtarget, //0x5F
|
||||
Cmd_incrementgamestat, //0x60
|
||||
Cmd_drawpartystatussummary, //0x61
|
||||
Cmd_hidepartystatussummary, //0x62
|
||||
Cmd_jumptocalledmove, //0x63
|
||||
Cmd_statusanimation, //0x64
|
||||
Cmd_status2animation, //0x65
|
||||
Cmd_chosenstatusanimation, //0x66
|
||||
Cmd_yesnobox, //0x67
|
||||
Cmd_cancelallactions, //0x68
|
||||
Cmd_setgravity, //0x69
|
||||
Cmd_removeitem, //0x6A
|
||||
Cmd_atknameinbuff1, //0x6B
|
||||
Cmd_drawlvlupbox, //0x6C
|
||||
Cmd_resetsentmonsvalue, //0x6D
|
||||
Cmd_setatktoplayer0, //0x6E
|
||||
Cmd_makevisible, //0x6F
|
||||
Cmd_recordability, //0x70
|
||||
Cmd_buffermovetolearn, //0x71
|
||||
Cmd_jumpifplayerran, //0x72
|
||||
Cmd_hpthresholds, //0x73
|
||||
Cmd_hpthresholds2, //0x74
|
||||
Cmd_useitemonopponent, //0x75
|
||||
Cmd_various, //0x76
|
||||
Cmd_setprotectlike, //0x77
|
||||
Cmd_faintifabilitynotdamp, //0x78
|
||||
Cmd_setatkhptozero, //0x79
|
||||
Cmd_jumpifnexttargetvalid, //0x7A
|
||||
Cmd_tryhealhalfhealth, //0x7B
|
||||
Cmd_trymirrormove, //0x7C
|
||||
Cmd_setrain, //0x7D
|
||||
Cmd_setreflect, //0x7E
|
||||
Cmd_setseeded, //0x7F
|
||||
Cmd_manipulatedamage, //0x80
|
||||
Cmd_trysetrest, //0x81
|
||||
Cmd_jumpifnotfirstturn, //0x82
|
||||
Cmd_setmiracleeye, //0x83
|
||||
Cmd_jumpifcantmakeasleep, //0x84
|
||||
Cmd_stockpile, //0x85
|
||||
Cmd_stockpiletobasedamage, //0x86
|
||||
Cmd_stockpiletohpheal, //0x87
|
||||
Cmd_setdrainedhp, //0x88
|
||||
Cmd_statbuffchange, //0x89
|
||||
Cmd_normalisebuffs, //0x8A
|
||||
Cmd_setbide, //0x8B
|
||||
Cmd_confuseifrepeatingattackends, //0x8C
|
||||
Cmd_setmultihitcounter, //0x8D
|
||||
Cmd_initmultihitstring, //0x8E
|
||||
Cmd_forcerandomswitch, //0x8F
|
||||
Cmd_tryconversiontypechange, //0x90
|
||||
Cmd_givepaydaymoney, //0x91
|
||||
Cmd_setlightscreen, //0x92
|
||||
Cmd_tryKO, //0x93
|
||||
Cmd_damagetohalftargethp, //0x94
|
||||
Cmd_setsandstorm, //0x95
|
||||
Cmd_weatherdamage, //0x96
|
||||
Cmd_tryinfatuating, //0x97
|
||||
Cmd_updatestatusicon, //0x98
|
||||
Cmd_setmist, //0x99
|
||||
Cmd_setfocusenergy, //0x9A
|
||||
Cmd_transformdataexecution, //0x9B
|
||||
Cmd_setsubstitute, //0x9C
|
||||
Cmd_mimicattackcopy, //0x9D
|
||||
Cmd_metronome, //0x9E
|
||||
Cmd_dmgtolevel, //0x9F
|
||||
Cmd_psywavedamageeffect, //0xA0
|
||||
Cmd_counterdamagecalculator, //0xA1
|
||||
Cmd_mirrorcoatdamagecalculator, //0xA2
|
||||
Cmd_disablelastusedattack, //0xA3
|
||||
Cmd_trysetencore, //0xA4
|
||||
Cmd_painsplitdmgcalc, //0xA5
|
||||
Cmd_settypetorandomresistance, //0xA6
|
||||
Cmd_setalwayshitflag, //0xA7
|
||||
Cmd_copymovepermanently, //0xA8
|
||||
Cmd_trychoosesleeptalkmove, //0xA9
|
||||
Cmd_setdestinybond, //0xAA
|
||||
Cmd_trysetdestinybondtohappen, //0xAB
|
||||
Cmd_settailwind, //0xAC
|
||||
Cmd_tryspiteppreduce, //0xAD
|
||||
Cmd_healpartystatus, //0xAE
|
||||
Cmd_cursetarget, //0xAF
|
||||
Cmd_trysetspikes, //0xB0
|
||||
Cmd_setforesight, //0xB1
|
||||
Cmd_trysetperishsong, //0xB2
|
||||
Cmd_handlerollout, //0xB3
|
||||
Cmd_jumpifconfusedandstatmaxed, //0xB4
|
||||
Cmd_handlefurycutter, //0xB5
|
||||
Cmd_setembargo, //0xB6
|
||||
Cmd_presentdamagecalculation, //0xB7
|
||||
Cmd_setsafeguard, //0xB8
|
||||
Cmd_magnitudedamagecalculation, //0xB9
|
||||
Cmd_jumpifnopursuitswitchdmg, //0xBA
|
||||
Cmd_setsunny, //0xBB
|
||||
Cmd_maxattackhalvehp, //0xBC
|
||||
Cmd_copyfoestats, //0xBD
|
||||
Cmd_rapidspinfree, //0xBE
|
||||
Cmd_setdefensecurlbit, //0xBF
|
||||
Cmd_recoverbasedonsunlight, //0xC0
|
||||
Cmd_setstickyweb, //0xC1
|
||||
Cmd_selectfirstvalidtarget, //0xC2
|
||||
Cmd_trysetfutureattack, //0xC3
|
||||
Cmd_trydobeatup, //0xC4
|
||||
Cmd_setsemiinvulnerablebit, //0xC5
|
||||
Cmd_clearsemiinvulnerablebit, //0xC6
|
||||
Cmd_setminimize, //0xC7
|
||||
Cmd_sethail, //0xC8
|
||||
Cmd_jumpifattackandspecialattackcannotfall, //0xC9
|
||||
Cmd_setforcedtarget, //0xCA
|
||||
Cmd_setcharge, //0xCB
|
||||
Cmd_callterrainattack, //0xCC
|
||||
Cmd_cureifburnedparalysedorpoisoned, //0xCD
|
||||
Cmd_settorment, //0xCE
|
||||
Cmd_jumpifnodamage, //0xCF
|
||||
Cmd_settaunt, //0xD0
|
||||
Cmd_trysethelpinghand, //0xD1
|
||||
Cmd_tryswapitems, //0xD2
|
||||
Cmd_trycopyability, //0xD3
|
||||
Cmd_trywish, //0xD4
|
||||
Cmd_settoxicspikes, //0xD5
|
||||
Cmd_setgastroacid, //0xD6
|
||||
Cmd_setyawn, //0xD7
|
||||
Cmd_setdamagetohealthdifference, //0xD8
|
||||
Cmd_setroom, //0xD9
|
||||
Cmd_tryswapabilities, //0xDA
|
||||
Cmd_tryimprison, //0xDB
|
||||
Cmd_setstealthrock, //0xDC
|
||||
Cmd_setuserstatus3, //0xDD
|
||||
Cmd_assistattackselect, //0xDE
|
||||
Cmd_trysetmagiccoat, //0xDF
|
||||
Cmd_trysetsnatch, //0xE0
|
||||
Cmd_trygetintimidatetarget, //0xE1
|
||||
Cmd_switchoutabilities, //0xE2
|
||||
Cmd_jumpifhasnohp, //0xE3
|
||||
Cmd_getsecretpowereffect, //0xE4
|
||||
Cmd_pickup, //0xE5
|
||||
Cmd_docastformchangeanimation, //0xE6
|
||||
Cmd_trycastformdatachange, //0xE7
|
||||
Cmd_settypebasedhalvers, //0xE8
|
||||
Cmd_jumpifsubstituteblocks, //0xE9
|
||||
Cmd_tryrecycleitem, //0xEA
|
||||
Cmd_settypetoterrain, //0xEB
|
||||
Cmd_pursuitrelated, //0xEC
|
||||
Cmd_snatchsetbattlers, //0xED
|
||||
Cmd_removelightscreenreflect, //0xEE
|
||||
Cmd_handleballthrow, //0xEF
|
||||
Cmd_givecaughtmon, //0xF0
|
||||
Cmd_trysetcaughtmondexflags, //0xF1
|
||||
Cmd_displaydexinfo, //0xF2
|
||||
Cmd_trygivecaughtmonnick, //0xF3
|
||||
Cmd_subattackerhpbydmg, //0xF4
|
||||
Cmd_removeattackerstatus1, //0xF5
|
||||
Cmd_finishaction, //0xF6
|
||||
Cmd_finishturn, //0xF7
|
||||
Cmd_trainerslideout, //0xF8
|
||||
Cmd_settelekinesis, //0xF9
|
||||
Cmd_swapstatstages, //0xFA
|
||||
Cmd_averagestats, //0xFB
|
||||
Cmd_jumpifoppositegenders, //0xFC
|
||||
Cmd_trygetbaddreamstarget, //0xFD
|
||||
Cmd_tryworryseed, //0xFE
|
||||
Cmd_metalburstdamagecalculator, //0xFF
|
||||
};
|
||||
|
||||
struct StatFractions
|
||||
@ -857,18 +857,18 @@ static const u32 sStatusFlagsForMoveEffects[NUM_MOVE_EFFECTS] =
|
||||
|
||||
static const u8* const sMoveEffectBS_Ptrs[] =
|
||||
{
|
||||
[MOVE_EFFECT_SLEEP] = BattleScript_MoveEffectSleep,
|
||||
[MOVE_EFFECT_POISON] = BattleScript_MoveEffectPoison,
|
||||
[MOVE_EFFECT_BURN] = BattleScript_MoveEffectBurn,
|
||||
[MOVE_EFFECT_FREEZE] = BattleScript_MoveEffectFreeze,
|
||||
[MOVE_EFFECT_PARALYSIS] = BattleScript_MoveEffectParalysis,
|
||||
[MOVE_EFFECT_TOXIC] = BattleScript_MoveEffectToxic,
|
||||
[MOVE_EFFECT_CONFUSION] = BattleScript_MoveEffectConfusion,
|
||||
[MOVE_EFFECT_UPROAR] = BattleScript_MoveEffectUproar,
|
||||
[MOVE_EFFECT_PAYDAY] = BattleScript_MoveEffectPayDay,
|
||||
[MOVE_EFFECT_WRAP] = BattleScript_MoveEffectWrap,
|
||||
[MOVE_EFFECT_RECOIL_25] = BattleScript_MoveEffectRecoil,
|
||||
[MOVE_EFFECT_RECOIL_33] = BattleScript_MoveEffectRecoil,
|
||||
[MOVE_EFFECT_SLEEP] = BattleScript_MoveEffectSleep,
|
||||
[MOVE_EFFECT_POISON] = BattleScript_MoveEffectPoison,
|
||||
[MOVE_EFFECT_BURN] = BattleScript_MoveEffectBurn,
|
||||
[MOVE_EFFECT_FREEZE] = BattleScript_MoveEffectFreeze,
|
||||
[MOVE_EFFECT_PARALYSIS] = BattleScript_MoveEffectParalysis,
|
||||
[MOVE_EFFECT_TOXIC] = BattleScript_MoveEffectToxic,
|
||||
[MOVE_EFFECT_CONFUSION] = BattleScript_MoveEffectConfusion,
|
||||
[MOVE_EFFECT_UPROAR] = BattleScript_MoveEffectUproar,
|
||||
[MOVE_EFFECT_PAYDAY] = BattleScript_MoveEffectPayDay,
|
||||
[MOVE_EFFECT_WRAP] = BattleScript_MoveEffectWrap,
|
||||
[MOVE_EFFECT_RECOIL_25] = BattleScript_MoveEffectRecoil,
|
||||
[MOVE_EFFECT_RECOIL_33] = BattleScript_MoveEffectRecoil,
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sUnusedWinTemplate = {0, 1, 3, 7, 0xF, 0x1F, 0x3F};
|
||||
@ -2936,7 +2936,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
(BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_RECORDED_LINK
|
||||
| BATTLE_TYPE_SECRET_BASE)))
|
||||
{
|
||||
gBattlescriptCurrInstr++;
|
||||
@ -2945,7 +2945,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
(BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_RECORDED_LINK
|
||||
| BATTLE_TYPE_SECRET_BASE))
|
||||
&& (gWishFutureKnock.knockedOffMons[side] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]]))
|
||||
{
|
||||
@ -3615,7 +3615,7 @@ static void Cmd_getexp(void)
|
||||
case 0: // check if should receive exp at all
|
||||
if (GetBattlerSide(gBattlerFainted) != B_SIDE_OPPONENT || (gBattleTypeFlags &
|
||||
(BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_RECORDED_LINK
|
||||
| BATTLE_TYPE_TRAINER_HILL
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_SAFARI
|
||||
@ -3938,7 +3938,7 @@ bool32 NoAliveMonsForEitherParty(void)
|
||||
return (NoAliveMonsForPlayer() || NoAliveMonsForOpponent());
|
||||
}
|
||||
|
||||
static void atk24(void)
|
||||
static void Cmd_unknown_24(void)
|
||||
{
|
||||
if (gBattleControllerExecFlags)
|
||||
return;
|
||||
@ -3948,7 +3948,7 @@ static void atk24(void)
|
||||
if (NoAliveMonsForOpponent())
|
||||
gBattleOutcome |= B_OUTCOME_WON;
|
||||
|
||||
if (gBattleOutcome == 0 && (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)))
|
||||
if (gBattleOutcome == 0 && (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)))
|
||||
{
|
||||
s32 i, foundPlayer, foundOpponent;
|
||||
|
||||
@ -3957,7 +3957,7 @@ static void atk24(void)
|
||||
if ((gHitMarker & HITMARKER_FAINTED2(i)) && (!gSpecialStatuses[i].flag40))
|
||||
foundPlayer++;
|
||||
}
|
||||
|
||||
|
||||
foundOpponent = 0;
|
||||
|
||||
for (i = 1; i < gBattlersCount; i += 2)
|
||||
@ -4304,7 +4304,7 @@ static void Cmd_waitstate(void)
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
|
||||
static void Cmd_update(void)
|
||||
static void Cmd_healthbar_update(void)
|
||||
{
|
||||
if (gBattlescriptCurrInstr[1] == BS_TARGET)
|
||||
gActiveBattler = gBattlerTarget;
|
||||
@ -4916,7 +4916,8 @@ static void Cmd_moveend(void)
|
||||
&& gBattleMoves[originallyUsedMove].effect != EFFECT_HEALING_WISH)
|
||||
{
|
||||
if (gHitMarker & HITMARKER_OBEYS)
|
||||
{ if (!gSpecialStatuses[gBattlerAttacker].dancerUsedMove)
|
||||
{
|
||||
if (!gSpecialStatuses[gBattlerAttacker].dancerUsedMove)
|
||||
{
|
||||
gLastMoves[gBattlerAttacker] = gChosenMove;
|
||||
gLastResultingMoves[gBattlerAttacker] = gCurrentMove;
|
||||
@ -5215,7 +5216,7 @@ static void Cmd_switchinanim(void)
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_RECORDED_LINK
|
||||
| BATTLE_TYPE_TRAINER_HILL
|
||||
| BATTLE_TYPE_FRONTIER)))
|
||||
HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality);
|
||||
@ -5278,7 +5279,7 @@ bool32 CanBattlerSwitch(u32 battlerId)
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x800000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TOWER_LINK_MULTI)
|
||||
{
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER)
|
||||
{
|
||||
@ -5932,7 +5933,7 @@ static void Cmd_playfaintcry(void)
|
||||
gBattlescriptCurrInstr += 2;
|
||||
}
|
||||
|
||||
static void atk57(void)
|
||||
static void Cmd_unknown_57(void)
|
||||
{
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
BtlController_EmitCmd55(0, gBattleOutcome);
|
||||
@ -6245,7 +6246,7 @@ static void Cmd_getmoneyreward(void)
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
|
||||
static void atk5E(void)
|
||||
static void Cmd_unknown_5E(void)
|
||||
{
|
||||
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
||||
|
||||
@ -7330,9 +7331,9 @@ static void Cmd_various(void)
|
||||
break;
|
||||
case VARIOUS_GET_BATTLER_FAINTED:
|
||||
if (gHitMarker & HITMARKER_FAINTED(gActiveBattler))
|
||||
gBattleCommunication[0] = 1;
|
||||
gBattleCommunication[0] = TRUE;
|
||||
else
|
||||
gBattleCommunication[0] = 0;
|
||||
gBattleCommunication[0] = FALSE;
|
||||
break;
|
||||
case VARIOUS_RESET_INTIMIDATE_TRACE_BITS:
|
||||
gSpecialStatuses[gActiveBattler].intimidatedMon = 0;
|
||||
@ -7366,7 +7367,8 @@ static void Cmd_various(void)
|
||||
}
|
||||
break;
|
||||
case VARIOUS_PALACE_FLAVOR_TEXT:
|
||||
gBattleCommunication[0] = 0;
|
||||
// Try and print end-of-turn Battle Palace flavor text (e.g. "A glint appears in mon's eyes")
|
||||
gBattleCommunication[0] = FALSE; // whether or not msg should be printed
|
||||
gBattleScripting.battler = gActiveBattler = gBattleCommunication[1];
|
||||
if (!(gBattleStruct->palaceFlags & gBitTable[gActiveBattler])
|
||||
&& gBattleMons[gActiveBattler].maxHP / 2 >= gBattleMons[gActiveBattler].hp
|
||||
@ -7374,7 +7376,7 @@ static void Cmd_various(void)
|
||||
&& !(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP))
|
||||
{
|
||||
gBattleStruct->palaceFlags |= gBitTable[gActiveBattler];
|
||||
gBattleCommunication[0] = 1;
|
||||
gBattleCommunication[0] = TRUE;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = sBattlePalaceNatureToFlavorTextId[GetNatureFromPersonality(gBattleMons[gActiveBattler].personality)];
|
||||
}
|
||||
break;
|
||||
@ -8314,7 +8316,7 @@ static void Cmd_various(void)
|
||||
SET_STATCHANGER(i + 1, abs(gTotemBoosts[gActiveBattler].statChanges[i]), TRUE);
|
||||
else
|
||||
SET_STATCHANGER(i + 1, gTotemBoosts[gActiveBattler].statChanges[i], FALSE);
|
||||
|
||||
|
||||
gTotemBoosts[gActiveBattler].stats &= ~(1 << i);
|
||||
gBattleScripting.battler = gActiveBattler;
|
||||
gBattlerTarget = gActiveBattler;
|
||||
@ -9212,7 +9214,7 @@ static void Cmd_forcerandomswitch(void)
|
||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
||||
}
|
||||
else if ((gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER && gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER && gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER && gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER))
|
||||
{
|
||||
if ((gBattlerTarget & BIT_FLANK) != 0)
|
||||
@ -9231,7 +9233,7 @@ static void Cmd_forcerandomswitch(void)
|
||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
||||
}
|
||||
else if ((gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_x2000000))
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
if (GetLinkTrainerFlankId(GetBattlerMultiplayerId(gBattlerTarget)) == 1)
|
||||
{
|
||||
@ -9331,8 +9333,8 @@ static void Cmd_forcerandomswitch(void)
|
||||
|
||||
if ((gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_x2000000 && gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_x2000000 && gBattleTypeFlags & BATTLE_TYPE_MULTI))
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI))
|
||||
{
|
||||
SwitchPartyOrderLinkMulti(gBattlerTarget, i, 0);
|
||||
SwitchPartyOrderLinkMulti(gBattlerTarget ^ BIT_FLANK, i, 1);
|
||||
@ -9417,7 +9419,7 @@ static void Cmd_tryconversiontypechange(void) // randomly changes user's type to
|
||||
|
||||
static void Cmd_givepaydaymoney(void)
|
||||
{
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) && gPaydayMoney != 0)
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)) && gPaydayMoney != 0)
|
||||
{
|
||||
u32 bonusMoney = gPaydayMoney * gBattleStruct->moneyMultiplier;
|
||||
AddMoney(&gSaveBlock1Ptr->money, bonusMoney);
|
||||
@ -11073,7 +11075,7 @@ static void Cmd_tryswapitems(void) // trick
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_SECRET_BASE
|
||||
| BATTLE_TYPE_x2000000))))
|
||||
| BATTLE_TYPE_RECORDED_LINK))))
|
||||
{
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||
}
|
||||
@ -11087,7 +11089,7 @@ static void Cmd_tryswapitems(void) // trick
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_SECRET_BASE
|
||||
| BATTLE_TYPE_x2000000))
|
||||
| BATTLE_TYPE_RECORDED_LINK))
|
||||
&& (gWishFutureKnock.knockedOffMons[sideAttacker] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]]
|
||||
|| gWishFutureKnock.knockedOffMons[sideTarget] & gBitTable[gBattlerPartyIndexes[gBattlerTarget]]))
|
||||
{
|
||||
|
@ -624,7 +624,7 @@ static void CB2_EndWildBattle(void)
|
||||
else
|
||||
{
|
||||
SetMainCallback2(CB2_ReturnToField);
|
||||
gFieldCallback = sub_80AF6F0;
|
||||
gFieldCallback = FieldCB_ReturnToFieldNoScriptCheckMusic;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -775,7 +775,7 @@ struct
|
||||
{
|
||||
{
|
||||
.species = SPECIES_METANG,
|
||||
.fixedIV = 31,
|
||||
.fixedIV = MAX_PER_STAT_IVS,
|
||||
.level = 42,
|
||||
.nature = NATURE_BRAVE,
|
||||
.evs = {0, 252, 252, 0, 6, 0},
|
||||
@ -783,7 +783,7 @@ struct
|
||||
},
|
||||
{
|
||||
.species = SPECIES_SKARMORY,
|
||||
.fixedIV = 31,
|
||||
.fixedIV = MAX_PER_STAT_IVS,
|
||||
.level = 43,
|
||||
.nature = NATURE_IMPISH,
|
||||
.evs = {252, 0, 0, 0, 6, 252},
|
||||
@ -791,7 +791,7 @@ struct
|
||||
},
|
||||
{
|
||||
.species = SPECIES_AGGRON,
|
||||
.fixedIV = 31,
|
||||
.fixedIV = MAX_PER_STAT_IVS,
|
||||
.level = 44,
|
||||
.nature = NATURE_ADAMANT,
|
||||
.evs = {0, 252, 0, 0, 252, 6},
|
||||
@ -1863,7 +1863,7 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId)
|
||||
}
|
||||
else
|
||||
{
|
||||
fixedIV = 31;
|
||||
fixedIV = MAX_PER_STAT_IVS;
|
||||
}
|
||||
|
||||
level = SetFacilityPtrsGetLevel();
|
||||
@ -2040,7 +2040,7 @@ void DoSpecialTrainerBattle(void)
|
||||
gBattleTypeFlags |= BATTLE_TYPE_DOUBLE | BATTLE_TYPE_INGAME_PARTNER | BATTLE_TYPE_MULTI | BATTLE_TYPE_TWO_OPPONENTS;
|
||||
break;
|
||||
case FRONTIER_MODE_LINK_MULTIS:
|
||||
gBattleTypeFlags |= BATTLE_TYPE_DOUBLE | BATTLE_TYPE_LINK | BATTLE_TYPE_MULTI | BATTLE_TYPE_x800000;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_DOUBLE | BATTLE_TYPE_LINK | BATTLE_TYPE_MULTI | BATTLE_TYPE_TOWER_LINK_MULTI;
|
||||
FillFrontierTrainersParties(FRONTIER_MULTI_PARTY_SIZE);
|
||||
break;
|
||||
}
|
||||
@ -3405,7 +3405,7 @@ static u8 GetFrontierTrainerFixedIvs(u16 trainerId)
|
||||
else if (trainerId <= FRONTIER_TRAINER_TESS) // 200 - 219
|
||||
fixedIv = 21;
|
||||
else // 220+ (- 299)
|
||||
fixedIv = 31;
|
||||
fixedIv = MAX_PER_STAT_IVS;
|
||||
|
||||
return fixedIv;
|
||||
}
|
||||
@ -3631,7 +3631,7 @@ bool32 ValidateBattleTowerRecord(u8 recordId) // unused
|
||||
|
||||
void TrySetLinkBattleTowerEnemyPartyLevel(void)
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
s32 i;
|
||||
u8 enemyLevel = SetFacilityPtrsGetLevel();
|
||||
|
902
src/battle_tv.c
@ -508,7 +508,7 @@ void HandleAction_Run(void)
|
||||
{
|
||||
gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
gCurrentTurnActionNumber = gBattlersCount;
|
||||
|
||||
@ -3289,7 +3289,7 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x800000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TOWER_LINK_MULTI)
|
||||
{
|
||||
if (GetBattlerSide(battler) == B_SIDE_PLAYER)
|
||||
{
|
||||
@ -6139,7 +6139,7 @@ u8 IsMonDisobedient(void)
|
||||
s32 calc;
|
||||
u8 obedienceLevel = 0;
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
return 0;
|
||||
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT)
|
||||
return 0;
|
||||
@ -7931,7 +7931,7 @@ bool8 ShouldGetStatBadgeBoost(u16 badgeFlag, u8 battlerId)
|
||||
{
|
||||
if (B_BADGE_BOOST != GEN_3)
|
||||
return FALSE;
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_FRONTIER))
|
||||
return FALSE;
|
||||
else if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
return FALSE;
|
||||
|
@ -2390,7 +2390,7 @@ static s16 Debug_GetGameTimeStage(void)
|
||||
static void CalculatePokeblock(struct BlenderBerry *berries, struct Pokeblock *pokeblock, u8 numPlayers, u8 *flavors, u16 maxRPM)
|
||||
{
|
||||
s32 i, j;
|
||||
s32 multiuseVar, var2;
|
||||
s32 multiuseVar;
|
||||
u8 numNegatives;
|
||||
|
||||
for (i = 0; i < FLAVOR_COUNT + 1; i++)
|
||||
|
@ -877,7 +877,7 @@ void StartBerryCrush(MainCallback callback)
|
||||
static void GetBerryFromBag(void)
|
||||
{
|
||||
if (gSpecialVar_ItemId < FIRST_BERRY_INDEX || gSpecialVar_ItemId > LAST_BERRY_INDEX + 1)
|
||||
gSpecialVar_ItemId = ITEM_CHERI_BERRY;
|
||||
gSpecialVar_ItemId = FIRST_BERRY_INDEX;
|
||||
else
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
|
||||
@ -1573,7 +1573,6 @@ static void Task_ShowBerryCrushRankings(u8 taskId)
|
||||
u8 i = 0, j, xPos, yPos;
|
||||
u32 score = 0;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u8 *str;
|
||||
|
||||
switch (data[0])
|
||||
{
|
||||
@ -1714,8 +1713,7 @@ void sub_8022588(struct BerryCrushGame *r5)
|
||||
|
||||
void sub_8022600(struct BerryCrushGame *r6)
|
||||
{
|
||||
u8 r7, r2;
|
||||
u8 *r4;
|
||||
u8 r7;
|
||||
|
||||
for (r7 = 0; r7 < r6->unk9; ++r7)
|
||||
{
|
||||
|
@ -128,8 +128,6 @@ static void UpdateLinkPlayerCountDisplay(u8 taskId, u8 numPlayers)
|
||||
|
||||
static u32 ExchangeDataAndGetLinkupStatus(u8 minPlayers, u8 maxPlayers)
|
||||
{
|
||||
int playerCount;
|
||||
|
||||
switch (GetLinkPlayerDataExchangeStatusTimed(minPlayers, maxPlayers))
|
||||
{
|
||||
case EXCHANGE_COMPLETE:
|
||||
@ -511,7 +509,6 @@ static void FinishLinkup(u16 *linkupStatus, u32 taskId)
|
||||
static void Task_LinkupAwaitTrainerCardData(u8 taskId)
|
||||
{
|
||||
u8 index;
|
||||
struct TrainerCard *trainerCards;
|
||||
|
||||
if (CheckLinkErrored(taskId) == TRUE)
|
||||
return;
|
||||
@ -993,7 +990,7 @@ static void CB2_ReturnFromUnionRoomBattle(void)
|
||||
|
||||
void CB2_ReturnFromCableClubBattle(void)
|
||||
{
|
||||
gBattleTypeFlags &= ~BATTLE_TYPE_20;
|
||||
gBattleTypeFlags &= ~BATTLE_TYPE_LINK_IN_BATTLE;
|
||||
Overworld_ResetMapMusic();
|
||||
LoadPlayerParty();
|
||||
SavePlayerBag();
|
||||
|