1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-12 16:14:25 +02:00

#22 floodfill sound effect

This commit is contained in:
XProger
2017-09-14 05:07:34 +03:00
parent 0cf58dac36
commit 25cbe7f592
2 changed files with 13 additions and 1 deletions

View File

@@ -264,6 +264,8 @@ namespace TR {
SND_SHOTGUN_SHOT = 45,
SND_UNDERWATER = 60,
SND_FLOOD = 81,
SND_INV_SPIN = 108,
SND_INV_HOME = 109,
@@ -2163,6 +2165,10 @@ namespace TR {
for (int i = 0; i < info.trigCmdCount; i++) {
FloorData::TriggerCommand cmd = info.trigCmd[i];
if (cmd.action == Action::CAMERA_SWITCH) {
i++;
continue;
}
if (cmd.action != Action::ACTIVATE) continue;
Entity &e = entities[cmd.args];

View File

@@ -154,6 +154,12 @@ struct Level : IGame {
if (effect == TR::Effect::FLICKER)
flickerIdx = 0;
if (effect == TR::Effect::FLOOD) {
Sound::Sample *sample = playSound(TR::SND_FLOOD, vec3(), 0);
if (sample)
sample->setVolume(0.0f, 4.0f);
}
this->effect = effect;
this->effectTimer = 0.0f;
}
@@ -451,7 +457,7 @@ struct Level : IGame {
}
static void fillCallback(int id, int width, int height, int tileX, int tileY, void *userData, void *data) {
static const uint32 whiteColor = 0xFFFFFFFF;
static const uint32 whiteColor = 0xFFFFFFFF;
static const uint32 barColor[UI::BAR_MAX][25] = {
// health bar
{ 0xFF2C5D71, 0xFF5E81AE, 0xFF2C5D71, 0xFF1B4557, 0xFF16304F },