// // LevelEditorLayer::activateTriggerEffect from 0x1000ef370 to 0x1000ef95c (1516 bytes) // // 5 xrefs: // > LevelEditorLayer::updateGameObjects @ 0x1000de551 // > LevelEditorLayer::updateGameObjects @ 0x1000de65a // > LevelEditorLayer::spawnGroupPreview @ 0x1000ef104 // > LevelEditorLayer::spawnGroupPreview @ 0x1000ef194 // > LevelEditorLayer::spawnGroupPreview @ 0x1000ef2e8 // // 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! bool __fastcall LevelEditorLayer::activateTriggerEffect( LevelEditorLayer *a1, EffectGameObject *a2, float a3, float a4, float a5, bool a6) { bool v6; // bl __m128 v8; // xmm5 EffectGameObject_vtbl *v9; // rax _BOOL4 v10; // r12d char v11; // al __int64 v12; // xmm0_8 double v13; // xmm3_8 int v14; // xmm0_4^4 double v15; // xmm4_8 __m128 v16; // xmm2 int m_targetColor; // edx int m_objectID; // eax ShaderLayer *m_shaderLayer; // rax OpacityEffectAction *OpacityActionForGroup; // rax float m_durationRelated; // xmm1_4 float v22; // xmm0_4 OpacityEffectAction *v23; // r14 OpacityEffectAction *v24; // rax float m_fScaleX; // xmm4_4 float v26; // xmm3_4 DelayedSpawnNode *DelayedSpawnNode; // rax float m_fadeInDuration; // xmm0_4 float m_holdDuration; // xmm1_4 float m_fadeOutDuration; // xmm2_4 int m_targetGroupID; // r15d EffectGameObject_vtbl *v32; // rax bool v33; // r13 float v34; // xmm0_4 _BYTE v35[4]; // [rsp+8h] [rbp-58h] BYREF float v36; // [rsp+Ch] [rbp-54h] __int128 v37; // [rsp+10h] [rbp-50h] __m128 v38; // [rsp+20h] [rbp-40h] float v39; // [rsp+34h] [rbp-2Ch] v6 = 1; if ( !a2->m_isGroupDisabled ) { v8 = *(__m128 *)&a4; if ( !a2->m_isTouchTriggered ) goto LABEL_5; v9 = a2->EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v10 = a6; v38 = *(__m128 *)&a4; v37 = *(_OWORD *)&a5; v39 = a3; v11 = ((__int64 (__fastcall *)(EffectGameObject *))v9->hasBeenActivated)(a2); v12 = LODWORD(a3); v8 = *(__m128 *)&a4; *(_QWORD *)&a6 = v10; if ( v11 ) { LABEL_5: *(_QWORD *)&v13 = LODWORD(a2->m_spawnTriggerDelay); HIDWORD(v15) = v14; *(float *)&v15 = (float)(a3 - *(float *)&v13) - a5; if ( a2->m_isColorTrigger ) { if ( a1->m_previewMode ) { v8.f32[0] = v8.f32[0] - (float)(a2->m_duration + *(float *)&v13); v16.f32[0] = a5 - (float)(a3 - *(float *)&v13); m_targetColor = a2->m_targetColor; *(float *)&v37 = a2->m_spawnTriggerDelay; v38.i32[0] = LODWORD(v15); if ( LevelEditorLayer::runColorEffect( a1, a2, m_targetColor, *(float *)&v13, *(float *)&v15, _mm_cvtsi128_si32((__m128i)_mm_and_ps( _mm_cmpnlt_ps((__m128)0x40A00000u, v8), _mm_cmpnle_ps(v16, (__m128)0x3E4CCCCDu))) & 1) ) { if ( a2->m_objectID == 29 && a2->m_tintGround ) LevelEditorLayer::runColorEffect(a1, a2, 1001, *(float *)&v37, v38.f32[0], 0); } else { return 0; } } } else { m_objectID = a2->m_objectID; if ( m_objectID <= 1933 ) { if ( m_objectID <= 1048 ) { if ( m_objectID == 1006 ) { if ( a1->m_previewMode ) { m_fadeInDuration = a2->m_fadeInDuration; m_holdDuration = a2->m_holdDuration; m_fadeOutDuration = a2->m_fadeOutDuration; if ( (float)((float)((float)(*(float *)&v13 + m_fadeInDuration) + m_holdDuration) + m_fadeOutDuration) >= v8.f32[0] ) GJEffectManager::runPulseEffect( a1->m_effectManager, a2->m_targetGroupID, a2->m_pulseTargetType == 1, m_fadeInDuration, m_holdDuration, m_fadeOutDuration, (PulseEffectType)((a2->m_pulseMode == 0) + 1), (cocos2d::ccColor3B)(*(unsigned __int16 *)&a2->m_triggerTargetColor.r | (a2->m_triggerTargetColor.b << 16)), a2->m_hsvValue, a2->m_copyColorID, a2->m_pulseMainOnly, a2->m_pulseDetailOnly, a2->m_pulseExclusive, a2->m_legacyHSV, a2->m_uniqueID, a2->m_controlID)->m_startTime = *(float *)&v15; } } else if ( m_objectID == 1007 && a1->m_previewMode ) { v38.f32[0] = (float)(a3 - *(float *)&v13) - a5; LODWORD(v37) = LODWORD(v13); OpacityActionForGroup = GJEffectManager::getOpacityActionForGroup( a1->m_effectManager, a2->m_targetGroupID); if ( OpacityActionForGroup ) { m_durationRelated = OpacityActionForGroup->m_durationRelated; if ( m_durationRelated != 0.0 ) { v22 = *(float *)&v37 - m_durationRelated; if ( (float)(*(float *)&v37 - m_durationRelated) != 0.0 ) { OpacityActionForGroup->m_deltaTimeRelated = 0.0; OpacityActionForGroup->m_deltaTime = 0.0; v23 = OpacityActionForGroup; OpacityEffectAction::step(OpacityActionForGroup, v22); GJEffectManager::updateOpacityAction(a1->m_effectManager, v23); } } } v24 = GJEffectManager::runOpacityActionOnGroup( a1->m_effectManager, a2->m_targetGroupID, a2->m_duration, a2->m_opacity, a2->m_uniqueID, a2->m_controlID); LODWORD(v24->m_durationRelated) = v37; LODWORD(v24->m_deltaTimeRelated) = v38.i32[0]; } } else if ( m_objectID == 1049 ) { LevelEditorLayer::toggleGroupPreview(a1, a2->m_targetGroupID, a2->m_activateGroup); } else if ( m_objectID == 1268 ) { if ( !a2->m_previewDisable ) { m_fScaleX = a2[1].m_fScaleX; if ( m_fScaleX <= 0.0 ) { m_targetGroupID = a2->m_targetGroupID; v32 = a2->EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v33 = a6; v38 = v8; v37 = *(_OWORD *)&a5; v39 = a3; v34 = ((float (__fastcall *)(EffectGameObject *))v32->spawnXPosition)(a2); LevelEditorLayer::spawnGroupPreview( a1, m_targetGroupID, v34, a2->m_spawnTriggerDelay, v39, v38.f32[0], a5, a2->m_spawnOrdered, v33); } else { v26 = *(float *)&v13 + m_fScaleX; if ( v8.f32[0] >= v26 ) { *(float *)&v37 = v26; DelayedSpawnNode = LevelEditorLayer::getDelayedSpawnNode(a1); DelayedSpawnNode->m_gameObject = a2; LODWORD(DelayedSpawnNode->m_spawnDelay) = v37; if ( (std::__vector_base::pointer)((char *)a1->m_delayedSpawnNodes.__end_ - (char *)a1->m_delayedSpawnNodes.__begin_) >= (std::__vector_base::pointer)9 ) a1->m_sortSpawnNodes = 1; } } } } else if ( m_objectID == 1616 && !a2[1].m_uAutoReleaseCount ) { LevelEditorLayer::stopTriggersInGroup(a1, a2->m_targetGroupID, *(float *)&v13); } } else { switch ( m_objectID ) { case 2900: if ( LOBYTE(a2[1].m_nTag) == 1 ) a1->m_gameState.m_currentChannel = a2[1].m_uReference; break; case 2901: case 2902: case 2906: case 2908: case 2918: case 2925: case 2926: case 2927: case 2928: case 2929: case 2930: case 2931: case 2932: case 2933: case 2934: case 2935: case 2936: case 2937: case 2938: case 2939: case 2940: case 2941: case 2942: case 2943: case 2944: case 2945: case 2946: case 2947: case 2948: case 2949: case 2950: case 2951: case 2952: case 2953: case 2954: case 2955: case 2956: case 2957: case 2958: case 2959: case 2960: case 2961: case 2962: case 2963: case 2964: case 2965: case 2966: case 2967: case 2968: case 2969: case 2970: case 2971: case 2972: case 2973: case 2974: case 2975: case 2976: case 2977: case 2978: case 2979: case 2980: case 2981: case 2982: case 2983: case 2984: case 2985: case 2986: case 2987: case 2988: case 2989: case 2990: case 2991: case 2992: case 2993: case 2994: case 2995: case 2996: case 2997: case 2998: return v6; case 2903: GJBaseGameLayer::triggerGradientCommand(a1, (GradientTriggerObject *)a2); break; case 2904: case 2905: case 2907: case 2909: case 2910: case 2911: case 2912: case 2913: case 2914: case 2915: case 2916: case 2917: case 2919: case 2920: case 2921: case 2922: case 2923: case 2924: if ( a1->m_previewShaders && !BYTE2(a2[1].m_fScaleY) ) { m_shaderLayer = a1->m_shaderLayer; if ( m_shaderLayer && m_shaderLayer->m_timesyncShaderActions ) m_shaderLayer->m_state.m_time = *(float *)&v13 + m_shaderLayer->m_state.m_startTime; GJBaseGameLayer::triggerShaderCommand(a1, (ShaderGameObject *)a2); } break; case 2999: sub_10028CC60(v35); GJBaseGameLayer::updateMGOffsetY(a1, v36, 0.0, 0, 0.0, -1, -1); break; default: switch ( m_objectID ) { case 3602: if ( !a6 ) goto LABEL_59; GJBaseGameLayer::activateSFXTrigger(a1, (SFXTriggerGameObject *)a2); break; case 3603: if ( !a6 ) goto LABEL_59; GJBaseGameLayer::activateSFXEditTrigger(a1, (SFXTriggerGameObject *)a2); break; case 3604: case 3607: case 3608: case 3609: case 3610: case 3611: return v6; case 3605: if ( !a6 ) goto LABEL_59; GJBaseGameLayer::activateSongEditTrigger(a1, (SongTriggerGameObject *)a2); break; case 3606: GJBaseGameLayer::updateBGArtSpeed(a1, a2->m_moveModX, a2->m_moveModY); break; case 3612: GJBaseGameLayer::updateMGArtSpeed(a1, a2->m_moveModX, a2->m_moveModY); break; default: if ( m_objectID == 1934 ) { if ( a6 ) { GJBaseGameLayer::activateSongTrigger(a1, (SongTriggerGameObject *)a2); } else { LABEL_59: if ( a1->m_playbackActive && a1->m_activateAudioTriggers ) ((void (__fastcall *)(LevelEditorLayer *, EffectGameObject *, bool, _QWORD, double, double, double, double, double, double))a1->activatedAudioTrigger)( a1, a2, a6, (unsigned int)(m_objectID - 3602), *(double *)&a3, *(double *)&a4, *(double *)&a5, v13, v15, *(double *)v8.i64); } } break; } break; } } } } } return v6; }
GD Web Decomp Icon

GD Web Decomp

Raw Source