Add custom build rule for material display lists with image addresses in them

This commit is contained in:
LagoLunatic
2024-11-01 19:32:15 -04:00
parent a16d8cee02
commit e9f82ff359
9 changed files with 543 additions and 114 deletions
+2 -21
View File
@@ -10,9 +10,6 @@
#include "weak_data_2100_2080.h" // IWYU pragma: keep
#define CONST_U32(v) ((u8)((v) >> 16)), ((u8)((v) >> 8)), ((u8)((v) >> 0))
#define IMAGE_ADDR(addr) CONST_U32((u32)(addr) >> 5)
#include "assets/l_chainS3TCTEX__d_chain.h"
const u16 l_chainS3TCTEX__width = 32;
const u16 l_chainS3TCTEX__height = 32;
@@ -49,24 +46,8 @@ static cXy l_texCoord[] = {
#include "assets/l_chainDL__d_chain.h"
static u8 l_matDL[0xa8] ALIGN_DECL(32) = {
0x61, 0x80, 0x00, 0x01, 0x3A,
0x61, 0x84, 0x00, 0x00, 0x00,
0x61, 0x88, 0xE0, 0x7C, 0x1F,
0x61, 0x94, IMAGE_ADDR(&l_chainS3TCTEX),
0x61, 0x30, 0x00, (l_chainS3TCTEX__width >> 0x08), (l_chainS3TCTEX__width >> 0x00),
0x61, 0x31, 0x00, (l_chainS3TCTEX__height >> 0x08), (l_chainS3TCTEX__height >> 0x00),
0x10, 0x00, 0x00, 0x10, 0x40, 0xFF, 0xFF, 0x42, 0x80,
0x08, 0x30, 0x3C, 0xF3, 0xCF, 0x00, 0x10, 0x00, 0x00,
0x10, 0x18, 0x3C, 0xF3, 0xCF, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x05, 0x43, 0x61,
0x28, 0x3C, 0x00, 0x00, 0x61, 0xC0, 0x08, 0x24, 0xAF, 0x61, 0xC1, 0x08, 0xFF, 0xF0, 0x61, 0x28,
0x3C, 0x00, 0x00, 0x61, 0xC2, 0x08, 0xF0, 0x8F, 0x61, 0xC3, 0x08, 0xFF, 0xC0, 0x61, 0x43, 0x00,
0x00, 0x01, 0x61, 0x40, 0x00, 0x00, 0x17, 0x61, 0x41, 0x00, 0x01, 0x0C, 0x61, 0xF3, 0x64, 0x00,
0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x10, 0x09, 0x00,
0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x04, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
#include "assets/l_matDL__d_chain.h"
l_matDL__d_chain(l_chainS3TCTEX);
/* 800628B4-80062954 .text __ct__15dChain_packet_cFiP12dKy_tevstr_cf */
dChain_packet_c::dChain_packet_c(int num, dKy_tevstr_c* tevstr, f32 scale) {