Skip to content

Commit

Permalink
Update to Cubism 4 SDK for Native R6_1
Browse files Browse the repository at this point in the history
  • Loading branch information
wada-at-live2d-com committed Mar 10, 2023
1 parent ba896da commit 3ac7185
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).


## [4-r.6.1] - 2023-03-10

### Added

* Add function to validate MOC3 files.


## [4-r.6] - 2023-02-21

### Added
Expand Down Expand Up @@ -244,6 +251,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
* Fix invalid expressions of `CubismCdiJson`.


[4-r.6.1]: https://github.com/Live2D/CubismNativeFramework/compare/4-r.6...4-r.6.1
[4-r.6]: https://github.com/Live2D/CubismNativeFramework/compare/4-r.5.1...4-r.6
[4-r.5.1]: https://github.com/Live2D/CubismNativeFramework/compare/4-r.5...4-r.5.1
[4-r.5]: https://github.com/Live2D/CubismNativeFramework/compare/4-r.5-beta.5...4-r.5
Expand Down
6 changes: 6 additions & 0 deletions src/Model/CubismMoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,10 @@ Core::csmMocVersion CubismMoc::GetMocVersion()
return _mocVersion;
}

csmBool CubismMoc::HasMocConsistency(void* address, const csmUint32 size)
{
csmInt32 consistencyFlags = Core::csmHasMocConsistency(address, size);
return consistencyFlags != 0 ? true : false;
}

}}}
10 changes: 10 additions & 0 deletions src/Model/CubismMoc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ class CubismMoc
*/
Core::csmMocVersion GetMocVersion();

/**
* @brief Checks consistency of a moc.
*
* @param address Address of unrevived moc. The address must be aligned to 'csmAlignofMoc'.
* @param size Size of moc (in bytes).
*
* @return '1' if Moc is valid; '0' otherwise.
*/
static csmBool HasMocConsistency(void* address, const csmUint32 size);

private:
/**
* @brief コンストラクタ
Expand Down

0 comments on commit 3ac7185

Please sign in to comment.