mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-09-06 02:28:14 -04:00
Decompile hovTick
This commit is contained in:
+3
-3
@@ -1074,7 +1074,7 @@ s32 bbikeCalculateNewPosition(struct coord *vel, f32 angledelta)
|
||||
dstpos.x += vel->x;
|
||||
dstpos.z += vel->z;
|
||||
|
||||
propObjGetBbox(g_Vars.currentplayer->hoverbike, &radius, &ymax, &ymin);
|
||||
objGetBbox(g_Vars.currentplayer->hoverbike, &radius, &ymax, &ymin);
|
||||
func0f065dfc(&g_Vars.currentplayer->hoverbike->pos,
|
||||
g_Vars.currentplayer->hoverbike->rooms,
|
||||
&dstpos, dstrooms, spa8, 20);
|
||||
@@ -1385,7 +1385,7 @@ s32 bbike0f0d3940(struct coord *arg0, struct coord *arg1, struct coord *arg2)
|
||||
f32 tmp;
|
||||
f32 radius;
|
||||
|
||||
propObjGetBbox(g_Vars.currentplayer->hoverbike, &radius, &ymax, &ymin);
|
||||
objGetBbox(g_Vars.currentplayer->hoverbike, &radius, &ymax, &ymin);
|
||||
|
||||
sp34.x = arg1->x - (g_Vars.currentplayer->hoverbike->pos.x + arg0->f[0]);
|
||||
sp34.z = arg1->z - (g_Vars.currentplayer->hoverbike->pos.z + arg0->f[2]);
|
||||
@@ -1595,7 +1595,7 @@ void bbikeTick(void)
|
||||
bike->speed[0] = sp1f8;
|
||||
bike->speed[1] = sp1f4;
|
||||
|
||||
func0f0714b8(obj, &bike->hov);
|
||||
hovTick(obj, &bike->hov);
|
||||
func0f069c70(obj, true, true);
|
||||
mtx3ToMtx4(obj->realrot, &sp1a8);
|
||||
mtx4SetTranslation(&obj->prop->pos, &sp1a8);
|
||||
|
||||
+2
-2
@@ -681,7 +681,7 @@ bool bgrab0f0cdb68(f32 angle)
|
||||
} else if (var80070e80 != 0) {
|
||||
if (g_Vars.currentplayer->grabbedprop->type == PROPTYPE_OBJ) {
|
||||
if (g_Vars.currentplayer->grabbedprop->obj->flags3 & OBJFLAG3_GEOCYL) {
|
||||
propObjGetBbox(g_Vars.currentplayer->grabbedprop, &radius, &ymax, &ymin);
|
||||
objGetBbox(g_Vars.currentplayer->grabbedprop, &radius, &ymax, &ymin);
|
||||
|
||||
f0 = (var8009de78.f[0] - spa4.f[0]) * f20 + (var8009de78.f[2] - spa4.f[2]) * f22;
|
||||
f0 -= radius;
|
||||
@@ -1195,7 +1195,7 @@ void bgrabTick(void)
|
||||
}
|
||||
|
||||
if (hov) {
|
||||
func0f0714b8(obj, hov);
|
||||
hovTick(obj, hov);
|
||||
}
|
||||
|
||||
bmoveUpdateRooms(g_Vars.currentplayer);
|
||||
|
||||
+1
-1
@@ -7187,7 +7187,7 @@ void propGetBbox(struct prop *prop, f32 *radius, f32 *ymax, f32 *ymin)
|
||||
} else if (prop->type == PROPTYPE_PLAYER) {
|
||||
playerGetBbox(prop, radius, ymax, ymin);
|
||||
} else if (prop->type == PROPTYPE_OBJ || prop->type == PROPTYPE_DOOR) {
|
||||
propObjGetBbox(prop, radius, ymax, ymin);
|
||||
objGetBbox(prop, radius, ymax, ymin);
|
||||
} else {
|
||||
*radius = 0;
|
||||
*ymin = 0;
|
||||
|
||||
+280
-2614
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -2932,8 +2932,8 @@ void setupCreateHov(struct defaultobj *obj, struct hov *hov)
|
||||
hov->unk2c = 0;
|
||||
hov->unk30 = 0;
|
||||
hov->ground = 0;
|
||||
hov->groundnext60 = -1;
|
||||
hov->groundprev60 = -1;
|
||||
hov->nexttick60 = -1;
|
||||
hov->prevtick60 = -1;
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
|
||||
@@ -1290,6 +1290,12 @@
|
||||
#define HITPART_GENERAL 200
|
||||
#define HITPART_GENERALHALF 201
|
||||
|
||||
#define HOVTYPE_BED 0
|
||||
#define HOVTYPE_BIKE 1
|
||||
#define HOVTYPE_CRATE 2
|
||||
#define HOVTYPE_3 3 // unused
|
||||
#define HOVTYPE_4 4 // unused
|
||||
|
||||
#define HUDHALIGN_RIGHT 0
|
||||
#define HUDHALIGN_LEFT 1
|
||||
#define HUDHALIGN_MIDDLE 2
|
||||
|
||||
@@ -144,7 +144,7 @@ void liftUpdateTiles(struct liftobj *lift, bool stationary);
|
||||
void liftGoToStop(struct liftobj *lift, s32 stopnum);
|
||||
f32 objGetHov04(struct defaultobj *obj);
|
||||
void hovUpdateGround(struct defaultobj *obj, struct hov *hov, struct coord *pos, s16 *rooms, f32 matrix[3][3]);
|
||||
void func0f0714b8(struct defaultobj *obj, struct hov *hov);
|
||||
void hovTick(struct defaultobj *obj, struct hov *hov);
|
||||
s32 objIsHoverpropOrBike(struct defaultobj *obj);
|
||||
f32 hoverpropGetTurnAngle(struct defaultobj *obj);
|
||||
void hoverpropSetTurnAngle(struct defaultobj *obj, f32 angle);
|
||||
@@ -243,7 +243,7 @@ bool currentPlayerTryMountHoverbike(struct prop *prop);
|
||||
bool propobjInteract(struct prop *prop);
|
||||
void objSetPerimEnabled(struct prop *prop, bool enable);
|
||||
bool objUpdateGeometry(struct prop *prop, u8 **start, u8 **end);
|
||||
void propObjGetBbox(struct prop *prop, f32 *radius, f32 *ymax, f32 *ymin);
|
||||
void objGetBbox(struct prop *prop, f32 *radius, f32 *ymax, f32 *ymin);
|
||||
void ammotypeGetPickedUpText(char *dst);
|
||||
void ammotypeGetDeterminer(char *dst, s32 ammotype, s32 qty);
|
||||
void ammotypeGetPickupName(char *dst, s32 ammotype, s32 qty);
|
||||
|
||||
+17
-16
@@ -1421,7 +1421,8 @@ struct tvscreen {
|
||||
};
|
||||
|
||||
struct hov {
|
||||
/*0x00*/ u8 unk00;
|
||||
/*0x00*/ u8 type;
|
||||
/*0x01*/ u8 flags;
|
||||
/*0x04*/ f32 unk04;
|
||||
/*0x08*/ f32 unk08;
|
||||
/*0x0c*/ f32 unk0c;
|
||||
@@ -1435,8 +1436,8 @@ struct hov {
|
||||
/*0x2c*/ f32 unk2c;
|
||||
/*0x30*/ f32 unk30;
|
||||
/*0x34*/ f32 ground;
|
||||
/*0x38*/ s32 groundnext60; // time60 of when ground should be updated next
|
||||
/*0x3c*/ s32 groundprev60; // time60 of when ground was last updated
|
||||
/*0x38*/ s32 nexttick60; // framenum of when next tick should occur
|
||||
/*0x3c*/ s32 prevtick60; // framenum of when hov was last ticked
|
||||
};
|
||||
|
||||
struct defaultobj {
|
||||
@@ -6310,20 +6311,20 @@ struct skything38 {
|
||||
/*0x34*/ u32 unk34;
|
||||
};
|
||||
|
||||
struct var80069a70 {
|
||||
struct hovtype {
|
||||
/*0x00*/ f32 unk00;
|
||||
/*0x04*/ u32 unk04;
|
||||
/*0x08*/ u32 unk08;
|
||||
/*0x0c*/ u32 unk0c;
|
||||
/*0x10*/ u32 unk10;
|
||||
/*0x14*/ u32 unk14;
|
||||
/*0x18*/ u32 unk18;
|
||||
/*0x1c*/ u32 unk1c;
|
||||
/*0x20*/ u32 unk20;
|
||||
/*0x24*/ u32 unk24;
|
||||
/*0x28*/ u32 unk28;
|
||||
/*0x2c*/ u32 unk2c;
|
||||
/*0x30*/ u32 unk30;
|
||||
/*0x04*/ f32 unk04;
|
||||
/*0x08*/ f32 unk08;
|
||||
/*0x0c*/ f32 unk0c;
|
||||
/*0x10*/ f32 unk10;
|
||||
/*0x14*/ f32 unk14;
|
||||
/*0x18*/ f32 unk18;
|
||||
/*0x1c*/ f32 unk1c;
|
||||
/*0x20*/ f32 unk20;
|
||||
/*0x24*/ f32 unk24;
|
||||
/*0x28*/ f32 unk28;
|
||||
/*0x2c*/ f32 unk2c;
|
||||
/*0x30*/ f32 unk30;
|
||||
};
|
||||
|
||||
struct var8009dd10 {
|
||||
|
||||
Reference in New Issue
Block a user