diff --git a/include/JSystem/JAudio/JASAudioThread.h b/include/JSystem/JAudio/JASAudioThread.h index 4c2a4b89a..1992bbe5b 100644 --- a/include/JSystem/JAudio/JASAudioThread.h +++ b/include/JSystem/JAudio/JASAudioThread.h @@ -21,8 +21,8 @@ namespace JASystem { extern OSMessage saAudioMsgBuf[16]; extern u32 sAudioprocMQInit; extern int sbIsPrioritySet; - extern s32 sDSPPrio; - extern s32 sDVDPrio; + extern OSPriority sDSPPrio; + extern OSPriority sDVDPrio; extern vs32 snIntCount; extern int sbIsDSPBoot; }; diff --git a/include/JSystem/JUtility/JUTGamePad.h b/include/JSystem/JUtility/JUTGamePad.h index fc7c6cb64..a2e18653c 100644 --- a/include/JSystem/JUtility/JUTGamePad.h +++ b/include/JSystem/JUtility/JUTGamePad.h @@ -12,18 +12,18 @@ extern u32 channel_mask[4]; namespace CButton { enum { - DPAD_LEFT = 0x0001, - DPAD_RIGHT = 0x0002, - DPAD_DOWN = 0x0004, - DPAD_UP = 0x0008, - Z = 0x0010, - R = 0x0020, - L = 0x0040, - A = 0x0100, - B = 0x0200, - X = 0x0400, - Y = 0x0800, - START = 0x1000, + /* 0x0001 */ DPAD_LEFT = 0x0001, + /* 0x0002 */ DPAD_RIGHT = 0x0002, + /* 0x0004 */ DPAD_DOWN = 0x0004, + /* 0x0008 */ DPAD_UP = 0x0008, + /* 0x0010 */ Z = 0x0010, + /* 0x0020 */ R = 0x0020, + /* 0x0040 */ L = 0x0040, + /* 0x0100 */ A = 0x0100, + /* 0x0200 */ B = 0x0200, + /* 0x0400 */ X = 0x0400, + /* 0x0800 */ Y = 0x0800, + /* 0x1000 */ START = 0x1000, }; } diff --git a/include/dolphin/os/OSThread.h b/include/dolphin/os/OSThread.h index 3ad28fc34..e8b137fbc 100644 --- a/include/dolphin/os/OSThread.h +++ b/include/dolphin/os/OSThread.h @@ -59,8 +59,8 @@ struct OSThread { OSThreadState state; u16 attributes; s32 suspend_count; - s32 effective_priority; - u32 base_priority; + OSPriority effective_priority; + OSPriority base_priority; void* exit_value; OSThreadQueue* queue; OSThreadLink link; @@ -95,7 +95,7 @@ static OSThread* SelectThread(BOOL yield); void __OSReschedule(void); void OSYieldThread(void); BOOL OSCreateThread(OSThread* thread, void* func, void* param, void* stackBase, u32 stackSize, - s32 priority, u16 attribute); + OSPriority priority, u16 attribute); void OSExitThread(void* exitValue); void OSCancelThread(OSThread* thread); void OSDetachThread(OSThread* thread); diff --git a/include/m_Do/m_Do_dvd_thread.h b/include/m_Do/m_Do_dvd_thread.h index 10bfcc7c1..ad26ee680 100644 --- a/include/m_Do/m_Do_dvd_thread.h +++ b/include/m_Do/m_Do_dvd_thread.h @@ -111,7 +111,7 @@ struct mDoDvdThdStack { struct mDoDvdThd { static s32 main(void*); - static void create(s32); + static void create(OSPriority); static void suspend(); static OSThread l_thread; diff --git a/src/JSystem/JAudio/JASAudioThread.cpp b/src/JSystem/JAudio/JASAudioThread.cpp index b7afc4e65..46ae02e01 100644 --- a/src/JSystem/JAudio/JASAudioThread.cpp +++ b/src/JSystem/JAudio/JASAudioThread.cpp @@ -26,8 +26,8 @@ OSMessage JASystem::TAudioThread::saAudioMsgBuf[16]; u32 JASystem::TAudioThread::sAudioprocMQInit; int JASystem::TAudioThread::sbIsPrioritySet; -s32 JASystem::TAudioThread::sDSPPrio; -s32 JASystem::TAudioThread::sDVDPrio; +OSPriority JASystem::TAudioThread::sDSPPrio; +OSPriority JASystem::TAudioThread::sDVDPrio; vs32 JASystem::TAudioThread::snIntCount; int JASystem::TAudioThread::sbIsDSPBoot; @@ -124,7 +124,7 @@ void JASystem::TAudioThread::setPriority(u8 dspPrio, u8 dvdPrio) { /* 8028920C-802892E0 .text start__Q28JASystem12TAudioThreadFP12JKRSolidHeapUlUl */ void JASystem::TAudioThread::start(JKRSolidHeap* heap, u32 aramSize, u32 flag) { if (!sbIsPrioritySet) { - s32 priority = OSGetThreadPriority(OSGetCurrentThread()) - 3; + OSPriority priority = OSGetThreadPriority(OSGetCurrentThread()) - 3; sDSPPrio = priority; sDVDPrio = priority - 1; } diff --git a/src/d/actor/d_a_npc_os.cpp b/src/d/actor/d_a_npc_os.cpp index bce079e4f..944e08d0f 100644 --- a/src/d/actor/d_a_npc_os.cpp +++ b/src/d/actor/d_a_npc_os.cpp @@ -290,7 +290,7 @@ BOOL daNpc_Os_c::createHeap() { mAcchCir[0].SetWall(20.0f, 40.0f); mAcchCir[1].SetWall(60.0f, 40.0f); - mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 2, &mAcchCir[0], fopAcM_GetSpeed_p(this)); + mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 2, &mAcchCir[0], fopAcM_GetSpeed_p(this)); mAcch.OnLineCheck(); mAcch.ClrRoofNone(); mAcch.SetRoofCrrHeight(120.0f); diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp index c37cbc714..7d600e9ad 100644 --- a/src/d/d_com_inf_game.cpp +++ b/src/d/d_com_inf_game.cpp @@ -1291,7 +1291,7 @@ void dComIfGs_setPlayerRecollectionData() { return; } - if (dComIfGs_getpPlayerStatusC(tbl)->mRecollectItem.mItems[0] != dItem_TELESCOPE_e) { + if (dComIfGs_getpPlayerStatusC(tbl)->mRecollectItem.mItems[dInvSlot_TELESCOPE_e] != dItem_TELESCOPE_e) { dComIfGs_setSelectItem(dItemBtn_X_e, dInvSlot_NONE_e); dComIfGs_setSelectItem(dItemBtn_Y_e, dInvSlot_NONE_e); dComIfGs_setSelectItem(dItemBtn_Z_e, dInvSlot_NONE_e); diff --git a/src/d/d_s_logo.cpp b/src/d/d_s_logo.cpp index 1deae8033..3b1539575 100644 --- a/src/d/d_s_logo.cpp +++ b/src/d/d_s_logo.cpp @@ -370,7 +370,7 @@ BOOL progChangeDraw(dScnLogo_c* i_this) { } if (i_this->mTimer == 0) { - i_this->mAction = 3; + i_this->mAction = ACT_dolbyInDraw; i_this->mTimer = 90; mDoGph_gInf_c::startFadeIn(30); } @@ -383,7 +383,7 @@ BOOL dolbyInDraw(dScnLogo_c* i_this) { dComIfGd_set2DOpa(i_this->dolbyImg); if (i_this->mTimer == 0) { - i_this->mAction = 4; + i_this->mAction = ACT_dolbyOutDraw; i_this->mTimer = 30; mDoGph_gInf_c::startFadeOut(30); } @@ -396,7 +396,7 @@ BOOL dolbyOutDraw(dScnLogo_c* i_this) { dComIfGd_set2DOpa(i_this->dolbyImg); if (i_this->mTimer == 0) { - i_this->mAction = 10; + i_this->mAction = ACT_dvdWaitDraw; } return TRUE; diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index 236b4d567..0e9715ae7 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -1384,9 +1384,9 @@ void dSv_info_c::reinit() { u8 sound = dComIfGs_getOptSound(); u8 vib = dComIfGs_getOptVibration(); +#if VERSION > VERSION_DEMO u8 pictureNum = dComIfGs_getPictureNum(); -#if VERSION > VERSION_DEMO u8 r27 = dComIfGs_getEventReg(0x89FF); #endif diff --git a/src/dolphin/os/OSThread.c b/src/dolphin/os/OSThread.c index 40b495d1f..54ff19cad 100644 --- a/src/dolphin/os/OSThread.c +++ b/src/dolphin/os/OSThread.c @@ -411,7 +411,7 @@ void OSYieldThread(void) { } BOOL OSCreateThread(OSThread* thread_, void* func, void* param, void* stackBase, u32 stackSize, - s32 priority, u16 attribute) { + OSPriority priority, u16 attribute) { BOOL enabled; u32 i; u32* stack; @@ -678,7 +678,7 @@ s32 OSSetThreadPriority(OSThread* thread, OSPriority priority) { return TRUE; } -s32 OSGetThreadPriority(OSThread* thread) { +OSPriority OSGetThreadPriority(OSThread* thread) { return thread->base_priority; } diff --git a/src/m_Do/m_Do_DVDError.cpp b/src/m_Do/m_Do_DVDError.cpp index 04f28e34b..6f4d568e3 100644 --- a/src/m_Do/m_Do_DVDError.cpp +++ b/src/m_Do/m_Do_DVDError.cpp @@ -24,7 +24,7 @@ void mDoDvdErr_ThdInit() { if (!mDoDvdErr_initialized) { OSTime time = OSGetTime(); OSThread* curThread = OSGetCurrentThread(); - s32 priority = OSGetThreadPriority(curThread); + OSPriority priority = OSGetThreadPriority(curThread); OSCreateThread(&DvdErr_thread, (void*)mDoDvdErr_Watch, NULL, DvdErr_stack + sizeof(DvdErr_stack), sizeof(DvdErr_stack), priority - 3, 1); diff --git a/src/m_Do/m_Do_MemCard.cpp b/src/m_Do/m_Do_MemCard.cpp index 1c8a19d3d..0d69555b3 100644 --- a/src/m_Do/m_Do_MemCard.cpp +++ b/src/m_Do/m_Do_MemCard.cpp @@ -33,7 +33,7 @@ void mDoMemCd_Ctrl_c::ThdInit() { mCardSlot = 0; OSInitMutex(&mMutex); OSInitCond(&mCond); - s32 priority = OSGetThreadPriority(OSGetCurrentThread()); + OSPriority priority = OSGetThreadPriority(OSGetCurrentThread()); OSCreateThread(&MemCardThread, (void*)mDoMemCd_main, NULL, &MemCardStack[ARRAY_SIZE(MemCardStack)], ARRAY_SIZE(MemCardStack), priority + 1, 1); OSResumeThread(&MemCardThread); } diff --git a/src/m_Do/m_Do_dvd_thread.cpp b/src/m_Do/m_Do_dvd_thread.cpp index b1b62f14f..3aa2fe62a 100644 --- a/src/m_Do/m_Do_dvd_thread.cpp +++ b/src/m_Do/m_Do_dvd_thread.cpp @@ -33,7 +33,7 @@ s32 mDoDvdThd::main(void* userData) { } /* 80017F54-80017FB0 .text create__9mDoDvdThdFl */ -void mDoDvdThd::create(s32 priority) { +void mDoDvdThd::create(OSPriority priority) { OSCreateThread(&l_thread, (void*)main, &l_param, l_threadStack.stack + sizeof(l_threadStack), sizeof(l_threadStack), priority, 1); OSResumeThread(&l_thread); } diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index 0e21d6e31..9c2ae9ebe 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -479,7 +479,7 @@ int main() { } } - s32 priority = OSGetThreadPriority(current_thread); + OSPriority priority = OSGetThreadPriority(current_thread); OSCreateThread(&mainThread, (void*)main01, 0, stack + sizeof(stack), sizeof(stack), priority, 0); OSResumeThread(&mainThread); OSSetThreadPriority(current_thread, 0x1F);