Document the weather state functions
All weather types are now documented (including WEATHER_15)
This commit is contained in:
@@ -2031,7 +2031,7 @@ Route130_EventScript_27207A:: @ 827207A
|
|||||||
Route131_EventScript_27207A:: @ 827207A
|
Route131_EventScript_27207A:: @ 827207A
|
||||||
SkyPillar_Outside_EventScript_27207A:: @ 827207A
|
SkyPillar_Outside_EventScript_27207A:: @ 827207A
|
||||||
SootopolisCity_EventScript_27207A:: @ 827207A
|
SootopolisCity_EventScript_27207A:: @ 827207A
|
||||||
setweather 15
|
setweather WEATHER_ALTERNATING
|
||||||
return
|
return
|
||||||
|
|
||||||
DewfordTown_Gym_EventScript_27207E:: @ 827207E
|
DewfordTown_Gym_EventScript_27207E:: @ 827207E
|
||||||
@@ -3655,14 +3655,14 @@ Route105_EventScript_273D17:: @ 8273D17
|
|||||||
Route125_EventScript_273D17:: @ 8273D17
|
Route125_EventScript_273D17:: @ 8273D17
|
||||||
Route127_EventScript_273D17:: @ 8273D17
|
Route127_EventScript_273D17:: @ 8273D17
|
||||||
Route129_EventScript_273D17:: @ 8273D17
|
Route129_EventScript_273D17:: @ 8273D17
|
||||||
setweather 13
|
setweather WEATHER_RAIN_HEAVY
|
||||||
return
|
return
|
||||||
|
|
||||||
Route114_EventScript_273D1B:: @ 8273D1B
|
Route114_EventScript_273D1B:: @ 8273D1B
|
||||||
Route115_EventScript_273D1B:: @ 8273D1B
|
Route115_EventScript_273D1B:: @ 8273D1B
|
||||||
Route116_EventScript_273D1B:: @ 8273D1B
|
Route116_EventScript_273D1B:: @ 8273D1B
|
||||||
Route118_EventScript_273D1B:: @ 8273D1B
|
Route118_EventScript_273D1B:: @ 8273D1B
|
||||||
setweather 12
|
setweather WEATHER_DROUGHT
|
||||||
return
|
return
|
||||||
|
|
||||||
gUnknown_08273D1F:: @ 8273D1F
|
gUnknown_08273D1F:: @ 8273D1F
|
||||||
@@ -3677,7 +3677,7 @@ gUnknown_08273D1F:: @ 8273D1F
|
|||||||
Route105_EventScript_273D31:: @ 8273D31
|
Route105_EventScript_273D31:: @ 8273D31
|
||||||
closemessage
|
closemessage
|
||||||
fadescreenswapbuffers 1
|
fadescreenswapbuffers 1
|
||||||
setweather 2
|
setweather WEATHER_SUNNY
|
||||||
doweather
|
doweather
|
||||||
call Route105_EventScript_273D6D
|
call Route105_EventScript_273D6D
|
||||||
special DrawWholeMapView
|
special DrawWholeMapView
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ SkyPillar_Outside_EventScript_239304:: @ 8239304
|
|||||||
msgbox SkyPillar_Outside_Text_23950C, MSGBOX_DEFAULT
|
msgbox SkyPillar_Outside_Text_23950C, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
setflag FLAG_SYS_WEATHER_CTRL
|
setflag FLAG_SYS_WEATHER_CTRL
|
||||||
setweather WEATHER_15
|
setweather WEATHER_ALTERNATING
|
||||||
doweather
|
doweather
|
||||||
special WaitWeather
|
special WaitWeather
|
||||||
waitstate
|
waitstate
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ SootopolisCity_EventScript_1E5946:: @ 81E5946
|
|||||||
special RemoveCameraObject
|
special RemoveCameraObject
|
||||||
delay 60
|
delay 60
|
||||||
fadescreenspeed 1, 8
|
fadescreenspeed 1, 8
|
||||||
setweather WEATHER_15
|
setweather WEATHER_ALTERNATING
|
||||||
doweather
|
doweather
|
||||||
setvar VAR_0x8004, 0
|
setvar VAR_0x8004, 0
|
||||||
special sub_813B7D8
|
special sub_813B7D8
|
||||||
@@ -314,7 +314,7 @@ SootopolisCity_EventScript_1E5A82:: @ 81E5A82
|
|||||||
special RemoveCameraObject
|
special RemoveCameraObject
|
||||||
delay 60
|
delay 60
|
||||||
fadescreenspeed 1, 8
|
fadescreenspeed 1, 8
|
||||||
setweather WEATHER_15
|
setweather WEATHER_ALTERNATING
|
||||||
doweather
|
doweather
|
||||||
setvar VAR_0x8004, 0
|
setvar VAR_0x8004, 0
|
||||||
special sub_813B7D8
|
special sub_813B7D8
|
||||||
|
|||||||
+1
-1
@@ -503,7 +503,7 @@ gSpecials:: @ 81DBA64
|
|||||||
def_special sub_813B374
|
def_special sub_813B374
|
||||||
def_special sub_813B490
|
def_special sub_813B490
|
||||||
def_special sub_80A08CC
|
def_special sub_80A08CC
|
||||||
def_special sub_813B484
|
def_special Unused_SetWeatherSunny
|
||||||
def_special sub_81AFDA0
|
def_special sub_81AFDA0
|
||||||
def_special sub_813B4E0
|
def_special sub_813B4E0
|
||||||
def_special ShouldDoBrailleRegicePuzzle
|
def_special ShouldDoBrailleRegicePuzzle
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#define WEATHER_DROUGHT 12
|
#define WEATHER_DROUGHT 12
|
||||||
#define WEATHER_RAIN_HEAVY 13
|
#define WEATHER_RAIN_HEAVY 13
|
||||||
#define WEATHER_BUBBLES 14
|
#define WEATHER_BUBBLES 14
|
||||||
#define WEATHER_15 15
|
#define WEATHER_ALTERNATING 15
|
||||||
#define WEATHER_ROUTE119_CYCLE 20
|
#define WEATHER_ROUTE119_CYCLE 20
|
||||||
#define WEATHER_ROUTE123_CYCLE 21
|
#define WEATHER_ROUTE123_CYCLE 21
|
||||||
|
|
||||||
|
|||||||
@@ -140,9 +140,9 @@ extern const u16 gUnknown_083970E8[];
|
|||||||
extern const u8 gWeatherFog1Tiles[];
|
extern const u8 gWeatherFog1Tiles[];
|
||||||
|
|
||||||
void StartWeather(void);
|
void StartWeather(void);
|
||||||
void ChangeWeather(u8 weather);
|
void SetNextWeather(u8 weather);
|
||||||
void sub_80AB104(u8 weather);
|
void SetCurrentAndNextWeather(u8 weather);
|
||||||
void sub_80AB130(u8 weather);
|
void SetCurrentAndNextWeatherNoDelay(u8 weather);
|
||||||
void sub_80ABC48(s8 gammaIndex);
|
void sub_80ABC48(s8 gammaIndex);
|
||||||
void sub_80ABC7C(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay);
|
void sub_80ABC7C(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay);
|
||||||
void FadeScreen(u8 mode, s8 delay);
|
void FadeScreen(u8 mode, s8 delay);
|
||||||
@@ -162,7 +162,7 @@ bool8 Weather_UpdateBlend(void);
|
|||||||
void sub_80AC274(u8 a);
|
void sub_80AC274(u8 a);
|
||||||
u8 GetCurrentWeather(void);
|
u8 GetCurrentWeather(void);
|
||||||
void SetRainStrengthFromSoundEffect(u16 soundEffect);
|
void SetRainStrengthFromSoundEffect(u16 soundEffect);
|
||||||
void PlayRainSoundEffect(void);
|
void PlayRainStoppingSoundEffect(void);
|
||||||
u8 IsWeatherChangeComplete(void);
|
u8 IsWeatherChangeComplete(void);
|
||||||
void SetWeatherScreenFadeOut(void);
|
void SetWeatherScreenFadeOut(void);
|
||||||
void sub_80AC3E4(void);
|
void sub_80AC3E4(void);
|
||||||
@@ -233,6 +233,6 @@ void SetSav1WeatherFromCurrMapHeader(void);
|
|||||||
void SetWeather(u32 weather);
|
void SetWeather(u32 weather);
|
||||||
void DoCurrentWeather(void);
|
void DoCurrentWeather(void);
|
||||||
void UpdateWeatherPerDay(u16 increment);
|
void UpdateWeatherPerDay(u16 increment);
|
||||||
void sub_80AEE84(void);
|
void DoPausedWeather(void);
|
||||||
|
|
||||||
#endif // GUARD_WEATHER_H
|
#endif // GUARD_WEATHER_H
|
||||||
|
|||||||
+4
-4
@@ -358,7 +358,7 @@ static void CleanupCableCar(void)
|
|||||||
HideBg(3);
|
HideBg(3);
|
||||||
sub_8150B6C(0);
|
sub_8150B6C(0);
|
||||||
gSpriteCoordOffsetX = 0;
|
gSpriteCoordOffsetX = 0;
|
||||||
sub_80AB130(WEATHER_NONE);
|
SetCurrentAndNextWeatherNoDelay(WEATHER_NONE);
|
||||||
for (i = 0; i < 20; i++)
|
for (i = 0; i < 20; i++)
|
||||||
gWeatherPtr->sprites.s2.ashSprites[i] = NULL;
|
gWeatherPtr->sprites.s2.ashSprites[i] = NULL;
|
||||||
|
|
||||||
@@ -394,7 +394,7 @@ static void sub_81503E4(u8 taskId)
|
|||||||
case 0:
|
case 0:
|
||||||
if (sCableCar->timer == sCableCar->unk4)
|
if (sCableCar->timer == sCableCar->unk4)
|
||||||
{
|
{
|
||||||
ChangeWeather(sCableCar->weather);
|
SetNextWeather(sCableCar->weather);
|
||||||
sCableCar->state = 1;
|
sCableCar->state = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -798,7 +798,7 @@ static void LoadCableCarSprites(void)
|
|||||||
gSprites[spriteId].data[1] = 99;
|
gSprites[spriteId].data[1] = 99;
|
||||||
sCableCar->weather = WEATHER_ASH;
|
sCableCar->weather = WEATHER_ASH;
|
||||||
sCableCar->unk4 = 0x15e;
|
sCableCar->unk4 = 0x15e;
|
||||||
sub_80AB130(WEATHER_SUNNY);
|
SetCurrentAndNextWeatherNoDelay(WEATHER_SUNNY);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
CopyToBgTilemapBufferRect_ChangePalette(0, sCableCar->mtChimneyTilemap + 0x24, 24, 26, 12, 3, 17);
|
CopyToBgTilemapBufferRect_ChangePalette(0, sCableCar->mtChimneyTilemap + 0x24, 24, 26, 12, 3, 17);
|
||||||
@@ -822,7 +822,7 @@ static void LoadCableCarSprites(void)
|
|||||||
gSprites[spriteId].data[1] = 0x41;
|
gSprites[spriteId].data[1] = 0x41;
|
||||||
sCableCar->weather = WEATHER_SUNNY;
|
sCableCar->weather = WEATHER_SUNNY;
|
||||||
sCableCar->unk4 = 0x109;
|
sCableCar->unk4 = 0x109;
|
||||||
sub_80AB130(WEATHER_ASH);
|
SetCurrentAndNextWeatherNoDelay(WEATHER_ASH);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (i = 0; i < 9; i++)
|
for (i = 0; i < 9; i++)
|
||||||
|
|||||||
+1
-1
@@ -574,7 +574,7 @@ static void Task_EggHatchPlayBGM(u8 taskID)
|
|||||||
if (gTasks[taskID].data[0] == 0)
|
if (gTasks[taskID].data[0] == 0)
|
||||||
{
|
{
|
||||||
StopMapMusic();
|
StopMapMusic();
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
}
|
}
|
||||||
if (gTasks[taskID].data[0] == 1)
|
if (gTasks[taskID].data[0] == 1)
|
||||||
PlayBGM(MUS_ME_SHINKA);
|
PlayBGM(MUS_ME_SHINKA);
|
||||||
|
|||||||
@@ -503,7 +503,7 @@ void DoWarp(void)
|
|||||||
ScriptContext2_Enable();
|
ScriptContext2_Enable();
|
||||||
TryFadeOutOldMapMusic();
|
TryFadeOutOldMapMusic();
|
||||||
WarpFadeScreen();
|
WarpFadeScreen();
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
PlaySE(SE_KAIDAN);
|
PlaySE(SE_KAIDAN);
|
||||||
gFieldCallback = mapldr_default;
|
gFieldCallback = mapldr_default;
|
||||||
CreateTask(sub_80AFA0C, 10);
|
CreateTask(sub_80AFA0C, 10);
|
||||||
@@ -514,7 +514,7 @@ void DoDiveWarp(void)
|
|||||||
ScriptContext2_Enable();
|
ScriptContext2_Enable();
|
||||||
TryFadeOutOldMapMusic();
|
TryFadeOutOldMapMusic();
|
||||||
WarpFadeScreen();
|
WarpFadeScreen();
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
gFieldCallback = mapldr_default;
|
gFieldCallback = mapldr_default;
|
||||||
CreateTask(sub_80AFA0C, 10);
|
CreateTask(sub_80AFA0C, 10);
|
||||||
}
|
}
|
||||||
@@ -524,7 +524,7 @@ void sub_80AF79C(void)
|
|||||||
ScriptContext2_Enable();
|
ScriptContext2_Enable();
|
||||||
TryFadeOutOldMapMusic();
|
TryFadeOutOldMapMusic();
|
||||||
FadeScreen(FADE_TO_WHITE, 8);
|
FadeScreen(FADE_TO_WHITE, 8);
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
gFieldCallback = sub_80AF3B0;
|
gFieldCallback = sub_80AF3B0;
|
||||||
CreateTask(sub_80AFA0C, 10);
|
CreateTask(sub_80AFA0C, 10);
|
||||||
}
|
}
|
||||||
@@ -734,7 +734,7 @@ static void sub_80AFA88(u8 taskId)
|
|||||||
case 4:
|
case 4:
|
||||||
TryFadeOutOldMapMusic();
|
TryFadeOutOldMapMusic();
|
||||||
WarpFadeScreen();
|
WarpFadeScreen();
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
task->data[0] = 0;
|
task->data[0] = 0;
|
||||||
task->func = sub_80AFA0C;
|
task->func = sub_80AFA0C;
|
||||||
break;
|
break;
|
||||||
@@ -771,7 +771,7 @@ void sub_80AFC60(void)
|
|||||||
ScriptContext2_Enable();
|
ScriptContext2_Enable();
|
||||||
TryFadeOutOldMapMusic();
|
TryFadeOutOldMapMusic();
|
||||||
WarpFadeScreen();
|
WarpFadeScreen();
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
PlaySE(SE_KAIDAN);
|
PlaySE(SE_KAIDAN);
|
||||||
gFieldCallback = sub_80AF3C8;
|
gFieldCallback = sub_80AF3C8;
|
||||||
CreateTask(task0A_fade_n_map_maybe, 10);
|
CreateTask(task0A_fade_n_map_maybe, 10);
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
#include "constants/moves.h"
|
#include "constants/moves.h"
|
||||||
#include "constants/vars.h"
|
#include "constants/vars.h"
|
||||||
#include "constants/battle_frontier.h"
|
#include "constants/battle_frontier.h"
|
||||||
|
#include "constants/weather.h"
|
||||||
|
|
||||||
EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE;
|
EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE;
|
||||||
EWRAM_DATA u8 gBikeCollisions = 0;
|
EWRAM_DATA u8 gBikeCollisions = 0;
|
||||||
@@ -3527,9 +3528,9 @@ bool8 sub_813B3B0(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_813B484(void)
|
void Unused_SetWeatherSunny(void)
|
||||||
{
|
{
|
||||||
sub_80AB104(2);
|
SetCurrentAndNextWeather(WEATHER_SUNNY);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool32 sub_813B490(void)
|
bool32 sub_813B490(void)
|
||||||
|
|||||||
+8
-7
@@ -186,11 +186,11 @@ void StartWeather(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChangeWeather(u8 weather)
|
void SetNextWeather(u8 weather)
|
||||||
{
|
{
|
||||||
if (weather != WEATHER_RAIN_LIGHT && weather != WEATHER_RAIN_MED && weather != WEATHER_RAIN_HEAVY)
|
if (weather != WEATHER_RAIN_LIGHT && weather != WEATHER_RAIN_MED && weather != WEATHER_RAIN_HEAVY)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gWeatherPtr->nextWeather != weather && gWeatherPtr->currWeather == weather)
|
if (gWeatherPtr->nextWeather != weather && gWeatherPtr->currWeather == weather)
|
||||||
@@ -203,18 +203,19 @@ void ChangeWeather(u8 weather)
|
|||||||
gWeatherPtr->finishStep = 0;
|
gWeatherPtr->finishStep = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80AB104(u8 weather)
|
void SetCurrentAndNextWeather(u8 weather)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
gWeatherPtr->currWeather = weather;
|
gWeatherPtr->currWeather = weather;
|
||||||
gWeatherPtr->nextWeather = weather;
|
gWeatherPtr->nextWeather = weather;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80AB130(u8 weather)
|
void SetCurrentAndNextWeatherNoDelay(u8 weather)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
gWeatherPtr->currWeather = weather;
|
gWeatherPtr->currWeather = weather;
|
||||||
gWeatherPtr->nextWeather = weather;
|
gWeatherPtr->nextWeather = weather;
|
||||||
|
// Overrides the normal delay during screen fading.
|
||||||
gWeatherPtr->readyForInit = TRUE;
|
gWeatherPtr->readyForInit = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1053,7 +1054,7 @@ void SetRainStrengthFromSoundEffect(u16 soundEffect)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayRainSoundEffect(void)
|
void PlayRainStoppingSoundEffect(void)
|
||||||
{
|
{
|
||||||
if (IsSpecialSEPlaying())
|
if (IsSpecialSEPlaying())
|
||||||
{
|
{
|
||||||
|
|||||||
+36
-35
@@ -16,8 +16,8 @@
|
|||||||
void sub_80AC6B4(struct Sprite *);
|
void sub_80AC6B4(struct Sprite *);
|
||||||
|
|
||||||
// EWRAM
|
// EWRAM
|
||||||
EWRAM_DATA static u8 gUnknown_02038BC4 = 0;
|
EWRAM_DATA static u8 gCurrentAlternatingWeather = 0;
|
||||||
EWRAM_DATA static u16 gUnknown_02038BC6 = 0;
|
EWRAM_DATA static u16 gUnusedWeatherRelated = 0;
|
||||||
|
|
||||||
// CONST
|
// CONST
|
||||||
const u16 gUnknown_0854C290[] = INCBIN_U16("graphics/weather/1.gbapal");
|
const u16 gUnknown_0854C290[] = INCBIN_U16("graphics/weather/1.gbapal");
|
||||||
@@ -2286,13 +2286,14 @@ void unc_0807DAB4(struct Sprite *sprite)
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
static void sub_80AEC94(u32 a0, u32 a1)
|
// Unused function.
|
||||||
|
static void UnusedSetCurrentAlternatingWeather(u32 a0, u32 a1)
|
||||||
{
|
{
|
||||||
gUnknown_02038BC4 = a0;
|
gCurrentAlternatingWeather = a0;
|
||||||
gUnknown_02038BC6 = a1;
|
gUnusedWeatherRelated = a1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80AECA8(u8 taskId)
|
static void Task_DoAlternatingWeather(u8 taskId)
|
||||||
{
|
{
|
||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
|
|
||||||
@@ -2301,8 +2302,8 @@ static void sub_80AECA8(u8 taskId)
|
|||||||
case 0:
|
case 0:
|
||||||
if (data[15]-- <= 0)
|
if (data[15]-- <= 0)
|
||||||
{
|
{
|
||||||
ChangeWeather(data[1]);
|
SetNextWeather(data[1]);
|
||||||
gUnknown_02038BC4 = data[1];
|
gCurrentAlternatingWeather = data[1];
|
||||||
data[15] = 600;
|
data[15] = 600;
|
||||||
data[0]++;
|
data[0]++;
|
||||||
}
|
}
|
||||||
@@ -2310,8 +2311,8 @@ static void sub_80AECA8(u8 taskId)
|
|||||||
case 1:
|
case 1:
|
||||||
if (data[15]-- <= 0)
|
if (data[15]-- <= 0)
|
||||||
{
|
{
|
||||||
ChangeWeather(data[2]);
|
SetNextWeather(data[2]);
|
||||||
gUnknown_02038BC4 = data[2];
|
gCurrentAlternatingWeather = data[2];
|
||||||
data[15] = 600;
|
data[15] = 600;
|
||||||
data[0] = 0;
|
data[0] = 0;
|
||||||
}
|
}
|
||||||
@@ -2319,25 +2320,25 @@ static void sub_80AECA8(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80AED28(void)
|
static void CreateAlternatingWeatherTask(void)
|
||||||
{
|
{
|
||||||
u8 taskId = CreateTask(sub_80AECA8, 0);
|
u8 taskId = CreateTask(Task_DoAlternatingWeather, 0);
|
||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
|
|
||||||
data[15] = 600;
|
data[15] = 600;
|
||||||
if (gUnknown_02038BC4 == WEATHER_RAIN_HEAVY)
|
if (gCurrentAlternatingWeather == WEATHER_RAIN_HEAVY)
|
||||||
{
|
{
|
||||||
data[1] = WEATHER_DROUGHT;
|
data[1] = WEATHER_DROUGHT;
|
||||||
data[2] = WEATHER_RAIN_HEAVY;
|
data[2] = WEATHER_RAIN_HEAVY;
|
||||||
}
|
}
|
||||||
else if (gUnknown_02038BC4 == WEATHER_DROUGHT)
|
else if (gCurrentAlternatingWeather == WEATHER_DROUGHT)
|
||||||
{
|
{
|
||||||
data[1] = WEATHER_RAIN_HEAVY;
|
data[1] = WEATHER_RAIN_HEAVY;
|
||||||
data[2] = WEATHER_DROUGHT;
|
data[2] = WEATHER_DROUGHT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gUnknown_02038BC4 = WEATHER_RAIN_HEAVY;
|
gCurrentAlternatingWeather = WEATHER_RAIN_HEAVY;
|
||||||
data[1] = WEATHER_DROUGHT;
|
data[1] = WEATHER_DROUGHT;
|
||||||
data[2] = WEATHER_RAIN_HEAVY;
|
data[2] = WEATHER_RAIN_HEAVY;
|
||||||
}
|
}
|
||||||
@@ -2368,51 +2369,51 @@ void SetSav1WeatherFromCurrMapHeader(void)
|
|||||||
void SetWeather(u32 weather)
|
void SetWeather(u32 weather)
|
||||||
{
|
{
|
||||||
SetSav1Weather(weather);
|
SetSav1Weather(weather);
|
||||||
ChangeWeather(GetSav1Weather());
|
SetNextWeather(GetSav1Weather());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetWeather_Unused(u32 weather)
|
void SetWeather_Unused(u32 weather)
|
||||||
{
|
{
|
||||||
SetSav1Weather(weather);
|
SetSav1Weather(weather);
|
||||||
sub_80AB104(GetSav1Weather());
|
SetCurrentAndNextWeather(GetSav1Weather());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoCurrentWeather(void)
|
void DoCurrentWeather(void)
|
||||||
{
|
{
|
||||||
u8 weather = GetSav1Weather();
|
u8 weather = GetSav1Weather();
|
||||||
|
|
||||||
if (weather == WEATHER_15)
|
if (weather == WEATHER_ALTERNATING)
|
||||||
{
|
{
|
||||||
if (!FuncIsActiveTask(sub_80AECA8))
|
if (!FuncIsActiveTask(Task_DoAlternatingWeather))
|
||||||
sub_80AED28();
|
CreateAlternatingWeatherTask();
|
||||||
weather = gUnknown_02038BC4;
|
weather = gCurrentAlternatingWeather;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (FuncIsActiveTask(sub_80AECA8))
|
if (FuncIsActiveTask(Task_DoAlternatingWeather))
|
||||||
DestroyTask(FindTaskIdByFunc(sub_80AECA8));
|
DestroyTask(FindTaskIdByFunc(Task_DoAlternatingWeather));
|
||||||
gUnknown_02038BC4 = WEATHER_RAIN_HEAVY;
|
gCurrentAlternatingWeather = WEATHER_RAIN_HEAVY;
|
||||||
}
|
}
|
||||||
ChangeWeather(weather);
|
SetNextWeather(weather);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80AEE84(void)
|
void DoPausedWeather(void)
|
||||||
{
|
{
|
||||||
u8 weather = GetSav1Weather();
|
u8 weather = GetSav1Weather();
|
||||||
|
|
||||||
if (weather == WEATHER_15)
|
if (weather == WEATHER_ALTERNATING)
|
||||||
{
|
{
|
||||||
if (!FuncIsActiveTask(sub_80AECA8))
|
if (!FuncIsActiveTask(Task_DoAlternatingWeather))
|
||||||
sub_80AED28();
|
CreateAlternatingWeatherTask();
|
||||||
weather = gUnknown_02038BC4;
|
weather = gCurrentAlternatingWeather;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (FuncIsActiveTask(sub_80AECA8))
|
if (FuncIsActiveTask(Task_DoAlternatingWeather))
|
||||||
DestroyTask(FindTaskIdByFunc(sub_80AECA8));
|
DestroyTask(FindTaskIdByFunc(Task_DoAlternatingWeather));
|
||||||
gUnknown_02038BC4 = WEATHER_RAIN_HEAVY;
|
gCurrentAlternatingWeather = WEATHER_RAIN_HEAVY;
|
||||||
}
|
}
|
||||||
sub_80AB104(weather);
|
SetCurrentAndNextWeather(weather);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const u8 sWeatherCycleRoute119[] =
|
static const u8 sWeatherCycleRoute119[] =
|
||||||
@@ -2449,7 +2450,7 @@ static u8 TranslateWeatherNum(u8 weather)
|
|||||||
case WEATHER_DROUGHT: return WEATHER_DROUGHT;
|
case WEATHER_DROUGHT: return WEATHER_DROUGHT;
|
||||||
case WEATHER_RAIN_HEAVY: return WEATHER_RAIN_HEAVY;
|
case WEATHER_RAIN_HEAVY: return WEATHER_RAIN_HEAVY;
|
||||||
case WEATHER_BUBBLES: return WEATHER_BUBBLES;
|
case WEATHER_BUBBLES: return WEATHER_BUBBLES;
|
||||||
case WEATHER_15: return WEATHER_15;
|
case WEATHER_ALTERNATING: return WEATHER_ALTERNATING;
|
||||||
case WEATHER_ROUTE119_CYCLE: return sWeatherCycleRoute119[gSaveBlock1Ptr->weatherCycleStage];
|
case WEATHER_ROUTE119_CYCLE: return sWeatherCycleRoute119[gSaveBlock1Ptr->weatherCycleStage];
|
||||||
case WEATHER_ROUTE123_CYCLE: return sWeatherCycleRoute123[gSaveBlock1Ptr->weatherCycleStage];
|
case WEATHER_ROUTE123_CYCLE: return sWeatherCycleRoute123[gSaveBlock1Ptr->weatherCycleStage];
|
||||||
default: return WEATHER_NONE;
|
default: return WEATHER_NONE;
|
||||||
|
|||||||
+1
-1
@@ -2123,7 +2123,7 @@ static void sub_8086988(u32 a1)
|
|||||||
|
|
||||||
FieldEffectActiveListClear();
|
FieldEffectActiveListClear();
|
||||||
StartWeather();
|
StartWeather();
|
||||||
sub_80AEE84();
|
DoPausedWeather();
|
||||||
if (!a1)
|
if (!a1)
|
||||||
SetUpFieldTasks();
|
SetUpFieldTasks();
|
||||||
mapheader_run_script_with_tag_x5();
|
mapheader_run_script_with_tag_x5();
|
||||||
|
|||||||
+9
-9
@@ -91,7 +91,7 @@ extern void sub_80AF688(void);
|
|||||||
extern void var_800D_set_xB(void);
|
extern void var_800D_set_xB(void);
|
||||||
extern void sub_808B864(void);
|
extern void sub_808B864(void);
|
||||||
extern void CB2_Pokedex(void);
|
extern void CB2_Pokedex(void);
|
||||||
extern void PlayRainSoundEffect(void);
|
extern void PlayRainStoppingSoundEffect(void);
|
||||||
extern void CB2_PokeNav(void);
|
extern void CB2_PokeNav(void);
|
||||||
extern void ScriptUnfreezeEventObjects(void);
|
extern void ScriptUnfreezeEventObjects(void);
|
||||||
extern void save_serialize_map(void);
|
extern void save_serialize_map(void);
|
||||||
@@ -608,7 +608,7 @@ static bool8 StartMenuPokedexCallback(void)
|
|||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
IncrementGameStat(GAME_STAT_CHECKED_POKEDEX);
|
IncrementGameStat(GAME_STAT_CHECKED_POKEDEX);
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
RemoveExtraStartMenuWindows();
|
RemoveExtraStartMenuWindows();
|
||||||
CleanupOverworldWindowsAndTilemaps();
|
CleanupOverworldWindowsAndTilemaps();
|
||||||
SetMainCallback2(CB2_Pokedex);
|
SetMainCallback2(CB2_Pokedex);
|
||||||
@@ -623,7 +623,7 @@ static bool8 StartMenuPokemonCallback(void)
|
|||||||
{
|
{
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
RemoveExtraStartMenuWindows();
|
RemoveExtraStartMenuWindows();
|
||||||
CleanupOverworldWindowsAndTilemaps();
|
CleanupOverworldWindowsAndTilemaps();
|
||||||
SetMainCallback2(CB2_PartyMenuFromStartMenu); // Display party menu
|
SetMainCallback2(CB2_PartyMenuFromStartMenu); // Display party menu
|
||||||
@@ -638,7 +638,7 @@ static bool8 StartMenuBagCallback(void)
|
|||||||
{
|
{
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
RemoveExtraStartMenuWindows();
|
RemoveExtraStartMenuWindows();
|
||||||
CleanupOverworldWindowsAndTilemaps();
|
CleanupOverworldWindowsAndTilemaps();
|
||||||
SetMainCallback2(CB2_BagMenuFromStartMenu); // Display bag menu
|
SetMainCallback2(CB2_BagMenuFromStartMenu); // Display bag menu
|
||||||
@@ -653,7 +653,7 @@ static bool8 StartMenuPokeNavCallback(void)
|
|||||||
{
|
{
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
RemoveExtraStartMenuWindows();
|
RemoveExtraStartMenuWindows();
|
||||||
CleanupOverworldWindowsAndTilemaps();
|
CleanupOverworldWindowsAndTilemaps();
|
||||||
SetMainCallback2(CB2_PokeNav); // Display PokeNav
|
SetMainCallback2(CB2_PokeNav); // Display PokeNav
|
||||||
@@ -668,7 +668,7 @@ static bool8 StartMenuPlayerNameCallback(void)
|
|||||||
{
|
{
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
RemoveExtraStartMenuWindows();
|
RemoveExtraStartMenuWindows();
|
||||||
CleanupOverworldWindowsAndTilemaps();
|
CleanupOverworldWindowsAndTilemaps();
|
||||||
|
|
||||||
@@ -699,7 +699,7 @@ static bool8 StartMenuOptionCallback(void)
|
|||||||
{
|
{
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
RemoveExtraStartMenuWindows();
|
RemoveExtraStartMenuWindows();
|
||||||
CleanupOverworldWindowsAndTilemaps();
|
CleanupOverworldWindowsAndTilemaps();
|
||||||
SetMainCallback2(CB2_InitOptionMenu); // Display option menu
|
SetMainCallback2(CB2_InitOptionMenu); // Display option menu
|
||||||
@@ -732,7 +732,7 @@ static bool8 StartMenuLinkModePlayerNameCallback(void)
|
|||||||
{
|
{
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
CleanupOverworldWindowsAndTilemaps();
|
CleanupOverworldWindowsAndTilemaps();
|
||||||
ShowTrainerCardInLink(gUnknown_03005DB4, CB2_ReturnToFieldWithOpenMenu);
|
ShowTrainerCardInLink(gUnknown_03005DB4, CB2_ReturnToFieldWithOpenMenu);
|
||||||
|
|
||||||
@@ -761,7 +761,7 @@ static bool8 StartMenuBattlePyramidBagCallback(void)
|
|||||||
{
|
{
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
PlayRainSoundEffect();
|
PlayRainStoppingSoundEffect();
|
||||||
RemoveExtraStartMenuWindows();
|
RemoveExtraStartMenuWindows();
|
||||||
CleanupOverworldWindowsAndTilemaps();
|
CleanupOverworldWindowsAndTilemaps();
|
||||||
SetMainCallback2(CB2_PyramidBagMenuFromStartMenu);
|
SetMainCallback2(CB2_PyramidBagMenuFromStartMenu);
|
||||||
|
|||||||
Reference in New Issue
Block a user