NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
snd_DvdSoundArchive.h
1#ifndef NW4R_SND_DVD_SOUND_ARCHIVE_H
2#define NW4R_SND_DVD_SOUND_ARCHIVE_H
3
4/*******************************************************************************
5 * headers
6 */
7
8#include <types.h>
9
10// WARNING: DO NOT REORDER these #include directives, data pooling depends on it
11
12// clang-format off
13#include "nw4r/ut/ut_FileStream.h" // This needs to be
14#include "nw4r/snd/snd_SoundArchive.h" // before this
15#include "nw4r/snd/snd_SoundArchiveFile.h" // before this
16#include <revolution/DVD/dvd.h>
17// clang-format on
18
19/*******************************************************************************
20 * classes and functions
21 */
22
23namespace nw4r { namespace snd
24{
25 class DvdSoundArchive : public SoundArchive
26 {
27 public:
28 class DvdFileStream;
29 DvdSoundArchive();
30 virtual ~DvdSoundArchive(); // at 0x8
31
32 virtual const void *detail_GetFileAddress(ulong /* id */) const {
33 return NULL;
34 } // at 0xC
35
36 virtual const void *detail_GetWaveDataFileAddress(ulong /* id */) const {
37 return NULL;
38 } // at 0x10
39
40 virtual int detail_GetRequiredStreamBufferSize() const; // at 0x14
41
42 virtual ut::FileStream *OpenStream(void *pBuffer, int size, ulong offset,
43 ulong length) const; // at 0x18
44
45 virtual ut::FileStream *OpenExtStream(
46 void *pBuffer, int size, const char *pExtPath, ulong offset,
47 ulong length
48 ) const; // at 0x1C
49
50 bool Open(s32 entrynum);
51 bool Open(const char *pPath);
52
53 void Close();
54
55 bool LoadHeader(void *pBuffer, ulong size);
56 bool LoadLabelStringData(void *pBuffer, ulong size);
57
58 ulong GetHeaderSize() const {
59 return mFileReader.GetInfoChunkSize();
60 }
61 ulong GetLabelStringDataSize() const {
62 return mFileReader.GetLabelStringChunkSize();
63 }
64
65 private:
66 bool LoadFileHeader();
67
68 private:
69 detail::SoundArchiveFileReader mFileReader; // at 0x108
70 DVDFileInfo mFileInfo; // at 0x14C
71 bool mOpen; // at 0x188
72 };
73}} // namespace nw4r::snd
74
75#endif // NW4R_SND_DVD_SOUND_ARCHIVE_H