mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-08 10:03:06 -04:00
Fix false pointer relocations in data breaking shiftability (#2296)
* Fix false pointer relocations in data breaking shiftability * Update matDL_dis.py from tww * remove debug prints from matDL build script * matDL build rule: Allow specifying global/local scope * Use asset extraction for ShieldD * Set mode `+x` on executable Python scripts * set `+x` on matDL_dis
This commit is contained in:
@@ -1178,8 +1178,8 @@ SECTION_DATA static u8 l_flowerTexCoord[] = {
|
||||
#include "assets/l_J_hana00_cDL.h" // ALIGN 32
|
||||
|
||||
/* 80525AD8-80525B78 002900 0099+07 0/2 0/0 0/0 .data l_matDL */
|
||||
#include "assets/l_matDL.h"
|
||||
l_matDL(l_J_Ohana00_64TEX)
|
||||
#include "assets/l_matDL__d_a_grass.h"
|
||||
l_matDL__d_a_grass(l_J_Ohana00_64TEX)
|
||||
|
||||
/* 80525B78-80525C18 0029A0 0099+07 0/2 0/0 0/0 .data l_matLight4DL */
|
||||
#include "assets/l_matLight4DL.h"
|
||||
@@ -1341,8 +1341,8 @@ SECTION_DATA static u8 l_flowerTexCoord2[] = {
|
||||
#include "assets/l_J_hana01_c_01DL.h" // ALIGN 32
|
||||
|
||||
/* 80527698-80527738 0044C0 0099+07 0/2 0/0 0/0 .data l_mat2DL */
|
||||
#include "assets/l_mat2DL.h"
|
||||
l_mat2DL(l_J_Ohana01_64128_0419TEX)
|
||||
#include "assets/l_mat2DL__d_a_grass.h"
|
||||
l_mat2DL__d_a_grass(l_J_Ohana01_64128_0419TEX)
|
||||
|
||||
/* 80527738-805277D4 004560 0099+03 0/2 0/0 0/0 .data l_mat2Light4DL */
|
||||
#include "assets/l_mat2Light4DL.h"
|
||||
|
||||
@@ -586,7 +586,7 @@ static u8 l_shadowVolMat[] ALIGN_DECL(32) = {
|
||||
0x61, 0x28, 0x38, 0x00, 0x00, 0x61, 0xC0, 0x08, 0xFF, 0xFC, 0x61, 0xC1, 0x08, 0xFF, 0x90,
|
||||
0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x0D, 0x61, 0x41, 0x00, 0x01, 0x35,
|
||||
0x61, 0xF3, 0x7F, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10,
|
||||
0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x80, 0x10, 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,
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ static void messageSet(u32 status, bool i_drawBg) {
|
||||
BMG_INF1* inf1 = (BMG_INF1*)&msg_data[0x20];
|
||||
const char* msg_p = (const char*)((u8*)inf1->getNext() + sizeof(JUTDataBlockHeader) + inf1->entries[status]);
|
||||
|
||||
JUT_ASSERT(std::strlen(msg_p)-1 < 512);
|
||||
JUT_ASSERT(102, std::strlen(msg_p)-1 < 512);
|
||||
|
||||
J2DTextBox tpane('TEXT1', JGeometry::TBox2<f32>(0.0f, 0.0f, 608.0f, 200.0f), (ResFONT*)font_data, msg_p, 512, HBIND_CENTER, VBIND_CENTER);
|
||||
J2DTextBox spane('TEXT2', JGeometry::TBox2<f32>(0.0f, 0.0f, 608.0f, 200.0f), (ResFONT*)font_data, msg_p, 512, HBIND_CENTER, VBIND_CENTER);
|
||||
@@ -85,7 +85,7 @@ static void messageSet(u32 status, bool i_drawBg) {
|
||||
if (*msg_p == '\n') {
|
||||
height += 23.0f;
|
||||
cnt++;
|
||||
JUT_ASSERT(cnt < lineMax);
|
||||
JUT_ASSERT(191, cnt < lineMax);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
+124
-124
@@ -477,67 +477,67 @@ void renderingDmap_c::getLineWidth(int param_0) {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80395860-80395950 -00001 00F0+00 1/1 0/0 0/0 .rodata l_paletteDmap_m */
|
||||
SECTION_RODATA static void* const l_paletteDmap_m[60] = {
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)0xA208A208,
|
||||
(void*)0xA208A208,
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)0x81008100,
|
||||
(void*)0x81008100,
|
||||
(void*)0xA208A208,
|
||||
(void*)0xA208A208,
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)0x9CE79CE7,
|
||||
(void*)0x9CE79CE7,
|
||||
(void*)0x81108110,
|
||||
(void*)0x81108110,
|
||||
(void*)0xA208A208,
|
||||
(void*)0xA208A208,
|
||||
(void*)0x98109810,
|
||||
(void*)0x98109810,
|
||||
(void*)0x98009800,
|
||||
(void*)0x98009800,
|
||||
(void*)0x82008200,
|
||||
(void*)0x82008200,
|
||||
(void*)0xC3F0C3F0,
|
||||
(void*)0xC3F0C3F0,
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)0x9CE79CE7,
|
||||
(void*)0x9CE79CE7,
|
||||
(void*)0x821F821F,
|
||||
(void*)0x821F821F,
|
||||
(void*)0xC3F0C3F0,
|
||||
(void*)0xC3F0C3F0,
|
||||
(void*)0xB01FB01F,
|
||||
(void*)0xB01FB01F,
|
||||
(void*)0xB000B000,
|
||||
(void*)0xB000B000,
|
||||
(void*)0x98C698C6,
|
||||
(void*)0x98C698C6,
|
||||
(void*)0xE739E739,
|
||||
(void*)0xE739E739,
|
||||
(void*)0x98C698C6,
|
||||
(void*)0x98C698C6,
|
||||
(void*)0xE739E739,
|
||||
(void*)0xE739E739,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
SECTION_RODATA static u32 const l_paletteDmap_m[60] = {
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0xA208A208,
|
||||
0xA208A208,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x81008100,
|
||||
0x81008100,
|
||||
0xA208A208,
|
||||
0xA208A208,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x9CE79CE7,
|
||||
0x9CE79CE7,
|
||||
0x81108110,
|
||||
0x81108110,
|
||||
0xA208A208,
|
||||
0xA208A208,
|
||||
0x98109810,
|
||||
0x98109810,
|
||||
0x98009800,
|
||||
0x98009800,
|
||||
0x82008200,
|
||||
0x82008200,
|
||||
0xC3F0C3F0,
|
||||
0xC3F0C3F0,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x9CE79CE7,
|
||||
0x9CE79CE7,
|
||||
0x821F821F,
|
||||
0x821F821F,
|
||||
0xC3F0C3F0,
|
||||
0xC3F0C3F0,
|
||||
0xB01FB01F,
|
||||
0xB01FB01F,
|
||||
0xB000B000,
|
||||
0xB000B000,
|
||||
0x98C698C6,
|
||||
0x98C698C6,
|
||||
0xE739E739,
|
||||
0xE739E739,
|
||||
0x98C698C6,
|
||||
0x98C698C6,
|
||||
0xE739E739,
|
||||
0xE739E739,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80395860, &l_paletteDmap_m);
|
||||
|
||||
@@ -792,68 +792,68 @@ void dMenu_DmapMapCtrl_c::getZoomCmPerPixel() {
|
||||
/* 803BCBC0-803BCCB4 -00001 00F4+00 0/0 0/0 0/0 .data l_data */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DATA static void* l_data[61] = {
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)0xA208A208,
|
||||
(void*)0xA208A208,
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)0x81008100,
|
||||
(void*)0x81008100,
|
||||
(void*)0xA208A208,
|
||||
(void*)0xA208A208,
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)0x9CE79CE7,
|
||||
(void*)0x9CE79CE7,
|
||||
(void*)0x81108110,
|
||||
(void*)0x81108110,
|
||||
(void*)0xA208A208,
|
||||
(void*)0xA208A208,
|
||||
(void*)0x98109810,
|
||||
(void*)0x98109810,
|
||||
(void*)0x98009800,
|
||||
(void*)0x98009800,
|
||||
(void*)0x82008200,
|
||||
(void*)0x82008200,
|
||||
(void*)0xC3F0C3F0,
|
||||
(void*)0xC3F0C3F0,
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)(((char*)fadeOut__13mDoGph_gInf_cFfR8_GXColor) + 0x28),
|
||||
(void*)0x9CE79CE7,
|
||||
(void*)0x9CE79CE7,
|
||||
(void*)0x821F821F,
|
||||
(void*)0x821F821F,
|
||||
(void*)0xC3F0C3F0,
|
||||
(void*)0xC3F0C3F0,
|
||||
(void*)0xB01FB01F,
|
||||
(void*)0xB01FB01F,
|
||||
(void*)0xB000B000,
|
||||
(void*)0xB000B000,
|
||||
(void*)0x98C698C6,
|
||||
(void*)0x98C698C6,
|
||||
(void*)0xE739E739,
|
||||
(void*)0xE739E739,
|
||||
(void*)0x98C698C6,
|
||||
(void*)0x98C698C6,
|
||||
(void*)0xE739E739,
|
||||
(void*)0xE739E739,
|
||||
(void*)0x45610000,
|
||||
SECTION_DATA static u32 l_data[61] = {
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0xA208A208,
|
||||
0xA208A208,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x81008100,
|
||||
0x81008100,
|
||||
0xA208A208,
|
||||
0xA208A208,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x9CE79CE7,
|
||||
0x9CE79CE7,
|
||||
0x81108110,
|
||||
0x81108110,
|
||||
0xA208A208,
|
||||
0xA208A208,
|
||||
0x98109810,
|
||||
0x98109810,
|
||||
0x98009800,
|
||||
0x98009800,
|
||||
0x82008200,
|
||||
0x82008200,
|
||||
0xC3F0C3F0,
|
||||
0xC3F0C3F0,
|
||||
0x80008000,
|
||||
0x80008000,
|
||||
0x9CE79CE7,
|
||||
0x9CE79CE7,
|
||||
0x821F821F,
|
||||
0x821F821F,
|
||||
0xC3F0C3F0,
|
||||
0xC3F0C3F0,
|
||||
0xB01FB01F,
|
||||
0xB01FB01F,
|
||||
0xB000B000,
|
||||
0xB000B000,
|
||||
0x98C698C6,
|
||||
0x98C698C6,
|
||||
0xE739E739,
|
||||
0xE739E739,
|
||||
0x98C698C6,
|
||||
0x98C698C6,
|
||||
0xE739E739,
|
||||
0xE739E739,
|
||||
0x45610000,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
@@ -1286,4 +1286,4 @@ SECTION_DATA extern void* __vt__15renderingDmap_c[43 + 1 /* padding */] = {
|
||||
(void*)getRestartCursorSize__15renderingDmap_cFv,
|
||||
/* padding */
|
||||
NULL,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2141,7 +2141,7 @@ static u8 l_matDL[132] ALIGN_DECL(32) = {
|
||||
|
||||
/* 803A3160-803A31F0 000280 008D+03 1/1 0/0 0/0 .data l_mat1DL */
|
||||
static u8 l_mat1DL[141] ALIGN_DECL(32) = {
|
||||
0x10, 0x00, 0x00, 0x10, 0x40, 0xFF, 0xFF, 0x42, 0x00, 0x00, 0x00, 0x00, 0xF3, 0xCF, 0x00, 0x10,
|
||||
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, 0x7F,
|
||||
0x32, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0C, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0x61, 0x28, 0x38, 0x00, 0x40, 0x61, 0xC0, 0x28, 0xFA, 0x8F, 0x61, 0xC1, 0x08,
|
||||
|
||||
Reference in New Issue
Block a user