Advertisement
fggkyle

Untitled

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