Attempt to decompile frExecuteWeaponScript

This commit is contained in:
Ryan Dwyer
2020-08-08 16:17:46 +10:00
parent 9703a51c5d
commit 74630d5af4
4 changed files with 237 additions and 80 deletions
+31 -19
View File
@@ -581,21 +581,29 @@
#define FLOORTYPE_DIRT 7
#define FLOORTYPE_SNOW 8
#define FRCMD_0C 0x0c
#define FRCMD_RESTART 0x0d
#define FRCMD_0E 0x0e
#define FRCMD_ROTATE 0x0f
#define FRCMD_HUDMSG 0x10
#define FRCMD_WAITUNTILSHOOT 0x11
#define FRCMD_WAITSECONDS 0x12
#define FRCMD_13 0x13
#define FRCMD_FB 0xfb
#define FRCMD_FC 0xfc
#define FRCMD_FD 0xfd
#define FRDIFFBIT_BRONZE 1
#define FRDIFFBIT_SILVER 2
#define FRDIFFBIT_GOLD 4
#define FRCMD_SETUPTARGET 0x00
#define FRCMD_SETNUMTARGETS 0x01
#define FRCMD_SETGOALSCORE 0x02
#define FRCMD_SETTIMELIMIT 0x03
#define FRCMD_SETAMMOLIMIT 0x04
#define FRCMD_SETEXTRASPEED 0x05
#define FRCMD_SETGOALACCURACY 0x06
#define FRCMD_SETGOALTARGETS 0x07
#define FRCMD_SETMAINSCRIPT 0x08
#define FRCMD_SETGRENADELIMIT 0x09
#define FRCMD_0A 0x0a
#define FRCMD_SETSCOREMULTIPLIER 0x0b
#define FRCMD_GOTOPAD 0x0c
#define FRCMD_RESTART 0x0d
#define FRCMD_0E 0x0e
#define FRCMD_ROTATE 0x0f
#define FRCMD_HUDMSG 0x10
#define FRCMD_WAITUNTILSHOOT 0x11
#define FRCMD_WAITSECONDS 0x12
#define FRCMD_END 0x13
#define FRCMD_ENDIFBRONZE 0xfb
#define FRCMD_ENDIFSILVER 0xfc
#define FRCMD_ENDIFGOLD 0xfd
#define FRDIFFICULTY_BRONZE 0
#define FRDIFFICULTY_SILVER 1
@@ -607,10 +615,14 @@
#define FRFAILREASON_SCOREUNATTAINABLE 3
#define FRFAILREASON_INACCURATE 4
#define FRTARGETFLAG_10 0x10
#define FRTARGETFLAG_20 0x20
#define FRTARGETFLAG_40 0x40
#define FRTARGETFLAG_80 0x80
#define FRTARGETFLAG_BRONZE 0x01
#define FRTARGETFLAG_SILVER 0x02
#define FRTARGETFLAG_GOLD 0x04
#define FRTARGETFLAG_08 0x08
#define FRTARGETFLAG_10 0x10
#define FRTARGETFLAG_20 0x20
#define FRTARGETFLAG_40 0x40
#define FRTARGETFLAG_80 0x80
#define FRZONE_RING3 1
#define FRZONE_RING2 2
+2 -2
View File
@@ -16,7 +16,7 @@ s32 stageIsComplete(s32 stageindex);
bool func0f19cbcc(s32 weapon);
bool frWeaponIsAvailable(s32 weapon);
u32 frGetWeaponIndexByWeapon(u32 weaponnum);
u32 func0f19cdf0(u32 weaponnum);
u32 frGetWeaponScriptIndex(u32 weaponnum);
s32 frIsClassicWeaponUnlocked(u32 weapon);
s32 frGetSlot(void);
void frSetSlot(s32 slot);
@@ -32,7 +32,7 @@ void frInitDefaults(void);
struct frdata *getFiringRangeData(void);
u32 frResolveFrPad(u32 arg0);
bool frIsDifficulty(u32 difficulties);
void func0f19d90c(u32 weaponindex);
void frExecuteWeaponScript(s32 scriptindex);
void func0f19de24(void);
bool frTargetIsAtScriptStart(s32 targetnum);
char *frGetInstructionalText(u32 index);
+7 -7
View File
@@ -5298,8 +5298,8 @@ struct frtarget {
/*0x00*/ u8 unk00_05 : 1;
/*0x00*/ u8 unk00_06 : 1;
/*0x00*/ u8 frpadindex : 2;
/*0x01*/ u8 unk01;
/*0x02*/ u8 unk02;
/*0x01*/ u8 maxdamage;
/*0x02*/ u8 scriptindex;
/*0x04*/ struct prop *prop;
/*0x08*/ struct coord unk08;
/*0x14*/ s32 unk14; // scriptsleep?
@@ -5327,12 +5327,12 @@ struct frdata {
/*0x006*/ u8 ammolimit;
/*0x007*/ u8 sdgrenadelimit;
/*0x008*/ u8 goalaccuracy;
/*0x00c*/ f32 unk00c;
/*0x00c*/ f32 speed;
/*0x010*/ struct frtarget targets[18];
/*0x448*/ u8 difficulty;
/*0x44c*/ s32 timetaken;
/*0x450*/ u32 score;
/*0x454*/ u8 unk454;
/*0x454*/ u8 curtarget;
/*0x455*/ u8 targetsdestroyed;
/*0x456*/ u16 slot;
/*0x458*/ u16 numshots;
@@ -5348,7 +5348,7 @@ struct frdata {
/*0x465*/ u8 unk465_04 : 1;
/*0x465*/ u8 ammohasgrace : 1;
/*0x465*/ u8 unk465_06 : 2;
/*0x466*/ u8 unk466;
/*0x466*/ u8 mainscriptindex;
/*0x467*/ u8 scriptoffset;
/*0x468*/ u8 scriptenabled;
/*0x46c*/ s32 scriptsleep;
@@ -5356,8 +5356,8 @@ struct frdata {
/*0x471*/ u8 feedbackzone;
/*0x472*/ s8 feedbackttl;
/*0x474*/ s16 proxyendtimer;
/*0x476*/ s16 unk476;
/*0x478*/ u32 unk478;
/*0x476*/ s16 ammoextra;
/*0x478*/ u16 sdgrenadeextra;
/*0x47c*/ u32 unk47c;
};