summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpetrie911 <69443847+petrie911@users.noreply.github.com>2020-11-25 15:42:02 -0600
committerGitHub <noreply@github.com>2020-11-25 16:42:02 -0500
commit9182da3c92a3046eccc24da8cc647ae346af7ce2 (patch)
tree0cb7dd4d34df03a1f777ce6417659eeb9410a40d /src
parenteba7b2c4d6a7f73181ea2e2127cffb1d3a0b2200 (diff)
Matched z_player_lib (#499)
* Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * give this a shot * fix conflict * one more try * could be useful * whoops * ZAP2 stuff * ZAP why * ZAP again * anohter match * .s * comments
Diffstat (limited to 'src')
-rw-r--r--src/code/z_player_lib.c17
-rw-r--r--src/code/z_view.c2
2 files changed, 7 insertions, 12 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index ff187883c..901815963 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -1152,8 +1152,6 @@ Vec3f D_801261E0[] = {
{ 200.0f, 200.0f, 0.0f },
};
-#ifdef NON_MATCHING
-// regalloc differences
void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) {
Player* this = (Player*)actor;
@@ -1163,7 +1161,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
if (limbIndex == PLAYER_LIMB_L_HAND) {
MtxF sp14C;
- Actor* hookedActor; // sp+0x148
+ Actor* hookedActor;
Math_Vec3f_Copy(&this->leftHandPos, D_80160000);
@@ -1203,14 +1201,14 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
func_80090A28(this, spE4);
func_800906D4(globalCtx, this, spE4);
} else if ((*dList != NULL) && (this->leftHandType == 7)) {
- Color_RGB8* bottleColor = &sBottleColors[Player_ActionToBottle(this, this->itemActionParam)]; // sp+0xE0
+ Color_RGB8* bottleColor = &sBottleColors[Player_ActionToBottle(this, this->itemActionParam)];
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2710);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2712),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetEnvColor(POLY_XLU_DISP++, bottleColor->r, bottleColor->g, bottleColor->b, 0);
- gSPDisplayList(POLY_XLU_DISP++, sBottleDLists[gSaveContext.linkAge]);
+ gSPDisplayList(POLY_XLU_DISP++, sBottleDLists[(0, gSaveContext.linkAge)]);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2717);
}
@@ -1242,12 +1240,12 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
}
}
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
- Actor* heldActor = this->heldActor; // sp+0xB4
+ Actor* heldActor = this->heldActor;
if (this->rightHandType == 0xFF) {
Matrix_Get(&this->shieldMf);
} else if ((this->rightHandType == 11) || (this->rightHandType == 12)) {
- BowStringData* stringData = &sBowStringData[gSaveContext.linkAge]; // sp+0xB0
+ BowStringData* stringData = &sBowStringData[gSaveContext.linkAge];
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2783);
@@ -1342,15 +1340,12 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
} else if (limbIndex == PLAYER_LIMB_HEAD) {
Matrix_MultVec3f(&D_801260D4, &this->actor.posRot2.pos);
} else {
- Vec3f* vec = &D_801261E0[gSaveContext.linkAge];
+ Vec3f* vec = &D_801261E0[(0, gSaveContext.linkAge)];
func_8002BDB0(&this->actor, limbIndex, PLAYER_LIMB_L_FOOT, vec, PLAYER_LIMB_R_FOOT, vec);
}
}
}
-#else
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80090D20.s")
-#endif
u32 func_80091738(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime) {
s16 linkObjectId;
diff --git a/src/code/z_view.c b/src/code/z_view.c
index f4f3b183d..71913d5e6 100644
--- a/src/code/z_view.c
+++ b/src/code/z_view.c
@@ -523,7 +523,7 @@ s32 func_800AB944(View* view) {
}
#ifdef NON_MATCHING
-// regalloc differences
+// regalloc differences, skips a t register at arg1's assignment
s32 func_800AB9EC(View* view, s32 arg1, Gfx** gfxp) {
Gfx* gfx = *gfxp;
GraphicsContext* gfxCtx = view->gfxCtx;