//
// ScrollingLayer::getViewRect from 0x140070e20 to 0x140070f10 (240 bytes)
//
// 3 xrefs:
// > ScrollingLayer::visit @ 0x140070fde
// > ScrollingLayer::ccTouchBegan @ 0x14007105d
// > ??> @ 0x1406c6180
//
// 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::CCRect *ScrollingLayer::getViewRect(cocos2d::CCRect *__return_ptr retstr, ScrollingLayer *a2)
{
cocos2d::CCSize size; // rcx
float v5; // xmm6_4
double v6; // xmm0_8
float v7; // xmm7_4
cocos2d::CCSize v8; // rcx
double v9; // xmm0_8
struct cocos2d::CCPoint v11; // [rsp+60h] [rbp+8h] BYREF
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)retstr, &v11);
size = retstr[37].size;
v5 = 1.0;
if ( size )
{
v6 = (*(double (__fastcall **)(cocos2d::CCSize))(**(_QWORD **)&size + 128LL))(size);
v7 = *(float *)&v6;
}
else
{
v7 = 1.0;
}
v8 = retstr[37].size;
if ( v8 )
{
v9 = (*(double (__fastcall **)(cocos2d::CCSize))(**(_QWORD **)&v8 + 144LL))(v8);
v5 = *(float *)&v9;
}
cocos2d::CCRect::CCRect(
(cocos2d::CCRect *)a2,
(float)((float)(v7 * retstr[34].origin.x) + v11.x) - (float)((float)(retstr[34].size.width * 0.5) * v7),
(float)((float)(v5 * retstr[34].origin.y) + v11.y) - (float)((float)(retstr[34].size.height * 0.5) * v5),
retstr[34].size.width * v7,
retstr[34].size.height * v5);
return (cocos2d::CCRect *)a2;
}