Decompile chrTickDie

This commit is contained in:
Ryan Dwyer 2020-02-22 22:39:41 +10:00
parent 3ee00a7654
commit ec13c9dc46
11 changed files with 651 additions and 776 deletions

View File

@ -2364,10 +2364,10 @@ u8 func1010_set_pa_negotiator_flag[] = {
};
u8 func1011_setup_snipers[] = {
set_chr_special_death_animation(CHR_SNIPER7, 0x01)
set_chr_special_death_animation(CHR_SNIPER4, 0x02)
set_chr_special_death_animation(CHR_SNIPER5, 0x03)
set_chr_special_death_animation(CHR_SNIPER3, 0x04)
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_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)

View File

@ -2883,7 +2883,7 @@ u8 func1018_keep_door_open[] = {
};
u8 func1019_setup_topstairs_death_animation[] = {
set_chr_special_death_animation(CHR_TOPSTAIRS, 0x05)
set_chr_special_death_animation(CHR_TOPSTAIRS, SPECIALDIE_OVERRAILING)
set_ailist(CHR_SELF, GAILIST_IDLE)
endlist
};
@ -3082,7 +3082,7 @@ u8 func1021_check_topstairs_guy[] = {
endloop(0x10)
label(0x04)
set_chr_special_death_animation(CHR_TOPSTAIRS, 0)
set_chr_special_death_animation(CHR_TOPSTAIRS, SPECIALDIE_NONE)
unset_chr_chrflag(CHR_TOPSTAIRS, CHRCFLAG_HAS_SPECIAL_DEATH_ANIMATION)
unset_chr_flag_bankx(CHR_TOPSTAIRS, CHRFLAG1_00001000, BANK_1)
set_ailist(CHR_SELF, GAILIST_IDLE)

File diff suppressed because it is too large Load Diff

View File

@ -98,7 +98,7 @@ u8 func0006_unalerted[] = {
object_do_animation(0x025a, 0xff, 0x02, 0xffff)
chr_do_animation(ANIM_STAND_UP_FROM_SITTING, 0, -1, 0x02, 0x10, CHR_SELF, 2)
unset_self_flag_bankx(CHRFLAG1_DOINGIDLEANIMATION, BANK_1)
set_chr_special_death_animation(CHR_SELF, 0)
set_chr_special_death_animation(CHR_SELF, SPECIALDIE_NONE)
dprint 'B','4',' ','W','A','T','\n',0,
goto_next(0x0c)
@ -792,7 +792,7 @@ u8 func0008_wakeup[] = {
// Unset special death animation if no longer idle
label(0x16)
if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x13)
set_chr_special_death_animation(CHR_SELF, 0)
set_chr_special_death_animation(CHR_SELF, SPECIALDIE_NONE)
// If idle, unset it and stand up or whatever is needed
label(0x13)
@ -864,7 +864,7 @@ u8 func0007_alerted[] = {
// If doing idle animation, turn off special death animation
label(0x16)
if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x13)
set_chr_special_death_animation(CHR_SELF, 0)
set_chr_special_death_animation(CHR_SELF, SPECIALDIE_NONE)
// If something, jump to combat
label(0x13)
@ -2654,13 +2654,13 @@ u8 func000a_do_idle_animation[] = {
label(0x04)
dprint 'S','I','T','T','I','N','G',' ','T','Y','P','I','N','G','\n',0,
set_chr_special_death_animation(CHR_SELF, 0x06)
set_chr_special_death_animation(CHR_SELF, SPECIALDIE_ONCHAIR)
chr_do_animation(ANIM_SITTING_TYPING, 0, -1, 0x14, 0x00, CHR_SELF, 2)
goto_next(0x0c)
label(0x05)
dprint 'S','I','T','T','I','N','G','\n',0,
set_chr_special_death_animation(CHR_SELF, 0x06)
set_chr_special_death_animation(CHR_SELF, SPECIALDIE_ONCHAIR)
chr_do_animation(ANIM_SITTING_DORMANT, 0, -1, 0x14, 0x00, CHR_SELF, 2)
goto_next(0x0c)
@ -2809,7 +2809,7 @@ u8 func000d_init_combat[] = {
// If not idle, turn off special death animation
if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x13)
set_chr_special_death_animation(CHR_SELF, 0)
set_chr_special_death_animation(CHR_SELF, SPECIALDIE_NONE)
label(0x13)
if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x16)
@ -4139,7 +4139,7 @@ u8 func001b_observe_camspy[] = {
stop_chr
set_shotlist(GAILIST_ALERTED)
unset_self_flag_bankx(CHRFLAG1_DOINGIDLEANIMATION, BANK_1)
set_chr_special_death_animation(CHR_SELF, 0)
set_chr_special_death_animation(CHR_SELF, SPECIALDIE_NONE)
set_chrpreset(CHR_TARGET)
if_just_injured(CHR_SELF, /*goto*/ 0x09)
@ -4276,7 +4276,7 @@ u8 func001d_search_for_player[] = {
// Alive
label(0x16)
if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x13)
set_chr_special_death_animation(CHR_SELF, 0)
set_chr_special_death_animation(CHR_SELF, SPECIALDIE_NONE)
label(0x13)
dprint 'S','E','A','R','C','H',' ','R','O','O','M','\n',0,
set_chr_dodge_rating(2, 0x00)

View File

@ -4102,8 +4102,8 @@ u32 var8006806c = 0x00000000;
u32 var80068070 = 0x00000000;
u32 var80068074 = 0x00000000;
u32 var80068078 = 0x00000000;
u32 var8006807c = 0x0000000a;
u32 var80068080 = 0x32000000;
s32 var8006807c = 0x0000000a;
u8 var80068080 = 50;
u32 var80068084 = 0x005b0000;
u32 var80068088 = 0x00000000;
u32 var8006808c = 0xbf800000;
@ -4307,29 +4307,3 @@ u32 var800683a0 = 0x0000000f;
u32 var800683a4 = 0x00190000;
u32 var800683a8 = 0xbf800000;
u32 var800683ac = 0x0000034f;
u32 var800683b0 = 0x0000000f;
u32 var800683b4 = 0x00190000;
u32 var800683b8 = 0xbf800000;
struct coord var800683bc = {0};
u32 var800683c8 = 0x808d808e;
u32 var800683cc = 0x808f8090;
u32 var800683d0 = 0x80918092;
u32 var800683d4 = 0x80938094;
u32 var800683d8 = 0x80958096;
u32 var800683dc = 0x80970000;
u32 var800683e0 = 0x8129812f;
u32 var800683e4 = 0x813a813a;
u32 var800683e8 = 0x812f8092;
u32 var800683ec = 0x80938094;
u32 var800683f0 = 0x80958096;
u32 var800683f4 = 0x80970000;
u32 var800683f8 = 0x024d024e;
u32 var800683fc = 0x024f0256;
u32 var80068400 = 0x02570258;
u32 var80068404 = 0x00000000;
u32 var80068408 = 0x808d808e;
u32 var8006840c = 0x808f8090;
u32 var80068410 = 0x80918092;
u32 var80068414 = 0x80938094;
u32 var80068418 = 0x80958096;
u32 var8006841c = 0x80970000;

View File

@ -3417,12 +3417,15 @@
/**
* Assigns a special death animation to the given chr.
*
* This is used for the Villa snipers and the Chicago guard on the fire escape.
* This is used for the Villa snipers, the Chicago guard on the fire escape,
* and all guards who sit in chairs.
*
* The value for specialdie should be one of the SPECIALDIE constants.
*/
#define set_chr_special_death_animation(chr, anim) \
#define set_chr_special_death_animation(chr, specialdie) \
mkshort(0x01a0), \
chr, \
anim,
specialdie,
/**
* Sets the current chr's roomtosearch field to the same room that the chr's

View File

@ -92,6 +92,7 @@
#define ANIM_SURRENDER_002E 0x002e
#define ANIM_SURRENDER_002F 0x002f
#define ANIM_DEATH_STOMACH_LONG 0x0039
#define ANIM_003C 0x003c
#define ANIM_TALKING_003D 0x003d
#define ANIM_KNEEL_SHOOT_RIGHT_HAND 0x004b
#define ANIM_TALKING_0098 0x0098
@ -1660,6 +1661,14 @@
#define SOUNDMODE_HEADPHONE 2
#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_OVERRAILING 5
#define SPECIALDIE_ONCHAIR 6
#define SPEED_WALK 0
#define SPEED_JOG 1
#define SPEED_RUN 2

View File

@ -184,8 +184,8 @@ extern u32 var8006805c;
extern u32 var80068064;
extern u32 var8006806c;
extern u32 var80068074;
extern u32 var8006807c;
extern u32 var80068080;
extern s32 var8006807c;
extern u8 var80068080;
extern u32 var80068084;
extern u32 var800680bc;
extern u32 var8006819c;
@ -204,10 +204,5 @@ extern u32 var8006827c;
extern u32 var80068288;
extern u32 var8006829c;
extern u32 var8006835c;
extern struct coord var800683bc;
extern u32 var800683c8;
extern u32 var800683e0;
extern u32 var800683f8;
extern u32 var80068408;
#endif

View File

@ -3,7 +3,7 @@
#include <ultra64.h>
#include "types.h"
u32 func0f129900(struct prop *prop, struct coord *pos, s16 *room, s32 arg3, s32 arg4);
u32 func0f129900(struct prop *prop, struct coord *pos, s16 *room, s32 arg3, s32 playernum);
u32 func0f129940(void);
u32 func0f129b08(void);
u32 func0f129ba4(void);

View File

@ -51,7 +51,7 @@ u32 func0001cd18(void);
u32 func0001ce64(void);
u32 func0001cebc(void);
u32 animGetId(struct animdata *animdata);
u32 func0001d15c(void);
bool func0001d15c(struct animdata *animdata);
f32 animGetFrame(struct animdata *animdata);
f32 func0001d1a0(struct animdata *animdata);
u32 func0001d218(void);
@ -67,7 +67,7 @@ u32 func0001dd90(void);
void func0001ddec(struct animdata *animdata, f32 arg1, f32 arg2);
void func0001de1c(struct animdata *animdata, f32 arg1);
u32 func0001de98(void);
u32 func0001deb0(void);
void func0001deb0(struct animdata *animdata, f32 arg1, f32 startframe);
u32 func0001df04(void);
u32 func0001dfac(void);
u32 func0001e000(void);

View File

@ -362,9 +362,14 @@ struct act_anim {
struct act_die {
/*0x2c*/ u32 unk02c;
/*0x30*/ f32 unk030;
/*0x34*/ f32 unk034;
/*0x30*/ f32 unk030; // frame number
/*0x34*/ f32 unk034; // frame number
/*0x38*/ f32 unk038;
/*0x3c*/ u32 unk03c;
/*0x40*/ u32 unk040;
/*0x44*/ u32 unk044;
/*0x48*/ u32 unk048;
/*0x4c*/ s16 unk04c;
};
struct act_dead {