Skip to content

Commit

Permalink
[librii] kmp: Fix from-json AREA types
Browse files Browse the repository at this point in the history
  • Loading branch information
riidefi committed Dec 29, 2024
1 parent f993085 commit b1a02b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/librii/kmp/CourseMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ void to_json(json& j, const Area& a) {
}

void from_json(const json& j, Area& a) {
j.at("mType").get_to(a.mType);
int m_type{};
j.at("mType").get_to(m_type);
a.mType = static_cast<AreaType>(m_type);
from_json(j["mModel"], a.mModel);
j.at("mCameraIndex").get_to(a.mCameraIndex);
j.at("mPriority").get_to(a.mPriority);
Expand Down
Binary file added tests/samples/strobenz.kmp
Binary file not shown.
4 changes: 4 additions & 0 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
# luigi_circuit.kmp
'55af17739e1f02f9cc3fe0cdf79195a0': '55af17739e1f02f9cc3fe0cdf79195a0',

# strobenz.kmp
# Fixes cannon point (CNPT) indices
'5a526e9fd12b7437afc989b087e43df8': '01d10a5c1be7e83eead19e1126a1a4d1',

# luigi_circuit.brres
'b84346d8549d38f4ba75a47eb87e9ca6': 'b84346d8549d38f4ba75a47eb87e9ca6',
# old_town_ds.brres: Has isotropic non-identity scale
Expand Down

0 comments on commit b1a02b3

Please sign in to comment.