From 0784acea49ea8fc9dee225b0eb52f746fb3e919e Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 23 Oct 2023 23:18:46 +0100 Subject: [PATCH] Instead of tying vape mode to music sync, make it (two) tune-specific properties. Currently also affects Intermission (without nightcore), but it can be manually applied to other tracks as well --- src/music.cpp | 3 +++ src/music_tune.hpp | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/music.cpp b/src/music.cpp index 02f62c61d..a2aef3070 100644 --- a/src/music.cpp +++ b/src/music.cpp @@ -31,6 +31,8 @@ void Music_Init(void) tune.resume_fade_in = 750; tune.sync = true; tune.credit = true; + tune.vapes = true; + tune.nightcoreable = true; } { @@ -75,6 +77,7 @@ void Music_Init(void) tune.song = "racent"; tune.priority = 40; + tune.vapes = true; } { diff --git a/src/music_tune.hpp b/src/music_tune.hpp index f1c59ec6d..b22efb23d 100644 --- a/src/music_tune.hpp +++ b/src/music_tune.hpp @@ -62,6 +62,10 @@ public: // resumed). bool credit = false; + // This tune will vape in encoremode contexts. + bool vapes = false; + bool nightcoreable = false; + // Start playing this number of tics into the tune. tic_t seek = 0; @@ -84,10 +88,10 @@ public: float speed() const { - // Sync is checked first because it's synced with the level context. Get it? - if (sync && encoremode && gamestate == GS_LEVEL) + // Apply to all tunes that support vape mode. + if (encoremode && vapes) { - if (K_CheckBossIntro()) + if (nightcoreable && K_CheckBossIntro()) { // In Versus, the vape makes you think you can start a nightcore YT channel return (1.f/encoremul);