Merge pull request #1156 from GriffinRichards/doc-rayscene

Document Rayquaza cutscene
This commit is contained in:
GriffinR 2020-09-01 14:46:14 -04:00 committed by GitHub
commit 4ad147f75d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
58 changed files with 1371 additions and 1119 deletions

View File

@ -235,7 +235,7 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: @ 81E5946
fadescreenspeed FADE_TO_BLACK, 8 fadescreenspeed FADE_TO_BLACK, 8
setweather WEATHER_ABNORMAL setweather WEATHER_ABNORMAL
doweather doweather
setvar VAR_0x8004, 0 setvar VAR_0x8004, FALSE @ Just do Groudon/Kyogre fight scene
special Script_DoRayquazaScene special Script_DoRayquazaScene
waitstate waitstate
applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFastestLeft applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFastestLeft
@ -335,7 +335,7 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: @ 81E5A82
fadescreenspeed FADE_TO_BLACK, 8 fadescreenspeed FADE_TO_BLACK, 8
setweather WEATHER_ABNORMAL setweather WEATHER_ABNORMAL
doweather doweather
setvar VAR_0x8004, 0 setvar VAR_0x8004, FALSE @ Just do Groudon/Kyogre fight scene
special Script_DoRayquazaScene special Script_DoRayquazaScene
waitstate waitstate
applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFastestLeft applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFastestLeft
@ -528,7 +528,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: @ 81E5C1E
removeobject LOCALID_GROUDON removeobject LOCALID_GROUDON
removeobject LOCALID_KYOGRE removeobject LOCALID_KYOGRE
addobject LOCALID_RAYQUAZA addobject LOCALID_RAYQUAZA
setvar VAR_0x8004, 1 setvar VAR_0x8004, TRUE
special Script_DoRayquazaScene special Script_DoRayquazaScene
waitstate waitstate
playse SE_THUNDER playse SE_THUNDER
@ -581,7 +581,7 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: @ 81E5CCE
removeobject LOCALID_GROUDON removeobject LOCALID_GROUDON
removeobject LOCALID_KYOGRE removeobject LOCALID_KYOGRE
addobject LOCALID_RAYQUAZA addobject LOCALID_RAYQUAZA
setvar VAR_0x8004, 1 setvar VAR_0x8004, TRUE
special Script_DoRayquazaScene special Script_DoRayquazaScene
waitstate waitstate
special SpawnCameraObject special SpawnCameraObject

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 964 B

After

Width:  |  Height:  |  Size: 964 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 445 B

View File

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 261 B

View File

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 179 B

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 242 B

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 534 B

View File

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 815 B

View File

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 264 B

View File

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 279 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 168 B

View File

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 505 B

View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

View File

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 339 B

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 391 B

View File

Before

Width:  |  Height:  |  Size: 385 B

After

Width:  |  Height:  |  Size: 385 B

View File

@ -457,23 +457,23 @@ $(TYPESGFXDIR)/move_types.gbapal: $(TYPESGFXDIR)/move_types_1.gbapal \
$(INTERFACEGFXDIR)/bag_screen.4bpp: %.4bpp: %.png $(INTERFACEGFXDIR)/bag_screen.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 53 $(GFX) $< $@ -num_tiles 53
$(RAYQUAZAGFXDIR)/rayquaza.8bpp: %.8bpp: %.png $(RAYQUAZAGFXDIR)/scene_2/rayquaza.8bpp: %.8bpp: %.png
$(GFX) $< $@ -num_tiles 227 $(GFX) $< $@ -num_tiles 227
$(RAYQUAZAGFXDIR)/overcast.4bpp: %.4bpp: %.png $(RAYQUAZAGFXDIR)/scene_2/bg.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 313 $(GFX) $< $@ -num_tiles 313
$(RAYQUAZAGFXDIR)/rayquaza_fly1.4bpp: %.4bpp: %.png $(RAYQUAZAGFXDIR)/scene_3/rayquaza.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 124 $(GFX) $< $@ -num_tiles 124
$(RAYQUAZAGFXDIR)/rayquaza_tail_fix.4bpp: $(RAYQUAZAGFXDIR)/rayquaza_tail.4bpp $(RAYQUAZAGFXDIR)/scene_3/rayquaza_tail_fix.4bpp: $(RAYQUAZAGFXDIR)/scene_3/rayquaza_tail.4bpp
cp $< $@ cp $< $@
head -c 12 /dev/zero >> $@ head -c 12 /dev/zero >> $@
$(RAYQUAZAGFXDIR)/chase_streaks.4bpp: %.4bpp: %.png $(RAYQUAZAGFXDIR)/scene_4/streaks.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 19 $(GFX) $< $@ -num_tiles 19
$(RAYQUAZAGFXDIR)/rayquaza_chase.4bpp: %.4bpp: %.png $(RAYQUAZAGFXDIR)/scene_4/rayquaza.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 155 $(GFX) $< $@ -num_tiles 155
graphics/picture_frame/frame5.4bpp: %.4bpp: %.png graphics/picture_frame/frame5.4bpp: %.4bpp: %.png

