mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
clean up party menu
This commit is contained in:
parent
43c88440e0
commit
44e5e82f67
@ -31,36 +31,36 @@
|
||||
|
||||
const u16 gTutorMoves[] =
|
||||
{
|
||||
/*TUTOR_*/MOVE_MEGA_PUNCH,
|
||||
/*TUTOR_*/MOVE_SWORDS_DANCE,
|
||||
/*TUTOR_*/MOVE_MEGA_KICK,
|
||||
/*TUTOR_*/MOVE_BODY_SLAM,
|
||||
/*TUTOR_*/MOVE_DOUBLE_EDGE,
|
||||
/*TUTOR_*/MOVE_COUNTER,
|
||||
/*TUTOR_*/MOVE_SEISMIC_TOSS,
|
||||
/*TUTOR_*/MOVE_MIMIC,
|
||||
/*TUTOR_*/MOVE_METRONOME,
|
||||
/*TUTOR_*/MOVE_SOFT_BOILED,
|
||||
/*TUTOR_*/MOVE_DREAM_EATER,
|
||||
/*TUTOR_*/MOVE_THUNDER_WAVE,
|
||||
/*TUTOR_*/MOVE_EXPLOSION,
|
||||
/*TUTOR_*/MOVE_ROCK_SLIDE,
|
||||
/*TUTOR_*/MOVE_SUBSTITUTE,
|
||||
/*TUTOR_*/MOVE_DYNAMIC_PUNCH,
|
||||
/*TUTOR_*/MOVE_ROLLOUT,
|
||||
/*TUTOR_*/MOVE_PSYCH_UP,
|
||||
/*TUTOR_*/MOVE_SNORE,
|
||||
/*TUTOR_*/MOVE_ICY_WIND,
|
||||
/*TUTOR_*/MOVE_ENDURE,
|
||||
/*TUTOR_*/MOVE_MUD_SLAP,
|
||||
/*TUTOR_*/MOVE_ICE_PUNCH,
|
||||
/*TUTOR_*/MOVE_SWAGGER,
|
||||
/*TUTOR_*/MOVE_SLEEP_TALK,
|
||||
/*TUTOR_*/MOVE_SWIFT,
|
||||
/*TUTOR_*/MOVE_DEFENSE_CURL,
|
||||
/*TUTOR_*/MOVE_THUNDER_PUNCH,
|
||||
/*TUTOR_*/MOVE_FIRE_PUNCH,
|
||||
/*TUTOR_*/MOVE_FURY_CUTTER,
|
||||
[TUTOR_MOVE_MEGA_PUNCH] = MOVE_MEGA_PUNCH,
|
||||
[TUTOR_MOVE_SWORDS_DANCE] = MOVE_SWORDS_DANCE,
|
||||
[TUTOR_MOVE_MEGA_KICK] = MOVE_MEGA_KICK,
|
||||
[TUTOR_MOVE_BODY_SLAM] = MOVE_BODY_SLAM,
|
||||
[TUTOR_MOVE_DOUBLE_EDGE] = MOVE_DOUBLE_EDGE,
|
||||
[TUTOR_MOVE_COUNTER] = MOVE_COUNTER,
|
||||
[TUTOR_MOVE_SEISMIC_TOSS] = MOVE_SEISMIC_TOSS,
|
||||
[TUTOR_MOVE_MIMIC] = MOVE_MIMIC,
|
||||
[TUTOR_MOVE_METRONOME] = MOVE_METRONOME,
|
||||
[TUTOR_MOVE_SOFT_BOILED] = MOVE_SOFT_BOILED,
|
||||
[TUTOR_MOVE_DREAM_EATER] = MOVE_DREAM_EATER,
|
||||
[TUTOR_MOVE_THUNDER_WAVE] = MOVE_THUNDER_WAVE,
|
||||
[TUTOR_MOVE_EXPLOSION] = MOVE_EXPLOSION,
|
||||
[TUTOR_MOVE_ROCK_SLIDE] = MOVE_ROCK_SLIDE,
|
||||
[TUTOR_MOVE_SUBSTITUTE] = MOVE_SUBSTITUTE,
|
||||
[TUTOR_MOVE_DYNAMIC_PUNCH] = MOVE_DYNAMIC_PUNCH,
|
||||
[TUTOR_MOVE_ROLLOUT] = MOVE_ROLLOUT,
|
||||
[TUTOR_MOVE_PSYCH_UP] = MOVE_PSYCH_UP,
|
||||
[TUTOR_MOVE_SNORE] = MOVE_SNORE,
|
||||
[TUTOR_MOVE_ICY_WIND] = MOVE_ICY_WIND,
|
||||
[TUTOR_MOVE_ENDURE] = MOVE_ENDURE,
|
||||
[TUTOR_MOVE_MUD_SLAP] = MOVE_MUD_SLAP,
|
||||
[TUTOR_MOVE_ICE_PUNCH] = MOVE_ICE_PUNCH,
|
||||
[TUTOR_MOVE_SWAGGER] = MOVE_SWAGGER,
|
||||
[TUTOR_MOVE_SLEEP_TALK] = MOVE_SLEEP_TALK,
|
||||
[TUTOR_MOVE_SWIFT] = MOVE_SWIFT,
|
||||
[TUTOR_MOVE_DEFENSE_CURL] = MOVE_DEFENSE_CURL,
|
||||
[TUTOR_MOVE_THUNDER_PUNCH] = MOVE_THUNDER_PUNCH,
|
||||
[TUTOR_MOVE_FIRE_PUNCH] = MOVE_FIRE_PUNCH,
|
||||
[TUTOR_MOVE_FURY_CUTTER] = MOVE_FURY_CUTTER,
|
||||
};
|
||||
|
||||
#define TUTOR_LEARNSET(moves) ((u32)(moves))
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "sprite.h"
|
||||
#include "task.h"
|
||||
#include "constants/flags.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
// structures
|
||||
@ -127,8 +128,8 @@ EWRAM_DATA struct Struct203CF18 *gUnknown_0203CF18 = NULL;
|
||||
// text
|
||||
bool8 sub_81BE66C(void)
|
||||
{
|
||||
if (!(gSaveBlock1Ptr->location.mapGroup == 0x0 && gSaveBlock1Ptr->location.mapNum == 0x1A))
|
||||
return 0;
|
||||
if (!(gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE111) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE111)))
|
||||
return FALSE;
|
||||
else
|
||||
return FlagGet(FLAG_0x14E);
|
||||
}
|
||||
@ -151,7 +152,7 @@ void sub_81BE6B8(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(gSaveBlock1Ptr->location.mapGroup == 0x0 && gSaveBlock1Ptr->location.mapNum == 0x1A) || !FlagGet(FLAG_0x14E))
|
||||
if (gSaveBlock1Ptr->location.mapGroup != MAP_GROUP(ROUTE111) || gSaveBlock1Ptr->location.mapNum != MAP_NUM(ROUTE111) || !FlagGet(FLAG_0x14E))
|
||||
return;
|
||||
|
||||
gUnknown_0203CF18 = (struct Struct203CF18 *)AllocZeroed(sizeof(struct Struct203CF18));
|
||||
@ -163,10 +164,13 @@ void sub_81BE6B8(void)
|
||||
|
||||
void sub_81BE72C(void)
|
||||
{
|
||||
if(!(gSaveBlock1Ptr->location.mapGroup == 0x0 && gSaveBlock1Ptr->location.mapNum == 0x1A) || !FlagGet(FLAG_0x14E) || gUnknown_0203CF18 == NULL)
|
||||
if (gSaveBlock1Ptr->location.mapGroup != MAP_GROUP(ROUTE111) || gSaveBlock1Ptr->location.mapNum != MAP_NUM(ROUTE111)
|
||||
|| !FlagGet(FLAG_0x14E) || gUnknown_0203CF18 == NULL)
|
||||
return;
|
||||
if(FuncIsActiveTask(sub_81BE698))
|
||||
|
||||
if( FuncIsActiveTask(sub_81BE698))
|
||||
DestroyTask(gUnknown_0203CF18->taskId);
|
||||
|
||||
sub_8151D28(&(gUnknown_0203CF18->unk4), 1, 1);
|
||||
sub_8151C50(&(gUnknown_0203CF18->unk4), 1, 1);
|
||||
Free(gUnknown_0203CF18);
|
||||
@ -178,16 +182,16 @@ void sub_81BE79C(void)
|
||||
u16 rand;
|
||||
bool8 chance;
|
||||
|
||||
if(VarGet(VAR_0x40CB) != 0)
|
||||
if (VarGet(VAR_0x40CB) != 0)
|
||||
{
|
||||
FlagClear(FLAG_0x14E);
|
||||
return;
|
||||
}
|
||||
rand = Random();
|
||||
chance = rand & 1;
|
||||
if(FlagGet(FLAG_0x09D) == TRUE)
|
||||
if (FlagGet(FLAG_0x09D) == TRUE)
|
||||
chance = TRUE;
|
||||
if(chance)
|
||||
if (chance)
|
||||
{
|
||||
FlagSet(FLAG_0x14E);
|
||||
sub_81BE6B8();
|
||||
@ -236,18 +240,17 @@ static void sp136_strengh_sound(u8 a, u8 b, u8 c, u8 d)
|
||||
|
||||
static void sub_81BE900(u8 taskId)
|
||||
{
|
||||
s16 *data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
data = gTasks[taskId].data;
|
||||
data[1]++;
|
||||
if((data[1] % data[3]) == 0)
|
||||
if ((data[1] % data[3]) == 0)
|
||||
{
|
||||
data[1] = 0;
|
||||
data[2]--;
|
||||
data[0] = -data[0];
|
||||
data[4] = -data[4];
|
||||
SetCameraPanning(data[0], data[4]);
|
||||
if(!data[2])
|
||||
if (!data[2])
|
||||
{
|
||||
sub_81BE968();
|
||||
DestroyTask(taskId);
|
||||
@ -258,10 +261,8 @@ static void sub_81BE900(u8 taskId)
|
||||
|
||||
static void sub_81BE968(void)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
taskId = FindTaskIdByFunc(sub_81BE9C0);
|
||||
if(taskId != 0xFF)
|
||||
u8 taskId = FindTaskIdByFunc(sub_81BE9C0);
|
||||
if (taskId != 0xFF)
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
|
||||
@ -275,11 +276,9 @@ void sub_81BE994(void)
|
||||
|
||||
static void sub_81BE9C0(u8 taskId)
|
||||
{
|
||||
u16 *data;
|
||||
u16 *data = gTasks[taskId].data;
|
||||
|
||||
data = gTasks[taskId].data;
|
||||
data[1]++;
|
||||
if(data[1] == 1000 || data[0] == 17)
|
||||
if (++data[1] == 1000 || data[0] == 17)
|
||||
gTasks[taskId].func = sub_81BEA00;
|
||||
}
|
||||
|
||||
@ -295,14 +294,14 @@ static void sub_81BEA20(void)
|
||||
u8 i;
|
||||
u8 spriteId;
|
||||
|
||||
for(i = 0; i < 8; i++)
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
spriteId = CreateSprite(&gUnknown_08617E60, gUnknown_08617D64[i][0] + 120, gUnknown_08617D64[i][1], 8);
|
||||
gSprites[spriteId].oam.priority = 0;
|
||||
gSprites[spriteId].oam.paletteNum = 0;
|
||||
gSprites[spriteId].data[0] = i;
|
||||
}
|
||||
for(i = 0; i < 8; i++)
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
spriteId = CreateSprite(&gUnknown_08617E34, gUnknown_08617D64[i][0] + 115, gUnknown_08617D64[i][1] - 3, 8);
|
||||
gSprites[spriteId].oam.priority = 0;
|
||||
@ -315,7 +314,7 @@ static void sub_81BEAD8(struct Sprite* sprite)
|
||||
{
|
||||
sprite->data[1] += 2;
|
||||
sprite->pos2.y = (sprite->data[1] / 2);
|
||||
if(((sprite->pos1.y) + (sprite->pos2.y)) > gUnknown_08617D64[sprite->data[0]][2])
|
||||
if (((sprite->pos1.y) + (sprite->pos2.y)) > gUnknown_08617D64[sprite->data[0]][2])
|
||||
{
|
||||
DestroySprite(sprite);
|
||||
sub_81BE968();
|
||||
|
@ -1713,7 +1713,6 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
|
||||
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL);
|
||||
if (!species)
|
||||
break;
|
||||
// UB: GetMonData() arguments don't match function definition
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) && MonKnowsMove(&gPlayerParty[i], moveId) == TRUE)
|
||||
{
|
||||
gSpecialVar_Result = i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user