ScummVM API documentation
SoundEntityData.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /*
23  * Copyright (C) 2006-2010 - Frictional Games
24  *
25  * This file is part of HPL1 Engine.
26  */
27 
28 #ifndef HPL_SOUND_ENTITY_DATA_H
29 #define HPL_SOUND_ENTITY_DATA_H
30 
31 #include "hpl1/engine/resources/ResourceBase.h"
32 #include "hpl1/engine/system/SystemTypes.h"
33 
34 namespace hpl {
35 
37  friend class cSoundEntity;
38 
39 public:
40  cSoundEntityData(tString asName);
42 
43  bool CreateFromFile(const tString &asFile);
44 
45  const tString &GetMainSoundName() { return msMainSound; }
46  void SetMainSoundName(const tString &asName) { msMainSound = asName; }
47  const tString &GetStartSoundName() { return msStartSound; }
48  void SetStartSoundName(const tString &asName) { msStartSound = asName; }
49  const tString &GetStopSoundName() { return msStopSound; }
50  void SetStopSoundName(const tString &asName) { msStopSound = asName; }
51 
52  void SetFadeStart(bool abX) { mbFadeStart = abX; }
53  bool GetFadeStart() { return mbFadeStart; }
54  void SetFadeStop(bool abX) { mbFadeStop = abX; }
55  bool GetFadeStop() { return mbFadeStop; }
56 
57  void SetVolume(float afX) { mfVolume = afX; }
58  float GetVolume() { return mfVolume; }
59  void SetMaxDistance(float afX) { mfMaxDistance = afX; }
60  float GetMaxDistance() { return mfMaxDistance; }
61  void SetMinDistance(float afX) { mfMinDistance = afX; }
62  float GetMinDistance() { return mfMinDistance; }
63 
64  void SetStream(bool abX) { mbStream = abX; }
65  bool GetStream() { return mbStream; }
66  void SetLoop(bool abX) { mbLoop = abX; }
67  bool GetLoop() { return mbLoop; }
68  void SetUse3D(bool abX) { mbUse3D = abX; }
69  bool GetUse3D() { return mbUse3D; }
70 
71  void SetBlockable(bool abX) { mbBlockable = abX; }
72  bool GetBlockable() { return mbBlockable; }
73  void SetBlockVolumeMul(float afX) { mfBlockVolumeMul = afX; }
74  float GetBlockVolumeMul() { return mfBlockVolumeMul; }
75 
76  void SetRandom(float afX) { mfRandom = afX; }
77  float GetRandom() { return mfRandom; }
78  void SetInterval(float afX) { mfInterval = afX; }
79  float GetInterval() { return mfInterval; }
80 
81  void SetPriority(int alX) { mlPriority = alX; }
82  int GetPriority() { return mlPriority; }
83 
84  // Resource implementation
85  bool reload() { return false; }
86  void unload() {}
87  void destroy() {}
88 
89 protected:
90  tString msMainSound;
91  tString msStartSound;
92  tString msStopSound;
93 
94  bool mbFadeStart;
95  bool mbFadeStop;
96 
97  float mfVolume;
98  float mfMaxDistance;
99  float mfMinDistance;
100 
101  bool mbStream;
102  bool mbLoop;
103  bool mbUse3D;
104 
105  bool mbBlockable;
106  float mfBlockVolumeMul;
107 
108  float mfRandom;
109  float mfInterval;
110 
111  int mlPriority;
112 };
113 
114 } // namespace hpl
115 
116 #endif // HPL_SOUND_DATA_H
Definition: AI.h:36
void destroy()
Definition: SoundEntityData.h:87
Definition: str.h:59
Definition: SoundEntityData.h:36
Definition: ResourceBase.h:36
void unload()
Definition: SoundEntityData.h:86
Definition: SoundEntity.h:86
bool reload()
Definition: SoundEntityData.h:85