From 0b1841948932937d421daacc6d422a450396a8c8 Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Mon, 8 Nov 2021 21:15:37 -0500 Subject: [PATCH] Scene cleanups (#1002) * remove fake match * u32 segment -> void* and add symbols to sEntranceCutsceneTable * rename some symbols * remove if1 * add the last missing symbol * add symbols for almost all extrence textures * finish adding the symbols * Remove comment * spelling fix * Fig's and Dragorn's fixes * add symbols to unkknown array * format * romans fixes --- assets/xml/scenes/dungeons/Bmori1.xml | 2 + assets/xml/scenes/dungeons/MIZUsin.xml | 2 + assets/xml/scenes/dungeons/bdan.xml | 1 + assets/xml/scenes/dungeons/ddan.xml | 13 ++ assets/xml/scenes/dungeons/ganon_tou.xml | 1 + assets/xml/scenes/dungeons/gerudoway.xml | 2 + assets/xml/scenes/dungeons/ice_doukutu.xml | 3 +- assets/xml/scenes/dungeons/jyasinboss.xml | 3 +- assets/xml/scenes/dungeons/jyasinzou.xml | 2 + assets/xml/scenes/dungeons/men.xml | 2 + assets/xml/scenes/dungeons/ydan.xml | 4 + assets/xml/scenes/indoors/miharigoya.xml | 7 +- assets/xml/scenes/indoors/tokinoma.xml | 5 +- assets/xml/scenes/misc/hakaana_ouke.xml | 3 +- assets/xml/scenes/overworld/souko.xml | 2 + assets/xml/scenes/overworld/spot00.xml | 8 +- assets/xml/scenes/overworld/spot01.xml | 3 + assets/xml/scenes/overworld/spot02.xml | 1 + assets/xml/scenes/overworld/spot04.xml | 2 +- assets/xml/scenes/overworld/spot06.xml | 3 +- assets/xml/scenes/overworld/spot07.xml | 3 + assets/xml/scenes/overworld/spot08.xml | 1 + assets/xml/scenes/overworld/spot09.xml | 2 +- assets/xml/scenes/overworld/spot11.xml | 1 + assets/xml/scenes/overworld/spot12.xml | 6 +- assets/xml/scenes/overworld/spot15.xml | 1 + assets/xml/scenes/overworld/spot16.xml | 3 +- assets/xml/scenes/overworld/spot17.xml | 3 +- assets/xml/scenes/overworld/spot18.xml | 4 +- assets/xml/scenes/overworld/spot20.xml | 3 + include/functions.h | 2 +- include/variables.h | 5 - include/z64.h | 2 +- include/z64animation.h | 2 +- include/z64cutscene.h | 2 +- include/z64scene.h | 30 ++-- src/code/z_demo.c | 99 +++++++++---- src/code/z_scene_table.c | 134 +++++++++++++----- src/overlays/actors/ovl_En_Ik/z_en_ik.c | 2 +- .../ovl_En_Okarina_Tag/z_en_okarina_tag.c | 2 +- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 2 +- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 6 +- .../actors/ovl_Item_Ocarina/z_item_ocarina.c | 2 +- src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c | 2 +- 44 files changed, 281 insertions(+), 107 deletions(-) diff --git a/assets/xml/scenes/dungeons/Bmori1.xml b/assets/xml/scenes/dungeons/Bmori1.xml index 6a740e488d..70aac34646 100644 --- a/assets/xml/scenes/dungeons/Bmori1.xml +++ b/assets/xml/scenes/dungeons/Bmori1.xml @@ -1,5 +1,7 @@ + + diff --git a/assets/xml/scenes/dungeons/MIZUsin.xml b/assets/xml/scenes/dungeons/MIZUsin.xml index 46893e1d05..bade619fe4 100644 --- a/assets/xml/scenes/dungeons/MIZUsin.xml +++ b/assets/xml/scenes/dungeons/MIZUsin.xml @@ -1,5 +1,7 @@ + + diff --git a/assets/xml/scenes/dungeons/bdan.xml b/assets/xml/scenes/dungeons/bdan.xml index 65560803d8..0aee687a80 100644 --- a/assets/xml/scenes/dungeons/bdan.xml +++ b/assets/xml/scenes/dungeons/bdan.xml @@ -1,5 +1,6 @@ + diff --git a/assets/xml/scenes/dungeons/ddan.xml b/assets/xml/scenes/dungeons/ddan.xml index 5f8568a591..b8946653bc 100644 --- a/assets/xml/scenes/dungeons/ddan.xml +++ b/assets/xml/scenes/dungeons/ddan.xml @@ -1,5 +1,18 @@ + + + + + + + + + + + + + diff --git a/assets/xml/scenes/dungeons/ganon_tou.xml b/assets/xml/scenes/dungeons/ganon_tou.xml index 8fff6ae0ba..6642a89020 100644 --- a/assets/xml/scenes/dungeons/ganon_tou.xml +++ b/assets/xml/scenes/dungeons/ganon_tou.xml @@ -1,6 +1,7 @@ + diff --git a/assets/xml/scenes/dungeons/gerudoway.xml b/assets/xml/scenes/dungeons/gerudoway.xml index e198c805d2..5c5fab0462 100644 --- a/assets/xml/scenes/dungeons/gerudoway.xml +++ b/assets/xml/scenes/dungeons/gerudoway.xml @@ -1,5 +1,7 @@ + + diff --git a/assets/xml/scenes/dungeons/ice_doukutu.xml b/assets/xml/scenes/dungeons/ice_doukutu.xml index d64e41876e..1512b7d885 100644 --- a/assets/xml/scenes/dungeons/ice_doukutu.xml +++ b/assets/xml/scenes/dungeons/ice_doukutu.xml @@ -1,7 +1,8 @@ - + + diff --git a/assets/xml/scenes/dungeons/jyasinboss.xml b/assets/xml/scenes/dungeons/jyasinboss.xml index 02f0e9aa4a..0f81c26fbc 100644 --- a/assets/xml/scenes/dungeons/jyasinboss.xml +++ b/assets/xml/scenes/dungeons/jyasinboss.xml @@ -1,6 +1,7 @@ - + + diff --git a/assets/xml/scenes/dungeons/jyasinzou.xml b/assets/xml/scenes/dungeons/jyasinzou.xml index b25a7fc058..38ba81faba 100644 --- a/assets/xml/scenes/dungeons/jyasinzou.xml +++ b/assets/xml/scenes/dungeons/jyasinzou.xml @@ -1,5 +1,7 @@ + + diff --git a/assets/xml/scenes/dungeons/men.xml b/assets/xml/scenes/dungeons/men.xml index 197d543c52..e87b44d8ea 100644 --- a/assets/xml/scenes/dungeons/men.xml +++ b/assets/xml/scenes/dungeons/men.xml @@ -1,5 +1,7 @@ + + diff --git a/assets/xml/scenes/dungeons/ydan.xml b/assets/xml/scenes/dungeons/ydan.xml index 9a1fc95cb4..c0a47d6dae 100644 --- a/assets/xml/scenes/dungeons/ydan.xml +++ b/assets/xml/scenes/dungeons/ydan.xml @@ -1,5 +1,9 @@ + + + + diff --git a/assets/xml/scenes/indoors/miharigoya.xml b/assets/xml/scenes/indoors/miharigoya.xml index 8dca8d7194..99b3a8d295 100644 --- a/assets/xml/scenes/indoors/miharigoya.xml +++ b/assets/xml/scenes/indoors/miharigoya.xml @@ -1,8 +1,9 @@ - - - + + + + diff --git a/assets/xml/scenes/indoors/tokinoma.xml b/assets/xml/scenes/indoors/tokinoma.xml index 62f0150d5a..e43f0a9339 100644 --- a/assets/xml/scenes/indoors/tokinoma.xml +++ b/assets/xml/scenes/indoors/tokinoma.xml @@ -1,7 +1,8 @@ - - + + + diff --git a/assets/xml/scenes/misc/hakaana_ouke.xml b/assets/xml/scenes/misc/hakaana_ouke.xml index b79e813227..1d31d66a4f 100644 --- a/assets/xml/scenes/misc/hakaana_ouke.xml +++ b/assets/xml/scenes/misc/hakaana_ouke.xml @@ -1,6 +1,7 @@ - + + diff --git a/assets/xml/scenes/overworld/souko.xml b/assets/xml/scenes/overworld/souko.xml index 7241589ce5..508beb85d7 100644 --- a/assets/xml/scenes/overworld/souko.xml +++ b/assets/xml/scenes/overworld/souko.xml @@ -1,5 +1,7 @@ + + diff --git a/assets/xml/scenes/overworld/spot00.xml b/assets/xml/scenes/overworld/spot00.xml index bdd749e941..7cf39bef1c 100644 --- a/assets/xml/scenes/overworld/spot00.xml +++ b/assets/xml/scenes/overworld/spot00.xml @@ -1,6 +1,12 @@ - + + + + + + + diff --git a/assets/xml/scenes/overworld/spot01.xml b/assets/xml/scenes/overworld/spot01.xml index aa4168cb03..cf1e29577c 100644 --- a/assets/xml/scenes/overworld/spot01.xml +++ b/assets/xml/scenes/overworld/spot01.xml @@ -1,5 +1,8 @@ + + + diff --git a/assets/xml/scenes/overworld/spot02.xml b/assets/xml/scenes/overworld/spot02.xml index 2d998ff100..3d1049b4ee 100644 --- a/assets/xml/scenes/overworld/spot02.xml +++ b/assets/xml/scenes/overworld/spot02.xml @@ -6,6 +6,7 @@ + diff --git a/assets/xml/scenes/overworld/spot04.xml b/assets/xml/scenes/overworld/spot04.xml index ff0df63c66..450c1973a1 100644 --- a/assets/xml/scenes/overworld/spot04.xml +++ b/assets/xml/scenes/overworld/spot04.xml @@ -3,7 +3,7 @@ - + diff --git a/assets/xml/scenes/overworld/spot06.xml b/assets/xml/scenes/overworld/spot06.xml index 9be9524863..9af8c1b637 100644 --- a/assets/xml/scenes/overworld/spot06.xml +++ b/assets/xml/scenes/overworld/spot06.xml @@ -1,8 +1,9 @@ - + + diff --git a/assets/xml/scenes/overworld/spot07.xml b/assets/xml/scenes/overworld/spot07.xml index fd7e3f9df2..4a1ac4aa76 100644 --- a/assets/xml/scenes/overworld/spot07.xml +++ b/assets/xml/scenes/overworld/spot07.xml @@ -1,5 +1,8 @@ + + + diff --git a/assets/xml/scenes/overworld/spot08.xml b/assets/xml/scenes/overworld/spot08.xml index 3e079f7aae..136727c6d3 100644 --- a/assets/xml/scenes/overworld/spot08.xml +++ b/assets/xml/scenes/overworld/spot08.xml @@ -1,5 +1,6 @@ + diff --git a/assets/xml/scenes/overworld/spot09.xml b/assets/xml/scenes/overworld/spot09.xml index c592258b85..038ad1961f 100644 --- a/assets/xml/scenes/overworld/spot09.xml +++ b/assets/xml/scenes/overworld/spot09.xml @@ -2,7 +2,7 @@ - + diff --git a/assets/xml/scenes/overworld/spot11.xml b/assets/xml/scenes/overworld/spot11.xml index 72b7dccf00..99bf24c829 100644 --- a/assets/xml/scenes/overworld/spot11.xml +++ b/assets/xml/scenes/overworld/spot11.xml @@ -1,5 +1,6 @@ + diff --git a/assets/xml/scenes/overworld/spot12.xml b/assets/xml/scenes/overworld/spot12.xml index cd5df69b2a..77b0cfb076 100644 --- a/assets/xml/scenes/overworld/spot12.xml +++ b/assets/xml/scenes/overworld/spot12.xml @@ -1,7 +1,9 @@ - - + + + + diff --git a/assets/xml/scenes/overworld/spot15.xml b/assets/xml/scenes/overworld/spot15.xml index 67e550a93b..f17e76d55a 100644 --- a/assets/xml/scenes/overworld/spot15.xml +++ b/assets/xml/scenes/overworld/spot15.xml @@ -1,5 +1,6 @@ + diff --git a/assets/xml/scenes/overworld/spot16.xml b/assets/xml/scenes/overworld/spot16.xml index 1b5bc1c4f0..fa80ec4e18 100644 --- a/assets/xml/scenes/overworld/spot16.xml +++ b/assets/xml/scenes/overworld/spot16.xml @@ -1,6 +1,7 @@ - + + diff --git a/assets/xml/scenes/overworld/spot17.xml b/assets/xml/scenes/overworld/spot17.xml index e9a103f3ca..3aecc15a60 100644 --- a/assets/xml/scenes/overworld/spot17.xml +++ b/assets/xml/scenes/overworld/spot17.xml @@ -1,6 +1,7 @@ - + + diff --git a/assets/xml/scenes/overworld/spot18.xml b/assets/xml/scenes/overworld/spot18.xml index 5fc03e551e..513e67cbc9 100644 --- a/assets/xml/scenes/overworld/spot18.xml +++ b/assets/xml/scenes/overworld/spot18.xml @@ -3,7 +3,9 @@ - + + + diff --git a/assets/xml/scenes/overworld/spot20.xml b/assets/xml/scenes/overworld/spot20.xml index d409d8e261..d6c1be794f 100644 --- a/assets/xml/scenes/overworld/spot20.xml +++ b/assets/xml/scenes/overworld/spot20.xml @@ -1,5 +1,8 @@ + + + diff --git a/include/functions.h b/include/functions.h index f38472f96c..39156fcd95 100644 --- a/include/functions.h +++ b/include/functions.h @@ -831,7 +831,7 @@ void func_80064558(GlobalContext* globalCtx, CutsceneContext* csCtx); void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx); void Cutscene_HandleEntranceTriggers(GlobalContext* globalCtx); void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx); -void Cutscene_SetSegment(GlobalContext* globalCtx, u32 segment); +void Cutscene_SetSegment(GlobalContext* globalCtx, void* segment); void* MemCopy(void* dest, void* src, s32 size); void GetItem_Draw(GlobalContext* globalCtx, s16 drawId); void func_8006BA00(GlobalContext* globalCtx); diff --git a/include/variables.h b/include/variables.h index bd1ac24f51..4b2ae7ce0f 100644 --- a/include/variables.h +++ b/include/variables.h @@ -2927,15 +2927,10 @@ extern u64 gJpegUCodeData[]; //extern ? D_8015E648; extern SaveContext gSaveContext; // 0x8015E660 extern GameInfo* gGameInfo; // 0x8015FA90 -//extern ? D_8015FA98; -//extern ? D_8015FA9B; -//extern ? D_8015FC18; extern u16 D_8015FCC0; extern u16 D_8015FCC2; extern u16 D_8015FCC4; -//extern ? D_8015FCC6; extern u8 D_8015FCC8; -//extern ? D_8015FCCA; extern u8 gCustomLensFlareOn; extern Vec3f gCustomLensFlarePos; extern s16 D_8015FD06; diff --git a/include/z64.h b/include/z64.h index 0f3b514cc7..c684d2177e 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1553,7 +1553,7 @@ typedef struct { typedef struct { /* 0x00 */ u32 segments[NUM_SEGMENTS]; - /* 0x40 */ u32 dlStack[18]; + /* 0x40 */ Gfx* dlStack[18]; /* 0x88 */ s32 dlDepth; /* 0x8C */ u32 dlCnt; /* 0x90 */ u32 vtxCnt; diff --git a/include/z64animation.h b/include/z64animation.h index ee705413b3..cbdf931bf5 100755 --- a/include/z64animation.h +++ b/include/z64animation.h @@ -87,7 +87,7 @@ typedef struct { typedef struct { /* 0x00 */ AnimationHeaderCommon common; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } LinkAnimationHeader; // size = 0x8 typedef struct { diff --git a/include/z64cutscene.h b/include/z64cutscene.h index ff51103838..faebefe8ee 100644 --- a/include/z64cutscene.h +++ b/include/z64cutscene.h @@ -7,7 +7,7 @@ typedef struct { /* 0x00 */ u16 entrance; // entrance index upon which the cutscene should trigger /* 0x02 */ u8 ageRestriction; // 0 for adult only, 1 for child only, 2 for both ages /* 0x03 */ u8 flag; // eventChkInf flag bound to the entrance cutscene - /* 0x04 */ u32 segAddr; // segment offset location of the cutscene + /* 0x04 */ void* segAddr; // segment offset location of the cutscene } EntranceCutscene; // size = 0x8 typedef struct { diff --git a/include/z64scene.h b/include/z64scene.h index 6fd0e9edf8..f6cbb5ebef 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -26,31 +26,31 @@ typedef struct { typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 data1; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdSpawnList; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 num; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdActorList; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 data1; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdUnused02; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 data1; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdColHeader; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 num; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdRoomList; typedef struct { @@ -66,7 +66,7 @@ typedef struct { typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 data1; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdEntranceList; typedef struct { @@ -84,37 +84,37 @@ typedef struct { typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 data1; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdMesh; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 num; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdObjectList; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 num; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdLightList; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 data1; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdPathList; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 num; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdTransiActorList; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 num; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdLightSettingList; typedef struct { @@ -152,7 +152,7 @@ typedef struct { typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 data1; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdExitList; typedef struct { @@ -173,13 +173,13 @@ typedef struct { typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 data1; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdCutsceneData; typedef struct { /* 0x00 */ u8 code; /* 0x01 */ u8 data1; - /* 0x04 */ u32 segment; + /* 0x04 */ void* segment; } SCmdAltHeaders; typedef struct { diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 3738566a1f..da566eb6bd 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -1,6 +1,33 @@ #include "global.h" #include "z64camera.h" + +#include "scenes/indoors/tokinoma/tokinoma_scene.h" +#include "scenes/overworld/spot00/spot00_scene.h" +#include "scenes/overworld/spot01/spot01_scene.h" +#include "scenes/overworld/spot02/spot02_scene.h" +#include "scenes/overworld/spot04/spot04_scene.h" +#include "scenes/overworld/spot05/spot05_scene.h" +#include "scenes/overworld/spot06/spot06_scene.h" +#include "scenes/overworld/spot07/spot07_scene.h" +#include "scenes/overworld/spot08/spot08_scene.h" +#include "scenes/overworld/spot09/spot09_scene.h" +#include "scenes/overworld/spot11/spot11_scene.h" +#include "scenes/overworld/spot12/spot12_scene.h" +#include "scenes/overworld/spot15/spot15_scene.h" +#include "scenes/overworld/spot16/spot16_scene.h" +#include "scenes/overworld/spot17/spot17_scene.h" +#include "scenes/overworld/spot18/spot18_scene.h" +#include "scenes/overworld/spot20/spot20_scene.h" + +#include "scenes/dungeons/bdan/bdan_scene.h" +#include "scenes/dungeons/ddan/ddan_scene.h" +#include "scenes/dungeons/ydan/ydan_scene.h" #include "scenes/dungeons/ganontika/ganontika_scene.h" +#include "scenes/dungeons/ganon_tou/ganon_tou_scene.h" +#include "scenes/dungeons/jyasinboss/jyasinboss_scene.h" +#include "scenes/dungeons/ice_doukutu/ice_doukutu_scene.h" + +#include "scenes/misc/hakaana_ouke/hakaana_ouke_scene.h" u16 D_8011E1C0 = 0; u16 D_8011E1C4 = 0; @@ -24,31 +51,54 @@ CutsceneStateHandler sCsStateHandlers2[] = { u8 sTitleCsState = 0; -// TODO: use symbols for these cutscene locations once scenes and rooms are in C EntranceCutscene sEntranceCutsceneTable[] = { - { 0x0185, 2, 0xA0, 0x02013AA0 }, { 0x013D, 2, 0xA1, 0x02007EA0 }, { 0x00DB, 2, 0xA3, 0x0200A540 }, - { 0x0108, 2, 0xA4, 0x02003D70 }, { 0x0138, 1, 0xA5, 0x02003F40 }, { 0x014D, 2, 0xA6, 0x02008400 }, - { 0x0053, 2, 0xA7, 0x0200CE00 }, { 0x0000, 2, 0xA8, 0x0200B650 }, { 0x028A, 0, 0x18, 0x0200F9E0 }, - { 0x0292, 0, 0x18, 0x0200FF00 }, { 0x028E, 0, 0x18, 0x02010550 }, { 0x0476, 0, 0x18, 0x02010B30 }, - { 0x050F, 1, 0xA9, 0x0200BB80 }, { 0x0102, 2, 0xB1, 0x02007A30 }, { 0x0117, 2, 0xB2, 0x020031E0 }, - { 0x0129, 2, 0xB3, 0x02006490 }, { 0x0157, 2, 0xB4, 0x02005BD0 }, { 0x0028, 2, 0xB5, 0x02015600 }, - { 0x00E4, 2, 0xB6, 0x020070C0 }, { 0x0225, 2, 0xB7, 0x02004A80 }, { 0x0123, 2, 0xB8, 0x02007990 }, - { 0x0147, 2, 0xB9, 0x020076D0 }, { 0x0138, 0, 0xBA, 0x02004280 }, { 0x0574, 2, 0x5A, 0x020028E0 }, - { 0x0538, 2, 0xBB, gForestBarrierCs }, { 0x053C, 2, 0xBC, gWaterBarrierCs }, { 0x0540, 2, 0xBD, gShadowBarrierCs }, - { 0x0544, 2, 0xBE, gFireBarrierCs }, { 0x0548, 2, 0xBF, gLightBarrierCs }, { 0x054C, 2, 0xAD, gSpiritBarrierCs }, - { 0x008D, 0, 0xC0, 0x02002BB0 }, { 0x03B4, 0, 0xC7, 0x020055C0 }, { 0x0246, 2, 0xB9, 0x020076D0 }, - { 0x05E8, 2, 0xC6, 0x0200C9D0 }, + { 0x0185, 2, 0xA0, gHyruleFieldIntroCs }, + { 0x013D, 2, 0xA1, gDMTIntroCs }, + { 0x00DB, 2, 0xA3, gKakarikoVillageIntroCs }, + { 0x0108, 2, 0xA4, gZorasDomainIntroCs }, + { 0x0138, 1, 0xA5, gHyruleCastleIntroCs }, + { 0x014D, 2, 0xA6, gGoronCityIntroCs }, + { 0x0053, 2, 0xA7, gTempleOfTimeIntroCs }, + { 0x0000, 2, 0xA8, gDekuTreeIntroCs }, + { 0x028A, 0, 0x18, gHyruleFieldSouthEponaJumpCs }, + { 0x0292, 0, 0x18, gHyruleFieldEastEponaJumpCs }, + { 0x028E, 0, 0x18, gHyruleFieldWestEponaJumpCs }, + { 0x0476, 0, 0x18, gHyruleFieldGateEponaJumpCs }, + { 0x050F, 1, 0xA9, gHyruleFieldGetOoTCs }, + { 0x0102, 2, 0xB1, gLakeHyliaIntroCs }, + { 0x0117, 2, 0xB2, gGerudoValleyIntroCs }, + { 0x0129, 2, 0xB3, gGerudoFortressIntroCs }, + { 0x0157, 2, 0xB4, gLonLonRanchIntroCs }, + { 0x0028, 2, 0xB5, gJabuJabuIntroCs }, + { 0x00E4, 2, 0xB6, gGraveyardIntroCs }, + { 0x0225, 2, 0xB7, gZorasFountainIntroCs }, + { 0x0123, 2, 0xB8, gDesertColossusIntroCs }, + { 0x0147, 2, 0xB9, gDeathMountainCraterIntroCs }, + { 0x0138, 0, 0xBA, gGanonsCastleIntroCs }, + { 0x0574, 2, 0x5A, gSunSongGraveSunSongTeachPart2Cs }, + { 0x0538, 2, 0xBB, gForestBarrierCs }, + { 0x053C, 2, 0xBC, gWaterBarrierCs }, + { 0x0540, 2, 0xBD, gShadowBarrierCs }, + { 0x0544, 2, 0xBE, gFireBarrierCs }, + { 0x0548, 2, 0xBF, gLightBarrierCs }, + { 0x054C, 2, 0xAD, gSpiritBarrierCs }, + { 0x008D, 0, 0xC0, gSpiritBossNabooruKnuckleIntroCs }, + { 0x03B4, 0, 0xC7, gGerudoFortressFirstCaptureCs }, + { 0x0246, 2, 0xB9, gDeathMountainCraterIntroCs }, + { 0x05E8, 2, 0xC6, gKokiriForestDekuSproutCs }, }; // Unused, seems to be an early list of dungeon entrance cutscene locations -u32 D_8011E304[] = { 0x0200B650, 0x02015600, 0x02014F80, 0x02003F80, 0x02000330, gTowerBarrierCs }; +void* D_8011E304[] = { + gDekuTreeIntroCs, gJabuJabuIntroCs, gDcOpeningCs, gMinuetCs, gIceCavernSerenadeCs, gTowerBarrierCs, +}; u16 D_8015FCC0; u16 D_8015FCC2; u16 D_8015FCC4; s16 D_8015FCC6; u8 D_8015FCC8; -s16 D_8015FCCA; +s16 sQuakeIndex; u16 D_8015FCCC; // only written to, never read char D_8015FCD0[20]; // unreferenced u8 D_8015FCE4; // only written to, never read @@ -162,9 +212,7 @@ void func_800647C0(GlobalContext* globalCtx, CutsceneContext* csCtx) { void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd) { Player* player = GET_PLAYER(globalCtx); f32 temp; - u8 sp3F; - - sp3F = 0; + u8 sp3F = 0; if ((csCtx->frames < cmd->startFrame) || ((csCtx->frames >= cmd->endFrame) && (cmd->endFrame != cmd->startFrame))) { return; @@ -188,7 +236,6 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* if (sp3F != 0) { func_800F6D58(0xF, 0, 0); Environment_AddLightningBolts(globalCtx, 3); - if (1) {} gLightningStrike.state = LIGHTNING_STRIKE_START; } break; @@ -266,15 +313,15 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* break; case 16: if (sp3F != 0) { - D_8015FCCA = Quake_Add(GET_ACTIVE_CAM(globalCtx), 6); - Quake_SetSpeed(D_8015FCCA, 0x7FFF); - Quake_SetQuakeValues(D_8015FCCA, 4, 0, 1000, 0); - Quake_SetCountdown(D_8015FCCA, 800); + sQuakeIndex = Quake_Add(GET_ACTIVE_CAM(globalCtx), 6); + Quake_SetSpeed(sQuakeIndex, 0x7FFF); + Quake_SetQuakeValues(sQuakeIndex, 4, 0, 1000, 0); + Quake_SetCountdown(sQuakeIndex, 800); } break; case 17: if (sp3F != 0) { - Quake_RemoveFromIdx(D_8015FCCA); + Quake_RemoveFromIdx(sQuakeIndex); } break; case 18: @@ -2049,10 +2096,10 @@ void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) { } } -void Cutscene_SetSegment(GlobalContext* globalCtx, u32 segment) { +void Cutscene_SetSegment(GlobalContext* globalCtx, void* segment) { if (SEGMENT_NUMBER(segment) != 0) { globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(segment); } else { - globalCtx->csCtx.segment = (void*)segment; + globalCtx->csCtx.segment = segment; } } diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index 44bb75e2b4..120142fd74 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -1,7 +1,25 @@ #include "global.h" +#include "scenes/overworld/spot00/spot00_scene.h" #include "scenes/overworld/spot00/spot00_room_0.h" +#include "scenes/overworld/spot01/spot01_scene.h" +#include "scenes/overworld/spot07/spot07_scene.h" +#include "scenes/overworld/spot12/spot12_scene.h" +#include "scenes/overworld/spot16/spot16_scene.h" #include "scenes/overworld/spot16/spot16_room_0.h" +#include "scenes/overworld/spot18/spot18_scene.h" +#include "scenes/overworld/spot20/spot20_scene.h" +#include "scenes/overworld/souko/souko_scene.h" + +#include "scenes/dungeons/men/men_scene.h" +#include "scenes/dungeons/ddan/ddan_scene.h" +#include "scenes/dungeons/ydan/ydan_scene.h" +#include "scenes/dungeons/Bmori1/Bmori1_scene.h" +#include "scenes/dungeons/MIZUsin/MIZUsin_scene.h" +#include "scenes/dungeons/gerudoway/gerudoway_scene.h" +#include "scenes/dungeons/jyasinzou/jyasinzou_scene.h" +#include "scenes/indoors/miharigoya/miharigoya_scene.h" +#include "scenes/dungeons/ice_doukutu/ice_doukutu_scene.h" #define ENTRANCE(scene, spawn, continueBgm, displayTitleCard, fadeIn, fadeOut) \ { \ @@ -956,7 +974,10 @@ void func_80099550(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4735); } -u32 D_8012A2F8[] = { 0x0200BA18, 0x0200CA18 }; +void* D_8012A2F8[] = { + gYdanTex_00BA18, + gYdanTex_00CA18, +}; // Scene Draw Config 19 void func_800995DC(GlobalContext* globalCtx) { @@ -995,8 +1016,14 @@ void func_80099760(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4859); } -u32 D_8012A300[] = { 0x02012378, 0x02013378 }; -u32 D_8012A308[] = { 0x02011F78, 0x02014778, 0x02014378, 0x02013F78, 0x02014B78, 0x02013B78, 0x02012F78, 0x02012B78 }; +void* gDCEntranceTextures[] = { + gDCDayEntranceTex, + gDCNightEntranceTex, +}; +void* sDCLavaFloorTextures[] = { + gDCLavaFloor1Tex, gDCLavaFloor2Tex, gDCLavaFloor3Tex, gDCLavaFloor4Tex, + gDCLavaFloor5Tex, gDCLavaFloor6Tex, gDCLavaFloor7Tex, gDCLavaFloor8Tex, +}; // Scene Draw Config 20 void func_80099878(GlobalContext* globalCtx) { @@ -1007,8 +1034,8 @@ void func_80099878(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4905); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A300[gSaveContext.nightFlag])); - gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A308[(s32)(gameplayFrames & 14) >> 1])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gDCEntranceTextures[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sDCLavaFloorTextures[(s32)(gameplayFrames & 14) >> 1])); gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 0, 64, 32, 1, 0, (gameplayFrames * 1) % 128, 64, 32)); @@ -1245,7 +1272,10 @@ void func_8009AE30(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5416); } -u32 D_8012A328[] = { 0x0200BD20, 0x0200B920 }; +void* sThievesHideoutEntranceTextures[] = { + gThievesHideoutDayEntranceTex, + gThievesHideoutNightEntranceTex, +}; // Scene Draw Config 40 void func_8009AFE0(GlobalContext* globalCtx) { @@ -1258,14 +1288,17 @@ void func_8009AFE0(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A328[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sThievesHideoutEntranceTextures[gSaveContext.nightFlag])); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5507); } -u32 D_8012A330[] = { 0x02014C30, 0x02015830 }; +void* D_8012A330[] = { + gWaterTempleDayEntranceTex, + gWaterTempleNightEntranceTex, +}; -// Scene Draw Config 23 +// Scene Draw Config 23 (Water Temple) void func_8009B0FC(GlobalContext* globalCtx) { u32 gameplayFrames; s32 spB0; @@ -1496,7 +1529,10 @@ void func_8009C0AC(GlobalContext* globalCtx) { } } -u32 D_8012A338[] = { 0x0200FAC0, 0x0200F8C0 }; +void* sIceCavernEntranceTextures[] = { + gIceCavernDayEntranceTex, + gIceCavernNightEntranceTex, +}; // Scene Draw Config 37 void func_8009C3EC(GlobalContext* globalCtx) { @@ -1507,7 +1543,7 @@ void func_8009C3EC(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6042); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A338[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sIceCavernEntranceTextures[gSaveContext.nightFlag])); gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); @@ -1597,7 +1633,10 @@ void func_8009CAC0(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6264); } -u32 D_8012A340[] = { 0x0200F8C0, 0x020100C0 }; +void* sGTGEntranceTextures[] = { + gGTGDayEntranceTex, + gGTGNightEntranceTex, +}; // Scene Draw Config 27 void func_8009CC00(GlobalContext* globalCtx) { @@ -1608,7 +1647,7 @@ void func_8009CC00(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6290); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A340[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGTGEntranceTextures[gSaveContext.nightFlag])); gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); @@ -1693,7 +1732,10 @@ void func_8009D0E8(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6491); } -u32 D_8012A348[] = { 0x02005210, 0x02005010 }; +void* sLonLonHouseEntranceTextures[] = { + gLonLonHouseDayEntranceTex, + gLonLonHouseNightEntranceTex, +}; // Scene Draw Config 44 void func_8009D31C(GlobalContext* globalCtx) { @@ -1701,7 +1743,7 @@ void func_8009D31C(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A348[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sLonLonHouseEntranceTextures[gSaveContext.nightFlag])); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1712,8 +1754,14 @@ void func_8009D31C(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6528); } -u32 D_8012A350[] = { 0x02006550, 0x02003550 }; -u32 D_8012A358[] = { 0x02002350, 0x02001350 }; +void* sGuardHouseView2Textures[] = { + gGuardHouseOutSideView1DayTex, + gGuardHouseOutSideView1NightTex, +}; +void* sGuardHouseView1Textures[] = { + gGuardHouseOutSideView2DayTex, + gGuardHouseOutSideView2NightTex, +}; // Scene Draw Config 45 void func_8009D438(GlobalContext* globalCtx) { @@ -1727,8 +1775,8 @@ void func_8009D438(GlobalContext* globalCtx) { var = gSaveContext.nightFlag; } - gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A358[var])); - gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A350[var])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGuardHouseView1Textures[var])); + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sGuardHouseView2Textures[var])); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1760,7 +1808,10 @@ void func_8009D5B4(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6615); } -u32 D_8012A360[] = { 0x02014D90, 0x02014590 }; +void* sForestTempleEntranceTextures[] = { + gForestTempleDayEntranceTex, + gForestTempleNightEntranceTex, +}; // Scene Draw Config 22 void func_8009D758(GlobalContext* globalCtx) { @@ -1771,7 +1822,7 @@ void func_8009D758(GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6640); gameplayFrames = globalCtx->gameplayFrames; - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A360[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sForestTempleEntranceTextures[gSaveContext.nightFlag])); gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); @@ -1790,7 +1841,10 @@ void func_8009D758(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6671); } -u32 D_8012A368[] = { 0x02018920, 0x02018020 }; +void* sSpiritTempleEntranceTextures[] = { + gSpiritTempleDayEntranceTex, + gSpiritTempleNightEntranceTex, +}; // Scene Draw Config 25 void func_8009D974(GlobalContext* globalCtx) { @@ -1798,7 +1852,7 @@ void func_8009D974(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A368[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sSpiritTempleEntranceTextures[gSaveContext.nightFlag])); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6762); } @@ -1849,7 +1903,10 @@ void func_8009DA30(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 6866); } -u32 D_8012A370[] = { 0x02015B50, 0x02016B50 }; +void* sKakarikoWindowTextures[] = { + gKakarikoVillageDayWindowTex, + gKakarikoVillageNightWindowTex, +}; // Scene Draw Config 2 void func_8009DD5C(GlobalContext* globalCtx) { @@ -1857,7 +1914,7 @@ void func_8009DD5C(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A370[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sKakarikoWindowTextures[gSaveContext.nightFlag])); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1974,7 +2031,10 @@ void func_8009E54C(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7097); } -u32 D_8012A378[] = { 0x02008F98, 0x02008FD8 }; +void* sZorasDomainEntranceTextures[] = { + gZorasDomainDayEntranceTex, + gZorasDomainNightEntranceTex, +}; // Scene Draw Config 6 void func_8009E730(GlobalContext* globalCtx) { @@ -1993,7 +2053,7 @@ void func_8009E730(GlobalContext* globalCtx) { gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A378[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sZorasDomainEntranceTextures[gSaveContext.nightFlag])); { s32 pad[2]; } @@ -2112,7 +2172,10 @@ void func_8009F074(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7339); } -u32 D_8012A380[] = { 0x02009678, 0x0200DE78 }; +void* D_8012A380[] = { + gSpot12_009678Tex, + gSpot12_00DE78Tex, +}; // Scene Draw Config 11 void func_8009F1B4(GlobalContext* globalCtx) { @@ -2231,7 +2294,10 @@ void func_8009F7D4(GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7530); } -u32 D_8012A388[] = { 0x02009808, 0x02008FC8 }; +void* sGoronCityEntranceTextures[] = { + gGoronCityDayEntranceTex, + gGoronCityNightEntranceTex, +}; // Scene Draw Config 16 void func_8009F9D0(GlobalContext* globalCtx) { @@ -2250,14 +2316,17 @@ void func_8009F9D0(GlobalContext* globalCtx) { gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); - gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A388[gSaveContext.nightFlag])); + gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGoronCityEntranceTextures[gSaveContext.nightFlag])); { s32 pad[2]; } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7578); } -u32 D_8012A390[] = { 0x020081E0, 0x0200FBE0 }; +void* sLonLonRanchWindowTextures[] = { + gLonLonRanchDayWindowTex, + gLonLonRangeNightWindowsTex, +}; // Scene Draw Config 17 void func_8009FB74(GlobalContext* globalCtx) { @@ -2265,7 +2334,7 @@ void func_8009FB74(GlobalContext* globalCtx) { { s32 pad[2]; } - gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A390[gSaveContext.nightFlag])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sLonLonRanchWindowTextures[gSaveContext.nightFlag])); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -2331,6 +2400,7 @@ void func_8009FE58(GlobalContext* globalCtx) { gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); if (FrameAdvance_IsEnabled(globalCtx) != true) { + D_8012A39C += 1820; D_8012A3A0 += 1820; diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 13836ad706..2b8901faca 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -1426,7 +1426,7 @@ void func_80A781CC(Actor* thisx, GlobalContext* globalCtx) { if (!Gameplay_InCsMode(globalCtx)) { this->actor.update = EnIk_Update; this->actor.draw = EnIk_Draw; - Cutscene_SetSegment(globalCtx, gNabooruKnuckleDefeatCs); + Cutscene_SetSegment(globalCtx, gSpiritBossNabooruKnuckleDefeatCs); gSaveContext.cutsceneTrigger = 1; Actor_SetScale(&this->actor, 0.01f); gSaveContext.eventChkInf[3] |= 0x1000; diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c index 30c35e9e87..6cc6fcc6bb 100644 --- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c +++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c @@ -305,7 +305,7 @@ void func_80ABF7CC(EnOkarinaTag* this, GlobalContext* globalCtx) { if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) { func_80106CCC(globalCtx); if (!CHECK_QUEST_ITEM(QUEST_SONG_SUN)) { - globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gSunSongTeachCs); + globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gSunSongGraveSunSongTeachCs); gSaveContext.cutsceneTrigger = 1; } this->actionFunc = func_80ABF708; diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 2ed474be3d..ef4ba69b41 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -944,7 +944,7 @@ void func_80ACC00C(EnOwl* this, GlobalContext* globalCtx) { break; case 8: case 9: - globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gDmtOwlCs); + globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gDMTOwlCs); this->actor.draw = NULL; break; default: diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index dea87be627..b4775dc53e 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -321,7 +321,7 @@ s32 EnXc_BoleroCS(EnXc* this, GlobalContext* globalCtx) { if ((posRot->pos.x > -784.0f) && (posRot->pos.x < -584.0f) && (posRot->pos.y > 447.0f) && (posRot->pos.y < 647.0f) && (posRot->pos.z > -446.0f) && (posRot->pos.z < -246.0f) && !Gameplay_InCsMode(globalCtx)) { - globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gBoleroCs); + globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gDeathMountainCraterBoleroCs); gSaveContext.cutsceneTrigger = 1; gSaveContext.eventChkInf[5] |= 2; Item_Give(globalCtx, ITEM_SONG_BOLERO); @@ -2142,13 +2142,13 @@ void EnXc_InitTempleOfTime(EnXc* this, GlobalContext* globalCtx) { if (LINK_IS_ADULT) { if (!(gSaveContext.eventChkInf[12] & 0x20)) { gSaveContext.eventChkInf[12] |= 0x20; - globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gFirstAdultCs); + globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTempleOfTimeFirstAdultCs); gSaveContext.cutsceneTrigger = 1; func_80B3EBF0(this, globalCtx); } else if (!(gSaveContext.eventChkInf[5] & 0x20) && (gSaveContext.eventChkInf[4] & 0x100)) { gSaveContext.eventChkInf[5] |= 0x20; Item_Give(globalCtx, ITEM_SONG_PRELUDE); - globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gPreludeCs); + globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTempleOfTimePreludeCs); gSaveContext.cutsceneTrigger = 1; this->action = SHEIK_ACTION_30; } else if (!(gSaveContext.eventChkInf[5] & 0x20)) { diff --git a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c index bb47dccbd5..6c753324a9 100644 --- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -170,7 +170,7 @@ void ItemOcarina_DoNothing(ItemOcarina* this, GlobalContext* globalCtx) { void ItemOcarina_StartSoTCutscene(ItemOcarina* this, GlobalContext* globalCtx) { if (func_8002F334(&this->actor, globalCtx)) { - globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldaSongOfTimeCs); + globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gHyruleFieldZeldaSongOfTimeCs); gSaveContext.cutsceneTrigger = 1; } } diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index c6e3fd2eb7..6b67d4eabf 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -165,7 +165,7 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, GlobalContext* globalCtx) { osSyncPrintf(VT_FGCOL(CYAN) "SHOT_SUN HIT!!!!!!!\n" VT_RST); if (INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE) { Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_ETCETERA, 700.0f, -800.0f, 7261.0f, 0, 0, 0, 7); - globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gFireArrowsCS); + globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gLakeHyliaFireArrowsCS); if (1) {} gSaveContext.cutsceneTrigger = 1; } else {