NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
snd_MmlSeqTrackAllocator.h
1#ifndef NW4R_SND_MML_SEQ_TRACK_ALLOCATOR_H
2#define NW4R_SND_MML_SEQ_TRACK_ALLOCATOR_H
3
4/*******************************************************************************
5 * headers
6 */
7
8#include <types.h>
9
10#include "nw4r/snd/snd_InstancePool.h"
11#include "nw4r/snd/snd_SeqTrackAllocator.h"
12
13/*******************************************************************************
14 * classes and functions
15 */
16
17// forward declarations
18namespace nw4r { namespace snd { namespace detail { class MmlParser; }}}
19namespace nw4r { namespace snd { namespace detail { class MmlSeqTrack; }}}
20
21namespace nw4r { namespace snd { namespace detail
22{
23 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x314e0
24 class MmlSeqTrackAllocator : public SeqTrackAllocator
25 {
26 // methods
27 public:
28 // cdtors
29 MmlSeqTrackAllocator(MmlParser *parser) : mParser(parser) {}
30
31 // virtual function ordering
32 // vtable SeqTrackAllocator
33 virtual SeqTrack *AllocTrack(SeqPlayer *player);
34 virtual void FreeTrack(SeqTrack *track);
35 virtual int GetAllocatableTrackCount() const
36 {
37 return mTrackPool.Count();
38 }
39
40 // methods
41 ulong Create(void *buffer, ulong size);
42 void Destroy(void *buffer, ulong size);
43
44 // members
45 private:
46 /* base SeqTrackAllocator */ // size 0x04, offset 0x00
47 MmlParser *mParser; // size 0x04, offset 0x04
48 InstancePool<MmlSeqTrack> mTrackPool; // size 0x04, offset 0x08
49 }; // size 0x0c
50}}} // namespace nw4r::snd::detail
51
52#endif // NW4R_SND_MML_SEQ_TRACK_ALLOCATOR_H