// // GameObject::playDestroyObjectAnim from 0x1401aa4a0 to 0x1401ab7e4 (4932 bytes) // // 2 xrefs: // > GJBaseGameLayer::destroyObject @ 0x14021615a // > @ 0x1406cc1a4 // // 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 // // Hidden C++ exception states: #wind=2 void GameObject::playDestroyObjectAnim(GameObject *a1, GJBaseGameLayer *a2) { float v2; // xmm3_4 float v5; // xmm7_4 cocos2d::CCSprite *m_colorSprite; // rcx bool v7; // al int m_objectID; // ecx cocos2d::CCPoint v9; // rax int v10; // r8d cocos2d::tCCPositionType v11; // r9d CCLightFlash *v12; // r13 const struct cocos2d::CCSize *v13; // rax double v14; // xmm0_8 CCLightFlash *v15; // rdi cocos2d::CCSprite *v16; // rcx cocos2d::CCArray *m_lightStripArray; // rbx __int64 v18; // rax CCLightFlash *v19; // r12 cocos2d::CCNode *v20; // rax cocos2d::CCArray *v21; // rbx __int64 v22; // rax CCLightFlash_vtbl *v23; // rbx CCLightFlash_vtbl *v24; // rbx cocos2d::CCNode *m_pParent; // rcx CCLightFlash_vtbl *v26; // rbx const cocos2d::CCPoint *v27; // rax cocos2d::CCArray *v28; // rbx const cocos2d::ccColor3B *v29; // rax __int64 v30; // rax unsigned __int8 v31; // si __int64 v32; // rax unsigned __int8 v33; // r14 unsigned __int8 v34; // di struct cocos2d::CCTintTo *v35; // rax cocos2d::ccColor3B *v36; // r8 struct cocos2d::CCTintTo *v37; // rax CCLightFlash *v38; // rdi cocos2d::ccColor3B *v39; // r8 struct cocos2d::CCFadeTo *v40; // rax cocos2d::ccColor3B *v41; // r8 __int64 v42; // rcx int v43; // esi CCLightFlash *v44; // r15 const char *v45; // rbx CCLightFlash *v46; // r14 cocos2d::CCArray *v47; // rdi cocos2d::CCString *v48; // rax const char *CString; // rbx __int64 v50; // rcx cocos2d::CCSpriteFrameCache *v51; // rax struct cocos2d::CCSpriteFrame *v52; // rax cocos2d::CCString *v53; // rax const char *v54; // rbx __int64 v55; // rcx cocos2d::CCSpriteFrameCache *v56; // rax struct cocos2d::CCSpriteFrame *v57; // rax cocos2d::CCString *v58; // rax const char *v59; // rbx __int64 v60; // rcx cocos2d::CCSpriteFrameCache *v61; // rax struct cocos2d::CCSpriteFrame *v62; // rax cocos2d::CCString *v63; // rax const char *v64; // rbx __int64 v65; // rcx cocos2d::CCSpriteFrameCache *v66; // rax struct cocos2d::CCSpriteFrame *v67; // rax struct cocos2d::CCAnimation *v68; // rax struct cocos2d::CCAnimate *v69; // rbx struct cocos2d::CCRepeatForever *v70; // rdx cocos2d::ccColor3B *v71; // r8 struct cocos2d::CCDelayTime *v72; // rbx struct cocos2d::CCFadeTo *v73; // rax struct cocos2d::CCSequence *v74; // rax cocos2d::ccColor3B *v75; // r8 __int64 v76; // rcx const char *v77; // rbx CCLightFlash *v78; // r14 cocos2d::CCArray *v79; // rdi cocos2d::CCString *v80; // rax const char *v81; // rbx __int64 v82; // rcx cocos2d::CCSpriteFrameCache *v83; // rax struct cocos2d::CCSpriteFrame *v84; // rax cocos2d::CCString *v85; // rax const char *v86; // rbx __int64 v87; // rcx cocos2d::CCSpriteFrameCache *v88; // rax struct cocos2d::CCSpriteFrame *v89; // rax cocos2d::CCString *v90; // rax const char *v91; // rbx __int64 v92; // rcx cocos2d::CCSpriteFrameCache *v93; // rax struct cocos2d::CCSpriteFrame *v94; // rax cocos2d::CCString *v95; // rax const char *v96; // rbx __int64 v97; // rcx cocos2d::CCSpriteFrameCache *v98; // rax struct cocos2d::CCSpriteFrame *v99; // rax struct cocos2d::CCAnimation *v100; // rax struct cocos2d::CCAnimate *v101; // rbx struct cocos2d::CCRepeatForever *v102; // rdx cocos2d::ccColor3B *v103; // r8 CCLightFlash *v104; // rcx struct cocos2d::CCDelayTime *v105; // rbx struct cocos2d::CCFadeTo *v106; // rax __int64 v107; // rcx const char *v108; // rbx CCLightFlash *v109; // r14 cocos2d::CCArray *v110; // rdi cocos2d::CCString *v111; // rax const char *v112; // rbx __int64 v113; // rcx cocos2d::CCSpriteFrameCache *v114; // rax struct cocos2d::CCSpriteFrame *v115; // rax cocos2d::CCString *v116; // rax const char *v117; // rbx __int64 v118; // rcx cocos2d::CCSpriteFrameCache *v119; // rax struct cocos2d::CCSpriteFrame *v120; // rax cocos2d::CCString *v121; // rax const char *v122; // rbx __int64 v123; // rcx cocos2d::CCSpriteFrameCache *v124; // rax struct cocos2d::CCSpriteFrame *v125; // rax cocos2d::CCString *v126; // rax const char *v127; // rbx __int64 v128; // rcx cocos2d::CCSpriteFrameCache *v129; // rax struct cocos2d::CCSpriteFrame *v130; // rax struct cocos2d::CCAnimation *v131; // rax struct cocos2d::CCAnimate *v132; // rbx struct cocos2d::CCRepeatForever *v133; // rdx cocos2d::ccColor3B *v134; // r8 CCLightFlash *v135; // rcx struct cocos2d::CCDelayTime *v136; // rbx struct cocos2d::CCFadeTo *v137; // rax float v138; // xmm3_4 float v139; // xmm2_4 cocos2d::CCSprite *v140; // rdx GameObject *v141; // rcx GameObjectType m_objectType; // edi ObjectToolbox *v143; // rax _QWORD *v144; // rax size_t v145; // r8 __int64 v146; // rdx __int64 v147; // rcx __int64 v148; // r8 __int64 v149; // r9 __int128 v150; // xmm0 void **v151; // rsi unsigned __int64 v152; // rdi __int64 v153; // rbx void **v154; // rcx cocos2d::CCSprite *v155; // r12 cocos2d::CCNode *v156; // rdi cocos2d::CCSprite_vtbl *v157; // rbx cocos2d::CCSprite_vtbl *v158; // rbx int ParentMode; // eax int v160; // r10d cocos2d::CCNode *v161; // rax cocos2d::CCSprite_vtbl *v162; // rbx const cocos2d::CCPoint *v163; // rax cocos2d::CCRGBAProtocol_vtbl *v164; // rbx const cocos2d::ccColor3B *v165; // rax const char *v166; // rcx struct cocos2d::CCSprite *v167; // rax CCLightFlash *v168; // rsi __int64 v169; // r8 CCLightFlash_vtbl *v170; // rbx float *v171; // rax const cocos2d::CCPoint *v172; // rax cocos2d::CCArray *v173; // rbx const cocos2d::ccColor3B *v174; // rax cocos2d::CCArray *v175; // rbx GLubyte v176; // al struct cocos2d::CCDelayTime *v177; // rbx struct cocos2d::CCFadeTo *v178; // rax struct cocos2d::CCSequence *v179; // rax cocos2d::ccColor3B *v180; // r8 const cocos2d::CCPoint *v181; // rbx const cocos2d::CCPoint *v182; // rax float y; // xmm0_4 int x; // edx int v185; // r9d std::_Tree_val, std::pair>>>::_Nodeptr Myhead; // r8 std::_Tree_simple_types, std::pair>>::_Node *v187; // rax float v188; // xmm8_4 int v189; // eax float v190; // xmm7_4 float *v191; // rax float v192; // xmm6_4 __int64 v193; // rax void *v194; // rcx bool hasUniqueCoin; // r12 cocos2d::CCPoint v196; // rax int v197; // r8d cocos2d::tCCPositionType v198; // r9d cocos2d::CCParticleSystemQuad *v199; // rax cocos2d::CCParticleSystemQuad *v200; // rbx GLfloat a; // xmm0_4 GLfloat v202; // xmm1_4 CCCircleWave *v203; // rsi CCCircleWave_vtbl *v204; // rbx const cocos2d::CCPoint *v205; // rax CCCircleWave *v206; // rsi CCCircleWave_vtbl *v207; // rbx const cocos2d::CCPoint *v208; // rax const char *v209; // rcx const char *v210; // rax const char *v211; // r14 CCLightFlash *v212; // rsi CCLightFlash_vtbl *v213; // rbx cocos2d::CCNode *v214; // rcx CCLightFlash_vtbl *v215; // rbx const cocos2d::CCPoint *v216; // rax __int64 v217; // rcx cocos2d::CCArray *v218; // rdi const cocos2d::ccColor3B *v219; // rax cocos2d::CCArray *v220; // rdi cocos2d::CCString *v221; // rax const char *v222; // rbx __int64 v223; // rcx cocos2d::CCSpriteFrameCache *v224; // rax struct cocos2d::CCSpriteFrame *v225; // rax cocos2d::CCString *v226; // rax const char *v227; // rbx __int64 v228; // rcx cocos2d::CCSpriteFrameCache *v229; // rax struct cocos2d::CCSpriteFrame *v230; // rax cocos2d::CCString *v231; // rax const char *v232; // rbx __int64 v233; // rcx cocos2d::CCSpriteFrameCache *v234; // rax struct cocos2d::CCSpriteFrame *v235; // rax cocos2d::CCString *v236; // rax const char *v237; // rbx __int64 v238; // rcx cocos2d::CCSpriteFrameCache *v239; // rax struct cocos2d::CCSpriteFrame *v240; // rax struct cocos2d::CCAnimation *v241; // rax struct cocos2d::CCAnimate *v242; // rax struct cocos2d::CCRepeatForever *v243; // rax cocos2d::ccColor3B *v244; // r8 float v245; // [rsp+20h] [rbp-E0h] float v246; // [rsp+20h] [rbp-E0h] float v247; // [rsp+20h] [rbp-E0h] float v248; // [rsp+20h] [rbp-E0h] float v249; // [rsp+20h] [rbp-E0h] float v250; // [rsp+20h] [rbp-E0h] float v251; // [rsp+20h] [rbp-E0h] float v252; // [rsp+20h] [rbp-E0h] __int16 v253; // [rsp+70h] [rbp-90h] BYREF char v254; // [rsp+72h] [rbp-8Eh] const char *v255; // [rsp+78h] [rbp-88h] BYREF CCLightFlash *v256; // [rsp+80h] [rbp-80h] BYREF GameObject *v257; // [rsp+88h] [rbp-78h] BYREF __int16 v258; // [rsp+90h] [rbp-70h] cocos2d::CCSize v259; // [rsp+98h] [rbp-68h] BYREF cocos2d::CCPoint v260; // [rsp+A0h] [rbp-60h] BYREF __int128 v261; // [rsp+A8h] [rbp-58h] BYREF unsigned __int64 v262; // [rsp+B8h] [rbp-48h] __int64 v263; // [rsp+C0h] [rbp-40h] void *Src[2]; // [rsp+C8h] [rbp-38h] BYREF unsigned __int64 v265; // [rsp+D8h] [rbp-28h] unsigned __int64 v266; // [rsp+E0h] [rbp-20h] _QWORD v267[4]; // [rsp+E8h] [rbp-18h] BYREF if ( a2 ) { v257 = a1; v5 = (float)a1->getOpacity(&a1->cocos2d::CCRGBAProtocol); v7 = true; if ( v5 <= 0.0 ) { m_colorSprite = a1->m_colorSprite; if ( !m_colorSprite || !m_colorSprite->getOpacity(&m_colorSprite->cocos2d::CCRGBAProtocol) ) v7 = false; } m_objectID = a1->m_objectID; if ( m_objectID == 143 ) { a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v257); GJBaseGameLayer::spawnParticle(a2, "glassDestroy01.plist", v10, v11, v9); return; } if ( m_objectID == 1614 ) { if ( !a1->m_isInvisible && v7 ) { v12 = (CCLightFlash *)cocos2d::CCSprite::createWithSpriteFrameName("smallCoin_01_001.png"); (*(void (__fastcall **)(cocos2d::CCArray **, _QWORD))&v12->m_lightStripArray->m_unknown2)( &v12->m_lightStripArray, (unsigned __int8)(int)v5); v13 = v12->getContentSize(v12); v14 = cocos2d::CCSize::CCSize(&v259, v13); cocos2d::CCPoint::CCPoint(*(float *)&v14, v259.width * 0.5); v15 = (CCLightFlash *)cocos2d::CCSprite::createWithSpriteFrameName("smallCoin_01_color_001.png"); v256 = v15; v12->addChild_0(v12, v15, 1); (*(void (__fastcall **)(cocos2d::CCArray **, _QWORD))&v15->m_lightStripArray->m_unknown2)( &v15->m_lightStripArray, (unsigned __int8)(int)v5); v15->setPosition_0(v15, &v260); v16 = a1->m_colorSprite; if ( v16 ) { m_lightStripArray = v15->m_lightStripArray; v18 = (__int64)v16->getColor(&v16->cocos2d::CCRGBAProtocol); ((void (__fastcall *)(cocos2d::CCArray **, __int64))m_lightStripArray->__vftable)( &v15->m_lightStripArray, v18); } v19 = (CCLightFlash *)cocos2d::CCSprite::createWithSpriteFrameName("smallCoin_01_highlight_001.png"); Src[0] = v19; v12->addChild_0(v12, v19, 2); v19->setPosition_0(v19, &v260); (*(void (__fastcall **)(cocos2d::CCArray **, _QWORD))&v19->m_lightStripArray->m_unknown2)( &v19->m_lightStripArray, (unsigned __int8)(int)v5); v20 = a1->getChildByTag(a1, 2); if ( v20 ) { v21 = v19->m_lightStripArray; v22 = ((__int64 (__fastcall *)(cocos2d::CCNode *))v20[1].~CCNode)(&v20[1]); ((void (__fastcall *)(cocos2d::CCArray **, __int64))v21->__vftable)(&v19->m_lightStripArray, v22); } v23 = v12->__vftable; a1->getScaleX(a1); ((void (__fastcall *)(CCLightFlash *))v23->setScaleX)(v12); v24 = v12->__vftable; a1->getScaleY(a1); ((void (__fastcall *)(CCLightFlash *))v24->setScaleY)(v12); m_pParent = a1->m_pParent; if ( m_pParent ) ((void (__fastcall *)(cocos2d::CCNode *, CCLightFlash *))m_pParent->addChild_0)(m_pParent, v12); v26 = v12->__vftable; v27 = a1->getPosition_0(a1); v26->setPosition_0(v12, v27); v28 = v12->m_lightStripArray; v29 = a1->getColor(&a1->cocos2d::CCRGBAProtocol); ((void (__fastcall *)(cocos2d::CCArray **, const cocos2d::ccColor3B *))v28->__vftable)( &v12->m_lightStripArray, v29); v30 = (*(__int64 (__fastcall **)(cocos2d::CCArray **))&v12->m_lightStripArray->m_uID)(&v12->m_lightStripArray); v258 = *(_WORD *)v30; v31 = v258; LOBYTE(v28) = *(_BYTE *)(v30 + 2); v32 = (*(__int64 (__fastcall **)(cocos2d::CCArray **))&v15->m_lightStripArray->m_uID)(&v15->m_lightStripArray); LOWORD(v255) = *(_WORD *)v32; v33 = (unsigned __int8)v255; v34 = *(_BYTE *)(v32 + 2); v253 = -1; v254 = -56; ((void (__fastcall *)(cocos2d::CCArray **, __int16 *))v12->m_lightStripArray->__vftable)( &v12->m_lightStripArray, &v253); v253 = -1; v254 = -56; ((void (__fastcall *)(cocos2d::CCArray **, __int16 *))v256->m_lightStripArray->__vftable)( &v256->m_lightStripArray, &v253); (*(void (__fastcall **)(cocos2d::CCArray **, _QWORD))&v19->m_lightStripArray->m_unknown2)( &v19->m_lightStripArray, 0); v35 = cocos2d::CCTintTo::create(0.30000001, v31, HIBYTE(v258), (unsigned __int8)v28); cocos2d::CCNode::runAction(v12, (cocos2d::CCPoint)v35, v36, v2, v245); v37 = cocos2d::CCTintTo::create(0.30000001, v33, BYTE1(v255), v34); v38 = v256; cocos2d::CCNode::runAction(v256, (cocos2d::CCPoint)v37, v39, v2, v246); v40 = cocos2d::CCFadeTo::create(0.30000001, (int)v5); cocos2d::CCNode::runAction(v19, (cocos2d::CCPoint)v40, v41, v2, v247); v43 = 0; v44 = (CCLightFlash *)Src[0]; while ( 1 ) { v45 = nullptr; v255 = nullptr; v46 = nullptr; if ( v43 ) { if ( v43 == 1 ) { v45 = "color_"; v46 = v38; } else { if ( v43 != 2 ) goto LABEL_26; v45 = "highlight_"; v46 = v44; } } else { v45 = byte_140518980; v46 = v12; } v255 = v45; LABEL_26: v47 = (cocos2d::CCArray *)cocos2d::CCArray::create(v42); v48 = cocos2d::CCString::createWithFormat("smallCoin_01_%s001.png", v45); CString = cocos2d::CCString::getCString(v48); v51 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v50); v52 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v51, CString); cocos2d::CCArray::addObject(v47, v52); v53 = cocos2d::CCString::createWithFormat("smallCoin_02_%s001.png", v255); v54 = cocos2d::CCString::getCString(v53); v56 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v55); v57 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v56, v54); cocos2d::CCArray::addObject(v47, v57); v58 = cocos2d::CCString::createWithFormat("smallCoin_03_%s001.png", v255); v59 = cocos2d::CCString::getCString(v58); v61 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v60); v62 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v61, v59); cocos2d::CCArray::addObject(v47, v62); v63 = cocos2d::CCString::createWithFormat("smallCoin_04_%s001.png", v255); v64 = cocos2d::CCString::getCString(v63); v66 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v65); v67 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v66, v64); cocos2d::CCArray::addObject(v47, v67); v68 = cocos2d::CCAnimation::createWithSpriteFrames(v47, 0.050000001); v69 = cocos2d::CCAnimate::create(v68); v70 = cocos2d::CCRepeatForever::create(v69); if ( v43 ) { BYTE4(v69[1].__vftable) = 1; cocos2d::CCNode::runAction(v46, (cocos2d::CCPoint)v70, v71, v2, v248); v72 = cocos2d::CCDelayTime::create(0.30000001); v73 = cocos2d::CCFadeTo::create(0.30000001, 0); v74 = cocos2d::CCSequence::create(v72, v73, 0); cocos2d::CCNode::runAction(v46, (cocos2d::CCPoint)v74, v75, v2, v249); if ( v43 == -1 ) { v77 = byte_140518980; v78 = v12; } else { v77 = nullptr; v255 = nullptr; v78 = nullptr; if ( v43 != 1 ) goto LABEL_33; v77 = "highlight_"; v78 = v44; } } else { BYTE5(v69[1].__vftable) = 1; cocos2d::CCNode::runAction(v46, (cocos2d::CCPoint)v70, v71, v2, v248); v77 = "color_"; v78 = v256; } v255 = v77; LABEL_33: v79 = (cocos2d::CCArray *)cocos2d::CCArray::create(v76); v80 = cocos2d::CCString::createWithFormat("smallCoin_01_%s001.png", v77); v81 = cocos2d::CCString::getCString(v80); v83 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v82); v84 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v83, v81); cocos2d::CCArray::addObject(v79, v84); v85 = cocos2d::CCString::createWithFormat("smallCoin_02_%s001.png", v255); v86 = cocos2d::CCString::getCString(v85); v88 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v87); v89 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v88, v86); cocos2d::CCArray::addObject(v79, v89); v90 = cocos2d::CCString::createWithFormat("smallCoin_03_%s001.png", v255); v91 = cocos2d::CCString::getCString(v90); v93 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v92); v94 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v93, v91); cocos2d::CCArray::addObject(v79, v94); v95 = cocos2d::CCString::createWithFormat("smallCoin_04_%s001.png", v255); v96 = cocos2d::CCString::getCString(v95); v98 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v97); v99 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v98, v96); cocos2d::CCArray::addObject(v79, v99); v100 = cocos2d::CCAnimation::createWithSpriteFrames(v79, 0.050000001); v101 = cocos2d::CCAnimate::create(v100); v102 = cocos2d::CCRepeatForever::create(v101); v104 = v78; if ( v43 == -1 ) { BYTE5(v101[1].__vftable) = 1; } else { BYTE4(v101[1].__vftable) = 1; cocos2d::CCNode::runAction(v78, (cocos2d::CCPoint)v102, v103, v2, v250); v105 = cocos2d::CCDelayTime::create(0.30000001); v106 = cocos2d::CCFadeTo::create(0.30000001, 0); v102 = (struct cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v105, v106, 0); v104 = v78; } cocos2d::CCNode::runAction(v104, (cocos2d::CCPoint)v102, v103, v2, v250); v108 = nullptr; v255 = nullptr; v109 = nullptr; switch ( v43 ) { case -2: v108 = byte_140518980; v109 = v12; LABEL_42: v255 = v108; break; case -1: v108 = "color_"; v109 = v256; goto LABEL_42; case 0: v108 = "highlight_"; v109 = v44; goto LABEL_42; } v110 = (cocos2d::CCArray *)cocos2d::CCArray::create(v107); v111 = cocos2d::CCString::createWithFormat("smallCoin_01_%s001.png", v108); v112 = cocos2d::CCString::getCString(v111); v114 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v113); v115 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v114, v112); cocos2d::CCArray::addObject(v110, v115); v116 = cocos2d::CCString::createWithFormat("smallCoin_02_%s001.png", v255); v117 = cocos2d::CCString::getCString(v116); v119 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v118); v120 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v119, v117); cocos2d::CCArray::addObject(v110, v120); v121 = cocos2d::CCString::createWithFormat("smallCoin_03_%s001.png", v255); v122 = cocos2d::CCString::getCString(v121); v124 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v123); v125 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v124, v122); cocos2d::CCArray::addObject(v110, v125); v126 = cocos2d::CCString::createWithFormat("smallCoin_04_%s001.png", v255); v127 = cocos2d::CCString::getCString(v126); v129 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v128); v130 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v129, v127); cocos2d::CCArray::addObject(v110, v130); v131 = cocos2d::CCAnimation::createWithSpriteFrames(v110, 0.050000001); v132 = cocos2d::CCAnimate::create(v131); v133 = cocos2d::CCRepeatForever::create(v132); v135 = v109; if ( v43 == -2 ) { BYTE5(v132[1].__vftable) = 1; } else { BYTE4(v132[1].__vftable) = 1; cocos2d::CCNode::runAction(v109, (cocos2d::CCPoint)v133, v134, v2, v251); v136 = cocos2d::CCDelayTime::create(0.30000001); v137 = cocos2d::CCFadeTo::create(0.30000001, 0); v133 = (struct cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v136, v137, 0); v135 = v109; } cocos2d::CCNode::runAction(v135, (cocos2d::CCPoint)v133, v134, v2, v251); v43 += 3; v38 = v256; if ( v43 >= 3 ) { v138 = 0.80000001; v139 = 0.60000002; v140 = (cocos2d::CCSprite *)v12; v141 = v257; goto LABEL_112; } } } } else { m_objectType = a1->m_objectType; if ( m_objectType == SecretCoin || m_objectType == (Collectible|0x1) ) { hasUniqueCoin = GJBaseGameLayer::hasUniqueCoin(a2, (EffectGameObject *)a1); a1->getPosition_0(a1); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v257); v199 = GJBaseGameLayer::spawnParticle(a2, "coinPickupEffect.plist", v197, v198, v196); v200 = v199; if ( m_objectType == (Collectible|0x1) && v199 ) { a = v199->getStartColor(v199)->a; Src[0] = (void *)0x3F8000003F800000LL; LODWORD(Src[1]) = 1065353216; *((GLfloat *)&Src[1] + 1) = a; v200->setStartColor(v200, (const cocos2d::ccColor4F *)Src); v202 = v200->getEndColor(v200)->a; Src[0] = (void *)0x3F0000003F000000LL; LODWORD(Src[1]) = 1056964608; *((GLfloat *)&Src[1] + 1) = v202; v200->setEndColor(v200, (const cocos2d::ccColor4F *)Src); v203 = CCCircleWave::create(25.0, 5.0, 0.30000001, 0, 0); v253 = -14136; v254 = -56; } else { v203 = CCCircleWave::create(25.0, 5.0, 0.30000001, 0, 0); if ( m_objectType == (Collectible|0x1) ) { v253 = -14136; v254 = -56; } else { v253 = -14081; v254 = 0; } } *(_WORD *)&v203->m_color.r = v253; v203->m_color.b = v254; v204 = v203->__vftable; v205 = a1->getPosition_0(a1); v204->setPosition_0(v203, v205); a2->m_objectLayer->addChild_0(a2->m_objectLayer, v203, 0); v206 = CCCircleWave::create(5.0, 60.0, 0.30000001, 0, 1); v253 = -1; if ( m_objectType == (Collectible|0x1) ) v254 = -1; else v254 = 0; *(_WORD *)&v206->m_color.r = v253; v206->m_color.b = v254; v207 = v206->__vftable; v208 = a1->getPosition_0(a1); v207->setPosition_0(v206, v208); a2->m_objectLayer->addChild_0(a2->m_objectLayer, v206, 0); v206->m_circleMode = Outline; v206->m_lineWidth = 4; if ( a1->m_objectType == (Collectible|0x1) ) { v209 = "secretCoin_2_01_001.png"; v211 = "secretCoin_2_b"; v210 = "secretCoin_2"; } else { v209 = "secretCoin_01_001.png"; v210 = "secretCoin"; v211 = "secretCoin_b"; } if ( !hasUniqueCoin ) v211 = v210; v212 = (CCLightFlash *)cocos2d::CCSprite::createWithSpriteFrameName(v209); v213 = v212->__vftable; a1->getScaleX(a1); ((void (__fastcall *)(CCLightFlash *))v213->setScale_0)(v212); v214 = a1->m_pParent; if ( v214 ) ((void (__fastcall *)(cocos2d::CCNode *, CCLightFlash *))v214->addChild_0)(v214, v212); v215 = v212->__vftable; v216 = a1->getPosition_0(a1); v215->setPosition_0(v212, v216); if ( m_objectType == (Collectible|0x1) ) { v218 = v212->m_lightStripArray; v219 = a1->getColor(&a1->cocos2d::CCRGBAProtocol); ((void (__fastcall *)(cocos2d::CCArray **, const cocos2d::ccColor3B *))v218->__vftable)( &v212->m_lightStripArray, v219); } v220 = (cocos2d::CCArray *)cocos2d::CCArray::create(v217); v221 = cocos2d::CCString::createWithFormat("%s_01_001.png", v211); v222 = cocos2d::CCString::getCString(v221); v224 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v223); v225 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v224, v222); cocos2d::CCArray::addObject(v220, v225); v226 = cocos2d::CCString::createWithFormat("%s_01_002.png", v211); v227 = cocos2d::CCString::getCString(v226); v229 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v228); v230 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v229, v227); cocos2d::CCArray::addObject(v220, v230); v231 = cocos2d::CCString::createWithFormat("%s_01_003.png", v211); v232 = cocos2d::CCString::getCString(v231); v234 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v233); v235 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v234, v232); cocos2d::CCArray::addObject(v220, v235); v236 = cocos2d::CCString::createWithFormat("%s_01_004.png", v211); v237 = cocos2d::CCString::getCString(v236); v239 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v238); v240 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v239, v237); cocos2d::CCArray::addObject(v220, v240); v241 = cocos2d::CCAnimation::createWithSpriteFrames(v220, 0.050000001); v242 = cocos2d::CCAnimate::create(v241); v243 = cocos2d::CCRepeatForever::create(v242); cocos2d::CCNode::runAction(v212, (cocos2d::CCPoint)v243, v244, v2, v252); v138 = 1.0; v139 = 1.0; v140 = (cocos2d::CCSprite *)v212; v141 = a1; LABEL_112: GameObject::playPickupAnimation_1(v141, v140, v139, v138, 0.0, 0.0); } else if ( m_objectType == Collectible && !a1->m_isInvisible && v7 ) { LODWORD(v255) = a1->m_objectID; v143 = ObjectToolbox::sharedState(); v144 = (_QWORD *)sub_1401D0660(&v143->m_allKeys, &v255); if ( v144[3] > 0xFu ) v144 = (_QWORD *)*v144; *(_OWORD *)Src = 0; v265 = 0; v266 = 0; v145 = -1; do ++v145; while ( *((_BYTE *)v144 + v145) ); sub_14003A930(Src, v144, v145); LODWORD(v150) = 0; v261 = 0; v262 = 0; v263 = 0; v151 = Src; if ( v266 > 0xF ) v151 = (void **)Src[0]; v152 = v265; v153 = 0x7FFFFFFFFFFFFFFFLL; if ( v265 > 0x7FFFFFFFFFFFFFFFLL ) sub_140007B50(v147, v146, v148, v149); v263 = 15; if ( v265 > 0xF ) { if ( (v265 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL ) { v153 = v265 | 0xF; if ( (v265 | 0xF) < 0x16 ) v153 = 22; } *(_QWORD *)&v261 = sub_14003AA10(v153 + 1); v262 = v152; v263 = v153; memcpy((void *)v261, v151, v152 + 1); } else { v262 = v265; v150 = *(_OWORD *)v151; v261 = *(_OWORD *)v151; } GameObject::getColorFrame(v147, v267, &v261); v154 = Src; if ( v266 > 0xF ) v154 = (void **)Src[0]; v155 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v154); v155->setOpacity(&v155->cocos2d::CCRGBAProtocol, (int)v5); v156 = a1->getChildByTag(a1, 1); if ( v156 ) { v157 = v155->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->getScaleX(a1); v156->getScaleX(v156); ((void (__fastcall *)(cocos2d::CCSprite *))v157->setScaleX)(v155); v158 = v155->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->getScaleY(a1); *(double *)&v150 = ((double (__fastcall *)(cocos2d::CCNode *))v156->getScaleY)(v156); ((void (__fastcall *)(cocos2d::CCSprite *))v158->setScaleY)(v155); } ParentMode = GameObject::getParentMode(a1); v161 = GameObject::parentForZLayer(a1, v160, a1->m_shouldBlendBase, ParentMode); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *))v161->addChild_0)(v161, v155); v162 = v155->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v163 = a1->getPosition_0(a1); v162->setPosition_0(v155, v163); v164 = v155->cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable; v165 = a1->getColor(&a1->cocos2d::CCRGBAProtocol); v164->setColor(&v155->cocos2d::CCRGBAProtocol, v165); if ( a1->m_colorSprite ) { v166 = (const char *)v267; if ( v267[3] > 0xFu ) v166 = (const char *)v267[0]; v167 = cocos2d::CCSprite::createWithSpriteFrameName(v166); v168 = (CCLightFlash *)v167; v169 = -1; if ( a1->m_colorZLayerRelated ) v169 = 1; v155->addChild_0(v155, v167, v169); v170 = v168->__vftable; v155->getContentSize(v155); v171 = (float *)v155->getContentSize(v155); cocos2d::CCPoint::CCPoint(*(float *)&v150, *v171 * 0.5); v170->setPosition_0(v168, v172); v173 = v168->m_lightStripArray; v174 = a1->m_colorSprite->getColor(&a1->m_colorSprite->cocos2d::CCRGBAProtocol); ((void (__fastcall *)(cocos2d::CCArray **, const cocos2d::ccColor3B *))v173->__vftable)( &v168->m_lightStripArray, v174); v175 = v168->m_lightStripArray; v176 = a1->m_colorSprite->getOpacity(&a1->m_colorSprite->cocos2d::CCRGBAProtocol); (*(void (__fastcall **)(cocos2d::CCArray **, _QWORD))&v175->m_unknown2)(&v168->m_lightStripArray, v176); v177 = cocos2d::CCDelayTime::create(0.44999999); v178 = cocos2d::CCFadeTo::create(0.15000001, 0); v179 = cocos2d::CCSequence::create(v177, v178, 0); cocos2d::CCNode::runAction(v168, (cocos2d::CCPoint)v179, v180, v2, v245); } v181 = a1->getPosition_0(a1); v182 = a1->getPosition_0(a1); y = v181->y; x = (int)v182->x; LODWORD(v256) = x; v185 = (int)y; HIDWORD(v256) = (int)y; Myhead = a2->m_destroyObjectValues._Mypair._Myval2._Myval2._Myhead; v187 = *((std::_Tree_simple_types, std::pair>>::_Node **)Myhead + 1); while ( !*((_BYTE *)v187 + 25) ) { if ( *((_DWORD *)v187 + 7) < x || *((_DWORD *)v187 + 7) <= x && *((_DWORD *)v187 + 8) < v185 ) { v187 = *((std::_Tree_simple_types, std::pair>>::_Node **)v187 + 2); } else { Myhead = v187; v187 = *(std::_Tree_simple_types, std::pair>>::_Node **)v187; } } if ( *((_BYTE *)Myhead + 25) || x < *((_DWORD *)Myhead + 7) || x <= *((_DWORD *)Myhead + 7) && v185 < *((_DWORD *)Myhead + 8) ) { v188 = (float)rand() / 32767.0; v189 = rand(); v190 = (float)((float)((float)v189 / 32767.0) + (float)((float)v189 / 32767.0)) - 1.0; v191 = (float *)sub_140249850(&a2->m_destroyObjectValues, &v256); *v191 = v190; v191[1] = v188; } v192 = *(float *)sub_140249850(&a2->m_destroyObjectValues, &v256); v193 = sub_140249850(&a2->m_destroyObjectValues, &v256); GameObject::playPickupAnimation( a1, v155, 20.0, 30.0, 65.0, 115.0, 10.0, 0.60000002, 0.44999999, 0.15000001, 1, v192, *(float *)(v193 + 4)); sub_14003A830((__int64)v267); if ( v266 > 0xF ) { v194 = Src[0]; if ( v266 + 1 >= 0x1000 ) { v194 = *((void **)Src[0] - 1); if ( (unsigned __int64)((char *)Src[0] - (char *)v194 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v194); } } } } }