Skip to content

Commit

Permalink
Merge pull request #4 from Jayveer/fix/read-archive
Browse files Browse the repository at this point in the history
fix alignment
  • Loading branch information
Jayveer authored Nov 11, 2023
2 parents 99b0e26 + 273b1fb commit aa3286c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,15 @@ void loadMotion(noeRAPI_t* rapi, BYTE* motionFile, modelBone_t* noeBones, int nu

if (mtarHeader->maxJoint > numBones) return;

mtarHeader->resvBoneTableOffset = 0x20;
mtarHeader->resvBoneTableOffset = 0x30;
mtarHeader->resvUnknownOffset = mtarHeader->resvBoneTableOffset + (mtarHeader->maxJoint * 4);
mtarHeader->resvDataTableOffset = mtarHeader->resvUnknownOffset + (mtarHeader->maxJoint * 4);

uint8_t *mtcm = (uint8_t*) &motionFile[mtarHeader->mtcmOffset];
uint32_t *boneTable = (uint32_t*)&motionFile[mtarHeader->resvBoneTableOffset];
MtarData *mtcmTable = (MtarData*)&motionFile[mtarHeader->resvDataTableOffset + 0x18];

int align = getAlignment(mtarHeader->resvDataTableOffset, 0x10);
MtarData *mtcmTable = (MtarData*)&motionFile[mtarHeader->resvDataTableOffset + align];

CArrayList<noesisAnim_t*> animList;

Expand Down

0 comments on commit aa3286c

Please sign in to comment.