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:
@@ -4,15 +4,12 @@
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
|
||||
/* 8043436C-80434378 06108C 000C+00 4/4 0/0 0/0 .bss sDvdList__10JKRDvdFile */
|
||||
JSUList<JKRDvdFile> JKRDvdFile::sDvdList;
|
||||
|
||||
/* 802D9584-802D95F8 2D3EC4 0074+00 0/0 3/3 0/0 .text __ct__10JKRDvdFileFv */
|
||||
JKRDvdFile::JKRDvdFile() : mDvdLink(this) {
|
||||
initiate();
|
||||
}
|
||||
|
||||
/* 802D95F8-802D96A0 2D3F38 00A8+00 0/0 2/2 0/0 .text __ct__10JKRDvdFileFPCc */
|
||||
JKRDvdFile::JKRDvdFile(const char* name) : mDvdLink(this) {
|
||||
initiate();
|
||||
bool result = open(name);
|
||||
@@ -24,7 +21,6 @@ JKRDvdFile::JKRDvdFile(const char* name) : mDvdLink(this) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* 802D96A0-802D9748 2D3FE0 00A8+00 0/0 3/3 0/0 .text __ct__10JKRDvdFileFl */
|
||||
JKRDvdFile::JKRDvdFile(s32 entryNum) : mDvdLink(this) {
|
||||
initiate();
|
||||
bool result = open(entryNum);
|
||||
@@ -36,12 +32,10 @@ JKRDvdFile::JKRDvdFile(s32 entryNum) : mDvdLink(this) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* 802D9748-802D97E4 2D4088 009C+00 1/0 5/5 0/0 .text __dt__10JKRDvdFileFv */
|
||||
JKRDvdFile::~JKRDvdFile() {
|
||||
close();
|
||||
}
|
||||
|
||||
/* 802D97E4-802D9850 2D4124 006C+00 3/3 0/0 0/0 .text initiate__10JKRDvdFileFv */
|
||||
void JKRDvdFile::initiate(void) {
|
||||
mDvdFile = this;
|
||||
OSInitMutex(&mMutex1);
|
||||
@@ -53,7 +47,6 @@ void JKRDvdFile::initiate(void) {
|
||||
field_0x58 = 0;
|
||||
}
|
||||
|
||||
/* 802D9850-802D98C4 2D4190 0074+00 1/0 1/1 0/0 .text open__10JKRDvdFileFPCc */
|
||||
bool JKRDvdFile::open(const char* name) {
|
||||
if (!mIsAvailable) {
|
||||
mIsAvailable = DVDOpen(name, &mFileInfo);
|
||||
@@ -65,7 +58,6 @@ bool JKRDvdFile::open(const char* name) {
|
||||
return mIsAvailable;
|
||||
}
|
||||
|
||||
/* 802D98C4-802D9938 2D4204 0074+00 1/0 2/2 0/0 .text open__10JKRDvdFileFl */
|
||||
bool JKRDvdFile::open(s32 entryNum) {
|
||||
if (!mIsAvailable) {
|
||||
mIsAvailable = DVDFastOpen(entryNum, &mFileInfo);
|
||||
@@ -77,7 +69,6 @@ bool JKRDvdFile::open(s32 entryNum) {
|
||||
return mIsAvailable;
|
||||
}
|
||||
|
||||
/* 802D9938-802D99B4 2D4278 007C+00 1/0 0/0 0/0 .text close__10JKRDvdFileFv */
|
||||
void JKRDvdFile::close() {
|
||||
if (mIsAvailable) {
|
||||
s32 result = DVDClose(&mFileInfo);
|
||||
@@ -90,7 +81,6 @@ void JKRDvdFile::close() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 802D99B4-802D9A68 2D42F4 00B4+00 1/0 0/0 0/0 .text readData__10JKRDvdFileFPvll */
|
||||
s32 JKRDvdFile::readData(void* param_1, s32 length, s32 param_3) {
|
||||
/* clang-format off */
|
||||
// The assert condition gets stringified as "( length & 0x1f ) == 0",
|
||||
@@ -120,7 +110,6 @@ s32 JKRDvdFile::readData(void* param_1, s32 length, s32 param_3) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 802D9A68-802D9A70 2D43A8 0008+00 1/0 0/0 0/0 .text writeData__10JKRDvdFileFPCvll */
|
||||
s32 JKRDvdFile::writeData(void const* param_0, s32 length, s32 param_2) {
|
||||
/* clang-format off */
|
||||
JUT_ASSERT(344, ( length & 0x1f ) == 0);
|
||||
@@ -128,7 +117,6 @@ s32 JKRDvdFile::writeData(void const* param_0, s32 length, s32 param_2) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* 802D9A70-802D9AC4 2D43B0 0054+00 1/1 0/0 0/0 .text sync__10JKRDvdFileFv */
|
||||
s32 JKRDvdFile::sync(void) {
|
||||
OSMessage message;
|
||||
OSLockMutex(&mMutex1);
|
||||
@@ -138,14 +126,12 @@ s32 JKRDvdFile::sync(void) {
|
||||
return (int)message;
|
||||
}
|
||||
|
||||
/* 802D9AC4-802D9AF8 2D4404 0034+00 1/1 0/0 0/0 .text doneProcess__10JKRDvdFileFlP11DVDFileInfo */
|
||||
void JKRDvdFile::doneProcess(s32 id, DVDFileInfo* fileInfo) {
|
||||
// fileInfo->field_0x3c looks like some kind of user pointer?
|
||||
JKRDvdFile* dvdFile = *(JKRDvdFile**)((u8*)fileInfo + 0x3c);
|
||||
OSSendMessage(&dvdFile->mMessageQueue2, (OSMessage)id, OS_MESSAGE_NOBLOCK);
|
||||
}
|
||||
|
||||
/* 802D9AF8-802D9B00 2D4438 0008+00 1/0 0/0 0/0 .text getFileSize__10JKRDvdFileCFv */
|
||||
s32 JKRDvdFile::getFileSize(void) const {
|
||||
return mFileInfo.length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user