sm64coopdx/actors/coin/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

154 lines
5.6 KiB
C

#include "pc/rom_assets.h"
// Coin
// 0x030056C0
ROM_ASSET_LOAD_VTX(coin_seg3_vertex_030056C0, 0x00201410, 96653, 0x000056c0, 64);
// 0x03005700
ROM_ASSET_LOAD_VTX(coin_seg3_vertex_03005700, 0x00201410, 96653, 0x00005700, 64);
// 0x03005740
ROM_ASSET_LOAD_VTX(coin_seg3_vertex_03005740, 0x00201410, 96653, 0x00005740, 64);
// 0x03005780
ROM_ASSET_LOAD_TEXTURE(coin_seg3_texture_03005780, "actors/coin/coin_front.ia16.inc.c", 0x00201410, 96653, 0x00005780, 2048);
// 0x03005F80
ROM_ASSET_LOAD_TEXTURE(coin_seg3_texture_03005F80, "actors/coin/coin_tilt_right.ia16.inc.c", 0x00201410, 96653, 0x00005f80, 2048);
// 0x03006780
ROM_ASSET_LOAD_TEXTURE(coin_seg3_texture_03006780, "actors/coin/coin_side.ia16.inc.c", 0x00201410, 96653, 0x00006780, 2048);
// 0x03006F80
ROM_ASSET_LOAD_TEXTURE(coin_seg3_texture_03006F80, "actors/coin/coin_tilt_left.ia16.inc.c", 0x00201410, 96653, 0x00006f80, 2048);
// 0x03007780 - 0x030077D0
const Gfx coin_seg3_dl_03007780[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON),
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsDPSetTile(G_IM_FMT_IA, 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(),
};
// 0x030077D0 - 0x03007800
const Gfx coin_seg3_dl_030077D0[] = {
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSPTexture(0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
// 0x03007800 - 0x03007828
const Gfx coin_seg3_dl_03007800[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03005780),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_030056C0, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x03007828 - 0x03007850
const Gfx coin_seg3_dl_03007828[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03005F80),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_030056C0, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x03007850 - 0x03007878
const Gfx coin_seg3_dl_03007850[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03006780),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_030056C0, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x03007878 - 0x030078A0
const Gfx coin_seg3_dl_03007878[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03006F80),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_030056C0, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x030078A0 - 0x030078C8
const Gfx coin_seg3_dl_030078A0[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03005780),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_03005700, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x030078C8 - 0x030078F0
const Gfx coin_seg3_dl_030078C8[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03005F80),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_03005700, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x030078F0 - 0x03007918
const Gfx coin_seg3_dl_030078F0[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03006780),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_03005700, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x03007918 - 0x03007940
const Gfx coin_seg3_dl_03007918[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03006F80),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_03005700, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x03007940 - 0x03007968
const Gfx coin_seg3_dl_03007940[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03005780),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_03005740, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x03007968 - 0x03007990
const Gfx coin_seg3_dl_03007968[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03005F80),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_03005740, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x03007990 - 0x030079B8
const Gfx coin_seg3_dl_03007990[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03006780),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_03005740, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};
// 0x030079B8 - 0x030079E0
const Gfx coin_seg3_dl_030079B8[] = {
gsDPPipeSync(),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, coin_seg3_texture_03006F80),
gsSPDisplayList(coin_seg3_dl_03007780),
gsSPVertexNonGlobal(coin_seg3_vertex_03005740, 4, 0),
gsSPBranchList(coin_seg3_dl_030077D0),
};