Extract unused scene headers (#1930)

* Extract unused scene headers

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "1300a4f36"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "1300a4f36"
git-subrepo:
  version:  "0.4.6"
  origin:   "git@github.com:ingydotnet/git-subrepo.git"
  commit:   "110b9eb"

* Add more unused arguments to CS_LIGHT_SETTING
This commit is contained in:
cadmic 2024-03-23 09:38:05 -07:00 committed by GitHub
parent 872940d664
commit 39de6ce293
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 54 additions and 28 deletions

View File

@ -3,6 +3,7 @@
<Cutscene Name="gRainbowBridgeCs" Offset="0x2640"/>
<Cutscene Name="gGanonsCastleIntroCs" Offset="0x4280"/>
<Scene Name="ganon_tou_scene" Offset="0x0"/>
<Scene Name="ganon_tou_scene_unused" Offset="0x3080"/>
</File>
<File Name="ganon_tou_room_0" Segment="3">
<Room Name="ganon_tou_room_0" Offset="0x0"/>

View File

@ -4,6 +4,8 @@
<Texture Name="gSpiritTempleDayEntranceTex" OutName="day_entrance" Format="ia16" Width="8" Height="128" Offset="0x18920"/>
<Texture Name="gSpiritTempleNightEntranceTex" OutName="night_entrance" Format="ia16" Width="8" Height="128" Offset="0x18020"/>
<Scene Name="jyasinzou_scene" Offset="0x0"/>
<Scene Name="jyasinzou_scene_unused1" Offset="0x17200"/>
<Scene Name="jyasinzou_scene_unused2" Offset="0x176F0"/>
</File>
<File Name="jyasinzou_room_0" Segment="3">
<Room Name="jyasinzou_room_0" Offset="0x0"/>

View File

@ -4,6 +4,7 @@
<Cutscene Name="gGreatFairyDoubleMagicCs" Offset="0x13E0"/>
<Cutscene Name="gGreatFairyDoubleDefenseCs" Offset="0x25D0"/>
<Scene Name="daiyousei_izumi_scene" Offset="0x0"/>
<Scene Name="daiyousei_izumi_scene_unused" Offset="0x43D0"/>
</File>
<File Name="daiyousei_izumi_room_0" Segment="3">
<Room Name="daiyousei_izumi_room_0" Offset="0x0"/>

View File

@ -2,6 +2,7 @@
<File Name="hairal_niwa_scene" Segment="2">
<Path Name="hairal_niwa_scenePathList_000268" Offset="0x0268" NumPaths="8"/>
<Scene Name="hairal_niwa_scene" Offset="0x0"/>
<Scene Name="hairal_niwa_scene_unused" Offset="0x30E0"/>
</File>
<File Name="hairal_niwa_room_0" Segment="3">
<Room Name="hairal_niwa_room_0" Offset="0x0"/>

View File

@ -1,6 +1,9 @@
<Root>
<File Name="hiral_demo_scene" Segment="2">
<Scene Name="hiral_demo_scene" Offset="0x0"/>
<Scene Name="hiral_demo_scene_unused1" Offset="0x3580"/>
<Scene Name="hiral_demo_scene_unused2" Offset="0x3640"/>
<Scene Name="hiral_demo_scene_unused3" Offset="0x3700"/>
</File>
<File Name="hiral_demo_room_0" Segment="3">
<Room Name="hiral_demo_room_0" Offset="0x0"/>

View File

@ -9,6 +9,7 @@
<Cutscene Name="gHyruleFieldGateEponaJumpCs" Offset="0x10B30"/>
<Path Name="spot00_scenePathList_011AB4" Offset="0x11AB4" NumPaths="2"/>
<Scene Name="spot00_scene" Offset="0x0"/>
<Scene Name="spot00_scene_unused" Offset="0x12340"/>
<Texture Name="spot00_scene_Tex_02A198" Format="ia8" Width="8" Height="16" Offset="0x2A198"/>
</File>
<File Name="spot00_room_0" Segment="3">

View File

@ -2,6 +2,7 @@
<File Name="spot15_scene" Segment="2">
<Cutscene Name="gHyruleCastleIntroCs" Offset="0x3F40"/>
<Scene Name="spot15_scene" Offset="0x0"/>
<Scene Name="spot15_scene_unused" Offset="0x3D20"/>
</File>
<File Name="spot15_room_0" Segment="3">
<Room Name="spot15_room_0" Offset="0x0"/>

View File

@ -5,6 +5,7 @@
<Path Name="spot16_scenePathList_000254" Offset="0x254" NumPaths="2"/>
<Path Name="spot16_scenePathList_007884" Offset="0x7884" NumPaths="3"/>
<Scene Name="spot16_scene" Offset="0x0"/>
<Scene Name="spot16_scene_unused" Offset="0x78A0"/>
<Texture Name="spot16_scene_Tex_01AE98" Format="i4" Width="64" Height="64" Offset="0x1AE98"/>
</File>
<File Name="spot16_room_0" Segment="3">

View File

@ -121,10 +121,10 @@
* The lighting change will take place immediately with no blending.
* @note `endFrame` is not used in the implementation of the command, so its value does not matter
*/
#define CS_LIGHT_SETTING(lightSetting, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
#define CS_LIGHT_SETTING(lightSetting, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8, unused9, unused10) \
CMD_BBH(0, (lightSetting + 1), startFrame), CMD_HH(endFrame, unused0), \
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
CMD_W(unused6), CMD_W(unused7), CMD_W(unused8), CMD_W(unused9), CMD_W(unused10)
/**
* Declares a list of `CS_RUMBLE_CONTROLLER` entries.

View File

@ -7,7 +7,7 @@ CutsceneData D_808BB2F0[] = {
CS_PLAYER_CUE_LIST(1),
CS_PLAYER_CUE(PLAYER_CUEID_12, 0, 256, 0x0000, 0x0000, 0x0000, 0, 54, 52, 0, 54, 52, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_LIGHT_SETTING_LIST(1),
CS_LIGHT_SETTING(0x0001, 110, 111, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5),
CS_LIGHT_SETTING(0x0001, 110, 111, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, 0x00000000, 0x00000000),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_SET_CSFLAG_1, 110, 111, 0x0000, 0x00000000, 0x00000000, 0x0000002E, 0xFFFFFFE6, 0x00000000, 0x0000002E, 0xFFFFFFE6, 0x00000000, 0x00000000, 0x00000000),
CS_DESTINATION(CS_DEST_TEMPLE_OF_TIME_FROM_MASTER_SWORD, 230, 231),

View File

@ -89,7 +89,7 @@ CutsceneData D_808BB7A0[] = {
CS_PLAYER_CUE_LIST(1),
CS_PLAYER_CUE(PLAYER_CUEID_12, 0, 180, 0x0000, 0x0000, 0x0000, 0, 28, -10, 0, -14, 9, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBE6EEEEF, -0.23333333f), CS_FLOAT(0x0, 0.0f)),
CS_LIGHT_SETTING_LIST(1),
CS_LIGHT_SETTING(0x0001, 90, 91, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, 0xFFFFFFF2, 0x00000024),
CS_LIGHT_SETTING(0x0001, 90, 91, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, 0x00000000, 0x00000000),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_SET_CSFLAG_1, 90, 91, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF8, 0xFFFFFFDD, 0x00000000, 0xFFFFFFF8, 0xFFFFFFDD, 0x00000000, 0x00000000, 0x00000000),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 190, 210),

View File

@ -25,8 +25,8 @@ static CutsceneData D_8096C1A4[] = {
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 530, 539),
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 540, 570),
CS_LIGHT_SETTING_LIST(2),
CS_LIGHT_SETTING(0x0000, 0, 10, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018),
CS_LIGHT_SETTING(0x0000, 10, 3000, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018),
CS_LIGHT_SETTING(0x0000, 0, 10, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018, 0x00000000, 0x00000000, 0x00000000),
CS_LIGHT_SETTING(0x0000, 10, 3000, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018, 0x00000000, 0x00000000, 0x00000000),
CS_ACTOR_CUE_LIST(39, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, 0, -2, 0, 0, -2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 805, 835),

View File

@ -23,8 +23,8 @@ static CutsceneData D_8098786C[] = {
CS_ACTOR_CUE_LIST(49, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, -22, 0, -55, -22, 0, -55, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_LIGHT_SETTING_LIST(2),
CS_LIGHT_SETTING(0x0001, 0, 10, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0xFFFFFFFE, 0x00000000, 0x0000000D),
CS_LIGHT_SETTING(0x0001, 10, 3000, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0xFFFFFFFE, 0x00000000, 0x0000000D),
CS_LIGHT_SETTING(0x0001, 0, 10, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0x00000000, 0x00000000, 0x00000000),
CS_LIGHT_SETTING(0x0001, 10, 3000, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0x00000000, 0x00000000, 0x00000000),
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 694, 724),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 960, 990),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 683, 692),

View File

@ -19,7 +19,7 @@ static CutsceneData D_80AB431C[] = {
CS_ACTOR_CUE_LIST(49, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -16, -121, 0, -16, -121, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_LIGHT_SETTING_LIST(1),
CS_LIGHT_SETTING(0x0003, 0, 3000, 0x0000, 0x00000000, 0xFFFFFF9E, 0x00000000, 0x0000002F, 0xFFFFFF9E, 0x00000000, 0x0000002F),
CS_LIGHT_SETTING(0x0003, 0, 3000, 0x0000, 0x00000000, 0xFFFFFF9E, 0x00000000, 0x0000002F, 0xFFFFFF9E, 0x00000000, 0x0000002F, 0x00000000, 0x00000000, 0x00000000),
CS_ACTOR_CUE_LIST(39, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, 0, -2, 0, 0, -2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE_LIST(40, 3),

View File

@ -21,11 +21,11 @@ static CutsceneData D_80AF411C[] = {
CS_ACTOR_CUE_LIST(49, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -16, -121, 0, -16, -121, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_LIGHT_SETTING_LIST(5),
CS_LIGHT_SETTING(0x0004, 0, 384, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
CS_LIGHT_SETTING(0x0005, 384, 454, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
CS_LIGHT_SETTING(0x0004, 454, 554, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
CS_LIGHT_SETTING(0x0005, 554, 624, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
CS_LIGHT_SETTING(0x0004, 624, 3001, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
CS_LIGHT_SETTING(0x0004, 0, 384, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
CS_LIGHT_SETTING(0x0005, 384, 454, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
CS_LIGHT_SETTING(0x0004, 454, 554, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
CS_LIGHT_SETTING(0x0005, 554, 624, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
CS_LIGHT_SETTING(0x0004, 624, 3001, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
CS_ACTOR_CUE_LIST(39, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, 0, -2, 0, 0, -2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE_LIST(42, 3),

View File

@ -22,40 +22,51 @@ jobs:
- name: Checkout oot
run: |
cd ../
rm -rf oot/
git clone https://github.com/zeldaret/oot.git
cd oot
echo $(pwd)
git submodule update --init --recursive
- name: Checkout mm
run: |
cd ../
rm -rf mm/
git clone https://github.com/zeldaret/mm.git
cd mm
echo $(pwd)
- name: Set up repos
run: echo "Set up repos"
- name: Setup OOT
run: |
cd ../
cd oot
echo $(pwd)
mkdir -p baseroms/gc-eu-mq-dbg/segments
cp ~/baserom_original.z64 ./baseroms/gc-eu-mq-dbg/baserom.z64
make venv
make -C tools -j
cp ../ZAPD.out tools/ZAPD/
.venv/bin/python3 tools/decompress_baserom.py gc-eu-mq-dbg
.venv/bin/python3 tools/extract_baserom.py baseroms/gc-eu-mq-dbg/baserom-decompressed.z64 -o baseroms/gc-eu-mq-dbg/segments --dmadata-start 0x12f70 --dmadata-names baseroms/gc-eu-mq-dbg/dmadata_names.txt
.venv/bin/python3 extract_assets.py -j 4
.venv/bin/python3 tools/msgdis.py --text-out assets/text/message_data.h --staff-text-out assets/text/message_data_staff.h
cd tools
rm -rf ZAPD/
ln -s ../../ZAPD
cd ../
make -j $(nproc) setup
- name: Setup MM
run: |
cd ../
cd mm
echo $(pwd)
python3 -m venv .mm-env
source .mm-env/bin/activate
python3 -m pip install -r requirements.txt
cp ~/baserom.mm.us.rev1.z64 ./baserom.mm.us.rev1.z64
cd tools
rm -rf ZAPD/
ln -s ../../ZAPD
cd ../
make -C tools -j
cp ../ZAPD.out tools/ZAPD/
python3 tools/fixbaserom.py
python3 tools/extract_baserom.py
python3 tools/decompress_yars.py
@ -66,13 +77,17 @@ jobs:
- name: Build oot
run: |
cd ../
cd oot
echo $(pwd)
make venv
make -j
- name: Build mm
run: |
cd ../
cd mm
echo $(pwd)
python3 -m venv .mm-env
source .mm-env/bin/activate
python3 -m pip install -r requirements.txt

View File

@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/zeldaret/ZAPD.git
branch = master
commit = b3bfa14cf432115a0a675d243f3a1b3197f17cbd
parent = 59017f201eae4a1bc9212ea2c7dc51d4a036108b
commit = 1300a4f36584627aa784cbc252d1c8ecd7b40e68
parent = 4522ee2cae12b2d23b7ef0134f24f7c3e26935f0
method = merge
cmdver = 0.4.6

View File

@ -15,7 +15,7 @@ const std::unordered_map<CutsceneOoT_CommandType, CsCommandListDescriptor> csCom
{CutsceneOoT_CommandType::CS_CMD_MISC,
{"CS_MISC", "(%s, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}},
{CutsceneOoT_CommandType::CS_CMD_LIGHT_SETTING,
{"CS_LIGHT_SETTING", "(0x%02X, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}},
{"CS_LIGHT_SETTING", "(0x%02X, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}},
{CutsceneOoT_CommandType::CS_CMD_START_SEQ,
{"CS_START_SEQ", "(%s, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}},
{CutsceneOoT_CommandType::CS_CMD_STOP_SEQ,

View File

@ -24,7 +24,7 @@ std::string ZCutscene::GetBodySourceCode() const
{
std::string output = "";
output += StringHelper::Sprintf(" CS_BEGIN_CUTSCENE(%i, %i),\n", commands.size(), endFrame);
output += StringHelper::Sprintf(" CS_BEGIN_CUTSCENE(%i, %i),\n", numCommands, endFrame);
for (size_t i = 0; i < commands.size(); i++)
{
@ -32,7 +32,7 @@ std::string ZCutscene::GetBodySourceCode() const
output += " " + cmd->GenerateSourceCode();
}
output += StringHelper::Sprintf(" CS_END(),", commands.size(), endFrame);
output += StringHelper::Sprintf(" CS_END(),");
return output;
}

View File

@ -491,7 +491,7 @@ cutscene_command_macros = {
"CS_MISC(%h2:1:e4, %h1:1:s, %h2:2:s, %h1:2:x, %w1:3:x, %w1:4:x, %w1:5:x, %w1:6:x, %w1:7:x, %w1:8:x, %w1:9:x, %w1:10:x, %w1:11:x, %w1:12:x)", 12),
4:
("CS_LIGHT_SETTING_LIST(%w1:1:s)", 2, None, 0,
"CS_LIGHT_SETTING(%h2:1:x-1, %h1:1:s, %h2:2:s, %h1:2:x, %w1:3:x, %w1:4:x, %w1:5:x, %w1:6:x, %w1:7:x, %w1:8:x, %w1:9:x)", 12),
"CS_LIGHT_SETTING(%h2:1:x-1, %h1:1:s, %h2:2:s, %h1:2:x, %w1:3:x, %w1:4:x, %w1:5:x, %w1:6:x, %w1:7:x, %w1:8:x, %w1:9:x, %w1:10:x, %w1:11:x, %w1:12:x)", 12),
86:
("CS_START_SEQ_LIST(%w1:1:s)", 2, None, 0,
"CS_START_SEQ(%h2:1:e3, %h1:1:s, %h2:2:s, %h1:2:x, %w1:3:x, %w1:4:x, %w1:5:x, %w1:6:x, %w1:7:x, %w1:8:x, %w1:9:x)", 12),