mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-29 23:37:33 -04:00
Minor cleanup
This commit is contained in:
+1
-1
@@ -4000,7 +4000,7 @@ void func0f022084(struct chrdata *chr, s16 *room)
|
||||
void func0f0220ac(struct chrdata *chr)
|
||||
{
|
||||
func0f065c44(chr->prop);
|
||||
func0f022084(chr, &chr->prop->rooms[0]);
|
||||
func0f022084(chr, chr->prop->rooms);
|
||||
func0f065cb0(chr->prop);
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -11375,7 +11375,7 @@ glabel chrGoToPos
|
||||
// nextwaypoint = chr->act_gopos.waypoints[chr->act_gopos.nextwaypointindex];
|
||||
// } else {
|
||||
// // 54c
|
||||
// nextwaypoint = waypointFindClosestToPos(&prop->pos, &prop->rooms[0]);
|
||||
// nextwaypoint = waypointFindClosestToPos(&prop->pos, prop->rooms);
|
||||
// }
|
||||
//
|
||||
// // 560
|
||||
@@ -11406,7 +11406,7 @@ glabel chrGoToPos
|
||||
// chr->act_gopos.pos.x = pos->x;
|
||||
// chr->act_gopos.pos.y = pos->y;
|
||||
// chr->act_gopos.pos.z = pos->z;
|
||||
// roomsCopy(room, &chr->act_gopos.rooms[0]);
|
||||
// roomsCopy(room, chr->act_gopos.rooms);
|
||||
// chr->act_gopos.nextwaypointindex = 0;
|
||||
// chr->act_gopos.numwaypoints = numwaypoints;
|
||||
// chr->act_gopos.unk065 = 4 | speed;
|
||||
@@ -12381,7 +12381,7 @@ bool func0f039558(struct chrdata *chr, struct prop *prop)
|
||||
bool result;
|
||||
|
||||
func0f064178(prop, false);
|
||||
result = func0f039474(chr, &prop->pos, &prop->rooms[0]);
|
||||
result = func0f039474(chr, &prop->pos, prop->rooms);
|
||||
func0f064178(prop, true);
|
||||
|
||||
return result;
|
||||
@@ -13083,7 +13083,7 @@ bool chrGoToTarget(struct chrdata *chr, u32 speed)
|
||||
(chr->flags & CHRFLAG0_CAN_GO_TO_PLACES)) {
|
||||
struct prop *prop = chrGetTargetProp(chr);
|
||||
|
||||
if (chrGoToPos(chr, &prop->pos, &prop->rooms[0], speed)) {
|
||||
if (chrGoToPos(chr, &prop->pos, prop->rooms, speed)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -13100,7 +13100,7 @@ bool chrGoToChr(struct chrdata *chr, u32 dst_chrnum, u32 speed)
|
||||
(chr->flags & CHRFLAG0_CAN_GO_TO_PLACES)) {
|
||||
struct chrdata *dstchr = chrFindById(chr, dst_chrnum);
|
||||
|
||||
if (dstchr && dstchr->prop && chrGoToPos(chr, &dstchr->prop->pos, &dstchr->prop->rooms[0], speed)) {
|
||||
if (dstchr && dstchr->prop && chrGoToPos(chr, &dstchr->prop->pos, dstchr->prop->rooms, speed)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -13112,7 +13112,7 @@ bool chrGoToChr(struct chrdata *chr, u32 dst_chrnum, u32 speed)
|
||||
bool chrGoToProp(struct chrdata *chr, struct prop *prop, s32 speed)
|
||||
{
|
||||
if (chrIsReadyForOrders(chr) && prop) {
|
||||
if (chrGoToPos(chr, &prop->pos, &prop->rooms[0], speed)) {
|
||||
if (chrGoToPos(chr, &prop->pos, prop->rooms, speed)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -13867,7 +13867,7 @@ s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 entitytype, u32 entityid)
|
||||
pos.z = target->pos.z;
|
||||
}
|
||||
|
||||
if (target && func0002dc18(&chr->prop->pos, &chr->prop->rooms[0], &pos, 0x33)) {
|
||||
if (target && func0002dc18(&chr->prop->pos, chr->prop->rooms, &pos, 0x33)) {
|
||||
struct prop *leftprop = chrGetEquippedWeaponProp(chr, 1);
|
||||
struct prop *rightprop = chrGetEquippedWeaponProp(chr, 0);
|
||||
struct weaponobj *weapon;
|
||||
@@ -28417,7 +28417,7 @@ bool func0f04a76c(struct chrdata *chr, f32 distance)
|
||||
|
||||
bool func0f04a79c(u8 chrnum, struct chrdata *chr, f32 distance)
|
||||
{
|
||||
return func0f04a848(chrnum, chr, distance, &chr->prop->pos, &chr->prop->rooms[0]);
|
||||
return func0f04a848(chrnum, chr, distance, &chr->prop->pos, chr->prop->rooms);
|
||||
}
|
||||
|
||||
bool func0f04a7dc(u32 chrnum, struct chrdata *chr, f32 distance, s32 padnum)
|
||||
@@ -29310,7 +29310,7 @@ struct prop *chrSpawnAtChr(struct chrdata *basechr, s32 body, s32 head, u32 chrn
|
||||
fvalue = func0f03e45c(chr);
|
||||
}
|
||||
|
||||
return chrSpawnAtCoord(body, head, &chr->prop->pos, &chr->prop->rooms[0], fvalue, ailist, flags);
|
||||
return chrSpawnAtCoord(body, head, &chr->prop->pos, chr->prop->rooms, fvalue, ailist, flags);
|
||||
}
|
||||
|
||||
bool func0f04b658(struct chrdata *chr)
|
||||
@@ -30259,14 +30259,14 @@ bool chrIsTargetNearlyInSight(struct chrdata *chr, u32 distance)
|
||||
{
|
||||
struct prop *target = chrGetTargetProp(chr);
|
||||
|
||||
return func0002f450(&chr->prop->pos, &chr->prop->rooms[0], &target->pos, distance, 32);
|
||||
return func0002f450(&chr->prop->pos, chr->prop->rooms, &target->pos, distance, 32);
|
||||
}
|
||||
|
||||
bool chrIsNearlyInTargetsSight(struct chrdata *chr, u32 distance)
|
||||
{
|
||||
struct prop *target = chrGetTargetProp(chr);
|
||||
|
||||
return func0002f450(&target->pos, &target->rooms[0], &chr->prop->pos, distance, 32);
|
||||
return func0002f450(&target->pos, target->rooms, &chr->prop->pos, distance, 32);
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
|
||||
@@ -1587,7 +1587,7 @@ bool aiIfSeesSuspiciousItem(void)
|
||||
s16 propnums[256];
|
||||
struct prop *chrprop = g_Vars.chrdata->prop;
|
||||
|
||||
roomGetProps(&chrprop->rooms[0], &propnums[0], 256);
|
||||
roomGetProps(chrprop->rooms, &propnums[0], 256);
|
||||
|
||||
ptr = &propnums[0];
|
||||
|
||||
@@ -2350,7 +2350,7 @@ bool aiDestroyObject(void)
|
||||
|
||||
if (entity->obj == MODEL_ELVIS_SAUCER) {
|
||||
obj->flags = (obj->flags & ~OBJFLAG_00010000) | OBJFLAG_INVINCIBLE;
|
||||
func0f129900(entity->prop, &entity->prop->pos, &entity->prop->rooms[0], 3, 0);
|
||||
func0f129900(entity->prop, &entity->prop->pos, entity->prop->rooms, 3, 0);
|
||||
func0f12e714(entity->prop, 0x16);
|
||||
} else {
|
||||
f32 damage = ((obj->maxdamage - obj->damage) + 1) / 250.0f;
|
||||
@@ -5552,7 +5552,7 @@ bool aiChrMoveToPad(void)
|
||||
|
||||
if (chr2 && chr2->prop) {
|
||||
somefloat = func0f03e45c(chr2);
|
||||
pass = chrMoveToPos(chr, &chr2->prop->pos, &chr2->prop->rooms[0], somefloat, 0);
|
||||
pass = chrMoveToPos(chr, &chr2->prop->pos, chr2->prop->rooms, somefloat, 0);
|
||||
}
|
||||
} else {
|
||||
s32 padnum = cmd[4] | (cmd[3] << 8);
|
||||
@@ -5564,7 +5564,7 @@ bool aiChrMoveToPad(void)
|
||||
|
||||
rooms[0] = pad.room;
|
||||
rooms[1] = -1;
|
||||
pass = chrMoveToPos(chr, &pad.pos, &rooms[0], somefloat, cmd[5]);
|
||||
pass = chrMoveToPos(chr, &pad.pos, rooms, somefloat, cmd[5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11475,7 +11475,7 @@ bool aiRemoveReferencesToChr(void)
|
||||
bool ai01b4(void)
|
||||
{
|
||||
if (g_Vars.chrdata && g_Vars.chrdata->prop &&
|
||||
func0f01f264(g_Vars.chrdata, &g_Vars.chrdata->prop->pos, &g_Vars.chrdata->prop->rooms[0], 0, false)) {
|
||||
func0f01f264(g_Vars.chrdata, &g_Vars.chrdata->prop->pos, g_Vars.chrdata->prop->rooms, 0, false)) {
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]);
|
||||
} else {
|
||||
|
||||
@@ -6602,7 +6602,7 @@ u32 var8007f46c = 0x00000000;
|
||||
// 25490
|
||||
struct credit credits[] = {
|
||||
{ 0x00, CREDITSTYLE_R_BIG_R_MED, L_TITLE(2), L_TITLE(0) }, // "perfect dark", ""
|
||||
{ 0x00, CREDITSTYLE_R_BIG_R_MED, L_TITLE(3), L_TITLE(4) }, // "neau ner chesluk", "guns and visual orgasms"
|
||||
{ 0x00, CREDITSTYLE_R_BIG_R_MED, L_TITLE(3), L_TITLE(4) }, // "beau ner chesluk", "guns and visual orgasms"
|
||||
{ 0x00, CREDITSTYLE_R_BIG_R_MED, L_TITLE(5), L_TITLE(6) }, // "jonathan nasty mummery", "mover and shaker"
|
||||
{ 0x00, CREDITSTYLE_R_BIG_R_MED, L_TITLE(7), L_TITLE(8) }, // "darkmark", "reality engineer"
|
||||
{ 0x00, CREDITSTYLE_R_BIG_R_MED, L_TITLE(9), L_TITLE(10) }, // "chris tilston", "designs on the future"
|
||||
|
||||
@@ -1553,19 +1553,19 @@ glabel var7f1a827c
|
||||
//
|
||||
// if (g_NumSpawnPoints > 0) {
|
||||
// if (g_Vars.coopplayernum >= 0) {
|
||||
// fStack32 = M_BADTAU - scenarioCallback2c(30, &pos, &rooms[0], g_Vars.currentplayer->prop);
|
||||
// fStack32 = M_BADTAU - scenarioCallback2c(30, &pos, rooms, g_Vars.currentplayer->prop);
|
||||
// } else if (g_Vars.antiplayernum >= 0) {
|
||||
// fStack32 = M_BADTAU - scenarioCallback2c(30, &pos, &rooms[0], g_Vars.currentplayer->prop);
|
||||
// fStack32 = M_BADTAU - scenarioCallback2c(30, &pos, rooms, g_Vars.currentplayer->prop);
|
||||
// } else {
|
||||
// if (g_Vars.mplayerisrunning == 0) {
|
||||
// g_NumSpawnPoints = 1;
|
||||
// }
|
||||
//
|
||||
// fStack32 = M_BADTAU - scenarioCallback2c(30, &pos, &rooms[0], g_Vars.currentplayer->prop);
|
||||
// fStack32 = M_BADTAU - scenarioCallback2c(30, &pos, rooms, g_Vars.currentplayer->prop);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// fVar9 = coordFindGroundY(&pos, 30, &rooms[0],
|
||||
// fVar9 = coordFindGroundY(&pos, 30, rooms,
|
||||
// &g_Vars.currentplayer->unk161a,
|
||||
// &g_Vars.currentplayer->unk161e,
|
||||
// &g_Vars.currentplayer->unk161c,
|
||||
|
||||
@@ -955,7 +955,7 @@ void objectiveCheckMultiroomEntered(s32 arg0, s16 *requiredrooms)
|
||||
objectiverooms[0] = room;
|
||||
objectiverooms[1] = -1;
|
||||
|
||||
if (arrayIntersects(&objectiverooms[0], requiredrooms)) {
|
||||
if (arrayIntersects(objectiverooms, requiredrooms)) {
|
||||
criteria->status = OBJECTIVE_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2433,7 +2433,7 @@ void mpAibotApplyDefend(struct chrdata *chr, struct coord *pos, s16 *room, f32 a
|
||||
chr->aibot->defendholdpos.x = pos->x;
|
||||
chr->aibot->defendholdpos.y = pos->y;
|
||||
chr->aibot->defendholdpos.z = pos->z;
|
||||
roomsCopy(room, &chr->aibot->rooms[0]);
|
||||
roomsCopy(room, chr->aibot->rooms);
|
||||
chr->aibot->unk098 = arg3;
|
||||
chr->aibot->unk0d8 = 1;
|
||||
}
|
||||
@@ -2444,7 +2444,7 @@ void mpAibotApplyHold(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg
|
||||
chr->aibot->defendholdpos.x = pos->x;
|
||||
chr->aibot->defendholdpos.y = pos->y;
|
||||
chr->aibot->defendholdpos.z = pos->z;
|
||||
roomsCopy(room, &chr->aibot->rooms[0]);
|
||||
roomsCopy(room, chr->aibot->rooms);
|
||||
chr->aibot->unk098 = arg3;
|
||||
chr->aibot->unk0d8 = 1;
|
||||
}
|
||||
@@ -7924,6 +7924,6 @@ void func0f197544(struct chrdata *chr)
|
||||
}
|
||||
|
||||
if (!pass) {
|
||||
chrGoToPos(chr, &chr->act_gopos.pos, &chr->act_gopos.rooms[0], chr->act_gopos.unk065);
|
||||
chrGoToPos(chr, &chr->act_gopos.pos, chr->act_gopos.rooms, chr->act_gopos.unk065);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23844,7 +23844,7 @@ bool chopperCheckTargetInSight(struct chopperobj *obj)
|
||||
struct prop *target = chopperGetTargetProp(chopper);
|
||||
|
||||
if (target->type != PROPTYPE_PLAYER || g_Vars.unk000324) {
|
||||
visible = hasLineOfSight(&target->pos, &target->rooms[0], &chopper->base.prop->pos, &chopper->base.prop->rooms[0], 307, 16);
|
||||
visible = hasLineOfSight(&target->pos, target->rooms, &chopper->base.prop->pos, chopper->base.prop->rooms, 307, 16);
|
||||
}
|
||||
|
||||
chopper->targetvisible = visible;
|
||||
|
||||
Reference in New Issue
Block a user