Added legacy secrets system

This commit is contained in:
MontyTRC89 2022-05-15 05:53:01 +02:00
parent e7f151d3a5
commit a120c73f96
2 changed files with 11 additions and 2 deletions

View file

@ -17,6 +17,7 @@
#include "Objects/objectslist.h"
#include "Sound/sound.h"
#include "Specific/setup.h"
#include <savegame.h>
using namespace TEN::Effects::Lara;
@ -679,6 +680,15 @@ void TestTriggers(FloorInfo* floor, int x, int y, int z, bool heavy, int heavyFl
// TODO: not used for now
break;
case TO_SECRET:
if (!(Statistics.Level.Secrets & (1 << value)))
{
PlaySecretTrack();
Statistics.Level.Secrets |= (1 << value);
Statistics.Game.Secrets++;
}
break;
default:
break;
}

View file

@ -32,7 +32,7 @@ const std::string TRACKS_PATH = "Audio\\";
std::map<std::string, int> SoundTrackMap;
std::unordered_map<int, SoundTrackInfo> SoundTracks;
int SecretSoundIndex;
int SecretSoundIndex = 5;
static int GlobalMusicVolume;
static int GlobalFXVolume;
@ -340,7 +340,6 @@ void EnumerateLegacyTracks()
}
s.Name = result[1];
SoundTracks.insert(std::make_pair(index, s));
SecretSoundIndex = std::max(SecretSoundIndex, index);
}
}
}