mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
format
This commit is contained in:
@@ -55,10 +55,8 @@ struct TLinkList : public TNodeLinkList {
|
|||||||
iterator(TNodeLinkList::iterator iter) : TNodeLinkList::iterator(iter) {}
|
iterator(TNodeLinkList::iterator iter) : TNodeLinkList::iterator(iter) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
TLinkListNode* Element_toNode(T* element) const {
|
TLinkListNode* Element_toNode(T* element) const { return &element->mListNode; }
|
||||||
return &element->mListNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Insert(TLinkList::iterator iter, T* element) {
|
void Insert(TLinkList::iterator iter, T* element) {
|
||||||
TLinkListNode* node = Element_toNode(element);
|
TLinkListNode* node = Element_toNode(element);
|
||||||
TNodeLinkList::Insert(iter, node);
|
TNodeLinkList::Insert(iter, node);
|
||||||
|
|||||||
@@ -51,9 +51,7 @@ public:
|
|||||||
*((u8*)mBuf + (field_0x20 + 2) * param_0) = param_1;
|
*((u8*)mBuf + (field_0x20 + 2) * param_0) = param_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8* getLinePtr(int param_0) const {
|
u8* getLinePtr(int param_0) const { return ((u8*)mBuf + (field_0x20 + 2) * param_0 + 1); }
|
||||||
return ((u8*)mBuf + (field_0x20 + 2) * param_0 + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int diffIndex(int param_0, int param_1) const {
|
int diffIndex(int param_0, int param_1) const {
|
||||||
int diff = param_1 - param_0;
|
int diff = param_1 - param_0;
|
||||||
@@ -64,6 +62,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 0x18 */ JGadget::TLinkListNode mListNode;
|
/* 0x18 */ JGadget::TLinkListNode mListNode;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* 0x20 */ u32 field_0x20;
|
/* 0x20 */ u32 field_0x20;
|
||||||
/* 0x24 */ u32 field_0x24;
|
/* 0x24 */ u32 field_0x24;
|
||||||
|
|||||||
@@ -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/char_io.h"
|
||||||
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h"
|
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h"
|
||||||
#include "Runtime.PPCEABI.H/__va_arg.h"
|
#include "Runtime.PPCEABI.H/__va_arg.h"
|
||||||
#include "m_Do/m_Do_main.h"
|
|
||||||
#include "dolphin/types.h"
|
#include "dolphin/types.h"
|
||||||
|
#include "m_Do/m_Do_main.h"
|
||||||
|
|
||||||
void my_PutString(const char*);
|
void my_PutString(const char*);
|
||||||
void mDoPrintf_vprintf_Interrupt(char const*, __va_list_struct*);
|
void mDoPrintf_vprintf_Interrupt(char const*, __va_list_struct*);
|
||||||
|
|||||||
@@ -141,11 +141,11 @@ JUTConsole::JUTConsole(unsigned int param_0, unsigned int param_1, bool param_2)
|
|||||||
field_0x2c = param_2;
|
field_0x2c = param_2;
|
||||||
field_0x20 = param_0;
|
field_0x20 = param_0;
|
||||||
field_0x24 = param_1;
|
field_0x24 = param_1;
|
||||||
|
|
||||||
mPositionX = 30;
|
mPositionX = 30;
|
||||||
mPositionY = 50;
|
mPositionY = 50;
|
||||||
mHeight = 20;
|
mHeight = 20;
|
||||||
|
|
||||||
if (mHeight > field_0x24) {
|
if (mHeight > field_0x24) {
|
||||||
mHeight = field_0x24;
|
mHeight = field_0x24;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
#include "JSystem/JFramework/JFWSystem.h"
|
#include "JSystem/JFramework/JFWSystem.h"
|
||||||
#include "JSystem/JKernel/JKRAram.h"
|
#include "JSystem/JKernel/JKRAram.h"
|
||||||
#include "JSystem/JUtility/JUTConsole.h"
|
#include "JSystem/JUtility/JUTConsole.h"
|
||||||
|
#include "Runtime.PPCEABI.H/__va_arg.h"
|
||||||
#include "d/com/d_com_inf_game.h"
|
#include "d/com/d_com_inf_game.h"
|
||||||
#include "dol2asm.h"
|
#include "dol2asm.h"
|
||||||
#include "dolphin/types.h"
|
#include "dolphin/types.h"
|
||||||
#include "m_Do/m_Do_ext.h"
|
#include "m_Do/m_Do_ext.h"
|
||||||
#include "m_Do/m_Do_main.h"
|
#include "m_Do/m_Do_main.h"
|
||||||
#include "Runtime.PPCEABI.H/__va_arg.h"
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Types:
|
// Types:
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
#include "m_Do/m_Do_printf.h"
|
#include "m_Do/m_Do_printf.h"
|
||||||
#include "dol2asm.h"
|
#include "dol2asm.h"
|
||||||
#include "dolphin/types.h"
|
|
||||||
#include "dolphin/os/OS.h"
|
#include "dolphin/os/OS.h"
|
||||||
|
#include "dolphin/types.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Forward References:
|
// Forward References:
|
||||||
@@ -51,7 +51,7 @@ extern "C" s32 fflush(FILE*);
|
|||||||
#pragma optimization_level 0
|
#pragma optimization_level 0
|
||||||
#pragma optimizewithasm off
|
#pragma optimizewithasm off
|
||||||
asm void OSSwitchFiberEx(u32 param_0, u32 param_1, u32 param_2, u32 param_3, u32 param_4,
|
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
|
nofralloc
|
||||||
#include "asm/m_Do/m_Do_printf/OSSwitchFiberEx__FUlUlUlUlUlUl.s"
|
#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();
|
s32 interruptStatus = OSDisableInterrupts();
|
||||||
if (!data_80450BB5) {
|
if (!data_80450BB5) {
|
||||||
data_80450BB5 = true;
|
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;
|
data_80450BB5 = false;
|
||||||
}
|
}
|
||||||
OSRestoreInterrupts(interruptStatus);
|
OSRestoreInterrupts(interruptStatus);
|
||||||
@@ -268,7 +269,7 @@ void OSPanic(const char* file, s32 line, const char* fmt, ...) {
|
|||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
|
||||||
mDoPrintf_vprintf(fmt, args);
|
mDoPrintf_vprintf(fmt, args);
|
||||||
OSAttention(" in \"%s\" on line %d.\n", file, line);
|
OSAttention(" in \"%s\" on line %d.\n", file, line);
|
||||||
OSAttention("\nAddress: Back Chain LR Save\n");
|
OSAttention("\nAddress: Back Chain LR Save\n");
|
||||||
@@ -276,7 +277,8 @@ void OSPanic(const char* file, s32 line, const char* fmt, ...) {
|
|||||||
u32 tmp = 0;
|
u32 tmp = 0;
|
||||||
u8* stackPtr = OSGetStackPointer();
|
u8* stackPtr = OSGetStackPointer();
|
||||||
while (stackPtr != NULL && tmp < 0x10) {
|
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++;
|
stackPtr++;
|
||||||
tmp++;
|
tmp++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user