View File

@ -553,6 +553,7 @@
#define WININ_WIN0_BG_ALL (WININ_WIN0_BG0 | WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3) #define WININ_WIN0_BG_ALL (WININ_WIN0_BG0 | WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3)
#define WININ_WIN0_OBJ (1 << 4) #define WININ_WIN0_OBJ (1 << 4)
#define WININ_WIN0_CLR (1 << 5) #define WININ_WIN0_CLR (1 << 5)
#define WININ_WIN0_ALL (WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR)
#define WININ_WIN1_BG0 (1 << 8) #define WININ_WIN1_BG0 (1 << 8)
#define WININ_WIN1_BG1 (1 << 9) #define WININ_WIN1_BG1 (1 << 9)
#define WININ_WIN1_BG2 (1 << 10) #define WININ_WIN1_BG2 (1 << 10)
@ -560,6 +561,7 @@
#define WININ_WIN1_BG_ALL (WININ_WIN1_BG0 | WININ_WIN1_BG1 | WININ_WIN1_BG2 | WININ_WIN1_BG3) #define WININ_WIN1_BG_ALL (WININ_WIN1_BG0 | WININ_WIN1_BG1 | WININ_WIN1_BG2 | WININ_WIN1_BG3)
#define WININ_WIN1_OBJ (1 << 12) #define WININ_WIN1_OBJ (1 << 12)
#define WININ_WIN1_CLR (1 << 13) #define WININ_WIN1_CLR (1 << 13)
#define WININ_WIN1_ALL (WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR)
#define WINOUT_WIN01_BG0 (1 << 0) #define WINOUT_WIN01_BG0 (1 << 0)
#define WINOUT_WIN01_BG1 (1 << 1) #define WINOUT_WIN01_BG1 (1 << 1)
@ -568,6 +570,7 @@
#define WINOUT_WIN01_BG_ALL (WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3) #define WINOUT_WIN01_BG_ALL (WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3)
#define WINOUT_WIN01_OBJ (1 << 4) #define WINOUT_WIN01_OBJ (1 << 4)
#define WINOUT_WIN01_CLR (1 << 5) #define WINOUT_WIN01_CLR (1 << 5)
#define WINOUT_WIN01_ALL (WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR)
#define WINOUT_WINOBJ_BG0 (1 << 8) #define WINOUT_WINOBJ_BG0 (1 << 8)
#define WINOUT_WINOBJ_BG1 (1 << 9) #define WINOUT_WINOBJ_BG1 (1 << 9)
#define WINOUT_WINOBJ_BG2 (1 << 10) #define WINOUT_WINOBJ_BG2 (1 << 10)
@ -575,6 +578,7 @@
#define WINOUT_WINOBJ_BG_ALL (WINOUT_WINOBJ_BG0 | WINOUT_WINOBJ_BG1 | WINOUT_WINOBJ_BG2 | WINOUT_WINOBJ_BG3) #define WINOUT_WINOBJ_BG_ALL (WINOUT_WINOBJ_BG0 | WINOUT_WINOBJ_BG1 | WINOUT_WINOBJ_BG2 | WINOUT_WINOBJ_BG3)
#define WINOUT_WINOBJ_OBJ (1 << 12) #define WINOUT_WINOBJ_OBJ (1 << 12)
#define WINOUT_WINOBJ_CLR (1 << 13) #define WINOUT_WINOBJ_CLR (1 << 13)
#define WINOUT_WINOBJ_ALL (WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR)
#define WIN_RANGE(a, b) (((a) << 8) | (b)) #define WIN_RANGE(a, b) (((a) << 8) | (b))
#define WIN_RANGE2(a, b) ((b) | ((a) << 8)) #define WIN_RANGE2(a, b) ((b) | ((a) << 8))
@ -585,9 +589,10 @@
#define BLDCNT_TGT1_BG1 (1 << 1) #define BLDCNT_TGT1_BG1 (1 << 1)
#define BLDCNT_TGT1_BG2 (1 << 2) #define BLDCNT_TGT1_BG2 (1 << 2)
#define BLDCNT_TGT1_BG3 (1 << 3) #define BLDCNT_TGT1_BG3 (1 << 3)
#define BLDCNT_TGT1_BG_ALL (BLDCNT_TGT1_BG0 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3)
#define BLDCNT_TGT1_OBJ (1 << 4) #define BLDCNT_TGT1_OBJ (1 << 4)
#define BLDCNT_TGT1_BD (1 << 5) #define BLDCNT_TGT1_BD (1 << 5)
#define BLDCNT_TGT1_ALL (BLDCNT_TGT1_BG0 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD) #define BLDCNT_TGT1_ALL (BLDCNT_TGT1_BG_ALL | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD)
// Bits 6-7 select the special effect // Bits 6-7 select the special effect
#define BLDCNT_EFFECT_NONE (0 << 6) // no special effect #define BLDCNT_EFFECT_NONE (0 << 6) // no special effect
#define BLDCNT_EFFECT_BLEND (1 << 6) // 1st+2nd targets mixed (controlled by BLDALPHA) #define BLDCNT_EFFECT_BLEND (1 << 6) // 1st+2nd targets mixed (controlled by BLDALPHA)
@ -598,9 +603,10 @@
#define BLDCNT_TGT2_BG1 (1 << 9) #define BLDCNT_TGT2_BG1 (1 << 9)
#define BLDCNT_TGT2_BG2 (1 << 10) #define BLDCNT_TGT2_BG2 (1 << 10)
#define BLDCNT_TGT2_BG3 (1 << 11) #define BLDCNT_TGT2_BG3 (1 << 11)
#define BLDCNT_TGT2_BG_ALL (BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3)
#define BLDCNT_TGT2_OBJ (1 << 12) #define BLDCNT_TGT2_OBJ (1 << 12)
#define BLDCNT_TGT2_BD (1 << 13) #define BLDCNT_TGT2_BD (1 << 13)
#define BLDCNT_TGT2_ALL (BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD) #define BLDCNT_TGT2_ALL (BLDCNT_TGT2_BG_ALL | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD)
// BLDALPHA // BLDALPHA
#define BLDALPHA_BLEND(target1, target2) (((target2) << 8) | (target1)) #define BLDALPHA_BLEND(target1, target2) (((target2) << 8) | (target1))

