Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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) {
- void *sp5C;
- s32 sp58;
- f32 sp54;
- f32 sp50;
- f32 sp4C;
- ? sp44;
- GraphicsContext *sp40;
- Gfx *sp38;
- Gfx *temp_v1;
- f32 *temp_a3;
- s32 *temp_a2;
- s32 temp_t3;
- s32 temp_t6;
- u8 temp_a1;
- u8 temp_a1_2;
- void *temp_t7;
- void *temp_v0;
- sp40 = globalCtx->state.gfxCtx;
- SysMatrix_StatePush();
- temp_v0 = Lib_PtrSegToVirt((void *) skeleton[limbIndex].limbs);
- sp5C = temp_v0;
- temp_t3 = limbIndex + 1;
- temp_t6 = temp_t3 * 6;
- limbIndex = temp_t3;
- temp_t7 = limbDrawTable + temp_t6;
- temp_a2 = &sp58;
- sp44.unk0 = (?32) (unaligned s32) temp_t7->unk0;
- temp_a3 = &sp4C;
- sp44.unk4 = (u16) temp_t7->unk4;
- sp4C = (f32) temp_v0->unk0;
- sp50 = (f32) temp_v0->unk2;
- sp54 = (f32) temp_v0->unk4;
- sp58 = (temp_v0 + (dListIndex * 4))->unk8;
- if ((overrideLimbDraw == 0) || (overrideLimbDraw(globalCtx, limbIndex, temp_a2, temp_a3, &sp44, actor) == 0)) {
- SysMatrix_RotateAndTranslateState((Vec3f *) &sp4C, (Vec3s *) &sp44);
- if (sp58 != 0) {
- temp_v1 = sp40->polyOpa.p;
- temp_v1->words.w0 = 0xDA380003U;
- sp38 = temp_v1;
- temp_v1->words.w1 = SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx);
- temp_v1->unk8 = 0xDE000000;
- temp_v1->unkC = sp58;
- sp40->polyOpa.p = (Gfx *) (temp_v1 + 0x10);
- }
- }
- if (postLimbDraw != 0) {
- postLimbDraw(globalCtx, limbIndex, &sp58, &sp44, actor);
- }
- temp_a1 = sp5C->unk6;
- if (temp_a1 != 0xFF) {
- func_801330E0(globalCtx, (s32) temp_a1, skeleton, limbDrawTable, overrideLimbDraw, postLimbDraw, actor, dListIndex);
- }
- SysMatrix_StatePop();
- temp_a1_2 = sp5C->unk7;
- if (temp_a1_2 != 0xFF) {
- func_801330E0(globalCtx, (s32) temp_a1_2, skeleton, limbDrawTable, overrideLimbDraw, postLimbDraw, actor, dListIndex);
- }
- }
Add Comment
Please, Sign In to add comment