Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void func_801330E0(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable,
- OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex) {
- SkelLimbEntry* limbEntry;
- Gfx* dList;
- Vec3f pos;
- Vec3s rot;
- {
- GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
- s32 pad;
- SysMatrix_StatePush();
- limbEntry = Lib_PtrSegToVirt(skeleton->limbs[limbIndex]);
- limbIndex++;
- rot = limbDrawTable[limbIndex];
- pos.x = limbEntry->translation.x;
- pos.y = limbEntry->translation.y;
- pos.z = limbEntry->translation.z;
- dList = limbEntry->displayLists[dListIndex];
- if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) {
- SysMatrix_RotateAndTranslateState(&pos, &rot);
- if (dList != NULL) {
- Gfx* _polyOpa = gfxCtx->polyOpa.p;
- gSPMatrix(_polyOpa, SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx),
- G_MTX_LOAD);
- gSPDisplayList(_polyOpa + 1, dList);
- gfxCtx->polyOpa.p = _polyOpa + 2;
- }
- }
- if (postLimbDraw != NULL) {
- postLimbDraw(globalCtx, limbIndex, &dList, &rot, actor);
- }
- if (limbEntry->firstChildIndex != LIMB_DONE) {
- func_801330E0(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw,
- postLimbDraw, actor, dListIndex);
- }
- SysMatrix_StatePop();
- if (limbEntry->nextLimbIndex != LIMB_DONE) {
- func_801330E0(globalCtx, limbEntry->nextLimbIndex, skeleton, limbDrawTable, overrideLimbDraw,
- postLimbDraw, actor, dListIndex);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement