Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ArmsHook_Draw(Actor *thisx, GlobalContext *globalCtx) {
- ArmsHook* this = THIS;
- s32 pad;
- ActorPlayer* player = PLAYER;
- Vec3f sp68;
- Vec3f sp5C;
- Vec3f sp50;
- f32 sp4C;
- f32 sp48;
- GraphicsContext *sp44;
- if (player->base.draw != NULL) {
- if (player->unk151 == 0xB) {
- sp44 = globalCtx->state.gfxCtx;
- if ((func_808C12A4 != this->actionFunc) || (this->timer <= 0)) {
- SysMatrix_MultiplyVector3fByState(&D_808C1C10, &this->unk_1E0);
- SysMatrix_MultiplyVector3fByState(&D_808C1C28, &sp5C);
- SysMatrix_MultiplyVector3fByState(&D_808C1C34, &sp50);
- this->unk_1C4 = 0;
- } else {
- SysMatrix_MultiplyVector3fByState(&D_808C1C1C, &this->unk_1E0);
- SysMatrix_MultiplyVector3fByState(&D_808C1C40, &sp5C);
- SysMatrix_MultiplyVector3fByState(&D_808C1C4C, &sp50);
- }
- func_80126440(globalCtx, &this->collider.base, &this->unk_1C4, &sp5C, &sp50);
- func_8012C28C(globalCtx->state.gfxCtx);
- func_80122868(globalCtx, player);
- gSPMatrix(sp44->polyOpa.p++, SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPDisplayList(sp44->polyOpa.p++, D_0601D960);
- SysMatrix_InsertTranslation(this->actor.currPosRot.pos.x, this->actor.currPosRot.pos.y, this->actor.currPosRot.pos.z, 0);
- Math_Vec3f_Diff(&player->unk368, &this->actor.currPosRot.pos, &sp68);
- sp48 = SQ(sp68.x) + SQ(sp68.z);
- sp4C = sqrtf(sp48);
- SysMatrix_InsertYRotation_s(atans(sp68.x, sp68.z), 1);
- SysMatrix_InsertXRotation_s(atans(-sp68.y, sp4C), 1);
- SysMatrix_InsertScale(0.015f, 0.015f, sqrtf(SQ(sp68.y) + sp48) * 0.01f, 1);
- gSPMatrix(sp44->polyOpa.p++, SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPDisplayList(sp44->polyOpa.p++, D_040008D0);
- func_801229A0(globalCtx, player);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement