//
// LevelAreaLayer::addGodRay from 0xa2f2dc to 0xa2f624 (840 bytes)
//
// 7 xrefs:
// > LevelAreaLayer::init @ 0xa2fec4
// > LevelAreaLayer::init @ 0xa2ff04
// > LevelAreaLayer::init @ 0xa2ff44
// > LevelAreaLayer::init @ 0xa2ff8c
// > LevelAreaLayer::init @ 0xa2ffcc
// > LevelAreaLayer::init @ 0xa3000c
// > ??> @ 0x796c8
//
// 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 LevelAreaLayer::addGodRay(
LevelAreaLayer *a1,
float a2,
float a3,
float a4,
float a5,
float a6,
cocos2d::CCPoint a7)
{
const cocos2d::CCPoint *v7; // x1
const cocos2d::CCPoint *v13; // x23
cocos2d::CCDirector *v14; // x0
cocos2d::CCSprite *v15; // x19
void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24
void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x2
void (__fastcall *refreshTextureRect)(cocos2d::CCSprite *__hidden); // x2
cocos2d::CCFadeTo *v19; // x0
cocos2d::CCEaseInOut *v20; // x20
cocos2d::CCFadeTo *v21; // x0
int v22; // w0
cocos2d::CCDelayTime *v23; // x0
cocos2d::CCActionInterval *v24; // x0
cocos2d::CCRepeatForever *v25; // x0
cocos2d::CCSprite *v26; // x20
void (__fastcall *v27)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x23
__int64 v28; // x0
cocos2d::CCSprite *v29; // x0
cocos2d::ccBlendFunc (__fastcall *getBlendFunc)(cocos2d::CCSprite *__hidden); // x1
void (__fastcall *setBlendFunc)(cocos2d::CCSprite *__hidden, cocos2d::ccBlendFunc); // x19
__int64 v32; // x0
cocos2d::CCFadeTo *v33; // x0
cocos2d::CCEaseInOut *v34; // x19
cocos2d::CCFadeTo *v35; // x0
cocos2d::CCEaseInOut *v36; // x0
cocos2d::CCActionInterval *v37; // x0
cocos2d::CCRepeatForever *v38; // x0
cocos2d::CCEaseInOut *v40; // [xsp+70h] [xbp+70h]
float v41; // [xsp+88h] [xbp+88h]
cocos2d::CCPoint v42; // [xsp+90h] [xbp+90h] BYREF
v13 = v7;
v14 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v14);
v15 = cocos2d::CCSprite::createWithSpriteFrameName("godray01_001.png");
v15->setPosition(v15, v13);
setAnchorPoint = v15->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v42, 1.0, 0.5);
setAnchorPoint(v15, &v42);
v15->setScaleY(v15, a6);
v15->setScaleX(v15, (float)((float)(v41 * 0.5) * 1.5) / v15->m_obRect.size.width);
setColor = v15->setColor;
LOBYTE(v42.x) = -1;
*(_WORD *)((char *)&v42.x + 1) = 200;
setColor(v15, (const cocos2d::ccColor3B *)&v42);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))v15->setBlendFunc)(v15, 0x100000302LL);
refreshTextureRect = v15->refreshTextureRect;
v15->m_fTlVertexMod = 0.3;
v15->m_fBlVertexMod = 0.3;
refreshTextureRect(v15);
v15->setRotation(v15, 30.0);
v15->setOpacity(v15, (unsigned int)a2);
a1->addChild(a1, v15);
v19 = cocos2d::CCFadeTo::create(a5, (unsigned int)a3);
v20 = cocos2d::CCEaseInOut::create(v19, 2.0);
v21 = cocos2d::CCFadeTo::create(a5, (unsigned int)a4);
v40 = cocos2d::CCEaseInOut::create(v21, 2.0);
v22 = rand();
v23 = cocos2d::CCDelayTime::create((float)v22 * 4.6566e-10);
v24 = (cocos2d::CCActionInterval *)cocos2d::CCSequence::create((cocos2d::CCSequence *)v20, v40, v23, 0);
v25 = cocos2d::CCRepeatForever::create(v24);
cocos2d::CCNode::runAction(v15, v25);
v26 = cocos2d::CCSprite::createWithSpriteFrameName("towerShine.png");
v26->setPosition(v26, v13);
a1->addChild_0(a1, v26, 4);
v26->setScaleX(v26, 1.2);
v26->setScaleY(v26, 1.44);
v27 = v26->setColor;
v28 = (__int64)v15->getColor(v15);
v27(v26, (const cocos2d::ccColor3B *)v28);
v29 = v15;
getBlendFunc = v15->getBlendFunc;
setBlendFunc = v26->setBlendFunc;
v32 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))getBlendFunc)(v29);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))setBlendFunc)(v26, v32);
v26->setOpacity(v26, (unsigned int)(float)(a2 * 0.9));
cocos2d::CCArray::addObject(a1->m_godRays, v26);
v33 = cocos2d::CCFadeTo::create(a5, (unsigned int)(float)(a3 * 0.9));
v34 = cocos2d::CCEaseInOut::create(v33, 2.0);
v35 = cocos2d::CCFadeTo::create(a5, (unsigned int)(float)(a4 * 0.9));
v36 = cocos2d::CCEaseInOut::create(v35, 2.0);
v37 = (cocos2d::CCActionInterval *)cocos2d::CCSequence::create((cocos2d::CCSequence *)v34, v36, 0);
v38 = cocos2d::CCRepeatForever::create(v37);
cocos2d::CCNode::runAction(v26, v38);
}