//
// FMODLevelVisualizer::init from 0x14029e830 to 0x14029ece1 (1201 bytes)
//
// 5 xrefs:
// > FMODLevelVisualizer::create @ 0x14029e7fb
// > FMODLevelVisualizer::create @ 0x14029e802
// > FMODLevelVisualizer::create @ 0x14029e7ec
// > ??> @ 0x140572af8
// > ??> @ 0x1406d1f10
//
// 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)
{
bool result; // al
cocos2d::CCTextureCache *v3; // rax
cocos2d::CCTexture2D *v4; // rbx
struct cocos2d::CCSpriteBatchNode *v5; // r14
struct cocos2d::CCSprite *v6; // rbx
float v7; // xmm0_4
int v8; // ebp
float v9; // xmm7_4
unsigned int v10; // r15d
int v11; // esi
struct cocos2d::CCSprite *v12; // rdi
__int64 v13; // rdx
float v14; // xmm0_4
cocos2d::CCSprite_vtbl *v15; // rbx
const cocos2d::CCPoint *v16; // rax
struct cocos2d::CCSprite *v17; // rdi
float v18; // xmm0_4
cocos2d::CCSprite_vtbl *v19; // rbx
const cocos2d::CCPoint *v20; // rax
float v21; // [rsp+F8h] [rbp+10h] BYREF
cocos2d::CCPoint v22; // [rsp+100h] [rbp+18h] BYREF
char v23; // [rsp+108h] [rbp+20h] BYREF
result = cocos2d::CCNode::init(a1);
if ( result )
{
a1->setContentSize(a1, &stru_1406C1F20);
v3 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();
v4 = cocos2d::CCTextureCache::addImage(v3, "PixelSheet_01.png", 0);
cocos2d::CCTexture2D::setAliasTexParameters(v4);
v5 = cocos2d::CCSpriteBatchNode::createWithTexture(v4);
a1->addChild_1(a1, v5);
v5->setTag(v5, 50);
v6 = cocos2d::CCSprite::createWithSpriteFrameName("pixelart_base_001.png");
v5->addChild_0(v5, v6, -1);
v6->setColor(&v6->cocos2d::CCRGBAProtocol, &stru_140529AD4);
a1->m_width = v6->m_obRect.size.width;
((void (__fastcall *)(struct cocos2d::CCSprite *))v6->setScaleX)(v6);
v7 = ((float (__fastcall *)(struct cocos2d::CCSprite *))v6->setScaleY)(v6);
cocos2d::CCPoint::CCPoint(v7, -3.0);
v8 = 0;
v9 = v21;
while ( 1 )
{
cocos2d::CCPoint::CCPoint(&v22);
v10 = 0;
if ( v8 )
{
if ( v8 == 1 )
{
v9 = 0.60000002;
LOWORD(v21) = -1;
v10 = 200;
}
else
{
if ( v8 != 2 )
goto LABEL_10;
v9 = 0.85000002;
LOWORD(v21) = 255;
v10 = 300;
}
}
else
{
v9 = 0.0;
LOWORD(v21) = -256;
v10 = 100;
}
BYTE2(v21) = 0;
LABEL_10:
v11 = 0;
v22.y = v22.y + (float)(v9 * 96.0);
while ( 1 )
{
v12 = cocos2d::CCSprite::createWithSpriteFrameName("pixelart_base_001.png");
v5->addChild_0(v5, v12, v11);
v12->setColor(&v12->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v21);
if ( !v11 )
{
LOBYTE(v13) = 100;
v12->setOpacity(&v12->cocos2d::CCRGBAProtocol, v13);
}
v14 = ((float (__fastcall *)(struct cocos2d::CCSprite *, cocos2d::CCPoint *))v12->setPosition_0)(v12, &v22);
v15 = v12->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v14, 0.0);
v15->setAnchorPoint(v12, v16);
((void (__fastcall *)(struct cocos2d::CCSprite *))v12->setScaleX)(v12);
((void (__fastcall *)(struct cocos2d::CCSprite *))v12->setScaleY)(v12);
if ( v11 == 1 )
break;
if ( ++v11 >= 2 )
goto LABEL_17;
}
v12->setTag(v12, v10);
LABEL_17:
if ( ++v8 >= 3 )
{
v17 = cocos2d::CCSprite::createWithSpriteFrameName("pixelart_base_001.png");
v5->addChild_0(v5, v17, 2);
v17->setColor(&v17->cocos2d::CCRGBAProtocol, &stru_140529AD4);
v18 = ((float (__fastcall *)(struct cocos2d::CCSprite *, char *))v17->setPosition_0)(v17, &v23);
v19 = v17->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v18, 0.0);
v19->setAnchorPoint(v17, v20);
((void (__fastcall *)(struct cocos2d::CCSprite *))v17->setScaleX)(v17);
((void (__fastcall *)(struct cocos2d::CCSprite *))v17->setScaleY)(v17);
v17->setTag(v17, 400);
FMODLevelVisualizer::updateVisualizer(a1, 0.0, 0.0, 0.0);
return 1;
}
}
}
return result;
}