// // EnhancedGameObject::updateSyncedAnimation from 0x5291cc to 0x52a220 (4180 bytes) // // 1 xrefs: // > SpecialAnimGameObject::updateSyncedAnimation @ 0x52a2f8 // // 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 EnhancedGameObject::updateSyncedAnimation(EnhancedGameObject *a1, float a2, int a3) { _BOOL4 m_animateOnTrigger; // r6 _BOOL4 m_animationShouldUseSpeed; // r11 int m_frames; // r7 float v9; // s17 float m_animationStart; // s14 float m_unk544; // s13 _BOOL4 m_visible; // r10 _BOOL4 v13; // r8 float v14; // r0 int m_singleFrame; // r3 float v16; // s15 bool v17; // cc int v18; // r6 cocos2d::CCSprite *v19; // r0 int v20; // r5 int m_objectID; // r10 bool v22; // cc cocos2d::CCSprite *v23; // r10 int v24; // r3 bool v25; // r9 const char *v26; // r0 cocos2d::CCSprite *v27; // r10 int v28; // r3 const char *v29; // r11 cocos2d::CCSpriteFrameCache *v30; // r0 cocos2d::CCSpriteFrame *v31; // r0 cocos2d::CCSprite *v32; // r0 const char *v33; // r5 void (__fastcall *v34)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r11 cocos2d::CCSpriteFrameCache *v35; // r0 cocos2d::CCSpriteFrame *v36; // r0 const char *v37; // r9 void (__fastcall *v38)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r10 cocos2d::CCSpriteFrameCache *v39; // r0 cocos2d::CCSpriteFrame *v40; // r0 cocos2d::CCSprite *v41; // r0 int v42; // r9 const char *v43; // r5 int v44; // r5 const char *v45; // r10 cocos2d::CCNode *v46; // r0 cocos2d::CCNode *v47; // r11 cocos2d::CCSpriteFrameCache *v48; // r0 cocos2d::CCSpriteFrame *v49; // r0 int v50; // r0 cocos2d::CCSprite *v51; // r10 const char *v52; // r9 void (__fastcall *v53)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r11 cocos2d::CCSpriteFrameCache *v54; // r0 cocos2d::CCSpriteFrame *v55; // r0 cocos2d::CCSprite *v56; // r10 void (__fastcall *v57)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCNode *v58; // r0 cocos2d::CCSprite *v59; // r9 const char *v60; // r5 void (__fastcall *v61)(cocos2d::CCNode *__hidden, float); // r10 cocos2d::CCSpriteFrameCache *v62; // r0 cocos2d::CCSpriteFrame *v63; // r0 const cocos2d::CCSize *v64; // r0 const char *v65; // r10 cocos2d::CCNode *v66; // r0 cocos2d::CCNode *v67; // r9 void (__fastcall *v68)(cocos2d::CCNode *__hidden, float); // r11 cocos2d::CCSpriteFrameCache *v69; // r0 cocos2d::CCSpriteFrame *v70; // r0 int v71; // r3 int m_unkAnimationInt; // r10 int v73; // r3 float v74; // s15 __int16 v75; // r5 float v76; // r0 int v77; // s15 bool v78; // cc int m_maybeAnimationVariableXInt; // r3 int v80; // r9 intptr_t v81; // r0 const char *v82; // r5 void (__fastcall *v83)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r10 cocos2d::CCSpriteFrameCache *v84; // r0 cocos2d::CCSpriteFrame *v85; // r0 int v86; // r3 intptr_t v87; // r0 const char *v88; // r0 cocos2d::CCSprite *v89; // r9 void (__fastcall *v90)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r10 const char *v91; // r5 cocos2d::CCSpriteFrameCache *v92; // r0 cocos2d::CCSpriteFrame *v93; // r0 const cocos2d::CCSize *v94; // r0 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 float v96; // s14 float v97; // s15 float v98; // s16 int v99; // r9 int v100; // r0 float v101; // s14 int v102; // r1 float v103; // s15 bool v104; // nf float v105; // s14 float v106; // s16 int v107; // r5 unsigned int realOpacity; // s18 cocos2d::CCArray *m_pChildren; // r3 cocos2d::ccArray *data; // r2 int v111; // r3 cocos2d::CCObject **arr; // r2 unsigned int v113; // r10 cocos2d::CCObject **v114; // r9 int v115; // r11 int v116; // t1 float v117; // s15 const char *v118; // r9 void (__fastcall *setDisplayFrame)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r10 cocos2d::CCSpriteFrameCache *v120; // r0 cocos2d::CCSpriteFrame *v121; // r0 const char *v122; // r9 cocos2d::CCNode *v123; // r0 cocos2d::CCNode *v124; // r11 cocos2d::CCSpriteFrameCache *v125; // r0 cocos2d::CCSpriteFrame *v126; // r0 const char *v127; // r9 cocos2d::CCSprite *m_colorSprite; // r5 void (__fastcall *v129)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r11 cocos2d::CCSpriteFrameCache *v130; // r0 cocos2d::CCSpriteFrame *v131; // r0 cocos2d::CCNode *v132; // r0 const char *v133; // r10 const char *v134; // r9 void (__fastcall *v135)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r11 cocos2d::CCSpriteFrameCache *v136; // r0 cocos2d::CCSpriteFrame *v137; // r0 cocos2d::CCNode *v138; // r0 cocos2d::CCNode *v139; // r9 void (__fastcall *v140)(cocos2d::CCNode *__hidden, float); // r11 cocos2d::CCSpriteFrameCache *v141; // r0 cocos2d::CCSpriteFrame *v142; // r0 void (__fastcall *v143)(int, cocos2d::CCSpriteFrame *); // r10 cocos2d::CCSpriteFrameCache *v144; // r0 cocos2d::CCSpriteFrame *v145; // r1 float m_randomFrameTime; // s14 float m_animationSpeed; // s13 int v148; // r5 int v149; // r5 int v150; // r1 int v151; // r9 cocos2d::CCNode *v152; // r10 cocos2d::CCArray *v153; // r0 int v154; // r0 int v155; // r9 cocos2d::CCSpriteFrameCache *v156; // r0 cocos2d::CCSpriteFrame *v157; // r0 cocos2d::CCSpriteFrameCache *v158; // r0 cocos2d::CCSpriteFrame *v159; // r0 float v160; // s16 float v161; // s15 float v162; // s15 float v163; // s16 const char *v164; // r9 void (__fastcall *v165)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r10 cocos2d::CCSpriteFrameCache *v166; // r0 cocos2d::CCSpriteFrame *v167; // r0 const char *v168; // r9 cocos2d::CCArray *v169; // r0 cocos2d::CCSprite *v170; // r5 intptr_t v171; // r10 const char *v172; // r11 void (__fastcall *v173)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r9 cocos2d::CCSpriteFrameCache *v174; // r0 cocos2d::CCSpriteFrame *v175; // r0 intptr_t v176; // r0 const char *v177; // r9 void (__fastcall *v178)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r10 cocos2d::CCSpriteFrameCache *v179; // r0 cocos2d::CCSpriteFrame *v180; // r0 void (__fastcall *v181)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r10 cocos2d::CCSpriteFrameCache *v182; // r0 cocos2d::CCSpriteFrame *v183; // r1 _BOOL4 v184; // r3 void (__fastcall *v185)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // [sp+4h] [bp-30h] void (__fastcall *v186)(cocos2d::CCNode *__hidden, float); // [sp+4h] [bp-30h] void (__fastcall *setSkewY)(cocos2d::CCNode *__hidden, float); // [sp+4h] [bp-30h] void (__fastcall *v188)(cocos2d::CCNode *__hidden, float); // [sp+4h] [bp-30h] void (__fastcall *v189)(int, cocos2d::CCSpriteFrame *); // [sp+4h] [bp-30h] char *v190; // [sp+8h] [bp-2Ch] char *v191; // [sp+Ch] [bp-28h] cocos2d::CCSize v192; // [sp+14h] [bp-20h] BYREF cocos2d::CCSize v193; // [sp+1Ch] [bp-18h] BYREF cocos2d::CCPoint v194; // [sp+24h] [bp-10h] BYREF m_animateOnTrigger = a1->m_animateOnTrigger; if ( a1->m_animateOnTrigger ) { if ( !a1->m_animationTriggered ) return; if ( *(float *)&a1->m_animationRandomizedStartValue == 0.0 ) *(float *)&a1->m_animationRandomizedStartValue = -a2; } if ( a1->m_animationShouldUseSpeed ) m_animationShouldUseSpeed = a1->m_animationSpeed < 0.0; else m_animationShouldUseSpeed = a1->m_animationShouldUseSpeed; m_frames = a1->m_frames; v9 = a2 + *(float *)&a1->m_animationRandomizedStartValue; if ( a1->m_visible ) { m_animationStart = a1->m_animationStart; m_unk544 = a1->m_unk544; v9 = v9 + m_unk544; if ( m_animationStart > 0.0 ) { if ( (float)(v9 - (float)(m_animationStart + a1->m_unk540)) < 0.0 ) { m_visible = 1; goto LABEL_14; } v9 = v9 - m_animationStart; a1->m_unk544 = m_unk544 - m_animationStart; a1->m_animationStart = 0.0; } m_visible = 0; LABEL_14: ++m_frames; v13 = 1; goto LABEL_15; } if ( m_animateOnTrigger ) { m_visible = a1->m_visible; goto LABEL_14; } v13 = 0; m_visible = 0; LABEL_15: v14 = floorf(v9 / a1->m_frameTime); m_singleFrame = a1->m_singleFrame; v16 = v14; v17 = v14 <= 0.0; if ( v14 <= 0.0 ) v14 = 0.0; else LODWORD(v16) = (int)v14; if ( !v17 ) v14 = v16; if ( m_singleFrame > 0 ) { if ( a1->m_animationOffset ) { LODWORD(v14) += m_singleFrame; } else if ( !m_animateOnTrigger ) { LODWORD(v14) = m_singleFrame - 1; } } v18 = SLODWORD(v14) % m_frames + 1; if ( m_animationShouldUseSpeed ) v18 = m_frames - SLODWORD(v14) % m_frames; if ( a3 > 0 ) v18 = a3; if ( (v18 != a1->m_maybeAnimationVariableXInt && !m_visible || a1->m_usesSpecialAnimation) && (a1->m_blackChildOpacityLocked || a1->_realOpacity || (v19 = a1->m_colorSprite) != nullptr && ((int (__fastcall *)(cocos2d::CCSprite *))v19->getOpacity)(v19) || a1->m_isDisabled2 || a1->m_maybeAnimationVariableXInt <= 0) ) { if ( v13 ) { v20 = a1->m_frames; v13 = v18 == v20 + 1; if ( v18 != v20 + 1 ) v20 = v18; } else { v20 = v18; } m_objectID = a1->m_objectID; if ( m_objectID == 1855 ) { GameManager::sharedState(); v118 = sub_52911A(a1->m_objectID, v20); if ( v118 ) { setDisplayFrame = a1->setDisplayFrame; v120 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v121 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v120, v118); setDisplayFrame(a1, v121); } switch ( v18 ) { case 8: v122 = "gj_drops05_2_008.png"; break; case 9: v122 = "gj_drops05_2_009.png"; break; case 10: v122 = "gj_drops05_2_010.png"; break; case 11: v122 = "gj_drops05_2_011.png"; break; case 12: v122 = "gj_drops05_2_012.png"; break; case 13: v122 = "gj_drops05_2_013.png"; break; case 14: v122 = "gj_drops05_2_014.png"; break; case 15: v122 = "gj_drops05_2_015.png"; break; case 16: v122 = "gj_drops05_2_016.png"; break; default: v122 = "gj_drops05_2_001.png"; break; } v123 = a1->getChildByTag(a1, 2); v124 = v123; if ( v123 ) { setSkewY = v123->__vftable[1].setSkewY; v125 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v126 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v125, v122); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSpriteFrame *))setSkewY)(v124, v126); } if ( !a1->m_colorSprite ) goto LABEL_315; GameManager::sharedState(); v127 = sub_52913C(a1->m_objectID, v20); if ( v127 ) { m_colorSprite = a1->m_colorSprite; v129 = m_colorSprite->setDisplayFrame; v130 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v131 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v130, v127); v129(m_colorSprite, v131); } switch ( v18 ) { case 8: v43 = "gj_drops05_2_color_008.png"; break; case 9: v43 = "gj_drops05_2_color_009.png"; break; case 10: v43 = "gj_drops05_2_color_010.png"; break; case 11: v43 = "gj_drops05_2_color_011.png"; break; case 12: v43 = "gj_drops05_2_color_012.png"; break; case 13: v43 = "gj_drops05_2_color_013.png"; break; case 14: v43 = "gj_drops05_2_color_014.png"; break; case 15: v43 = "gj_drops05_2_color_015.png"; break; case 16: v43 = "gj_drops05_2_color_016.png"; break; default: v43 = "gj_drops05_2_color_001.png"; break; } v132 = a1->m_colorSprite->getChildByTag(a1->m_colorSprite, 2); LABEL_279: v42 = (int)v132; if ( !v132 ) goto LABEL_315; goto LABEL_280; } if ( m_objectID >= 1856 ) { if ( m_objectID > 2865 ) { if ( m_objectID <= 2893 ) { if ( m_objectID >= 2892 ) { if ( m_objectID != 2892 ) v16 = 0.033333; m_randomFrameTime = a1->m_randomFrameTime; if ( m_objectID == 2892 ) v16 = 0.025; if ( a1->m_animationShouldUseSpeed ) { m_animationSpeed = a1->m_animationSpeed; if ( m_animationSpeed != 0.0 ) m_randomFrameTime = fabsf(m_animationSpeed); } v148 = (int)floorf(v9 / (float)(v16 / m_randomFrameTime)) % 16; if ( m_animationShouldUseSpeed ) v149 = 16 - v148; else v149 = v148 + 1; if ( v149 != a1->m_maybeAnimationVariableXInt ) { a1->m_maybeAnimationVariableXInt = v149; if ( m_objectID == 2892 ) v150 = 2; else v150 = 4; v151 = v149 % v150 + 1; GameManager::sharedState(); v191 = (char *)sub_52911A(a1->m_objectID, v151); GameManager::sharedState(); v190 = (char *)sub_52913C(a1->m_objectID, v151); v152 = a1->getChildByTag(a1, 1); v153 = a1->m_colorSprite->getChildren(a1->m_colorSprite); v154 = cocos2d::CCArray::objectAtIndex(v153, 0); v188 = v152->__vftable[1].setSkewY; v155 = v154; v156 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v157 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v156, v191); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSpriteFrame *))v188)(v152, v157); v189 = *(void (__fastcall **)(int, cocos2d::CCSpriteFrame *))(*(_DWORD *)v155 + 572); v158 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v159 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v158, v190); v189(v155, v159); v160 = (float)v149; if ( a1->m_objectID == 2892 ) { v161 = -22.5; } else { v162 = v160 * 0.25; v160 = -90.0; v161 = floorf(v162); } v163 = (float)(int)(float)(v161 * v160); ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))v152->setRotation)(v152, LODWORD(v163)); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v155 + 172))(v155, LODWORD(v163)); } goto LABEL_315; } if ( m_objectID >= 2867 ) goto LABEL_299; goto LABEL_308; } if ( m_objectID == 2894 ) goto LABEL_299; if ( (unsigned int)(m_objectID - 3000) > 2 ) goto LABEL_308; v27 = (cocos2d::CCSprite *)a1->getChildByTag(a1, 1); if ( !v27 ) goto LABEL_315; v28 = a1->m_objectID; if ( v28 == 3000 ) { switch ( v20 ) { case 4: LABEL_121: v25 = 1; v20 = 3; break; case 5: LABEL_118: v25 = 1; v20 = 2; break; case 9: v25 = 1; v20 = 8; break; case 10: v25 = 1; v20 = 7; break; default: LABEL_119: v25 = 0; break; } } else if ( v28 >= 3000 && v28 <= 3002 ) { switch ( v20 ) { case 7: v25 = 1; v20 = 5; break; case 8: v25 = 1; v20 = 4; break; case 9: goto LABEL_121; case 10: goto LABEL_118; default: goto LABEL_119; } } else { v25 = 1; } GameManager::sharedState(); v29 = sub_52911A(a1->m_objectID, v20); if ( v29 ) { v185 = v27->setDisplayFrame; v30 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v31 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v30, v29); v185(v27, v31); } cocos2d::CCSprite::setFlipX(v27, v25); v32 = a1->m_colorSprite; if ( !v32 ) goto LABEL_315; v23 = (cocos2d::CCSprite *)v32->getChildByTag(v32, 1); if ( !v23 ) goto LABEL_315; GameManager::sharedState(); v26 = sub_52913C(a1->m_objectID, v20); goto LABEL_128; } if ( m_objectID >= 2864 ) goto LABEL_299; if ( m_objectID > 2045 ) { if ( m_objectID >= 2047 && (m_objectID <= 2050 || m_objectID == 2055) ) goto LABEL_299; goto LABEL_308; } if ( m_objectID >= 2020 ) goto LABEL_299; if ( m_objectID == 1858 ) { switch ( v20 ) { case 1: v43 = "gj_drops06_3_001.png"; v133 = "gj_drops06_2_001.png"; v134 = "gj_drops06_001.png"; goto LABEL_276; case 2: v43 = "gj_drops06_3_002.png"; v133 = "gj_drops06_2_002.png"; v134 = "gj_drops06_002.png"; goto LABEL_276; case 3: v43 = "gj_drops06_3_003.png"; v133 = "gj_drops06_2_003.png"; v134 = "gj_drops06_003.png"; goto LABEL_276; case 4: v43 = "gj_drops06_3_004.png"; v133 = "gj_drops06_2_004.png"; v134 = "gj_drops06_004.png"; goto LABEL_276; case 5: v43 = "gj_drops06_3_005.png"; v133 = "gj_drops06_2_005.png"; v134 = "gj_drops06_005.png"; goto LABEL_276; case 6: v43 = "gj_drops06_3_006.png"; v133 = "gj_drops06_2_006.png"; v134 = "gj_drops06_006.png"; goto LABEL_276; case 7: v43 = "gj_drops06_3_007.png"; v133 = "gj_drops06_2_007.png"; v134 = "gj_drops06_007.png"; goto LABEL_276; case 8: v43 = "gj_drops06_3_008.png"; v133 = "gj_drops06_2_008.png"; v134 = "gj_drops06_008.png"; LABEL_276: v135 = a1->setDisplayFrame; v136 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v137 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v136, v134); v135(a1, v137); v138 = a1->getChildByTag(a1, 2); v139 = v138; if ( v138 ) { v140 = v138->__vftable[1].setSkewY; v141 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v142 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v141, v133); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSpriteFrame *))v140)(v139, v142); } v132 = a1->getChildByTag(a1, 3); goto LABEL_279; default: goto LABEL_315; } } if ( m_objectID >= 1858 ) { v22 = (unsigned int)(m_objectID - 1936) > 3; LABEL_78: if ( !v22 ) goto LABEL_299; } } else { if ( m_objectID == 1516 ) goto LABEL_162; if ( m_objectID <= 1516 ) { if ( m_objectID <= 924 ) { if ( m_objectID < 923 ) { if ( m_objectID != 142 ) { if ( m_objectID >= 142 ) { v22 = (unsigned int)(m_objectID - 920) > 1; goto LABEL_78; } goto LABEL_308; } LABEL_304: v171 = (-a1->m_hasUniqueCoin ^ m_objectID) + a1->m_hasUniqueCoin; GameManager::sharedState(); v172 = sub_52911A(v171, v20); if ( v172 ) { v173 = a1->setDisplayFrame; v174 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v175 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v174, v172); v173(a1, v175); } if ( !a1->m_colorSprite ) goto LABEL_315; GameManager::sharedState(); v176 = v171; LABEL_312: v168 = sub_52913C(v176, v20); if ( v168 ) { v170 = a1->m_colorSprite; LABEL_314: v181 = v170->setDisplayFrame; v182 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v183 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v182, v168); v181(v170, v183); } LABEL_315: v184 = a1->m_visible; a1->m_maybeAnimationVariableXInt = v18; if ( v184 ) { if ( v13 ) { a1->m_animationStart = (float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 0.5) + 0.2; a1->m_unk540 = v9; if ( !a1->m_shouldNotHideAnimFreeze ) a1->m_isDisabled2 = 1; } else if ( !a1->m_shouldNotHideAnimFreeze ) { a1->m_isDisabled2 = 0; } } if ( a1->m_animateOnTrigger && a1->m_animationTriggered && a1->m_maybeAnimationVariableXInt == m_frames ) EnhancedGameObject::waitForAnimationTrigger(a1); return; } LABEL_299: GameManager::sharedState(); v164 = sub_52911A(a1->m_objectID, v20); if ( v164 ) { v165 = a1->setDisplayFrame; v166 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v167 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v166, v164); v165(a1, v167); } if ( !a1->m_colorSprite ) goto LABEL_315; GameManager::sharedState(); v168 = sub_52913C(a1->m_objectID, v20); if ( !v168 ) goto LABEL_315; v169 = a1->m_colorSprite->getChildren(a1->m_colorSprite); v170 = (cocos2d::CCSprite *)cocos2d::CCArray::objectAtIndex(v169, 0); goto LABEL_314; } if ( m_objectID < 1050 ) goto LABEL_308; if ( m_objectID > 1052 ) { if ( m_objectID != 1329 ) goto LABEL_308; goto LABEL_304; } v23 = (cocos2d::CCSprite *)a1->getChildByTag(a1, 1); if ( !v23 ) goto LABEL_315; v24 = a1->m_objectID; if ( v24 == 1050 ) { switch ( v20 ) { case 4: LABEL_105: v25 = 1; v20 = 3; break; case 5: LABEL_102: v25 = 1; v20 = 2; break; case 9: v25 = 1; v20 = 8; break; case 10: v25 = 1; v20 = 7; break; default: LABEL_103: v25 = 0; break; } } else if ( v24 >= 1050 && v24 <= 1052 ) { switch ( v20 ) { case 7: v25 = 1; v20 = 5; break; case 8: v25 = 1; v20 = 4; break; case 9: goto LABEL_105; case 10: goto LABEL_102; default: goto LABEL_103; } } else { v25 = 1; } GameManager::sharedState(); v26 = sub_52911A(a1->m_objectID, v20); LABEL_128: v33 = v26; if ( v26 ) { v34 = v23->setDisplayFrame; v35 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v36 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v35, v33); v34(v23, v36); } cocos2d::CCSprite::setFlipX(v23, v25); goto LABEL_315; } if ( m_objectID == 1593 ) goto LABEL_165; if ( m_objectID <= 1593 ) { if ( m_objectID != 1591 ) { if ( m_objectID < 1592 ) { if ( m_objectID != 1518 ) goto LABEL_308; LABEL_162: GameManager::sharedState(); v65 = sub_52911A(a1->m_objectID, v20); if ( v65 ) { v66 = a1->getChildByTag(a1, 1); v67 = v66; if ( v66 ) { v68 = v66->__vftable[1].setSkewY; v69 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v70 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v69, v65); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSpriteFrame *))v68)(v67, v70); } } goto LABEL_310; } GameManager::sharedState(); v37 = sub_52911A(a1->m_objectID, v20); if ( v37 ) { v38 = a1->setDisplayFrame; v39 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v40 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v39, v37); v38(a1, v40); } v41 = a1->m_colorSprite; if ( !v41 ) goto LABEL_315; v42 = (int)v41->getChildByTag(v41, 1); if ( !v42 ) goto LABEL_315; if ( v20 > 1 ) v20 = 10 - v20; GameManager::sharedState(); v43 = sub_52913C(a1->m_objectID, v20); if ( !v43 ) goto LABEL_315; LABEL_280: v143 = *(void (__fastcall **)(int, cocos2d::CCSpriteFrame *))(*(_DWORD *)v42 + 572); v144 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v145 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v144, v43); v143(v42, v145); goto LABEL_315; } LABEL_165: if ( m_objectID == 1593 ) a1->m_unkAnimationInt = 1; if ( a1->m_unkAnimationInt ) { LABEL_175: m_unkAnimationInt = a1->m_unkAnimationInt; v73 = m_unkAnimationInt - 1; if ( (unsigned int)(m_unkAnimationInt - 1) > 2 ) { v74 = 1.0; v75 = 1; } else { v74 = *((float *)&unk_9ACFD8 + v73); v75 = *((char *)&unk_9ACFD8 + v73 + 12); } v76 = floorf(v9 / v74); v77 = LODWORD(v76); v78 = v76 <= 0.0; if ( v76 <= 0.0 ) v76 = 0.0; else v77 = (int)v76; if ( !v78 ) v76 = *(float *)&v77; m_maybeAnimationVariableXInt = a1->m_maybeAnimationVariableXInt; v80 = SLODWORD(v76) % v75 + 1; if ( v80 == m_maybeAnimationVariableXInt ) goto LABEL_315; if ( m_maybeAnimationVariableXInt >= v75 && a1->m_objectID != 1593 ) { a1->m_unkAnimationInt = 0; return; } a1->m_maybeAnimationVariableXInt = v80; if ( m_unkAnimationInt == 2 ) { GameManager::sharedState(); v81 = 2059; } else { GameManager::sharedState(); if ( m_unkAnimationInt == 3 ) v81 = 2060; else v81 = 2058; } v82 = sub_52911A(v81, v80); if ( v82 ) { v83 = a1->setDisplayFrame; v84 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v85 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v84, v82); v83(a1, v85); } if ( !a1->m_colorSprite ) goto LABEL_315; v86 = a1->m_unkAnimationInt; if ( v86 == 2 ) { GameManager::sharedState(); v87 = 2059; } else if ( v86 == 3 ) { GameManager::sharedState(); v87 = 2060; } else { GameManager::sharedState(); v87 = 2058; } v88 = sub_52913C(v87, v80); v89 = a1->m_colorSprite; v90 = v89->setDisplayFrame; v91 = v88; v92 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v93 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v92, v91); v90(v89, v93); if ( !a1->m_colorSpriteLocked ) goto LABEL_315; v94 = a1->getContentSize(a1); cocos2d::CCSize::CCSize(&v193, v94); v59 = a1->m_colorSprite; LABEL_202: setPosition = v59->setPosition; cocos2d::CCPoint::CCPoint(&v194, v193.width * 0.5, v193.height * 0.5); setPosition(v59, &v194); goto LABEL_315; } if ( m_objectID != 1593 ) { if ( (float)((float)rand() * 4.6566e-10) > 0.7 ) { v71 = 2; goto LABEL_174; } if ( (float)((float)rand() * 4.6566e-10) > 0.7 ) { v71 = 3; goto LABEL_174; } } v71 = 1; LABEL_174: a1->m_unkAnimationInt = v71; v9 = 0.0; *(float *)&a1->m_animationRandomizedStartValue = -a2; a1->m_maybeAnimationVariableXInt = -1; goto LABEL_175; } if ( m_objectID == 1697 ) { v117 = vcvts_n_f32_s32(rand(), 0x1Fu); if ( v117 > 0.7 ) { v20 = 3; } else if ( v117 <= 0.35 ) { v20 = 1; } else { v20 = 2; } if ( a1->m_maybeAnimationVariableYInt == v20 ) { if ( v20 == 1 ) v20 = 2; else v20 = 1; } a1->m_maybeAnimationVariableYInt = v20; goto LABEL_308; } if ( m_objectID > 1697 ) { if ( (unsigned int)(m_objectID - 1839) <= 3 ) { v96 = a1->m_randomFrameTime; if ( a1->m_animationShouldUseSpeed ) { v97 = a1->m_animationSpeed; if ( v97 != 0.0 ) v96 = fabsf(v97); } v98 = 0.02 / v96; v99 = (int)(float)(40.0 / v96); v100 = (int)floorf(v9 / (float)(0.02 / v96)) % v99 + 1; if ( m_animationShouldUseSpeed ) v100 = v99 - v100 + 1; if ( v100 != a1->m_maybeAnimationVariableXInt ) { if ( a1->m_animationStart == -1.0 ) v100 = (int)(float)(40.0 / v96); a1->m_maybeAnimationVariableXInt = v100; v101 = 1.0; if ( v100 == v99 ) { v107 = 0; v106 = 1.0; } else { v102 = v99 / 3; v103 = (float)(v98 * (float)v100) / (float)((float)(v98 * (float)v99) * 0.5); v104 = v103 < 1.0; if ( v103 < 1.0 ) v101 = 0.7; else v103 = v103 - 1.0; if ( v104 ) { v105 = v103 * v101; } else { v105 = (float)(v103 * (float)(v103 - 2.0)) - v101; v103 = -0.7; } v106 = (float)(v105 * v103) + 0.1; if ( v100 < v102 ) v107 = 255; else v107 = 255 / (v102 - v99) * (v100 - v102) + 255; } realOpacity = a1->_realOpacity; m_pChildren = a1->m_pChildren; if ( m_pChildren ) { data = m_pChildren->data; if ( data->num ) { v111 = data->num + 0x40000000; arr = data->arr; v113 = (unsigned int)&arr[v111 - 1]; v114 = arr; while ( (unsigned int)v114 <= v113 ) { v116 = (int)*v114++; v115 = v116; if ( !v116 ) break; (*(void (__fastcall **)(int, float))(*(_DWORD *)v115 + 80))(v115, COERCE_FLOAT(LODWORD(v106))); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v115 + 448))( v115, (unsigned __int8)(int)(float)((float)v107 * (float)((float)realOpacity / 255.0))); } } } } goto LABEL_315; } goto LABEL_308; } if ( m_objectID == 1614 ) { v44 = v20 - 1; cocos2d::CCSize::CCSize(&v192); switch ( v44 ) { case 0: v45 = "smallCoin_01_001.png"; break; case 1: v45 = "smallCoin_02_001.png"; break; case 2: v45 = "smallCoin_03_001.png"; break; case 3: v45 = "smallCoin_04_001.png"; break; default: v45 = nullptr; break; } v46 = a1->getChildByTag(a1, 1); v47 = v46; if ( v46 && v45 ) { v186 = v46->__vftable[1].setSkewY; v48 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v49 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v48, v45); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSpriteFrame *))v186)(v47, v49); v50 = (int)v47->getContentSize(v47); cocos2d::CCSize::operator=(&v192, v50); } v51 = a1->m_colorSprite; if ( v51 ) { switch ( v44 ) { case 0: v52 = "smallCoin_01_color_001.png"; goto LABEL_153; case 1: v52 = "smallCoin_02_color_001.png"; goto LABEL_153; case 2: v52 = "smallCoin_03_color_001.png"; goto LABEL_153; case 3: v52 = "smallCoin_04_color_001.png"; LABEL_153: v53 = v51->setDisplayFrame; v54 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v55 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v54, v52); v53(v51, v55); break; default: break; } v56 = a1->m_colorSprite; v57 = v56->setPosition; cocos2d::CCPoint::CCPoint(&v194, v192.width * 0.5, v192.height * 0.5); v57(v56, &v194); } v58 = a1->getChildByTag(a1, 2); v59 = (cocos2d::CCSprite *)v58; if ( !v58 ) goto LABEL_315; switch ( v44 ) { case 0: v60 = "smallCoin_01_highlight_001.png"; goto LABEL_160; case 1: v60 = "smallCoin_02_highlight_001.png"; goto LABEL_160; case 2: v60 = "smallCoin_03_highlight_001.png"; goto LABEL_160; case 3: v60 = "smallCoin_04_highlight_001.png"; LABEL_160: v61 = v58->__vftable[1].setSkewY; v62 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v63 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v62, v60); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v61)(v59, v63); break; default: break; } v64 = a1->getContentSize(a1); cocos2d::CCSize::CCSize(&v193, v64); goto LABEL_202; } } LABEL_308: GameManager::sharedState(); v177 = sub_52911A(a1->m_objectID, v20); if ( v177 ) { v178 = a1->setDisplayFrame; v179 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v180 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v179, v177); v178(a1, v180); } LABEL_310: if ( !a1->m_colorSprite ) goto LABEL_315; GameManager::sharedState(); v176 = a1->m_objectID; goto LABEL_312; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source