// // LevelEditorLayer::updateObjectColors from 0x1000be6e0 to 0x1000bebab (1227 bytes) // // 2 xrefs: // > LevelEditorLayer::manualUpdateObjectColors @ 0x1000be6d7 // > GJSmartBlockPreview::addPreview @ 0x10041603b // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:20:33 +0000 // __int64 __fastcall LevelEditorLayer::updateObjectColors(__int64 a1, __int64 a2) { __int64 v2; // r13 __int64 v3; // rax double v4; // xmm0_8 __int64 result; // rax unsigned int v6; // ebx __int64 v7; // rbx __int64 v8; // r15 unsigned int MainColorMode; // eax __int64 MainColor; // rax double v11; // xmm0_8 __int64 v12; // r15 unsigned int SecondaryColorMode; // eax __int64 SecondaryColor; // rax __int64 v15; // r15 unsigned int active; // eax unsigned int v17; // r12d __int64 v18; // r13 unsigned int GroupID; // eax __int64 v20; // rcx int v21; // eax unsigned int v22; // r15d __int64 v23; // r12 unsigned int v24; // eax float v25; // xmm0_4 int v26; // eax int v27; // r15d unsigned int v28; // eax unsigned int v29; // r12d __int64 v30; // r13 unsigned int v31; // eax __int64 v32; // rcx int v33; // eax unsigned int v34; // r15d __int64 v35; // r12 unsigned int v36; // eax float v37; // xmm0_4 unsigned int v38; // [rsp+14h] [rbp-3Ch] unsigned int v39; // [rsp+18h] [rbp-38h] unsigned __int16 v40; // [rsp+1Ch] [rbp-34h] BYREF unsigned __int8 v41; // [rsp+1Eh] [rbp-32h] float v42; // [rsp+20h] [rbp-30h] __int16 v43; // [rsp+24h] [rbp-2Ch] BYREF char v44; // [rsp+26h] [rbp-2Ah] v2 = a2; v3 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 3944) + 944LL))(*(_QWORD *)(a1 + 3944)); v4 = 0.0; v39 = GameToolbox::transformColor(v3, 0.0, -0.30000001, 0.40000001); result = sub_1007FEF90(a2); if ( (_DWORD)result ) { v6 = 0; do { v38 = v6; v7 = sub_1007FEFE0(v2, v6); v8 = *(_QWORD *)(a1 + 2152); MainColorMode = GameObject::getMainColorMode(v7); v42 = GJEffectManager::activeOpacityForIndex(v8, MainColorMode, v4); MainColor = GameObject::getMainColor(v7); *(_QWORD *)&v11 = LODWORD(v42); *(float *)(MainColor + 8) = v42; if ( (unsigned __int8)GameObject::hasSecondaryColor(v7) ) { v12 = *(_QWORD *)(a1 + 2152); SecondaryColorMode = GameObject::getSecondaryColorMode(v7, v11); v42 = GJEffectManager::activeOpacityForIndex(v12, SecondaryColorMode, v11); SecondaryColor = GameObject::getSecondaryColor(v7); *(float *)(SecondaryColor + 8) = v42; } v15 = (unsigned int)GameObject::getMainColorMode(v7); v41 = -1; v40 = -1; active = GJEffectManager::activeColorForIndex(*(_QWORD *)(a1 + 2152), v15); v40 = active; v41 = BYTE2(active); if ( *(__int16 *)(v7 + 1168) > 0 ) { v42 = *(float *)&v15; v17 = 0; do { v18 = *(_QWORD *)(a1 + 2152); GroupID = GameObject::getGroupID(v7, v17); active = GJEffectManager::colorForGroupID(v18, GroupID, &v40, *(unsigned __int8 *)(v7 + 1038) ^ 1u); v40 = active; v41 = BYTE2(active); ++v17; } while ( (int)v17 < *(__int16 *)(v7 + 1168) ); v2 = a2; *(float *)&v15 = v42; } v20 = *(_QWORD *)(v7 + 1096); if ( *(float *)(v20 + 16) != *(float *)&qword_100BE11A0 || *(float *)(v20 + 20) != *((float *)&qword_100BE11A0 + 1) || *(float *)(v20 + 24) != *(float *)&qword_100BE11A8 || *(_WORD *)(v20 + 28) != WORD2(qword_100BE11A8) ) { v21 = GJEffectManager::colorForEffect( *(_QWORD *)(a1 + 2152), active, *(_QWORD *)(v20 + 24), *(double *)(v20 + 16)); v40 = v21; v41 = BYTE2(v21); } (*(void (__fastcall **)(__int64, unsigned __int16 *))(*(_QWORD *)v7 + 1584LL))(v7, &v40); *(_QWORD *)&v4 = 1065353216; if ( (int)v15 > 0 ) *(float *)&v4 = GJEffectManager::activeOpacityForIndex( *(_QWORD *)(a1 + 2152), (unsigned int)v15, COERCE_DOUBLE(1065353216)); if ( *(__int16 *)(v7 + 1168) > 0 ) { v22 = 0; do { v42 = *(float *)&v4; v23 = *(_QWORD *)(a1 + 2152); v24 = GameObject::getGroupID(v7, v22); v25 = GJEffectManager::opacityModForGroup(v23, v24); v42 = v42 * v25; *(_QWORD *)&v4 = LODWORD(v42); ++v22; } while ( (int)v22 < *(__int16 *)(v7 + 1168) ); } *(_DWORD *)(*(_QWORD *)(v7 + 1096) + 8LL) = LODWORD(v4); if ( !(unsigned __int8)GameObject::hasSecondaryColor(v7) ) goto LABEL_41; v26 = GameObject::getSecondaryColorMode(v7, v4); v27 = v26; v44 = -1; v43 = -1; if ( v26 == 1012 ) { v28 = GJEffectManager::colorForEffect( *(_QWORD *)(a1 + 2152), (v41 << 16) | (unsigned int)v40, 0x1003E19999ALL, 0.0001708983909338713); v43 = v28; v44 = BYTE2(v28); } else if ( v26 <= 0 ) { v28 = 0xFFFFFF; if ( *(__int16 *)(v7 + 1168) > 0 ) { LABEL_27: v42 = *(float *)&v27; v29 = 0; do { v30 = *(_QWORD *)(a1 + 2152); v31 = GameObject::getGroupID(v7, v29); v28 = GJEffectManager::colorForGroupID(v30, v31, &v43, 0); v43 = v28; v44 = BYTE2(v28); ++v29; } while ( (int)v29 < *(__int16 *)(v7 + 1168) ); v2 = a2; *(float *)&v27 = v42; } } else { v28 = GJEffectManager::activeColorForIndex(*(_QWORD *)(a1 + 2152), (unsigned int)v26); v43 = v28; v44 = BYTE2(v28); if ( *(__int16 *)(v7 + 1168) > 0 ) goto LABEL_27; } v32 = *(_QWORD *)(v7 + 1104); if ( *(float *)(v32 + 16) != *(float *)&qword_100BE11A0 || *(float *)(v32 + 20) != *((float *)&qword_100BE11A0 + 1) || *(float *)(v32 + 24) != *(float *)&qword_100BE11A8 || *(_WORD *)(v32 + 28) != WORD2(qword_100BE11A8) ) { v33 = GJEffectManager::colorForEffect(*(_QWORD *)(a1 + 2152), v28, *(_QWORD *)(v32 + 24), *(double *)(v32 + 16)); v43 = v33; v44 = BYTE2(v33); } (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v7 + 1592LL))(v7, &v43); *(_QWORD *)&v4 = 1065353216; if ( v27 > 0 ) *(float *)&v4 = GJEffectManager::activeOpacityForIndex( *(_QWORD *)(a1 + 2152), (unsigned int)v27, COERCE_DOUBLE(1065353216)); if ( *(__int16 *)(v7 + 1168) > 0 ) { v34 = 0; do { v42 = *(float *)&v4; v35 = *(_QWORD *)(a1 + 2152); v36 = GameObject::getGroupID(v7, v34); v37 = GJEffectManager::opacityModForGroup(v35, v36); v42 = v42 * v37; *(_QWORD *)&v4 = LODWORD(v42); ++v34; } while ( (int)v34 < *(__int16 *)(v7 + 1168) ); } *(_DWORD *)(*(_QWORD *)(v7 + 1104) + 8LL) = LODWORD(v4); LABEL_41: if ( *(_BYTE *)(v7 + 887) == 1 ) AnimatedGameObject::updateChildSpriteColor(v7, v39); v6 = v38 + 1; result = sub_1007FEF90(v2); } while ( v38 + 1 < (unsigned int)result ); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source