mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-01 09:18:00 +03:00
Added legacy secrets system
This commit is contained in:
parent
e7f151d3a5
commit
a120c73f96
2 changed files with 11 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue