// // OBB2D::orderCorners from 0x10012cf98 to 0x10012d14c (436 bytes) // // 1 xrefs: // > OBB2D::calculateWithCenter @ 0x10012ce9c // // 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 // void __fastcall OBB2D::orderCorners(OBB2D *a1) { std::array *p_m_corners; // x20 double *v3; // x0 __int64 v4; // x23 std::array *v5; // x21 float y; // s0 __int64 *v7; // x22 double *v8; // x1 double *v9; // x21 double *v10; // x0 __int64 v11; // x22 float v12; // s0 __int64 *v13; // x21 double *v14; // x1 double *v15; // x20 __int64 v16; // [xsp+0h] [xbp-50h] BYREF __int64 v17; // [xsp+8h] [xbp-48h] BYREF __int64 v18; // [xsp+10h] [xbp-40h] BYREF __int64 v19; // [xsp+18h] [xbp-38h] BYREF sub_1000229B0(&v19); sub_1000229B0(&v18); p_m_corners = &a1->m_corners; sub_1000229D0(&v18, (double *)&a1->m_corners); sub_1000229D0(&v19, v3); v4 = 4; v5 = &a1->m_corners; do { y = v5->__elems_[0].y; if ( y > *((float *)&v19 + 1) ) { v7 = &v19; sub_1000229D0(&v18, (double *)&v19); LABEL_8: sub_1000229D0(v7, (double *)v5); goto LABEL_9; } if ( y > *((float *)&v18 + 1) || y == *((float *)&v18 + 1) && v5->__elems_[0].x < *(float *)&v18 ) { v7 = &v18; goto LABEL_8; } LABEL_9: v5 = (std::array *)((char *)v5 + 8); --v4; } while ( v4 ); if ( *(float *)&v19 <= *(float *)&v18 ) v8 = (double *)&v19; else v8 = (double *)&v18; if ( *(float *)&v19 <= *(float *)&v18 ) v9 = (double *)&v18; else v9 = (double *)&v19; sub_1000229D0(&a1->m_positions, v8); sub_1000229D0(&a1->m_positions.__elems_[1], v9); sub_1000229B0(&v17); sub_1000229B0(&v16); sub_1000229D0(&v16, (double *)&a1->m_corners); sub_1000229D0(&v17, v10); v11 = 4; while ( 2 ) { v12 = p_m_corners->__elems_[0].y; if ( v12 < *((float *)&v17 + 1) ) { v13 = &v17; sub_1000229D0(&v16, (double *)&v17); goto LABEL_23; } if ( v12 < *((float *)&v16 + 1) || v12 == *((float *)&v16 + 1) && p_m_corners->__elems_[0].x > *(float *)&v16 ) { v13 = &v16; LABEL_23: sub_1000229D0(v13, (double *)p_m_corners); } p_m_corners = (std::array *)((char *)p_m_corners + 8); if ( --v11 ) continue; break; } if ( *(float *)&v17 <= *(float *)&v16 ) v14 = (double *)&v16; else v14 = (double *)&v17; if ( *(float *)&v17 <= *(float *)&v16 ) v15 = (double *)&v17; else v15 = (double *)&v16; sub_1000229D0(&a1->m_positions.__elems_[2], v14); sub_1000229D0(&a1->m_positions.__elems_[3], v15); }
GD Web Decomp Icon

GD Web Decomp

Raw Source