From b952b3abade40bef3e55a7d48be1984a57e5cce9 Mon Sep 17 00:00:00 2001 From: PS Date: Thu, 8 Apr 2021 15:11:39 -1000 Subject: [PATCH] added pattern transition speed to the settings file --- src/app/ss_blumen_lumen/blumen_lumen.cpp | 4 ++-- src/app/ss_blumen_lumen/blumen_lumen_settings.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/ss_blumen_lumen/blumen_lumen.cpp b/src/app/ss_blumen_lumen/blumen_lumen.cpp index f12a54e..371b8db 100644 --- a/src/app/ss_blumen_lumen/blumen_lumen.cpp +++ b/src/app/ss_blumen_lumen/blumen_lumen.cpp @@ -380,7 +380,7 @@ BlumenLumen_CustomInit(app_state* State, context Context) BLState->ModeAnimations[BlumenPattern_VoiceCommand] = LoadAllAnimationsInDir(VoicePatternFolder, BLState, State, Context); AnimationSystem_LoadAnimationFromFile(&State->AnimationSystem, State->Patterns, Context, ConstString("data/blumen_animations/anim_demo.foldanim")); - BlumenLumen_SetPatternMode(BlumenPattern_Standard, 5, &State->AnimationSystem, BLState); + BlumenLumen_SetPatternMode(BlumenPattern_Standard, GlobalAnimTransitionSpeed, &State->AnimationSystem, BLState); #endif State->AnimationSystem.TimelineShouldAdvance = true; @@ -497,7 +497,7 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context) BLState->LastAssemblyColorSet = (BLState->LastAssemblyColorSet + 1) % 3; } - BlumenLumen_SetPatternMode(BlumenPattern_VoiceCommand, 5, &State->AnimationSystem, BLState); + BlumenLumen_SetPatternMode(BlumenPattern_VoiceCommand, GlobalAnimTransitionSpeed, &State->AnimationSystem, BLState); BLState->TimeLastSetToVoiceMode = Context->SystemTime_Current; BLState->LastHuePhrase = NewHue; BLState->ShouldUpdateLog = true; diff --git a/src/app/ss_blumen_lumen/blumen_lumen_settings.h b/src/app/ss_blumen_lumen/blumen_lumen_settings.h index b7d7aa7..abcb17d 100644 --- a/src/app/ss_blumen_lumen/blumen_lumen_settings.h +++ b/src/app/ss_blumen_lumen/blumen_lumen_settings.h @@ -99,6 +99,12 @@ r32 FullBrightnessPercent = 1.0f; // 2 is 2x as fast. r32 GlobalAnimSpeed = 1.0f; +// How long it takes to fade from one animation to the next. +// This is used both for transitioning between animation files +// as well as transitioning from Standard pattern mode to voice +// activated mode +r32 GlobalAnimTransitionSpeed = 5.0f; + r64 PhrasePriorityMessageGroupingTime = 1.0f; // How often should Lumenarium send its status to the python server?