// // GameToolbox::getRelativeOffset from 0x1400649a0 to 0x140064b9e (510 bytes) // // 10 xrefs: // > EditorUI::onCreateObject @ 0x14010f7fd // > EditorUI::removeOffset @ 0x14012288c // > EditorUI::applyOffset @ 0x14012291c // > EditorUI::findSnapObject_1 @ 0x140123414 // > EditorUI::findSnapObject_1 @ 0x140123602 // > EditorUI::ccTouchEnded @ 0x1401249a9 // > LevelEditorLayer::getObjectRect @ 0x1402d5bf8 // > @ 0x140665f54 // > @ 0x140665f88 // > @ 0x1406c5d24 // // 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 // cocos2d::CCPoint GameToolbox::getRelativeOffset(GameObject *a1, cocos2d::CCPoint a2) { const struct cocos2d::CCPoint *v2; // r8 struct cocos2d::CCPoint *v5; // rbx char v6; // si char v7; // r14 double v8; // xmm0_8 float v9; // xmm1_4 float v10; // xmm0_4 float y; // eax float v12; // xmm0_4 v5 = (struct cocos2d::CCPoint *)v2; if ( cocos2d::CCPoint::equals(v2) ) goto LABEL_33; v6 = (*(__int64 (__fastcall **)(cocos2d::CCPoint))(**(_QWORD **)&a2 + 1264LL))(a2); v7 = (*(__int64 (__fastcall **)(cocos2d::CCPoint))(**(_QWORD **)&a2 + 1256LL))(a2); v8 = (*(double (__fastcall **)(cocos2d::CCPoint))(**(_QWORD **)&a2 + 344LL))(a2); v9 = *(float *)&v8; v10 = fabs(*(float *)&v8); if ( v10 == 90.0 || v10 == 270.0 ) { y = v5->y; v5->y = v5->x; v5->x = y; } if ( v9 < 0.0 ) v9 = v9 + 360.0; if ( v7 ) { if ( !v6 ) { if ( v9 != 0.0 && v9 != 270.0 || (v5->x = v5->x * -1.0, v9 != 270.0) ) { if ( v9 != 180.0 ) goto LABEL_33; } v12 = v5->y * -1.0; LABEL_32: v5->y = v12; goto LABEL_33; } if ( v9 == 0.0 || v9 == 90.0 ) v5->x = v5->x * -1.0; if ( v9 == 0.0 || v9 == 270.0 ) { v12 = v5->y * -1.0; goto LABEL_32; } } else { if ( !v6 ) { if ( (v9 == 90.0 || v9 == 180.0) && (v5->y = v5->y * -1.0, v9 == 180.0) || v9 == 270.0 ) v5->x = v5->x * -1.0; goto LABEL_33; } if ( v9 == 90.0 || v9 == 180.0 ) v5->x = v5->x * -1.0; if ( v9 == 0.0 || v9 == 90.0 ) { v12 = v5->y * -1.0; goto LABEL_32; } } LABEL_33: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)a1, v5); return (cocos2d::CCPoint)a1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source