diff --git a/include/JSystem/JGadget/linklist.h b/include/JSystem/JGadget/linklist.h index 1a3390f1ac5..fb7c08e8e8f 100644 --- a/include/JSystem/JGadget/linklist.h +++ b/include/JSystem/JGadget/linklist.h @@ -55,10 +55,8 @@ struct TLinkList : public TNodeLinkList { iterator(TNodeLinkList::iterator iter) : TNodeLinkList::iterator(iter) {} }; - TLinkListNode* Element_toNode(T* element) const { - return &element->mListNode; - } - + TLinkListNode* Element_toNode(T* element) const { return &element->mListNode; } + void Insert(TLinkList::iterator iter, T* element) { TLinkListNode* node = Element_toNode(element); TNodeLinkList::Insert(iter, node); diff --git a/include/JSystem/JUtility/JUTConsole.h b/include/JSystem/JUtility/JUTConsole.h index 9c73f30cc7a..5d1668f1739 100644 --- a/include/JSystem/JUtility/JUTConsole.h +++ b/include/JSystem/JUtility/JUTConsole.h @@ -51,9 +51,7 @@ public: *((u8*)mBuf + (field_0x20 + 2) * param_0) = param_1; } - u8* getLinePtr(int param_0) const { - return ((u8*)mBuf + (field_0x20 + 2) * param_0 + 1); - } + u8* getLinePtr(int param_0) const { return ((u8*)mBuf + (field_0x20 + 2) * param_0 + 1); } int diffIndex(int param_0, int param_1) const { int diff = param_1 - param_0; @@ -64,6 +62,7 @@ public: } /* 0x18 */ JGadget::TLinkListNode mListNode; + private: /* 0x20 */ u32 field_0x20; /* 0x24 */ u32 field_0x24; diff --git a/include/m_Do/m_Do_printf.h b/include/m_Do/m_Do_printf.h index a0e5d4a7f17..fe48724a905 100644 --- a/include/m_Do/m_Do_printf.h +++ b/include/m_Do/m_Do_printf.h @@ -4,8 +4,8 @@ #include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/char_io.h" #include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h" #include "Runtime.PPCEABI.H/__va_arg.h" -#include "m_Do/m_Do_main.h" #include "dolphin/types.h" +#include "m_Do/m_Do_main.h" void my_PutString(const char*); void mDoPrintf_vprintf_Interrupt(char const*, __va_list_struct*); diff --git a/libs/JSystem/JUtility/JUTConsole.cpp b/libs/JSystem/JUtility/JUTConsole.cpp index 3222bcc4cd4..d3eea0f5bf2 100644 --- a/libs/JSystem/JUtility/JUTConsole.cpp +++ b/libs/JSystem/JUtility/JUTConsole.cpp @@ -141,11 +141,11 @@ JUTConsole::JUTConsole(unsigned int param_0, unsigned int param_1, bool param_2) field_0x2c = param_2; field_0x20 = param_0; field_0x24 = param_1; - + mPositionX = 30; mPositionY = 50; mHeight = 20; - + if (mHeight > field_0x24) { mHeight = field_0x24; } diff --git a/src/m_Do/m_Do_machine_exception.cpp b/src/m_Do/m_Do_machine_exception.cpp index c6589cd039d..5e912995701 100644 --- a/src/m_Do/m_Do_machine_exception.cpp +++ b/src/m_Do/m_Do_machine_exception.cpp @@ -7,12 +7,12 @@ #include "JSystem/JFramework/JFWSystem.h" #include "JSystem/JKernel/JKRAram.h" #include "JSystem/JUtility/JUTConsole.h" +#include "Runtime.PPCEABI.H/__va_arg.h" #include "d/com/d_com_inf_game.h" #include "dol2asm.h" #include "dolphin/types.h" #include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_main.h" -#include "Runtime.PPCEABI.H/__va_arg.h" // // Types: diff --git a/src/m_Do/m_Do_printf.cpp b/src/m_Do/m_Do_printf.cpp index 7cd2475e857..6be1d0d7ad0 100644 --- a/src/m_Do/m_Do_printf.cpp +++ b/src/m_Do/m_Do_printf.cpp @@ -5,8 +5,8 @@ #include "m_Do/m_Do_printf.h" #include "dol2asm.h" -#include "dolphin/types.h" #include "dolphin/os/OS.h" +#include "dolphin/types.h" // // Forward References: @@ -51,7 +51,7 @@ extern "C" s32 fflush(FILE*); #pragma optimization_level 0 #pragma optimizewithasm off asm void OSSwitchFiberEx(u32 param_0, u32 param_1, u32 param_2, u32 param_3, u32 param_4, - u32 param_5) { + u32 param_5) { nofralloc #include "asm/m_Do/m_Do_printf/OSSwitchFiberEx__FUlUlUlUlUlUl.s" } @@ -134,7 +134,8 @@ void mDoPrintf_vprintf_Interrupt(char const* fmt, __va_list_struct* args) { s32 interruptStatus = OSDisableInterrupts(); if (!data_80450BB5) { data_80450BB5 = true; - OSSwitchFiberEx((u32)fmt, (u32)args, 0, 0, (u32)vprintf, (u32)&mDoPrintf_FiberStack + sizeof(mDoPrintf_FiberStack)); + OSSwitchFiberEx((u32)fmt, (u32)args, 0, 0, (u32)vprintf, + (u32)&mDoPrintf_FiberStack + sizeof(mDoPrintf_FiberStack)); data_80450BB5 = false; } OSRestoreInterrupts(interruptStatus); @@ -268,7 +269,7 @@ void OSPanic(const char* file, s32 line, const char* fmt, ...) { va_list args; va_start(args, fmt); - + mDoPrintf_vprintf(fmt, args); OSAttention(" in \"%s\" on line %d.\n", file, line); OSAttention("\nAddress: Back Chain LR Save\n"); @@ -276,7 +277,8 @@ void OSPanic(const char* file, s32 line, const char* fmt, ...) { u32 tmp = 0; u8* stackPtr = OSGetStackPointer(); while (stackPtr != NULL && tmp < 0x10) { - OSAttention("0x%08x: 0x%08x 0x%08x\n", stackPtr, *(u32*)stackPtr, *(u32*)(stackPtr + 4)); + OSAttention("0x%08x: 0x%08x 0x%08x\n", stackPtr, *(u32*)stackPtr, + *(u32*)(stackPtr + 4)); stackPtr++; tmp++; }