//
// ScrollingLayer::getViewRect from 0x1001b8920 to 0x1001b89dc (188 bytes)
//
// 2 xrefs:
// > ScrollingLayer::visit @ 0x1001b8a98
// > ScrollingLayer::ccTouchBegan @ 0x1001b8b38
//
// 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 __fastcall ScrollingLayer::getViewRect(ScrollingLayer *a1)
{
float *v1; // x8
float *v3; // x19
cocos2d::CCLayer *m_parentLayer; // x0
float v5; // s8
float v6; // s9
cocos2d::CCLayer *v7; // x0
float v12; // [xsp+8h] [xbp-28h]
float v13; // [xsp+Ch] [xbp-24h]
cocos2d::CCPoint v14; // 0:kr00_8.8
cocos2d::CCRect result; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
v3 = v1;
v14 = cocos2d::CCNode::convertToWorldSpace(a1, &stru_10086C380);
m_parentLayer = a1->m_parentLayer;
v5 = 1.0;
if ( m_parentLayer )
{
v6 = ((float (__fastcall *)(cocos2d::CCLayer *, float, float))m_parentLayer->getScaleX)(m_parentLayer, v14.x, v14.y);
v7 = a1->m_parentLayer;
if ( v7 )
v5 = ((float (__fastcall *)(cocos2d::CCLayer *))v7->getScaleY)(v7);
}
else
{
v6 = 1.0;
}
sub_100022990(
v3,
(float)(v12 + (float)(a1->m_position.x * v6)) + (float)((float)(a1->m_size.width * -0.5) * v6),
(float)(v13 + (float)(a1->m_position.y * v5)) + (float)((float)(a1->m_size.height * -0.5) * v5),
v6 * a1->m_size.width,
v5 * a1->m_size.height);
return result;
}