mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-08-10 10:54:04 -04:00
Decompile chrBeginDeath
This commit is contained in:
@@ -2368,10 +2368,10 @@ u8 func1010_set_pa_negotiator_flag[] = {
|
||||
};
|
||||
|
||||
u8 func1011_setup_snipers[] = {
|
||||
set_chr_special_death_animation(CHR_SNIPER7, SPECIALDIE_1)
|
||||
set_chr_special_death_animation(CHR_SNIPER4, SPECIALDIE_2)
|
||||
set_chr_special_death_animation(CHR_SNIPER5, SPECIALDIE_3)
|
||||
set_chr_special_death_animation(CHR_SNIPER3, SPECIALDIE_4)
|
||||
set_chr_special_death_animation(CHR_SNIPER7, SPECIALDIE_FALLBACK)
|
||||
set_chr_special_death_animation(CHR_SNIPER4, SPECIALDIE_ROLL1)
|
||||
set_chr_special_death_animation(CHR_SNIPER5, SPECIALDIE_ROLL2)
|
||||
set_chr_special_death_animation(CHR_SNIPER3, SPECIALDIE_ROLL3)
|
||||
set_chr_chrflag(CHR_SNIPER3, CHRCFLAG_HAS_SPECIAL_DEATH_ANIMATION)
|
||||
set_chr_chrflag(CHR_SNIPER4, CHRCFLAG_HAS_SPECIAL_DEATH_ANIMATION)
|
||||
set_chr_chrflag(CHR_SNIPER5, CHRCFLAG_HAS_SPECIAL_DEATH_ANIMATION)
|
||||
|
||||
+581
-3784
File diff suppressed because it is too large
Load Diff
@@ -324,7 +324,7 @@ glabel func0f000648
|
||||
/* f000650: afb30024 */ sw $s3,0x24($sp)
|
||||
/* f000654: afb20020 */ sw $s2,0x20($sp)
|
||||
/* f000658: afb40028 */ sw $s4,0x28($sp)
|
||||
/* f00065c: 3c128006 */ lui $s2,%hi(var800652b8)
|
||||
/* f00065c: 3c128006 */ lui $s2,%hi(g_AnimTablesByRace)
|
||||
/* f000660: 3c138006 */ lui $s3,%hi(var80067fdc)
|
||||
/* f000664: 3c158006 */ lui $s5,%hi(var80067ff0)
|
||||
/* f000668: afbf0034 */ sw $ra,0x34($sp)
|
||||
@@ -333,7 +333,7 @@ glabel func0f000648
|
||||
/* f000674: afb00018 */ sw $s0,0x18($sp)
|
||||
/* f000678: 26b57ff0 */ addiu $s5,$s5,%lo(var80067ff0)
|
||||
/* f00067c: 26737fdc */ addiu $s3,$s3,%lo(var80067fdc)
|
||||
/* f000680: 265252b8 */ addiu $s2,$s2,%lo(var800652b8)
|
||||
/* f000680: 265252b8 */ addiu $s2,$s2,%lo(g_AnimTablesByRace)
|
||||
/* f000684: 2414ffff */ addiu $s4,$zero,-1
|
||||
.L0f000688:
|
||||
/* f000688: 8e430000 */ lw $v1,0x0($s2)
|
||||
@@ -399,9 +399,9 @@ glabel func0f000648
|
||||
/* f000760: 0275082b */ sltu $at,$s3,$s5
|
||||
/* f000764: 1420ffc8 */ bnez $at,.L0f000688
|
||||
/* f000768: 26520004 */ addiu $s2,$s2,0x4
|
||||
/* f00076c: 3c048006 */ lui $a0,%hi(var800637cc+0x1a4)
|
||||
/* f00076c: 3c048006 */ lui $a0,%hi(g_AnimTableHumanType100_A+0x1a4)
|
||||
/* f000770: 0fc00164 */ jal func0f000590
|
||||
/* f000774: 24843970 */ addiu $a0,$a0,%lo(var800637cc+0x1a4)
|
||||
/* f000774: 24843970 */ addiu $a0,$a0,%lo(g_AnimTableHumanType100_A+0x1a4)
|
||||
/* f000778: 3c118006 */ lui $s1,%hi(var80065ae0)
|
||||
/* f00077c: 3c128006 */ lui $s2,%hi(var800662d8)
|
||||
/* f000780: 3c138006 */ lui $s3,%hi(var800666c8)
|
||||
|
||||
+5
-5
@@ -2797,7 +2797,7 @@ glabel var7f1b8e7cpf
|
||||
/* f16b1f0: 8f240004 */ lw $a0,0x4($t9)
|
||||
/* f16b1f4: afa00018 */ sw $zero,0x18($sp)
|
||||
/* f16b1f8: afa00014 */ sw $zero,0x14($sp)
|
||||
/* f16b1fc: 0fc0c6bb */ jal func0f0319a8
|
||||
/* f16b1fc: 0fc0c6bb */ jal chrBeginDeath
|
||||
/* f16b200: afac0010 */ sw $t4,0x10($sp)
|
||||
/* f16b204: 8e500284 */ lw $s0,0x284($s2)
|
||||
.PF0f16b208:
|
||||
@@ -3975,13 +3975,13 @@ Gfx *lvRender(Gfx *gdl)
|
||||
sndStart(var80095200, SFX_FIREEMPTY, 0, -1, -1, -1, -1, -1);
|
||||
}
|
||||
} else { // EYESPYMODE_BOMBSPY
|
||||
struct coord spd4 = {0, 0, 0};
|
||||
s8 spd0[] = {30, 0, 0, 0};
|
||||
struct coord vel = {0, 0, 0};
|
||||
struct shorthand hand = {WEAPON_GRENADE, 0, 0, 0};
|
||||
explosionCreateSimple(g_Vars.currentplayer->eyespy->prop,
|
||||
&g_Vars.currentplayer->eyespy->prop->pos,
|
||||
g_Vars.currentplayer->eyespy->prop->rooms,
|
||||
EXPLOSIONTYPE_23, 0);
|
||||
func0f0319a8(g_Vars.currentplayer->eyespy->prop->chr, &spd4, 0, 0, spd0, 0, 0);
|
||||
chrBeginDeath(g_Vars.currentplayer->eyespy->prop->chr, &vel, 0, 0, &hand, false, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5387,7 +5387,7 @@ glabel var7f1b1fd4nb
|
||||
/* f164f08: 8de40004 */ lw $a0,0x4($t7)
|
||||
/* f164f0c: afa00018 */ sw $zero,0x18($sp)
|
||||
/* f164f10: afa00014 */ sw $zero,0x14($sp)
|
||||
/* f164f14: 0fc0c4ba */ jal func0f0319a8
|
||||
/* f164f14: 0fc0c4ba */ jal chrBeginDeath
|
||||
/* f164f18: afad0010 */ sw $t5,0x10($sp)
|
||||
/* f164f1c: 8e500284 */ lw $s0,0x284($s2)
|
||||
.NB0f164f20:
|
||||
|
||||
+12
-4
@@ -273,10 +273,16 @@
|
||||
#define ANIM_LOOK_AROUND_025D 0x025d
|
||||
#define ANIM_LOOK_AROUND_025E 0x025e
|
||||
#define ANIM_LOOK_AROUND_FRANTIC 0x025f
|
||||
#define ANIM_SPECIALDIE_FALLBACK 0x0261
|
||||
#define ANIM_SPECIALDIE_ROLL1 0x0262
|
||||
#define ANIM_SPECIALDIE_ROLL2 0x0263
|
||||
#define ANIM_SPECIALDIE_ROLL3 0x0267
|
||||
#define ANIM_SPECIALDIE_OVERRAILING 0x0268
|
||||
#define ANIM_SITTING_0265 0x0265
|
||||
#define ANIM_SNIPING_0269 0x0269
|
||||
#define ANIM_SNIPING_026A 0x026a
|
||||
#define ANIM_SNIPING_026B 0x026b
|
||||
#define ANIM_SNIPING_DIE 0x026c
|
||||
#define ANIM_DRAW_PISTOL_0288 0x0288
|
||||
#define ANIM_DRAW_PISTOL_0289 0x0289
|
||||
#define ANIM_FIX_GUN_JAM_EASY 0x0299
|
||||
@@ -744,6 +750,7 @@
|
||||
#define ENTITYTYPE_TARGET 0x0200 // aim/shoot at whatever is in the chr's `target` field
|
||||
|
||||
#define EXPLOSIONTYPE_0 0
|
||||
#define EXPLOSIONTYPE_2 2
|
||||
#define EXPLOSIONTYPE_3 3
|
||||
#define EXPLOSIONTYPE_5 5
|
||||
#define EXPLOSIONTYPE_7 7
|
||||
@@ -3048,10 +3055,10 @@
|
||||
#define SOUNDMODE_SURROUND 3
|
||||
|
||||
#define SPECIALDIE_NONE 0
|
||||
#define SPECIALDIE_1 1
|
||||
#define SPECIALDIE_2 2
|
||||
#define SPECIALDIE_3 3
|
||||
#define SPECIALDIE_4 4
|
||||
#define SPECIALDIE_FALLBACK 1
|
||||
#define SPECIALDIE_ROLL1 2
|
||||
#define SPECIALDIE_ROLL2 3
|
||||
#define SPECIALDIE_ROLL3 4
|
||||
#define SPECIALDIE_OVERRAILING 5
|
||||
#define SPECIALDIE_ONCHAIR 6
|
||||
|
||||
@@ -3177,6 +3184,7 @@
|
||||
#define STAGEFLAG_CI_IN_HOLO6 0x00800000
|
||||
#define STAGEFLAG_CI_IN_HOLO7 0x01000000
|
||||
#define STAGEFLAG_CI_GENERAL_PURPOSE 0x02000000
|
||||
#define STAGEFLAG_EYESPY_DESTROYED 0x00002000
|
||||
|
||||
#define STAGEINDEX_MAIANSOS 0x00
|
||||
#define STAGEINDEX_TEST_SILO 0x01
|
||||
|
||||
+2
-2
@@ -195,8 +195,8 @@ extern f32 var80062ca4;
|
||||
extern f32 var80062ca8;
|
||||
extern f32 var80062cac;
|
||||
extern s32 var80062cbc;
|
||||
extern struct somedruggedracethingdeep var800637cc[];
|
||||
extern struct somedruggedracething *var800652b8[NUM_RACES];
|
||||
extern struct animtablerow g_AnimTableHumanType100_A[];
|
||||
extern struct animtable *g_AnimTablesByRace[NUM_RACES];
|
||||
extern struct animfloats var800656c0[];
|
||||
extern struct var80065750 *var80065ae0[][32];
|
||||
extern struct animfloats var80065be0[];
|
||||
|
||||
@@ -49,7 +49,7 @@ void func0f030ff8(struct chrdata *chr, u32 anim_id, f32 fstartframe, f32 fendfra
|
||||
void func0f031254(struct chrdata *chr);
|
||||
void func0f031384(struct chrdata *chr, struct var80065750 **arg1, bool arg2, s32 *firing, u32 entitytype, u32 entityid, u32 arg6);
|
||||
void chrAttackAmount(struct chrdata *chr, u32 entitytype, u32 entityid, u32 arg3);
|
||||
void func0f0319a8(struct chrdata *chr, struct coord *arg1, f32 arg2, u32 arg3, s8 *arg4, u32 arg5, u32 arg6);
|
||||
void chrBeginDeath(struct chrdata *chr, struct coord *dir, f32 relangle, s32 tableid, struct shorthand *hand, bool knockout, s32 aplayernum);
|
||||
u32 func0f032ac4(void);
|
||||
void func0f032fe4(struct chrdata *chr, struct coord *pos, f32 arg2, f32 arg3, u32 *arg4, u32 arg5);
|
||||
void func0f03323c(struct chrdata *chr, struct coord *pos, f32 arg2);
|
||||
|
||||
@@ -62,7 +62,7 @@ u32 func0001d320(void);
|
||||
void modelCopyAnimForMerge(struct model *model, f32 arg1);
|
||||
void func0001d62c(struct model *model, s16 animnum, s32 flip, f32 fstartframe, f32 speed, f32 arg5);
|
||||
bool modelIsAnimMerging(struct model *model);
|
||||
void func0001dbfc(struct model *model, s16 animnum, u32 flip, f32 startframe, f32 speed, f32 arg5, bool merge);
|
||||
void modelSetAnimationWithMerge(struct model *model, s16 animnum, u32 flip, f32 startframe, f32 speed, f32 arg5, bool merge);
|
||||
void modelSetAnimation(struct model *model, s16 animnum, s32 flip, f32 fstartframe, f32 speed, f32 arg5);
|
||||
void modelCopyAnimData(struct model *src, struct model *dst);
|
||||
void modelSetAnimLooping(struct model *model, f32 loopframe, f32 loopmerge);
|
||||
|
||||
+16
-17
@@ -945,11 +945,9 @@ struct act_die {
|
||||
/*0x2c*/ s32 notifychrindex;
|
||||
/*0x30*/ f32 thudframe1;
|
||||
/*0x34*/ f32 thudframe2;
|
||||
/*0x38*/ f32 unk038;
|
||||
/*0x3c*/ u32 unk03c;
|
||||
/*0x40*/ u32 unk040;
|
||||
/*0x44*/ u32 unk044;
|
||||
/*0x48*/ u32 unk048;
|
||||
/*0x38*/ f32 timeextra;
|
||||
/*0x3c*/ f32 elapseextra;
|
||||
/*0x40*/ struct coord extraspeed; // for changing position while airborne (eg. when shot by magnum)
|
||||
/*0x4c*/ s16 drcarollimagedelay;
|
||||
};
|
||||
|
||||
@@ -963,6 +961,7 @@ struct act_dead {
|
||||
|
||||
struct act_argh {
|
||||
/*0x2c*/ s32 notifychrindex;
|
||||
/*0x30*/ s32 unk030; // lvframe60 value
|
||||
};
|
||||
|
||||
struct act_preargh {
|
||||
@@ -5088,21 +5087,21 @@ struct simdifficulty {
|
||||
s32 blurdrugamount;
|
||||
};
|
||||
|
||||
struct somedruggedracethingdeep {
|
||||
s16 unk00;
|
||||
u32 unk04;
|
||||
f32 unk08;
|
||||
f32 unk0c;
|
||||
struct animtablerow {
|
||||
s16 animnum;
|
||||
bool flip;
|
||||
f32 endframe;
|
||||
f32 speed;
|
||||
u32 unk10;
|
||||
f32 unk14;
|
||||
f32 unk18;
|
||||
f32 thudframe1;
|
||||
f32 thudframe2;
|
||||
};
|
||||
|
||||
struct somedruggedracething {
|
||||
s32 index;
|
||||
struct somedruggedracethingdeep *unk04;
|
||||
struct somedruggedracethingdeep *unk08;
|
||||
s32 unk0c;
|
||||
struct animtable {
|
||||
s32 id;
|
||||
struct animtablerow *atable;
|
||||
struct animtablerow *btable;
|
||||
s32 count;
|
||||
u32 unk10;
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -4849,7 +4849,7 @@ bool modelIsAnimMerging(struct model *model)
|
||||
return false;
|
||||
}
|
||||
|
||||
void func0001dbfc(struct model *model, s16 animnum, u32 flip, f32 startframe, f32 speed, f32 arg5, bool newmerge)
|
||||
void modelSetAnimationWithMerge(struct model *model, s16 animnum, u32 flip, f32 startframe, f32 speed, f32 arg5, bool newmerge)
|
||||
{
|
||||
if (model) {
|
||||
if (model->anim && model->anim->animnum
|
||||
|
||||
Reference in New Issue
Block a user