summaryrefslogtreecommitdiff
path: root/src/d/d_chain.cpp
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2024-11-01 19:32:15 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2024-11-01 19:32:15 -0400
commite9f82ff359b9cffb9770ebab263770e207d6ee79 (patch)
tree5a16c138f43b90035e307f9e08fdcbeab38eff7a /src/d/d_chain.cpp
parenta16d8cee02c7cd1410215f389ae69ac86eeb5e58 (diff)
Add custom build rule for material display lists with image addresses in them
Diffstat (limited to 'src/d/d_chain.cpp')
-rw-r--r--src/d/d_chain.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/d/d_chain.cpp b/src/d/d_chain.cpp
index 4d6e6e44..a61e4989 100644
--- a/src/d/d_chain.cpp
+++ b/src/d/d_chain.cpp
@@ -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) {