// // FMODLevelVisualizer::init from 0x4b1480 to 0x4b173a (698 bytes) // // 1 xrefs: // > FMODLevelVisualizer::create @ 0x4b128e // // 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 // bool FMODLevelVisualizer::init(FMODLevelVisualizer *a1) { int v2; // r6 cocos2d::CCTextureCache *v3; // r0 cocos2d::CCTexture2D *v4; // r5 cocos2d::CCSpriteBatchNode *v5; // r5 cocos2d::CCSprite *v6; // r7 float width; // s15 cocos2d::CCSprite_vtbl *v8; // r3 float v9; // s16 int v10; // r9 float v11; // s19 float v12; // s18 int v13; // r8 cocos2d::CCSprite *v14; // r10 cocos2d::CCSprite *v15; // r6 void (__fastcall *v16)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r5 _BOOL4 v18; // [sp+0h] [bp-3Ch] void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+14h] [bp-28h] __int16 v20; // [sp+18h] [bp-24h] BYREF char v21; // [sp+1Ah] [bp-22h] cocos2d::CCPoint v22; // [sp+1Ch] [bp-20h] BYREF cocos2d::CCPoint v23; // [sp+24h] [bp-18h] BYREF cocos2d::CCPoint v24; // [sp+2Ch] [bp-10h] BYREF v18 = cocos2d::CCNode::init(a1); if ( v18 ) { v2 = 0; a1->setContentSize(a1, &stru_AC6978); v3 = cocos2d::CCTextureCache::sharedTextureCache(); v4 = cocos2d::CCTextureCache::addImage(v3, "PixelSheet_01.png", 0); cocos2d::CCTexture2D::setAliasTexParameters(v4); v5 = cocos2d::CCSpriteBatchNode::createWithTexture(v4, (unsigned int)&dword_1C + 1); a1->addChild(a1, v5); v5->setTag(v5, 50); v6 = cocos2d::CCSprite::createWithSpriteFrameName("pixelart_base_001.png"); v5->addChild_0(v5, v6, -1); v6->setColor(v6, &stru_9AC15C); width = v6->m_obRect.size.width; v8 = v6->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_width = width; ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v8->setScaleX)(v6, 10.0 / width); ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v6->setScaleY)(v6, 100.0 / a1->m_width); cocos2d::CCPoint::CCPoint(&v22, -3.0, -48.0); v9 = 6.0 / a1->m_width; do { cocos2d::CCPoint::CCPoint(&v23, &v22); if ( v2 == 1 ) { v10 = 200; v11 = 0.85; v12 = 0.6; v20 = -1; v21 = 0; } else if ( v2 == 2 ) { v11 = 1.0; v10 = 300; v12 = 0.85; v20 = 255; v21 = 0; } else { v20 = -256; v10 = 100; v21 = 0; v11 = 0.6; v12 = 0.0; } v13 = 0; v23.y = v23.y + (float)(v12 * 96.0); while ( 1 ) { v14 = cocos2d::CCSprite::createWithSpriteFrameName("pixelart_base_001.png"); v5->addChild_0(v5, v14, v13); v14->setColor(v14, (const cocos2d::ccColor3B *)&v20); if ( !v13 ) v14->setOpacity(v14, 100); v14->setPosition(v14, &v23); setAnchorPoint = v14->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v24, 0.0, 0.0); setAnchorPoint(v14, &v24); v14->setScaleX(v14, COERCE_FLOAT(LODWORD(v9))); ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v14->setScaleY)( v14, (float)((float)(v11 - v12) * 96.0) / a1->m_width); if ( v13 ) break; v13 = 1; } ++v2; v14->setTag(v14, v10); } while ( v2 != 3 ); v15 = cocos2d::CCSprite::createWithSpriteFrameName("pixelart_base_001.png"); v5->addChild_0(v5, v15, 2); v15->setColor(v15, &stru_9AC15C); v15->setPosition(v15, &v22); v16 = v15->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v24, 0.0, 0.0); v16(v15, &v24); v15->setScaleX(v15, COERCE_FLOAT(LODWORD(v9))); ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v15->setScaleY)(v15, 1.0 / a1->m_width); v15->setTag(v15, 400); FMODLevelVisualizer::updateVisualizer(a1, 0.0, 0.0, 0.0); } return v18; }
GD Web Decomp Icon

GD Web Decomp

Raw Source