Advertisement
fggkyle

Untitled

Sep 25th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. void ArmsHook_Draw(Actor *thisx, GlobalContext *globalCtx) {
  2. Vec3f *sp74;
  3. f32 sp68;
  4. ? sp5C;
  5. ? sp50;
  6. f32 sp4C;
  7. f32 sp48;
  8. GraphicsContext *sp44;
  9. Gfx *sp3C;
  10. Gfx *temp_v0_2;
  11. Gfx *temp_v0_3;
  12. Gfx *temp_v0_4;
  13. Gfx *temp_v0_5;
  14. Vec3f *temp_v0;
  15. f32 temp_f0;
  16. f32 temp_f12;
  17. f32 temp_f2;
  18.  
  19. temp_v0 = globalCtx->unk1CCC;
  20. if (temp_v0->unk13C != 0) {
  21. if (temp_v0->unk151 == 0xB) {
  22. sp44 = globalCtx->state.gfxCtx;
  23. if ((thisx->unk20C != &func_808C12A4) || (thisx->unk20A <= 0)) {
  24. sp74 = temp_v0;
  25. SysMatrix_MultiplyVector3fByState(&D_808C1C10, thisx + 0x1E0);
  26. SysMatrix_MultiplyVector3fByState(&D_808C1C28, &sp5C);
  27. SysMatrix_MultiplyVector3fByState(&D_808C1C34, &sp50);
  28. thisx->unk1C4 = 0;
  29. } else {
  30. sp74 = temp_v0;
  31. SysMatrix_MultiplyVector3fByState(&D_808C1C1C, thisx + 0x1E0);
  32. SysMatrix_MultiplyVector3fByState(&D_808C1C40, &sp5C);
  33. SysMatrix_MultiplyVector3fByState(&D_808C1C4C, &sp50);
  34. }
  35. func_80126440(globalCtx, thisx + 0x144, thisx + 0x1C4, &sp5C, &sp50);
  36. func_8012C28C(globalCtx->state.gfxCtx);
  37. func_80122868();
  38. temp_v0_2 = sp44->polyOpa.p;
  39. sp44->polyOpa.p = temp_v0_2 + 8;
  40. temp_v0_2->words.w0 = 0xDA380003;
  41. sp3C = temp_v0_2;
  42. sp3C->words.w1 = SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx);
  43. temp_v0_3 = sp44->polyOpa.p;
  44. sp44->polyOpa.p = temp_v0_3 + 8;
  45. temp_v0_3->words.w1 = 0x601D960;
  46. temp_v0_3->words.w0 = 0xDE000000;
  47. SysMatrix_InsertTranslation(thisx->currPosRot.pos.x, thisx->currPosRot.pos.y, (bitwise f32) (bitwise s32) thisx->currPosRot.pos.z, 0);
  48. Math_Vec3f_Diff(sp74 + 0x368, &thisx->currPosRot, &sp68);
  49. temp_f2 = (sp68 * sp68) + (sp70 * sp70);
  50. temp_f0 = sqrtf(temp_f2);
  51. sp48 = temp_f2;
  52. sp4C = temp_f0;
  53. SysMatrix_InsertYRotation_s((atans(sp68, sp70) << 0x10) >> 0x10, 1);
  54. SysMatrix_InsertXRotation_s((atans(-sp6C, sp4C) << 0x10) >> 0x10, 1);
  55. temp_f12 = D_808C1C64;
  56. SysMatrix_InsertScale(temp_f12, temp_f12, sqrtf((sp6C * sp6C) + sp48) * D_808C1C68, 1);
  57. temp_v0_4 = sp44->polyOpa.p;
  58. sp44->polyOpa.p = temp_v0_4 + 8;
  59. temp_v0_4->words.w0 = 0xDA380003;
  60. temp_v0_4->words.w1 = SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx);
  61. temp_v0_5 = sp44->polyOpa.p;
  62. sp44->polyOpa.p = temp_v0_5 + 8;
  63. temp_v0_5->words.w1 = 0x40008D0;
  64. temp_v0_5->words.w0 = 0xDE000000;
  65. func_801229A0();
  66. }
  67. }
  68. }
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement