Finish color_fading.c, add to linker

This commit is contained in:
YohannDR 2023-03-06 15:47:32 +01:00
parent a97e1dfe0e
commit dd76041740
34 changed files with 11452 additions and 13217 deletions

View File

@ -110,8 +110,8 @@ lbl_08002abe:
lbl_08002ac4: .4byte 0x00000009
lbl_08002ac8: .4byte 0x0808f254
thumb_func_start sub_08002acc
sub_08002acc: @ 0x08002acc
thumb_func_start FadeAllSounds
FadeAllSounds: @ 0x08002acc
push {r4, r5, lr}
adds r4, r0, #0
lsls r4, r4, #0x10
@ -1980,8 +1980,8 @@ lbl_0800386c: .4byte 0x0808f254
lbl_08003870: .4byte 0x0808f2c0
lbl_08003874: .4byte 0x03001d00
thumb_func_start check_play_new_music_track
check_play_new_music_track: @ 0x08003878
thumb_func_start CheckPlayTransitionMusicTrack
CheckPlayTransitionMusicTrack: @ 0x08003878
push {r4, r5, lr}
ldr r4, lbl_08003898 @ =0x03001d00
adds r0, r4, #0
@ -2155,8 +2155,8 @@ lbl_080039c2:
bx r1
.align 2, 0
thumb_func_start sub_080039c8
sub_080039c8: @ 0x080039c8
thumb_func_start unk_39c8
unk_39c8: @ 0x080039c8
push {r4, lr}
ldr r0, lbl_080039ec @ =0x03001d00
adds r0, #0x21
@ -2385,8 +2385,8 @@ lbl_08003b72:
.align 2, 0
lbl_08003b78: .4byte 0x0808f254
thumb_func_start sub_08003b7c
sub_08003b7c: @ 0x08003b7c
thumb_func_start FadeCurrentInsertMusicQueueCurrent
FadeCurrentInsertMusicQueueCurrent: @ 0x08003b7c
push {r4, r5, r6, r7, lr}
lsls r0, r0, #0x10
lsrs r5, r0, #0x10

View File

@ -3168,7 +3168,7 @@ lbl_08019c74:
cmp r0, #1
bne lbl_08019c92
movs r0, #6
bl start_effect_for_cutscene
bl StartEffectForCutscene
b lbl_08019c9e
lbl_08019c92:
cmp r0, #0

View File

@ -1822,7 +1822,7 @@ lbl_08039734:
ldr r0, [r0]
str r0, [r1, #8]
movs r0, #4
bl start_effect_for_cutscene
bl StartEffectForCutscene
lbl_0803975e:
add sp, #0xc
pop {r4}

View File

@ -730,7 +730,7 @@ lbl_0804b1dc:
b lbl_0804b33e
lbl_0804b1e2:
movs r0, #8
bl start_effect_for_cutscene
bl StartEffectForCutscene
b lbl_0804b33e
lbl_0804b1ea:
adds r2, r3, #0
@ -900,7 +900,7 @@ lbl_0804b31c:
movs r0, #0x28
strb r0, [r1]
movs r0, #1
bl start_effect_for_cutscene
bl StartEffectForCutscene
lbl_0804b33e:
ldr r5, lbl_0804b384 @ =0x03000738
adds r4, r5, #0

View File

@ -1546,7 +1546,7 @@ lbl_08055f64: .4byte 0x03000006
unk_55f68: @ 0x08055f68
push {lr}
bl update_animated_palette_after_transition_or_reload
bl transfer_faded_palette_on_transition
bl ColorFadingTransferPaletteOnTransition
bl check_play_loading_jingle
pop {r0}
bx r0
@ -2295,7 +2295,7 @@ lbl_080565d8:
adds r3, #1
movs r0, #1
adds r1, r3, #0
bl rle_decompress
bl RoomRLEDecompress
b lbl_08056648
.align 2, 0
lbl_08056604: .4byte 0x0875fac4
@ -2334,7 +2334,7 @@ lbl_08056648:
adds r3, #1
movs r0, #1
adds r1, r3, #0
bl rle_decompress
bl RoomRLEDecompress
ldr r3, [sp, #0x10]
ldr r2, lbl_080566b8 @ =0x0202d800
str r2, [r4, #8]
@ -2346,7 +2346,7 @@ lbl_08056648:
adds r3, #1
movs r0, #1
adds r1, r3, #0
bl rle_decompress
bl RoomRLEDecompress
ldr r0, lbl_080566bc @ =0x030000bc
ldrb r1, [r0, #3]
movs r0, #0x10
@ -2364,7 +2364,7 @@ lbl_08056648:
adds r3, #1
movs r0, #1
adds r1, r3, #0
bl rle_decompress
bl RoomRLEDecompress
lbl_080566a4:
add sp, #0x40
pop {r4}
@ -2470,7 +2470,7 @@ lbl_08056762:
strb r2, [r0]
bl sub_080749e4
lbl_08056774:
bl bg30_fs_related
bl unk_5c158
ldr r0, lbl_08056974 @ =0x03000bf0
movs r3, #0
ldrsb r3, [r0, r3]
@ -3146,8 +3146,8 @@ lbl_08056d02:
.align 2, 0
lbl_08056d14: .4byte 0x0202a800
thumb_func_start rle_decompress
rle_decompress: @ 0x08056d18
thumb_func_start RoomRLEDecompress
RoomRLEDecompress: @ 0x08056d18
push {r4, r5, r6, lr}
sub sp, #4
adds r4, r1, #0
@ -3330,7 +3330,7 @@ lbl_08056e52:
ldrb r0, [r0]
cmp r0, #0
beq lbl_08056e68
bl apply_background_fading
bl ColorFadingApplyMonochrome
b lbl_08056e70
.align 2, 0
lbl_08056e60: .4byte 0x03000048
@ -3588,7 +3588,7 @@ lbl_08057042:
bl process_bomb_chains
bl sub_08060434
bl check_unlock_doors
bl sub_0805e760
bl ConnectionUpdateHatches
lbl_0805706c:
bl ProcessHaze
cmp r0, #0

File diff suppressed because it is too large Load Diff

10661
asm/disasm_0x0805cfe0.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -6401,7 +6401,7 @@ lbl_0806a260:
movs r1, #1
orrs r0, r1
strb r0, [r2, #3]
bl sub_08060d38
bl end_demo
ldr r1, lbl_0806a290 @ =0x03000bf0
movs r0, #9
b lbl_0806a2a6
@ -25653,8 +25653,8 @@ lbl_080737c0: .4byte 0x03000020
lbl_080737c4: .4byte 0x03000154
lbl_080737c8: .4byte 0x08411430
thumb_func_start sub_080737cc
sub_080737cc: @ 0x080737cc
thumb_func_start SramProcessEndingSave
SramProcessEndingSave: @ 0x080737cc
push {r4, r5, lr}
sub sp, #4
movs r5, #0

View File

@ -52,7 +52,7 @@ lbl_08077920:
ldr r0, lbl_08077958 @ =0x0194f780
bl sub_080027f8
movs r0, #0xa
bl sub_08002acc
bl FadeAllSounds
movs r0, #0xa
bl FadeMusic
ldr r0, lbl_0807795c @ =0x030013d2

View File

@ -66,7 +66,7 @@ lbl_080811d8:
movs r0, #1
strb r0, [r1]
movs r0, #0xa
bl sub_08002acc
bl FadeAllSounds
movs r0, #0xa
bl FadeMusic
b lbl_0808122a

View File

@ -821,7 +821,7 @@ Blob_908e0_2b0c93.bin;2229171;0x908e0;1
Blob_2ceaa8_2cfd9f.bin;4856;0x2ceaa8;1
Blob_2d5ba0_2d7ae7.bin;7988;0x2d5ba0;1
Blob_34099c_345868.bin;20172;0x34099c;1
Blob_345d00_360130.bin;107568;0x345d00;1
Blob_345ff8_360130.bin;106808;0x345ff8;1
Blob_3602e8_36bdac.bin;47812;0x3602e8;1
Blob_375cc4_386f60.bin;70300;0x375cc4;1
Blob_3f0390_411400.bin;135280;0x3f0390;1
@ -829,7 +829,7 @@ Blob_415460_446d68.bin;203016;0x415460;1
Blob_44f11c_45f45c.bin;66368;0x44f11c;1
Blob_479400_754bb4.bin;2996148;0x479400;1
Blob_754bd0_75e6a8.bin;39640;0x754bd0;1
Blob_75fae4_75fd88.bin;676;0x75fae4;1
Blob_75fae4_75fd78.bin;660;0x75fae4;1
Blob_75fdbc_75fde0.bin;36;0x75fdbc;1
Blob_75fdfc_75fe5c.bin;96;0x75fdfc;1
Blob_760090_760420.bin;912;0x760090;1

View File

@ -6,7 +6,7 @@
u8 ColorFadingUpdate(void);
u8 unk_5bd58(u8 param_1, u8 color);
u8 unk_5bdc8(u8 param_1, u8 color);
u8 unk_5bd7c(u8 param_1, u8 color);
u8 unk_5be7c(u8 param_1, u8 color);
u8 ColorFadingSubroutine_Empty(u8 param_1, u8 color);
void ColorFadingTransferPaletteOnTransition(void);
void StartEffectForCutscene(u8 request);

View File

@ -0,0 +1,33 @@
#define EFFECT_CUTSCENE_ESCAPING_CHOZODIA 1
#define EFFECT_CUTSCENE_ESCAPE_FAILED 2
#define EFFECT_CUTSCENE_EXITING_ZEBES 3
#define EFFECT_CUTSCENE_GETTING_FULLY_POWERED 4
#define EFFECT_CUTSCENE_RIDLEY_SPAWN 5
#define EFFECT_CUTSCENE_STATUE_OPENING 6
#define EFFECT_CUTSCENE_INTRO_TEXT 7
#define EFFECT_CUTSCENE_SAMUS_IN_BLUE_SHIP 8
#define COLOR_FADING_FLASH 1
#define COLOR_FADING_CANCEL 2
#define COLOR_FADING_WHITE 3
#define COLOR_FADING_DOOR_TRANSITION 4
#define COLOR_FADING_FLASH2 5
#define COLOR_FADING_NO_TRANSITION 6
#define COLOR_FADING_FLASH_NO_TRANSITION 7
#define COLOR_FADING_NO_TRANSITION_HUD_HIDE 8
#define COLOR_FADING_SLOW_WHITE 9
#define COLOR_FADING_SLOW_BLACK 10
#define COLOR_FADING_AFTER_ENTER_MOTHER_SHIP 11
#define COLOR_FADING_ESCAPE_FAILED 12
#define COLOR_FADING_DEMO_ENDING_AUTO 13
#define COLOR_FADING_DEMO_ENDING_WITH_INPUT 14
#define COLOR_FADING_CHOZODIA_ESCAPE 15
#define COLOR_FADING_TOURIAN_ESCAPE 16
#define COLOR_FADING_GETTING_FULLY_POWERED 17
#define COLOR_FADING_RIDLEY_SPAWN 18
#define COLOR_FADING_STATUE_CUTSCENE 19
#define COLOR_FADING_INTRO_TEXT 20
#define COLOR_FADING_LANDING_SHIP 21
#define COLOR_FADING_SAMUS_IN_BLUE_SHIP 22
#define COLOR_FADING_TO_WHITE 23
#define COLOR_FADING_TO_BLACK 24

View File

@ -39,4 +39,4 @@ extern const u8 sHatchRelated_345cee[4][2];
extern const u16 sMotherBrainGlassBreakingBaseTilemapValues[5];
#endif
#endif

View File

@ -3,6 +3,11 @@
#include "structs/color_effects.h"
// Temp
extern const u8 sDoorTransitionTilemap[184];
extern const struct ColorFadingData sColorFadingData[25];
extern const struct ColorFadingColorInfo sColorFadingColorInfo[5];
#endif /* COLOR_FADING_DATA_H */

View File

@ -6,6 +6,7 @@
#include "structs/connection.h"
#include "structs/projectile.h"
#include "structs/particle.h"
#include "structs/color_effects.h"
extern const ProjFunc_T sProcessProjectileFunctionPointers[16];
@ -19,6 +20,8 @@ extern const struct RoomEntryROM* const sAreaRoomEntryPointers[MAX_AMOUNT_OF_ARE
// 75fd88
extern const ColorFadingFunc_T sColorFadingSubroutinePointers[4];
/**
* @brief Haze data for each room effect
* 0 : Haze value

View File

@ -7,8 +7,8 @@
struct MusicTrackInfo {
u16 currentRoomTrack;
u8 pauseScreenFlag;
u8 takingNormalTransition;
i8 pauseScreenFlag;
i8 takingNormalTransition;
i8 unk;
};

View File

@ -21,7 +21,7 @@ struct ColorFading {
};
struct ColorFadingData {
u8 unk_0;
u8 isWhite;
ColorFadingUnkFunc_T unk_4;
u8 unk_8;
ColorFadingUnkFunc_T unk_C;
@ -31,8 +31,15 @@ struct ColorFadingData {
u8 unk_16;
};
struct ColorFadingColorInfo {
const u8* const colorArray;
u8 size;
};
// Globals
extern struct ColorFading gColorFading;
extern u16 gBg1CntDuringDoorTransition;
extern u16 gBg3CntDuringDoorTransition;
#endif

View File

@ -40,6 +40,8 @@ SECTIONS {
. = 0x0000000f; gWrittenToWINOUT_L = .;
. = 0x00000010; gWrittenTo0x05000000 = .;
. = 0x00000020; gLanguage = .;
. = 0x00000024; gGameCompletion = .;
. = 0x00000028; gCompletedGameFlagCopy = .;
. = 0x00000029; gMonochromeBgFading = .;
. = 0x0000002A; gWhichBGPositionIsWrittenToBG3OFS = .;
. = 0x0000002B; gSamusOnTopOfBackgrounds = .;
@ -69,6 +71,7 @@ SECTIONS {
. = 0x00000059; gMinimapX = .;
. = 0x0000005A; gMinimapY = .;
. = 0x00000063; gNumberOfItemsCollected = .;
. = 0x0000006b; gCurrentHazeValue = .;
. = 0x0000006C; gEffectYPosition = .;
. = 0x0000006E; gEffectYPositionOffset = .;
. = 0x00000071; gScreenShakeXOffset = .;
@ -156,6 +159,7 @@ SECTIONS {
. = 0x00000c0c; gCurrentMessage = .;
. = 0x00000c1c; gSramCorruptFlag = .;
. = 0x00000c1d; gIsLoadingFile = .;
. = 0x00000c21; gSramOperationStage = .;
. = 0x00000c70; gMainGameMode = .;
. = 0x00000c72; gGameModeSub1 = .;
. = 0x00000c74; gGameModeSub2 = .;
@ -239,6 +243,8 @@ SECTIONS {
. = 0x000054EC; gBG3Movement = .;
. = 0x000054F4; gBG0Movement = .;
. = 0x0000550C; gSamusDoorPositionOffset = .;
. = 0x00005510; gBg3CntDuringDoorTransition = .;
. = 0x00005512; gBg1CntDuringDoorTransition = .;
. = 0x00005515; gScreenYOffset = .;
. = 0x00005516; gScreenXOffset = .;
. = 0x00005518; gRainSoundEffect = .;
@ -252,6 +258,7 @@ SECTIONS {
. = 0x000056d4; gBldalphaData2 = .;
. = 0x000056dc; gBLDYData1 = .;
. = 0x000056e4; gBLDYData2 = .;
. = 0x000056f4; gAnimatedGraphicsEntry = .;
. = 0x00005700; gScrollCounter = .;
. = 0x00005704; gClipdataCodePointer = .;
. = 0x00005708; gCurrentRoomScrollDataPointer = .;
@ -395,6 +402,8 @@ SECTIONS {
asm/disasm_0x08055344.o(.text);
src/power_bomb_explosion.o(.text);
asm/disasm_0x0805745c.o(.text);
src/color_fading.o(.text);
asm/disasm_0x0805cfe0.o(.text);
src/cutscenes/kraid_rising.o(.text);
src/cutscenes/story_text_cutscene.o(.text);
asm/disasm_0x08063008.o(.text);
@ -516,6 +525,7 @@ SECTIONS {
src/data/empty_datatypes.o(.rodata);
src/data/clipdata_data.o(.rodata);
src/data/block_data.o(.rodata);
src/data/color_fading_data.o(.rodata);
/* 345d00-360130 */
src/data/hatch_data.o(.rodata);
/* 3602e8-36bdac */

View File

@ -5,14 +5,17 @@
#include "data/engine_pointers.h"
#include "data/color_fading_data.h"
#include "data/common_pals.h"
#include "constants/audio.h"
#include "constants/connection.h"
#include "constants/color_fading.h"
#include "constants/cutscene.h"
#include "constants/event.h"
#include "constants/game_state.h"
#include "constants/samus.h"
#include "structs/audio.h"
#include "structs/bg_clip.h"
#include "structs/color_effects.h"
#include "structs/cutscene.h"
@ -24,9 +27,48 @@
#include "structs/visual_effects.h"
#include "structs/room.h"
/**
* @brief 5bcb0 | a8 | Processes the current color fading effect, visually
*
* @return u8 bool, ended
*/
u8 ColorFadingUpdate(void)
{
u8 colorType;
i32 stage;
i32 color;
if (gColorFading.unk_5)
colorType = sColorFadingData[gColorFading.type].unk_10;
else
colorType = sColorFadingData[gColorFading.type].unk_8;
color = sColorFadingColorInfo[colorType].size;
if (gColorFading.timer == 0)
stage = 0;
else
{
if (gColorFading.timer == color)
stage = 2;
else if (gColorFading.timer > color)
stage = 3;
else
stage = 1;
}
if (stage < 2)
color = sColorFadingColorInfo[colorType].colorArray[gColorFading.timer];
else
color = 0;
colorType = sColorFadingData[gColorFading.type].unk_16;
if (sColorFadingSubroutinePointers[colorType](stage, color))
{
gColorFading.timer = 0;
return TRUE;
}
return FALSE;
}
/**
@ -87,7 +129,7 @@ u8 unk_5bdc8(u8 param_1, u8 color)
case 2:
if (gColorFading.unk_5)
{
if (sColorFadingData[gColorFading.type].unk_0)
if (sColorFadingData[gColorFading.type].isWhite)
{
write16(REG_BLDCNT, BLDCNT_BG0_FIRST_TARGET_PIXEL | BLDCNT_BG1_FIRST_TARGET_PIXEL | BLDCNT_BG2_FIRST_TARGET_PIXEL |
BLDCNT_BG3_FIRST_TARGET_PIXEL | BLDCNT_OBJ_FIRST_TARGET_PIXEL | BLDCNT_BACKDROP_FIRST_TARGET_PIXEL |
@ -123,7 +165,7 @@ u8 unk_5bdc8(u8 param_1, u8 color)
* @param color Color
* @return u8 bool, ended
*/
u8 unk_5bd7c(u8 param_1, u8 color)
u8 unk_5be7c(u8 param_1, u8 color)
{
switch (param_1)
{
@ -155,14 +197,98 @@ u8 ColorFadingSubroutine_Empty(u8 param_1, u8 color)
return TRUE;
}
/**
* @brief 5becc | 108 | Transfers the faded palette during a transition
*
*/
void ColorFadingTransferPaletteOnTransition(void)
{
u32 value;
i32 i;
i32 color;
gColorFading.timer = 0;
unk_5b24c();
if (gPauseScreenFlag == 0)
unk_5b304();
if (sColorFadingData[gColorFading.type].isWhite)
value = 0x7FFF;
else
value = 0;
color = value;
if (sColorFadingData[gColorFading.type].bgColorMask | sColorFadingData[gColorFading.type].objColorMask)
{
for (i = 0; i < 16; i++)
{
if ((sColorFadingData[gColorFading.type].bgColorMask >> i) & 1)
BitFill(3, color, PALRAM_BASE + i * 32, 32, 16);
if ((sColorFadingData[gColorFading.type].objColorMask >> i) & 1)
BitFill(3, color, PALRAM_BASE + PALRAM_SIZE / 2 + i * 32, 32, 16);
}
}
DMATransfer(3, PALRAM_BASE, EWRAM_BASE + 0x35000, PALRAM_SIZE / 2, 16);
DMATransfer(3, PALRAM_BASE + PALRAM_SIZE / 2, EWRAM_BASE + 0x35200, PALRAM_SIZE / 2, 16);
}
/**
* @brief 5bfd4 | a0 | Starts either a color fade or a background effect for a cutscene
*
* @param request Request
*/
void StartEffectForCutscene(u8 request)
{
switch (request)
{
case EFFECT_CUTSCENE_ESCAPING_CHOZODIA:
gDisableSoftreset = TRUE;
gSramOperationStage = 0;
unk_5b340();
ColorFadingStart(COLOR_FADING_CHOZODIA_ESCAPE);
gGameModeSub1 = 3;
break;
case EFFECT_CUTSCENE_ESCAPE_FAILED:
unk_5b340();
ColorFadingStart(COLOR_FADING_ESCAPE_FAILED);
gGameModeSub1 = 3;
break;
case EFFECT_CUTSCENE_EXITING_ZEBES:
start_special_background_effect(4);
break;
case EFFECT_CUTSCENE_GETTING_FULLY_POWERED:
unk_5b340();
ColorFadingStart(COLOR_FADING_GETTING_FULLY_POWERED);
gGameModeSub1 = 3;
break;
case EFFECT_CUTSCENE_RIDLEY_SPAWN:
unk_5b340();
ColorFadingStart(COLOR_FADING_RIDLEY_SPAWN);
gGameModeSub1 = 3;
break;
case EFFECT_CUTSCENE_STATUE_OPENING:
unk_5b340();
ColorFadingStart(COLOR_FADING_STATUE_CUTSCENE);
gGameModeSub1 = 3;
break;
case EFFECT_CUTSCENE_INTRO_TEXT:
start_special_background_effect(5);
break;
case EFFECT_CUTSCENE_SAMUS_IN_BLUE_SHIP:
unk_5b340();
ColorFadingStart(COLOR_FADING_SAMUS_IN_BLUE_SHIP);
gGameModeSub1 = 3;
break;
}
}
/**
@ -189,7 +315,7 @@ void ColorFadingHideScreenDuringLoad(void)
{
if (gGameModeSub3 == 0 || gPauseScreenFlag != 0 || gCurrentCutscene != 0 || gTourianEscapeCutsceneStage != 0)
{
if (sColorFadingData[gColorFading.type].unk_0)
if (sColorFadingData[gColorFading.type].isWhite)
{
write16(REG_BLDCNT, BLDCNT_BG0_FIRST_TARGET_PIXEL | BLDCNT_BG1_FIRST_TARGET_PIXEL | BLDCNT_BG2_FIRST_TARGET_PIXEL |
BLDCNT_BG3_FIRST_TARGET_PIXEL | BLDCNT_OBJ_FIRST_TARGET_PIXEL | BLDCNT_BACKDROP_FIRST_TARGET_PIXEL |
@ -206,7 +332,7 @@ void ColorFadingHideScreenDuringLoad(void)
}
else
{
if (sColorFadingData[gColorFading.type].unk_0)
if (sColorFadingData[gColorFading.type].isWhite)
{
write16(REG_BLDCNT, BLDCNT_BG0_FIRST_TARGET_PIXEL | BLDCNT_BG1_FIRST_TARGET_PIXEL | BLDCNT_BG2_FIRST_TARGET_PIXEL |
BLDCNT_BACKDROP_FIRST_TARGET_PIXEL | BLDCNT_BRIGHTNESS_INCREASE_EFFECT);
@ -234,14 +360,55 @@ void unk_5c158(void)
gWhichBGPositionIsWrittenToBG3OFS = 3;
}
/**
* @brief 5c190 | 90 | To document
*
*/
void unk_5c190(void)
{
gBackgroundPositions.doorTransition.y = gBackgroundPositions.bg[3].y;
gBackgroundPositions.doorTransition.x = gBackgroundPositions.bg[3].x;
DMATransfer(3, EWRAM_BASE + 0x7000, VRAM_BASE + 0x3000, 0x1000, 16);
write16(REG_BG0CNT, gIoRegistersBackup.unknown_12);
write16(REG_BG3CNT, gIoRegistersBackup.BG3CNT);
gDisableDrawingSprites = FALSE;
if (gHazeInfo.flag & 0x7F)
gHazeInfo.flag |= 0x80;
TransparencyUpdateBLDCNT(2, gIoRegistersBackup.BLDCNT_NonGameplay);
write16(REG_DISPCNT, gIoRegistersBackup.DISPCNT_NonGameplay);
if (gDoorUnlockTimer == 1)
ConnectionLockHatchesWithTimer();
}
/**
* @brief 5c220 | 5c | Starts a door transition fade | FIXME verify this function
*
*/
void ColorFadingStartDoorTransition(void)
{
gBackgroundPositions.doorTransition.y = gBackgroundPositions.bg[3].y;
gBackgroundPositions.doorTransition.x = gBackgroundPositions.bg[3].x;
unk_5b340();
BlockShiftNeverReformBlocks();
ConnectionUpdateHatches();
gWrittenToBLDALPHA_L = gIoRegistersBackup.BLDALPHA_NonGameplay_EVA;
gWrittenToBLDALPHA_H = gIoRegistersBackup.BLDALPHA_NonGameplay_EVB;
if (gMusicTrackInfo.takingNormalTransition)
{
unk_39c8();
gMusicTrackInfo.takingNormalTransition = FALSE;
}
gColorFading.unk_3 = 0;
}
/**
@ -269,14 +436,76 @@ void unk_5c27c(u8 delay)
}
}
/**
* @brief 5c2ec | c0 | To document
*
*/
void unk_5c2ec(void)
{
unk_5d09c();
write16(PALRAM_BASE, 0);
write16(REG_DISPCNT, read16(REG_DISPCNT) & ~(DCNT_BG0 | DCNT_BG1 | DCNT_BG2 | DCNT_BG3));
// FIXME RoomRLEDecompress(FALSE, sDoorTransitionTilemap, EWRAM_BASE + 0x7000);
RoomRLEDecompress(FALSE, 0x8364f80, EWRAM_BASE + 0x7000);
DMATransfer(3, EWRAM_BASE + 0x7000, VRAM_BASE + 0x3000, 0x1000, 16);
write16(REG_BG3CNT, 0x4604);
gBackgroundPositions.bg[3].y = BLOCK_SIZE;
gBackgroundPositions.doorTransition.y = BLOCK_SIZE;
write16(REG_BG3VOFS, BLOCK_SIZE);
write16(REG_DISPCNT, read16(REG_DISPCNT) | DCNT_BG3);
if (gUseMotherShipDoors == TRUE)
{
// FIXME DMATransfer(3, sDoorTransitionMotherShipPAL, PALRAM_BASE + 0x20, 16 * 2 * sizeof(u16), 16);
DMATransfer(3, 0x85e0040, PALRAM_BASE + 0x20, 16 * 2 * sizeof(u16), 16);
}
else
{
// FIXME DMATransfer(3, sDoorTransitionPAL, PALRAM_BASE + 0x20, 16 * 2 * sizeof(u16), 16);
DMATransfer(3, 0x85dfe40, PALRAM_BASE + 0x20, 16 * 2 * sizeof(u16), 16);
}
}
/**
* @brief 5c3ac | b4 `
*
* @return u32
*/
u32 unk_5c3ac(void)
{
gColorFading.unk_5 = FALSE;
if (sColorFadingData[gColorFading.type].unk_4 && sColorFadingData[gColorFading.type].unk_4())
{
switch (sColorFadingData[gColorFading.type].unk_16)
{
case 1:
if (gMusicTrackInfo.unk == 0)
CheckPlayTransitionMusicTrack();
break;
case 2:
if (gMusicTrackInfo.pauseScreenFlag)
update_music_after_unpause(); // Undefined
break;
}
gMusicTrackInfo.unk = 0;
gMusicTrackInfo.pauseScreenFlag = 0;
ColorFadingStart(2);
write16(REG_BLDY, gIoRegistersBackup.BLDY_NonGameplay);
TransparencyUpdateBLDCNT(3, gIoRegistersBackup.BLDCNT_NonGameplay);
gDisableDrawingSprites = FALSE;
gColorFading.stage = 0;
return TRUE;
}
return FALSE;
}
/**
@ -303,10 +532,119 @@ u32 ColorFadingProcess(void)
return TRUE;
}
/**
* @brief 5c4c0 | 268 | Door transition fade subroutine
*
* @return u8 bool, ended
*/
u8 ColorFading_DoorTransition(void)
{
i32 bldalphaH;
i32 bldalphaL;
u8 bgProp;
switch (gColorFading.stage)
{
case 0:
ColorFadingStartDoorTransition();
gColorFading.stage++;
break;
case 1:
if (ColorFadingUpdate())
{
gDisableDrawingSprites = TRUE;
gColorFading.stage++;
}
unk_5c27c(0);
break;
case 2:
unk_5d09c();
write16(PALRAM_BASE, 0);
if (gUseMotherShipDoors == TRUE)
{
// FIXME DMATransfer(3, sDoorTransitionMotherShipPAL, PALRAM_BASE + 0x20, 16 * 2 * sizeof(u16), 16);
DMATransfer(3, 0x85e0040, PALRAM_BASE + 0x20, 16 * 2 * sizeof(u16), 16);
}
else
{
// FIXME DMATransfer(3, sDoorTransitionPAL, PALRAM_BASE + 0x20, 16 * 2 * sizeof(u16), 16);
DMATransfer(3, 0x85dfe40, PALRAM_BASE + 0x20, 16 * 2 * sizeof(u16), 16);
}
write16(REG_DISPCNT, read16(REG_DISPCNT) & ~(DCNT_BG2 | DCNT_BG3 | DCNT_WIN1));
gSamusOnTopOfBackgrounds = FALSE;
gColorFading.stage++;
break;
case 3:
// FIXME RoomRLEDecompress(FALSE, sDoorTransitionTilemap, EWRAM_BASE + 0x7000);
RoomRLEDecompress(FALSE, 0x8364f80, EWRAM_BASE + 0x7000);
DMATransfer(3, EWRAM_BASE + 0x7000, VRAM_BASE + 0x3000, 0x1000, 16);
if (gDoorPositionStart.x != 0)
gBackgroundPositions.doorTransition.x = BLOCK_SIZE * 5 - QUARTER_BLOCK_SIZE;
else
gBackgroundPositions.doorTransition.x = BLOCK_SIZE * 9 - QUARTER_BLOCK_SIZE;
gBackgroundPositions.doorTransition.y = ((BLOCK_SIZE * 16 -
(gDoorPositionStart.y * BLOCK_SIZE - gBG1YPosition)) >> 2);
write16(REG_BG3HOFS, gBackgroundPositions.doorTransition.x);
write16(REG_BG3VOFS, gBackgroundPositions.doorTransition.y);
gWrittenToBLDCNT = 0x3F48;
bgProp = gCurrentRoomEntry.BG0Prop;
if (bgProp != 0x43 && bgProp != 0x44 && bgProp != 0x45)
{
gWrittenToBLDALPHA_H = 16;
gWrittenToBLDALPHA_L = 0;
}
gWrittenToBLDALPHA = gWrittenToBLDALPHA_H << 8 | gWrittenToBLDALPHA_L;
gBg3CntDuringDoorTransition = 0x4604;
gBg1CntDuringDoorTransition = read16(REG_BG1CNT) | 1;
gWrittenToDISPCNT = read16(REG_DISPCNT);
gWrittenToDISPCNT |= DCNT_BG3;
gWrittenToDISPCNT &= ~DCNT_BG0;
gColorFading.stage = 4;
gColorFading.unk_3 = 0;
break;
case 4:
if (gWrittenToBLDALPHA_H != 0 || gWrittenToBLDALPHA_L < 16)
{
bldalphaH = gWrittenToBLDALPHA_H - 2;
if (bldalphaH < 0)
bldalphaH = 0;
gWrittenToBLDALPHA_H = bldalphaH;
bldalphaL = gWrittenToBLDALPHA_L + 2;
if (bldalphaL > 16)
bldalphaL = 16;
gWrittenToBLDALPHA_L = bldalphaL;
gWrittenToBLDALPHA = bldalphaL | bldalphaH << 8;
}
else
{
write16(REG_DISPCNT, read16(REG_DISPCNT) & ~DCNT_BG1);
gColorFading.unk_3 = 0;
gColorFading.stage = 5;
}
break;
case 5:
gColorFading.stage = 0;
return TRUE;
}
return FALSE;
}
/**
@ -430,7 +768,7 @@ u8 ColorFading_BeforeDemoEnding(void)
{
case 0:
ColorFadingStartDoorTransition();
if (gColorFading.type == 0xE)
if (gColorFading.type == COLOR_FADING_DEMO_ENDING_WITH_INPUT)
gCurrentDemo.unk_3 = 1;
end_demo(); // Undefined
@ -734,7 +1072,7 @@ u8 ColorFading_BeforeLandingShip(void)
switch (gColorFading.stage)
{
case 0:
ColorFadingStartDoorTransition();
unk_5c190();
gColorFading.unk_6 = 0;
gColorFading.stage++;
break;

View File

@ -7,6 +7,7 @@
#include "data/hatch_data.h"
#include "constants/connection.h"
#include "constants/color_fading.h"
#include "constants/clipdata.h"
#include "constants/cutscene.h"
#include "constants/event.h"
@ -908,7 +909,7 @@ void ConnectionCheckPlayCutsceneDuringElevator(void)
{
gCurrentCutscene = CUTSCENE_MOTHER_BRAIN_CLOSE_UP;
ColorFadingStart(0x2);
ColorFadingStart(COLOR_FADING_CANCEL);
SoundFade(0x10E, 0xA);
FadeMusic(0xA);
}
@ -919,7 +920,7 @@ void ConnectionCheckPlayCutsceneDuringElevator(void)
{
gCurrentCutscene = CUTSCENE_RIDLEY_IN_SPACE;
ColorFadingStart(0x2);
ColorFadingStart(COLOR_FADING_CANCEL);
SoundFade(0x10E, 0xA);
FadeMusic(0xA);
}
@ -930,7 +931,7 @@ void ConnectionCheckPlayCutsceneDuringElevator(void)
{
gCurrentCutscene = CUTSCENE_RIDLEY_LANDING;
ColorFadingStart(0x2);
ColorFadingStart(COLOR_FADING_CANCEL);
SoundFade(0x10E, 0xA);
FadeMusic(0xA);
}
@ -941,7 +942,7 @@ void ConnectionCheckPlayCutsceneDuringElevator(void)
{
gCurrentCutscene = CUTSCENE_ENTER_TOURIAN;
ColorFadingStart(0x2);
ColorFadingStart(COLOR_FADING_CANCEL);
SoundFade(0x10E, 0xA);
FadeMusic(0xA);
}

View File

@ -671,5 +671,3 @@ const u8 sHatchRelated_345cee[4][2] = {
const u16 sMotherBrainGlassBreakingBaseTilemapValues[5] = {
0x170, 0x177, 0x1C0, 0x1C7, 0x210
};
const u8 sTempArray_345d00[0x1A430] = INCBIN_U8("data/Blob_345d00_360130.bin");

View File

@ -0,0 +1,306 @@
#include "data/color_fading_data.h"
#include "constants/color_fading.h"
#include "color_fading.h"
#include "macros.h"
const struct ColorFadingData sColorFadingData[25] = {
[0] = {
.isWhite = FALSE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = NULL,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 0
},
[COLOR_FADING_FLASH] = {
.isWhite = TRUE,
.unk_4 = ColorFading_UpdateDefault,
.unk_8 = 0,
.unk_C = ColorFading_Default,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_CANCEL] = {
.isWhite = FALSE,
.unk_4 = ColorFading_UpdateDefault,
.unk_8 = 0,
.unk_C = ColorFading_Default,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_WHITE] = {
.isWhite = TRUE,
.unk_4 = ColorFading_UpdateDoorTransition,
.unk_8 = 1,
.unk_C = ColorFading_DoorTransition,
.unk_10 = 1,
.bgColorMask = 0xFFFD,
.objColorMask = 0xFFC7,
.unk_16 = 1
},
[COLOR_FADING_DOOR_TRANSITION] = {
.isWhite = FALSE,
.unk_4 = ColorFading_UpdateDoorTransition,
.unk_8 = 1,
.unk_C = ColorFading_DoorTransition,
.unk_10 = 1,
.bgColorMask = 0xFFFD,
.objColorMask = 0xFFC7,
.unk_16 = 1
},
[COLOR_FADING_FLASH2] = {
.isWhite = TRUE,
.unk_4 = ColorFading_UpdateDefault,
.unk_8 = 0,
.unk_C = ColorFading_Default,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = 0xFFC7,
.unk_16 = 1
},
[COLOR_FADING_NO_TRANSITION] = {
.isWhite = FALSE,
.unk_4 = ColorFading_UpdateDefault,
.unk_8 = 0,
.unk_C = ColorFading_Default,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = 0xFFC7,
.unk_16 = 1
},
[COLOR_FADING_FLASH_NO_TRANSITION] = {
.isWhite = TRUE,
.unk_4 = ColorFading_UpdateDefault,
.unk_8 = 4,
.unk_C = ColorFading_Default,
.unk_10 = 4,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_NO_TRANSITION_HUD_HIDE] = {
.isWhite = FALSE,
.unk_4 = ColorFading_UpdateDefault,
.unk_8 = 4,
.unk_C = ColorFading_Default,
.unk_10 = 4,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_SLOW_WHITE] = {
.isWhite = TRUE,
.unk_4 = ColorFading_UpdateDefault,
.unk_8 = 3,
.unk_C = ColorFading_Default,
.unk_10 = 3,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_SLOW_BLACK] = {
.isWhite = FALSE,
.unk_4 = ColorFading_UpdateDefault,
.unk_8 = 3,
.unk_C = ColorFading_Default,
.unk_10 = 3,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_AFTER_ENTER_MOTHER_SHIP] = {
.isWhite = FALSE,
.unk_4 = ColorFading_UpdateDefault,
.unk_8 = 0,
.unk_C = ColorFading_Default,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 1
},
[COLOR_FADING_ESCAPE_FAILED] = {
.isWhite = TRUE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_EscapeFailed,
.unk_10 = 3,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_DEMO_ENDING_AUTO] = {
.isWhite = FALSE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_BeforeDemoEnding,
.unk_10 = 2,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_DEMO_ENDING_WITH_INPUT] = {
.isWhite = FALSE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_BeforeDemoEnding,
.unk_10 = 2,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_CHOZODIA_ESCAPE] = {
.isWhite = FALSE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_ChozodiaEscape,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_TOURIAN_ESCAPE] = {
.isWhite = TRUE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_TourianEscape,
.unk_10 = 4,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_GETTING_FULLY_POWERED] = {
.isWhite = TRUE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_GettingFullyPowered,
.unk_10 = 3,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_RIDLEY_SPAWN] = {
.isWhite = FALSE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_BeforeRidleySpawn,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_STATUE_CUTSCENE] = {
.isWhite = FALSE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_StatueOpening,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_INTRO_TEXT] = {
.isWhite = FALSE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_BeforeIntroText,
.unk_10 = 4,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_LANDING_SHIP] = {
.isWhite = FALSE,
.unk_4 = ColorFading_BeforeLandingShip,
.unk_8 = 0,
.unk_C = NULL,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_SAMUS_IN_BLUE_SHIP] = {
.isWhite = FALSE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = ColorFading_BeforeBlueShip,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = USHORT_MAX,
.unk_16 = 2
},
[COLOR_FADING_TO_WHITE] = {
.isWhite = TRUE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = NULL,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = 0xFFFC,
.unk_16 = 3
},
[COLOR_FADING_TO_BLACK] = {
.isWhite = FALSE,
.unk_4 = NULL,
.unk_8 = 0,
.unk_C = NULL,
.unk_10 = 0,
.bgColorMask = USHORT_MAX,
.objColorMask = 0xFFFC,
.unk_16 = 3
},
};
static const u8 sColorFading_345f58[8] = {
3, 7, 11, 15, 19, 23, 27, 32
};
static const u8 sColorFading_345f60[16] = {
2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32
};
static const u8 sColorFading_345f70[32] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
};
static const u8 sColorFading_345f90[60] = {
1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6,
6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 12,
12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 19, 20, 21,
22, 23, 24, 26, 28, 30, 32
};
static const u8 sColorFading_345fcc[1] = {
32
};
const struct ColorFadingColorInfo sColorFadingColorInfo[5] = {
[0] = {
.colorArray = sColorFading_345f58,
.size = ARRAY_SIZE(sColorFading_345f58)
},
[1] = {
.colorArray = sColorFading_345f60,
.size = ARRAY_SIZE(sColorFading_345f60)
},
[2] = {
.colorArray = sColorFading_345f70,
.size = ARRAY_SIZE(sColorFading_345f70)
},
[3] = {
.colorArray = sColorFading_345f90,
.size = ARRAY_SIZE(sColorFading_345f90)
},
[4] = {
.colorArray = sColorFading_345fcc,
.size = ARRAY_SIZE(sColorFading_345fcc)
}
};
const u8 sTempArray_345ff8[0x1a138] = INCBIN_U8("data/Blob_345ff8_360130.bin");

View File

@ -7,6 +7,7 @@
#include "particle.h"
#include "projectile.h"
#include "color_fading.h"
#include "constants/connection.h"
#include "constants/room.h"
@ -118,7 +119,14 @@ const struct RoomEntryROM* const sAreaRoomEntryPointers[MAX_AMOUNT_OF_AREAS - 1]
const u8* const sScrollPointer_Empty = sScroll_Empty;
const u8 sTempArray_75fae4[0x2A4] = INCBIN_U8("data/Blob_75fae4_75fd88.bin");
const u8 sTempArray_75fae4[0x294] = INCBIN_U8("data/Blob_75fae4_75fd78.bin");
const ColorFadingFunc_T sColorFadingSubroutinePointers[4] = {
ColorFadingSubroutine_Empty,
unk_5bd58,
unk_5bdc8,
unk_5be7c
};
/**
* @brief Haze data for each room effect

View File

@ -89,7 +89,7 @@ u32 InGameMainLoop(void)
case SUB_GAME_MODE_LOADING_ROOM:
IOWriteRegistersDuringTransition();
if (process_fading_effect())
if (ColorFadingProcess())
{
gGameModeSub1 = 0;
if (gPauseScreenFlag != PAUSE_SCREEN_NONE || gCurrentCutscene != 0 || gTourianEscapeCutsceneStage != 0)
@ -374,7 +374,7 @@ void InitAndLoadGenerics(void)
}
gWrittenToBLDY_NonGameplay = 0x10;
hide_screen_during_load(); // Undefined
ColorFadingHideScreenDuringLoad(); // Undefined
write16(REG_BLDY, gWrittenToBLDY_NonGameplay);
if (gPauseScreenFlag != PAUSE_SCREEN_NONE || gCurrentCutscene != 0)

View File

@ -7,6 +7,7 @@
#include "data/particle_data.h"
#include "data/visual_effects_data.h"
#include "constants/color_fading.h"
#include "constants/escape.h"
#include "constants/particle.h"
#include "constants/samus.h"
@ -1697,7 +1698,7 @@ void ParticleEscape(struct ParticleEffect* pParticle)
gPreventMovementTimer = 0x3E8;
pParticle->stage = 0x3;
pParticle->frameCounter = 0xFF;
start_effect_for_cutscene(0x2);
StartEffectForCutscene(EFFECT_CUTSCENE_ESCAPE_FAILED);
}
else if (gCurrentEscapeStatus == ESCAPE_STATUS_HAPPENNING && EscapeCheckHasEscaped())
{

View File

@ -723,7 +723,7 @@ void RoomUpdateGFXInfo(void)
gDisableDoorAndTanks |= 0x80;
if (gMonochromeBgFading != 0)
apply_background_fading(); // Undefined
ColorFadingApplyMonochrome();
else
{
MinimapUpdate();

View File

@ -8,8 +8,9 @@
#include "data/internal_save_file_data.h"
#include "data/block_data.h"
#include "constants/game_state.h"
#include "constants/color_fading.h"
#include "constants/connection.h"
#include "constants/game_state.h"
#include "constants/samus.h"
#include "structs/audio.h"
@ -2006,7 +2007,7 @@ void Sram_CheckLoadSaveFile(void)
// No save file, create one and setup data
Sram_InitSaveFile();
gColorFading.type = 0x15; // TODO enum
gColorFading.type = COLOR_FADING_LANDING_SHIP; // TODO enum
gEquipment.downloadedMapStatus = 0;
gCurrentArea = gStartingInfo.startingArea;

View File

@ -310,7 +310,7 @@ void EscapeShip(void)
SoundPlay(0x250);
}
else if (timer == 0xC)
start_effect_for_cutscene(0x8);
StartEffectForCutscene(EFFECT_CUTSCENE_SAMUS_IN_BLUE_SHIP);
}
else
{
@ -413,7 +413,7 @@ void EscapeShip(void)
if (gCurrentSprite.yPositionSpawn == 0x0)
{
gCurrentSprite.pose = ESCAPE_SHIP_POSE_ESCAPED;
start_effect_for_cutscene(0x1);
StartEffectForCutscene(EFFECT_CUTSCENE_ESCAPING_CHOZODIA);
}
break;

View File

@ -4,6 +4,7 @@
#include "data/sprites/gunship.h"
#include "constants/color_fading.h"
#include "constants/sprite.h"
#include "constants/sprite_util.h"
#include "constants/event.h"
@ -251,7 +252,7 @@ void GunshipLanding(void)
if (gCurrentSprite.timer == 0x1E)
{
// Start intro
start_effect_for_cutscene(0x7);
StartEffectForCutscene(EFFECT_CUTSCENE_INTRO_TEXT);
gCurrentSprite.status |= SPRITE_STATUS_MOSAIC;
}
}
@ -714,7 +715,7 @@ void GunshipFlying(void)
{
if (gCurrentSprite.timer == 0x32)
{
start_effect_for_cutscene(0x3);
StartEffectForCutscene(EFFECT_CUTSCENE_EXITING_ZEBES);
gCurrentSprite.status |= SPRITE_STATUS_MOSAIC;
}

View File

@ -6,6 +6,7 @@
#include "data/sprite_data.h"
#include "constants/audio.h"
#include "constants/color_fading.h"
#include "constants/clipdata.h"
#include "constants/event.h"
#include "constants/game_state.h"
@ -1528,7 +1529,7 @@ void KraidDying(void)
{
gCurrentSprite.workVariable2--;
if (gCurrentSprite.workVariable2 == 0x1)
start_effect_for_cutscene(0x6); // Statue opening
StartEffectForCutscene(EFFECT_CUTSCENE_STATUE_OPENING); // Statue opening
else if (gCurrentSprite.workVariable2 == 0x0)
SoundPlay(0x1D2);
}

View File

@ -6,6 +6,7 @@
#include "data/sprite_data.h"
#include "constants/audio.h"
#include "constants/color_fading.h"
#include "constants/clipdata.h"
#include "constants/event.h"
#include "constants/game_state.h"
@ -606,7 +607,7 @@ void RidleyCheckPlayCutscene(void)
gCurrentSprite.arrayOffset = 0x0;
gCurrentSprite.oamScaling = 0x12C;
start_effect_for_cutscene(0x5);
StartEffectForCutscene(EFFECT_CUTSCENE_RIDLEY_SPAWN);
}
}
}
@ -1748,7 +1749,7 @@ void RidleyDying(void)
gCurrentSprite.workVariable2--;
if (gCurrentSprite.workVariable2 == 0x1)
start_effect_for_cutscene(0x6);
StartEffectForCutscene(EFFECT_CUTSCENE_STATUE_OPENING);
else if (gCurrentSprite.workVariable2 == 0x0)
FadeMusic(0x96);
}

View File

@ -6,6 +6,7 @@
#include "data/generic_data.h"
#include "constants/audio.h"
#include "constants/color_fading.h"
#include "constants/clipdata.h"
#include "constants/event.h"
#include "constants/game_state.h"
@ -981,7 +982,7 @@ void RuinsTestDespawn(void)
EventFunction(EVENT_ACTION_SETTING, EVENT_FULLY_POWERED_SUIT_OBTAINED);
gInGameTimerAtBosses[2] = gInGameTimer;
// Start getting fully powered cutscene
start_effect_for_cutscene(0x4);
StartEffectForCutscene(EFFECT_CUTSCENE_GETTING_FULLY_POWERED);
}
}

View File

@ -615,6 +615,6 @@ void unk_55e60(void)
void unk_55f68(void)
{
update_animated_palette_after_transition_or_reload(); // Undefined
transfer_faded_palette_on_transition(); // Undefined
ColorFadingTransferPaletteOnTransition(); // Undefined
check_play_loading_jingle(); // Undefind
}