4#include <game/cLib/c_dylink.hpp>
5#include <lib/egg/core/eggExpHeap.h>
14 virtual bool do_link()
override;
17namespace DynamicModuleCallback {
Base class for managing a relocatable module.
DynamicModuleControl(const char *name, EGG::ExpHeap *heap)
Constructs a new DynamicModuleControl.
dDynamicModuleControl(const char *name, EGG::ExpHeap *heap)
Constructs a new DynamicModuleControl.
virtual bool do_link() override
Module-specific implementation for linking the module, making it ready for use.
virtual ~dDynamicModuleControl()
Destroys the DynamicModuleControl.
void * InitCallback(void *self)
Second initialization step of the dynamic module system.
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.
Serves as the bridge between the game's profile system and the dynamic module linking system.
bool Init(int profileCount, const sDynNameTableEntry *pNameTable, int nNameTable, EGG::Heap *heap)
First initialization step of the dynamic module system.
DynamicModuleControlBase ** pDMC
A table that keeps track of which module is associated with each profile.
EGG::FrmHeap * cCc_frmHeap
The heap to be used for allocating the module handlers and the profile to module table.
void InitAsync()
Initializes the dynamic module system.
int LinkASync(ProfileName profile)
Links the module associated with the given profile.
bool InitAsyncIsDone()
Checks whether initialization has completed.
int nDMC
The number of entries in pDMC.
mDvd_callback_c * DVD
The asynchronous DVD task used during the dynamic module system initialization.
bool Unlink(ProfileName profile)
Unlinks the module associated with the given profile.
BOOL Initialized
Whether the dynamic module system has finished initializing.
An entry in the profile to module name table.
const char * mModuleName
The name of the module to load for the profile, or nullptr if the profile is statically linked.
ProfileName mProf
The profile name of this entry.