1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-08 00:44:42 +00:00

Player doc: some rotation logic/data (#1443)

* Docs: some player rotation logic/data

* Improve misleading comment

* rename temps

* unk_6AE_rotFlags

* format

* disasm metadata
This commit is contained in:
Dragorn421 2024-10-10 02:22:52 +02:00 committed by GitHub
parent 621b8f38c5
commit ba9c60552b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 169 additions and 140 deletions

View file

@ -1098,7 +1098,7 @@ int func_8002DD6C(Player* player) {
}
int func_8002DD78(Player* player) {
return func_8002DD6C(player) && player->unk_834;
return func_8002DD6C(player) && (player->unk_834 != 0);
}
int func_8002DDA8(PlayState* play) {

View file

@ -1295,22 +1295,22 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
}
if (limbIndex == PLAYER_LIMB_HEAD) {
rot->x += this->unk_6BA;
rot->y -= this->unk_6B8;
rot->z += this->unk_6B6;
rot->x += this->headLimbRot.z;
rot->y -= this->headLimbRot.y;
rot->z += this->headLimbRot.x;
} else if (limbIndex == PLAYER_LIMB_UPPER) {
if (this->unk_6B0 != 0) {
if (this->upperLimbYawSecondary != 0) {
Matrix_RotateZ(BINANG_TO_RAD(0x44C), MTXMODE_APPLY);
Matrix_RotateY(BINANG_TO_RAD(this->unk_6B0), MTXMODE_APPLY);
Matrix_RotateY(BINANG_TO_RAD(this->upperLimbYawSecondary), MTXMODE_APPLY);
}
if (this->unk_6BE != 0) {
Matrix_RotateY(BINANG_TO_RAD(this->unk_6BE), MTXMODE_APPLY);
if (this->upperLimbRot.y != 0) {
Matrix_RotateY(BINANG_TO_RAD(this->upperLimbRot.y), MTXMODE_APPLY);
}
if (this->unk_6BC != 0) {
Matrix_RotateX(BINANG_TO_RAD(this->unk_6BC), MTXMODE_APPLY);
if (this->upperLimbRot.x != 0) {
Matrix_RotateX(BINANG_TO_RAD(this->upperLimbRot.x), MTXMODE_APPLY);
}
if (this->unk_6C0 != 0) {
Matrix_RotateZ(BINANG_TO_RAD(this->unk_6C0), MTXMODE_APPLY);
if (this->upperLimbRot.z != 0) {
Matrix_RotateZ(BINANG_TO_RAD(this->upperLimbRot.z), MTXMODE_APPLY);
}
} else if (limbIndex == PLAYER_LIMB_L_THIGH) {
s32 pad;
@ -1788,7 +1788,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_MtxFToYXZRotS(&sp44, &heldActor->world.rot, 0);
heldActor->shape.rot = heldActor->world.rot;
if (func_8002DD78(this) != 0) {
if (func_8002DD78(this)) {
Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
Player_DrawHookshotReticle(play, this,
(this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f);