// // LevelEditorLayer::activateTriggerEffect from 0x36db50 to 0x36e024 (1236 bytes) // // 4 xrefs: // > LevelEditorLayer::spawnGroupPreview @ 0x36e1ec // > LevelEditorLayer::spawnGroupPreview @ 0x36e288 // > LevelEditorLayer::updateGameObjects @ 0x375faa // > LevelEditorLayer::updateGameObjects @ 0x376184 // // 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 // bool LevelEditorLayer::activateTriggerEffect( LevelEditorLayer *a1, EffectGameObject *a2, float a3, float a4, float a5, bool a6) { bool m_isGroupDisabled; // r6 PulseEffectType v11; // r7 _BOOL4 m_isColorTrigger; // r10 float m_spawnTriggerDelay; // s16 float v14; // s19 bool m_previewMode; // r7 bool v17; // r3 int m_objectID; // r2 float m_fadeInDuration; // s15 float m_holdDuration; // s13 float m_fadeOutDuration; // s14 float s; // r1 cocos2d::CCPoint v23; // r2 GJEffectManager *m_effectManager; // r9 int v25; // r12 int m_pulseTargetType; // lr OpacityEffectAction *OpacityActionForGroup; // r0 OpacityEffectAction *v28; // r7 float m_durationRelated; // s15 float v30; // s15 OpacityEffectAction *v31; // r0 int m_uUnknown; // s15 int m_targetGroupID; // r6 float v34; // r0 float v35; // s16 ShaderLayer *m_shaderLayer; // r3 cocos2d::ccHSVValue v37; // [sp+10h] [bp-48h] cocos2d::CCPoint v40[2]; // [sp+44h] [bp-14h] BYREF cocos2d::ccColor3B v41; // 0:^40.3 m_isGroupDisabled = a2->m_isGroupDisabled; v11 = a6; if ( m_isGroupDisabled || a2->m_isTouchTriggered && !((int (__fastcall *)(EffectGameObject *))a2->hasBeenActivated)(a2) ) { return 1; } m_isColorTrigger = a2->m_isColorTrigger; m_spawnTriggerDelay = a2->m_spawnTriggerDelay; v14 = (float)(a3 - m_spawnTriggerDelay) - a5; if ( a2->m_isColorTrigger ) { m_previewMode = a1->m_previewMode; if ( !m_previewMode ) return 1; v17 = (float)(a4 - (float)(m_spawnTriggerDelay + a2->m_duration)) <= 5.0 && (float)(a5 - (float)(a3 - m_spawnTriggerDelay)) > 0.2; if ( LevelEditorLayer::runColorEffect(a1, a2, a2->m_targetColor, m_spawnTriggerDelay, v14, v17) ) { if ( a2->m_objectID == 29 && a2->m_tintGround ) { m_isGroupDisabled = m_previewMode; LevelEditorLayer::runColorEffect(a1, a2, 1001, m_spawnTriggerDelay, v14, 0); return m_isGroupDisabled; } return 1; } return m_isGroupDisabled; } m_objectID = a2->m_objectID; if ( m_objectID == 2907 ) goto LABEL_84; if ( m_objectID > 2907 ) { if ( m_objectID == 2999 ) { cocos2d::CCPoint::CCPoint(v40, &a2->m_moveOffset); GJBaseGameLayer::updateMGOffsetY(a1, v40[0].y, 0.0, m_isColorTrigger, 0.0, -1, -1); return 1; } if ( m_objectID > 2999 ) { if ( m_objectID == 3605 ) { if ( a6 ) { GJBaseGameLayer::activateSongEditTrigger(a1, (SongTriggerGameObject *)a2); return 1; } } else { if ( m_objectID > 3605 ) { if ( m_objectID == 3606 ) { GJBaseGameLayer::updateBGArtSpeed(a1, a2->m_moveModX, a2->m_moveModY); } else if ( m_objectID == 3612 ) { GJBaseGameLayer::updateMGArtSpeed(a1, a2->m_moveModX, a2->m_moveModY); } return 1; } if ( m_objectID == 3602 ) { if ( a6 ) { GJBaseGameLayer::activateSFXTrigger(a1, (SFXTriggerGameObject *)a2); return 1; } } else { if ( m_objectID != 3603 ) return 1; if ( a6 ) { GJBaseGameLayer::activateSFXEditTrigger(a1, (SFXTriggerGameObject *)a2); return 1; } } } goto LABEL_69; } if ( m_objectID < 2909 || m_objectID > 2917 && (unsigned int)(m_objectID - 2919) > 5 ) return 1; LABEL_84: m_isGroupDisabled = a1->m_previewShaders; if ( !m_isGroupDisabled || BYTE2(a2[1].m_fVertexZ) ) return 1; m_shaderLayer = a1->m_shaderLayer; if ( m_shaderLayer && m_shaderLayer->m_timesyncShaderActions ) m_shaderLayer->m_state.m_time = m_shaderLayer->m_state.m_startTime + m_spawnTriggerDelay; GJBaseGameLayer::triggerShaderCommand(a1, (ShaderGameObject *)a2); return m_isGroupDisabled; } if ( m_objectID == 1616 ) { if ( !a2[1].EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable ) LevelEditorLayer::stopTriggersInGroup(a1, a2->m_targetGroupID, a2->m_spawnTriggerDelay); return 1; } if ( m_objectID > 1616 ) { if ( m_objectID == 2903 ) { GJBaseGameLayer::triggerGradientCommand(a1, (GradientTriggerObject *)a2); return 1; } if ( m_objectID <= 2903 ) { if ( m_objectID != 1934 ) { if ( m_objectID == 2900 && LOBYTE(a2[1].m_uReference) ) a1->m_gameState.m_currentChannel = a2[1].m_uAutoReleaseCount; return 1; } if ( a6 ) { GJBaseGameLayer::activateSongTrigger(a1, (SongTriggerGameObject *)a2); return 1; } LABEL_69: if ( a1->m_playbackActive ) { m_isGroupDisabled = a1->m_activateAudioTriggers; if ( m_isGroupDisabled ) { a1->activatedAudioTrigger(a1, (SFXTriggerGameObject *)a2); return m_isGroupDisabled; } } return 1; } if ( m_objectID > 2905 ) return 1; goto LABEL_84; } if ( m_objectID == 1007 ) { m_isGroupDisabled = a1->m_previewMode; if ( !m_isGroupDisabled ) return 1; OpacityActionForGroup = GJEffectManager::getOpacityActionForGroup(a1->m_effectManager, a2->m_targetGroupID); v28 = OpacityActionForGroup; if ( OpacityActionForGroup ) { m_durationRelated = OpacityActionForGroup->m_durationRelated; if ( m_durationRelated != 0.0 ) { v30 = m_spawnTriggerDelay - m_durationRelated; if ( v30 != 0.0 ) { OpacityActionForGroup->m_deltaTimeRelated = 0.0; OpacityActionForGroup->m_deltaTime = 0.0; OpacityEffectAction::step(OpacityActionForGroup, v30); GJEffectManager::updateOpacityAction(a1->m_effectManager, v28); } } } v31 = GJEffectManager::runOpacityActionOnGroup( a1->m_effectManager, a2->m_targetGroupID, a2->m_duration, a2->m_opacity, a2->m_uniqueID, a2->m_controlID); v31->m_durationRelated = m_spawnTriggerDelay; v31->m_deltaTimeRelated = v14; } else { if ( m_objectID >= 1008 ) { if ( m_objectID == 1049 ) { LevelEditorLayer::toggleGroupPreview(a1, a2->m_targetGroupID, a2->m_activateGroup); } else if ( m_objectID == 1268 && !a2->m_previewDisable ) { m_uUnknown = a2[1].m_uUnknown; if ( *(float *)&m_uUnknown > 0.0 ) { v35 = m_spawnTriggerDelay + *(float *)&m_uUnknown; if ( v35 <= a4 ) LevelEditorLayer::addDelayedSpawn(a1, a2, v35); } else { m_targetGroupID = a2->m_targetGroupID; v34 = a2->spawnXPosition(a2); LevelEditorLayer::spawnGroupPreview( a1, m_targetGroupID, v34, a2->m_spawnTriggerDelay, a3, a4, a5, a2->m_spawnOrdered, a6); } } return 1; } if ( m_objectID != 1006 ) return 1; m_isGroupDisabled = a1->m_previewMode; if ( !m_isGroupDisabled ) return 1; m_fadeInDuration = a2->m_fadeInDuration; m_holdDuration = a2->m_holdDuration; m_fadeOutDuration = a2->m_fadeOutDuration; if ( (float)((float)((float)(m_spawnTriggerDelay + m_fadeInDuration) + m_holdDuration) + m_fadeOutDuration) < a4 ) return 1; v41.g = a2->m_triggerTargetColor.g; if ( !a2->m_pulseMode ) v11 = 2; v41.b = a2->m_triggerTargetColor.b; v41.r = a2->m_triggerTargetColor.r; if ( a2->m_pulseMode ) v11 = Hsv; s = a2->m_hsvValue.s; v23 = *(cocos2d::CCPoint *)&a2->m_hsvValue.v; m_effectManager = a1->m_effectManager; v25 = a2->m_targetGroupID; m_pulseTargetType = a2->m_pulseTargetType; v40[0].x = a2->m_hsvValue.h; v40[0].y = s; v40[1] = v23; *(_QWORD *)&v37.h = __PAIR64__(LODWORD(s), LODWORD(v40[0].x)); *(cocos2d::CCPoint *)&v37.v = v23; GJEffectManager::runPulseEffect( m_effectManager, v25, m_pulseTargetType == 1, m_fadeInDuration, m_holdDuration, m_fadeOutDuration, v11, v41, v37, a2->m_copyColorID, a2->m_pulseMainOnly, a2->m_pulseDetailOnly, a2->m_pulseExclusive, a2->m_legacyHSV, a2->m_uniqueID, a2->m_controlID)->m_startTime = v14; } return m_isGroupDisabled; }
GD Web Decomp Icon

GD Web Decomp

Raw Source