RedCore
Loading...
Searching...
No Matches
Mod.h
Go to the documentation of this file.
1#pragma once
2
3#include <audio/cafe/seadAudioSoundHeapCafe.h>
4#include <container/seadStrTreeMap.h>
5#include <filedevice/seadAliasFileDevice.h>
6
7#include <sound/AudAudioPlayer.h>
8
9#include <red/audio/AudioObject.h>
10
11namespace red {
12
13class Mod
14{
15public:
17 {
18 public:
19 FileSystem(const char* nameSpace);
21
23 {
24 return &mFileDevice;
25 }
26
27 private:
28 sead::AliasFileDevice mFileDevice;
29 };
30
32 {
33 public:
34 AudioSystem(const char* nameSpace);
36
38 {
39 return &mAudioPlayer;
40 }
41
43 {
44 return &mAudioObject;
45 }
46
47 bool loadData(const char* itemName, u32 loadFlag = 0xFFFFFFFF, sead::AudioSoundHeapCafe* soundHeap = nullptr);
48 void update();
49
50 private:
51 AudAudioPlayer mAudioPlayer;
52 AudioObject mAudioObject;
53 };
54
55 static const u32 cModNameMax = 32;
56
57public:
58 explicit Mod(const char* nameSpace);
59 ~Mod();
60
61 const char* getNamespace() const
62 {
63 return mNamespace;
64 }
65
67 {
68 return mFileSystem;
69 }
70
72 {
73 return mAudioSystem;
74 }
75
76 static Mod* getMod(const char* nameSpace);
77 static Mod* findModFromID(const char* id, sead::BufferedSafeString* noModID);
78
79 bool initFileSystem(sead::Heap* heap);
80 bool initAudioSystem(sead::Heap* heap);
81
82private:
83 const char* mNamespace;
84 FileSystem* mFileSystem;
85 AudioSystem* mAudioSystem;
86};
87
88} // namespace red
Definition Mod.h:32
AudioSystem(const char *nameSpace)
AudioObject * getAudioObject()
Definition Mod.h:42
AudAudioPlayer * getAudioPlayer()
Definition Mod.h:37
bool loadData(const char *itemName, u32 loadFlag=0xFFFFFFFF, sead::AudioSoundHeapCafe *soundHeap=nullptr)
Definition Mod.h:17
FileSystem(const char *nameSpace)
sead::FileDevice * getFileDevice()
Definition Mod.h:22
Definition Mod.h:14
bool initFileSystem(sead::Heap *heap)
static Mod * getMod(const char *nameSpace)
FileSystem * getFileSystem()
Definition Mod.h:66
static const u32 cModNameMax
Definition Mod.h:55
AudioSystem * getAudioSystem()
Definition Mod.h:71
const char * getNamespace() const
Definition Mod.h:61
bool initAudioSystem(sead::Heap *heap)
static Mod * findModFromID(const char *id, sead::BufferedSafeString *noModID)
Mod(const char *nameSpace)
Definition ActorDonutBlock.h:5