diff --git a/Library/StdAfx.h b/Library/StdAfx.h index f688f65..ce37391 100644 --- a/Library/StdAfx.h +++ b/Library/StdAfx.h @@ -35,7 +35,9 @@ #include #include #include +#ifndef XCC_MINIMAL_BUILD #include +#endif using namespace std; using boost::iequals; diff --git a/Library/XCC Library.vcxproj b/Library/XCC Library.vcxproj index 0481daf..857d3f8 100644 --- a/Library/XCC Library.vcxproj +++ b/Library/XCC Library.vcxproj @@ -1,10 +1,18 @@  + + DebugMinimal + Win32 + Debug Win32 + + ReleaseMinimal + Win32 + Release Win32 @@ -18,18 +26,59 @@ + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ StaticLibrary - Static + Dynamic + MultiByte + true + v143 + + + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ + StaticLibrary + Dynamic MultiByte true v143 + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ + StaticLibrary + Dynamic + MultiByte + v143 + + + $(SolutionDir)\build\output\$(Configuration)-$(Platform)\lib\ + $(SolutionDir)\build\intermediate\$(Configuration)-$(Platform)\$(ProjectName)\ StaticLibrary Dynamic MultiByte v143 + + + + + + + + XCC_MINIMAL_BUILD + NO_FT_SUPPORT + + + + + + + + + XCC_MINIMAL_BUILD + NO_FT_SUPPORT + @@ -37,10 +86,18 @@ + + + + + + + + <_ProjectFileVersion>10.0.30319.1 @@ -51,7 +108,22 @@ Disabled - _DEBUG;WIN32;_LIB;JPEG_SUPPORT;OGG_SUPPORT;PNG_SUPPORT;%(PreprocessorDefinitions) + _DEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Use + stdafx.h + stdcpplatest + + + _DEBUG;%(PreprocessorDefinitions) + 0x0413 + + + + + Disabled + _DEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Use @@ -65,7 +137,7 @@ - NDEBUG;WIN32;_LIB;JPEG_SUPPORT;OGG_SUPPORT;PNG_SUPPORT;%(PreprocessorDefinitions) + NDEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) true MultiThreaded true @@ -78,204 +150,293 @@ 0x0413 + + + NDEBUG;WIN32;_LIB;$(XCC_MINIMAL_BUILD);$(NO_FT_SUPPORT);%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Use + stdafx.h + stdcpplatest + + + NDEBUG;%(PreprocessorDefinitions) + 0x0413 + + + true + true + true + true + true + true + true + true + true + false + false + true + true + true + true + true + true + true + true + true + true + + + true - + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true - - + + true + + true + true + true + true + true + true + true + true Create + Create Create + Create + true + true + true + true + true - - + + true - - + + true + true + true + true + true + true + true + true + true - - + + true - - + + true + true - - + + true + true + true + true + true @@ -301,7 +462,6 @@ - @@ -413,4 +573,13 @@ + + $(VcpkgRoot) + + + + + + + \ No newline at end of file diff --git a/XCC.props b/XCC.props index f813cc4..5970828 100644 --- a/XCC.props +++ b/XCC.props @@ -15,4 +15,5 @@ dsound.lib;gdiplus.lib;%(AdditionalDependencies) + diff --git a/misc/cc_file.cpp b/misc/cc_file.cpp index 13e4976..d9e9e11 100644 --- a/misc/cc_file.cpp +++ b/misc/cc_file.cpp @@ -19,6 +19,7 @@ #include "stdafx.h" #include "cc_file.h" +#ifndef XCC_MINIMAL_BUILD #include "aud_file.h" #include "avi_file.h" #include "big_file.h" @@ -70,6 +71,11 @@ #include "xcc_file.h" #include "xcc_lmd_file.h" #include "xif_file.h" +#else +#include "mix_file.h" +#include "xcc_dirs.h" +#endif + const char* ft_name[] = { diff --git a/misc/image_file.h b/misc/image_file.h index e107843..b9e9fb5 100644 --- a/misc/image_file.h +++ b/misc/image_file.h @@ -30,12 +30,14 @@ class Cimage_file : public Cvideo_file public: virtual void decode(void*) const = 0; +#ifndef XCC_MINIMAL_BUILD virtual Cvirtual_image vimage() const { Cvirtual_binary image; decode(image.write_start(this->cb_image())); return Cvirtual_image(image, this->cx(), this->cy(), this->cb_pixel(), this->palet()); } +#endif int cf() const override { @@ -43,6 +45,8 @@ public: } }; +#ifndef XCC_MINIMAL_BUILD int image_file_write(Cvirtual_file&, t_file_type, const byte* image, const t_palet_entry*, int cx, int cy); Cvirtual_file image_file_write(t_file_type, const byte* image, const t_palet_entry*, int cx, int cy); int image_file_write(const string& name, t_file_type, const byte* image, const t_palet_entry*, int cx, int cy); +#endif diff --git a/misc/mix_file.cpp b/misc/mix_file.cpp index 8354059..874ff31 100644 --- a/misc/mix_file.cpp +++ b/misc/mix_file.cpp @@ -19,14 +19,20 @@ #include #include "mix_file.h" +#ifndef NO_FT_SUPPORT #include "big_file.h" +#endif #include "blowfish.h" #include "crc.h" #include "id_log.h" +#ifndef NO_FT_SUPPORT #include "mix_cache.h" +#endif #include "mix_decode.h" +#ifndef NO_FT_SUPPORT #include "mix_rg_file.h" #include "pak_file.h" +#endif #include "string_conversion.h" #include "xcc_lmd_file.h" diff --git a/misc/shp_ts_file.cpp b/misc/shp_ts_file.cpp index 4950213..db60a92 100644 --- a/misc/shp_ts_file.cpp +++ b/misc/shp_ts_file.cpp @@ -22,7 +22,9 @@ #include "image_file.h" #include "shp_decode.h" #include "string_conversion.h" +#ifndef XCC_MINIMAL_BUILD #include "xcc_log.h" +#endif class Cshp_ts_decoder : public Cvideo_decoder { @@ -141,6 +143,7 @@ int get_ofs(int x, int y, int cx, int cy) return x + cx * y; } +#ifndef XCC_MINIMAL_BUILD int Cshp_ts_file::extract_as_pcx(const Cfname& name, t_file_type ft, const t_palet _palet, bool combine_shadows) const { t_palet palet; @@ -378,6 +381,7 @@ void shp_split_shadows(Cvirtual_image& image) image.load(d, cx, cy << 1, image.cb_pixel(), image.palet()); delete[] d; } +#endif /* void shp_xor_decode_frames(Cvirtual_image& image, int c_frames) diff --git a/misc/shp_ts_file.h b/misc/shp_ts_file.h index b38a053..76261cd 100644 --- a/misc/shp_ts_file.h +++ b/misc/shp_ts_file.h @@ -28,8 +28,10 @@ class Cshp_ts_file : public Cvideo_file { public: Cvideo_decoder* decoder(const t_palet_entry*); +#ifndef XCC_MINIMAL_BUILD int extract_as_pcx(const Cfname& name, t_file_type ft, const t_palet palet, bool combine_shadows = false) const; Cvirtual_image extract_as_pcx_single(const t_palet _palet, bool combine_shadows = false) const; +#endif bool is_valid() const; int cb_pixel() const @@ -106,7 +108,10 @@ public: int shp_decode4_size(const byte* s); Cvirtual_binary shp_decode4(const byte* s, int cb_d); int shp_encode4(const Cshp_ts_file& f, byte* d); + +#ifndef XCC_MINIMAL_BUILD void shp_split_frames(Cvirtual_image& image, int cblocks_x, int cblocks_y); void shp_split_shadows(Cvirtual_image& image); void shp_xor_decode_frames(Cvirtual_image& image, int c_frames); void shp_xor_encode_frames(Cvirtual_image& image, int c_frames); +#endif diff --git a/misc/virtual_image.cpp b/misc/virtual_image.cpp index 5dfc3e2..456ea2d 100644 --- a/misc/virtual_image.cpp +++ b/misc/virtual_image.cpp @@ -21,6 +21,8 @@ #include #include #include + +#ifndef XCC_MINIMAL_BUILD #include "dds_file.h" #include "image_file.h" #include "jpeg_file.h" @@ -28,6 +30,7 @@ #include "pcx_file_write.h" #include "png_file.h" #include "tga_file.h" +#endif #include "virtual_image.h" using namespace Gdiplus; @@ -80,6 +83,8 @@ void Cvirtual_image::load(const void* image, int cx, int cy, int cb_pixel, const palet(p, inflate); } +#ifndef XCC_MINIMAL_BUILD + int Cvirtual_image::load(const Cvirtual_binary& s) { Cdds_file dds_f; @@ -323,3 +328,5 @@ void Cvirtual_image::increase_palet_depth() d[i].b = (s[i].b & 63) * 255 / 63; } } + +#endif diff --git a/misc/virtual_image.h b/misc/virtual_image.h index 2396af8..0a2a2d6 100644 --- a/misc/virtual_image.h +++ b/misc/virtual_image.h @@ -121,3 +121,4 @@ private: int m_cy = 0; int mcb_pixel = 0; }; + diff --git a/misc/vxl_file.cpp b/misc/vxl_file.cpp index 3132cdf..a629aa1 100644 --- a/misc/vxl_file.cpp +++ b/misc/vxl_file.cpp @@ -21,9 +21,11 @@ #include "file32.h" #include "image_file.h" +#ifndef XCC_MINIMAL_BUILD #include "multi_line.h" #include "pcx_decode.h" #include "pcx_file_write.h" +#endif #include "string_conversion.h" bool Cvxl_file::is_valid() const @@ -51,6 +53,7 @@ bool Cvxl_file::is_valid() const return true; } +#ifndef XCC_MINIMAL_BUILD int Cvxl_file::extract_as_pcx(const Cfname& name, t_file_type ft, const t_palet _palet) const { t_palet palet; @@ -98,6 +101,7 @@ int Cvxl_file::extract_as_pcx(const Cfname& name, t_file_type ft, const t_palet } return 0; } +#endif ostream& Cvxl_file::extract_as_text(ostream& os) const { @@ -162,6 +166,7 @@ enum vi_z_max }; +#ifndef XCC_MINIMAL_BUILD int Cvxl_file::extract_as_xif(const string& name) const { Cxif_key k; @@ -458,6 +463,8 @@ Cvirtual_binary vxl_file_write(Cvirtual_tfile s) return vxl_file_write(colors.data(), normals.data(), cx, cy, cz); } +#endif + struct t_vxl4_header { unsigned __int32 c_sections; diff --git a/misc/vxl_file.h b/misc/vxl_file.h index 395f5ac..5dd1857 100644 --- a/misc/vxl_file.h +++ b/misc/vxl_file.h @@ -22,14 +22,20 @@ #include "cc_structures.h" #include "fname.h" #include "virtual_tfile.h" +#ifndef XCC_MINIMAL_BUILD #include "xif_key.h" +#endif class Cvxl_file : public Ccc_file_sh { public: +#ifndef XCC_MINIMAL_BUILD int extract_as_pcx(const Cfname& name, t_file_type ft, const t_palet _palet) const; +#endif ostream& extract_as_text(ostream& os) const; +#ifndef XCC_MINIMAL_BUILD int extract_as_xif(const string& name) const; +#endif bool is_valid() const; int get_c_section_headers() const @@ -93,6 +99,8 @@ public: int vxl_decode4_size(const byte* s); Cvirtual_binary vxl_decode4(const byte* s, int cb_d); int vxl_encode4(const Cvxl_file& f, byte* d); +#ifndef XCC_MINIMAL_BUILD Cvirtual_binary vxl_file_write(const Cxif_key& s); Cvirtual_binary vxl_file_write(const byte* s, const byte* s_normals, int cx, int cy, int cz); Cvirtual_binary vxl_file_write(Cvirtual_tfile s); +#endif diff --git a/vcpkg.json b/vcpkg.json index e0669e6..92d46dd 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -5,9 +5,8 @@ "boost-algorithm", "boost-crc", "bzip2", - "libjpeg-turbo", - "libpng", - "libvorbis", - "lzo" - ] + "lzo", + "zlib" + ], + "builtin-baseline": "45c8b198b7647b6a68235353a00839082c910914" }