Merge branch 'master' of github.com:pret/pokefirered into script_menu
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "battle_main.h"
|
||||
#include "battle_anim.h"
|
||||
#include "util.h"
|
||||
#include "item.h"
|
||||
#include "random.h"
|
||||
|
||||
@@ -28,7 +28,7 @@ static u8 GetBattlerSpriteFinal_Y(u8 battlerId, u16 species, bool8 a3);
|
||||
static void sub_8075658(struct Sprite *sprite);
|
||||
static void sub_80757E8(struct Sprite *sprite);
|
||||
static bool8 sub_80758DC(void);
|
||||
static void sub_8075EF0(struct Sprite *sprite);
|
||||
static void AnimThrowProjectile_Step(struct Sprite *sprite);
|
||||
static void sub_80760D0(u8 taskId);
|
||||
static void AnimTask_BlendMonInAndOutSetup(struct Task *task);
|
||||
static void AnimTask_BlendMonInAndOutStep(u8 taskId);
|
||||
@@ -1336,7 +1336,7 @@ static u8 GetBattlerAtPosition_(u8 position)
|
||||
return GetBattlerAtPosition(position);
|
||||
}
|
||||
|
||||
void sub_8075D9C(struct Sprite *sprite)
|
||||
void AnimSpriteOnMonPos(struct Sprite *sprite)
|
||||
{
|
||||
bool8 var;
|
||||
|
||||
@@ -1390,7 +1390,7 @@ void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite)
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_8075E80(struct Sprite *sprite)
|
||||
void AnimThrowProjectile(struct Sprite *sprite)
|
||||
{
|
||||
InitSpritePosToAnimAttacker(sprite, 1);
|
||||
if (GetBattlerSide(gBattleAnimAttacker))
|
||||
@@ -1400,10 +1400,10 @@ void sub_8075E80(struct Sprite *sprite)
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3];
|
||||
sprite->data[5] = gBattleAnimArgs[5];
|
||||
InitAnimArcTranslation(sprite);
|
||||
sprite->callback = sub_8075EF0;
|
||||
sprite->callback = AnimThrowProjectile_Step;
|
||||
}
|
||||
|
||||
static void sub_8075EF0(struct Sprite *sprite)
|
||||
static void AnimThrowProjectile_Step(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimHorizontalArc(sprite))
|
||||
DestroyAnimSprite(sprite);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -45,7 +45,7 @@ static void OpponentHandleTrainerSlideBack(void);
|
||||
static void OpponentHandleFaintAnimation(void);
|
||||
static void OpponentHandlePaletteFade(void);
|
||||
static void OpponentHandleSuccessBallThrowAnim(void);
|
||||
static void OpponentHandleBallThrow(void);
|
||||
static void OpponentHandleBallThrowAnim(void);
|
||||
static void OpponentHandlePause(void);
|
||||
static void OpponentHandleMoveAnimation(void);
|
||||
static void OpponentHandlePrintString(void);
|
||||
@@ -116,7 +116,7 @@ static void (*const sOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
OpponentHandleFaintAnimation,
|
||||
OpponentHandlePaletteFade,
|
||||
OpponentHandleSuccessBallThrowAnim,
|
||||
OpponentHandleBallThrow,
|
||||
OpponentHandleBallThrowAnim,
|
||||
OpponentHandlePause,
|
||||
OpponentHandleMoveAnimation,
|
||||
OpponentHandlePrintString,
|
||||
@@ -1231,7 +1231,7 @@ static void OpponentHandleSuccessBallThrowAnim(void)
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void OpponentHandleBallThrow(void)
|
||||
static void OpponentHandleBallThrowAnim(void)
|
||||
{
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -839,7 +839,7 @@ void sub_802F6A8(void)
|
||||
else
|
||||
{
|
||||
m4aSongNumStop(SE_HINSI);
|
||||
gMain.inBattle = 0;
|
||||
gMain.inBattle = FALSE;
|
||||
gMain.callback1 = gPreBattleCallback1;
|
||||
SetMainCallback2(gMain.savedCallback);
|
||||
}
|
||||
@@ -1318,7 +1318,6 @@ static void WaitForMonSelection(void)
|
||||
BtlController_EmitChosenMonReturnValue(1, gUnknown_203B0C1, gUnknown_203B0DC);
|
||||
else
|
||||
BtlController_EmitChosenMonReturnValue(1, 6, NULL);
|
||||
|
||||
if ((gBattleBufferA[gActiveBattler][1] & 0xF) == 1)
|
||||
PrintLinkStandbyMsg();
|
||||
PlayerBufferExecCompleted();
|
||||
|
||||
@@ -85,9 +85,9 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
gBattleMainFunc = BeginBattleIntro;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_POKEDUDE)
|
||||
{
|
||||
gBattlerControllerFuncs[0] = SetControllerToPokedude;
|
||||
gBattlerControllerFuncs[0] = SetControllerToPokeDude;
|
||||
gBattlerPositions[0] = B_POSITION_PLAYER_LEFT;
|
||||
gBattlerControllerFuncs[1] = SetControllerToPokedude;
|
||||
gBattlerControllerFuncs[1] = SetControllerToPokeDude;
|
||||
gBattlerPositions[1] = B_POSITION_OPPONENT_LEFT;
|
||||
gBattlersCount = 2;
|
||||
}
|
||||
@@ -95,8 +95,8 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
|
||||
gBattlerControllerFuncs[0] = SetControllerToSafari;
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_OLDMAN_TUTORIAL | BATTLE_TYPE_FIRST_BATTLE))
|
||||
gBattlerControllerFuncs[0] = SetControllerToOakOrOldman;
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_OLD_MAN_TUTORIAL | BATTLE_TYPE_FIRST_BATTLE))
|
||||
gBattlerControllerFuncs[0] = SetControllerToOakOrOldMan;
|
||||
else
|
||||
gBattlerControllerFuncs[0] = SetControllerToPlayer;
|
||||
gBattlerPositions[0] = B_POSITION_PLAYER_LEFT;
|
||||
@@ -110,13 +110,13 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
gBattleMainFunc = BeginBattleIntro;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_POKEDUDE)
|
||||
{
|
||||
gBattlerControllerFuncs[0] = SetControllerToPokedude;
|
||||
gBattlerControllerFuncs[0] = SetControllerToPokeDude;
|
||||
gBattlerPositions[0] = B_POSITION_PLAYER_LEFT;
|
||||
gBattlerControllerFuncs[1] = SetControllerToPokedude;
|
||||
gBattlerControllerFuncs[1] = SetControllerToPokeDude;
|
||||
gBattlerPositions[1] = B_POSITION_OPPONENT_LEFT;
|
||||
gBattlerControllerFuncs[2] = SetControllerToPokedude;
|
||||
gBattlerControllerFuncs[2] = SetControllerToPokeDude;
|
||||
gBattlerPositions[2] = B_POSITION_PLAYER_RIGHT;
|
||||
gBattlerControllerFuncs[3] = SetControllerToPokedude;
|
||||
gBattlerControllerFuncs[3] = SetControllerToPokeDude;
|
||||
gBattlerPositions[3] = B_POSITION_OPPONENT_RIGHT;
|
||||
gBattlersCount = MAX_BATTLERS_COUNT;
|
||||
}
|
||||
@@ -774,7 +774,7 @@ void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringID)
|
||||
sBattleBuffersTransferData[1] = CONTROLLER_PRINTSTRINGPLAYERONLY;
|
||||
sBattleBuffersTransferData[2] = stringID;
|
||||
sBattleBuffersTransferData[3] = (stringID & 0xFF00) >> 8;
|
||||
stringInfo = (struct BattleMsgData*)(&sBattleBuffersTransferData[4]);
|
||||
stringInfo = (struct BattleMsgData *)(&sBattleBuffersTransferData[4]);
|
||||
stringInfo->currentMove = gCurrentMove;
|
||||
stringInfo->originallyUsedMove = gChosenMove;
|
||||
stringInfo->lastItem = gLastUsedItem;
|
||||
|
||||
+4412
File diff suppressed because it is too large
Load Diff
@@ -48,6 +48,7 @@
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/pokemon.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/map_types.h"
|
||||
|
||||
#define DEFENDER_IS_PROTECTED ((gProtectStructs[gBattlerTarget].protected) && (gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED))
|
||||
|
||||
@@ -1222,7 +1223,7 @@ static void atk04_critcalc(void)
|
||||
critChance = NELEMS(sCriticalHitChance) - 1;
|
||||
if ((gBattleMons[gBattlerTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBattlerTarget].ability != ABILITY_SHELL_ARMOR)
|
||||
&& !(gStatuses3[gBattlerAttacker] & STATUS3_CANT_SCORE_A_CRIT)
|
||||
&& !(gBattleTypeFlags & BATTLE_TYPE_OLDMAN_TUTORIAL)
|
||||
&& !(gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL)
|
||||
&& !(Random() % sCriticalHitChance[critChance])
|
||||
&& (!(gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) || sub_80EB2E0(1))
|
||||
&& !(gBattleTypeFlags & BATTLE_TYPE_POKEDUDE))
|
||||
@@ -4414,7 +4415,7 @@ static void atk4E_switchinanim(void)
|
||||
&& !(gBattleTypeFlags &
|
||||
(BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_LEGENDARY
|
||||
| BATTLE_TYPE_OLDMAN_TUTORIAL
|
||||
| BATTLE_TYPE_OLD_MAN_TUTORIAL
|
||||
| BATTLE_TYPE_POKEDUDE
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_GHOST)))
|
||||
@@ -9436,7 +9437,7 @@ static void atkEF_handleballthrow(void)
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattlescriptCurrInstr = BattleScript_TrainerBallBlock;
|
||||
}
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_POKEDUDE | BATTLE_TYPE_OLDMAN_TUTORIAL))
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_POKEDUDE | BATTLE_TYPE_OLD_MAN_TUTORIAL))
|
||||
{
|
||||
BtlController_EmitBallThrowAnim(0, BALL_3_SHAKES_SUCCESS);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
@@ -9451,7 +9452,6 @@ static void atkEF_handleballthrow(void)
|
||||
catchRate = gBattleStruct->safariCatchFactor * 1275 / 100;
|
||||
else
|
||||
catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate;
|
||||
|
||||
if (gLastUsedItem > ITEM_SAFARI_BALL)
|
||||
{
|
||||
switch (gLastUsedItem)
|
||||
@@ -9515,7 +9515,7 @@ static void atkEF_handleballthrow(void)
|
||||
else
|
||||
{
|
||||
if (gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL] < 0xFF)
|
||||
gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL]++;
|
||||
++gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL];
|
||||
}
|
||||
}
|
||||
if (odds > 254) // mon caught
|
||||
|
||||
+1060
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@ struct TransitionData
|
||||
u16 winOut;
|
||||
u16 win0H;
|
||||
u16 win0V;
|
||||
u16 unused_A;
|
||||
u16 win1H; // not used
|
||||
u16 win1V;
|
||||
u16 bldCnt;
|
||||
u16 bldAlpha;
|
||||
@@ -3175,7 +3175,7 @@ static bool8 BT_Phase2WhiteFadeInStripes_Stop(struct Task *task)
|
||||
DmaStop(0);
|
||||
SetVBlankCallback(NULL);
|
||||
SetHBlankCallback(NULL);
|
||||
sTransitionStructPtr->win0H = 240;
|
||||
sTransitionStructPtr->win0H = WIN_RANGE(0, 240);
|
||||
sTransitionStructPtr->bldY = 0;
|
||||
sTransitionStructPtr->bldCnt = BLDCNT_TGT1_BG0 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN;
|
||||
sTransitionStructPtr->winIn = WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WININ_WIN0_CLR;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "bg.h"
|
||||
#include "battle.h"
|
||||
#include "battle_anim.h"
|
||||
#include "pokemon.h"
|
||||
#include "malloc.h"
|
||||
#include "trainer_tower.h"
|
||||
|
||||
+2
-2
@@ -134,7 +134,7 @@ bool32 IsEnigmaBerryValid(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
const struct Berry * sub_809C8A0(u8 berryIdx)
|
||||
const struct Berry * GetBerryInfo(u8 berryIdx)
|
||||
{
|
||||
if (berryIdx == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) && IsEnigmaBerryValid())
|
||||
return (struct Berry *)&gSaveBlock1Ptr->enigmaBerry.berry;
|
||||
@@ -163,7 +163,7 @@ u16 BerryTypeToItemId(u16 berryType)
|
||||
|
||||
void GetBerryNameByBerryType(u8 berryType, u8 * dest)
|
||||
{
|
||||
const struct Berry * berry = sub_809C8A0(berryType);
|
||||
const struct Berry * berry = GetBerryInfo(berryType);
|
||||
memcpy(dest, berry->name, 6);
|
||||
dest[6] = EOS;
|
||||
}
|
||||
|
||||
+1
-1
@@ -613,7 +613,7 @@ static void sub_80B82C0(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
task->data[5] += 8;
|
||||
if (task->data[5] >= task->data[7])
|
||||
if (task->data[5] >= task->data[7])
|
||||
task->data[5] = task->data[7];
|
||||
sub_80B843C(task);
|
||||
if (task->data[5] == task->data[7])
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
static const u8 sNoneDescription[] = _("No special ability.");
|
||||
static const u8 sStenchDescription[] = _("Helps repel wild POKéMON.");
|
||||
static const u8 sDrizzleDescription[] = _("Summons rain in battle.");
|
||||
static const u8 sSpeedBoostDescription[] = _("Gradually boosts SPEED.");
|
||||
static const u8 sBattleArmorDescription[] = _("Blocks critical hits.");
|
||||
static const u8 sSturdyDescription[] = _("Negates 1-hit KO attacks.");
|
||||
static const u8 sDampDescription[] = _("Prevents self-destruction.");
|
||||
static const u8 sLimberDescription[] = _("Prevents paralysis.");
|
||||
static const u8 sSandVeilDescription[] = _("Ups evasion in a sandstorm.");
|
||||
static const u8 sStaticDescription[] = _("Paralyzes on contact.");
|
||||
static const u8 sVoltAbsorbDescription[] = _("Turns electricity into HP.");
|
||||
static const u8 sWaterAbsorbDescription[] = _("Changes water into HP.");
|
||||
static const u8 sObliviousDescription[] = _("Prevents attraction.");
|
||||
static const u8 sCloudNineDescription[] = _("Negates weather effects.");
|
||||
static const u8 sCompoundEyesDescription[] = _("Raises accuracy.");
|
||||
static const u8 sInsomniaDescription[] = _("Prevents sleep.");
|
||||
static const u8 sColorChangeDescription[] = _("Changes type to foe's move.");
|
||||
static const u8 sImmunityDescription[] = _("Prevents poisoning.");
|
||||
static const u8 sFlashFireDescription[] = _("Powers up if hit by fire.");
|
||||
static const u8 sShieldDustDescription[] = _("Prevents added effects.");
|
||||
static const u8 sOwnTempoDescription[] = _("Prevents confusion.");
|
||||
static const u8 sSuctionCupsDescription[] = _("Firmly anchors the body.");
|
||||
static const u8 sIntimidateDescription[] = _("Lowers the foe's ATTACK.");
|
||||
static const u8 sShadowTagDescription[] = _("Prevents the foe's escape.");
|
||||
static const u8 sRoughSkinDescription[] = _("Hurts to touch.");
|
||||
static const u8 sWonderGuardDescription[] = _("“Super effective” hits.");
|
||||
static const u8 sLevitateDescription[] = _("Not hit by GROUND attacks.");
|
||||
static const u8 sEffectSporeDescription[] = _("Leaves spores on contact.");
|
||||
static const u8 sSynchronizeDescription[] = _("Passes on status problems.");
|
||||
static const u8 sClearBodyDescription[] = _("Prevents ability reduction.");
|
||||
static const u8 sNaturalCureDescription[] = _("Heals upon switching out.");
|
||||
static const u8 sLightningRodDescription[] = _("Draws electrical moves.");
|
||||
static const u8 sSereneGraceDescription[] = _("Promotes added effects.");
|
||||
static const u8 sSwiftSwimDescription[] = _("Raises SPEED in rain.");
|
||||
static const u8 sChlorophyllDescription[] = _("Raises SPEED in sunshine.");
|
||||
static const u8 sIlluminateDescription[] = _("Encounter rate increases.");
|
||||
static const u8 sTraceDescription[] = _("Copies special ability.");
|
||||
static const u8 sHugePowerDescription[] = _("Raises ATTACK.");
|
||||
static const u8 sPoisonPointDescription[] = _("Poisons foe on contact.");
|
||||
static const u8 sInnerFocusDescription[] = _("Prevents flinching.");
|
||||
static const u8 sMagmaArmorDescription[] = _("Prevents freezing.");
|
||||
static const u8 sWaterVeilDescription[] = _("Prevents burns.");
|
||||
static const u8 sMagnetPullDescription[] = _("Traps STEEL-type POKéMON.");
|
||||
static const u8 sSoundproofDescription[] = _("Avoids sound-based moves.");
|
||||
static const u8 sRainDishDescription[] = _("Slight HP recovery in rain.");
|
||||
static const u8 sSandStreamDescription[] = _("Summons a sandstorm.");
|
||||
static const u8 sPressureDescription[] = _("Raises foe's PP usage.");
|
||||
static const u8 sThickFatDescription[] = _("Heat-and-cold protection.");
|
||||
static const u8 sEarlyBirdDescription[] = _("Awakens quickly from sleep.");
|
||||
static const u8 sFlameBodyDescription[] = _("Burns the foe on contact.");
|
||||
static const u8 sRunAwayDescription[] = _("Makes escaping easier.");
|
||||
static const u8 sKeenEyeDescription[] = _("Prevents loss of accuracy.");
|
||||
static const u8 sHyperCutterDescription[] = _("Prevents ATTACK reduction.");
|
||||
static const u8 sPickupDescription[] = _("May pick up items.");
|
||||
static const u8 sTruantDescription[] = _("Moves only every two turns.");
|
||||
static const u8 sHustleDescription[] = _("Trades accuracy for power.");
|
||||
static const u8 sCuteCharmDescription[] = _("Infatuates on contact.");
|
||||
static const u8 sPlusDescription[] = _("Powers up with MINUS.");
|
||||
static const u8 sMinusDescription[] = _("Powers up with PLUS.");
|
||||
static const u8 sForecastDescription[] = _("Changes with the weather.");
|
||||
static const u8 sStickyHoldDescription[] = _("Prevents item theft.");
|
||||
static const u8 sShedSkinDescription[] = _("Heals the body by shedding.");
|
||||
static const u8 sGutsDescription[] = _("Ups ATTACK if suffering.");
|
||||
static const u8 sMarvelScaleDescription[] = _("Ups DEFENSE if suffering.");
|
||||
static const u8 sLiquidOozeDescription[] = _("Draining causes injury.");
|
||||
static const u8 sOvergrowDescription[] = _("Ups GRASS moves in a pinch.");
|
||||
static const u8 sBlazeDescription[] = _("Ups FIRE moves in a pinch.");
|
||||
static const u8 sTorrentDescription[] = _("Ups WATER moves in a pinch.");
|
||||
static const u8 sSwarmDescription[] = _("Ups BUG moves in a pinch.");
|
||||
static const u8 sRockHeadDescription[] = _("Prevents recoil damage.");
|
||||
static const u8 sDroughtDescription[] = _("Summons sunlight in battle.");
|
||||
static const u8 sArenaTrapDescription[] = _("Prevents fleeing.");
|
||||
static const u8 sVitalSpiritDescription[] = _("Prevents sleep.");
|
||||
static const u8 sWhiteSmokeDescription[] = _("Prevents ability reduction.");
|
||||
static const u8 sPurePowerDescription[] = _("Raises ATTACK.");
|
||||
static const u8 sShellArmorDescription[] = _("Blocks critical hits.");
|
||||
static const u8 sCacophonyDescription[] = _("Avoids sound-based moves.");
|
||||
static const u8 sAirLockDescription[] = _("Negates weather effects.");
|
||||
|
||||
const u8 *const gAbilityDescriptionPointers[ABILITIES_COUNT] =
|
||||
{
|
||||
[ABILITY_NONE] = sNoneDescription,
|
||||
[ABILITY_STENCH] = sStenchDescription,
|
||||
[ABILITY_DRIZZLE] = sDrizzleDescription,
|
||||
[ABILITY_SPEED_BOOST] = sSpeedBoostDescription,
|
||||
[ABILITY_BATTLE_ARMOR] = sBattleArmorDescription,
|
||||
[ABILITY_STURDY] = sSturdyDescription,
|
||||
[ABILITY_DAMP] = sDampDescription,
|
||||
[ABILITY_LIMBER] = sLimberDescription,
|
||||
[ABILITY_SAND_VEIL] = sSandVeilDescription,
|
||||
[ABILITY_STATIC] = sStaticDescription,
|
||||
[ABILITY_VOLT_ABSORB] = sVoltAbsorbDescription,
|
||||
[ABILITY_WATER_ABSORB] = sWaterAbsorbDescription,
|
||||
[ABILITY_OBLIVIOUS] = sObliviousDescription,
|
||||
[ABILITY_CLOUD_NINE] = sCloudNineDescription,
|
||||
[ABILITY_COMPOUND_EYES] = sCompoundEyesDescription,
|
||||
[ABILITY_INSOMNIA] = sInsomniaDescription,
|
||||
[ABILITY_COLOR_CHANGE] = sColorChangeDescription,
|
||||
[ABILITY_IMMUNITY] = sImmunityDescription,
|
||||
[ABILITY_FLASH_FIRE] = sFlashFireDescription,
|
||||
[ABILITY_SHIELD_DUST] = sShieldDustDescription,
|
||||
[ABILITY_OWN_TEMPO] = sOwnTempoDescription,
|
||||
[ABILITY_SUCTION_CUPS] = sSuctionCupsDescription,
|
||||
[ABILITY_INTIMIDATE] = sIntimidateDescription,
|
||||
[ABILITY_SHADOW_TAG] = sShadowTagDescription,
|
||||
[ABILITY_ROUGH_SKIN] = sRoughSkinDescription,
|
||||
[ABILITY_WONDER_GUARD] = sWonderGuardDescription,
|
||||
[ABILITY_LEVITATE] = sLevitateDescription,
|
||||
[ABILITY_EFFECT_SPORE] = sEffectSporeDescription,
|
||||
[ABILITY_SYNCHRONIZE] = sSynchronizeDescription,
|
||||
[ABILITY_CLEAR_BODY] = sClearBodyDescription,
|
||||
[ABILITY_NATURAL_CURE] = sNaturalCureDescription,
|
||||
[ABILITY_LIGHTNING_ROD] = sLightningRodDescription,
|
||||
[ABILITY_SERENE_GRACE] = sSereneGraceDescription,
|
||||
[ABILITY_SWIFT_SWIM] = sSwiftSwimDescription,
|
||||
[ABILITY_CHLOROPHYLL] = sChlorophyllDescription,
|
||||
[ABILITY_ILLUMINATE] = sIlluminateDescription,
|
||||
[ABILITY_TRACE] = sTraceDescription,
|
||||
[ABILITY_HUGE_POWER] = sHugePowerDescription,
|
||||
[ABILITY_POISON_POINT] = sPoisonPointDescription,
|
||||
[ABILITY_INNER_FOCUS] = sInnerFocusDescription,
|
||||
[ABILITY_MAGMA_ARMOR] = sMagmaArmorDescription,
|
||||
[ABILITY_WATER_VEIL] = sWaterVeilDescription,
|
||||
[ABILITY_MAGNET_PULL] = sMagnetPullDescription,
|
||||
[ABILITY_SOUNDPROOF] = sSoundproofDescription,
|
||||
[ABILITY_RAIN_DISH] = sRainDishDescription,
|
||||
[ABILITY_SAND_STREAM] = sSandStreamDescription,
|
||||
[ABILITY_PRESSURE] = sPressureDescription,
|
||||
[ABILITY_THICK_FAT] = sThickFatDescription,
|
||||
[ABILITY_EARLY_BIRD] = sEarlyBirdDescription,
|
||||
[ABILITY_FLAME_BODY] = sFlameBodyDescription,
|
||||
[ABILITY_RUN_AWAY] = sRunAwayDescription,
|
||||
[ABILITY_KEEN_EYE] = sKeenEyeDescription,
|
||||
[ABILITY_HYPER_CUTTER] = sHyperCutterDescription,
|
||||
[ABILITY_PICKUP] = sPickupDescription,
|
||||
[ABILITY_TRUANT] = sTruantDescription,
|
||||
[ABILITY_HUSTLE] = sHustleDescription,
|
||||
[ABILITY_CUTE_CHARM] = sCuteCharmDescription,
|
||||
[ABILITY_PLUS] = sPlusDescription,
|
||||
[ABILITY_MINUS] = sMinusDescription,
|
||||
[ABILITY_FORECAST] = sForecastDescription,
|
||||
[ABILITY_STICKY_HOLD] = sStickyHoldDescription,
|
||||
[ABILITY_SHED_SKIN] = sShedSkinDescription,
|
||||
[ABILITY_GUTS] = sGutsDescription,
|
||||
[ABILITY_MARVEL_SCALE] = sMarvelScaleDescription,
|
||||
[ABILITY_LIQUID_OOZE] = sLiquidOozeDescription,
|
||||
[ABILITY_OVERGROW] = sOvergrowDescription,
|
||||
[ABILITY_BLAZE] = sBlazeDescription,
|
||||
[ABILITY_TORRENT] = sTorrentDescription,
|
||||
[ABILITY_SWARM] = sSwarmDescription,
|
||||
[ABILITY_ROCK_HEAD] = sRockHeadDescription,
|
||||
[ABILITY_DROUGHT] = sDroughtDescription,
|
||||
[ABILITY_ARENA_TRAP] = sArenaTrapDescription,
|
||||
[ABILITY_VITAL_SPIRIT] = sVitalSpiritDescription,
|
||||
[ABILITY_WHITE_SMOKE] = sWhiteSmokeDescription,
|
||||
[ABILITY_PURE_POWER] = sPurePowerDescription,
|
||||
[ABILITY_SHELL_ARMOR] = sShellArmorDescription,
|
||||
[ABILITY_CACOPHONY] = sCacophonyDescription,
|
||||
[ABILITY_AIR_LOCK] = sAirLockDescription,
|
||||
};
|
||||
|
||||
const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] =
|
||||
{
|
||||
[ABILITY_NONE] = _("-------"),
|
||||
[ABILITY_STENCH] = _("STENCH"),
|
||||
[ABILITY_DRIZZLE] = _("DRIZZLE"),
|
||||
[ABILITY_SPEED_BOOST] = _("SPEED BOOST"),
|
||||
[ABILITY_BATTLE_ARMOR] = _("BATTLE ARMOR"),
|
||||
[ABILITY_STURDY] = _("STURDY"),
|
||||
[ABILITY_DAMP] = _("DAMP"),
|
||||
[ABILITY_LIMBER] = _("LIMBER"),
|
||||
[ABILITY_SAND_VEIL] = _("SAND VEIL"),
|
||||
[ABILITY_STATIC] = _("STATIC"),
|
||||
[ABILITY_VOLT_ABSORB] = _("VOLT ABSORB"),
|
||||
[ABILITY_WATER_ABSORB] = _("WATER ABSORB"),
|
||||
[ABILITY_OBLIVIOUS] = _("OBLIVIOUS"),
|
||||
[ABILITY_CLOUD_NINE] = _("CLOUD NINE"),
|
||||
[ABILITY_COMPOUND_EYES] = _("COMPOUNDEYES"),
|
||||
[ABILITY_INSOMNIA] = _("INSOMNIA"),
|
||||
[ABILITY_COLOR_CHANGE] = _("COLOR CHANGE"),
|
||||
[ABILITY_IMMUNITY] = _("IMMUNITY"),
|
||||
[ABILITY_FLASH_FIRE] = _("FLASH FIRE"),
|
||||
[ABILITY_SHIELD_DUST] = _("SHIELD DUST"),
|
||||
[ABILITY_OWN_TEMPO] = _("OWN TEMPO"),
|
||||
[ABILITY_SUCTION_CUPS] = _("SUCTION CUPS"),
|
||||
[ABILITY_INTIMIDATE] = _("INTIMIDATE"),
|
||||
[ABILITY_SHADOW_TAG] = _("SHADOW TAG"),
|
||||
[ABILITY_ROUGH_SKIN] = _("ROUGH SKIN"),
|
||||
[ABILITY_WONDER_GUARD] = _("WONDER GUARD"),
|
||||
[ABILITY_LEVITATE] = _("LEVITATE"),
|
||||
[ABILITY_EFFECT_SPORE] = _("EFFECT SPORE"),
|
||||
[ABILITY_SYNCHRONIZE] = _("SYNCHRONIZE"),
|
||||
[ABILITY_CLEAR_BODY] = _("CLEAR BODY"),
|
||||
[ABILITY_NATURAL_CURE] = _("NATURAL CURE"),
|
||||
[ABILITY_LIGHTNING_ROD] = _("LIGHTNINGROD"),
|
||||
[ABILITY_SERENE_GRACE] = _("SERENE GRACE"),
|
||||
[ABILITY_SWIFT_SWIM] = _("SWIFT SWIM"),
|
||||
[ABILITY_CHLOROPHYLL] = _("CHLOROPHYLL"),
|
||||
[ABILITY_ILLUMINATE] = _("ILLUMINATE"),
|
||||
[ABILITY_TRACE] = _("TRACE"),
|
||||
[ABILITY_HUGE_POWER] = _("HUGE POWER"),
|
||||
[ABILITY_POISON_POINT] = _("POISON POINT"),
|
||||
[ABILITY_INNER_FOCUS] = _("INNER FOCUS"),
|
||||
[ABILITY_MAGMA_ARMOR] = _("MAGMA ARMOR"),
|
||||
[ABILITY_WATER_VEIL] = _("WATER VEIL"),
|
||||
[ABILITY_MAGNET_PULL] = _("MAGNET PULL"),
|
||||
[ABILITY_SOUNDPROOF] = _("SOUNDPROOF"),
|
||||
[ABILITY_RAIN_DISH] = _("RAIN DISH"),
|
||||
[ABILITY_SAND_STREAM] = _("SAND STREAM"),
|
||||
[ABILITY_PRESSURE] = _("PRESSURE"),
|
||||
[ABILITY_THICK_FAT] = _("THICK FAT"),
|
||||
[ABILITY_EARLY_BIRD] = _("EARLY BIRD"),
|
||||
[ABILITY_FLAME_BODY] = _("FLAME BODY"),
|
||||
[ABILITY_RUN_AWAY] = _("RUN AWAY"),
|
||||
[ABILITY_KEEN_EYE] = _("KEEN EYE"),
|
||||
[ABILITY_HYPER_CUTTER] = _("HYPER CUTTER"),
|
||||
[ABILITY_PICKUP] = _("PICKUP"),
|
||||
[ABILITY_TRUANT] = _("TRUANT"),
|
||||
[ABILITY_HUSTLE] = _("HUSTLE"),
|
||||
[ABILITY_CUTE_CHARM] = _("CUTE CHARM"),
|
||||
[ABILITY_PLUS] = _("PLUS"),
|
||||
[ABILITY_MINUS] = _("MINUS"),
|
||||
[ABILITY_FORECAST] = _("FORECAST"),
|
||||
[ABILITY_STICKY_HOLD] = _("STICKY HOLD"),
|
||||
[ABILITY_SHED_SKIN] = _("SHED SKIN"),
|
||||
[ABILITY_GUTS] = _("GUTS"),
|
||||
[ABILITY_MARVEL_SCALE] = _("MARVEL SCALE"),
|
||||
[ABILITY_LIQUID_OOZE] = _("LIQUID OOZE"),
|
||||
[ABILITY_OVERGROW] = _("OVERGROW"),
|
||||
[ABILITY_BLAZE] = _("BLAZE"),
|
||||
[ABILITY_TORRENT] = _("TORRENT"),
|
||||
[ABILITY_SWARM] = _("SWARM"),
|
||||
[ABILITY_ROCK_HEAD] = _("ROCK HEAD"),
|
||||
[ABILITY_DROUGHT] = _("DROUGHT"),
|
||||
[ABILITY_ARENA_TRAP] = _("ARENA TRAP"),
|
||||
[ABILITY_VITAL_SPIRIT] = _("VITAL SPIRIT"),
|
||||
[ABILITY_WHITE_SMOKE] = _("WHITE SMOKE"),
|
||||
[ABILITY_PURE_POWER] = _("PURE POWER"),
|
||||
[ABILITY_SHELL_ARMOR] = _("SHELL ARMOR"),
|
||||
[ABILITY_CACOPHONY] = _("CACOPHONY"),
|
||||
[ABILITY_AIR_LOCK] = _("AIR LOCK"),
|
||||
};
|
||||
+2
-1
@@ -27,6 +27,7 @@
|
||||
#include "text_window.h"
|
||||
#include "fame_checker.h"
|
||||
#include "strings.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
#define SPRITETAG_SELECTOR_CURSOR 1000
|
||||
#define SPRITETAG_QUESTION_MARK 1001
|
||||
@@ -867,7 +868,7 @@ static void FC_DestroyWindow(u8 windowId)
|
||||
|
||||
static u8 AdjustGiovanniIndexIfBeatenInGym(u8 a0)
|
||||
{
|
||||
if (HasTrainerAlreadyBeenFought(0x15e) == TRUE)
|
||||
if (HasTrainerBeenFought(TRAINER_LEADER_GIOVANNI) == TRUE)
|
||||
{
|
||||
if (a0 == 9)
|
||||
return FAMECHECKER_GIOVANNI;
|
||||
|
||||
@@ -323,14 +323,14 @@ static void sub_807DFBC(u8 taskId)
|
||||
{
|
||||
case 0: // Never reached
|
||||
sub_807DCB0(0);
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
PlayerGetDestCoords(x, y);
|
||||
FieldSetDoorOpened(*x, *y);
|
||||
task->data[0] = 1;
|
||||
break;
|
||||
case 5:
|
||||
sub_807DCB0(0);
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
sub_807F114();
|
||||
sub_807DBAC();
|
||||
task->data[0] = 6;
|
||||
@@ -408,7 +408,7 @@ static void task_map_chg_seq_0807E20C(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
sub_807DCB0(0);
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
PlayerGetDestCoords(x, y);
|
||||
task->data[0] = 1;
|
||||
break;
|
||||
@@ -439,7 +439,7 @@ static void task_map_chg_seq_0807E2CC(u8 taskId)
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
case 0:
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
ScriptContext2_Enable();
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
@@ -459,7 +459,7 @@ static void sub_807E31C(u8 taskId)
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
case 0:
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
ScriptContext2_Enable();
|
||||
sub_805DC04();
|
||||
gTasks[taskId].data[0]++;
|
||||
@@ -689,7 +689,7 @@ static void sub_807E718(u8 taskId)
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
ScriptContext2_Enable();
|
||||
task->data[0]++;
|
||||
break;
|
||||
@@ -711,7 +711,7 @@ static void sub_807E784(u8 taskId)
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
ScriptContext2_Enable();
|
||||
PlaySE(SE_TK_WARPIN);
|
||||
sub_805DAB0();
|
||||
@@ -744,7 +744,7 @@ static void sub_807E80C(u8 taskId)
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
PlayerGetDestCoords(xp, yp);
|
||||
PlaySE(GetDoorSoundEffect(*xp, *yp - 1));
|
||||
task->data[1] = FieldAnimateDoorOpen(*xp, *yp - 1);
|
||||
@@ -798,7 +798,7 @@ static void sub_807E980(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
ScriptContext2_Enable();
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
CameraObjectReset2();
|
||||
data[0]++;
|
||||
break;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "field_map_obj.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/map_objects.h"
|
||||
#include "constants/map_types.h"
|
||||
|
||||
static void task08_080C9820(u8 taskId);
|
||||
static void sub_80C98FC(u8 taskId);
|
||||
|
||||
+1
-2
@@ -416,8 +416,7 @@ static void sub_80B91B0(u8 taskId)
|
||||
task->data[12] = gBattle_BG1_X;
|
||||
else
|
||||
task->data[12] = gBattle_BG2_X;
|
||||
|
||||
var0 = GetBattlerYCoordWithElevation(gBattleAnimAttacker);
|
||||
var0 = GetBattlerYCoordWithElevation(gBattleAnimAttacker);
|
||||
task->data[14] = var0 - 32;
|
||||
task->data[15] = var0 + 32;
|
||||
++task->data[0];
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ void CopyItemName(u16 itemId, u8 * dest)
|
||||
{
|
||||
if (itemId == ITEM_ENIGMA_BERRY)
|
||||
{
|
||||
StringCopy(dest, sub_809C8A0(43)->name);
|
||||
StringCopy(dest, GetBerryInfo(ITEM_TO_BERRY(ITEM_ENIGMA_BERRY))->name);
|
||||
StringAppend(dest, gUnknown_84162BD);
|
||||
}
|
||||
else
|
||||
|
||||
+3
-2
@@ -42,6 +42,7 @@
|
||||
#include "constants/maps.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/map_types.h"
|
||||
|
||||
EWRAM_DATA void (*sItemUseOnFieldCB)(u8 taskId) = NULL;
|
||||
|
||||
@@ -162,7 +163,7 @@ void sub_80A1184(void)
|
||||
|
||||
bool8 sub_80A1194(void)
|
||||
{
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
ScriptContext2_Enable();
|
||||
sub_807DC00();
|
||||
CreateTask(sub_80A11C0, 10);
|
||||
@@ -259,7 +260,7 @@ bool8 ItemUseCheckFunc_Rod(void)
|
||||
{
|
||||
if (MetatileBehavior_IsSurfable(behavior) && !MapGridIsImpassableAt(x, y))
|
||||
return TRUE;
|
||||
if (MetatileBehavior_ReturnFalse_6(behavior) == TRUE)
|
||||
if (MetatileBehavior_IsBridge(behavior) == TRUE)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
||||
+1
-1
@@ -1025,7 +1025,7 @@ bool8 IsLinkTaskFinished(void)
|
||||
{
|
||||
if (gWirelessCommType == 1)
|
||||
{
|
||||
return IsRfuTaskFinished();
|
||||
return IsLinkRfuTaskFinished();
|
||||
}
|
||||
return gLinkCallback == NULL;
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ bool8 sub_8069590(void)
|
||||
|
||||
void ScriptFreezeMapObjects(void)
|
||||
{
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
CreateTask(sub_8069570, 80);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ bool8 MetatileBehavior_IsMB21OrSand(u8 metatileBehavior)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 MetatileBehavior_IsMB21OrWaterfallBottom(u8 metatileBehavior)
|
||||
bool8 MetatileBehavior_IsSandOrDeepSand(u8 metatileBehavior)
|
||||
{
|
||||
if(metatileBehavior == MB_21 || metatileBehavior == MB_WATERFALL_BOTTOM)
|
||||
return TRUE;
|
||||
@@ -428,11 +428,11 @@ bool8 MetatileBehavior_IsTallGrass_2(u8 metatileBehavior)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 MetatileBehavior_ReturnFalse_3(u8 metatileBehavior) { return FALSE; }
|
||||
bool8 MetatileBehavior_IsLongGrass(u8 metatileBehavior) { return FALSE; }
|
||||
bool8 MetatileBehavior_ReturnFalse_4(u8 metatileBehavior) { return FALSE; }
|
||||
bool8 MetatileBehavior_ReturnFalse_5(u8 metatileBehavior) { return FALSE; }
|
||||
bool8 MetatileBehavior_ReturnFalse_6(u8 metatileBehavior) { return FALSE; }
|
||||
bool8 MetatileBehavior_ReturnFalse_7(u8 metatileBehavior) { return FALSE; }
|
||||
bool8 MetatileBehavior_IsBridge(u8 metatileBehavior) { return FALSE; }
|
||||
bool8 MetatileBehavior_GetBridgeType(u8 metatileBehavior) { return FALSE; }
|
||||
|
||||
bool8 MetatileBehavior_UnusedIsMB_01(u8 metatileBehavior)
|
||||
{
|
||||
@@ -450,7 +450,7 @@ bool8 MetatileBehavior_UnusedIsTallGrass(u8 metatileBehavior)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 MetatileBehavior_IsMB0B(u8 metatileBehavior)
|
||||
bool8 MetatileBehavior_IsIndoorEncounter(u8 metatileBehavior)
|
||||
{
|
||||
if(metatileBehavior == MB_0B)
|
||||
return TRUE;
|
||||
@@ -458,7 +458,7 @@ bool8 MetatileBehavior_IsMB0B(u8 metatileBehavior)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 MetatileBehavior_IsMB0C(u8 metatileBehavior)
|
||||
bool8 MetatileBehavior_IsMountain(u8 metatileBehavior)
|
||||
{
|
||||
if(metatileBehavior == MB_0C)
|
||||
return TRUE;
|
||||
|
||||
@@ -1374,7 +1374,7 @@ void task00_mystery_gift(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (IsRfuTaskFinished())
|
||||
if (IsLinkRfuTaskFinished())
|
||||
{
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
data->state = 14;
|
||||
@@ -1650,7 +1650,7 @@ void task00_mystery_gift(u8 taskId)
|
||||
data->state = 34;
|
||||
break;
|
||||
case 34:
|
||||
if (IsRfuTaskFinished())
|
||||
if (IsLinkRfuTaskFinished())
|
||||
{
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
data->state = 35;
|
||||
|
||||
+16
-17
@@ -8,7 +8,7 @@
|
||||
#include "data.h"
|
||||
#include "string_util.h"
|
||||
#include "battle.h"
|
||||
#include "battle_main.h"
|
||||
#include "battle_anim.h"
|
||||
#include "item.h"
|
||||
#include "event_data.h"
|
||||
#include "util.h"
|
||||
@@ -1467,7 +1467,7 @@ const struct SpriteTemplate gUnknown_825DEF0[] =
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F018,
|
||||
.oam = &gOamData_824F018,
|
||||
.anims = NULL,
|
||||
.images = gUnknown_8234698,
|
||||
.affineAnims = gSpriteAffineAnimTable_82348C8,
|
||||
@@ -1476,16 +1476,16 @@ const struct SpriteTemplate gUnknown_825DEF0[] =
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F010,
|
||||
.oam = &gOamData_824F010,
|
||||
.anims = NULL,
|
||||
.images = gUnknown_82346B8,
|
||||
.affineAnims = gSpriteAffineAnimTable_8234944,
|
||||
.callback = oac_poke_opponent,
|
||||
.callback = SpriteCB_WildMon,
|
||||
},
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F018,
|
||||
.oam = &gOamData_824F018,
|
||||
.anims = NULL,
|
||||
.images = gUnknown_82346D8,
|
||||
.affineAnims = gSpriteAffineAnimTable_82348C8,
|
||||
@@ -1494,11 +1494,11 @@ const struct SpriteTemplate gUnknown_825DEF0[] =
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F010,
|
||||
.oam = &gOamData_824F010,
|
||||
.anims = NULL,
|
||||
.images = gUnknown_82346F8,
|
||||
.affineAnims = gSpriteAffineAnimTable_8234944,
|
||||
.callback = oac_poke_opponent,
|
||||
.callback = SpriteCB_WildMon,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1507,7 +1507,7 @@ const struct SpriteTemplate gUnknown_825DF50[] =
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F018,
|
||||
.oam = &gOamData_824F018,
|
||||
.anims = NULL,
|
||||
.images = gTrainerBackPicTable_Red,
|
||||
.affineAnims = gSpriteAffineAnimTable_82348C8,
|
||||
@@ -1516,7 +1516,7 @@ const struct SpriteTemplate gUnknown_825DF50[] =
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F018,
|
||||
.oam = &gOamData_824F018,
|
||||
.anims = NULL,
|
||||
.images = gTrainerBackPicTable_Leaf,
|
||||
.affineAnims = gSpriteAffineAnimTable_82348C8,
|
||||
@@ -1525,7 +1525,7 @@ const struct SpriteTemplate gUnknown_825DF50[] =
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F018,
|
||||
.oam = &gOamData_824F018,
|
||||
.anims = NULL,
|
||||
.images = gTrainerBackPicTable_RSBrendan,
|
||||
.affineAnims = gSpriteAffineAnimTable_82348C8,
|
||||
@@ -1534,7 +1534,7 @@ const struct SpriteTemplate gUnknown_825DF50[] =
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F018,
|
||||
.oam = &gOamData_824F018,
|
||||
.anims = NULL,
|
||||
.images = gTrainerBackPicTable_RSMay,
|
||||
.affineAnims = gSpriteAffineAnimTable_82348C8,
|
||||
@@ -1543,7 +1543,7 @@ const struct SpriteTemplate gUnknown_825DF50[] =
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F018,
|
||||
.oam = &gOamData_824F018,
|
||||
.anims = NULL,
|
||||
.images = gTrainerBackPicTable_PokeDude,
|
||||
.affineAnims = gSpriteAffineAnimTable_82348C8,
|
||||
@@ -1552,7 +1552,7 @@ const struct SpriteTemplate gUnknown_825DF50[] =
|
||||
{
|
||||
.tileTag = SPRITE_INVALID_TAG,
|
||||
.paletteTag = 0,
|
||||
.oam = &gUnknown_824F018,
|
||||
.oam = &gOamData_824F018,
|
||||
.anims = NULL,
|
||||
.images = gTrainerBackPicTable_OldMan,
|
||||
.affineAnims = gSpriteAffineAnimTable_82348C8,
|
||||
@@ -4652,8 +4652,7 @@ bool8 PokemonUseItemEffects2(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo
|
||||
sp18 = itemEffect[r10];
|
||||
r10++;
|
||||
break;
|
||||
case 7:\
|
||||
|
||||
case 7:
|
||||
if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200
|
||||
&& retVal == FALSE
|
||||
&& sp18 == 0)
|
||||
@@ -5406,7 +5405,7 @@ u16 GetMonEVCount(struct Pokemon *mon)
|
||||
return count;
|
||||
}
|
||||
|
||||
void sub_8043A68(void)
|
||||
void RandomlyGivePartyPokerus(struct Pokemon *party)
|
||||
{
|
||||
u8 foo[4]; // huh?
|
||||
}
|
||||
@@ -5472,7 +5471,7 @@ static void sub_8043B38(void)
|
||||
u8 foo[4]; // huh?
|
||||
}
|
||||
|
||||
void sub_8043B40(void)
|
||||
void PartySpreadPokerus(struct Pokemon *party)
|
||||
{
|
||||
u8 foo[4]; // huh?
|
||||
}
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@ const struct SpriteTemplate gUnknown_83E6DF8 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_83E6DF4,
|
||||
.callback = sub_8075D9C,
|
||||
.callback = AnimSpriteOnMonPos,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_83E6E10 =
|
||||
@@ -376,7 +376,7 @@ const struct SpriteTemplate gUnknown_83E7148 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_83E7144,
|
||||
.callback = sub_8075D9C,
|
||||
.callback = AnimSpriteOnMonPos,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83E7160[] =
|
||||
|
||||
+16
-55
@@ -1514,7 +1514,7 @@ static void sub_8111F8C(u8 taskId)
|
||||
|
||||
if (ScriptContext2_IsEnabled() != TRUE)
|
||||
{
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
sub_805C270();
|
||||
sub_805C780();
|
||||
ScriptContext2_Enable();
|
||||
@@ -1537,7 +1537,7 @@ static void sub_8111FCC(u8 taskId)
|
||||
task->data[0] = 0;
|
||||
task->data[1] = 0;
|
||||
task->func = sub_8112044;
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
ScriptContext2_Enable();
|
||||
}
|
||||
}
|
||||
@@ -4911,7 +4911,6 @@ static const u16 gUnknown_8456C50[] = {
|
||||
0x08a1
|
||||
};
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_8115748(u16 a0)
|
||||
{
|
||||
s32 i;
|
||||
@@ -4919,60 +4918,22 @@ void sub_8115748(u16 a0)
|
||||
return;
|
||||
for (i = 0; i < 17; i++)
|
||||
{
|
||||
if (a0 != gUnknown_8456C50[i])
|
||||
continue;
|
||||
if (!FlagGet(a0))
|
||||
gUnknown_203B049 = TRUE;
|
||||
else
|
||||
gUnknown_203B049 = FALSE;
|
||||
break;
|
||||
if (a0 == gUnknown_8456C50[i])
|
||||
{
|
||||
if (!FlagGet(a0))
|
||||
{
|
||||
gUnknown_203B049 = TRUE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_203B049 += 0;
|
||||
gUnknown_203B049 = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_8115748(u16 a0)
|
||||
{
|
||||
asm_unified("\tpush {r4,lr}\n"
|
||||
"\tlsls r0, 16\n"
|
||||
"\tlsrs r2, r0, 16\n"
|
||||
"\tldr r0, =gUnknown_203ADFA\n"
|
||||
"\tldrb r0, [r0]\n"
|
||||
"\tsubs r0, 0x2\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tlsrs r0, 24\n"
|
||||
"\tcmp r0, 0x1\n"
|
||||
"\tbls _08115792\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tldr r4, =gUnknown_203B049\n"
|
||||
"\tldr r0, =gUnknown_8456C50\n"
|
||||
"\tb _08115778\n"
|
||||
"\t.pool\n"
|
||||
"_08115770:\n"
|
||||
"\tmovs r0, 0\n"
|
||||
"\tb _08115790\n"
|
||||
"_08115774:\n"
|
||||
"\tadds r0, 0x2\n"
|
||||
"\tadds r1, 0x1\n"
|
||||
"_08115778:\n"
|
||||
"\tcmp r1, 0x10\n"
|
||||
"\tbgt _08115792\n"
|
||||
"\tldrh r3, [r0]\n"
|
||||
"\tcmp r2, r3\n"
|
||||
"\tbne _08115774\n"
|
||||
"\tadds r0, r2, 0\n"
|
||||
"\tbl FlagGet\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbne _08115770\n"
|
||||
"\tmovs r0, 0x1\n"
|
||||
"_08115790:\n"
|
||||
"\tstrb r0, [r4]\n"
|
||||
"_08115792:\n"
|
||||
"\tpop {r4}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0");
|
||||
}
|
||||
#endif // NONMATCHING
|
||||
|
||||
void sub_8115798(void)
|
||||
{
|
||||
|
||||
@@ -88,7 +88,7 @@ void sub_8150530(void)
|
||||
else
|
||||
{
|
||||
sub_81507BC(mapObject, sub_805C808(4));
|
||||
StartSpriteAnim(sprite, sub_80634F0(mapObject->mapobj_unk_18));
|
||||
StartSpriteAnim(sprite, sub_80634F0(mapObject->facingDirection));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ void sub_81505C4(u8 taskId)
|
||||
FieldObjectClearAnimIfSpecialAnimActive(mapObject);
|
||||
mapObject->mapobj_bit_11 = TRUE;
|
||||
sub_81507BC(mapObject, sub_805C808(4));
|
||||
StartSpriteAnim(sprite, sub_80634F0(mapObject->mapobj_unk_18));
|
||||
StartSpriteAnim(sprite, sub_80634F0(mapObject->facingDirection));
|
||||
gTasks[taskId].data[0]++;
|
||||
gTasks[taskId].data[1] = 0;
|
||||
break;
|
||||
|
||||
+19
-18
@@ -2,6 +2,7 @@
|
||||
#include "constants/species.h"
|
||||
#include "malloc.h"
|
||||
#include "battle.h"
|
||||
#include "battle_anim.h"
|
||||
#include "link.h"
|
||||
#include "overworld.h"
|
||||
#include "quest_log.h"
|
||||
@@ -22,11 +23,11 @@ struct QuestLogStruct_WildBattleRecord
|
||||
u8 v4;
|
||||
};
|
||||
|
||||
void sub_812C334(s32 *, s32 *);
|
||||
static void sub_812C334(s32 *, s32 *);
|
||||
|
||||
void sub_812BFDC(void)
|
||||
{
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_OLDMAN_TUTORIAL | BATTLE_TYPE_POKEDUDE)) && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT))
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_OLD_MAN_TUTORIAL | BATTLE_TYPE_POKEDUDE)) && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT))
|
||||
{
|
||||
struct QuestLogStruct_TrainerBattleRecord * questLogTrainerBattleRecord = Alloc(sizeof(struct QuestLogStruct_TrainerBattleRecord));
|
||||
struct QuestLogStruct_WildBattleRecord * questLogWildBattleRecord = Alloc(sizeof(struct QuestLogStruct_WildBattleRecord));
|
||||
@@ -38,18 +39,18 @@ void sub_812BFDC(void)
|
||||
{
|
||||
switch (gTrainers[gTrainerBattleOpponent_A].trainerClass)
|
||||
{
|
||||
case 0x54:
|
||||
questLogMessageType = 30;
|
||||
break;
|
||||
case 0x5a:
|
||||
questLogMessageType = 33;
|
||||
break;
|
||||
case 0x57:
|
||||
questLogMessageType = 32;
|
||||
break;
|
||||
default:
|
||||
questLogMessageType = 34;
|
||||
break;
|
||||
case 0x54:
|
||||
questLogMessageType = 30;
|
||||
break;
|
||||
case 0x5a:
|
||||
questLogMessageType = 33;
|
||||
break;
|
||||
case 0x57:
|
||||
questLogMessageType = 32;
|
||||
break;
|
||||
default:
|
||||
questLogMessageType = 34;
|
||||
break;
|
||||
}
|
||||
questLogTrainerBattleRecord->v0 = gTrainerBattleOpponent_A;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
@@ -141,7 +142,7 @@ void sub_812C224(void)
|
||||
}
|
||||
for (r3 = 0; r3 < 7; r3++)
|
||||
{
|
||||
r5->v1[0][r3] = gLinkPlayers[gBattleStruct->field_B5 ^ 1].name[r3];
|
||||
r5->v1[0][r3] = gLinkPlayers[gBattleStruct->multiplayerId ^ 1].name[r3];
|
||||
}
|
||||
}
|
||||
sub_8113550(r8, (const u16 *)r5);
|
||||
@@ -149,16 +150,16 @@ void sub_812C224(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_812C334(s32 * a0, s32 * a1)
|
||||
static void sub_812C334(s32 * a0, s32 * a1)
|
||||
{
|
||||
s32 r5;
|
||||
s32 _optimized_out = 0;
|
||||
u8 r2 = gLinkPlayers[gBattleStruct->field_B5].id ^ 2;
|
||||
u8 r2 = gLinkPlayers[gBattleStruct->multiplayerId].id ^ 2;
|
||||
for (r5 = 0; r5 < 4; r5++)
|
||||
{
|
||||
if (r2 == gLinkPlayers[r5].id)
|
||||
a0[0] = r5;
|
||||
else if (r5 != gBattleStruct->field_B5)
|
||||
else if (r5 != gBattleStruct->multiplayerId)
|
||||
a1[_optimized_out++] = r5;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ static bool8 LoadBattlerSpriteGfx(u8 battler)
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_SAFARI && battler == B_POSITION_PLAYER_LEFT) // Should be checking position, not battler.
|
||||
DecompressTrainerBackPalette(gSaveBlock2Ptr->playerGender, battler);
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_OLDMAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT) // Should be checking position, not battler.
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT) // Should be checking position, not battler.
|
||||
DecompressTrainerBackPalette(5, battler);
|
||||
else if (!gBattleSpritesDataPtr->battlerData[battler].behindSubstitute)
|
||||
BattleLoadPlayerMonSpriteGfx(&gPlayerParty[gBattlerPartyIndexes[battler]], battler);
|
||||
@@ -256,7 +256,7 @@ static void CreateBattlerSprite(u8 battler)
|
||||
gSprites[gBattlerSpriteIds[battler]].callback = SpriteCallbackDummy;
|
||||
gSprites[gBattlerSpriteIds[battler]].data[0] = battler;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_OLDMAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT)
|
||||
{
|
||||
SetMultiuseSpriteTemplateToTrainerBack(5, GetBattlerPosition(0));
|
||||
gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, 0x50,
|
||||
@@ -292,7 +292,7 @@ static void CreateHealthboxSprite(u8 battler)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI && battler == B_POSITION_PLAYER_LEFT)
|
||||
healthboxSpriteId = CreateSafariPlayerHealthboxSprites();
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_OLDMAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL && battler == B_POSITION_PLAYER_LEFT)
|
||||
return;
|
||||
else
|
||||
healthboxSpriteId = CreateBattlerHealthboxSprites(battler);
|
||||
|
||||
+1
-1
@@ -1916,7 +1916,7 @@ bool8 ScrCmd_checktrainerflag(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 index = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
ctx->comparisonResult = HasTrainerAlreadyBeenFought(index);
|
||||
ctx->comparisonResult = HasTrainerBeenFought(index);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -392,7 +392,7 @@ void ShowStartMenu(void)
|
||||
{
|
||||
if (!IsUpdateLinkStateCBActive())
|
||||
{
|
||||
player_bitmagic();
|
||||
FreezeEventObjects();
|
||||
sub_805C270();
|
||||
sub_805C780();
|
||||
}
|
||||
|
||||
+1
-1
@@ -1214,7 +1214,7 @@ static void TeachyTvPreBattleAnimAndSetBattleCallback(u8 taskId)
|
||||
case 1:
|
||||
if (BT_IsDone())
|
||||
{
|
||||
SetMainCallback2(sub_800FD9C);
|
||||
SetMainCallback2(CB2_InitBattle);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
break;
|
||||
|
||||
+1
-1
@@ -940,7 +940,7 @@ static void sub_815E124(u8 taskId)
|
||||
{
|
||||
gMain.savedCallback = sub_815E114;
|
||||
CleanupOverworldWindowsAndTilemaps();
|
||||
SetMainCallback2(sub_800FD9C);
|
||||
SetMainCallback2(CB2_InitBattle);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -177,7 +177,7 @@ void sub_815A008(struct QuestLog * questLog)
|
||||
questLog->unk_008[i].mapobj_bit_24 = gMapObjects[i].mapobj_bit_24;
|
||||
questLog->unk_008[i].mapobj_bit_25 = gMapObjects[i].mapobj_bit_25;
|
||||
questLog->unk_008[i].mapobj_bit_26 = gMapObjects[i].mapobj_bit_26;
|
||||
questLog->unk_008[i].mapobj_unk_18 = gMapObjects[i].mapobj_unk_18;
|
||||
questLog->unk_008[i].mapobj_unk_18 = gMapObjects[i].facingDirection;
|
||||
questLog->unk_008[i].mapobj_unk_0B_0 = gMapObjects[i].mapobj_unk_0B_0;
|
||||
questLog->unk_008[i].elevation = gMapObjects[i].elevation;
|
||||
questLog->unk_008[i].graphicsId = gMapObjects[i].graphicsId;
|
||||
@@ -222,7 +222,7 @@ void sub_815A1F8(const struct QuestLog * questLog, const struct MapObjectTemplat
|
||||
gMapObjects[i].mapobj_bit_24 = questLogMapObjects[i].mapobj_bit_24;
|
||||
gMapObjects[i].mapobj_bit_25 = questLogMapObjects[i].mapobj_bit_25;
|
||||
gMapObjects[i].mapobj_bit_26 = questLogMapObjects[i].mapobj_bit_26;
|
||||
gMapObjects[i].mapobj_unk_18 = questLogMapObjects[i].mapobj_unk_18;
|
||||
gMapObjects[i].facingDirection = questLogMapObjects[i].mapobj_unk_18;
|
||||
gMapObjects[i].mapobj_unk_0B_0 = questLogMapObjects[i].mapobj_unk_0B_0;
|
||||
gMapObjects[i].elevation = questLogMapObjects[i].elevation;
|
||||
gMapObjects[i].graphicsId = questLogMapObjects[i].graphicsId;
|
||||
|
||||
+12
-12
@@ -628,7 +628,7 @@ void sub_810C444(void)
|
||||
mapObject = &gMapObjects[sp0];
|
||||
if (sub_810CF04(sp0) == TRUE)
|
||||
{
|
||||
npc_set_running_behaviour_etc(mapObject, r6);
|
||||
SetTrainerMovementType(mapObject, r6);
|
||||
}
|
||||
templates[i].movementType = r6;
|
||||
}
|
||||
@@ -766,7 +766,7 @@ static void sub_810C594(void)
|
||||
{
|
||||
gSprites[mapObject->spriteId].pos2.x = 0;
|
||||
gSprites[mapObject->spriteId].pos2.y = 0;
|
||||
npc_set_running_behaviour_etc(mapObject, r3);
|
||||
SetTrainerMovementType(mapObject, r3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -931,7 +931,7 @@ static u8 GetVsSeekerResponseInArea(const VsSeekerData * a0)
|
||||
if (IsTrainerVisibleOnScreen(&sVsSeeker->trainerInfo[vsSeekerIdx]) == 1)
|
||||
{
|
||||
r8 = sVsSeeker->trainerInfo[vsSeekerIdx].trainerIdx;
|
||||
if (!HasTrainerAlreadyBeenFought(r8))
|
||||
if (!HasTrainerBeenFought(r8))
|
||||
{
|
||||
StartTrainerObjectMovementScript(&sVsSeeker->trainerInfo[vsSeekerIdx], gUnknown_8453F60);
|
||||
sVsSeeker->trainerHasNotYetBeenFought = 1;
|
||||
@@ -1027,7 +1027,7 @@ static u8 GetVsSeekerResponseInArea(const VsSeekerData * a0)
|
||||
"\tadds r0, r5\n"
|
||||
"\tldrh r0, [r0, 0x4]\n"
|
||||
"\tmov r8, r0\n"
|
||||
"\tbl HasTrainerAlreadyBeenFought\n"
|
||||
"\tbl HasTrainerBeenFought\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbne _0810CA20\n"
|
||||
@@ -1239,10 +1239,10 @@ void sub_810CB90(void)
|
||||
TryGetFieldObjectIdByLocalIdAndMap(r4[r8].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &sp0);
|
||||
r4_2 = &gMapObjects[sp0];
|
||||
sub_810CF54(&r4[r8]); // You are using this function incorrectly. Please consult the manual.
|
||||
sub_805FE7C(r4_2, gUnknown_8453F67[r4_2->mapobj_unk_18]);
|
||||
sub_805FE7C(r4_2, gUnknown_8453F67[r4_2->facingDirection]);
|
||||
gSaveBlock1Ptr->trainerRematches[r4[r8].localId] = 0;
|
||||
if (gSelectedEventObject == sp0)
|
||||
r4_2->animPattern = gUnknown_8453F67[r4_2->mapobj_unk_18];
|
||||
r4_2->animPattern = gUnknown_8453F67[r4_2->facingDirection];
|
||||
else
|
||||
r4_2->animPattern = 0x08;
|
||||
}
|
||||
@@ -1319,7 +1319,7 @@ static bool8 HasRematchTrainerAlreadyBeenFought(const VsSeekerData *vsSeekerData
|
||||
|
||||
if (rematchIdx == -1)
|
||||
return FALSE;
|
||||
if (!HasTrainerAlreadyBeenFought(vsSeekerData[rematchIdx].trainerIdxs[0]))
|
||||
if (!HasTrainerBeenFought(vsSeekerData[rematchIdx].trainerIdxs[0]))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1327,7 +1327,7 @@ static bool8 HasRematchTrainerAlreadyBeenFought(const VsSeekerData *vsSeekerData
|
||||
void sub_810CDE8(void)
|
||||
{
|
||||
gSaveBlock1Ptr->trainerRematches[gSpecialVar_LastTalked] = 0;
|
||||
sub_80803FC();
|
||||
SetBattledTrainerFlag();
|
||||
}
|
||||
|
||||
static s32 sub_810CE10(const VsSeekerData * a0, u16 a1)
|
||||
@@ -1353,7 +1353,7 @@ static s32 sub_810CE10(const VsSeekerData * a0, u16 a1)
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 sub_810CE64(u16 a0)
|
||||
s32 GetRematchTrainerId(u16 a0)
|
||||
{
|
||||
u8 i;
|
||||
u8 j;
|
||||
@@ -1529,7 +1529,7 @@ static u8 GetNextAvailableRematchTrainer(const VsSeekerData * vsSeekerData, u16
|
||||
return j - 1;
|
||||
if (vsSeekerData[i].trainerIdxs[j] == 0xffff)
|
||||
continue;
|
||||
if (HasTrainerAlreadyBeenFought(vsSeekerData[i].trainerIdxs[j]))
|
||||
if (HasTrainerBeenFought(vsSeekerData[i].trainerIdxs[j]))
|
||||
continue;
|
||||
return j;
|
||||
}
|
||||
@@ -1550,7 +1550,7 @@ static u8 GetRematchableTrainerLocalId(void)
|
||||
{
|
||||
if (IsTrainerVisibleOnScreen(&sVsSeeker->trainerInfo[i]) == 1)
|
||||
{
|
||||
if (HasTrainerAlreadyBeenFought(sVsSeeker->trainerInfo[i].trainerIdx) != 1 || GetNextAvailableRematchTrainer(sVsSeekerData, sVsSeeker->trainerInfo[i].trainerIdx, &idx))
|
||||
if (HasTrainerBeenFought(sVsSeeker->trainerInfo[i].trainerIdx) != 1 || GetNextAvailableRematchTrainer(sVsSeekerData, sVsSeeker->trainerInfo[i].trainerIdx, &idx))
|
||||
return sVsSeeker->trainerInfo[i].localId;
|
||||
}
|
||||
}
|
||||
@@ -1599,7 +1599,7 @@ static void StartAllRespondantIdleMovements(void)
|
||||
struct MapObject *r4 = &gMapObjects[sVsSeeker->trainerInfo[j].fieldObjectId];
|
||||
|
||||
if (sub_810CF04(sVsSeeker->trainerInfo[j].fieldObjectId) == 1)
|
||||
npc_set_running_behaviour_etc(r4, sVsSeeker->runningBehaviourEtcArray[i]);
|
||||
SetTrainerMovementType(r4, sVsSeeker->runningBehaviourEtcArray[i]);
|
||||
sub_805FE7C(r4, sVsSeeker->runningBehaviourEtcArray[i]);
|
||||
gSaveBlock1Ptr->trainerRematches[sVsSeeker->trainerInfo[j].localId] = GetNextAvailableRematchTrainer(sVsSeekerData, sVsSeeker->trainerInfo[j].trainerIdx, &dummy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user