Decompile mpPlayerSetDefaults
This commit is contained in:
parent
696927cb7f
commit
806fc103be
|
|
@ -883,10 +883,10 @@ struct menudialog g_MpQuickTeamWeaponsMenuDialog = {
|
|||
|
||||
// 2afa0
|
||||
struct menuitem g_MpPlayerOptionsMenuItems[] = {
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(168), 0x00000002, menuhandlerMpDisplayOptionCheckbox }, // "Highlight Pickups"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(169), 0x00000001, menuhandlerMpDisplayOptionCheckbox }, // "Highlight Players"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(170), 0x00000008, menuhandlerMpDisplayOptionCheckbox }, // "Highlight Teams"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(171), 0x00000004, menuhandlerMpDisplayOptionCheckbox }, // "Radar"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(168), MPDISPLAYOPTION_HIGHLIGHTPICKUPS, menuhandlerMpDisplayOptionCheckbox }, // "Highlight Pickups"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(169), MPDISPLAYOPTION_HIGHLIGHTPLAYERS, menuhandlerMpDisplayOptionCheckbox }, // "Highlight Players"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(170), MPDISPLAYOPTION_HIGHLIGHTTEAMS, menuhandlerMpDisplayOptionCheckbox }, // "Highlight Teams"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(171), MPDISPLAYOPTION_RADAR, menuhandlerMpDisplayOptionCheckbox }, // "Radar"
|
||||
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000008, L_MPMENU(172), 0x00000000, NULL }, // "Back"
|
||||
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
|
|
@ -904,22 +904,22 @@ struct menudialog g_MpPlayerOptionsMenuDialog = {
|
|||
|
||||
// 2b044
|
||||
struct menuitem g_MpControlMenuItems[] = {
|
||||
{ MENUITEMTYPE_DROPDOWN, 0, 0x00000000, L_MPMENU(200), 0x00000000, menuhandlerMpControlStyle }, // "Control Style"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(201), 0x00000001, menuhandlerMpControlCheckbox }, // "Reverse Pitch"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(202), 0x00000002, menuhandlerMpControlCheckbox }, // "Look Ahead"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(203), 0x00000080, menuhandlerMpControlCheckbox }, // "Head Roll"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(204), 0x00000008, menuhandlerMpControlCheckbox }, // "Auto-Aim"
|
||||
{ MENUITEMTYPE_DROPDOWN, 0, 0x00000000, L_MPMENU(205), 0x00000000, menuhandlerMpAimControl }, // "Aim Control"
|
||||
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(206), 0x00000004, menuhandlerMpControlCheckbox }, // "Sight on Screen"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(207), L_AME(0), menuhandlerMpControlCheckbox }, // "Show Target"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(208), L_ARCH(0), menuhandlerMpControlCheckbox }, // "Show Zoom Range"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(209), 0x00000020, menuhandlerMpControlCheckbox }, // "Ammo on Screen"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(210), 0x00000040, menuhandlerMpControlCheckbox }, // "Gun Function"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(211), L_ASH(0), menuhandlerMpControlCheckbox }, // "Paintball"
|
||||
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000008, L_MPMENU(212), 0x00000000, NULL }, // "Back"
|
||||
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
{ MENUITEMTYPE_DROPDOWN, 0, 0x00000000, L_MPMENU(200), 0x00000000, menuhandlerMpControlStyle }, // "Control Style"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(201), OPTION_FORWARDPITCH, menuhandlerMpControlCheckbox }, // "Reverse Pitch"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(202), OPTION_LOOKAHEAD, menuhandlerMpControlCheckbox }, // "Look Ahead"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(203), OPTION_HEADROLL, menuhandlerMpControlCheckbox }, // "Head Roll"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(204), OPTION_AUTOAIM, menuhandlerMpControlCheckbox }, // "Auto-Aim"
|
||||
{ MENUITEMTYPE_DROPDOWN, 0, 0x00000000, L_MPMENU(205), 0x00000000, menuhandlerMpAimControl }, // "Aim Control"
|
||||
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(206), OPTION_SIGHTONSCREEN, menuhandlerMpControlCheckbox }, // "Sight on Screen"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(207), OPTION_ALWAYSSHOWTARGET, menuhandlerMpControlCheckbox }, // "Show Target"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(208), OPTION_SHOWZOOMRANGE, menuhandlerMpControlCheckbox }, // "Show Zoom Range"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(209), OPTION_AMMOONSCREEN, menuhandlerMpControlCheckbox }, // "Ammo on Screen"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(210), OPTION_SHOWGUNFUNCTION, menuhandlerMpControlCheckbox }, // "Gun Function"
|
||||
{ MENUITEMTYPE_CHECKBOX, 0, 0x00000000, L_MPMENU(211), OPTION_PAINTBALL, menuhandlerMpControlCheckbox }, // "Paintball"
|
||||
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000008, L_MPMENU(212), 0x00000000, NULL }, // "Back"
|
||||
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
};
|
||||
|
||||
// 2b184
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ void aibotAllocate(s32 chrnum, s32 aibotnum)
|
|||
|
||||
rooms[0] = -1;
|
||||
|
||||
headnum = mpGetHeadId(g_MpSimulants[aibotnum].base.headnum);
|
||||
bodynum = mpGetBodyId(g_MpSimulants[aibotnum].base.bodynum);
|
||||
headnum = mpGetHeadId(g_MpSimulants[aibotnum].base.mpheadnum);
|
||||
bodynum = mpGetBodyId(g_MpSimulants[aibotnum].base.mpbodynum);
|
||||
|
||||
if (IS4MB()) {
|
||||
headnum = HEAD_DDSHOCK;
|
||||
|
|
|
|||
|
|
@ -1454,17 +1454,17 @@ void currentPlayerChooseBodyAndHead(s32 *bodynum, s32 *headnum, s32 *arg2)
|
|||
}
|
||||
|
||||
if (g_Vars.normmplayerisrunning) {
|
||||
if (g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.headnum < func0f18bb1c()) {
|
||||
*headnum = mpGetHeadId(g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.headnum);
|
||||
if (g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.mpheadnum < func0f18bb1c()) {
|
||||
*headnum = mpGetHeadId(g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.mpheadnum);
|
||||
} else {
|
||||
*headnum = g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.headnum - func0f18bb1c();
|
||||
*headnum = g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.mpheadnum - func0f18bb1c();
|
||||
|
||||
if (arg2) {
|
||||
*arg2 = true;
|
||||
}
|
||||
}
|
||||
|
||||
*bodynum = mpGetBodyId(g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.bodynum);
|
||||
*bodynum = mpGetBodyId(g_MpPlayers[g_Vars.currentplayerstats->mpindex].base.mpbodynum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -787,7 +787,7 @@ void filemgrDeleteCurrentFile(void)
|
|||
for (i = 0; i < 4; i++) {
|
||||
if (g_FilemgrFileToDelete.unk00 == g_MpPlayers[i].unk4c.unk00
|
||||
&& g_FilemgrFileToDelete.unk04 == g_MpPlayers[i].unk4c.unk04) {
|
||||
func0f18800c(i, true);
|
||||
mpPlayerSetDefaults(i, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ void func0f10cb2c(void)
|
|||
g_FileState = FILESTATE_SELECTED;
|
||||
|
||||
for (i = 0; i != 6; i++) {
|
||||
func0f18800c(i, true);
|
||||
mpPlayerSetDefaults(i, true);
|
||||
}
|
||||
|
||||
g_Vars.bondplayernum = 0;
|
||||
|
|
|
|||
|
|
@ -1030,8 +1030,8 @@ void mpForceUnlockSimulantFeatures(void)
|
|||
}
|
||||
|
||||
// Force unlock the simulant's body
|
||||
if (g_MpSimulants[i].base.bodynum < ARRAYCOUNT(g_MpBodies)) {
|
||||
s32 featurenum = g_MpBodies[g_MpSimulants[i].base.bodynum].requirefeature;
|
||||
if (g_MpSimulants[i].base.mpbodynum < ARRAYCOUNT(g_MpBodies)) {
|
||||
s32 featurenum = g_MpBodies[g_MpSimulants[i].base.mpbodynum].requirefeature;
|
||||
|
||||
if (featurenum) {
|
||||
index = mpForceUnlockFeature(featurenum, g_MpFeaturesForceUnlocked, index, ARRAYCOUNT(g_MpFeaturesForceUnlocked));
|
||||
|
|
@ -1039,8 +1039,8 @@ void mpForceUnlockSimulantFeatures(void)
|
|||
}
|
||||
|
||||
// Force unlock the simulant's head
|
||||
if (g_MpSimulants[i].base.headnum < ARRAYCOUNT(g_MpHeads)) {
|
||||
s32 featurenum = g_MpHeads[g_MpSimulants[i].base.headnum].requirefeature;
|
||||
if (g_MpSimulants[i].base.mpheadnum < ARRAYCOUNT(g_MpHeads)) {
|
||||
s32 featurenum = g_MpHeads[g_MpSimulants[i].base.mpheadnum].requirefeature;
|
||||
|
||||
if (featurenum) {
|
||||
index = mpForceUnlockFeature(featurenum, g_MpFeaturesForceUnlocked, index, ARRAYCOUNT(g_MpFeaturesForceUnlocked));
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
#include "types.h"
|
||||
|
||||
const char var7f1b8a00[] = "||||||||||||| Starting game... players %d\n";
|
||||
const char var7f1b8a2c[] = "%s %d\n";
|
||||
|
||||
/**
|
||||
* Converts the given value into a float on a curved scale from 0.1 to 10.
|
||||
|
|
@ -533,140 +532,93 @@ void func0f187fec(void)
|
|||
g_MpSetup.teamscorelimit = 19;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f18800c
|
||||
/* f18800c: 27bdffd0 */ addiu $sp,$sp,-48
|
||||
/* f188010: afbf002c */ sw $ra,0x2c($sp)
|
||||
/* f188014: afb30024 */ sw $s3,0x24($sp)
|
||||
/* f188018: afb1001c */ sw $s1,0x1c($sp)
|
||||
/* f18801c: 00a08825 */ or $s1,$a1,$zero
|
||||
/* f188020: 00809825 */ or $s3,$a0,$zero
|
||||
/* f188024: afb40028 */ sw $s4,0x28($sp)
|
||||
/* f188028: afb20020 */ sw $s2,0x20($sp)
|
||||
/* f18802c: 0fc61fef */ jal func0f187fbc
|
||||
/* f188030: afb00018 */ sw $s0,0x18($sp)
|
||||
/* f188034: 00137080 */ sll $t6,$s3,0x2
|
||||
/* f188038: 01d37021 */ addu $t6,$t6,$s3
|
||||
/* f18803c: 3c0f800b */ lui $t7,%hi(g_MpPlayers)
|
||||
/* f188040: 25efc7b8 */ addiu $t7,$t7,%lo(g_MpPlayers)
|
||||
/* f188044: 000e7140 */ sll $t6,$t6,0x5
|
||||
/* f188048: 01cf8021 */ addu $s0,$t6,$t7
|
||||
/* f18804c: 241807ee */ addiu $t8,$zero,0x7ee
|
||||
/* f188050: 24190080 */ addiu $t9,$zero,0x80
|
||||
/* f188054: a2000044 */ sb $zero,0x44($s0)
|
||||
/* f188058: a6180048 */ sh $t8,0x48($s0)
|
||||
/* f18805c: 1260000a */ beqz $s3,.L0f188088
|
||||
/* f188060: a219009d */ sb $t9,0x9d($s0)
|
||||
/* f188064: 24010001 */ addiu $at,$zero,0x1
|
||||
/* f188068: 12610009 */ beq $s3,$at,.L0f188090
|
||||
/* f18806c: 24080011 */ addiu $t0,$zero,0x11
|
||||
/* f188070: 24010002 */ addiu $at,$zero,0x2
|
||||
/* f188074: 12610008 */ beq $s3,$at,.L0f188098
|
||||
/* f188078: 2409000e */ addiu $t1,$zero,0xe
|
||||
/* f18807c: 24010003 */ addiu $at,$zero,0x3
|
||||
/* f188080: 12610007 */ beq $s3,$at,.L0f1880a0
|
||||
/* f188084: 240a0014 */ addiu $t2,$zero,0x14
|
||||
.L0f188088:
|
||||
/* f188088: 10000006 */ b .L0f1880a4
|
||||
/* f18808c: a2000010 */ sb $zero,0x10($s0)
|
||||
.L0f188090:
|
||||
/* f188090: 10000004 */ b .L0f1880a4
|
||||
/* f188094: a2080010 */ sb $t0,0x10($s0)
|
||||
.L0f188098:
|
||||
/* f188098: 10000002 */ b .L0f1880a4
|
||||
/* f18809c: a2090010 */ sb $t1,0x10($s0)
|
||||
.L0f1880a0:
|
||||
/* f1880a0: a20a0010 */ sb $t2,0x10($s0)
|
||||
.L0f1880a4:
|
||||
/* f1880a4: 0fc62f27 */ jal mpGetMpheadnumByMpbodynum
|
||||
/* f1880a8: 92040010 */ lbu $a0,0x10($s0)
|
||||
/* f1880ac: 240b000c */ addiu $t3,$zero,0xc
|
||||
/* f1880b0: a202000f */ sb $v0,0xf($s0)
|
||||
/* f1880b4: ae0b0014 */ sw $t3,0x14($s0)
|
||||
/* f1880b8: ae00004c */ sw $zero,0x4c($s0)
|
||||
/* f1880bc: 1220000b */ beqz $s1,.L0f1880ec
|
||||
/* f1880c0: a6000050 */ sh $zero,0x50($s0)
|
||||
/* f1880c4: 0fc5b9f1 */ jal langGet
|
||||
/* f1880c8: 240459b5 */ addiu $a0,$zero,0x59b5
|
||||
/* f1880cc: 3c057f1c */ lui $a1,%hi(var7f1b8a2c)
|
||||
/* f1880d0: 24a58a2c */ addiu $a1,$a1,%lo(var7f1b8a2c)
|
||||
/* f1880d4: 02002025 */ or $a0,$s0,$zero
|
||||
/* f1880d8: 00403025 */ or $a2,$v0,$zero
|
||||
/* f1880dc: 0c004dad */ jal sprintf
|
||||
/* f1880e0: 26670001 */ addiu $a3,$s3,0x1
|
||||
/* f1880e4: 10000003 */ b .L0f1880f4
|
||||
/* f1880e8: 240c03e8 */ addiu $t4,$zero,0x3e8
|
||||
.L0f1880ec:
|
||||
/* f1880ec: a2000000 */ sb $zero,0x0($s0)
|
||||
/* f1880f0: 240c03e8 */ addiu $t4,$zero,0x3e8
|
||||
.L0f1880f4:
|
||||
/* f1880f4: 2a610004 */ slti $at,$s3,0x4
|
||||
/* f1880f8: ae000054 */ sw $zero,0x54($s0)
|
||||
/* f1880fc: ae000058 */ sw $zero,0x58($s0)
|
||||
/* f188100: ae00005c */ sw $zero,0x5c($s0)
|
||||
/* f188104: ae000060 */ sw $zero,0x60($s0)
|
||||
/* f188108: ae000064 */ sw $zero,0x64($s0)
|
||||
/* f18810c: ae000068 */ sw $zero,0x68($s0)
|
||||
/* f188110: ae00006c */ sw $zero,0x6c($s0)
|
||||
/* f188114: ae0c0070 */ sw $t4,0x70($s0)
|
||||
/* f188118: ae000074 */ sw $zero,0x74($s0)
|
||||
/* f18811c: ae000078 */ sw $zero,0x78($s0)
|
||||
/* f188120: ae00007c */ sw $zero,0x7c($s0)
|
||||
/* f188124: ae000080 */ sw $zero,0x80($s0)
|
||||
/* f188128: ae000084 */ sw $zero,0x84($s0)
|
||||
/* f18812c: ae000088 */ sw $zero,0x88($s0)
|
||||
/* f188130: ae00008c */ sw $zero,0x8c($s0)
|
||||
/* f188134: ae000090 */ sw $zero,0x90($s0)
|
||||
/* f188138: 10200012 */ beqz $at,.L0f188184
|
||||
/* f18813c: a2000095 */ sb $zero,0x95($s0)
|
||||
/* f188140: 00008825 */ or $s1,$zero,$zero
|
||||
/* f188144: 2414001e */ addiu $s4,$zero,0x1e
|
||||
/* f188148: 24120005 */ addiu $s2,$zero,0x5
|
||||
/* f18814c: 24100001 */ addiu $s0,$zero,0x1
|
||||
.L0f188150:
|
||||
/* f188150: 02602025 */ or $a0,$s3,$zero
|
||||
.L0f188154:
|
||||
/* f188154: 02202825 */ or $a1,$s1,$zero
|
||||
/* f188158: 02003025 */ or $a2,$s0,$zero
|
||||
/* f18815c: 0fc6712e */ jal mpSetChallengeCompletedByPlayerWithNumPlayers
|
||||
/* f188160: 00003825 */ or $a3,$zero,$zero
|
||||
/* f188164: 26100001 */ addiu $s0,$s0,0x1
|
||||
/* f188168: 5612fffa */ bnel $s0,$s2,.L0f188154
|
||||
/* f18816c: 02602025 */ or $a0,$s3,$zero
|
||||
/* f188170: 26310001 */ addiu $s1,$s1,0x1
|
||||
/* f188174: 5634fff6 */ bnel $s1,$s4,.L0f188150
|
||||
/* f188178: 24100001 */ addiu $s0,$zero,0x1
|
||||
/* f18817c: 0fc66bf7 */ jal mpDetermineUnlockedFeatures
|
||||
/* f188180: 00000000 */ nop
|
||||
.L0f188184:
|
||||
/* f188184: 00136880 */ sll $t5,$s3,0x2
|
||||
/* f188188: 01b36821 */ addu $t5,$t5,$s3
|
||||
/* f18818c: 3c0e800b */ lui $t6,%hi(g_MpPlayers)
|
||||
/* f188190: 25cec7b8 */ addiu $t6,$t6,%lo(g_MpPlayers)
|
||||
/* f188194: 000d6940 */ sll $t5,$t5,0x5
|
||||
/* f188198: 01ae1021 */ addu $v0,$t5,$t6
|
||||
/* f18819c: 00008825 */ or $s1,$zero,$zero
|
||||
/* f1881a0: 24030006 */ addiu $v1,$zero,0x6
|
||||
.L0f1881a4:
|
||||
/* f1881a4: 26310001 */ addiu $s1,$s1,0x1
|
||||
/* f1881a8: 24420001 */ addiu $v0,$v0,0x1
|
||||
/* f1881ac: 1623fffd */ bne $s1,$v1,.L0f1881a4
|
||||
/* f1881b0: a0400096 */ sb $zero,0x96($v0)
|
||||
/* f1881b4: 8fbf002c */ lw $ra,0x2c($sp)
|
||||
/* f1881b8: 8fb00018 */ lw $s0,0x18($sp)
|
||||
/* f1881bc: 8fb1001c */ lw $s1,0x1c($sp)
|
||||
/* f1881c0: 8fb20020 */ lw $s2,0x20($sp)
|
||||
/* f1881c4: 8fb30024 */ lw $s3,0x24($sp)
|
||||
/* f1881c8: 8fb40028 */ lw $s4,0x28($sp)
|
||||
/* f1881cc: 03e00008 */ jr $ra
|
||||
/* f1881d0: 27bd0030 */ addiu $sp,$sp,0x30
|
||||
);
|
||||
void mpPlayerSetDefaults(s32 playernum, bool autonames)
|
||||
{
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
func0f187fbc(playernum);
|
||||
|
||||
g_MpPlayers[playernum].base.controlmode = CONTROLMODE_11;
|
||||
|
||||
g_MpPlayers[playernum].options = OPTION_LOOKAHEAD
|
||||
| OPTION_SIGHTONSCREEN
|
||||
| OPTION_AUTOAIM
|
||||
| OPTION_AMMOONSCREEN
|
||||
| OPTION_SHOWGUNFUNCTION
|
||||
| OPTION_HEADROLL
|
||||
| OPTION_0100
|
||||
| OPTION_ALWAYSSHOWTARGET
|
||||
| OPTION_SHOWZOOMRANGE;
|
||||
|
||||
g_MpPlayers[playernum].handicap = 128;
|
||||
|
||||
switch (playernum) {
|
||||
case 0:
|
||||
default:
|
||||
g_MpPlayers[playernum].base.mpbodynum = MPBODY_DARK_COMBAT;
|
||||
break;
|
||||
case 1:
|
||||
g_MpPlayers[playernum].base.mpbodynum = MPBODY_CASSANDRA;
|
||||
break;
|
||||
case 2:
|
||||
g_MpPlayers[playernum].base.mpbodynum = MPBODY_CARRINGTON;
|
||||
break;
|
||||
case 3:
|
||||
g_MpPlayers[playernum].base.mpbodynum = MPBODY_CILABTECH;
|
||||
break;
|
||||
}
|
||||
|
||||
g_MpPlayers[playernum].base.mpheadnum = mpGetMpheadnumByMpbodynum(g_MpPlayers[playernum].base.mpbodynum);
|
||||
g_MpPlayers[playernum].base.displayoptions = MPDISPLAYOPTION_RADAR | MPDISPLAYOPTION_HIGHLIGHTTEAMS;
|
||||
g_MpPlayers[playernum].unk4c.unk00 = 0;
|
||||
g_MpPlayers[playernum].unk4c.unk04 = 0;
|
||||
|
||||
if (autonames) {
|
||||
// "Player 1" etc
|
||||
sprintf(g_MpPlayers[playernum].base.name, "%s %d\n", langGet(L_MISC(437)), playernum + 1);
|
||||
} else {
|
||||
g_MpPlayers[playernum].base.name[0] = '\0';
|
||||
}
|
||||
|
||||
g_MpPlayers[playernum].kills = 0;
|
||||
g_MpPlayers[playernum].deaths = 0;
|
||||
g_MpPlayers[playernum].gamesplayed = 0;
|
||||
g_MpPlayers[playernum].gameswon = 0;
|
||||
g_MpPlayers[playernum].gameslost = 0;
|
||||
g_MpPlayers[playernum].time = 0;
|
||||
g_MpPlayers[playernum].distance = 0;
|
||||
g_MpPlayers[playernum].accuracy = 1000;
|
||||
g_MpPlayers[playernum].damagedealt = 0;
|
||||
g_MpPlayers[playernum].painreceived = 0;
|
||||
g_MpPlayers[playernum].headshots = 0;
|
||||
g_MpPlayers[playernum].ammoused = 0;
|
||||
g_MpPlayers[playernum].accuracymedals = 0;
|
||||
g_MpPlayers[playernum].headshotmedals = 0;
|
||||
g_MpPlayers[playernum].killmastermedals = 0;
|
||||
g_MpPlayers[playernum].survivormedals = 0;
|
||||
g_MpPlayers[playernum].title = MPPLAYERTITLE_BEGINNER;
|
||||
|
||||
if (playernum < 4) {
|
||||
for (i = 0; i < 30; i++) {
|
||||
for (j = 1; j <= 4; j++) {
|
||||
mpSetChallengeCompletedByPlayerWithNumPlayers(playernum, i, j, false);
|
||||
}
|
||||
}
|
||||
|
||||
mpDetermineUnlockedFeatures();
|
||||
}
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
g_MpPlayers[playernum].gunfuncs[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func0f1881d4(s32 index)
|
||||
{
|
||||
g_MpSimulants[index].base.name[0] = '\0';
|
||||
g_MpSimulants[index].base.headnum = 0;
|
||||
g_MpSimulants[index].base.bodynum = 0;
|
||||
g_MpSimulants[index].base.mpheadnum = MPHEAD_DARK_COMBAT;
|
||||
g_MpSimulants[index].base.mpbodynum = MPBODY_DARK_COMBAT;
|
||||
g_MpSimulants[index].base.simtype = SIMTYPE_GENERAL;
|
||||
g_MpSimulants[index].difficulty = SIMDIFF_DISABLED;
|
||||
}
|
||||
|
|
@ -701,7 +653,7 @@ void mpSetDefaultSetup(void)
|
|||
strcpy(g_MpSetup.name, "");
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
func0f18800c(i, false);
|
||||
mpPlayerSetDefaults(i, false);
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
|
|
@ -4506,14 +4458,14 @@ s32 mpGetMpbodynumByBodynum(u16 bodynum)
|
|||
return g_MpBodies[0].bodynum;
|
||||
}
|
||||
|
||||
char *mpGetBodyName(u8 bodynum)
|
||||
char *mpGetBodyName(u8 mpbodynum)
|
||||
{
|
||||
// Possible @bug: This should probably be >=
|
||||
if (bodynum > NUM_MPBODIES) {
|
||||
bodynum = 0;
|
||||
if (mpbodynum > NUM_MPBODIES) {
|
||||
mpbodynum = 0;
|
||||
}
|
||||
|
||||
return langGet(g_MpBodies[bodynum].name);
|
||||
return langGet(g_MpBodies[mpbodynum].name);
|
||||
}
|
||||
|
||||
u8 mpGetBodyRequiredFeature(u8 bodynum)
|
||||
|
|
|
|||
|
|
@ -825,24 +825,24 @@ s32 menuhandlerMpCharacterBody(u32 operation, struct menuitem *item, union handl
|
|||
{
|
||||
switch (operation) {
|
||||
case MENUOP_SET:
|
||||
if (g_MpPlayers[g_MpPlayerNum].base.headnum < mpGetNumHeads()) {
|
||||
if (g_MpPlayers[g_MpPlayerNum].base.mpheadnum < mpGetNumHeads()) {
|
||||
if (!data->carousel.unk04) {
|
||||
g_MpPlayers[g_MpPlayerNum].base.headnum = mpGetMpheadnumByMpbodynum(data->carousel.value);
|
||||
g_MpPlayers[g_MpPlayerNum].base.mpheadnum = mpGetMpheadnumByMpbodynum(data->carousel.value);
|
||||
}
|
||||
}
|
||||
g_MpPlayers[g_MpPlayerNum].base.bodynum = data->carousel.value;
|
||||
g_MpPlayers[g_MpPlayerNum].base.mpbodynum = data->carousel.value;
|
||||
func0f17b8f0();
|
||||
break;
|
||||
case MENUOP_CHECKPREFOCUSED:
|
||||
func0f179da4(operation, item, data,
|
||||
g_MpPlayers[g_MpPlayerNum].base.bodynum,
|
||||
g_MpPlayers[g_MpPlayerNum].base.headnum, 1);
|
||||
g_MpPlayers[g_MpPlayerNum].base.mpbodynum,
|
||||
g_MpPlayers[g_MpPlayerNum].base.mpheadnum, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
return func0f179da4(operation, item, data,
|
||||
g_MpPlayers[g_MpPlayerNum].base.bodynum,
|
||||
g_MpPlayers[g_MpPlayerNum].base.headnum, 1);
|
||||
g_MpPlayers[g_MpPlayerNum].base.mpbodynum,
|
||||
g_MpPlayers[g_MpPlayerNum].base.mpheadnum, 1);
|
||||
}
|
||||
|
||||
s32 menudialog0017a174(u32 operation, struct menudialog *dialog, union handlerdata *data)
|
||||
|
|
@ -2297,15 +2297,15 @@ glabel var7f1b814c
|
|||
s32 menuhandlerMpCharacterHead(u32 operation, struct menuitem *item, union handlerdata *data)
|
||||
{
|
||||
if (operation == MENUOP_SET) {
|
||||
g_MpPlayers[g_MpPlayerNum].base.headnum = data->carousel.value;
|
||||
g_MpPlayers[g_MpPlayerNum].base.mpheadnum = data->carousel.value;
|
||||
}
|
||||
|
||||
return func0f17b4f8(operation, item, data, g_MpPlayers[g_MpPlayerNum].base.headnum, 1);
|
||||
return func0f17b4f8(operation, item, data, g_MpPlayers[g_MpPlayerNum].base.mpheadnum, 1);
|
||||
}
|
||||
|
||||
char *mpMenuTextBodyName(struct menuitem *item)
|
||||
{
|
||||
return mpGetBodyName(g_MpPlayers[g_MpPlayerNum].base.bodynum);
|
||||
return mpGetBodyName(g_MpPlayers[g_MpPlayerNum].base.mpbodynum);
|
||||
}
|
||||
|
||||
void func0f17b8f0(void)
|
||||
|
|
@ -2897,7 +2897,7 @@ glabel var7f1b81a8
|
|||
/* f17c0c0: 01d8c824 */ and $t9,$t6,$t8
|
||||
/* f17c0c4: 17200005 */ bnez $t9,.L0f17c0dc
|
||||
/* f17c0c8: 02002025 */ or $a0,$s0,$zero
|
||||
/* f17c0cc: 0fc62003 */ jal func0f18800c
|
||||
/* f17c0cc: 0fc62003 */ jal mpPlayerSetDefaults
|
||||
/* f17c0d0: 24050001 */ addiu $a1,$zero,0x1
|
||||
/* f17c0d4: 10000003 */ b .L0f17c0e4
|
||||
/* f17c0d8: 26100001 */ addiu $s0,$s0,0x1
|
||||
|
|
@ -3426,28 +3426,28 @@ s32 menuhandlerMpSimulantHead(u32 operation, struct menuitem *item, union handle
|
|||
*/
|
||||
switch (operation) {
|
||||
case MENUOP_SET:
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum = start + data->carousel.value;
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.mpheadnum = start + data->carousel.value;
|
||||
case MENUOP_FOCUS:
|
||||
if (operation == MENUOP_FOCUS
|
||||
&& item->param2 == 1
|
||||
&& g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum < start) {
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum = start;
|
||||
&& g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.mpheadnum < start) {
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.mpheadnum = start;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return func0f17b4f8(operation, item, data, g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum, 0);
|
||||
return func0f17b4f8(operation, item, data, g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.mpheadnum, 0);
|
||||
}
|
||||
|
||||
s32 menuhandlerMpSimulantBody(u32 operation, struct menuitem *item, union handlerdata *data)
|
||||
{
|
||||
if (operation == MENUOP_SET) {
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.bodynum = data->carousel.value;
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.mpbodynum = data->carousel.value;
|
||||
}
|
||||
|
||||
return func0f179da4(operation, item, data,
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.bodynum,
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.headnum,
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.mpbodynum,
|
||||
g_MpSimulants[g_Menus[g_MpPlayerNum].data.mpsetup.slotindex].base.mpheadnum,
|
||||
0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1935,6 +1935,11 @@
|
|||
#define MPCONFIG_CHALLENGE29 0x2a
|
||||
#define MPCONFIG_CHALLENGE30 0x2b
|
||||
|
||||
#define MPDISPLAYOPTION_HIGHLIGHTPLAYERS 0x01
|
||||
#define MPDISPLAYOPTION_HIGHLIGHTPICKUPS 0x02
|
||||
#define MPDISPLAYOPTION_RADAR 0x04
|
||||
#define MPDISPLAYOPTION_HIGHLIGHTTEAMS 0x08
|
||||
|
||||
// Features are things that can be unlocked
|
||||
#define MPFEATURE_WEAPON_FARSIGHT 0x01
|
||||
#define MPFEATURE_WEAPON_TRANQUILIZER 0x02
|
||||
|
|
@ -2571,6 +2576,7 @@
|
|||
#define OPTION_AMMOONSCREEN 0x0020
|
||||
#define OPTION_SHOWGUNFUNCTION 0x0040
|
||||
#define OPTION_HEADROLL 0x0080
|
||||
#define OPTION_0100 0x0100
|
||||
#define OPTION_ALWAYSSHOWTARGET 0x0200
|
||||
#define OPTION_SHOWZOOMRANGE 0x0400
|
||||
#define OPTION_PAINTBALL 0x0800
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ void func0f187944(void);
|
|||
void mpCalculateTeamIsOnlyAi(void);
|
||||
void func0f187fbc(s32 playernum);
|
||||
void func0f187fec(void);
|
||||
void func0f18800c(s32 playernum, bool arg1);
|
||||
void mpPlayerSetDefaults(s32 playernum, bool autonames);
|
||||
void func0f1881d4(s32 index);
|
||||
void mpSetDefaultSetup(void);
|
||||
void mpSetDefaultNamesIfEmpty(void);
|
||||
|
|
@ -53,7 +53,7 @@ s32 mpGetBeauHeadId(u8 headnum);
|
|||
u32 mpGetNumBodies(void);
|
||||
s32 mpGetBodyId(u8 bodynum);
|
||||
s32 mpGetMpbodynumByBodynum(u16 bodynum);
|
||||
char *mpGetBodyName(u8 bodynum);
|
||||
char *mpGetBodyName(u8 mpbodynum);
|
||||
u8 mpGetBodyRequiredFeature(u8 bodynum);
|
||||
s32 mpGetMpheadnumByMpbodynum(s32 bodynum);
|
||||
u32 mpChooseRandomLockPlayer(void);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ s16 mpChooseRandomStage(void);
|
|||
s32 menuhandler001791c8(u32 operation, struct menuitem *item, union handlerdata *data);
|
||||
char *mpMenuTextWeaponNameForSlot(struct menuitem *item);
|
||||
char *mpMenuTextSetupName(struct menuitem *item);
|
||||
s32 func0f179da4(u32 operation, struct menuitem *item, union handlerdata *data, s32 arg3, s32 arg4, s32 arg5);
|
||||
s32 func0f179da4(u32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, s32 mpbodynum, s32 arg5);
|
||||
s32 menudialog0017a174(u32 operation, struct menudialog *dialog, union handlerdata *data);
|
||||
s32 menuhandler0017a20c(u32 operation, struct menuitem *item, union handlerdata *data);
|
||||
u32 mpMenuTextKills(void);
|
||||
|
|
@ -31,7 +31,7 @@ char *mpMenuTextDamageDealt(struct menuitem *item);
|
|||
s32 menuhandlerMpMedal(u32 operation, struct menuitem *item, union handlerdata *data);
|
||||
char *mpMenuTitleStatsForPlayerName(struct menudialog *dialog);
|
||||
u32 mpMenuTextUsernamePassword(void);
|
||||
s32 func0f17b4f8(u32 operation, struct menuitem *item, union handlerdata *data, s32 arg3, s32 arg4);
|
||||
s32 func0f17b4f8(u32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, bool arg4);
|
||||
char *mpMenuTextBodyName(struct menuitem *item);
|
||||
void func0f17b8f0(void);
|
||||
s32 menuhandler0017b91c(u32 operation, struct menuitem *item, union handlerdata *data);
|
||||
|
|
|
|||
|
|
@ -4397,8 +4397,8 @@ struct mpchr {
|
|||
/*0x0c*/ u8 unk0c;
|
||||
/*0x0d*/ u8 unk0d;
|
||||
/*0x0e*/ u8 unk0e;
|
||||
/*0x0f*/ u8 headnum;
|
||||
/*0x10*/ u8 bodynum;
|
||||
/*0x0f*/ u8 mpheadnum;
|
||||
/*0x10*/ u8 mpbodynum;
|
||||
/*0x11*/ u8 team;
|
||||
/*0x14*/ u32 displayoptions;
|
||||
/*0x18*/ u16 unk18;
|
||||
|
|
|
|||
Loading…
Reference in New Issue