From 38d4fc9c17467bfbb206116e4bef4648cedfe3d4 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 27 Aug 2020 15:36:48 -0400 Subject: [PATCH] Clean up rayquaza scene documentation --- graphics/rayquaza_scene/scene_1/kyogre.png | Bin 1110 -> 1076 bytes .../{kyogre_fin.png => kyogre_dorsal_fin.png} | Bin ...e_shoulder.png => kyogre_pectoral_fin.png} | Bin .../scene_4/{rayquaza2.bin => orbs.bin} | Bin graphics/rayquaza_scene/scene_5/bg.bin | Bin 2048 -> 2048 bytes graphics/rayquaza_scene/scene_5/light.bin | Bin 0 -> 2048 bytes .../scene_5/{bg.png => light.png} | Bin graphics/rayquaza_scene/scene_5/ring.bin | Bin 2048 -> 256 bytes graphics/rayquaza_scene/scene_5/ring_map.bin | Bin 256 -> 0 bytes include/graphics.h | 46 +-- src/data/graphics/rayquaza_scene.h | 46 +-- src/palette.c | 14 +- src/rayquaza_scene.c | 304 +++++++++--------- 13 files changed, 213 insertions(+), 197 deletions(-) rename graphics/rayquaza_scene/scene_1/{kyogre_fin.png => kyogre_dorsal_fin.png} (100%) rename graphics/rayquaza_scene/scene_1/{kyogre_shoulder.png => kyogre_pectoral_fin.png} (100%) rename graphics/rayquaza_scene/scene_4/{rayquaza2.bin => orbs.bin} (100%) create mode 100644 graphics/rayquaza_scene/scene_5/light.bin rename graphics/rayquaza_scene/scene_5/{bg.png => light.png} (100%) delete mode 100644 graphics/rayquaza_scene/scene_5/ring_map.bin diff --git a/graphics/rayquaza_scene/scene_1/kyogre.png b/graphics/rayquaza_scene/scene_1/kyogre.png index 0f2e27e4e2b54e5a426a908a7f76fbd549e3be5e..7ed02a134b0706101e018d003e9b3c28a9f2f877 100644 GIT binary patch delta 1029 zcmV+g1p52d2($-r$<}RF&aBPf1Ye*BR)>fPtC2Y+z;e~ZuhYV9(31)Soc7hwuRXB zK$g8JPJF=m79bA@G2xsSK7a}cRtfw;%()qhDEz>Xne?VKBIEU=M zk9_cMIIQm;IiTjN?^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zZGJpY2Ox@cNFwm;wd_N)K^ diff --git a/graphics/rayquaza_scene/scene_1/kyogre_fin.png b/graphics/rayquaza_scene/scene_1/kyogre_dorsal_fin.png similarity index 100% rename from graphics/rayquaza_scene/scene_1/kyogre_fin.png rename to graphics/rayquaza_scene/scene_1/kyogre_dorsal_fin.png diff --git a/graphics/rayquaza_scene/scene_1/kyogre_shoulder.png b/graphics/rayquaza_scene/scene_1/kyogre_pectoral_fin.png similarity index 100% rename from graphics/rayquaza_scene/scene_1/kyogre_shoulder.png rename to graphics/rayquaza_scene/scene_1/kyogre_pectoral_fin.png diff --git a/graphics/rayquaza_scene/scene_4/rayquaza2.bin b/graphics/rayquaza_scene/scene_4/orbs.bin similarity index 100% rename from graphics/rayquaza_scene/scene_4/rayquaza2.bin rename to graphics/rayquaza_scene/scene_4/orbs.bin diff --git a/graphics/rayquaza_scene/scene_5/bg.bin b/graphics/rayquaza_scene/scene_5/bg.bin index b9e86b907b59f562150a17617d4e033e47d60d3c..22f5530bae167a761cc878e892d2f9b02f7745e9 100644 GIT binary patch literal 2048 zcmeIuAqs#{7zANo(_|7BOg59rWHFgc-v2T(SD5zT=gSjz+t9i;#$)*xkN%BE|HPxe nfYl&Ak#+L#3MiW>}X!zbjpZ@j@XPxR>0*~+i4 zfrc7sywi^vF=Rl0%TF}bi(d7%)4%b`3sWXr{#`T8wa{{>U$S7%jCY&=+rP(t_xl9? GcLE>xH6nWe diff --git a/graphics/rayquaza_scene/scene_5/light.bin b/graphics/rayquaza_scene/scene_5/light.bin new file mode 100644 index 0000000000000000000000000000000000000000..b9e86b907b59f562150a17617d4e033e47d60d3c GIT binary patch literal 2048 zcmeIySx*8n7=_`3yvT&b2pUkrGGWmu5J3Y<5CUk}0%~OW|35_r4URIyy^*gsz39{B zw5dm)Ki#yc19^pfI+S0AyfYl&Ak#+L#3MiW>}X!zbjpZ@j@XPxR>0*~+i4 zfrc7sywi^vF=Rl0%TF}bi(d7%)4%b`3sWXr{#`T8wa{{>U$S7%jCY&=+rP(t_xl9? GcLE>xH6nWe literal 0 HcmV?d00001 diff --git a/graphics/rayquaza_scene/scene_5/bg.png b/graphics/rayquaza_scene/scene_5/light.png similarity index 100% rename from graphics/rayquaza_scene/scene_5/bg.png rename to graphics/rayquaza_scene/scene_5/light.png diff --git a/graphics/rayquaza_scene/scene_5/ring.bin b/graphics/rayquaza_scene/scene_5/ring.bin index 22f5530bae167a761cc878e892d2f9b02f7745e9..812fda11de5320a4e91d9531a964ac96506c0a34 100644 GIT binary patch literal 256 zcmZQzpaNiIVrF4wgB!%o0b+7;!34M=3?3Mt7sB9!@ueUPX&7Gy!r+JT#l%4@2}u~A PK|oMQSVR=grGx> 8], 1); StartSpriteAnim(&gSprites[data[0] & 0xFF], 2); @@ -1594,8 +1598,8 @@ static void LoadDuoFightSceneGfx(void) LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_GroudonShoulder); LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_GroudonClaw); LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_Kyogre); - LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_KyogreShoulder); - LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_KyogreFin); + LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_KyogrePectoralFin); + LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_KyogreDorsalFin); LoadCompressedSpritePalette(&sSpritePal_DuoFight_Groudon); LoadCompressedSpritePalette(&sSpritePal_DuoFight_Kyogre); } @@ -1608,7 +1612,7 @@ static void Task_DuoFightAnim(u8 taskId) LoadDuoFightSceneGfx(); CpuFastFill16(0, gScanlineEffectRegBuffers, sizeof(gScanlineEffectRegBuffers)); ScanlineEffect_SetParams(sScanlineParams_DuoFight_Clouds); - tCounter = 0; + tTimer = 0; tHelperTaskId = CreateTask(Task_DuoFight_AnimateClouds, 0); if (sRayScene->animId == RAY_ANIM_DUO_FIGHT_PRE) { @@ -1695,22 +1699,22 @@ static void Task_HandleDuoFight(u8 taskId) DuoFight_AnimateRain(); if (!gPaletteFade.active) { - s16 counter = tCounter; - if (counter == 32 || counter == 112) + s16 frame = tTimer; + if (frame == 32 || frame == 112) { DuoFight_Lightning1(); } - else if (counter == 216) + else if (frame == 216) { DuoFight_Lightning2(); } - else if (counter == 220) + else if (frame == 220) { DuoFight_LightningLong(); } else { - switch (counter) + switch (frame) { case 412: DuoFightEnd(taskId, 2); @@ -1726,7 +1730,7 @@ static void Task_HandleDuoFight(u8 taskId) } } - tCounter++; + tTimer++; } } @@ -1771,10 +1775,10 @@ static void DuoFight_PanOffScene(u8 taskId) if (GetBgY(1) == 0 || bgY > 0x8000) ChangeBgY(1, 0x400, 2); - if (tCounter != 16) + if (tTimer != 16) { - tCounter++; - SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16 - tCounter, tCounter)); + tTimer++; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16 - tTimer, tTimer)); } } @@ -1797,7 +1801,7 @@ static void Task_DuoFightEnd(u8 taskId) ScanlineEffect_Stop(); ResetSpriteData(); FreeAllSpritePalettes(); - tCounter = 0; + tTimer = 0; gTasks[taskId].func = Task_SetNextAnim; } } @@ -1883,8 +1887,8 @@ static u8 DuoFight_CreateKyogreSprites(void) data[2] |= CreateSprite(&sSpriteTemplate_DuoFight_Kyogre, 94, 128, 2); data[3] = CreateSprite(&sSpriteTemplate_DuoFight_Kyogre, 126, 128, 2) << 8; data[3] |= CreateSprite(&sSpriteTemplate_DuoFight_Kyogre, 174, 128, 0); - data[4] = CreateSprite(&sSpriteTemplate_DuoFight_KyogreShoulder, 198, 132, 0) << 8; - data[4] |= CreateSprite(&sSpriteTemplate_DuoFight_KyogreFin, 190, 120, 1); + data[4] = CreateSprite(&sSpriteTemplate_DuoFight_KyogrePectoralFin, 198, 132, 0) << 8; + data[4] |= CreateSprite(&sSpriteTemplate_DuoFight_KyogreDorsalFin, 190, 120, 1); StartSpriteAnim(&gSprites[data[0] >> 8], 1); StartSpriteAnim(&gSprites[data[0] & 0xFF], 2); @@ -1978,7 +1982,7 @@ static void DuoFight_SlideKyogreDown(struct Sprite *sprite) } } -#undef tCounter +#undef tTimer #undef tHelperTaskId #undef tGroudonSpriteId #undef tKyogreSpriteId @@ -1987,6 +1991,9 @@ static void DuoFight_SlideKyogreDown(struct Sprite *sprite) #undef sGroudonShoulderSpriteId #undef sGroudonClawSpriteId + +// RAY_ANIM_TAKES_FLIGHT + #define tState data[0] #define tTimer data[1] #define tScale data[2] @@ -2194,6 +2201,9 @@ static void SpriteCB_TakesFlight_Smoke(struct Sprite *sprite) #undef sSmokeId #undef sTimer + +// RAY_ANIM_DESCENDS + static void InitDescendsSceneBgs(void) { ResetVramOamAndBgCntRegs(); @@ -2441,6 +2451,9 @@ static void SpriteCB_Descends_Rayquaza(struct Sprite *sprite) #undef sXMovePeriod #undef sYMovePeriod + +// RAY_ANIM_CHARGES + static void InitChargesSceneBgs(void) { ResetVramOamAndBgCntRegs(); @@ -2471,7 +2484,7 @@ static void LoadChargesSceneGfx(void) DecompressAndCopyTileDataToVram(3, gRaySceneCharges_Bg_Gfx, 0, 0, 0); while (FreeTempTileDataBuffersIfPossible()) ; - LZDecompressWram(gRaySceneCharges_Rayquaza2_Tilemap, sRayScene->tilemapBuffers[0]); + LZDecompressWram(gRaySceneCharges_Orbs_Tilemap, sRayScene->tilemapBuffers[0]); LZDecompressWram(gRaySceneCharges_Rayquaza_Tilemap, sRayScene->tilemapBuffers[1]); LZDecompressWram(gRaySceneCharges_Streaks_Tilemap, sRayScene->tilemapBuffers[2]); LZDecompressWram(gRaySceneCharges_Bg_Tilemap, sRayScene->tilemapBuffers[3]); @@ -2627,6 +2640,9 @@ static void Task_RayChargesEnd(u8 taskId) #undef tRayquazaTaskId + +// RAY_ANIM_CHASES_AWAY + static void InitChasesAwaySceneBgs(void) { ResetVramOamAndBgCntRegs(); @@ -2650,12 +2666,12 @@ static void LoadChasesAwaySceneGfx(void) { ResetTempTileDataBuffers(); DecompressAndCopyTileDataToVram(2, gRaySceneChasesAway_Ring_Gfx, 0, 0, 0); - DecompressAndCopyTileDataToVram(0, gRaySceneChasesAway_Bg_Gfx, 0, 0, 0); + DecompressAndCopyTileDataToVram(0, gRaySceneChasesAway_Light_Gfx, 0, 0, 0); while (FreeTempTileDataBuffersIfPossible()) ; - LZDecompressWram(gRaySceneChasesAway_Ring_Tilemap, sRayScene->tilemapBuffers[1]); - LZDecompressWram(gRaySceneChasesAway_Bg_Tilemap, sRayScene->tilemapBuffers[0]); - LZDecompressWram(gRaySceneChasesAway_Ring_Map, sRayScene->tilemapBuffers[2]); + LZDecompressWram(gRaySceneChasesAway_Bg_Tilemap, sRayScene->tilemapBuffers[1]); + LZDecompressWram(gRaySceneChasesAway_Light_Tilemap, sRayScene->tilemapBuffers[0]); + LZDecompressWram(gRaySceneChasesAway_Ring_Tilemap, sRayScene->tilemapBuffers[2]); LoadCompressedPalette(gRaySceneChasesAway_Bg_Pal, 0, 0x60); LoadCompressedSpriteSheet(&sSpriteSheet_ChasesAway_Groudon); LoadCompressedSpriteSheet(&sSpriteSheet_ChasesAway_GroudonTail);