Advertisement
fggkyle

Untitled

Oct 5th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. void func_801330E0(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable,
  2. OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex) {
  3. SkelLimbEntry* limbEntry;
  4. Gfx* dList;
  5. Vec3f pos;
  6. Vec3s rot;
  7. GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
  8.  
  9. SysMatrix_StatePush();
  10. limbEntry = Lib_PtrSegToVirt(skeleton->limbs[limbIndex]);
  11. limbIndex++;
  12. rot = limbDrawTable[limbIndex];
  13.  
  14. pos.x = limbEntry->translation.x;
  15. pos.y = limbEntry->translation.y;
  16. pos.z = limbEntry->translation.z;
  17.  
  18. dList = limbEntry->displayLists[dListIndex];
  19. if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) {
  20. SysMatrix_RotateAndTranslateState(&pos, &rot);
  21. if (dList != NULL) {
  22. gSPMatrix(gfxCtx->polyOpa.p++, SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx),
  23. G_MTX_LOAD);
  24.  
  25. gSPDisplayList(gfxCtx->polyOpa.p++, dList);
  26. }
  27. }
  28.  
  29. if (1) {}
  30.  
  31. if (postLimbDraw != NULL) {
  32. postLimbDraw(globalCtx, limbIndex, &dList, &rot, actor);
  33. }
  34.  
  35. if (limbEntry->firstChildIndex != LIMB_DONE) {
  36. func_801330E0(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw,
  37. postLimbDraw, actor, dListIndex);
  38. }
  39.  
  40. SysMatrix_StatePop();
  41.  
  42. if (limbEntry->nextLimbIndex != LIMB_DONE) {
  43. func_801330E0(globalCtx, limbEntry->nextLimbIndex, skeleton, limbDrawTable, overrideLimbDraw,
  44. postLimbDraw, actor, dListIndex);
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement