mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
663e4549d8
* 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>
214 lines
8.9 KiB
C
214 lines
8.9 KiB
C
#include "pc/rom_assets.h"
|
|
// Chair
|
|
|
|
// Unreferenced light group
|
|
UNUSED static const Lights1 chair_lights_unused = gdSPDefLights1(
|
|
0x19, 0x0d, 0x06,
|
|
0x64, 0x36, 0x1a, 0x28, 0x28, 0x28
|
|
);
|
|
|
|
// 0x05003060
|
|
ROM_ASSET_LOAD_TEXTURE(chair_seg5_texture_05003060, "actors/chair/chair_front.rgba16.inc.c", 0x00166c60, 26968, 0x00003060, 2048);
|
|
|
|
// 0x05003860
|
|
ROM_ASSET_LOAD_TEXTURE(chair_seg5_texture_05003860, "actors/chair/chair_leg.rgba16.inc.c", 0x00166c60, 26968, 0x00003860, 2048);
|
|
|
|
// 0x05004060
|
|
ROM_ASSET_LOAD_TEXTURE(chair_seg5_texture_05004060, "actors/chair/chair_bottom.rgba16.inc.c", 0x00166c60, 26968, 0x00004060, 1024);
|
|
|
|
// unreferenced
|
|
// 0x05004460
|
|
ROM_ASSET_LOAD_TEXTURE(chair_seg5_texture_05004460, "actors/chair/chair_surface_unused.rgba16.inc.c", 0x00166c60, 26968, 0x00004460, 2048);
|
|
|
|
// 0x05004C60
|
|
static const Lights1 chair_seg5_lights_05004C60 = gdSPDefLights1(
|
|
0x47, 0x47, 0x47,
|
|
0xb2, 0xb2, 0xb2, 0x28, 0x28, 0x28
|
|
);
|
|
|
|
// 0x05004C78
|
|
ROM_ASSET_LOAD_VTX(chair_seg5_vertex_05004C78, 0x00166c60, 26968, 0x00004c78, 256);
|
|
|
|
// 0x05004D78
|
|
ROM_ASSET_LOAD_VTX(chair_seg5_vertex_05004D78, 0x00166c60, 26968, 0x00004d78, 192);
|
|
|
|
// 0x05004E38 - 0x05004EE8
|
|
const Gfx chair_seg5_dl_05004E38[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, chair_seg5_texture_05003060),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPLight(&chair_seg5_lights_05004C60.l, 1),
|
|
gsSPLight(&chair_seg5_lights_05004C60.a, 2),
|
|
gsSPVertex(chair_seg5_vertex_05004C78, 16, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 4, 6, 5, 0x0, 7, 8, 9, 0x0),
|
|
gsSP2Triangles(10, 11, 12, 0x0, 11, 13, 12, 0x0),
|
|
gsSP2Triangles( 1, 14, 2, 0x0, 15, 7, 9, 0x0),
|
|
gsSPVertex(chair_seg5_vertex_05004D78, 12, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 2, 0x0),
|
|
gsSP2Triangles( 4, 0, 2, 0x0, 5, 6, 7, 0x0),
|
|
gsSP2Triangles( 8, 5, 7, 0x0, 9, 10, 11, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x05004EE8 - 0x05004F58
|
|
const Gfx chair_seg5_dl_05004EE8[] = {
|
|
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),
|
|
gsSPDisplayList(chair_seg5_dl_05004E38),
|
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPPipeSync(),
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPSetGeometryMode(G_SHADING_SMOOTH),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x05004F58
|
|
static const Lights1 chair_seg5_lights_05004F58 = gdSPDefLights1(
|
|
0x47, 0x47, 0x47,
|
|
0xb2, 0xb2, 0xb2, 0x28, 0x28, 0x28
|
|
);
|
|
|
|
// 0x05004F70
|
|
ROM_ASSET_LOAD_VTX(chair_seg5_vertex_05004F70, 0x00166c60, 26968, 0x00004f70, 256);
|
|
|
|
// 0x05005070
|
|
ROM_ASSET_LOAD_VTX(chair_seg5_vertex_05005070, 0x00166c60, 26968, 0x00005070, 128);
|
|
|
|
// 0x050050F0 - 0x05005190
|
|
const Gfx chair_seg5_dl_050050F0[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, chair_seg5_texture_05004060),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
|
|
gsSPLight(&chair_seg5_lights_05004F58.l, 1),
|
|
gsSPLight(&chair_seg5_lights_05004F58.a, 2),
|
|
gsSPVertex(chair_seg5_vertex_05004F70, 16, 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),
|
|
gsSP2Triangles(11, 14, 12, 0x0, 0, 15, 1, 0x0),
|
|
gsSPVertex(chair_seg5_vertex_05005070, 8, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
|
|
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x05005190 - 0x05005200
|
|
const Gfx chair_seg5_dl_05005190[] = {
|
|
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, 4, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 4, G_TX_NOLOD),
|
|
gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
|
gsSPDisplayList(chair_seg5_dl_050050F0),
|
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPPipeSync(),
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPSetGeometryMode(G_SHADING_SMOOTH),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x05005200
|
|
static const Lights1 chair_seg5_lights_05005200 = gdSPDefLights1(
|
|
0x47, 0x47, 0x47,
|
|
0xb2, 0xb2, 0xb2, 0x28, 0x28, 0x28
|
|
);
|
|
|
|
// 0x05005218
|
|
ROM_ASSET_LOAD_VTX(chair_seg5_vertex_05005218, 0x00166c60, 26968, 0x00005218, 240);
|
|
|
|
// 0x05005308
|
|
ROM_ASSET_LOAD_VTX(chair_seg5_vertex_05005308, 0x00166c60, 26968, 0x00005308, 112);
|
|
|
|
// 0x05005378 - 0x05005408
|
|
const Gfx chair_seg5_dl_05005378[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, chair_seg5_texture_05003860),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPLight(&chair_seg5_lights_05005200.l, 1),
|
|
gsSPLight(&chair_seg5_lights_05005200.a, 2),
|
|
gsSPVertex(chair_seg5_vertex_05005218, 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(chair_seg5_vertex_05005308, 7, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
|
gsSP1Triangle( 4, 5, 6, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x05005408 - 0x05005478
|
|
const Gfx chair_seg5_dl_05005408[] = {
|
|
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(chair_seg5_dl_05005378),
|
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPPipeSync(),
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPSetGeometryMode(G_SHADING_SMOOTH),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x05005478
|
|
static const Lights1 chair_seg5_lights_05005478 = gdSPDefLights1(
|
|
0x47, 0x47, 0x47,
|
|
0xb2, 0xb2, 0xb2, 0x28, 0x28, 0x28
|
|
);
|
|
|
|
// 0x05005490
|
|
ROM_ASSET_LOAD_VTX(chair_seg5_vertex_05005490, 0x00166c60, 26968, 0x00005490, 240);
|
|
|
|
// 0x05005580
|
|
ROM_ASSET_LOAD_VTX(chair_seg5_vertex_05005580, 0x00166c60, 26968, 0x00005580, 112);
|
|
|
|
// 0x050055F0 - 0x05005680
|
|
const Gfx chair_seg5_dl_050055F0[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, chair_seg5_texture_05003860),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPLight(&chair_seg5_lights_05005478.l, 1),
|
|
gsSPLight(&chair_seg5_lights_05005478.a, 2),
|
|
gsSPVertex(chair_seg5_vertex_05005490, 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(chair_seg5_vertex_05005580, 7, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
|
gsSP1Triangle( 4, 5, 6, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x05005680 - 0x050056F0
|
|
const Gfx chair_seg5_dl_05005680[] = {
|
|
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(chair_seg5_dl_050055F0),
|
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPPipeSync(),
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPSetGeometryMode(G_SHADING_SMOOTH),
|
|
gsSPEndDisplayList(),
|
|
};
|