mirror of
https://github.com/zeldaret/ss
synced 2026-07-27 22:59:45 -04:00
Cleanups
This commit is contained in:
+5
-5
@@ -159,9 +159,9 @@ bool DynamicModuleControl::do_load() {
|
||||
snprintf(buf, sizeof(buf), "%s/%sNP.rel", sRelsDir, mName);
|
||||
if (mModule == nullptr) {
|
||||
if (sArchive != nullptr) {
|
||||
sDvdFile = fn_802EFE90(sArchive, buf, 1, mHeap);
|
||||
sDvdFile = mDvd_toMainRam_arc_c::createOrFail(sArchive, buf, 1, mHeap);
|
||||
} else {
|
||||
sDvdFile = fn_802F0030(buf, 1, mHeap);
|
||||
sDvdFile = mDvd_toMainRam_normal_c::createOrFail(buf, 1, mHeap);
|
||||
}
|
||||
|
||||
if (sDvdFile != nullptr) {
|
||||
@@ -170,7 +170,7 @@ bool DynamicModuleControl::do_load() {
|
||||
void *ptr = sDvdFile->mDataPtr;
|
||||
sDvdFile->mDataPtr = nullptr;
|
||||
mModule = static_cast<OSModuleHeader *>(ptr);
|
||||
fn_802EF480(sDvdFile);
|
||||
sDvdFile->do_delete();
|
||||
sDvdFile = nullptr;
|
||||
if (mModule != nullptr) {
|
||||
unk_40 = 0;
|
||||
@@ -198,7 +198,7 @@ BOOL DynamicModuleControl::do_load_async() {
|
||||
}
|
||||
|
||||
if (mDvdCallbackRequest != nullptr && mDvdCallbackRequest->mStatus != 0) {
|
||||
fn_802EF480(mDvdCallbackRequest);
|
||||
mDvdCallbackRequest->do_delete();
|
||||
mDvdCallbackRequest = nullptr;
|
||||
return true;
|
||||
} else {
|
||||
@@ -351,6 +351,7 @@ void DbMapFile::Unregister() {
|
||||
unk_0 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
void ModuleProlog() {}
|
||||
@@ -370,5 +371,4 @@ void ModuleDestructorsX(void (**ptrs)()) {
|
||||
(*ptrs)();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ void *loader_c::request(const char *path, u8 mountDirection, EGG::Heap *heap) {
|
||||
mpBuffer = mpCommand->mDataPtr;
|
||||
mSize = mpCommand->mAmountRead;
|
||||
mpCommand->mDataPtr = nullptr;
|
||||
fn_802EF480(mpCommand);
|
||||
mpCommand->do_delete();
|
||||
mpCommand = nullptr;
|
||||
return mpBuffer;
|
||||
} else {
|
||||
|
||||
+5
-5
@@ -309,8 +309,8 @@ mDvd_command_c::mDvd_command_c() {
|
||||
}
|
||||
|
||||
/** 802ef480 */
|
||||
extern "C" void fn_802EF480(mDvd_command_c *cmd) {
|
||||
delete cmd;
|
||||
void mDvd_command_c::do_delete() {
|
||||
delete this;
|
||||
}
|
||||
|
||||
/** 802ef4a0 */
|
||||
@@ -318,7 +318,7 @@ void mDvd_command_c::destroy(mDvd_command_c **cmd) {
|
||||
// TODO fake match, this looks like an inlined dtor
|
||||
if (cmd != nullptr && cmd != nullptr && *cmd != nullptr) {
|
||||
(*cmd)->done();
|
||||
fn_802EF480(*cmd);
|
||||
(*cmd)->do_delete();
|
||||
*cmd = nullptr;
|
||||
}
|
||||
}
|
||||
@@ -568,7 +568,7 @@ mDvd_toMainRam_arc_c *mDvd_toMainRam_arc_c::create(EGG::Archive *arc, const char
|
||||
}
|
||||
|
||||
/** 802efe90 */
|
||||
extern "C" mDvd_toMainRam_arc_c *fn_802EFE90(EGG::Archive *arc, const char *path, int mountDirection, EGG::Heap *heap) {
|
||||
mDvd_toMainRam_arc_c *mDvd_toMainRam_arc_c::createOrFail(EGG::Archive *arc, const char *path, int mountDirection, EGG::Heap *heap) {
|
||||
mDvd_toMainRam_arc_c *cmd = mDvd_toMainRam_arc_c::create(arc, path, mountDirection, heap);
|
||||
while (!cmd) {}
|
||||
return cmd;
|
||||
@@ -608,7 +608,7 @@ mDvd_toMainRam_normal_c *mDvd_toMainRam_normal_c::create(const char *path, int m
|
||||
}
|
||||
|
||||
/** 802f0030 */
|
||||
extern "C" mDvd_toMainRam_normal_c *fn_802F0030(const char *path, int mountDirection, EGG::Heap *heap) {
|
||||
mDvd_toMainRam_normal_c *mDvd_toMainRam_normal_c::createOrFail(const char *path, int mountDirection, EGG::Heap *heap) {
|
||||
mDvd_toMainRam_normal_c *cmd = mDvd_toMainRam_normal_c::create(path, mountDirection, heap);
|
||||
while (!cmd) {}
|
||||
return cmd;
|
||||
|
||||
Reference in New Issue
Block a user