asm party and fldeff clean-up
This commit is contained in:
+33
-18
@@ -589,9 +589,9 @@ const union AffineAnimCmd gUnknown_085CE430[] =
|
||||
|
||||
const s8 gUnknown_085CE460[] =
|
||||
{
|
||||
0xE8,
|
||||
0x18,
|
||||
0xFC,
|
||||
0xE8,
|
||||
0x18,
|
||||
0xFC,
|
||||
0x00,
|
||||
};
|
||||
|
||||
@@ -1846,7 +1846,7 @@ static void sub_815AED8(u8 taskId)
|
||||
if (task->data[7])
|
||||
task->data[12] = task->data[8];
|
||||
else
|
||||
task->data[12] = task->data[9];
|
||||
task->data[12] = task->data[9];
|
||||
}
|
||||
|
||||
i = task->data[0];
|
||||
@@ -2403,7 +2403,7 @@ void sub_815BB84(u8 taskId)
|
||||
gTasks[taskId].data[4] = 0;
|
||||
if (++gTasks[taskId].data[1] > 12)
|
||||
gTasks[taskId].data[1] = 12;
|
||||
|
||||
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[1], 16 - gTasks[taskId].data[1]));
|
||||
|
||||
if (gTasks[taskId].data[1] == 12)
|
||||
@@ -2459,7 +2459,7 @@ void sub_815BE04(struct Sprite *sprite)
|
||||
xOffset &= 0x3F;
|
||||
if (xOffset > 31)
|
||||
xOffset = 32 - xOffset;
|
||||
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + xOffset;
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 32;
|
||||
sprite->data[1] = gBattleAnimArgs[0];
|
||||
@@ -2490,7 +2490,7 @@ static void sub_815BF44(struct Sprite *sprite)
|
||||
{
|
||||
int var0;
|
||||
s8 var1;
|
||||
|
||||
|
||||
var0 = (u16)sprite->data[2] + (u16)sprite->data[3];
|
||||
var1 = var0 >> 8;
|
||||
sprite->pos2.y -= var1;
|
||||
@@ -2531,7 +2531,7 @@ static void sub_815C050(struct Sprite *sprite)
|
||||
register u16 d3 asm("r1");
|
||||
int var0;
|
||||
s8 var1;
|
||||
|
||||
|
||||
if (!sprite->invisible)
|
||||
{
|
||||
d2 = sprite->data[2];
|
||||
@@ -2637,7 +2637,7 @@ void sub_815C0A4(u8 taskId)
|
||||
sub_80A6C68(unknownStruct.bgId);
|
||||
if (!IsContest())
|
||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0);
|
||||
|
||||
|
||||
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
|
||||
gBattle_BG1_X = 0;
|
||||
gBattle_BG1_Y = 0;
|
||||
@@ -2893,7 +2893,7 @@ static void sub_815C7C4(u8 taskId)
|
||||
SetSpriteRotScale(task->data[15], 0x100, 0x100, task->data[2]);
|
||||
SetBattlerSpriteYOffsetFromRotation(task->data[15]);
|
||||
gSprites[task->data[15]].pos2.x = -(((temp = task->data[2]) >= 0 ? task->data[2] : temp + 63) >> 6);
|
||||
|
||||
|
||||
if (++task->data[1] > 8)
|
||||
{
|
||||
if (task->data[12])
|
||||
@@ -3679,7 +3679,7 @@ void sub_815DCA4(u8 taskId)
|
||||
|
||||
if (!gBattleAnimArgs[1])
|
||||
DestroyAnimVisualTask(taskId);
|
||||
|
||||
|
||||
task->data[0] = 0;
|
||||
task->data[1] = 0;
|
||||
task->data[2] = 0;
|
||||
@@ -3801,7 +3801,7 @@ static void sub_815DF64(u8 taskId)
|
||||
BlendPalette(gTasks[taskId].data[2], 16, 8, gUnknown_085CE784[gTasks[taskId].data[0]]);
|
||||
if (++gTasks[taskId].data[0] > 23)
|
||||
gTasks[taskId].data[0] = 0;
|
||||
|
||||
|
||||
gTasks[taskId].data[1]--;
|
||||
}
|
||||
else
|
||||
@@ -3831,7 +3831,7 @@ void sub_815E01C(struct Sprite *sprite)
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[0];
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[1];
|
||||
if (gBattleAnimArgs[2] == 0)
|
||||
@@ -4030,7 +4030,7 @@ void sub_815E47C(u8 taskId)
|
||||
InitAnimArcTranslation(&gSprites[task->data[15]]);
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
||||
StartSpriteAffineAnim(&gSprites[task->data[15]], 1);
|
||||
|
||||
|
||||
task->func = sub_815E5CC;
|
||||
}
|
||||
else
|
||||
@@ -4303,7 +4303,7 @@ static void sub_815EA60(struct Sprite *sprite)
|
||||
sprite->pos2.x = sprite->data[7] * (gSineTable[sprite->data[1] * 10] >> 3);
|
||||
if (sprite->data[1] == 15)
|
||||
sprite->oam.tileNum += 16;
|
||||
|
||||
|
||||
if (sprite->data[1] == 18)
|
||||
{
|
||||
sprite->data[1] = 0;
|
||||
@@ -4581,7 +4581,7 @@ static void sub_815F10C(struct Sprite *sprite)
|
||||
sprite->pos1.x + sprite->pos2.x,
|
||||
sprite->pos1.y + sprite->pos2.y, 5);
|
||||
}
|
||||
|
||||
|
||||
if (sprite->data[5] == sprite->data[4])
|
||||
DestroyAnimSprite(sprite);
|
||||
|
||||
@@ -4648,7 +4648,7 @@ void AnimTask_MonToSubstitute(u8 taskId)
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
gTasks[taskId].data[i] = 0;
|
||||
|
||||
|
||||
gTasks[taskId].func = sub_815F330;
|
||||
}
|
||||
}
|
||||
@@ -4837,7 +4837,7 @@ void sub_815F620(u8 taskId)
|
||||
gSprites[spriteId1].invisible = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
gSprites[spriteId2].oam.objMode = ST_OAM_OBJ_NORMAL;
|
||||
gSprites[spriteId1].oam.objMode = ST_OAM_OBJ_NORMAL;
|
||||
gSprites[spriteId2].callback = sub_815F7C4;
|
||||
@@ -4887,3 +4887,18 @@ static void sub_815F7C4(struct Sprite *sprite)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void AnimTask_GetReturnPowerLevel(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = 0;
|
||||
if (gAnimFriendship < 60)
|
||||
gBattleAnimArgs[7] = 0;
|
||||
if (gAnimFriendship > 60 && gAnimFriendship < 92)
|
||||
gBattleAnimArgs[7] = 1;
|
||||
if (gAnimFriendship > 91 && gAnimFriendship < 201)
|
||||
gBattleAnimArgs[7] = 2;
|
||||
if (gAnimFriendship > 200)
|
||||
gBattleAnimArgs[7] = 3;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,9 +37,9 @@
|
||||
#include "gym_leader_rematch.h"
|
||||
#include "battle_pike.h"
|
||||
#include "battle_pyramid.h"
|
||||
#include "fldeff.h"
|
||||
#include "fldeff_misc.h"
|
||||
#include "field_control_avatar.h"
|
||||
#include "fldeff_groundshake.h"
|
||||
#include "constants/map_types.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -9,7 +9,7 @@
|
||||
#include "field_screen_effect.h"
|
||||
#include "field_weather.h"
|
||||
#include "fieldmap.h"
|
||||
#include "fldeff_groundshake.h"
|
||||
#include "fldeff.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
|
||||
@@ -1310,7 +1310,7 @@ bool8 PartyHasMonWithSurf(void)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
break;
|
||||
if (pokemon_has_move(&gPlayerParty[i], MOVE_SURF))
|
||||
if (MonKnowsMove(&gPlayerParty[i], MOVE_SURF))
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3193,7 +3193,7 @@ void sub_813AEB4(void)
|
||||
i = 0;
|
||||
do
|
||||
{
|
||||
if (gUnknown_0861500C[i] == gUnknown_085B320C[temp2])
|
||||
if (gTutorMoves[i] == gUnknown_085B320C[temp2])
|
||||
{
|
||||
gSpecialVar_0x8005 = i;
|
||||
break;
|
||||
@@ -3206,7 +3206,7 @@ void sub_813AEB4(void)
|
||||
i = 0;
|
||||
do
|
||||
{
|
||||
if (gUnknown_0861500C[i] == gUnknown_085B31F8[temp2])
|
||||
if (gTutorMoves[i] == gUnknown_085B31F8[temp2])
|
||||
{
|
||||
gSpecialVar_0x8005 = i;
|
||||
break;
|
||||
|
||||
+1
-2
@@ -5,12 +5,11 @@
|
||||
#include "field_effect.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fieldmap.h"
|
||||
#include "fldeff_cut.h"
|
||||
#include "fldeff.h"
|
||||
#include "alloc.h"
|
||||
#include "metatile_behavior.h"
|
||||
#include "overworld.h"
|
||||
#include "party_menu.h"
|
||||
#include "rom6.h"
|
||||
#include "script.h"
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
#include "global.h"
|
||||
#include "braille_puzzles.h"
|
||||
#include "field_effect.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fldeff.h"
|
||||
#include "item_use.h"
|
||||
#include "overworld.h"
|
||||
#include "party_menu.h"
|
||||
#include "sprite.h"
|
||||
#include "constants/field_effects.h"
|
||||
|
||||
// static functions
|
||||
static void hm2_dig(void);
|
||||
static void sub_8135780(void);
|
||||
|
||||
// text
|
||||
bool8 SetUpFieldMove_Dig(void)
|
||||
{
|
||||
if (CanUseEscapeRopeOnCurrMap() == TRUE)
|
||||
{
|
||||
gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu;
|
||||
gPostMenuFieldCallback = hm2_dig;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void hm2_dig(void)
|
||||
{
|
||||
Overworld_ResetStateAfterDigEscRope();
|
||||
FieldEffectStart(FLDEFF_USE_DIG);
|
||||
gFieldEffectArguments[0] = GetCursorSelectionMonId();
|
||||
}
|
||||
|
||||
bool8 FldEff_UseDig(void)
|
||||
{
|
||||
u8 taskId = oei_task_add();
|
||||
|
||||
gTasks[taskId].data[8] = (u32)sub_8135780 >> 16;
|
||||
gTasks[taskId].data[9] = (u32)sub_8135780;
|
||||
if (!ShouldDoBrailleDigEffect())
|
||||
SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void sub_8135780(void)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
FieldEffectActiveListRemove(FLDEFF_USE_DIG);
|
||||
if (ShouldDoBrailleDigEffect())
|
||||
{
|
||||
DoBrailleDigEffect();
|
||||
}
|
||||
else
|
||||
{
|
||||
taskId = CreateTask(task08_080A1C44, 8);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
}
|
||||
}
|
||||
@@ -2,18 +2,19 @@
|
||||
#include "field_camera.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fieldmap.h"
|
||||
#include "fldeff.h"
|
||||
#include "task.h"
|
||||
|
||||
static EWRAM_DATA u8 sEscalatorAnim_TaskId = 0;
|
||||
|
||||
void sub_80E12E8(u8 taskId, const s16 *list, u16 c)
|
||||
static void sub_80E12E8(u8 taskId, const s16 *list, u16 c)
|
||||
{
|
||||
s16 r5 = gTasks[taskId].data[4] - 1;
|
||||
s16 r3 = gTasks[taskId].data[5] - 1;
|
||||
s16 r4 = gTasks[taskId].data[1];
|
||||
s16 y;
|
||||
s16 x;
|
||||
|
||||
|
||||
if (gTasks[taskId].data[2] == 0)
|
||||
{
|
||||
for (y = 0; y < 3; y++)
|
||||
@@ -21,7 +22,7 @@ void sub_80E12E8(u8 taskId, const s16 *list, u16 c)
|
||||
for (x = 0; x < 3; x++)
|
||||
{
|
||||
s16 metatileId = MapGridGetMetatileIdAt(r5 + x, r3 + y);
|
||||
|
||||
|
||||
if (list[r4] == metatileId)
|
||||
{
|
||||
if (r4 != 2)
|
||||
@@ -39,7 +40,7 @@ void sub_80E12E8(u8 taskId, const s16 *list, u16 c)
|
||||
for (x = 0; x < 3; x++)
|
||||
{
|
||||
s16 metatileId = MapGridGetMetatileIdAt(r5 + x, r3 + y);
|
||||
|
||||
|
||||
if (list[2 - r4] == metatileId)
|
||||
{
|
||||
if (r4 != 2)
|
||||
@@ -60,7 +61,7 @@ static const u16 gUnknown_08589AD2[] = {0x2A0, 0x2A2, 0x2A4};
|
||||
static const u16 gUnknown_08589AD8[] = {0x2A1, 0x2A3, 0x2A5};
|
||||
static const u16 gUnknown_08589ADE[] = {0x2A8, 0x2AA, 0x2AC};
|
||||
|
||||
void sub_80E1444(u8 taskId)
|
||||
static void sub_80E1444(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
@@ -100,7 +101,7 @@ void sub_80E1444(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_80E150C(u16 var)
|
||||
static u8 sub_80E150C(u16 var)
|
||||
{
|
||||
u8 taskId = CreateTask(sub_80E1444, 0);
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
+1
-1
@@ -3,12 +3,12 @@
|
||||
#include "event_data.h"
|
||||
#include "event_scripts.h"
|
||||
#include "field_effect.h"
|
||||
#include "fldeff.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "main.h"
|
||||
#include "overworld.h"
|
||||
#include "palette.h"
|
||||
#include "party_menu.h"
|
||||
#include "rom6.h"
|
||||
#include "script.h"
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "event_data.h"
|
||||
#include "event_object_movement.h"
|
||||
#include "field_camera.h"
|
||||
#include "fldeff.h"
|
||||
#include "alloc.h"
|
||||
#include "random.h"
|
||||
#include "roulette_util.h"
|
||||
@@ -128,10 +129,11 @@ bool8 sub_81BE66C(void)
|
||||
{
|
||||
if (!(gSaveBlock1Ptr->location.mapGroup == 0x0 && gSaveBlock1Ptr->location.mapNum == 0x1A))
|
||||
return 0;
|
||||
return FlagGet(FLAG_0x14E);
|
||||
else
|
||||
return FlagGet(FLAG_0x14E);
|
||||
}
|
||||
|
||||
void sub_81BE698(u8 taskId)
|
||||
static void sub_81BE698(u8 taskId)
|
||||
{
|
||||
sub_8151E50(&(gUnknown_0203CF18->unk4));
|
||||
}
|
||||
@@ -143,11 +145,12 @@ void sub_81BE6AC(void)
|
||||
|
||||
void sub_81BE6B8(void)
|
||||
{
|
||||
if(gUnknown_0203CF18 != NULL)
|
||||
if (gUnknown_0203CF18 != NULL)
|
||||
{
|
||||
gUnknown_0203CF18 = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(gSaveBlock1Ptr->location.mapGroup == 0x0 && gSaveBlock1Ptr->location.mapNum == 0x1A) || !FlagGet(FLAG_0x14E))
|
||||
return;
|
||||
|
||||
|
||||
+1
-1
@@ -4,13 +4,13 @@
|
||||
#include "script.h"
|
||||
#include "sound.h"
|
||||
#include "task.h"
|
||||
#include "rom6.h"
|
||||
#include "strings.h"
|
||||
#include "party_menu.h"
|
||||
#include "fieldmap.h"
|
||||
#include "field_effect.h"
|
||||
#include "field_camera.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fldeff.h"
|
||||
#include "fldeff_misc.h"
|
||||
#include "secret_base.h"
|
||||
#include "event_data.h"
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
#include "event_scripts.h"
|
||||
#include "field_effect.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fldeff.h"
|
||||
#include "item_use.h"
|
||||
#include "overworld.h"
|
||||
#include "party_menu.h"
|
||||
#include "rom6.h"
|
||||
#include "script.h"
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
@@ -26,8 +26,6 @@ static void sub_813552C(u8 taskId);
|
||||
static void sub_813561C(u8 taskId);
|
||||
static void sub_81356C4(void);
|
||||
static void sub_8135714(void);
|
||||
static void hm2_dig(void);
|
||||
static void sub_8135780(void);
|
||||
|
||||
// extern RAM loc
|
||||
extern struct MapPosition gPlayerFacingPosition;
|
||||
@@ -162,51 +160,3 @@ static void sub_8135714(void)
|
||||
FieldEffectActiveListRemove(FLDEFF_USE_ROCK_SMASH);
|
||||
EnableBothScriptContexts();
|
||||
}
|
||||
|
||||
bool8 SetUpFieldMove_Dig(void)
|
||||
{
|
||||
if (CanUseEscapeRopeOnCurrMap() == TRUE)
|
||||
{
|
||||
gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu;
|
||||
gPostMenuFieldCallback = hm2_dig;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void hm2_dig(void)
|
||||
{
|
||||
Overworld_ResetStateAfterDigEscRope();
|
||||
FieldEffectStart(FLDEFF_USE_DIG);
|
||||
gFieldEffectArguments[0] = GetCursorSelectionMonId();
|
||||
}
|
||||
|
||||
bool8 FldEff_UseDig(void)
|
||||
{
|
||||
u8 taskId = oei_task_add();
|
||||
|
||||
gTasks[taskId].data[8] = (u32)sub_8135780 >> 16;
|
||||
gTasks[taskId].data[9] = (u32)sub_8135780;
|
||||
if (!ShouldDoBrailleDigEffect())
|
||||
SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void sub_8135780(void)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
FieldEffectActiveListRemove(FLDEFF_USE_DIG);
|
||||
if (ShouldDoBrailleDigEffect())
|
||||
{
|
||||
DoBrailleDigEffect();
|
||||
}
|
||||
else
|
||||
{
|
||||
taskId = CreateTask(task08_080A1C44, 8);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
#include "event_data.h"
|
||||
#include "event_scripts.h"
|
||||
#include "field_effect.h"
|
||||
#include "fldeff.h"
|
||||
#include "party_menu.h"
|
||||
#include "rom6.h"
|
||||
#include "script.h"
|
||||
#include "string_util.h"
|
||||
#include "task.h"
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include "field_player_avatar.h"
|
||||
#include "field_screen_effect.h"
|
||||
#include "field_weather.h"
|
||||
#include "fldeff.h"
|
||||
#include "palette.h"
|
||||
#include "party_menu.h"
|
||||
#include "rom6.h"
|
||||
#include "script.h"
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
@@ -21,8 +21,6 @@ static void FieldCallback_SweetScent(void);
|
||||
static void StartSweetScentFieldEffect(void);
|
||||
static void TrySweetScentEncounter(u8 taskId);
|
||||
static void FailSweetScentEncounter(u8 taskId);
|
||||
void sub_81BE6B8(void);
|
||||
void sub_81BE72C(void);
|
||||
|
||||
bool8 SetUpFieldMove_SweetScent(void)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "global.h"
|
||||
#include "field_effect.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fldeff.h"
|
||||
#include "party_menu.h"
|
||||
#include "overworld.h"
|
||||
#include "rom6.h"
|
||||
#include "task.h"
|
||||
#include "constants/field_effects.h"
|
||||
|
||||
|
||||
+1348
-253
File diff suppressed because it is too large
Load Diff
@@ -2143,7 +2143,7 @@ static void sub_81C174C(u8 taskId)
|
||||
|
||||
static bool8 sub_81C18A8(void)
|
||||
{
|
||||
if (pssData->firstMoveIndex == MAX_MON_MOVES || pssData->newMove == MOVE_NONE || sub_81B6D14(pssData->summary.moves[pssData->firstMoveIndex]) != 1)
|
||||
if (pssData->firstMoveIndex == MAX_MON_MOVES || pssData->newMove == MOVE_NONE || IsMoveHm(pssData->summary.moves[pssData->firstMoveIndex]) != 1)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
+2
-1
@@ -11,7 +11,6 @@
|
||||
#include "overworld.h"
|
||||
#include "constants/flags.h"
|
||||
#include "event_data.h"
|
||||
#include "rom6.h"
|
||||
#include "secret_base.h"
|
||||
#include "string_util.h"
|
||||
#include "international_string_util.h"
|
||||
@@ -20,6 +19,8 @@
|
||||
#include "constants/songs.h"
|
||||
#include "m4a.h"
|
||||
#include "field_effect.h"
|
||||
#include "field_specials.h"
|
||||
#include "fldeff.h"
|
||||
#include "region_map.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "heal_location.h"
|
||||
|
||||
+1
-1
@@ -1714,7 +1714,7 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
|
||||
if (!species)
|
||||
break;
|
||||
// UB: GetMonData() arguments don't match function definition
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) && pokemon_has_move(&gPlayerParty[i], moveId) == TRUE)
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) && MonKnowsMove(&gPlayerParty[i], moveId) == TRUE)
|
||||
{
|
||||
gSpecialVar_Result = i;
|
||||
gSpecialVar_0x8004 = species;
|
||||
|
||||
+2
-1
@@ -16,11 +16,13 @@
|
||||
#include "overworld.h"
|
||||
#include "fieldmap.h"
|
||||
#include "field_camera.h"
|
||||
#include "field_specials.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "field_screen_effect.h"
|
||||
#include "field_weather.h"
|
||||
#include "event_object_movement.h"
|
||||
#include "field_effect.h"
|
||||
#include "fldeff.h"
|
||||
#include "fldeff_misc.h"
|
||||
#include "metatile_behavior.h"
|
||||
#include "map_name_popup.h"
|
||||
@@ -32,7 +34,6 @@
|
||||
#include "event_data.h"
|
||||
#include "battle.h"
|
||||
#include "battle_setup.h"
|
||||
#include "rom6.h"
|
||||
#include "decoration.h"
|
||||
#include "link.h"
|
||||
#include "tv.h"
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "event_data.h"
|
||||
#include "fieldmap.h"
|
||||
#include "field_camera.h"
|
||||
#include "field_specials.h"
|
||||
#include "fldeff.h"
|
||||
#include "strings.h"
|
||||
#include "string_util.h"
|
||||
#include "international_string_util.h"
|
||||
@@ -24,7 +26,6 @@
|
||||
#include "event_scripts.h"
|
||||
#include "shop.h"
|
||||
#include "lilycove_lady.h"
|
||||
#include "rom6.h"
|
||||
#include "pokedex.h"
|
||||
#include "event_object_movement.h"
|
||||
#include "text.h"
|
||||
|
||||
Reference in New Issue
Block a user