View File

@ -3309,57 +3309,57 @@ extern const u32 gBerryTag_Gfx[];
extern const u32 gBerryTag_Pal[]; extern const u32 gBerryTag_Pal[];
// rayquaza scene gfx // rayquaza scene gfx
extern const u32 gRaySceneGroudon_Gfx[]; extern const u32 gRaySceneDuoFight_Groudon_Gfx[];
extern const u32 gRaySceneGroudon2_Gfx[]; extern const u32 gRaySceneDuoFight_GroudonShoulder_Gfx[];
extern const u32 gRaySceneGroudon3_Gfx[]; extern const u32 gRaySceneDuoFight_GroudonClaw_Gfx[];
extern const u32 gRaySceneKyogre_Gfx[]; extern const u32 gRaySceneDuoFight_Kyogre_Gfx[];
extern const u32 gRaySceneKyogre2_Gfx[]; extern const u32 gRaySceneDuoFight_KyogrePectoralFin_Gfx[];
extern const u32 gRaySceneKyogre3_Gfx[]; extern const u32 gRaySceneDuoFight_KyogreDorsalFin_Gfx[];
extern const u32 gRaySceneGroudon_Pal[]; extern const u32 gRaySceneDuoFight_Groudon_Pal[];
extern const u32 gRaySceneKyogre_Pal[]; extern const u32 gRaySceneDuoFight_Kyogre_Pal[];
extern const u32 gRaySceneSmoke_Gfx[]; extern const u32 gRaySceneDuoFight_Clouds_Gfx[];
extern const u32 gRaySceneSmoke_Pal[]; extern const u32 gRaySceneDuoFight_Clouds_Pal[];
extern const u32 gRaySceneRayquaza_Pal[]; extern const u32 gRaySceneDuoFight_Clouds1_Tilemap[];
extern const u32 gRaySceneRayquazaFly1_Gfx[]; extern const u32 gRaySceneDuoFight_Clouds2_Tilemap[];
extern const u32 gRaySceneRayquazaTail_Gfx[]; extern const u32 gRaySceneDuoFight_Clouds3_Tilemap[];
extern const u32 gRaySceneGroudonLeft_Gfx[]; extern const u32 gRaySceneTakesFlight_Smoke_Gfx[];
extern const u32 gRaySceneGroudonTail_Gfx[]; extern const u32 gRaySceneTakesFlight_Smoke_Pal[];
extern const u32 gRaySceneKyogreRight_Gfx[]; extern const u32 gRaySceneTakesFlight_Rayquaza_Pal[];
extern const u32 gRaySceneRayquazaHover_Gfx[]; extern const u32 gRaySceneTakesFlight_Bg_Gfx[];
extern const u32 gRaySceneRayquazaFlyIn_Gfx[]; extern const u32 gRaySceneTakesFlight_Bg_Tilemap[];
extern const u32 gRaySceneOvercast_Gfx[]; extern const u32 gRaySceneTakesFlight_Rayquaza_Gfx[];
extern const u32 gRaySceneOvercast_Tilemap[]; extern const u32 gRaySceneTakesFlight_Rayquaza_Tilemap[];
extern const u32 gRaySceneRayquaza_Gfx[]; extern const u32 gRaySceneDescends_Rayquaza_Gfx[];
extern const u32 gRaySceneRayquaza_Tilemap[]; extern const u32 gRaySceneDescends_RayquazaTail_Gfx[];
extern const u32 gRaySceneSplash_Gfx[]; extern const u32 gRaySceneDescends_Light_Gfx[];
extern const u32 gRaySceneGroudonLeft_Pal[]; extern const u32 gRaySceneDescends_Light_Tilemap[];
extern const u32 gRaySceneKyogreRight_Pal[]; extern const u32 gRaySceneDescends_Bg_Gfx[];
extern const u32 gRaySceneRayquazaHover_Pal[]; extern const u32 gRaySceneDescends_Bg_Tilemap[];
extern const u32 gRaySceneSplash_Pal[]; extern const u32 gRaySceneDescends_Bg_Pal[];
extern const u32 gRaySceneClouds_Gfx[]; extern const u32 gRaySceneCharges_Rayquaza_Gfx[];
extern const u32 gRaySceneClouds_Pal[]; extern const u32 gRaySceneCharges_Streaks_Gfx[];
extern const u32 gRaySceneClouds2_Tilemap[]; extern const u32 gRaySceneCharges_Bg_Gfx[];
extern const u32 gRaySceneClouds1_Tilemap[]; extern const u32 gRaySceneCharges_Orbs_Tilemap[];
extern const u32 gRaySceneClouds3_Tilemap[]; extern const u32 gRaySceneCharges_Rayquaza_Tilemap[];
extern const u32 gRaySceneRayquazaLight_Gfx[]; extern const u32 gRaySceneCharges_Streaks_Tilemap[];
extern const u32 gRaySceneRayquazaLight_Tilemap[]; extern const u32 gRaySceneCharges_Bg_Tilemap[];
extern const u32 gRaySceneOvercast2_Gfx[]; extern const u32 gRaySceneCharges_Bg_Pal[];
extern const u32 gRaySceneOvercast2_Tilemap[]; extern const u32 gRaySceneChasesAway_Groudon_Gfx[];
extern const u32 gRaySceneOvercast2_Pal[]; extern const u32 gRaySceneChasesAway_GroudonTail_Gfx[];
extern const u32 gRaySceneRayquazaChase_Gfx[]; extern const u32 gRaySceneChasesAway_Kyogre_Gfx[];
extern const u32 gRaySceneChaseStreaks_Gfx[]; extern const u32 gRaySceneChasesAway_Rayquaza_Gfx[];
extern const u32 gRaySceneChaseBg_Gfx[]; extern const u32 gRaySceneChasesAway_RayquazaTail_Gfx[];
extern const u32 gRayChaseRayquazaChase2_Tilemap[]; extern const u32 gRaySceneChasesAway_KyogreSplash_Gfx[];
extern const u32 gRayChaseRayquazaChase_Tilemap[]; extern const u32 gRaySceneChasesAway_Groudon_Pal[];
extern const u32 gRaySceneChaseStreaks_Tilemap[]; extern const u32 gRaySceneChasesAway_Kyogre_Pal[];
extern const u32 gRaySceneChaseBg_Tilemap[]; extern const u32 gRaySceneChasesAway_Rayquaza_Pal[];
extern const u32 gRaySceneChase_Pal[]; extern const u32 gRaySceneChasesAway_KyogreSplash_Pal[];
extern const u32 gRaySceneHushRing_Tilemap[]; extern const u32 gRaySceneChasesAway_Bg_Tilemap[];
extern const u32 gRaySceneHushBg_Tilemap[]; extern const u32 gRaySceneChasesAway_Light_Tilemap[];
extern const u32 gRaySceneHushRing_Map[]; extern const u32 gRaySceneChasesAway_Ring_Tilemap[];
extern const u32 gRaySceneHushBg_Pal[]; extern const u32 gRaySceneChasesAway_Bg_Pal[];
extern const u32 gRaySceneHushBg_Gfx[]; extern const u32 gRaySceneChasesAway_Light_Gfx[];
extern const u32 gRaySceneHushRing_Gfx[]; extern const u32 gRaySceneChasesAway_Ring_Gfx[];
// Pokeballs // Pokeballs
extern const u32 gItemIcon_MasterBall[]; extern const u32 gItemIcon_MasterBall[];

