Set names for many more struct properties

This commit is contained in:
Ryan Dwyer
2021-05-26 17:39:58 +10:00
parent e2151447d3
commit 44ade384bb
29 changed files with 642 additions and 736 deletions
+3 -3
View File
@@ -5878,9 +5878,9 @@ u8 func1000_jo_typing[] = {
u8 func1040_lift_door_sounds[] = {
// Disable autoguns
yield
set_autoturret_type(0x8b, 0x02)
set_autoturret_type(0x8c, 0x02)
set_autoturret_type(0x8d, 0x02)
set_autogun_target_team(0x8b, TEAM_ENEMY)
set_autogun_target_team(0x8c, TEAM_ENEMY)
set_autogun_target_team(0x8d, TEAM_ENEMY)
restart_timer
beginloop(0x57)
+5 -3
View File
@@ -730,9 +730,11 @@ u8 func0413_defend_pad[] = {
u8 func100b_setup_autoguns[] = {
yield
set_autoturret_type(OBJ_AUTOGUN1, 0xef)
set_autoturret_type(OBJ_AUTOGUN2, 0xef)
set_autoturret_type(OBJ_AUTOGUN3, 0xef)
// Make autoguns shoot at everyone except good people
set_autogun_target_team(OBJ_AUTOGUN1, 0xff & ~TEAM_ALLY)
set_autogun_target_team(OBJ_AUTOGUN2, 0xff & ~TEAM_ALLY)
set_autogun_target_team(OBJ_AUTOGUN3, 0xff & ~TEAM_ALLY)
if_difficulty_lt(DIFF_SA, /*goto*/ 0x2f)
// SA and PA only
+3 -3
View File
@@ -4296,9 +4296,9 @@ u8 unregistered_function1[] = {
u8 func1026_setup_autoguns[] = {
yield
set_autoturret_type(0xa8, 0x12)
set_autoturret_type(0xa9, 0x12)
set_autoturret_type(0xaa, 0x12)
set_autogun_target_team(0xa8, TEAM_ENEMY | TEAM_ALLY)
set_autogun_target_team(0xa9, TEAM_ENEMY | TEAM_ALLY)
set_autogun_target_team(0xaa, TEAM_ENEMY | TEAM_ALLY)
set_ailist(CHR_SELF, GAILIST_IDLE)
endlist
};
+9 -9
View File
@@ -48,12 +48,12 @@ void bgrabInit(void)
g_Vars.currentplayer->bondmovemode = MOVEMODE_GRAB;
g_Vars.currentplayer->unk1b60 = 0;
g_Vars.currentplayer->bondgrabthetaspeedsum = 0;
g_Vars.currentplayer->grabbedprevpos.x = prop->pos.x;
g_Vars.currentplayer->grabbedprevpos.y = prop->pos.y;
g_Vars.currentplayer->grabbedprevpos.z = prop->pos.z;
g_Vars.currentplayer->grabbedrotoffset = 0;
g_Vars.currentplayer->unk1c58 = 0;
g_Vars.currentplayer->grabbedforcez = 0;
g_Vars.currentplayer->grabbedposoffset.x = prop->pos.x - g_Vars.currentplayer->prop->pos.x;
g_Vars.currentplayer->grabbedposoffset.y = prop->pos.y - g_Vars.currentplayer->prop->pos.y;
g_Vars.currentplayer->grabbedposoffset.z = prop->pos.z - g_Vars.currentplayer->prop->pos.z;
@@ -78,7 +78,7 @@ void bgrabInit(void)
if (prop->type == PROPTYPE_OBJ || prop->type == PROPTYPE_DOOR || prop->type == PROPTYPE_WEAPON) {
struct defaultobj *obj = prop->obj;
struct hov *hov = NULL;
bool setthething;
bool withforce;
if (obj->hidden & OBJHFLAG_AIRBORNE) {
struct projectile *projectile = obj->projectile;
@@ -109,17 +109,17 @@ void bgrabInit(void)
obj->hidden |= OBJHFLAG_GRABBED;
if (obj->flags3 & OBJFLAG3_GEOTYPE3) {
setthething = func000276c8(obj->geo3,
withforce = func000276c8(obj->geo3,
g_Vars.currentplayer->prop->pos.x,
g_Vars.currentplayer->prop->pos.z, 45, 0, 0);
} else {
setthething = func000274e0(obj->geo2,
withforce = func000274e0(obj->geo2,
g_Vars.currentplayer->prop->pos.x,
g_Vars.currentplayer->prop->pos.z, 45, 0, 0);
}
if (setthething) {
g_Vars.currentplayer->unk1c58 = 15;
if (withforce) {
g_Vars.currentplayer->grabbedforcez = 15;
}
}
@@ -2815,10 +2815,10 @@ void bgrabUpdateSpeedTheta(void)
s32 i;
for (i = 0; i < g_Vars.lvupdate240; i++) {
g_Vars.currentplayer->unk1b60 = g_Vars.currentplayer->unk1b60 * mult + speedtheta;
g_Vars.currentplayer->bondgrabthetaspeedsum = g_Vars.currentplayer->bondgrabthetaspeedsum * mult + speedtheta;
}
g_Vars.currentplayer->speedtheta = g_Vars.currentplayer->unk1b60 * (PAL ? 0.024800002574921f : 0.01529997587204f);
g_Vars.currentplayer->speedtheta = g_Vars.currentplayer->bondgrabthetaspeedsum * (PAL ? 0.024800002574921f : 0.01529997587204f);
}
u32 var80070ea8 = 0x00000000;
+23 -23
View File
@@ -148,7 +148,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
struct coord modelpos = {0, 0, 0};
bool somebool = func0001e2a8();
g_Vars.currentplayer->unk03a8 = false;
g_Vars.currentplayer->resetheadtick = false;
func0001e29c(false);
func0001ee18(&g_Vars.currentplayer->model, g_Vars.lvupdate240, true);
@@ -157,7 +157,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
func000159b0(&sp40);
sp80.matrix = &sp40;
sp80.unk10 = &g_Vars.currentplayer->unk0510;
sp80.unk10 = g_Vars.currentplayer->bondheadmatrices;
func0001cebc(&sp80, &g_Vars.currentplayer->model);
g_Vars.currentplayer->headbodyoffset.x = g_Vars.currentplayer->standbodyoffset.x;
@@ -166,35 +166,35 @@ void bheadUpdate(f32 arg0, f32 arg1)
modelGetRootPosition(&g_Vars.currentplayer->model, &modelpos);
modelpos.x -= g_Vars.currentplayer->unk0510.m[3][0];
modelpos.z -= g_Vars.currentplayer->unk0510.m[3][2];
modelpos.x -= g_Vars.currentplayer->bondheadmatrices[0].m[3][0];
modelpos.z -= g_Vars.currentplayer->bondheadmatrices[0].m[3][2];
modelSetRootPosition(&g_Vars.currentplayer->model, &modelpos);
}
}
if (animspeed > 0) {
g_Vars.currentplayer->unk0510.m[3][0] += arg1;
g_Vars.currentplayer->unk0510.m[3][2] *= arg0;
g_Vars.currentplayer->bondheadmatrices[0].m[3][0] += arg1;
g_Vars.currentplayer->bondheadmatrices[0].m[3][2] *= arg0;
if (g_Vars.lvupdate240 > 0) {
g_Vars.currentplayer->unk0510.m[3][0] /= g_Vars.lvupdate240freal;
g_Vars.currentplayer->unk0510.m[3][2] /= g_Vars.lvupdate240freal;
g_Vars.currentplayer->bondheadmatrices[0].m[3][0] /= g_Vars.lvupdate240freal;
g_Vars.currentplayer->bondheadmatrices[0].m[3][2] /= g_Vars.lvupdate240freal;
}
headpos.x = g_Vars.currentplayer->unk0510.m[3][0] * g_Vars.currentplayer->headamplitude;
headpos.y = (g_Vars.currentplayer->unk0510.m[3][1] - g_Vars.currentplayer->standheight) *
headpos.x = g_Vars.currentplayer->bondheadmatrices[0].m[3][0] * g_Vars.currentplayer->headamplitude;
headpos.y = (g_Vars.currentplayer->bondheadmatrices[0].m[3][1] - g_Vars.currentplayer->standheight) *
g_Vars.currentplayer->headamplitude + g_Vars.currentplayer->standheight;
headpos.z = g_Vars.currentplayer->unk0510.m[3][2] * g_Vars.currentplayer->headamplitude;
headpos.z = g_Vars.currentplayer->bondheadmatrices[0].m[3][2] * g_Vars.currentplayer->headamplitude;
if (g_Vars.currentplayer->headanim >= 0) {
lookvel.x = g_Vars.currentplayer->unk0510.m[2][0] * g_Vars.currentplayer->sideamplitude;
lookvel.y = g_Vars.currentplayer->unk0510.m[2][1] * g_Vars.currentplayer->headamplitude;
lookvel.z = (g_Vars.currentplayer->unk0510.m[2][2] - 1.0f) * g_Vars.currentplayer->headamplitude + 1.0f;
lookvel.x = g_Vars.currentplayer->bondheadmatrices[0].m[2][0] * g_Vars.currentplayer->sideamplitude;
lookvel.y = g_Vars.currentplayer->bondheadmatrices[0].m[2][1] * g_Vars.currentplayer->headamplitude;
lookvel.z = (g_Vars.currentplayer->bondheadmatrices[0].m[2][2] - 1.0f) * g_Vars.currentplayer->headamplitude + 1.0f;
upvel.x = g_Vars.currentplayer->unk0510.m[1][0] * g_Vars.currentplayer->headamplitude;
upvel.y = (g_Vars.currentplayer->unk0510.m[1][1] - 1.0f) * g_Vars.currentplayer->headamplitude + 1.0f;
upvel.z = g_Vars.currentplayer->unk0510.m[1][2] * g_Vars.currentplayer->headamplitude;
upvel.x = g_Vars.currentplayer->bondheadmatrices[0].m[1][0] * g_Vars.currentplayer->headamplitude;
upvel.y = (g_Vars.currentplayer->bondheadmatrices[0].m[1][1] - 1.0f) * g_Vars.currentplayer->headamplitude + 1.0f;
upvel.z = g_Vars.currentplayer->bondheadmatrices[0].m[1][2] * g_Vars.currentplayer->headamplitude;
g_Vars.currentplayer->headwalkingtime60 += g_Vars.lvupdate240_60;
@@ -204,13 +204,13 @@ void bheadUpdate(f32 arg0, f32 arg1)
bheadSetdamp(PAL ? 0.99699f : 0.99748998880386f);
}
} else {
lookvel.x = g_Vars.currentplayer->unk0510.m[2][0];
lookvel.y = g_Vars.currentplayer->unk0510.m[2][1];
lookvel.z = g_Vars.currentplayer->unk0510.m[2][2];
lookvel.x = g_Vars.currentplayer->bondheadmatrices[0].m[2][0];
lookvel.y = g_Vars.currentplayer->bondheadmatrices[0].m[2][1];
lookvel.z = g_Vars.currentplayer->bondheadmatrices[0].m[2][2];
upvel.x = g_Vars.currentplayer->unk0510.m[1][0];
upvel.y = g_Vars.currentplayer->unk0510.m[1][1];
upvel.z = g_Vars.currentplayer->unk0510.m[1][2];
upvel.x = g_Vars.currentplayer->bondheadmatrices[0].m[1][0];
upvel.y = g_Vars.currentplayer->bondheadmatrices[0].m[1][1];
upvel.z = g_Vars.currentplayer->bondheadmatrices[0].m[1][2];
bheadSetdamp(PAL ? 0.952f : 0.96f);
}
+2 -2
View File
@@ -35,7 +35,7 @@ void bwalkInit(void)
g_Vars.currentplayer->bondonground = 0;
g_Vars.currentplayer->tank = NULL;
g_Vars.currentplayer->unk1af0 = NULL;
g_Vars.currentplayer->unk1af4 = 0;
g_Vars.currentplayer->bondonturret = false;
g_Vars.currentplayer->swaypos = 0;
g_Vars.currentplayer->swayoffset = 0;
@@ -3342,7 +3342,7 @@ void bwalk0f0c63bc(struct coord *arg0, u32 arg1, s32 types)
struct coord sp100;
struct coord sp88;
g_Vars.currentplayer->unk1af4 = 0;
g_Vars.currentplayer->bondonturret = false;
g_Vars.currentplayer->autocrouchpos = CROUCHPOS_STAND;
bwalk0f0c4d98();
+7 -7
View File
@@ -114,9 +114,9 @@ void func0f01e250(void)
s32 value;
for (i = 0; i < PLAYERCOUNT(); i++) {
g_Vars.players[i]->unk1c44 = 0;
g_Vars.players[i]->unk1c48 = 0;
g_Vars.players[i]->unk1c4c = 0;
g_Vars.players[i]->bondextrapos.x = 0;
g_Vars.players[i]->bondextrapos.y = 0;
g_Vars.players[i]->bondextrapos.z = 0;
}
func0f02c9b0();
@@ -15515,8 +15515,8 @@ bool chrUpdateGeometry(struct prop *prop, u8 **start, u8 **end)
chr->geo.ymax = chr->manground + chr->chrheight;
if (chr->actiontype == ACT_SKJUMP) {
if (chr->manground > chr->act_skjump.y) {
chr->geo.ymin = chr->act_skjump.y;
if (chr->manground > chr->act_skjump.ground) {
chr->geo.ymin = chr->act_skjump.ground;
}
}
@@ -15549,8 +15549,8 @@ void propChrGetBbox(struct prop *prop, f32 *width, f32 *ymax, f32 *ymin)
*ymax = chr->manground + chr->chrheight;
*ymin = chr->manground + 20;
if (chr->actiontype == ACT_SKJUMP && chr->act_skjump.y < chr->manground) {
*ymin = chr->act_skjump.y + 20;
if (chr->actiontype == ACT_SKJUMP && chr->act_skjump.ground < chr->manground) {
*ymin = chr->act_skjump.ground + 20;
}
}
+241 -238
View File
File diff suppressed because it is too large Load Diff
+13 -13
View File
@@ -4015,7 +4015,7 @@ bool aiIfTimerGreaterThan(void)
*/
bool aiShowCountdownTimer(void)
{
countdownTimerSetVisible(1, true);
countdownTimerSetVisible(COUNTDOWNTIMERREASON_AI, true);
g_Vars.aioffset += 2;
return false;
@@ -4026,7 +4026,7 @@ bool aiShowCountdownTimer(void)
*/
bool aiHideCountdownTimer(void)
{
countdownTimerSetVisible(1, false);
countdownTimerSetVisible(COUNTDOWNTIMERREASON_AI, false);
g_Vars.aioffset += 2;
return false;
@@ -5564,14 +5564,14 @@ bool aiRevokeControl(void)
u32 playernum = propGetPlayerNum(chr->prop);
setCurrentPlayerNum(playernum);
currentPlayerSetGunSightVisible(GUNSIGHTREASON_NOCONTROL, false);
func0f0a95ec(2, false);
currentPlayerSetGunAmmoVisible(GUNAMMOREASON_NOCONTROL, false);
if ((cmd[3] & 2) == 0) {
currentPlayerSetFlag(PLAYERFLAG_NOCONTROL);
currentPlayerSetHudmsgsOff(HUDMSGREASON_NOCONTROL);
}
if ((cmd[3] & 4) == 0) {
countdownTimerSetVisible(16, false);
countdownTimerSetVisible(COUNTDOWNTIMERREASON_NOCONTROL, false);
}
g_PlayersWithControl[g_Vars.currentplayernum] = false;
@@ -5595,9 +5595,9 @@ bool aiGrantControl(void)
u32 prevplayernum = g_Vars.currentplayernum;
setCurrentPlayerNum(propGetPlayerNum(chr->prop));
currentPlayerSetGunSightVisible(GUNSIGHTREASON_NOCONTROL, true);
func0f0a95ec(2, true);
currentPlayerUnsetFlag(PLAYERFLAG_NOCONTROL);
countdownTimerSetVisible(16, true);
currentPlayerSetGunAmmoVisible(GUNAMMOREASON_NOCONTROL, true);
currentPlayerSetHudmsgsOn(HUDMSGREASON_NOCONTROL);
countdownTimerSetVisible(COUNTDOWNTIMERREASON_NOCONTROL, true);
g_PlayersWithControl[g_Vars.currentplayernum] = true;
setCurrentPlayerNum(prevplayernum);
}
@@ -11850,7 +11850,7 @@ bool aiSetAutogunType(void)
if (obj && obj->prop && obj->type == OBJTYPE_AUTOGUN) {
struct autogunobj *autogun = (struct autogunobj *)obj;
autogun->autogun_type = cmd[3];
autogun->targetteam = cmd[3];
autogun->unka4 = 0;
}
@@ -12584,10 +12584,10 @@ bool aiChrKill(void)
if (chr) {
chr->actiontype = ACT_DEAD;
chr->act_dead.fadetimer = -1;
chr->act_dead.allowfade = false;
chr->act_dead.allowreap = false;
chr->act_dead.reaptimer = 0;
chr->act_dead.fadetimer60 = -1;
chr->act_dead.fadenow = false;
chr->act_dead.fadewheninvis = false;
chr->act_dead.invistimer60 = 0;
chr->act_dead.notifychrindex = 0;
chr->sleep = 0;
chr->chrflags |= CHRCFLAG_KEEPCORPSEKO | CHRCFLAG_00010000;
+47 -47
View File
@@ -1071,13 +1071,13 @@ void setupMine(struct mineobj *mine, s32 cmdindex)
mine->base.prop->unk3f_02 = 1;
}
void setupCamera(struct cameraobj *camera, s32 cmdindex)
void setupCctv(struct cctvobj *cctv, s32 cmdindex)
{
struct defaultobj *obj = &camera->base;
struct defaultobj *obj = &cctv->base;
setupGenericObject(obj, cmdindex);
if (camera->lookatpadnum >= 0) {
if (cctv->lookatpadnum >= 0) {
struct coord lenspos;
union modelrodata *lens = modelGetPartRodata(obj->model->filedata, MODELPART_CCTV_LENS);
struct pad pad;
@@ -1085,7 +1085,7 @@ void setupCamera(struct cameraobj *camera, s32 cmdindex)
f32 ydiff;
f32 zdiff;
padUnpack(camera->lookatpadnum, PADFIELD_POS, &pad);
padUnpack(cctv->lookatpadnum, PADFIELD_POS, &pad);
lenspos.x = lens->position.pos.x;
lenspos.y = lens->position.pos.y;
@@ -1105,25 +1105,25 @@ void setupCamera(struct cameraobj *camera, s32 cmdindex)
// empty
}
func00016d58(&camera->camrotm, 0.0f, 0.0f, 0.0f, xdiff, ydiff, zdiff, 0.0f, 1.0f, 0.0f);
func00015f04(obj->model->scale, &camera->camrotm);
func00016d58(&cctv->camrotm, 0.0f, 0.0f, 0.0f, xdiff, ydiff, zdiff, 0.0f, 1.0f, 0.0f);
func00015f04(obj->model->scale, &cctv->camrotm);
camera->toleft = 0;
camera->yleft = *(s32 *)&camera->yleft * M_BADTAU / 65536.0f;
camera->yright = *(s32 *)&camera->yright * M_BADTAU / 65536.0f;
camera->yspeed = 0.0f;
camera->ymaxspeed = *(s32 *)&camera->ymaxspeed * M_BADTAU / 65536.0f;
camera->maxdist = *(s32 *)&camera->maxdist;
camera->yrot = camera->yleft;
cctv->toleft = 0;
cctv->yleft = *(s32 *)&cctv->yleft * M_BADTAU / 65536.0f;
cctv->yright = *(s32 *)&cctv->yright * M_BADTAU / 65536.0f;
cctv->yspeed = 0.0f;
cctv->ymaxspeed = *(s32 *)&cctv->ymaxspeed * M_BADTAU / 65536.0f;
cctv->maxdist = *(s32 *)&cctv->maxdist;
cctv->yrot = cctv->yleft;
camera->yzero = atan2f(xdiff, zdiff);
camera->xzero = M_BADTAU - atan2f(ydiff, sqrtf(xdiff * xdiff + zdiff * zdiff));
cctv->yzero = atan2f(xdiff, zdiff);
cctv->xzero = M_BADTAU - atan2f(ydiff, sqrtf(xdiff * xdiff + zdiff * zdiff));
if (xdiff || zdiff) {
// empty
}
camera->seebondtime60 = 0;
cctv->seebondtime60 = 0;
}
}
@@ -1251,27 +1251,27 @@ void setupAutogun(struct autogunobj *autogun, s32 cmdindex)
{
setupGenericObject(&autogun->base, cmdindex);
autogun->unk5f = 0;
autogun->unk90 = -1;
autogun->unk94 = -1;
autogun->unk98 = -1;
autogun->unk6c = 0;
autogun->unk70 = 0;
autogun->angleh = 0;
autogun->unk78 = 0;
autogun->unk7c = 0;
autogun->anglev = 0;
autogun->unk88 = 0;
autogun->unk8c = 0;
autogun->unk80 = *(s32 *)&autogun->unk80 * M_BADTAU / 65536.0f;
autogun->unk84 = *(s32 *)&autogun->unk84 * 100.0f / 65536.0f;
autogun->unk64 = *(s32 *)&autogun->unk64 * M_BADTAU / 65536.0f;
autogun->unk68 = *(s32 *)&autogun->unk68 * M_BADTAU / 65536.0f;
autogun->firecount = 0;
autogun->lastseebond60 = -1;
autogun->lastaimbond60 = -1;
autogun->allowsoundframe = -1;
autogun->yrot = 0;
autogun->yspeed = 0;
autogun->yzero = 0;
autogun->xrot = 0;
autogun->xspeed = 0;
autogun->xzero = 0;
autogun->barrelspeed = 0;
autogun->barrelrot = 0;
autogun->maxspeed = *(s32 *)&autogun->maxspeed * M_BADTAU / 65536.0f;
autogun->aimdist = *(s32 *)&autogun->aimdist * 100.0f / 65536.0f;
autogun->ymaxleft = *(s32 *)&autogun->ymaxleft * M_BADTAU / 65536.0f;
autogun->ymaxright = *(s32 *)&autogun->ymaxright * M_BADTAU / 65536.0f;
autogun->beam = malloc(ALIGN16(sizeof(struct beam)), MEMPOOL_STAGE);
autogun->beam->age = -1;
autogun->unk5e = 0;
autogun->firing = false;
autogun->ammoquantity = 255;
autogun->unka0 = 0;
autogun->shotbondsum = 0;
if (autogun->targetpad >= 0) {
u32 stack1;
@@ -1287,11 +1287,11 @@ void setupAutogun(struct autogunobj *autogun, s32 cmdindex)
ydiff = pad.pos.y - autogun->base.prop->pos.y;
zdiff = pad.pos.z - autogun->base.prop->pos.z;
autogun->angleh = atan2f(xdiff, zdiff);
autogun->anglev = atan2f(ydiff, sqrtf(xdiff * xdiff + zdiff * zdiff));
autogun->yzero = atan2f(xdiff, zdiff);
autogun->xzero = atan2f(ydiff, sqrtf(xdiff * xdiff + zdiff * zdiff));
} else if (autogun->base.modelnum == MODEL_CETROOFGUN) {
// Deep Sea roofgun
autogun->anglev = -1.5705462694168f;
autogun->xzero = -1.5705462694168f;
}
}
#endif
@@ -2781,7 +2781,7 @@ void setupLoadFiles(s32 stagenum)
total += setupCountCommandType(OBJTYPE_KEY);
total += setupCountCommandType(OBJTYPE_HAT);
total += setupCountCommandType(OBJTYPE_DOOR);
total += setupCountCommandType(OBJTYPE_CAMERA);
total += setupCountCommandType(OBJTYPE_CCTV);
total += setupCountCommandType(OBJTYPE_AUTOGUN);
total += setupCountCommandType(OBJTYPE_HANGINGMONITORS);
total += setupCountCommandType(OBJTYPE_SINGLEMONITOR);
@@ -2955,9 +2955,9 @@ void setupParseObjects(s32 stagenum)
setupHat((struct hatobj *)obj, index);
}
break;
case OBJTYPE_CAMERA:
case OBJTYPE_CCTV:
if (withobjs && (obj->flags2 & diffflag) == 0) {
setupCamera((struct cameraobj *)obj, index);
setupCctv((struct cctvobj *)obj, index);
}
break;
case OBJTYPE_AUTOGUN:
@@ -3362,14 +3362,14 @@ void setupParseObjects(s32 stagenum)
}
}
break;
case OBJTYPE_CAMERA2:
case OBJTYPE_CAMERAPOS:
{
struct camera2obj *camera = (struct camera2obj *)obj;
camera->unk04 = *(s32 *)&camera->unk04 / 100.0f;
camera->unk08 = *(s32 *)&camera->unk08 / 100.0f;
camera->unk0c = *(s32 *)&camera->unk0c / 100.0f;
camera->unk10 = *(s32 *)&camera->unk10 / 65536.0f;
camera->unk14 = *(s32 *)&camera->unk14 / 65536.0f;
struct cameraposobj *camera = (struct cameraposobj *)obj;
camera->x = *(s32 *)&camera->x / 100.0f;
camera->y = *(s32 *)&camera->y / 100.0f;
camera->z = *(s32 *)&camera->z / 100.0f;
camera->theta = *(s32 *)&camera->theta / 65536.0f;
camera->verta = *(s32 *)&camera->verta / 65536.0f;
}
break;
case OBJTYPE_BEGINOBJECTIVE:
+17 -17
View File
@@ -148,7 +148,7 @@ void func0f010bb0(void)
}
g_Vars.currentplayer->gunctrl.unk158c = malloc(i, MEMPOOL_STAGE);
g_Vars.currentplayer->gunctrl.unk159c = 0;
g_Vars.currentplayer->gunctrl.handfilenum = 0;
g_Vars.currentplayer->gunctrl.unk15a0 = 0;
g_Vars.currentplayer->gunctrl.unk15a4 = 0;
g_Vars.currentplayer->gunctrl.unk15b0 = 0;
@@ -210,22 +210,22 @@ void func0f010bb0(void)
g_Vars.currentplayer->aimtype = 0;
g_Vars.currentplayer->crosspos[0] = 0;
g_Vars.currentplayer->crosspos[1] = 0;
g_Vars.currentplayer->unk1668 = 0;
g_Vars.currentplayer->unk166c = 0;
g_Vars.currentplayer->unk1670 = 0.9f;
g_Vars.currentplayer->unk1674 = 0;
g_Vars.currentplayer->unk1678 = 0;
g_Vars.currentplayer->unk167c = 0;
g_Vars.currentplayer->unk1680 = 0;
g_Vars.currentplayer->unk1684 = 0.9f;
g_Vars.currentplayer->unk1688 = 0;
g_Vars.currentplayer->unk168c = -M_PI;
g_Vars.currentplayer->unk1690 = 0;
g_Vars.currentplayer->unk16d4 = 0;
g_Vars.currentplayer->crosspossum[0] = 0;
g_Vars.currentplayer->crosspossum[1] = 0;
g_Vars.currentplayer->guncrossdamp = 0.9f;
g_Vars.currentplayer->crosspos2[0] = 0;
g_Vars.currentplayer->crosspos2[1] = 0;
g_Vars.currentplayer->crosssum2[0] = 0;
g_Vars.currentplayer->crosssum2[1] = 0;
g_Vars.currentplayer->gunaimdamp = 0.9f;
g_Vars.currentplayer->aimangle.x = 0;
g_Vars.currentplayer->aimangle.y = -M_PI;
g_Vars.currentplayer->aimangle.z = 0;
g_Vars.currentplayer->copiedgoldeneye = false;
g_Vars.currentplayer->magnetattracttime = -1;
g_Vars.currentplayer->unk16dc = 0;
g_Vars.currentplayer->unk16e0 = 0;
g_Vars.currentplayer->unk16e4 = 0;
g_Vars.currentplayer->gunsync = 0;
g_Vars.currentplayer->syncchange = 0;
g_Vars.currentplayer->synccount = 0;
g_Vars.currentplayer->syncoffset = 0;
g_Vars.currentplayer->cyclesum = 0;
g_Vars.currentplayer->gunampsum = 0;
@@ -237,7 +237,7 @@ void func0f010bb0(void)
func0f09d140(HAND_LEFT);
func0f09d140(HAND_LEFT);
g_Vars.currentplayer->unk16d8 = 0;
g_Vars.currentplayer->gunammooff = 0;
g_Vars.currentplayer->gunsightoff = GUNSIGHTREASON_AIMING;
g_Vars.currentplayer->gunzoomfovs[0] = 15;
g_Vars.currentplayer->gunzoomfovs[1] = 60;
+5 -5
View File
@@ -109,7 +109,7 @@ void currentPlayerInitAnimation(void)
g_Vars.currentplayer->headupsum.z = 0;
g_Vars.currentplayer->resetheadpos = true;
g_Vars.currentplayer->resetheadrot = true;
g_Vars.currentplayer->unk03a8 = true;
g_Vars.currentplayer->resetheadtick = true;
g_Vars.currentplayer->headbodyoffset.x = 0;
g_Vars.currentplayer->headbodyoffset.y = 0;
g_Vars.currentplayer->headbodyoffset.z = 0;
@@ -147,14 +147,14 @@ void currentPlayerInitAnimation(void)
func0001b3bc(&g_Vars.currentplayer->model);
func000159b0(&sp48);
sp88.matrix = &sp48;
sp88.unk10 = &g_Vars.currentplayer->unk0510;
sp88.unk10 = g_Vars.currentplayer->bondheadmatrices;
func0001cebc(&sp88, &g_Vars.currentplayer->model);
g_Vars.currentplayer->standheight = g_Vars.currentplayer->unk0510.m[3][1];
g_Vars.currentplayer->standheight = g_Vars.currentplayer->bondheadmatrices[0].m[3][1];
g_Vars.currentplayer->standbodyoffset.x = 0;
g_Vars.currentplayer->standbodyoffset.y = g_Vars.currentplayer->unk0550.m[3][1] - g_Vars.currentplayer->unk0510.m[3][1];
g_Vars.currentplayer->standbodyoffset.z = g_Vars.currentplayer->unk0550.m[3][2] - g_Vars.currentplayer->unk0510.m[3][2];
g_Vars.currentplayer->standbodyoffset.y = g_Vars.currentplayer->bondheadmatrices[1].m[3][1] - g_Vars.currentplayer->bondheadmatrices[0].m[3][1];
g_Vars.currentplayer->standbodyoffset.z = g_Vars.currentplayer->bondheadmatrices[1].m[3][2] - g_Vars.currentplayer->bondheadmatrices[0].m[3][2];
modelSetAnimation(&g_Vars.currentplayer->model,
var80075c00[g_Vars.currentplayer->headanim].animnum,
+2 -2
View File
@@ -18,7 +18,7 @@ void func0f015010(void)
case OBJTYPE_BASIC:
case OBJTYPE_KEY:
case OBJTYPE_ALARM:
case OBJTYPE_CAMERA:
case OBJTYPE_CCTV:
case OBJTYPE_AMMOCRATE:
case OBJTYPE_WEAPON:
case OBJTYPE_SINGLEMONITOR:
@@ -69,7 +69,7 @@ void func0f015010(void)
case OBJTYPE_RENAMEOBJ:
case OBJTYPE_PADLOCKEDDOOR:
case OBJTYPE_SAFEITEM:
case OBJTYPE_CAMERA2:
case OBJTYPE_CAMERAPOS:
case OBJTYPE_CONDITIONALSCENERY:
case OBJTYPE_BLOCKEDPATH:
case OBJTYPE_END:
+4 -4
View File
@@ -33,7 +33,7 @@ u32 setupGetCommandLength(u32 *cmd)
case OBJTYPE_24: return 23;
case OBJTYPE_KEY: return 24;
case OBJTYPE_ALARM: return 23;
case OBJTYPE_CAMERA: return 49;
case OBJTYPE_CCTV: return 49;
case OBJTYPE_AMMOCRATE: return 24;
case OBJTYPE_WEAPON: return 26;
case OBJTYPE_SINGLEMONITOR: return 53;
@@ -66,7 +66,7 @@ u32 setupGetCommandLength(u32 *cmd)
case OBJTYPE_TRUCK: return 34;
case OBJTYPE_HELI: return 35;
case OBJTYPE_TANK: return 32;
case OBJTYPE_CAMERA2: return 7;
case OBJTYPE_CAMERAPOS: return 7;
case OBJTYPE_LIFT: return 37;
case OBJTYPE_CONDITIONALSCENERY: return 5;
case OBJTYPE_BLOCKEDPATH: return 4;
@@ -317,7 +317,7 @@ struct defaultobj *setupCommandGetObject(u32 cmdindex)
case OBJTYPE_BASIC:
case OBJTYPE_KEY:
case OBJTYPE_ALARM:
case OBJTYPE_CAMERA:
case OBJTYPE_CCTV:
case OBJTYPE_AMMOCRATE:
case OBJTYPE_WEAPON:
case OBJTYPE_SINGLEMONITOR:
@@ -366,7 +366,7 @@ struct defaultobj *setupCommandGetObject(u32 cmdindex)
case OBJTYPE_RENAMEOBJ:
case OBJTYPE_PADLOCKEDDOOR:
case OBJTYPE_SAFEITEM:
case OBJTYPE_CAMERA2:
case OBJTYPE_CAMERAPOS:
case OBJTYPE_CONDITIONALSCENERY:
case OBJTYPE_BLOCKEDPATH:
case OBJTYPE_PADEFFECT:
+35 -35
View File
@@ -6069,7 +6069,7 @@ glabel var7f1ac320
/* f09a828: a2060005 */ sb $a2,0x5($s0)
.L0f09a82c:
/* f09a82c: 8fa4005c */ lw $a0,0x5c($sp)
/* f09a830: 0fc288c2 */ jal func0f0a2308
/* f09a830: 0fc288c2 */ jal handResetSlideInc
/* f09a834: afa70064 */ sw $a3,0x64($sp)
/* f09a838: 82020004 */ lb $v0,0x4($s0)
/* f09a83c: 44803000 */ mtc1 $zero,$f6
@@ -6399,7 +6399,7 @@ glabel var7f1ac320
/* f09a828: a2060005 */ sb $a2,0x5($s0)
.L0f09a82c:
/* f09a82c: 8fa4005c */ lw $a0,0x5c($sp)
/* f09a830: 0fc288c2 */ jal func0f0a2308
/* f09a830: 0fc288c2 */ jal handResetSlideInc
/* f09a834: afa70064 */ sw $a3,0x64($sp)
/* f09a838: 82020004 */ lb $v0,0x4($s0)
/* f09a83c: 44803000 */ mtc1 $zero,$f6
@@ -6729,7 +6729,7 @@ glabel var7f1ac320
/* f098864: a2060005 */ sb $a2,0x5($s0)
.NB0f098868:
/* f098868: 8fa40054 */ lw $a0,0x54($sp)
/* f09886c: 0fc28021 */ jal func0f0a2308
/* f09886c: 0fc28021 */ jal handResetSlideInc
/* f098870: afa7005c */ sw $a3,0x5c($sp)
/* f098874: 82020004 */ lb $v0,0x4($s0)
/* f098878: 44803000 */ mtc1 $zero,$f6
@@ -7009,7 +7009,7 @@ const char var7f1ab898[] = "rofftime";
// hand->flashon = true;
// }
//
// func0f0a2308(handnum);
// handResetSlideInc(handnum);
//
// hand->loadslide = 0;
//
@@ -7307,7 +7307,7 @@ bool handTickIncAttackingShoot(struct handweaponinfo *info, s32 handnum, struct
if (autofunc->unk48 != NULL && autofunc->unk4c != NULL) {
func0f097b64(autofunc->unk48, autofunc->unk4c, hand->gs_float1, auStack68);
func0f097b40(&hand->unk088c, auStack68, &hand->unk08bc);
func0f097b40(hand->upgrademult, auStack68, hand->finalmult);
}
}
@@ -9602,30 +9602,30 @@ void func0f09d8dc(f32 breathing, f32 arg1, f32 arg2, f32 arg3, f32 arg4)
player->syncoffset++;
}
player->unk16e4 += g_Vars.lvupdate240freal;
player->synccount += g_Vars.lvupdate240freal;
if (player->unk16e4 > 60.0f) {
player->unk16e4 = 0.0f;
player->unk16e0 = (random() * (1.0f / U32_MAX) - 0.5f) * 0.2f / 60.0f;
if (player->synccount > 60.0f) {
player->synccount = 0.0f;
player->syncchange = (random() * (1.0f / U32_MAX) - 0.5f) * 0.2f / 60.0f;
}
if (player->unk16e0 + sp4c > 0.0f) {
player->unk16dc += player->unk16e0;
if (player->syncchange + sp4c > 0.0f) {
player->gunsync += player->syncchange;
}
if (player->unk16dc > 0.5f) {
player->unk16dc = 0.5f;
} else if (player->unk16dc < -0.5f) {
player->unk16dc = -0.5f;
} else if (player->unk16dc < 0.1f && player->unk16dc > -0.1f) {
if (player->unk16dc > 0.0f) {
player->unk16dc = -0.1f;
if (player->gunsync > 0.5f) {
player->gunsync = 0.5f;
} else if (player->gunsync < -0.5f) {
player->gunsync = -0.5f;
} else if (player->gunsync < 0.1f && player->gunsync > -0.1f) {
if (player->gunsync > 0.0f) {
player->gunsync = -0.1f;
} else {
player->unk16dc = 0.1f;
player->gunsync = 0.1f;
}
}
dampt[1] = dampt[0] + player->syncoffset + player->unk16dc;
dampt[1] = dampt[0] + player->syncoffset + player->gunsync;
while (dampt[1] >= 1.0f) {
func0f09d140(HAND_LEFT);
@@ -16448,9 +16448,9 @@ void handSetAdjustPos(f32 angle)
player->hands[1].adjustpos.z = (1 - cosf(angle)) * 5;
}
void func0f0a2308(s32 handnum)
void handResetSlideInc(s32 handnum)
{
g_Vars.currentplayer->hands[handnum].unk084c = 1;
g_Vars.currentplayer->hands[handnum].slideinc = 1;
}
GLOBAL_ASM(
@@ -24893,9 +24893,9 @@ void func0f0a6c30(void)
}
player->visionmode = VISIONMODE_XRAY;
player->unk0251 = 24;
player->unk0252 = 8;
player->unk0253 = 24;
player->ecol_1 = 24;
player->ecol_2 = 8;
player->ecol_3 = 24;
player->epcol_0 = 2;
player->epcol_1 = 0;
player->epcol_2 = 1;
@@ -24910,9 +24910,9 @@ void func0f0a6c30(void)
}
player->visionmode = VISIONMODE_XRAY;
player->unk0251 = 16;
player->unk0252 = 24;
player->unk0253 = 8;
player->ecol_1 = 16;
player->ecol_2 = 24;
player->ecol_3 = 8;
player->epcol_0 = 0;
player->epcol_1 = 1;
player->epcol_2 = 2;
@@ -30369,12 +30369,12 @@ void func0f0a94d0(u32 operation, struct coord *pos, struct coord *rot)
}
}
void func0f0a95ec(u32 arg0, bool enable)
void currentPlayerSetGunAmmoVisible(u32 reason, bool enable)
{
if (enable) {
g_Vars.currentplayer->unk16d8 &= ~arg0;
g_Vars.currentplayer->gunammooff &= ~reason;
} else {
g_Vars.currentplayer->unk16d8 |= arg0;
g_Vars.currentplayer->gunammooff |= reason;
}
}
@@ -36797,10 +36797,10 @@ void func0f0abd30(s32 handnum)
}
}
hand->unk088c = 1;
hand->unk0890 = 1;
hand->unk08bc = 1;
hand->unk08c0 = 1;
hand->upgrademult[0] = 1;
hand->upgrademult[1] = 1;
hand->finalmult[0] = 1;
hand->finalmult[1] = 1;
if (gunctrl->ammotypes[0] >= 0) {
abmagReset(&hand->abmag);
+7 -7
View File
@@ -657,7 +657,7 @@ glabel var7f1ad568
/* f0b73b4: 8e4a0284 */ lw $t2,0x284($s2)
/* f0b73b8: ad4016d8 */ sw $zero,0x16d8($t2)
/* f0b73bc: 8e4c0284 */ lw $t4,0x284($s2)
/* f0b73c0: 0fc37e87 */ jal currentPlayerUnsetFlag
/* f0b73c0: 0fc37e87 */ jal currentPlayerSetHudmsgsOn
/* f0b73c4: ad8b17a4 */ sw $t3,0x17a4($t4)
/* f0b73c8: 8e4d0284 */ lw $t5,0x284($s2)
/* f0b73cc: 3c0141f0 */ lui $at,0x41f0
@@ -978,7 +978,7 @@ glabel var7f1ad568
// g_Vars.currentplayer->unk16d8 = 0;
// g_Vars.currentplayer->gunsightoff = 2;
//
// currentPlayerUnsetFlag(0xffffffff);
// currentPlayerSetHudmsgsOn(0xffffffff);
//
// angle = M_BADTAU - scenarioChooseSpawnLocation(30, &pos, rooms, g_Vars.currentplayer->prop); // var7f1ad534
//
@@ -1193,7 +1193,7 @@ void currentPlayerResetToDefault(void)
g_Vars.currentplayer->bondshotspeed[2] = 0;
g_Vars.currentplayer->docentreupdown = 0;
g_Vars.currentplayer->unk0104 = 0;
g_Vars.currentplayer->lastupdown60 = 0;
g_Vars.currentplayer->prevupdown = 0;
g_Vars.currentplayer->movecentrerelease = 0;
g_Vars.currentplayer->lookaheadcentreenabled = true;
@@ -5488,7 +5488,7 @@ glabel var7f1ad6ac
/* f0be1e4: 0fc54d39 */ jal optionsGetAmmoOnScreen
/* f0be1e8: 8da40070 */ lw $a0,0x70($t5)
/* f0be1ec: 02a02025 */ move $a0,$s5
/* f0be1f0: 0fc2a68e */ jal func0f0a95ec
/* f0be1f0: 0fc2a68e */ jal currentPlayerSetGunAmmoVisible
/* f0be1f4: 00402825 */ move $a1,$v0
/* f0be1f8: 02a02025 */ move $a0,$s5
/* f0be1fc: 0fc2b04c */ jal currentPlayerSetGunSightVisible
@@ -7889,7 +7889,7 @@ glabel var7f1ad6ac
/* f0bdc78: 0fc54a0d */ jal optionsGetAmmoOnScreen
/* f0bdc7c: 8dc40070 */ lw $a0,0x70($t6)
/* f0bdc80: 02a02025 */ or $a0,$s5,$zero
/* f0bdc84: 0fc2a57b */ jal func0f0a95ec
/* f0bdc84: 0fc2a57b */ jal currentPlayerSetGunAmmoVisible
/* f0bdc88: 00402825 */ or $a1,$v0,$zero
/* f0bdc8c: 02a02025 */ or $a0,$s5,$zero
/* f0bdc90: 0fc2af1d */ jal currentPlayerSetGunSightVisible
@@ -10290,7 +10290,7 @@ glabel var7f1ad6ac
/* f0bb8e0: 0fc533c9 */ jal optionsGetAmmoOnScreen
/* f0bb8e4: 8dc40070 */ lw $a0,0x70($t6)
/* f0bb8e8: 02a02025 */ or $a0,$s5,$zero
/* f0bb8ec: 0fc29ce3 */ jal func0f0a95ec
/* f0bb8ec: 0fc29ce3 */ jal currentPlayerSetGunAmmoVisible
/* f0bb8f0: 00402825 */ or $a1,$v0,$zero
/* f0bb8f4: 02a02025 */ or $a0,$s5,$zero
/* f0bb8f8: 0fc2a675 */ jal currentPlayerSetGunSightVisible
@@ -12450,7 +12450,7 @@ glabel var7f1ad6ac
// bmoveSetAutoAimY(optionsGetAutoAim(g_Vars.currentplayerstats->mpindex));
// bmoveSetAutoAimX(optionsGetAutoAim(g_Vars.currentplayerstats->mpindex));
// bmoveSetAutoMoveCentreEnabled(optionsGetLookAhead(g_Vars.currentplayerstats->mpindex));
// func0f0a95ec(1, optionsGetAmmoOnScreen(g_Vars.currentplayerstats->mpindex));
// currentPlayerSetGunAmmoVisible(GUNAMMOREASON_OPTION, optionsGetAmmoOnScreen(g_Vars.currentplayerstats->mpindex));
// currentPlayerSetGunSightVisible(GUNSIGHTREASON_1, true);
//
// // dc9c
+45 -45
View File
@@ -265,7 +265,7 @@ void playerAllocate(s32 index)
g_Vars.players[index]->healthshowmode = HEALTHSHOWMODE_HIDDEN;
g_Vars.players[index]->docentreupdown = false;
g_Vars.players[index]->unk0104 = 0;
g_Vars.players[index]->lastupdown60 = 0;
g_Vars.players[index]->prevupdown = 0;
g_Vars.players[index]->movecentrerelease = 0;
g_Vars.players[index]->lookaheadcentreenabled = true;
@@ -326,7 +326,7 @@ void playerAllocate(s32 index)
g_Vars.players[index]->controldef = 2;
g_Vars.players[index]->resetheadpos = true;
g_Vars.players[index]->resetheadrot = true;
g_Vars.players[index]->unk03a8 = true;
g_Vars.players[index]->resetheadtick = true;
g_Vars.players[index]->headanim = 0;
g_Vars.players[index]->headdamp = (PAL ? 0.9166f : 0.93f);
@@ -380,15 +380,15 @@ void playerAllocate(s32 index)
g_Vars.players[index]->floorflags = 0;
for (i = 0; i < 2; i++) {
g_Vars.players[index]->unk0610[i].unk00 = 640;
g_Vars.players[index]->unk0610[i].unk02 = (PAL ? 544 : 480);
g_Vars.players[index]->unk0610[i].unk04 = 511;
g_Vars.players[index]->unk0610[i].unk06 = 0;
g_Vars.players[index]->viewport[i].unk00 = 640;
g_Vars.players[index]->viewport[i].unk02 = (PAL ? 544 : 480);
g_Vars.players[index]->viewport[i].unk04 = 511;
g_Vars.players[index]->viewport[i].unk06 = 0;
g_Vars.players[index]->unk0610[i].unk08 = 640;
g_Vars.players[index]->unk0610[i].unk0a = (PAL ? 544 : 480);
g_Vars.players[index]->unk0610[i].unk0c = 511;
g_Vars.players[index]->unk0610[i].unk0e = 0;
g_Vars.players[index]->viewport[i].unk08 = 640;
g_Vars.players[index]->viewport[i].unk0a = (PAL ? 544 : 480);
g_Vars.players[index]->viewport[i].unk0c = 511;
g_Vars.players[index]->viewport[i].unk0e = 0;
}
g_Vars.players[index]->viewx = 100;
@@ -438,34 +438,34 @@ void playerAllocate(s32 index)
g_Vars.players[index]->crosspos[0] = 0;
g_Vars.players[index]->crosspos[1] = 0;
g_Vars.players[index]->unk1668 = 0;
g_Vars.players[index]->unk166c = 0;
g_Vars.players[index]->unk1670 = 0.9f;
g_Vars.players[index]->crosspossum[0] = 0;
g_Vars.players[index]->crosspossum[1] = 0;
g_Vars.players[index]->guncrossdamp = 0.9f;
g_Vars.players[index]->hands[HAND_LEFT].crosspos[0] = 0;
g_Vars.players[index]->hands[HAND_LEFT].crosspos[1] = 0;
g_Vars.players[index]->hands[HAND_LEFT].unk0cd4 = 0;
g_Vars.players[index]->hands[HAND_LEFT].unk0cd8 = 0;
g_Vars.players[index]->hands[HAND_LEFT].guncrosspossum[0] = 0;
g_Vars.players[index]->hands[HAND_LEFT].guncrosspossum[1] = 0;
g_Vars.players[index]->hands[HAND_RIGHT].crosspos[0] = 0;
g_Vars.players[index]->hands[HAND_RIGHT].crosspos[1] = 0;
g_Vars.players[index]->hands[HAND_RIGHT].unk0cd4 = 0;
g_Vars.players[index]->hands[HAND_RIGHT].unk0cd8 = 0;
g_Vars.players[index]->hands[HAND_RIGHT].guncrosspossum[0] = 0;
g_Vars.players[index]->hands[HAND_RIGHT].guncrosspossum[1] = 0;
g_Vars.players[index]->unk1674 = 0;
g_Vars.players[index]->unk1678 = 0;
g_Vars.players[index]->unk167c = 0;
g_Vars.players[index]->unk1680 = 0;
g_Vars.players[index]->unk1684 = 0.9f;
g_Vars.players[index]->unk1688 = 0;
g_Vars.players[index]->unk168c = -M_PI;
g_Vars.players[index]->unk1690 = 0;
g_Vars.players[index]->crosspos2[0] = 0;
g_Vars.players[index]->crosspos2[1] = 0;
g_Vars.players[index]->crosssum2[0] = 0;
g_Vars.players[index]->crosssum2[1] = 0;
g_Vars.players[index]->gunaimdamp = 0.9f;
g_Vars.players[index]->aimangle.x = 0;
g_Vars.players[index]->aimangle.y = -M_PI;
g_Vars.players[index]->aimangle.z = 0;
g_Vars.players[index]->unk16d4 = 0;
g_Vars.players[index]->unk16d8 = 0;
g_Vars.players[index]->unk16dc = 0;
g_Vars.players[index]->unk16e0 = 0;
g_Vars.players[index]->unk16e4 = 0;
g_Vars.players[index]->copiedgoldeneye = 0;
g_Vars.players[index]->gunammooff = 0;
g_Vars.players[index]->gunsync = 0;
g_Vars.players[index]->syncchange = 0;
g_Vars.players[index]->synccount = 0;
g_Vars.players[index]->syncoffset = 0;
g_Vars.players[index]->cyclesum = 0;
g_Vars.players[index]->gunampsum = 0;
@@ -529,8 +529,8 @@ void playerAllocate(s32 index)
g_Vars.players[index]->zoominfovynew = 60;
g_Vars.players[index]->fovy = 60;
g_Vars.players[index]->aspect = 640.0f / (PAL ? 544.0f : 480.0f);
g_Vars.players[index]->flags = 0;
g_Vars.players[index]->unk1860 = -1;
g_Vars.players[index]->hudmessoff = 0;
g_Vars.players[index]->bondmesscnt = -1;
g_Vars.players[index]->weapons = NULL;
g_Vars.players[index]->equipment = NULL;
@@ -567,21 +567,21 @@ void playerAllocate(s32 index)
g_Vars.players[index]->activatetimethis = 0;
g_Vars.players[index]->bondmovemode = MOVEMODE_WALK;
g_Vars.players[index]->unk1a48 = 0;
g_Vars.players[index]->unk1a4c = 0;
g_Vars.players[index]->unk1a50 = 0;
g_Vars.players[index]->unk1a54 = 0;
g_Vars.players[index]->unk1a58 = 0;
g_Vars.players[index]->unk1a5c = 0;
g_Vars.players[index]->unk1a60 = 0;
g_Vars.players[index]->unk1a64 = 0;
g_Vars.players[index]->unk1a68 = 0;
g_Vars.players[index]->bondtankthetaspeedsum = 0;
g_Vars.players[index]->bondtankverta = 0;
g_Vars.players[index]->bondtankvertasum = 0;
g_Vars.players[index]->bondturrettheta = 0;
g_Vars.players[index]->bondturretthetasum = 0;
g_Vars.players[index]->bondturretspeedsum = 0;
g_Vars.players[index]->bondturretside = 0;
g_Vars.players[index]->bondturretchange = 0;
g_Vars.players[index]->bondtankslowtime = 0;
g_Vars.players[index]->hoverbike = NULL;
g_Vars.players[index]->bondonground = false;
g_Vars.players[index]->tank = NULL;
g_Vars.players[index]->unk1af0 = NULL;
g_Vars.players[index]->unk1af4 = 0;
g_Vars.players[index]->bondonturret = 0;
g_Vars.players[index]->grabbedprop = NULL;
g_Vars.players[index]->bondtankexplode = false;
g_Vars.players[index]->tickdiefinished = false;
@@ -633,9 +633,9 @@ void playerAllocate(s32 index)
g_Vars.players[index]->footstepdist = 0;
g_Vars.players[index]->unk1c64 = 0;
g_Vars.players[index]->unk1c44 = 0;
g_Vars.players[index]->unk1c48 = 0;
g_Vars.players[index]->unk1c4c = 0;
g_Vars.players[index]->bondextrapos.x = 0;
g_Vars.players[index]->bondextrapos.y = 0;
g_Vars.players[index]->bondextrapos.z = 0;
g_Vars.players[index]->disguised = false;
g_Vars.players[index]->dostartnewlife = false;
+5 -5
View File
@@ -173,13 +173,13 @@ void *func0f12955c(s32 count, s32 index, s32 arg2, s32 arg3)
&& chr->prop
&& (chr->prop->flags & PROPFLAG_80) == 0
&& chr->actiontype == ACT_DEAD
&& chr->act_dead.allowreap == false) {
&& chr->act_dead.fadewheninvis == false) {
if (tally < 6) {
chrs[tally] = chr;
tally++;
} else {
rand = random() % tally;
chrEnableReap(chrs[rand]);
chrFadeCorpseWhenOffScreen(chrs[rand]);
chrs[rand] = chr;
}
}
@@ -194,7 +194,7 @@ void *func0f12955c(s32 count, s32 index, s32 arg2, s32 arg3)
i = random() % tally;
if (chrs[i]) {
chrEnableReap(chrs[i]);
chrFadeCorpseWhenOffScreen(chrs[i]);
chrs[i] = NULL;
rand--;
}
@@ -351,7 +351,7 @@ glabel func0f12955c
.NB0f1243bc:
/* f1243bc: 028fc821 */ addu $t9,$s4,$t7
/* f1243c0: 00608825 */ or $s1,$v1,$zero
/* f1243c4: 0fc0f140 */ jal chrEnableReap
/* f1243c4: 0fc0f140 */ jal chrFadeCorpseWhenOffScreen
/* f1243c8: 8f240000 */ lw $a0,0x0($t9)
/* f1243cc: 0011c080 */ sll $t8,$s1,0x2
/* f1243d0: 02984021 */ addu $t0,$s4,$t8
@@ -382,7 +382,7 @@ glabel func0f12955c
/* f124420: 11600006 */ beqz $t3,.NB0f12443c
/* f124424: 00036080 */ sll $t4,$v1,0x2
/* f124428: 028c8021 */ addu $s0,$s4,$t4
/* f12442c: 0fc0f140 */ jal chrEnableReap
/* f12442c: 0fc0f140 */ jal chrFadeCorpseWhenOffScreen
/* f124430: 8e040000 */ lw $a0,0x0($s0)
/* f124434: ae000000 */ sw $zero,0x0($s0)
/* f124438: 2631ffff */ addiu $s1,$s1,-1
+4 -4
View File
@@ -1096,7 +1096,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr)
return 3;
case OBJTYPE_BASIC:
case OBJTYPE_ALARM:
case OBJTYPE_CAMERA:
case OBJTYPE_CCTV:
case OBJTYPE_CHR:
case OBJTYPE_SINGLEMONITOR:
case OBJTYPE_MULTIMONITOR:
@@ -1121,7 +1121,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr)
case OBJTYPE_SAFE:
case OBJTYPE_SAFEITEM:
case OBJTYPE_TANK:
case OBJTYPE_CAMERA2:
case OBJTYPE_CAMERAPOS:
case OBJTYPE_TINTEDGLASS:
break;
}
@@ -3970,7 +3970,7 @@ f32 aibotCalculateMaxSpeed(struct chrdata *chr)
speed *= 0.5f;
} else if (chr->actiontype == ACT_GOPOS
&& chr->act_gopos.waypoints[chr->act_gopos.curindex] == NULL
&& chrGetLateralDistanceToCoord(chr, &chr->act_gopos.pos) < 200) {
&& chrGetLateralDistanceToCoord(chr, &chr->act_gopos.endpos) < 200) {
speed *= 0.5f;
}
@@ -12640,6 +12640,6 @@ void func0f197544(struct chrdata *chr)
}
if (!pass) {
chrGoToPos(chr, &chr->act_gopos.pos, chr->act_gopos.rooms, chr->act_gopos.flags);
chrGoToPos(chr, &chr->act_gopos.endpos, chr->act_gopos.endrooms, chr->act_gopos.flags);
}
}
+4 -4
View File
@@ -6088,14 +6088,14 @@ glabel var7f1aded8
);
#endif
void currentPlayerUnsetFlag(u32 flag)
void currentPlayerSetHudmsgsOn(u32 reason)
{
g_Vars.currentplayer->flags &= ~flag;
g_Vars.currentplayer->hudmessoff &= ~reason;
}
void currentPlayerSetFlag(u32 flag)
void currentPlayerSetHudmsgsOff(u32 reason)
{
g_Vars.currentplayer->flags |= flag;
g_Vars.currentplayer->hudmessoff |= reason;
}
void hudmsgRemoveForDeadPlayer(s32 playernum)
+10 -10
View File
@@ -33744,9 +33744,9 @@ void escastepTick(struct prop *prop)
}
}
void cameraTick(struct prop *camprop)
void cctvTick(struct prop *camprop)
{
struct cameraobj *camera = (struct cameraobj *)camprop->obj;
struct cctvobj *camera = (struct cctvobj *)camprop->obj;
struct defaultobj *obj = camprop->obj;
f32 yaw;
struct prop *playerprop;
@@ -46827,8 +46827,8 @@ s32 objTick(struct prop *prop)
if (obj->type == OBJTYPE_DOOR) {
doorTick(prop);
} else if (obj->type == OBJTYPE_CAMERA && (obj->flags & OBJFLAG_DEACTIVATED) == 0) {
cameraTick(prop);
} else if (obj->type == OBJTYPE_CCTV && (obj->flags & OBJFLAG_DEACTIVATED) == 0) {
cctvTick(prop);
} else if (obj->type == OBJTYPE_FAN) {
fanTick(prop);
} else if (obj->type == OBJTYPE_AUTOGUN && (obj->flags & OBJFLAG_DEACTIVATED) == 0) {
@@ -58125,7 +58125,7 @@ bool func0f085158(struct defaultobj *obj)
case OBJTYPE_DOOR:
case OBJTYPE_BASIC:
case OBJTYPE_ALARM:
case OBJTYPE_CAMERA:
case OBJTYPE_CCTV:
case OBJTYPE_SINGLEMONITOR:
case OBJTYPE_MULTIMONITOR:
case OBJTYPE_HANGINGMONITORS:
@@ -72458,18 +72458,18 @@ glabel var7f1ab19c
);
#endif
void countdownTimerSetVisible(u32 flag, bool show)
void countdownTimerSetVisible(u32 reason, bool visible)
{
if (show) {
g_CountdownTimerVisible &= ~flag;
if (visible) {
g_CountdownTimerVisible &= ~reason;
} else {
g_CountdownTimerVisible |= flag;
g_CountdownTimerVisible |= reason;
}
}
bool countdownTimerIsHidden(void)
{
return g_CountdownTimerVisible < 1;
return !g_CountdownTimerVisible;
}
void countdownTimerSetValue(f32 frames)
+5 -2
View File
@@ -3793,10 +3793,13 @@
bool_enable, \
bool_unknown,
#define set_autoturret_type(object, type) \
/**
* Define the team that an autogun should shoot at.
*/
#define set_autogun_target_team(object, team) \
mkshort(0x01b8), \
object, \
type,
team,
/**
* Shuffle the generator switches in Pelagic II.
+11 -5
View File
@@ -644,6 +644,9 @@
#define CONTROLMODE_23 6
#define CONTROLMODE_24 7
#define COUNTDOWNTIMERREASON_AI 0x01
#define COUNTDOWNTIMERREASON_NOCONTROL 0x10
#define COVERFLAG_0001 0x0001
#define COVERFLAG_INUSE 0x0002
#define COVERFLAG_AIMSAMEROOM 0x0004 // look + 6 metres is in the same room
@@ -976,6 +979,9 @@
#define GUNMEMOWNER_10 10
#define GUNMEMOWNER_11 11
#define GUNAMMOREASON_OPTION 0x01
#define GUNAMMOREASON_NOCONTROL 0x02
#define GUNSIGHTREASON_1 0x01
#define GUNSIGHTREASON_AIMING 0x02
#define GUNSIGHTREASON_NOCONTROL 0x04
@@ -1071,6 +1077,8 @@
#define HUDMSGFLAG_4 0x4
#define HUDMSGFLAG_ALLOWDUPES 0x8
#define HUDMSGREASON_NOCONTROL 0x00000002
#define HUDMSGSTATE_FREE 0
#define HUDMSGSTATE_QUEUED 1
#define HUDMSGSTATE_FADINGIN 3
@@ -2975,7 +2983,7 @@
#define OBJTYPE_BASIC 0x03
#define OBJTYPE_KEY 0x04
#define OBJTYPE_ALARM 0x05
#define OBJTYPE_CAMERA 0x06
#define OBJTYPE_CCTV 0x06
#define OBJTYPE_AMMOCRATE 0x07
#define OBJTYPE_WEAPON 0x08
#define OBJTYPE_CHR 0x09
@@ -3015,7 +3023,7 @@
#define OBJTYPE_SAFE 0x2b
#define OBJTYPE_SAFEITEM 0x2c
#define OBJTYPE_TANK 0x2d
#define OBJTYPE_CAMERA2 0x2e
#define OBJTYPE_CAMERAPOS 0x2e
#define OBJTYPE_TINTEDGLASS 0x2f
#define OBJTYPE_LIFT 0x30
#define OBJTYPE_CONDITIONALSCENERY 0x31
@@ -3114,8 +3122,6 @@
#define PDMODEPROP_DAMAGE 2
#define PDMODEPROP_ACCURACY 3
#define PLAYERFLAG_NOCONTROL 0x00000002
#define PORTALCMD_END 0x00
#define PORTALCMD_PUSH 0x01
#define PORTALCMD_POP 0x02
@@ -3756,7 +3762,7 @@
#define VOICEBOX_FEMALE 3
#define WAYMODE_EXPENSIVE 0
#define WAYMODE_CHEAP 6
#define WAYMODE_MAGIC 6
#define WEAPON_NONE 0x00
#define WEAPON_UNARMED 0x01
+6 -6
View File
@@ -26,7 +26,7 @@ void func0f02e3dc(struct coord *a, struct coord *b, struct coord *c, struct coor
void func0f02e4f8(struct coord *arg0, struct coord *arg1, struct coord *dst);
f32 func0f02e550(struct prop *prop, f32 arg1, f32 arg2, u32 arg3, f32 ymax, f32 ymin);
f32 func0f02e684(struct prop *prop, f32 arg1, f32 arg2);
void chrStandChooseAnimation(struct chrdata *chr, f32 arg1);
void chrStandChooseAnimation(struct chrdata *chr, f32 mergetime);
void chrStand(struct chrdata *chr);
bool chrFaceCover(struct chrdata *chr);
void chrKneelChooseAnimation(struct chrdata *chr);
@@ -51,7 +51,7 @@ void chrAttack(struct chrdata *chr, struct attackanimgroup **animgroups, bool fl
void chrAttackAmount(struct chrdata *chr, u32 attackflags, u32 entityid, u32 maxshots);
void chrBeginDeath(struct chrdata *chr, struct coord *dir, f32 relangle, s32 ibh, struct shorthand *hand, bool knockout, s32 aplayernum);
void chrBeginArgh(struct chrdata *chr, f32 angle, s32 ibh);
void chrReactToDamage(struct chrdata *chr, struct coord *pos, f32 angle, s32 ibh, struct shorthand *hand, s32 playernum);
void chrReactToDamage(struct chrdata *chr, struct coord *dir, f32 angle, s32 ibh, struct shorthand *hand, s32 playernum);
void chrYeetFromPos(struct chrdata *chr, struct coord *pos, f32 arg2);
s32 handGetBlurAmount(struct shorthand *hand);
void chrKnockOut(struct chrdata *chr, f32 angle, s32 ibh, struct shorthand *hand);
@@ -76,7 +76,7 @@ bool chrCanRollInDirection(struct chrdata *chr, bool toleft, f32 distance);
void chrGetSideVector(struct chrdata *chr, bool side, struct coord *vector);
bool chrCanJumpInDirection(struct chrdata *chr, bool side, f32 distance);
s32 func0f036c08(struct chrdata *chr, struct coord *arg1, s16 *rooms);
void chrGoPosInitCheap(struct chrdata *chr, struct waydata *waydata, struct coord *arg2, struct coord *prevpos);
void chrGoPosInitMagic(struct chrdata *chr, struct waydata *waydata, struct coord *arg2, struct coord *prevpos);
void chrGoPosGetCurWaypointInfoWithFlags(struct chrdata *chr, struct coord *pos, s16 *rooms, u32 *flags);
f32 func0f0370a8(struct chrdata *chr);
s32 chrGoPosCalculateBaseTtl(struct chrdata *chr);
@@ -223,8 +223,8 @@ bool func0f04c874(struct chrdata *chr, u32 angle360, struct coord *pos, u8 arg3,
u32 rebuildTeams(void);
u32 rebuildSquadrons(void);
u32 func0f04d000(struct chrdata *chr);
void func0f02e9a0(struct chrdata *chr, f32 arg1);
void func0f02ed28(struct chrdata *chr, f32 arg1);
void func0f02e9a0(struct chrdata *chr, f32 mergetime);
void func0f02ed28(struct chrdata *chr, f32 mergetime);
void chrStop(struct chrdata *chr);
void chrKneel(struct chrdata *chr);
void chrStartAlarm(struct chrdata *chr);
@@ -269,7 +269,7 @@ bool chrTryStartAlarm(struct chrdata *chr, s32 pad_id);
s32 chrConsiderGrenadeThrow(struct chrdata *chr, u32 attackflags, u32 entityid);
void chrTickKneel(struct chrdata *chr);
void chrFadeCorpse(struct chrdata *chr);
void chrEnableReap(struct chrdata *chr);
void chrFadeCorpseWhenOffScreen(struct chrdata *chr);
void chrTickTest(struct chrdata *chr);
void chrSetLookAngle(struct chrdata *chr, f32 angle);
f32 func0f03e578(struct chrdata *chr);
+1 -1
View File
@@ -18,7 +18,7 @@ void weaponAssignToHome(struct weaponobj *weapon, s32 cmdindex);
void setupHat(struct hatobj *hat, s32 cmdindex);
void setupKey(struct keyobj *key, s32 cmdindex);
void setupMine(struct mineobj *mine, s32 cmdindex);
void setupCamera(struct cameraobj *camera, s32 cmdindex);
void setupCctv(struct cctvobj *camera, s32 cmdindex);
void setupAutogun(struct autogunobj *autogun, s32 cmdindex);
void setupHangingMonitors(struct hangingmonitorsobj *monitors, s32 cmdindex);
void setupSingleMonitor(struct singlemonitorobj *monitor, s32 cmdindex);
+2 -2
View File
@@ -106,7 +106,7 @@ u16 weaponGetNameId(s32 weaponnum);
char *weaponGetShortName(s32 arg0);
void currentPlayerReloadHandIfPossible(s32 handnum);
void handSetAdjustPos(f32 angle);
void func0f0a2308(s32 handnum);
void handResetSlideInc(s32 handnum);
u32 func0f0a233c(void);
f32 func0f0a2498(f32 arg0, f32 arg1, f32 arg2, f32 arg3);
void func0f0a24f0(struct coord *arg0, s32 handnum);
@@ -151,7 +151,7 @@ void handSetAimPos(struct coord *coord);
void handSetHitPos(struct coord *coord);
void func0f0a9494(u32 operation);
void func0f0a94d0(u32 operation, struct coord *pos, struct coord *rot);
void func0f0a95ec(u32 arg0, bool enable);
void currentPlayerSetGunAmmoVisible(u32 reason, bool enable);
void currentPlayerSetAmmoQuantity(s32 ammotype, s32 quantity);
s32 currentPlayerGetAmmoCountWithCheck(s32 type);
s32 currentPlayerGetAmmoCount(s32 ammotype);
+2 -2
View File
@@ -25,8 +25,8 @@ void hudmsgCreate(char *text, s32 type, s32 conf00, s32 conf01, s32 conf02,
u32 textcolour, u32 shadowcolour,
u32 alignh, s32 conf16, u32 alignv, s32 conf18, s32 arg14, u32 flags);
void hudmsgsTick(void);
void currentPlayerUnsetFlag(u32 flag);
void currentPlayerSetFlag(u32 flag);
void currentPlayerSetHudmsgsOn(u32 reason);
void currentPlayerSetHudmsgsOff(u32 reason);
void hudmsgRemoveForDeadPlayer(s32 playernum);
Gfx *hudmsgsRender(Gfx *gdl);
void hudmsgsReset(void);
+2 -2
View File
@@ -25,7 +25,7 @@ bool countdownTimerIsHidden(void);
bool countdownTimerIsRunning(void);
void countdownTimerSetRunning(bool running);
void countdownTimerSetValue(f32 frames);
void countdownTimerSetVisible(u32 flag, bool show);
void countdownTimerSetVisible(u32 reason, bool visible);
void countdownTimerTick(void);
bool doorCallLift(struct prop *doorprop, bool allowclose);
bool doorIsPadlockFree(struct doorobj *door);
@@ -166,7 +166,7 @@ u32 func0f077448(void);
void platformDisplaceProps(struct prop *platform, s16 *propnums, struct coord *prevpos, struct coord *newpos);
void liftTick(struct prop *lift);
void escastepTick(struct prop *escalator);
void cameraTick(struct prop *camera);
void cctvTick(struct prop *camera);
u32 func0f078930(void);
void fanTick(struct prop *fan);
void fanUpdateModel(struct prop *fan);
+122 -230
View File
@@ -129,7 +129,7 @@ struct g_vars {
/*0002b4*/ u32 knockoutcount;
/*0002b8*/ struct textoverride *textoverrides;
/*0002bc*/ s32 roomcount;
/*0002c0*/ u32 unk0002c0;
/*0002c0*/ u32 hitboundscount;
/*0002c4*/ u32 unk0002c4;
/*0002c8*/ u32 unk0002c8;
/*0002cc*/ u32 unk0002cc;
@@ -1004,15 +1004,15 @@ struct tilething {
};
struct act_stand {
/*0x2c*/ s32 unk02c;
/*0x2c*/ s32 prestand;
/*0x30*/ u32 flags;
/*0x34*/ s32 entityid;
/*0x38*/ u32 unk038;
/*0x3c*/ s32 unk03c;
/*0x40*/ u32 unk040;
/*0x44*/ u32 unk044;
/*0x48*/ f32 unk048;
/*0x4c*/ s8 face_target;
/*0x38*/ u32 reaim;
/*0x3c*/ s32 turning;
/*0x40*/ u32 checkfacingwall;
/*0x44*/ u32 wallcount;
/*0x48*/ f32 mergetime;
/*0x4c*/ s8 playwalkanim;
};
struct act_anim {
@@ -1045,10 +1045,10 @@ struct act_die {
};
struct act_dead {
/*0x2c*/ bool allowfade;
/*0x30*/ bool allowreap;
/*0x34*/ s32 reaptimer;
/*0x38*/ s32 fadetimer;
/*0x2c*/ bool fadenow;
/*0x30*/ bool fadewheninvis;
/*0x34*/ s32 invistimer60;
/*0x38*/ s32 fadetimer60;
/*0x3c*/ s32 notifychrindex;
};
@@ -1066,9 +1066,9 @@ struct shorthand {
};
struct act_preargh {
/*0x2c*/ struct coord pos;
/*0x38*/ f32 angle;
/*0x3c*/ s32 ibh;
/*0x2c*/ struct coord dir;
/*0x38*/ f32 relshotdir;
/*0x3c*/ s32 hitpart;
/*0x40*/ struct shorthand hand;
/*0x44*/ s32 aplayernum;
};
@@ -1122,17 +1122,17 @@ struct act_jumpout {
struct act_runpos {
/*0x2c*/ struct coord pos;
/*0x38*/ f32 unk038;
/*0x3c*/ s32 unk03c;
/*0x40*/ f32 unk040;
/*0x38*/ f32 neardist;
/*0x3c*/ s32 eta60;
/*0x40*/ f32 turnspeed;
};
struct waydata {
/*0x00*/ s8 mode;
/*0x01*/ u8 unk01;
/*0x02*/ u8 unk02;
/*0x03*/ u8 unk03;
/*0x04*/ struct coord pos;
/*0x01*/ u8 iter;
/*0x02*/ u8 gotaimpos;
/*0x03*/ u8 gotaimposobj;
/*0x04*/ struct coord aimpos;
/*0x10*/ u32 unk10;
/*0x14*/ u32 unk14;
/*0x18*/ u32 unk18;
@@ -1140,14 +1140,15 @@ struct waydata {
/*0x20*/ u32 unk20;
/*0x24*/ u32 unk24;
/*0x28*/ s32 age;
/*0x2c*/ u32 unk2c;
/*0x30*/ s8 unk30;
/*0x2c*/ u32 aimposobj;
/*0x30*/ s8 unk30_test;
/*0x34*/ u32 unk34;
// These are the distances between the current waypoint and the previous
// when using cheap mode.
/*0x38*/ f32 segdistdone;
/*0x3c*/ f32 segdisttotal;
// when using magic mode.
/*0x38*/ f32 magicdone;
/*0x3c*/ f32 magictotal;
/*0x40*/ s32 lastvisible60;
};
struct act_patrol {
@@ -1155,13 +1156,12 @@ struct act_patrol {
/*0x030*/ s32 nextstep;
/*0x034*/ bool forward;
/*0x038*/ struct waydata waydata;
/*0x078*/ s32 unk78;
/*0x07c*/ f32 unk7c;
/*0x07c*/ f32 turnspeed;
};
struct act_gopos {
/*0x02c*/ struct coord pos; // Target pos
/*0x038*/ s16 rooms[8]; // Target rooms
/*0x02c*/ struct coord endpos;
/*0x038*/ s16 endrooms[8];
/*0x048*/ struct waypoint *target; // Target/final waypoint
// Array of pointers to the next couple of waypoints. Recalculated each time
@@ -1183,8 +1183,7 @@ struct act_gopos {
/*0x066*/ u16 restartttl;
/*0x068*/ struct waydata waydata;
/*0x0a8*/ s32 cheapend60; // lvframe60 time that the chr exited cheap method of wayfinding
/*0x0ac*/ f32 unk0ac;
/*0x0ac*/ f32 turnspeed;
};
struct act_surprised {
@@ -1198,59 +1197,29 @@ struct act_throwgrenade {
/*0x38*/ bool needsequip;
};
// This struct likely doesn't exist - act_die was used instead
struct act_druggeddrop {
/*0x2c*/ s32 notifychrindex;
/*0x30*/ f32 thudframe1;
/*0x34*/ f32 thudframe2;
};
// This struct likely doesn't exist - act_dead was used instead
struct act_druggedko {
/*0x2c*/ bool allowfade;
/*0x30*/ bool allowreap;
/*0x34*/ s32 reaptimer;
/*0x38*/ s32 fadetimer;
/*0x3c*/ u32 unk03c;
};
struct act_druggedcomingup {
/*0x2c*/ s16 timer60;
};
struct act_robotattack {
/*0x2c*/ f32 unk02c;
/*0x30*/ f32 unk030;
/*0x34*/ f32 unk034;
/*0x38*/ f32 unk038;
/*0x3c*/ f32 unk03c;
/*0x40*/ f32 unk040;
/*0x44*/ f32 unk044;
/*0x48*/ f32 unk048;
/*0x4c*/ f32 unk04c;
/*0x50*/ f32 unk050;
/*0x54*/ f32 unk054;
/*0x58*/ f32 unk058;
/*0x5c*/ u32 unk05c;
/*0x60*/ u32 unk060;
/*0x64*/ u32 unk064;
/*0x68*/ u32 unk068;
/*0x6c*/ u8 unk06c;
/*0x6d*/ u8 unk06d;
/*0x6e*/ u8 unk06e;
/*0x2c*/ struct coord pos[2];
/*0x44*/ struct coord dir[2];
/*0x5c*/ u32 guntype[2];
/*0x64*/ u32 numshots[2];
/*0x6c*/ u8 firing[2];
/*0x6e*/ u8 finished;
};
struct act_skjump {
/*0x2c*/ u8 state;
/*0x2d*/ u8 needsnewanim;
/*0x2e*/ u8 hit;
/*0x30*/ f32 xspeed;
/*0x34*/ f32 zspeed;
/*0x38*/ f32 angle;
/*0x3c*/ s32 unk03c;
/*0x40*/ struct coord newpos;
/*0x4c*/ s32 unk04c;
/*0x50*/ f32 y;
/*0x30*/ f32 vel[2];
/*0x38*/ f32 roty;
/*0x3c*/ s32 timer60; // counts down
/*0x40*/ struct coord pos;
/*0x4c*/ s32 total60;
/*0x50*/ f32 ground;
};
struct chrdata {
@@ -1298,8 +1267,8 @@ struct chrdata {
// act_bot_attackstand uses act_attack
// act_bot_attackkneel uses act_attack
// act_bot_attackstrafe uses act_attack
struct act_druggeddrop act_druggeddrop;
struct act_druggedko act_druggedko;
// act_druggeddrop uses act_die
// act_druggedko uses act_dead
struct act_druggedcomingup act_druggedcomingup;
// act_attackamount uses act_attack
struct act_robotattack act_robotattack;
@@ -1681,7 +1650,7 @@ struct keyobj { // objtype 0x04
u32 keyflags;
};
struct cameraobj { // objtype 0x06
struct cctvobj { // objtype 0x06
struct defaultobj base;
// Note y is being used as an abbreviation for yaw
@@ -1770,27 +1739,27 @@ struct hangingmonitorsobj { // objtype 0x0c
struct autogunobj { // objtype 0x0d
struct defaultobj base;
/*0x5c*/ s16 targetpad;
/*0x5e*/ u8 unk5e;
/*0x5f*/ u8 unk5f;
/*0x60*/ f32 angleh;
/*0x64*/ f32 unk64;
/*0x68*/ f32 unk68;
/*0x6c*/ f32 unk6c;
/*0x70*/ f32 unk70;
/*0x74*/ f32 anglev;
/*0x78*/ f32 unk78;
/*0x7c*/ f32 unk7c;
/*0x80*/ f32 unk80;
/*0x84*/ f32 unk84;
/*0x88*/ f32 unk88;
/*0x8c*/ f32 unk8c;
/*0x90*/ s32 unk90;
/*0x94*/ s32 unk94;
/*0x98*/ s32 unk98;
/*0x5e*/ u8 firing;
/*0x5f*/ u8 firecount;
/*0x60*/ f32 yzero;
/*0x64*/ f32 ymaxleft;
/*0x68*/ f32 ymaxright;
/*0x6c*/ f32 yrot;
/*0x70*/ f32 yspeed;
/*0x74*/ f32 xzero;
/*0x78*/ f32 xrot;
/*0x7c*/ f32 xspeed;
/*0x80*/ f32 maxspeed;
/*0x84*/ f32 aimdist;
/*0x88*/ f32 barrelspeed;
/*0x8c*/ f32 barrelrot;
/*0x90*/ s32 lastseebond60;
/*0x94*/ s32 lastaimbond60;
/*0x98*/ s32 allowsoundframe;
/*0x9c*/ struct beam *beam;
/*0xa0*/ f32 unka0;
/*0xa0*/ f32 shotbondsum;
/*0xa4*/ u32 unka4;
/*0xa8*/ u8 autogun_type;
/*0xa8*/ u8 targetteam;
/*0xa9*/ u8 ammoquantity;
};
@@ -1915,13 +1884,14 @@ struct safeitemobj {
struct safeitemobj *next;
};
struct camera2obj { // objtype 0x2e
u32 unk00;
f32 unk04;
f32 unk08;
f32 unk0c;
f32 unk10;
f32 unk14;
struct cameraposobj { // objtype 0x2e
s32 type;
f32 x;
f32 y;
f32 z;
f32 theta;
f32 verta;
s32 pad;
};
struct tintedglassobj { // objtype 0x2f
@@ -2236,9 +2206,9 @@ struct hand {
/*0x0810*/ s32 lastshootframe60;
/*0x0814*/ struct beam beam;
/*0x0840*/ f32 noiseradius;
/*0x0844*/ u32 unk0844;
/*0x0848*/ u32 unk0848;
/*0x084c*/ u32 unk084c;
/*0x0844*/ u32 fingerroty;
/*0x0848*/ u32 slidetrans;
/*0x084c*/ u32 slideinc;
/*0x0850*/ struct weaponobj *rocket;
/*0x0854*/ bool firedrocket;
/*0x0858*/ s32 loadedammo[2];
@@ -2252,30 +2222,8 @@ struct hand {
/*0x0880*/ u32 unk0880;
/*0x0884*/ u32 unk0884;
/*0x0888*/ f32 loadslide;
/*0x088c*/ f32 unk088c;
/*0x0890*/ f32 unk0890;
/*0x0894*/ u32 unk0894;
/*0x0898*/ u32 unk0898;
/*0x089c*/ u32 unk089c;
/*0x08a0*/ u32 unk08a0;
/*0x08a4*/ u32 unk08a4;
/*0x08a8*/ u32 unk08a8;
/*0x08ac*/ u32 unk08ac;
/*0x08b0*/ u32 unk08b0;
/*0x08b4*/ u32 unk08b4;
/*0x08b8*/ u32 unk08b8;
/*0x08bc*/ f32 unk08bc;
/*0x08c0*/ f32 unk08c0;
/*0x08c4*/ u32 unk08c4;
/*0x08c8*/ u32 unk08c8;
/*0x08cc*/ u32 unk08cc;
/*0x08d0*/ u32 unk08d0;
/*0x08d4*/ u32 unk08d4;
/*0x08d8*/ u32 unk08d8;
/*0x08dc*/ u32 unk08dc;
/*0x08e0*/ u32 unk08e0;
/*0x08e4*/ u32 unk08e4;
/*0x08e8*/ u32 unk08e8;
/*0x088c*/ f32 upgrademult[12];
/*0x08bc*/ f32 finalmult[12];
/*0x08ec*/ Mtxf cammtx;
/*0x092c*/ Mtxf posmtx;
/*0x096c*/ Mtxf prevmtx;
@@ -2330,11 +2278,11 @@ struct hand {
/*0x0c24*/ struct coord lastshootpos;
/*0x0c30*/ s32 shotstotake;
/*0x0c34*/ f32 shotremainder;
/*0x0c38*/ u32 unk0c38;
/*0x0c38*/ u32 hitspershot;
/*0x0c3c*/ s32 state;
/*0x0c40*/ s32 stateminor;
/*0x0c44*/ u32 stateflags;
/*0x0c48*/ u32 unk0c48;
/*0x0c48*/ u32 statemode;
/*0x0c4c*/ s32 stateframes;
/*0x0c50*/ s32 statecycles;
/*0x0c54*/ s32 statelastframe;
@@ -2365,9 +2313,8 @@ struct hand {
/*0x0cc8*/ u8 unk0cc8_08 : 1;
/*0x0cc9*/ u8 animloopcount;
/*0x0ccc*/ f32 crosspos[2];
/*0x0cd4*/ f32 unk0cd4;
/*0x0cd8*/ f32 unk0cd8;
/*0x0cdc*/ u32 unk0cdc;
/*0x0cd4*/ f32 guncrosspossum[2];
/*0x0cdc*/ u32 statejob;
/*0x0ce0*/ s32 statevar1;
/*0x0ce4*/ s32 attacktype;
/*0x0ce8*/ struct guncmd *unk0ce8;
@@ -2409,7 +2356,7 @@ struct hand {
/*0x0d6c*/ u32 unk0d6c;
/*0x0d70*/ u32 unk0d70;
/*0x0d74*/ u16 gunroundsspent[4];
/*0x0d7c*/ u32 unk0d7c;
/*0x0d7c*/ u32 ispare1;
/*0x0d80*/ struct guncmd *unk0d80;
/*0x0d84*/ struct audiohandle *audiohandle;
/*0x0d88*/ u32 ispare4;
@@ -2463,7 +2410,7 @@ struct gunctrl {
/*0x1590*/ u32 unk1590;
/*0x1594*/ struct modelfiledata *unk1594;
/*0x1598*/ s32 unk1598;
/*0x159c*/ u16 unk159c;
/*0x159c*/ u16 handfilenum;
/*0x15a0*/ s32 unk15a0;
/*0x15a4*/ s32 unk15a4;
/*0x15a8*/ u32 unk15a8;
@@ -2503,8 +2450,8 @@ struct player {
/*0x0014*/ s32 memcamroom;
/*0x0018*/ struct coord eraserpos;
/*0x0024*/ f32 eraserpropdist;
/*0x0028*/ u32 unk0028;
/*0x002c*/ u32 unk002c;
/*0x0028*/ u32 eraserbgdist;
/*0x002c*/ u32 eraserdepth;
/*0x0030*/ bool isfalling;
/*0x0034*/ s32 fallstart;
/*0x0038*/ struct coord globaldrawworldoffset;
@@ -2539,7 +2486,7 @@ struct player {
/*0x00c0*/ bool bondperimenabled;
/*0x00c4*/ u32 devicesactive;
/*0x00c8*/ s32 badrockettime;
/*0x00cc*/ u32 unk00cc;
/*0x00cc*/ u32 gunspeed;
/*0x00d0*/ s32 bondactivateorreload;
/*0x00d4*/ u32 unk00d4;
/*0x00d8*/ bool isdead;
@@ -2553,7 +2500,7 @@ struct player {
/*0x00f8*/ f32 healthshowtime;
/*0x00fc*/ u32 healthshowmode;
/*0x0100*/ s32 docentreupdown;
/*0x0104*/ u32 unk0104;
/*0x0104*/ u32 lastupdown60;
/*0x0108*/ s32 prevupdown;
/*0x010c*/ s32 movecentrerelease;
/*0x0110*/ bool lookaheadcentreenabled;
@@ -2605,9 +2552,9 @@ struct player {
/*0x024c*/ s16 invdowntime;
/*0x024e*/ s16 usedowntime;
/*0x0250*/ u8 activemenumode;
/*0x0251*/ u8 unk0251;
/*0x0252*/ u8 unk0252;
/*0x0253*/ u8 unk0253;
/*0x0251*/ u8 ecol_1;
/*0x0252*/ u8 ecol_2;
/*0x0253*/ u8 ecol_3;
/*0x0254*/ s32 erasertime; // related to FarSight's auto tracking
/*0x0258*/ f32 autoeraserdist;
/*0x025c*/ struct prop *autoerasertarget;
@@ -2659,7 +2606,7 @@ struct player {
/*0x036c*/ struct playerbond bond2;
/*0x03a0*/ bool resetheadpos;
/*0x03a4*/ bool resetheadrot;
/*0x03a8*/ bool unk03a8;
/*0x03a8*/ bool resetheadtick;
/*0x03ac*/ s32 headanim;
/*0x03b0*/ f32 headdamp;
/*0x03b4*/ s32 headwalkingtime60;
@@ -2686,41 +2633,8 @@ struct player {
/*0x0490*/ s32 eyespydarts;
/*0x0494*/ union modelrwdata *bondheadsave[30];
/*0x050c*/ u32 unk050c;
/*0x0510*/ Mtxf unk0510;
/*0x0550*/ Mtxf unk0550;
/*0x0590*/ u32 unk0590;
/*0x0594*/ u32 unk0594;
/*0x0598*/ u32 unk0598;
/*0x059c*/ u32 unk059c;
/*0x05a0*/ u32 unk05a0;
/*0x05a4*/ u32 unk05a4;
/*0x05a8*/ u32 unk05a8;
/*0x05ac*/ u32 unk05ac;
/*0x05b0*/ u32 unk05b0;
/*0x05b4*/ u32 unk05b4;
/*0x05b8*/ u32 unk05b8;
/*0x05bc*/ u32 unk05bc;
/*0x05c0*/ u32 unk05c0;
/*0x05c4*/ u32 unk05c4;
/*0x05c8*/ u32 unk05c8;
/*0x05cc*/ u32 unk05cc;
/*0x05d0*/ u32 unk05d0;
/*0x05d4*/ u32 unk05d4;
/*0x05d8*/ u32 unk05d8;
/*0x05dc*/ u32 unk05dc;
/*0x05e0*/ u32 unk05e0;
/*0x05e4*/ u32 unk05e4;
/*0x05e8*/ u32 unk05e8;
/*0x05ec*/ u32 unk05ec;
/*0x05f0*/ u32 unk05f0;
/*0x05f4*/ u32 unk05f4;
/*0x05f8*/ u32 unk05f8;
/*0x05fc*/ u32 unk05fc;
/*0x0600*/ u32 unk0600;
/*0x0604*/ u32 unk0604;
/*0x0608*/ u32 unk0608;
/*0x060c*/ u32 unk060c;
/*0x0610*/ struct player0610 unk0610[2];
/*0x0510*/ Mtxf bondheadmatrices[4];
/*0x0610*/ struct player0610 viewport[2];
/*0x0630*/ s16 viewx; // 320 lo-res, 640 hi-res
/*0x0632*/ s16 viewy; // 220 regardless of res
/*0x0634*/ s16 viewleft; // 0
@@ -2743,38 +2657,18 @@ struct player {
/*0x1624*/ struct threat lookingatprop;
/*0x1630*/ struct threat cmpfollowprops[4];
/*0x1660*/ f32 crosspos[2];
/*0x1668*/ f32 unk1668;
/*0x166c*/ f32 unk166c;
/*0x1670*/ f32 unk1670;
/*0x1674*/ f32 unk1674;
/*0x1678*/ f32 unk1678;
/*0x167c*/ f32 unk167c;
/*0x1680*/ f32 unk1680;
/*0x1684*/ f32 unk1684;
/*0x1688*/ f32 unk1688;
/*0x168c*/ f32 unk168c;
/*0x1690*/ f32 unk1690;
/*0x1694*/ u32 unk1694;
/*0x1698*/ u32 unk1698;
/*0x169c*/ u32 unk169c;
/*0x16a0*/ u32 unk16a0;
/*0x16a4*/ u32 unk16a4;
/*0x16a8*/ u32 unk16a8;
/*0x16ac*/ u32 unk16ac;
/*0x16b0*/ u32 unk16b0;
/*0x16b4*/ u32 unk16b4;
/*0x16b8*/ u32 unk16b8;
/*0x16bc*/ u32 unk16bc;
/*0x16c0*/ u32 unk16c0;
/*0x16c4*/ u32 unk16c4;
/*0x16c8*/ u32 unk16c8;
/*0x16cc*/ u32 unk16cc;
/*0x16d0*/ u32 unk16d0;
/*0x16d4*/ u32 unk16d4;
/*0x16d8*/ u32 unk16d8;
/*0x16dc*/ f32 unk16dc;
/*0x16e0*/ f32 unk16e0;
/*0x16e4*/ f32 unk16e4;
/*0x1668*/ f32 crosspossum[2];
/*0x1670*/ f32 guncrossdamp;
/*0x1674*/ f32 crosspos2[2];
/*0x167c*/ f32 crosssum2[2];
/*0x1684*/ f32 gunaimdamp;
/*0x1688*/ struct coord aimangle;
/*0x1694*/ Mtxf aimanglemat;
/*0x16d4*/ bool copiedgoldeneye;
/*0x16d8*/ u32 gunammooff;
/*0x16dc*/ f32 gunsync;
/*0x16e0*/ f32 syncchange;
/*0x16e4*/ f32 synccount;
/*0x16e8*/ s32 syncoffset;
/*0x16ec*/ f32 cyclesum;
/*0x16f0*/ f32 gunampsum;
@@ -2830,8 +2724,8 @@ struct player {
/*0x1850*/ f32 zoominfovynew;
/*0x1854*/ f32 fovy;
/*0x1858*/ f32 aspect;
/*0x185c*/ u32 flags;
/*0x1860*/ s32 unk1860;
/*0x185c*/ u32 hudmessoff;
/*0x1860*/ s32 bondmesscnt;
/*0x1864*/ struct invitem *weapons; // circular linked list, sorted
/*0x1868*/ struct invitem *equipment; // slots, allocated, unsorted
/*0x186c*/ s32 equipmaxitems;
@@ -2900,15 +2794,15 @@ struct player {
/*0x1a2c*/ struct coord grabbedposextra;
/*0x1a38*/ f32 grabbedrotextrasum;
/*0x1a3c*/ struct coord grabbedposextrasum;
/*0x1a48*/ f32 unk1a48;
/*0x1a4c*/ f32 unk1a4c;
/*0x1a50*/ f32 unk1a50;
/*0x1a54*/ f32 unk1a54;
/*0x1a58*/ f32 unk1a58;
/*0x1a5c*/ f32 unk1a5c;
/*0x1a60*/ f32 unk1a60;
/*0x1a64*/ f32 unk1a64;
/*0x1a68*/ s32 unk1a68;
/*0x1a48*/ f32 bondtankthetaspeedsum;
/*0x1a4c*/ f32 bondtankverta;
/*0x1a50*/ f32 bondtankvertasum;
/*0x1a54*/ f32 bondturrettheta;
/*0x1a58*/ f32 bondturretthetasum;
/*0x1a5c*/ f32 bondturretspeedsum;
/*0x1a60*/ f32 bondturretside;
/*0x1a64*/ f32 bondturretchange;
/*0x1a68*/ s32 bondtankslowtime;
/*0x1a6c*/ struct prop *hoverbike;
/*0x1a70*/ struct coord bondvehicleoffset;
/*0x1a7c*/ s32 bondvehiclemode;
@@ -2925,7 +2819,7 @@ struct player {
/*0x1ae8*/ f32 bondonground;
/*0x1aec*/ struct prop *tank;
/*0x1af0*/ struct prop *unk1af0;
/*0x1af4*/ u32 unk1af4;
/*0x1af4*/ u32 bondonturret;
/*0x1af8*/ s32 walkinitmove;
/*0x1afc*/ struct coord walkinitpos;
/*0x1b08*/ Mtxf walkinitmtx;
@@ -2933,7 +2827,7 @@ struct player {
/*0x1b4c*/ f32 walkinitt2;
/*0x1b50*/ struct coord walkinitstart;
/*0x1b5c*/ struct prop *grabbedprop;
/*0x1b60*/ f32 unk1b60;
/*0x1b60*/ f32 bondgrabthetaspeedsum;
/*0x1b64*/ s32 grabstarttime;
/*0x1b68*/ f32 autoaimdamp;
/*0x1b6c*/ struct coord bondforcespeed;
@@ -2985,13 +2879,11 @@ struct player {
/*0x1c38*/ s32 unk1c38;
/*0x1c3c*/ s32 unk1c3c;
/*0x1c40*/ u32 joybutinhibit;
/*0x1c44*/ f32 unk1c44;
/*0x1c48*/ f32 unk1c48;
/*0x1c4c*/ f32 unk1c4c;
/*0x1c44*/ struct coord bondextrapos;
/*0x1c50*/ u8 unk1c50_01 : 1;
/*0x1c51*/ u8 disguised : 1;
/*0x1c54*/ u32 devicesinhibit;
/*0x1c58*/ f32 unk1c58;
/*0x1c58*/ f32 grabbedforcez;
/*0x1c5c*/ f32 stealhealth;
/*0x1c60*/ s32 unk1c60;
/*0x1c64*/ s32 unk1c64;