Rename some lock related symbols

This commit is contained in:
Ryan Dwyer
2020-01-11 22:33:31 +10:00
parent b6d0f685d8
commit bf41ace578
8 changed files with 28 additions and 28 deletions
+4 -4
View File
@@ -4257,10 +4257,10 @@ glabel func0f11080c
/* f1108b4: 0fc354fe */ jal scenarioDefaultCallback40
/* f1108b8: 24050004 */ addiu $a1,$zero,0x4
/* f1108bc: a6220482 */ sh $v0,0x482($s1)
/* f1108c0: 3c11800b */ lui $s1,%hi(g_MpLock)
/* f1108c0: 3c11800b */ lui $s1,%hi(g_MpLockType)
/* f1108c4: 3c10800b */ lui $s0,%hi(var800acbb0)
/* f1108c8: 2610cbb0 */ addiu $s0,$s0,%lo(var800acbb0)
/* f1108cc: 2631cc10 */ addiu $s1,$s1,%lo(g_MpLock)
/* f1108cc: 2631cc10 */ addiu $s1,$s1,%lo(g_MpLockType)
/* f1108d0: 02402025 */ or $a0,$s2,$zero
.L0f1108d4:
/* f1108d4: 02002825 */ or $a1,$s0,$zero
@@ -4359,8 +4359,8 @@ glabel func0f1109c0
/* f110a24: 0fc354be */ jal scenarioDefaultCallback44
/* f110a28: 24060004 */ addiu $a2,$zero,0x4
/* f110a2c: 3c10800b */ lui $s0,%hi(var800acbb0)
/* f110a30: 3c11800b */ lui $s1,%hi(g_MpLock)
/* f110a34: 2631cc10 */ addiu $s1,$s1,%lo(g_MpLock)
/* f110a30: 3c11800b */ lui $s1,%hi(g_MpLockType)
/* f110a34: 2631cc10 */ addiu $s1,$s1,%lo(g_MpLockType)
/* f110a38: 2610cbb0 */ addiu $s0,$s0,%lo(var800acbb0)
/* f110a3c: 02402025 */ or $a0,$s2,$zero
.L0f110a40:
+10 -10
View File
@@ -1807,7 +1807,7 @@ s32 menuhandlerMpEndGame(u32 operation, struct menu_item *item, s32 *value)
s32 menuhandler00178018(u32 operation, struct menu_item *item, s32 *value)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpLock != MPLOCK_CHALLENGE) {
if (g_MpLockType != MPLOCKTYPE_CHALLENGE) {
return true;
}
}
@@ -8335,7 +8335,7 @@ glabel menuhandler0017e4d4
s32 menuhandler0017e9d8(u32 operation, struct menu_item *item, s32 *value)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpLock != MPLOCK_CHALLENGE) {
if (g_MpLockType != MPLOCKTYPE_CHALLENGE) {
return true;
}
}
@@ -8346,7 +8346,7 @@ s32 menuhandler0017e9d8(u32 operation, struct menu_item *item, s32 *value)
s32 menuhandlerMpAbortChallenge(u32 operation, struct menu_item *item, s32 *value)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpLock != MPLOCK_CHALLENGE) {
if (g_MpLockType != MPLOCKTYPE_CHALLENGE) {
return true;
}
}
@@ -8361,7 +8361,7 @@ s32 menuhandlerMpAbortChallenge(u32 operation, struct menu_item *item, s32 *valu
s32 menuhandlerMpStartChallenge(u32 operation, struct menu_item *item, s32 *value)
{
if (operation == MENUOP_CHECKHIDDEN) {
if (g_MpLock != MPLOCK_CHALLENGE) {
if (g_MpLockType != MPLOCKTYPE_CHALLENGE) {
return true;
}
}
@@ -8504,34 +8504,34 @@ char *menuhandlerMpLock(u32 operation, struct menu_item *item, s32 *value)
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
if (mpGetLock() == MPLOCK_CHALLENGE) {
if (mpGetLockType() == MPLOCKTYPE_CHALLENGE) {
*value = 1;
} else {
*value = 5;
}
break;
case MENUOP_GETOPTIONTEXT:
if (mpGetLock() == MPLOCK_CHALLENGE) {
if (mpGetLockType() == MPLOCKTYPE_CHALLENGE) {
return textGet(0x5031); // "Challenge"
}
if ((u32)*value <= 3) {
return textGet(labels[*value]);
}
if (mpGetLock() == MPLOCK_PLAYER) {
if (mpGetLockType() == MPLOCKTYPE_PLAYER) {
return g_MpPlayers[mpGetLockPlayerNum()].base.name;
}
return mpGetCurrentPlayerName(item);
case MENUOP_SET:
if (mpGetLock() != MPLOCK_CHALLENGE) {
if (mpGetLockType() != MPLOCKTYPE_CHALLENGE) {
mpSetLock(*value, g_MpPlayerNum);
}
g_Vars.unk000458 |= 2;
break;
case MENUOP_GETOPTIONVALUE:
if (mpGetLock() == MPLOCK_CHALLENGE) {
if (mpGetLockType() == MPLOCKTYPE_CHALLENGE) {
*value = 0;
} else {
*value = mpGetLock();
*value = mpGetLockType();
}
break;
}
+3 -3
View File
@@ -5463,12 +5463,12 @@ glabel mpSetLock
/* f18bfbc: 00000000 */ sll $zero,$zero,0x0
);
u8 mpGetLock(void)
u32 mpGetLockType(void)
{
return g_MpLock;
return g_MpLockType;
}
s8 mpGetLockPlayerNum(void)
u32 mpGetLockPlayerNum(void)
{
return g_MpLockPlayerNum;
}
+1 -1
View File
@@ -2125,7 +2125,7 @@ glabel func0f19b540
// identical.
//void func0f19b540(void)
//{
// if (g_MpLock == MPLOCK_CHALLENGE) {
// if (g_MpLockType == MPLOCKTYPE_CHALLENGE) {
// s32 slot = 0;
// s32 i;
// u32 *ptr;