Decompile field weather

This commit is contained in:
DizzyEggg
2018-12-08 19:05:03 +01:00
parent 6068495619
commit 4c23adb5f5
20 changed files with 3808 additions and 8365 deletions

View File

@@ -59,7 +59,7 @@ typedef bool8 (*TransitionSpriteCallback)(struct Sprite *sprite);
extern const struct OamData gEventObjectBaseOam_32x32;
extern void sub_80AC3D0(void);
extern void SetWeatherScreenFadeOut(void);
// this file's functions
static void LaunchBattleTransitionTask(u8 transitionId);
@@ -981,7 +981,7 @@ static void Task_BattleTransitionMain(u8 taskId)
static bool8 Transition_Phase1(struct Task *task)
{
sub_80AC3D0();
SetWeatherScreenFadeOut();
CpuCopy32(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
if (sPhase1_Tasks[task->tTransitionId] != NULL)
{

View File

@@ -23,7 +23,7 @@
#include "link.h"
#include "berry.h"
extern u8 weather_get_current(void);
extern u8 GetCurrentWeather(void);
// rom const data
static const u16 sSoundMovesTable[] =
@@ -1827,7 +1827,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
case ABILITYEFFECT_SWITCH_IN_WEATHER:
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED))
{
switch (weather_get_current())
switch (GetCurrentWeather())
{
case 3:
case 5:
@@ -1862,7 +1862,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
}
if (effect)
{
gBattleCommunication[MULTISTRING_CHOOSER] = weather_get_current();
gBattleCommunication[MULTISTRING_CHOOSER] = GetCurrentWeather();
BattleScriptPushCursorAndCallback(BattleScript_OverworldWeatherStarts);
}
break;

View File

@@ -60,7 +60,7 @@ extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle
extern const u8 gText_HatchedFromEgg[];
extern const u8 gText_NickHatchPrompt[];
extern void play_some_sound(void);
extern void PlayRainSoundEffect(void);
extern u16 sub_80D22D0(void);
extern u8 CountPartyAliveNonEggMonsExcept(u8);
@@ -581,7 +581,7 @@ static void Task_EggHatchPlayBGM(u8 taskID)
if (gTasks[taskID].data[0] == 0)
{
StopMapMusic();
play_some_sound();
PlayRainSoundEffect();
}
if (gTasks[taskID].data[0] == 1)
PlayBGM(MUS_ME_SHINKA);

View File

@@ -1,15 +0,0 @@
// Includes
#include "global.h"
// Static type declarations
// Static RAM declarations
IWRAM_DATA u8 *gUnknown_03000F50;
IWRAM_DATA u32 filler_03000f54;
// Static ROM declarations
// .rodata
// .text

1152
src/field_weather.c Normal file

File diff suppressed because it is too large Load Diff

2484
src/field_weather_effect.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,7 @@
#include "field_effect.h"
#include "field_player_avatar.h"
#include "field_screen.h"
#include "field_weather.h"
#include "palette.h"
#include "party_menu.h"
#include "rom6.h"
@@ -40,7 +41,7 @@ bool8 FldEff_SweetScent(void)
{
u8 taskId;
sub_80AC3D0();
SetWeatherScreenFadeOut();
taskId = oei_task_add();
gTasks[taskId].data[8] = (u32)StartSweetScentFieldEffect >> 16;
gTasks[taskId].data[9] = (u32)StartSweetScentFieldEffect;

View File

@@ -148,7 +148,7 @@ extern void ResetAllPicSprites(void);
extern void FieldEffectActiveListClear(void);
extern void SetUpFieldTasks(void);
extern void sub_81BE6B8(void);
extern void sub_80AAFA4(void);
extern void StartWeather(void);
extern void ShowStartMenu(void);
extern void sub_80AEE84(void);
extern void mapldr_default(void);
@@ -2160,7 +2160,7 @@ static void sub_8086988(u32 a1)
InitEventObjectPalettes(1);
FieldEffectActiveListClear();
sub_80AAFA4();
StartWeather();
sub_80AEE84();
if (!a1)
SetUpFieldTasks();

View File

@@ -88,7 +88,7 @@ extern void sub_80AF688(void);
extern void var_800D_set_xB(void);
extern void sub_808B864(void);
extern void CB2_Pokedex(void);
extern void play_some_sound(void);
extern void PlayRainSoundEffect(void);
extern void CB2_PartyMenuFromStartMenu(void);
extern void CB2_PokeNav(void);
extern void sub_80C4DDC(void (*)(void));
@@ -621,7 +621,7 @@ static bool8 StartMenuPokedexCallback(void)
if (!gPaletteFade.active)
{
IncrementGameStat(GAME_STAT_CHECKED_POKEDEX);
play_some_sound();
PlayRainSoundEffect();
RemoveExtraStartMenuWindows();
overworld_free_bg_tilemaps();
SetMainCallback2(CB2_Pokedex);
@@ -636,7 +636,7 @@ static bool8 StartMenuPokemonCallback(void)
{
if (!gPaletteFade.active)
{
play_some_sound();
PlayRainSoundEffect();
RemoveExtraStartMenuWindows();
overworld_free_bg_tilemaps();
SetMainCallback2(CB2_PartyMenuFromStartMenu); // Display party menu
@@ -651,7 +651,7 @@ static bool8 StartMenuBagCallback(void)
{
if (!gPaletteFade.active)
{
play_some_sound();
PlayRainSoundEffect();
RemoveExtraStartMenuWindows();
overworld_free_bg_tilemaps();
SetMainCallback2(CB2_BagMenuFromStartMenu); // Display bag menu
@@ -666,7 +666,7 @@ static bool8 StartMenuPokeNavCallback(void)
{
if (!gPaletteFade.active)
{
play_some_sound();
PlayRainSoundEffect();
RemoveExtraStartMenuWindows();
overworld_free_bg_tilemaps();
SetMainCallback2(CB2_PokeNav); // Display PokeNav
@@ -681,7 +681,7 @@ static bool8 StartMenuPlayerNameCallback(void)
{
if (!gPaletteFade.active)
{
play_some_sound();
PlayRainSoundEffect();
RemoveExtraStartMenuWindows();
overworld_free_bg_tilemaps();
@@ -720,7 +720,7 @@ static bool8 StartMenuOptionCallback(void)
{
if (!gPaletteFade.active)
{
play_some_sound();
PlayRainSoundEffect();
RemoveExtraStartMenuWindows();
overworld_free_bg_tilemaps();
SetMainCallback2(CB2_InitOptionMenu); // Display option menu
@@ -753,7 +753,7 @@ static bool8 StartMenuLinkModePlayerNameCallback(void)
{
if (!gPaletteFade.active)
{
play_some_sound();
PlayRainSoundEffect();
overworld_free_bg_tilemaps();
TrainerCard_ShowLinkCard(gUnknown_03005DB4, CB2_ReturnToFieldWithOpenMenu);
@@ -782,7 +782,7 @@ static bool8 StartMenuBattlePyramidBagCallback(void)
{
if (!gPaletteFade.active)
{
play_some_sound();
PlayRainSoundEffect();
RemoveExtraStartMenuWindows();
overworld_free_bg_tilemaps();
SetMainCallback2(CB2_PyramidBagMenuFromStartMenu);