mirror of
https://github.com/zeldaret/oot.git
synced 2025-06-07 17:11:50 +00:00
Child Ruto Part 7: Limb draw functions (#2575)
* Child Ruto Part 7: Limb draw functions * Add comment * Rename vectors, remove comment * Rename again
This commit is contained in:
parent
b37f62fc1f
commit
597bd27f5b
2 changed files with 14 additions and 13 deletions
|
@ -84,7 +84,7 @@ void func_80AEFC24(EnRu1* this, PlayState* play);
|
||||||
void func_80AEFECC(EnRu1* this, PlayState* play);
|
void func_80AEFECC(EnRu1* this, PlayState* play);
|
||||||
void func_80AEFF40(EnRu1* this, PlayState* play);
|
void func_80AEFF40(EnRu1* this, PlayState* play);
|
||||||
|
|
||||||
void func_80AF0278(EnRu1* this, PlayState* play, s32 limbIndex, Vec3s* rot);
|
void EnRu1_PreLimbDraw(EnRu1* this, PlayState* play, s32 limbIndex, Vec3s* rot);
|
||||||
|
|
||||||
void EnRu1_DrawNothing(EnRu1* this, PlayState* play);
|
void EnRu1_DrawNothing(EnRu1* this, PlayState* play);
|
||||||
void EnRu1_DrawOpa(EnRu1* this, PlayState* play);
|
void EnRu1_DrawOpa(EnRu1* this, PlayState* play);
|
||||||
|
@ -164,7 +164,7 @@ static EnRu1ActionFunc sActionFuncs[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static EnRu1PreLimbDrawFunc sPreLimbDrawFuncs[] = {
|
static EnRu1PreLimbDrawFunc sPreLimbDrawFuncs[] = {
|
||||||
func_80AF0278,
|
EnRu1_PreLimbDraw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static Vec3f sMultVec = { 0.0f, 10.0f, 0.0f };
|
static Vec3f sMultVec = { 0.0f, 10.0f, 0.0f };
|
||||||
|
@ -2343,7 +2343,7 @@ void EnRu1_Init(Actor* thisx, PlayState* play) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80AF0278(EnRu1* this, PlayState* play, s32 limbIndex, Vec3s* rot) {
|
void EnRu1_PreLimbDraw(EnRu1* this, PlayState* play, s32 limbIndex, Vec3s* rot) {
|
||||||
Vec3s* torsoRot = &this->interactInfo.torsoRot;
|
Vec3s* torsoRot = &this->interactInfo.torsoRot;
|
||||||
Vec3s* headRot = &this->interactInfo.headRot;
|
Vec3s* headRot = &this->interactInfo.headRot;
|
||||||
|
|
||||||
|
@ -2363,11 +2363,12 @@ s32 EnRu1_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||||
Gfx** gfx) {
|
Gfx** gfx) {
|
||||||
EnRu1* this = (EnRu1*)thisx;
|
EnRu1* this = (EnRu1*)thisx;
|
||||||
|
|
||||||
if ((this->unk_290 < 0) || (this->unk_290 > 0) || (*sPreLimbDrawFuncs[this->unk_290] == NULL)) {
|
if ((this->preLimbDrawIndex < 0) || (this->preLimbDrawIndex > 0) ||
|
||||||
|
(*sPreLimbDrawFuncs[this->preLimbDrawIndex] == NULL)) {
|
||||||
PRINTF(VT_FGCOL(RED) T("首回しモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
|
PRINTF(VT_FGCOL(RED) T("首回しモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
|
||||||
"Neck rotation mode is improper!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
|
"Neck rotation mode is improper!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
|
||||||
} else {
|
} else {
|
||||||
sPreLimbDrawFuncs[this->unk_290](this, play, limbIndex, rot);
|
sPreLimbDrawFuncs[this->preLimbDrawIndex](this, play, limbIndex, rot);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2376,14 +2377,14 @@ void EnRu1_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||||
EnRu1* this = (EnRu1*)thisx;
|
EnRu1* this = (EnRu1*)thisx;
|
||||||
|
|
||||||
if (limbIndex == RUTO_CHILD_HEAD) {
|
if (limbIndex == RUTO_CHILD_HEAD) {
|
||||||
Vec3f vec1;
|
Vec3f multVec;
|
||||||
Vec3f vec2;
|
Vec3f focusPos;
|
||||||
|
|
||||||
vec1 = sMultVec;
|
multVec = sMultVec;
|
||||||
Matrix_MultVec3f(&vec1, &vec2);
|
Matrix_MultVec3f(&multVec, &focusPos);
|
||||||
this->actor.focus.pos.x = vec2.x;
|
this->actor.focus.pos.x = focusPos.x;
|
||||||
this->actor.focus.pos.y = vec2.y;
|
this->actor.focus.pos.y = focusPos.y;
|
||||||
this->actor.focus.pos.z = vec2.z;
|
this->actor.focus.pos.z = focusPos.z;
|
||||||
this->actor.focus.rot.x = this->actor.world.rot.x;
|
this->actor.focus.rot.x = this->actor.world.rot.x;
|
||||||
this->actor.focus.rot.y = this->actor.world.rot.y;
|
this->actor.focus.rot.y = this->actor.world.rot.y;
|
||||||
this->actor.focus.rot.z = this->actor.world.rot.z;
|
this->actor.focus.rot.z = this->actor.world.rot.z;
|
||||||
|
|
|
@ -37,7 +37,7 @@ typedef struct EnRu1 {
|
||||||
/* 0x0286 */ s8 roomNum3;
|
/* 0x0286 */ s8 roomNum3;
|
||||||
/* 0x0288 */ f32 unk_288;
|
/* 0x0288 */ f32 unk_288;
|
||||||
/* 0x028C */ BgBdanObjects* bigOctoPlatform;
|
/* 0x028C */ BgBdanObjects* bigOctoPlatform;
|
||||||
/* 0x0290 */ s32 unk_290;
|
/* 0x0290 */ s32 preLimbDrawIndex;
|
||||||
/* 0x0294 */ char unk_294[0x4];
|
/* 0x0294 */ char unk_294[0x4];
|
||||||
/* 0x0298 */ s32 unk_298;
|
/* 0x0298 */ s32 unk_298;
|
||||||
/* 0x029C */ char unk_29C[0x2];
|
/* 0x029C */ char unk_29C[0x2];
|
||||||
|
|
Loading…
Add table
Reference in a new issue