// // XYZtoRGB24 from 0xc567b8 to 0xc56960 (424 bytes) // // 3 xrefs: // > sub_C57048 @ 0xc57094 // > sub_C57320 @ 0xc5736c // > @ 0xb4738 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 __fastcall XYZtoRGB24(float *a1, char *a2) { double v2; // d3 double v3; // d2 double v4; // d1 double v5; // d0 double v6; // d8 double v7; // d9 char v8; // w0 char v9; // w0 __int64 result; // x0 v2 = a1[1]; v3 = *a1; v4 = a1[2]; v5 = v2 * -1.276 + v3 * 2.69 + v4 * -0.414; v6 = v2 * 1.978 + v3 * -1.022 + v4 * 0.044; v7 = v2 * -0.224 + v3 * 0.061 + v4 * 1.163; if ( v5 <= 0.0 ) { *a2 = 0; if ( v6 > 0.0 ) goto LABEL_5; } else { v8 = -1; if ( v5 < 1.0 ) v8 = (int)(sqrt(v5) * 256.0); *a2 = v8; if ( v6 > 0.0 ) { LABEL_5: v9 = -1; if ( v6 < 1.0 ) v9 = (int)(sqrt(v6) * 256.0); a2[1] = v9; if ( v7 > 0.0 ) goto LABEL_8; LABEL_12: a2[2] = 0; return 0; } } a2[1] = 0; if ( v7 <= 0.0 ) goto LABEL_12; LABEL_8: result = 255; if ( v7 < 1.0 ) { result = (unsigned __int8)(int)(sqrt(v7) * 256.0); a2[2] = result; } else { a2[2] = -1; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source