mirror of
https://github.com/ENSL/NS.git
synced 2024-11-23 13:02:12 +00:00
4f13237895
Change CRLF to LF in repo.
69 lines
No EOL
2 KiB
C++
69 lines
No EOL
2 KiB
C++
//======== (C) Copyright 2002 Charles G. Cleveland All rights reserved. =========
|
|
//
|
|
// The copyright to the contents herein is the property of Charles G. Cleveland.
|
|
// The contents may be used and/or copied only with the written permission of
|
|
// Charles G. Cleveland, or in accordance with the terms and conditions stipulated in
|
|
// the agreement/contract under which the contents have been supplied.
|
|
//
|
|
// Purpose:
|
|
//
|
|
// $Workfile: AvHAmbientSound.h $
|
|
// $Date: 2002/07/10 14:38:51 $
|
|
//
|
|
//-------------------------------------------------------------------------------
|
|
// $Log: AvHAmbientSound.h,v $
|
|
// Revision 1.5 2002/07/10 14:38:51 Flayra
|
|
// - Fixed bug where sound volume wasn't being set for omnipresent sounds, added document headers
|
|
//
|
|
//===============================================================================
|
|
#ifndef AVH_AMBIENT_SOUND_H
|
|
#define AVH_AMBIENT_SOUND_H
|
|
|
|
#include "../types.h"
|
|
#include "winsani_in.h"
|
|
#include "fmod.h"
|
|
#include "winsani_out.h"
|
|
#include "ui/UIHud.h"
|
|
#include "AvHSpecials.h"
|
|
#include "AvHSharedTypes.h"
|
|
#include "AvHConstants.h"
|
|
#include "AvHParticleSystem.h"
|
|
#include "../common/entity_state.h"
|
|
#include "VGUI_ProgressBar.h"
|
|
#include "ui/MarqueeComponent.h"
|
|
#include "AvHOrder.h"
|
|
#include "AvHMessage.h"
|
|
|
|
class AvHAmbientSound
|
|
{
|
|
public:
|
|
AvHAmbientSound(const string& inRelativeSoundName, int inVolume, int inFadeDistance, bool inLooping, const Vector& inPosition, int inEntIndex, float inTimeElapsed = -1);
|
|
AvHAmbientSound(const AvHAmbientSound& inSource);
|
|
|
|
void ClearData();
|
|
|
|
int GetEntityIndex() const;
|
|
|
|
void SetPosition(const Vector& inPosition);
|
|
|
|
void StartPlayingIfNot();
|
|
|
|
void UpdateVolume(const Vector& inListenerPosition);
|
|
|
|
private:
|
|
// Changing or adding data? Don't forget to put it in the copy constructor!
|
|
FSOUND_STREAM* mStream;
|
|
int mChannel;
|
|
bool mInitialized;
|
|
|
|
string mSoundName;
|
|
int mVolume;
|
|
int mFadeDistance;
|
|
bool mLooping;
|
|
Vector mPosition;
|
|
int mEntityIndex;
|
|
float mTimeElapsed;
|
|
|
|
};
|
|
|
|
#endif |