animation struct documentation

This commit is contained in:
Banjo Kazooie
2023-03-12 23:11:39 -05:00
parent 7dd7a0b60c
commit af75d8b32d
293 changed files with 2031 additions and 1986 deletions

View File

@@ -26,32 +26,32 @@ void func_802E6A90(BKModelUnk28List *arg0, BKVertexList *arg1, s32 arg2, f32 arg
}
}
void func_802E6BD0(BKModelUnk28List *arg0, BKVertexList *arg1, struct58s *arg2) {
Vtx *vtx_list;
void func_802E6BD0(BKModelUnk28List *arg0, BKVertexList *arg1, AnimMtxList *mtx_list) {
Vtx *vtx;
Vtx *i_vtx;
s32 i;
BKModelUnk28 *var_s1;
BKModelUnk28 *i_ptr;
s16 sp50[3];
s32 temp_v0;
s32 var_s3;
s32 mtx_index;
s32 var_s4;
vtx_list = vtxList_getVertices(arg1);
var_s1 = (BKModelUnk28 *)(arg0 + 1);
var_s3 = -2;
vtx = vtxList_getVertices(arg1);
i_ptr = (BKModelUnk28 *)(arg0 + 1);
mtx_index = -2;
for(var_s4 = 0; var_s4 < arg0->count; var_s4++){
if (var_s3 != var_s1->unk6) {
var_s3 = var_s1->unk6;
func_80251BCC(func_802EA110(arg2, var_s3));
if (mtx_index != i_ptr->anim_index) {
mtx_index = i_ptr->anim_index;
mlMtxSet(animMtxList_get(mtx_list, mtx_index));
}
mlMtx_apply_vec3s(sp50, var_s1->unk0);
for(i = 0; i < var_s1->vtx_count; i++){
i_vtx = &vtx_list[var_s1->vtx_list[i]];
mlMtx_apply_vec3s(sp50, i_ptr->coord);
for(i = 0; i < i_ptr->vtx_count; i++){
i_vtx = &vtx[i_ptr->vtx_list[i]];
i_vtx->v.ob[0] = sp50[0];
i_vtx->v.ob[1] = sp50[1];
i_vtx->v.ob[2] = sp50[2];
}
var_s1 = (BKModelUnk28 *)((s16*)(var_s1 + 1) + (var_s1->vtx_count - 1));
i_ptr = (BKModelUnk28 *)((s16*)(i_ptr + 1) + (i_ptr->vtx_count - 1));
}
osWritebackDCache(vtx_list, vtxList_getVtxCount(arg1) * sizeof(Vtx));
osWritebackDCache(vtx, vtxList_getVtxCount(arg1) * sizeof(Vtx));
}