//
// ScrollingLayer::getViewRect from 0x2fde24 to 0x2fded8 (180 bytes)
//
// 2 xrefs:
// > ScrollingLayer::ccTouchBegan @ 0x2fdf0c
// > ScrollingLayer::visit @ 0x2fdfbc
//
// 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::CCLayer *m_parentLayer; // r0
float v5; // s16
cocos2d::CCLayer *v6; // r0
float v7; // s15
cocos2d::CCPoint v9; // [sp+Ch] [bp-Ch] BYREF
cocos2d::CCNode::convertToWorldSpace(&v9, a2, &stru_AC591C);
m_parentLayer = a2->m_parentLayer;
if ( m_parentLayer )
v5 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))m_parentLayer->getScaleX)(m_parentLayer));
else
v5 = 1.0;
v6 = a2->m_parentLayer;
if ( v6 )
v7 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))v6->getScaleY)(v6));
else
v7 = 1.0;
cocos2d::CCRect::CCRect(
retstr,
(float)(v9.x + (float)(v5 * a2->m_position.x)) - (float)((float)(a2->m_size.width * 0.5) * v5),
(float)(v9.y + (float)(v7 * a2->m_position.y)) - (float)((float)(a2->m_size.height * 0.5) * v7),
a2->m_size.width * v5,
a2->m_size.height * v7);
return retstr;
}