Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Player's Face and z_actor FaceChange functions #1777

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
toto
  • Loading branch information
engineer124 committed Dec 22, 2024
commit 564029ce048a11189cc87689fbc63c133c3576ee
6 changes: 3 additions & 3 deletions assets/xml/objects/object_zm.xml
Original file line number Diff line number Diff line change
@@ -28,16 +28,16 @@
<Texture Name="object_zm_Tex_0082A8" OutName="tex_0082A8" Format="ci8" Width="8" Height="8" Offset="0x82A8" />
<Texture Name="object_zm_Tex_0082E8" OutName="tex_0082E8" Format="ci8" Width="32" Height="32" Offset="0x82E8" />
<Texture Name="object_zm_Tex_0086E8" OutName="tex_0086E8" Format="ci8" Width="32" Height="32" Offset="0x86E8" />
<Texture Name="object_zm_Tex_008AE8" OutName="tex_008AE8" Format="ci8" Width="32" Height="32" Offset="0x8AE8" />
<Texture Name="gTotoEyesOpenTex" OutName="toto_eyes_open" Format="ci8" Width="32" Height="32" Offset="0x8AE8" TlutOffset="0x80A8" />
<Texture Name="object_zm_Tex_008EE8" OutName="tex_008EE8" Format="ci8" Width="16" Height="16" Offset="0x8EE8" />
<Texture Name="object_zm_Tex_008FE8" OutName="tex_008FE8" Format="rgba16" Width="32" Height="32" Offset="0x8FE8" />
<Texture Name="object_zm_Tex_0097E8" OutName="tex_0097E8" Format="rgba16" Width="8" Height="8" Offset="0x97E8" />
<Texture Name="object_zm_Tex_009868" OutName="tex_009868" Format="ci8" Width="16" Height="16" Offset="0x9868" />
<Texture Name="object_zm_Tex_009968" OutName="tex_009968" Format="ci8" Width="16" Height="16" Offset="0x9968" />
<Texture Name="object_zm_Tex_009A68" OutName="tex_009A68" Format="rgba16" Width="16" Height="16" Offset="0x9A68" />
<Texture Name="object_zm_Tex_009C68" OutName="tex_009C68" Format="ci8" Width="32" Height="32" Offset="0x9C68" />
<Texture Name="object_zm_Tex_00A068" OutName="tex_00A068" Format="ci8" Width="32" Height="32" Offset="0xA068" />
<Texture Name="object_zm_Tex_00A468" OutName="tex_00A468" Format="ci8" Width="32" Height="32" Offset="0xA468" />
<Texture Name="gTotoEyesHalfTex" OutName="toto_eyes_half" Format="ci8" Width="32" Height="32" Offset="0xA068" TlutOffset="0x80A8" />
<Texture Name="gTotoEyesClosedTex" OutName="toto_eyes_closed" Format="ci8" Width="32" Height="32" Offset="0xA468" TlutOffset="0x80A8" />
<Limb Name="object_zm_Standardlimb_00A868" Type="Standard" EnumName="OBJECT_ZM_LIMB_01" Offset="0xA868" />
<Limb Name="object_zm_Standardlimb_00A874" Type="Standard" EnumName="OBJECT_ZM_LIMB_02" Offset="0xA874" />
<Limb Name="object_zm_Standardlimb_00A880" Type="Standard" EnumName="OBJECT_ZM_LIMB_03" Offset="0xA880" />
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_En_Toto/z_en_toto.c
Original file line number Diff line number Diff line change
@@ -702,14 +702,14 @@ void EnToto_Update(Actor* thisx, PlayState* play) {
}

void EnToto_Draw(Actor* thisx, PlayState* play) {
TexturePtr sp4C[] = { object_zm_Tex_008AE8, object_zm_Tex_00A068, object_zm_Tex_00A468 };
TexturePtr eyeTextures[] = { gTotoEyesOpenTex, gTotoEyesHalfTex, gTotoEyesClosedTex };
EnToto* this = (EnToto*)thisx;
s32 pad;

OPEN_DISPS(play->state.gfxCtx);

Gfx_SetupDL25_Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sp4C[this->faceChange.face]));
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(eyeTextures[this->faceChange.face]));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s worth noting that toto for some reason uses the face change system and FaceChange_UpdateBlinkingAlt to handle it’s blinking. The only time it’s used outside of player. So I’m not sure if that should affect the name of FaceChange.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. Name seems fine.

Scene_SetRenderModeXlu(play, 0, 1);
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL,
NULL, &this->actor);