forked from Ports/perfect_dark
Merge branch 'master' of https://github.com/n64decomp/perfect_dark into port
This commit is contained in:
commit
0e5b4bde62
37 files changed
+1684
-1654
No files matched your search
+25
-25
@@ -3871,9 +3871,9 @@ bool bgTestHitOnObj(struct coord *arg0, struct coord *arg1, struct coord *arg2,
|
||||
|
||||
lowestsqdist = sqdist;
|
||||
|
||||
hitthing->unk00.x = sp8c.x;
|
||||
hitthing->unk00.y = sp8c.y;
|
||||
hitthing->unk00.z = sp8c.z;
|
||||
hitthing->pos.x = sp8c.x;
|
||||
hitthing->pos.y = sp8c.y;
|
||||
hitthing->pos.z = sp8c.z;
|
||||
hitthing->unk0c.x = sp80.x;
|
||||
hitthing->unk0c.y = sp80.y;
|
||||
hitthing->unk0c.z = sp80.z;
|
||||
@@ -4149,9 +4149,9 @@ bool bgTestHitOnChr(struct model *model, struct coord *arg1, struct coord *arg2,
|
||||
|
||||
*sqdistptr = sqdist;
|
||||
|
||||
hitthing->unk00.x = sp84.x;
|
||||
hitthing->unk00.y = sp84.y;
|
||||
hitthing->unk00.z = sp84.z;
|
||||
hitthing->pos.x = sp84.x;
|
||||
hitthing->pos.y = sp84.y;
|
||||
hitthing->pos.z = sp84.z;
|
||||
hitthing->unk0c.x = sp78.x;
|
||||
hitthing->unk0c.y = sp78.y;
|
||||
hitthing->unk0c.z = sp78.z;
|
||||
@@ -4377,9 +4377,9 @@ bool bgTestHitInVtxBatch(struct coord *arg0, struct coord *arg1, struct coord *a
|
||||
if (hit) {
|
||||
lowestsqdist = sqdist;
|
||||
|
||||
hitthing->unk00.x = spb0.x;
|
||||
hitthing->unk00.y = spb0.y;
|
||||
hitthing->unk00.z = spb0.z;
|
||||
hitthing->pos.x = spb0.x;
|
||||
hitthing->pos.y = spb0.y;
|
||||
hitthing->pos.z = spb0.z;
|
||||
hitthing->unk0c.x = spa4.x;
|
||||
hitthing->unk0c.y = spa4.y;
|
||||
hitthing->unk0c.z = spa4.z;
|
||||
@@ -4554,20 +4554,20 @@ bool bgTestHitInRoom(struct coord *frompos, struct coord *topos, s32 roomnum, st
|
||||
numbatches = g_Rooms[roomnum].numvtxbatches;
|
||||
|
||||
for (i = 0; i < numbatches; batch++, i++) {
|
||||
j = bg0f1612e4(&batch->bbmin, &batch->bbmax, &from, &dist, &sp94, &hitthing->unk00);
|
||||
j = bg0f1612e4(&batch->bbmin, &batch->bbmax, &from, &dist, &sp94, &hitthing->pos);
|
||||
|
||||
if (j == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (j == 1) {
|
||||
f0 = from.x - hitthing->unk00.x;
|
||||
f0 = from.x - hitthing->pos.x;
|
||||
f20 = f0 * f0;
|
||||
|
||||
f0 = from.y - hitthing->unk00.y;
|
||||
f0 = from.y - hitthing->pos.y;
|
||||
f20 += f0 * f0;
|
||||
|
||||
f0 = from.z - hitthing->unk00.z;
|
||||
f0 = from.z - hitthing->pos.z;
|
||||
f20 += f0 * f0;
|
||||
} else {
|
||||
f20 = -1.0f;
|
||||
@@ -4597,13 +4597,13 @@ bool bgTestHitInRoom(struct coord *frompos, struct coord *topos, s32 roomnum, st
|
||||
|
||||
for (j = 0; j < ARRAYCOUNT(var800a6538); j++) {
|
||||
if (bgTestHitInVtxBatch(&from, &to, &dist, &g_Rooms[roomnum].vtxbatches[var800a6538[j].vtxbatchindex], roomnum, hitthing)) {
|
||||
f0 = from.x - hitthing->unk00.x;
|
||||
f0 = from.x - hitthing->pos.x;
|
||||
f2 = f0 * f0;
|
||||
|
||||
f0 = from.y - hitthing->unk00.y;
|
||||
f0 = from.y - hitthing->pos.y;
|
||||
f2 += f0 * f0;
|
||||
|
||||
f0 = from.z - hitthing->unk00.z;
|
||||
f0 = from.z - hitthing->pos.z;
|
||||
f2 += f0 * f0;
|
||||
|
||||
if (count == 0) {
|
||||
@@ -4649,31 +4649,31 @@ bool bgTestHitInRoom(struct coord *frompos, struct coord *topos, s32 roomnum, st
|
||||
i++;
|
||||
|
||||
if (i < count) {
|
||||
f0 = from.x - hitthing->unk00.x;
|
||||
f0 = from.x - hitthing->pos.x;
|
||||
spc8 = f0 * f0;
|
||||
|
||||
f0 = from.y - hitthing->unk00.y;
|
||||
f0 = from.y - hitthing->pos.y;
|
||||
spc8 += f0 * f0;
|
||||
|
||||
f0 = from.z - hitthing->unk00.z;
|
||||
f0 = from.z - hitthing->pos.z;
|
||||
spc8 += f0 * f0;
|
||||
|
||||
for (; i < count; i++) {
|
||||
if (var800a6538[i].unk04 <= spc8) {
|
||||
if (bgTestHitInVtxBatch(&from, &to, &dist, &batch[var800a6538[i].vtxbatchindex], roomnum, &sp60)) {
|
||||
f0 = from.f[0] - sp60.unk00.f[0];
|
||||
f0 = from.f[0] - sp60.pos.f[0];
|
||||
f20 = f0 * f0;
|
||||
|
||||
f0 = from.f[1] - sp60.unk00.f[1];
|
||||
f0 = from.f[1] - sp60.pos.f[1];
|
||||
f20 += f0 * f0;
|
||||
|
||||
f0 = from.f[2] - sp60.unk00.f[2];
|
||||
f0 = from.f[2] - sp60.pos.f[2];
|
||||
f20 += f0 * f0;
|
||||
|
||||
if (f20 < spc8) {
|
||||
hitthing->unk00.x = sp60.unk00.x;
|
||||
hitthing->unk00.y = sp60.unk00.y;
|
||||
hitthing->unk00.z = sp60.unk00.z;
|
||||
hitthing->pos.x = sp60.pos.x;
|
||||
hitthing->pos.y = sp60.pos.y;
|
||||
hitthing->pos.z = sp60.pos.z;
|
||||
hitthing->unk0c.x = sp60.unk0c.x;
|
||||
hitthing->unk0c.y = sp60.unk0c.y;
|
||||
hitthing->unk0c.z = sp60.unk0c.z;
|
||||
|
||||
+49
-50
@@ -4455,8 +4455,8 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
{
|
||||
struct coord velocity = {0, 0, 0};
|
||||
Mtxf sp1f4;
|
||||
struct coord sp1e8;
|
||||
struct coord sp1dc;
|
||||
struct coord gunpos;
|
||||
struct coord gundir;
|
||||
struct prop *playerprop = g_Vars.currentplayer->prop;
|
||||
struct coord *prevpos = &g_Vars.currentplayer->bondprevpos;
|
||||
struct coord *extrapos = &g_Vars.currentplayer->bondextrapos;
|
||||
@@ -4528,17 +4528,17 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
|
||||
playerSetPerimEnabled(playerprop, true);
|
||||
|
||||
bgunCalculatePlayerShotSpread(&sp1e8, &sp1dc, handnum, true);
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &sp1dc);
|
||||
bgunCalculatePlayerShotSpread(&gunpos, &gundir, handnum, true);
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &gundir);
|
||||
|
||||
if (droppinggrenade) {
|
||||
// Dropping a grenade because player is in an nbomb storm
|
||||
velocity.x = sp1dc.x * 1.6666666f;
|
||||
velocity.y = sp1dc.y * 1.6666666f;
|
||||
velocity.z = sp1dc.z * 1.6666666f;
|
||||
velocity.x = gundir.x * 1.6666666f;
|
||||
velocity.y = gundir.y * 1.6666666f;
|
||||
velocity.z = gundir.z * 1.6666666f;
|
||||
} else if (gsetHasFunctionFlags(&hand->gset, FUNCFLAG_CALCULATETRAJECTORY)) {
|
||||
// Calculate the velocity based on the trajectory to the aimpos
|
||||
func0f061d54(0, 0, 0);
|
||||
propFindAimingAt(HAND_RIGHT, false, FINDPROPCONTEXT_QUERY);
|
||||
|
||||
if (hand->hasdotinfo) {
|
||||
aimpos.x = hand->dotpos.x;
|
||||
@@ -4547,11 +4547,11 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
|
||||
chrCalculateTrajectory(&spawnpos, 21.666666f, &aimpos, &sp140);
|
||||
|
||||
radians = acosf(sp1dc.f[0] * sp140.f[0] + sp1dc.f[1] * sp140.f[1] + sp1dc.f[2] * sp140.f[2]);
|
||||
radians = acosf(gundir.f[0] * sp140.f[0] + gundir.f[1] * sp140.f[1] + gundir.f[2] * sp140.f[2]);
|
||||
|
||||
// Check within 20 degrees
|
||||
if (radians > 0.34901026f || radians < -0.34901026f) {
|
||||
mtx00016b58(&spf8, 0, 0, 0, sp1dc.x, sp1dc.y, sp1dc.z, 0, 1, 0);
|
||||
mtx00016b58(&spf8, 0, 0, 0, gundir.x, gundir.y, gundir.z, 0, 1, 0);
|
||||
mtx00016b58(&spb8, 0, 0, 0, sp140.x, sp140.y, sp140.z, 0, 1, 0);
|
||||
|
||||
quaternion0f097044(&spf8, sp68);
|
||||
@@ -4567,24 +4567,24 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
quaternionSlerp(sp68, sp58, frac, sp48);
|
||||
quaternionToMtx(sp48, &sp78);
|
||||
|
||||
sp1dc.x = -sp78.m[2][0];
|
||||
sp1dc.y = -sp78.m[2][1];
|
||||
sp1dc.z = -sp78.m[2][2];
|
||||
gundir.x = -sp78.m[2][0];
|
||||
gundir.y = -sp78.m[2][1];
|
||||
gundir.z = -sp78.m[2][2];
|
||||
} else {
|
||||
sp1dc.x = sp140.x;
|
||||
sp1dc.y = sp140.y;
|
||||
sp1dc.z = sp140.z;
|
||||
gundir.x = sp140.x;
|
||||
gundir.y = sp140.y;
|
||||
gundir.z = sp140.z;
|
||||
}
|
||||
}
|
||||
|
||||
velocity.x = sp1dc.x * 21.666666f;
|
||||
velocity.y = sp1dc.y * 21.666666f;
|
||||
velocity.z = sp1dc.z * 21.666666f;
|
||||
velocity.x = gundir.x * 21.666666f;
|
||||
velocity.y = gundir.y * 21.666666f;
|
||||
velocity.z = gundir.z * 21.666666f;
|
||||
} else {
|
||||
// Simple velocity
|
||||
velocity.x = sp1dc.x * 16.666666f;
|
||||
velocity.y = sp1dc.y * 16.666666f;
|
||||
velocity.z = sp1dc.z * 16.666666f;
|
||||
velocity.x = gundir.x * 16.666666f;
|
||||
velocity.y = gundir.y * 16.666666f;
|
||||
velocity.z = gundir.z * 16.666666f;
|
||||
|
||||
if (gset->weaponnum == WEAPON_GRENADE || gset->weaponnum == WEAPON_NBOMB) {
|
||||
velocity.y += 1.6666666f;
|
||||
@@ -4730,8 +4730,8 @@ void bgunCreateFiredProjectile(s32 handnum)
|
||||
f32 sp25c;
|
||||
struct coord sp250;
|
||||
Mtxf sp210;
|
||||
struct coord sp204;
|
||||
struct coord sp1f8;
|
||||
struct coord gunpos;
|
||||
struct coord gundir;
|
||||
struct prop *playerprop;
|
||||
struct coord *prevpos;
|
||||
struct coord *extrapos;
|
||||
@@ -4765,24 +4765,24 @@ void bgunCreateFiredProjectile(s32 handnum)
|
||||
funcdef = (struct weaponfunc_shootprojectile *)tmp;
|
||||
|
||||
mtx4LoadIdentity(&sp270);
|
||||
bgunCalculatePlayerShotSpread(&sp204, &sp1f8, handnum, true);
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &sp1f8);
|
||||
bgunCalculatePlayerShotSpread(&gunpos, &gundir, handnum, true);
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &gundir);
|
||||
|
||||
spawnpos.x = hand->muzzlepos.x;
|
||||
spawnpos.y = hand->muzzlepos.y;
|
||||
spawnpos.z = hand->muzzlepos.z;
|
||||
|
||||
if (hand->gset.weaponnum == WEAPON_SLAYER && hand->gset.weaponfunc == FUNC_SECONDARY) {
|
||||
spawnpos.x += 50.0f * sp1f8.x;
|
||||
spawnpos.y += 50.0f * sp1f8.y;
|
||||
spawnpos.z += 50.0f * sp1f8.z;
|
||||
spawnpos.x += 50.0f * gundir.x;
|
||||
spawnpos.y += 50.0f * gundir.y;
|
||||
spawnpos.z += 50.0f * gundir.z;
|
||||
}
|
||||
|
||||
sp260 = funcdef->speed * 1.6666666f / 60.0f;
|
||||
sp25c = funcdef->traveldist * 1.6666666f;
|
||||
|
||||
if (gsetHasFunctionFlags(&hand->gset, FUNCFLAG_CALCULATETRAJECTORY)) {
|
||||
func0f061d54(0, 0, 0);
|
||||
propFindAimingAt(HAND_RIGHT, false, FINDPROPCONTEXT_QUERY);
|
||||
|
||||
if (hand->hasdotinfo) {
|
||||
aimpos.x = hand->dotpos.x;
|
||||
@@ -4791,10 +4791,10 @@ void bgunCreateFiredProjectile(s32 handnum)
|
||||
|
||||
chrCalculateTrajectory(&spawnpos, sp25c, &aimpos, &sp1bc);
|
||||
|
||||
radians = acosf(sp1f8.f[0] * sp1bc.f[0] + sp1f8.f[1] * sp1bc.f[1] + sp1f8.f[2] * sp1bc.f[2]);
|
||||
radians = acosf(gundir.f[0] * sp1bc.f[0] + gundir.f[1] * sp1bc.f[1] + gundir.f[2] * sp1bc.f[2]);
|
||||
|
||||
if (radians > 0.17450513f || radians < -0.17450513f) {
|
||||
mtx00016b58(&sp174, 0.0f, 0.0f, 0.0f, sp1f8.x, sp1f8.y, sp1f8.z, 0.0f, 1.0f, 0.0f);
|
||||
mtx00016b58(&sp174, 0.0f, 0.0f, 0.0f, gundir.x, gundir.y, gundir.z, 0.0f, 1.0f, 0.0f);
|
||||
mtx00016b58(&sp134, 0.0f, 0.0f, 0.0f, sp1bc.x, sp1bc.y, sp1bc.z, 0.0f, 1.0f, 0.0f);
|
||||
|
||||
quaternion0f097044(&sp174, spe4);
|
||||
@@ -4810,24 +4810,24 @@ void bgunCreateFiredProjectile(s32 handnum)
|
||||
quaternionSlerp(spe4, spd4, frac, spc4);
|
||||
quaternionToMtx(spc4, &spf4);
|
||||
|
||||
sp1f8.x = -spf4.m[2][0];
|
||||
sp1f8.y = -spf4.m[2][1];
|
||||
sp1f8.z = -spf4.m[2][2];
|
||||
gundir.x = -spf4.m[2][0];
|
||||
gundir.y = -spf4.m[2][1];
|
||||
gundir.z = -spf4.m[2][2];
|
||||
} else {
|
||||
sp1f8.x = sp1bc.x;
|
||||
sp1f8.y = sp1bc.y;
|
||||
sp1f8.z = sp1bc.z;
|
||||
gundir.x = sp1bc.x;
|
||||
gundir.y = sp1bc.y;
|
||||
gundir.z = sp1bc.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sp250.x = sp1f8.x * sp260;
|
||||
sp250.y = sp1f8.y * sp260;
|
||||
sp250.z = sp1f8.z * sp260;
|
||||
sp250.x = gundir.x * sp260;
|
||||
sp250.y = gundir.y * sp260;
|
||||
sp250.z = gundir.z * sp260;
|
||||
|
||||
sp264.x = sp250.f[0] * g_Vars.lvupdate60freal + sp1f8.f[0] * sp25c;
|
||||
sp264.y = sp250.f[1] * g_Vars.lvupdate60freal + sp1f8.f[1] * sp25c;
|
||||
sp264.z = sp250.f[2] * g_Vars.lvupdate60freal + sp1f8.f[2] * sp25c;
|
||||
sp264.x = sp250.f[0] * g_Vars.lvupdate60freal + gundir.f[0] * sp25c;
|
||||
sp264.y = sp250.f[1] * g_Vars.lvupdate60freal + gundir.f[1] * sp25c;
|
||||
sp264.z = sp250.f[2] * g_Vars.lvupdate60freal + gundir.f[2] * sp25c;
|
||||
|
||||
if ((funcdef->base.base.flags & FUNCFLAG_FLYBYWIRE) == 0 && g_Vars.lvupdate240 > 0) {
|
||||
sp264.x += (playerprop->pos.x - prevpos->x + extrapos->x) / g_Vars.lvupdate60freal;
|
||||
@@ -5244,7 +5244,7 @@ void bgun0f0a0c44(s32 handnum, struct coord *arg1, struct coord *arg2)
|
||||
cam0f0b4c3c(g_Vars.currentplayer->hands[handnum].crosspos, arg2, 1);
|
||||
}
|
||||
|
||||
void bgunCalculatePlayerShotSpread(struct coord *arg0, struct coord *arg1, s32 handnum, bool dorandom)
|
||||
void bgunCalculatePlayerShotSpread(struct coord *gunpos2d, struct coord *gundir2d, s32 handnum, bool dorandom)
|
||||
{
|
||||
f32 crosspos[2];
|
||||
f32 spread = 0;
|
||||
@@ -5258,7 +5258,6 @@ void bgunCalculatePlayerShotSpread(struct coord *arg0, struct coord *arg1, s32 h
|
||||
spread = shootfunc->spread;
|
||||
}
|
||||
|
||||
// Unsure what this is
|
||||
if (weaponHasAimFlag(bgunGetWeaponNum2(handnum), INVAIMFLAG_ACCURATESINGLESHOT)
|
||||
&& player->hands[handnum].burstbullets == 1) {
|
||||
spread *= 0.25f;
|
||||
@@ -5294,11 +5293,11 @@ void bgunCalculatePlayerShotSpread(struct coord *arg0, struct coord *arg1, s32 h
|
||||
crosspos[1] = player->crosspos[1] + (randfactor * scaledspread * camGetScreenHeight())
|
||||
/ viGetHeight();
|
||||
|
||||
arg0->x = 0;
|
||||
arg0->y = 0;
|
||||
arg0->z = 0;
|
||||
gunpos2d->x = 0;
|
||||
gunpos2d->y = 0;
|
||||
gunpos2d->z = 0;
|
||||
|
||||
cam0f0b4c3c(crosspos, arg1, 1);
|
||||
cam0f0b4c3c(crosspos, gundir2d, 1);
|
||||
}
|
||||
|
||||
void bgunCalculateBotShotSpread(struct coord *arg0, s32 weaponnum, s32 funcnum, bool arg3, s32 crouchpos, bool dual)
|
||||
|
||||
+1
-1
@@ -259,7 +259,7 @@ bool botactShootFarsight(struct chrdata *chr, s32 arg1, struct coord *vector, st
|
||||
// chance of passing.
|
||||
if (oppchr != chr
|
||||
&& value > rand
|
||||
&& func0f06b39c(arg3, vector, &oppprop->pos, chr0f0278a4(oppchr))) {
|
||||
&& func0f06b39c(arg3, vector, &oppprop->pos, chrGetHitRadius(oppchr))) {
|
||||
bgunPlayPropHitSound(&gset, oppprop, -1);
|
||||
|
||||
if (oppchr->model && chrGetShield(oppchr) > 0) {
|
||||
|
||||
+8
-11
@@ -105,7 +105,7 @@ void camSetScale(void)
|
||||
player->c_cameraleftnorm.z = -fVar5 * fVar4;
|
||||
}
|
||||
|
||||
void cam0f0b4c3c(f32 *crosspos, struct coord *dst, f32 arg2)
|
||||
void cam0f0b4c3c(f32 pos2d[2], struct coord *dir2d, f32 arg2)
|
||||
{
|
||||
struct player *player = g_Vars.currentplayer;
|
||||
f32 sp20;
|
||||
@@ -113,14 +113,14 @@ void cam0f0b4c3c(f32 *crosspos, struct coord *dst, f32 arg2)
|
||||
f32 sp18 = -1.0f;
|
||||
f32 f2;
|
||||
|
||||
sp1c = (player->c_halfheight - (crosspos[1] - player->c_screentop)) * player->c_scaley;
|
||||
sp20 = (crosspos[0] - player->c_screenleft - player->c_halfwidth) * player->c_scalex;
|
||||
sp1c = (player->c_halfheight - (pos2d[1] - player->c_screentop)) * player->c_scaley;
|
||||
sp20 = (pos2d[0] - player->c_screenleft - player->c_halfwidth) * player->c_scalex;
|
||||
|
||||
f2 = arg2 / sqrtf(sp20 * sp20 + sp1c * sp1c + sp18 * sp18);
|
||||
|
||||
dst->x = sp20 * f2;
|
||||
dst->y = sp1c * f2;
|
||||
dst->z = sp18 * f2;
|
||||
dir2d->x = sp20 * f2;
|
||||
dir2d->y = sp1c * f2;
|
||||
dir2d->z = sp18 * f2;
|
||||
}
|
||||
|
||||
void cam0f0b4d04(struct coord *in, f32 *out)
|
||||
@@ -128,11 +128,8 @@ void cam0f0b4d04(struct coord *in, f32 *out)
|
||||
struct player *player = g_Vars.currentplayer;
|
||||
f32 value = 1.0f / in->z;
|
||||
|
||||
out[1] = in->y * value * player->c_recipscaley
|
||||
+ (player->c_screentop + player->c_halfheight);
|
||||
|
||||
out[0] = (player->c_screenleft + player->c_halfwidth)
|
||||
- in->x * value * player->c_recipscalex;
|
||||
out[1] = in->y * value * player->c_recipscaley + (player->c_screentop + player->c_halfheight);
|
||||
out[0] = (player->c_screenleft + player->c_halfwidth) - in->x * value * player->c_recipscalex;
|
||||
}
|
||||
|
||||
void cam0f0b4d68(struct coord *in, f32 out[2])
|
||||
|
||||
+34
-34
@@ -4481,7 +4481,7 @@ void chrDisfigure(struct chrdata *chr, struct coord *exppos, f32 damageradius)
|
||||
}
|
||||
}
|
||||
|
||||
f32 chr0f0278a4(struct chrdata *chr)
|
||||
f32 chrGetHitRadius(struct chrdata *chr)
|
||||
{
|
||||
s32 i;
|
||||
f32 result;
|
||||
@@ -4513,16 +4513,16 @@ f32 chr0f0278a4(struct chrdata *chr)
|
||||
return result;
|
||||
}
|
||||
|
||||
void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool arg3)
|
||||
void chrTestHit(struct prop *prop, struct shotdata *shotdata, bool isshooting, bool cheap)
|
||||
{
|
||||
struct coord spdc;
|
||||
struct coord spd0;
|
||||
struct chrdata *chr = prop->chr;
|
||||
|
||||
if ((chr->chrflags & CHRCFLAG_HIDDEN) == 0 && (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK)) {
|
||||
f32 fStack32 = chr0f0278a4(chr);
|
||||
f32 radius = chrGetHitRadius(chr);
|
||||
|
||||
if (prop->z - fStack32 < shotdata->unk34) {
|
||||
if (prop->z - radius < shotdata->distance) {
|
||||
struct model *model = chr->model;
|
||||
s32 hitpart = 0;
|
||||
struct modelnode *node = NULL;
|
||||
@@ -4530,14 +4530,14 @@ void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool a
|
||||
struct hitthing sp88;
|
||||
s32 sp84 = 0;
|
||||
struct modelnode *sp80 = NULL;
|
||||
Mtxf *iVar5 = modelGetRootMtx(model);
|
||||
Mtxf *rootmtx = modelGetRootMtx(model);
|
||||
struct prop *next;
|
||||
struct prop *child;
|
||||
f32 sp70;
|
||||
Mtxf *mtx;
|
||||
f32 sp68;
|
||||
|
||||
if (func0f06b39c(&shotdata->unk00, &shotdata->unk0c, (struct coord *)iVar5->m[3], fStack32)) {
|
||||
if (func0f06b39c(&shotdata->gunpos2d, &shotdata->gundir2d, (struct coord *)rootmtx->m[3], radius)) {
|
||||
spb8 = 1;
|
||||
hitpart = 1;
|
||||
}
|
||||
@@ -4555,27 +4555,27 @@ void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool a
|
||||
child = next;
|
||||
}
|
||||
|
||||
if (arg3 || var8005efc0 > 0.0f) {
|
||||
hitpart = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node);
|
||||
if (cheap || var8005efc0 > 0.0f) {
|
||||
hitpart = modelTestForHit(model, &shotdata->gunpos2d, &shotdata->gundir2d, &node);
|
||||
|
||||
while (hitpart > 0) {
|
||||
if (func0f084594(model, node, &shotdata->unk00, &shotdata->unk0c, &sp88, &sp84, &sp80)) {
|
||||
mtx4TransformVec(&model->matrices[sp84], &sp88.unk00, &spdc);
|
||||
if (func0f084594(model, node, &shotdata->gunpos2d, &shotdata->gundir2d, &sp88, &sp84, &sp80)) {
|
||||
mtx4TransformVec(&model->matrices[sp84], &sp88.pos, &spdc);
|
||||
mtx4TransformVecInPlace(camGetProjectionMtxF(), &spdc);
|
||||
mtx4RotateVec(&model->matrices[sp84], &sp88.unk0c, &spd0);
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &spd0);
|
||||
break;
|
||||
}
|
||||
|
||||
hitpart = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node);
|
||||
hitpart = modelTestForHit(model, &shotdata->gunpos2d, &shotdata->gundir2d, &node);
|
||||
}
|
||||
} else {
|
||||
hitpart = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node);
|
||||
hitpart = modelTestForHit(model, &shotdata->gunpos2d, &shotdata->gundir2d, &node);
|
||||
|
||||
if (hitpart > 0) {
|
||||
if (func0f06bea0(model, model->definition->rootnode, model->definition->rootnode, &shotdata->unk00,
|
||||
&shotdata->unk0c, &sp88.unk00, &sp70, &node, &hitpart, &sp84, &sp80)) {
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &sp88.unk00, &spdc);
|
||||
if (func0f06bea0(model, model->definition->rootnode, model->definition->rootnode, &shotdata->gunpos2d,
|
||||
&shotdata->gundir2d, &sp88.pos, &sp70, &node, &hitpart, &sp84, &sp80)) {
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &sp88.pos, &spdc);
|
||||
mtx4RotateVec(camGetProjectionMtxF(), &sp88.unk0c, &spd0);
|
||||
} else {
|
||||
hitpart = 0;
|
||||
@@ -4593,12 +4593,12 @@ void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool a
|
||||
sp68 = spdc.x * mtx->m[0][2] + spdc.y * mtx->m[1][2] + spdc.z * mtx->m[2][2] + mtx->m[3][2];
|
||||
sp68 = -sp68;
|
||||
|
||||
if (sp68 < shotdata->unk34) {
|
||||
func0f061fa8(shotdata, prop, sp68, hitpart, node, &sp88, sp84, sp80, model, 1, chrGetShield(chr) > 0.0f, &spdc, &spd0);
|
||||
if (sp68 < shotdata->distance) {
|
||||
hitCreate(shotdata, prop, sp68, hitpart, node, &sp88, sp84, sp80, model, true, chrGetShield(chr) > 0.0f, &spdc, &spd0);
|
||||
}
|
||||
}
|
||||
|
||||
if (spb8 && hitpart <= 0 && prop->z <= shotdata->unk34 && arg2) {
|
||||
if (spb8 && hitpart <= 0 && prop->z <= shotdata->distance && isshooting) {
|
||||
if (chrGetTargetProp(chr) == g_Vars.currentplayer->prop) {
|
||||
chr->chrflags |= CHRCFLAG_NEAR_MISS;
|
||||
}
|
||||
@@ -4639,24 +4639,24 @@ void chrHit(struct shotdata *shotdata, struct hit *hit)
|
||||
chr = prop->chr;
|
||||
|
||||
if ((chr->chrflags & CHRCFLAG_HIDDEN) == 0) {
|
||||
sp98.x = shotdata->unk00.x - (hit->distance * shotdata->unk0c.x) / shotdata->unk0c.z;
|
||||
sp98.y = shotdata->unk00.y - (hit->distance * shotdata->unk0c.y) / shotdata->unk0c.z;
|
||||
sp98.z = shotdata->unk00.z - hit->distance;
|
||||
sp98.x = shotdata->gunpos2d.x - (hit->distance * shotdata->gundir2d.x) / shotdata->gundir2d.z;
|
||||
sp98.y = shotdata->gunpos2d.y - (hit->distance * shotdata->gundir2d.y) / shotdata->gundir2d.z;
|
||||
sp98.z = shotdata->gunpos2d.z - hit->distance;
|
||||
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &sp98, &hitpos);
|
||||
bgunSetHitPos(&hitpos);
|
||||
bgunPlayPropHitSound(&shotdata->gset, hit->prop, -1);
|
||||
|
||||
chrEmitSparks(chr, hit->prop, hit->hitpart, &hitpos, &shotdata->dir, g_Vars.currentplayer->prop->chr);
|
||||
chrEmitSparks(chr, hit->prop, hit->hitpart, &hitpos, &shotdata->gundir3d, g_Vars.currentplayer->prop->chr);
|
||||
|
||||
sp90[0] = hit->hitthing.unk00.x;
|
||||
sp90[1] = hit->hitthing.unk00.y;
|
||||
sp90[2] = hit->hitthing.unk00.z;
|
||||
sp90[0] = hit->hitthing.pos.x;
|
||||
sp90[1] = hit->hitthing.pos.y;
|
||||
sp90[2] = hit->hitthing.pos.z;
|
||||
|
||||
shield = chrGetShield(chr);
|
||||
|
||||
func0f0341dc(chr, gsetGetDamage(&shotdata->gset), &shotdata->dir, &shotdata->gset,
|
||||
g_Vars.currentplayer->prop, hit->hitpart, hit->prop, hit->node,
|
||||
func0f0341dc(chr, gsetGetDamage(&shotdata->gset), &shotdata->gundir3d, &shotdata->gset,
|
||||
g_Vars.currentplayer->prop, hit->hitpart, hit->prop, hit->bboxnode,
|
||||
hit->model, hit->hitthing.unk28 / 2, sp90);
|
||||
|
||||
if (g_Vars.antiplayernum >= 0
|
||||
@@ -4711,9 +4711,9 @@ void chrHit(struct shotdata *shotdata, struct hit *hit)
|
||||
index = random() % type->numwallhittexes;
|
||||
|
||||
wallhitCreate(
|
||||
&hit->hitthing.unk00,
|
||||
&hit->hitthing.pos,
|
||||
&hit->hitthing.unk0c,
|
||||
&shotdata->gunpos,
|
||||
&shotdata->gunpos3d,
|
||||
0,
|
||||
0,
|
||||
type->wallhittexes[index],
|
||||
@@ -4747,9 +4747,9 @@ void chrHit(struct shotdata *shotdata, struct hit *hit)
|
||||
index = random() % type->numwallhittexes;
|
||||
|
||||
wallhitCreate(
|
||||
&hit->hitthing.unk00,
|
||||
&hit->hitthing.pos,
|
||||
&hit->hitthing.unk0c,
|
||||
&shotdata->gunpos,
|
||||
&shotdata->gunpos3d,
|
||||
0,
|
||||
0,
|
||||
type->wallhittexes[index],
|
||||
@@ -4763,7 +4763,7 @@ void chrHit(struct shotdata *shotdata, struct hit *hit)
|
||||
// Shot a chr in the flesh
|
||||
s32 race = CHRRACE(chr);
|
||||
struct coord sp5c;
|
||||
Mtxf *sp58 = modelFindNodeMtx(hit->model, hit->node, 0);
|
||||
Mtxf *sp58 = modelFindNodeMtx(hit->model, hit->bboxnode, 0);
|
||||
|
||||
// Create blood
|
||||
mtx0001719c(sp58->m, spb0.m);
|
||||
@@ -4785,7 +4785,7 @@ void chrHit(struct shotdata *shotdata, struct hit *hit)
|
||||
}
|
||||
|
||||
if (!chrIsUsingPaintball(g_Vars.currentplayer->prop->chr)) {
|
||||
chrBruise(hit->model, hit->hitpart, hit->node, &sp5c);
|
||||
chrBruise(hit->model, hit->hitpart, hit->bboxnode, &sp5c);
|
||||
}
|
||||
|
||||
splatsCreateForChrHit(prop, shotdata, &sp98, &hitpos, darker, 0, g_Vars.currentplayer->prop->chr);
|
||||
@@ -4808,7 +4808,7 @@ void chrHit(struct shotdata *shotdata, struct hit *hit)
|
||||
darker = false;
|
||||
}
|
||||
|
||||
chrBruise(hit->model, hit->hitpart, hit->node, &sp5c);
|
||||
chrBruise(hit->model, hit->hitpart, hit->bboxnode, &sp5c);
|
||||
|
||||
splatsCreateForChrHit(prop, shotdata, &sp98, &hitpos, darker, 0, g_Vars.currentplayer->prop->chr);
|
||||
}
|
||||
|
||||
+26
-24
@@ -122,7 +122,7 @@ struct creditsdata {
|
||||
/*0x0008*/ u32 unk0008;
|
||||
/*0x000c*/ struct particle particles[500];
|
||||
/*0x2eec*/ u8 unk2eec;
|
||||
/*0x2ef0*/ struct menu840 unk2ef0;
|
||||
/*0x2ef0*/ struct menumodel menumodel;
|
||||
/*0x34a8*/ u8 unk34a8[0xcac];
|
||||
|
||||
/**
|
||||
@@ -1796,7 +1796,7 @@ Gfx *creditsDraw(Gfx *gdl)
|
||||
g_CreditsScrollStarted = true;
|
||||
scrolltimer240 = 0;
|
||||
|
||||
func0f0f37a4(&g_CreditsData->unk2ef0);
|
||||
menuUnsetModel(&g_CreditsData->menumodel);
|
||||
}
|
||||
|
||||
scrolltimer240 += g_Vars.diffframe240;
|
||||
@@ -1805,19 +1805,22 @@ Gfx *creditsDraw(Gfx *gdl)
|
||||
scrolltimer240 = 0;
|
||||
}
|
||||
|
||||
g_CreditsData->unk2ef0.unk54c = 0;
|
||||
g_CreditsData->unk2ef0.unk524 = 0;
|
||||
g_CreditsData->unk2ef0.unk520 = g_CreditsData->unk2ef0.unk548 = -0.26175770163536;
|
||||
g_CreditsData->unk2ef0.unk528 = g_CreditsData->unk2ef0.unk550 = 0;
|
||||
g_CreditsData->unk2ef0.unk538 = 833.0f - (scrolltimer240 / TICKS(14400.0f)) * 2413.0f;
|
||||
g_CreditsData->unk2ef0.unk53c = VERSION == VERSION_PAL_FINAL ? 65.86 : 70.86;
|
||||
g_CreditsData->unk2ef0.unk540 = -2050;
|
||||
g_CreditsData->unk2ef0.unk544 = 1.467;
|
||||
g_CreditsData->unk2ef0.unk00c = 1200;
|
||||
g_CreditsData->unk2ef0.unk5b1_07 = true;
|
||||
g_CreditsData->unk2ef0.partvisibility = NULL;
|
||||
g_CreditsData->menumodel.newroty = 0;
|
||||
g_CreditsData->menumodel.curroty = 0;
|
||||
|
||||
gdl = menuRenderModels(gdl, &g_CreditsData->unk2ef0, 4);
|
||||
g_CreditsData->menumodel.currotx = g_CreditsData->menumodel.newrotx = -0.26175770163536;
|
||||
g_CreditsData->menumodel.currotz = g_CreditsData->menumodel.newrotz = 0;
|
||||
|
||||
g_CreditsData->menumodel.newposx = 833.0f - (scrolltimer240 / TICKS(14400.0f)) * 2413.0f;
|
||||
g_CreditsData->menumodel.newposy = VERSION == VERSION_PAL_FINAL ? 65.86 : 70.86;
|
||||
g_CreditsData->menumodel.newposz = -2050;
|
||||
|
||||
g_CreditsData->menumodel.newscale = 1.467;
|
||||
g_CreditsData->menumodel.newparams = MENUMODELPARAMS_SET_FILENUM(FILE_PPDMENU);
|
||||
g_CreditsData->menumodel.drawbehinddialog = true;
|
||||
g_CreditsData->menumodel.partvisibility = NULL;
|
||||
|
||||
gdl = menuRenderModel(gdl, &g_CreditsData->menumodel, MENUMODELTYPE_CREDITSLOGO);
|
||||
|
||||
gSPMatrix(gdl++, osVirtualToPhysical(matrix), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -1912,19 +1915,18 @@ void creditsReset(void)
|
||||
|
||||
creditsResetParticles();
|
||||
creditsResetSlides();
|
||||
func0f0f8bb4(&g_CreditsData->unk2ef0, 0x25800, 1);
|
||||
menuResetModel(&g_CreditsData->menumodel, 0x25800, true);
|
||||
|
||||
g_CreditsData->unk2ef0.unk580 = 0;
|
||||
g_CreditsData->menumodel.removingpiece = false;
|
||||
|
||||
func0f0f372c(&g_CreditsData->unk2ef0, 0, 0, 0, 0, 0, 0, 1, 5);
|
||||
menuConfigureModel(&g_CreditsData->menumodel, 0, 0, 0, 0, 0, 0, 1, MENUMODELFLAG_HASSCALE | MENUMODELFLAG_HASROTATION);
|
||||
|
||||
g_CreditsData->unk2ef0.unk53c = 90;
|
||||
g_CreditsData->unk2ef0.unk510 = 8.2;
|
||||
g_CreditsData->unk2ef0.unk514 = -4.1;
|
||||
g_CreditsData->unk2ef0.unk51c = 0.00393;
|
||||
g_CreditsData->unk2ef0.unk54c = 0;
|
||||
g_CreditsData->unk2ef0.unk524 = g_CreditsData->unk2ef0.unk54c;
|
||||
g_CreditsData->unk2ef0.unk578 = 60;
|
||||
g_CreditsData->menumodel.newposy = 90;
|
||||
g_CreditsData->menumodel.curposx = 8.2;
|
||||
g_CreditsData->menumodel.curposy = -4.1;
|
||||
g_CreditsData->menumodel.curscale = 0.00393;
|
||||
g_CreditsData->menumodel.curroty = g_CreditsData->menumodel.newroty = 0;
|
||||
g_CreditsData->menumodel.rottimer60 = 60;
|
||||
|
||||
g_CreditsUsingAltTitle = g_CreditsAltTitleRequested;
|
||||
|
||||
|
||||
+14
-14
@@ -432,19 +432,19 @@ struct menudialogdef *endscreenAdvance(void)
|
||||
return &g_NextMissionMenuDialog;
|
||||
}
|
||||
|
||||
void endscreen0f10d770(void)
|
||||
void endscreenResetModels(void)
|
||||
{
|
||||
func0f0f8bb4(&g_Menus[0].unk840, bgunCalculateGunMemCapacity() - menugfxGetParticleArraySize(), 0);
|
||||
g_Menus[0].unk840.unk004 = bgunGetGunMem() + menugfxGetParticleArraySize();
|
||||
menuResetModel(&g_Menus[0].menumodel, bgunCalculateGunMemCapacity() - menugfxGetParticleArraySize(), false);
|
||||
g_Menus[0].menumodel.allocstart = bgunGetGunMem() + menugfxGetParticleArraySize();
|
||||
|
||||
func0f0f8bb4(&g_Menus[1].unk840, bgunCalculateGunMemCapacity() - menugfxGetParticleArraySize(), 0);
|
||||
g_Menus[1].unk840.unk004 = bgunGetGunMem() + menugfxGetParticleArraySize();
|
||||
menuResetModel(&g_Menus[1].menumodel, bgunCalculateGunMemCapacity() - menugfxGetParticleArraySize(), false);
|
||||
g_Menus[1].menumodel.allocstart = bgunGetGunMem() + menugfxGetParticleArraySize();
|
||||
|
||||
func0f0f8bb4(&g_Menus[2].unk840, bgunCalculateGunMemCapacity() - menugfxGetParticleArraySize(), 0);
|
||||
g_Menus[2].unk840.unk004 = bgunGetGunMem() + menugfxGetParticleArraySize();
|
||||
menuResetModel(&g_Menus[2].menumodel, bgunCalculateGunMemCapacity() - menugfxGetParticleArraySize(), false);
|
||||
g_Menus[2].menumodel.allocstart = bgunGetGunMem() + menugfxGetParticleArraySize();
|
||||
|
||||
func0f0f8bb4(&g_Menus[3].unk840, bgunCalculateGunMemCapacity() - menugfxGetParticleArraySize(), 0);
|
||||
g_Menus[3].unk840.unk004 = bgunGetGunMem() + menugfxGetParticleArraySize();
|
||||
menuResetModel(&g_Menus[3].menumodel, bgunCalculateGunMemCapacity() - menugfxGetParticleArraySize(), false);
|
||||
g_Menus[3].menumodel.allocstart = bgunGetGunMem() + menugfxGetParticleArraySize();
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -687,7 +687,7 @@ void endscreenContinue(s32 context)
|
||||
menuPushDialog(&g_MissionContinueOrReplyMenuDialog);
|
||||
}
|
||||
} else {
|
||||
endscreen0f10d770();
|
||||
endscreenResetModels();
|
||||
|
||||
if (context == 1) {
|
||||
menuPushRootDialog(endscreenAdvance(), MENUROOT_COOPCONTINUE);
|
||||
@@ -746,7 +746,7 @@ MenuDialogHandlerResult endscreenHandle2PCompleted(s32 operation, struct menudia
|
||||
&& !isStageDifficultyUnlocked(g_MissionConfig.stageindex + 1, g_MissionConfig.difficulty)))) {
|
||||
menuPopDialog();
|
||||
} else {
|
||||
endscreen0f10d770();
|
||||
endscreenResetModels();
|
||||
menuPushDialog(endscreenAdvance());
|
||||
}
|
||||
#endif
|
||||
@@ -789,7 +789,7 @@ MenuDialogHandlerResult endscreenHandle2PFailed(s32 operation, struct menudialog
|
||||
|| g_Vars.stagenum == STAGE_CITRAINING) {
|
||||
menuPopDialog();
|
||||
} else {
|
||||
endscreen0f10d770();
|
||||
endscreenResetModels();
|
||||
menuPushDialog(&g_RetryMissionMenuDialog);
|
||||
}
|
||||
}
|
||||
@@ -1750,7 +1750,7 @@ void endscreenPushSolo(void)
|
||||
#endif
|
||||
{
|
||||
// Failed or aborted
|
||||
endscreen0f10d770();
|
||||
endscreenResetModels();
|
||||
menuPushRootDialog(&g_RetryMissionMenuDialog, MENUROOT_COOPCONTINUE);
|
||||
} else {
|
||||
// Completed
|
||||
@@ -1760,7 +1760,7 @@ void endscreenPushSolo(void)
|
||||
struct menudialogdef *definition = endscreenAdvance();
|
||||
|
||||
if (definition) {
|
||||
endscreen0f10d770();
|
||||
endscreenResetModels();
|
||||
menuPushRootDialog(definition, MENUROOT_COOPCONTINUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -134,9 +134,9 @@ bool artifactTestLos(struct coord *spec, struct coord *roompos)
|
||||
for (s32 i = 0; outrooms[i] != -1; ++i) {
|
||||
if (bgTestHitInRoom(&g_Vars.currentplayer->cam_pos, &endpos, outrooms[i], &hit)) {
|
||||
// check if it's far enough away from the end point
|
||||
if (fabsf(hit.unk00.x - endpos.x) >= 0.1f ||
|
||||
fabsf(hit.unk00.y - endpos.y) >= 0.1f ||
|
||||
fabsf(hit.unk00.z - endpos.z) >= 0.1f) {
|
||||
if (fabsf(hit.pos.x - endpos.x) >= 0.1f ||
|
||||
fabsf(hit.pos.y - endpos.y) >= 0.1f ||
|
||||
fabsf(hit.pos.z - endpos.z) >= 0.1f) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1202,7 +1202,7 @@ Gfx *lvRender(Gfx *gdl)
|
||||
|| g_Vars.coopplayernum >= 0
|
||||
|| g_Vars.antiplayernum >= 0
|
||||
|| (weaponHasFlag(bgunGetWeaponNum(HAND_RIGHT), WEAPONFLAG_AIMTRACK) && bmoveIsInSightAimMode())) {
|
||||
g_Vars.currentplayer->lookingatprop.prop = func0f061d54(HAND_RIGHT, 0, 0);
|
||||
g_Vars.currentplayer->lookingatprop.prop = propFindAimingAt(HAND_RIGHT, false, FINDPROPCONTEXT_QUERY);
|
||||
|
||||
if (g_Vars.currentplayer->lookingatprop.prop) {
|
||||
if (g_Vars.currentplayer->lookingatprop.prop->type == PROPTYPE_CHR
|
||||
|
||||
+42
-43
@@ -772,11 +772,11 @@ MenuDialogHandlerResult menudialog00103608(s32 operation, struct menudialogdef *
|
||||
{
|
||||
switch (operation) {
|
||||
case MENUOP_OPEN:
|
||||
g_Menus[g_MpPlayerNum].unk840.unk010 = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curparams = 0;
|
||||
|
||||
setupLoadBriefing(g_MissionConfig.stagenum,
|
||||
g_Menus[g_MpPlayerNum].unk840.unk004,
|
||||
g_Menus[g_MpPlayerNum].unk840.unk008, &g_Briefing);
|
||||
g_Menus[g_MpPlayerNum].menumodel.allocstart,
|
||||
g_Menus[g_MpPlayerNum].menumodel.alloclen, &g_Briefing);
|
||||
break;
|
||||
case MENUOP_CLOSE:
|
||||
langClearBank(g_Briefing.langbank);
|
||||
@@ -3779,51 +3779,50 @@ void func0f105948(s32 weaponnum)
|
||||
if (weaponHasFlag(weaponnum, WEAPONFLAG_HIDEMENUMODEL) == false && (u32)wantindex >= 0 && useindex >= 0) {
|
||||
weapon = weaponFindById(weaponnum);
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk000 = 8;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk010 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = weaponGetFileNum(weaponnum);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk53c = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk514 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk540 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk518 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk550 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk528 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk52c = gunconfig[useindex][0];
|
||||
g_Menus[g_MpPlayerNum].unk840.unk530 = gunconfig[useindex][1];
|
||||
g_Menus[g_MpPlayerNum].unk840.unk534 = gunconfig[useindex][2];
|
||||
g_Menus[g_MpPlayerNum].unk840.unk548 = gunconfig[useindex][3];
|
||||
g_Menus[g_MpPlayerNum].unk840.unk520 = gunconfig[useindex][3]; // @bug? Wrong index?
|
||||
g_Menus[g_MpPlayerNum].menumodel.loaddelay = 8;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curparams = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = MENUMODELPARAMS_SET_FILENUM(weaponGetFileNum(weaponnum));
|
||||
|
||||
func0f0f372c(&g_Menus[g_MpPlayerNum].unk840, 0, 0, 0, 0, 0, 0, gunconfig[useindex][4], 1);
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = g_Menus[g_MpPlayerNum].menumodel.newposx = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposy = g_Menus[g_MpPlayerNum].menumodel.newposy = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposz = g_Menus[g_MpPlayerNum].menumodel.newposz = 0;
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk51c = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.partvisibility = weapon->partvisibility;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk554 = -1;
|
||||
g_Menus[g_MpPlayerNum].menumodel.currotz = g_Menus[g_MpPlayerNum].menumodel.newrotz = 0;
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.displacex = gunconfig[useindex][0];
|
||||
g_Menus[g_MpPlayerNum].menumodel.displacey = gunconfig[useindex][1];
|
||||
g_Menus[g_MpPlayerNum].menumodel.displacez = gunconfig[useindex][2];
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.newrotx = gunconfig[useindex][3];
|
||||
g_Menus[g_MpPlayerNum].menumodel.currotx = gunconfig[useindex][3];
|
||||
|
||||
menuConfigureModel(&g_Menus[g_MpPlayerNum].menumodel, 0, 0, 0, 0, 0, 0, gunconfig[useindex][4], MENUMODELFLAG_HASSCALE);
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.curscale = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.partvisibility = weapon->partvisibility;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoom = -1;
|
||||
|
||||
// These indexes correspond to WEAPON_DISGUISE40 and WEAPON_DISGUISE41
|
||||
if (wantindex == 0x3e || wantindex == 0x3f) {
|
||||
if ((u32)wantindex == 0x3e) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = 0x0a01ffff;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = MENUMODELPARAMS_SET_MP_HEADBODY(MPHEAD_DARK_FROCK, MPBODY_DARKLAB);
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = 0x0400ffff;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = MENUMODELPARAMS_SET_MP_HEADBODY(MPHEAD_DARK_COMBAT, MPBODY_DARK_AF1);
|
||||
}
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.partvisibility = NULL;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk580 = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.partvisibility = NULL;
|
||||
g_Menus[g_MpPlayerNum].menumodel.removingpiece = false;
|
||||
|
||||
func0f0f372c(&g_Menus[g_MpPlayerNum].unk840, 0, 0, 0, 0, 0, 0, 1, 1);
|
||||
menuConfigureModel(&g_Menus[g_MpPlayerNum].menumodel, 0, 0, 0, 0, 0, 0, 1, MENUMODELFLAG_HASSCALE);
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = -0.2f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = -0.2f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.rottimer60 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = g_Menus[g_MpPlayerNum].menumodel.newroty = -0.2f;
|
||||
}
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].unk840.bodymodeldef = NULL;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk010 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.bodymodeldef = NULL;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curparams = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3831,11 +3830,11 @@ MenuDialogHandlerResult inventoryMenuDialog(s32 operation, struct menudialogdef
|
||||
{
|
||||
if (operation == MENUOP_TICK) {
|
||||
if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 -= g_Vars.diffframe60;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk528 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk550 = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 -= g_Vars.diffframe60;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].menumodel.currotz = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newrotz = 0;
|
||||
|
||||
if (var80072d88 != g_InventoryWeapon) {
|
||||
func0f105948(g_InventoryWeapon);
|
||||
@@ -3843,9 +3842,9 @@ MenuDialogHandlerResult inventoryMenuDialog(s32 operation, struct menudialogdef
|
||||
}
|
||||
|
||||
if (g_InventoryWeapon == WEAPON_DISGUISE40 || g_InventoryWeapon == WEAPON_DISGUISE41) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk05c = ANIM_006A;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].menumodel.newanimnum = ANIM_006A;
|
||||
g_Menus[g_MpPlayerNum].menumodel.rottimer60 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 = TICKS(120);
|
||||
}
|
||||
} else {
|
||||
var80072d88 = 255;
|
||||
|
||||
+392
-399
File diff suppressed because it is too large.
Load diff
+9
-9
@@ -1426,7 +1426,7 @@ Gfx *menugfxRenderBgFailure(Gfx *gdl)
|
||||
|
||||
spb4 = M_TAU * g_20SecIntervalFrac;
|
||||
|
||||
var8009de98 = var8009de9c = 0;
|
||||
g_MenuProjectFromX = g_MenuProjectFromY = 0;
|
||||
|
||||
gdl = func0f0d4a3c(gdl, 0);
|
||||
|
||||
@@ -1603,8 +1603,8 @@ Gfx *menugfxRenderBgCone(Gfx *gdl)
|
||||
*/
|
||||
Gfx *func0f0e458c(Gfx *gdl)
|
||||
{
|
||||
var8009de98 = 0;
|
||||
var8009de9c = -20 - viGetHeight() / 2;
|
||||
g_MenuProjectFromX = 0;
|
||||
g_MenuProjectFromY = -20 - viGetHeight() / 2;
|
||||
|
||||
gdl = func0f0d4a3c(gdl, 0);
|
||||
|
||||
@@ -1615,15 +1615,15 @@ Gfx *func0f0e458c(Gfx *gdl)
|
||||
gdl = menugfxDrawPlane(gdl, -1000, viGetHeight() + 10, 2000, viGetHeight() + 10, 0xffff00af, 0xffff00af, MENUPLANE_05);
|
||||
gdl = func0f0d4c80(gdl);
|
||||
|
||||
var8009de98 = var8009de9c = 0;
|
||||
g_MenuProjectFromX = g_MenuProjectFromY = 0;
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
Gfx *func0f0e46b0(Gfx *gdl, f32 arg1)
|
||||
{
|
||||
s32 y1 = (var8009de9c + 120) + arg1 * (0.0f - (var8009de9c + 120));
|
||||
s32 y2 = (var8009de9c + 120) + arg1 * (240.0f - (var8009de9c + 120));
|
||||
s32 y1 = (g_MenuProjectFromY + 120) + arg1 * (0.0f - (g_MenuProjectFromY + 120));
|
||||
s32 y2 = (g_MenuProjectFromY + 120) + arg1 * (240.0f - (g_MenuProjectFromY + 120));
|
||||
|
||||
gdl = func0f0d4a3c(gdl, 0);
|
||||
|
||||
@@ -1659,7 +1659,7 @@ Gfx *menugfxRenderBgFailureCopy(Gfx *gdl)
|
||||
|
||||
spb4 = M_TAU * g_20SecIntervalFrac;
|
||||
|
||||
var8009de98 = var8009de9c = 0;
|
||||
g_MenuProjectFromX = g_MenuProjectFromY = 0;
|
||||
|
||||
gdl = func0f0d4a3c(gdl, 0);
|
||||
|
||||
@@ -1834,8 +1834,8 @@ Gfx *menugfxRenderBgSuccess(Gfx *gdl)
|
||||
f0 = menuGetLinearIntervalFrac(10.0f);
|
||||
|
||||
// Draw the two haze layers
|
||||
var8009de98 = 0;
|
||||
var8009de9c = 0;
|
||||
g_MenuProjectFromX = 0;
|
||||
g_MenuProjectFromY = 0;
|
||||
|
||||
gdl = func0f0d4a3c(gdl, 0);
|
||||
|
||||
|
||||
+2
-2
@@ -2748,8 +2748,8 @@ char *menuitemScrollableGetText(u32 type)
|
||||
return challengeGetConfigDescription(g_Menus[g_MpPlayerNum].training.mpconfig);
|
||||
case DESCRIPTION_MPCHALLENGE:
|
||||
if (!challengeIsLoaded()) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk010 = 0x4fac5ace;
|
||||
challengeLoadAndStoreCurrent(g_Menus[g_MpPlayerNum].unk840.unk004, g_Menus[g_MpPlayerNum].unk840.unk008);
|
||||
g_Menus[g_MpPlayerNum].menumodel.curparams = 0x4fac5ace;
|
||||
challengeLoadAndStoreCurrent(g_Menus[g_MpPlayerNum].menumodel.allocstart, g_Menus[g_MpPlayerNum].menumodel.alloclen);
|
||||
}
|
||||
return challengeGetCurrentDescription();
|
||||
case DESCRIPTION_CHRBIO: return ciGetChrBioDescription();
|
||||
|
||||
+2
-2
@@ -690,9 +690,9 @@ void menuTick(void)
|
||||
if (g_Vars.currentplayer->gunctrl.gunmemowner == GUNMEMOWNER_INVMENU && g_Vars.stagenum != STAGE_CITRAINING) {
|
||||
g_MenuData.unk5d5_01 = true;
|
||||
|
||||
if (g_Menus[0].unk840.unk004) {
|
||||
if (g_Menus[0].menumodel.allocstart) {
|
||||
bgunFreeGunMem();
|
||||
g_Menus[0].unk840.unk004 = NULL;
|
||||
g_Menus[0].menumodel.allocstart = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+65
-59
@@ -550,35 +550,35 @@ MenuItemHandlerResult func0f179d6c(s32 operation, struct menuitem *item, union h
|
||||
/**
|
||||
* This function is used by both player body selection and bot body selection.
|
||||
*/
|
||||
MenuItemHandlerResult mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, s32 mpbodynum, bool isplayer)
|
||||
MenuItemHandlerResult mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpbodynum, s32 mpheadnum, bool isplayer)
|
||||
{
|
||||
switch (operation) {
|
||||
case MENUOP_GETOPTIONCOUNT:
|
||||
data->carousel.value = mpGetNumBodies();
|
||||
break;
|
||||
case MENUOP_11:
|
||||
g_Menus[g_MpPlayerNum].unk840.unk05c = 0x1fc;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = mpbodynum << 16 | 0xffff | mpheadnum << 24;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 += g_Vars.diffframe60;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newanimnum = ANIM_01FC;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = MENUMODELPARAMS_SET_MP_HEADBODY(mpheadnum, mpbodynum);
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 += g_Vars.diffframe60;
|
||||
|
||||
if (g_Menus[g_MpPlayerNum].unk840.unk574 > TICKS(480)) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 -= TICKS(480);
|
||||
if (g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 > TICKS(480)) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 -= TICKS(480);
|
||||
}
|
||||
|
||||
if (g_Menus[g_MpPlayerNum].unk840.unk578 > 0) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 -= g_Vars.diffframe60;
|
||||
if (g_Menus[g_MpPlayerNum].menumodel.rottimer60 > 0) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.rottimer60 -= g_Vars.diffframe60;
|
||||
} else {
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
f32 value = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60freal;
|
||||
f32 value = g_Menus[g_MpPlayerNum].menumodel.curroty + 0.01f * g_Vars.diffframe60freal;
|
||||
#else
|
||||
f32 value = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60f;
|
||||
f32 value = g_Menus[g_MpPlayerNum].menumodel.curroty + 0.01f * g_Vars.diffframe60f;
|
||||
#endif
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = value;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = value;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = value;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = value;
|
||||
}
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.partvisibility = NULL;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk554 = 30;
|
||||
g_Menus[g_MpPlayerNum].menumodel.partvisibility = NULL;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoom = 30;
|
||||
break;
|
||||
case MENUOP_21:
|
||||
if (!challengeIsFeatureUnlocked(mpGetBodyRequiredFeature(data->carousel.value))) {
|
||||
@@ -587,34 +587,36 @@ MenuItemHandlerResult mpCharacterBodyMenuHandler(s32 operation, struct menuitem
|
||||
break;
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
case MENUOP_FOCUS:
|
||||
g_Menus[g_MpPlayerNum].unk840.unk000 = 3;
|
||||
g_Menus[g_MpPlayerNum].menumodel.loaddelay = 3;
|
||||
break;
|
||||
#endif
|
||||
case MENUOP_GETSELECTEDINDEX:
|
||||
data->carousel.value = mpheadnum;
|
||||
data->carousel.value = mpbodynum;
|
||||
break;
|
||||
case MENUOP_SET:
|
||||
case MENUOP_CHECKPREFOCUSED:
|
||||
g_Menus[g_MpPlayerNum].unk840.unk580 = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.removingpiece = false;
|
||||
|
||||
func0f0f372c(&g_Menus[g_MpPlayerNum].unk840, 0, 0, 0, 0, 0, 0, 1, 1);
|
||||
menuConfigureModel(&g_Menus[g_MpPlayerNum].menumodel, 0, 0, 0, 0, 0, 0, 1, MENUMODELFLAG_HASSCALE);
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 8.2f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk514 = -4.1f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk53c = -4.1f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 8.2f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 8.2f;
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 8.2f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk51c = 0.002f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = -0.2f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = -0.2f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposy = -4.1f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposy = -4.1f;
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk000 = 8;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curscale = 0.002f;
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = -0.2f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = -0.2f;
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.rottimer60 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].menumodel.loaddelay = 8;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (operation == MENUOP_CHECKPREFOCUSED) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk000 = 16;
|
||||
g_Menus[g_MpPlayerNum].menumodel.loaddelay = 16;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1879,30 +1881,30 @@ MenuItemHandlerResult mpCharacterHeadMenuHandler(s32 operation, struct menuitem
|
||||
break;
|
||||
case MENUOP_11:
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
diffframe = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60freal;
|
||||
diffframe = g_Menus[g_MpPlayerNum].menumodel.curroty + 0.01f * g_Vars.diffframe60freal;
|
||||
#else
|
||||
diffframe = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60f;
|
||||
diffframe = g_Menus[g_MpPlayerNum].menumodel.curroty + 0.01f * g_Vars.diffframe60f;
|
||||
#endif
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = diffframe;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = diffframe;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = diffframe;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = diffframe;
|
||||
|
||||
if (mpheadnum < mpGetNumHeads2()) {
|
||||
headnum = mpGetHeadId(mpheadnum);
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = g_HeadsAndBodies[headnum].filenum;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk5b1_01 = false;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = MENUMODELPARAMS_SET_FILENUM(g_HeadsAndBodies[headnum].filenum);
|
||||
g_Menus[g_MpPlayerNum].menumodel.isperfecthead = false;
|
||||
} else {
|
||||
headnum = mpGetBeauHeadId(func0f14a9f8(mpheadnum - mpGetNumHeads2()));
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = g_HeadsAndBodies[headnum].filenum;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk5b1_01 = true;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk5b0 = mpheadnum - mpGetNumHeads2();
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = MENUMODELPARAMS_SET_FILENUM(g_HeadsAndBodies[headnum].filenum);
|
||||
g_Menus[g_MpPlayerNum].menumodel.isperfecthead = true;
|
||||
g_Menus[g_MpPlayerNum].menumodel.perfectheadnum = mpheadnum - mpGetNumHeads2();
|
||||
}
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.partvisibility = visibility;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk554 = 30;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.partvisibility = visibility;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoom = 30;
|
||||
break;
|
||||
case MENUOP_21:
|
||||
if (!challengeIsFeatureUnlocked(mpGetHeadRequiredFeature(data->carousel.value))) {
|
||||
@@ -1915,22 +1917,26 @@ MenuItemHandlerResult mpCharacterHeadMenuHandler(s32 operation, struct menuitem
|
||||
case MENUOP_SET:
|
||||
case MENUOP_FOCUS:
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_Menus[g_MpPlayerNum].unk840.unk000 = 3;
|
||||
g_Menus[g_MpPlayerNum].menumodel.loaddelay = 3;
|
||||
#endif
|
||||
|
||||
mpGetNumHeads2();
|
||||
|
||||
func0f0f372c(&g_Menus[g_MpPlayerNum].unk840, 0, 0, 0, 0, 0, 0, 1, 1);
|
||||
menuConfigureModel(&g_Menus[g_MpPlayerNum].menumodel, 0, 0, 0, 0, 0, 0, 1, MENUMODELFLAG_HASSCALE);
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk514 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk53c = -3;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk51c = 0.01f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = -0.3f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = -0.3f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk544 = 1;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk554 = 30;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposy = 0;
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposy = -3;
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.curscale = 0.01f;
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = -0.3f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = -0.3f;
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.newscale = 1;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoom = 30;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4051,12 +4057,12 @@ MenuDialogHandlerResult menudialog0017e3fc(s32 operation, struct menudialogdef *
|
||||
{
|
||||
switch (operation) {
|
||||
case MENUOP_OPEN:
|
||||
g_Menus[g_MpPlayerNum].unk840.unk010 = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curparams = 0;
|
||||
|
||||
g_Menus[g_MpPlayerNum].training.mpconfig = challengeLoadBySlot(
|
||||
g_Menus[g_MpPlayerNum].training.unke1c,
|
||||
g_Menus[g_MpPlayerNum].unk840.unk004,
|
||||
g_Menus[g_MpPlayerNum].unk840.unk008);
|
||||
g_Menus[g_MpPlayerNum].menumodel.allocstart,
|
||||
g_Menus[g_MpPlayerNum].menumodel.alloclen);
|
||||
break;
|
||||
case MENUOP_CLOSE:
|
||||
break;
|
||||
@@ -4628,16 +4634,16 @@ MenuDialogHandlerResult mpCombatChallengesMenuDialog(s32 operation, struct menud
|
||||
&& g_Menus[g_MpPlayerNum].curdialog
|
||||
&& g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef
|
||||
&& !challengeIsLoaded()) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk010 = 0x4fac5ace;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curparams = 0x4fac5ace;
|
||||
|
||||
challengeLoadAndStoreCurrent(
|
||||
g_Menus[g_MpPlayerNum].unk840.unk004,
|
||||
g_Menus[g_MpPlayerNum].unk840.unk008);
|
||||
g_Menus[g_MpPlayerNum].menumodel.allocstart,
|
||||
g_Menus[g_MpPlayerNum].menumodel.alloclen);
|
||||
}
|
||||
}
|
||||
|
||||
if (operation == MENUOP_CLOSE) {
|
||||
if (g_Menus[g_MpPlayerNum].unk840.unk010 == 0x4fac5ace) {
|
||||
if (g_Menus[g_MpPlayerNum].menumodel.curparams == 0x4fac5ace) {
|
||||
challengeUnsetCurrent();
|
||||
}
|
||||
}
|
||||
|
||||
+173
-154
@@ -564,13 +564,13 @@ void func0f060bac(s32 weaponnum, struct prop *prop)
|
||||
*
|
||||
* The return value is the final prop that was hit.
|
||||
*/
|
||||
struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struct coord *arg3, struct coord *gunpos, struct coord *dir, u32 arg6, f32 arg7, bool arg8)
|
||||
struct prop *shotCalculateHits(s32 handnum, bool isshooting, struct coord *gunpos2d, struct coord *gundir2d, struct coord *gunpos3d, struct coord *gundir3d, u32 arg6, f32 distance, bool cheap)
|
||||
{
|
||||
u32 index;
|
||||
struct prop **propptr;
|
||||
struct prop *root;
|
||||
bool explosiveshells = false;
|
||||
bool sp6cc = false;
|
||||
bool blockedbyprop = false;
|
||||
bool hitbg = false;
|
||||
s32 room = 0;
|
||||
struct hitthing sp694;
|
||||
@@ -583,7 +583,7 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
s32 s1 = 0;
|
||||
struct weaponfunc *func;
|
||||
bool laserstream = false;
|
||||
bool shortrange = false;
|
||||
bool ismelee = false;
|
||||
f32 range = 200;
|
||||
struct prop *result = NULL;
|
||||
s32 hitindex;
|
||||
@@ -599,46 +599,46 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
|
||||
RoomNum spc8[8];
|
||||
RoomNum spb8[8];
|
||||
s32 uVar6;
|
||||
s32 texnum;
|
||||
RoomNum *roomsptr;
|
||||
struct prop *prop;
|
||||
struct coord spa0;
|
||||
struct defaultobj *obj;
|
||||
bool doexplosiveshells;
|
||||
struct coord sp8c;
|
||||
RoomNum sp7c[8];
|
||||
RoomNum sp6c[8];
|
||||
struct coord exppos;
|
||||
RoomNum exprooms[8];
|
||||
RoomNum rooms2[8];
|
||||
struct prop *hitprop;
|
||||
|
||||
bgun0f0a9494(arg6);
|
||||
|
||||
shotdata.gunpos.x = gunpos->x;
|
||||
shotdata.gunpos.y = gunpos->y;
|
||||
shotdata.gunpos.z = gunpos->z;
|
||||
shotdata.gunpos3d.x = gunpos3d->x;
|
||||
shotdata.gunpos3d.y = gunpos3d->y;
|
||||
shotdata.gunpos3d.z = gunpos3d->z;
|
||||
|
||||
shotdata.unk00.x = arg2->x;
|
||||
shotdata.unk00.y = arg2->y;
|
||||
shotdata.unk00.z = arg2->z;
|
||||
shotdata.gunpos2d.x = gunpos2d->x;
|
||||
shotdata.gunpos2d.y = gunpos2d->y;
|
||||
shotdata.gunpos2d.z = gunpos2d->z;
|
||||
|
||||
shotdata.dir.x = dir->x;
|
||||
shotdata.dir.y = dir->y;
|
||||
shotdata.dir.z = dir->z;
|
||||
shotdata.gundir3d.x = gundir3d->x;
|
||||
shotdata.gundir3d.y = gundir3d->y;
|
||||
shotdata.gundir3d.z = gundir3d->z;
|
||||
|
||||
shotdata.unk0c.x = arg3->x;
|
||||
shotdata.unk0c.y = arg3->y;
|
||||
shotdata.unk0c.z = arg3->z;
|
||||
shotdata.gundir2d.x = gundir2d->x;
|
||||
shotdata.gundir2d.y = gundir2d->y;
|
||||
shotdata.gundir2d.z = gundir2d->z;
|
||||
|
||||
gsetPopulateFromCurrentPlayer(handnum, &shotdata.gset);
|
||||
func = gsetGetWeaponFunction(&shotdata.gset);
|
||||
|
||||
if (func) {
|
||||
if (arg1 && (func->flags & FUNCFLAG_EXPLOSIVESHELLS)) {
|
||||
if (isshooting && (func->flags & FUNCFLAG_EXPLOSIVESHELLS)) {
|
||||
explosiveshells = true;
|
||||
}
|
||||
|
||||
if ((func->type & 0xff) == INVENTORYFUNCTYPE_MELEE && arg1) {
|
||||
shortrange = true;
|
||||
arg1 = false;
|
||||
if ((func->type & 0xff) == INVENTORYFUNCTYPE_MELEE && isshooting) {
|
||||
ismelee = true;
|
||||
isshooting = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,41 +646,41 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
laserstream = true;
|
||||
}
|
||||
|
||||
if (arg1) {
|
||||
if (isshooting) {
|
||||
shotdata.penetration = gsetGetSinglePenetration(&shotdata.gset);
|
||||
} else {
|
||||
shotdata.penetration = 1;
|
||||
}
|
||||
|
||||
shotdata.unk34 = arg7;
|
||||
shotdata.distance = distance;
|
||||
|
||||
for (i = 0; i < ARRAYCOUNT(shotdata.hits); i++) {
|
||||
shotdata.hits[i].prop = NULL;
|
||||
shotdata.hits[i].hitpart = 0;
|
||||
shotdata.hits[i].node = NULL;
|
||||
shotdata.hits[i].bboxnode = NULL;
|
||||
}
|
||||
|
||||
if (laserstream) {
|
||||
hitpos.x = shotdata.gunpos.x + shotdata.dir.x * 300;
|
||||
hitpos.y = shotdata.gunpos.y + shotdata.dir.y * 300;
|
||||
hitpos.z = shotdata.gunpos.z + shotdata.dir.z * 300;
|
||||
} else if (shortrange) {
|
||||
hitpos.x = shotdata.gunpos3d.x + shotdata.gundir3d.x * 300;
|
||||
hitpos.y = shotdata.gunpos3d.y + shotdata.gundir3d.y * 300;
|
||||
hitpos.z = shotdata.gunpos3d.z + shotdata.gundir3d.z * 300;
|
||||
} else if (ismelee) {
|
||||
if ((func->type & 0xff) == INVENTORYFUNCTYPE_MELEE) {
|
||||
struct weaponfunc_melee *meleefunc = (struct weaponfunc_melee *) func;
|
||||
range = meleefunc->range;
|
||||
}
|
||||
|
||||
hitpos.x = shotdata.gunpos.x + shotdata.dir.x * range;
|
||||
hitpos.y = shotdata.gunpos.y + shotdata.dir.y * range;
|
||||
hitpos.z = shotdata.gunpos.z + shotdata.dir.z * range;
|
||||
hitpos.x = shotdata.gunpos3d.x + shotdata.gundir3d.x * range;
|
||||
hitpos.y = shotdata.gunpos3d.y + shotdata.gundir3d.y * range;
|
||||
hitpos.z = shotdata.gunpos3d.z + shotdata.gundir3d.z * range;
|
||||
} else {
|
||||
hitpos.x = shotdata.gunpos.x + shotdata.dir.x * 65536;
|
||||
hitpos.y = shotdata.gunpos.y + shotdata.dir.y * 65536;
|
||||
hitpos.z = shotdata.gunpos.z + shotdata.dir.z * 65536;
|
||||
hitpos.x = shotdata.gunpos3d.x + shotdata.gundir3d.x * 65536;
|
||||
hitpos.y = shotdata.gunpos3d.y + shotdata.gundir3d.y * 65536;
|
||||
hitpos.z = shotdata.gunpos3d.z + shotdata.gundir3d.z * 65536;
|
||||
}
|
||||
|
||||
portal00018148(&playerprop->pos, &shotdata.gunpos, playerprop->rooms, spc8, 0, 0);
|
||||
portal00018148(&shotdata.gunpos, &hitpos, spc8, spb8, rooms, 30);
|
||||
portal00018148(&playerprop->pos, &shotdata.gunpos3d, playerprop->rooms, spc8, 0, 0);
|
||||
portal00018148(&shotdata.gunpos3d, &hitpos, spc8, spb8, rooms, 30);
|
||||
|
||||
if (shotdata.gset.weaponnum != WEAPON_FARSIGHT || g_Vars.currentplayer->visionmode != VISIONMODE_XRAY) {
|
||||
roomsptr = rooms;
|
||||
@@ -693,36 +693,36 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
bgGetForceOnscreenRooms(roomsptr, 100);
|
||||
|
||||
for (i = 0; rooms[i] != -1; i++) {
|
||||
if (bgTestHitInRoom(&shotdata.gunpos, &hitpos, rooms[i], &sp664)) {
|
||||
sp664.unk00.x *= 1;
|
||||
sp664.unk00.y *= 1;
|
||||
sp664.unk00.z *= 1;
|
||||
if (bgTestHitInRoom(&shotdata.gunpos3d, &hitpos, rooms[i], &sp664)) {
|
||||
sp664.pos.x *= 1;
|
||||
sp664.pos.y *= 1;
|
||||
sp664.pos.z *= 1;
|
||||
|
||||
if (((hitpos.x >= shotdata.gunpos.x && hitpos.x >= sp664.unk00.x && sp664.unk00.x >= shotdata.gunpos.x)
|
||||
|| (hitpos.x <= shotdata.gunpos.x && hitpos.x <= sp664.unk00.x && sp664.unk00.x <= shotdata.gunpos.x))
|
||||
&& ((hitpos.y >= shotdata.gunpos.y && hitpos.y >= sp664.unk00.y && sp664.unk00.y >= shotdata.gunpos.y)
|
||||
|| (hitpos.y <= shotdata.gunpos.y && hitpos.y <= sp664.unk00.y && sp664.unk00.y <= shotdata.gunpos.y))
|
||||
&& ((shotdata.gunpos.z <= hitpos.z && sp664.unk00.z <= hitpos.z && shotdata.gunpos.z <= sp664.unk00.z)
|
||||
|| (hitpos.z <= shotdata.gunpos.z && hitpos.z <= sp664.unk00.z && sp664.unk00.z <= shotdata.gunpos.z))
|
||||
&& (shotdata.gunpos.x != sp664.unk00.x || shotdata.gunpos.y != sp664.unk00.y || shotdata.gunpos.z != sp664.unk00.z)) {
|
||||
if (((hitpos.x >= shotdata.gunpos3d.x && hitpos.x >= sp664.pos.x && sp664.pos.x >= shotdata.gunpos3d.x)
|
||||
|| (hitpos.x <= shotdata.gunpos3d.x && hitpos.x <= sp664.pos.x && sp664.pos.x <= shotdata.gunpos3d.x))
|
||||
&& ((hitpos.y >= shotdata.gunpos3d.y && hitpos.y >= sp664.pos.y && sp664.pos.y >= shotdata.gunpos3d.y)
|
||||
|| (hitpos.y <= shotdata.gunpos3d.y && hitpos.y <= sp664.pos.y && sp664.pos.y <= shotdata.gunpos3d.y))
|
||||
&& ((shotdata.gunpos3d.z <= hitpos.z && sp664.pos.z <= hitpos.z && shotdata.gunpos3d.z <= sp664.pos.z)
|
||||
|| (hitpos.z <= shotdata.gunpos3d.z && hitpos.z <= sp664.pos.z && sp664.pos.z <= shotdata.gunpos3d.z))
|
||||
&& (shotdata.gunpos3d.x != sp664.pos.x || shotdata.gunpos3d.y != sp664.pos.y || shotdata.gunpos3d.z != sp664.pos.z)) {
|
||||
hitbg = true;
|
||||
room = rooms[i];
|
||||
|
||||
sp694 = sp664;
|
||||
|
||||
hitpos.x = sp664.unk00.x;
|
||||
hitpos.y = sp664.unk00.y;
|
||||
hitpos.z = sp664.unk00.z;
|
||||
hitpos.x = sp664.pos.x;
|
||||
hitpos.y = sp664.pos.y;
|
||||
hitpos.z = sp664.pos.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hitbg && shotdata.gset.weaponnum != WEAPON_FARSIGHT) {
|
||||
mtx4TransformVec(camGetWorldToScreenMtxf(), &sp694.unk00, &sp658);
|
||||
mtx4TransformVec(camGetWorldToScreenMtxf(), &sp694.pos, &sp658);
|
||||
|
||||
if (shotdata.unk34 > -sp658.z) {
|
||||
shotdata.unk34 = -sp658.z;
|
||||
if (shotdata.distance > -sp658.z) {
|
||||
shotdata.distance = -sp658.z;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,11 +734,11 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
if (prop) {
|
||||
if (prop->type == PROPTYPE_CHR
|
||||
|| (prop->type == PROPTYPE_PLAYER && prop->chr && playermgrGetPlayerNumByProp(prop) != g_Vars.currentplayernum)) {
|
||||
if (!shortrange) {
|
||||
chr0f027994(prop, &shotdata, arg1, arg8);
|
||||
if (!ismelee) {
|
||||
chrTestHit(prop, &shotdata, isshooting, cheap);
|
||||
}
|
||||
} else if (prop->type == PROPTYPE_OBJ || prop->type == PROPTYPE_WEAPON || prop->type == PROPTYPE_DOOR) {
|
||||
func0f085e00(prop, &shotdata);
|
||||
objTestHit(prop, &shotdata);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,10 +759,10 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
if (hitindex != -1) {
|
||||
bgun0f0a94d0(arg6, &shotdata.hits[hitindex].pos, &shotdata.hits[hitindex].dir);
|
||||
} else if (hitbg) {
|
||||
bgun0f0a94d0(arg6, &sp694.unk00, &sp694.unk0c);
|
||||
bgun0f0a94d0(arg6, &sp694.pos, &sp694.unk0c);
|
||||
}
|
||||
|
||||
if (arg1) {
|
||||
if (isshooting) {
|
||||
for (i = 0; i < ARRAYCOUNT(shotdata.hits); i++) {
|
||||
hitprop = shotdata.hits[i].prop;
|
||||
|
||||
@@ -781,18 +781,18 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
objHit(&shotdata, &shotdata.hits[i]);
|
||||
}
|
||||
|
||||
if (shotdata.hits[i].unk4d) {
|
||||
sp6cc = true;
|
||||
if (shotdata.hits[i].bulletproof) {
|
||||
blockedbyprop = true;
|
||||
doexplosiveshells = explosiveshells;
|
||||
hitpos.x = shotdata.hits[i].pos.x;
|
||||
hitpos.y = shotdata.hits[i].pos.y;
|
||||
hitpos.z = shotdata.hits[i].pos.z;
|
||||
} else if (shotdata.hits[i].unk4c
|
||||
} else if (shotdata.hits[i].slowsbullet
|
||||
|| (explosiveshells && (obj->type == OBJTYPE_GLASS || obj->type == OBJTYPE_TINTEDGLASS))) {
|
||||
s1++;
|
||||
|
||||
if (s1 >= shotdata.penetration) {
|
||||
sp6cc = true;
|
||||
blockedbyprop = true;
|
||||
doexplosiveshells = explosiveshells;
|
||||
hitpos.x = shotdata.hits[i].pos.x;
|
||||
hitpos.y = shotdata.hits[i].pos.y;
|
||||
@@ -801,21 +801,21 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
}
|
||||
|
||||
if (doexplosiveshells) {
|
||||
sp8c.x = shotdata.hits[i].pos.x;
|
||||
sp8c.y = shotdata.hits[i].pos.y;
|
||||
sp8c.z = shotdata.hits[i].pos.z;
|
||||
exppos.x = shotdata.hits[i].pos.x;
|
||||
exppos.y = shotdata.hits[i].pos.y;
|
||||
exppos.z = shotdata.hits[i].pos.z;
|
||||
|
||||
func0f065e74(&root->pos, root->rooms, &sp8c, sp7c);
|
||||
explosionCreateSimple(0, &sp8c, sp7c, EXPLOSIONTYPE_PHOENIX, g_Vars.currentplayernum);
|
||||
func0f065e74(&root->pos, root->rooms, &exppos, exprooms);
|
||||
explosionCreateSimple(0, &exppos, exprooms, EXPLOSIONTYPE_PHOENIX, g_Vars.currentplayernum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hitbg && !sp6cc) {
|
||||
sp6c[0] = room;
|
||||
sp6c[1] = -1;
|
||||
if (hitbg && !blockedbyprop) {
|
||||
rooms2[0] = room;
|
||||
rooms2[1] = -1;
|
||||
|
||||
uVar6 = lightsHandleHit(&shotdata.gunpos, &hitpos, room);
|
||||
texnum = lightsHandleHit(&shotdata.gunpos3d, &hitpos, room);
|
||||
|
||||
if (sp694.texturenum < 0 || sp694.texturenum >= NUM_TEXTURES) {
|
||||
surfacetype = g_SurfaceTypes[SURFACETYPE_DEFAULT];
|
||||
@@ -829,47 +829,47 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
}
|
||||
}
|
||||
|
||||
bgunSetHitPos(&sp694.unk00);
|
||||
bgunSetHitPos(&sp694.pos);
|
||||
|
||||
if (surfacetype->numwallhittexes > 0 && (!func || (func->type & 0xff) != INVENTORYFUNCTYPE_MELEE)) {
|
||||
if (shotdata.gset.weaponnum != WEAPON_UNARMED
|
||||
&& shotdata.gset.weaponnum != WEAPON_LASER
|
||||
&& shotdata.gset.weaponnum != WEAPON_TRANQUILIZER
|
||||
&& shotdata.gset.weaponnum != WEAPON_FARSIGHT) {
|
||||
uVar6 = random() % surfacetype->numwallhittexes;
|
||||
uVar6 = surfacetype->wallhittexes[uVar6];
|
||||
texnum = random() % surfacetype->numwallhittexes;
|
||||
texnum = surfacetype->wallhittexes[texnum];
|
||||
|
||||
if (uVar6 >= WALLHITTEX_GLASS1 && uVar6 <= WALLHITTEX_GLASS3) {
|
||||
if (texnum >= WALLHITTEX_GLASS1 && texnum <= WALLHITTEX_GLASS3) {
|
||||
// Use bulletproof glass hit textures instead
|
||||
uVar6 += 10;
|
||||
texnum += 10;
|
||||
}
|
||||
|
||||
if (uVar6) {
|
||||
wallhitCreate(&sp694.unk00, &sp694.unk0c, &shotdata.gunpos, 0, 0, uVar6, room, 0, -1, 0, g_Vars.currentplayer->prop->chr, sp694.unk2c == 2);
|
||||
if (texnum) {
|
||||
wallhitCreate(&sp694.pos, &sp694.unk0c, &shotdata.gunpos3d, 0, 0, texnum, room, 0, -1, 0, g_Vars.currentplayer->prop->chr, sp694.unk2c == 2);
|
||||
}
|
||||
}
|
||||
|
||||
bgunPlayBgHitSound(&shotdata.gset, &sp694.unk00, sp694.texturenum, sp6c);
|
||||
bgunPlayBgHitSound(&shotdata.gset, &sp694.pos, sp694.texturenum, rooms2);
|
||||
|
||||
if (explosiveshells) {
|
||||
explosionCreateSimple(NULL, &sp694.unk00, sp6c, EXPLOSIONTYPE_PHOENIX, g_Vars.currentplayernum);
|
||||
explosionCreateSimple(NULL, &sp694.pos, rooms2, EXPLOSIONTYPE_PHOENIX, g_Vars.currentplayernum);
|
||||
} else {
|
||||
if (!chrIsUsingPaintball(g_Vars.currentplayer->prop->chr)) {
|
||||
if (PLAYERCOUNT() >= 2) {
|
||||
if ((random() % 8) == 0) {
|
||||
smokeCreateSimple(&sp694.unk00, sp6c, SMOKETYPE_BULLETIMPACT);
|
||||
smokeCreateSimple(&sp694.pos, rooms2, SMOKETYPE_BULLETIMPACT);
|
||||
}
|
||||
} else {
|
||||
if (uVar6) {
|
||||
explosionCreateSimple(NULL, &sp694.unk00, sp6c, EXPLOSIONTYPE_BULLETHOLE, g_Vars.currentplayernum);
|
||||
if (texnum) {
|
||||
explosionCreateSimple(NULL, &sp694.pos, rooms2, EXPLOSIONTYPE_BULLETHOLE, g_Vars.currentplayernum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (PLAYERCOUNT() <= 2 || g_Vars.lvupdate240 <= 8 || (random() % 4) == 0) {
|
||||
if (sp694.unk00.x > -32000 && sp694.unk00.x < 32000
|
||||
&& sp694.unk00.y > -32000 && sp694.unk00.y < 32000
|
||||
&& sp694.unk00.z > -32000 && sp694.unk00.z < 32000) {
|
||||
if (sp694.pos.x > -32000 && sp694.pos.x < 32000
|
||||
&& sp694.pos.y > -32000 && sp694.pos.y < 32000
|
||||
&& sp694.pos.z > -32000 && sp694.pos.z < 32000) {
|
||||
sparktype = SPARKTYPE_DEFAULT;
|
||||
|
||||
if (chrIsUsingPaintball(g_Vars.currentplayer->prop->chr)) {
|
||||
@@ -893,14 +893,14 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
break;
|
||||
}
|
||||
|
||||
uVar6 = g_Textures[sp694.texturenum].surfacetype;
|
||||
texnum = g_Textures[sp694.texturenum].surfacetype;
|
||||
|
||||
if (uVar6 == SURFACETYPE_SHALLOWWATER || uVar6 == SURFACETYPE_DEEPWATER) {
|
||||
if (texnum == SURFACETYPE_SHALLOWWATER || texnum == SURFACETYPE_DEEPWATER) {
|
||||
sparktype = SPARKTYPE_SHALLOWWATER;
|
||||
}
|
||||
}
|
||||
|
||||
sparksCreate(room, NULL, &sp694.unk00, &shotdata.dir, &sp694.unk0c, sparktype);
|
||||
sparksCreate(room, NULL, &sp694.pos, &shotdata.gundir3d, &sp694.unk0c, sparktype);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -908,7 +908,7 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
} else {
|
||||
bgunSetHitPos(&hitpos);
|
||||
}
|
||||
} else if (shortrange) {
|
||||
} else if (ismelee) {
|
||||
s32 hitindex;
|
||||
bool hitaprop = false;
|
||||
|
||||
@@ -927,18 +927,17 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
|
||||
if (shotdata.gset.weaponnum != WEAPON_UNARMED && shotdata.gset.weaponnum != WEAPON_TRANQUILIZER) {
|
||||
if (hitaprop) {
|
||||
sparksCreate(shotdata.hits[hitindex].prop->rooms[0], NULL, &shotdata.hits[hitindex].pos, &shotdata.dir, &shotdata.hits[hitindex].dir, SPARKTYPE_DEFAULT);
|
||||
sparksCreate(shotdata.hits[hitindex].prop->rooms[0], NULL, &shotdata.hits[hitindex].pos, &shotdata.gundir3d, &shotdata.hits[hitindex].dir, SPARKTYPE_DEFAULT);
|
||||
} else {
|
||||
sparksCreate(room, NULL, &sp694.unk00, &shotdata.dir, &sp694.unk0c, SPARKTYPE_DEFAULT);
|
||||
sparksCreate(room, NULL, &sp694.pos, &shotdata.gundir3d, &sp694.unk0c, SPARKTYPE_DEFAULT);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
weaponPlayWhooshSound(shotdata.gset.weaponnum, g_Vars.currentplayer->prop);
|
||||
}
|
||||
} else {
|
||||
// Figure out what prop was hit so it can be returned,
|
||||
// by iterating the props in order of distance.
|
||||
// For laser stream, bail early once the laser's range is reached.
|
||||
// The caller is querying which prop is being aimed at rather than taking a shot.
|
||||
// Find the closest object and return it.
|
||||
done = false;
|
||||
|
||||
for (i = 0; i < ARRAYCOUNT(shotdata.hits); i++) {
|
||||
@@ -959,10 +958,7 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
done = true;
|
||||
}
|
||||
|
||||
// This seems like it handles penetration (bullets going
|
||||
// through multiple props), but the loop is effectively
|
||||
// stopped when any prop is hit so this seems unlikely.
|
||||
if (shotdata.hits[i].unk4c) {
|
||||
if (shotdata.hits[i].slowsbullet) {
|
||||
s1++;
|
||||
|
||||
if (s1 >= shotdata.penetration) {
|
||||
@@ -977,59 +973,73 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
return result;
|
||||
}
|
||||
|
||||
struct prop *func0f061d54(s32 handnum, u32 arg1, u32 arg2)
|
||||
struct prop *propFindAimingAt(s32 handnum, bool isshooting, u32 context)
|
||||
{
|
||||
struct coord sp64;
|
||||
struct coord sp58;
|
||||
struct coord sp4c;
|
||||
struct coord sp40;
|
||||
struct coord gundir2d;
|
||||
struct coord gunpos2d;
|
||||
struct coord gundir3d;
|
||||
struct coord gunpos3d;
|
||||
|
||||
bgunCalculatePlayerShotSpread(&sp58, &sp64, handnum, arg2);
|
||||
bgunCalculatePlayerShotSpread(&gunpos2d, &gundir2d, handnum, context);
|
||||
|
||||
if (arg2 == 2 && bgunGetWeaponNum(HAND_RIGHT) == WEAPON_REAPER) {
|
||||
sp58.y -= 15 * RANDOMFRAC();
|
||||
if (context == FINDPROPCONTEXT_SHOOT && bgunGetWeaponNum(HAND_RIGHT) == WEAPON_REAPER) {
|
||||
gunpos2d.y -= 15 * RANDOMFRAC();
|
||||
}
|
||||
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &sp58, &sp40);
|
||||
mtx4RotateVec(camGetProjectionMtxF(), &sp64, &sp4c);
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &gunpos2d, &gunpos3d);
|
||||
mtx4RotateVec(camGetProjectionMtxF(), &gundir2d, &gundir3d);
|
||||
|
||||
return shotCalculateHits(handnum, arg1, &sp58, &sp64, &sp40, &sp4c, 0, 4294836224, PLAYERCOUNT() >= 2);
|
||||
return shotCalculateHits(handnum, isshooting, &gunpos2d, &gundir2d, &gunpos3d, &gundir3d, 0, 4294836224, PLAYERCOUNT() >= 2);
|
||||
}
|
||||
|
||||
void shotCreate(s32 handnum, bool arg1, bool dorandom, s32 arg3, bool arg4)
|
||||
void shotCreate(s32 handnum, bool isshooting, bool dorandom, s32 numshots, bool cheap)
|
||||
{
|
||||
struct coord shootdir;
|
||||
struct coord shootpos;
|
||||
struct coord sp44;
|
||||
struct coord sp38;
|
||||
struct coord gundir3d;
|
||||
struct coord gunpos3d;
|
||||
struct coord gundir2d;
|
||||
struct coord gunpos2d;
|
||||
|
||||
bgunCalculatePlayerShotSpread(&sp38, &sp44, handnum, dorandom);
|
||||
bgunCalculatePlayerShotSpread(&gunpos2d, &gundir2d, handnum, dorandom);
|
||||
|
||||
if (arg3 > 0) {
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &sp38, &shootpos);
|
||||
mtx4RotateVec(camGetProjectionMtxF(), &sp44, &shootdir);
|
||||
if (numshots > 0) {
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &gunpos2d, &gunpos3d);
|
||||
mtx4RotateVec(camGetProjectionMtxF(), &gundir2d, &gundir3d);
|
||||
|
||||
shotCalculateHits(handnum, arg1, &sp38, &sp44, &shootpos, &shootdir, 0, 4294836224, arg4);
|
||||
shotCalculateHits(handnum, isshooting, &gunpos2d, &gundir2d, &gunpos3d, &gundir3d, 0, 4294836224, cheap);
|
||||
|
||||
if (arg3 < 2) {
|
||||
bgunSetLastShootInfo(&shootpos, &shootdir, handnum);
|
||||
if (numshots <= 1) {
|
||||
bgunSetLastShootInfo(&gunpos3d, &gundir3d, handnum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func0f061fa8(struct shotdata *shotdata, struct prop *prop, f32 arg2, s32 hitpart, struct modelnode *node, struct hitthing *hitthing, s32 arg6, struct modelnode *arg7, struct model *model, bool arg9, s32 arg10, struct coord *arg11, struct coord *arg12)
|
||||
/**
|
||||
* Add a prop to the shot's hit list.
|
||||
*
|
||||
* Possible @bug: This function assumes the prop that's being added to the list
|
||||
* is closer than the previous furtherest. This is okay if it's guaranteed that
|
||||
* hits are added in the order of furtherest to closest. I'm unsure if this is
|
||||
* true though.
|
||||
*/
|
||||
void hitCreate(struct shotdata *shotdata, struct prop *prop, f32 hitdistance, s32 hitpart,
|
||||
struct modelnode *bboxnode, struct hitthing *hitthing, s32 mtxindex, struct modelnode *dlnode,
|
||||
struct model *model, bool slowsbullet, bool bulletproof, struct coord *arg11, struct coord *arg12)
|
||||
{
|
||||
s32 i;
|
||||
f32 fVar8;
|
||||
|
||||
if (arg9) {
|
||||
// If this prop "slows" the bullet, it means it contributes to the bullet's
|
||||
// penetration total. Most props slow the bullet. Glass does not.
|
||||
if (slowsbullet) {
|
||||
s32 bestindex = 0;
|
||||
s32 count = 0;
|
||||
f32 mostdist = 0;
|
||||
f32 prevmostdist = 0;
|
||||
|
||||
// Count the number of existing hits that slow the bullet,
|
||||
// and note which hit of these is the furtherest.
|
||||
for (i = 0; i < ARRAYCOUNT(shotdata->hits); i++) {
|
||||
if (shotdata->hits[i].prop && shotdata->hits[i].unk4c) {
|
||||
if (shotdata->hits[i].prop && shotdata->hits[i].slowsbullet) {
|
||||
count++;
|
||||
|
||||
if (shotdata->hits[i].distance > mostdist) {
|
||||
@@ -1041,49 +1051,58 @@ void func0f061fa8(struct shotdata *shotdata, struct prop *prop, f32 arg2, s32 hi
|
||||
}
|
||||
|
||||
if (count >= shotdata->penetration) {
|
||||
// There are too many props for the bullet to penetrate all of them.
|
||||
// Remove the furtherest from the hit list, as well as any glass
|
||||
// which is be beyond the now-reduced shot distance.
|
||||
shotdata->hits[bestindex].prop = NULL;
|
||||
shotdata->unk34 = prevmostdist;
|
||||
shotdata->distance = prevmostdist;
|
||||
|
||||
if (shotdata->unk34 < arg2) {
|
||||
shotdata->unk34 = arg2;
|
||||
if (shotdata->distance < hitdistance) {
|
||||
shotdata->distance = hitdistance;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAYCOUNT(shotdata->hits); i++) {
|
||||
if (shotdata->hits[i].prop && !shotdata->hits[i].unk4c && shotdata->hits[i].distance > prevmostdist) {
|
||||
if (shotdata->hits[i].prop && !shotdata->hits[i].slowsbullet && shotdata->hits[i].distance > prevmostdist) {
|
||||
shotdata->hits[i].prop = NULL;
|
||||
}
|
||||
}
|
||||
} else if (count + 1 == shotdata->penetration) {
|
||||
if (shotdata->unk34 > arg2) {
|
||||
shotdata->unk34 = arg2;
|
||||
} else {
|
||||
// If this hit will be stopping the bullet, adjust the shot distance.
|
||||
if (count + 1 == shotdata->penetration) {
|
||||
if (shotdata->distance > hitdistance) {
|
||||
shotdata->distance = hitdistance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (arg10) {
|
||||
// If this prop must stop the bullet (eg. because it's bulletproof),
|
||||
// remove any hits that are beyond it.
|
||||
if (bulletproof) {
|
||||
for (i = 0; i < ARRAYCOUNT(shotdata->hits); i++) {
|
||||
if (shotdata->hits[i].prop && shotdata->hits[i].distance > arg2) {
|
||||
if (shotdata->hits[i].prop && shotdata->hits[i].distance > hitdistance) {
|
||||
shotdata->hits[i].prop = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
shotdata->unk34 = arg2;
|
||||
shotdata->distance = hitdistance;
|
||||
}
|
||||
|
||||
// Record the new hit
|
||||
for (i = 0; i < ARRAYCOUNT(shotdata->hits); i++) {
|
||||
if (shotdata->hits[i].prop == NULL) {
|
||||
struct hit *hit = &shotdata->hits[i];
|
||||
|
||||
hit->distance = arg2;
|
||||
hit->distance = hitdistance;
|
||||
hit->prop = prop;
|
||||
hit->hitpart = hitpart;
|
||||
hit->node = node;
|
||||
hit->bboxnode = bboxnode;
|
||||
hit->hitthing = *hitthing;
|
||||
hit->mtxindex = arg6;
|
||||
hit->unk44 = arg7;
|
||||
hit->mtxindex = mtxindex;
|
||||
hit->dlnode = dlnode;
|
||||
hit->model = model;
|
||||
hit->unk4c = arg9;
|
||||
hit->unk4d = arg10;
|
||||
hit->slowsbullet = slowsbullet;
|
||||
hit->bulletproof = bulletproof;
|
||||
hit->pos.x = arg11->x;
|
||||
hit->pos.y = arg11->y;
|
||||
hit->pos.z = arg11->z;
|
||||
@@ -1202,13 +1221,13 @@ void handInflictMeleeDamage(s32 handnum, struct gset *gset, bool arg2)
|
||||
if (cdTestLos04(&playerprop->pos, playerprop->rooms, &prop->pos, cdtypes)) {
|
||||
if (isglass) {
|
||||
struct model *model = obj->model;
|
||||
struct coord spd8;
|
||||
struct coord spcc;
|
||||
struct coord gunpos2d;
|
||||
struct coord gundir2d;
|
||||
struct modelnode *node = NULL;
|
||||
|
||||
bgunCalculatePlayerShotSpread(&spd8, &spcc, handnum, true);
|
||||
bgunCalculatePlayerShotSpread(&gunpos2d, &gundir2d, handnum, true);
|
||||
|
||||
if (modelTestForHit(model, &spd8, &spcc, &node) > 0) {
|
||||
if (modelTestForHit(model, &gunpos2d, &gundir2d, &node) > 0) {
|
||||
f32 damage = gsetGetDamage(gset) * 2.5f;
|
||||
skipthething = true;
|
||||
bgunPlayGlassHitSound(&playerprop->pos, playerprop->rooms, -1);
|
||||
@@ -1218,21 +1237,21 @@ void handInflictMeleeDamage(s32 handnum, struct gset *gset, bool arg2)
|
||||
} else if (arg2) {
|
||||
chr->chrflags |= CHRCFLAG_AVOIDING;
|
||||
} else {
|
||||
struct coord spb8;
|
||||
struct coord vector;
|
||||
struct coord gunpos2d;
|
||||
struct coord gundir2d;
|
||||
struct modelnode *node = NULL;
|
||||
struct model *model = NULL;
|
||||
s32 side = -1;
|
||||
s32 hitpart = HITPART_TORSO;
|
||||
|
||||
if (!chrIsAvoiding(chr)) {
|
||||
bgunCalculatePlayerShotSpread(&spb8, &vector, handnum, true);
|
||||
bgunCalculatePlayerShotSpread(&gunpos2d, &gundir2d, handnum, true);
|
||||
skipthething = true;
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &vector);
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &gundir2d);
|
||||
bgunPlayPropHitSound(gset, prop, -1);
|
||||
|
||||
if (chr->model && chrGetShield(chr) > 0) {
|
||||
chrCalculateShieldHit(chr, &playerprop->pos, &vector, &node, &hitpart, &model, &side);
|
||||
chrCalculateShieldHit(chr, &playerprop->pos, &gundir2d, &node, &hitpart, &model, &side);
|
||||
}
|
||||
|
||||
if (bmoveGetCrouchPos() == CROUCHPOS_DUCK) {
|
||||
@@ -1243,7 +1262,7 @@ void handInflictMeleeDamage(s32 handnum, struct gset *gset, bool arg2)
|
||||
hitpart = HITPART_TORSO;
|
||||
}
|
||||
|
||||
func0f0341dc(chr, gsetGetDamage(gset), &vector, gset,
|
||||
func0f0341dc(chr, gsetGetDamage(gset), &gundir2d, gset,
|
||||
g_Vars.currentplayer->prop, hitpart, chr->prop, node, model, side, 0);
|
||||
}
|
||||
}
|
||||
@@ -1271,7 +1290,7 @@ void handTickAttack(s32 handnum)
|
||||
}
|
||||
|
||||
if (doit) {
|
||||
func0f061d54(handnum, 1, 2);
|
||||
propFindAimingAt(handnum, true, FINDPROPCONTEXT_SHOOT);
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->hands[handnum].unk0d0f_02 = false;
|
||||
|
||||
+91
-91
@@ -2689,7 +2689,7 @@ bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
||||
|
||||
while (hitpart > 0) {
|
||||
if (func0f084594(model, spe4, arg5, arg6, &thing1, &mtxindex1, &node1)) {
|
||||
mtx4TransformVec(&model->matrices[mtxindex1], &thing1.unk00, &spfc);
|
||||
mtx4TransformVec(&model->matrices[mtxindex1], &thing1.pos, &spfc);
|
||||
|
||||
sum2 = (spfc.f[0] - arg5->f[0]) * arg6->f[0]
|
||||
+ (spfc.f[1] - arg5->f[1]) * arg6->f[1]
|
||||
@@ -2715,9 +2715,9 @@ bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
||||
g_EmbedNode = spe4;
|
||||
|
||||
g_EmbedSide = thing1.unk28 / 2;
|
||||
var8006993c[0] = thing1.unk00.x;
|
||||
var8006993c[1] = thing1.unk00.y;
|
||||
var8006993c[2] = thing1.unk00.z;
|
||||
var8006993c[0] = thing1.pos.x;
|
||||
var8006993c[1] = thing1.pos.y;
|
||||
var8006993c[2] = thing1.pos.z;
|
||||
|
||||
result = 1;
|
||||
}
|
||||
@@ -2741,13 +2741,13 @@ bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
||||
|
||||
if (node && func0f084594(model, node, arg5, arg6, &thing2, &mtxindex2, &node2)) {
|
||||
if (hitpart <= 0 ||
|
||||
+ model->matrices[mtxindex2].m[0][2] * thing2.unk00.f[0]
|
||||
+ model->matrices[mtxindex2].m[1][2] * thing2.unk00.f[1]
|
||||
+ model->matrices[mtxindex2].m[2][2] * thing2.unk00.f[2]
|
||||
+ model->matrices[mtxindex2].m[0][2] * thing2.pos.f[0]
|
||||
+ model->matrices[mtxindex2].m[1][2] * thing2.pos.f[1]
|
||||
+ model->matrices[mtxindex2].m[2][2] * thing2.pos.f[2]
|
||||
>
|
||||
+ model->matrices[mtxindex1].m[0][2] * thing1.unk00.f[0]
|
||||
+ model->matrices[mtxindex1].m[1][2] * thing1.unk00.f[1]
|
||||
+ model->matrices[mtxindex1].m[2][2] * thing1.unk00.f[2]
|
||||
+ model->matrices[mtxindex1].m[0][2] * thing1.pos.f[0]
|
||||
+ model->matrices[mtxindex1].m[1][2] * thing1.pos.f[1]
|
||||
+ model->matrices[mtxindex1].m[2][2] * thing1.pos.f[2]
|
||||
) {
|
||||
hitpart = 1;
|
||||
|
||||
@@ -2760,7 +2760,7 @@ bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
||||
}
|
||||
|
||||
if (hitpart > 0) {
|
||||
mtx4TransformVec(&model->matrices[mtxindex1], &thing1.unk00, &spfc);
|
||||
mtx4TransformVec(&model->matrices[mtxindex1], &thing1.pos, &spfc);
|
||||
|
||||
sum3 = (spfc.f[0] - arg5->f[0]) * arg6->f[0]
|
||||
+ (spfc.f[1] - arg5->f[1]) * arg6->f[1]
|
||||
@@ -2798,9 +2798,9 @@ bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
||||
|
||||
if (thing1.texturenum == 10000) {
|
||||
g_EmbedSide = thing1.unk28 / 2;
|
||||
var8006993c[0] = thing1.unk00.x;
|
||||
var8006993c[1] = thing1.unk00.y;
|
||||
var8006993c[2] = thing1.unk00.z;
|
||||
var8006993c[0] = thing1.pos.x;
|
||||
var8006993c[1] = thing1.pos.y;
|
||||
var8006993c[2] = thing1.pos.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2994,7 +2994,7 @@ bool func0f06c28c(struct chrdata *chr, struct coord *arg1, struct coord *arg2, s
|
||||
{
|
||||
f32 spec;
|
||||
struct prop *prop = chr->prop;
|
||||
f32 spe4 = chr0f0278a4(chr);
|
||||
f32 spe4 = chrGetHitRadius(chr);
|
||||
f32 x = (prop->pos.f[0] - arg1->f[0]);
|
||||
f32 y = (prop->pos.f[1] - arg1->f[1]);
|
||||
f32 z = (prop->pos.f[2] - arg1->f[2]);
|
||||
@@ -3021,7 +3021,7 @@ bool func0f06c28c(struct chrdata *chr, struct coord *arg1, struct coord *arg2, s
|
||||
|
||||
while (hitpart > 0) {
|
||||
if (func0f084594(model, spcc, arg5, arg6, &sp7c, &sp78, &sp74)) {
|
||||
mtx4TransformVec(&model->matrices[sp78], &sp7c.unk00, &spb8);
|
||||
mtx4TransformVec(&model->matrices[sp78], &sp7c.pos, &spb8);
|
||||
|
||||
spec = (spb8.f[0] - arg5->f[0]) * arg6->f[0]
|
||||
+ (spb8.f[1] - arg5->f[1]) * arg6->f[1]
|
||||
@@ -3047,9 +3047,9 @@ bool func0f06c28c(struct chrdata *chr, struct coord *arg1, struct coord *arg2, s
|
||||
g_EmbedNode = spcc;
|
||||
g_EmbedSide = sp7c.unk28 / 2;
|
||||
|
||||
var8006993c[0] = sp7c.unk00.x;
|
||||
var8006993c[1] = sp7c.unk00.y;
|
||||
var8006993c[2] = sp7c.unk00.z;
|
||||
var8006993c[0] = sp7c.pos.x;
|
||||
var8006993c[1] = sp7c.pos.y;
|
||||
var8006993c[2] = sp7c.pos.z;
|
||||
|
||||
result = true;
|
||||
}
|
||||
@@ -3061,10 +3061,10 @@ bool func0f06c28c(struct chrdata *chr, struct coord *arg1, struct coord *arg2, s
|
||||
hitpart = modelTestForHit(model, arg5, arg6, &spcc);
|
||||
|
||||
if (hitpart > 0
|
||||
&& func0f06bea0(model, model->definition->rootnode, model->definition->rootnode, arg5, arg6, &sp7c.unk00, &spec, &spcc, &hitpart, &sp78, &sp74)
|
||||
&& func0f06bea0(model, model->definition->rootnode, model->definition->rootnode, arg5, arg6, &sp7c.pos, &spec, &spcc, &hitpart, &sp78, &sp74)
|
||||
&& spec < *arg9) {
|
||||
*arg9 = spec;
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &sp7c.unk00, arg7);
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &sp7c.pos, arg7);
|
||||
mtx4RotateVec(camGetProjectionMtxF(), &sp7c.unk0c, arg8);
|
||||
|
||||
if (arg8->x != 0.0f || arg8->y != 0.0f || arg8->z != 0.0f) {
|
||||
@@ -3270,9 +3270,9 @@ s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2,
|
||||
|
||||
if (bgRoomIsLoaded(spcc[i])) {
|
||||
if (bgTestHitInRoom(&prop->pos, &sp1c4, spcc[i], &hitthing)) {
|
||||
hitthing.unk00.x *= scale;
|
||||
hitthing.unk00.y *= scale;
|
||||
hitthing.unk00.z *= scale;
|
||||
hitthing.pos.x *= scale;
|
||||
hitthing.pos.y *= scale;
|
||||
hitthing.pos.z *= scale;
|
||||
|
||||
var80069944 = hitthing.texturenum;
|
||||
|
||||
@@ -3281,7 +3281,7 @@ s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2,
|
||||
if (g_Textures[hitthing.texturenum].surfacetype == SURFACETYPE_DEEPWATER) {
|
||||
struct coord spa4 = {0, 0, 0};
|
||||
s0 = false;
|
||||
sparksCreate(prop->rooms[0], prop, &hitthing.unk00, &spa4, &hitthing.unk0c, SPARKTYPE_DEEPWATER);
|
||||
sparksCreate(prop->rooms[0], prop, &hitthing.pos, &spa4, &hitthing.unk0c, SPARKTYPE_DEEPWATER);
|
||||
psCreate(0, prop, SFX_HIT_WATER, -1, -1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f);
|
||||
obj->hidden |= OBJHFLAG_DELETING;
|
||||
}
|
||||
@@ -3294,28 +3294,28 @@ s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2,
|
||||
if (cdExamLos09(&prop->pos, spa0, &sp1c4, CDTYPE_BG) == CDRESULT_COLLISION) {
|
||||
s0 = true;
|
||||
#if VERSION >= VERSION_PAL_FINAL
|
||||
cdGetPos(&hitthing.unk00, 4258, "prop/propobj.c");
|
||||
cdGetPos(&hitthing.pos, 4258, "prop/propobj.c");
|
||||
#elif VERSION >= VERSION_PAL_BETA
|
||||
cdGetPos(&hitthing.unk00, 4258, "propobj.c");
|
||||
cdGetPos(&hitthing.pos, 4258, "propobj.c");
|
||||
#elif VERSION >= VERSION_NTSC_1_0
|
||||
cdGetPos(&hitthing.unk00, 4257, "propobj.c");
|
||||
cdGetPos(&hitthing.pos, 4257, "propobj.c");
|
||||
#else
|
||||
cdGetPos(&hitthing.unk00, 4246, "propobj.c");
|
||||
cdGetPos(&hitthing.pos, 4246, "propobj.c");
|
||||
#endif
|
||||
cdGetObstacleNormal(&hitthing.unk0c);
|
||||
}
|
||||
}
|
||||
|
||||
if (s0
|
||||
&& ((prop->pos.x <= sp1c4.x && hitthing.unk00.x <= sp1c4.x && prop->pos.x <= hitthing.unk00.x) || (sp1c4.x <= prop->pos.x && sp1c4.x <= hitthing.unk00.x && hitthing.unk00.x <= prop->pos.x))
|
||||
&& ((prop->pos.y <= sp1c4.y && hitthing.unk00.y <= sp1c4.y && prop->pos.y <= hitthing.unk00.y) || (sp1c4.y <= prop->pos.y && sp1c4.y <= hitthing.unk00.y && hitthing.unk00.y <= prop->pos.y))
|
||||
&& ((prop->pos.z <= sp1c4.z && hitthing.unk00.z <= sp1c4.z && prop->pos.z <= hitthing.unk00.z) || (sp1c4.z <= prop->pos.z && sp1c4.z <= hitthing.unk00.z && hitthing.unk00.z <= prop->pos.z))
|
||||
&& (prop->pos.f[0] != hitthing.unk00.f[0] || prop->pos.f[1] != hitthing.unk00.f[1] || prop->pos.f[2] != hitthing.unk00.f[2])) {
|
||||
&& ((prop->pos.x <= sp1c4.x && hitthing.pos.x <= sp1c4.x && prop->pos.x <= hitthing.pos.x) || (sp1c4.x <= prop->pos.x && sp1c4.x <= hitthing.pos.x && hitthing.pos.x <= prop->pos.x))
|
||||
&& ((prop->pos.y <= sp1c4.y && hitthing.pos.y <= sp1c4.y && prop->pos.y <= hitthing.pos.y) || (sp1c4.y <= prop->pos.y && sp1c4.y <= hitthing.pos.y && hitthing.pos.y <= prop->pos.y))
|
||||
&& ((prop->pos.z <= sp1c4.z && hitthing.pos.z <= sp1c4.z && prop->pos.z <= hitthing.pos.z) || (sp1c4.z <= prop->pos.z && sp1c4.z <= hitthing.pos.z && hitthing.pos.z <= prop->pos.z))
|
||||
&& (prop->pos.f[0] != hitthing.pos.f[0] || prop->pos.f[1] != hitthing.pos.f[1] || prop->pos.f[2] != hitthing.pos.f[2])) {
|
||||
cdresult = CDRESULT_COLLISION;
|
||||
|
||||
sp1c4.x = hitthing.unk00.x;
|
||||
sp1c4.y = hitthing.unk00.y;
|
||||
sp1c4.z = hitthing.unk00.z;
|
||||
sp1c4.x = hitthing.pos.x;
|
||||
sp1c4.y = hitthing.pos.y;
|
||||
sp1c4.z = hitthing.pos.z;
|
||||
|
||||
arg3->x = hitthing.unk0c.x;
|
||||
arg3->y = hitthing.unk0c.y;
|
||||
@@ -14106,7 +14106,7 @@ void objDeform(struct defaultobj *obj, s32 level)
|
||||
/**
|
||||
* Bounce an object, such as a hoverbot when it's destroyed.
|
||||
*/
|
||||
void objBounce(struct defaultobj *obj, struct coord *arg1)
|
||||
void objBounce(struct defaultobj *obj, struct coord *gundir2d)
|
||||
{
|
||||
struct coord dir;
|
||||
struct coord rot = {0, 0, 0};
|
||||
@@ -14139,9 +14139,9 @@ void objBounce(struct defaultobj *obj, struct coord *arg1)
|
||||
|
||||
projectile->flags |= PROJECTILEFLAG_AIRBORNE;
|
||||
|
||||
dir.x = arg1->x;
|
||||
dir.y = arg1->y;
|
||||
dir.z = arg1->z;
|
||||
dir.x = gundir2d->x;
|
||||
dir.y = gundir2d->y;
|
||||
dir.z = gundir2d->z;
|
||||
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &dir);
|
||||
|
||||
@@ -14744,8 +14744,8 @@ void objCheckDestroyed(struct defaultobj *obj, struct coord *pos, s32 playernum)
|
||||
obj->flags &= ~OBJFLAG_CHOPPER_INACTIVE;
|
||||
} else if (obj->type == OBJTYPE_HOVERCAR) {
|
||||
struct hovercarobj *hovercar = (struct hovercarobj *)obj;
|
||||
struct coord sp40;
|
||||
struct coord sp34;
|
||||
struct coord gunpos2d;
|
||||
struct coord gundir2d;
|
||||
|
||||
if (obj->flags & OBJFLAG_HOVERCAR_ISHOVERBOT) {
|
||||
// Hoverbots bounce and spark when dead
|
||||
@@ -14753,8 +14753,8 @@ void objCheckDestroyed(struct defaultobj *obj, struct coord *pos, s32 playernum)
|
||||
hovercar->deadtimer60 = TICKS(250);
|
||||
hovercar->sparkstimer60 = TICKS(50);
|
||||
|
||||
bgunCalculatePlayerShotSpread(&sp40, &sp34, HAND_RIGHT, false);
|
||||
objBounce(obj, &sp34);
|
||||
bgunCalculatePlayerShotSpread(&gunpos2d, &gundir2d, HAND_RIGHT, false);
|
||||
objBounce(obj, &gundir2d);
|
||||
} else if (obj->modelnum == MODEL_TAXICAB || obj->modelnum == MODEL_POLICECAR) {
|
||||
// Taxi and police car (limo) fall to the ground and retain collision
|
||||
objDeform(obj, 10);
|
||||
@@ -14892,7 +14892,7 @@ bool func0f084594(struct model *model, struct modelnode *node, struct coord *arg
|
||||
|
||||
if (reset) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
hitthing->unk00.f[i] = spb8.f[i];
|
||||
hitthing->pos.f[i] = spb8.f[i];
|
||||
}
|
||||
|
||||
hitthing->unk0c.x = 0.0f;
|
||||
@@ -14921,13 +14921,13 @@ bool func0f084594(struct model *model, struct modelnode *node, struct coord *arg
|
||||
} else {
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (maxindex != i) {
|
||||
hitthing->unk00.f[i] = spb8.f[i] + sp7c.f[maxindex] * spac.f[i];
|
||||
hitthing->pos.f[i] = spb8.f[i] + sp7c.f[maxindex] * spac.f[i];
|
||||
|
||||
if (hitthing->unk00.f[i] < min.f[i] || hitthing->unk00.f[i] > max.f[i]) {
|
||||
if (hitthing->pos.f[i] < min.f[i] || hitthing->pos.f[i] > max.f[i]) {
|
||||
ok = false;
|
||||
}
|
||||
} else {
|
||||
hitthing->unk00.f[i] = sp88.f[i];
|
||||
hitthing->pos.f[i] = sp88.f[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15574,20 +15574,20 @@ void func0f0859a0(struct prop *prop, struct shotdata *shotdata)
|
||||
}
|
||||
|
||||
if (var8005efc0 > 0.0f) {
|
||||
hitpart = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node1);
|
||||
hitpart = modelTestForHit(model, &shotdata->gunpos2d, &shotdata->gundir2d, &node1);
|
||||
|
||||
while (hitpart > 0) {
|
||||
if (func0f084594(model, node1, &shotdata->unk00, &shotdata->unk0c, &hitthing1, &spe4, &node2)) {
|
||||
if (func0f084594(model, node1, &shotdata->gunpos2d, &shotdata->gundir2d, &hitthing1, &spe4, &node2)) {
|
||||
break;
|
||||
}
|
||||
|
||||
hitpart = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node1);
|
||||
hitpart = modelTestForHit(model, &shotdata->gunpos2d, &shotdata->gundir2d, &node1);
|
||||
}
|
||||
} else {
|
||||
do {
|
||||
hitpart = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node1);
|
||||
hitpart = modelTestForHit(model, &shotdata->gunpos2d, &shotdata->gundir2d, &node1);
|
||||
|
||||
if (hitpart > 0 && func0f0849dc(model, node1, &shotdata->unk00, &shotdata->unk0c, &hitthing1, &spe4, &node2)) {
|
||||
if (hitpart > 0 && func0f0849dc(model, node1, &shotdata->gunpos2d, &shotdata->gundir2d, &hitthing1, &spe4, &node2)) {
|
||||
break;
|
||||
}
|
||||
} while (hitpart > 0);
|
||||
@@ -15596,10 +15596,10 @@ void func0f0859a0(struct prop *prop, struct shotdata *shotdata)
|
||||
if (obj->flags3 & OBJFLAG3_HOVERBEDSHIELD) {
|
||||
node3 = modelGetPart(model->definition, MODELPART_0067);
|
||||
|
||||
if (node3 && func0f084594(model, node3, &shotdata->unk00, &shotdata->unk0c, &hitthing2, &sp90, &node4)) {
|
||||
if (node3 && func0f084594(model, node3, &shotdata->gunpos2d, &shotdata->gundir2d, &hitthing2, &sp90, &node4)) {
|
||||
if (hitpart <= 0 ||
|
||||
model->matrices[sp90].m[0][2] * hitthing2.unk00.f[0] + model->matrices[sp90].m[1][2] * hitthing2.unk00.f[1] + model->matrices[sp90].m[2][2] * hitthing2.unk00.f[2] >
|
||||
model->matrices[spe4].m[0][2] * hitthing1.unk00.f[0] + model->matrices[spe4].m[1][2] * hitthing1.unk00.f[1] + model->matrices[spe4].m[2][2] * hitthing1.unk00.f[2]) {
|
||||
model->matrices[sp90].m[0][2] * hitthing2.pos.f[0] + model->matrices[sp90].m[1][2] * hitthing2.pos.f[1] + model->matrices[sp90].m[2][2] * hitthing2.pos.f[2] >
|
||||
model->matrices[spe4].m[0][2] * hitthing1.pos.f[0] + model->matrices[spe4].m[1][2] * hitthing1.pos.f[1] + model->matrices[spe4].m[2][2] * hitthing1.pos.f[2]) {
|
||||
hitpart = HITPART_LFOOT;
|
||||
hitthing1 = hitthing2;
|
||||
node1 = node3;
|
||||
@@ -15611,10 +15611,10 @@ void func0f0859a0(struct prop *prop, struct shotdata *shotdata)
|
||||
}
|
||||
|
||||
if (hitpart > 0) {
|
||||
mtx4TransformVec(&model->matrices[spe4], &hitthing1.unk00, &spd8);
|
||||
mtx4TransformVec(&model->matrices[spe4], &hitthing1.pos, &spd8);
|
||||
spd4 = -spd8.f[2];
|
||||
|
||||
if (spd4 <= shotdata->unk34) {
|
||||
if (spd4 <= shotdata->distance) {
|
||||
isnotglass = true;
|
||||
|
||||
if ((obj->flags & OBJFLAG_INVINCIBLE) == 0) {
|
||||
@@ -15630,7 +15630,7 @@ void func0f0859a0(struct prop *prop, struct shotdata *shotdata)
|
||||
mtx4RotateVec(&model->matrices[spe4], &hitthing1.unk0c, &sp70);
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &sp70);
|
||||
|
||||
func0f061fa8(shotdata, prop, spd4, hitpart,
|
||||
hitCreate(shotdata, prop, spd4, hitpart,
|
||||
node1, &hitthing1, spe4, node2,
|
||||
model, isnotglass && shotdata->gset.weaponnum != WEAPON_FARSIGHT,
|
||||
(obj->flags2 & OBJFLAG2_BULLETPROOF)
|
||||
@@ -15641,7 +15641,7 @@ void func0f0859a0(struct prop *prop, struct shotdata *shotdata)
|
||||
}
|
||||
}
|
||||
|
||||
void func0f085e00(struct prop *prop, struct shotdata *shotdata)
|
||||
void objTestHit(struct prop *prop, struct shotdata *shotdata)
|
||||
{
|
||||
f32 tmp;
|
||||
struct defaultobj *obj = prop->obj;
|
||||
@@ -15653,7 +15653,7 @@ void func0f085e00(struct prop *prop, struct shotdata *shotdata)
|
||||
&& (obj->flags2 & OBJFLAG2_SHOOTTHROUGH) == 0) {
|
||||
tmp = -(model->matrices[0].m[3][2] + objGetRotatedLocalZMaxByMtx4(bbox, model->matrices));
|
||||
|
||||
if (tmp <= shotdata->unk34) {
|
||||
if (tmp <= shotdata->distance) {
|
||||
func0f0859a0(prop, shotdata);
|
||||
}
|
||||
}
|
||||
@@ -15667,7 +15667,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
u8 ismeleefunc = false;
|
||||
s32 i;
|
||||
bool explosiveshells = false;
|
||||
bool spfc = hit->unk4c;
|
||||
bool slowsbullet = hit->slowsbullet;
|
||||
struct weaponfunc *func = gsetGetWeaponFunction(&shotdata->gset);
|
||||
struct coord spec;
|
||||
f32 tmp;
|
||||
@@ -15693,17 +15693,17 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
|
||||
obj = hit->prop->obj;
|
||||
|
||||
sp110.x = shotdata->unk00.x - hit->distance * shotdata->unk0c.x / shotdata->unk0c.z;
|
||||
sp110.y = shotdata->unk00.y - hit->distance * shotdata->unk0c.y / shotdata->unk0c.z;
|
||||
sp110.z = shotdata->unk00.z - hit->distance;
|
||||
sp110.x = shotdata->gunpos2d.x - hit->distance * shotdata->gundir2d.x / shotdata->gundir2d.z;
|
||||
sp110.y = shotdata->gunpos2d.y - hit->distance * shotdata->gundir2d.y / shotdata->gundir2d.z;
|
||||
sp110.z = shotdata->gunpos2d.z - hit->distance;
|
||||
|
||||
mtx4TransformVecInPlace(camGetProjectionMtxF(), &sp110);
|
||||
|
||||
if (!spfc && chrIsUsingPaintball(g_Vars.currentplayer->prop->chr)) {
|
||||
spfc = true;
|
||||
if (!slowsbullet && chrIsUsingPaintball(g_Vars.currentplayer->prop->chr)) {
|
||||
slowsbullet = true;
|
||||
}
|
||||
|
||||
if (hit->unk4c) {
|
||||
if (hit->slowsbullet) {
|
||||
bgunSetHitPos(&sp110);
|
||||
}
|
||||
|
||||
@@ -15715,7 +15715,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
&& shotdata->gset.weaponnum != WEAPON_FARSIGHT
|
||||
#endif
|
||||
) {
|
||||
// For some penetrating weapons, unset hits beyond the shot distance?
|
||||
// For some penetrating weapons, unset hits beyond the shot distance
|
||||
spe4 = hit->prop;
|
||||
mtx4TransformVec(obj->model->matrices, &sp110, &spec);
|
||||
tmp = -spec.z;
|
||||
@@ -15726,7 +15726,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
}
|
||||
}
|
||||
|
||||
shotdata->unk34 = tmp;
|
||||
shotdata->distance = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15741,20 +15741,20 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
|
||||
// Create shield hit if object is shielded
|
||||
if (hit->hitthing.texturenum == 10000) {
|
||||
spdc[0] = hit->hitthing.unk00.x;
|
||||
spdc[1] = hit->hitthing.unk00.y;
|
||||
spdc[2] = hit->hitthing.unk00.z;
|
||||
spdc[0] = hit->hitthing.pos.x;
|
||||
spdc[1] = hit->hitthing.pos.y;
|
||||
spdc[2] = hit->hitthing.pos.z;
|
||||
|
||||
shieldhitCreate(prop, (obj->flags3 & OBJFLAG3_SHOWSHIELD) ? 4.0f : 8.0f, hit->prop, hit->node, hit->model, hit->hitthing.unk28 / 2, spdc);
|
||||
shieldhitCreate(prop, (obj->flags3 & OBJFLAG3_SHOWSHIELD) ? 4.0f : 8.0f, hit->prop, hit->bboxnode, hit->model, hit->hitthing.unk28 / 2, spdc);
|
||||
}
|
||||
|
||||
// Increment object hit count
|
||||
if (objIsHealthy(obj) && objIsMortal(obj) && hit->unk4c) {
|
||||
if (objIsHealthy(obj) && objIsMortal(obj) && hit->slowsbullet) {
|
||||
mpstatsIncrementPlayerShotCount2(&shotdata->gset, SHOTREGION_OBJECT);
|
||||
}
|
||||
|
||||
// Play hit sound
|
||||
if (!spfc) {
|
||||
if (!slowsbullet) {
|
||||
bgunPlayGlassHitSound(&hit->prop->pos, hit->prop->rooms, hit->hitthing.texturenum);
|
||||
} else if (!ismeleefunc) {
|
||||
bgunPlayPropHitSound(&shotdata->gset, hit->prop, hit->hitthing.texturenum);
|
||||
@@ -15767,7 +15767,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
&& shotdata->gset.weaponnum != WEAPON_LASER
|
||||
&& shotdata->gset.weaponnum != WEAPON_TRANQUILIZER
|
||||
&& shotdata->gset.weaponnum != WEAPON_FARSIGHT) {
|
||||
if (hit->unk4c == 0) {
|
||||
if (!hit->slowsbullet) {
|
||||
struct prop *hitprop = hit->prop;
|
||||
s8 iswindoweddoor = obj->model->definition->skel == &g_SkelWindowedDoor ? true : false;
|
||||
|
||||
@@ -15780,7 +15780,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
textureindex += 10;
|
||||
}
|
||||
|
||||
wallhitCreate(&hit->hitthing.unk00, &hit->hitthing.unk0c, &shotdata->gunpos, 0,
|
||||
wallhitCreate(&hit->hitthing.pos, &hit->hitthing.unk0c, &shotdata->gunpos3d, 0,
|
||||
0, textureindex, 1, hitprop, hit->mtxindex, iswindoweddoor, g_Vars.currentplayer->prop->chr, true);
|
||||
} else {
|
||||
s16 textureindex;
|
||||
@@ -15801,8 +15801,8 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
spc4 = false;
|
||||
spcc = random() % surfacetype->numwallhittexes;
|
||||
|
||||
if ((obj->model->definition->skel == &g_SkelWindowedDoor && hit->unk44 == modelGetPart(obj->model->definition, MODELPART_WINDOWEDDOOR_0003))
|
||||
|| (obj->model->definition->skel == &g_SkelCctv && hit->unk44 == modelGetPart(obj->model->definition, MODELPART_CCTV_LENS))) {
|
||||
if ((obj->model->definition->skel == &g_SkelWindowedDoor && hit->dlnode == modelGetPart(obj->model->definition, MODELPART_WINDOWEDDOOR_0003))
|
||||
|| (obj->model->definition->skel == &g_SkelCctv && hit->dlnode == modelGetPart(obj->model->definition, MODELPART_CCTV_LENS))) {
|
||||
spcb = true;
|
||||
}
|
||||
|
||||
@@ -15819,7 +15819,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
spc4 = true;
|
||||
}
|
||||
|
||||
wallhitCreate(&hit->hitthing.unk00, &hit->hitthing.unk0c, &shotdata->gunpos, 0,
|
||||
wallhitCreate(&hit->hitthing.pos, &hit->hitthing.unk0c, &shotdata->gunpos3d, 0,
|
||||
0, textureindex, 1, hit->prop, hit->mtxindex, spcb, g_Vars.currentplayer->prop->chr, spc4);
|
||||
}
|
||||
}
|
||||
@@ -15834,7 +15834,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
} else if (obj->type == OBJTYPE_CCTV) {
|
||||
// Leftover from GE: shots to a CCTV's lens is a one hit kill
|
||||
if (obj->model->definition->skel == &g_SkelCctv) {
|
||||
if (modelGetPart(obj->model->definition, MODELPART_CCTV_LENS) == hit->unk44) {
|
||||
if (modelGetPart(obj->model->definition, MODELPART_CCTV_LENS) == hit->dlnode) {
|
||||
damage *= 100.0f;
|
||||
cctvHandleLensShot(obj);
|
||||
}
|
||||
@@ -15851,7 +15851,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
|
||||
objTakeGunfire(obj, damage, &sp110, shotdata->gset.weaponnum, g_Vars.currentplayernum);
|
||||
|
||||
if (obj->model->definition->skel == &g_SkelWindowedDoor && !hit->unk4c) {
|
||||
if (obj->model->definition->skel == &g_SkelWindowedDoor && !hit->slowsbullet) {
|
||||
struct doorobj *door = (struct doorobj *)obj;
|
||||
door->glasshits++;
|
||||
|
||||
@@ -15871,16 +15871,16 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
struct coord pushdir;
|
||||
Mtxf sp58;
|
||||
|
||||
spb0.x = shotdata->dir.x * 3.0f;
|
||||
spb0.y = shotdata->dir.y * 3.0f;
|
||||
spb0.z = shotdata->dir.z * 3.0f;
|
||||
spb0.x = shotdata->gundir3d.x * 3.0f;
|
||||
spb0.y = shotdata->gundir3d.y * 3.0f;
|
||||
spb0.z = shotdata->gundir3d.z * 3.0f;
|
||||
|
||||
mtx4MultMtx4(camGetProjectionMtxF(), &obj->model->matrices[hit->mtxindex], &sp58);
|
||||
mtx4TransformVec(&sp58, &hit->hitthing.unk00, &spa4);
|
||||
mtx4TransformVec(&sp58, &hit->hitthing.pos, &spa4);
|
||||
|
||||
pushdir.x = shotdata->dir.x;
|
||||
pushdir.y = shotdata->dir.y;
|
||||
pushdir.z = shotdata->dir.z;
|
||||
pushdir.x = shotdata->gundir3d.x;
|
||||
pushdir.y = shotdata->gundir3d.y;
|
||||
pushdir.z = shotdata->gundir3d.z;
|
||||
|
||||
func0f082e84(obj, &spa4, &pushdir, &spb0, true);
|
||||
} else {
|
||||
@@ -15905,7 +15905,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
}
|
||||
|
||||
if (bounce) {
|
||||
objBounce(obj, &shotdata->unk0c);
|
||||
objBounce(obj, &shotdata->gundir2d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ Vp var80070f10;
|
||||
|
||||
s32 var8009de90;
|
||||
s32 var8009de94;
|
||||
s32 var8009de98;
|
||||
s32 var8009de9c;
|
||||
s32 g_MenuProjectFromX;
|
||||
s32 g_MenuProjectFromY;
|
||||
|
||||
void func0f0d4690(Mtxf *mtx)
|
||||
{
|
||||
@@ -317,8 +317,8 @@ Gfx *menugfxDrawPlane(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, u32 colour1, u32
|
||||
vertices[1].y = y2;
|
||||
vertices[1].z = -10;
|
||||
|
||||
tmp1 = (f32) var8009de98 * a1 / scale;
|
||||
tmp2 = (f32) var8009de9c * a1 / scale;
|
||||
tmp1 = (f32) g_MenuProjectFromX * a1 / scale;
|
||||
tmp2 = (f32) g_MenuProjectFromY * a1 / scale;
|
||||
|
||||
vertices[2].x = vertices[0].v[0] + (s16) tmp1;
|
||||
vertices[2].y = vertices[0].v[1] + (s16) tmp2;
|
||||
|
||||
+50
-50
@@ -162,13 +162,13 @@ s32 splatsCreate(s32 qty, f32 arg1, struct prop *prop, struct shotdata *shotdata
|
||||
s32 j;
|
||||
|
||||
if (splattype == 0) {
|
||||
dist = coordsGetDistance(&shotdata->gunpos, arg5);
|
||||
dist = coordsGetDistance(&shotdata->gunpos3d, arg5);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
spfc.f[i] = shotdata->dir.f[i];
|
||||
spf0.f[i] = shotdata->unk0c.f[i];
|
||||
shotdata->gunpos.f[i] = arg5->f[i];
|
||||
shotdata->unk00.f[i] = arg4->f[i];
|
||||
spfc.f[i] = shotdata->gundir3d.f[i];
|
||||
spf0.f[i] = shotdata->gundir2d.f[i];
|
||||
shotdata->gunpos3d.f[i] = arg5->f[i];
|
||||
shotdata->gunpos2d.f[i] = arg4->f[i];
|
||||
}
|
||||
} else {
|
||||
f32 extraheight;
|
||||
@@ -181,21 +181,21 @@ s32 splatsCreate(s32 qty, f32 arg1, struct prop *prop, struct shotdata *shotdata
|
||||
|
||||
dist = 0.7f;
|
||||
|
||||
spfc.x = shotdata->dir.x = 0;
|
||||
spfc.y = shotdata->dir.y = -1;
|
||||
spfc.z = shotdata->dir.z = 0;
|
||||
spfc.x = shotdata->gundir3d.x = 0;
|
||||
spfc.y = shotdata->gundir3d.y = -1;
|
||||
spfc.z = shotdata->gundir3d.z = 0;
|
||||
|
||||
spf0.x = shotdata->unk0c.x = 0;
|
||||
spf0.y = shotdata->unk0c.y = -1;
|
||||
spf0.z = shotdata->unk0c.z = 0;
|
||||
spf0.x = shotdata->gundir2d.x = 0;
|
||||
spf0.y = shotdata->gundir2d.y = -1;
|
||||
spf0.z = shotdata->gundir2d.z = 0;
|
||||
|
||||
shotdata->gunpos.x = prop->pos.x;
|
||||
shotdata->gunpos.y = prop->pos.y + extraheight;
|
||||
shotdata->gunpos.z = prop->pos.z;
|
||||
shotdata->gunpos3d.x = prop->pos.x;
|
||||
shotdata->gunpos3d.y = prop->pos.y + extraheight;
|
||||
shotdata->gunpos3d.z = prop->pos.z;
|
||||
|
||||
shotdata->unk00.x = prop->pos.x;
|
||||
shotdata->unk00.y = prop->pos.y + extraheight;
|
||||
shotdata->unk00.z = prop->pos.z;
|
||||
shotdata->gunpos2d.x = prop->pos.x;
|
||||
shotdata->gunpos2d.y = prop->pos.y + extraheight;
|
||||
shotdata->gunpos2d.z = prop->pos.z;
|
||||
}
|
||||
|
||||
for (i = 0; i < qty; i++) {
|
||||
@@ -204,15 +204,15 @@ s32 splatsCreate(s32 qty, f32 arg1, struct prop *prop, struct shotdata *shotdata
|
||||
}
|
||||
|
||||
mtx4LoadRotation(&spe4, &spa4);
|
||||
mtx4RotateVec(&spa4, &spfc, &shotdata->dir);
|
||||
mtx4RotateVec(&spa4, &spf0, &shotdata->unk0c);
|
||||
mtx4RotateVec(&spa4, &spfc, &shotdata->gundir3d);
|
||||
mtx4RotateVec(&spa4, &spf0, &shotdata->gundir2d);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
func0f177164(&shotdata->dir, &shotdata->dir, 403, "splat.c");
|
||||
func0f177164(&shotdata->unk0c, &shotdata->unk0c, 404, "splat.c");
|
||||
func0f177164(&shotdata->gundir3d, &shotdata->gundir3d, 403, "splat.c");
|
||||
func0f177164(&shotdata->gundir2d, &shotdata->gundir2d, 404, "splat.c");
|
||||
#else
|
||||
func0f177164(&shotdata->dir, &shotdata->dir, 405, "splat.c");
|
||||
func0f177164(&shotdata->unk0c, &shotdata->unk0c, 406, "splat.c");
|
||||
func0f177164(&shotdata->gundir3d, &shotdata->gundir3d, 405, "splat.c");
|
||||
func0f177164(&shotdata->gundir2d, &shotdata->gundir2d, 406, "splat.c");
|
||||
#endif
|
||||
|
||||
if (splat0f149274(arg1, prop, shotdata, /*reused var*/ dist, isskedar, splattype, timermax, chr, timerspeed)) {
|
||||
@@ -262,33 +262,33 @@ bool splat0f149274(f32 arg0, struct prop *chrprop, struct shotdata *shotdata, f3
|
||||
struct shotdata stackshotdata;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
stackshotdata.unk00.f[i] = shotdata->unk00.f[i];
|
||||
stackshotdata.unk0c.f[i] = shotdata->unk0c.f[i];
|
||||
stackshotdata.gunpos.f[i] = shotdata->gunpos.f[i];
|
||||
stackshotdata.dir.f[i] = shotdata->dir.f[i];
|
||||
stackshotdata.gunpos2d.f[i] = shotdata->gunpos2d.f[i];
|
||||
stackshotdata.gundir2d.f[i] = shotdata->gundir2d.f[i];
|
||||
stackshotdata.gunpos3d.f[i] = shotdata->gunpos3d.f[i];
|
||||
stackshotdata.gundir3d.f[i] = shotdata->gundir3d.f[i];
|
||||
}
|
||||
|
||||
stackshotdata.penetration = 1;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
endpos.f[i] = stackshotdata.gunpos.f[i] + stackshotdata.dir.f[i] * g_SplatMaxDistance;
|
||||
endpos.f[i] = stackshotdata.gunpos3d.f[i] + stackshotdata.gundir3d.f[i] * g_SplatMaxDistance;
|
||||
}
|
||||
|
||||
portal00018148(&chrprop->pos, &stackshotdata.gunpos, chrprop->rooms, gunrooms, NULL, 0);
|
||||
portal00018148(&stackshotdata.gunpos, &endpos, gunrooms, endrooms, rooms, ARRAYCOUNT(rooms) - 1);
|
||||
portal00018148(&chrprop->pos, &stackshotdata.gunpos3d, chrprop->rooms, gunrooms, NULL, 0);
|
||||
portal00018148(&stackshotdata.gunpos3d, &endpos, gunrooms, endrooms, rooms, ARRAYCOUNT(rooms) - 1);
|
||||
|
||||
for (i = 0; rooms[i] != -1; i++) {
|
||||
if (bgTestHitInRoom(&stackshotdata.gunpos, &endpos, rooms[i], &hitthing)
|
||||
&& ((stackshotdata.gunpos.x <= endpos.x && hitthing.unk00.x <= endpos.x && stackshotdata.gunpos.x <= hitthing.unk00.x) || (endpos.x <= stackshotdata.gunpos.x && endpos.x <= hitthing.unk00.x && hitthing.unk00.x <= stackshotdata.gunpos.x))
|
||||
&& ((stackshotdata.gunpos.y <= endpos.y && hitthing.unk00.y <= endpos.y && stackshotdata.gunpos.y <= hitthing.unk00.y) || (endpos.y <= stackshotdata.gunpos.y && endpos.y <= hitthing.unk00.y && hitthing.unk00.y <= stackshotdata.gunpos.y))
|
||||
&& ((stackshotdata.gunpos.z <= endpos.z && hitthing.unk00.z <= endpos.z && stackshotdata.gunpos.z <= hitthing.unk00.z) || (endpos.z <= stackshotdata.gunpos.z && endpos.z <= hitthing.unk00.z && hitthing.unk00.z <= stackshotdata.gunpos.z))) {
|
||||
if (stackshotdata.gunpos.x != hitthing.unk00.x || stackshotdata.gunpos.y != hitthing.unk00.y || stackshotdata.gunpos.z != hitthing.unk00.z) {
|
||||
if (bgTestHitInRoom(&stackshotdata.gunpos3d, &endpos, rooms[i], &hitthing)
|
||||
&& ((stackshotdata.gunpos3d.x <= endpos.x && hitthing.pos.x <= endpos.x && stackshotdata.gunpos3d.x <= hitthing.pos.x) || (endpos.x <= stackshotdata.gunpos3d.x && endpos.x <= hitthing.pos.x && hitthing.pos.x <= stackshotdata.gunpos3d.x))
|
||||
&& ((stackshotdata.gunpos3d.y <= endpos.y && hitthing.pos.y <= endpos.y && stackshotdata.gunpos3d.y <= hitthing.pos.y) || (endpos.y <= stackshotdata.gunpos3d.y && endpos.y <= hitthing.pos.y && hitthing.pos.y <= stackshotdata.gunpos3d.y))
|
||||
&& ((stackshotdata.gunpos3d.z <= endpos.z && hitthing.pos.z <= endpos.z && stackshotdata.gunpos3d.z <= hitthing.pos.z) || (endpos.z <= stackshotdata.gunpos3d.z && endpos.z <= hitthing.pos.z && hitthing.pos.z <= stackshotdata.gunpos3d.z))) {
|
||||
if (stackshotdata.gunpos3d.x != hitthing.pos.x || stackshotdata.gunpos3d.y != hitthing.pos.y || stackshotdata.gunpos3d.z != hitthing.pos.z) {
|
||||
bestroom = rooms[i];
|
||||
besthitthing = hitthing;
|
||||
|
||||
endpos.x = hitthing.unk00.x;
|
||||
endpos.y = hitthing.unk00.y;
|
||||
endpos.z = hitthing.unk00.z;
|
||||
endpos.x = hitthing.pos.x;
|
||||
endpos.y = hitthing.pos.y;
|
||||
endpos.z = hitthing.pos.z;
|
||||
|
||||
hasresult = true;
|
||||
break;
|
||||
@@ -297,11 +297,11 @@ bool splat0f149274(f32 arg0, struct prop *chrprop, struct shotdata *shotdata, f3
|
||||
}
|
||||
|
||||
if (hasresult) {
|
||||
spraydistance = coordsGetDistance(&stackshotdata.gunpos, &besthitthing.unk00);
|
||||
spraydistance = coordsGetDistance(&stackshotdata.gunpos3d, &besthitthing.pos);
|
||||
|
||||
if (spraydistance < g_SplatMaxDistance) {
|
||||
sp50c = &hitthing.unk00;
|
||||
hitpos = &hitthing.unk00;
|
||||
sp50c = &hitthing.pos;
|
||||
hitpos = &hitthing.pos;
|
||||
sp504 = &hitthing.unk0c;
|
||||
objprop = NULL;
|
||||
mtxindex = 0;
|
||||
@@ -316,13 +316,13 @@ bool splat0f149274(f32 arg0, struct prop *chrprop, struct shotdata *shotdata, f3
|
||||
}
|
||||
|
||||
if (splattype == 0) {
|
||||
stackshotdata.unk34 = (spraydistance < g_SplatMaxDistance ? spraydistance : g_SplatMaxDistance);
|
||||
stackshotdata.unk34 += arg3;
|
||||
stackshotdata.distance = (spraydistance < g_SplatMaxDistance ? spraydistance : g_SplatMaxDistance);
|
||||
stackshotdata.distance += arg3;
|
||||
|
||||
for (i = 0; i < ARRAYCOUNT(stackshotdata.hits); i++) {
|
||||
stackshotdata.hits[i].prop = NULL;
|
||||
stackshotdata.hits[i].hitpart = 0;
|
||||
stackshotdata.hits[i].node = NULL;
|
||||
stackshotdata.hits[i].bboxnode = NULL;
|
||||
}
|
||||
|
||||
propptr = g_Vars.endonscreenprops - 1;
|
||||
@@ -332,7 +332,7 @@ bool splat0f149274(f32 arg0, struct prop *chrprop, struct shotdata *shotdata, f3
|
||||
|
||||
if (prop) {
|
||||
if (prop->type == PROPTYPE_OBJ || prop->type == PROPTYPE_DOOR || prop->type == PROPTYPE_WEAPON) {
|
||||
func0f085e00(prop, &stackshotdata);
|
||||
objTestHit(prop, &stackshotdata);
|
||||
if (1);
|
||||
}
|
||||
}
|
||||
@@ -346,7 +346,7 @@ bool splat0f149274(f32 arg0, struct prop *chrprop, struct shotdata *shotdata, f3
|
||||
if (hit->prop && (hit->hitthing.texturenum < 0
|
||||
|| hit->hitthing.texturenum >= NUM_TEXTURES
|
||||
|| g_SurfaceTypes[g_Textures[hit->hitthing.texturenum].surfacetype]->numwallhittexes != 0)) {
|
||||
sp50c = &hit->hitthing.unk00;
|
||||
sp50c = &hit->hitthing.pos;
|
||||
hitpos = &hit->pos;
|
||||
sp504 = &hit->hitthing.unk0c;
|
||||
objprop = hit->prop;
|
||||
@@ -366,7 +366,7 @@ bool splat0f149274(f32 arg0, struct prop *chrprop, struct shotdata *shotdata, f3
|
||||
for (i = 0; i < 3; i++) {
|
||||
splatdata.relpos.f[i] = sp50c->f[i];
|
||||
splatdata.unk0c.f[i] = hitpos->f[i];
|
||||
splatdata.gunpos.f[i] = stackshotdata.gunpos.f[i];
|
||||
splatdata.gunpos.f[i] = stackshotdata.gunpos3d.f[i];
|
||||
splatdata.unk18.f[i] = sp504->f[i];
|
||||
}
|
||||
|
||||
@@ -387,9 +387,9 @@ bool splat0f149274(f32 arg0, struct prop *chrprop, struct shotdata *shotdata, f3
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hitthing.unk00.x);
|
||||
if (hitthing.unk00.y);
|
||||
if (hitthing.unk00.z);
|
||||
if (hitthing.pos.x);
|
||||
if (hitthing.pos.y);
|
||||
if (hitthing.pos.z);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
+380
-339
File diff suppressed because it is too large.
Load diff
+99
-90
@@ -17,9 +17,9 @@ struct texpool g_TexSharedPool;
|
||||
struct texcacheitem g_TexCacheItems[150];
|
||||
s32 g_TexCacheCount;
|
||||
s32 g_TexNumToLoad;
|
||||
u8 *var800ab540;
|
||||
u32 var800ab544;
|
||||
s32 var800ab548;
|
||||
u8 *g_TexBitstring;
|
||||
u32 g_TexAccumValue;
|
||||
s32 g_TexAccumNumBits;
|
||||
u32 var800ab54c;
|
||||
u32 g_TexBase;
|
||||
u8 *g_TextureConfigSegment;
|
||||
@@ -141,7 +141,7 @@ void func0f16e810(u32 arg0)
|
||||
*
|
||||
* The zlib data is prefixed with the standard 5-byte rarezip header.
|
||||
*/
|
||||
s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpool *pool, s32 arg5)
|
||||
s32 texInflateZlib(u8 *src, u8 *dst, bool hasloddata, s32 numlods, struct texpool *pool, bool unusedarg)
|
||||
{
|
||||
s32 i;
|
||||
s32 imagebytesout;
|
||||
@@ -153,9 +153,9 @@ s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpoo
|
||||
s32 width;
|
||||
s32 height;
|
||||
s32 numcolours;
|
||||
u8 *end;
|
||||
u8 *start;
|
||||
s32 j;
|
||||
u8 *loddst;
|
||||
u8 *lodsrc;
|
||||
s32 lod;
|
||||
u8 scratch2[0x800];
|
||||
u16 palette[256];
|
||||
u8 scratch[5120];
|
||||
@@ -165,16 +165,16 @@ s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpoo
|
||||
|
||||
texSetBitstring(src);
|
||||
|
||||
if (arg2 && forcenumimages) {
|
||||
numimages = forcenumimages;
|
||||
if (hasloddata && numlods) {
|
||||
numimages = numlods;
|
||||
} else {
|
||||
numimages = 1;
|
||||
}
|
||||
|
||||
pool->rightpos->maxlod = forcenumimages;
|
||||
pool->rightpos->unk0c_02 = arg2;
|
||||
pool->rightpos->numlods = numlods;
|
||||
pool->rightpos->hasloddata = hasloddata;
|
||||
|
||||
if (arg2) {
|
||||
if (hasloddata) {
|
||||
writetocache = true;
|
||||
|
||||
for (i = 0; i < g_TexCacheCount; i++) {
|
||||
@@ -193,11 +193,11 @@ s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpoo
|
||||
|
||||
foundthething = false;
|
||||
|
||||
for (j = 0; j < numimages; j++) {
|
||||
for (lod = 0; lod < numimages; lod++) {
|
||||
width = texReadBits(8);
|
||||
height = texReadBits(8);
|
||||
|
||||
if (j == 0) {
|
||||
if (lod == 0) {
|
||||
pool->rightpos->width = width;
|
||||
pool->rightpos->height = height;
|
||||
pool->rightpos->unk0a = numcolours - 1;
|
||||
@@ -205,19 +205,19 @@ s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpoo
|
||||
pool->rightpos->depth = g_TexFormatDepths[format];
|
||||
pool->rightpos->lutmodeindex = g_TexFormatLutModes[format] >> G_MDSFT_TEXTLUT;
|
||||
} else if (writetocache) {
|
||||
g_TexCacheItems[g_TexCacheCount].widths[j - 1] = width;
|
||||
g_TexCacheItems[g_TexCacheCount].heights[j - 1] = height;
|
||||
g_TexCacheItems[g_TexCacheCount].widths[lod - 1] = width;
|
||||
g_TexCacheItems[g_TexCacheCount].heights[lod - 1] = height;
|
||||
}
|
||||
|
||||
if (rzipInflate(var800ab540, scratch2, scratch) == 0) {
|
||||
if (rzipInflate(g_TexBitstring, scratch2, scratch) == 0) {
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
char message[128];
|
||||
sprintf(message, "DMA-Crash %s %d Ram: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
|
||||
"texdecompress.c", 357,
|
||||
var800ab540[0], var800ab540[1], var800ab540[2], var800ab540[3],
|
||||
var800ab540[4], var800ab540[5], var800ab540[6], var800ab540[7],
|
||||
var800ab540[8], var800ab540[9], var800ab540[10], var800ab540[11],
|
||||
var800ab540[12], var800ab540[13], var800ab540[14], var800ab540[15]);
|
||||
g_TexBitstring[0], g_TexBitstring[1], g_TexBitstring[2], g_TexBitstring[3],
|
||||
g_TexBitstring[4], g_TexBitstring[5], g_TexBitstring[6], g_TexBitstring[7],
|
||||
g_TexBitstring[8], g_TexBitstring[9], g_TexBitstring[10], g_TexBitstring[11],
|
||||
g_TexBitstring[12], g_TexBitstring[13], g_TexBitstring[14], g_TexBitstring[15]);
|
||||
crashSetMessage(message);
|
||||
CRASH();
|
||||
#endif
|
||||
@@ -226,19 +226,19 @@ s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpoo
|
||||
imagebytesout = texAlignIndices(scratch2, width, height, format, &dst[totalbytesout]);
|
||||
texSetBitstring(rzipGetSomething());
|
||||
|
||||
if (arg2 == 1) {
|
||||
if (IS4MB() && j == 2 && !foundthething) {
|
||||
pool->rightpos->maxlod = j;
|
||||
if (hasloddata == true) {
|
||||
if (IS4MB() && lod == 2 && !foundthething) {
|
||||
pool->rightpos->numlods = lod;
|
||||
foundthething = true;
|
||||
}
|
||||
|
||||
if (totalbytesout + imagebytesout > 0x800 || foundthething) {
|
||||
if (!foundthething) {
|
||||
pool->rightpos->maxlod = j;
|
||||
pool->rightpos->numlods = lod;
|
||||
foundthething = true;
|
||||
}
|
||||
} else {
|
||||
texSwapAltRowBytes(&dst[totalbytesout], width, height, format);
|
||||
texSwizzle(&dst[totalbytesout], width, height, format);
|
||||
totalbytesout += imagebytesout;
|
||||
}
|
||||
} else {
|
||||
@@ -256,41 +256,43 @@ s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpoo
|
||||
}
|
||||
}
|
||||
|
||||
if (!arg2) {
|
||||
if (forcenumimages >= 2) {
|
||||
// If the texture data doesn't contain multiple LODs but the header has a numlods value,
|
||||
// generate the other LODs by shrinking the image.
|
||||
if (!hasloddata) {
|
||||
if (numlods >= 2) {
|
||||
s32 tmpwidth = width;
|
||||
s32 tmpheight = height;
|
||||
|
||||
start = dst;
|
||||
end = &dst[totalbytesout];
|
||||
lodsrc = dst;
|
||||
loddst = &dst[totalbytesout];
|
||||
|
||||
for (j = 1; j < forcenumimages; j++) {
|
||||
imagebytesout = texShrinkPaletted(start, end, tmpwidth, tmpheight, format, palette, numcolours);
|
||||
for (lod = 1; lod < numlods; lod++) {
|
||||
imagebytesout = texShrinkPaletted(lodsrc, loddst, tmpwidth, tmpheight, format, palette, numcolours);
|
||||
|
||||
if (IS4MB() && j == 2) {
|
||||
pool->rightpos->maxlod = j;
|
||||
if (IS4MB() && lod == 2) {
|
||||
pool->rightpos->numlods = lod;
|
||||
break;
|
||||
}
|
||||
|
||||
if (totalbytesout + imagebytesout > 0x800) {
|
||||
pool->rightpos->maxlod = j;
|
||||
pool->rightpos->numlods = lod;
|
||||
break;
|
||||
}
|
||||
|
||||
texSwapAltRowBytes(start, tmpwidth, tmpheight, format);
|
||||
texSwizzle(lodsrc, tmpwidth, tmpheight, format);
|
||||
|
||||
totalbytesout += imagebytesout;
|
||||
|
||||
tmpwidth = (tmpwidth + 1) >> 1;
|
||||
tmpheight = (tmpheight + 1) >> 1;
|
||||
|
||||
start = end;
|
||||
end += imagebytesout;
|
||||
lodsrc = loddst;
|
||||
loddst += imagebytesout;
|
||||
}
|
||||
|
||||
texSwapAltRowBytes(start, tmpwidth, tmpheight, format);
|
||||
texSwizzle(lodsrc, tmpwidth, tmpheight, format);
|
||||
} else {
|
||||
texSwapAltRowBytes(dst, width, height, format);
|
||||
texSwizzle(dst, width, height, format);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,7 +680,7 @@ s32 texFindClosestColourIndexIA(u16 *palette, s32 numcolours, s32 intensity, s32
|
||||
* h = height in pixels
|
||||
* c = compression method (see TEXCOMPMETHOD constants)
|
||||
*/
|
||||
s32 texInflateNonZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpool *pool, s32 arg5)
|
||||
s32 texInflateNonZlib(u8 *src, u8 *dst, bool hasloddata, s32 numlods, struct texpool *pool, bool unusedarg)
|
||||
{
|
||||
u8 scratch[0x2000];
|
||||
u8 lookup[0x1000];
|
||||
@@ -693,18 +695,18 @@ s32 texInflateNonZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct tex
|
||||
s32 imagebytesout;
|
||||
s32 format;
|
||||
s32 value;
|
||||
u8 *start;
|
||||
u8 *end;
|
||||
u8 *lodsrc;
|
||||
u8 *loddst;
|
||||
bool writetocache = false;
|
||||
|
||||
texSetBitstring(src);
|
||||
|
||||
numimages = arg2 && forcenumimages ? forcenumimages : 1;
|
||||
numimages = hasloddata && numlods ? numlods : 1;
|
||||
|
||||
pool->rightpos->maxlod = forcenumimages;
|
||||
pool->rightpos->unk0c_02 = arg2;
|
||||
pool->rightpos->numlods = numlods;
|
||||
pool->rightpos->hasloddata = hasloddata;
|
||||
|
||||
if (arg2) {
|
||||
if (hasloddata) {
|
||||
writetocache = true;
|
||||
|
||||
for (i = 0; i < g_TexCacheCount; i++) {
|
||||
@@ -807,17 +809,17 @@ s32 texInflateNonZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct tex
|
||||
break;
|
||||
}
|
||||
|
||||
if (arg2 == 1) {
|
||||
texSwapAltRowBytes(&dst[totalbytesout], width, height, format);
|
||||
if (hasloddata == true) {
|
||||
texSwizzle(&dst[totalbytesout], width, height, format);
|
||||
}
|
||||
|
||||
imagebytesout = (imagebytesout + 7) & ~7;
|
||||
totalbytesout += imagebytesout;
|
||||
|
||||
if (var800ab548 == 0) {
|
||||
var800ab540++;
|
||||
if (g_TexAccumNumBits == 0) {
|
||||
g_TexBitstring++;
|
||||
} else {
|
||||
var800ab548 = 0;
|
||||
g_TexAccumNumBits = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -838,32 +840,34 @@ s32 texInflateNonZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct tex
|
||||
}
|
||||
}
|
||||
|
||||
if (!arg2) {
|
||||
if (forcenumimages >= 2) {
|
||||
// If the texture data doesn't contain multiple LODs but the header has a numlods value,
|
||||
// generate the other LODs by shrinking the image.
|
||||
if (!hasloddata) {
|
||||
if (numlods >= 2) {
|
||||
s32 tmpwidth = width;
|
||||
s32 tmpheight = height;
|
||||
|
||||
start = dst;
|
||||
lodsrc = dst;
|
||||
if (1);
|
||||
end = &dst[totalbytesout];
|
||||
loddst = &dst[totalbytesout];
|
||||
|
||||
for (i = 1; i < forcenumimages; i++) {
|
||||
imagebytesout = texShrinkNonPaletted(start, end, tmpwidth, tmpheight, format);
|
||||
for (i = 1; i < numlods; i++) {
|
||||
imagebytesout = texShrinkNonPaletted(lodsrc, loddst, tmpwidth, tmpheight, format);
|
||||
|
||||
texSwapAltRowBytes(start, tmpwidth, tmpheight, format);
|
||||
texSwizzle(lodsrc, tmpwidth, tmpheight, format);
|
||||
|
||||
totalbytesout += imagebytesout;
|
||||
|
||||
tmpwidth = (tmpwidth + 1) >> 1;
|
||||
tmpheight = (tmpheight + 1) >> 1;
|
||||
|
||||
start = end;
|
||||
end += imagebytesout;
|
||||
lodsrc = loddst;
|
||||
loddst += imagebytesout;
|
||||
}
|
||||
|
||||
texSwapAltRowBytes(start, tmpwidth, tmpheight, format);
|
||||
texSwizzle(lodsrc, tmpwidth, tmpheight, format);
|
||||
} else {
|
||||
texSwapAltRowBytes(dst, width, height, format);
|
||||
texSwizzle(dst, width, height, format);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1902,13 +1906,10 @@ s32 texInflateLookupFromBuffer(u8 *src, s32 width, s32 height, u8 *dst, u8 *look
|
||||
}
|
||||
|
||||
/**
|
||||
* For every second row, swap the bytes within that row.
|
||||
*
|
||||
* For textures with 32-bit colour values (in GBI format), swap every pair
|
||||
* within each word. For all other textures, swap every byte within each pair.
|
||||
* For every second row, swap every pair of words within that row.
|
||||
*/
|
||||
#ifdef PLATFORM_N64
|
||||
void texSwapAltRowBytes(u8 *dst, s32 width, s32 height, s32 format)
|
||||
void texSwizzle(u8 *dst, s32 width, s32 height, s32 format)
|
||||
#else
|
||||
s32 texConfigToFormat(const struct textureconfig *tex)
|
||||
{
|
||||
@@ -1966,7 +1967,7 @@ s32 texConfigToFormat(const struct textureconfig *tex)
|
||||
return TEXFORMAT_I8;
|
||||
}
|
||||
|
||||
void texSwapAltRowBytes(u8 *dst, s32 width, s32 height, s32 format)
|
||||
void texSwizzle(u8 *dst, s32 width, s32 height, s32 format)
|
||||
{
|
||||
/**
|
||||
* The N64 GPU wants swizzled textures, we don't.
|
||||
@@ -1975,12 +1976,12 @@ void texSwapAltRowBytes(u8 *dst, s32 width, s32 height, s32 format)
|
||||
*/
|
||||
}
|
||||
|
||||
void texSwapAltRowBytesInternal(u8 *dst, s32 width, s32 height, s32 format, u32 dstlen)
|
||||
void texSwizzleInternal(u8 *dst, s32 width, s32 height, s32 format, u32 dstlen)
|
||||
#endif
|
||||
{
|
||||
s32 x;
|
||||
s32 y;
|
||||
s32 alignedwidth;
|
||||
s32 wordsperrow;
|
||||
u32 *row = (u32 *)dst;
|
||||
u32 *end = (u32 *)(dst + dstlen);
|
||||
s32 tmp;
|
||||
@@ -1988,32 +1989,36 @@ void texSwapAltRowBytesInternal(u8 *dst, s32 width, s32 height, s32 format, u32
|
||||
switch (format) {
|
||||
case TEXFORMAT_RGBA32:
|
||||
case TEXFORMAT_RGB24:
|
||||
alignedwidth = (width + 3) & 0xffc;
|
||||
wordsperrow = (width + 3) & 0xffc;
|
||||
break;
|
||||
case TEXFORMAT_RGBA16:
|
||||
case TEXFORMAT_RGB15:
|
||||
case TEXFORMAT_IA16:
|
||||
alignedwidth = ((width + 3) & 0xffc) >> 1;
|
||||
wordsperrow = ((width + 3) & 0xffc) >> 1;
|
||||
break;
|
||||
case TEXFORMAT_IA8:
|
||||
case TEXFORMAT_I8:
|
||||
case TEXFORMAT_RGBA16_CI8:
|
||||
case TEXFORMAT_IA16_CI8:
|
||||
alignedwidth = ((width + 7) & 0xff8) >> 2;
|
||||
wordsperrow = ((width + 7) & 0xff8) >> 2;
|
||||
break;
|
||||
case TEXFORMAT_IA4:
|
||||
case TEXFORMAT_I4:
|
||||
case TEXFORMAT_RGBA16_CI4:
|
||||
case TEXFORMAT_IA16_CI4:
|
||||
alignedwidth = ((width + 0xf) & 0xff0) >> 3;
|
||||
wordsperrow = ((width + 0xf) & 0xff0) >> 3;
|
||||
break;
|
||||
}
|
||||
|
||||
row += alignedwidth;
|
||||
row += wordsperrow;
|
||||
|
||||
if (format == TEXFORMAT_RGBA32 || format == TEXFORMAT_RGB24) {
|
||||
for (y = 1; y < height; y += 2) {
|
||||
for (x = 0; x < alignedwidth && row + x < end; x += 4) {
|
||||
#ifdef PLATFORM_N64
|
||||
for (x = 0; x < wordsperrow; x += 4) {
|
||||
#else
|
||||
for (x = 0; x < wordsperrow && row + x < end; x += 4) {
|
||||
#endif
|
||||
tmp = row[x + 0];
|
||||
row[x + 0] = row[x + 2];
|
||||
row[x + 2] = tmp;
|
||||
@@ -2023,17 +2028,21 @@ void texSwapAltRowBytesInternal(u8 *dst, s32 width, s32 height, s32 format, u32
|
||||
row[x + 3] = tmp;
|
||||
}
|
||||
|
||||
row += alignedwidth * 2;
|
||||
row += wordsperrow * 2;
|
||||
}
|
||||
} else {
|
||||
for (y = 1; y < height; y += 2) {
|
||||
for (x = 0; x < alignedwidth && row + x < end; x += 2) {
|
||||
#ifdef PLATFORM_N64
|
||||
for (x = 0; x < wordsperrow; x += 2) {
|
||||
#else
|
||||
for (x = 0; x < wordsperrow && row + x < end; x += 2) {
|
||||
#endif
|
||||
tmp = row[x + 0];
|
||||
row[x + 0] = row[x + 1];
|
||||
row[x + 1] = tmp;
|
||||
}
|
||||
|
||||
row += alignedwidth * 2;
|
||||
row += wordsperrow * 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2150,7 +2159,7 @@ void texLoadFromDisplayList(Gfx *gdl, struct texpool *pool, s32 arg2)
|
||||
texLoad((texnum_t *)((uintptr_t)bytes + 4), pool, arg2);
|
||||
}
|
||||
|
||||
bytes += 8;
|
||||
bytes += sizeof(Gfx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2191,13 +2200,13 @@ extern u8 EXT_SEG _texturesdataSegmentRomStart;
|
||||
* z = texture is compressed with zlib
|
||||
* l = number of levels of detail within the texture
|
||||
*/
|
||||
void texLoad(texnum_t *updateword, struct texpool *pool, bool arg2)
|
||||
void texLoad(texnum_t *updateword, struct texpool *pool, bool unusedarg)
|
||||
{
|
||||
u8 compbuffer[4 * 1024 + 0x40];
|
||||
u8 *compptr;
|
||||
s32 sp14a8;
|
||||
s32 hasloddata;
|
||||
s32 iszlib;
|
||||
s32 lod;
|
||||
s32 numlods;
|
||||
struct tex *tex;
|
||||
u8 *alignedcompbuffer;
|
||||
u32 stack;
|
||||
@@ -2254,12 +2263,12 @@ void texLoad(texnum_t *updateword, struct texpool *pool, bool arg2)
|
||||
|
||||
compptr = (u8 *) alignedcompbuffer + (thisoffset & 7);
|
||||
thisoffset = 0;
|
||||
sp14a8 = (*compptr & 0x80) >> 7;
|
||||
hasloddata = (*compptr & 0x80) >> 7;
|
||||
iszlib = (*compptr & 0x40) >> 6;
|
||||
lod = *compptr & 0x3f;
|
||||
numlods = *compptr & 0x3f;
|
||||
|
||||
if (lod > 5) {
|
||||
lod = 5;
|
||||
if (numlods > 5) {
|
||||
numlods = 5;
|
||||
}
|
||||
|
||||
compptr++;
|
||||
@@ -2311,9 +2320,9 @@ void texLoad(texnum_t *updateword, struct texpool *pool, bool arg2)
|
||||
|
||||
// Extract the texture data to the allocation (pool->leftpos)
|
||||
if (iszlib) {
|
||||
bytesout = texInflateZlib(compptr, pool->leftpos, sp14a8, lod, pool, arg2);
|
||||
bytesout = texInflateZlib(compptr, pool->leftpos, hasloddata, numlods, pool, unusedarg);
|
||||
} else {
|
||||
bytesout = texInflateNonZlib(compptr, pool->leftpos, sp14a8, lod, pool, arg2);
|
||||
bytesout = texInflateNonZlib(compptr, pool->leftpos, hasloddata, numlods, pool, unusedarg);
|
||||
}
|
||||
|
||||
// If we're using the shared pool, the data must be copied out of
|
||||
|
||||
+11
-11
@@ -14,24 +14,24 @@
|
||||
#include "video.h"
|
||||
#endif
|
||||
|
||||
void texSetBitstring(u8 *arg0)
|
||||
void texSetBitstring(u8 *bitstring)
|
||||
{
|
||||
var800ab540 = arg0;
|
||||
var800ab544 = 0;
|
||||
var800ab548 = 0;
|
||||
g_TexBitstring = bitstring;
|
||||
g_TexAccumValue = 0;
|
||||
g_TexAccumNumBits = 0;
|
||||
}
|
||||
|
||||
s32 texReadBits(s32 arg0)
|
||||
s32 texReadBits(s32 wantnumbits)
|
||||
{
|
||||
while (var800ab548 < arg0) {
|
||||
var800ab544 = *var800ab540 | var800ab544 << 8;
|
||||
var800ab540++;
|
||||
var800ab548 += 8;
|
||||
while (g_TexAccumNumBits < wantnumbits) {
|
||||
g_TexAccumValue = g_TexAccumValue << 8 | *g_TexBitstring;
|
||||
g_TexBitstring++;
|
||||
g_TexAccumNumBits += 8;
|
||||
}
|
||||
|
||||
var800ab548 -= arg0;
|
||||
g_TexAccumNumBits -= wantnumbits;
|
||||
|
||||
return var800ab544 >> var800ab548 & ((1 << arg0) - 1);
|
||||
return (g_TexAccumValue >> g_TexAccumNumBits) & ((1 << wantnumbits) - 1);
|
||||
}
|
||||
|
||||
extern u8 *g_TextureConfigSegment;
|
||||
|
||||
@@ -448,8 +448,8 @@ void texSelect(Gfx **gdlptr, struct textureconfig *tconfig, u32 arg2, s32 arg3,
|
||||
depth = tconfig->depth;
|
||||
}
|
||||
|
||||
if (tex && tex->unk0c_02) {
|
||||
tex0f173e50(tex, &depth2, &lrs);
|
||||
if (tex && tex->hasloddata) {
|
||||
texGetDepthAndSize(tex, &depth2, &lrs);
|
||||
} else {
|
||||
switch (depth) {
|
||||
case G_IM_SIZ_32b:
|
||||
@@ -541,7 +541,7 @@ void texSelect(Gfx **gdlptr, struct textureconfig *tconfig, u32 arg2, s32 arg3,
|
||||
s32 line;
|
||||
|
||||
if (tile > 0) {
|
||||
if (tex && tex->unk0c_02) {
|
||||
if (tex && tex->hasloddata) {
|
||||
width = texGetWidthAtLod(tex, tile);
|
||||
height = texGetHeightAtLod(tex, tile);
|
||||
} else {
|
||||
|
||||
+77
-93
@@ -229,11 +229,9 @@ MenuDialogHandlerResult frTrainingInfoMenuDialog(s32 operation, struct menudialo
|
||||
break;
|
||||
case MENUOP_TICK:
|
||||
if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 -= g_Vars.diffframe60;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk528 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk550 = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 -= g_Vars.diffframe60;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = g_Menus[g_MpPlayerNum].menumodel.newroty = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].menumodel.currotz = g_Menus[g_MpPlayerNum].menumodel.newrotz = 0;
|
||||
}
|
||||
break;
|
||||
case MENUOP_CLOSE:
|
||||
@@ -1538,14 +1536,14 @@ MenuDialogHandlerResult ciCharacterProfileMenuDialog(s32 operation, struct menud
|
||||
case MENUOP_OPEN:
|
||||
if (bodynum == BODY_DRCAROLL) {
|
||||
scale = 0.7f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk554 = -1;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoom = -1;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk554 = 30;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoom = 30;
|
||||
scale = 1.0f;
|
||||
}
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk580 = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].menumodel.removingpiece = false;
|
||||
|
||||
#if VERSION == VERSION_PAL_FINAL
|
||||
if (g_ViRes != VIRES_HI) {
|
||||
@@ -1585,14 +1583,15 @@ MenuDialogHandlerResult ciCharacterProfileMenuDialog(s32 operation, struct menud
|
||||
scale = 0.8f;
|
||||
}
|
||||
|
||||
func0f0f372c(&g_Menus[g_MpPlayerNum].unk840, x, y, 0, 0, 0, 0, scale, 7);
|
||||
menuConfigureModel(&g_Menus[g_MpPlayerNum].menumodel, x, y, 0, 0, 0, 0, scale,
|
||||
MENUMODELFLAG_HASSCALE | MENUMODELFLAG_HASPOSITION | MENUMODELFLAG_HASROTATION);
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 8.2f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk514 = -4.1f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk51c = 0.00393f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 8.2f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposy = -4.1f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curscale = 0.00393f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.rottimer60 = TICKS(60);
|
||||
break;
|
||||
case MENUOP_CLOSE:
|
||||
break;
|
||||
@@ -1612,10 +1611,10 @@ MenuDialogHandlerResult ciCharacterProfileMenuDialog(s32 operation, struct menud
|
||||
{ 255 },
|
||||
};
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.partvisibility = vis;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk05c = 318;
|
||||
g_Menus[g_MpPlayerNum].menumodel.partvisibility = vis;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newanimnum = ANIM_013E;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk05c = 106;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newanimnum = ANIM_006A;
|
||||
}
|
||||
|
||||
if (bodynum == BODY_THEKING) {
|
||||
@@ -1624,23 +1623,21 @@ MenuDialogHandlerResult ciCharacterProfileMenuDialog(s32 operation, struct menud
|
||||
{ 255 },
|
||||
};
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.partvisibility = vis;
|
||||
g_Menus[g_MpPlayerNum].menumodel.partvisibility = vis;
|
||||
}
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = 0xffff;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c |= (mpheadnum << 16);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c |= (mpbodynum << 24);
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = MENUMODELPARAMS_SET_MP_HEADBODY(mpheadnum, mpbodynum);
|
||||
|
||||
if (g_Menus[g_MpPlayerNum].unk840.unk578 > 0) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 -= g_Vars.diffframe60;
|
||||
if (g_Menus[g_MpPlayerNum].menumodel.rottimer60 > 0) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.rottimer60 -= g_Vars.diffframe60;
|
||||
} else {
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
f32 tmp = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60freal;
|
||||
f32 roty = g_Menus[g_MpPlayerNum].menumodel.curroty + 0.01f * g_Vars.diffframe60freal;
|
||||
#else
|
||||
f32 tmp = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60f;
|
||||
f32 roty = g_Menus[g_MpPlayerNum].menumodel.curroty + 0.01f * g_Vars.diffframe60f;
|
||||
#endif
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = tmp;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = tmp;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = roty;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = roty;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1887,58 +1884,54 @@ MenuDialogHandlerResult dtTrainingDetailsMenuDialog(s32 operation, struct menudi
|
||||
#if VERSION == VERSION_PAL_FINAL
|
||||
if (g_ViRes == VIRES_HI) {
|
||||
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 84;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 84;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 84;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 84;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 104;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 104;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 104;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 104;
|
||||
}
|
||||
} else {
|
||||
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 64;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 64;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 64;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 64;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 84;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 84;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 84;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 84;
|
||||
}
|
||||
}
|
||||
#elif VERSION == VERSION_PAL_BETA
|
||||
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 64;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 64;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 64;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 64;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 84;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 84;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 84;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 84;
|
||||
}
|
||||
#else
|
||||
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 70;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 70;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 70;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 70;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 90;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 90;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 90;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 90;
|
||||
}
|
||||
#endif
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk544 /= 2.5f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newscale /= 2.5f;
|
||||
}
|
||||
break;
|
||||
case MENUOP_CLOSE:
|
||||
break;
|
||||
case MENUOP_TICK:
|
||||
if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) {
|
||||
s32 weaponnum = dtGetWeaponByDeviceIndex(dtGetIndexBySlot(g_DtSlot));
|
||||
|
||||
if (weaponnum == WEAPON_DISGUISE41) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk05c = ANIM_006A;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
if (dtGetWeaponByDeviceIndex(dtGetIndexBySlot(g_DtSlot)) == WEAPON_DISGUISE41) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newanimnum = ANIM_006A;
|
||||
g_Menus[g_MpPlayerNum].menumodel.rottimer60 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].menumodel.zoomtimer60 = TICKS(120);
|
||||
}
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk550 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk528 = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = g_Menus[g_MpPlayerNum].menumodel.newroty = 18.849555969238f * g_20SecIntervalFrac;
|
||||
g_Menus[g_MpPlayerNum].menumodel.currotz = g_Menus[g_MpPlayerNum].menumodel.newrotz = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2651,15 +2644,11 @@ MenuDialogHandlerResult ciHangarHolographMenuDialog(s32 operation, struct menudi
|
||||
|
||||
switch (operation) {
|
||||
case MENUOP_OPEN:
|
||||
g_Menus[g_MpPlayerNum].unk840.unk548 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk520 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk53c = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk514 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk51c = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.currotx = g_Menus[g_MpPlayerNum].menumodel.newrotx = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = g_Menus[g_MpPlayerNum].menumodel.newroty = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = g_Menus[g_MpPlayerNum].menumodel.newposx = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposy = g_Menus[g_MpPlayerNum].menumodel.newposy = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curscale = 0;
|
||||
break;
|
||||
case MENUOP_CLOSE:
|
||||
break;
|
||||
@@ -2675,29 +2664,24 @@ MenuDialogHandlerResult ciHangarHolographMenuDialog(s32 operation, struct menudi
|
||||
offset = items[index].y_offset;
|
||||
size = items[index].size * 0.001f;
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk544 = size;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk514 = offset;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk53c = offset;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newscale = size;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposy = offset;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposy = offset;
|
||||
|
||||
if (g_Menus[g_MpPlayerNum].unk840.unk00c != items[index].fileid) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk000 = 8;
|
||||
if (g_Menus[g_MpPlayerNum].menumodel.newparams != items[index].fileid) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.loaddelay = 8;
|
||||
}
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = items[index].fileid;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60freal;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 += 0.01f * g_Vars.diffframe60freal;
|
||||
g_Menus[g_MpPlayerNum].unk840.partvisibility = g_BioPartVisibility;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = MENUMODELPARAMS_SET_FILENUM(items[index].fileid);
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = g_Menus[g_MpPlayerNum].menumodel.curroty + 0.01f * g_Vars.diffframe60freal;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty += 0.01f * g_Vars.diffframe60freal;
|
||||
g_Menus[g_MpPlayerNum].menumodel.partvisibility = g_BioPartVisibility;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk548 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk520 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk538 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk510 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk53c = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk514 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk544 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk51c = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.currotx = g_Menus[g_MpPlayerNum].menumodel.newrotx = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty = g_Menus[g_MpPlayerNum].menumodel.newroty = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = g_Menus[g_MpPlayerNum].menumodel.newposx = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposy = g_Menus[g_MpPlayerNum].menumodel.newposy = 0;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curscale = g_Menus[g_MpPlayerNum].menumodel.newscale = 0;
|
||||
}
|
||||
#else
|
||||
if (g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) {
|
||||
@@ -2709,18 +2693,18 @@ MenuDialogHandlerResult ciHangarHolographMenuDialog(s32 operation, struct menudi
|
||||
offset = items[index].y_offset;
|
||||
size = items[index].size * 0.001f;
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk544 = size;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk514 = offset;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk53c = offset;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = items[index].fileid;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newscale = size;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposy = offset;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposy = offset;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newparams = MENUMODELPARAMS_SET_FILENUM(items[index].fileid);
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60freal;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 += 0.01f * g_Vars.diffframe60freal;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = g_Menus[g_MpPlayerNum].menumodel.curroty + 0.01f * g_Vars.diffframe60freal;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty += 0.01f * g_Vars.diffframe60freal;
|
||||
#else
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = g_Menus[g_MpPlayerNum].unk840.unk524 + 0.01f * g_Vars.diffframe60f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 += 0.01f * g_Vars.diffframe60f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.newroty = g_Menus[g_MpPlayerNum].menumodel.curroty + 0.01f * g_Vars.diffframe60f;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curroty += 0.01f * g_Vars.diffframe60f;
|
||||
#endif
|
||||
g_Menus[g_MpPlayerNum].unk840.partvisibility = g_BioPartVisibility;
|
||||
g_Menus[g_MpPlayerNum].menumodel.partvisibility = g_BioPartVisibility;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+5
-5
@@ -167,8 +167,8 @@ extern s16 g_SpawnPoints[];
|
||||
extern s32 g_NumSpawnPoints;
|
||||
extern s32 var8009de90;
|
||||
extern s32 var8009de94;
|
||||
extern s32 var8009de98;
|
||||
extern s32 var8009de9c;
|
||||
extern s32 g_MenuProjectFromX;
|
||||
extern s32 g_MenuProjectFromY;
|
||||
extern u8 g_MpSelectedPlayersForStats[MAX_PLAYERS];
|
||||
extern char g_CheatMarqueeString[];
|
||||
extern u8 *g_BlurBuffer;
|
||||
@@ -257,9 +257,9 @@ extern struct texture *g_Textures;
|
||||
extern struct texpool g_TexSharedPool;
|
||||
extern struct texcacheitem g_TexCacheItems[150];
|
||||
extern s32 g_TexCacheCount;
|
||||
extern u8 *var800ab540;
|
||||
extern u32 var800ab544;
|
||||
extern s32 var800ab548;
|
||||
extern u8 *g_TexBitstring;
|
||||
extern u32 g_TexAccumValue;
|
||||
extern s32 g_TexAccumNumBits;
|
||||
extern s32 g_TexNumConfigs;
|
||||
extern struct tex **g_TexWords;
|
||||
extern struct textureconfig *g_TexWallhitConfigs;
|
||||
|
||||
@@ -947,6 +947,9 @@
|
||||
#define FILETYPE_MPPLAYER 2
|
||||
#define FILETYPE_CAMERA 3
|
||||
|
||||
#define FINDPROPCONTEXT_QUERY 0
|
||||
#define FINDPROPCONTEXT_SHOOT 2
|
||||
|
||||
#define FLOORTYPE_DEFAULT 0
|
||||
#define FLOORTYPE_WOOD 1
|
||||
#define FLOORTYPE_STONE 2
|
||||
@@ -1683,6 +1686,25 @@
|
||||
#define MENUITEMTYPE_CONTROLLER 0x19
|
||||
#define MENUITEMTYPE_END 0x1a
|
||||
|
||||
#define MENUMODELFLAG_HASSCALE 0x01
|
||||
#define MENUMODELFLAG_HASPOSITION 0x02
|
||||
#define MENUMODELFLAG_HASROTATION 0x04
|
||||
|
||||
#define MENUMODELPARAMS_HAS_MASTER_HEADBODY(params) (((params) & 0x80000000) != 0)
|
||||
#define MENUMODELPARAMS_GET_MASTER_HEADNUM(params) ((params) & 0x3ff)
|
||||
#define MENUMODELPARAMS_GET_MASTER_BODYNUM(params) (((params) & 0xffc00) >> 10)
|
||||
#define MENUMODELPARAMS_GET_MP_HEADNUM(params) (((params) >> 16) & 0xff)
|
||||
#define MENUMODELPARAMS_GET_MP_BODYNUM(params) (((params) >> 24) & 0xff)
|
||||
#define MENUMODELPARAMS_GET_FILENUM(params) ((params) & 0xffff)
|
||||
#define MENUMODELPARAMS_SET_FILENUM(filenum) (filenum)
|
||||
#define MENUMODELPARAMS_SET_MP_HEADBODY(mpheadnum, mpbodynum) (0xffff | ((mpheadnum) << 16) | ((mpbodynum) << 24))
|
||||
|
||||
#define MENUMODELTYPE_DEFAULT 0
|
||||
#define MENUMODELTYPE_HUDPIECE 1
|
||||
#define MENUMODELTYPE_2 2
|
||||
#define MENUMODELTYPE_3 3
|
||||
#define MENUMODELTYPE_CREDITSLOGO 4
|
||||
|
||||
#define MENUOP_GETOPTIONCOUNT 1
|
||||
#define MENUOP_GETOPTGROUPCOUNT 2
|
||||
#define MENUOP_GETOPTIONTEXT 3
|
||||
|
||||
@@ -9,7 +9,7 @@ void camSetScreenPosition(f32 left, f32 top);
|
||||
void camSetPerspective(f32 near, f32 fovy, f32 aspect);
|
||||
f32 cam0f0b49b8(f32 arg0);
|
||||
void camSetScale(void);
|
||||
void cam0f0b4c3c(f32 *crosspos, struct coord *dst, f32 arg2);
|
||||
void cam0f0b4c3c(f32 pos2d[2], struct coord *dir2d, f32 arg2);
|
||||
void cam0f0b4d04(struct coord *in, f32 *out);
|
||||
void cam0f0b4d68(struct coord *in, f32 out[2]);
|
||||
void cam0f0b4dec(struct coord *in, f32 out[2]);
|
||||
|
||||
@@ -45,8 +45,8 @@ void chrEmitSparks(struct chrdata *chr, struct prop *prop, s32 hitpart, struct c
|
||||
void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struct coord *arg3);
|
||||
void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct coord *arg3);
|
||||
void chrDisfigure(struct chrdata *chr, struct coord *exppos, f32 damageradius);
|
||||
f32 chr0f0278a4(struct chrdata *chr);
|
||||
void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool arg3);
|
||||
f32 chrGetHitRadius(struct chrdata *chr);
|
||||
void chrTestHit(struct prop *prop, struct shotdata *shotdata, bool isshooting, bool cheap);
|
||||
void chrHit(struct shotdata *shotdata, struct hit *hit);
|
||||
void chr0f028498(bool value);
|
||||
void chrsCheckForNoise(f32 noiseradius);
|
||||
|
||||
@@ -28,7 +28,7 @@ char *endscreenMenuTextCurrentStageName3(struct menuitem *item);
|
||||
char *endscreenMenuTitleStageFailed(struct menuitem *item);
|
||||
char *endscreenMenuTextMissionTime(struct menuitem *item);
|
||||
struct menudialogdef *endscreenAdvance(void);
|
||||
void endscreen0f10d770(void);
|
||||
void endscreenResetModels(void);
|
||||
void endscreenContinue(s32 context);
|
||||
char *endscreenMenuTextTimedCheatName(struct menuitem *item);
|
||||
char *endscreenMenuTextCompletionCheatName(struct menuitem *item);
|
||||
|
||||
@@ -60,9 +60,9 @@ void menuCloseDialog(void);
|
||||
void menuUpdateCurFrame(void);
|
||||
void menuPopDialog(void);
|
||||
void func0f0f3704(struct menudialogdef *dialogdef);
|
||||
void func0f0f372c(struct menu840 *arg0, f32 x, f32 y, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, u8 flags);
|
||||
void func0f0f37a4(struct menu840 *arg0);
|
||||
Gfx *menuRenderModels(Gfx *gdl, struct menu840 *arg1, s32 arg2);
|
||||
void menuConfigureModel(struct menumodel *menumodel, f32 x, f32 y, f32 z, f32 rotx, f32 roty, f32 rotz, f32 scale, u8 flags);
|
||||
void menuUnsetModel(struct menumodel *menumodel);
|
||||
Gfx *menuRenderModel(Gfx *gdl, struct menumodel *menumodel, s32 modeltype);
|
||||
void menuGetTeamTitlebarColours(u32 *top, u32 *middle, u32 *bottom);
|
||||
Gfx *menuApplyScissor(Gfx *gdl);
|
||||
Gfx *dialogRender(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool lightweight);
|
||||
@@ -85,7 +85,7 @@ void menuPushRootDialog(struct menudialogdef *dialogdef, s32 arg1);
|
||||
void func0f0f85e0(struct menudialogdef *dialogdef, s32 root);
|
||||
Gfx *menuRenderDialog(Gfx *gdl, struct menudialog *dialog, struct menu *menu, bool lightweight);
|
||||
Gfx *menuRenderDialogs(Gfx *gdl);
|
||||
void func0f0f8bb4(struct menu840 *arg0, u32 arg1, u32 arg2);
|
||||
void menuResetModel(struct menumodel *menumodel, u32 allocationlen, bool allocate);
|
||||
void menuReset(void);
|
||||
void menuSwipe(s32 direction);
|
||||
void dialogTick(struct menudialog *dialog, struct menuinputs *inputs, u32 tickflags);
|
||||
|
||||
@@ -9,7 +9,7 @@ s16 mpChooseRandomStage(void);
|
||||
MenuItemHandlerResult mpArenaMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||
char *mpMenuTextWeaponNameForSlot(struct menuitem *item);
|
||||
char *mpMenuTextSetupName(struct menuitem *item);
|
||||
MenuItemHandlerResult mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, s32 mpbodynum, bool isplayer);
|
||||
MenuItemHandlerResult mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpbodynum, s32 mpheadnum, bool isplayer);
|
||||
MenuDialogHandlerResult menudialog0017a174(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
|
||||
MenuItemHandlerResult mpChallengesListHandler(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||
char *mpMenuTextKills(struct menuitem *item);
|
||||
|
||||
@@ -24,10 +24,10 @@ Gfx *propRender(Gfx *gdl, struct prop *prop, bool xlupass);
|
||||
Gfx *propsRender(Gfx *gdl, RoomNum renderroomnum, s32 renderpass, RoomNum *roomnumsbyprop);
|
||||
void weaponPlayWhooshSound(s32 weaponnum, struct prop *prop);
|
||||
void func0f060bac(s32 weaponnum, struct prop *prop);
|
||||
struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struct coord *arg3, struct coord *gunpos, struct coord *dir, u32 arg6, f32 arg7, bool arg8);
|
||||
struct prop *func0f061d54(s32 handnum, u32 arg1, u32 arg2);
|
||||
void shotCreate(s32 handnum, bool arg1, bool dorandom, s32 arg3, bool arg4);
|
||||
void func0f061fa8(struct shotdata *shotdata, struct prop *prop, f32 arg2, s32 hitpart, struct modelnode *node, struct hitthing *hitthing, s32 arg6, struct modelnode *arg7, struct model *model, bool arg9, s32 arg10, struct coord *arg11, struct coord *arg12);
|
||||
struct prop *shotCalculateHits(s32 handnum, bool isshooting, struct coord *gunpos2d, struct coord *gundir2d, struct coord *gunpos3d, struct coord *gundir3d, u32 arg6, f32 distance, bool arg8);
|
||||
struct prop *propFindAimingAt(s32 handnum, bool isshooting, u32 context);
|
||||
void shotCreate(s32 handnum, bool arg1, bool dorandom, s32 numshots, bool arg4);
|
||||
void hitCreate(struct shotdata *shotdata, struct prop *prop, f32 hitdistance, s32 hitpart, struct modelnode *bboxnode, struct hitthing *hitthing, s32 arg6, struct modelnode *dlnode, struct model *model, bool slowsbullet, bool bulletproof, struct coord *arg11, struct coord *arg12);
|
||||
void handInflictMeleeDamage(s32 handnum, struct gset *gset, bool arg2);
|
||||
void handTickAttack(s32 handnum);
|
||||
void handsTickAttack(void);
|
||||
|
||||
@@ -211,7 +211,7 @@ Gfx *objRenderShadow(struct defaultobj *obj, Gfx *gdl);
|
||||
Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass);
|
||||
bool modelIsNodeNotTvscreen(struct modeldef *modeldef, struct modelnode *node);
|
||||
void objDeform(struct defaultobj *obj, s32 level);
|
||||
void objBounce(struct defaultobj *obj, struct coord *arg1);
|
||||
void objBounce(struct defaultobj *obj, struct coord *gundir2d);
|
||||
void objSetDropped(struct prop *prop, u32 droptype);
|
||||
void objApplyMomentum(struct defaultobj *obj, struct coord *speed, f32 rotation, bool addspeed, bool addrotation);
|
||||
void piracyRestore(void);
|
||||
@@ -233,7 +233,7 @@ bool objIsMortal(struct defaultobj *obj);
|
||||
void objTakeGunfire(struct defaultobj *obj, f32 damage, struct coord *pos, s32 weaponnum, s32 playernum);
|
||||
void objDamage(struct defaultobj *obj, f32 damage, struct coord *pos, s32 weaponnum, s32 playernum);
|
||||
void func0f0859a0(struct prop *prop, struct shotdata *shotdata);
|
||||
void func0f085e00(struct prop *prop, struct shotdata *shotdata);
|
||||
void objTestHit(struct prop *prop, struct shotdata *shotdata);
|
||||
void objHit(struct shotdata *shotdata, struct hit *hit);
|
||||
u32 propobjGetCiTagId(struct prop *prop);
|
||||
bool objIsHealthy(struct defaultobj *obj);
|
||||
|
||||
+2
-19
@@ -21,29 +21,12 @@ void texSetRenderMode(Gfx **gdlptr, s32 arg1, s32 numcycles, s32 arg3);
|
||||
void texLoadFromConfig(struct textureconfig *config);
|
||||
void texSelect(Gfx **gdl, struct textureconfig *tconfig, u32 arg2, s32 arg3, u32 ulst, bool arg5, struct texpool *pool);
|
||||
|
||||
void tex0f173a08(void);
|
||||
bool texSetLutMode(u32 value);
|
||||
bool tex0f173a70(s32 index, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 shifts, s32 shiftt);
|
||||
bool tex0f173b8c(s32 index, s32 uls, s32 ult, s32 lrs, s32 lrt);
|
||||
s32 texGetWidthAtLod(struct tex *tex, s32 lod);
|
||||
s32 texGetHeightAtLod(struct tex *tex, s32 lod);
|
||||
s32 texGetLineSizeInBytes(struct tex *tex, s32 lod);
|
||||
s32 texGetSizeInBytes(struct tex *tex, s32 lod);
|
||||
void tex0f173e50(struct tex *tex, s32 *arg1, s32 *arg2);
|
||||
s32 tex0f173f18(s32 arg0);
|
||||
s32 tex0f173f48(s32 arg0);
|
||||
Gfx *tex0f173f78(Gfx *gdl, struct tex *tex, s32 arg2, s32 shifts, s32 shiftt, s32 arg5);
|
||||
Gfx *tex0f1742e4(Gfx *arg0, Gfx *arg1, struct tex *tex, bool arg3);
|
||||
Gfx *tex0f1743a0(Gfx *gdl, struct tex *tex, s32 arg2);
|
||||
Gfx *tex0f1747a4(Gfx *gdl, struct tex *tex, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, u32 size);
|
||||
Gfx *tex0f174b54(Gfx *gdl, struct tex *tex);
|
||||
Gfx *tex0f174f30(Gfx *gdl, struct tex *tex, s32 arg2, s32 arg3, s32 arg4, s32 tile);
|
||||
Gfx *tex0f1751e4(Gfx *gdl, struct tex *tex, s32 arg2, s32 arg3, s32 arg4, bool arg5);
|
||||
Gfx *tex0f175308(Gfx *gdl, struct tex *tex, s32 arg2, s32 arg3, s32 arg4, struct tex *arg5, s32 arg6, s32 arg7, s32 arg8, bool arg9);
|
||||
Gfx *tex0f175490(Gfx *gdl, struct tex *tex, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, bool arg8);
|
||||
Gfx *tex0f1755dc(Gfx *gdl, struct tex *tex, s32 arg2, s32 arg3, s32 arg4);
|
||||
Gfx *tex0f17563c(Gfx *gdl, struct tex *tex, s32 arg2, s32 arg3, s32 arg4);
|
||||
s32 texLoadFromGdl(Gfx *arg0, s32 gdlsizeinbytes, Gfx *arg2, struct texpool *pool, u8 *arg4);
|
||||
void texGetDepthAndSize(struct tex *tex, s32 *arg1, s32 *arg2);
|
||||
s32 texLoadFromGdl(Gfx *instart, s32 gdlsizeinbytes, Gfx *outstart, struct texpool *pool, u8 *vtxstart);
|
||||
void texCopyGdls(Gfx *src, Gfx *dst, s32 numbytes);
|
||||
|
||||
#endif
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "types.h"
|
||||
|
||||
void func0f16e810(u32 arg0);
|
||||
s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpool *pool, s32 arg5);
|
||||
s32 texInflateZlib(u8 *src, u8 *dst, bool arg2, s32 forcenumimages, struct texpool *pool, s32 unusedarg);
|
||||
s32 texAlignIndices(u8 *arg0, s32 width, s32 height, s32 format, u8 *dst);
|
||||
s32 texGetAverageRed(u16 colour1, u16 colour2, u16 colour3, u16 colour4);
|
||||
s32 texGetAverageGreen(u16 colour1, u16 colour2, u16 colour3, u16 colour4);
|
||||
@@ -14,7 +14,7 @@ s32 texGetAverageAlpha(u16 colour1, u16 colour2, u16 colour3, u16 colour4);
|
||||
s32 texShrinkPaletted(u8 *src, u8 *dst, s32 srcwidth, s32 srcheight, s32 format, u16 *palette, s32 numcolours);
|
||||
s32 texFindClosestColourIndexRGBA(u8 *palette, s32 numcolours, s32 r, s32 g, s32 b, s32 a);
|
||||
s32 texFindClosestColourIndexIA(u16 *palette, s32 numcolours, s32 intensity, s32 alpha);
|
||||
s32 texInflateNonZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpool *pool, s32 arg5);
|
||||
s32 texInflateNonZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpool *pool, s32 unusedarg);
|
||||
s32 texShrinkNonPaletted(u8 *src, u8 *dst, s32 srcwidth, s32 srcheight, s32 format);
|
||||
void texInflateHuffman(u8 *dst, s32 numiterations, s32 chansize);
|
||||
void texInflateRle(u8 *arg0, s32 arg1);
|
||||
@@ -25,18 +25,18 @@ s32 texReadUncompressed(u8 *dst, s32 width, s32 height, s32 format);
|
||||
s32 texChannelsToPixels(u8 *src, s32 width, s32 height, u8 *dst, s32 format);
|
||||
s32 texInflateLookup(s32 width, s32 height, u8 *dst, u8 *lookup, s32 numcolours, s32 format);
|
||||
s32 texInflateLookupFromBuffer(u8 *src, s32 width, s32 height, u8 *dst, u8 *lookup, s32 numcolours, s32 format);
|
||||
void texSwapAltRowBytes(u8 *arg0, s32 width, s32 height, s32 format);
|
||||
void texSwizzle(u8 *arg0, s32 width, s32 height, s32 format);
|
||||
void texBlur(u8 *pixels, s32 width, s32 height, s32 method, s32 chansize);
|
||||
void texInitPool(struct texpool *pool, u8 *start, s32 len);
|
||||
struct tex *texFindInPool(s32 texturenum, struct texpool *pool);
|
||||
s32 texGetPoolFreeBytes(struct texpool *pool);
|
||||
u8 *texGetPoolLeftPos(struct texpool *pool);
|
||||
void texLoadFromDisplayList(Gfx *gdl, struct texpool *pool, s32 arg2);
|
||||
void texLoad(texnum_t *updateword, struct texpool *pool, bool arg2);
|
||||
void texLoad(texnum_t *updateword, struct texpool *pool, bool unusedarg);
|
||||
void texLoadFromConfigs(struct textureconfig *configs, s32 numconfigs, struct texpool *pool, s32 arg3);
|
||||
void texLoadFromTextureNum(u32 arg0, struct texpool *pool);
|
||||
#ifndef PLATFORM_N64
|
||||
void texSwapAltRowBytesInternal(u8 *dst, s32 width, s32 height, s32 format, u32 dstlen);
|
||||
void texSwizzleInternal(u8 *dst, s32 width, s32 height, s32 format, u32 dstlen);
|
||||
s32 texConfigToFormat(const struct textureconfig *tex);
|
||||
#endif
|
||||
|
||||
|
||||
+73
-97
@@ -3854,71 +3854,70 @@ struct perfectheadtexturelist {
|
||||
struct textureconfig selectedtexture;
|
||||
};
|
||||
|
||||
struct menu840 {
|
||||
/*0x000*/ u8 unk000;
|
||||
/*0x001*/ u8 unk001;
|
||||
struct menumodel {
|
||||
/*0x000*/ u8 loaddelay;
|
||||
/*0x002*/ s16 headnum;
|
||||
/*0x004*/ u8 *unk004;
|
||||
/*0x008*/ u32 unk008;
|
||||
/*0x00c*/ u32 unk00c;
|
||||
/*0x010*/ s32 unk010;
|
||||
/*0x014*/ Mtxf unk014;
|
||||
/*0x004*/ u8 *allocstart;
|
||||
/*0x008*/ u32 alloclen;
|
||||
/*0x00c*/ u32 newparams;
|
||||
/*0x010*/ u32 curparams;
|
||||
/*0x014*/ Mtxf mtx;
|
||||
/*0x054*/ struct modeldef *bodymodeldef;
|
||||
/*0x058*/ struct modeldef *headmodeldef;
|
||||
/*0x05c*/ s16 unk05c;
|
||||
/*0x05e*/ s16 unk05e;
|
||||
/*0x05c*/ s16 newanimnum;
|
||||
/*0x05e*/ s16 curanimnum;
|
||||
/*0x060*/ struct model bodymodel;
|
||||
/*0x084*/ struct anim bodyanim;
|
||||
/*0x110*/ u32 unk110[256];
|
||||
/*0x510*/ f32 unk510;
|
||||
/*0x514*/ f32 unk514;
|
||||
/*0x518*/ f32 unk518;
|
||||
/*0x51c*/ f32 unk51c;
|
||||
/*0x520*/ f32 unk520;
|
||||
/*0x524*/ f32 unk524;
|
||||
/*0x528*/ f32 unk528;
|
||||
/*0x52c*/ f32 unk52c;
|
||||
/*0x530*/ f32 unk530;
|
||||
/*0x534*/ f32 unk534;
|
||||
/*0x538*/ f32 unk538;
|
||||
/*0x53c*/ f32 unk53c;
|
||||
/*0x540*/ f32 unk540;
|
||||
/*0x544*/ f32 unk544;
|
||||
/*0x548*/ f32 unk548;
|
||||
/*0x54c*/ f32 unk54c;
|
||||
/*0x550*/ f32 unk550;
|
||||
/*0x554*/ f32 unk554;
|
||||
/*0x558*/ f32 unk558;
|
||||
/*0x55c*/ f32 unk55c;
|
||||
/*0x560*/ s16 unk560;
|
||||
/*0x564*/ f32 unk564;
|
||||
/*0x568*/ u8 unk568;
|
||||
/*0x110*/ u32 rwdata[256];
|
||||
/*0x510*/ f32 curposx;
|
||||
/*0x514*/ f32 curposy;
|
||||
/*0x518*/ f32 curposz;
|
||||
/*0x51c*/ f32 curscale;
|
||||
/*0x520*/ f32 currotx;
|
||||
/*0x524*/ f32 curroty;
|
||||
/*0x528*/ f32 currotz;
|
||||
/*0x52c*/ f32 displacex;
|
||||
/*0x530*/ f32 displacey;
|
||||
/*0x534*/ f32 displacez;
|
||||
/*0x538*/ f32 newposx;
|
||||
/*0x53c*/ f32 newposy;
|
||||
/*0x540*/ f32 newposz;
|
||||
/*0x544*/ f32 newscale;
|
||||
/*0x548*/ f32 newrotx;
|
||||
/*0x54c*/ f32 newroty;
|
||||
/*0x550*/ f32 newrotz;
|
||||
/*0x554*/ f32 zoom; // character selection: far = 100, near = 370
|
||||
/*0x558*/ f32 unk558; // unused
|
||||
/*0x55c*/ f32 unk55c; // unused
|
||||
/*0x560*/ s16 unk560; // unused
|
||||
/*0x564*/ f32 configurefrac;
|
||||
/*0x568*/ u8 flags;
|
||||
/*0x56a*/ s16 bodynum;
|
||||
/*0x56c*/ u32 unk56c;
|
||||
/*0x570*/ u32 unk570;
|
||||
/*0x574*/ s32 unk574;
|
||||
/*0x578*/ s32 unk578;
|
||||
/*0x57c*/ u32 unk57c;
|
||||
/*0x580*/ u32 unk580;
|
||||
/*0x584*/ u32 unk584;
|
||||
/*0x588*/ u32 unk588;
|
||||
/*0x58c*/ u32 unk58c;
|
||||
/*0x590*/ u32 unk590;
|
||||
/*0x594*/ u32 unk594;
|
||||
/*0x598*/ u32 unk598;
|
||||
/*0x59c*/ u32 unk59c;
|
||||
/*0x5a0*/ u32 unk5a0;
|
||||
/*0x5a4*/ u32 unk5a4;
|
||||
/*0x5a8*/ u32 unk5a8;
|
||||
/*0x5ac*/ u32 unk5ac;
|
||||
/*0x5b0*/ u8 unk5b0;
|
||||
/*0x5b1*/ u8 unk5b1_01 : 1;
|
||||
/*0x5b1*/ u8 unk5b1_02 : 1;
|
||||
/*0x5b1*/ u8 unk5b1_03 : 1;
|
||||
/*0x5b1*/ u8 unk5b1_04 : 1;
|
||||
/*0x5b1*/ u8 unk5b1_05 : 1;
|
||||
/*0x5b1*/ u8 unk5b1_06 : 1;
|
||||
/*0x5b1*/ u8 unk5b1_07 : 1;
|
||||
/*0x56c*/ s32 unk56c; // unused
|
||||
/*0x570*/ s32 unk570; // unused
|
||||
/*0x574*/ s32 zoomtimer60;
|
||||
/*0x578*/ s32 rottimer60;
|
||||
/*0x57c*/ s32 unk57c; // unused
|
||||
/*0x580*/ bool removingpiece;
|
||||
/*0x584*/ s32 unk584; // unused
|
||||
/*0x588*/ s32 unk588; // unused
|
||||
/*0x58c*/ s32 unk58c; // unused
|
||||
/*0x590*/ s32 unk590; // unused
|
||||
/*0x594*/ s32 unk594; // unused
|
||||
/*0x598*/ s32 unk598; // unused
|
||||
/*0x59c*/ s32 unk59c; // unused
|
||||
/*0x5a0*/ s32 unk5a0; // unused
|
||||
/*0x5a4*/ s32 unk5a4; // unused
|
||||
/*0x5a8*/ s32 unk5a8; // unused
|
||||
/*0x5ac*/ s32 unk5ac; // unused
|
||||
/*0x5b0*/ u8 perfectheadnum;
|
||||
/*0x5b1*/ u8 isperfecthead : 1;
|
||||
/*0x5b1*/ u8 unk5b1_02 : 1; // unused
|
||||
/*0x5b1*/ u8 unk5b1_03 : 1; // unused
|
||||
/*0x5b1*/ u8 reverseanim : 1;
|
||||
/*0x5b1*/ u8 configuring : 1;
|
||||
/*0x5b1*/ u8 unk5b1_06 : 1; // unused
|
||||
/*0x5b1*/ u8 drawbehinddialog : 1;
|
||||
/*0x5b4*/ struct modelpartvisibility *partvisibility;
|
||||
};
|
||||
|
||||
@@ -3963,7 +3962,7 @@ struct menu {
|
||||
/*0x83d*/ u8 unk83d;
|
||||
/*0x83e*/ u8 unk83e;
|
||||
/*0x83f*/ u8 unk83f;
|
||||
/*0x840*/ struct menu840 unk840;
|
||||
/*0x840*/ struct menumodel menumodel;
|
||||
/*0xdf8*/ s8 bannernum;
|
||||
/*0xdfc*/ struct menudfc unkdfc[4];
|
||||
|
||||
@@ -4777,11 +4776,11 @@ struct menudata {
|
||||
/*0x016*/ u8 screenshottimer;
|
||||
/*0x017*/ u8 playerjoinalpha[MAX_PLAYERS];
|
||||
/*0x01b*/ s8 bannernum;
|
||||
/*0x01c*/ struct menu840 unk01c;
|
||||
/*0x01c*/ struct menumodel hudpiece;
|
||||
/*0x5d4*/ u8 unk5d4;
|
||||
/*0x5d5*/ u8 unk5d5_01 : 1;
|
||||
/*0x5d5*/ u8 unk5d5_02 : 1;
|
||||
/*0x5d5*/ u8 unk5d5_03 : 1;
|
||||
/*0x5d5*/ u8 usezbuf : 1;
|
||||
/*0x5d5*/ u8 unk5d5_04 : 1;
|
||||
/*0x5d5*/ u8 unk5d5_05 : 1;
|
||||
/*0x5d5*/ u8 unk5d5_06 : 1;
|
||||
@@ -5273,28 +5272,6 @@ struct var80061420 {
|
||||
u8 *unk04;
|
||||
};
|
||||
|
||||
struct var800ab5b8 {
|
||||
u32 unk00;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0c;
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1c;
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
};
|
||||
|
||||
struct var800ab718 {
|
||||
bool inuse;
|
||||
s32 uls;
|
||||
s32 ult;
|
||||
s32 lrs;
|
||||
s32 lrt;
|
||||
};
|
||||
|
||||
struct menurendercontext {
|
||||
s16 x;
|
||||
s16 y;
|
||||
@@ -5714,7 +5691,7 @@ struct warpparams {
|
||||
};
|
||||
|
||||
struct hitthing {
|
||||
struct coord unk00;
|
||||
struct coord pos; // world pos
|
||||
struct coord unk0c;
|
||||
Vtx *unk18;
|
||||
Vtx *unk1c;
|
||||
@@ -5729,24 +5706,24 @@ struct hit {
|
||||
/*0x00*/ f32 distance;
|
||||
/*0x04*/ struct prop *prop;
|
||||
/*0x08*/ s32 hitpart;
|
||||
/*0x0c*/ struct modelnode *node;
|
||||
/*0x0c*/ struct modelnode *bboxnode;
|
||||
/*0x10*/ struct hitthing hitthing;
|
||||
/*0x40*/ s32 mtxindex;
|
||||
/*0x44*/ struct modelnode *unk44;
|
||||
/*0x44*/ struct modelnode *dlnode;
|
||||
/*0x48*/ struct model *model;
|
||||
/*0x4c*/ s8 unk4c;
|
||||
/*0x4d*/ s8 unk4d;
|
||||
/*0x4c*/ s8 slowsbullet;
|
||||
/*0x4d*/ s8 bulletproof;
|
||||
/*0x50*/ struct coord pos;
|
||||
/*0x5c*/ struct coord dir;
|
||||
};
|
||||
|
||||
struct shotdata {
|
||||
/*0x00*/ struct coord unk00;
|
||||
/*0x0c*/ struct coord unk0c;
|
||||
/*0x00*/ struct coord gunpos2d;
|
||||
/*0x0c*/ struct coord gundir2d;
|
||||
/*0x18*/ struct gset gset;
|
||||
/*0x1c*/ struct coord gunpos;
|
||||
/*0x28*/ struct coord dir;
|
||||
/*0x34*/ f32 unk34;
|
||||
/*0x1c*/ struct coord gunpos3d;
|
||||
/*0x28*/ struct coord gundir3d;
|
||||
/*0x34*/ f32 distance;
|
||||
/*0x38*/ s32 penetration;
|
||||
/*0x3c*/ struct hit hits[10];
|
||||
};
|
||||
@@ -6004,16 +5981,15 @@ struct awardmetrics {
|
||||
|
||||
struct tex {
|
||||
/*0x00*/ u16 texturenum : 12;
|
||||
/*0x00*/ u16 unk00_0c : 4;
|
||||
/*0x04*/ u8 *data;
|
||||
/*0x08*/ u8 width;
|
||||
/*0x09*/ u8 height;
|
||||
/*0x0a*/ u8 unk0a;
|
||||
/*0x0b*/ u8 maxlod : 3;
|
||||
/*0x0b*/ u8 numlods : 3;
|
||||
/*0x0b*/ u8 gbiformat : 3;
|
||||
/*0x0b*/ u8 depth : 2;
|
||||
/*0x0c*/ u32 lutmodeindex : 2;
|
||||
/*0x0c*/ u32 unk0c_02 : 1;
|
||||
/*0x0c*/ u32 hasloddata : 1;
|
||||
/*0x0c*/ u32 unk0c_03 : 1;
|
||||
#ifdef PLATFORM_N64
|
||||
/*0x0c*/ u32 next : 24;
|
||||
|
||||
Reference in new issue
Block a user