Improve mismatch of sightDrawDefault

This commit is contained in:
Ryan Dwyer
2022-06-16 17:19:05 +10:00
parent 42d21af4ce
commit 9b7b98d61c
15 changed files with 338 additions and 332 deletions
+7 -7
View File
@@ -1143,7 +1143,7 @@
#define GUNAMMOREASON_NOCONTROL 0x02
#define GUNSIGHTREASON_1 0x01
#define GUNSIGHTREASON_AIMING 0x02
#define GUNSIGHTREASON_NOTAIMING 0x02
#define GUNSIGHTREASON_NOCONTROL 0x04
#define GUNSIGHTREASON_DAMAGE 0x10
@@ -3521,12 +3521,12 @@
#define SIGHT_MAIAN 6
#define SIGHT_NONE 7
#define SIGHTTARGET_0 0
#define SIGHTTARGET_1 1
#define SIGHTTARGET_2 2
#define SIGHTTARGET_3 3
#define SIGHTTARGET_4 4
#define SIGHTTARGET_5 5
#define SIGHTTARGET_NONE 0
#define SIGHTTARGET_DEFAULT 1
#define SIGHTTARGET_BETASCANNER 2
#define SIGHTTARGET_ROCKETLAUNCHER 3
#define SIGHTTARGET_CMP150 4
#define SIGHTTARGET_THREATDETECTOR 5
#define SKEL_BASIC 0x02
#define SKEL_CHRGUN 0x03
+1 -1
View File
@@ -13,7 +13,7 @@ void lvUpdateMiscSfx(void);
void lvReset(s32 stagenum);
Gfx *lvRenderFade(Gfx *gdl);
void lvFadeReset(void);
bool lvCheckCmpFollowThreat(struct threat *threat, s32 index);
bool lvUpdateTrackedProp(struct trackedprop *trackedprop, s32 index);
void lvFindThreatsForProp(struct prop *prop, bool inchild, struct coord *playerpos, s32 *activeslots, f32 *param_5);
void func0f168f24(struct prop *prop, bool inchild, struct coord *playerpos, s32 *activeslots, f32 *distances);
void lvFindThreats(void);
+2 -2
View File
@@ -60,8 +60,8 @@ bool func0f06797c(struct coord *coord, f32 arg1, s32 padnum);
bool func0f0679ac(struct model *model, f32 *max, f32 *min, f32 arg3[2], f32 arg4[2]);
void func0f067bc4(struct model *model, f32 *max, f32 *min, s32 axis);
void func0f067d88(struct model *model, f32 *arg1, f32 *arg2, f32 *arg3, f32 *arg4);
bool func0f067dc4(struct model *model, f32 *arg1, f32 *arg2, f32 *arg3, f32 *arg4);
bool modelSetRedBox(struct model *model, f32 *arg1, f32 *arg2, f32 *arg3, f32 *arg4);
bool modelGetScreenCoords2(struct model *model, f32 *x2, f32 *x1, f32 *y2, f32 *y1);
bool modelGetScreenCoords(struct model *model, f32 *x2, f32 *x1, f32 *y2, f32 *y1);
void func0f06803c(struct coord *arg0, f32 *arg1, f32 *arg2, f32 *arg3, f32 *arg4);
struct defaultobj *objFindByPadNum(s32 padnum);
struct defaultobj *objFindByPos(struct coord *pos, s16 *rooms);
+3 -3
View File
@@ -11,9 +11,9 @@ s32 sightFindFreeTargetIndex(s32 max);
void func0f0d7364(void);
void sightTick(bool sighton);
s32 sightCalculateBoxBound(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
Gfx *sightDrawTargetBox(Gfx *gdl, struct threat *threat, s32 textid, s32 time);
Gfx *func0f0d7f54(Gfx *gdl, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5);
Gfx *func0f0d87a8(Gfx *gdl, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5);
Gfx *sightDrawTargetBox(Gfx *gdl, struct trackedprop *trackedprop, s32 textid, s32 time);
Gfx *sightDrawAimer(Gfx *gdl, s32 x, s32 y, s32 radius, s32 cornergap, u32 colour);
Gfx *sightDrawDelayedAimer(Gfx *gdl, s32 x, s32 y, s32 radius, s32 cornergap, u32 colour);
Gfx *sightDrawDefault(Gfx *gdl, bool sighton);
Gfx *sightDrawClassic(Gfx *gdl, bool sighton);
Gfx *sightDrawType2(Gfx *gdl, bool sighton);
+28 -28
View File
@@ -2040,12 +2040,12 @@ struct playerbond {
/*0x0360 0x0394*/ struct coord unk28;
};
struct threat {
struct trackedprop {
struct prop *prop;
s16 x1; // x1
s16 y1; // y1
s16 x2; // x2
s16 y2; // y2
s16 x1;
s16 y1;
s16 x2;
s16 y2;
};
struct beam {
@@ -2549,8 +2549,8 @@ struct player {
/*0x161c*/ u16 floorflags;
/*0x161e*/ u8 floortype;
/*0x1620*/ u32 aimtype;
/*0x1624*/ struct threat lookingatprop;
/*0x1630*/ struct threat cmpfollowprops[4];
/*0x1624*/ struct trackedprop lookingatprop;
/*0x1630*/ struct trackedprop trackedprops[4];
/*0x1660*/ f32 crosspos[2];
/*0x1668*/ f32 crosspossum[2];
/*0x1670*/ f32 guncrossdamp;
@@ -2726,7 +2726,7 @@ struct player {
/*0x1b84*/ bool tickdiefinished;
/*0x1b88*/ s32 introanimnum;
/*0x1b8c*/ s32 lastsighton;
/*0x1b90*/ u16 targetset[4]; // related to cmpfollowprops
/*0x1b90*/ u16 targetset[4]; // related to trackedprops
/*0x1b98*/ u8 target;
/*0x1b9c*/ f32 speedthetacontrol;
/*0x1ba0*/ s32 cam_room;
@@ -5233,18 +5233,18 @@ struct mpconfigfull {
};
struct movedata {
/*0x00*/ s32 canswivelgun;
/*0x04*/ s32 canmanualaim;
/*0x08*/ s32 triggeron;
/*0x00*/ bool canswivelgun;
/*0x04*/ bool canmanualaim;
/*0x08*/ bool triggeron;
/*0x0c*/ s32 btapcount;
/*0x10*/ s32 canlookahead;
/*0x10*/ bool canlookahead;
/*0x14*/ s32 unk14;
/*0x18*/ s32 cannaturalturn;
/*0x1c*/ s32 cannaturalpitch;
/*0x20*/ s32 digitalstepforward;
/*0x24*/ s32 digitalstepback;
/*0x28*/ s32 digitalstepleft;
/*0x2c*/ s32 digitalstepright;
/*0x18*/ bool cannaturalturn;
/*0x1c*/ bool cannaturalpitch;
/*0x20*/ bool digitalstepforward;
/*0x24*/ bool digitalstepback;
/*0x28*/ bool digitalstepleft;
/*0x2c*/ bool digitalstepright;
/*0x30*/ f32 unk30;
/*0x34*/ f32 unk34;
/*0x38*/ f32 speedvertadown;
@@ -5254,20 +5254,20 @@ struct movedata {
/*0x48*/ s32 weaponbackoffset;
/*0x4c*/ s32 weaponforwardoffset;
/*0x50*/ u32 unk50;
/*0x54*/ u32 unk54;
/*0x58*/ u32 unk58;
/*0x54*/ bool aiming;
/*0x58*/ bool zooming;
/*0x5c*/ f32 zoomoutfovpersec;
/*0x60*/ f32 zoominfovpersec;
/*0x64*/ s32 crouchdown;
/*0x68*/ s32 crouchup;
/*0x6c*/ s32 rleanleft;
/*0x70*/ s32 rleanright;
/*0x74*/ s32 detonating;
/*0x78*/ s32 canautoaim;
/*0x7c*/ s32 farsighttempautoseek;
/*0x80*/ s32 eyesshut;
/*0x84*/ s32 invertpitch;
/*0x88*/ s32 disablelookahead;
/*0x6c*/ bool rleanleft;
/*0x70*/ bool rleanright;
/*0x74*/ bool detonating;
/*0x78*/ bool canautoaim;
/*0x7c*/ bool farsighttempautoseek;
/*0x80*/ bool eyesshut;
/*0x84*/ bool invertpitch;
/*0x88*/ bool disablelookahead;
/*0x8c*/ s32 c1stickxsafe; // raw values but adjusted to remove dead zone
/*0x90*/ s32 c1stickysafe;
/*0x94*/ s32 c1stickxraw; // raw values from control stick