clean up weather struct and label more weather moves

This commit is contained in:
Seth Barberee 2024-07-13 22:45:13 -07:00
parent 7338e36e18
commit c581430173
3 changed files with 13 additions and 18 deletions

View File

@ -4532,7 +4532,7 @@ _08054BD8:
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80594E0
bl SandstormMoveAction
bl _080554BA
_08054BE8:
adds r0, r7, 0
@ -5250,7 +5250,7 @@ _08055190:
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805785C
bl RainDanceMoveAction
b _080554BA
_0805519E:
adds r0, r7, 0
@ -5313,7 +5313,7 @@ _0805520E:
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A394
bl SunnyDayMoveAction
b _080554BA
_0805521C:
adds r0, r7, 0
@ -5397,7 +5397,7 @@ _080552B6:
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80578A4
bl HailMoveAction
b _080554BA
_080552C4:
adds r0, r7, 0

View File

@ -36,12 +36,7 @@ typedef struct Weather
/* 0xE264 */ u8 weather; // Uses the weather constants in weather.h.
u8 unkE265; // Uses the weather constants in weather.h
/* 0xE266 */ u8 weatherDamageCounter; // Timer for applying sandstorm/hail damage periodically.
/* 0xE267 */ u8 unkE267[0xE269 - 0xE267]; // TODO: same size as naturalWeather according to SaveDungeonWeather
u8 unkE269;
u8 fillE26A;
u8 unkE26B;
/* 0xE26C */ u8 weatherTurns;
u8 fillE26D[0xE26F - 0xE26D];
/* 0xE267 */ u8 unkE267[8];
/* 0xE26F */ u8 naturalWeather[8]; // The weather at the start of the floor. If the weather changes, then expires, revert back to the starting weather.
/* 0xE277 */ u8 mudSportTurns;
/* 0xE278 */ u8 waterSportTurns;

View File

@ -439,9 +439,9 @@ bool32 sub_805783C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return TRUE;
}
bool32 sub_805785C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool32 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
gDungeon->weather.unkE26B = gUnknown_80F4F42;
gDungeon->weather.unkE267[WEATHER_RAIN] = gUnknown_80F4F42;
if (sub_807EAA0(1,0) == 0) {
// The weather remains unchanged
sub_80522F4(pokemon,target,*gUnknown_80FCF74);
@ -449,9 +449,9 @@ bool32 sub_805785C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return TRUE;
}
bool32 sub_80578A4(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool32 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
gDungeon->weather.weatherTurns = gUnknown_80F4F42;
gDungeon->weather.unkE267[WEATHER_HAIL]= gUnknown_80F4F42;
if (sub_807EAA0(1,0) == 0) {
// The weather remains unchanged
sub_80522F4(pokemon,target,*gUnknown_80FCF80);
@ -2033,9 +2033,9 @@ bool8 sub_805946C(Entity * pokemon,Entity * target,Move * move,u32 param_4)
}
bool8 sub_80594E0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
gDungeon->weather.unkE269 = gUnknown_80F4F42;
gDungeon->weather.unkE267[WEATHER_SANDSTORM] = gUnknown_80F4F42;
if(sub_807EAA0(1, 0) == 0)
{
sub_80522F4(pokemon, target, *gUnknown_80FCF78);
@ -2727,9 +2727,9 @@ bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_
}
}
bool8 sub_805A394(Entity *pokemon, Entity *target, Move *move, u32 param_4)
bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
{
gDungeon->weather.unkE267[1] = gUnknown_80F4F42;
gDungeon->weather.unkE267[WEATHER_SUNNY] = gUnknown_80F4F42;
if (sub_807EAA0(1,0) == 0) {
sub_80522F4(pokemon,target,*gUnknown_80FCF7C);
}