home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 March / Gamestar_82_2006-03_dvd.iso / DVDStar / Editace / quake4_sdkv10.exe / source / game / Sound.h < prev    next >
C/C++ Source or Header  |  2005-11-14  |  1KB  |  59 lines

  1.  
  2. #ifndef __GAME_SOUND_H__
  3. #define __GAME_SOUND_H__
  4.  
  5. /*
  6. ===============================================================================
  7.  
  8.   Generic sound emitter.
  9.  
  10. ===============================================================================
  11. */
  12.  
  13. class idSound : public idEntity {
  14. public:
  15.     CLASS_PROTOTYPE( idSound );
  16.  
  17.                     idSound( void );
  18.  
  19.     void            Save( idSaveGame *savefile ) const;
  20.     void            Restore( idRestoreGame *savefile );
  21.  
  22.     virtual void    UpdateChangeableSpawnArgs( const idDict *source );
  23.  
  24.     void            Spawn( void );
  25.  
  26.     void            ToggleOnOff( idEntity *other, idEntity *activator );
  27.     void            Think( void );
  28.     void            SetSound( const char *sound, int channel = SND_CHANNEL_ANY );
  29.  
  30.     virtual void    ShowEditingDialog( void );
  31.  
  32. private:
  33.     float            lastSoundVol;
  34.     float            soundVol;
  35.     float            random;
  36.     float            wait;
  37.     bool            timerOn;
  38.     idVec3            shakeTranslate;
  39.     idAngles        shakeRotate;
  40.     int                playingUntilTime;
  41.  
  42.     void            Event_Trigger( idEntity *activator );
  43.     void            Event_Timer( void );
  44.     void            Event_On( void );
  45.     void            Event_Off( void );
  46.  
  47.     void            DoSound( bool play );
  48. // RAVEN BEGIN
  49. // jshepard: Allow speakers to target lights and tie them to the speaker's ref sound
  50.     void            SetTargetSoundHandles( void );
  51. // abahr
  52.     virtual void    FindTargets();
  53.     bool            GetPhysicsToSoundTransform( idVec3 &origin, idMat3 &axis );
  54. // RAVEN END
  55.  
  56. };
  57.  
  58. #endif /* !__GAME_SOUND_H__ */
  59.