Skip to content

Commit

Permalink
add lmt v68 support
Browse files Browse the repository at this point in the history
  • Loading branch information
PredatorCZ committed May 13, 2024
1 parent c4a70a0 commit 85dce57
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions classgen/lmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
'LMT57',
'LMT66',
'LMT67',
'LMT68',
'LMT92',
'LMT95',
]
Expand Down
2 changes: 1 addition & 1 deletion classgen/mtf_lmt/bone_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
ClassPatch('LMT51', ClassPatchType.replace, ClassMember('compression', TrackV1_5BufferTypes)),
ClassPatch('LMT56', ClassPatchType.replace, ClassMember('compression', TrackV2BufferTypes),
ClassPatchType.append, ClassMember('extremes', Pointer(TrackMinMax))),
ClassPatch('LMT92', ClassPatchType.insert_after, 'boneID', ClassMember('boneID2', TYPES.int32)),
ClassPatch('LMT68', ClassPatchType.insert_after, 'boneID', ClassMember('boneID2', TYPES.int32)),
]

if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions include/revil/mot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ enum class LMTVersion : uint8 {
V_57 = 57, // RE:M 3DS
V_66 = 66, // DD, DD:DA
V_67 = 67, // Other, generic MTF v2 format
V_68 = 68, // MHS2
V_92 = 92, // MH:W
V_95 = 95, // Iceborne
};
Expand Down
2 changes: 1 addition & 1 deletion src/mtf_lmt/animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MAKE_ENUM(ENUMSCOPE(class AnimV2Flags
#include "animation.inl"

static const ::LMTVersion supportedVersions[] = {
LMT22, LMT40, LMT49, LMT50, LMT51, LMT56, LMT57, LMT66, LMT67, LMT92, LMT95,
LMT22, LMT40, LMT49, LMT50, LMT51, LMT56, LMT57, LMT66, LMT67, LMT68, LMT92, LMT95,
};

bool LMTAnimation::SupportedVersion(uint16 version) {
Expand Down
4 changes: 2 additions & 2 deletions src/mtf_lmt/animation.inl
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ static const std::set<ClassData<_count_>> LAYOUTS {
{{{{LMT22, LMT22, 8, 0}}, 208}, {32, -1, 48, -1, -1, 16, -1, 12, 8, 0}, {0x8800, 0xe}},
{{{{LMT40, LMT51, 8, 0}}, 224}, {32, 48, 64, -1, -1, 16, -1, 12, 8, 0}, {0x8800, 0xe}},
{{{{LMT56, LMT57, 8, 0}}, 384}, {32, 48, 64, -1, -1, 16, -1, 12, 8, 0}, {0x8800, 0xe}},
{{{{LMT66, LMT67, 8, 0}}, 96}, {32, 48, 72, 64, 80, 16, -1, 12, 8, 0}, {0x8b30, 0xe}},
{{{{LMT66, LMT68, 8, 0}}, 96}, {32, 48, 72, 64, 80, 16, -1, 12, 8, 0}, {0x8b30, 0xe}},
{{{{LMT92, LMT95, 8, 0}}, 96}, {32, 48, 88, 64, -1, 16, 72, 12, 8, 0}, {0x8830, 0xe}},
{{{{LMT22, LMT22, 4, 0}}, 176}, {16, -1, 32, -1, -1, 12, -1, 8, 4, 0}, {0x8800, 0xa}},
{{{{LMT40, LMT51, 4, 0}}, 192}, {16, 32, 48, -1, -1, 12, -1, 8, 4, 0}, {0x8800, 0xa}},
{{{{LMT56, LMT57, 4, 0}}, 336}, {16, 32, 48, -1, -1, 12, -1, 8, 4, 0}, {0x8800, 0xa}},
{{{{LMT66, LMT67, 4, 0}}, 64}, {16, 32, 52, 48, 56, 12, -1, 8, 4, 0}, {0x8a20, 0xa}},
{{{{LMT66, LMT68, 4, 0}}, 64}, {16, 32, 52, 48, 56, 12, -1, 8, 4, 0}, {0x8a20, 0xa}},
{{{{LMT92, LMT95, 4, 0}}, 64}, {16, 32, 60, 48, -1, 12, 52, 8, 4, 0}, {0x8820, 0xa}}
};
struct Interface {
Expand Down
4 changes: 2 additions & 2 deletions src/mtf_lmt/bone_track.inl
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ static const std::set<ClassData<_count_>> LAYOUTS {
{{{{LMT22, LMT22, 8, 0}}, 24}, {3, -1, 2, 16, 8, 0, -1, -1, 1, 4}, {0x2c0, 0x8}},
{{{{LMT40, LMT51, 8, 0}}, 40}, {3, -1, 2, 16, 8, 0, -1, 24, 1, 4}, {0x2c0, 0x8}},
{{{{LMT56, LMT67, 8, 0}}, 48}, {3, -1, 2, 16, 8, 0, 40, 24, 1, 4}, {0x32c0, 0x8}},
{{{{LMT92, LMT95, 8, 0}}, 48}, {3, 4, 2, 16, 12, 0, 40, 24, 1, 8}, {0x32c8, 0x8}},
{{{{LMT68, LMT95, 8, 0}}, 48}, {3, 4, 2, 16, 12, 0, 40, 24, 1, 8}, {0x32c8, 0x8}},
{{{{LMT22, LMT22, 4, 0}}, 16}, {3, -1, 2, 12, 8, 0, -1, -1, 1, 4}, {0x280, 0x8}},
{{{{LMT40, LMT51, 4, 0}}, 32}, {3, -1, 2, 12, 8, 0, -1, 16, 1, 4}, {0x280, 0x8}},
{{{{LMT56, LMT67, 4, 0}}, 36}, {3, -1, 2, 12, 8, 0, 32, 16, 1, 4}, {0x2280, 0x8}},
{{{{LMT92, LMT95, 4, 0}}, 40}, {3, 4, 2, 16, 12, 0, 36, 20, 1, 8}, {0x2288, 0x8}}
{{{{LMT68, LMT95, 4, 0}}, 40}, {3, 4, 2, 16, 12, 0, 36, 20, 1, 8}, {0x2288, 0x8}}
};
struct Interface {
Interface(char *data_, LayoutLookup layout_): data{data_}, layout{GetLayout(LAYOUTS, {layout_, {LookupFlag::Ptr}})}, lookup{layout_} {}
Expand Down
4 changes: 2 additions & 2 deletions src/mtf_lmt/event.inl
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ enum Members {
};
static const std::set<ClassData<_count_>> LAYOUTS {
{{{{LMT22, LMT51, 8, 0}}, 160}, {0}, {0x0}},
{{{{LMT56, LMT67, 8, 0}}, 320}, {0}, {0x0}},
{{{{LMT56, LMT68, 8, 0}}, 320}, {0}, {0x0}},
{{{{LMT92, LMT95, 8, 0}}, 8}, {0}, {0x3}},
{{{{LMT22, LMT51, 4, 0}}, 144}, {0}, {0x0}},
{{{{LMT56, LMT67, 4, 0}}, 288}, {0}, {0x0}},
{{{{LMT56, LMT68, 4, 0}}, 288}, {0}, {0x0}},
{{{{LMT92, LMT95, 4, 0}}, 4}, {0}, {0x2}}
};
struct Interface {
Expand Down
1 change: 1 addition & 0 deletions src/mtf_lmt/lmt.inl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ enum LMTVersion : uint8 {
LMT57 = 57, // RE:M 3DS
LMT66 = 66, // DD, DD:DA
LMT67 = 67, // Other, generic MTF v2 format
LMT68 = 68, // MHS2
LMT92 = 92, // MH:W
LMT95 = 95, // Iceborne
};
Expand Down

0 comments on commit 85dce57

Please sign in to comment.