View File

@ -70,7 +70,7 @@ void BeginFastPaletteFade(u8);
void BeginHardwarePaletteFade(u8, u8, u8, u8, u8); void BeginHardwarePaletteFade(u8, u8, u8, u8, u8);
void BlendPalettes(u32 selectedPalettes, u8 coeff, u16 color); void BlendPalettes(u32 selectedPalettes, u8 coeff, u16 color);
void BlendPalettesUnfaded(u32, u8, u16); void BlendPalettesUnfaded(u32, u8, u16);
void sub_80A2C44(u32 a1, s8 a2, u8 a3, u8 a4, u16 a5, u8 a6, u8 a7); void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTarget, u16 color, u8 priority, u8 id);
void TintPalette_GrayScale(u16 *palette, u16 count); void TintPalette_GrayScale(u16 *palette, u16 count);
void TintPalette_GrayScale2(u16 *palette, u16 count); void TintPalette_GrayScale2(u16 *palette, u16 count);
void TintPalette_SepiaTone(u16 *palette, u16 count); void TintPalette_SepiaTone(u16 *palette, u16 count);

View File

@ -1,17 +1,6 @@
#ifndef GUARD_RAYQUAZA_SCENE_H #ifndef GUARD_RAYQUAZA_SCENE_H
#define GUARD_RAYQUAZA_SCENE_H #define GUARD_RAYQUAZA_SCENE_H
void DoRayquazaScene(u8 animId, bool8 onlyOneAnim, void (*callback)(void)); void DoRayquazaScene(u8 animId, bool8 endEarly, void (*callback)(void));
enum
{
RAY_ANIM_DUO_FIGHT_PRE,
RAY_ANIM_DUO_FIGHT,
RAY_ANIM_TAKES_FLIGHT,
RAY_ANIM_DESCENDS,
RAY_ANIM_CHARGES,
RAY_ANIM_CHACES_AWAY,
RAY_ANIM_END
};
#endif // GUARD_RAYQUAZA_SCENE_H #endif // GUARD_RAYQUAZA_SCENE_H

