mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-28 09:13:10 -04:00
project cleanup (#2895)
* some wii OS fixes * remove old dol2asm comments * remove dol2asm.h * remove function address comments * normalize ATTRIBUTE_ALIGN usage * DECL_WEAK macro * fix gcc attribute weak macro * wrap more mwcc specific things in ifdefs * fixes * fix revo sdk version flags * fixes
This commit is contained in:
@@ -5,24 +5,18 @@
|
||||
#include "ctype.h"
|
||||
#include "global.h"
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80451418-80451420 000918 0004+04 2/2 3/3 0/0 .sbss sCurrentVolume__13JKRFileLoader */
|
||||
JKRFileLoader* JKRFileLoader::sCurrentVolume;
|
||||
/* 80434354-80434360 061074 000C+00 5/5 14/14 0/0 .bss sVolumeList__13JKRFileLoader */
|
||||
JSUList<JKRFileLoader> JKRFileLoader::sVolumeList;
|
||||
|
||||
/* 802D40F0-802D4148 2CEA30 0058+00 0/0 2/2 0/0 .text __ct__13JKRFileLoaderFv */
|
||||
JKRFileLoader::JKRFileLoader(void)
|
||||
: mFileLoaderLink(this), mVolumeName(NULL), mVolumeType(0), mMountCount(0) {}
|
||||
|
||||
/* 802D4148-802D41D4 2CEA88 008C+00 1/0 2/2 0/0 .text __dt__13JKRFileLoaderFv */
|
||||
JKRFileLoader::~JKRFileLoader() {
|
||||
if (getCurrentVolume() == this) {
|
||||
setCurrentVolume(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* 802D41D4-802D4224 2CEB14 0050+00 1/0 6/0 0/0 .text unmount__13JKRFileLoaderFv */
|
||||
void JKRFileLoader::unmount(void) {
|
||||
s32 count = mMountCount;
|
||||
if (mMountCount != 0) {
|
||||
@@ -34,8 +28,6 @@ void JKRFileLoader::unmount(void) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 802D4224-802D4270 2CEB64 004C+00 0/0 2/2 0/0 .text getGlbResource__13JKRFileLoaderFPCc
|
||||
*/
|
||||
void* JKRFileLoader::getGlbResource(const char* name) {
|
||||
const char* name_reference[1];
|
||||
name_reference[0] = name;
|
||||
@@ -51,8 +43,6 @@ void* JKRFileLoader::getGlbResource(const char* name) {
|
||||
return resource;
|
||||
}
|
||||
|
||||
/* 802D4270-802D4308 2CEBB0 0098+00 0/0 29/29 1/1 .text
|
||||
* getGlbResource__13JKRFileLoaderFPCcP13JKRFileLoader */
|
||||
void* JKRFileLoader::getGlbResource(const char* name, JKRFileLoader* fileLoader) {
|
||||
void* resource = NULL;
|
||||
if (fileLoader) {
|
||||
@@ -69,8 +59,6 @@ void* JKRFileLoader::getGlbResource(const char* name, JKRFileLoader* fileLoader)
|
||||
return resource;
|
||||
}
|
||||
|
||||
/* 802D4308-802D43A0 2CEC48 0098+00 0/0 1/1 0/0 .text
|
||||
* removeResource__13JKRFileLoaderFPvP13JKRFileLoader */
|
||||
bool JKRFileLoader::removeResource(void* resource, JKRFileLoader* fileLoader) {
|
||||
if (fileLoader) {
|
||||
return fileLoader->removeResource(resource);
|
||||
@@ -87,8 +75,6 @@ bool JKRFileLoader::removeResource(void* resource, JKRFileLoader* fileLoader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 802D43A0-802D4438 2CECE0 0098+00 0/0 2/2 0/0 .text
|
||||
* detachResource__13JKRFileLoaderFPvP13JKRFileLoader */
|
||||
bool JKRFileLoader::detachResource(void* resource, JKRFileLoader* fileLoader) {
|
||||
if (fileLoader) {
|
||||
return fileLoader->detachResource(resource);
|
||||
@@ -105,7 +91,6 @@ bool JKRFileLoader::detachResource(void* resource, JKRFileLoader* fileLoader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 802D4438-802D44C4 2CED78 008C+00 1/1 0/0 0/0 .text findVolume__13JKRFileLoaderFPPCc */
|
||||
JKRFileLoader* JKRFileLoader::findVolume(const char** volumeName) {
|
||||
if (*volumeName[0] != '/') {
|
||||
return getCurrentVolume();
|
||||
@@ -125,12 +110,9 @@ JKRFileLoader* JKRFileLoader::findVolume(const char** volumeName) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
||||
/* 804508C0-804508C8 000340 0002+06 1/1 0/0 0/0 .sdata rootPath$2498 */
|
||||
static char rootPath[2] = "/";
|
||||
|
||||
/* 802D44C4-802D45A0 2CEE04 00DC+00 1/1 0/0 0/0 .text fetchVolumeName__13JKRFileLoaderFPclPCc */
|
||||
const char* JKRFileLoader::fetchVolumeName(char* buffer, s32 bufferSize, const char* path) {
|
||||
if (strcmp(path, "/") == 0) {
|
||||
strcpy(buffer, rootPath);
|
||||
|
||||
Reference in New Issue
Block a user