diff --git a/.vscode/settings.json b/.vscode/settings.json index 01bb1bcf..fea8c236 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -33,5 +33,6 @@ }, "clangd.arguments": [ "--function-arg-placeholders=0", + // "--log=verbose", ], } diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h index 7d581d29..be331fa8 100644 --- a/include/JSystem/JGeometry.h +++ b/include/JSystem/JGeometry.h @@ -320,7 +320,7 @@ struct TVec2 { template struct TBox { TBox() : i(), f() {} - TBox(const TBox& other) : i(other.f), f(other.y) {} + TBox(const TBox& other) : i(other.i), f(other.f) {} T i, f; }; diff --git a/include/dolphin/os/OSTime.h b/include/dolphin/os/OSTime.h index 36f106a5..31979270 100644 --- a/include/dolphin/os/OSTime.h +++ b/include/dolphin/os/OSTime.h @@ -30,7 +30,7 @@ OSTime OSGetTime(void); OSTick OSGetTick(void); OSTime __OSGetSystemTime(void); OSTime __OSTimeToSystemTime(OSTime time); -void GetDates(s32 days, OSCalendarTime* ct); +static void GetDates(s32 days, OSCalendarTime* ct); void OSTicksToCalendarTime(OSTime ticks, OSCalendarTime* ct); extern u32 __OSBusClock AT_ADDRESS(0x800000F8); diff --git a/src/JSystem/JKernel/JKRThread.cpp b/src/JSystem/JKernel/JKRThread.cpp index cc9c7840..9b7d1dc0 100644 --- a/src/JSystem/JKernel/JKRThread.cpp +++ b/src/JSystem/JKernel/JKRThread.cpp @@ -25,7 +25,7 @@ JKRThread::JKRThread(u32 stack_size, int message_count, int param_3) : mThreadLi mThreadRecord = (OSThread*)JKRAllocFromHeap(mHeap, sizeof(OSThread), 0x20); void* stackBase = (void*)((int)mStackMemory + mStackSize); - OSCreateThread(mThreadRecord, start, this, stackBase, mStackSize, param_3, 1); + OSCreateThread(mThreadRecord, (void*)start, this, stackBase, mStackSize, param_3, 1); mMessageCount = message_count; mMessages = (OSMessage*)JKRAllocFromHeap(mHeap, mMessageCount * sizeof(OSMessage), 0); @@ -135,4 +135,4 @@ void JKRThreadSwitch::callback(OSThread* current, OSThread* next) { static void dummy() { OSReport("Cannot create JKRTask Manager."); OSReport("sManager != 0"); -} \ No newline at end of file +} diff --git a/src/dolphin/os/OSReset.c b/src/dolphin/os/OSReset.c index 4f131b1a..4606713b 100644 --- a/src/dolphin/os/OSReset.c +++ b/src/dolphin/os/OSReset.c @@ -55,6 +55,7 @@ inline BOOL __OSCallResetFunctions(u32 arg0) { return 1; } +#ifdef __MWERKS__ static asm void Reset(register s32 param_0) { // clang-format off nofralloc @@ -107,6 +108,7 @@ static asm void Reset(register s32 param_0) { b lbl_8033F790 // clang-format on } +#endif inline static void KillThreads(void) { OSThread* thread; diff --git a/src/dolphin/os/OSTime.c b/src/dolphin/os/OSTime.c index 4ce6151c..cd622f5e 100644 --- a/src/dolphin/os/OSTime.c +++ b/src/dolphin/os/OSTime.c @@ -5,6 +5,7 @@ #define OS_TIME_WEEK_DAY_MAX 7 #define OS_TIME_YEAR_DAY_MAX 365 +#ifdef __MWERKS__ asm OSTime OSGetTime(void) { // clang-format off nofralloc @@ -19,7 +20,9 @@ asm OSTime OSGetTime(void) { blr // clang-format on } +#endif +#ifdef __MWERKS__ asm OSTick OSGetTick(void) { // clang-format off nofralloc @@ -28,6 +31,7 @@ asm OSTick OSGetTick(void) { blr // clang-format on } +#endif #define OS_SYSTEMTIME_BASE 0x30D8 diff --git a/src/f_pc/f_pc_deletor.cpp b/src/f_pc/f_pc_deletor.cpp index 4de48c51..cdffc434 100644 --- a/src/f_pc/f_pc_deletor.cpp +++ b/src/f_pc/f_pc_deletor.cpp @@ -34,7 +34,7 @@ s32 fpcDt_deleteMethod(base_process_class* i_proc) { /* 8003D314-8003D34C .text fpcDt_Handler__Fv */ void fpcDt_Handler(void) { - cLsIt_Method(&g_fpcDtTg_Queue, (cNdIt_MethodFunc)fpcDtTg_Do, fpcDt_deleteMethod); + cLsIt_Method(&g_fpcDtTg_Queue, (cNdIt_MethodFunc)fpcDtTg_Do, (void*)fpcDt_deleteMethod); } /* 8003D34C-8003D3C8 .text fpcDt_ToQueue__FP18base_process_class */ diff --git a/src/m_Do/m_Do_DVDError.cpp b/src/m_Do/m_Do_DVDError.cpp index 060e3368..04f28e34 100644 --- a/src/m_Do/m_Do_DVDError.cpp +++ b/src/m_Do/m_Do_DVDError.cpp @@ -26,7 +26,7 @@ void mDoDvdErr_ThdInit() { OSThread* curThread = OSGetCurrentThread(); s32 priority = OSGetThreadPriority(curThread); - OSCreateThread(&DvdErr_thread, mDoDvdErr_Watch, NULL, DvdErr_stack + sizeof(DvdErr_stack), + OSCreateThread(&DvdErr_thread, (void*)mDoDvdErr_Watch, NULL, DvdErr_stack + sizeof(DvdErr_stack), sizeof(DvdErr_stack), priority - 3, 1); OSResumeThread(&DvdErr_thread); OSCreateAlarm(&Alarm);