@@ -1728,7 +1728,7 @@ sub_8055864: @ 8055864
|
||||
_080558D4:
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
bl sub_807AB74
|
||||
bl ApplyWeatherGammaShiftToPal
|
||||
adds r4, 0x1
|
||||
cmp r4, 0xC
|
||||
ble _080558D4
|
||||
@@ -4644,8 +4644,8 @@ _08057050:
|
||||
bl InitObjectEventPalettes
|
||||
_08057056:
|
||||
bl FieldEffectActiveListClear
|
||||
bl sub_8079C08
|
||||
bl sub_807B1B8
|
||||
bl StartWeather
|
||||
bl ResumePausedWeather
|
||||
cmp r4, 0
|
||||
bne _0805706A
|
||||
bl SetUpFieldTasks
|
||||
@@ -5400,8 +5400,8 @@ _0805769C:
|
||||
bl ResetCameraUpdateInfo
|
||||
bl InstallCameraPanAheadCallback
|
||||
bl FieldEffectActiveListClear
|
||||
bl sub_8079C08
|
||||
bl sub_807B1B8
|
||||
bl StartWeather
|
||||
bl ResumePausedWeather
|
||||
bl SetUpFieldTasks
|
||||
bl mapheader_run_script_with_tag_x5
|
||||
b _0805772A
|
||||
@@ -5451,7 +5451,7 @@ _08057712:
|
||||
ldr r2, _08057738 @ =0x3fffffff
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl FieldWeather_StartFadingOutCreditsMap
|
||||
bl FadeSelectedPals
|
||||
_0805772A:
|
||||
ldrb r0, [r4]
|
||||
adds r0, 0x1
|
||||
|
||||
@@ -1,392 +0,0 @@
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/flags.h"
|
||||
#include "constants/moves.h"
|
||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnknown_83BFBE4:: @ 83BFBE4
|
||||
.incbin "graphics/field_effects/unk_83BFBE4.bin.lz"
|
||||
|
||||
gUnknown_83C0408::
|
||||
.incbin "graphics/field_effects/unk_83C0408.bin.lz"
|
||||
|
||||
gUnknown_83C0C00::
|
||||
.incbin "graphics/field_effects/unk_83C0C00.bin.lz"
|
||||
|
||||
gUnknown_83C139C::
|
||||
.incbin "graphics/field_effects/unk_83C139C.bin.lz"
|
||||
|
||||
gUnknown_83C1BB8::
|
||||
.incbin "graphics/field_effects/unk_83C1BB8.bin.lz"
|
||||
|
||||
gUnknown_83C2380::
|
||||
.incbin "graphics/field_effects/unk_83C2380.bin.lz"
|
||||
|
||||
gUnknown_83C2BA4::
|
||||
.4byte gUnknown_83BFBE4
|
||||
.4byte gUnknown_83C0408
|
||||
.4byte gUnknown_83C0C00
|
||||
.4byte gUnknown_83C139C
|
||||
.4byte gUnknown_83C1BB8
|
||||
.4byte gUnknown_83C2380
|
||||
|
||||
gUnknown_83C2BBC:: @ 83C2BBC
|
||||
.4byte gUnknown_2037F34
|
||||
|
||||
gUnknown_83C2BC0:: @ 83C2BC0
|
||||
.4byte sub_8079EC0
|
||||
.4byte nullsub_45
|
||||
.4byte sub_8079EC0
|
||||
.4byte sub_8079EE4
|
||||
.4byte Clouds_InitVars
|
||||
.4byte Clouds_Main
|
||||
.4byte Clouds_InitAll
|
||||
.4byte Clouds_Finish
|
||||
.4byte Weather2_InitVars
|
||||
.4byte nullsub_48
|
||||
.4byte Weather2_InitAll
|
||||
.4byte sub_807B434
|
||||
.4byte LightRain_InitVars
|
||||
.4byte LightRain_Main
|
||||
.4byte LightRain_InitAll
|
||||
.4byte LightRain_Finish
|
||||
.4byte Snow_InitVars
|
||||
.4byte snowflakes_progress2
|
||||
.4byte Snow_InitAll
|
||||
.4byte Snow_Finish
|
||||
.4byte sub_807C2E4
|
||||
.4byte Rain_Main
|
||||
.4byte sub_807C358
|
||||
.4byte Rain_Finish
|
||||
.4byte Fog1_InitVars
|
||||
.4byte Fog1_Main
|
||||
.4byte Fog1_InitAll
|
||||
.4byte Fog1_Finish
|
||||
.4byte Ash_InitVars
|
||||
.4byte Ash_Main
|
||||
.4byte Ash_InitAll
|
||||
.4byte Ash_Finish
|
||||
.4byte Sandstorm_InitVars
|
||||
.4byte Sandstorm_Main
|
||||
.4byte Sandstorm_InitAll
|
||||
.4byte Sandstorm_Finish
|
||||
.4byte Fog2_InitVars
|
||||
.4byte Fog2_Main
|
||||
.4byte Fog2_InitAll
|
||||
.4byte Fog2_Finish
|
||||
.4byte Fog1_InitVars
|
||||
.4byte Fog1_Main
|
||||
.4byte Fog1_InitAll
|
||||
.4byte Fog1_Finish
|
||||
.4byte Weather11_InitVars
|
||||
.4byte nullsub_49
|
||||
.4byte Weather11_InitAll
|
||||
.4byte sub_807D8D0
|
||||
.4byte Drought_InitVars
|
||||
.4byte Drought_Main
|
||||
.4byte Drought_InitAll
|
||||
.4byte sub_807B6BC
|
||||
.4byte sub_807C388
|
||||
.4byte Rain_Main
|
||||
.4byte sub_807C3F4
|
||||
.4byte Rain_Finish
|
||||
.4byte Bubbles_InitVars
|
||||
.4byte Bubbles_Main
|
||||
.4byte Bubbles_InitAll
|
||||
.4byte Bubbles_Finish
|
||||
|
||||
gUnknown_83C2CB0:: @ 83C2CB0
|
||||
.4byte sub_8079FFC
|
||||
.4byte sub_807A084
|
||||
.4byte nullsub_46
|
||||
.4byte nullsub_46
|
||||
|
||||
gUnknown_83C2CC0:: @ 83C2CC0
|
||||
.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02, 0x01, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01
|
||||
|
||||
gUnknown_83C2CE0:: @ 83C2CE0
|
||||
.incbin "graphics/field_effects/unk_83C2CE0.gbapal"
|
||||
|
||||
gUnknown_83C2D00:: @ 83C2D00
|
||||
.incbin "graphics/field_effects/unk_83C2D00.gbapal"
|
||||
|
||||
gUnknown_83C2D20:: @ 83C2D20
|
||||
.incbin "graphics/field_effects/unk_83C2D20.gbapal"
|
||||
|
||||
gUnknown_83C2D40::
|
||||
.incbin "graphics/field_effects/unk_83C2D40.4bpp"
|
||||
|
||||
gWeatherFog1Tiles:: @ 83C3540
|
||||
.incbin "graphics/field_effects/unk_83C3540.4bpp"
|
||||
|
||||
gUnknown_83C3D40::
|
||||
.incbin "graphics/field_effects/unk_83C3D40.4bpp"
|
||||
|
||||
gUnknown_83C4540::
|
||||
.incbin "graphics/field_effects/unk_83C4540.4bpp"
|
||||
|
||||
gUnknown_83C4580::
|
||||
.incbin "graphics/field_effects/unk_83C4580.4bpp"
|
||||
|
||||
gUnknown_83C45C0::
|
||||
.incbin "graphics/field_effects/unk_83C45C0.4bpp"
|
||||
|
||||
gUnknown_83C55C0::
|
||||
.incbin "graphics/field_effects/unk_83C55C0.4bpp"
|
||||
|
||||
gUnknown_83C5BC0::
|
||||
.incbin "graphics/field_effects/unk_83C5BC0.4bpp"
|
||||
|
||||
gUnknown_83C65C0:: @ 83C65C0
|
||||
.byte 0x02, 0x03, 0x05, 0x03
|
||||
|
||||
gUnknown_83C65C4:: @ 83C65C4
|
||||
.byte 0x02, 0x02, 0x03, 0x02
|
||||
|
||||
gUnknown_83C65C8:: @ 83C65C8
|
||||
.2byte 0x0000, 0x0042, 0x0005, 0x0049, 0x000a, 0x004e
|
||||
|
||||
gUnknown_83C65D4:: @ 83C65D4
|
||||
obj_tiles gUnknown_83C3D40, 0x0800, 4608
|
||||
|
||||
gUnknown_83C65DC::
|
||||
.4byte 0xc0000400, 0x00000c00
|
||||
|
||||
gUnknown_83C65E4::
|
||||
obj_image_anim_frame 0x0000, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C65EC::
|
||||
.4byte gUnknown_83C65E4
|
||||
|
||||
gUnknown_83C65F0:: @ 83C65F0
|
||||
spr_template 4608, 4608, gUnknown_83C65DC, gUnknown_83C65EC, NULL, gDummySpriteAffineAnimTable, sub_807B558
|
||||
|
||||
gUnknown_83C6608:: @ 83C6608
|
||||
.2byte 0x0000, 0x0000
|
||||
.2byte 0x0000, 0x00a0
|
||||
.2byte 0x0000, 0x0040
|
||||
.2byte 0x0090, 0x00e0
|
||||
.2byte 0x0090, 0x0080
|
||||
.2byte 0x0020, 0x0020
|
||||
.2byte 0x0020, 0x00c0
|
||||
.2byte 0x0020, 0x0060
|
||||
.2byte 0x0048, 0x0080
|
||||
.2byte 0x0048, 0x0020
|
||||
.2byte 0x0048, 0x00c0
|
||||
.2byte 0x00d8, 0x0060
|
||||
.2byte 0x00d8, 0x0000
|
||||
.2byte 0x0068, 0x00a0
|
||||
.2byte 0x0068, 0x0040
|
||||
.2byte 0x0068, 0x00e0
|
||||
.2byte 0x0090, 0x0000
|
||||
.2byte 0x0090, 0x00a0
|
||||
.2byte 0x0090, 0x0040
|
||||
.2byte 0x0020, 0x00e0
|
||||
.2byte 0x0020, 0x0080
|
||||
.2byte 0x0048, 0x0020
|
||||
.2byte 0x0048, 0x00c0
|
||||
.2byte 0x0030, 0x0060
|
||||
|
||||
gUnknown_83C6668::
|
||||
.4byte 0x80008000, 0x00002400
|
||||
|
||||
gUnknown_83C6670::
|
||||
obj_image_anim_frame 0x0000, 16
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_83C6678::
|
||||
obj_image_anim_frame 0x0008, 3
|
||||
obj_image_anim_frame 0x0020, 2
|
||||
obj_image_anim_frame 0x0028, 2
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C6688::
|
||||
obj_image_anim_frame 0x0008, 3
|
||||
obj_image_anim_frame 0x0010, 3
|
||||
obj_image_anim_frame 0x0018, 4
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C6698::
|
||||
.4byte gUnknown_83C6670
|
||||
.4byte gUnknown_83C6678
|
||||
.4byte gUnknown_83C6688
|
||||
|
||||
gUnknown_83C66A4:: @ 83C66A4
|
||||
spr_template 4614, 4608, gUnknown_83C6668, gUnknown_83C6698, NULL, gDummySpriteAffineAnimTable, sub_807BA24
|
||||
|
||||
gUnknown_83C66BC:: @ 83C66BC
|
||||
.2byte 0xff98, 0x00d0
|
||||
.2byte 0xff60, 0x0140
|
||||
|
||||
gUnknown_83C66C4:: @ 83C66C4
|
||||
.2byte 0x0012, 0x0007
|
||||
.2byte 0x000c, 0x000a
|
||||
|
||||
gUnknown_83C66CC:: @ 83C66CC
|
||||
obj_tiles gUnknown_83C55C0, 0x0600, 4614
|
||||
|
||||
gUnknown_83C66D4::
|
||||
.4byte 0x00000000, 0x00000400
|
||||
|
||||
gUnknown_83C66DC::
|
||||
obj_frame_tiles gUnknown_83C4540 + 0x00, 0x0020
|
||||
obj_frame_tiles gUnknown_83C4540 + 0x20, 0x0020
|
||||
|
||||
gUnknown_83C66EC::
|
||||
obj_image_anim_frame 0x0000, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C66F4::
|
||||
obj_image_anim_frame 0x0001, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C66FC::
|
||||
.4byte gUnknown_83C66EC
|
||||
.4byte gUnknown_83C66F4
|
||||
|
||||
gUnknown_83C6704:: @ 83C6704
|
||||
spr_template 65535, 4608, gUnknown_83C66D4, gUnknown_83C66FC, gUnknown_83C66DC, gDummySpriteAffineAnimTable, sub_807C1AC
|
||||
|
||||
gUnknown_83C671C::
|
||||
.2byte 0x0000, 0x0006, 0x0006, 0x000c, 0x0012, 0x002a, 0x012c, 0x012c
|
||||
|
||||
gUnknown_83C672C::
|
||||
.4byte 0xc0000400, 0x00000800
|
||||
|
||||
gUnknown_83C6734::
|
||||
obj_image_anim_frame 0x0000, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C673C::
|
||||
obj_image_anim_frame 0x0020, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C6744::
|
||||
obj_image_anim_frame 0x0040, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C674C::
|
||||
obj_image_anim_frame 0x0060, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C6754::
|
||||
obj_image_anim_frame 0x0080, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C675C::
|
||||
obj_image_anim_frame 0x00a0, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C6764::
|
||||
.4byte gUnknown_83C6734
|
||||
.4byte gUnknown_83C673C
|
||||
.4byte gUnknown_83C6744
|
||||
.4byte gUnknown_83C674C
|
||||
.4byte gUnknown_83C6754
|
||||
.4byte gUnknown_83C675C
|
||||
|
||||
gUnknown_83C677C::
|
||||
obj_rot_scal_anim_frame 512, 512, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83C678C::
|
||||
.4byte gUnknown_83C677C
|
||||
|
||||
gUnknown_83C6790:: @ 83C6790
|
||||
spr_template 4609, 4608, gUnknown_83C672C, gUnknown_83C6764, NULL, gUnknown_83C678C, Fog1SpriteCallback
|
||||
|
||||
gUnknown_83C67A8:: @ 83C67A8
|
||||
obj_tiles gWeatherFog1Tiles, 0x0800, 4609
|
||||
|
||||
gUnknown_83C67B0:: @ 83C67B0
|
||||
obj_tiles gUnknown_83C45C0, 0x1000, 4610
|
||||
|
||||
gUknown_83C67B8::
|
||||
.4byte 0xc0000400, 0x0000f400
|
||||
|
||||
gUnknown_83C67C0::
|
||||
obj_image_anim_frame 0x0000, 60
|
||||
obj_image_anim_frame 0x0040, 60
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_83C67CC::
|
||||
.4byte gUnknown_83C67C0
|
||||
|
||||
gUnknown_83C67D0:: @ 83C67D0
|
||||
spr_template 4610, 4608, gUknown_83C67B8, gUnknown_83C67CC, NULL, gDummySpriteAffineAnimTable, sub_807CF08
|
||||
|
||||
gUnknown_83C67E8:: @ 83C67E8
|
||||
obj_tiles gUnknown_83C2D40, 0x0800, 4611
|
||||
|
||||
gUnknown_83C67F0::
|
||||
.4byte 0xc0000400, 0x00000800
|
||||
|
||||
gUnknown_83C67F8::
|
||||
obj_image_anim_frame 0x0000, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C6800::
|
||||
.4byte gUnknown_83C67F8
|
||||
|
||||
gUnknown_83C6804:: @ 83C6804
|
||||
spr_template 4611, 4608, gUnknown_83C67F0, gUnknown_83C6800, NULL, gDummySpriteAffineAnimTable, Fog2SpriteCallback
|
||||
|
||||
gUnknown_83C681C::
|
||||
.4byte 0xc0000400, 0x00000400
|
||||
|
||||
gUnknown_83C6824::
|
||||
obj_image_anim_frame 0x0000, 3
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C682C::
|
||||
obj_image_anim_frame 0x0040, 3
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C6834::
|
||||
.4byte gUnknown_83C6824
|
||||
.4byte gUnknown_83C682C
|
||||
|
||||
gUnknown_83C683C:: @ 83C683C
|
||||
spr_template 4612, 4608, gUnknown_83C681C, gUnknown_83C6834, NULL, gDummySpriteAffineAnimTable, SandstormSpriteCallback1
|
||||
|
||||
gUnknown_83C6854:: @ 83C6854
|
||||
obj_tiles gUnknown_83C5BC0, 0x0a00, 4612
|
||||
|
||||
gUnknown_83C685C:: @ 83C685C
|
||||
.2byte 0x0000, 0x0078, 0x0050, 0x00a0, 0x0028, 0x0000
|
||||
|
||||
gUnknown_83C6868:: @ 83C6868
|
||||
.byte 0x28, 0x5a, 0x3c, 0x5a, 0x02, 0x3c, 0x28, 0x1e
|
||||
|
||||
gUnknown_83C6870:: @ 83C6870
|
||||
obj_tiles gUnknown_83C4580, 0x0040, 4613
|
||||
|
||||
gUnknown_83C6878:: @ 83C6878
|
||||
.2byte 0x0078, 0x00a0
|
||||
.2byte 0x0178, 0x00a0
|
||||
.2byte 0x0028, 0x008c
|
||||
.2byte 0x0128, 0x008c
|
||||
.2byte 0x00b4, 0x0082
|
||||
.2byte 0x01b4, 0x0082
|
||||
.2byte 0x003c, 0x00a0
|
||||
.2byte 0x01b4, 0x00a0
|
||||
.2byte 0x00dc, 0x00b4
|
||||
.2byte 0x01dc, 0x00b4
|
||||
.2byte 0x000a, 0x005a
|
||||
.2byte 0x010a, 0x005a
|
||||
.2byte 0x0100, 0x00a0
|
||||
|
||||
gUnknown_83C68AC::
|
||||
obj_image_anim_frame 0x0000, 16
|
||||
obj_image_anim_frame 0x0001, 16
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83C68B8::
|
||||
.4byte gUnknown_83C68AC
|
||||
|
||||
gUnknown_83C68BC:: @ 83C68BC
|
||||
spr_template 4613, 4608, gOamData_AffineOff_ObjNormal_8x8, gUnknown_83C68B8, NULL, gDummySpriteAffineAnimTable, unc_0807DAB4
|
||||
@@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
65 148 255
|
||||
180 222 255
|
||||
115 205 246
|
||||
131 197 255
|
||||
82 189 246
|
||||
172 238 246
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
@@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
255 230 139
|
||||
189 131 74
|
||||
238 197 123
|
||||
213 164 98
|
||||
164 106 49
|
||||
255 246 164
|
||||
222 205 164
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 271 B |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 353 B |
|
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 941 B After Width: | Height: | Size: 928 B |
|
After Width: | Height: | Size: 1018 B |
|
After Width: | Height: | Size: 258 B |
|
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 590 B |
|
After Width: | Height: | Size: 150 B |
|
After Width: | Height: | Size: 145 B |
@@ -10,5 +10,6 @@
|
||||
// Exported ROM declarations
|
||||
|
||||
void BlendPalette(u16, u16, u8, u16);
|
||||
void sub_8045314(u16 * palbuff, u16 blend_pal, u32 coefficient, s32 size);
|
||||
|
||||
#endif //GUARD_BLEND_PALETTE_H
|
||||
|
||||
@@ -16,5 +16,7 @@
|
||||
#define WEATHER_DROUGHT 12 // unused and broken in overworld
|
||||
#define WEATHER_DOWNPOUR 13 // unused
|
||||
#define WEATHER_UNDERWATER_BUBBLES 14 // unused
|
||||
#define WEATHER_ROUTE119_CYCLE 20 // unused
|
||||
#define WEATHER_ROUTE123_CYCLE 21 // unused
|
||||
|
||||
#endif // GUARD_CONSTANTS_WEATHER_H
|
||||
|
||||
@@ -2,6 +2,114 @@
|
||||
#define GUARD_WEATHER_H
|
||||
|
||||
#include "global.h"
|
||||
#include "constants/field_weather.h"
|
||||
|
||||
struct Weather
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct Sprite *rainSprites[MAX_RAIN_SPRITES];
|
||||
struct Sprite *snowflakeSprites[101];
|
||||
struct Sprite *cloudSprites[NUM_CLOUD_SPRITES];
|
||||
} s1;
|
||||
struct
|
||||
{
|
||||
u8 filler0[0xA0];
|
||||
struct Sprite *fogHSprites[NUM_FOG_HORIZONTAL_SPRITES];
|
||||
struct Sprite *ashSprites[NUM_ASH_SPRITES];
|
||||
struct Sprite *fogDSprites[NUM_FOG_DIAGONAL_SPRITES];
|
||||
struct Sprite *sandstormSprites1[NUM_SANDSTORM_SPRITES];
|
||||
struct Sprite *sandstormSprites2[NUM_SWIRL_SANDSTORM_SPRITES];
|
||||
} s2;
|
||||
} sprites;
|
||||
u8 gammaShifts[19][32];
|
||||
u8 altGammaShifts[19][32];
|
||||
s8 gammaIndex;
|
||||
s8 gammaTargetIndex;
|
||||
u8 gammaStepDelay;
|
||||
u8 gammaStepFrameCounter;
|
||||
u16 fadeDestColor;
|
||||
u8 palProcessingState;
|
||||
u8 fadeScreenCounter;
|
||||
bool8 readyForInit;
|
||||
u8 taskId;
|
||||
u8 unknown_6CA;
|
||||
u8 unknown_6CB;
|
||||
u16 initStep;
|
||||
u16 finishStep;
|
||||
u8 currWeather;
|
||||
u8 nextWeather;
|
||||
u8 weatherGfxLoaded;
|
||||
bool8 weatherChangeComplete;
|
||||
u8 weatherPicSpritePalIndex;
|
||||
u8 altGammaSpritePalIndex;
|
||||
u16 rainSpriteVisibleCounter;
|
||||
u8 curRainSpriteIndex;
|
||||
u8 targetRainSpriteCount;
|
||||
u8 rainSpriteCount;
|
||||
u8 rainSpriteVisibleDelay;
|
||||
u8 isDownpour;
|
||||
u8 rainStrength;
|
||||
bool8 cloudSpritesCreated;
|
||||
u16 snowflakeVisibleCounter;
|
||||
u16 unknown_6E2;
|
||||
u8 snowflakeSpriteCount;
|
||||
u8 targetSnowflakeSpriteCount;
|
||||
u16 unknown_6E6;
|
||||
u16 thunderCounter;
|
||||
u8 unknown_6EA;
|
||||
u8 unknown_6EB;
|
||||
u8 unknown_6EC;
|
||||
bool8 thunderTriggered;
|
||||
u16 fogHScrollPosX;
|
||||
u16 fogHScrollCounter;
|
||||
u16 fogHScrollOffset;
|
||||
u8 lightenedFogSpritePals[6];
|
||||
u8 lightenedFogSpritePalsCount;
|
||||
bool8 fogHSpritesCreated;
|
||||
u16 ashBaseSpritesX;
|
||||
u16 unknown_6FE;
|
||||
bool8 ashSpritesCreated;
|
||||
u32 sandstormXOffset;
|
||||
u32 sandstormYOffset;
|
||||
u8 filler_70C[2];
|
||||
u16 sandstormBaseSpritesX;
|
||||
u16 sandstormPosY;
|
||||
u16 sandstormWaveIndex;
|
||||
u16 sandstormWaveCounter;
|
||||
bool8 sandstormSpritesCreated;
|
||||
bool8 sandstormSwirlSpritesCreated;
|
||||
u16 fogDBaseSpritesX;
|
||||
u16 fogDPosY;
|
||||
u16 fogDScrollXCounter;
|
||||
u16 fogDScrollYCounter;
|
||||
u16 fogDXOffset;
|
||||
u16 fogDYOffset;
|
||||
bool8 fogDSpritesCreated;
|
||||
u16 bubblesDelayCounter;
|
||||
u16 bubblesDelayIndex;
|
||||
u16 bubblesCoordsIndex;
|
||||
u16 bubblesSpriteCount;
|
||||
bool8 bubblesSpritesCreated;
|
||||
u16 currBlendEVA;
|
||||
u16 currBlendEVB;
|
||||
u16 targetBlendEVA;
|
||||
u16 targetBlendEVB;
|
||||
u8 blendUpdateCounter;
|
||||
u8 blendFrameCounter;
|
||||
u8 blendDelay;
|
||||
s16 unknown_73C;
|
||||
s16 unknown_73E;
|
||||
s16 unknown_740;
|
||||
s16 unknown_742;
|
||||
u8 filler_744[0xD-4];
|
||||
s8 loadDroughtPalsIndex;
|
||||
u8 loadDroughtPalsOffset;
|
||||
};
|
||||
|
||||
extern struct Weather *const gWeatherPtr;
|
||||
|
||||
void FadeScreen(u8 mode, s8 delay);
|
||||
|
||||
@@ -17,9 +125,35 @@ bool8 IsWeatherNotFadingIn(void);
|
||||
void SetWeatherScreenFadeOut(void);
|
||||
void sub_807B070(void);
|
||||
u8 GetCurrentWeather(void);
|
||||
void FieldWeather_StartFadingOutCreditsMap(u8, u8, u32);
|
||||
void delay(u8, u8, u32);
|
||||
void UpdateSpritePaletteWithWeather(u8 palIdx);
|
||||
void ResetPreservedPalettesInWeather(void);
|
||||
void PreservePaletteInWeather(u8 palIdx);
|
||||
|
||||
void SetNextWeather(u8 weather);
|
||||
void SetCurrentAndNextWeather(u8 weather);
|
||||
void Weather_SetBlendCoeffs(u8 eva, u8 evb);
|
||||
void Weather_SetTargetBlendCoeffs(u8 eva, u8 evb, int delay);
|
||||
bool8 Weather_UpdateBlend(void);
|
||||
void LoadCustomWeatherSpritePalette(const u16 *palette);
|
||||
void ResetDroughtWeatherPaletteLoading(void);
|
||||
bool8 LoadDroughtWeatherPalettes(void);
|
||||
void sub_807AC60(void);
|
||||
void sub_807AC98(void);
|
||||
void SetRainStrengthFromSoundEffect(u16 soundEffect);
|
||||
void sub_807A790(s8 gammaIndex);
|
||||
void sub_807A7C4(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay);
|
||||
|
||||
extern const u16 gCloudsWeatherPalette[];
|
||||
extern const u16 gSandstormWeatherPalette[];
|
||||
extern const u8 gWeatherFogDiagonalTiles[];
|
||||
extern const u8 gWeatherFogHorizontalTiles[];
|
||||
extern const u8 gWeatherCloudTiles[];
|
||||
extern const u8 gWeatherSnow1Tiles[];
|
||||
extern const u8 gWeatherSnow2Tiles[];
|
||||
extern const u8 gWeatherBubbleTiles[];
|
||||
extern const u8 gWeatherAshTiles[];
|
||||
extern const u8 gWeatherRainTiles[];
|
||||
extern const u8 gWeatherSandstormTiles[];
|
||||
|
||||
#endif // GUARD_WEATHER_H
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#ifndef GUARD_FIELD_WEATHER_EFFECTS_H
|
||||
#define GUARD_FIELD_WEATHER_EFFECTS_H
|
||||
|
||||
bool8 Ash_Finish(void);
|
||||
bool8 Bubbles_Finish(void);
|
||||
bool8 Clouds_Finish(void);
|
||||
bool8 FogHorizontal_Finish(void);
|
||||
bool8 FogDiagonal_Finish(void);
|
||||
bool8 Rain_Finish(void);
|
||||
bool8 Thunderstorm_Finish(void);
|
||||
bool8 Sandstorm_Finish(void);
|
||||
bool8 Snow_Finish(void);
|
||||
bool8 Sunny_Finish(void);
|
||||
bool8 Drought_Finish(void);
|
||||
bool8 Shade_Finish(void);
|
||||
void Ash_InitAll(void);
|
||||
void Ash_InitVars(void);
|
||||
void Ash_Main(void);
|
||||
void Bubbles_InitAll(void);
|
||||
void Bubbles_InitVars(void);
|
||||
void Bubbles_Main(void);
|
||||
void Clouds_InitAll(void);
|
||||
void Clouds_InitVars(void);
|
||||
void Clouds_Main(void);
|
||||
void Drought_InitAll(void);
|
||||
void Drought_InitVars(void);
|
||||
void Drought_Main(void);
|
||||
void FogHorizontal_InitAll(void);
|
||||
void FogHorizontal_InitVars(void);
|
||||
void FogHorizontal_Main(void);
|
||||
void FogDiagonal_InitAll(void);
|
||||
void FogDiagonal_InitVars(void);
|
||||
void FogDiagonal_Main(void);
|
||||
void Rain_InitAll(void);
|
||||
void Rain_InitVars(void);
|
||||
void Rain_Main(void);
|
||||
void Thunderstorm_Main(void);
|
||||
void Sandstorm_InitAll(void);
|
||||
void Sandstorm_InitVars(void);
|
||||
void Sandstorm_Main(void);
|
||||
void Snow_InitAll(void);
|
||||
void Snow_InitVars(void);
|
||||
void Shade_InitAll(void);
|
||||
void Shade_InitVars(void);
|
||||
void Sunny_InitAll(void);
|
||||
void Sunny_InitVars(void);
|
||||
void Sunny_Main(void);
|
||||
void Shade_Main(void);
|
||||
void Snow_Main(void);
|
||||
void Thunderstorm_InitVars(void);
|
||||
void Thunderstorm_InitAll(void);
|
||||
void Downpour_InitVars(void);
|
||||
void Downpour_InitAll(void);
|
||||
|
||||
#endif //GUARD_FIELD_WEATHER_EFFECTS_H
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_FIELD_WEATHER_UTIL_H
|
||||
#define GUARD_FIELD_WEATHER_UTIL_H
|
||||
|
||||
void SetWeather(u8 weather);
|
||||
|
||||
#endif //GUARD_FIELD_WEATHER_UTIL_H
|
||||
@@ -749,7 +749,7 @@ struct SaveBlock1
|
||||
/*0x0024*/ struct WarpData escapeWarp;
|
||||
/*0x002C*/ u16 savedMusic;
|
||||
/*0x002E*/ u8 weather;
|
||||
/*0x002F*/ u8 filler_2F;
|
||||
/*0x002F*/ u8 weatherCycleStage;
|
||||
/*0x0030*/ u8 flashLevel;
|
||||
/*0x0032*/ u16 mapLayoutId;
|
||||
/*0x0034*/ u8 playerPartyCount;
|
||||
|
||||
@@ -4322,7 +4322,7 @@ extern const u32 gSubstituteDollTilemap[];
|
||||
extern const u32 gSubstituteDollPal[];
|
||||
|
||||
// ice
|
||||
extern const u8 gWeatherFog1Tiles[];
|
||||
extern const u8 gWeatherFogHorizontalTiles[];
|
||||
extern const u32 gBattleAnimFogTilemap[];
|
||||
extern const u16 gUnknown_83C2CE0[];
|
||||
|
||||
|
||||
@@ -114,8 +114,9 @@ SECTIONS {
|
||||
src/battle_anim_status_effects.o(.text);
|
||||
src/title_screen.o(.text);
|
||||
src/reset_save_heap.o(.text);
|
||||
asm/field_weather.o(.text);
|
||||
asm/field_weather_effects.o(.text);
|
||||
src/field_weather.o(.text);
|
||||
src/field_weather_util.o(.text);
|
||||
src/field_weather_effects.o(.text);
|
||||
src/field_fadetransition.o(.text);
|
||||
src/field_screen_effect.o(.text);
|
||||
src/battle_setup.o(.text);
|
||||
@@ -446,7 +447,9 @@ SECTIONS {
|
||||
data/map_events.o(.rodata);
|
||||
src/battle_anim_status_effects.o(.rodata);
|
||||
src/title_screen.o(.rodata);
|
||||
data/field_weather.o(.rodata);
|
||||
src/field_weather.o(.rodata);
|
||||
src/field_weather_util.o(.rodata);
|
||||
src/field_weather_effects.o(.rodata);
|
||||
src/field_screen_effect.o(.rodata);
|
||||
src/battle_setup.o(.rodata);
|
||||
src/cable_club.o(.rodata);
|
||||
|
||||
@@ -910,7 +910,7 @@ static s32 RollCredits(void)
|
||||
case CREDITSSCRCMD_MAPNEXT:
|
||||
sCreditsMgr->mainseqno = CREDITSSCENE_MAPNEXT_DESTROYWINDOW;
|
||||
sCreditsMgr->whichMon = sCreditsScript[sCreditsMgr->scrcmdidx].param;
|
||||
FieldWeather_StartFadingOutCreditsMap(1, 0, 0x3FFFFFFF);
|
||||
FadeSelectedPals(1, 0, 0x3FFFFFFF);
|
||||
break;
|
||||
case CREDITSSCRCMD_MAP:
|
||||
sCreditsMgr->mainseqno = CREDITSSCENE_MAP_LOADMAP_CREATESPRITES;
|
||||
@@ -1305,7 +1305,7 @@ static s32 RollCredits(void)
|
||||
"\tldr r2, _080F3E0C @ =0x3fffffff\n"
|
||||
"\tmovs r0, 0x1\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tbl FieldWeather_StartFadingOutCreditsMap\n"
|
||||
"\tbl FadeSelectedPals\n"
|
||||
"\tb _080F3E94\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_080F3E04: .4byte sCreditsMgr\n"
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
#include "global.h"
|
||||
#include "field_weather.h"
|
||||
#include "overworld.h"
|
||||
#include "constants/weather.h"
|
||||
|
||||
static u8 TranslateWeatherNum(u8 weather);
|
||||
static void UpdateRainCounter(u8 newWeather, u8 oldWeather);
|
||||
|
||||
void SetSav1Weather(u32 weather)
|
||||
{
|
||||
u8 oldWeather = gSaveBlock1Ptr->weather;
|
||||
gSaveBlock1Ptr->weather = TranslateWeatherNum(weather);
|
||||
UpdateRainCounter(gSaveBlock1Ptr->weather, oldWeather);
|
||||
}
|
||||
|
||||
u8 GetSav1Weather(void)
|
||||
{
|
||||
return gSaveBlock1Ptr->weather;
|
||||
}
|
||||
|
||||
void SetSav1WeatherFromCurrMapHeader(void)
|
||||
{
|
||||
u8 oldWeather = gSaveBlock1Ptr->weather;
|
||||
gSaveBlock1Ptr->weather = TranslateWeatherNum(gMapHeader.weather);
|
||||
UpdateRainCounter(gSaveBlock1Ptr->weather, oldWeather);
|
||||
}
|
||||
|
||||
void SetWeather(u32 weather)
|
||||
{
|
||||
SetSav1Weather(weather);
|
||||
SetNextWeather(GetSav1Weather());
|
||||
}
|
||||
|
||||
void SetWeather_Unused(u32 weather)
|
||||
{
|
||||
SetSav1Weather(weather);
|
||||
SetCurrentAndNextWeather(GetSav1Weather());
|
||||
}
|
||||
|
||||
void DoCurrentWeather(void)
|
||||
{
|
||||
u8 weather = GetSav1Weather();
|
||||
|
||||
SetNextWeather(weather);
|
||||
}
|
||||
|
||||
void ResumePausedWeather(void)
|
||||
{
|
||||
u8 weather = GetSav1Weather();
|
||||
|
||||
SetCurrentAndNextWeather(weather);
|
||||
}
|
||||
|
||||
static const u8 sWeatherCycleRoute119[] = {
|
||||
WEATHER_SUNNY,
|
||||
WEATHER_RAIN,
|
||||
WEATHER_RAIN_THUNDERSTORM,
|
||||
WEATHER_RAIN,
|
||||
};
|
||||
|
||||
static const u8 sWeatherCycleRoute123[] = {
|
||||
WEATHER_SUNNY,
|
||||
WEATHER_SUNNY,
|
||||
WEATHER_RAIN,
|
||||
WEATHER_SUNNY,
|
||||
};
|
||||
|
||||
static u8 TranslateWeatherNum(u8 weather)
|
||||
{
|
||||
switch (weather)
|
||||
{
|
||||
case WEATHER_NONE: return WEATHER_NONE;
|
||||
case WEATHER_SUNNY_CLOUDS: return WEATHER_SUNNY_CLOUDS;
|
||||
case WEATHER_SUNNY: return WEATHER_SUNNY;
|
||||
case WEATHER_RAIN: return WEATHER_RAIN;
|
||||
case WEATHER_SNOW: return WEATHER_SNOW;
|
||||
case WEATHER_RAIN_THUNDERSTORM: return WEATHER_RAIN_THUNDERSTORM;
|
||||
case WEATHER_FOG_HORIZONTAL: return WEATHER_FOG_HORIZONTAL;
|
||||
case WEATHER_VOLCANIC_ASH: return WEATHER_VOLCANIC_ASH;
|
||||
case WEATHER_SANDSTORM: return WEATHER_SANDSTORM;
|
||||
case WEATHER_FOG_DIAGONAL: return WEATHER_FOG_DIAGONAL;
|
||||
case WEATHER_UNDERWATER: return WEATHER_UNDERWATER;
|
||||
case WEATHER_SHADE: return WEATHER_SHADE;
|
||||
case WEATHER_DROUGHT: return WEATHER_DROUGHT;
|
||||
case WEATHER_DOWNPOUR: return WEATHER_DOWNPOUR;
|
||||
case WEATHER_UNDERWATER_BUBBLES: return WEATHER_UNDERWATER_BUBBLES;
|
||||
case WEATHER_ROUTE119_CYCLE: return sWeatherCycleRoute119[gSaveBlock1Ptr->weatherCycleStage];
|
||||
case WEATHER_ROUTE123_CYCLE: return sWeatherCycleRoute123[gSaveBlock1Ptr->weatherCycleStage];
|
||||
default: return WEATHER_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateWeatherPerDay(u16 increment)
|
||||
{
|
||||
u16 weatherStage = gSaveBlock1Ptr->weatherCycleStage + increment;
|
||||
weatherStage %= 4;
|
||||
gSaveBlock1Ptr->weatherCycleStage = weatherStage;
|
||||
}
|
||||
|
||||
static void UpdateRainCounter(u8 newWeather, u8 oldWeather)
|
||||
{
|
||||
if (newWeather != oldWeather
|
||||
&& (newWeather == WEATHER_RAIN || newWeather == WEATHER_RAIN_THUNDERSTORM))
|
||||
IncrementGameStat(GAME_STAT_GOT_RAINED_ON);
|
||||
}
|
||||
@@ -944,7 +944,7 @@ void AnimTask_Haze1(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
sub_80752A0(&animBg);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFog1Tiles, 0x800, animBg.tilesOffset);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemap(animBg.bgId, gBattleAnimFogTilemap);
|
||||
LoadPalette(&gUnknown_83C2CE0, animBg.paletteId * 16, 32);
|
||||
if (IsContest())
|
||||
@@ -1042,7 +1042,7 @@ void AnimTask_LoadMistTiles(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
sub_80752A0(&animBg);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFog1Tiles, 0x800, animBg.tilesOffset);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemap(animBg.bgId, gBattleAnimFogTilemap);
|
||||
LoadPalette(&gUnknown_83C2CE0, animBg.paletteId * 16, 32);
|
||||
if (IsContest())
|
||||
|
||||
@@ -305,6 +305,22 @@ static const u16 gUnknown_LG_83BFA10[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static const u32 gUnknown_83BFBE4[] = INCBIN_U32("graphics/title_screen/unk_83BFBE4.bin.lz");
|
||||
static const u32 gUnknown_83C0408[] = INCBIN_U32("graphics/title_screen/unk_83C0408.bin.lz");
|
||||
static const u32 gUnknown_83C0C00[] = INCBIN_U32("graphics/title_screen/unk_83C0C00.bin.lz");
|
||||
static const u32 gUnknown_83C139C[] = INCBIN_U32("graphics/title_screen/unk_83C139C.bin.lz");
|
||||
static const u32 gUnknown_83C1BB8[] = INCBIN_U32("graphics/title_screen/unk_83C1BB8.bin.lz");
|
||||
static const u32 gUnknown_83C2380[] = INCBIN_U32("graphics/title_screen/unk_83C2380.bin.lz");
|
||||
|
||||
static const u32 *const gUnknown_83C2BA4[] = {
|
||||
gUnknown_83BFBE4,
|
||||
gUnknown_83C0408,
|
||||
gUnknown_83C0C00,
|
||||
gUnknown_83C139C,
|
||||
gUnknown_83C1BB8,
|
||||
gUnknown_83C2380
|
||||
};
|
||||
|
||||
void CB2_InitTitleScreen(void)
|
||||
{
|
||||
switch (gMain.state)
|
||||
|
||||
@@ -117,27 +117,8 @@ gPlayerAvatar: @ 2037078
|
||||
.include "src/battle_anim_mons.o"
|
||||
.align 2
|
||||
.include "src/title_screen.o"
|
||||
|
||||
.align 2
|
||||
@ .include "src/field_weather.o"
|
||||
gUnknown_2037F34: @ 2037F34
|
||||
.space 0x200
|
||||
|
||||
gUnknown_2038134: @ 2038134
|
||||
.space 0x260
|
||||
|
||||
gUnknown_2038394: @ 2038394
|
||||
.space 0x2F0
|
||||
|
||||
gUnknown_2038684: @ 2038684
|
||||
.space 0x20
|
||||
|
||||
gUnknown_20386A4: @ 20386A4
|
||||
.space 0x4
|
||||
|
||||
gUnknown_20386A8: @ 20386A8
|
||||
.space 0x4
|
||||
|
||||
.include "src/field_weather.o"
|
||||
.align 2
|
||||
.include "src/battle_setup.o"
|
||||
.align 2
|
||||
|
||||