// // GJGroundLayer::loadGroundSprites from 0x14027e790 to 0x14027ea45 (693 bytes) // // 9 xrefs: // > GJGroundLayer::init @ 0x14027e5be // > GJGroundLayer::init @ 0x14027e6f8 // > GJGroundLayer::scaleGround @ 0x14027ed1e // > GJGroundLayer::scaleGround @ 0x14027ed2b // > @ 0x1406878c0 // > @ 0x140687940 // > @ 0x14068795c // > @ 0x140687970 // > @ 0x1406d11cc // // 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 // void GJGroundLayer::loadGroundSprites(GJGroundLayer *a1, int a2, bool a3) { cocos2d::CCSprite *m_ground1Sprite; // rsi cocos2d::CCArray *v6; // rbx struct cocos2d::CCArray *v7; // rax int v8; // ebp struct cocos2d::CCTexture2D *v9; // rax struct cocos2d::CCSprite *v10; // rdi float v11; // xmm0_4 cocos2d::CCSprite_vtbl *v12; // rbx __int64 v13; // rax float v14; // xmm0_4 cocos2d::CCSprite_vtbl *v15; // rbx const cocos2d::CCPoint *v16; // rax struct cocos2d::CCTexture2D *v17; // rax struct cocos2d::CCSprite *v18; // rdi float v19; // xmm0_4 cocos2d::CCSprite_vtbl *v20; // rbx __int64 v21; // rax float v22; // xmm0_4 cocos2d::CCSprite_vtbl *v23; // rbx const cocos2d::CCPoint *v24; // rax signed int v25; // edi struct cocos2d::CCObject *Object; // rax _BOOL8 v27; // r8 if ( a3 ) m_ground1Sprite = a1->m_ground1Sprite; else m_ground1Sprite = a1->m_ground2Sprite; if ( m_ground1Sprite ) { v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1); if ( m_ground1Sprite->getChildren(m_ground1Sprite) ) { v7 = m_ground1Sprite->getChildren(m_ground1Sprite); cocos2d::CCArray::addObjectsFromArray(v6, v7); } if ( cocos2d::CCArray::count(v6) != a2 ) { if ( cocos2d::CCArray::count(v6) >= a2 ) { v25 = cocos2d::CCArray::count(v6) - a2; while ( v25 > 0 ) { if ( !cocos2d::CCArray::count(v6) ) break; --v25; Object = cocos2d::CCArray::lastObject(v6); LOBYTE(v27) = 1; m_ground1Sprite->removeChild(m_ground1Sprite, (cocos2d::CCNode *)Object, v27); cocos2d::CCArray::removeLastObject(v6, 1); } } else { v8 = cocos2d::CCArray::count(v6); if ( v8 < a2 ) { if ( a3 ) { do { v9 = m_ground1Sprite->getTexture(&m_ground1Sprite->cocos2d::CCTextureProtocol); v10 = cocos2d::CCSprite::createWithTexture(v9); v11 = ((float (__fastcall *)(cocos2d::CCSprite *, struct cocos2d::CCSprite *))m_ground1Sprite->addChild_1)( m_ground1Sprite, v10); v12 = v10->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v11, (float)v8 * v10->m_obRect.size.width); v14 = ((float (__fastcall *)(struct cocos2d::CCSprite *, __int64))v12->setPosition_0)(v10, v13); v15 = v10->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v14, 0.0); v15->setAnchorPoint(v10, v16); v10->setColor(&v10->cocos2d::CCRGBAProtocol, &stru_140529AC8); ++v8; } while ( v8 < a2 ); } else { do { v17 = m_ground1Sprite->getTexture(&m_ground1Sprite->cocos2d::CCTextureProtocol); v18 = cocos2d::CCSprite::createWithTexture(v17); v19 = ((float (__fastcall *)(cocos2d::CCSprite *, struct cocos2d::CCSprite *))m_ground1Sprite->addChild_1)( m_ground1Sprite, v18); v20 = v18->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v19, (float)v8 * v18->m_obRect.size.width); v22 = ((float (__fastcall *)(struct cocos2d::CCSprite *, __int64))v20->setPosition_0)(v18, v21); v23 = v18->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v22, 0.0); v23->setAnchorPoint(v18, v24); v18->setColor(&v18->cocos2d::CCRGBAProtocol, &stru_140529AC8); ++v8; } while ( v8 < a2 ); } } } } } }