-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Deflate algorithm to Sprite Compression using ZLIB-NG
Co-authored-by: ivan-mogilko <[email protected]>
- Loading branch information
1 parent
6457795
commit 32a6dde
Showing
18 changed files
with
221 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FetchContent_Declare( | ||
zlibng_content | ||
URL https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.3.tar.gz | ||
URL_HASH MD5=f2ddef7b10e24cdcc4f17285575a6895 | ||
) | ||
|
||
FetchContent_GetProperties(zlibng_content) | ||
if(NOT zlibng_content_POPULATED) | ||
FetchContent_Populate(zlibng_content) | ||
|
||
set(ZLIB_ENABLE_TESTS OFF CACHE BOOL "") | ||
set(ZLIBNG_ENABLE_TESTS OFF CACHE BOOL "") | ||
set(WITH_GTEST OFF CACHE BOOL "") | ||
set(ZLIB_COMPAT ON CACHE BOOL "") | ||
add_subdirectory(${zlibng_content_SOURCE_DIR} ${zlibng_content_BINARY_DIR} EXCLUDE_FROM_ALL) | ||
|
||
add_library(zlib-interface INTERFACE) | ||
target_link_libraries(zlib-interface INTERFACE zlibstatic) | ||
add_library(ZLIB::ZLIB ALIAS zlib-interface) | ||
|
||
endif() | ||
set(ZLIB_LIBRARIES ZLIB::ZLIB) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ public enum SpriteCompression | |
{ | ||
None, | ||
RLE, | ||
LZW | ||
LZW, | ||
Deflate | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ImportGroup Label="PropertySheets" /> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup /> | ||
<ItemDefinitionGroup> | ||
<ClCompile> | ||
<AdditionalIncludeDirectories>$(ZLIB_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> | ||
<Link> | ||
<AdditionalLibraryDirectories>$(AGS_ZLIB_LIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
<AdditionalDependencies>zlib.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
</Link> | ||
<Lib> | ||
<AdditionalLibraryDirectories>$(AGS_ZLIB_LIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
<AdditionalDependencies>zlib.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
</Lib> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'"> | ||
<Link> | ||
<AdditionalLibraryDirectories>$(AGS_ZLIB_LIB_X64);$(AGS_ZLIB_LIB)\..\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
<AdditionalDependencies>zlib.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
</Link> | ||
<Lib> | ||
<AdditionalLibraryDirectories>$(AGS_ZLIB_LIB_X64);$(AGS_ZLIB_LIB)\..\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
<AdditionalDependencies>zlib.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
</Lib> | ||
</ItemDefinitionGroup> | ||
<ItemGroup /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.