// // LevelEditorLayer::rotationForSlopeNearObject from 0x367028 to 0x367126 (254 bytes) // // 2 xrefs: // > EditorUI::getSnapAngle @ 0x38111c // > EditorUI::getSnapAngle @ 0x38114a // // 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 // float LevelEditorLayer::rotationForSlopeNearObject(LevelEditorLayer *a1, GameObject *a2) { unsigned int v4; // r4 cocos2d::CCArray *v5; // r8 GameObject *v6; // r7 int v7; // r4 int v8; // r0 float v11; // r3 float v12; // [sp+0h] [bp-28h] cocos2d::CCRect v13; // [sp+4h] [bp-24h] BYREF cocos2d::CCRect v14; // [sp+14h] [bp-14h] BYREF cocos2d::CCRect v15; // 0:kr00_16.16 GameObject::updateStartPos(a2); ((void (__fastcall *)(cocos2d::CCRect *, GameObject *, int, int))a2->getObjectRect_0)( &v13, a2, 1065353216, 1065353216); v4 = 0; cocos2d::CCRect::CCRect(&v14, &v13); LODWORD(v15.origin.x) = &v14; LODWORD(v15.origin.y) = 1; v15.size.width = v11; v15.size.height = v12; v5 = LevelEditorLayer::objectsInRect(a1, v15, SLOBYTE(v13.origin.x)); while ( 1 ) { if ( v4 >= cocos2d::CCArray::count(v5) ) return -1.0; v6 = (GameObject *)cocos2d::CCArray::objectAtIndex(v5, v4); if ( v6->getType(v6) == Slope ) break; ++v4; } GameObject::determineSlopeDirection(v6); v7 = (-v6->m_slopeUphill ^ (int)(float)(GameObject::getSlopeAngle(v6) * 57.296)) + v6->m_slopeUphill; if ( GameObject::slopeFloorTop(v6) && !((int (__fastcall *)(GameObject *))a2->isFlipY)(a2) || !GameObject::slopeFloorTop(v6) && ((int (__fastcall *)(GameObject *))a2->isFlipY)(a2) ) { if ( v7 <= 0 ) v8 = v7 - 180; else v8 = v7 + 180; return (float)(v8 % 360); } return (float)v7; }
GD Web Decomp Icon

GD Web Decomp

Raw Source