// // GameToolbox::getRelativeOffset from 0x5803f4 to 0x5805f4 (512 bytes) // // 3 xrefs: // > LevelEditorLayer::getRelativeOffset @ 0x65d0ac // > EditorUI::getRelativeOffset @ 0x692f5c // > @ 0x84390 // // 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) { cocos2d::CCPoint *v2; // x1 cocos2d::CCPoint *v3; // x8 cocos2d::CCPoint *v4; // x19 cocos2d::CCPoint *v6; // x21 unsigned int v7; // w23 unsigned int v8; // w22 float v9; // s0 float v10; // s1 float y; // w0 _BOOL4 v14; // w0 cocos2d::CCPoint result; // 0:s0.4,4:s1.4 v4 = v2; v6 = v3; if ( (unsigned __int8)cocos2d::CCPoint::equals(v2, &stru_1241818) ) goto LABEL_10; v7 = a1->isFlipY(a1); v8 = a1->isFlipX(a1); v9 = a1->getRotation(a1); v10 = fabsf(v9); if ( v10 == 90.0 || v10 == 270.0 ) { y = v4->y; v4->y = v4->x; v4->x = y; if ( v9 >= 0.0 ) { LABEL_5: if ( v8 < (v7 ^ 1) ) goto LABEL_6; LABEL_13: if ( v7 >= v8 ) { if ( v7 <= v8 ) { if ( !v8 || !v7 ) goto LABEL_10; v14 = v9 == 0.0; if ( v9 == 90.0 || v9 == 0.0 ) v4->x = -v4->x; if ( v9 == 270.0 ) { LABEL_18: v4->y = -v4->y; goto LABEL_10; } } else { v14 = v9 == 90.0; if ( v9 == 180.0 || v9 == 90.0 ) v4->x = -v4->x; if ( v9 == 0.0 ) goto LABEL_18; } } else { v14 = v9 == 270.0; if ( v9 == 270.0 || v9 == 0.0 ) v4->x = -v4->x; if ( v9 == 180.0 ) goto LABEL_18; } if ( !v14 ) goto LABEL_10; goto LABEL_18; } } else if ( v9 >= 0.0 ) { goto LABEL_5; } v9 = v9 + 360.0; if ( v8 >= (v7 ^ 1) ) goto LABEL_13; LABEL_6: if ( v9 == 180.0 || v9 == 90.0 ) v4->y = -v4->y; if ( v9 == 270.0 || v9 == 180.0 ) v4->x = -v4->x; LABEL_10: cocos2d::CCPoint::CCPoint(v6, v4); return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source