A Windows x86 utility DLL for checking GoldSrc StudioModel assets and indexed-color BMP images. Originally part of MetaHookSv.
The initial migration preserved the original behavior. Studio validation has since
been hardened; see the validation update. It preserves the
CreateInterface("UtilAssetsIntegrityAPI_001", ...) interface. See
中文说明 and build details.
Requirements: Windows, Visual Studio 2022 with the C++ desktop workload and Windows SDK, CMake 3.21 or newer, and Git. The first configure downloads pinned MetaHook SDK, FreeImage and ScopeExit sources. MetaHook's launcher and ScopeExit's examples are not built.
scripts\build-UtilAssetsIntegrity-x86-Release.bat
scripts\build-UtilAssetsIntegrity-x86-Debug.batEach script configures, builds, runs CTest, installs, and repeats the public-interface
smoke tests against the installed DLLs. Output is under build/x86/<Configuration>
and install/x86/<Configuration>. Tests dynamically load the DLL, obtain its factory,
and check StudioModel and BMP behavior without running a game.
Local source trees can override automatic downloads through CMake cache arguments or environment variables. Explicit source trees are read-only inputs; CMake cache arguments take precedence. For example:
scripts\build-UtilAssetsIntegrity-x86-Release.bat "-DMETAHOOK_SOURCE_PATH=D:/MetaHookSv-org/MetaHook" "-DFREEIMAGE_SOURCE_PATH=D:/MetaHookSv/thirdparty/FreeImage" "-DSCOPEEXIT_SOURCE_PATH=D:/MetaHookSv/thirdparty/ScopeExit"A direct CMake build can set BUILD_TESTING=OFF; the convenience scripts require tests to be enabled.
The installed layout is:
svencoop/metahook/dlls/UtilAssetsIntegrity.dll
svencoop/metahook/dlls/UtilAssetsIntegrity.pdb
svencoop/metahook/dlls/FreeImage/FreeImage.dll (FreeImaged.dll for Debug)
Copy the installed svencoop directory over the game's mod directory. The host must
make the FreeImage directory available to the Windows DLL loader before loading
UtilAssetsIntegrity.dll, as MetaHook's dependency search setup does.
Consumers include the repository's include/Interface/IUtilAssetsIntegrity.h (headers are
not shipped in the release archive) plus the MetaHook SDK's interface.h, load
the DLL and request UTIL_ASSETS_INTEGRITY_INTERFACE_VERSION from its CreateInterface
factory. The returned instance is a singleton owned by the DLL. Keep it loaded while
using the interface and do not delete the instance.
CheckStudioModelaccepts the existing IDST/IDSQ model formats, version 10.CheckStudioSequenceGroupchecks an IDSQ file's animation against its main model. It accepts the last frame's interpolation read up toUTIL_ASSETS_INTEGRITY_SEQUENCE_GROUP_TAIL_BYTESpast the group, as stock group files need; callers that animate the group keep that many zeroed bytes after it.Check8bitBMPchecks for FreeImage's indexed-color classification and appliesMaxWidth,MaxHeightandMaxSizewhen a result object is supplied.MaxSizeis the decoded pixel count, not the input file size. All three limits default to zero; set them before checking a nonempty image. Passing a null result pointer skips the size limits.- A failed check returns a
UtilAssetsIntegrityCheckReasonand fillsReasonStrwhen a result object is supplied. The migration retains the original checks; see the project overview for their boundaries.
GitHub Actions builds and tests x86 Release for main pushes, pull requests and manual
runs. Tags matching v* create a release. Only the runtime svencoop/ tree from the
installed directory is packaged as UtilAssetsIntegrity-windows-x86.7z, preserving its
top-level directory, and verified with 7z t.
The module retains MetaHookSv's MIT license. Dependencies retain their own
copyright and license notices in their upstream repositories, pinned in
cmake/Dependencies.cmake.