sm64coopdx/levels/wf/areas/1/10/1.inc.c
Isaac0-dev 663e4549d8
extract assets from rom at runtime (#4)
* Proof of concept for loading rom assets at runtime

* Added skybox textures

* Adjusted format

* Load all texture assets from rom

* Adjusted rom asset loading

* Load all Vtx lists from rom

* clean up toad, wario and his cap conflicts

* Load sound samples from rom

* fix toad sounds

* Loaded sequences from rom

* Load collisions from rom

* Object animations are now loaded from the rom

* Load player animations from rom

* Load goddard anims from rom

* whoops

* fix some compile errors

* drag and drop rom checker, everything works now.

* fix errors due to merge conflicts

* fix compile errors on windows, switch to md5

* fix vertex colors during load

Co-Authored-By: Agent X <44549182+agent-11@users.noreply.github.com>

* Load dialogs from rom

* Loaded course/act names from rom

* Loaded ingame text from rom

* rerun autogen & blacklist smlua_text_utils_init

* fix ttc_seg7_vertex_0700B238 colors

---------

Co-authored-by: MysterD <myster@d>
Co-authored-by: Agent X <44549182+agent-11@users.noreply.github.com>
2024-03-23 16:11:30 -04:00

177 lines
7.5 KiB
C

#include "pc/rom_assets.h"
// 0x07007590 - 0x070075A8
static const Lights1 wf_seg7_lights_07007590 = gdSPDefLights1(
0x66, 0x66, 0x66,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);
// 0x070075A8 - 0x070076A8
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_070075A8, 0x00496090, 31162, 0x000075a8, 256);
// 0x070076A8 - 0x070077A8
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_070076A8, 0x00496090, 31162, 0x000076a8, 256);
// 0x070077A8 - 0x07007898
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_070077A8, 0x00496090, 31162, 0x000077a8, 240);
// 0x07007898 - 0x07007988
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07007898, 0x00496090, 31162, 0x00007898, 240);
// 0x07007988 - 0x07007A78
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07007988, 0x00496090, 31162, 0x00007988, 240);
// 0x07007A78 - 0x07007B78
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07007A78, 0x00496090, 31162, 0x00007a78, 256);
// 0x07007B78 - 0x07007C68
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07007B78, 0x00496090, 31162, 0x00007b78, 240);
// 0x07007C68 - 0x07007D48
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07007C68, 0x00496090, 31162, 0x00007c68, 224);
// 0x07007D48 - 0x07007E38
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07007D48, 0x00496090, 31162, 0x00007d48, 240);
// 0x07007E38 - 0x07007F28
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07007E38, 0x00496090, 31162, 0x00007e38, 240);
// 0x07007F28 - 0x07007FA8
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07007F28, 0x00496090, 31162, 0x00007f28, 128);
// 0x07007FA8 - 0x070080A8
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07007FA8, 0x00496090, 31162, 0x00007fa8, 256);
// 0x070080A8 - 0x07008198
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_070080A8, 0x00496090, 31162, 0x000080a8, 240);
// 0x07008198 - 0x07008288
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07008198, 0x00496090, 31162, 0x00008198, 240);
// 0x07008288 - 0x07008368
ROM_ASSET_LOAD_VTX(wf_seg7_vertex_07008288, 0x00496090, 31162, 0x00008288, 224);
// 0x07008368 - 0x070083E0
static const Gfx wf_seg7_dl_07008368[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, wf_seg7_texture_07001800),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&wf_seg7_lights_07007590.l, 1),
gsSPLight(&wf_seg7_lights_07007590.a, 2),
gsSPVertex(wf_seg7_vertex_070075A8, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 9, 10, 0x0, 11, 12, 13, 0x0),
gsSP2Triangles(11, 14, 12, 0x0, 0, 2, 15, 0x0),
gsSPEndDisplayList(),
};
// 0x070083E0 - 0x07008468
static const Gfx wf_seg7_dl_070083E0[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, grass_09007800),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(wf_seg7_vertex_070076A8, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 3, 6, 7, 0x0),
gsSP2Triangles( 3, 7, 8, 0x0, 3, 8, 9, 0x0),
gsSP2Triangles( 3, 9, 10, 0x0, 0, 2, 11, 0x0),
gsSP2Triangles( 0, 11, 12, 0x0, 0, 12, 13, 0x0),
gsSP2Triangles( 0, 13, 14, 0x0, 0, 15, 1, 0x0),
gsSPEndDisplayList(),
};
// 0x07008468 - 0x07008690
static const Gfx wf_seg7_dl_07008468[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, grass_09009000),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(wf_seg7_vertex_070077A8, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 6, 4, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 9, 10, 0x0, 11, 12, 13, 0x0),
gsSP1Triangle(11, 14, 12, 0x0),
gsSPVertex(wf_seg7_vertex_07007898, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 6, 8, 9, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 10, 12, 13, 0x0),
gsSP1Triangle( 0, 14, 1, 0x0),
gsSPVertex(wf_seg7_vertex_07007988, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
gsSP1Triangle(12, 13, 14, 0x0),
gsSPVertex(wf_seg7_vertex_07007A78, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
gsSP2Triangles( 0, 12, 1, 0x0, 13, 14, 15, 0x0),
gsSPVertex(wf_seg7_vertex_07007B78, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 7, 5, 0x0),
gsSP2Triangles( 8, 9, 10, 0x0, 8, 11, 9, 0x0),
gsSP1Triangle(12, 13, 14, 0x0),
gsSPVertex(wf_seg7_vertex_07007C68, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 6, 4, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 10, 8, 0x0, 11, 12, 13, 0x0),
gsSPVertex(wf_seg7_vertex_07007D48, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 6, 4, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 10, 8, 0x0, 11, 12, 13, 0x0),
gsSP1Triangle(11, 14, 12, 0x0),
gsSPVertex(wf_seg7_vertex_07007E38, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 6, 9, 7, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 10, 12, 13, 0x0),
gsSP1Triangle( 0, 2, 14, 0x0),
gsSPVertex(wf_seg7_vertex_07007F28, 8, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 7, 5, 0x0),
gsSPEndDisplayList(),
};
// 0x07008690 - 0x070087B0
static const Gfx wf_seg7_dl_07008690[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, grass_09007000),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(wf_seg7_vertex_07007FA8, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 10, 8, 0x0, 8, 11, 9, 0x0),
gsSP2Triangles( 0, 12, 1, 0x0, 13, 14, 15, 0x0),
gsSPVertex(wf_seg7_vertex_070080A8, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 7, 5, 0x0),
gsSP2Triangles( 8, 9, 10, 0x0, 8, 10, 11, 0x0),
gsSP1Triangle(12, 13, 14, 0x0),
gsSPVertex(wf_seg7_vertex_07008198, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 9, 10, 7, 0x0, 9, 11, 10, 0x0),
gsSP1Triangle(12, 13, 14, 0x0),
gsSPVertex(wf_seg7_vertex_07008288, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 6, 4, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 9, 10, 0x0, 11, 12, 13, 0x0),
gsSPEndDisplayList(),
};
// 0x070087B0 - 0x07008838
const Gfx wf_seg7_dl_070087B0[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
gsSPClearGeometryMode(G_SHADING_SMOOTH),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPDisplayList(wf_seg7_dl_07008368),
gsSPDisplayList(wf_seg7_dl_070083E0),
gsSPDisplayList(wf_seg7_dl_07008468),
gsSPDisplayList(wf_seg7_dl_07008690),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_SHADING_SMOOTH),
gsSPEndDisplayList(),
};