mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 21:21:57 -04:00
k_wmark / k_wpillar OK, fop actor enums / debug building (#1946)
* d_k_wmark / d_k_wpillar OK * make debug buildable / add assert functionality * add more fop actor enums * remove asm
This commit is contained in:
@@ -241,7 +241,7 @@ cleanup:
|
||||
}
|
||||
if (mMountMode == 0)
|
||||
{
|
||||
#if DEBUG
|
||||
#ifdef DEBUG
|
||||
OSReport(":::[%s: %d] Cannot alloc memory\n", __FILE__, 415);
|
||||
#endif
|
||||
if (mDvdFile != NULL)
|
||||
|
||||
@@ -226,7 +226,7 @@ bool JKRCompArchive::open(s32 entryNum) {
|
||||
JKRFreeToSysHeap(arcHeader);
|
||||
}
|
||||
if(mMountMode == 0) {
|
||||
#if DEBUG
|
||||
#ifdef DEBUG
|
||||
OSReport(":::[%s: %d] Cannot alloc memory in mounting CompArchive\n", __FILE__, 567);
|
||||
#endif
|
||||
if(mDvdFile != NULL) {
|
||||
|
||||
@@ -196,7 +196,7 @@ cleanup:
|
||||
}
|
||||
|
||||
if (mMountMode == UNKNOWN_MOUNT_MODE) {
|
||||
#if DEBUG
|
||||
#ifdef DEBUG
|
||||
OSReport(":::Cannot alloc memory [%s][%d]\n", __FILE__, 397);
|
||||
#endif
|
||||
if (mDvdFile) {
|
||||
|
||||
@@ -124,7 +124,7 @@ s32 JKRDvdFile::readData(void* param_1, s32 length, s32 param_3) {
|
||||
}
|
||||
|
||||
/* 802D9A68-802D9A70 2D43A8 0008+00 1/0 0/0 0/0 .text writeData__10JKRDvdFileFPCvll */
|
||||
s32 JKRDvdFile::writeData(void const* param_0, s32 param_1, s32 param_2) {
|
||||
s32 JKRDvdFile::writeData(void const* param_0, s32 length, s32 param_2) {
|
||||
/* clang-format off */
|
||||
JUT_ASSERT(344, ( length & 0x1f ) == 0);
|
||||
/* clang-format on */
|
||||
|
||||
@@ -21,6 +21,10 @@ JKRHeap* JKRHeap::sCurrentHeap;
|
||||
/* 80451378-8045137C 000878 0004+00 3/3 10/10 0/0 .sbss sRootHeap__7JKRHeap */
|
||||
JKRHeap* JKRHeap::sRootHeap;
|
||||
|
||||
#ifdef DEBUG
|
||||
JKRHeap* JKRHeap::sRootHeap2;
|
||||
#endif
|
||||
|
||||
/* 8045137C-80451380 00087C 0004+00 2/2 3/3 0/0 .sbss mErrorHandler__7JKRHeap */
|
||||
JKRErrorHandler JKRHeap::mErrorHandler;
|
||||
|
||||
@@ -389,7 +393,7 @@ void JKRHeap::copyMemory(void* dst, void* src, u32 size) {
|
||||
|
||||
/* 802CEB40-802CEB78 2C9480 0038+00 2/2 0/0 0/0 .text JKRDefaultMemoryErrorRoutine__FPvUli */
|
||||
void JKRDefaultMemoryErrorRoutine(void* heap, u32 size, int alignment) {
|
||||
#if DEBUG
|
||||
#ifdef DEBUG
|
||||
OSReport("Error: Cannot allocate memory %d(0x%x)byte in %d byte alignment from %08x\n", size,
|
||||
size, alignment, heap);
|
||||
#endif
|
||||
|
||||
@@ -116,9 +116,9 @@ bool JKRMemArchive::open(s32 entryNum, JKRArchive::EMountDirection mountDirectio
|
||||
mIsOpen = true;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
#ifdef DEBUG
|
||||
if (mMountMode == 0) {
|
||||
OSReport(":::Cannot alloc memory [%s][%d]\n", __FILE__, 460)
|
||||
OSReport(":::Cannot alloc memory [%s][%d]\n", __FILE__, 460);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -95,13 +95,13 @@ s32 JKRSolidHeap::adjustSize(void) {
|
||||
|
||||
/* 802D0CB0-802D0D58 2CB5F0 00A8+00 1/0 0/0 0/0 .text do_alloc__12JKRSolidHeapFUli */
|
||||
void* JKRSolidHeap::do_alloc(u32 size, int alignment) {
|
||||
#if DEBUG
|
||||
#ifdef DEBUG
|
||||
// TODO(Julgodis): JUTAssertion::setConfirmMessage
|
||||
if (alignment != 0) {
|
||||
/* if (alignment != 0) {
|
||||
int u = abs(alignment);
|
||||
JUT_ASSERT(219, u < 0x80);
|
||||
JUT_ASSERT(220, JGadget::binary::isPower2(u));
|
||||
}
|
||||
} */
|
||||
#endif
|
||||
|
||||
lock();
|
||||
@@ -210,8 +210,8 @@ void JKRSolidHeap::do_freeTail(void) {
|
||||
/* 802D1000-802D1004 2CB940 0004+00 1/0 0/0 0/0 .text do_fillFreeArea__12JKRSolidHeapFv
|
||||
*/
|
||||
void JKRSolidHeap::do_fillFreeArea() {
|
||||
#if DEBUG
|
||||
fillMemory(mSolidHead, mEnd - mSolidHead, (uint)DAT_8074a8ba);
|
||||
#ifdef DEBUG
|
||||
// fillMemory(mSolidHead, mEnd - mSolidHead, (uint)DAT_8074a8ba);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ void JKRThreadSwitch::callback(OSThread* current, OSThread* next) {
|
||||
next_heap = JKRHeap::getCurrentHeap();
|
||||
} else if (JKRHeap::getRootHeap()->isSubHeap(next_heap)) {
|
||||
continue;
|
||||
#if DEBUG
|
||||
#ifdef DEBUG
|
||||
} else if (!JKRHeap::getRootHeap2()->isSubHeap(next_heap)) {
|
||||
continue;
|
||||
#endif
|
||||
@@ -258,7 +258,7 @@ void JKRThreadSwitch::draw(JKRThreadName_* thread_name_list, JUTConsole* console
|
||||
const char* print_1 = " -------------------------------------\n";
|
||||
|
||||
if (!console) {
|
||||
#if DEBUG
|
||||
#ifdef DEBUG
|
||||
OSReport(print_0, getTotalCount(), (int)this->field_0x18, this->field_0x10);
|
||||
OSReport(print_1);
|
||||
#endif
|
||||
@@ -298,7 +298,7 @@ void JKRThreadSwitch::draw(JKRThreadName_* thread_name_list, JUTConsole* console
|
||||
u32 cost_int = (u32)(cost_per_0x18 * 100.0f);
|
||||
u32 cost_float = (u32)(cost_per_0x18 * 1000.0f) % 10;
|
||||
if (!console) {
|
||||
#if DEBUG
|
||||
#ifdef DEBUG
|
||||
OSReport(" [%10s] switch:%5d cost:%2d.%d%%\n", thread_print_name, switch_count,
|
||||
cost_int, cost_float);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user