Merge branch 'master' of github.com:pret/pokeemerald into pokemon_expansion_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
|
||||
|
||||
|
@ -462,18 +462,18 @@ AI_CBM_Attract: @ 82DC5F5
|
||||
get_ability AI_TARGET
|
||||
if_equal ABILITY_OBLIVIOUS, Score_Minus10
|
||||
get_gender AI_USER
|
||||
if_equal 0, AI_CBM_Attract_CheckIfTargetIsFemale
|
||||
if_equal 254, AI_CBM_Attract_CheckIfTargetIsMale
|
||||
if_equal MON_MALE, AI_CBM_Attract_CheckIfTargetIsFemale
|
||||
if_equal MON_FEMALE, AI_CBM_Attract_CheckIfTargetIsMale
|
||||
goto Score_Minus10
|
||||
|
||||
AI_CBM_Attract_CheckIfTargetIsFemale: @ 82DC61A
|
||||
get_gender AI_TARGET
|
||||
if_equal 254, AI_CBM_Attract_End
|
||||
if_equal MON_FEMALE, AI_CBM_Attract_End
|
||||
goto Score_Minus10
|
||||
|
||||
AI_CBM_Attract_CheckIfTargetIsMale: @ 82DC627
|
||||
get_gender AI_TARGET
|
||||
if_equal 0, AI_CBM_Attract_End
|
||||
if_equal MON_MALE, AI_CBM_Attract_End
|
||||
goto Score_Minus10
|
||||
|
||||
AI_CBM_Attract_End: @ 82DC634
|
||||
@ -2057,12 +2057,22 @@ AI_CV_Protect_ScoreDown2:
|
||||
AI_CV_Protect_End:
|
||||
end
|
||||
|
||||
@ BUG: Foresight is only encouraged if the user is Ghost type or
|
||||
@ has high evasion, but should check target instead
|
||||
AI_CV_Foresight:
|
||||
.ifdef BUGFIX
|
||||
get_target_type1
|
||||
if_equal TYPE_GHOST, AI_CV_Foresight2
|
||||
get_target_type2
|
||||
if_equal TYPE_GHOST, AI_CV_Foresight2
|
||||
if_stat_level_more_than AI_TARGET, STAT_EVASION, 8, AI_CV_Foresight3
|
||||
.else
|
||||
get_user_type1
|
||||
if_equal TYPE_GHOST, AI_CV_Foresight2
|
||||
get_user_type2
|
||||
if_equal TYPE_GHOST, AI_CV_Foresight2
|
||||
if_stat_level_more_than AI_USER, STAT_EVASION, 8, AI_CV_Foresight3
|
||||
.endif
|
||||
score -2
|
||||
goto AI_CV_Foresight_End
|
||||
|
||||
@ -2329,13 +2339,13 @@ AI_CV_SemiInvulnerable2:
|
||||
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_SemiInvulnerable_TryEncourage
|
||||
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_SemiInvulnerable_TryEncourage
|
||||
get_weather
|
||||
.ifdef BUGFIX
|
||||
.ifdef BUGFIX
|
||||
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckIceType
|
||||
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
||||
.else
|
||||
.else
|
||||
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
||||
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckIceType
|
||||
.endif
|
||||
.endif
|
||||
goto AI_CV_SemiInvulnerable5
|
||||
|
||||
AI_CV_SemiInvulnerable_CheckSandstormTypes:
|
||||
@ -2404,11 +2414,11 @@ AI_CV_Hail_End:
|
||||
|
||||
@ BUG: Facade score is increased if the target is statused, but should be if the user is
|
||||
AI_CV_Facade:
|
||||
.ifdef BUGFIX
|
||||
.ifdef BUGFIX
|
||||
if_not_status AI_USER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
|
||||
.else
|
||||
.else
|
||||
if_not_status AI_TARGET, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
|
||||
.endif
|
||||
.endif
|
||||
score +1
|
||||
AI_CV_Facade_End:
|
||||
end
|
||||
|
@ -374,41 +374,41 @@ gBattleAnims_Moves::
|
||||
|
||||
.align 2
|
||||
gBattleAnims_StatusConditions::
|
||||
.4byte Status_Poison
|
||||
.4byte Status_Confusion
|
||||
.4byte Status_Burn
|
||||
.4byte Status_Infatuation
|
||||
.4byte Status_Sleep
|
||||
.4byte Status_Paralysis
|
||||
.4byte Status_Freeze
|
||||
.4byte Status_Curse
|
||||
.4byte Status_Nightmare
|
||||
.4byte Status_Poison @ B_ANIM_STATUS_PSN
|
||||
.4byte Status_Confusion @ B_ANIM_STATUS_CONFUSION
|
||||
.4byte Status_Burn @ B_ANIM_STATUS_BRN
|
||||
.4byte Status_Infatuation @ B_ANIM_STATUS_INFATUATION
|
||||
.4byte Status_Sleep @ B_ANIM_STATUS_SLP
|
||||
.4byte Status_Paralysis @ B_ANIM_STATUS_PRZ
|
||||
.4byte Status_Freeze @ B_ANIM_STATUS_FRZ
|
||||
.4byte Status_Curse @ B_ANIM_STATUS_CURSED
|
||||
.4byte Status_Nightmare @ B_ANIM_STATUS_NIGHTMARE
|
||||
|
||||
.align 2
|
||||
gBattleAnims_General::
|
||||
.4byte General_CastformChange
|
||||
.4byte General_StatsChange
|
||||
.4byte General_SubstituteFade
|
||||
.4byte General_SubstituteAppear
|
||||
.4byte General_PokeblockThrow
|
||||
.4byte General_ItemKnockoff
|
||||
.4byte General_TurnTrap
|
||||
.4byte General_HeldItemEffect
|
||||
.4byte General_SmokeballEscape
|
||||
.4byte General_FocusBand
|
||||
.4byte General_Rain
|
||||
.4byte General_Sun
|
||||
.4byte General_Sandstorm
|
||||
.4byte General_Hail
|
||||
.4byte General_LeechSeedDrain
|
||||
.4byte General_MonHit
|
||||
.4byte General_ItemSteal
|
||||
.4byte General_SnatchMove
|
||||
.4byte General_FutureSightHit
|
||||
.4byte General_DoomDesireHit
|
||||
.4byte General_FocusPunchSetUp
|
||||
.4byte General_IngrainHeal
|
||||
.4byte General_WishHeal
|
||||
.4byte General_CastformChange @ B_ANIM_CASTFORM_CHANGE
|
||||
.4byte General_StatsChange @ B_ANIM_STATS_CHANGE
|
||||
.4byte General_SubstituteFade @ B_ANIM_SUBSTITUTE_FADE
|
||||
.4byte General_SubstituteAppear @ B_ANIM_SUBSTITUTE_APPEAR
|
||||
.4byte General_PokeblockThrow @ B_ANIM_POKEBLOCK_THROW
|
||||
.4byte General_ItemKnockoff @ B_ANIM_ITEM_KNOCKOFF
|
||||
.4byte General_TurnTrap @ B_ANIM_TURN_TRAP
|
||||
.4byte General_HeldItemEffect @ B_ANIM_HELD_ITEM_EFFECT
|
||||
.4byte General_SmokeballEscape @ B_ANIM_SMOKEBALL_ESCAPE
|
||||
.4byte General_FocusBand @ B_ANIM_FOCUS_BAND
|
||||
.4byte General_Rain @ B_ANIM_RAIN_CONTINUES
|
||||
.4byte General_Sun @ B_ANIM_SUN_CONTINUES
|
||||
.4byte General_Sandstorm @ B_ANIM_SANDSTORM_CONTINUES
|
||||
.4byte General_Hail @ B_ANIM_HAIL_CONTINUES
|
||||
.4byte General_LeechSeedDrain @ B_ANIM_LEECH_SEED_DRAIN
|
||||
.4byte General_MonHit @ B_ANIM_MON_HIT
|
||||
.4byte General_ItemSteal @ B_ANIM_ITEM_STEAL
|
||||
.4byte General_SnatchMove @ B_ANIM_SNATCH_MOVE
|
||||
.4byte General_FutureSightHit @ B_ANIM_FUTURE_SIGHT_HIT
|
||||
.4byte General_DoomDesireHit @ B_ANIM_DOOM_DESIRE_HIT
|
||||
.4byte General_FocusPunchSetUp @ B_ANIM_FOCUS_PUNCH_SETUP
|
||||
.4byte General_IngrainHeal @ B_ANIM_INGRAIN_HEAL
|
||||
.4byte General_WishHeal @ B_ANIM_WISH_HEAL
|
||||
|
||||
.align 2
|
||||
gBattleAnims_Special::
|
||||
|
@ -2860,7 +2860,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
|
||||
@ -2978,7 +2978,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
|
||||
@ -3834,7 +3834,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
|
@ -85,8 +85,8 @@ enum
|
||||
|
||||
struct UnusedControllerStruct
|
||||
{
|
||||
u8 field_0:7;
|
||||
u8 flag_x80:1;
|
||||
u8 unk:7;
|
||||
u8 flag:1;
|
||||
};
|
||||
|
||||
struct HpAndStatus
|
||||
@ -145,19 +145,19 @@ enum
|
||||
CONTROLLER_STATUSXOR,
|
||||
CONTROLLER_DATATRANSFER,
|
||||
CONTROLLER_DMA3TRANSFER,
|
||||
CONTROLLER_31,
|
||||
CONTROLLER_PLAYBGM,
|
||||
CONTROLLER_32,
|
||||
CONTROLLER_TWORETURNVALUES,
|
||||
CONTROLLER_CHOSENMONRETURNVALUE,
|
||||
CONTROLLER_ONERETURNVALUE,
|
||||
CONTROLLER_ONERETURNVALUE_DUPLICATE,
|
||||
CONTROLLER_37,
|
||||
CONTROLLER_38,
|
||||
CONTROLLER_39,
|
||||
CONTROLLER_40,
|
||||
CONTROLLER_CLEARUNKVAR,
|
||||
CONTROLLER_SETUNKVAR,
|
||||
CONTROLLER_CLEARUNKFLAG,
|
||||
CONTROLLER_TOGGLEUNKFLAG,
|
||||
CONTROLLER_HITANIMATION,
|
||||
CONTROLLER_42,
|
||||
CONTROLLER_EFFECTIVENESSSOUND,
|
||||
CONTROLLER_PLAYSE,
|
||||
CONTROLLER_PLAYFANFAREORBGM,
|
||||
CONTROLLER_FAINTINGCRY,
|
||||
CONTROLLER_INTROSLIDE,
|
||||
@ -175,7 +175,7 @@ enum
|
||||
CONTROLLER_CMDS_COUNT
|
||||
};
|
||||
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
extern struct UnusedControllerStruct gUnusedControllerStruct;
|
||||
|
||||
// general functions
|
||||
void HandleLinkBattleSetup(void);
|
||||
@ -222,10 +222,10 @@ void BtlController_EmitTwoReturnValues(u8 bufferId, u8 arg1, u16 arg2);
|
||||
void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 b, u8 *c);
|
||||
void BtlController_EmitOneReturnValue(u8 bufferId, u16 arg1);
|
||||
void BtlController_EmitOneReturnValue_Duplicate(u8 bufferId, u16 b);
|
||||
void BtlController_EmitCmd37(u8 bufferId); // unused
|
||||
void BtlController_EmitCmd38(u8 bufferId, u8 b); // unused
|
||||
void BtlController_EmitCmd39(u8 bufferId); // unused
|
||||
void BtlController_EmitCmd40(u8 bufferId); // unused
|
||||
void BtlController_EmitClearUnkVar(u8 bufferId); // unused
|
||||
void BtlController_EmitSetUnkVar(u8 bufferId, u8 b); // unused
|
||||
void BtlController_EmitClearUnkFlag(u8 bufferId); // unused
|
||||
void BtlController_EmitToggleUnkFlag(u8 bufferId); // unused
|
||||
void BtlController_EmitHitAnimation(u8 bufferId);
|
||||
void BtlController_EmitCmd42(u8 bufferId);
|
||||
void BtlController_EmitPlaySE(u8 bufferId, u16 songId);
|
||||
|
@ -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)
|
||||
|
||||
|
@ -346,51 +346,51 @@
|
||||
#define BG_SOLARBEAM_PLAYER 25
|
||||
#define BG_SOLARBEAM_CONTESTS 26
|
||||
|
||||
// table ids for general animations
|
||||
#define B_ANIM_CASTFORM_CHANGE 0x0
|
||||
#define B_ANIM_STATS_CHANGE 0x1
|
||||
#define B_ANIM_SUBSTITUTE_FADE 0x2
|
||||
#define B_ANIM_SUBSTITUTE_APPEAR 0x3
|
||||
#define B_ANIM_POKEBLOCK_THROW 0x4
|
||||
#define B_ANIM_ITEM_KNOCKOFF 0x5
|
||||
#define B_ANIM_TURN_TRAP 0x6
|
||||
#define B_ANIM_HELD_ITEM_EFFECT 0x7
|
||||
#define B_ANIM_SMOKEBALL_ESCAPE 0x8
|
||||
#define B_ANIM_FOCUS_BAND 0x9
|
||||
#define B_ANIM_RAIN_CONTINUES 0xA
|
||||
#define B_ANIM_SUN_CONTINUES 0xB
|
||||
#define B_ANIM_SANDSTORM_CONTINUES 0xC
|
||||
#define B_ANIM_HAIL_CONTINUES 0xD
|
||||
#define B_ANIM_LEECH_SEED_DRAIN 0xE
|
||||
#define B_ANIM_MON_HIT 0xF
|
||||
#define B_ANIM_ITEM_STEAL 0x10
|
||||
#define B_ANIM_SNATCH_MOVE 0x11
|
||||
#define B_ANIM_FUTURE_SIGHT_HIT 0x12
|
||||
#define B_ANIM_DOOM_DESIRE_HIT 0x13
|
||||
#define B_ANIM_FOCUS_PUNCH_SETUP 0x14
|
||||
#define B_ANIM_INGRAIN_HEAL 0x15
|
||||
#define B_ANIM_WISH_HEAL 0x16
|
||||
// table ids for general animations (gBattleAnims_General)
|
||||
#define B_ANIM_CASTFORM_CHANGE 0
|
||||
#define B_ANIM_STATS_CHANGE 1
|
||||
#define B_ANIM_SUBSTITUTE_FADE 2
|
||||
#define B_ANIM_SUBSTITUTE_APPEAR 3
|
||||
#define B_ANIM_POKEBLOCK_THROW 4
|
||||
#define B_ANIM_ITEM_KNOCKOFF 5
|
||||
#define B_ANIM_TURN_TRAP 6
|
||||
#define B_ANIM_HELD_ITEM_EFFECT 7
|
||||
#define B_ANIM_SMOKEBALL_ESCAPE 8
|
||||
#define B_ANIM_FOCUS_BAND 9
|
||||
#define B_ANIM_RAIN_CONTINUES 10
|
||||
#define B_ANIM_SUN_CONTINUES 11
|
||||
#define B_ANIM_SANDSTORM_CONTINUES 12
|
||||
#define B_ANIM_HAIL_CONTINUES 13
|
||||
#define B_ANIM_LEECH_SEED_DRAIN 14
|
||||
#define B_ANIM_MON_HIT 15
|
||||
#define B_ANIM_ITEM_STEAL 16
|
||||
#define B_ANIM_SNATCH_MOVE 17
|
||||
#define B_ANIM_FUTURE_SIGHT_HIT 18
|
||||
#define B_ANIM_DOOM_DESIRE_HIT 19
|
||||
#define B_ANIM_FOCUS_PUNCH_SETUP 20
|
||||
#define B_ANIM_INGRAIN_HEAL 21
|
||||
#define B_ANIM_WISH_HEAL 22
|
||||
|
||||
// special animations table
|
||||
#define B_ANIM_LVL_UP 0x0
|
||||
#define B_ANIM_SWITCH_OUT_PLAYER_MON 0x1
|
||||
#define B_ANIM_SWITCH_OUT_OPPONENT_MON 0x2
|
||||
#define B_ANIM_BALL_THROW 0x3
|
||||
#define B_ANIM_BALL_THROW_WITH_TRAINER 0x4
|
||||
#define B_ANIM_SUBSTITUTE_TO_MON 0x5
|
||||
#define B_ANIM_MON_TO_SUBSTITUTE 0x6
|
||||
// special animations table (gBattleAnims_Special)
|
||||
#define B_ANIM_LVL_UP 0
|
||||
#define B_ANIM_SWITCH_OUT_PLAYER_MON 1
|
||||
#define B_ANIM_SWITCH_OUT_OPPONENT_MON 2
|
||||
#define B_ANIM_BALL_THROW 3
|
||||
#define B_ANIM_BALL_THROW_WITH_TRAINER 4
|
||||
#define B_ANIM_SUBSTITUTE_TO_MON 5
|
||||
#define B_ANIM_MON_TO_SUBSTITUTE 6
|
||||
|
||||
// status animation table
|
||||
#define B_ANIM_STATUS_PSN 0x0
|
||||
#define B_ANIM_STATUS_CONFUSION 0x1
|
||||
#define B_ANIM_STATUS_BRN 0x2
|
||||
#define B_ANIM_STATUS_INFATUATION 0x3
|
||||
#define B_ANIM_STATUS_SLP 0x4
|
||||
#define B_ANIM_STATUS_PRZ 0x5
|
||||
#define B_ANIM_STATUS_FRZ 0x6
|
||||
#define B_ANIM_STATUS_CURSED 0x7
|
||||
#define B_ANIM_STATUS_NIGHTMARE 0x8
|
||||
#define B_ANIM_STATUS_WRAPPED 0x9 // does not actually exist
|
||||
// status animation table (gBattleAnims_StatusConditions)
|
||||
#define B_ANIM_STATUS_PSN 0
|
||||
#define B_ANIM_STATUS_CONFUSION 1
|
||||
#define B_ANIM_STATUS_BRN 2
|
||||
#define B_ANIM_STATUS_INFATUATION 3
|
||||
#define B_ANIM_STATUS_SLP 4
|
||||
#define B_ANIM_STATUS_PRZ 5
|
||||
#define B_ANIM_STATUS_FRZ 6
|
||||
#define B_ANIM_STATUS_CURSED 7
|
||||
#define B_ANIM_STATUS_NIGHTMARE 8
|
||||
#define B_ANIM_STATUS_WRAPPED 9 // does not actually exist
|
||||
|
||||
// Tasks with return values often assign them to gBattleAnimArgs[7].
|
||||
#define ARG_RET_ID 7
|
||||
|
@ -216,4 +216,6 @@
|
||||
#define EFFECT_DRAGON_DANCE 212
|
||||
#define EFFECT_CAMOUFLAGE 213
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 214
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -124,7 +124,7 @@
|
||||
#define STRINGID_PKMNSTORINGENERGY 120
|
||||
#define STRINGID_PKMNUNLEASHEDENERGY 121
|
||||
#define STRINGID_PKMNFATIGUECONFUSION 122
|
||||
#define STRINGID_PKMNPICKEDUPITEM 123
|
||||
#define STRINGID_PLAYERPICKEDUPMONEY 123
|
||||
#define STRINGID_PKMNUNAFFECTED 124
|
||||
#define STRINGID_PKMNTRANSFORMEDINTO 125
|
||||
#define STRINGID_PKMNMADESUBSTITUTE 126
|
||||
|
@ -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,19 +5,22 @@
|
||||
#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_PURPLE RGB(24, 0, 24)
|
||||
#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_PURPLE RGB(24, 0, 24)
|
||||
#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);
|
||||
|
@ -7529,8 +7529,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[];
|
||||
@ -8456,6 +8456,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[];
|
||||
|
@ -16,6 +16,7 @@ struct PokemonSubstruct0
|
||||
u32 experience;
|
||||
u8 ppBonuses;
|
||||
u8 friendship;
|
||||
u16 filler;
|
||||
};
|
||||
|
||||
struct PokemonSubstruct1
|
||||
@ -243,6 +244,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:
|
||||
|
@ -293,7 +293,7 @@ void BattleAI_HandleItemUseBeforeAISetup(u8 defaultScoreMoves)
|
||||
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)
|
||||
)
|
||||
)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ static bool8 ShouldSwitchIfWonderGuard(void)
|
||||
}
|
||||
|
||||
// Get party information.
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if ((gActiveBattler & BIT_FLANK) == B_FLANK_LEFT)
|
||||
firstId = 0, lastId = 3;
|
||||
@ -158,7 +158,7 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
||||
if (gBattleMons[gActiveBattler].ability == absorbingTypeAbility)
|
||||
return FALSE;
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if ((gActiveBattler & BIT_FLANK) == B_FLANK_LEFT)
|
||||
firstId = 0, lastId = 3;
|
||||
@ -353,7 +353,7 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
|
||||
battlerIn2 = gActiveBattler;
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if ((gActiveBattler & BIT_FLANK) == 0)
|
||||
firstId = 0, lastId = 3;
|
||||
@ -464,7 +464,7 @@ static bool8 ShouldSwitch(void)
|
||||
battlerIn2 = *activeBattlerPtr;
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if ((gActiveBattler & BIT_FLANK) == B_FLANK_LEFT)
|
||||
firstId = 0, lastId = 3;
|
||||
@ -555,7 +555,7 @@ void AI_TrySwitchOrUseItem(void)
|
||||
battlerIn2 = GetBattlerAtPosition(battlerIdentity ^ BIT_FLANK);
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if ((gActiveBattler & BIT_FLANK) == B_FLANK_LEFT)
|
||||
firstId = 0, lastId = 3;
|
||||
@ -661,7 +661,7 @@ u8 GetMostSuitableMonToSwitchInto(void)
|
||||
battlerIn2 = gActiveBattler;
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if ((gActiveBattler & BIT_FLANK) == B_FLANK_LEFT)
|
||||
firstId = 0, lastId = 3;
|
||||
|
@ -4947,7 +4947,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;
|
||||
|
@ -708,7 +708,6 @@ static void sub_810E520(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
data->unk0_0d = 0;
|
||||
data->unk2;
|
||||
}
|
||||
data->unk0_1 = 0;
|
||||
break;
|
||||
|
@ -564,8 +564,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];
|
||||
|
@ -1551,8 +1551,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]);
|
||||
|
@ -881,8 +881,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];
|
||||
|
@ -759,7 +759,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)));
|
||||
@ -1140,7 +1140,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)
|
||||
{
|
||||
@ -1221,7 +1221,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)));
|
||||
}
|
||||
@ -1280,7 +1280,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)));
|
||||
}
|
||||
@ -1342,7 +1342,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);
|
||||
@ -104,63 +104,63 @@ 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,
|
||||
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_TERMINATOR_NOP] = LinkOpponentCmdEnd
|
||||
};
|
||||
|
||||
static void nullsub_28(void)
|
||||
@ -1603,27 +1603,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 = gBattleBufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleBufferA[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();
|
||||
}
|
||||
|
||||
@ -1692,7 +1692,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);
|
||||
@ -101,63 +101,63 @@ 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,
|
||||
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_TERMINATOR_NOP] = LinkPartnerCmdEnd
|
||||
};
|
||||
|
||||
static void SpriteCB_Null2(void)
|
||||
@ -1427,27 +1427,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 = gBattleBufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleBufferA[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);
|
||||
@ -109,67 +109,67 @@ 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,
|
||||
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_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)
|
||||
{
|
||||
@ -1259,7 +1259,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);
|
||||
@ -1343,7 +1343,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);
|
||||
@ -1631,7 +1631,7 @@ static void OpponentHandleChoosePokemon(void)
|
||||
battler2 = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000))
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if (gActiveBattler == 1)
|
||||
firstId = 0, lastId = 3;
|
||||
@ -1768,27 +1768,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 = gBattleBufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleBufferA[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();
|
||||
}
|
||||
|
||||
@ -1857,7 +1857,6 @@ static void OpponentHandleIntroSlide(void)
|
||||
|
||||
static void OpponentHandleIntroTrainerBallThrow(void)
|
||||
{
|
||||
u8 paletteNum;
|
||||
u8 taskId;
|
||||
|
||||
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||
|
@ -75,10 +75,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);
|
||||
@ -125,69 +125,69 @@ 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,
|
||||
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_TERMINATOR_NOP] = PlayerCmdEnd
|
||||
};
|
||||
|
||||
static const u8 sTargetIdentities[] = {B_POSITION_PLAYER_LEFT, B_POSITION_PLAYER_RIGHT, B_POSITION_OPPONENT_RIGHT, B_POSITION_OPPONENT_LEFT};
|
||||
|
||||
// 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)
|
||||
{
|
||||
@ -2821,27 +2821,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 = gBattleBufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleBufferA[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);
|
||||
@ -105,67 +105,67 @@ 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,
|
||||
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_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,
|
||||
@ -1678,27 +1678,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 = gBattleBufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleBufferA[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);
|
||||
@ -104,63 +104,63 @@ 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,
|
||||
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_TERMINATOR_NOP] = RecordedOpponentCmdEnd
|
||||
};
|
||||
|
||||
static void nullsub_70(void)
|
||||
@ -1235,7 +1235,7 @@ static void RecordedOpponentHandleDrawTrainerPic(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
trainerPicId = PlayerGenderToFrontTrainerPicId(gLinkPlayers[gUnknown_0203C7B4 ^ BIT_SIDE].gender);
|
||||
trainerPicId = PlayerGenderToFrontTrainerPicId(gLinkPlayers[gRecordedBattleMultiplayerId ^ BIT_SIDE].gender);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1543,27 +1543,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 = gBattleBufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleBufferA[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();
|
||||
}
|
||||
|
||||
@ -1632,7 +1632,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 = gBattleBufferA[gActiveBattler][1];
|
||||
gUnusedControllerStruct.unk = gBattleBufferA[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);
|
||||
@ -89,63 +89,63 @@ 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,
|
||||
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_TERMINATOR_NOP] = SafariCmdEnd
|
||||
};
|
||||
|
||||
static void SpriteCB_Null4(void)
|
||||
@ -470,8 +470,6 @@ static void SafariHandleChooseMove(void)
|
||||
|
||||
static void SafariHandleChooseItem(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattlerControllerFuncs[gActiveBattler] = SafariOpenPokeblockCase;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
@ -553,22 +551,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);
|
||||
@ -102,63 +102,63 @@ 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,
|
||||
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_TERMINATOR_NOP] = WallyCmdEnd
|
||||
};
|
||||
|
||||
static void SpriteCB_Null7(void)
|
||||
@ -1345,22 +1345,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();
|
||||
}
|
||||
|
@ -17,7 +17,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
|
||||
@ -64,7 +64,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);
|
||||
}
|
||||
@ -174,9 +174,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;
|
||||
|
||||
@ -259,9 +259,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)
|
||||
{
|
||||
@ -275,7 +275,7 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == var)
|
||||
if (i == multiplayerId)
|
||||
{
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToRecordedPlayer;
|
||||
switch (gLinkPlayers[i].id)
|
||||
@ -292,8 +292,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)
|
||||
@ -337,7 +337,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;
|
||||
@ -362,7 +362,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;
|
||||
@ -825,7 +825,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++)
|
||||
@ -1282,7 +1282,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++) // ????
|
||||
@ -1340,37 +1340,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);
|
||||
}
|
||||
|
||||
@ -1394,7 +1394,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;
|
||||
|
@ -2875,7 +2875,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])
|
||||
|
@ -988,11 +988,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++)
|
||||
{
|
||||
|
@ -1897,7 +1897,6 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
{
|
||||
u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
void *ptr;
|
||||
const u8 *genderTxt;
|
||||
u32 windowId, spriteTileNum;
|
||||
u8 *windowTileData;
|
||||
u16 species;
|
||||
|
@ -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]++;
|
||||
|
@ -572,13 +572,9 @@ const u8 * const gStatusConditionStringsTable[7][2] =
|
||||
{gStatusConditionString_LoveJpn, gText_Love}
|
||||
};
|
||||
|
||||
static const u8 sPkblToEscapeFactor[][3] = {{0, 0, 0}, {3, 5, 0}, {2, 3, 0}, {1, 2, 0}, {1, 1, 0}};
|
||||
static const u8 sGoNearCounterToCatchFactor[] = {4, 3, 2, 1};
|
||||
static const u8 sGoNearCounterToEscapeFactor[] = {4, 4, 4, 4};
|
||||
|
||||
// code
|
||||
void CB2_InitBattle(void)
|
||||
{
|
||||
u32 i;
|
||||
MoveSaveBlocks_ResetHeap();
|
||||
AllocateBattleResources();
|
||||
AllocateBattleSpritesData();
|
||||
@ -1112,7 +1108,7 @@ static void CB2_HandleStartBattle(void)
|
||||
SetMainCallback2(BattleMainCB2);
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
gBattleTypeFlags |= BATTLE_TYPE_20;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_LINK_IN_BATTLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1366,7 +1362,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
SetMainCallback2(BattleMainCB2);
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
gBattleTypeFlags |= BATTLE_TYPE_20;
|
||||
gBattleTypeFlags |= BATTLE_TYPE_LINK_IN_BATTLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1818,7 +1814,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;
|
||||
@ -1971,7 +1967,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;
|
||||
}
|
||||
@ -1983,7 +1979,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++)
|
||||
@ -2001,7 +1997,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);
|
||||
@ -2015,7 +2011,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);
|
||||
@ -2182,7 +2178,7 @@ void sub_8038D64(void)
|
||||
|
||||
SetHBlankCallback(NULL);
|
||||
SetVBlankCallback(NULL);
|
||||
gBattleTypeFlags &= ~(BATTLE_TYPE_20);
|
||||
gBattleTypeFlags &= ~(BATTLE_TYPE_LINK_IN_BATTLE);
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
{
|
||||
@ -2798,7 +2794,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);
|
||||
@ -3036,7 +3032,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;
|
||||
|
||||
gBattleScripting.battleStyle = gSaveBlock2Ptr->optionsBattleStyle;
|
||||
@ -3391,7 +3387,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(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);
|
||||
@ -3404,7 +3400,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
if (!(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);
|
||||
@ -3539,9 +3535,9 @@ static void BattleIntroPrintOpponentSendsOut(void)
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||
position = B_POSITION_OPPONENT_LEFT;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x80000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER)
|
||||
position = B_POSITION_OPPONENT_LEFT;
|
||||
else
|
||||
position = B_POSITION_PLAYER_LEFT;
|
||||
@ -3559,9 +3555,9 @@ static void BattleIntroOpponent2SendsOutMonAnimation(void)
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||
position = B_POSITION_OPPONENT_RIGHT;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x80000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER)
|
||||
position = B_POSITION_OPPONENT_RIGHT;
|
||||
else
|
||||
position = B_POSITION_PLAYER_RIGHT;
|
||||
@ -3587,9 +3583,9 @@ static void BattleIntroOpponent1SendsOutMonAnimation(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)
|
||||
position = B_POSITION_OPPONENT_LEFT;
|
||||
else
|
||||
position = B_POSITION_PLAYER_LEFT;
|
||||
@ -3630,7 +3626,7 @@ static void BattleIntroRecordMonsToDex(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);
|
||||
@ -3654,9 +3650,9 @@ static void BattleIntroPrintPlayerSendsOut(void)
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||
position = B_POSITION_PLAYER_LEFT;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x80000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER)
|
||||
position = B_POSITION_PLAYER_LEFT;
|
||||
else
|
||||
position = B_POSITION_OPPONENT_LEFT;
|
||||
@ -3677,9 +3673,9 @@ static void BattleIntroPlayer2SendsOutMonAnimation(void)
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||
position = B_POSITION_PLAYER_RIGHT;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x80000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER)
|
||||
position = B_POSITION_PLAYER_RIGHT;
|
||||
else
|
||||
position = B_POSITION_OPPONENT_RIGHT;
|
||||
@ -3709,9 +3705,9 @@ static void BattleIntroPlayer1SendsOutMonAnimation(void)
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
|
||||
position = B_POSITION_PLAYER_LEFT;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_x2000000)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x80000000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED_IS_MASTER)
|
||||
position = B_POSITION_PLAYER_LEFT;
|
||||
else
|
||||
position = B_POSITION_OPPONENT_LEFT;
|
||||
@ -4150,7 +4146,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;
|
||||
@ -4258,7 +4254,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))
|
||||
&& gBattleBufferB[gActiveBattler][1] == B_ACTION_RUN)
|
||||
{
|
||||
BattleScriptExecute(BattleScript_PrintCantRunFromTrainer);
|
||||
@ -4569,7 +4565,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
||||
}
|
||||
|
||||
// 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))
|
||||
&& FlagGet(FLAG_BADGE03_GET)
|
||||
&& GetBattlerSide(battler1) == B_SIDE_PLAYER)
|
||||
{
|
||||
@ -4603,7 +4599,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
||||
}
|
||||
|
||||
// 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))
|
||||
&& FlagGet(FLAG_BADGE03_GET)
|
||||
&& GetBattlerSide(battler2) == B_SIDE_PLAYER)
|
||||
{
|
||||
@ -4887,7 +4883,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;
|
||||
@ -4945,7 +4941,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)
|
||||
{
|
||||
@ -5026,7 +5022,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
|
||||
@ -5053,7 +5049,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
|
||||
|
@ -180,7 +180,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!");
|
||||
@ -340,9 +340,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.");
|
||||
@ -632,7 +632,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,
|
||||
@ -2009,9 +2009,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;
|
||||
}
|
||||
@ -2079,18 +2079,18 @@ void BufferStringBattle(u16 stringID)
|
||||
{
|
||||
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;
|
||||
@ -2113,7 +2113,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;
|
||||
@ -2140,9 +2140,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;
|
||||
@ -2210,7 +2210,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;
|
||||
@ -2336,8 +2336,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();
|
||||
|
||||
@ -2477,7 +2477,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)
|
||||
{
|
||||
@ -2858,7 +2858,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)
|
||||
{
|
||||
@ -3018,7 +3018,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()];
|
||||
|
@ -2713,7 +2713,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
(BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_x2000000
|
||||
| BATTLE_TYPE_RECORDED_LINK
|
||||
| BATTLE_TYPE_SECRET_BASE)))
|
||||
{
|
||||
gBattlescriptCurrInstr++;
|
||||
@ -2722,7 +2722,7 @@ void SetMoveEffect(bool8 primary, u8 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]]))
|
||||
{
|
||||
@ -3228,7 +3228,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
|
||||
@ -3533,7 +3533,7 @@ static void Cmd_unknown_24(void)
|
||||
if (HP_count == 0)
|
||||
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 foundPlayer = 0;
|
||||
s32 foundOpponent;
|
||||
@ -4634,7 +4634,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);
|
||||
@ -4691,7 +4691,7 @@ static void Cmd_jumpifcantswitch(void)
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_x800000)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TOWER_LINK_MULTI)
|
||||
{
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||
{
|
||||
@ -7137,7 +7137,7 @@ static void Cmd_forcerandomswitch(void)
|
||||
party = gEnemyParty;
|
||||
|
||||
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)
|
||||
@ -7156,7 +7156,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)
|
||||
{
|
||||
@ -7256,8 +7256,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);
|
||||
@ -7337,7 +7337,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);
|
||||
@ -9044,7 +9044,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);
|
||||
}
|
||||
@ -9058,7 +9058,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]]))
|
||||
{
|
||||
|
@ -607,7 +607,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},
|
||||
@ -1854,7 +1854,7 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId)
|
||||
}
|
||||
else
|
||||
{
|
||||
fixedIV = 31;
|
||||
fixedIV = MAX_PER_STAT_IVS;
|
||||
}
|
||||
|
||||
level = SetFacilityPtrsGetLevel();
|
||||
@ -2024,7 +2024,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;
|
||||
}
|
||||
@ -3295,7 +3295,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;
|
||||
}
|
||||
@ -3521,7 +3521,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
@ -452,7 +452,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;
|
||||
|
||||
@ -2245,7 +2245,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)
|
||||
{
|
||||
@ -3966,7 +3966,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;
|
||||
|
@ -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();
|
||||
|
@ -4419,7 +4419,6 @@ static void CalculateAppealMoveImpact(u8 contestant)
|
||||
u16 move;
|
||||
u8 effect;
|
||||
u8 rnd;
|
||||
bool8 canUseTurn;
|
||||
s32 i;
|
||||
|
||||
eContestantStatus[contestant].appeal = 0;
|
||||
|