From 4f5dc334335a186b2c193012e8a3a2c31fb5a006 Mon Sep 17 00:00:00 2001 From: roeming Date: Thu, 17 Jul 2025 11:57:28 -0400 Subject: [PATCH] starting work on adding data objects --- config/GAFE01_00/config.yml | 10 ++++++++++ config/GAFE01_00/foresta/splits.txt | 4 +++- configure.py | 1 + src/data/npc/model/mdl/act_ant.c | 29 +++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/data/npc/model/mdl/act_ant.c diff --git a/config/GAFE01_00/config.yml b/config/GAFE01_00/config.yml index 804841cc..2091990f 100644 --- a/config/GAFE01_00/config.yml +++ b/config/GAFE01_00/config.yml @@ -25361,3 +25361,13 @@ modules: header: assets/obj_s_house_i_pal.inc header_type: none custom_type: pal16 + + - symbol: act_ant_tex + binary: assets/act_ant_tex.bin + header: assets/act_ant_tex.inc + header_type: raw + + - symbol: act_ant_v + binary: assets/act_ant_v.bin + header: assets/act_ant_v.inc + custom_type: vtx diff --git a/config/GAFE01_00/foresta/splits.txt b/config/GAFE01_00/foresta/splits.txt index f7271c7a..077b4911 100644 --- a/config/GAFE01_00/foresta/splits.txt +++ b/config/GAFE01_00/foresta/splits.txt @@ -3636,8 +3636,10 @@ data/npc/model/mdl/bev_1.c: data/npc/model/tex/bev_1.c: .data start:0x000952E0 end:0x00096000 -data/dataobject/dataobject_96000: +data/npc/model/mdl/act_ant.c: .data start:0x00096000 end:0x00096328 + +data/dataobject/dataobject_96328.c: .data start:0x00096328 end:0x00096338 data/npc/model/mdl/ant_1.c: diff --git a/configure.py b/configure.py index 824544fa..061a1635 100644 --- a/configure.py +++ b/configure.py @@ -2631,6 +2631,7 @@ config.libs = [ Object(Matching, "data/field/mvactor/tent.c"), Object(Matching, "data/field/mvactor/title_demo.c"), Object(Matching, "data/field/mvactor/water_test.c"), + Object(Matching, "data/npc/model/mdl/act_ant.c"), ], ), ] diff --git a/src/data/npc/model/mdl/act_ant.c b/src/data/npc/model/mdl/act_ant.c new file mode 100644 index 00000000..c54a9cdb --- /dev/null +++ b/src/data/npc/model/mdl/act_ant.c @@ -0,0 +1,29 @@ +#include "libforest/gbi_extensions.h" +#include "PR/gbi.h" + +u8 act_ant_tex[] ATTRIBUTE_ALIGN(32) = { +#include "assets/act_ant_tex.inc" +}; + +Vtx act_ant_v[] = { +#include "assets/act_ant_v.inc" +}; + +Gfx act_antT_model[] = { + gsSPTexture(4000, 4000, 0, G_TX_RENDERTILE, G_ON), + gsDPSetCombineLERP(0, 0, 0, PRIMITIVE, 1, 0, TEXEL0, TEXEL1, 0, 0, 0, COMBINED, COMBINED, 0, PRIMITIVE, 0), + gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2), + gsDPSetTextureImage_Dolphin(G_IM_FMT_I, G_IM_SIZ_4b, 32, 32, act_ant_tex), + gsDPSetTile_Dolphin(G_DOLPHIN_TLUT_DEFAULT_MODE, 0, 15, GX_REPEAT, GX_REPEAT, 0, 0), + gsDPSetTextureImage_Dolphin(G_IM_FMT_I, G_IM_SIZ_4b, 32, 32, act_ant_tex), + gsDPSetTile_Dolphin(G_DOLPHIN_TLUT_DEFAULT_MODE, 1, 15, GX_REPEAT, GX_REPEAT, 0, 0), + gsSPDisplayList(0x8000000), + gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | + G_SHADING_SMOOTH), + gsSPVertex(act_ant_v, 11, 0), + gsSPNTrianglesInit_5b(12, 0, 1, 2, 1, 3, 2, 1, 4, 3), + gsSPNTriangles_5b(4, 5, 3, 4, 6, 5, 0, 2, 7, 2, 8, 7), + gsSPNTriangles_5b(8, 9, 7, 8, 5, 9, 5, 10, 9, 2, 3, 5), + gsSPNTriangles_5b(2, 5, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0), + gsSPEndDisplayList(), +};