// // LevelEditorLayer::activateTriggerEffect from 0x100360db4 to 0x1003612ac (1272 bytes) // // 4 xrefs: // > LevelEditorLayer::updateGameObjects @ 0x100358ce4 // > LevelEditorLayer::updateGameObjects @ 0x100358d30 // > LevelEditorLayer::spawnGroupPreview @ 0x100360c6c // > LevelEditorLayer::spawnGroupPreview @ 0x100360d64 // // 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 __fastcall LevelEditorLayer::activateTriggerEffect( LevelEditorLayer *a1, EffectGameObject *a2, float a3, float a4, float a5, bool a6) { bool v6; // w21 _BOOL4 v8; // w22 float m_spawnTriggerDelay; // s8 float v15; // s9 bool v17; // w3 int m_objectID; // w8 unsigned int v19; // w8 ShaderLayer *m_shaderLayer; // x8 float m_fadeInDuration; // s0 float m_holdDuration; // s1 float m_fadeOutDuration; // s2 PulseEffectType v24; // w3 float m_fScaleX; // s0 float v26; // s8 DelayedSpawnNode *DelayedSpawnNode; // x0 OpacityEffectAction *OpacityActionForGroup; // x0 OpacityEffectAction *v29; // x21 float m_durationRelated; // s0 float v31; // s0 OpacityEffectAction *v32; // x0 int m_targetGroupID; // w21 float v34; // s0 __int64 v35; // [xsp+18h] [xbp-68h] BYREF if ( a2->m_isGroupDisabled ) return 1; v8 = a6; if ( a2->m_isTouchTriggered && !((unsigned int (__fastcall *)(EffectGameObject *))a2->hasBeenActivated)(a2) ) return 1; m_spawnTriggerDelay = a2->m_spawnTriggerDelay; v15 = (float)(a3 - m_spawnTriggerDelay) - a5; if ( a2->m_isColorTrigger ) { if ( a1->m_previewMode ) { v17 = (float)(a5 - (float)(a3 - m_spawnTriggerDelay)) > 0.2 && (float)(a4 - (float)(m_spawnTriggerDelay + a2->m_duration)) <= 5.0; if ( !LevelEditorLayer::runColorEffect( a1, a2, a2->m_targetColor, a2->m_spawnTriggerDelay, (float)(a3 - m_spawnTriggerDelay) - a5, v17) ) return 0; if ( a2->m_objectID == 29 && a2->m_tintGround ) LevelEditorLayer::runColorEffect(a1, a2, 1001, m_spawnTriggerDelay, (float)(a3 - m_spawnTriggerDelay) - a5, 0); } return 1; } m_objectID = a2->m_objectID; v6 = 1; if ( m_objectID > 2899 ) { if ( m_objectID <= 2998 ) { v19 = m_objectID - 2900; if ( v19 <= 0x18 ) { if ( ((1 << v19) & 0x1FBFEB0) != 0 ) { if ( a1->m_previewShaders && (BYTE2(a2[1].m_fScaleY) & 1) == 0 ) { 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); } } else if ( v19 ) { if ( v19 == 3 ) GJBaseGameLayer::triggerGradientCommand(a1, (GradientTriggerObject *)a2); } else if ( LOBYTE(a2[1].m_nTag) == 1 ) { a1->m_gameState.m_currentChannel = a2[1].m_uReference; } } return v6; } if ( m_objectID <= 3604 ) { switch ( m_objectID ) { case 2999: sub_1000229B8(&v35, (__int64 *)&a2->m_moveOffset); GJBaseGameLayer::updateMGOffsetY(a1, *((float *)&v35 + 1), 0.0, 0, 0.0, -1, -1); return v6; case 3602: if ( v8 ) { GJBaseGameLayer::activateSFXTrigger(a1, (SFXTriggerGameObject *)a2); return v6; } break; case 3603: if ( v8 ) { GJBaseGameLayer::activateSFXEditTrigger(a1, (SFXTriggerGameObject *)a2); return v6; } break; default: return v6; } goto LABEL_58; } 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 v6; } if ( v8 ) { GJBaseGameLayer::activateSongEditTrigger(a1, (SongTriggerGameObject *)a2); return v6; } LABEL_58: if ( a1->m_playbackActive && a1->m_activateAudioTriggers ) ((void (__fastcall *)(LevelEditorLayer *, EffectGameObject *))a1->activatedAudioTrigger)(a1, a2); return v6; } if ( m_objectID > 1267 ) { switch ( m_objectID ) { case 1268: if ( a2->m_previewDisable ) return v6; m_fScaleX = a2[1].m_fScaleX; if ( m_fScaleX <= 0.0 ) { m_targetGroupID = a2->m_targetGroupID; v34 = ((float (__fastcall *)(EffectGameObject *))a2->spawnXPosition)(a2); LevelEditorLayer::spawnGroupPreview( a1, m_targetGroupID, v34, a2->m_spawnTriggerDelay, a3, a4, a5, a2->m_spawnOrdered, v8); return 1; } v26 = m_spawnTriggerDelay + m_fScaleX; if ( v26 <= a4 ) { DelayedSpawnNode = LevelEditorLayer::getDelayedSpawnNode(a1); DelayedSpawnNode->m_gameObject = a2; DelayedSpawnNode->m_spawnDelay = v26; if ( (std::__vector_base::pointer)((char *)a1->m_delayedSpawnNodes.__end_ - (char *)a1->m_delayedSpawnNodes.__begin_) >= (std::__vector_base::pointer)9 ) a1->m_sortSpawnNodes = 1; } break; case 1616: if ( !a2[1].m_uAutoReleaseCount ) LevelEditorLayer::stopTriggersInGroup(a1, a2->m_targetGroupID, a2->m_spawnTriggerDelay); break; case 1934: if ( v8 ) { GJBaseGameLayer::activateSongTrigger(a1, (SongTriggerGameObject *)a2); return v6; } goto LABEL_58; default: return v6; } } else { if ( m_objectID != 1006 ) { if ( m_objectID != 1007 ) { if ( m_objectID == 1049 ) LevelEditorLayer::toggleGroupPreview(a1, a2->m_targetGroupID, a2->m_activateGroup); return v6; } if ( !a1->m_previewMode ) return v6; OpacityActionForGroup = GJEffectManager::getOpacityActionForGroup(a1->m_effectManager, a2->m_targetGroupID); if ( OpacityActionForGroup ) { v29 = OpacityActionForGroup; m_durationRelated = OpacityActionForGroup->m_durationRelated; if ( m_durationRelated != 0.0 ) { v31 = m_spawnTriggerDelay - m_durationRelated; if ( v31 != 0.0 ) { OpacityActionForGroup->m_deltaTimeRelated = 0.0; OpacityActionForGroup->m_deltaTime = 0.0; OpacityEffectAction::step(OpacityActionForGroup, v31); GJEffectManager::updateOpacityAction(a1->m_effectManager, v29); } } } v32 = GJEffectManager::runOpacityActionOnGroup( a1->m_effectManager, a2->m_targetGroupID, a2->m_duration, a2->m_opacity, a2->m_uniqueID, a2->m_controlID); v32->m_deltaTimeRelated = v15; v32->m_durationRelated = m_spawnTriggerDelay; return 1; } if ( a1->m_previewMode ) { 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 ) { if ( a2->m_pulseMode ) v24 = Hsv; else v24 = 2; GJEffectManager::runPulseEffect( a1->m_effectManager, a2->m_targetGroupID, a2->m_pulseTargetType == 1, m_fadeInDuration, m_holdDuration, m_fadeOutDuration, v24, (cocos2d::ccColor3B)(*(unsigned __int16 *)&a2->m_triggerTargetColor.r | (a2->m_triggerTargetColor.b << 16)), a2->m_hsvValue, a2->m_copyColorID, *(_DWORD *)&a2->m_pulseMainOnly, SBYTE1(*(_DWORD *)&a2->m_pulseMainOnly), SBYTE2(*(_DWORD *)&a2->m_pulseMainOnly), SHIBYTE(*(_DWORD *)&a2->m_pulseMainOnly), a2->m_uniqueID, a2->m_controlID)->m_startTime = v15; } } } return v6; }
GD Web Decomp Icon

GD Web Decomp

Raw Source