MCPcopy Create free account
hub / github.com/SimHacker/micropolis / SoundEvent

Class SoundEvent

MicropolisCore/src/CellEngine/src/cellengine.cpp:188–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186#ifdef DOSOUND
187
188class SoundEvent {
189 long x;
190 long y;
191 long w;
192 long h;
193 long s;
194 static std::vector<SoundEvent> queue;
195
196public:
197
198 SoundEvent(
199 long xx,
200 long yy,
201 long ww,
202 long hh,
203 long ss) :
204 x(xx),
205 y(yy),
206 w(ww),
207 h(hh),
208 s(ss)
209 {
210 }
211
212 SoundEvent();
213
214 ~SoundEvent()
215 {
216 }
217
218 static void Queue(
219 long xx,
220 long yy,
221 long ww,
222 long hh,
223 long ss)
224 {
225 queue.push_back(
226 SoundEvent(
227 xx,
228 yy,
229 ww,
230 hh,
231 ss));
232 }
233
234 static void ClearQueue()
235 {
236 queue.erase(
237 queue.begin(),
238 queue.end());
239 }
240
241 void Play(float vol)
242 {
243 float speed =
244 (float)0.2 +
245 (((float)2.0 *

Callers 1

QueueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected