ScummVM API documentation
sound_nebular.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 #ifndef MADS_SOUND_NEBULAR_H
23 #define MADS_SOUND_NEBULAR_H
24 
25 #include "mads/core/sound.h"
26 
27 namespace MADS {
28 namespace Nebular {
29 
30 class RexSoundManager : public SoundManager {
31 protected:
32  void loadDriver(int sectionNum) override;
33 
34 public:
35  RexSoundManager(Audio::Mixer *mixer, bool &soundFlag) : SoundManager(mixer, soundFlag) {
36  }
37  ~RexSoundManager() override {
38  }
39 
40  void validate() override;
41 };
42 
43 class RexASound : public ASound {
44 protected:
45  void channelCommand(byte *&pSrc, bool &updateFlag) override;
46 
47 public:
48  RexASound(Audio::Mixer *mixer, OPL::OPL *opl,
49  const Common::Path &filename, int dataOffset);
50 };
51 
52 class ASound1 : public RexASound {
53 private:
54  typedef int (ASound1::*CommandPtr)();
55  static const CommandPtr _commandList[42];
56  bool _cmd23Toggle;
57 
58  int command9();
59  int command10();
60  int command11();
61  int command12();
62  int command13();
63  int command14();
64  int command15();
65  int command16();
66  int command17();
67  int command18();
68  int command19();
69  int command20();
70  int command21();
71  int command22();
72  int command23();
73  int command24();
74  int command25();
75  int command26();
76  int command27();
77  int command28();
78  int command29();
79  int command30();
80  int command31();
81  int command32();
82  int command33();
83  int command34();
84  int command35();
85  int command36();
86  int command37();
87  int command38();
88  int command39();
89  int command40();
90  int command41();
91 
92  void command111213();
93  int command2627293032();
94 public:
95  ASound1(Audio::Mixer *mixer, OPL::OPL *opl);
96 
97  int command(int commandId, int param) override;
98 };
99 
100 class ASound2 : public RexASound {
101 private:
102  byte _command12Param;
103 private:
104  typedef int (ASound2::*CommandPtr)();
105  static const CommandPtr _commandList[44];
106 
107  int command0() override;
108  int command9();
109  int command10();
110  int command11();
111  int command12();
112  int command13();
113  int command14();
114  int command15();
115  int command16();
116  int command17();
117  int command18();
118  int command19();
119  int command20();
120  int command21();
121  int command22();
122  int command23();
123  int command24();
124  int command25();
125  int command26();
126  int command27();
127  int command28();
128  int command29();
129  int command30();
130  int command31();
131  int command32();
132  int command33();
133  int command34();
134  int command35();
135  int command36();
136  int command37();
137  int command38();
138  int command39();
139  int command40();
140  int command41();
141  int command42();
142  int command43();
143 
144  void command9Randomize();
145  void command9Apply(byte *data, int val, int incr);
146 public:
147  ASound2(Audio::Mixer *mixer, OPL::OPL *opl);
148 
149  int command(int commandId, int param) override;
150 };
151 
152 class ASound3 : public RexASound {
153 private:
154  bool _command39Flag;
155 
156  typedef int (ASound3::*CommandPtr)();
157  static const CommandPtr _commandList[61];
158 
159  int command9();
160  int command10();
161  int command11();
162  int command13();
163  int command14();
164  int command15();
165  int command16();
166  int command17();
167  int command18();
168  int command19();
169  int command20();
170  int command21();
171  int command22();
172  int command23();
173  int command24();
174  int command25();
175  int command26();
176  int command27();
177  int command28();
178  int command29();
179  int command30();
180  int command31();
181  int command32();
182  int command33();
183  int command34();
184  int command35();
185  int command36();
186  int command37();
187  int command38();
188  int command39();
189  int command40();
190  int command41();
191  int command42();
192  int command43();
193  int command44();
194  int command45();
195  int command46();
196  int command47();
197  int command49();
198  int command50();
199  int command51();
200  int command57();
201  int command59();
202  int command60();
203 
204  void command9Randomize();
205  void command9Apply(byte *data, int val, int incr);
206 public:
207  ASound3(Audio::Mixer *mixer, OPL::OPL *opl);
208 
209  int command(int commandId, int param) override;
210 };
211 
212 class ASound4 : public RexASound {
213 private:
214  typedef int (ASound4::*CommandPtr)();
215  static const CommandPtr _commandList[61];
216 
217  int command10();
218  int command12();
219  int command19();
220  int command20();
221  int command21();
222  int command24();
223  int command27();
224  int command30();
225  int command32();
226  int command33();
227  int command34();
228  int command35();
229  int command36();
230  int command37();
231  int command38();
232  int command43();
233  int command52();
234  int command53();
235  int command54();
236  int command55();
237  int command56();
238  int command57();
239  int command58();
240  int command59();
241  int command60();
242 
243  void method1();
244 public:
245  ASound4(Audio::Mixer *mixer, OPL::OPL *opl);
246 
247  int command(int commandId, int param) override;
248 };
249 
250 class ASound5 : public RexASound {
251 private:
252  typedef int (ASound5::*CommandPtr)();
253  static const CommandPtr _commandList[42];
254 
255  int command9();
256  int command10();
257  int command11();
258  int command12();
259  int command13();
260  int command14();
261  int command15();
262  int command16();
263  int command17();
264  int command18();
265  int command19();
266  int command20();
267  int command21();
268  int command22();
269  int command23();
270  int command24();
271  int command25();
272  int command26();
273  int command27();
274  int command28();
275  int command29();
276  int command30();
277  int command31();
278  int command32();
279  int command33();
280  int command34();
281  int command35();
282  int command36();
283  int command37();
284  int command38();
285  int command39();
286  int command40();
287  int command41();
288  int command42();
289  int command43();
290 public:
291  ASound5(Audio::Mixer *mixer, OPL::OPL *opl);
292 
293  int command(int commandId, int param) override;
294 };
295 
296 class ASound6 : public RexASound {
297 private:
298  typedef int (ASound6::*CommandPtr)();
299  static const CommandPtr _commandList[30];
300 
301  int command9();
302  int command10();
303  int command11();
304  int command12();
305  int command13();
306  int command14();
307  int command15();
308  int command16();
309  int command17();
310  int command18();
311  int command19();
312  int command20();
313  int command21();
314  int command22();
315  int command23();
316  int command24();
317  int command25();
318  int command29();
319 public:
320  ASound6(Audio::Mixer *mixer, OPL::OPL *opl);
321 
322  int command(int commandId, int param) override;
323 };
324 
325 class ASound7 : public RexASound {
326 private:
327  typedef int (ASound7::*CommandPtr)();
328  static const CommandPtr _commandList[38];
329 
330  int command9();
331  int command15();
332  int command16();
333  int command18();
334  int command19();
335  int command20();
336  int command21();
337  int command22();
338  int command23();
339  int command24();
340  int command25();
341  int command26();
342  int command27();
343  int command28();
344  int command30();
345  int command32();
346  int command33();
347  int command34();
348  int command35();
349  int command36();
350  int command37();
351 public:
352  ASound7(Audio::Mixer *mixer, OPL::OPL *opl);
353 
354  int command(int commandId, int param) override;
355 };
356 
357 class ASound8 : public RexASound {
358 private:
359  typedef int (ASound8::*CommandPtr)();
360  static const CommandPtr _commandList[38];
361 
362  int command9();
363  int command10();
364  int command11();
365  int command12();
366  int command13();
367  int command14();
368  int command15();
369  int command16();
370  int command17();
371  int command18();
372  int command19();
373  int command20();
374  int command21();
375  int command22();
376  int command23();
377  int command24();
378  int command25();
379  int command26();
380  int command27();
381  int command28();
382  int command29();
383  int command30();
384  int command31();
385  int command32();
386  int command33();
387  int command34();
388  int command35();
389  int command36();
390  int command37();
391 
392  void method1(byte *pData);
393  void adjustRange(byte *pData, byte v, int incr);
394 public:
395  ASound8(Audio::Mixer *mixer, OPL::OPL *opl);
396 
397  int command(int commandId, int param) override;
398 };
399 
400 class ASound9 : public RexASound {
401 private:
402  int _v1, _v2;
403  byte *_soundPtr;
404 
405  typedef int (ASound9::*CommandPtr)();
406  static const CommandPtr _commandList[52];
407 
408  int command9();
409  int command10();
410  int command11();
411  int command12();
412  int command13();
413  int command14();
414  int command15();
415  int command16();
416  int command17();
417  int command18();
418  int command19();
419  int command20();
420  int command21();
421  int command22();
422  int command23();
423  int command24();
424  int command25();
425  int command26();
426  int command27();
427  int command28();
428  int command29();
429  int command30();
430  int command31();
431  int command32();
432  int command33();
433  int command34();
434  int command35();
435  int command36();
436  int command37();
437  int command38();
438  int command39();
439  int command40();
440  int command41();
441  int command42();
442  int command43();
443  int command44_46();
444  int command45();
445  int command47();
446  int command48();
447  int command49();
448  int command50();
449  int command51();
450  int command57();
451  int command59();
452  int command60();
453 public:
454  ASound9(Audio::Mixer *mixer, OPL::OPL *opl);
455 
456  int command(int commandId, int param) override;
457 };
458 
459 } // namespace Nebular
460 
461 } // namespace MADS
462 
463 #endif /* MADS_SOUND_NEBULAR_H */
Definition: sound_nebular.h:52
Definition: sound_nebular.h:152
Definition: path.h:52
Definition: sound_nebular.h:100
void loadDriver(int sectionNum) override
Definition: sound_nebular.h:325
Definition: sound_nebular.h:212
Definition: mixer.h:70
Definition: sound_nebular.h:43
Definition: sound.h:42
Definition: sound_nebular.h:357
Definition: sound_nebular.h:250
Definition: sound_nebular.h:30
Definition: sound.h:239
Definition: action.h:28
int command(int commandId, int param=0)
Definition: sound_nebular.h:400
Definition: sound_nebular.h:296
Definition: fmopl.h:116