1515#include "constants/songs.h"
1616
1717#define INTRO_SPOTLIGHT_COUNT 2
18+
19+ #define EMERALD_START_X (DISPLAY_WIDTH / 2)
20+ #define EMERALD_START_Y -36
1821typedef struct IntroSprite {
1922 Sprite s ;
2023 u16 unk30 ;
@@ -229,6 +232,7 @@ void CreateIntroAnimation(void)
229232 SA2_LABEL (gUnknown_03005390 ) = 0 ;
230233 PAUSE_GRAPHICS_QUEUE ();
231234 sub_80535FC ();
235+
232236 UiGfxStackInit ();
233237 gDispCnt = (DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP );
234238 gBgCntRegs [0 ] = 0x9D86 ;
@@ -252,14 +256,14 @@ void CreateIntroAnimation(void)
252256 s -> graphics .dest = OBJ_VRAM0 + 0x20 ;
253257 s -> graphics .anim = SA1_ANIM_INTRO_EMERALD ;
254258 s -> variant = 0 ;
255- s -> x = 0x78 ;
256- s -> y = 0xFFDC ;
257- s -> oamFlags = 0xC0 ;
259+ s -> x = EMERALD_START_X ;
260+ s -> y = EMERALD_START_Y ;
261+ s -> oamFlags = SPRITE_OAM_ORDER ( 3 ) ;
258262 s -> graphics .size = 0 ;
259263 s -> animCursor = 0 ;
260264 s -> qAnimDelay = 0 ;
261265 s -> prevVariant = -1 ;
262- s -> animSpeed = 0x10 ;
266+ s -> animSpeed = SPRITE_ANIM_SPEED ( 1.0 ) ;
263267 s -> palId = 0 ;
264268 s -> hitboxes [0 ].index = -1 ;
265269 s -> frameFlags = 0x1000 ;
@@ -278,10 +282,10 @@ void CreateIntroAnimation(void)
278282 introSpr -> qUnk40 = Q (2.25 );
279283 chunkOffset = (i * (4 * TILE_SIZE_4BPP ));
280284 s -> graphics .dest = (chunkOffset + OBJ_VRAM0 + (31 * TILE_SIZE_4BPP ));
281- s -> graphics .anim = 0x307 ;
285+ s -> graphics .anim = SA1_ANIM_SUPER_SONIC_SPARKLE ;
282286 s -> variant = 0 ;
283- s -> x = ( Div (SIN (i << 6 ), 650 ) + 120 );
284- s -> y = -36 ;
287+ s -> x = EMERALD_START_X + Div (SIN (i << 6 ), 650 );
288+ s -> y = EMERALD_START_Y ;
285289 s -> oamFlags = 0 ;
286290 s -> graphics .size = 0 ;
287291 s -> animCursor = 0 ;
@@ -1655,7 +1659,7 @@ void sub_80656A4(void)
16551659 Sprite * s = & introSpr -> s ;
16561660 s16 temp_r0 = ++ introSpr -> unk30 ;
16571661
1658- if ((introSpr -> unk30 ) == 0x161 ) {
1662+ if ((introSpr -> unk30 ) == 353 ) {
16591663 s -> frameFlags = 0 ;
16601664 }
16611665
@@ -1681,7 +1685,7 @@ void sub_806571C(void)
16811685 Sprite * s = & introSpr -> s ;
16821686 s16 temp_r0 = ++ introSpr -> unk30 ;
16831687
1684- if ((introSpr -> unk30 ) == 0x161 ) {
1688+ if ((introSpr -> unk30 ) == 353 ) {
16851689 s -> frameFlags = 0 ;
16861690 }
16871691
@@ -1738,17 +1742,18 @@ void Task_IntroChaosEmeraldUpdate()
17381742 Sprite * s = & introSpr -> s ;
17391743 s16 unk30 = introSpr -> unk30 ;
17401744
1741- if ((u16 )( unk30 - 90 ) > 0x8f ) {
1745+ if ((unk30 < 90 ) || ( unk30 > 233 ) ) {
17421746 introSpr -> qUnk3C += introSpr -> qUnk40 ;
17431747 }
1748+
17441749 if (unk30 < 90 ) {
17451750 introSpr -> qUnk40 -= Q (6. / 256. );
17461751 if (introSpr -> qUnk40 < Q (0 )) {
17471752 introSpr -> qUnk40 = Q (0 );
17481753 }
17491754 }
17501755
1751- if (unk30 == 0xE9 ) {
1756+ if (unk30 == 233 ) {
17521757 introSpr -> qUnk40 = Q (1.25 );
17531758 }
17541759
0 commit comments