mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 21:45:12 +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>
251 lines
11 KiB
C
251 lines
11 KiB
C
#include "pc/rom_assets.h"
|
|
// 0x07007E88 - 0x07007EA0
|
|
static const Lights1 cotmc_seg7_lights_07007E88 = gdSPDefLights1(
|
|
0x7f, 0x7f, 0x7f,
|
|
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
|
);
|
|
|
|
// 0x07007EA0 - 0x07007F90
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07007EA0, 0x004b80d0, 26886, 0x00007ea0, 240);
|
|
|
|
// 0x07007F90 - 0x07008080
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07007F90, 0x004b80d0, 26886, 0x00007f90, 240);
|
|
|
|
// 0x07008080 - 0x07008170
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008080, 0x004b80d0, 26886, 0x00008080, 240);
|
|
|
|
// 0x07008170 - 0x07008260
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008170, 0x004b80d0, 26886, 0x00008170, 240);
|
|
|
|
// 0x07008260 - 0x07008350
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008260, 0x004b80d0, 26886, 0x00008260, 240);
|
|
|
|
// 0x07008350 - 0x07008440
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008350, 0x004b80d0, 26886, 0x00008350, 240);
|
|
|
|
// 0x07008440 - 0x07008540
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008440, 0x004b80d0, 26886, 0x00008440, 256);
|
|
|
|
// 0x07008540 - 0x07008640
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008540, 0x004b80d0, 26886, 0x00008540, 256);
|
|
|
|
// 0x07008640 - 0x07008730
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008640, 0x004b80d0, 26886, 0x00008640, 240);
|
|
|
|
// 0x07008730 - 0x07008820
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008730, 0x004b80d0, 26886, 0x00008730, 240);
|
|
|
|
// 0x07008820 - 0x07008920
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008820, 0x004b80d0, 26886, 0x00008820, 256);
|
|
|
|
// 0x07008920 - 0x07008A10
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008920, 0x004b80d0, 26886, 0x00008920, 240);
|
|
|
|
// 0x07008A10 - 0x07008B10
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008A10, 0x004b80d0, 26886, 0x00008a10, 256);
|
|
|
|
// 0x07008B10 - 0x07008C00
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008B10, 0x004b80d0, 26886, 0x00008b10, 240);
|
|
|
|
// 0x07008C00 - 0x07008CF0
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008C00, 0x004b80d0, 26886, 0x00008c00, 240);
|
|
|
|
// 0x07008CF0 - 0x07008DE0
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008CF0, 0x004b80d0, 26886, 0x00008cf0, 240);
|
|
|
|
// 0x07008DE0 - 0x07008ED0
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008DE0, 0x004b80d0, 26886, 0x00008de0, 240);
|
|
|
|
// 0x07008ED0 - 0x07008FC0
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008ED0, 0x004b80d0, 26886, 0x00008ed0, 240);
|
|
|
|
// 0x07008FC0 - 0x070090B0
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07008FC0, 0x004b80d0, 26886, 0x00008fc0, 240);
|
|
|
|
// 0x070090B0 - 0x070091A0
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_070090B0, 0x004b80d0, 26886, 0x000090b0, 240);
|
|
|
|
// 0x070091A0 - 0x07009290
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_070091A0, 0x004b80d0, 26886, 0x000091a0, 240);
|
|
|
|
// 0x07009290 - 0x07009390
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009290, 0x004b80d0, 26886, 0x00009290, 256);
|
|
|
|
// 0x07009390 - 0x07009480
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009390, 0x004b80d0, 26886, 0x00009390, 240);
|
|
|
|
// 0x07009480 - 0x07009570
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009480, 0x004b80d0, 26886, 0x00009480, 240);
|
|
|
|
// 0x07009570 - 0x07009660
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009570, 0x004b80d0, 26886, 0x00009570, 240);
|
|
|
|
// 0x07009660 - 0x07009760
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009660, 0x004b80d0, 26886, 0x00009660, 256);
|
|
|
|
// 0x07009760 - 0x07009850
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009760, 0x004b80d0, 26886, 0x00009760, 240);
|
|
|
|
// 0x07009850 - 0x07009940
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009850, 0x004b80d0, 26886, 0x00009850, 240);
|
|
|
|
// 0x07009940 - 0x07009A30
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009940, 0x004b80d0, 26886, 0x00009940, 240);
|
|
|
|
// 0x07009A30 - 0x07009B20
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009A30, 0x004b80d0, 26886, 0x00009a30, 240);
|
|
|
|
// 0x07009B20 - 0x07009B50
|
|
ROM_ASSET_LOAD_VTX(cotmc_seg7_vertex_07009B20, 0x004b80d0, 26886, 0x00009b20, 48);
|
|
|
|
// 0x07009B50 - 0x0700A160
|
|
static const Gfx cotmc_seg7_dl_07009B50[] = {
|
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cotmc_seg7_texture_07001800),
|
|
gsDPLoadSync(),
|
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
|
gsSPLight(&cotmc_seg7_lights_07007E88.l, 1),
|
|
gsSPLight(&cotmc_seg7_lights_07007E88.a, 2),
|
|
gsSPVertex(cotmc_seg7_vertex_07007EA0, 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(cotmc_seg7_vertex_07007F90, 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(cotmc_seg7_vertex_07008080, 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(cotmc_seg7_vertex_07008170, 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(cotmc_seg7_vertex_07008260, 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(cotmc_seg7_vertex_07008350, 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(cotmc_seg7_vertex_07008440, 16, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
|
|
gsSP2Triangles(12, 13, 14, 0x0, 9, 11, 15, 0x0),
|
|
gsSPVertex(cotmc_seg7_vertex_07008540, 16, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 6, 7, 8, 0x0, 7, 9, 8, 0x0),
|
|
gsSP2Triangles(10, 11, 12, 0x0, 13, 14, 15, 0x0),
|
|
gsSPVertex(cotmc_seg7_vertex_07008640, 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(cotmc_seg7_vertex_07008730, 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(cotmc_seg7_vertex_07008820, 16, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
|
|
gsSP2Triangles( 9, 12, 10, 0x0, 13, 14, 15, 0x0),
|
|
gsSPVertex(cotmc_seg7_vertex_07008920, 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(cotmc_seg7_vertex_07008A10, 16, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 6, 3, 5, 0x0, 7, 8, 9, 0x0),
|
|
gsSP2Triangles(10, 11, 12, 0x0, 13, 14, 15, 0x0),
|
|
gsSPVertex(cotmc_seg7_vertex_07008B10, 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(cotmc_seg7_vertex_07008C00, 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(cotmc_seg7_vertex_07008CF0, 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(cotmc_seg7_vertex_07008DE0, 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(cotmc_seg7_vertex_07008ED0, 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(cotmc_seg7_vertex_07008FC0, 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(cotmc_seg7_vertex_070090B0, 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(cotmc_seg7_vertex_070091A0, 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(cotmc_seg7_vertex_07009290, 16, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 1, 3, 2, 0x0),
|
|
gsSP2Triangles( 4, 5, 6, 0x0, 7, 8, 9, 0x0),
|
|
gsSP2Triangles(10, 11, 12, 0x0, 13, 14, 15, 0x0),
|
|
gsSPVertex(cotmc_seg7_vertex_07009390, 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(cotmc_seg7_vertex_07009480, 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(cotmc_seg7_vertex_07009570, 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(cotmc_seg7_vertex_07009660, 16, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
|
gsSP2Triangles( 6, 7, 8, 0x0, 6, 8, 9, 0x0),
|
|
gsSP2Triangles(10, 11, 12, 0x0, 13, 14, 15, 0x0),
|
|
gsSPVertex(cotmc_seg7_vertex_07009760, 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(cotmc_seg7_vertex_07009850, 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(cotmc_seg7_vertex_07009940, 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(cotmc_seg7_vertex_07009A30, 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(cotmc_seg7_vertex_07009B20, 3, 0),
|
|
gsSP1Triangle( 0, 1, 2, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x0700A160 - 0x0700A1E0
|
|
const Gfx cotmc_seg7_dl_0700A160[] = {
|
|
gsDPPipeSync(),
|
|
gsSPSetGeometryMode(G_TEXTURE_GEN),
|
|
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(0x8000, 0x8000, 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(cotmc_seg7_dl_07009B50),
|
|
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPPipeSync(),
|
|
gsSPClearGeometryMode(G_TEXTURE_GEN),
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPSetGeometryMode(G_SHADING_SMOOTH),
|
|
gsSPEndDisplayList(),
|
|
};
|