// // GameToolbox::getRelativeOffset from 0x2ec238 to 0x2ec3c2 (394 bytes) // // 2 xrefs: // > LevelEditorLayer::getRelativeOffset @ 0x365ec8 // > EditorUI::getRelativeOffset @ 0x385248 // // 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( cocos2d::CCPoint *__return_ptr retstr, GameObject *a2, cocos2d::CCPoint a3) { float x; // r4 int v6; // r7 int v7; // r8 float v8; // r0 float v9; // s14 float v10; // s15 float v11; // s13 int v12; // r2 bool v13; // fzf x = a3.x; if ( cocos2d::CCPoint::equals((cocos2d::CCPoint *)LODWORD(a3.x), &stru_AC5500) ) goto LABEL_33; v6 = ((int (__fastcall *)(GameObject *))a2->isFlipY)(a2); v7 = ((int (__fastcall *)(GameObject *))a2->isFlipX)(a2); v8 = COERCE_FLOAT(((int (__fastcall *)(GameObject *))a2->getRotation)(a2)); v9 = 90.0; v10 = v8; v11 = fabsf(v8); if ( v11 == 90.0 || v11 == 270.0 ) { v12 = *(_DWORD *)(LODWORD(x) + 4); *(_DWORD *)(LODWORD(x) + 4) = *(_DWORD *)LODWORD(x); *(_DWORD *)LODWORD(x) = v12; } if ( v8 < 0.0 ) v10 = v8 + 360.0; if ( v7 ) { if ( v6 ) { if ( v10 == 0.0 || v10 == 90.0 ) { *(float *)LODWORD(x) = -*(float *)LODWORD(x); if ( v10 == 0.0 ) goto LABEL_30; } v9 = 270.0; } else { if ( v10 == 0.0 || v10 == 270.0 ) { *(float *)LODWORD(x) = -*(float *)LODWORD(x); if ( v10 == 270.0 ) goto LABEL_30; } v9 = 180.0; } goto LABEL_28; } if ( v6 ) { if ( v10 != 90.0 && v10 != 180.0 ) { v13 = v10 == 0.0; LABEL_32: if ( !v13 ) goto LABEL_33; goto LABEL_30; } *(float *)LODWORD(x) = -*(float *)LODWORD(x); if ( v10 == 0.0 ) { LABEL_30: *(float *)(LODWORD(x) + 4) = -*(float *)(LODWORD(x) + 4); goto LABEL_33; } LABEL_28: v13 = v10 == v9; goto LABEL_32; } if ( (v10 == 90.0 || v10 == 180.0) && (*(float *)(LODWORD(x) + 4) = -*(float *)(LODWORD(x) + 4), v10 == 180.0) || v10 == 270.0 ) { *(float *)LODWORD(x) = -*(float *)LODWORD(x); } LABEL_33: cocos2d::CCPoint::CCPoint(retstr, (const cocos2d::CCPoint *)LODWORD(x)); return retstr; }
GD Web Decomp Icon

GD Web Decomp

Raw Source