ScummVM API documentation
wb.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 FREESCAPE_WB_H
23 #define FREESCAPE_WB_H
24 
25 #include "audio/audiostream.h"
26 #include "common/types.h"
27 
28 namespace Freescape {
29 
30 namespace WBCommon {
31 
36 int8 decodeOrderTranspose(byte cmd);
37 
41 byte decodeTickSpeed(byte cmd);
42 
46 byte decodeDuration(byte cmd);
47 
58 byte buildArpeggioTable(const byte intervals[8], byte mask, byte *outTable, byte maxLen, bool includeBase);
59 
60 } // End of namespace WBCommon
61 
64  uint32 periodTable; // 48 x uint16 BE
65  uint32 samplePtrTable; // numSamples x uint32 BE
66  uint32 instrumentTable; // numInstruments x 8 bytes
67  uint32 arpeggioIntervals; // 8 bytes
68  uint32 envelopeTable; // numEnvelopes x 8 bytes
69  uint32 songTable; // 2 songs x 4 channels x uint32 BE
70  uint32 patternPtrTable; // up to 128 x uint32 BE
71  int numSamples;
72  int numInstruments;
73  int numEnvelopes;
74 };
75 
88 Audio::AudioStream *makeWallyBebenStream(const byte *data, uint32 dataSize,
89  int songNum = 1, int rate = 44100,
90  bool stereo = true,
91  const WBTableOffsets *offsets = nullptr);
92 
93 } // End of namespace Freescape
94 
95 #endif
Definition: area.h:36
Definition: audiostream.h:50
Audio::AudioStream * makeWallyBebenStream(const byte *data, uint32 dataSize, int songNum=1, int rate=44100, bool stereo=true, const WBTableOffsets *offsets=nullptr)
Definition: wb.h:63