mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-08-12 11:42:15 -04:00
Attempt to decompile frTick
This commit is contained in:
+38
-31
@@ -21,6 +21,7 @@
|
||||
#define PLAYERCOUNT() ((g_Vars.players[0] ? 1 : 0) + (g_Vars.players[1] ? 1 : 0) + (g_Vars.players[2] ? 1 : 0) + (g_Vars.players[3] ? 1 : 0))
|
||||
#define PLAYERCOUNT3012() ((g_Vars.players[3] ? 1 : 0) + (g_Vars.players[0] ? 1 : 0) + (g_Vars.players[1] ? 1 : 0) + (g_Vars.players[2] ? 1 : 0))
|
||||
#define SECSTOFRAMES240(secs) (secs * 240)
|
||||
#define SECSTOFRAMES60(secs) (secs * 60)
|
||||
#define TEXT(bankid, index) ((bankid << 9) | index)
|
||||
|
||||
// These actions are assigned to chr->actiontype
|
||||
@@ -560,6 +561,7 @@
|
||||
|
||||
#define EXPLOSIONTYPE_0 0
|
||||
#define EXPLOSIONTYPE_3 3
|
||||
#define EXPLOSIONTYPE_5 5
|
||||
#define EXPLOSIONTYPE_8 8
|
||||
#define EXPLOSIONTYPE_12 12
|
||||
#define EXPLOSIONTYPE_14 14
|
||||
@@ -581,29 +583,29 @@
|
||||
#define FLOORTYPE_DIRT 7
|
||||
#define FLOORTYPE_SNOW 8
|
||||
|
||||
#define FRCMD_ADDTARGET 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_SETHELPSCRIPT 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_IFBRONZE 0xfb
|
||||
#define FRCMD_IFSILVER 0xfc
|
||||
#define FRCMD_IFGOLD 0xfd
|
||||
#define FRCMD_ADDTARGET 0x00
|
||||
#define FRCMD_SETMAXACTIVETARGETS 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_SETHELPSCRIPT 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_IFBRONZE 0xfb
|
||||
#define FRCMD_IFSILVER 0xfc
|
||||
#define FRCMD_IFGOLD 0xfd
|
||||
|
||||
#define FRDIFFICULTY_BRONZE 0
|
||||
#define FRDIFFICULTY_SILVER 1
|
||||
@@ -615,14 +617,19 @@
|
||||
#define FRFAILREASON_SCOREUNATTAINABLE 3
|
||||
#define FRFAILREASON_INACCURATE 4
|
||||
|
||||
#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 FRMENUTYPE_WEAPONLIST 0
|
||||
#define FRMENUTYPE_DETAILS 1
|
||||
#define FRMENUTYPE_FAILED 2
|
||||
#define FRMENUTYPE_COMPLETED 3
|
||||
|
||||
#define FRTARGETFLAG_BRONZE 0x01
|
||||
#define FRTARGETFLAG_SILVER 0x02
|
||||
#define FRTARGETFLAG_GOLD 0x04
|
||||
#define FRTARGETFLAG_ROTATEONCLOAK 0x08
|
||||
#define FRTARGETFLAG_SPAWNFACINGAWAY 0x10
|
||||
#define FRTARGETFLAG_ONEHITEXPLODE 0x20
|
||||
#define FRTARGETFLAG_FARSIGHTAUTOTARGETABLE 0x40
|
||||
#define FRTARGETFLAG_TMPINVINCIBLE 0x80
|
||||
|
||||
#define FRZONE_RING3 1
|
||||
#define FRZONE_RING2 2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define add_target(frpadnum, script, target01, flags) \
|
||||
0x00, frpadnum, script, target01, flags
|
||||
|
||||
#define set_num_targets(bronze, silver, gold) \
|
||||
#define set_max_active_targets(bronze, silver, gold) \
|
||||
0x01, bronze, silver, gold
|
||||
|
||||
#define set_goal_score(bronze, silver, gold) \
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "types.h"
|
||||
|
||||
u32 func0f092610(void);
|
||||
void func0f0926bc(struct prop *prop, u32 arg1, u16 arg2);
|
||||
void func0f0926bc(struct prop *prop, s32 arg1, u16 arg2);
|
||||
s32 func0f0927d4(f32 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4);
|
||||
s32 func0f092914(s32 arg0);
|
||||
u32 func0f09294c(void);
|
||||
|
||||
@@ -152,7 +152,7 @@ void func0f0a9494(u32 operation);
|
||||
void func0f0a94d0(u32 operation, struct coord *a, struct coord *b);
|
||||
void func0f0a95ec(u32 arg0, bool enable);
|
||||
void currentPlayerSetAmmoQuantity(s32 ammotype, s32 quantity);
|
||||
s32 ammoGetQuantity(u32 type);
|
||||
s32 ammoGetQuantity(s32 type);
|
||||
s32 currentPlayerGetAmmoCount(s32 ammotype);
|
||||
s32 ammotypeGetMaxCapacity(u32 ammotype);
|
||||
bool ammotypeAllowsUnlimitedAmmo(u32 ammotype);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "types.h"
|
||||
|
||||
u32 func0f150820(void);
|
||||
u16 func0f150820(struct coord *pos, f32 *rotx, f32 *roty, f32 *rotz, f32 arg4, f32 arg5, f32 arg6, f32 arg7, u32 arg8, struct prop *prop);
|
||||
u32 func0f150d38(void);
|
||||
u32 func0f151780(void);
|
||||
u32 func0f151ed0(void);
|
||||
|
||||
@@ -69,7 +69,7 @@ u32 func0f06896c(void);
|
||||
u32 func0f068998(void);
|
||||
u32 func0f068aa8(void);
|
||||
u32 func0f068ad4(void);
|
||||
u32 func0f068af4(void);
|
||||
struct model08thing *func0f068af4(struct defaultobj *obj);
|
||||
u32 func0f068b14(void);
|
||||
u32 func0f068c04(void);
|
||||
u32 func0f068fc8(void);
|
||||
|
||||
@@ -49,8 +49,8 @@ char *frGetWeaponDescription(void);
|
||||
void frEndSession(bool hidetargets);
|
||||
bool frWasTooInaccurate(void);
|
||||
void frSetFailReason(s32 failreason);
|
||||
void func0f19f18c(void);
|
||||
bool func0f19f220(struct prop *prop);
|
||||
void frSetCompleted(void);
|
||||
bool frIsTargetOneHitExplodable(struct prop *prop);
|
||||
f32 func0f19f294(struct coord *a, f32 angle, struct coord *b);
|
||||
bool func0f19f2ec(struct prop *prop, struct coord *pos);
|
||||
struct prop *frChooseAutogunTarget(struct coord *arg0);
|
||||
|
||||
+26
-21
@@ -5292,34 +5292,34 @@ struct hudmessage {
|
||||
|
||||
struct frtarget {
|
||||
/*0x00*/ u8 unk00_01 : 1;
|
||||
/*0x00*/ u8 unk00_02 : 1;
|
||||
/*0x00*/ u8 unk00_03 : 1;
|
||||
/*0x00*/ u8 unk00_04 : 1;
|
||||
/*0x00*/ u8 unk00_05 : 1;
|
||||
/*0x00*/ u8 unk00_06 : 1;
|
||||
/*0x00*/ u8 active : 1;
|
||||
/*0x00*/ u8 destroyed : 1;
|
||||
/*0x00*/ u8 scriptenabled : 1;
|
||||
/*0x00*/ u8 rotating : 1;
|
||||
/*0x00*/ u8 rotateoncloak : 1;
|
||||
/*0x00*/ u8 frpadindex : 2;
|
||||
/*0x01*/ u8 maxdamage;
|
||||
/*0x02*/ u8 scriptindex;
|
||||
/*0x04*/ struct prop *prop;
|
||||
/*0x08*/ struct coord unk08;
|
||||
/*0x14*/ s32 unk14; // scriptsleep?
|
||||
/*0x18*/ u32 unk18;
|
||||
/*0x1c*/ f32 unk1c;
|
||||
/*0x08*/ struct coord dstpos;
|
||||
/*0x14*/ s32 scriptsleep;
|
||||
/*0x18*/ s32 timeuntilrotate;
|
||||
/*0x1c*/ f32 travelspeed;
|
||||
/*0x20*/ u8 damage;
|
||||
/*0x21*/ u8 scriptoffset;
|
||||
/*0x24*/ f32 unk24;
|
||||
/*0x24*/ f32 rotatespeed; // negative for reverse direction
|
||||
/*0x28*/ f32 angle;
|
||||
/*0x2c*/ f32 unk2c;
|
||||
/*0x2c*/ f32 rotatetoangle;
|
||||
/*0x30*/ u8 flags;
|
||||
/*0x31*/ u8 unk31;
|
||||
/*0x32*/ u8 unk32;
|
||||
/*0x33*/ u8 unk33;
|
||||
/*0x33*/ u8 travelling;
|
||||
/*0x34*/ s8 frpadnum;
|
||||
/*0x38*/ s32 unk38;
|
||||
/*0x38*/ s32 invincibletimer;
|
||||
};
|
||||
|
||||
struct frdata {
|
||||
/*0x000*/ u8 numtargets;
|
||||
/*0x000*/ u8 maxactivetargets;
|
||||
/*0x001*/ u8 unk001;
|
||||
/*0x002*/ u16 goalscore;
|
||||
/*0x004*/ u8 goaltargets;
|
||||
@@ -5331,21 +5331,21 @@ struct frdata {
|
||||
/*0x010*/ struct frtarget targets[18];
|
||||
/*0x448*/ u8 difficulty;
|
||||
/*0x44c*/ s32 timetaken;
|
||||
/*0x450*/ u32 score;
|
||||
/*0x454*/ u8 curtarget;
|
||||
/*0x450*/ s32 score;
|
||||
/*0x454*/ u8 numtargets;
|
||||
/*0x455*/ u8 targetsdestroyed;
|
||||
/*0x456*/ u16 slot;
|
||||
/*0x458*/ u16 numshots;
|
||||
/*0x45a*/ u8 unk45a;
|
||||
/*0x45a*/ u8 numshotssincetopup;
|
||||
/*0x45b*/ u8 failreason;
|
||||
/*0x45c*/ u16 numhitsbullseye;
|
||||
/*0x45e*/ u16 numhitsring1;
|
||||
/*0x460*/ u16 numhitsring2;
|
||||
/*0x462*/ u16 numhitsring3;
|
||||
/*0x464*/ s8 unk464;
|
||||
/*0x465*/ u8 unk465_00 : 3;
|
||||
/*0x464*/ s8 menucountdown;
|
||||
/*0x465*/ u8 menutype : 3;
|
||||
/*0x465*/ u8 donelighting : 1;
|
||||
/*0x465*/ u8 unk465_04 : 1;
|
||||
/*0x465*/ u8 donealarm : 1;
|
||||
/*0x465*/ u8 ammohasgrace : 1;
|
||||
/*0x465*/ u8 unk465_06 : 2;
|
||||
/*0x466*/ u8 helpscriptindex;
|
||||
@@ -5357,7 +5357,7 @@ struct frdata {
|
||||
/*0x472*/ s8 feedbackttl;
|
||||
/*0x474*/ s16 proxyendtimer;
|
||||
/*0x476*/ s16 ammoextra;
|
||||
/*0x478*/ u16 sdgrenadeextra;
|
||||
/*0x478*/ s16 sdgrenadeextra;
|
||||
/*0x47c*/ u32 unk47c;
|
||||
};
|
||||
|
||||
@@ -6345,4 +6345,9 @@ struct padlockeddoor {
|
||||
struct padlockeddoor *next;
|
||||
};
|
||||
|
||||
struct model08thing {
|
||||
u32 unk00;
|
||||
f32 unk04[4];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user