Some enum/define cleanup

This commit is contained in:
LagoLunatic
2025-06-09 16:14:24 -04:00
parent 4ea011a9ed
commit a27e5b3379
14 changed files with 33 additions and 33 deletions
+2 -2
View File
@@ -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;
};
+12 -12
View File
@@ -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,
};
}
+3 -3
View File
@@ -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);
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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;
}
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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);