mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-29 15:33:01 +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>
227 lines
9.9 KiB
C
227 lines
9.9 KiB
C
#include "pc/rom_assets.h"
|
|
// 0x07012758 - 0x07012770
|
|
static const Lights1 bbh_seg7_lights_07012758 = gdSPDefLights1(
|
|
0x3c, 0x3c, 0x3c,
|
|
0x96, 0x96, 0x96, 0x28, 0x28, 0x28
|
|
);
|
|
|
|
// 0x07012770 - 0x07012788
|
|
static const Lights1 bbh_seg7_lights_07012770 = gdSPDefLights1(
|
|
0x66, 0x66, 0x66,
|
|
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
|
);
|
|
|
|
// 0x07012788 - 0x070127C8
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07012788, 0x00371c40, 68724, 0x00012788, 64);
|
|
|
|
// 0x070127C8 - 0x07012848
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_070127C8, 0x00371c40, 68724, 0x000127c8, 128);
|
|
|
|
// 0x07012848 - 0x070128A8
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07012848, 0x00371c40, 68724, 0x00012848, 96);
|
|
|
|
// 0x070128A8 - 0x070129A8
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_070128A8, 0x00371c40, 68724, 0x000128a8, 256);
|
|
|
|
// 0x070129A8 - 0x07012A88
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_070129A8, 0x00371c40, 68724, 0x000129a8, 224);
|
|
|
|
// 0x07012A88 - 0x07012B88
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07012A88, 0x00371c40, 68724, 0x00012a88, 256);
|
|
|
|
// 0x07012B88 - 0x07012C78
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07012B88, 0x00371c40, 68724, 0x00012b88, 240);
|
|
|
|
// 0x07012C78 - 0x07012D68
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07012C78, 0x00371c40, 68724, 0x00012c78, 240);
|
|
|
|
// 0x07012D68 - 0x07012E58
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07012D68, 0x00371c40, 68724, 0x00012d68, 240);
|
|
|
|
// 0x07012E58 - 0x07012F38
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07012E58, 0x00371c40, 68724, 0x00012e58, 224);
|
|
|
|
// 0x07012F38 - 0x07012F68
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07012F38, 0x00371c40, 68724, 0x00012f38, 48);
|
|
|
|
// 0x07012F68 - 0x07013028
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07012F68, 0x00371c40, 68724, 0x00012f68, 192);
|
|
|
|
// 0x07013028 - 0x07013118
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07013028, 0x00371c40, 68724, 0x00013028, 240);
|
|
|
|
// 0x07013118 - 0x07013208
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07013118, 0x00371c40, 68724, 0x00013118, 240);
|
|
|
|
// 0x07013208 - 0x070132F8
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_07013208, 0x00371c40, 68724, 0x00013208, 240);
|
|
|
|
// 0x070132F8 - 0x070133E8
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_070132F8, 0x00371c40, 68724, 0x000132f8, 240);
|
|
|
|
// 0x070133E8 - 0x070134D8
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_070133E8, 0x00371c40, 68724, 0x000133e8, 240);
|
|
|
|
// 0x070134D8 - 0x07013508
|
|
ROM_ASSET_LOAD_VTX(bbh_seg7_vertex_070134D8, 0x00371c40, 68724, 0x000134d8, 48);
|
|
|
|
// 0x07013508 - 0x07013550
|
|
static const Gfx bbh_seg7_dl_07013508[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spooky_0900A000),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPLight(&bbh_seg7_lights_07012758.l, 1),
|
|
gsSPLight(&bbh_seg7_lights_07012758.a, 2),
|
|
gsSPVertex(bbh_seg7_vertex_07012788, 4, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x07013550 - 0x070135A8
|
|
static const Gfx bbh_seg7_dl_07013550[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spooky_09008800),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPLight(&bbh_seg7_lights_07012770.l, 1),
|
|
gsSPLight(&bbh_seg7_lights_07012770.a, 2),
|
|
gsSPVertex(bbh_seg7_vertex_070127C8, 8, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
|
|
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x070135A8 - 0x070135E0
|
|
static const Gfx bbh_seg7_dl_070135A8[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spooky_09004800),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPVertex(bbh_seg7_vertex_07012848, 6, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x070135E0 - 0x070137E0
|
|
static const Gfx bbh_seg7_dl_070135E0[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spooky_09003800),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPVertex(bbh_seg7_vertex_070128A8, 16, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
|
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
|
|
gsSP2Triangles( 8, 9, 10, 0x0, 8, 10, 11, 0x0),
|
|
gsSP2Triangles(12, 13, 14, 0x0, 12, 15, 13, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_070129A8, 14, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
|
gsSP2Triangles( 4, 5, 6, 0x0, 7, 8, 9, 0x0),
|
|
gsSP2Triangles(10, 7, 11, 0x0, 7, 9, 11, 0x0),
|
|
gsSP2Triangles(12, 10, 11, 0x0, 12, 11, 13, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_07012A88, 16, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
|
|
gsSP2Triangles( 3, 5, 12, 0x0, 13, 14, 15, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_07012B88, 15, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 0, 2, 0x0),
|
|
gsSP2Triangles( 4, 5, 6, 0x0, 7, 8, 9, 0x0),
|
|
gsSP2Triangles( 7, 9, 10, 0x0, 11, 12, 13, 0x0),
|
|
gsSP1Triangle(14, 11, 13, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_07012C78, 15, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 3, 5, 6, 0x0, 7, 3, 8, 0x0),
|
|
gsSP2Triangles( 3, 6, 8, 0x0, 7, 8, 9, 0x0),
|
|
gsSP2Triangles(10, 11, 12, 0x0, 13, 10, 12, 0x0),
|
|
gsSP1Triangle( 0, 2, 14, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_07012D68, 15, 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),
|
|
gsSP1Triangle(11, 13, 14, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_07012E58, 14, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 6, 7, 8, 0x0, 6, 8, 9, 0x0),
|
|
gsSP2Triangles( 0, 10, 1, 0x0, 11, 12, 13, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_07012F38, 3, 0),
|
|
gsSP1Triangle( 0, 1, 2, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x070137E0 - 0x07013838
|
|
static const Gfx bbh_seg7_dl_070137E0[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bbh_seg7_texture_07000000),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPVertex(bbh_seg7_vertex_07012F68, 12, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
|
|
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
|
|
gsSP2Triangles( 8, 9, 10, 0x0, 8, 10, 11, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x07013838 - 0x070139A8
|
|
static const Gfx bbh_seg7_dl_07013838[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, spooky_09001800),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPVertex(bbh_seg7_vertex_07013028, 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( 3, 14, 4, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_07013118, 15, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
|
|
gsSP2Triangles( 4, 5, 6, 0x0, 7, 8, 9, 0x0),
|
|
gsSP2Triangles(10, 11, 12, 0x0, 10, 12, 13, 0x0),
|
|
gsSP1Triangle( 4, 6, 14, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_07013208, 15, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
|
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
|
|
gsSP2Triangles( 8, 9, 10, 0x0, 11, 12, 13, 0x0),
|
|
gsSP1Triangle(11, 14, 12, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_070132F8, 15, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 3, 5, 6, 0x0, 0, 7, 1, 0x0),
|
|
gsSP2Triangles( 8, 9, 10, 0x0, 8, 11, 9, 0x0),
|
|
gsSP1Triangle(12, 13, 14, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_070133E8, 15, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 3, 6, 4, 0x0, 7, 8, 9, 0x0),
|
|
gsSP2Triangles(10, 11, 12, 0x0, 10, 12, 13, 0x0),
|
|
gsSP1Triangle( 7, 14, 8, 0x0),
|
|
gsSPVertex(bbh_seg7_vertex_070134D8, 3, 0),
|
|
gsSP1Triangle( 0, 1, 2, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x070139A8 - 0x07013AA0
|
|
const Gfx bbh_seg7_dl_070139A8[] = {
|
|
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(bbh_seg7_dl_07013508),
|
|
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(bbh_seg7_dl_07013550),
|
|
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(bbh_seg7_dl_070135A8),
|
|
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_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD),
|
|
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC),
|
|
gsSPDisplayList(bbh_seg7_dl_070135E0),
|
|
gsSPDisplayList(bbh_seg7_dl_070137E0),
|
|
gsDPTileSync(),
|
|
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD),
|
|
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC),
|
|
gsSPDisplayList(bbh_seg7_dl_07013838),
|
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPPipeSync(),
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPSetGeometryMode(G_SHADING_SMOOTH),
|
|
gsSPEndDisplayList(),
|
|
};
|