// // GJGroundLayer::createLine from 0x434490 to 0x4345e8 (344 bytes) // // 1 xrefs: // > GJGroundLayer::init @ 0x434660 // // 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::createLine(GJGroundLayer *a1, int a2) { cocos2d::CCSprite *m_lineSprite; // r0 int v5; // r1 float v6; // r7 cocos2d::CCDirector *v7; // r0 cocos2d::CCString *v8; // r0 const char *CString; // r0 cocos2d::CCSprite *v10; // r0 GJGroundLayer_vtbl *v11; // r3 cocos2d::CCSprite *v12; // r8 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCSprite *v14; // r7 void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCSize v16; // [sp+4h] [bp-18h] BYREF cocos2d::CCPoint v17; // [sp+Ch] [bp-10h] BYREF m_lineSprite = a1->m_lineSprite; if ( m_lineSprite ) { m_lineSprite->removeFromParent(m_lineSprite); a1->m_lineSprite = nullptr; } v5 = a2; if ( a2 < 1 ) v5 = 1; if ( v5 >= 3 ) v5 = 3; a1->m_lineType = v5; if ( v5 == 1 ) v6 = 0.5; else v6 = 0.2; v7 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v16, v7); if ( a1->m_lineType == 1 ) v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"floorLine_%02d_001.png", (_BYTE *)&dword_0 + 1); else v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"floorLine_%02d_001.png", (const char *)&dword_0 + 2); CString = cocos2d::CCString::getCString(v8); v10 = cocos2d::CCSprite::createWithSpriteFrameName(CString); v11 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_lineSprite = v10; v11->addChild_0(a1, v10, 5); v12 = a1->m_lineSprite; setPosition = v12->setPosition; cocos2d::CCPoint::CCPoint(&v17, v16.width * 0.5, v6); setPosition(v12, &v17); v14 = a1->m_lineSprite; setAnchorPoint = v14->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v17, 0.5, 1.0); setAnchorPoint(v14, &v17); a1->m_lineSprite->setTag(a1->m_lineSprite, 2); if ( a1->m_blendLine ) { LODWORD(v17.x) = 770; LODWORD(v17.y) = 1; ((void (__fastcall *)(cocos2d::CCSprite *, int, int))a1->m_lineSprite->setBlendFunc)(a1->m_lineSprite, 770, 1); } if ( a1->m_lineType > 1 ) ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))a1->m_lineSprite->setScaleX)( a1->m_lineSprite, (float)(v16.width + 10.0) / a1->m_lineSprite->m_obRect.size.width); if ( a1->m_lineType == 3 ) ((void (__fastcall *)(cocos2d::CCSprite *, int))a1->m_lineSprite->setScaleY)(a1->m_lineSprite, 0x40000000); }
GD Web Decomp Icon

GD Web Decomp

Raw Source