|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/bases/d_res_mng.hpp>
A higher-level archive resource management class.
The dResMng_c class wraps a dRes_c instance to provide higher-level access. For more information on resource loading and management, see dRes_c.
Use the setRes() function to open multiple archives at once. Only up to MAX_NUM_RES archives can be open at the same time.
Definition at line 10 of file d_res_mng.hpp.
Classes | |
| class | resCallback_c |
| A callback class for processing resources that handles loading g3d data. More... | |
Public Member Functions | |
| dResMng_c () | |
| Constructs a new dResMng_c. | |
| virtual | ~dResMng_c () |
| Destroys this dResMng_c. | |
| void | setRes (const char *path, const char **names, int count, EGG::Heap *heap) |
| Schedules multiple archives for loading. | |
| bool | setRes (const char *path, const char *name, EGG::Heap *heap) |
| Schedules a single archive for loading. | |
| nw4r::g3d::ResFile | getRes (const char *arcName, const char *resPath) const |
| Gets a resource. | |
| nw4r::g3d::ResFile | getResSilently (const char *arcName, const char *resPath) const |
| Gets a resource without logging a message if the resource is not found. | |
| bool | syncAllRes () |
| Attempts to load the resources of an archive that has finished loading since the last call to this function. The callback is executed on all files and folders. | |
Static Public Attributes | |
| static dResMng_c * | m_instance |
| The instance of this class. | |
Private Attributes | |
| dRes_c | mRes |
| The resource manager. | |
| resCallback_c | mCallback |
| The callback for after a file has been loaded. | |
| dResMng_c::dResMng_c | ( | ) |
Constructs a new dResMng_c.
Definition at line 7 of file d_res_mng.cpp.
|
virtual |
Destroys this dResMng_c.
Definition at line 12 of file d_res_mng.cpp.
| void dResMng_c::setRes | ( | const char * | path, |
| const char ** | names, | ||
| int | count, | ||
| EGG::Heap * | heap ) |
Schedules multiple archives for loading.
| path | The path to the folder containing the archives. See the path notes in dRes_c. |
| names | An array of archive names. See the path notes in dRes_c. |
| count | The number of archives in the array. |
| heap | The heap to load the archives into, or nullptr to use the default archive heap. |
Definition at line 31 of file d_res_mng.cpp.
| bool dResMng_c::setRes | ( | const char * | path, |
| const char * | name, | ||
| EGG::Heap * | heap ) |
Schedules a single archive for loading.
| path | The path to the folder containing the archive. See the path notes in dRes_c. |
| name | The name of the archive. See the path notes in dRes_c. |
| heap | The heap to load the archive into, or nullptr to use the default archive heap. |
Definition at line 37 of file d_res_mng.cpp.
|
inline |
Gets a resource.
| arcName | The name of the archive which contains the resource. See the path notes. |
| resPath | The path to the resource within the archive. See the path notes. |
Definition at line 42 of file d_res_mng.hpp.
|
inline |
Gets a resource without logging a message if the resource is not found.
Definition at line 47 of file d_res_mng.hpp.
|
inline |
Attempts to load the resources of an archive that has finished loading since the last call to this function. The callback is executed on all files and folders.
Definition at line 52 of file d_res_mng.hpp.
|
private |
The resource manager.
Definition at line 57 of file d_res_mng.hpp.
|
private |
The callback for after a file has been loaded.
Definition at line 58 of file d_res_mng.hpp.
|
static |
The instance of this class.
Definition at line 61 of file d_res_mng.hpp.