//--------------------------------------------------------------------------- // GameSound.h - This file is the sound system header for the GAME // // MechCommander 2 // //---------------------------------------------------------------------------// // Copyright (C) Microsoft Corporation. All rights reserved. // //===========================================================================// #ifndef GAMESOUND_H #define GAMESOUND_H //--------------------------------------------------------------------------- // Include files #ifndef MCLIB_H #include "mclib.h" #endif #ifndef DWARRIOR_H #include "dwarrior.h" #endif #ifndef RADIO_H #include "radio.h" #endif //--------------------------------------------------------------------------- // Macro Defintiions //--------------------------------------------------------------------------- class GameSoundSystem : public SoundSystem { //Data Members //------------- protected: RadioData *currentMessage; //Radio message playing. unsigned long messagesInQueue; //Radio messages waiting to play. RadioData *queue[MAX_QUEUED_MESSAGES]; //Radio message queue. unsigned long currentFragment; //Which piece are we playing. unsigned long playingNoise; //are we playing noise right now? bool wholeMsgDone; //Are all fragments played? HGOSAUDIO radioHandle; float generalAlarmTimer; //How long do we play the alarm buzzer? //Member Functions //---------------- public: GameSoundSystem (void) { init(); } ~GameSoundSystem (void) { destroy(); } void init (void) { SoundSystem::init(); wholeMsgDone = true; currentMessage = NULL; messagesInQueue = 0; currentFragment = 0; playingNoise = false; radioHandle = NULL; //------------------------------------------------------------ // Startup the Radio Message Queue. messagesInQueue = 0; wholeMsgDone = true; for (long i=0;i