Merge branch 'dev' into dev-graphics-overhaul
# Conflicts: # .github/workflows/build.ymldev
commit
f2cc131ff7
|
@ -17,7 +17,7 @@ jobs:
|
||||||
run: sudo apt install gcc-9 g++-9 && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9 && sudo update-alternatives --set gcc /usr/bin/gcc-9
|
run: sudo apt install gcc-9 g++-9 && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9 && sudo update-alternatives --set gcc /usr/bin/gcc-9
|
||||||
if: matrix.host_os == 'ubuntu-18.04'
|
if: matrix.host_os == 'ubuntu-18.04'
|
||||||
- name: Install Colobot dependencies
|
- name: Install Colobot dependencies
|
||||||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsndfile1-dev libvorbis-dev libogg-dev libpng-dev libglew-dev libopenal-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libphysfs-dev gettext git po4a vorbis-tools librsvg2-bin xmlstarlet libglm-dev
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsndfile1-dev libvorbis-dev libogg-dev libpng-dev libglew-dev libopenal-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libphysfs-dev gettext git po4a vorbis-tools librsvg2-bin xmlstarlet libglm-dev libmpg123-dev
|
||||||
if: matrix.container == ''
|
if: matrix.container == ''
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Checkout the Google Test submodule
|
- name: Checkout the Google Test submodule
|
||||||
|
@ -105,11 +105,11 @@ jobs:
|
||||||
- name: Install Colobot dependencies
|
- name: Install Colobot dependencies
|
||||||
uses: lukka/run-vcpkg@v7
|
uses: lukka/run-vcpkg@v7
|
||||||
with:
|
with:
|
||||||
vcpkgGitCommitId: '210240b399fbc2f1363f4103b6a93629c207d7e3'
|
vcpkgGitCommitId: 'e809a42f87565e803b2178a0c11263f462d1800a'
|
||||||
vcpkgTriplet: ${{ matrix.vcpkg_triplet }}
|
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 glm'
|
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 glm mpg123'
|
||||||
# SHA-256 hash of the list of packages above, for caching purposes
|
# SHA-256 hash of the list of packages above, for caching purposes
|
||||||
appendedCacheKey: '83b5e9a4328552da34acd5a2fb62a8c000261fd04755ff2368f967774e0db7cd'
|
appendedCacheKey: '79bfe00dc99b9da12e57ab30397ba444a8d68e7030c247cf813121111e37cabf'
|
||||||
- name: Install external tools
|
- name: Install external tools
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
|
@ -165,7 +165,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install Colobot dependencies
|
- name: Install Colobot dependencies
|
||||||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsndfile1-dev libvorbis-dev libogg-dev libpng-dev libglew-dev libopenal-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libphysfs-dev gettext git po4a vorbis-tools librsvg2-bin xmlstarlet doxygen graphviz libglm-dev
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsndfile1-dev libvorbis-dev libogg-dev libpng-dev libglew-dev libopenal-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libphysfs-dev gettext git po4a vorbis-tools librsvg2-bin xmlstarlet doxygen graphviz libglm-dev libmpg123-dev
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Create build directory
|
- name: Create build directory
|
||||||
run: cmake -E make_directory build
|
run: cmake -E make_directory build
|
||||||
|
|
|
@ -341,8 +341,11 @@ find_package(GLEW REQUIRED)
|
||||||
if (OPENAL_SOUND)
|
if (OPENAL_SOUND)
|
||||||
find_package(OpenAL REQUIRED)
|
find_package(OpenAL REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(SndFile REQUIRED)
|
find_package(SndFile REQUIRED)
|
||||||
|
|
||||||
|
find_package(mpg123 QUIET)
|
||||||
|
find_package(mp3lame QUIET)
|
||||||
|
|
||||||
if(NOT ASSERTS)
|
if(NOT ASSERTS)
|
||||||
add_definitions(-DNDEBUG)
|
add_definitions(-DNDEBUG)
|
||||||
|
|
|
@ -498,6 +498,20 @@ target_link_libraries(colobotbase PUBLIC
|
||||||
nlohmann_json::nlohmann_json
|
nlohmann_json::nlohmann_json
|
||||||
)
|
)
|
||||||
|
|
||||||
|
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
|
# Optional libraries
|
||||||
if(OPENAL_SOUND)
|
if(OPENAL_SOUND)
|
||||||
target_sources(colobotbase PRIVATE
|
target_sources(colobotbase PRIVATE
|
||||||
|
|
|
@ -54,11 +54,12 @@
|
||||||
#include <SDL_image.h>
|
#include <SDL_image.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <libintl.h>
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <localename.h>
|
#include <localename.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
#include <libintl.h>
|
||||||
|
|
||||||
using TimeUtils::TimeStamp;
|
using TimeUtils::TimeStamp;
|
||||||
using TimeUtils::TimeUnit;
|
using TimeUtils::TimeUnit;
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,11 @@
|
||||||
|
|
||||||
#include "object/object_type.h"
|
#include "object/object_type.h"
|
||||||
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <SDL_keyboard.h>
|
#include <SDL_keyboard.h>
|
||||||
#include <boost/regex.hpp>
|
#include <boost/regex.hpp>
|
||||||
|
|
||||||
|
#include <libintl.h>
|
||||||
|
|
||||||
const char* stringsText[RT_MAX] = { nullptr };
|
const char* stringsText[RT_MAX] = { nullptr };
|
||||||
const char* stringsEvent[EVENT_STD_MAX] = { nullptr };
|
const char* stringsEvent[EVENT_STD_MAX] = { nullptr };
|
||||||
const char* stringsObject[OBJECT_MAX] = { nullptr };
|
const char* stringsObject[OBJECT_MAX] = { nullptr };
|
||||||
|
|
|
@ -4969,6 +4969,7 @@ CObject* CRobotMain::IOReadScene(std::string filename, std::string filecbot)
|
||||||
assert(slotNum >= 0);
|
assert(slotNum >= 0);
|
||||||
assert(slots.find(slotNum) == slots.end());
|
assert(slots.find(slotNum) == slots.end());
|
||||||
asSlotted->SetSlotContainedObject(slotNum, power);
|
asSlotted->SetSlotContainedObject(slotNum, power);
|
||||||
|
dynamic_cast<CTransportableObject&>(*power).SetTransporter(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (std::pair<const int, CObject*>& slot : slots)
|
for (std::pair<const int, CObject*>& slot : slots)
|
||||||
|
@ -4988,14 +4989,6 @@ CObject* CRobotMain::IOReadScene(std::string filename, std::string filecbot)
|
||||||
assert(cargo == nullptr);
|
assert(cargo == nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (power != nullptr)
|
|
||||||
{
|
|
||||||
dynamic_cast<CSlottedObject&>(*obj).SetSlotContainedObjectReq(CSlottedObject::Pseudoslot::POWER, power);
|
|
||||||
dynamic_cast<CTransportableObject&>(*power).SetTransporter(obj);
|
|
||||||
}
|
|
||||||
cargo = nullptr;
|
|
||||||
power = nullptr;
|
|
||||||
|
|
||||||
objCounter++;
|
objCounter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue