diff options
| author | Carco_21 <144170194+carter-ktb21@users.noreply.github.com> | 2025-11-25 11:34:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-25 18:34:19 +0200 |
| commit | 9e232b61fbac3d4a7564237426b4f0f696bc231f (patch) | |
| tree | 912b6fc24f87977d4e8ae1a7c26b8d9a1afc725b /src/JSystem/J2DGraph/J2DMaterialFactory.cpp | |
| parent | 2f2f37a7345d889aa1072b10e3a5022ad1bd15f1 (diff) | |
Small matches/improvements (#2844)
* j2dmatblock debug work
* J2DMaterialFactory matching
* J2DPictureEx matching
* tiny work
* fixed regressions
* PR cleanup
* build error fix
Diffstat (limited to 'src/JSystem/J2DGraph/J2DMaterialFactory.cpp')
| -rw-r--r-- | src/JSystem/J2DGraph/J2DMaterialFactory.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp b/src/JSystem/J2DGraph/J2DMaterialFactory.cpp index c10f431247..2e2e836041 100644 --- a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp +++ b/src/JSystem/J2DGraph/J2DMaterialFactory.cpp @@ -290,24 +290,32 @@ J2DTevOrder J2DMaterialFactory::newTevOrder(int param_0, int param_1) const { return J2DTevOrder(); } -/* 802F3A1C-802F3AB4 2EE35C 0098+00 1/1 0/0 0/0 .text newTevColor__18J2DMaterialFactoryCFii */ -// NONMATCHING - J2DGXColorS10 init issues +/* 802F3A1C-802F3AB4 2EE35C 0098+00 1/1 0/0 0/0 .text newTevColor__18J2DMaterialFactoryCFii */ J2DGXColorS10 J2DMaterialFactory::newTevColor(int param_0, int param_1) const { + // FAKEMATCH + #if DEBUG || VERSION == VERSION_WII_USA_R0 || VERSION == VERSION_WII_USA_R2 GXColorS10 color = {0, 0, 0, 0}; - J2DGXColorS10 rv = J2DGXColorS10(color); + J2DGXColorS10 rv = color; + #else + GXColorS10 color = {0, 0, 0, 0}; + J2DGXColorS10 rv; + rv.r = color.r; + rv.g = color.g; + rv.b = color.b; + rv.a = color.a; + #endif J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + if (iVar2->field_0x92[param_1] != 0xffff) { return field_0x38[iVar2->field_0x92[param_1]]; } + return rv; } -/* ############################################################################################## */ - -/* 802F3AB4-802F3B54 2EE3F4 00A0+00 1/1 0/0 0/0 .text newTevKColor__18J2DMaterialFactoryCFii */ +/* 802F3AB4-802F3B54 2EE3F4 00A0+00 1/1 0/0 0/0 .text newTevKColor__18J2DMaterialFactoryCFii */ JUtility::TColor J2DMaterialFactory::newTevKColor(int param_0, int param_1) const { - GXColor x = {0xFF, 0xFF, 0xFF, 0xFF}; - JUtility::TColor local_20 = GXColor(x); + JUtility::TColor local_20 = (GXColor){0xFF, 0xFF, 0xFF, 0xFF}; J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; if (iVar2->field_0x4a[param_1] != 0xffff) { return field_0x3c[iVar2->field_0x4a[param_1]]; |
