//
// ShaderLayer::updateEffectOffsets from 0x54bb90 to 0x54c7b2 (3106 bytes)
//
// 1 xrefs:
// > ShaderLayer::visit @ 0x54f160
//
// 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 ShaderLayer::updateEffectOffsets(ShaderLayer *a1, cocos2d::CCPoint a2)
{
float x; // r8
int v4; // r2
bool v5; // r3
int v6; // r2
bool v7; // r3
cocos2d::CCPoint v8; // r2
int v9; // r2
bool v10; // r3
float v11; // s13
float v12; // s15
int v13; // r2
bool v14; // r3
float m_savedCameraRotation; // r11
cocos2d::CCGLProgram *v16; // r0
float v17; // r0
float v18; // s11
float m_shockWaveMinSize; // s15
float m_shockWaveTime1; // s12
float m_shockWaveTime2; // s13
float m_shockWaveTime3; // s14
float m_shockWaveTime4; // s15
float v24; // s10
float v25; // s10
float v26; // s10
float v27; // s9
float v28; // s12
cocos2d::CCGLProgram *v29; // r0
cocos2d::CCPoint v30; // r2
int v31; // r2
bool v32; // r3
double v33; // d7
float v34; // s13
int v35; // r2
bool v36; // r3
float v37; // r11
float y; // s12
float m_shockLineTime1; // s11
float m_shockLineTime2; // s13
float m_shockLineTime3; // s14
float m_shockLineTime4; // s15
float v43; // s10
float v44; // s10
float v45; // s10
float v46; // s9
float v47; // s11
int (*getShaderProgram)(void); // r3
cocos2d::CCGLProgram *v49; // r0
int m_shockLineCenterUniform; // r1
float v51; // r2
cocos2d::CCPoint v52; // r2
int v53; // r2
bool v54; // r3
float v55; // s13
float v56; // s15
int v57; // r2
bool v58; // r3
float v59; // r10
cocos2d::CCGLProgram *v60; // r0
cocos2d::CCPoint v61; // r2
int v62; // r2
bool v63; // r3
float v64; // s13
float v65; // s15
int v66; // r2
bool v67; // r3
float v68; // r10
cocos2d::CCGLProgram *v69; // r0
float m_pinchTargetY; // s18
float m_pinchTargetX; // s17
GJBaseGameLayer *m_gameLayer; // r3
float v73; // s16
float m_shockWaveTimeMult; // s19
cocos2d::CCGLProgram *v75; // r0
cocos2d::CCPoint v76; // r2
int v77; // r2
bool v78; // r3
float v79; // s13
float v80; // s15
int v81; // r2
bool v82; // r3
float v83; // r10
cocos2d::CCGLProgram *v84; // r0
cocos2d::CCGLProgram *v85; // r0
float v86; // s17
float v87; // s16
cocos2d::CCGLProgram *v88; // r8
float v89; // s19
float v90; // r0
cocos2d::CCPoint v91; // r2
int v92; // r2
bool v93; // r3
int v94; // r2
bool v95; // r3
float v96; // r10
cocos2d::CCGLProgram *v97; // r0
cocos2d::CCPoint v98; // r2
int v99; // r2
bool v100; // r3
float v101; // s13
float v102; // s15
int v103; // r2
bool v104; // r3
float v105; // r10
cocos2d::CCGLProgram *v106; // r0
GJBaseGameLayer *v107; // r3
float v108; // s15
float v109; // s17
float v110; // s15
int v111; // r2
bool v112; // r3
float v113; // r0
float v114; // s18
float v115; // s16
float v116; // s15
cocos2d::CCGLProgram *v117; // r0
cocos2d::CCGLProgram *v118; // r0
cocos2d::CCGLProgram *v119; // r0
cocos2d::CCSize v120; // [sp+4h] [bp-8h] BYREF
cocos2d::CCPoint v121; // [sp+Ch] [bp+0h] BYREF
cocos2d::CCPoint v122; // [sp+14h] [bp+8h] BYREF
cocos2d::CCPoint v123; // [sp+1Ch] [bp+10h] BYREF
cocos2d::CCPoint v124; // [sp+24h] [bp+18h] BYREF
cocos2d::CCPoint v125; // [sp+2Ch] [bp+20h] BYREF
cocos2d::CCPoint v126; // [sp+34h] [bp+28h] BYREF
cocos2d::CCPoint v127; // [sp+3Ch] [bp+30h] BYREF
x = a2.x;
cocos2d::CCSize::CCSize(&v120, &a1->m_screenSize);
cocos2d::CCPoint::CCPoint(&v121, 0.5, 0.5);
cocos2d::CCPoint::CCPoint(&v122, (const cocos2d::CCPoint *)LODWORD(x));
cocos2d::CCPoint::CCPoint(&v127, *(float *)LODWORD(x) / v120.width, *(float *)(LODWORD(x) + 4) / v120.height);
cocos2d::CCPoint::operator=((PlayerObject *)&v122, COERCE_FLOAT(&v127), v4, v5);
cocos2d::CCPoint::operator*(&v127, &v122, LODWORD(a1->m_scaleFactor));
cocos2d::CCPoint::operator=((PlayerObject *)&v122, COERCE_FLOAT(&v127), v6, v7);
if ( a1->m_state.m_shockWaveStartTime > 0.0 )
{
cocos2d::CCPoint::CCPoint(&v125);
if ( a1->m_state.m_shockWaveTarget && a1->m_gameLayer )
{
cocos2d::CCPoint::CCPoint(&v126, &a1->m_state.m_shockWaveCenter);
LODWORD(v8.x) = &v126;
ShaderLayer::objectPosToShaderPos(&v127, a1, v8);
}
else
{
v11 = v121.x + a1->m_state.m_shockWaveScreenOffset.x * 0.5;
v12 = v121.y + a1->m_state.m_shockWaveScreenOffset.y * 0.5;
cocos2d::CCPoint::CCPoint(&v127, v11, v12);
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v13, v14);
m_savedCameraRotation = a1->m_savedCameraRotation;
cocos2d::CCPoint::CCPoint(&v127, &v121);
rotatePoint(&v125.x, m_savedCameraRotation, &v127.x);
cocos2d::CCPoint::operator-(&v127, &v125, &v122);
}
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v9, v10);
v16 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith2f(v16, a1->m_shockWaveCenterUniform, v125.x, v125.y);
cocos2d::CCPoint::CCPoint(&v127, 0.5, 0.5);
cocos2d::CCPoint::operator-(&v126, &v127, &v125);
v17 = sqrtf((float)(v126.y * v126.y) + (float)(v126.x * v126.x));
v18 = v17;
if ( a1->m_shockWaveUnk46c )
{
m_shockWaveMinSize = a1->m_shockWaveMinSize;
if ( v17 >= m_shockWaveMinSize )
m_shockWaveMinSize = v17;
v18 = a1->m_shockWaveMaxSize - m_shockWaveMinSize;
}
m_shockWaveTime1 = a1->m_shockWaveTime1;
m_shockWaveTime2 = a1->m_shockWaveTime2;
m_shockWaveTime3 = a1->m_shockWaveTime3;
m_shockWaveTime4 = a1->m_shockWaveTime4;
if ( m_shockWaveTime3 > m_shockWaveTime4 )
{
if ( m_shockWaveTime2 > m_shockWaveTime4 )
goto LABEL_20;
}
else if ( m_shockWaveTime2 > m_shockWaveTime3 )
{
if ( m_shockWaveTime3 <= m_shockWaveTime4 )
{
v24 = a1->m_shockWaveTime3;
goto LABEL_16;
}
LABEL_20:
if ( m_shockWaveTime1 > m_shockWaveTime4 )
{
v25 = a1->m_shockWaveTime4;
LABEL_22:
if ( m_shockWaveTime2 <= v25 )
{
v26 = a1->m_shockWaveTime2;
}
else if ( m_shockWaveTime3 > m_shockWaveTime4 )
{
v26 = a1->m_shockWaveTime4;
}
else
{
v26 = a1->m_shockWaveTime3;
}
LABEL_27:
if ( m_shockWaveTime3 < m_shockWaveTime4 )
{
if ( m_shockWaveTime2 < m_shockWaveTime4 )
goto LABEL_37;
}
else if ( m_shockWaveTime2 < m_shockWaveTime3 )
{
if ( m_shockWaveTime3 >= m_shockWaveTime4 )
{
v27 = a1->m_shockWaveTime3;
goto LABEL_33;
}
LABEL_37:
if ( m_shockWaveTime1 < m_shockWaveTime4 )
{
v28 = a1->m_shockWaveTime4;
LABEL_39:
if ( m_shockWaveTime2 >= v28 )
{
m_shockWaveTime1 = a1->m_shockWaveTime2;
}
else if ( m_shockWaveTime3 < m_shockWaveTime4 )
{
m_shockWaveTime1 = a1->m_shockWaveTime4;
}
else
{
m_shockWaveTime1 = a1->m_shockWaveTime3;
}
}
LABEL_44:
v29 = (cocos2d::CCGLProgram *)((int (*)(void))a1->m_sprite->getShaderProgram)();
if ( (float)(v18 - 1.4142) > m_shockWaveTime1 == (float)(v18 + 1.4142) <= v26 )
cocos2d::CCGLProgram::setUniformLocationWith2f(v29, a1->m_shockWaveCenterUniform, v125.x, v125.y);
else
cocos2d::CCGLProgram::setUniformLocationWith1f(v29, a1->m_shockWaveTimeUniform, 0.0);
goto LABEL_47;
}
v27 = a1->m_shockWaveTime2;
LABEL_33:
if ( m_shockWaveTime1 < v27 )
{
if ( m_shockWaveTime3 < m_shockWaveTime4 )
v28 = a1->m_shockWaveTime4;
else
v28 = a1->m_shockWaveTime3;
goto LABEL_39;
}
goto LABEL_44;
}
LABEL_150:
v26 = a1->m_shockWaveTime1;
goto LABEL_27;
}
v24 = a1->m_shockWaveTime2;
LABEL_16:
if ( m_shockWaveTime1 > v24 )
{
if ( m_shockWaveTime3 > m_shockWaveTime4 )
v25 = a1->m_shockWaveTime4;
else
v25 = a1->m_shockWaveTime3;
goto LABEL_22;
}
goto LABEL_150;
}
LABEL_47:
if ( a1->m_state.m_shockLineStartTime <= 0.0 )
goto LABEL_98;
cocos2d::CCPoint::CCPoint(&v125);
if ( a1->m_state.m_shockLineTarget && a1->m_gameLayer )
{
cocos2d::CCPoint::CCPoint(&v126, &a1->m_state.m_shockLineCenter);
LODWORD(v30.x) = &v126;
ShaderLayer::objectPosToShaderPos(&v127, a1, v30);
}
else
{
v33 = a1->m_state.m_shockLineScreenOffset * 0.5;
v34 = v121.x + v33;
*((float *)&v33 + 1) = v121.y + v33;
cocos2d::CCPoint::CCPoint(&v127, v34, *((float *)&v33 + 1));
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v35, v36);
v37 = a1->m_savedCameraRotation;
cocos2d::CCPoint::CCPoint(&v127, &v121);
rotatePoint(&v125.x, v37, &v127.x);
cocos2d::CCPoint::operator-(&v127, &v125, &v122);
}
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v31, v32);
cocos2d::CCPoint::CCPoint(&v127, 0.5, 0.5);
cocos2d::CCPoint::operator-(&v126, &v127, &v125);
y = v126.y;
if ( !a1->m_state.m_shockLineAxis )
y = v126.x;
if ( a1->m_state.m_shockLineDual )
y = fabsf(y);
if ( a1->m_state.m_shockLineDirection )
y = 1.0 - y;
m_shockLineTime1 = a1->m_shockLineTime1;
m_shockLineTime2 = a1->m_shockLineTime2;
m_shockLineTime3 = a1->m_shockLineTime3;
m_shockLineTime4 = a1->m_shockLineTime4;
if ( m_shockLineTime3 > m_shockLineTime4 )
{
if ( m_shockLineTime2 > m_shockLineTime4 )
goto LABEL_68;
LABEL_63:
v43 = a1->m_shockLineTime2;
LABEL_64:
if ( m_shockLineTime1 > v43 )
{
if ( m_shockLineTime3 > m_shockLineTime4 )
v44 = a1->m_shockLineTime4;
else
v44 = a1->m_shockLineTime3;
goto LABEL_70;
}
LABEL_151:
v45 = a1->m_shockLineTime1;
goto LABEL_75;
}
if ( m_shockLineTime2 <= m_shockLineTime3 )
goto LABEL_63;
if ( m_shockLineTime3 <= m_shockLineTime4 )
{
v43 = a1->m_shockLineTime3;
goto LABEL_64;
}
LABEL_68:
if ( m_shockLineTime1 <= m_shockLineTime4 )
goto LABEL_151;
v44 = a1->m_shockLineTime4;
LABEL_70:
if ( m_shockLineTime2 <= v44 )
{
v45 = a1->m_shockLineTime2;
}
else if ( m_shockLineTime3 > m_shockLineTime4 )
{
v45 = a1->m_shockLineTime4;
}
else
{
v45 = a1->m_shockLineTime3;
}
LABEL_75:
if ( m_shockLineTime3 < m_shockLineTime4 )
{
if ( m_shockLineTime2 < m_shockLineTime4 )
goto LABEL_85;
LABEL_80:
v46 = a1->m_shockLineTime2;
goto LABEL_81;
}
if ( m_shockLineTime2 >= m_shockLineTime3 )
goto LABEL_80;
if ( m_shockLineTime3 < m_shockLineTime4 )
{
LABEL_85:
if ( m_shockLineTime1 >= m_shockLineTime4 )
goto LABEL_92;
v47 = a1->m_shockLineTime4;
goto LABEL_87;
}
v46 = a1->m_shockLineTime3;
LABEL_81:
if ( m_shockLineTime1 >= v46 )
goto LABEL_92;
if ( m_shockLineTime3 < m_shockLineTime4 )
v47 = a1->m_shockLineTime4;
else
v47 = a1->m_shockLineTime3;
LABEL_87:
if ( m_shockLineTime2 >= v47 )
{
m_shockLineTime1 = a1->m_shockLineTime2;
}
else if ( m_shockLineTime3 < m_shockLineTime4 )
{
m_shockLineTime1 = a1->m_shockLineTime4;
}
else
{
m_shockLineTime1 = a1->m_shockLineTime3;
}
LABEL_92:
getShaderProgram = (int (*)(void))a1->m_sprite->getShaderProgram;
if ( (float)(y - 1.0) > m_shockLineTime1 == (float)(y + 1.0) <= v45 )
{
v49 = (cocos2d::CCGLProgram *)getShaderProgram();
m_shockLineCenterUniform = a1->m_shockLineCenterUniform;
if ( a1->m_state.m_shockLineAxis )
v51 = v125.y;
else
v51 = v125.x;
}
else
{
v49 = (cocos2d::CCGLProgram *)getShaderProgram();
m_shockLineCenterUniform = a1->m_shockLineTimeUniform;
v51 = 0.0;
}
cocos2d::CCGLProgram::setUniformLocationWith1f(v49, m_shockLineCenterUniform, v51);
LABEL_98:
if ( a1->m_state.m_lensCircleStrength > 0.0 )
{
cocos2d::CCPoint::CCPoint(&v125);
if ( a1->m_state.m_lensCircleTargetID && a1->m_gameLayer )
{
cocos2d::CCPoint::CCPoint(&v126, &a1->m_state.m_lensCircleCenter);
LODWORD(v52.x) = &v126;
ShaderLayer::objectPosToShaderPos(&v127, a1, v52);
}
else
{
v55 = v121.x + a1->m_state.m_lensCircleScreenOffset.x * 0.5;
v56 = v121.y + a1->m_state.m_lensCircleScreenOffset.y * 0.5;
cocos2d::CCPoint::CCPoint(&v127, v55, v56);
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v57, v58);
v59 = a1->m_savedCameraRotation;
cocos2d::CCPoint::CCPoint(&v127, &v121);
rotatePoint(&v125.x, v59, &v127.x);
cocos2d::CCPoint::operator-(&v127, &v125, &v122);
}
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v53, v54);
v60 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith2f(
v60,
a1->m_lensCircleOriginUniform,
v125.x,
v125.y / a1->m_aspectRatio);
}
if ( a1->m_state.m_radialBlurSize != 0.0 )
{
cocos2d::CCPoint::CCPoint(&v125);
if ( a1->m_state.m_radialBlurTarget && a1->m_gameLayer )
{
cocos2d::CCPoint::CCPoint(&v126, &a1->m_state.m_radialBlurCenter);
LODWORD(v61.x) = &v126;
ShaderLayer::objectPosToShaderPos(&v127, a1, v61);
}
else
{
v64 = v121.x + a1->m_state.m_radialBlurScreenOffset.x * 0.5;
v65 = v121.y + a1->m_state.m_radialBlurScreenOffset.y * 0.5;
cocos2d::CCPoint::CCPoint(&v127, v64, v65);
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v66, v67);
v68 = a1->m_savedCameraRotation;
cocos2d::CCPoint::CCPoint(&v127, &v121);
rotatePoint(&v125.x, v68, &v127.x);
cocos2d::CCPoint::operator-(&v127, &v125, &v122);
}
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v62, v63);
v69 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith2f(
v69,
a1->m_radialBlurCenterUniform,
v125.x * a1->m_state.m_textureScaleX,
v125.y * a1->m_state.m_textureScaleY);
}
m_pinchTargetY = a1->m_state.m_pinchTargetY;
m_pinchTargetX = a1->m_state.m_pinchTargetX;
if ( m_pinchTargetY == 0.0 )
{
if ( m_pinchTargetX != 0.0 )
m_pinchTargetY = 0.001;
}
else if ( m_pinchTargetX == 0.0 )
{
m_pinchTargetX = 0.001;
}
if ( a1->m_state.m_pinchRelative && (m_gameLayer = a1->m_gameLayer) != nullptr )
v73 = fabsf(m_gameLayer->m_objectLayer->getScale(m_gameLayer->m_objectLayer));
else
v73 = 1.0;
m_shockWaveTimeMult = a1->m_shockWaveTimeMult;
cocos2d::CCPoint::CCPoint(&v123, -(float)(m_pinchTargetX * 0.1), -(float)(m_pinchTargetY * 0.1));
v75 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith2f(v75, a1->m_pinchValueUniform, v123.x, v123.y);
if ( a1->m_state.m_pinchTargetX != 0.0 || a1->m_state.m_pinchTargetY != 0.0 )
{
cocos2d::CCPoint::CCPoint(&v125);
if ( (a1->m_state.m_pinchTargetEnabledX || a1->m_state.m_pinchTargetEnabledY) && a1->m_gameLayer )
{
cocos2d::CCPoint::CCPoint(&v126, &a1->m_state.m_pinchCenter);
LODWORD(v76.x) = &v126;
ShaderLayer::objectPosToShaderPos(&v127, a1, v76);
}
else
{
v79 = v121.x + a1->m_state.m_pinchScreenOffset.x * 0.5;
v80 = v121.y + a1->m_state.m_pinchScreenOffset.y * 0.5;
cocos2d::CCPoint::CCPoint(&v127, v79, v80);
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v81, v82);
v83 = a1->m_savedCameraRotation;
cocos2d::CCPoint::CCPoint(&v127, &v121);
rotatePoint(&v125.x, v83, &v127.x);
cocos2d::CCPoint::operator-(&v127, &v125, &v122);
}
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v77, v78);
v84 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith2f(v84, a1->m_pinchCenterPosUniform, v125.x, v125.y);
v85 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith1f(
v85,
a1->m_pinchRadiusUniform,
(float)(v73 * m_shockWaveTimeMult) * a1->m_state.m_pinchRadius);
v86 = a1->m_state.m_pinchModifier.x;
v87 = a1->m_state.m_pinchModifier.y;
if ( v86 <= 0.001 )
v86 = 0.001;
if ( v87 <= 0.001 )
v87 = 0.001;
v88 = a1->m_sprite->getShaderProgram(a1->m_sprite);
v89 = atanf((float)-(float)(v123.x * 20.0) * v86);
v90 = atanf((float)-(float)(v123.y * 20.0) * v87);
cocos2d::CCGLProgram::setUniformLocationWith2f(v88, a1->m_pinchCalcUniform, v86 / v89, v87 / v90);
}
if ( a1->m_state.m_cGActive )
{
cocos2d::CCPoint::CCPoint(&v124);
if ( a1->m_state.m_cGRelativePos && a1->m_gameLayer )
{
cocos2d::CCPoint::CCPoint(&v125, &stru_AC7974);
LODWORD(v91.x) = &v125;
ShaderLayer::objectPosToShaderPos(&v126, a1, v91);
cocos2d::CCPoint::operator-(&v127, &v126);
}
else
{
cocos2d::CCPoint::CCPoint(&v127, 0.0, 0.0);
cocos2d::CCPoint::operator=((PlayerObject *)&v124, COERCE_FLOAT(&v127), v94, v95);
v96 = a1->m_savedCameraRotation;
cocos2d::CCPoint::CCPoint(&v127, &v121);
rotatePoint(&v124.x, v96, &v127.x);
cocos2d::CCPoint::operator-(&v127, &v124, &v122);
}
cocos2d::CCPoint::operator=((PlayerObject *)&v124, COERCE_FLOAT(&v127), v92, v93);
v97 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith1f(v97, a1->m_cGYOffsetUniform, v124.y * a1->m_state.m_textureScaleY);
}
if ( a1->m_state.m_bulgeValue > 0.0 )
{
cocos2d::CCPoint::CCPoint(&v125);
if ( a1->m_state.m_bulgeTargetID && a1->m_gameLayer )
{
cocos2d::CCPoint::CCPoint(&v126, &a1->m_state.m_bulgeCenter);
LODWORD(v98.x) = &v126;
ShaderLayer::objectPosToShaderPos(&v127, a1, v98);
}
else
{
v101 = v121.x + a1->m_state.m_bulgeScreenOffset.x * 0.5;
v102 = v121.y + a1->m_state.m_bulgeScreenOffset.y * 0.5;
cocos2d::CCPoint::CCPoint(&v127, v101, v102);
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v103, v104);
v105 = a1->m_savedCameraRotation;
cocos2d::CCPoint::CCPoint(&v127, &v121);
rotatePoint(&v125.x, v105, &v127.x);
cocos2d::CCPoint::operator-(&v127, &v125, &v122);
}
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v99, v100);
v106 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith2f(v106, a1->m_bulgeOriginUniform, v125.x, v125.y);
if ( a1->m_state.m_bulgeRelative && (v107 = a1->m_gameLayer) != nullptr )
v108 = fabsf(v107->m_objectLayer->getScale(v107->m_objectLayer));
else
v108 = 1.0;
v109 = v108 * a1->m_shockWaveTimeMult;
v110 = v109 * 0.5 * 1.44444442;
cocos2d::CCPoint::CCPoint(&v127, v110, (float)(v109 * 0.5) * 1.4444);
cocos2d::CCPoint::operator=((PlayerObject *)&v125, COERCE_FLOAT(&v127), v111, v112);
v113 = sqrtf((float)(v125.y * v125.y) + (float)(v125.x * v125.x));
v114 = v113;
v115 = 6.28318531 / (v113 + v113) * 0.449999988 * a1->m_state.m_bulgeValue;
if ( v115 <= 0.001 )
v115 = 0.001;
v116 = tanf(v113 * v115);
v117 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith1f(v117, a1->m_bulgeValueUniform, v115);
v118 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith1f(v118, a1->m_bulgeValue2Uniform, v114 / v116);
v119 = a1->m_sprite->getShaderProgram(a1->m_sprite);
cocos2d::CCGLProgram::setUniformLocationWith1f(v119, a1->m_bulgeRadiusUniform, v109 * a1->m_state.m_bulgeRadius);
}
}