NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
snd_NandSoundArchive.h
1#ifndef NW4R_SND_NAND_SOUND_ARCHIVE_H
2#define NW4R_SND_NAND_SOUND_ARCHIVE_H
3#include "nw4r/snd/snd_SoundArchive.h"
4#include "nw4r/snd/snd_SoundArchiveFile.h"
5#include "nw4r/types_nw4r.h"
6#include "nw4r/ut.h" // IWYU pragma: export
7#include <revolution/NAND.h> // IWYU pragma: export
8
9namespace nw4r {
10namespace snd {
11
12class NandSoundArchive : public SoundArchive {
13private:
14 struct NandFileStream;
15
16public:
17 NandSoundArchive();
18 virtual ~NandSoundArchive(); // at 0x8
19
20 virtual const void *detail_GetFileAddress(ulong /* id */) const {
21 return NULL;
22 } // at 0xC
23
24 virtual const void *detail_GetWaveDataFileAddress(ulong /* id */) const {
25 return NULL;
26 } // at 0x10
27
28 virtual int detail_GetRequiredStreamBufferSize() const; // at 0x14
29
30 virtual ut::FileStream *OpenStream(void *pBuffer, int size, ulong offset,
31 ulong length) const; // at 0x18
32
33 virtual ut::FileStream *OpenExtStream(
34 void *pBuffer, int size, const char *pExtPath, ulong offset,
35 ulong length
36 ) const; // at 0x1C
37
38 bool Open(const char *pPath);
39 void Close();
40
41 bool LoadHeader(void *pBuffer, ulong size);
42 bool LoadLabelStringData(void *pBuffer, ulong size);
43
44 ulong GetHeaderSize() const {
45 return mFileReader.GetInfoChunkSize();
46 }
47 ulong GetLabelStringDataSize() const {
48 return mFileReader.GetLabelStringChunkSize();
49 }
50
51private:
52 bool LoadFileHeader() DONT_INLINE;
53
54private:
55 detail::SoundArchiveFileReader mFileReader; // at 0x108
56 NANDFileInfo mFileInfo; // at 0x14C
57 bool mOpen; // at 0x1D8
58};
59
60} // namespace snd
61} // namespace nw4r
62
63#endif