// // EnhancedGameObject::updateSyncedAnimation from 0x10025b9b0 to 0x10025ce53 (5283 bytes) // // 40 xrefs: // > SpecialAnimGameObject::updateSyncedAnimation @ 0x10025d7af // > @ 0x1008c4790 // > @ 0x1008c4fc8 // > @ 0x1008c57c0 // > @ 0x1008c5fb8 // > @ 0x1008c67b0 // > @ 0x1008c6fa8 // > @ 0x1008c77a0 // > @ 0x1008c9808 // > @ 0x1008ca018 // > @ 0x1008ca828 // > @ 0x1008cb038 // > @ 0x1008cb848 // > @ 0x1008cc058 // > @ 0x1008cc868 // > @ 0x1008cd078 // > @ 0x1008cd888 // > @ 0x1008ce098 // > @ 0x1008ce8c0 // > @ 0x1008cf118 // > @ 0x1008cf940 // > @ 0x1008d0168 // > @ 0x1008d0990 // > @ 0x1008d19c8 // > @ 0x1008d21d8 // > @ 0x1008d29e8 // > @ 0x1008d31f8 // > @ 0x1008d3a08 // > @ 0x1008d4218 // > @ 0x1008d4a28 // > @ 0x1008d5238 // > @ 0x1008d5a48 // > @ 0x1008d6258 // > @ 0x1008d6a68 // > @ 0x1008d7278 // > @ 0x1008d7a88 // > @ 0x1008d8298 // > @ 0x1008d8aa8 // > @ 0x1008d92b8 // > @ 0x1009722f8 // // 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 // // local variable allocation has failed, the output may be wrong! void __fastcall EnhancedGameObject::updateSyncedAnimation(EnhancedGameObject *a1, float a2, int a3) { double v3; // xmm3_8 bool m_animateOnTrigger; // cl bool v6; // r12 __m128 m_animationRandomizedStartValue; // xmm4 int m_frames; // r13d char v9; // r15 char v10; // di float m_unk544; // xmm1_4 float v12; // xmm2_4 __m128 v13; // xmm1 double v14; // xmm2_8 int v15; // eax int m_singleFrame; // edx bool m_animationOffset; // r8 int v18; // r9d int v19; // eax __int64 v20; // rdx int v21; // eax int v22; // r14d bool m_animationShouldUseSpeed; // zf unsigned int v24; // r15d unsigned int v25; // eax int m_objectID; // eax float m_randomFrameTime; // xmm1_4 float m_animationSpeed; // xmm0_4 float v29; // xmm0_4 int v30; // ecx int v31; // edx __int64 v32; // rtt int v33; // eax int v34; // edx int v35; // eax float v36; // xmm0_4 __int64 v37; // rax cocos2d::CCSprite *v38; // r12 int v39; // eax char v40; // r13 float v41; // xmm0_4 int v42; // ecx int m_unkAnimationInt; // r12d double v44; // xmm0_8 unsigned int v45; // r15d int m_maybeAnimationVariableXInt; // eax GameManager *v47; // rax __int64 v48; // rsi __int64 v49; // rax const char *v50; // r12 cocos2d::CCSpriteFrameCache *v51; // rax cocos2d::CCSpriteFrame *v52; // rax int v53; // r12d GameManager *v54; // rax __int64 v55; // rsi const char *v56; // r15 cocos2d::CCSprite *v57; // r12 cocos2d::CCSpriteFrameCache *v58; // rax cocos2d::CCSpriteFrame *v59; // rax __int64 v60; // rax cocos2d::CCSprite *v61; // r15 cocos2d::CCSprite *v62; // rdi cocos2d::CCSprite_vtbl *v63; // rax char v64; // al intptr_t v65; // r12 GameManager *v66; // rax cocos2d::CCArray *v67; // rax unsigned int v68; // r15d cocos2d::CCString *v69; // rax const char *CString; // rax const char *v71; // r12 cocos2d::CCSpriteFrameCache *v72; // rax cocos2d::CCSpriteFrame *v73; // rax intptr_t v74; // r12 GameManager *v75; // rax cocos2d::CCArray *v76; // rax cocos2d::CCString *v77; // rax const char *v78; // rax const char *v79; // r15 __int64 v80; // rax cocos2d::CCSprite *v81; // r12 GameManager *v82; // rax __int64 v83; // rax const char *v84; // r12 __int64 v85; // rax __int64 v86; // r13 cocos2d::CCSpriteFrameCache *v87; // rax cocos2d::CCSpriteFrame *v88; // rax GameManager *v89; // rax __int64 v90; // rsi GameManager *v91; // rdi unsigned int v92; // r12d GameManager *v93; // rax __int64 v94; // rax const char *v95; // r13 cocos2d::CCSpriteFrameCache *v96; // rax cocos2d::CCSpriteFrame *v97; // rax __int64 v98; // rax cocos2d::CCSpriteFrameCache *v99; // rax cocos2d::CCSpriteFrame *v100; // rax GameManager *v101; // rax __int64 v102; // rax const char *v103; // r12 cocos2d::CCSpriteFrameCache *v104; // rax cocos2d::CCSpriteFrame *v105; // rax cocos2d::CCSprite *v106; // rdi __int64 v107; // rax __int64 v108; // r12 unsigned int v109; // r13d GameManager *v110; // rax __int64 v111; // rax const char *v112; // r15 cocos2d::CCSpriteFrameCache *v113; // rax cocos2d::CCSpriteFrame *v114; // rax unsigned int v115; // r15d const char *v116; // rax int v117; // xmm0_4 GameManager *v118; // rax __int64 v119; // rax const char *v120; // r12 cocos2d::CCSpriteFrameCache *v121; // rax cocos2d::CCSpriteFrame *v122; // rax GameManager *v123; // rax __int64 v124; // rax cocos2d::CCSprite *v125; // r12 int v126; // eax int v127; // ecx float v128; // xmm0_4 float v129; // xmm1_4 float v130; // xmm0_4 __m128 v131; // xmm0 int v132; // edx unsigned int v133; // esi int v134; // r13d unsigned int v135; // r15d GameManager *v136; // rax GameManager *v137; // rax __int64 v138; // r15 __int64 v139; // rax __int64 v140; // r12 cocos2d::CCSpriteFrameCache *v141; // rax cocos2d::CCSpriteFrame *v142; // rax cocos2d::CCSpriteFrameCache *v143; // rax cocos2d::CCSpriteFrame *v144; // rax char v145; // r12 __int64 v146; // r13 cocos2d::CCSpriteFrameCache *v147; // rax cocos2d::CCSpriteFrame *v148; // rax __int64 v149; // rax cocos2d::CCSprite *v150; // r12 const char *v151; // r13 cocos2d::CCSpriteFrameCache *v152; // rax cocos2d::CCSpriteFrame *v153; // rax __int64 v154; // rax __int64 v155; // r12 const char *v156; // r15 cocos2d::CCSpriteFrameCache *v157; // rax cocos2d::CCSpriteFrame *v158; // rax __int64 v159; // rax double v160; // xmm0_8 _BOOL8 v161; // rax int v162; // edx unsigned int v163; // r15d GameManager *v164; // rax __int64 v165; // rax const char *v166; // r12 cocos2d::CCSpriteFrameCache *v167; // rax cocos2d::CCSpriteFrame *v168; // rax GameManager *v169; // rax unsigned int v170; // r15d const char *v171; // r13 cocos2d::CCSpriteFrameCache *v172; // rax cocos2d::CCSpriteFrame *v173; // rax __int64 v174; // rax __int64 v175; // r13 cocos2d::CCSpriteFrameCache *v176; // rax cocos2d::CCSpriteFrame *v177; // rax __int64 v178; // rax GameManager *v179; // rax __int64 v180; // rax const char *v181; // r12 cocos2d::CCSpriteFrameCache *v182; // rax cocos2d::CCSpriteFrame *v183; // rax const char *v184; // r12 unsigned int v185; // eax GameManager *v186; // rax __int64 v187; // rax const char *v188; // r15 cocos2d::CCSpriteFrameCache *v189; // rax cocos2d::CCSpriteFrame *v190; // rax bool v191; // si cocos2d::CCSprite *v192; // rdi bool v193; // al cocos2d::CCArray *m_pChildren; // rax cocos2d::ccArray *data; // rax __int64 num; // rcx cocos2d::CCObject **arr; // r13 cocos2d::CCObject *v198; // r12 __int64 v199; // rax __int64 v200; // r13 cocos2d::CCSpriteFrameCache *v201; // rax cocos2d::CCSpriteFrame *v202; // rax GameManager *v203; // rax __int64 v204; // rax const char *v205; // r15 cocos2d::CCSprite *m_colorSprite; // r12 cocos2d::CCSpriteFrameCache *v207; // rax cocos2d::CCSpriteFrame *v208; // rax __int64 v209; // rax GameManager *v210; // rax __int64 v211; // rax const char *v212; // r13 cocos2d::CCSpriteFrameCache *v213; // rax cocos2d::CCSpriteFrame *v214; // rax cocos2d::CCSprite *v215; // rdi __int64 v216; // rax cocos2d::CCSprite *v217; // r12 GameManager *v218; // rax __int64 v219; // rax const char *v220; // r15 cocos2d::CCSpriteFrameCache *v221; // rax cocos2d::CCSpriteFrame *v222; // rax char v223[8]; // [rsp+Ch] [rbp-64h] BYREF float v224; // [rsp+14h] [rbp-5Ch] BYREF float v225; // [rsp+18h] [rbp-58h] unsigned int v226; // [rsp+1Ch] [rbp-54h] unsigned __int64 v227; // [rsp+20h] [rbp-50h] float v228; // [rsp+28h] [rbp-48h] BYREF float v229; // [rsp+2Ch] [rbp-44h] __m128 v230; // [rsp+30h] [rbp-40h] int v231; // [rsp+40h] [rbp-30h] float v232; // [rsp+44h] [rbp-2Ch] 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; } if ( a1->m_animationShouldUseSpeed ) { v6 = a1->m_animationSpeed < 0.0; m_animationRandomizedStartValue = (__m128)(unsigned int)a1->m_animationRandomizedStartValue; m_animationRandomizedStartValue.f32[0] = m_animationRandomizedStartValue.f32[0] + a2; if ( !a1->m_visible ) goto LABEL_7; } else { v6 = 0; m_animationRandomizedStartValue = (__m128)(unsigned int)a1->m_animationRandomizedStartValue; m_animationRandomizedStartValue.f32[0] = m_animationRandomizedStartValue.f32[0] + a2; if ( !a1->m_visible ) { LABEL_7: if ( !m_animateOnTrigger ) { m_frames = a1->m_frames; v9 = 0; v10 = 0; goto LABEL_15; } goto LABEL_13; } } *(_QWORD *)&v3 = LODWORD(a1->m_animationStart); m_unk544 = a1->m_unk544; m_animationRandomizedStartValue.f32[0] = m_animationRandomizedStartValue.f32[0] + m_unk544; if ( *(float *)&v3 <= 0.0 ) { LABEL_13: v10 = 0; goto LABEL_14; } v12 = a1->m_unk540 + *(float *)&v3; v10 = 1; if ( v12 <= m_animationRandomizedStartValue.f32[0] ) { a1->m_unk544 = m_unk544 - *(float *)&v3; m_animationRandomizedStartValue.f32[0] = m_animationRandomizedStartValue.f32[0] - *(float *)&v3; a1->m_animationStart = 0.0; goto LABEL_13; } LABEL_14: m_frames = a1->m_frames + 1; v9 = 1; LABEL_15: v13 = m_animationRandomizedStartValue; v13.f32[0] = m_animationRandomizedStartValue.f32[0] / a1->m_frameTime; *(_QWORD *)&v14 = _mm_round_ss((__m128)0LL, v13, 9).u64[0]; v13.i64[0] = 0; *(float *)&v14 = fmaxf(*(float *)&v14, 0.0); v15 = (int)*(float *)&v14; m_singleFrame = a1->m_singleFrame; if ( m_singleFrame > 0 ) { m_animationOffset = a1->m_animationOffset; v18 = m_singleFrame - 1; if ( m_animationOffset || m_animateOnTrigger ) v18 = (int)*(float *)&v14; v19 = 0; if ( m_animationOffset ) v19 = a1->m_singleFrame; v15 = v18 + v19; } v20 = (unsigned int)(v15 >> 31); LODWORD(v20) = v15 % m_frames; v21 = m_frames - v15 % m_frames; v22 = v20 + 1; if ( v6 ) v22 = v21; if ( a3 > 0 ) v22 = a3; if ( ((v22 != a1->m_maybeAnimationVariableXInt) & (unsigned __int8)~v10) != 0 || a1->m_usesSpecialAnimation ) { if ( (m_animationShouldUseSpeed = !a1->m_blackChildOpacityLocked, v232 = m_animationRandomizedStartValue.f32[0], !m_animationShouldUseSpeed) || a1->_realOpacity || (v62 = a1->m_colorSprite) != nullptr && (v63 = v62->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable, v230 = *(__m128 *)&a2, v64 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v63->getOpacity)(v62), m_animationRandomizedStartValue = (__m128)LODWORD(v232), v64) || a1->m_isDisabled2 || a1->m_maybeAnimationVariableXInt <= 0 ) { if ( v9 ) { v24 = a1->m_frames; v25 = v24 + 1; LOBYTE(v25) = v22 == v24 + 1; v226 = v25; if ( v22 != v24 + 1 ) v24 = v22; m_objectID = a1->m_objectID; if ( m_objectID > 1696 ) goto LABEL_33; } else { v226 = 0; v24 = v22; m_objectID = a1->m_objectID; if ( m_objectID > 1696 ) { LABEL_33: switch ( m_objectID ) { case 1697: HIDWORD(v160) = 0; *(float *)&v160 = (float)rand() * 4.6566129e-10; v161 = *(float *)&v160 > 0.34999999; v162 = 3; if ( *(float *)&v160 <= 0.69999999 ) v162 = v161 + 1; v163 = 2 - (*(float *)&v160 > 0.69999999 || v161); if ( a1->m_maybeAnimationVariableYInt != v162 ) v163 = v162; a1->m_maybeAnimationVariableYInt = v163; v164 = GameManager::sharedState(); v165 = sub_10025D6F0(v164, (unsigned int)a1->m_objectID, v163, v160); if ( v165 ) { v166 = (const char *)v165; v167 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v168 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v167, v166); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v168); } if ( !a1->m_colorSprite ) goto LABEL_191; v169 = GameManager::sharedState(); v98 = sub_10025D730(v169, (unsigned int)a1->m_objectID, v163); if ( !v98 ) goto LABEL_191; goto LABEL_98; case 1698: case 1699: case 1700: case 1701: case 1702: case 1703: case 1704: case 1705: case 1706: case 1707: case 1708: case 1709: case 1710: case 1711: case 1712: case 1713: case 1714: case 1715: case 1716: case 1717: case 1718: case 1719: case 1720: case 1721: case 1722: case 1723: case 1724: case 1725: case 1726: case 1727: case 1728: case 1729: case 1730: case 1731: case 1732: case 1733: case 1734: case 1735: case 1736: case 1737: case 1738: case 1739: case 1740: case 1741: case 1742: case 1743: case 1744: case 1745: case 1746: case 1747: case 1748: case 1749: case 1750: case 1751: case 1752: case 1753: case 1754: case 1755: case 1756: case 1757: case 1758: case 1759: case 1760: case 1761: case 1762: case 1763: case 1764: case 1765: case 1766: case 1767: case 1768: case 1769: case 1770: case 1771: case 1772: case 1773: case 1774: case 1775: case 1776: case 1777: case 1778: case 1779: case 1780: case 1781: case 1782: case 1783: case 1784: case 1785: case 1786: case 1787: case 1788: case 1789: case 1790: case 1791: case 1792: case 1793: case 1794: case 1795: case 1796: case 1797: case 1798: case 1799: case 1800: case 1801: case 1802: case 1803: case 1804: case 1805: case 1806: case 1807: case 1808: case 1809: case 1810: case 1811: case 1812: case 1813: case 1814: case 1815: case 1816: case 1817: case 1818: case 1819: case 1820: case 1821: case 1822: case 1823: case 1824: case 1825: case 1826: case 1827: case 1828: case 1829: case 1830: case 1831: case 1832: case 1833: case 1834: case 1835: case 1836: case 1837: case 1838: case 1843: case 1844: case 1845: case 1846: case 1847: case 1848: case 1849: case 1850: case 1851: case 1852: case 1853: case 1854: case 1856: case 1857: case 1859: case 1860: case 1861: case 1862: case 1863: case 1864: case 1865: case 1866: case 1867: case 1868: case 1869: case 1870: case 1871: case 1872: case 1873: case 1874: case 1875: case 1876: case 1877: case 1878: case 1879: case 1880: case 1881: case 1882: case 1883: case 1884: case 1885: case 1886: case 1887: case 1888: case 1889: case 1890: case 1891: case 1892: case 1893: case 1894: case 1895: case 1896: case 1897: case 1898: case 1899: case 1900: case 1901: case 1902: case 1903: case 1904: case 1905: case 1906: case 1907: case 1908: case 1909: case 1910: case 1911: case 1912: case 1913: case 1914: case 1915: case 1916: case 1917: case 1918: case 1919: case 1920: case 1921: case 1922: case 1923: case 1924: case 1925: case 1926: case 1927: case 1928: case 1929: case 1930: case 1931: case 1932: case 1933: case 1934: case 1935: case 1940: case 1941: case 1942: case 1943: case 1944: case 1945: case 1946: case 1947: case 1948: case 1949: case 1950: case 1951: case 1952: case 1953: case 1954: case 1955: case 1956: case 1957: case 1958: case 1959: case 1960: case 1961: case 1962: case 1963: case 1964: case 1965: case 1966: case 1967: case 1968: case 1969: case 1970: case 1971: case 1972: case 1973: case 1974: case 1975: case 1976: case 1977: case 1978: case 1979: case 1980: case 1981: case 1982: case 1983: case 1984: case 1985: case 1986: case 1987: case 1988: case 1989: case 1990: case 1991: case 1992: case 1993: case 1994: case 1995: case 1996: case 1997: case 1998: case 1999: case 2000: case 2001: case 2002: case 2003: case 2004: case 2005: case 2006: case 2007: case 2008: case 2009: case 2010: case 2011: case 2012: case 2013: case 2014: case 2015: case 2016: case 2017: case 2018: case 2019: case 2046: case 2051: case 2052: case 2053: case 2054: goto LABEL_121; case 1839: case 1840: case 1841: case 1842: m_randomFrameTime = a1->m_randomFrameTime; if ( a1->m_animationShouldUseSpeed ) { m_animationSpeed = a1->m_animationSpeed; if ( m_animationSpeed != 0.0 ) m_randomFrameTime = fabs(m_animationSpeed); } v29 = 0.02 / m_randomFrameTime; HIDWORD(v14) = 0; *(float *)&v14 = 40.0 / m_randomFrameTime; v30 = (int)(float)(40.0 / m_randomFrameTime); v13 = m_animationRandomizedStartValue; v13.f32[0] = m_animationRandomizedStartValue.f32[0] / v29; v13.i64[0] = _mm_round_ss(v13, v13, 9).u64[0]; LODWORD(v32) = (int)v13.f32[0]; HIDWORD(v32) = (int)v13.f32[0] >> 31; v31 = v32 % v30; v33 = v30 - v31; v34 = v31 + 1; if ( v6 ) v34 = v33; if ( v34 != a1->m_maybeAnimationVariableXInt ) { v35 = v30; if ( a1->m_animationStart != -1.0 ) v35 = v34; a1->m_maybeAnimationVariableXInt = v35; if ( v35 == v30 ) { v36 = 0.0; v13.i64[0] = 1065353216; v230.i32[0] = 1065353216; } else { v13.i32[1] = 0; HIDWORD(v14) = 0; *(float *)&v14 = (float)((float)v30 * v29) * 0.5; v13.f32[0] = (float)((float)v35 * v29) / *(float *)&v14; if ( v13.f32[0] >= 1.0 ) { v13.f32[0] = v13.f32[0] + -1.0; HIDWORD(v14) = 0; *(float *)&v14 = (float)((float)((float)((float)(v13.f32[0] + -2.0) * v13.f32[0]) + -1.0) * -0.69999999) + 0.1; v230.f32[0] = *(float *)&v14; } else { v230.f32[0] = (float)((float)(0.69999999 * v13.f32[0]) * v13.f32[0]) + 0.1; } v36 = v30 / 3 <= v35 ? (float)((v30 / 3 - v35) * (255 / (v30 - v30 / 3)) + 255) : 255.0; } m_pChildren = a1->m_pChildren; if ( m_pChildren ) { data = m_pChildren->data; num = data->num; if ( data->num ) { v231 = m_frames; v13.i32[1] = 0; v13.f32[0] = (float)a1->_realOpacity / 255.0; arr = data->arr; v227 = (unsigned __int64)&arr[num - 1]; do { v198 = *arr; if ( !*arr ) break; ((void (__fastcall *)(cocos2d::CCObject *, float))v198->__vftable[2].copyWithZone)( *arr, v230.f32[0]); ((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v198->__vftable[11].~CCObject_0)( v198, (unsigned __int8)(int)(float)(v36 * v13.f32[0])); m_animationRandomizedStartValue.i64[0] = LODWORD(v232); ++arr; } while ( (unsigned __int64)arr <= v227 ); LABEL_213: m_frames = v231; } } } goto LABEL_192; case 1855: v179 = GameManager::sharedState(); v180 = sub_10025D6F0(v179, (unsigned int)a1->m_objectID, v24, *(double *)&a2); if ( v180 ) { v181 = (const char *)v180; v182 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v183 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v182, v181); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v183); } v231 = m_frames; v230.i32[0] = v22 - 8; if ( (unsigned int)(v22 - 8) > 8 ) v184 = "gj_drops05_2_001.png"; else v184 = (char *)dword_100818314 + dword_100818314[v22 - 8]; v199 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 2); if ( v199 ) { v200 = v199; v201 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v202 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v201, v184); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v200 + 1144LL))(v200, v202); } if ( !a1->m_colorSprite ) goto LABEL_190; v203 = GameManager::sharedState(); v204 = sub_10025D730(v203, (unsigned int)a1->m_objectID, v24); m_frames = v231; if ( v204 ) { v205 = (const char *)v204; m_colorSprite = a1->m_colorSprite; v207 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v208 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v207, v205); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_colorSprite->setDisplayFrame)( m_colorSprite, v208); } if ( v230.i32[0] > 8u ) v79 = "gj_drops05_2_color_001.png"; else v79 = (char *)dword_100818338 + dword_100818338[v230.u32[0]]; v209 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_colorSprite->getChildByTag)( a1->m_colorSprite, 2); if ( !v209 ) goto LABEL_191; v81 = (cocos2d::CCSprite *)v209; goto LABEL_99; case 1858: v170 = v24 - 1; if ( v170 > 7 ) goto LABEL_192; v231 = m_frames; v171 = (char *)dword_10081835C + dword_10081835C[v170]; v227 = *((int *)&unk_10081837C + v170); v230.i64[0] = dword_10081839C[v170]; v172 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v173 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v172, v171); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *, double))a1->setDisplayFrame)( a1, v173, *(double *)&a2); v174 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 2); if ( v174 ) { v175 = v174; v176 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v177 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v176, (const char *)&unk_10081837C + v227); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v175 + 1144LL))(v175, v177); } v178 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 3); m_frames = v231; if ( !v178 ) goto LABEL_191; v81 = (cocos2d::CCSprite *)v178; v79 = (char *)dword_10081839C + v230.i64[0]; break; case 1936: case 1937: case 1938: case 1939: case 2020: case 2021: case 2022: case 2023: case 2024: case 2025: case 2026: case 2027: case 2028: case 2029: case 2030: case 2031: case 2032: case 2033: case 2034: case 2035: case 2036: case 2037: case 2038: case 2039: case 2040: case 2041: case 2042: case 2043: case 2044: case 2045: case 2047: case 2048: case 2049: case 2050: case 2055: goto LABEL_77; default: switch ( m_objectID ) { case 2864: case 2865: case 2867: case 2868: case 2869: case 2870: case 2871: case 2872: case 2873: case 2874: case 2875: case 2876: case 2877: case 2878: case 2879: case 2880: case 2881: case 2882: case 2883: case 2884: case 2885: case 2886: case 2887: case 2888: case 2889: case 2890: case 2891: case 2894: goto LABEL_77; case 2892: case 2893: v128 = flt_1008182C0[m_objectID == 2892]; v129 = a1->m_randomFrameTime; m_animationShouldUseSpeed = a1->m_animationShouldUseSpeed; v231 = m_frames; if ( m_animationShouldUseSpeed ) { *(_QWORD *)&v14 = LODWORD(a1->m_animationSpeed); v3 = 0.0; if ( *(float *)&v14 != 0.0 ) { *(_QWORD *)&v14 &= 0x7FFFFFFF7FFFFFFFuLL; v129 = *(float *)&v14; } } v130 = v128 / v129; v13 = m_animationRandomizedStartValue; v13.f32[0] = m_animationRandomizedStartValue.f32[0] / v130; v131 = _mm_round_ss((__m128)0LL, v13, 9); v132 = (int)v131.f32[0] + 15; if ( (int)v131.f32[0] >= 0 ) v132 = (int)v131.f32[0]; v133 = (int)v131.f32[0] - (v132 & 0xFFFFFFF0); v134 = 16 - v133; if ( !v6 ) v134 = v133 + 1; if ( v134 == a1->m_maybeAnimationVariableXInt ) goto LABEL_213; a1->m_maybeAnimationVariableXInt = v134; v135 = (char)((char)v134 % (char)(2 * (m_objectID != 2892) + 2) + 1); v136 = GameManager::sharedState(); v227 = sub_10025D6F0(v136, (unsigned int)a1->m_objectID, v135, *(double *)v131.i64); v137 = GameManager::sharedState(); v230.i64[0] = sub_10025D730(v137, (unsigned int)a1->m_objectID, v135); v138 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 1); v139 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_colorSprite->getChildren)(a1->m_colorSprite); v140 = sub_1007200C0(v139, 0); v141 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v142 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v141, (const char *)v227); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v138 + 1144LL))(v138, v142); v143 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v144 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v143, (const char *)v230.i64[0]); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v140 + 1144LL))(v140, v144); v131.f32[0] = (float)v134; if ( a1->m_objectID == 2892 ) { v131.f32[0] = v131.f32[0] * -22.5; } else { v131.f32[0] = v131.f32[0] * 0.25; v131 = _mm_round_ss(v131, v131, 9); v131.f32[0] = v131.f32[0] * -90.0; } m_frames = v231; v230 = _mm_cvtepi32_ps(_mm_cvttps_epi32(v131)); (*(void (__fastcall **)(__int64))(*(_QWORD *)v138 + 344LL))(v138); (*(void (__fastcall **)(__int64, double))(*(_QWORD *)v140 + 344LL))(v140, *(double *)v230.i64); goto LABEL_191; case 3000: case 3001: case 3002: v124 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64, __int64, _QWORD, double))a1->getChildByTag)( a1, 1, v20, (unsigned int)(m_objectID - 2864), *(double *)&a2); if ( !v124 ) goto LABEL_191; v125 = (cocos2d::CCSprite *)v124; v126 = a1->m_objectID; v127 = v126 - 3001; v231 = m_frames; if ( (unsigned int)(v126 - 3001) >= 2 ) { if ( v126 == 3000 ) { v185 = v24 - 4; switch ( v24 ) { case 4u: LOBYTE(v185) = 1; v230.i32[0] = v185; v24 = 3; break; case 5u: LOBYTE(v185) = 1; v230.i32[0] = v185; v24 = 2; break; case 9u: LOBYTE(v185) = 1; v230.i32[0] = v185; v24 = 8; break; case 0xAu: LOBYTE(v185) = 1; v230.i32[0] = v185; v24 = 7; break; default: LABEL_228: v230.i32[0] = 0; break; } } else { LOBYTE(v126) = 1; v230.i32[0] = v126; } } else { LOBYTE(v127) = 1; v230.i32[0] = v127; switch ( v24 ) { case 7u: v24 = 5; break; case 8u: v24 = 4; break; case 9u: v24 = 3; break; case 0xAu: v24 = 2; break; default: goto LABEL_228; } } v210 = GameManager::sharedState(); v211 = sub_10025D6F0(v210, (unsigned int)a1->m_objectID, v24, *(double *)&a2); if ( v211 ) { v212 = (const char *)v211; v213 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v214 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v213, v212); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v125->setDisplayFrame)( v125, v214); } cocos2d::CCSprite::setFlipX(v125, v230.i8[0]); v215 = a1->m_colorSprite; if ( !v215 ) goto LABEL_190; v216 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, __int64))v215->getChildByTag)(v215, 1); if ( !v216 ) goto LABEL_190; v217 = (cocos2d::CCSprite *)v216; v218 = GameManager::sharedState(); v219 = sub_10025D730(v218, (unsigned int)a1->m_objectID, v24); if ( v219 ) { v220 = (const char *)v219; v221 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v222 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v221, v220); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v217->setDisplayFrame)( v217, v222); } v192 = v217; v191 = v230.i8[0]; break; default: goto LABEL_121; } goto LABEL_189; } goto LABEL_99; } } if ( m_objectID <= 1328 ) { if ( (unsigned int)(m_objectID - 920) <= 4 && m_objectID != 922 ) { LABEL_77: GameManager::sharedState(); v65 = a1->m_objectID; v66 = GameManager::sharedState(); v67 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v66->m_mainFramesForAnimation, v65); v68 = v24 - 1; v69 = cocos2d::CCArray::stringAtIndex(v67, v68); CString = cocos2d::CCString::getCString(v69); if ( CString ) { v71 = CString; v72 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v73 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v72, v71); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *, double))a1->setDisplayFrame)( a1, v73, *(double *)&a2); } if ( !a1->m_colorSprite ) goto LABEL_191; GameManager::sharedState(); v74 = a1->m_objectID; v75 = GameManager::sharedState(); v76 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v75->m_detailFramesForAnimation, v74); v77 = cocos2d::CCArray::stringAtIndex(v76, v68); v78 = cocos2d::CCString::getCString(v77); if ( !v78 ) goto LABEL_191; v79 = v78; v80 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, double))a1->m_colorSprite->getChildren)( a1->m_colorSprite, *(double *)&a2); v81 = (cocos2d::CCSprite *)sub_1007200C0(v80, 0); goto LABEL_99; } if ( (unsigned int)(m_objectID - 1050) < 3 ) { v37 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 1); if ( v37 ) { v38 = (cocos2d::CCSprite *)v37; v231 = m_frames; v39 = a1->m_objectID; v40 = 1; if ( (unsigned int)(v39 - 1051) >= 2 ) { if ( v39 == 1050 ) { switch ( v24 ) { case 4u: LABEL_120: v24 = 3; break; case 5u: LABEL_130: v24 = 2; break; case 9u: v24 = 8; break; case 0xAu: v24 = 7; break; default: LABEL_131: v40 = 0; break; } } } else { switch ( v24 ) { case 7u: v24 = 5; break; case 8u: v24 = 4; break; case 9u: goto LABEL_120; case 0xAu: goto LABEL_130; default: goto LABEL_131; } } v186 = GameManager::sharedState(); v187 = sub_10025D6F0(v186, (unsigned int)a1->m_objectID, v24, *(double *)&a2); if ( v187 ) { v188 = (const char *)v187; v189 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v190 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v189, v188); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v38->setDisplayFrame)(v38, v190); } v191 = v40; v192 = v38; LABEL_189: cocos2d::CCSprite::setFlipX(v192, v191); LABEL_190: m_frames = v231; } LABEL_191: m_animationRandomizedStartValue.i64[0] = LODWORD(v232); LABEL_192: a1->m_maybeAnimationVariableXInt = v22; if ( a1->m_visible ) { if ( (_BYTE)v226 ) { v232 = m_animationRandomizedStartValue.f32[0]; a1->m_animationStart = (float)((float)((float)rand() * 4.6566129e-10) * 0.5) + 0.2; a1->m_unk540 = v232; v193 = 1; if ( a1->m_shouldNotHideAnimFreeze ) goto LABEL_199; goto LABEL_198; } if ( !a1->m_shouldNotHideAnimFreeze ) { v193 = 0; LABEL_198: a1->m_isDisabled2 = v193; } } LABEL_199: if ( a1->m_animateOnTrigger && a1->m_animationTriggered && a1->m_maybeAnimationVariableXInt == m_frames ) { a1->m_animationTriggered = 0; *(_OWORD *)&a1->m_animationRandomizedStartValue = 0; a1->m_isDisabled2 = 1; ((void (__fastcall *)(EnhancedGameObject *, _QWORD, double, double, double, double, double))a1->setOpacity)( a1, 0, 0.0, *(double *)v13.i64, v14, v3, *(double *)m_animationRandomizedStartValue.i64); } return; } if ( m_objectID == 142 ) goto LABEL_91; goto LABEL_121; } if ( m_objectID <= 1590 ) { if ( m_objectID == 1329 ) { LABEL_91: v231 = m_frames; v92 = -m_objectID; if ( !a1->m_hasUniqueCoin ) v92 = m_objectID; v93 = GameManager::sharedState(); v94 = sub_10025D6F0(v93, v92, v24, *(double *)&a2); if ( v94 ) { v95 = (const char *)v94; v96 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v97 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v96, v95); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v97); } if ( !a1->m_colorSprite ) goto LABEL_190; v91 = GameManager::sharedState(); v90 = v92; LABEL_97: v98 = sub_10025D730(v91, v90, v24); m_frames = v231; if ( !v98 ) goto LABEL_191; LABEL_98: v79 = (const char *)v98; v81 = a1->m_colorSprite; LABEL_99: v99 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v100 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v99, v79); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v81->setDisplayFrame)(v81, v100); goto LABEL_191; } if ( m_objectID == 1516 || m_objectID == 1518 ) { v231 = m_frames; v82 = GameManager::sharedState(); v83 = sub_10025D6F0(v82, (unsigned int)a1->m_objectID, v24, *(double *)&a2); if ( v83 ) { v84 = (const char *)v83; v85 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 1); if ( v85 ) { v86 = v85; v87 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v88 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v87, v84); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v86 + 1144LL))(v86, v88); } } if ( !a1->m_colorSprite ) goto LABEL_190; v89 = GameManager::sharedState(); v90 = (unsigned int)a1->m_objectID; v91 = v89; goto LABEL_97; } LABEL_121: v118 = GameManager::sharedState(); v119 = sub_10025D6F0(v118, (unsigned int)a1->m_objectID, v24, *(double *)&a2); if ( v119 ) { v120 = (const char *)v119; v121 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v122 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v121, v120); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v122); } if ( !a1->m_colorSprite ) goto LABEL_191; v123 = GameManager::sharedState(); v98 = sub_10025D730(v123, (unsigned int)a1->m_objectID, v24); if ( !v98 ) goto LABEL_191; goto LABEL_98; } switch ( m_objectID ) { case 1591: case 1593: if ( m_objectID == 1593 ) { a1->m_unkAnimationInt = 1; LABEL_56: v41 = 0.13; v42 = 8; m_unkAnimationInt = 1; goto LABEL_57; } m_unkAnimationInt = a1->m_unkAnimationInt; if ( !m_unkAnimationInt ) { v230 = *(__m128 *)&a2; m_unkAnimationInt = 2; if ( (float)((float)rand() * 4.6566129e-10) <= 0.69999999 ) m_unkAnimationInt = 2 * ((float)((float)rand() * 4.6566129e-10) > 0.69999999) + 1; *(float *)&v117 = -v230.f32[0]; a1->m_unkAnimationInt = m_unkAnimationInt; a1->m_animationRandomizedStartValue = v117; a1->m_maybeAnimationVariableXInt = -1; m_animationRandomizedStartValue = 0; } switch ( m_unkAnimationInt ) { case 3: v41 = 0.12; v42 = 6; break; case 2: v41 = 0.12; v42 = 8; break; case 1: goto LABEL_56; default: v41 = 1.0; v42 = 1; break; } LABEL_57: v13 = m_animationRandomizedStartValue; v13.f32[0] = m_animationRandomizedStartValue.f32[0] / v41; *(_QWORD *)&v44 = _mm_round_ss((__m128)0LL, v13, 9).u64[0]; v45 = (int)*(float *)&v44 % v42 + 1; m_maybeAnimationVariableXInt = a1->m_maybeAnimationVariableXInt; if ( v45 == m_maybeAnimationVariableXInt ) goto LABEL_192; if ( m_maybeAnimationVariableXInt >= v42 && a1->m_objectID != 1593 ) { a1->m_unkAnimationInt = 0; return; } v232 = m_animationRandomizedStartValue.f32[0]; a1->m_maybeAnimationVariableXInt = v45; v47 = GameManager::sharedState(); v48 = 2059; if ( m_unkAnimationInt != 2 ) v48 = 2 * (unsigned int)(m_unkAnimationInt == 3) + 2058; v49 = sub_10025D6F0(v47, v48, v45, v44); if ( v49 ) { v50 = (const char *)v49; v51 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v52 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v51, v50); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v52); } if ( a1->m_colorSprite ) { v53 = a1->m_unkAnimationInt; v54 = GameManager::sharedState(); v55 = 2059; if ( v53 != 2 ) v55 = 2 * (unsigned int)(v53 == 3) + 2058; v56 = (const char *)sub_10025D730(v54, v55, v45); v57 = a1->m_colorSprite; v58 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v59 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v58, v56); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v57->setDisplayFrame)(v57, v59); if ( a1->m_colorSpriteLocked ) { v60 = ((__int64 (__fastcall *)(EnhancedGameObject *))a1->getContentSize)(a1); sub_10028CFC0(&v228, v60); v61 = a1->m_colorSprite; v13.i32[1] = 0; v13.f32[0] = 0.5 * v229; sub_10028CBE0(&v224, v228 * 0.5, 0.5 * v229); ((void (__fastcall *)(cocos2d::CCSprite *, float *))v61->setPosition)(v61, &v224); } } goto LABEL_191; case 1592: v101 = GameManager::sharedState(); v102 = sub_10025D6F0(v101, (unsigned int)a1->m_objectID, v24, *(double *)&a2); if ( v102 ) { v103 = (const char *)v102; v104 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v105 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v104, v103); ((void (__fastcall *)(EnhancedGameObject *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v105); } v106 = a1->m_colorSprite; if ( !v106 ) goto LABEL_191; v107 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, __int64))v106->getChildByTag)(v106, 1); if ( !v107 ) goto LABEL_191; v108 = v107; v231 = m_frames; v109 = 10 - v24; if ( (int)v24 < 2 ) v109 = v24; v110 = GameManager::sharedState(); v111 = sub_10025D730(v110, (unsigned int)a1->m_objectID, v109); if ( v111 ) { v112 = (const char *)v111; v113 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v114 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v113, v112); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v108 + 1144LL))(v108, v114); } goto LABEL_190; case 1614: sub_10028CF90(&v228); v115 = v24 - 1; v231 = m_frames; switch ( v115 ) { case 0u: v116 = "smallCoin_01_001.png"; goto LABEL_148; case 1u: v116 = "smallCoin_02_001.png"; goto LABEL_148; case 2u: v116 = "smallCoin_03_001.png"; goto LABEL_148; case 3u: v116 = "smallCoin_04_001.png"; LABEL_148: v230.i64[0] = (__int64)v116; v145 = 1; break; default: v145 = 0; v230.i64[0] = 0; break; } v146 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64, double))a1->getChildByTag)( a1, 1, *(double *)&a2); if ( !((v146 == 0) | (unsigned __int8)v145 ^ 1) ) { v147 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v148 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v147, (const char *)v230.i64[0]); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v146 + 1144LL))(v146, v148); v149 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v146 + 312LL))(v146); sub_10028CFF0(&v228, v149); } v150 = a1->m_colorSprite; if ( v150 ) { if ( v115 <= 3 ) { v151 = (char *)dword_1008182F4 + dword_1008182F4[v115]; v152 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v153 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v152, v151); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v150->setDisplayFrame)(v150, v153); v150 = a1->m_colorSprite; } v13.i32[1] = 0; v13.f32[0] = 0.5 * v229; sub_10028CBE0(&v224, v228 * 0.5, 0.5 * v229); ((void (__fastcall *)(cocos2d::CCSprite *, float *))v150->setPosition)(v150, &v224); } v154 = ((__int64 (__fastcall *)(EnhancedGameObject *, __int64))a1->getChildByTag)(a1, 2); m_frames = v231; if ( v154 ) { v155 = v154; if ( v115 <= 3 ) { v156 = (char *)dword_100818304 + dword_100818304[v115]; v157 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v158 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v157, v156); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v155 + 1144LL))(v155, v158); } v159 = ((__int64 (__fastcall *)(EnhancedGameObject *))a1->getContentSize)(a1); sub_10028CFC0(&v224, v159); v13.i32[1] = 0; v13.f32[0] = 0.5 * v225; sub_10028CBE0(v223, v224 * 0.5, 0.5 * v225); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v155 + 184LL))(v155, v223); } goto LABEL_191; default: goto LABEL_121; } } } }