mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
* 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>
128 lines
5.1 KiB
C
128 lines
5.1 KiB
C
#include "pc/rom_assets.h"
|
|
// Quicksand Pit
|
|
|
|
// 0x07004000 - 0x07004018
|
|
static const Lights1 ssl_lights_quicksand_pit = gdSPDefLights1(
|
|
0x3f, 0x3f, 0x3f,
|
|
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
|
);
|
|
|
|
// 0x07004018 - 0x07004818
|
|
ROM_ASSET_LOAD_TEXTURE(ssl_quicksand, "levels/ssl/7.rgba16.inc.c", 0x0032d070, 31409, 0x00008000, 2048);
|
|
|
|
// 0x07004818 - 0x07004860
|
|
const Gfx ssl_dl_quicksand_pit_begin[] = {
|
|
gsDPPipeSync(),
|
|
gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
|
|
gsSPLight(&ssl_lights_quicksand_pit.l, 1),
|
|
gsSPLight(&ssl_lights_quicksand_pit.a, 2),
|
|
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),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x07004860 - 0x07004880
|
|
const Gfx ssl_dl_quicksand_pit_end[] = {
|
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPPipeSync(),
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x07004880 - 0x070048F8
|
|
const Gfx ssl_dl_pyramid_quicksand_pit_begin[] = {
|
|
gsDPPipeSync(),
|
|
gsDPSetCycleType(G_CYC_2CYCLE),
|
|
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2),
|
|
gsDPSetDepthSource(G_ZS_PIXEL),
|
|
gsDPSetFogColor(0, 0, 0, 255),
|
|
gsSPFogFactor(0x0E49, 0xF2B7), // This isn't gsSPFogPosition since there is no valid min/max pair that corresponds to 0x0E49F2B7
|
|
gsSPSetGeometryMode(G_FOG),
|
|
gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_PASS2),
|
|
gsSPLight(&ssl_lights_quicksand_pit.l, 1),
|
|
gsSPLight(&ssl_lights_quicksand_pit.a, 2),
|
|
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),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x070048F8 - 0x07004930
|
|
const Gfx ssl_dl_pyramid_quicksand_pit_end[] = {
|
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPPipeSync(),
|
|
gsDPSetCycleType(G_CYC_1CYCLE),
|
|
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_NOOP2),
|
|
gsSPClearGeometryMode(G_FOG),
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x07004930 - 0x07004AB4
|
|
Movtex ssl_movtex_tris_quicksand_pit[] = {
|
|
MOV_TEX_SPD( 10),
|
|
MOV_TEX_LIGHT_TRIS( 0, -204, 0, 127, 0, 0),
|
|
MOV_TEX_LIGHT_TRIS( 1024, 0, 0, 127, 2, 0),
|
|
MOV_TEX_LIGHT_TRIS( 512, 0, -886, 127, 2, 1),
|
|
MOV_TEX_LIGHT_TRIS( -511, 0, -886, 127, 2, 2),
|
|
MOV_TEX_LIGHT_TRIS(-1023, 0, 0, 127, 2, 3),
|
|
MOV_TEX_LIGHT_TRIS( -511, 0, 887, 127, 2, 2),
|
|
MOV_TEX_LIGHT_TRIS( 512, 0, 887, 127, 2, 1),
|
|
MOV_TEX_LIGHT_TRIS( 1024, 0, 0, 127, 2, 0),
|
|
MOV_TEX_END(),
|
|
};
|
|
|
|
// 0x070049B4 - 0x07004A38
|
|
Movtex ssl_movtex_tris_pyramid_quicksand_pit[] = {
|
|
MOV_TEX_SPD( 5),
|
|
MOV_TEX_LIGHT_TRIS( 0, -204, 0, 127, 0, 0),
|
|
MOV_TEX_LIGHT_TRIS( 1024, 0, 0, 127, 2, 0),
|
|
MOV_TEX_LIGHT_TRIS( 512, 0, -886, 127, 2, 1),
|
|
MOV_TEX_LIGHT_TRIS( -511, 0, -886, 127, 2, 2),
|
|
MOV_TEX_LIGHT_TRIS(-1023, 0, 0, 127, 2, 3),
|
|
MOV_TEX_LIGHT_TRIS( -511, 0, 887, 127, 2, 2),
|
|
MOV_TEX_LIGHT_TRIS( 512, 0, 887, 127, 2, 1),
|
|
MOV_TEX_LIGHT_TRIS( 1024, 0, 0, 127, 2, 0),
|
|
MOV_TEX_END(),
|
|
};
|
|
|
|
// 0x07004A38 - 0x07004A70
|
|
const Gfx ssl_dl_quicksand_pit[] = {
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
|
gsSP2Triangles( 0, 3, 4, 0x0, 0, 4, 5, 0x0),
|
|
gsSP2Triangles( 0, 5, 6, 0x0, 0, 6, 7, 0x0),
|
|
gsSPEndDisplayList(),
|
|
};
|
|
|
|
// 0x07004A70 - 0x07004AE0
|
|
ROM_ASSET_LOAD_VTX(ssl_seg7_vertex_07004A70, 0x003e76b0, 82641, 0x00004a70, 112);
|
|
|
|
// 0x07004AE0 - 0x07004BE0
|
|
const Gfx ssl_dl_pyramid_quicksand_pit_static[] = {
|
|
gsDPPipeSync(),
|
|
gsDPSetCycleType(G_CYC_2CYCLE),
|
|
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2),
|
|
gsDPSetDepthSource(G_ZS_PIXEL),
|
|
gsDPSetFogColor(0, 0, 0, 255),
|
|
gsSPFogFactor(0x0E49, 0xF2B7), // This isn't gsSPFogPosition since there is no valid min/max pair that corresponds to 0x0E49F2B7
|
|
gsSPSetGeometryMode(G_FOG),
|
|
gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_PASS2),
|
|
gsSPLight(&ssl_lights_quicksand_pit.l, 1),
|
|
gsSPLight(&ssl_lights_quicksand_pit.a, 2),
|
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
|
gsDPLoadTextureBlock(ssl_pyramid_sand, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
|
|
gsSPVertex(ssl_seg7_vertex_07004A70, 7, 0),
|
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
|
gsSP2Triangles( 0, 3, 4, 0x0, 0, 4, 5, 0x0),
|
|
gsSP2Triangles( 0, 5, 6, 0x0, 0, 6, 1, 0x0),
|
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
|
gsDPPipeSync(),
|
|
gsDPSetCycleType(G_CYC_1CYCLE),
|
|
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_NOOP2),
|
|
gsSPClearGeometryMode(G_FOG),
|
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
|
gsSPEndDisplayList(),
|
|
};
|