Decompile mpInitPresetFeatures

This commit is contained in:
Ryan Dwyer
2020-11-25 12:23:30 +10:00
parent c4c6c6a9b7
commit cfbb99c9d1
16 changed files with 1134 additions and 1168 deletions
+10 -18
View File
@@ -1788,10 +1788,10 @@
#define MPFEATURE_WEAPON_SHIELD 0x16
#define MPFEATURE_WEAPON_CLOAKINGDEVICE 0x17
#define MPFEATURE_WEAPON_COMBATBOOST 0x18
#define MPFEATURE_SIMSKILL_HARD 0x19
#define MPFEATURE_SIMSKILL_PERFECT 0x1a
#define MPFEATURE_SIMDIFF_HARD 0x19
#define MPFEATURE_SIMDIFF_PERFECT 0x1a
#define MPFEATURE_1B 0x1b
#define MPFEATURE_SIMSKILL_DARK 0x1c
#define MPFEATURE_SIMDIFF_DARK 0x1c
#define MPFEATURE_SLOWMOTION 0x1d
#define MPFEATURE_ONEHITKILLS 0x1e
#define MPFEATURE_1F 0x1f
@@ -1985,14 +1985,6 @@
#define MPSCENARIO_KINGOFTHEHILL 4
#define MPSCENARIO_CAPTURETHECASE 5
#define MPSIMDIFF_MEAT 0
#define MPSIMDIFF_EASY 1
#define MPSIMDIFF_NORMAL 2
#define MPSIMDIFF_HARD 3
#define MPSIMDIFF_PERFECT 4
#define MPSIMDIFF_DARK 5
#define MPSIMDIFF_OFF 6
#define MPTEAM_0 0
#define MPTEAM_1 1
#define MPTEAM_2 2
@@ -2695,13 +2687,13 @@
#define SIGHT_MAIAN 6
#define SIGHT_NONE 7
#define SIMSKILL_MEAT 0
#define SIMSKILL_EASY 1
#define SIMSKILL_NORMAL 2
#define SIMSKILL_HARD 3
#define SIMSKILL_PERFECT 4
#define SIMSKILL_DARK 5
#define SIMSKILL_DISABLED 6
#define SIMDIFF_MEAT 0
#define SIMDIFF_EASY 1
#define SIMDIFF_NORMAL 2
#define SIMDIFF_HARD 3
#define SIMDIFF_PERFECT 4
#define SIMDIFF_DARK 5
#define SIMDIFF_DISABLED 6
#define SIMTYPE_GENERAL 0
#define SIMTYPE_PEACE 1
+1 -1
View File
@@ -7,7 +7,7 @@ extern struct mptrack g_MpTracks[NUM_MPTRACKS];
extern struct mppreset g_MpPresets[NUM_MPPRESETS];
extern u32 g_TeamColours[MAX_TEAMS];
extern u8 g_NumMpSimulantChrs;
extern struct simskill g_SimSkills[];
extern struct simdifficulty g_SimDifficulties[];
extern u32 g_MpBotCommands[NUM_MPBOTCOMMANDS];
extern u32 var80087e2c;
extern u32 var80087e50;
+1 -1
View File
@@ -3,6 +3,6 @@
#include <ultra64.h>
#include "types.h"
void func0f00b210(void);
void mpInitPresetFeatures(void);
#endif
+1 -1
View File
@@ -16,7 +16,7 @@ bool mpIsChallengeCompletedByAnyChrWithNumPlayersBySlot(s32 slot, s32 numplayers
struct mpconfigfull *mpLoadConfig(s32 confignum, u8 *buffer, s32 len);
s32 mpForceUnlockFeature(s32 featurenum, u8 *array, s32 tail, s32 len);
s32 mpForceUnlockSetupFeatures(struct mpsetup *mpsetup, u8 *array, s32 len);
void mpForceUnlockSimulantFeatures2(struct mpsetupwrapper *wrapper, u8 *array, s32 len, s32 arg3);
void mpForceUnlockConfigFeatures(struct mpconfig *config, u8 *array, s32 len, s32 challengeindex);
void mpForceUnlockSimulantFeatures(void);
void func0f19c1cc(void);
char *mpGetCurrentChallengeDescription(void);
+2 -2
View File
@@ -90,7 +90,7 @@ void mpRemoveSimulant(s32 index);
bool mpHasSimulants(void);
u32 func0f18cc8c(void);
bool mpIsSimSlotEnabled(s32 slot);
s32 mpGetSimTypeIndex(s32 type, s32 skill);
s32 mpGetSimTypeIndex(s32 type, s32 difficulty);
u32 func0f18cddc(void);
s32 mpPlayerGetIndex(struct chrdata *chr);
struct chrdata *mpGetChrFromPlayerIndex(s32 index);
@@ -103,7 +103,7 @@ u32 func0f18d5c4(void);
void func0f18d9a4(char *arg0, char *buffer, u32 *arg2);
s32 func0f18d9fc(void *arg0, s32 arg1, s32 arg2, u16 arg3);
s32 func0f18dac0(void *arg0, s32 arg1, s32 arg2, u16 arg3);
u32 mpGetNumPresets(void);
s32 mpGetNumPresets(void);
bool mpIsPresetUnlocked(s32 presetnum);
s32 mpGetNumUnlockedPresets(void);
char *mpGetPresetNameBySlot(s32 slot);
+4 -4
View File
@@ -818,11 +818,11 @@ extern struct mpchr *var800ac500[MAX_MPCHRS];
extern s32 g_MpNumPlayers;
extern struct mpsim g_MpSimulants[MAX_SIMULANTS];
// Elements 0-3 are skill levels for simulant 0 when there's 1/2/3/4 players
// Elements 4-7 are skill levels for simulant 1 when there's 1/2/3/4 players
// Elements 0-3 are difficulty levels for simulant 0 when there's 1/2/3/4 players
// Elements 4-7 are difficulty levels for simulant 1 when there's 1/2/3/4 players
// ...
// Elements 28-31 are skill levels for simulant 7 when there's 1/2/3/4 players
extern u8 g_MpSimulantSkillsPerNumPlayers[32];
// Elements 28-31 are difficulty levels for simulant 7 when there's 1/2/3/4 players
extern u8 g_MpSimulantDifficultiesPerNumPlayers[32];
extern struct mpplayer g_MpPlayers[6];
extern u8 g_ActiveMenuMpBotCommands[16];
+9 -29
View File
@@ -3086,7 +3086,7 @@ struct mphead {
struct mpsimulanttype {
/*0x00*/ u8 type;
/*0x01*/ u8 skill;
/*0x01*/ u8 difficulty;
/*0x02*/ u16 name;
/*0x04*/ u16 body;
/*0x06*/ u8 requirefeature;
@@ -4399,7 +4399,7 @@ struct mpplayer {
struct mpsim {
/*0x00*/ struct mpchr base;
/*0x48*/ u8 skill;
/*0x48*/ u8 difficulty;
};
struct missionconfig {
@@ -4532,8 +4532,8 @@ struct challenge {
/*0x05*/ u8 completions[4];
// Array of features which will become unlocked once the challenge is
// available. Seems to be unused though, as all arrays are empty.
// Maybe it's populated at runtime?
// available. The array is automatically populated at runtime based on what
// features the challenge uses.
/*0x09*/ u8 unlockfeatures[16];
};
@@ -5000,7 +5000,7 @@ struct propdefinition {
u16 scale;
};
struct simskill {
struct simdifficulty {
u8 unk00;
f32 unk04;
f32 unk08;
@@ -5799,22 +5799,15 @@ struct menuinputs {
};
struct mpconfigsim {
u16 mphead;
u8 mpbody;
u8 type;
u8 mpheadnum;
u8 mpbodynum;
u8 team;
u8 difficulties[4]; // per player count
};
struct mpconfig {
/*0x00*/ char name[12];
/*0x0c*/ u32 options;
/*0x10*/ u8 scenario;
/*0x11*/ u8 stage;
/*0x12*/ u8 timelimit; // minus 1, 60 = no limit
/*0x13*/ u8 scorelimit; // minus 1, 100 = no limit
/*0x14*/ u16 teamscorelimit; // minus 1, 400 = no limit
/*0x16*/ u16 unk16;
/*0x18*/ u8 weapons[16];
struct mpsetup setup;
struct mpconfigsim simulants[8];
};
@@ -6658,17 +6651,4 @@ struct var80067e6c {
f32 value;
};
struct mpsetupwrapperthing {
/*0x28*/ u8 simskill;
/*0x29*/ u8 mpheadnum;
/*0x2a*/ u8 mpbodynum;
/*0x2b*/ u8 unk2b;
/*0x2c*/ u8 simtypes[4];
};
struct mpsetupwrapper {
struct mpsetup setup;
struct mpsetupwrapperthing things[8];
};
#endif