fggkyle

Untitled

Oct 5th, 2020 (edited)
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.29 KB | None | 0 0
  1. void func_801330E0(GlobalContext *globalCtx, s32 limbIndex, Skeleton *skeleton, Vec3s *limbDrawTable, s32 (*)(struct GlobalContext *globalCtx, s32 limbIndex, Gfx **dList, Vec3f *pos, Vec3s *rot, struct Actor *actor) overrideLimbDraw, void (*)(struct GlobalContext *globalCtx, s32 limbIndex, Gfx **dList, Vec3s *rot, struct Actor *actor) postLimbDraw, Actor *actor, s32 dListIndex) {
  2.     void *sp5C;
  3.     s32 sp58;
  4.     f32 sp54;
  5.     f32 sp50;
  6.     f32 sp4C;
  7.     ? sp44;
  8.     GraphicsContext *sp40;
  9.     Gfx *sp38;
  10.     Gfx *temp_v1;
  11.     f32 *temp_a3;
  12.     s32 *temp_a2;
  13.     s32 temp_t3;
  14.     s32 temp_t6;
  15.     u8 temp_a1;
  16.     u8 temp_a1_2;
  17.     void *temp_t7;
  18.     void *temp_v0;
  19.  
  20.     sp40 = globalCtx->state.gfxCtx;
  21.     SysMatrix_StatePush();
  22.     temp_v0 = Lib_PtrSegToVirt((void *) skeleton[limbIndex].limbs);
  23.     sp5C = temp_v0;
  24.     temp_t3 = limbIndex + 1;
  25.     temp_t6 = temp_t3 * 6;
  26.     limbIndex = temp_t3;
  27.     temp_t7 = limbDrawTable + temp_t6;
  28.     temp_a2 = &sp58;
  29.     sp44.unk0 = (?32) (unaligned s32) temp_t7->unk0;
  30.     temp_a3 = &sp4C;
  31.     sp44.unk4 = (u16) temp_t7->unk4;
  32.     sp4C = (f32) temp_v0->unk0;
  33.     sp50 = (f32) temp_v0->unk2;
  34.     sp54 = (f32) temp_v0->unk4;
  35.     sp58 = (temp_v0 + (dListIndex * 4))->unk8;
  36.     if ((overrideLimbDraw == 0) || (overrideLimbDraw(globalCtx, limbIndex, temp_a2, temp_a3, &sp44, actor) == 0)) {
  37.         SysMatrix_RotateAndTranslateState((Vec3f *) &sp4C, (Vec3s *) &sp44);
  38.         if (sp58 != 0) {
  39.             temp_v1 = sp40->polyOpa.p;
  40.             temp_v1->words.w0 = 0xDA380003U;
  41.             sp38 = temp_v1;
  42.             temp_v1->words.w1 = SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx);
  43.             temp_v1->unk8 = 0xDE000000;
  44.             temp_v1->unkC = sp58;
  45.             sp40->polyOpa.p = (Gfx *) (temp_v1 + 0x10);
  46.         }
  47.     }
  48.     if (postLimbDraw != 0) {
  49.         postLimbDraw(globalCtx, limbIndex, &sp58, &sp44, actor);
  50.     }
  51.     temp_a1 = sp5C->unk6;
  52.     if (temp_a1 != 0xFF) {
  53.         func_801330E0(globalCtx, (s32) temp_a1, skeleton, limbDrawTable, overrideLimbDraw, postLimbDraw, actor, dListIndex);
  54.     }
  55.     SysMatrix_StatePop();
  56.     temp_a1_2 = sp5C->unk7;
  57.     if (temp_a1_2 != 0xFF) {
  58.         func_801330E0(globalCtx, (s32) temp_a1_2, skeleton, limbDrawTable, overrideLimbDraw, postLimbDraw, actor, dListIndex);
  59.     }
  60. }
  61.  
  62.  
Add Comment
Please, Sign In to add comment