mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add Music_BatchExempt, temporarily exemplify a tune from batch operations
This commit is contained in:
parent
be8d8178bb
commit
806067f48f
4 changed files with 21 additions and 0 deletions
|
|
@ -353,3 +353,13 @@ const char* Music_CurrentId(void)
|
||||||
{
|
{
|
||||||
return g_tunes.current_id();
|
return g_tunes.current_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Music_BatchExempt(const char* id)
|
||||||
|
{
|
||||||
|
Tune* tune = g_tunes.find(id);
|
||||||
|
|
||||||
|
if (tune)
|
||||||
|
{
|
||||||
|
tune->resist_once = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,10 @@ void Music_Remap(const char *id, const char *song);
|
||||||
// Set whether a tune should loop.
|
// Set whether a tune should loop.
|
||||||
void Music_Loop(const char *id, boolean loop);
|
void Music_Loop(const char *id, boolean loop);
|
||||||
|
|
||||||
|
// Temporarily exemplify a tune from batch operations, such
|
||||||
|
// as Music_StopAll.
|
||||||
|
void Music_BatchExempt(const char *id);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Query properties.
|
// Query properties.
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,12 @@ public:
|
||||||
{
|
{
|
||||||
for (auto& [_, tune] : map_)
|
for (auto& [_, tune] : map_)
|
||||||
{
|
{
|
||||||
|
if (tune.resist_once)
|
||||||
|
{
|
||||||
|
tune.resist_once = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!tune.resist)
|
if (!tune.resist)
|
||||||
{
|
{
|
||||||
f(tune);
|
f(tune);
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ public:
|
||||||
// from TuneManager::stop_all etc. It must be
|
// from TuneManager::stop_all etc. It must be
|
||||||
// stopped/paused individually.
|
// stopped/paused individually.
|
||||||
bool resist = false;
|
bool resist = false;
|
||||||
|
bool resist_once = false; // set at runtime
|
||||||
|
|
||||||
// This tune shows a credit when first played (not
|
// This tune shows a credit when first played (not
|
||||||
// resumed).
|
// resumed).
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue