Files
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

76 lines
1.3 KiB
C++

#ifndef AI_LANCEMATEAUDIO_HPP
#define AI_LANCEMATEAUDIO_HPP
#include "ai_squad.hpp"
#pragma warning(push)
#include <stlport\list>
#include <stlport\vector>
#pragma warning(pop)
namespace MechWarrior4
{
class Mech;
};
namespace MW4AI
{
namespace LancemateAudio
{
enum Category
{
AUDIO_FF1,
AUDIO_FF2,
AUDIO_FF3,
AUDIO_FF4,
AUDIO_OK,
AUDIO_OKX,
AUDIO_NO,
AUDIO_TARGETDESTROYED,
AUDIO_ATNAV,
AUDIO_EJECT,
AUDIO_IDLE,
MAX_AUDIO_CATEGORIES
};
enum Priority
{
PRIORITY_OPTIONAL,
PRIORITY_MANDATORY
};
class AudioManager
{
public:
AudioManager();
~AudioManager();
void PlayAudio(Category category, const Stuff::MString& talker_suffix);
void PlayAudio(Category category, const MechWarrior4::AI& ai);
void Update(MechWarrior4::Group& group, MechWarrior4::Mech& leader);
void SetPissedOff(bool pissed_off);
private:
void AddAudioCue(Category category, int sound_id);
void UpdateAudio(MechWarrior4::Group& group);
private:
Stuff::Time m_LastTimeAudioPlayed[MAX_AUDIO_CATEGORIES];
Stuff::Time m_LastTimeAnyAudioPlayed;
Stuff::Time m_LastAudioUpdate;
Stuff::Time m_LastTimeNotInactive;
bool m_PissedOff;
};
};
};
#endif // AI_LANCEMATEAUDIO_HPP