diff options
| author | robojumper <robojumper@gmail.com> | 2024-05-20 23:28:05 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2024-05-20 23:28:05 +0200 |
| commit | 2a612801adeebec9940601a1a6912f43a7d7b64b (patch) | |
| tree | 5a2a6347538a622094f2dedbdb19b3c5b50bc8af /src/d/d_dylink.cpp | |
| parent | c1ca74d657fb11b67435d6e5679ab6482c4c5516 (diff) | |
Fixup
Diffstat (limited to 'src/d/d_dylink.cpp')
| -rw-r--r-- | src/d/d_dylink.cpp | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/src/d/d_dylink.cpp b/src/d/d_dylink.cpp index a0e742d0..3bec3f39 100644 --- a/src/d/d_dylink.cpp +++ b/src/d/d_dylink.cpp @@ -1,4 +1,5 @@ #include <common.h> +#include <DynamicLink.h> #include <d/d_dylink.h> #include <m/m_dvd.h> #include <m/m_heap.h> @@ -11,44 +12,6 @@ struct RelNamePtr { const char *name; }; -struct DynamicModuleControl { - u16 loadCount; - - DynamicModuleControl *mpPrev; - DynamicModuleControl *mpNext; - - DynamicModuleControl(const char *name, EGG::Heap *heap); - virtual ~DynamicModuleControl(); - virtual const char *getModuleName(); - virtual UNKWORD getModuleSize(); - virtual const char *getModuleTypeString(); - virtual void dump(); - virtual bool do_load(); - virtual bool do_load_async(); - virtual bool do_unload(); - virtual bool do_link(); - virtual bool do_unlink(); - - bool link(); - bool unlink(); - bool load_async(); - - void *rel; - void *bss; - bool dataFromProlog; - const char *name; - bool includesType; - mDvd_callback_c *dvdCallbackRequest; - EGG::Heap *heap; - bool relMapFile; - UNKWORD unk1; - UNKWORD unk2; - UNKWORD unk3; - UNKWORD unk4; - UNKWORD unk5; - UNKWORD unk6; -}; - static RelNamePtr *pDynamicNameTable; static int nDynamicNameTable; @@ -98,7 +61,7 @@ extern "C" int fn_80052E00(int maxRelId, RelNamePtr *dynNameTable, int dynNameTa // isLoaded? extern "C" bool fn_80052FA0(u16 relId) { - return pDMC[relId] != nullptr ? (bool)pDMC[relId]->loadCount : true; + return pDMC[relId] != nullptr ? pDMC[relId]->isLinked() : true; } bool dDyl::Unlink(u16 relId) { @@ -118,6 +81,7 @@ extern "C" int fn_80052FF0(u16 relId) { DynamicModuleControl *dmc = pDMC[relId]; if (dmc != nullptr) { if (dmc->load_async()) { + // what is going on here? return (bool)dmc->link() + 2; } else { return 0; |
