// // EnhancedGameObject::updateSyncedAnimation from 0x100347bc4 to 0x100348d38 (4468 bytes) // // 40 xrefs: // > SpecialAnimGameObject::updateSyncedAnimation @ 0x100348de8 // > @ 0x1007d0798 // > @ 0x1007f5818 // > @ 0x1007f6050 // > @ 0x1007f6848 // > @ 0x1007f7040 // > @ 0x1007f7838 // > @ 0x1007f8030 // > @ 0x1007f8828 // > @ 0x1007fa880 // > @ 0x1007fb090 // > @ 0x1007fb8a0 // > @ 0x1007fc0b0 // > @ 0x1007fc8c0 // > @ 0x1007fd0d0 // > @ 0x1007fd8e0 // > @ 0x1007fe0f0 // > @ 0x1007fe900 // > @ 0x1007ff110 // > @ 0x1007ff938 // > @ 0x100800190 // > @ 0x1008009b8 // > @ 0x1008011e0 // > @ 0x100801a08 // > @ 0x100802a40 // > @ 0x100803250 // > @ 0x100803a60 // > @ 0x100804270 // > @ 0x100804a80 // > @ 0x100805290 // > @ 0x100805aa0 // > @ 0x1008062b0 // > @ 0x100806ac0 // > @ 0x1008072d0 // > @ 0x100807ae0 // > @ 0x1008082f0 // > @ 0x100808b00 // > @ 0x100809310 // > @ 0x100809b20 // > @ 0x10080a330 // // 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 __fastcall EnhancedGameObject::updateSyncedAnimation(EnhancedGameObject *a1, float a2, int a3) { _BOOL4 m_animateOnTrigger; // w8 _BOOL4 v6; // w21 float v7; // s9 float m_unk544; // s0 float m_animationStart; // s1 int v10; // w9 int m_frames; // w24 int v12; // w20 int v13; // w10 int m_singleFrame; // w11 int v15; // w8 int v16; // w10 int v17; // w8 int v18; // w10 unsigned int v19; // w8 __int64 v20; // x25 unsigned int v21; // w8 _BOOL4 v22; // w26 __int64 v23; // x20 int m_objectID; // w8 __int64 v25; // x0 cocos2d::CCSprite *v26; // x21 int v27; // w8 int v28; // w9 float v29; // s1 float v30; // s2 bool v31; // zf float v32; // s2 unsigned int v33; // w9 int v34; // w10 bool v35; // nf int v36; // w9 int v37; // w9 int v38; // w9 int v39; // w27 int v40; // w8 __int64 v41; // x20 GameManager *v42; // x0 const char *v43; // x22 GameManager *v44; // x0 const char *v45; // x23 __int64 v46; // x20 __int64 v47; // x0 __int64 v48; // x21 cocos2d::CCSpriteFrameCache *v49; // x0 cocos2d::CCSpriteFrame *v50; // x0 cocos2d::CCSpriteFrameCache *v51; // x0 cocos2d::CCSpriteFrame *v52; // x0 float v53; // s0 float v54; // s1 float v55; // s8 float m_randomFrameTime; // s1 float m_animationSpeed; // s0 float v58; // s0 float v59; // s0 int v60; // w8 int v61; // w9 int v62; // w9 float v63; // s1 float v64; // s0 float v65; // s8 cocos2d::CCSprite *v66; // x0 int v67; // w8 const char *v68; // x22 const char *v69; // x21 const char *v70; // x20 cocos2d::CCSpriteFrameCache *v71; // x0 cocos2d::CCSpriteFrame *v72; // x0 __int64 v73; // x0 __int64 v74; // x22 cocos2d::CCSpriteFrameCache *v75; // x0 cocos2d::CCSpriteFrame *v76; // x0 __int64 v77; // x0 GameManager *v78; // x0 __int64 v79; // x0 const char *v80; // x21 cocos2d::CCSpriteFrameCache *v81; // x0 cocos2d::CCSpriteFrame *v82; // x0 cocos2d::CCSprite *m_colorSprite; // x0 __int64 v84; // x0 cocos2d::CCSprite *v85; // x21 GameManager *v86; // x0 __int64 v87; // x0 intptr_t v88; // x21 GameManager *v89; // x0 cocos2d::CCArray *v90; // x0 unsigned int v91; // w20 cocos2d::CCString *v92; // x0 const char *CString; // x0 const char *v94; // x21 cocos2d::CCSpriteFrameCache *v95; // x0 cocos2d::CCSpriteFrame *v96; // x0 intptr_t v97; // x21 GameManager *v98; // x0 cocos2d::CCArray *v99; // x0 cocos2d::CCString *v100; // x0 const char *v101; // x0 __int64 v102; // x0 cocos2d::CCSpriteFrameCache *v103; // x0 cocos2d::CCSpriteFrame *v104; // x1 bool v105; // w8 float v106; // s0 unsigned int v107; // w9 unsigned int v108; // w8 GameManager *v109; // x0 __int64 v110; // x0 const char *v111; // x21 cocos2d::CCSpriteFrameCache *v112; // x0 cocos2d::CCSpriteFrame *v113; // x1 GameManager *v114; // x0 __int64 v115; // x0 const char *v116; // x21 __int64 v117; // x0 __int64 v118; // x22 cocos2d::CCSpriteFrameCache *v119; // x0 cocos2d::CCSpriteFrame *v120; // x1 GameManager *v121; // x0 __int64 v122; // x1 int v123; // w8 int m_unkAnimationInt; // w21 float v125; // s0 __int64 v126; // x21 GameManager *v127; // x0 __int64 v128; // x0 const char *v129; // x22 cocos2d::CCSpriteFrameCache *v130; // x0 cocos2d::CCSpriteFrame *v131; // x0 __int64 v132; // x0 GameManager *v133; // x0 __int64 v134; // x0 const char *v135; // x21 cocos2d::CCSpriteFrameCache *v136; // x0 cocos2d::CCSpriteFrame *v137; // x0 unsigned int v138; // w23 const char *v139; // x21 float v140; // s0 _BOOL4 v141; // w23 const char *v142; // x21 __int64 v143; // x0 cocos2d::CCSprite *v144; // x21 int v145; // w8 __int64 v146; // x0 __int64 v147; // x22 cocos2d::CCSpriteFrameCache *v148; // x0 cocos2d::CCSpriteFrame *v149; // x0 GameManager *v150; // x0 __int64 v151; // x0 const char *v152; // x20 cocos2d::CCSprite *v153; // x21 cocos2d::CCSpriteFrameCache *v154; // x0 cocos2d::CCSpriteFrame *v155; // x0 bool v156; // vf int v157; // w9 cocos2d::CCArray *m_pChildren; // x8 cocos2d::ccArray *data; // x9 __int64 num; // x8 int v161; // w21 cocos2d::CCObject **arr; // x22 unsigned __int64 v163; // x23 cocos2d::CCObject *v164; // x20 bool v165; // w22 __int64 v166; // x0 __n128 v167; // q0 __n128 v168; // q1 __int64 v169; // x22 cocos2d::CCSpriteFrameCache *v170; // x0 cocos2d::CCSpriteFrame *v171; // x0 double *v172; // x0 cocos2d::CCSprite *v173; // x21 const char *v174; // x22 cocos2d::CCSpriteFrameCache *v175; // x0 cocos2d::CCSpriteFrame *v176; // x0 __int64 v177; // x0 __int64 v178; // x21 const char *v179; // x20 cocos2d::CCSpriteFrameCache *v180; // x0 cocos2d::CCSpriteFrame *v181; // x0 double *v182; // x0 __n128 v183; // q0 __n128 v184; // q1 __int64 v185; // x20 int m_maybeAnimationVariableXInt; // w9 GameManager *v187; // x0 unsigned int v188; // w8 __int64 v189; // x1 __int64 v190; // x0 const char *v191; // x21 cocos2d::CCSpriteFrameCache *v192; // x0 cocos2d::CCSpriteFrame *v193; // x0 int v194; // w21 GameManager *v195; // x0 unsigned int v196; // w8 __int64 v197; // x1 const char *v198; // x20 cocos2d::CCSprite *v199; // x21 cocos2d::CCSpriteFrameCache *v200; // x0 cocos2d::CCSpriteFrame *v201; // x0 double *v202; // x0 __n128 v203; // q0 cocos2d::CCSprite *v204; // x20 __n128 v205; // q1 GameManager *v206; // x0 __int64 v207; // x0 const char *v208; // x20 cocos2d::CCSpriteFrameCache *v209; // x0 cocos2d::CCSpriteFrame *v210; // x0 GameManager *v211; // x0 __int64 v212; // x0 const char *v213; // x23 cocos2d::CCSpriteFrameCache *v214; // x0 cocos2d::CCSpriteFrame *v215; // x0 cocos2d::CCSprite *v216; // x0 __int64 v217; // x0 GameManager *v218; // x0 int v219; // [xsp+8h] [xbp-78h] BYREF __int64 v220; // [xsp+10h] [xbp-70h] BYREF __int64 v221; // [xsp+18h] [xbp-68h] BYREF m_animateOnTrigger = a1->m_animateOnTrigger; if ( m_animateOnTrigger ) { if ( !a1->m_animationTriggered ) return; if ( *(float *)&a1->m_animationRandomizedStartValue == 0.0 ) *(float *)&a1->m_animationRandomizedStartValue = -a2; } v6 = a1->m_animationShouldUseSpeed && a1->m_animationSpeed < 0.0; v7 = *(float *)&a1->m_animationRandomizedStartValue + a2; if ( a1->m_visible ) { m_unk544 = a1->m_unk544; v7 = v7 + m_unk544; m_animationStart = a1->m_animationStart; if ( m_animationStart > 0.0 ) { if ( v7 >= (float)(m_animationStart + a1->m_unk540) ) { v10 = 0; a1->m_unk544 = m_unk544 - m_animationStart; v7 = v7 - m_animationStart; a1->m_animationStart = 0.0; } else { v10 = 1; } goto LABEL_14; } LABEL_13: v10 = 0; LABEL_14: m_frames = a1->m_frames + 1; v12 = 1; goto LABEL_16; } if ( m_animateOnTrigger ) goto LABEL_13; v12 = 0; v10 = 0; m_frames = a1->m_frames; LABEL_16: v13 = (int)fmaxf(floorf(v7 / a1->m_frameTime), 0.0); m_singleFrame = a1->m_singleFrame; if ( m_singleFrame >= 1 ) { if ( a1->m_animationOffset || m_animateOnTrigger ) v15 = v13; else v15 = m_singleFrame - 1; if ( a1->m_animationOffset ) v16 = a1->m_singleFrame; else v16 = 0; v13 = v15 + v16; } v17 = v13 % m_frames; v18 = m_frames - v13 % m_frames; if ( v6 ) v19 = v18; else v19 = v17 + 1; if ( a3 <= 0 ) v20 = v19; else v20 = (unsigned int)a3; if ( ((((_DWORD)v20 != a1->m_maybeAnimationVariableXInt) & ~v10) != 0 || a1->m_usesSpecialAnimation) && (a1->m_blackChildOpacityLocked || a1->_realOpacity || (v66 = a1->m_colorSprite) != nullptr && ((unsigned int (__fastcall *)(cocos2d::CCSprite *))v66->getOpacity)(v66) || a1->m_isDisabled2 || a1->m_maybeAnimationVariableXInt <= 0) ) { if ( v12 ) { v21 = a1->m_frames; v22 = v20 == v21 + 1; if ( (_DWORD)v20 == v21 + 1 ) v23 = v21; else v23 = (unsigned int)v20; } else { v22 = 0; v23 = v20; } m_objectID = a1->m_objectID; if ( m_objectID <= 2019 ) { if ( m_objectID <= 1592 ) { if ( m_objectID <= 1328 ) { if ( (unsigned int)(m_objectID - 920) <= 4 && m_objectID != 922 ) goto LABEL_113; if ( (unsigned int)(m_objectID - 1050) < 3 ) { v25 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 1); if ( !v25 ) goto LABEL_120; v26 = (cocos2d::CCSprite *)v25; v27 = a1->m_objectID; if ( (unsigned int)(v27 - 1051) >= 2 ) { if ( v27 != 1050 ) goto LABEL_285; if ( (int)v23 > 8 ) { if ( (_DWORD)v23 == 9 ) { v23 = 8; goto LABEL_285; } if ( (_DWORD)v23 == 10 ) { v23 = 7; goto LABEL_285; } goto LABEL_227; } if ( (_DWORD)v23 != 4 ) { if ( (_DWORD)v23 != 5 ) goto LABEL_227; goto LABEL_218; } } else { if ( (int)v23 <= 8 ) { if ( (_DWORD)v23 == 7 ) { v23 = 5; goto LABEL_285; } if ( (_DWORD)v23 == 8 ) { v23 = 4; LABEL_285: v165 = 1; LABEL_286: v206 = GameManager::sharedState(); v207 = sub_100348D38(v206, (unsigned int)a1->m_objectID, v23); if ( v207 ) { LABEL_287: v208 = (const char *)v207; v209 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v210 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v209, v208); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v26->setDisplayFrame)( v26, v210); } LABEL_288: cocos2d::CCSprite::setFlipX(v26, v165); goto LABEL_120; } LABEL_227: v165 = 0; goto LABEL_286; } if ( (_DWORD)v23 != 9 ) { if ( (_DWORD)v23 != 10 ) goto LABEL_227; LABEL_218: v23 = 2; goto LABEL_285; } } v23 = 3; goto LABEL_285; } if ( m_objectID == 142 ) goto LABEL_160; goto LABEL_147; } if ( m_objectID <= 1517 ) { if ( m_objectID == 1329 ) { LABEL_160: if ( a1->m_hasUniqueCoin ) v126 = (unsigned int)-m_objectID; else v126 = (unsigned int)m_objectID; v127 = GameManager::sharedState(); v128 = sub_100348D38(v127, v126, v23); if ( v128 ) { v129 = (const char *)v128; v130 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v131 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v130, v129); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v131); } if ( !a1->m_colorSprite ) goto LABEL_120; v121 = GameManager::sharedState(); v122 = v126; goto LABEL_167; } if ( m_objectID != 1516 ) goto LABEL_147; } else if ( m_objectID != 1518 ) { if ( m_objectID != 1591 ) { if ( m_objectID == 1592 ) { v78 = GameManager::sharedState(); v79 = sub_100348D38(v78, (unsigned int)a1->m_objectID, v23); if ( v79 ) { v80 = (const char *)v79; v81 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v82 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v81, v80); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v82); } m_colorSprite = a1->m_colorSprite; if ( m_colorSprite ) { v84 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, __int64))m_colorSprite->getChildByTag)( m_colorSprite, 1); if ( v84 ) { v85 = (cocos2d::CCSprite *)v84; v23 = (int)v23 <= 1 ? (unsigned int)v23 : (unsigned int)(10 - v23); v86 = GameManager::sharedState(); v87 = sub_100348D70(v86, (unsigned int)a1->m_objectID, v23); if ( v87 ) { v70 = (const char *)v87; LABEL_119: v103 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v104 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v103, v70); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v85->setDisplayFrame)( v85, v104); goto LABEL_120; } } } goto LABEL_120; } goto LABEL_147; } LABEL_156: if ( m_objectID == 1593 ) { a1->m_unkAnimationInt = 1; LABEL_158: v123 = 8; m_unkAnimationInt = 1; v125 = 0.13; goto LABEL_259; } m_unkAnimationInt = a1->m_unkAnimationInt; if ( !m_unkAnimationInt ) { if ( vcvts_n_f32_s32(rand(), 0x1Fu) <= 0.7 ) { if ( vcvts_n_f32_s32(rand(), 0x1Fu) <= 0.7 ) m_unkAnimationInt = 1; else m_unkAnimationInt = 3; } else { m_unkAnimationInt = 2; } a1->m_unkAnimationInt = m_unkAnimationInt; *(float *)&a1->m_animationRandomizedStartValue = -a2; a1->m_maybeAnimationVariableXInt = -1; v7 = 0.0; } switch ( m_unkAnimationInt ) { case 3: v123 = 6; break; case 2: v123 = 8; break; case 1: goto LABEL_158; default: v125 = 1.0; v123 = 1; LABEL_259: v185 = (unsigned int)((int)fmaxf(floorf(v7 / v125), 0.0) % v123 + 1); m_maybeAnimationVariableXInt = a1->m_maybeAnimationVariableXInt; if ( (_DWORD)v185 != m_maybeAnimationVariableXInt ) { if ( m_maybeAnimationVariableXInt >= v123 && a1->m_objectID != 1593 ) { a1->m_unkAnimationInt = 0; return; } a1->m_maybeAnimationVariableXInt = v185; v187 = GameManager::sharedState(); if ( m_unkAnimationInt == 3 ) v188 = 2060; else v188 = 2058; if ( m_unkAnimationInt == 2 ) v189 = 2059; else v189 = v188; v190 = sub_100348D38(v187, v189, v185); if ( v190 ) { v191 = (const char *)v190; v192 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v193 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v192, v191); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v193); } if ( a1->m_colorSprite ) { v194 = a1->m_unkAnimationInt; v195 = GameManager::sharedState(); v196 = v194 == 3 ? 2060 : 2058; v197 = v194 == 2 ? 2059LL : v196; v198 = (const char *)sub_100348D70(v195, v197, v185); v199 = a1->m_colorSprite; v200 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v201 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v200, v198); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v199->setDisplayFrame)( v199, v201); if ( a1->m_colorSpriteLocked ) { v202 = (double *)((__int64 (__fastcall *)(EnhancedGameObject *))a1->getContentSize)(a1); v203.n128_f64[0] = sub_100022AFC(&v221, v202); v204 = a1->m_colorSprite; v203.n128_f32[0] = *(float *)&v221 * 0.5; v205.n128_f32[0] = *((float *)&v221 + 1) * 0.5; sub_100022980(v203, v205, &v220); ((void (__fastcall *)(cocos2d::CCSprite *, __int64 *))v204->setPosition)(v204, &v220); } } } goto LABEL_120; } v125 = 0.12; goto LABEL_259; } v114 = GameManager::sharedState(); v115 = sub_100348D38(v114, (unsigned int)a1->m_objectID, v23); if ( v115 ) { v116 = (const char *)v115; v117 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 1); if ( v117 ) { v118 = v117; v119 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v120 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v119, v116); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v118 + 1144LL))(v118, v120); } } goto LABEL_154; } if ( m_objectID > 1854 ) { if ( (unsigned int)(m_objectID - 1936) < 4 ) goto LABEL_113; if ( m_objectID == 1855 ) { v133 = GameManager::sharedState(); v134 = sub_100348D38(v133, (unsigned int)a1->m_objectID, v23); if ( v134 ) { v135 = (const char *)v134; v136 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v137 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v136, v135); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v137); } v138 = v20 - 8; if ( (unsigned int)(v20 - 8) > 8 ) v139 = "gj_drops05_2_001.png"; else v139 = off_1007F2DE0[v138]; v146 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 2); if ( v146 ) { v147 = v146; v148 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v149 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v148, v139); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v147 + 1144LL))(v147, v149); } if ( !a1->m_colorSprite ) goto LABEL_120; v150 = GameManager::sharedState(); v151 = sub_100348D70(v150, (unsigned int)a1->m_objectID, v23); if ( v151 ) { v152 = (const char *)v151; v153 = a1->m_colorSprite; v154 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v155 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v154, v152); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v153->setDisplayFrame)(v153, v155); } if ( v138 > 8 ) v70 = "gj_drops05_2_color_001.png"; else v70 = off_1007F2E28[v138]; v77 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_colorSprite->getChildByTag)( a1->m_colorSprite, 2); } else { if ( m_objectID != 1858 ) { LABEL_147: v109 = GameManager::sharedState(); v110 = sub_100348D38(v109, (unsigned int)a1->m_objectID, v23); if ( v110 ) { v111 = (const char *)v110; v112 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v113 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v112, v111); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v113); } LABEL_154: if ( !a1->m_colorSprite ) goto LABEL_120; v121 = GameManager::sharedState(); v122 = (unsigned int)a1->m_objectID; LABEL_167: v132 = sub_100348D70(v121, v122, v23); if ( v132 ) { v70 = (const char *)v132; v85 = a1->m_colorSprite; goto LABEL_119; } goto LABEL_120; } v67 = v23 - 1; if ( (unsigned int)(v23 - 1) > 7 ) goto LABEL_120; v68 = off_1007F2E70[v67]; v69 = off_1007F2EB0[v67]; v70 = off_1007F2EF0[v67]; v71 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v72 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v71, v68); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v72); v73 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 2); if ( v73 ) { v74 = v73; v75 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v76 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v75, v69); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v74 + 1144LL))(v74, v76); } v77 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 3); } if ( v77 ) goto LABEL_118; goto LABEL_120; } if ( m_objectID > 1838 ) { if ( (unsigned int)(m_objectID - 1839) < 4 ) { m_randomFrameTime = a1->m_randomFrameTime; if ( a1->m_animationShouldUseSpeed ) { m_animationSpeed = a1->m_animationSpeed; v31 = m_animationSpeed == 0.0; v58 = fabsf(m_animationSpeed); if ( !v31 ) m_randomFrameTime = v58; } v59 = 0.02 / m_randomFrameTime; v60 = (int)(float)(40.0 / m_randomFrameTime); v61 = (int)vcvtms_s32_f32(v7 / (float)(0.02 / m_randomFrameTime)) % v60; if ( v6 ) v62 = v60 - v61; else v62 = v61 + 1; if ( v62 != a1->m_maybeAnimationVariableXInt ) { v63 = a1->m_animationStart; if ( v63 == -1.0 ) v62 = v60; a1->m_maybeAnimationVariableXInt = v62; if ( v62 == v60 ) { v64 = 0.0; v65 = 1.0; } else { v140 = (float)(v59 * (float)v62) / (float)((float)(v59 * (float)v60) * 0.5); if ( v140 >= 1.0 ) { v63 = 0.1; v65 = (float)((float)((float)((float)(v140 + -1.0) * (float)((float)(v140 + -1.0) + -2.0)) + -1.0) * -0.7) + 0.1; } else { v63 = v140 * 0.7; v65 = (float)((float)(v140 * 0.7) * v140) + 0.1; } v156 = __OFSUB__(v60 / 3, v62); v157 = v60 / 3 - v62; if ( (v157 < 0) ^ v156 | (v157 == 0) ) v64 = (float)(255 / (v60 - v60 / 3) * v157 + 255); else v64 = 255.0; } m_pChildren = a1->m_pChildren; if ( m_pChildren ) { data = m_pChildren->data; num = data->num; if ( (_DWORD)num ) { LOBYTE(v63) = a1->_realOpacity; v161 = (int)(float)(v64 * (float)((float)LODWORD(v63) / 255.0)); arr = data->arr; v163 = (unsigned __int64)&arr[num - 1]; do { v164 = *arr; if ( !*arr ) break; ((void (__fastcall *)(cocos2d::CCObject *, float))v164->__vftable[2].copyWithZone)(*arr, v65); ((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v164->__vftable[11].~CCObject_0)( v164, (unsigned __int8)v161); ++arr; } while ( (unsigned __int64)arr <= v163 ); } } } goto LABEL_120; } goto LABEL_147; } if ( m_objectID == 1593 ) goto LABEL_156; if ( m_objectID != 1614 ) { if ( m_objectID == 1697 ) { v106 = vcvts_n_f32_s32(rand(), 0x1Fu); if ( v106 <= 0.35 ) v107 = 1; else v107 = 2; if ( v106 > 0.35 ) v108 = 1; else v108 = 2; if ( v106 > 0.7 ) v107 = 3; if ( a1->m_maybeAnimationVariableYInt == v107 ) v23 = v108; else v23 = v107; a1->m_maybeAnimationVariableYInt = v23; } goto LABEL_147; } sub_100022AF4(&v221); if ( (int)v23 > 2 ) { if ( (_DWORD)v23 == 3 ) { v142 = "smallCoin_03_001.png"; } else { if ( (_DWORD)v23 != 4 ) { v141 = 0; v142 = nullptr; LABEL_236: v166 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 1); if ( v141 ) { v169 = v166; if ( v166 ) { v170 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v171 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v170, v142); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v169 + 1144LL))(v169, v171); v172 = (double *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v169 + 312LL))(v169); v167.n128_f64[0] = sub_100022B14(&v221, v172); } } v173 = a1->m_colorSprite; if ( v173 ) { if ( (unsigned int)(v23 - 1) <= 3 ) { v174 = off_1007F2DA0[(unsigned int)(v23 - 1)]; v175 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v176 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v175, v174); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v173->setDisplayFrame)(v173, v176); v173 = a1->m_colorSprite; } v167.n128_f32[0] = *(float *)&v221 * 0.5; v168.n128_f32[0] = *((float *)&v221 + 1) * 0.5; sub_100022980(v167, v168, &v220); ((void (__fastcall *)(cocos2d::CCSprite *, __int64 *))v173->setPosition)(v173, &v220); } v177 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64, __n128))a1->getChildByTag)(a1, 2, v167); if ( v177 ) { v178 = v177; if ( (unsigned int)(v23 - 1) <= 3 ) { v179 = off_1007F2DC0[(unsigned int)(v23 - 1)]; v180 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v181 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v180, v179); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v178 + 1144LL))(v178, v181); } v182 = (double *)((__int64 (__fastcall *)(EnhancedGameObject *))a1->getContentSize)(a1); v183.n128_f64[0] = sub_100022AFC(&v220, v182); v183.n128_f32[0] = *(float *)&v220 * 0.5; v184.n128_f32[0] = *((float *)&v220 + 1) * 0.5; sub_100022980(v183, v184, &v219); (*(void (__fastcall **)(__int64, int *))(*(_QWORD *)v178 + 184LL))(v178, &v219); } goto LABEL_120; } v142 = "smallCoin_04_001.png"; } } else { if ( (_DWORD)v23 != 1 ) { v141 = v23 == 2; if ( (_DWORD)v23 == 2 ) v142 = "smallCoin_02_001.png"; else v142 = nullptr; goto LABEL_236; } v142 = "smallCoin_01_001.png"; } v141 = 1; goto LABEL_236; } if ( (unsigned int)(m_objectID - 2020) <= 0x23 && ((1LL << ((unsigned __int8)m_objectID + 28)) & 0x87BFFFFFFLL) != 0 ) { LABEL_113: GameManager::sharedState(); v88 = a1->m_objectID; v89 = GameManager::sharedState(); v90 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v89->m_mainFramesForAnimation, v88); v91 = v23 - 1; v92 = cocos2d::CCArray::stringAtIndex(v90, v91); CString = cocos2d::CCString::getCString(v92); if ( CString ) { v94 = CString; v95 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v96 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v95, v94); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v96); } if ( a1->m_colorSprite ) { GameManager::sharedState(); v97 = a1->m_objectID; v98 = GameManager::sharedState(); v99 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v98->m_detailFramesForAnimation, v97); v100 = cocos2d::CCArray::stringAtIndex(v99, v91); v101 = cocos2d::CCString::getCString(v100); if ( v101 ) { v70 = v101; v102 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_colorSprite->getChildren)(a1->m_colorSprite); v77 = sub_10024A388(v102, 0); LABEL_118: v85 = (cocos2d::CCSprite *)v77; goto LABEL_119; } } LABEL_120: a1->m_maybeAnimationVariableXInt = v20; if ( a1->m_visible ) { if ( v22 ) { a1->m_animationStart = (float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 0.5) + 0.2; a1->m_unk540 = v7; if ( !a1->m_shouldNotHideAnimFreeze ) { v105 = 1; LABEL_126: a1->m_isDisabled2 = v105; } } else if ( !a1->m_shouldNotHideAnimFreeze ) { v105 = 0; goto LABEL_126; } } if ( a1->m_animateOnTrigger && a1->m_animationTriggered && a1->m_maybeAnimationVariableXInt == m_frames ) { a1->m_animationTriggered = 0; *(_QWORD *)&a1->m_animationRandomizedStartValue = 0; *(_QWORD *)&a1->m_unk540 = 0; a1->m_isDisabled2 = 1; ((void (__fastcall *)(EnhancedGameObject *, _QWORD))a1->setOpacity)(a1, 0); } return; } if ( (unsigned int)(m_objectID - 2864) <= 0x1E ) { v28 = 1 << (m_objectID - 48); if ( (v28 & 0x4FFFFFFB) != 0 ) goto LABEL_113; if ( (v28 & 0x30000000) != 0 ) { v29 = a1->m_randomFrameTime; if ( a1->m_animationShouldUseSpeed ) { v30 = a1->m_animationSpeed; v31 = v30 == 0.0; v32 = fabsf(v30); if ( !v31 ) v29 = v32; } v33 = vcvtms_s32_f32(v7 / (float)(flt_100645560[m_objectID == 2892] / v29)); v34 = v33 & 0xF; v36 = -v33; v35 = v36 < 0; v37 = v36 & 0xF; if ( v35 ) v38 = v34; else v38 = -v37; if ( v6 ) v39 = 16 - v38; else v39 = v38 + 1; if ( v39 != a1->m_maybeAnimationVariableXInt ) { a1->m_maybeAnimationVariableXInt = v39; if ( m_objectID == 2892 ) v40 = 2; else v40 = 4; v41 = (unsigned int)(char)((char)v39 % v40 + 1); v42 = GameManager::sharedState(); v43 = (const char *)sub_100348D38(v42, (unsigned int)a1->m_objectID, v41); v44 = GameManager::sharedState(); v45 = (const char *)sub_100348D70(v44, (unsigned int)a1->m_objectID, v41); v46 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 1); v47 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_colorSprite->getChildren)(a1->m_colorSprite); v48 = sub_10024A388(v47, 0); v49 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v50 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v49, v43); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v46 + 1144LL))(v46, v50); v51 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v52 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v51, v45); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v48 + 1144LL))(v48, v52); v53 = (float)v39 * -22.5; v54 = floorf(vcvts_n_f32_s32(v39, 2u)) * -90.0; if ( a1->m_objectID != 2892 ) v53 = v54; v55 = (float)(int)v53; (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v46 + 344LL))(v46, v55); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v48 + 344LL))(v48, v55); } goto LABEL_120; } } if ( (unsigned int)(m_objectID - 3000) >= 3 ) goto LABEL_147; v143 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 1); if ( !v143 ) goto LABEL_120; v144 = (cocos2d::CCSprite *)v143; v145 = a1->m_objectID; if ( (unsigned int)(v145 - 3001) >= 2 ) { if ( v145 != 3000 ) goto LABEL_296; if ( (int)v23 > 8 ) { if ( (_DWORD)v23 == 9 ) { v23 = 8; goto LABEL_296; } if ( (_DWORD)v23 == 10 ) { v23 = 7; goto LABEL_296; } goto LABEL_293; } if ( (_DWORD)v23 != 4 ) { if ( (_DWORD)v23 != 5 ) goto LABEL_293; goto LABEL_282; } } else { if ( (int)v23 <= 8 ) { if ( (_DWORD)v23 == 7 ) { v23 = 5; goto LABEL_296; } if ( (_DWORD)v23 == 8 ) { v23 = 4; LABEL_296: v165 = 1; LABEL_297: v211 = GameManager::sharedState(); v212 = sub_100348D38(v211, (unsigned int)a1->m_objectID, v23); if ( v212 ) { v213 = (const char *)v212; v214 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v215 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v214, v213); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v144->setDisplayFrame)(v144, v215); } cocos2d::CCSprite::setFlipX(v144, v165); v216 = a1->m_colorSprite; if ( !v216 ) goto LABEL_120; v217 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, __int64))v216->getChildByTag)(v216, 1); if ( !v217 ) goto LABEL_120; v26 = (cocos2d::CCSprite *)v217; v218 = GameManager::sharedState(); v207 = sub_100348D70(v218, (unsigned int)a1->m_objectID, v23); if ( v207 ) goto LABEL_287; goto LABEL_288; } LABEL_293: v165 = 0; goto LABEL_297; } if ( (_DWORD)v23 != 9 ) { if ( (_DWORD)v23 != 10 ) goto LABEL_293; LABEL_282: v23 = 2; goto LABEL_296; } } v23 = 3; goto LABEL_296; } }