sm64coopdx/actors/exclamation_box/model.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

182 lines
8.7 KiB
C

#include "pc/rom_assets.h"
// Exclamation Box
// 0x08012E10
static const Lights1 exclamation_box_seg8_lights_08012E10 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);
// 0x08012E28
ROM_ASSET_LOAD_TEXTURE(exclamation_box_seg8_texture_08012E28, "actors/exclamation_box/vanish_cap_box_front.rgba16.inc.c", 0x001f2200, 59076, 0x00012e28, 2048);
// 0x08013628
ROM_ASSET_LOAD_TEXTURE(exclamation_box_seg8_texture_08013628, "actors/exclamation_box/vanish_cap_box_side.rgba16.inc.c", 0x001f2200, 59076, 0x00013628, 4096);
// 0x08014628
ROM_ASSET_LOAD_TEXTURE(exclamation_box_seg8_texture_08014628, "actors/exclamation_box/metal_cap_box_front.rgba16.inc.c", 0x001f2200, 59076, 0x00014628, 2048);
// 0x08014E28
ROM_ASSET_LOAD_TEXTURE(exclamation_box_seg8_texture_08014E28, "actors/exclamation_box/metal_cap_box_side.rgba16.inc.c", 0x001f2200, 59076, 0x00014e28, 4096);
// 0x08015E28
ROM_ASSET_LOAD_TEXTURE(exclamation_box_seg8_texture_08015E28, "actors/exclamation_box/wing_cap_box_front.rgba16.inc.c", 0x001f2200, 59076, 0x00015e28, 2048);
// 0x08016628
ROM_ASSET_LOAD_TEXTURE(exclamation_box_seg8_texture_08016628, "actors/exclamation_box/wing_cap_box_side.rgba16.inc.c", 0x001f2200, 59076, 0x00016628, 4096);
// 0x08017628
ROM_ASSET_LOAD_TEXTURE(exclamation_box_seg8_texture_08017628, "actors/exclamation_box/exclamation_box_front.rgba16.inc.c", 0x001f2200, 59076, 0x00017628, 2048);
// 0x08017E28
ROM_ASSET_LOAD_TEXTURE(exclamation_box_seg8_texture_08017E28, "actors/exclamation_box/exclamation_box_side.rgba16.inc.c", 0x001f2200, 59076, 0x00017e28, 4096);
// 0x08018E28
ROM_ASSET_LOAD_VTX(exclamation_box_seg8_vertex_08018E28, 0x001f2200, 59076, 0x00018e28, 256);
// 0x08018F28
ROM_ASSET_LOAD_VTX(exclamation_box_seg8_vertex_08018F28, 0x001f2200, 59076, 0x00018f28, 128);
// 0x08018FA8 - 0x08019008
const Gfx exclamation_box_seg8_dl_08018FA8[] = {
gsSPLight(&exclamation_box_seg8_lights_08012E10.l, 1),
gsSPLight(&exclamation_box_seg8_lights_08012E10.a, 2),
gsSPVertex(exclamation_box_seg8_vertex_08018E28, 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, 11, 12, 13, 0x0),
gsSP2Triangles(11, 13, 14, 0x0, 0, 2, 15, 0x0),
gsSPEndDisplayList(),
};
// 0x08019008 - 0x08019058
const Gfx exclamation_box_seg8_dl_08019008[] = {
gsSPVertex(exclamation_box_seg8_vertex_08018F28, 8, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_SHADING_SMOOTH),
gsSPEndDisplayList(),
};
// 0x08019058 - 0x080190A0
const Gfx exclamation_box_seg8_dl_08019058[] = {
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_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPEndDisplayList(),
};
// 0x080190A0
ROM_ASSET_LOAD_VTX(exclamation_box_seg8_vertex_080190A0, 0x001f2200, 59076, 0x000190a0, 256);
// 0x080191A0
ROM_ASSET_LOAD_VTX(exclamation_box_seg8_vertex_080191A0, 0x001f2200, 59076, 0x000191a0, 128);
// 0x08019220 - 0x08019280
const Gfx exclamation_box_seg8_dl_08019220[] = {
gsSPLight(&exclamation_box_seg8_lights_08012E10.l, 1),
gsSPLight(&exclamation_box_seg8_lights_08012E10.a, 2),
gsSPVertex(exclamation_box_seg8_vertex_080190A0, 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(),
};
// 0x08019280 - 0x080192D0
const Gfx exclamation_box_seg8_dl_08019280[] = {
gsSPVertex(exclamation_box_seg8_vertex_080191A0, 8, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_SHADING_SMOOTH),
gsSPEndDisplayList(),
};
// 0x080192D0 - 0x08019318
const Gfx exclamation_box_seg8_dl_080192D0[] = {
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_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPEndDisplayList(),
};
// 0x08019318 - 0x08019378
const Gfx exclamation_box_seg8_dl_08019318[] = {
gsSPDisplayList(exclamation_box_seg8_dl_08019058),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, exclamation_box_seg8_texture_08015E28),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPDisplayList(exclamation_box_seg8_dl_08018FA8),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, exclamation_box_seg8_texture_08016628),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPBranchList(exclamation_box_seg8_dl_08019008),
};
// 0x08019378 - 0x080193D8
const Gfx exclamation_box_seg8_dl_08019378[] = {
gsSPDisplayList(exclamation_box_seg8_dl_080192D0),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, exclamation_box_seg8_texture_08014628),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPDisplayList(exclamation_box_seg8_dl_08019220),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 6, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (64 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, exclamation_box_seg8_texture_08014E28),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 64 * 32 - 1, CALC_DXT(64, G_IM_SIZ_16b_BYTES)),
gsSPBranchList(exclamation_box_seg8_dl_08019280),
};
// 0x080193D8 - 0x08019438
const Gfx exclamation_box_seg8_dl_080193D8[] = {
gsSPDisplayList(exclamation_box_seg8_dl_08019058),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, exclamation_box_seg8_texture_08012E28),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPDisplayList(exclamation_box_seg8_dl_08018FA8),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, exclamation_box_seg8_texture_08013628),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPBranchList(exclamation_box_seg8_dl_08019008),
};
// 0x08019438 - 0x08019498
const Gfx exclamation_box_seg8_dl_08019438[] = {
gsSPDisplayList(exclamation_box_seg8_dl_080192D0),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, exclamation_box_seg8_texture_08017628),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPDisplayList(exclamation_box_seg8_dl_08019220),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 6, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (64 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, exclamation_box_seg8_texture_08017E28),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 64 * 32 - 1, CALC_DXT(64, G_IM_SIZ_16b_BYTES)),
gsSPBranchList(exclamation_box_seg8_dl_08019280),
};