Advertisement
fggkyle

Untitled

Sep 25th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. void ArmsHook_Draw(Actor *thisx, GlobalContext *globalCtx) {
  2. ArmsHook* this = THIS;
  3. ActorPlayer* player = PLAYER;
  4. Vec3f sp68;
  5. Vec3f sp5C;
  6. Vec3f sp50;
  7. f32 sp4C;
  8. f32 sp48;
  9. GraphicsContext *sp44;
  10.  
  11. if (player->base.draw != NULL) {
  12. if (player->unk151 == 0xB) {
  13. sp44 = globalCtx->state.gfxCtx;
  14. if ((this->actionFunc != func_808C12A4) || (this->timer <= 0)) {
  15. SysMatrix_MultiplyVector3fByState(&D_808C1C10, &this->unk_1E0);
  16. SysMatrix_MultiplyVector3fByState(&D_808C1C28, &sp5C);
  17. SysMatrix_MultiplyVector3fByState(&D_808C1C34, &sp50);
  18. this->unk_1C4 = 0;
  19. } else {
  20. SysMatrix_MultiplyVector3fByState(&D_808C1C1C, &this->unk_1E0);
  21. SysMatrix_MultiplyVector3fByState(&D_808C1C40, &sp5C);
  22. SysMatrix_MultiplyVector3fByState(&D_808C1C4C, &sp50);
  23. }
  24. func_80126440(globalCtx, &this->collider.base, &this->unk_1C4, &sp5C, &sp50);
  25. func_8012C28C(globalCtx->state.gfxCtx);
  26. func_80122868();
  27.  
  28. gSPMatrix(sp44->polyOpa.p++, SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
  29. gSPDisplayList(sp44->polyOpa.p++, D_0601D960);
  30. SysMatrix_InsertTranslation(this->actor.currPosRot.pos.x, this->actor.currPosRot.pos.y, this->actor.currPosRot.pos.z, 0);
  31. Math_Vec3f_Diff(&player->unk368, &this->actor.currPosRot.pos, &sp68);
  32. sp48 = SQ(sp68.x) + SQ(sp68.z);
  33. sp4C = sqrtf(sp48);
  34. SysMatrix_InsertYRotation_s(atans(sp68.x, sp68.z), 1);
  35. SysMatrix_InsertXRotation_s(atans(-sp68.y, sp4C), 1);
  36. SysMatrix_InsertScale(0.015f, 0.015f, sqrtf(SQ(sp68.y) + sp48) * 0.01f, 1);
  37. gSPMatrix(sp44->polyOpa.p++, SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
  38. gSPDisplayList(sp44->polyOpa.p++, D_040008D0);
  39. func_801229A0();
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement