mirror of
https://github.com/zeldaret/ss
synced 2026-05-31 01:15:38 -04:00
Cleanups
This commit is contained in:
@@ -17753,7 +17753,7 @@ removeCommand__12mDvd_param_cFP14mDvd_command_c = .text:0x802EF310; // type:func
|
||||
executeCB__12mDvd_param_cFPP14mDvd_command_c = .text:0x802EF3D0; // type:function size:0x34
|
||||
mainLoop__12mDvd_param_cFv = .text:0x802EF410; // type:function size:0x4C
|
||||
__ct__14mDvd_command_cFv = .text:0x802EF460; // type:function size:0x1C
|
||||
fn_802EF480 = .text:0x802EF480; // type:function size:0x20
|
||||
do_delete__14mDvd_command_cFv = .text:0x802EF480; // type:function size:0x20
|
||||
destroy__14mDvd_command_cFPP14mDvd_command_c = .text:0x802EF4A0; // type:function size:0x54
|
||||
__dt__15mDvd_callback_cFv = .text:0x802EF500; // type:function size:0x58
|
||||
__ct__15mDvd_callback_cFPFPv_bPv = .text:0x802EF560; // type:function size:0x64
|
||||
@@ -17777,11 +17777,11 @@ __dt__20mDvd_toMainRam_arc_cFv = .text:0x802EFCE0; // type:function size:0x58
|
||||
__ct__20mDvd_toMainRam_arc_cFPQ23EGG7Archiveii = .text:0x802EFD40; // type:function size:0x60
|
||||
makeRequest__20mDvd_toMainRam_arc_cFPQ23EGG7ArchiveiiPQ23EGG4Heap = .text:0x802EFDA0; // type:function size:0x80
|
||||
create__20mDvd_toMainRam_arc_cFPQ23EGG7ArchivePCciPQ23EGG4Heap = .text:0x802EFE20; // type:function size:0x64
|
||||
fn_802EFE90 = .text:0x802EFE90; // type:function size:0x30
|
||||
createOrFail__20mDvd_toMainRam_arc_cFPQ23EGG7ArchivePCciPQ23EGG4Heap = .text:0x802EFE90; // type:function size:0x30
|
||||
execute__20mDvd_toMainRam_arc_cFv = .text:0x802EFEC0; // type:function size:0x78
|
||||
__ct__23mDvd_toMainRam_normal_cFi = .text:0x802EFF40; // type:function size:0x4C
|
||||
create__23mDvd_toMainRam_normal_cFPCciPQ23EGG4Heap = .text:0x802EFF90; // type:function size:0x9C
|
||||
fn_802F0030 = .text:0x802F0030; // type:function size:0x30
|
||||
createOrFail__23mDvd_toMainRam_normal_cFPCciPQ23EGG4Heap = .text:0x802F0030; // type:function size:0x30
|
||||
create2__23mDvd_toMainRam_normal_cFPP23mDvd_toMainRam_normal_cPCciPQ23EGG4Heap = .text:0x802F0060; // type:function size:0x48
|
||||
__dt__23mDvd_toMainRam_normal_cFv = .text:0x802F00B0; // type:function size:0x58
|
||||
execute__23mDvd_toMainRam_normal_cFv = .text:0x802F0110; // type:function size:0xA0
|
||||
|
||||
@@ -25,17 +25,6 @@ private:
|
||||
void* mpBuffer;
|
||||
};
|
||||
|
||||
class unkstruct_c {
|
||||
public:
|
||||
static unkstruct_c *create(EGG::Heap *heap);
|
||||
void init();
|
||||
char getUnk();
|
||||
|
||||
private:
|
||||
UNKWORD field_0x0;
|
||||
char field_0x4;
|
||||
};
|
||||
|
||||
} // dDvd
|
||||
|
||||
#endif
|
||||
|
||||
+5
-4
@@ -7,6 +7,8 @@
|
||||
#include <egg/core/eggThread.h>
|
||||
#include <m/m_heap.h>
|
||||
|
||||
// Note: names are taken from NSMBW where available but a lot are made up
|
||||
|
||||
void unk_initDecompressors();
|
||||
|
||||
namespace mDvd {
|
||||
@@ -56,6 +58,7 @@ public:
|
||||
void waitDone();
|
||||
void waitUntilDone();
|
||||
static void destroy(mDvd_command_c **cmd);
|
||||
void do_delete();
|
||||
|
||||
void *operator new(size_t size);
|
||||
void operator delete(void *ptr);
|
||||
@@ -117,6 +120,7 @@ public:
|
||||
|
||||
static mDvd_toMainRam_arc_c *makeRequest(EGG::Archive *arc, int entryNum, int mountDirection, EGG::Heap *heap);
|
||||
static mDvd_toMainRam_arc_c *create(EGG::Archive *arc, const char *path, int mountDirection, EGG::Heap *heap);
|
||||
static mDvd_toMainRam_arc_c *createOrFail(EGG::Archive *arc, const char *path, int mountDirection, EGG::Heap *heap);
|
||||
|
||||
EGG::Archive *mArcPtr;
|
||||
int mEntryNum;
|
||||
@@ -130,6 +134,7 @@ public:
|
||||
virtual void doClear();
|
||||
|
||||
static mDvd_toMainRam_normal_c *create(const char *path, int mountDirection, EGG::Heap *heap);
|
||||
static mDvd_toMainRam_normal_c *createOrFail(const char *path, int mountDirection, EGG::Heap *heap);
|
||||
static void create2(mDvd_toMainRam_normal_c **cmd, const char *path, int mountDirection, EGG::Heap *heap);
|
||||
|
||||
u8 mCompressionType2;
|
||||
@@ -178,8 +183,4 @@ public:
|
||||
};
|
||||
} // namespace mDvd
|
||||
|
||||
extern "C" void fn_802EF480(mDvd_command_c *cmd);
|
||||
extern "C" mDvd_toMainRam_normal_c *fn_802F0030(const char *path, int mountDirection, EGG::Heap *heap);
|
||||
extern "C" mDvd_toMainRam_arc_c *fn_802EFE90(EGG::Archive *arc, const char *path, int mountDirection, EGG::Heap *heap);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef OSLINK_H
|
||||
#define OSLINK_H
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+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