`EnNnh` (Butler's Son) Documentation and one Kakasi thing I missed (#957)

* EnNnh: Docs

* EnKakasi: added targetmode params macro

* EnNnh: requested move of object description
This commit is contained in:
Isghj 2022-07-23 11:36:08 -07:00 committed by GitHub
parent 3a1f3a04c0
commit 235ae9b11d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 27 deletions

View File

@ -1,10 +1,15 @@
<Root>
<!-- Son of the butler cursed into the corpse/body of a dead tree by Skullkid-->
<!-- the player walks past before meeting the Happy Mask Salesman -->
<File Name="object_nnh" Segment="6">
<DList Name="object_nnh_DL_001510" Offset="0x1510" />
<Texture Name="object_nnh_TLUT_001AA0" OutName="tlut_001AA0" Format="rgba16" Width="16" Height="16" Offset="0x1AA0" />
<Texture Name="object_nnh_Tex_001CA0" OutName="tex_001CA0" Format="ci8" Width="16" Height="16" Offset="0x1CA0" />
<Texture Name="object_nnh_Tex_001DA0" OutName="tex_001DA0" Format="ci8" Width="16" Height="16" Offset="0x1DA0" />
<Texture Name="object_nnh_Tex_001EA0" OutName="tex_001EA0" Format="rgba16" Width="32" Height="32" Offset="0x1EA0" />
<Texture Name="object_nnh_Tex_0026A0" OutName="tex_0026A0" Format="rgba16" Width="32" Height="32" Offset="0x26A0" />
<DList Name="gButlerSonMainBodyDL" Offset="0x1510" />
<Texture Name="gButlerSonTLUT" OutName="tlut_001AA0" Format="rgba16" Width="16" Height="16" Offset="0x1AA0" />
<!-- Similar to MainBodyTex but with dark green mold under the roots -->
<Texture Name="gButlerSonRootTex" OutName="roots" Format="ci8" Width="16" Height="16" Offset="0x1CA0" />
<Texture Name="gButlerSonMainBodyTex" OutName="body" Format="ci8" Width="16" Height="16" Offset="0x1DA0" />
<Texture Name="gButlerSonWholeLeafTex" OutName="whole_leaf" Format="rgba16" Width="32" Height="32" Offset="0x1EA0" />
<!-- Only his top left leaf has this circular cutout -->
<Texture Name="gButlerSonCutoutLeafTex" OutName="cutout_leaf" Format="rgba16" Width="32" Height="32" Offset="0x26A0" />
</File>
</Root>

View File

@ -158,7 +158,7 @@ void EnKakasi_Init(Actor* thisx, PlayState* play) {
this->actor.world.rot.z = 0;
this->actor.targetMode = 0;
if (this->actor.world.rot.x > 0 && this->actor.world.rot.x < 8) {
this->actor.targetMode = this->actor.world.rot.x - 1;
this->actor.targetMode = GET_KAKASI_TARGETMODE(thisx);
}
this->actor.shape.rot.y = this->actor.world.rot.y;

View File

@ -47,5 +47,6 @@ extern const ActorInit En_Kakasi_InitVars;
#define GET_KAKASI_SUMMON_DISTANCE(thisx) (((thisx)->params >> 0x8) & 0xFF)
#define GET_KAKASI_ABOVE_GROUND(thisx) ((thisx)->params & 0x1)
#define GET_KAKASI_TARGETMODE(thisx) ((thisx)->world.rot.x - 1)
#endif // Z_EN_KAKASI_H

View File

@ -16,10 +16,10 @@ void EnNnh_Destroy(Actor* thisx, PlayState* play);
void EnNnh_Update(Actor* thisx, PlayState* play);
void EnNnh_Draw(Actor* thisx, PlayState* play);
void func_80C08828(EnNnh* this);
void func_80C0883C(EnNnh* this, PlayState* play);
void func_80C088A4(EnNnh* this);
void func_80C088B8(EnNnh* this, PlayState* play);
void EnNnh_SetupWaitForDialogue(EnNnh* this);
void EnNnh_WaitForDialogue(EnNnh* this, PlayState* play);
void EnNnh_SetupDialogue(EnNnh* this);
void EnNnh_Dialogue(EnNnh* this, PlayState* play);
const ActorInit En_Nnh_InitVars = {
ACTOR_EN_NNH,
@ -62,7 +62,7 @@ void EnNnh_Init(Actor* thisx, PlayState* play) {
this->actor.targetMode = 1;
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 30.0f;
func_80C08828(this);
EnNnh_SetupWaitForDialogue(this);
}
void EnNnh_Destroy(Actor* thisx, PlayState* play) {
@ -71,26 +71,26 @@ void EnNnh_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider);
}
void func_80C08828(EnNnh* this) {
this->actionFunc = func_80C0883C;
void EnNnh_SetupWaitForDialogue(EnNnh* this) {
this->actionFunc = EnNnh_WaitForDialogue;
}
void func_80C0883C(EnNnh* this, PlayState* play) {
void EnNnh_WaitForDialogue(EnNnh* this, PlayState* play) {
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
Message_StartTextbox(play, 0x228, &this->actor);
func_80C088A4(this);
return;
EnNnh_SetupDialogue(this);
} else {
func_800B8614(&this->actor, play, 100.0f);
}
func_800B8614(&this->actor, play, 100.0f);
}
void func_80C088A4(EnNnh* this) {
this->actionFunc = func_80C088B8;
void EnNnh_SetupDialogue(EnNnh* this) {
this->actionFunc = EnNnh_Dialogue;
}
void func_80C088B8(EnNnh* this, PlayState* play) {
void EnNnh_Dialogue(EnNnh* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
func_80C08828(this);
EnNnh_SetupWaitForDialogue(this);
}
}
@ -109,5 +109,5 @@ void EnNnh_Draw(Actor* thisx, PlayState* play) {
func_8012C28C(gfxCtx);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyOpa.p++, object_nnh_DL_001510);
gSPDisplayList(gfxCtx->polyOpa.p++, gButlerSonMainBodyDL);
}

View File

@ -16610,10 +16610,10 @@
0x80C08480:("ObjUsiyane_Draw",),
0x80C08760:("EnNnh_Init",),
0x80C087FC:("EnNnh_Destroy",),
0x80C08828:("func_80C08828",),
0x80C0883C:("func_80C0883C",),
0x80C088A4:("func_80C088A4",),
0x80C088B8:("func_80C088B8",),
0x80C08828:("EnNnh_SetupWaitForDialogue",),
0x80C0883C:("EnNnh_WaitForDialogue",),
0x80C088A4:("EnNnh_SetupDialogue",),
0x80C088B8:("EnNnh_Dialogue",),
0x80C088EC:("EnNnh_Update",),
0x80C08950:("EnNnh_Draw",),
0x80C08A80:("ObjKzsaku_Init",),