mirror of https://github.com/zeldaret/tp.git
suggestions
This commit is contained in:
parent
eaf0fe5cae
commit
0a5d76de76
|
|
@ -47,11 +47,9 @@ public:
|
|||
|
||||
void setVisible(bool visible) { mVisible = visible; }
|
||||
|
||||
void setLineAttr(int param_0, u8 param_1) {
|
||||
*((u8*)mBuf + (field_0x20 + 2) * param_0) = param_1;
|
||||
}
|
||||
void setLineAttr(int param_0, u8 param_1) { 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 &mBuf[(field_0x20 + 2) * param_0 + 1]; }
|
||||
|
||||
int diffIndex(int param_0, int param_1) const {
|
||||
int diff = param_1 - param_0;
|
||||
|
|
@ -66,7 +64,7 @@ public:
|
|||
private:
|
||||
/* 0x20 */ u32 field_0x20;
|
||||
/* 0x24 */ u32 field_0x24;
|
||||
/* 0x28 */ void* mBuf;
|
||||
/* 0x28 */ u8* mBuf;
|
||||
/* 0x2C */ bool field_0x2c;
|
||||
/* 0x30 */ int field_0x30;
|
||||
/* 0x34 */ int field_0x34;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
#ifndef MSL_COMMON_SRC_PRINTF_H
|
||||
#define MSL_COMMON_SRC_PRINTF_H
|
||||
|
||||
#include "Runtime.PPCEABI.H/__va_arg.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct __va_list_struct;
|
||||
|
||||
extern "C" size_t sprintf(const char*, const char*, ...);
|
||||
extern "C" size_t snprintf(const char*, size_t, const char*, ...);
|
||||
extern "C" size_t vsnprintf(char*, size_t, const char*, __va_list_struct*);
|
||||
extern "C" size_t vprintf(const char*, __va_list_struct*);
|
||||
extern "C" size_t vsnprintf(char*, size_t, const char*, va_list);
|
||||
extern "C" size_t vprintf(const char*, va_list);
|
||||
extern "C" size_t printf(const char*, ...);
|
||||
|
||||
#endif /* MSL_COMMON_SRC_PRINTF_H */
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
#include "m_Do/m_Do_main.h"
|
||||
|
||||
void my_PutString(const char*);
|
||||
void mDoPrintf_vprintf_Interrupt(char const*, __va_list_struct*);
|
||||
void mDoPrintf_vprintf_Thread(char const*, __va_list_struct*);
|
||||
void mDoPrintf_vprintf(const char*, __va_list_struct*);
|
||||
void mDoPrintf_VReport(const char*, __va_list_struct*);
|
||||
void mDoPrintf_vprintf_Interrupt(char const*, va_list);
|
||||
void mDoPrintf_vprintf_Thread(char const*, va_list);
|
||||
void mDoPrintf_vprintf(const char*, va_list);
|
||||
void mDoPrintf_VReport(const char*, va_list);
|
||||
|
||||
#endif /* M_DO_M_DO_PRINTF_H */
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
//
|
||||
|
||||
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h"
|
||||
#include "Runtime.PPCEABI.H/__va_arg.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
|
|
@ -82,7 +81,7 @@ asm size_t vsnprintf(char* buffer, size_t buffer_size, const char* format, va_li
|
|||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm size_t vprintf(const char*, __va_list_struct*) {
|
||||
asm size_t vprintf(const char*, va_list) {
|
||||
nofralloc
|
||||
#include "asm/MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf/vprintf.s"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ extern "C" void OSReportInit__Fv();
|
|||
extern "C" void mDoPrintf_vprintf_Interrupt__FPCcP16__va_list_struct();
|
||||
extern "C" void mDoPrintf_vprintf_Thread__FPCcP16__va_list_struct();
|
||||
extern "C" void mDoPrintf_vprintf__FPCcP16__va_list_struct();
|
||||
extern "C" void mDoPrintf_VReport(const char* fmt, __va_list_struct* args);
|
||||
extern "C" void OSVReport(const char* fmt, __va_list_struct* args);
|
||||
extern "C" void mDoPrintf_VReport(const char* fmt, va_list args);
|
||||
extern "C" void OSVReport(const char* fmt, va_list args);
|
||||
extern "C" void OSReport(const char*, ...);
|
||||
extern "C" void OSReport_FatalError(const char* fmt, ...);
|
||||
extern "C" void OSReport_Error(const char* fmt, ...);
|
||||
|
|
@ -130,7 +130,7 @@ static u8 mDoPrintf_FiberStack[2048] ALIGN_DECL(32);
|
|||
|
||||
/* 800068DC-80006964 00121C 0088+00 1/1 0/0 0/0 .text
|
||||
* mDoPrintf_vprintf_Interrupt__FPCcP16__va_list_struct */
|
||||
void mDoPrintf_vprintf_Interrupt(char const* fmt, __va_list_struct* args) {
|
||||
void mDoPrintf_vprintf_Interrupt(char const* fmt, va_list args) {
|
||||
s32 interruptStatus = OSDisableInterrupts();
|
||||
if (!data_80450BB5) {
|
||||
data_80450BB5 = true;
|
||||
|
|
@ -143,13 +143,13 @@ void mDoPrintf_vprintf_Interrupt(char const* fmt, __va_list_struct* args) {
|
|||
|
||||
/* 80006964-80006984 0012A4 0020+00 1/1 0/0 0/0 .text
|
||||
* mDoPrintf_vprintf_Thread__FPCcP16__va_list_struct */
|
||||
void mDoPrintf_vprintf_Thread(char const* fmt, __va_list_struct* args) {
|
||||
void mDoPrintf_vprintf_Thread(char const* fmt, va_list args) {
|
||||
vprintf(fmt, args);
|
||||
}
|
||||
|
||||
/* 80006984-80006A10 0012C4 008C+00 4/4 0/0 0/0 .text mDoPrintf_vprintf__FPCcP16__va_list_struct
|
||||
*/
|
||||
void mDoPrintf_vprintf(char const* fmt, __va_list_struct* args) {
|
||||
void mDoPrintf_vprintf(char const* fmt, va_list args) {
|
||||
OSThread* currentThread = mDoExt_GetCurrentRunningThread__Fv();
|
||||
if (currentThread == NULL) {
|
||||
mDoPrintf_vprintf_Interrupt(fmt, args);
|
||||
|
|
@ -164,7 +164,7 @@ void mDoPrintf_vprintf(char const* fmt, __va_list_struct* args) {
|
|||
}
|
||||
|
||||
/* 80006A10-80006A9C 001350 008C+00 1/1 0/0 0/0 .text mDoPrintf_VReport */
|
||||
void mDoPrintf_VReport(const char* fmt, __va_list_struct* args) {
|
||||
void mDoPrintf_VReport(const char* fmt, va_list args) {
|
||||
if (!sOSReportInit) {
|
||||
OSReportInit();
|
||||
}
|
||||
|
|
@ -178,7 +178,7 @@ void mDoPrintf_VReport(const char* fmt, __va_list_struct* args) {
|
|||
}
|
||||
|
||||
/* 80006A9C-80006ABC 0013DC 0020+00 2/2 0/0 0/0 .text OSVReport */
|
||||
void OSVReport(const char* fmt, __va_list_struct* args) {
|
||||
void OSVReport(const char* fmt, va_list args) {
|
||||
mDoPrintf_VReport(fmt, args);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue