//
// GJBaseGameLayer::visit from 0x479b14 to 0x47a72c (3096 bytes)
//
// 0 xrefs:
//
// 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 GJBaseGameLayer::visit(GJBaseGameLayer *a1)
{
float m_levelFlipping; // s15
int v3; // r3
cocos2d::CCDirector *v4; // r0
const cocos2d::CCPoint *v5; // r0
const cocos2d::CCPoint *v6; // r0
int v7; // r0
GJGroundLayer *m_groundLayer; // r3
int v9; // r2
float *p_m_cameraHeightOffset; // r6
float v11; // s19
const cocos2d::CCPoint *v12; // r0
float v13; // s16
float v14; // s16
cocos2d::CCSprite *v15; // r9
float *p_m_cameraWidthOffset; // r7
void (__fastcall *v17)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
int v18; // r11
float v19; // s19
float v20; // s15
cocos2d::CCSprite *v21; // r0
float (__fastcall *v22)(cocos2d::CCNode *__hidden); // r3
float m_cameraWidthOffset; // s19
float v24; // s15
cocos2d::CCSprite *v25; // r0
float (__fastcall *v26)(cocos2d::CCNode *__hidden); // r3
float v27; // s15
GJGroundLayer *v28; // r0
bool (__fastcall *v29)(cocos2d::CCNode *__hidden); // r3
const cocos2d::CCPoint *v30; // r0
float v31; // s16
float v32; // s15
float v33; // r0
float v34; // s16
float v35; // s19
float v36; // s15
cocos2d::CCSprite *v37; // r0
const cocos2d::CCPoint *(__fastcall *v38)(cocos2d::CCNode *__hidden); // r3
float v39; // s16
float *v40; // r0
cocos2d::CCSprite *v41; // r5
void (__fastcall *v42)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
float v43; // s16
int v44; // r11
float v45; // s15
cocos2d::CCSprite *v46; // r0
float (__fastcall *v47)(cocos2d::CCNode *__hidden); // r3
float v48; // s16
float v49; // s15
cocos2d::CCSprite *v50; // r0
void (__fastcall *v51)(cocos2d::CCSprite *__hidden, const cocos2d::CCRect *); // r3
int i; // r8
float v53; // s20
const cocos2d::CCPoint *v54; // r0
cocos2d::CCDictionary *m_gradientLayers; // r3
cocos2d::CCDictElement *m_pElements; // r3
cocos2d::CCDictElement *next; // r8
cocos2d::CCLayerColor *m_pObject; // r5
int m_unknown2; // r9
GameObject *MainObject; // r10
GameObject *v61; // r11
GameObject *v62; // r0
float v63; // s17
float v64; // s15
float v65; // s17
float v66; // s16
float v67; // s16
float v68; // s23
float v69; // s15
float v70; // s23
float v71; // s19
cocos2d::CCLayerColor_vtbl *v72; // r3
void (__fastcall *v73)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r2
const cocos2d::CCPoint *(__fastcall *v74)(cocos2d::CCNode *__hidden); // r3
int v75; // r11
float width; // s22
float v77; // r0
void (__fastcall *setScaleX)(cocos2d::CCNode *__hidden, float); // r9
float v79; // s22
float v80; // r0
float v81; // s19
float v82; // r0
void (__fastcall *setScaleY)(cocos2d::CCNode *__hidden, float); // r9
float v84; // s19
float v85; // r0
void (__fastcall *v86)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
int v87; // r0
cocos2d::CCPoint v88; // r1
cocos2d::CCDictElement *v89; // r2
cocos2d::CCNode *m_inShaderParent; // r5
int v91; // r0
cocos2d::CCNode *m_uiTriggerUI; // r5
void (__fastcall *v93)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCNode *v94; // r0
_DWORD *v95; // r3
int *v96; // r7
int *v97; // r6
int v98; // r3
int v99; // t1
void (__fastcall *v100)(int, cocos2d::CCRect *); // r11
int v101; // r0
float y; // s16
float v103; // s15
float v104; // s16
cocos2d::CCSprite *m_background; // r5
float v106; // s16
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
int v108; // r10
float v109; // s15
GJGroundLayer *m_groundLayer2; // r0
bool (__fastcall *isVisible)(cocos2d::CCNode *__hidden); // r3
const cocos2d::CCPoint *v112; // r0
float height; // s16
float v114; // s15
float v115; // r0
float v116; // s16
float v117; // s17
float v118; // s15
cocos2d::CCSprite *v119; // r0
const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // r3
float *v121; // r0
cocos2d::CCSprite *v122; // r5
void (__fastcall *v123)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
float v124; // s16
int v125; // r10
float v126; // s15
cocos2d::CCSprite *v127; // r0
float (__fastcall *getScale)(cocos2d::CCNode *__hidden); // r3
float v129; // s16
float v130; // s15
cocos2d::CCSprite *v131; // r0
void (__fastcall *setTextureRect)(cocos2d::CCSprite *__hidden, const cocos2d::CCRect *); // r3
ShaderLayer *m_shaderLayer; // r3
int m_usesShaders; // r7
int j; // r8
cocos2d::CCNode *m_aboveShaderParent; // r5
int v137; // r0
_DWORD *v138; // r3
int *v139; // r7
int *v140; // r6
int v141; // r3
int v142; // t1
int v143; // r0
float v144; // r0
int v145; // r2
bool v146; // r3
float v147; // s15
_BOOL4 v148; // r7
void (*v149)(void); // r3
float v150; // s13
cocos2d::CCSprite *v151; // r9
void (__fastcall *v152)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
float v153; // r2
float v154; // [sp+0h] [bp-D4h]
cocos2d::CCPoint v155; // [sp+4h] [bp-D0h]
void (__fastcall *v156)(int, cocos2d::CCRect *); // [sp+8h] [bp-CCh]
GameObject *v157; // [sp+Ch] [bp-C8h]
void (__fastcall *v158)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-C8h]
int v159; // [sp+Ch] [bp-C8h]
int v160; // [sp+Ch] [bp-C8h]
GameObject *v161; // [sp+10h] [bp-C4h]
int v162; // [sp+14h] [bp-C0h]
cocos2d::CCSize v163; // [sp+24h] [bp-B0h] BYREF
cocos2d::CCPoint v164; // [sp+2Ch] [bp-A8h] BYREF
cocos2d::CCPoint v165; // [sp+34h] [bp-A0h] BYREF
cocos2d::CCPoint v166; // [sp+3Ch] [bp-98h] BYREF
_BYTE v167[8]; // [sp+44h] [bp-90h] BYREF
cocos2d::CCPoint v168; // [sp+4Ch] [bp-88h] BYREF
cocos2d::CCPoint v169; // [sp+54h] [bp-80h] BYREF
cocos2d::CCPoint v170; // [sp+5Ch] [bp-78h] BYREF
cocos2d::CCPoint v171; // [sp+64h] [bp-70h] BYREF
cocos2d::CCPoint v172; // [sp+6Ch] [bp-68h] BYREF
cocos2d::CCPoint v173; // [sp+74h] [bp-60h] BYREF
cocos2d::CCRect v174; // [sp+7Ch] [bp-58h] BYREF
cocos2d::CCRect v175; // [sp+8Ch] [bp-48h] BYREF
cocos2d::CCRect v176; // [sp+9Ch] [bp-38h] BYREF
cocos2d::CCRect v177; // [sp+ACh] [bp-28h] BYREF
cocos2d::CCRect v178; // [sp+BCh] [bp-18h] BYREF
cocos2d::CCPoint v179; // 0:kr00_8.8
if ( a1->m_loadingProgress < 1.0 )
{
cocos2d::CCNode::visit(a1);
return;
}
if ( !a1->m_player1 || !GJBaseGameLayer::isFlipping(a1) )
goto LABEL_9;
m_levelFlipping = a1->m_gameState.m_levelFlipping;
if ( a1->m_cameraFlip == 1.0 )
{
if ( m_levelFlipping < 0.5 )
goto LABEL_9;
LABEL_10:
GJBaseGameLayer::flipObjects(a1);
v3 = 1;
goto LABEL_11;
}
if ( m_levelFlipping <= 0.5 )
goto LABEL_10;
LABEL_9:
v3 = 0;
LABEL_11:
v162 = v3;
LODWORD(v155.x) = &v174;
cocos2d::CCRect::CCRect(&v174, &stru_AC68D8);
cocos2d::CCRect::CCRect(&v175, &stru_AC68D8);
cocos2d::CCRect::CCRect(&v176, &stru_AC68D8);
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v163, v4);
cocos2d::CCPoint::CCPoint(&v164, v163.width * 0.5, v163.height * 0.5);
v5 = a1->m_background->getPosition(a1->m_background);
cocos2d::CCPoint::CCPoint(&v165, v5);
v6 = a1->m_groundLayer2->getPosition(a1->m_groundLayer2);
cocos2d::CCPoint::CCPoint(&v166, v6);
v7 = ((int (__fastcall *)(GJGroundLayer *))a1->m_groundLayer->isVisible)(a1->m_groundLayer);
m_groundLayer = a1->m_groundLayer;
if ( v7 )
v9 = !m_groundLayer->m_showGround2;
else
v9 = 1;
LODWORD(v155.y) = v9;
m_groundLayer->m_ground1Sprite->setOpacity(m_groundLayer->m_ground1Sprite, 100);
if ( a1->m_gameState.m_cameraAngle == 0.0 )
{
cocos2d::CCRect::operator=(&v174, &a1->m_background->m_obRect);
cocos2d::CCRect::CCRect(&v178, &v174);
if ( a1->m_groundLayer->getPosition(a1->m_groundLayer)->y < 0.0 )
y = 0.0;
else
y = a1->m_groundLayer->getPosition(a1->m_groundLayer)->y;
v103 = a1->m_background->getPosition(a1->m_background)->y;
if ( LODWORD(v155.y) )
v104 = -a1->m_background->getPosition(a1->m_background)->y;
else
v104 = y - v103;
m_background = a1->m_background;
v106 = v104 - 1.0;
setPosition = m_background->setPosition;
v108 = (int)m_background->getPosition(m_background);
cocos2d::CCPoint::CCPoint(&v173, 0.0, v106);
cocos2d::CCPoint::operator+(&v177, v108, &v173);
setPosition(m_background, &v177.origin);
v109 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background));
m_groundLayer2 = a1->m_groundLayer2;
isVisible = m_groundLayer2->isVisible;
v178.origin.y = v178.origin.y - (float)(v106 / v109);
if ( ((int (__fastcall *)(GJGroundLayer *))isVisible)(m_groundLayer2) )
{
v112 = a1->m_groundLayer2->getPosition(a1->m_groundLayer2);
height = v163.height;
if ( v112->y <= v163.height )
height = a1->m_groundLayer2->getPosition(a1->m_groundLayer2)->y;
}
else
{
height = v163.height;
}
v114 = a1->m_background->getPosition(a1->m_background)->y;
v115 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background));
v116 = (float)(height - v114) + 1.0;
v117 = v178.size.height - (float)(v116 / v115);
v118 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background));
v119 = a1->m_background;
getPosition = v119->getPosition;
v178.size.height = v116 / v118;
v178.origin.y = v178.origin.y + v117;
v121 = (float *)getPosition(v119);
v122 = a1->m_background;
v123 = v122->setPosition;
v124 = -1.0 - *v121;
v125 = (int)v122->getPosition(v122);
cocos2d::CCPoint::CCPoint(&v173, v124, 0.0);
cocos2d::CCPoint::operator+(&v177, v125, &v173);
v123(v122, &v177.origin);
v126 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background));
v127 = a1->m_background;
getScale = v127->getScale;
v178.origin.x = v178.origin.x + (float)(v124 / v126);
v129 = v163.width + 2.0;
v130 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))getScale)(v127));
v131 = a1->m_background;
setTextureRect = v131->setTextureRect;
v178.size.width = v129 / v130;
setTextureRect(v131, &v178);
}
else
{
cocos2d::CCPoint::operator-(v167, &v164);
p_m_cameraHeightOffset = &a1->m_cameraHeightOffset;
v11 = a1->m_background->getPosition(a1->m_background)->y;
v12 = a1->m_groundLayer->getPosition(a1->m_groundLayer);
v13 = -(float)(a1->m_cameraHeightOffset * 0.5);
if ( v12->y >= v13 )
v13 = a1->m_groundLayer->getPosition(a1->m_groundLayer)->y;
if ( LODWORD(v155.y) )
v14 = a1->m_background->getPosition(a1->m_background)->y + (float)(*p_m_cameraHeightOffset * 0.5);
else
v14 = v11 - v13;
v15 = a1->m_background;
p_m_cameraWidthOffset = &a1->m_cameraWidthOffset;
v17 = v15->setPosition;
v18 = (int)v15->getPosition(v15);
cocos2d::CCPoint::CCPoint(&v177.origin, -(float)(a1->m_cameraWidthOffset * 0.5), -v14);
cocos2d::CCPoint::operator+(&v178, v18, &v177);
v17(v15, &v178.origin);
cocos2d::CCRect::operator=(&v174, &a1->m_background->m_obRect);
cocos2d::CCRect::CCRect(&v178, &v174);
v19 = a1->m_cameraWidthOffset * 0.5;
v20 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background));
v21 = a1->m_background;
v22 = v21->getScale;
v178.origin.x = v178.origin.x - (float)(v19 / v20);
m_cameraWidthOffset = a1->m_cameraWidthOffset;
v24 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))v22)(v21));
v25 = a1->m_background;
v26 = v25->getScale;
v178.size.width = v178.size.width + (float)(m_cameraWidthOffset / v24);
v27 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))v26)(v25));
v28 = a1->m_groundLayer2;
v29 = v28->isVisible;
v178.origin.y = v178.origin.y + (float)(v14 / v27);
if ( ((int (__fastcall *)(GJGroundLayer *))v29)(v28) )
{
v30 = a1->m_groundLayer2->getPosition(a1->m_groundLayer2);
v31 = v163.height + (float)(*p_m_cameraHeightOffset * 0.5);
if ( v30->y <= v31 )
v31 = a1->m_groundLayer2->getPosition(a1->m_groundLayer2)->y;
}
else
{
v31 = v163.height + (float)(*p_m_cameraHeightOffset * 0.5);
}
v32 = a1->m_background->getPosition(a1->m_background)->y;
v33 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background));
v34 = (float)(v31 - v32) + 1.0;
v35 = v178.size.height - (float)(v34 / v33);
v36 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background));
v37 = a1->m_background;
v38 = v37->getPosition;
v178.size.height = v34 / v36;
v178.origin.y = v178.origin.y + v35;
v39 = (float)-(float)(*p_m_cameraWidthOffset * 0.5) - 1.0;
v40 = (float *)v38(v37);
v41 = a1->m_background;
v42 = v41->setPosition;
v43 = v39 - *v40;
v44 = (int)v41->getPosition(v41);
cocos2d::CCPoint::CCPoint(&v173, v43, 0.0);
cocos2d::CCPoint::operator+(&v177, v44, &v173);
v42(v41, &v177.origin);
v45 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getScale)(a1->m_background));
v46 = a1->m_background;
v47 = v46->getScale;
v178.origin.x = v178.origin.x + (float)(v43 / v45);
v48 = v163.width + *p_m_cameraWidthOffset;
v49 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))v47)(v46));
v50 = a1->m_background;
v51 = v50->setTextureRect;
v178.size.width = (float)(v48 + 1.0) / v49;
v51(v50, &v178);
if ( lastGradientUpdate != a1->m_gameState.m_commandIndex )
{
lastGradientUpdate = a1->m_gameState.m_commandIndex;
if ( LODWORD(v155.y) )
{
v53 = *p_m_cameraHeightOffset * 0.5;
}
else
{
v54 = a1->m_groundLayer->getPosition(a1->m_groundLayer);
v53 = *p_m_cameraHeightOffset * 0.5;
if ( v54->y >= (float)-v53 )
v53 = -a1->m_groundLayer->getPosition(a1->m_groundLayer)->y;
}
m_gradientLayers = a1->m_gradientLayers;
if ( m_gradientLayers )
{
m_pElements = m_gradientLayers->m_pElements;
if ( m_pElements )
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
else
next = nullptr;
while ( m_pElements )
{
m_pObject = (cocos2d::CCLayerColor *)m_pElements->m_pObject;
if ( m_pObject->getParent(m_pObject) )
{
m_unknown2 = m_pObject[1].m_unknown2;
MainObject = GJBaseGameLayer::tryGetMainObject(a1, *(_DWORD *)(m_unknown2 + 1648));
v61 = GJBaseGameLayer::tryGetMainObject(a1, *(_DWORD *)(m_unknown2 + 1652));
v157 = GJBaseGameLayer::tryGetMainObject(a1, *(_DWORD *)(m_unknown2 + 1656));
v62 = GJBaseGameLayer::tryGetMainObject(a1, *(_DWORD *)(m_unknown2 + 1660));
v63 = *p_m_cameraWidthOffset * 0.5;
v161 = v62;
if ( LOBYTE(m_pObject[1].m_nZOrder) )
v64 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer));
else
v64 = 1.0;
v65 = v63 / v64;
if ( LOBYTE(m_pObject[1].m_nZOrder) )
v66 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer));
else
v66 = 1.0;
v67 = v53 / v66;
v68 = *p_m_cameraHeightOffset * 0.5;
if ( LOBYTE(m_pObject[1].m_nZOrder) )
v69 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer));
else
v69 = 1.0;
v70 = v68 / v69;
if ( *(_BYTE *)(m_unknown2 + 1664) )
{
if ( MainObject )
cocos2d::CCPoint::CCPoint(&v168, &stru_AC68C0);
else
cocos2d::CCPoint::CCPoint(&v168, v65, v67);
if ( v61 )
cocos2d::CCPoint::CCPoint(&v169, &v168);
else
cocos2d::CCPoint::CCPoint(&v169, v65 + v168.x, 0.0);
if ( v157 )
cocos2d::CCPoint::CCPoint(&v170, &v168);
else
cocos2d::CCPoint::CCPoint(&v170, 0.0, v70 + v168.y);
if ( v161 )
{
cocos2d::CCPoint::CCPoint(&v171, &v168);
}
else
{
cocos2d::CCPoint::CCPoint(&v177.origin, v65, v70);
cocos2d::CCPoint::operator+(&v171, &v168, &v177);
}
v86 = m_pObject->setPosition;
v87 = (int)m_pObject->getPosition(m_pObject);
cocos2d::CCPoint::operator-(&v177, v87, &v168);
v86(m_pObject, &v177.origin);
cocos2d::CCPoint::CCPoint(&v172, &v169);
cocos2d::CCPoint::CCPoint(&v173, &v170);
cocos2d::CCPoint::CCPoint(&v177.origin, &v171);
LODWORD(v88.x) = &v172;
LODWORD(v88.y) = &v173;
LODWORD(v179.x) = &v177;
v179.y = v154;
cocos2d::CCLayerColor::addToVertices(m_pObject, v88, v179, v155);
}
else
{
if ( v157 )
v71 = 0.0;
else
v71 = v65;
v72 = m_pObject->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( v161 )
v65 = 0.0;
v73 = v72->setPosition;
v74 = v72->getPosition;
v158 = v73;
if ( v61 )
v67 = 0.0;
if ( MainObject )
v70 = 0.0;
v75 = (int)v74(m_pObject);
cocos2d::CCPoint::CCPoint(&v173, v71, v67);
cocos2d::CCPoint::operator-(&v177, v75, &v173);
v158(m_pObject, &v177.origin);
if ( (float)(v71 + v65) != 0.0 )
{
width = v163.width;
v77 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getScaleX)(m_pObject));
setScaleX = m_pObject->setScaleX;
v79 = width * v77;
v80 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getScaleX)(m_pObject));
((void (__fastcall *)(cocos2d::CCLayerColor *, _DWORD))setScaleX)(
m_pObject,
v80 * (float)((float)((float)(v79 + v71) + v65) / v79));
}
if ( (float)(v67 + v70) != 0.0 )
{
v81 = v163.height;
v82 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getScaleY)(m_pObject));
setScaleY = m_pObject->setScaleY;
v84 = v81 * v82;
v85 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayerColor *))m_pObject->getScaleY)(m_pObject));
((void (__fastcall *)(cocos2d::CCLayerColor *, _DWORD))setScaleY)(
m_pObject,
v85 * (float)((float)((float)(v84 + v67) + v70) / v84));
}
}
}
if ( next )
v89 = (cocos2d::CCDictElement *)next->hh.next;
else
v89 = nullptr;
m_pElements = next;
next = v89;
}
}
}
for ( i = 0; i != 3; ++i )
{
if ( i )
{
if ( i == 1 )
m_inShaderParent = a1->m_inShaderParent;
else
m_inShaderParent = a1->m_aboveShaderParent;
}
else
{
m_inShaderParent = a1->m_objectParent;
}
v91 = (int)m_inShaderParent->getChildren(m_inShaderParent);
if ( v91 )
{
v95 = *(_DWORD **)(v91 + 52);
if ( *v95 )
{
v96 = (int *)v95[3];
v97 = &v96[*v95 - 1];
while ( v96 <= v97 )
{
v99 = *v96++;
v98 = v99;
if ( !v99 )
break;
v159 = v98;
v100 = *(void (__fastcall **)(int, cocos2d::CCRect *))(*(_DWORD *)v98 + 92);
v101 = (*(int (__fastcall **)(int))(*(_DWORD *)v98 + 96))(v98);
cocos2d::CCPoint::operator+(&v177, v101, v167);
v100(v159, &v177);
}
}
}
m_inShaderParent->setPosition(m_inShaderParent, &v164);
((void (__fastcall *)(cocos2d::CCNode *, _DWORD))m_inShaderParent->setRotation)(
m_inShaderParent,
LODWORD(a1->m_gameState.m_cameraAngle));
}
((void (__fastcall *)(cocos2d::CCNode *, unsigned int))a1->m_uiTriggerUI->setRotation)(
a1->m_uiTriggerUI,
LODWORD(a1->m_gameState.m_cameraAngle) ^ 0x80000000);
m_uiTriggerUI = a1->m_uiTriggerUI;
v93 = m_uiTriggerUI->setPosition;
v94 = m_uiTriggerUI->getParent(m_uiTriggerUI);
cocos2d::CCNode::convertToNodeSpace(&v177.origin, v94, &stru_AC68C0);
v93(m_uiTriggerUI, &v177.origin);
}
cocos2d::CCRect::CCRect(&v177);
cocos2d::CCPoint::CCPoint(&v171);
m_shaderLayer = a1->m_shaderLayer;
if ( m_shaderLayer )
{
m_usesShaders = m_shaderLayer->m_state.m_usesShaders;
if ( m_shaderLayer->m_state.m_usesShaders )
{
if ( m_shaderLayer->m_state.m_minBlendingLayer > 0 )
{
cocos2d::CCRect::operator=(&v177, &a1->m_background->m_obRect);
v144 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_background->getPosition)(a1->m_background);
cocos2d::CCPoint::operator=((PlayerObject *)&v171, v144, v145, v146);
cocos2d::CCRect::CCRect(&v178, &v177);
v147 = 100.0 / a1->m_background->getScale(a1->m_background);
if ( LODWORD(v155.y) )
v148 = 1;
else
v148 = a1->m_gameState.m_cameraAngle == 0.0;
v149 = (void (*)(void))a1->m_background->setTextureRect;
v178.origin.x = v178.origin.x - v147;
v178.origin.y = v178.origin.y - v147;
v150 = 1.0;
v178.size.width = v178.size.width + (float)(v147 + v147);
if ( v148 )
v150 = 2.0;
v178.size.height = v178.size.height + (float)(v147 * v150);
v149();
v151 = a1->m_background;
v152 = v151->setPosition;
if ( v148 )
v153 = -100.0;
else
v153 = 0.0;
cocos2d::CCPoint::CCPoint(&v172, -100.0, v153);
cocos2d::CCPoint::operator+(&v173, &v171, &v172);
m_usesShaders = 1;
v152(v151, &v173);
}
else
{
m_usesShaders = 0;
}
}
}
else
{
m_usesShaders = 0;
}
if ( ((int (__fastcall *)(cocos2d::CCNode *))a1->m_flashNode->isVisible)(a1->m_flashNode) )
GJBaseGameLayer::visitWithColorFlash(a1);
else
cocos2d::CCNode::visit(a1);
if ( m_usesShaders )
{
a1->m_background->setTextureRect(a1->m_background, &v177);
a1->m_background->setPosition(a1->m_background, &v171);
}
if ( a1->m_gameState.m_cameraAngle != 0.0 )
{
for ( j = 0; j != 3; ++j )
{
if ( j )
{
if ( j == 1 )
m_aboveShaderParent = a1->m_inShaderParent;
else
m_aboveShaderParent = a1->m_aboveShaderParent;
}
else
{
m_aboveShaderParent = a1->m_objectParent;
}
v137 = (int)m_aboveShaderParent->getChildren(m_aboveShaderParent);
if ( v137 )
{
v138 = *(_DWORD **)(v137 + 52);
if ( *v138 )
{
v139 = (int *)v138[3];
v140 = &v139[*v138 - 1];
while ( v139 <= v140 )
{
v142 = *v139++;
v141 = v142;
if ( !v142 )
break;
v160 = v141;
v156 = *(void (__fastcall **)(int, cocos2d::CCRect *))(*(_DWORD *)v141 + 92);
v143 = (*(int (__fastcall **)(int))(*(_DWORD *)v141 + 96))(v141);
cocos2d::CCPoint::operator+(&v178, v143, &v164);
v156(v160, &v178);
}
}
}
((void (__fastcall *)(cocos2d::CCNode *, _DWORD))m_aboveShaderParent->setRotation)(m_aboveShaderParent, 0);
m_aboveShaderParent->setPosition(m_aboveShaderParent, &stru_AC68C0);
}
((void (__fastcall *)(cocos2d::CCNode *, _DWORD))a1->m_uiTriggerUI->setRotation)(a1->m_uiTriggerUI, 0);
a1->m_uiTriggerUI->setPosition(a1->m_uiTriggerUI, &stru_AC68C0);
}
a1->m_background->setTextureRect(a1->m_background, (const cocos2d::CCRect *)LODWORD(v155.x));
a1->m_background->setPosition(a1->m_background, &v165);
if ( v162 )
GJBaseGameLayer::flipObjects(a1);
}