diff --git a/src/files/setup/setupame.c b/src/files/setup/setupame.c index 819e20e28..f6d5dde6b 100644 --- a/src/files/setup/setupame.c +++ b/src/files/setup/setupame.c @@ -3034,7 +3034,7 @@ u8 func0422_intro_042a[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) chr_do_animation(0x0109, -1, -1, 0x06, 0x00, CHR_BOND, 4) - set_chr_hud_visible(CHR_BOND, TRUE) + set_chr_hudprojector_visible(CHR_BOND, TRUE) show_object(OBJ_ROPE) set_object_flag3(OBJ_ROPE, OBJFLAG3_00000010) object_do_animation(0x010a, OBJ_ROPE, 0x04ff, 0xff) @@ -3062,7 +3062,7 @@ u8 func0422_intro_042b[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) chr_do_animation(0x010d, -1, -1, 0x06, 0x00, CHR_BOND, 4) - set_chr_hud_visible(CHR_BOND, TRUE) + set_chr_hudprojector_visible(CHR_BOND, TRUE) show_object(OBJ_ROPE) set_object_flag3(OBJ_ROPE, OBJFLAG3_00000010) object_do_animation(0x010e, OBJ_ROPE, 0x04ff, 0xff) @@ -3101,7 +3101,7 @@ u8 func0422_intro_042d[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) chr_do_animation(0x0156, -1, -1, 0x06, 0x00, CHR_BOND, 4) - set_chr_hud_visible(CHR_BOND, FALSE) + set_chr_hudprojector_visible(CHR_BOND, FALSE) wait_for_camera_finished @@ -3120,7 +3120,7 @@ u8 func0422_intro_042d[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) chr_do_animation(0x0156, -2, -1, 0x06, 0x00, CHR_BOND, 2) - set_chr_hud_visible(CHR_BOND, FALSE) + set_chr_hudprojector_visible(CHR_BOND, FALSE) mute_channel(CHANNEL_7) mute_channel(CHANNEL_6) mute_channel(CHANNEL_5) diff --git a/src/files/setup/setupazt.c b/src/files/setup/setupazt.c index 0c0e78053..e16f30fd7 100644 --- a/src/files/setup/setupazt.c +++ b/src/files/setup/setupazt.c @@ -410,7 +410,7 @@ u8 func1002_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) chr_do_animation(0x01b6, -1, -1, 0x06, 0x00, CHR_BOND, 4) - set_chr_hud_visible(CHR_BOND, TRUE) + set_chr_hudprojector_visible(CHR_BOND, TRUE) restart_timer fade_to_color(0x000000ff, 0) @@ -517,7 +517,7 @@ u8 func1002_intro[] = { chr_do_animation(0x01b6, -2, -1, 0x06, 0x00, CHR_BOND, 2) restart_default_music reset_ambience - set_chr_hud_visible(CHR_BOND, FALSE) + set_chr_hudprojector_visible(CHR_BOND, FALSE) enter_firstperson set_ailist(CHR_SELF, GAILIST_IDLE) endlist diff --git a/src/files/setup/setupcave.c b/src/files/setup/setupcave.c index 648afb77f..9c217898a 100644 --- a/src/files/setup/setupcave.c +++ b/src/files/setup/setupcave.c @@ -787,7 +787,7 @@ u8 func0401_unused_cutscene[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) chr_do_animation(0x0170, -1, -1, 0x06, 0x00, CHR_BOND, 4) - set_chr_hud_visible(CHR_BOND, TRUE) + set_chr_hudprojector_visible(CHR_BOND, TRUE) set_chr_chrflag(0x00, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(0x00, CHRCFLAG_HIDDEN) set_chr_hiddenflag(0x00, CHRHFLAG_00020000) @@ -3595,7 +3595,7 @@ u8 func1003_intro[] = { set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) chr_do_animation(0x01e6, -1, -1, 0x06, 0x00, CHR_BOND, 4) - set_chr_hud_visible(CHR_BOND, TRUE) + set_chr_hudprojector_visible(CHR_BOND, TRUE) set_chr_chrflag(CHR_TRENT, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TRENT, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TRENT, CHRHFLAG_00020000) @@ -3841,7 +3841,7 @@ u8 func1003_intro[] = { unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000) chr_do_animation(0x01e6, -2, -1, 0x06, 0x00, CHR_BOND, 2) - set_chr_hud_visible(CHR_BOND, FALSE) + set_chr_hudprojector_visible(CHR_BOND, FALSE) unset_object_flag2(0x22, OBJFLAG2_04000000) set_object_flag3(0x22, OBJFLAG3_00000010) object_do_animation(0x01ed, 0x22, 0x01ff, 0xfe) diff --git a/src/files/setup/setupdepo.c b/src/files/setup/setupdepo.c index e461068cd..8961e2ca6 100644 --- a/src/files/setup/setupdepo.c +++ b/src/files/setup/setupdepo.c @@ -2079,7 +2079,7 @@ u8 func040f_outro[] = { unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) chr_do_animation(0x0197, -1, -1, 0x06, 0x00, CHR_P1P2, 4) - set_chr_hud_visible(CHR_P1P2, TRUE) + set_chr_hudprojector_visible(CHR_P1P2, TRUE) restart_timer deactivate_alarm show_nonessential_chrs(FALSE) @@ -2190,7 +2190,7 @@ u8 func040f_outro[] = { label(0x54) label(0x06) - set_chr_hud_visible(CHR_P1P2, FALSE) + set_chr_hudprojector_visible(CHR_P1P2, FALSE) end_level set_ailist(CHR_SELF, GAILIST_IDLE) endlist diff --git a/src/files/setup/setuplue.c b/src/files/setup/setuplue.c index 664bb98a5..edbdafe13 100644 --- a/src/files/setup/setuplue.c +++ b/src/files/setup/setuplue.c @@ -1759,7 +1759,7 @@ u8 func040e_outro[] = { set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE) set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000) chr_do_animation(0x017f, -1, -1, 0x06, 0x00, CHR_P1P2, 4) - set_chr_hud_visible(CHR_P1P2, TRUE) + set_chr_hudprojector_visible(CHR_P1P2, TRUE) set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN) @@ -1882,7 +1882,7 @@ u8 func040e_outro[] = { label(0x54) label(0x06) remove_chr(CHR_OUTRO_GUARD) - set_chr_hud_visible(CHR_P1P2, FALSE) + set_chr_hudprojector_visible(CHR_P1P2, FALSE) end_level set_ailist(CHR_SELF, GAILIST_IDLE) endlist diff --git a/src/files/setup/setuprit.c b/src/files/setup/setuprit.c index 2c89c8911..7de5ba5ff 100644 --- a/src/files/setup/setuprit.c +++ b/src/files/setup/setuprit.c @@ -3441,7 +3441,7 @@ u8 func0423_outro[] = { unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000) chr_do_animation(0x02da, -1, -1, 0x06, 0x00, CHR_TARGET, 4) - set_chr_hud_visible(CHR_TARGET, TRUE) + set_chr_hudprojector_visible(CHR_TARGET, TRUE) set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN) set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000) @@ -3547,7 +3547,7 @@ u8 func0423_outro[] = { misc_command(0x0000, 0x0d, 0x00) hide_object(0x19) hide_object(0x1a) - set_chr_hud_visible(CHR_TARGET, FALSE) + set_chr_hudprojector_visible(CHR_TARGET, FALSE) end_level set_ailist(CHR_SELF, GAILIST_IDLE) endlist diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index 1d1cd0ae2..5141c269a 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -7659,7 +7659,7 @@ glabel chrDropItems ); GLOBAL_ASM( -glabel func0f0245c8 +glabel chrSetHudProjectorVisible /* f0245c8: 27bdffe8 */ addiu $sp,$sp,-24 /* f0245cc: afbf0014 */ sw $ra,0x14($sp) /* f0245d0: afa40018 */ sw $a0,0x18($sp) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index e098761e4..70397cc20 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -13640,13 +13640,13 @@ bool ai01cc(void) /** * @cmd 01cd */ -bool ai01cd(void) +bool aiChrSetHudProjectorVisible(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); if (chr && chr->prop && chr->unk020) { - func0f0245c8(chr, cmd[3]); + chrSetHudProjectorVisible(chr, cmd[3]); } g_Vars.aioffset += 4; diff --git a/src/game/data/data_0083d0.c b/src/game/data/data_0083d0.c index ecab03533..9c3ceb9af 100644 --- a/src/game/data/data_0083d0.c +++ b/src/game/data/data_0083d0.c @@ -6680,7 +6680,7 @@ bool (*g_CommandPointers[])(void) = { /*0x01ca*/ aiChrSetCutsceneWeapon, /*0x01cb*/ aiFadeScreen, /*0x01cc*/ ai01cc, - /*0x01cd*/ ai01cd, + /*0x01cd*/ aiChrSetHudProjectorVisible, /*0x01ce*/ ai01ce, /*0x01cf*/ aiChrSetFiringInCutscene, /*0x01d0*/ aiSetPortalFlag, diff --git a/src/include/commands.h b/src/include/commands.h index 8290e3288..9ae59dcf4 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -3613,7 +3613,11 @@ mkshort(0x01cc), \ label, -#define set_chr_hud_visible(chr, bool) \ +/** + * Determines whether Jo's HUD eyepiece thing is visible when in the third + * person perspective (ie. in cutscenes or when playing coop). + */ +#define set_chr_hudprojector_visible(chr, bool) \ mkshort(0x01cd), \ chr, \ bool, diff --git a/src/include/game/chr/chr.h b/src/include/game/chr/chr.h index 487aa23df..058cd43ec 100644 --- a/src/include/game/chr/chr.h +++ b/src/include/game/chr/chr.h @@ -73,7 +73,7 @@ u32 func0f022d60(void); u32 func0f022fe0(void); u32 func0f023098(void); void chrDropItems(struct chrdata *chr); -u32 func0f0245c8(struct chrdata *chr, u32 arg1); +u32 chrSetHudProjectorVisible(struct chrdata *chr, u32 arg1); u32 func0f024668(void); u32 func0f0246e4(void); void func0f02472c(void); diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chr/chraicommands.h index 399f922af..171781d45 100644 --- a/src/include/game/chr/chraicommands.h +++ b/src/include/game/chr/chraicommands.h @@ -424,7 +424,7 @@ /*0x01ca*/ bool aiChrSetCutsceneWeapon(void); /*0x01cb*/ bool aiFadeScreen(void); /*0x01cc*/ bool ai01cc(void); -/*0x01cd*/ bool ai01cd(void); +/*0x01cd*/ bool aiChrSetHudProjectorVisible(void); /*0x01ce*/ bool ai01ce(void); /*0x01cf*/ bool aiChrSetFiringInCutscene(void); /*0x01d0*/ bool aiSetPortalFlag(void);