Compare commits

..

6 Commits

Author SHA1 Message Date
coah
0bbd4b8d51 cleanup(iplBoardObject): rename Cos/Sin Ghidra locals
dVar2 → cosF, dVar3 → sinF in BoardObject::stt_stand.
2026-10-01 18:35:06 -05:00
coah
196b14aa58 cleanup(CDBDatabase): prefix Matching asm L_* labels with function names (#644)
Rename 169 bare address labels inside the seven Search* asm functions to
FunctionName_L_<addr>, matching the nand_drv style, so local branches are
readable without changing codegen.

Verified: ninja build/43U/ok; CDBDatabase 100%/100%; DOL sha1 unchanged.
2026-10-01 18:34:25 -05:00
coah
1dde229702 cleanup(sdChannelSelect): drop unused iplSDChannelSelect_813DD240 decl (#643)
The real path is collectTitlesFromNandUsage; this extern was never called.
Build still OK; DOL sha1 unchanged.
2026-10-01 18:33:58 -05:00
coah
94c03497ff cleanup(SDChannelObj): name address-suffixed C helpers (#636)
Rename iplSDChannelObj_813E* helpers to semantic names (setHeaps,
createBaseLayout, getLocalizedName, etc.) across the unit, callers,
header, and symbols.txt. Byte-identical: ok + sha1
26116613f624061ba99c8d1a299aaa6efa85670d; unit still ~90% code /
~99.99% fuzzy.
2026-10-01 18:33:42 -05:00
coah
e9dd012c09 cleanup(zmtkey): name Zi8MapKeyCode helper (#642)
Rename Zi8_81484484 (OEM/private-use wchar → key index) to
Zi8MapKeyCode. Byte-identical: ok + sha1
26116613f624061ba99c8d1a299aaa6efa85670d; unit still ~67.1% code /
~99.85% fuzzy.
2026-10-01 18:33:31 -05:00
coah
90e7b0ff2c iplSensitivity: suppress inline Rect dtor weak (#641)
Define IPL_CONTROLLER_TRIVIAL_RECT_DTOR so this TU no longer emits
~nw4r::ut::Rect. Compiled .text becomes byte-identical to the extract
(1112 bytes). Matching still blocked on .sdata2 layout (48 vs 56).

Co-authored-by: linker <linker@users.noreply.github.com>
2026-10-01 18:33:24 -05:00
6 changed files with 429 additions and 430 deletions

View File

@@ -7284,7 +7284,7 @@ Zi8_814834AC = .text:0x814834AC; // type:function size:0x55C
Zi8GetKOcandidates = .text:0x81483A08; // type:function size:0xA74
Zi8LogError = .text:0x8148447C; // type:function size:0x4
Zi8ReplaceLastError = .text:0x81484480; // type:function size:0x4
Zi8_81484484 = .text:0x81484484; // type:function size:0x80
Zi8MapKeyCode = .text:0x81484484; // type:function size:0x80
ziNumKeysWithChars = .text:0x81484504; // type:function size:0xC4 scope:local
Zi8getKeyLayout = .text:0x814845C8; // type:function size:0x2D8
Zi8ChangeCharCase = .text:0x814848A0; // type:function size:0x48C

View File

@@ -8,7 +8,7 @@ ziU16 Zi8GetTableCount(ziU8 language, ziU8 tableIndex, ziPtr __zi8_work_data);
ziU32 Zi8GetTableAddress(ziU8 language, ziU8 tableIndex, ziPtr __zi8_work_data);
ziU8 Zi8getKeyLayout(ziU8 language, ziWChar key, ziWChar* chars, ziU8 mode, ziPtr __zi8_work_data);
ziBool Zi8_81484484(ziWChar character, ziWChar* output, ziPtr __zi8_work_data) {
ziBool Zi8MapKeyCode(ziWChar character, ziWChar* output, ziPtr __zi8_work_data) {
if (character == 0xeffa) {
*output = 0;
} else if ((character >= 0xeff1) && (character <= 0xeff9)) {
@@ -58,7 +58,7 @@ ziBool Zi8getKeyLayout(ziU8 language, ziWChar key, ziWChar* chars, ziU8 mode, zi
*chars = 0;
if (ZI_WORK->userKeys[language] != 0) {
customTable = ZI_WORK->userKeys[language];
if (!Zi8_81484484(key, &key, __zi8_work_data)) {
if (!Zi8MapKeyCode(key, &key, __zi8_work_data)) {
return 0;
}
keyChars = customTable->lower[key];
@@ -87,7 +87,7 @@ tables_ready:
Zi8ReplaceLastError(0x962, __zi8_work_data);
return 0;
}
if (!Zi8_81484484(key, &key, __zi8_work_data) || (key >= numKeys)) {
if (!Zi8MapKeyCode(key, &key, __zi8_work_data) || (key >= numKeys)) {
Zi8ReplaceLastError(300, __zi8_work_data);
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@@ -486,12 +486,12 @@ namespace ipl {
void BoardObject::stt_stand() {
f32 degrees = mStandData.unk_0x0C * 30.0f + 30.0f;
f32 dVar2 = nw4r::math::CosFIdx(degrees * 0.7111111f);
f32 cosF = nw4r::math::CosFIdx(degrees * 0.7111111f);
degrees = mStandData.unk_0x0C * 30.0f + 30.0f;
f32 dVar3 = nw4r::math::SinFIdx(degrees * 0.7111111f);
f32 sinF = nw4r::math::SinFIdx(degrees * 0.7111111f);
math::VEC2 standPos;
__ct__Q33ipl4math4VEC2Fff(&standPos, dVar3 * 160.0f, dVar2 * 160.0f);
__ct__Q33ipl4math4VEC2Fff(&standPos, sinF * 160.0f, cosF * 160.0f);
mBoardPos = (((mStandData.pos * (f32)(10 - mStandData.unk_0x08)) + (standPos * mStandData.unk_0x08)) / 10.0f);
if ((mStandData.unk_0x08 += 1) > 10) {

View File

@@ -107,11 +107,6 @@ namespace ipl {
extern "C" bool iplSDChannelSelect_813DD240(
SDChannelSelect* scene, const s32* requiredBytes, const s32* requiredBlocks,
ESTitleId* titleIds, char* titleNames, u32* titleCount);
extern "C" void iplSDChannelObj_resetDialogAnim(SDChannelObj* channel, int enabled);

View File

@@ -1,3 +1,7 @@
#define IPL_CONTROLLER_TRIVIAL_RECT_DTOR
#include <nw4r/ut/Rect.h>
#undef IPL_CONTROLLER_TRIVIAL_RECT_DTOR
#include "system/iplSystem.h"
#include "system/iplNand.h"
#include "utility/iplGraphics.h"