//
// cocos2d::CCDirector::convertToUI from 0x5c3318 to 0x5c33ee (214 bytes)
//
// 1 xrefs:
// > cocos2d::CCNode::convertToWindowSpace @ 0x5be638
//
// 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 *cocos2d::CCDirector::convertToUI(
cocos2d::CCPoint *__return_ptr retstr,
cocos2d::CCDirector *a2,
const cocos2d::CCPoint *a3)
{
const cocos2d::CCSize *v6; // r0
float v7; // s13
float v8; // s15
cocos2d::CCSize v10; // [sp+4h] [bp-E4h] BYREF
float v11[3]; // [sp+Ch] [bp-DCh] BYREF
_BYTE v12[12]; // [sp+18h] [bp-D0h] BYREF
_BYTE v13[64]; // [sp+24h] [bp-C4h] BYREF
_BYTE v14[64]; // [sp+64h] [bp-84h] BYREF
_BYTE v15[64]; // [sp+A4h] [bp-44h] BYREF
kmGLGetMatrix(5889, v14);
kmGLGetMatrix(5888, v15);
kmMat4Multiply(v13, v14, v15);
memset(v12, 0, sizeof(v12));
*(cocos2d::CCPoint *)v12 = *a3;
kmVec3TransformCoord(v11, v12, v13);
v6 = a2->m_pobOpenGLView->getDesignResolutionSize(a2->m_pobOpenGLView);
cocos2d::CCSize::CCSize(&v10, v6);
v7 = v10.width * (v11[0] * 0.5 + 0.5);
v8 = v10.height * ((float)-v11[1] * 0.5 + 0.5);
cocos2d::CCPoint::CCPoint(retstr, v7, v8);
return retstr;
}