View File

@ -1,4 +0,0 @@
#ifndef GUARD_rom_8011DC0_H
#define GUARD_rom_8011DC0_H
#endif //GUARD_rom_8011DC0_H

View File

@ -1,73 +1,62 @@
const u32 gRaySceneGroudon_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/groudon.4bpp.lz"); // Scene 1 (RAY_ANIM_DUO_FIGHT / RAY_ANIM_DUO_FIGHT_PRE)
const u32 gRaySceneGroudon2_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/groudon_shoulder.4bpp.lz"); const u32 gRaySceneDuoFight_Groudon_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon.4bpp.lz");
const u32 gRaySceneGroudon3_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/groudon_claw.4bpp.lz"); const u32 gRaySceneDuoFight_GroudonShoulder_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon_shoulder.4bpp.lz");
const u32 gRaySceneDuoFight_GroudonClaw_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon_claw.4bpp.lz");
const u32 gRaySceneDuoFight_Kyogre_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre.4bpp.lz");
const u32 gRaySceneDuoFight_KyogrePectoralFin_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre_pectoral_fin.4bpp.lz");
const u32 gRaySceneDuoFight_KyogreDorsalFin_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre_dorsal_fin.4bpp.lz");
const u32 gRaySceneDuoFight_Groudon_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon.gbapal.lz");
const u32 gRaySceneDuoFight_Kyogre_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre.gbapal.lz");
const u32 gRaySceneDuoFight_Clouds_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds.4bpp.lz");
const u32 gRaySceneDuoFight_Clouds_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds.gbapal.lz"); // pal 1 clouds, pal 2 rain
const u32 gRaySceneDuoFight_Clouds1_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds1.bin.lz");
const u32 gRaySceneDuoFight_Clouds2_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds2.bin.lz");
const u32 gRaySceneDuoFight_Clouds3_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds3.bin.lz");
const u32 gRaySceneKyogre_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/kyogre.4bpp.lz"); // Scene 2 (RAY_ANIM_TAKES_FLIGHT)
const u32 gRaySceneKyogre2_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/kyogre_shoulder.4bpp.lz"); const u32 gRaySceneTakesFlight_Smoke_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_2/smoke.4bpp.lz");
const u32 gRaySceneKyogre3_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/kyogre_fin.4bpp.lz"); const u32 gRaySceneTakesFlight_Smoke_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_2/smoke.gbapal.lz");
const u32 gRaySceneTakesFlight_Rayquaza_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_2/rayquaza.8bpp.lz");
const u32 gRaySceneTakesFlight_Rayquaza_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_2/rayquaza.gbapal.lz");
const u32 gRaySceneTakesFlight_Rayquaza_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_2/rayquaza.bin.lz");
const u32 gRaySceneTakesFlight_Bg_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_2/bg.4bpp.lz"); // uses pal 2 of gRaySceneTakesFlight_Rayquaza_Pal
const u32 gRaySceneTakesFlight_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_2/bg.bin.lz");
const u32 gRaySceneGroudon_Pal[] = INCBIN_U32("graphics/rayquaza_scene/groudon.gbapal.lz"); // Scene 3 (RAY_ANIM_DESCENDS)
const u32 gRaySceneKyogre_Pal[] = INCBIN_U32("graphics/rayquaza_scene/kyogre.gbapal.lz"); const u32 gRaySceneDescends_Rayquaza_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/rayquaza.4bpp.lz");
// for some reason there are an extra 0xC bytes at the end of the original rayquaza_tail.4bpp, so in order to produce the correct lz,
// we have to cat the bytes at the end with a make rule. not sure why those bytes are there, it may have been a bug in Game Freak's software.
const u32 gRaySceneDescends_RayquazaTail_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/rayquaza_tail_fix.4bpp.lz");
const u32 gRaySceneDescends_Bg_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/bg.4bpp.lz");
const u32 gRaySceneDescends_Light_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/light.4bpp.lz"); // uses pal 2 of gRaySceneDescends_Bg_Pal
const u32 gRaySceneDescends_Bg_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/bg.gbapal.lz");
const u32 gRaySceneDescends_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/bg.bin.lz");
const u32 gRaySceneDescends_Light_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/light.bin.lz");
const u32 gRaySceneClouds_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/clouds.4bpp.lz"); // Scene 4 (RAY_ANIM_CHARGES)
const u32 gRaySceneClouds_Pal[] = INCBIN_U32("graphics/rayquaza_scene/clouds.gbapal.lz"); // pal 1 clouds, pal 2 rain const u32 gRaySceneCharges_Bg_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/bg.4bpp.lz");
const u32 gRaySceneClouds1_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/clouds1.bin.lz"); const u32 gRaySceneCharges_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/bg.bin.lz");
const u32 gRaySceneClouds2_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/clouds2.bin.lz"); const u32 gRaySceneCharges_Streaks_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/streaks.4bpp.lz");
const u32 gRaySceneClouds3_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/clouds3.bin.lz"); const u32 gRaySceneCharges_Streaks_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/streaks.bin.lz");
const u32 gRaySceneCharges_Rayquaza_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/rayquaza.4bpp.lz");
const u32 gRaySceneCharges_Rayquaza_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/rayquaza.bin.lz");
const u32 gRaySceneCharges_Orbs_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/orbs.bin.lz");
const u32 gRaySceneCharges_Bg_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/bg.gbapal.lz");
const u32 gRaySceneSmoke_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/smoke.4bpp.lz"); // Scene 5 (RAY_ANIM_CHASES_AWAY)
const u32 gRaySceneSmoke_Pal[] = INCBIN_U32("graphics/rayquaza_scene/smoke.gbapal.lz"); const u32 gRaySceneChasesAway_Groudon_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/groudon.4bpp.lz");
const u32 gRaySceneChasesAway_GroudonTail_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/groudon_tail.4bpp.lz");
const u32 gRaySceneRayquaza_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza.8bpp.lz"); const u32 gRaySceneChasesAway_Kyogre_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/kyogre.4bpp.lz");
const u32 gRaySceneRayquaza_Pal[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza.gbapal.lz"); const u32 gRaySceneChasesAway_Rayquaza_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/rayquaza.4bpp.lz");
const u32 gRaySceneRayquaza_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza.bin.lz"); const u32 gRaySceneChasesAway_RayquazaTail_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/rayquaza_tail.4bpp.lz");
const u32 gRaySceneChasesAway_KyogreSplash_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/kyogre_splash.4bpp.lz");
const u32 gRaySceneOvercast_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/overcast.4bpp.lz"); // uses pal 2 of gRaySceneRayquaza_Pal const u32 gRaySceneChasesAway_Groudon_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/groudon.gbapal.lz");
const u32 gRaySceneOvercast_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/overcast.bin.lz"); const u32 gRaySceneChasesAway_Kyogre_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/kyogre.gbapal.lz");
const u32 gRaySceneChasesAway_Rayquaza_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/rayquaza.gbapal.lz");
const u32 gRaySceneRayquazaFly1_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza_fly1.4bpp.lz"); const u32 gRaySceneChasesAway_KyogreSplash_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/kyogre_splash.gbapal.lz");
const u32 gRaySceneRayquazaTail_Gfx[] = INCBIN_U32( "graphics/rayquaza_scene/rayquaza_tail_fix.4bpp.lz"); // for some reason there are an extra 0xC bytes at the end of the original 4bpp, so in order to produce the correct lz, we have to cat the bytes at the end with a make rule. not sure why those bytes are there, it may have been a bug in Game Freak's software. const u32 gRaySceneChasesAway_Light_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/light.4bpp.lz");
const u32 gRaySceneChasesAway_Ring_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/ring.8bpp.lz");
const u32 gRaySceneOvercast2_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/overcast2.4bpp.lz"); const u32 gRaySceneChasesAway_Light_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/light.bin.lz");
const u32 gRaySceneChasesAway_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/bg.bin.lz");
const u32 gRaySceneRayquazaLight_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza_light.4bpp.lz"); // uses pal 2 of gRaySceneOvercast2_Pal const u32 gRaySceneChasesAway_Ring_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/ring.bin.lz");
const u32 gRaySceneChasesAway_Bg_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/bg.gbapal.lz");
const u32 gRaySceneOvercast2_Pal[] = INCBIN_U32("graphics/rayquaza_scene/overcast2.gbapal.lz");
const u32 gRaySceneOvercast2_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/overcast2.bin.lz");
const u32 gRaySceneRayquazaLight_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza_light.bin.lz");
const u32 gRaySceneChaseBg_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/chase_bg.4bpp.lz");
const u32 gRaySceneChaseBg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/chase_bg.bin.lz");
const u32 gRaySceneChaseStreaks_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/chase_streaks.4bpp.lz");
const u32 gRaySceneChaseStreaks_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/chase_streaks.bin.lz");
const u32 gRaySceneRayquazaChase_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza_chase.4bpp.lz");
const u32 gRayChaseRayquazaChase_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza_chase.bin.lz");
const u32 gRayChaseRayquazaChase2_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza_chase2.bin.lz");
const u32 gRaySceneChase_Pal[] = INCBIN_U32("graphics/rayquaza_scene/chase.gbapal.lz");
const u32 gRaySceneGroudonLeft_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/groudon_left.4bpp.lz");
const u32 gRaySceneGroudonTail_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/groudon_tail.4bpp.lz");
const u32 gRaySceneKyogreRight_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/kyogre_right.4bpp.lz");
const u32 gRaySceneRayquazaHover_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza_hover.4bpp.lz");
const u32 gRaySceneRayquazaFlyIn_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza_flyin.4bpp.lz");
const u32 gRaySceneSplash_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/splash.4bpp.lz");
const u32 gRaySceneGroudonLeft_Pal[] = INCBIN_U32("graphics/rayquaza_scene/groudon_left.gbapal.lz");
const u32 gRaySceneKyogreRight_Pal[] = INCBIN_U32("graphics/rayquaza_scene/kyogre_right.gbapal.lz");
const u32 gRaySceneRayquazaHover_Pal[] = INCBIN_U32("graphics/rayquaza_scene/rayquaza_hover.gbapal.lz");
const u32 gRaySceneSplash_Pal[] = INCBIN_U32("graphics/rayquaza_scene/splash.gbapal.lz");
const u32 gRaySceneHushBg_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/hush_bg.4bpp.lz");
const u32 gRaySceneHushRing_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/hush_ring.8bpp.lz");
const u32 gRaySceneHushBg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/hush_bg.bin.lz");
const u32 gRaySceneHushRing_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/hush_ring.bin.lz");
const u32 gRaySceneHushRing_Map[] = INCBIN_U32("graphics/rayquaza_scene/hush_ring_map.bin.lz");
const u32 gRaySceneHushBg_Pal[] = INCBIN_U32("graphics/rayquaza_scene/hush_bg.gbapal.lz");

