diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 002ca535..ac7b768f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,11 +134,11 @@ jobs: - name: Install Colobot dependencies uses: lukka/run-vcpkg@v7 with: - vcpkgGitCommitId: '68ad399d5596a540e8a12173c3d189cbc0f82be8' + vcpkgGitCommitId: '69efe9cc2df0015f0bb2d37d55acde4a75c9a25b' vcpkgTriplet: ${{ matrix.vcpkg_triplet }} - vcpkgArguments: 'boost-system boost-filesystem boost-regex boost-lexical-cast boost-bimap boost-algorithm boost-property-tree boost-optional boost-range sdl2 sdl2-ttf sdl2-image glew libpng libwebp tiff gettext libsndfile libvorbis libogg openal-soft physfs mpg123' + setupOnly: true # SHA-256 hash of the list of packages above, for caching purposes - appendedCacheKey: '84402d9834b06a1b571e0fda32a791915777d47a394a1469d4773322bd71614b' + appendedCacheKey: '56a81d2ed18a506e5ce5cf4dc4e6ed9874bba3905ed5e9b073ea717a0663db0a' - name: Install external tools working-directory: ${{ github.workspace }} run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 68b4d827..3f94b419 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -332,9 +332,6 @@ endif() find_package(SndFile REQUIRED) -find_package(mpg123 QUIET) -find_package(mp3lame QUIET) - if(NOT ASSERTS) add_definitions(-DNDEBUG) endif() diff --git a/src/CBot/CBotFileUtils.h b/src/CBot/CBotFileUtils.h index dccefc78..757f31a1 100644 --- a/src/CBot/CBotFileUtils.h +++ b/src/CBot/CBotFileUtils.h @@ -19,6 +19,7 @@ #pragma once +#include #include #include diff --git a/src/CBot/CBotInstr/CBotExprLitChar.h b/src/CBot/CBotInstr/CBotExprLitChar.h index ab04cd3d..cca338f8 100644 --- a/src/CBot/CBotInstr/CBotExprLitChar.h +++ b/src/CBot/CBotInstr/CBotExprLitChar.h @@ -21,6 +21,8 @@ #include "CBot/CBotInstr/CBotInstr.h" +#include + namespace CBot { diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp index 3a73d373..0d63ea90 100644 --- a/src/CBot/CBotStack.cpp +++ b/src/CBot/CBotStack.cpp @@ -30,6 +30,7 @@ #include "CBot/CBotExternalCall.h" #include +#include #include #include diff --git a/src/CBot/CBotVar/CBotVar.h b/src/CBot/CBotVar/CBotVar.h index c9739e3f..3cb628e9 100644 --- a/src/CBot/CBotVar/CBotVar.h +++ b/src/CBot/CBotVar/CBotVar.h @@ -24,6 +24,7 @@ #include "CBot/CBotEnums.h" #include "CBot/CBotUtils.h" +#include #include namespace CBot diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 10def122..f1cd79c8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ # Compile flags as defined in global CMakeLists -set(CMAKE_CXX_FLAGS "${COLOBOT_CXX_FLAGS}") +set(CMAKE_CXX_FLAGS ${COLOBOT_CXX_FLAGS}) set(CMAKE_CXX_FLAGS_RELEASE ${COLOBOT_CXX_FLAGS_RELEASE}) set(CMAKE_CXX_FLAGS_DEBUG ${COLOBOT_CXX_FLAGS_DEBUG}) @@ -493,20 +493,6 @@ target_link_libraries(colobotbase PUBLIC SndFile::sndfile ) -if(mpg123_FOUND) - target_link_libraries(colobotbase PUBLIC - MPG123::libmpg123 - MPG123::libout123 - MPG123::libsyn123 - ) -endif() - -if(mp3lame_FOUND) - target_link_libraries(colobotbase PUBLIC - mp3lame::mp3lame - ) -endif() - # Optional libraries if(OPENAL_SOUND) target_sources(colobotbase PRIVATE @@ -536,9 +522,6 @@ if(PLATFORM_WINDOWS) find_package(Intl REQUIRED) find_library(BZ2_LIBRARY NAMES bz2) - find_library(JPEG_LIBRARY NAMES jpeg) - find_library(TIFF_LIBRARY NAMES tiff) - find_library(LZMA_LIBRARY NAMES lzma) find_library(FREETYPE_LIBRARY NAMES freetype) find_library(ICONV_LIBRARY NAMES iconv) find_library(CHARSET_LIBRARY NAMES charset) @@ -548,10 +531,7 @@ if(PLATFORM_WINDOWS) target_link_libraries(colobotbase PUBLIC Gettext::Intl - ${JPEG_LIBRARY} - ${TIFF_LIBRARY} ${BZ2_LIBRARY} - ${LZMA_LIBRARY} ${FREETYPE_LIBRARY} ${ICONV_LIBRARY} ${CHARSET_LIBRARY} diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index d0ffcc44..5946d389 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -3599,7 +3599,8 @@ void CEngine::Capture3DScene() // create SDL surface and final texture ImageData image; - image.surface = SDL_CreateRGBSurfaceFrom(blured.get(), newWidth, newHeight, 32, 0, 0, 0, 0, 0xFF000000); + image.surface = SDL_CreateRGBSurfaceFrom(blured.get(), newWidth, newHeight, + 32, 4 * newWidth, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000); TextureCreateParams params; params.filter = TEX_FILTER_BILINEAR; diff --git a/src/object/task/taskgoto.h b/src/object/task/taskgoto.h index e502c7c8..57a3cb6f 100644 --- a/src/object/task/taskgoto.h +++ b/src/object/task/taskgoto.h @@ -24,6 +24,7 @@ #include "math/vector.h" #include +#include #include #include diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000..673c5935 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,48 @@ +{ + "name": "colobot", + "version-string": "0.1.0", + "builtin-baseline": "e809a42f87565e803b2178a0c11263f462d1800a", + "dependencies": [ + "boost-system", + "boost-filesystem", + "boost-regex", + "boost-lexical-cast", + "boost-bimap", + "boost-algorithm", + "boost-property-tree", + "boost-optional", + "boost-range", + "sdl2", + { + "name": "sdl2-image", + "default-features": false + }, + { + "name": "sdl2-ttf", + "default-features": false + }, + "glew", + "libpng", + "gettext", + { + "name": "libsndfile", + "default-features": false, + "features": [ "external-libs" ] + }, + { + "name": "freetype", + "default-features": false + }, + "libvorbis", + "libogg", + "opus", + "openal-soft", + "physfs", + "zlib" + ], + "overrides": [ + { + "name": "zlib", "version": "1.2.13" + } + ] +}