// // LevelEditorLayer::typeExistsAtPosition from 0x1000e05c0 to 0x1000e09d7 (1047 bytes) // // 1 xrefs: // > EditorUI::onCreateObject @ 0x100034e84 // // 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 // // local variable allocation has failed, the output may be wrong! bool __fastcall LevelEditorLayer::typeExistsAtPosition( LevelEditorLayer *a1, int a2, cocos2d::CCPoint a3, bool a4, bool a5, float a6) { int v6; // r8d float *v7; // rbx LevelEditorLayer *v9; // r9 float v10; // xmm2_4 float v11; // xmm0_4 float v12; // xmm1_4 float m_sectionXFactor; // xmm1_4 int v14; // eax float v15; // xmm1_4 float m_sectionYFactor; // xmm0_4 int v17; // edx unsigned int v18; // r10d unsigned int v19; // ecx unsigned __int64 v20; // r11 std::vector *, std::allocator *>> **begin; // rdi __int64 v22; // rax unsigned __int64 v23; // r8 int v24; // eax bool result; // al __int64 v26; // rdx std::vector *, std::allocator *>> *v27; // rax __int64 v28; // rsi unsigned __int64 v29; // rax float *v30; // rsi __int64 v31; // rcx std::__vector_base *, std::allocator *>>::pointer v32; // rax std::vector *v33; // rbx __int64 v34; // r12 __int64 i; // r13 GameObject *v36; // r15 int v37; // eax __int64 v38; // rcx __int64 m_currentLayer; // rdx LevelEditorLayer *v40; // r14 __int64 v41; // rdx __int64 v42; // rcx __int64 v43; // r8 float v44; // xmm0_4 char v45; // al __int64 v46; // rdx __int64 v47; // rcx __int64 v48; // r8 char v49; // al __int64 v50; // rdx __int64 v51; // rcx __int64 v52; // r8 float v53; // xmm0_4 float v54; // xmm0_4 float *v55; // rax double v56; // xmm1_8 double v57; // xmm0_8 double v58; // xmm1_8 __int64 v59; // [rsp+0h] [rbp-B0h] unsigned __int64 v60; // [rsp+8h] [rbp-A8h] __int64 v61; // [rsp+10h] [rbp-A0h] float v62[4]; // [rsp+18h] [rbp-98h] BYREF float v63[2]; // [rsp+28h] [rbp-88h] BYREF float v64[2]; // [rsp+30h] [rbp-80h] BYREF float v65; // [rsp+38h] [rbp-78h] BYREF float v66; // [rsp+3Ch] [rbp-74h] __int64 v67; // [rsp+40h] [rbp-70h] __int64 v68; // [rsp+48h] [rbp-68h] float *v69; // [rsp+50h] [rbp-60h] float v70; // [rsp+58h] [rbp-58h] BYREF float v71; // [rsp+5Ch] [rbp-54h] int v72; // [rsp+60h] [rbp-50h] float x; // [rsp+64h] [rbp-4Ch] _BOOL4 v74; // [rsp+68h] [rbp-48h] int v75; // [rsp+6Ch] [rbp-44h] float height; // [rsp+70h] [rbp-40h] int v77; // [rsp+74h] [rbp-3Ch] float *v78; // [rsp+78h] [rbp-38h] float width; // [rsp+84h] [rbp-2Ch] x = a3.x; v75 = v6; v74 = a5; v7 = (float *)a4; v72 = a2; sub_10028CC60(v62); sub_10028CBE0(v63, v62[0] / 30.0, v62[1] / 30.0); v9 = a1; v69 = v7; v10 = *v7; v11 = 0.0; v12 = 0.0; if ( *v7 > 0.0 ) { m_sectionXFactor = a1->m_sectionXFactor; if ( v10 >= 10000000.0 ) v12 = m_sectionXFactor * 10000000.0; else v12 = m_sectionXFactor * v10; } v14 = (int)v12; v15 = v69[1]; if ( v15 > 0.0 ) { m_sectionYFactor = a1->m_sectionYFactor; if ( v15 >= 10000000.0 ) v11 = m_sectionYFactor * 10000000.0; else v11 = m_sectionYFactor * v15; } v17 = (int)v11; v18 = 1; v19 = 1; if ( v14 >= 2 ) v19 = v14; v20 = v14 + 1; begin = a1->m_sections.__begin_; v22 = a1->m_sections.__end_ - begin; v23 = v22 - 1; v24 = v22 - 1; if ( v23 < v20 ) LODWORD(v20) = v24; if ( v17 >= 2 ) v18 = (int)v11; result = 0; if ( a1->m_sections.__end_ != begin && (int)(v19 - 1) <= (int)v20 ) { v60 = v17 + 1; v77 = v18 - 1; v61 = v18 - 1LL; v26 = v19 - 1LL; v59 = (unsigned int)(v20 + 1); do { v27 = v9->m_sections.__begin_[v26]; if ( v27 ) { v28 = v27->__end_ - v27->__begin_; v29 = v28 - 1; v30 = (float *)(unsigned int)(v28 - 1); if ( v29 >= v60 ) v30 = (float *)(unsigned int)v60; v78 = v30; if ( v77 <= (int)v30 ) { v78 = (float *)(unsigned int)((_DWORD)v78 + 1); v31 = v61; v68 = v26; do { v32 = v9->m_sections.__begin_[v26]->__begin_; v67 = v31; v33 = v32[v31]; if ( v33 ) { v34 = v9->m_sectionSizes.__begin_[v68]->__begin_[v67]; if ( v34 > 0 ) { for ( i = 0; v34 != i; ++i ) { v36 = v33->__begin_[i]; v37 = *(_DWORD *)&v36->m_editorLayer2; v38 = (unsigned int)-((_WORD)v37 == 0); m_currentLayer = (unsigned __int16)v9->m_currentLayer; if ( (_WORD)m_currentLayer != 0xFFFF && (_WORD)m_currentLayer != v36->m_editorLayer ) { v38 = v37 | (unsigned int)v38; if ( (_WORD)m_currentLayer != (_WORD)v38 ) continue; } if ( v36->m_objectID == v72 ) { v40 = v9; v44 = ((float (__fastcall *)(GameObject *, float *, __int64, __int64))v36->getRotation)( v33->__begin_[i], v30, m_currentLayer, v38); v9 = v40; if ( v44 == x ) { v45 = ((__int64 (__fastcall *)(GameObject *, float *, __int64, __int64, __int64, LevelEditorLayer *))v36->isFlipX)( v36, v30, v41, v42, v43, v40); v9 = v40; if ( v45 == v74 ) { v49 = ((__int64 (__fastcall *)(GameObject *, float *, __int64, __int64, __int64, LevelEditorLayer *))v36->isFlipY)( v36, v30, v46, v47, v48, v40); v9 = v40; if ( v49 == (_BYTE)v75 ) { width = v36->m_obRect.size.width; v53 = ((float (__fastcall *)(GameObject *, float *, __int64, __int64, __int64, LevelEditorLayer *))v36->getRScaleX)( v36, v30, v50, v51, v52, v40); width = v53 * width; height = v36->m_obRect.size.height; v54 = ((float (__fastcall *)(GameObject *))v36->getRScaleY)(v36); sub_10028CBF0(&v70, width, height * v54); v55 = (float *)((__int64 (__fastcall *)(GameObject *))v36->getPosition)(v36); width = *v55 - (float)(v70 * 0.5); *(_QWORD *)&v56 = *(unsigned int *)(((__int64 (__fastcall *)(GameObject *))v36->getPosition)(v36) + 4); *(float *)&v56 = *(float *)&v56 - (float)(v71 * 0.5); sub_10028CC00(v62, COERCE_DOUBLE((unsigned __int64)LODWORD(width)), v56, v70, v71); ((void (__fastcall *)(GameObject *))v36->getPosition)(v36); sub_10028CC60(&v65); *(_QWORD *)&v57 = LODWORD(v65); *(_QWORD *)&v58 = LODWORD(v66); *(float *)&v57 = v65 / 30.0; *(float *)&v58 = v66 / 30.0; sub_10028CBE0(v64, v65 / 30.0, v66 / 30.0); v30 = v69; if ( (unsigned __int8)sub_10028D2D0(v62, v69, v57, v58) && v63[0] == v64[0] && v63[1] == v64[1] ) { return 1; } v9 = v40; } } } } } } } v31 = v67 + 1; v26 = v68; } while ( (float *)(v67 + 1) != v78 ); } } ++v26; } while ( v26 != v59 ); return 0; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source