View File

@ -3888,12 +3888,14 @@ static void Task_LinkRetireStatusWithBattleTowerPartner(u8 taskId)
void Script_DoRayquazaScene(void) void Script_DoRayquazaScene(void)
{ {
if (gSpecialVar_0x8004 == 0) if (!gSpecialVar_0x8004)
{ {
// Groudon/Kyogre fight scene
DoRayquazaScene(0, TRUE, CB2_ReturnToFieldContinueScriptPlayMapMusic); DoRayquazaScene(0, TRUE, CB2_ReturnToFieldContinueScriptPlayMapMusic);
} }
else else
{ {
// Rayquaza arrives scene
DoRayquazaScene(1, FALSE, CB2_ReturnToFieldContinueScriptPlayMapMusic); DoRayquazaScene(1, FALSE, CB2_ReturnToFieldContinueScriptPlayMapMusic);
} }
} }

View File

@ -52,7 +52,7 @@ static u8 UpdateFastPaletteFade(void);
static u8 UpdateHardwarePaletteFade(void); static u8 UpdateHardwarePaletteFade(void);
static void UpdateBlendRegisters(void); static void UpdateBlendRegisters(void);
static bool8 IsSoftwarePaletteFadeFinishing(void); static bool8 IsSoftwarePaletteFadeFinishing(void);
static void sub_80A2D54(u8 taskId); static void Task_BlendPalettesGradually(u8 taskId);
// palette buffers require alignment with agbcc because // palette buffers require alignment with agbcc because
// unaligned word reads are issued in BlendPalette otherwise // unaligned word reads are issued in BlendPalette otherwise
@ -940,91 +940,105 @@ void TintPalette_CustomTone(u16 *palette, u16 count, u16 rTone, u16 gTone, u16 b
} }
} }
void sub_80A2C44(u32 a1, s8 a2, u8 a3, u8 a4, u16 a5, u8 a6, u8 a7) #define tCoeff data[0]
#define tCoeffTarget data[1]
#define tCoeffDelta data[2]
#define tDelay data[3]
#define tDelayTimer data[4]
#define tPalettes 5 // data[5] and data[6], set/get via Set/GetWordTaskArg
#define tColor data[7]
#define tId data[8]
// Blend the selected palettes in a series of steps toward or away from the color.
// Only used by the Groudon/Kyogre fight scene to flash the screen for lightning
// One call is used to fade the bg from white, while another fades the duo from black
void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTarget, u16 color, u8 priority, u8 id)
{ {
u8 taskId; u8 taskId;
taskId = CreateTask((void *)sub_80A2D54, a6); taskId = CreateTask((void *)Task_BlendPalettesGradually, priority);
gTasks[taskId].data[0] = a3; gTasks[taskId].tCoeff = coeff;
gTasks[taskId].data[1] = a4; gTasks[taskId].tCoeffTarget = coeffTarget;
if (a2 >= 0) if (delay >= 0)
{ {
gTasks[taskId].data[3] = a2; gTasks[taskId].tDelay = delay;
gTasks[taskId].data[2] = 1; gTasks[taskId].tCoeffDelta = 1;
} }
else else
{ {
gTasks[taskId].data[3] = 0; gTasks[taskId].tDelay = 0;
gTasks[taskId].data[2] = -a2 + 1; gTasks[taskId].tCoeffDelta = -delay + 1;
} }
if (a4 < a3) if (coeffTarget < coeff)
gTasks[taskId].data[2] *= -1; gTasks[taskId].tCoeffDelta *= -1;
SetWordTaskArg(taskId, 5, a1); SetWordTaskArg(taskId, tPalettes, selectedPalettes);
gTasks[taskId].data[7] = a5; gTasks[taskId].tColor = color;
gTasks[taskId].data[8] = a7; gTasks[taskId].tId = id;
gTasks[taskId].func(taskId); gTasks[taskId].func(taskId);
} }
bool32 sub_80A2CF8(u8 var) // Unused
static bool32 IsBlendPalettesGraduallyTaskActive(u8 id)
{ {
int i; int i;
for (i = 0; i < NUM_TASKS; i++) // check all the tasks. for (i = 0; i < NUM_TASKS; i++)
if ((gTasks[i].isActive == TRUE) && (gTasks[i].func == sub_80A2D54) && (gTasks[i].data[8] == var)) if ((gTasks[i].isActive == TRUE)
&& (gTasks[i].func == Task_BlendPalettesGradually)
&& (gTasks[i].tId == id))
return TRUE; return TRUE;
return FALSE; return FALSE;
} }
void sub_80A2D34(void) // Unused
static void DestroyBlendPalettesGraduallyTask(void)
{ {
u8 taskId; u8 taskId;
while (1) while (1)
{ {
taskId = FindTaskIdByFunc(sub_80A2D54); taskId = FindTaskIdByFunc(Task_BlendPalettesGradually);
if (taskId == 0xFF) if (taskId == 0xFF)
break; break;
DestroyTask(taskId); DestroyTask(taskId);
} }
} }
void sub_80A2D54(u8 taskId) static void Task_BlendPalettesGradually(u8 taskId)
{ {
u32 wordVar; u32 palettes;
s16 *data; s16 *data;
s16 temp; s16 target;
data = gTasks[taskId].data; data = gTasks[taskId].data;
wordVar = GetWordTaskArg(taskId, 5); palettes = GetWordTaskArg(taskId, tPalettes);
if (++data[4] > data[3]) if (++tDelayTimer > tDelay)
{ {
data[4] = 0; tDelayTimer = 0;
BlendPalettes(wordVar, data[0], data[7]); BlendPalettes(palettes, tCoeff, tColor);
temp = data[1]; target = tCoeffTarget;
if (data[0] == temp) if (tCoeff == target)
{ {
DestroyTask(taskId); DestroyTask(taskId);
} }
else else
{ {
data[0] += data[2]; tCoeff += tCoeffDelta;
if (data[2] >= 0) if (tCoeffDelta >= 0)
{ {
if (data[0] < temp) if (tCoeff < target)
{
return; return;
}
} }
else if (data[0] > temp) else if (tCoeff > target)
{ {
return; return;
} }
data[0] = temp; tCoeff = target;
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,6 @@
#include "trainer_card.h" #include "trainer_card.h"
#include "window.h" #include "window.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "rom_8011DC0.h"
#include "union_room.h" #include "union_room.h"
#include "constants/rgb.h" #include "constants/rgb.h"

View File

@ -200,7 +200,7 @@ u8 GetTaskCount(void)
void SetWordTaskArg(u8 taskId, u8 dataElem, u32 value) void SetWordTaskArg(u8 taskId, u8 dataElem, u32 value)
{ {
if (dataElem <= 14) if (dataElem < NUM_TASK_DATA - 1)
{ {
gTasks[taskId].data[dataElem] = value; gTasks[taskId].data[dataElem] = value;
gTasks[taskId].data[dataElem + 1] = value >> 16; gTasks[taskId].data[dataElem + 1] = value >> 16;
@ -209,7 +209,7 @@ void SetWordTaskArg(u8 taskId, u8 dataElem, u32 value)
u32 GetWordTaskArg(u8 taskId, u8 dataElem) u32 GetWordTaskArg(u8 taskId, u8 dataElem)
{ {
if (dataElem <= 14) if (dataElem < NUM_TASK_DATA - 1)
return (u16)gTasks[taskId].data[dataElem] | (gTasks[taskId].data[dataElem + 1] << 16); return (u16)gTasks[taskId].data[dataElem] | (gTasks[taskId].data[dataElem + 1] << 16);
else else
return 0; return 0;

View File

@ -30,7 +30,6 @@
#include "pokemon_summary_screen.h" #include "pokemon_summary_screen.h"
#include "pokemon_storage_system.h" #include "pokemon_storage_system.h"
#include "random.h" #include "random.h"
#include "rom_8011DC0.h"
#include "save.h" #include "save.h"
#include "script.h" #include "script.h"
#include "sound.h" #include "sound.h"