mirror of https://github.com/OpenMW/openmw.git
Compare commits
126 Commits
master
...
openmw-48-
Author | SHA1 | Date |
---|---|---|
psi29a | 3dd8fd2ef9 | 1 year ago |
psi29a | 7211779889 | 1 year ago |
psi29a | 41b5ddf010 | 1 year ago |
Evil Eye | b24ea17301 | 1 year ago |
psi29a | 4c5d03c5e5 | 1 year ago |
unelsson | 8d5edacffd | 1 year ago |
psi29a | f3f65c87d6 | 1 year ago |
elsid | f23866be90 | 1 year ago |
uramer | a3a5a227ad | 1 year ago |
psi29a | 37152b4917 | 1 year ago |
Evil Eye | c1b9a91877 | 1 year ago |
psi29a | e30d5a5a35 | 1 year ago |
Evil Eye | bb36155a54 | 1 year ago |
psi29a | e6b6f2ced6 | 1 year ago |
Alexei Kotov | d327e92d7f | 1 year ago |
psi29a | eebaf2b61e | 1 year ago |
Alexei Kotov | 98997d893f | 1 year ago |
elsid | 9c34ef8720 | 1 year ago |
Cédric Mocquillon | 30e2ea2951 | 1 year ago |
psi29a | 01be3d16b2 | 1 year ago |
Evil Eye | 7d97ca6cd5 | 1 year ago |
psi29a | 5b56fe8d0d | 1 year ago |
Evil Eye | 08a6d9e2cf | 1 year ago |
psi29a | 678898b8f6 | 1 year ago |
psi29a | b40ac6dce5 | 1 year ago |
AnyOldName3 | 33e39a0360 | 1 year ago |
Evil Eye | 5188d2a7f9 | 1 year ago |
Evil Eye | 92761f0527 | 1 year ago |
psi29a | fff497c205 | 1 year ago |
Petr Mikheev | 734f09abe6 | 1 year ago |
psi29a | 9bbc4a54c1 | 1 year ago |
Evil Eye | 3b8b5aee39 | 1 year ago |
Andrei Kortunov | 3e70fc2577 | 2 years ago |
Andrei Kortunov | babd9ee24b | 2 years ago |
psi29a | e1e7f3e135 | 2 years ago |
psi29a | be89953368 | 2 years ago |
psi29a | 30b1b2f911 | 2 years ago |
psi29a | 2580cbfe67 | 2 years ago |
elsid | 4f360e6374 | 2 years ago |
psi29a | a5b1ce77ea | 2 years ago |
Evil Eye | df5eac88b8 | 2 years ago |
psi29a | e0c2131cd7 | 2 years ago |
Evil Eye | 2881a30e9e | 2 years ago |
psi29a | ddc90bc778 | 2 years ago |
Petr Mikheev | 710ad11dc8 | 2 years ago |
uramer | 5cf96a808e | 2 years ago |
uramer | 4f25796029 | 2 years ago |
psi29a | dc9ba9dc80 | 2 years ago |
Evil Eye | d6fcf54438 | 2 years ago |
Evil Eye | 53c03b65cf | 2 years ago |
Evil Eye | 7e8da3dc9c | 2 years ago |
Evil Eye | 1e16900d97 | 2 years ago |
psi29a | fedd9191d5 | 2 years ago |
elsid | 70fe539ee4 | 2 years ago |
psi29a | 37ee7170cb | 2 years ago |
elsid | a74b842e16 | 2 years ago |
elsid | ff44c96118 | 2 years ago |
AnyOldName3 | b9585b8a80 | 2 years ago |
Alexei Kotov | 022f245150 | 2 years ago |
psi29a | 73f69ea37f | 2 years ago |
Andrei Kortunov | 3f72432c9f | 2 years ago |
Andrei Kortunov | f3aebf22dd | 2 years ago |
Andrei Kortunov | d00fc845c0 | 2 years ago |
psi29a | 7b3adff1c5 | 2 years ago |
psi29a | 779ec6e55c | 2 years ago |
psi29a | 960934afee | 2 years ago |
AnyOldName3 | 87eaa38cf7 | 2 years ago |
psi29a | 1bf3d6b01a | 2 years ago |
psi29a | 4d16af29ba | 2 years ago |
psi29a | 847e2bbeaf | 2 years ago |
Andrew Dunn | fe59b9a92a | 2 years ago |
psi29a | 9bed210e4e | 2 years ago |
psi29a | b710cf872a | 2 years ago |
Andrei Kortunov | d313431e43 | 2 years ago |
elsid | d9a6350c5e | 2 years ago |
psi29a | 85f343e87a | 2 years ago |
uramer | 19d01f26d6 | 2 years ago |
psi29a | 64d925eace | 2 years ago |
jvoisin | 6863b2586c | 2 years ago |
psi29a | 30b05203b8 | 2 years ago |
psi29a | d335989f11 | 2 years ago |
Andrei Kortunov | d38454a125 | 2 years ago |
psi29a | c3980bebf8 | 2 years ago |
psi29a | ba58a322e4 | 2 years ago |
AnyOldName3 | 4bb88a4a75 | 2 years ago |
psi29a | af14e4d7cd | 2 years ago |
psi29a | cc0df8f43c | 2 years ago |
elsid | 01b3938935 | 2 years ago |
psi29a | 649ca6b8e6 | 2 years ago |
psi29a | ada64daf87 | 2 years ago |
psi29a | 03e24b1e70 | 2 years ago |
psi29a | 2f1b4eb699 | 2 years ago |
psi29a | 77beaf5bc6 | 2 years ago |
psi29a | 2795097907 | 2 years ago |
AnyOldName3 | d262ca2d30 | 2 years ago |
psi29a | 071b66999d | 2 years ago |
psi29a | 19df671bba | 2 years ago |
psi29a | b2d0b3da93 | 2 years ago |
psi29a | b21c9cdf31 | 2 years ago |
psi29a | c4dd9d40fe | 2 years ago |
psi29a | d88b34131a | 2 years ago |
psi29a | 5e76c124a7 | 2 years ago |
psi29a | 33d85635fd | 2 years ago |
psi29a | 18de21cf13 | 2 years ago |
psi29a | bbfc573b15 | 2 years ago |
psi29a | 341161ba03 | 2 years ago |
psi29a | f45bb18614 | 2 years ago |
psi29a | efa4b52e9a | 2 years ago |
psi29a | 3fdb2201b4 | 2 years ago |
psi29a | fda1127b5c | 2 years ago |
psi29a | d444b1b350 | 2 years ago |
psi29a | cc27baec62 | 2 years ago |
Alexander Olofsson | 149d0b2f29 | 2 years ago |
Alexander Olofsson | 619bb73d44 | 2 years ago |
Alexander Olofsson | 944e748971 | 2 years ago |
Alexander Olofsson | 14663b8314 | 2 years ago |
psi29a | df3ebf6b87 | 2 years ago |
psi29a | 15ed99be5b | 2 years ago |
psi29a | 0fb2c96a69 | 2 years ago |
Alexei Kotov | 2f5f2bdbad | 2 years ago |
psi29a | f61cc5c60c | 2 years ago |
psi29a | bc79de4934 | 2 years ago |
psi29a | cec1429c0f | 2 years ago |
psi29a | 105be76d81 | 2 years ago |
Arnaud Dochain | 5f69af582e | 2 years ago |
psi29a | 0339e32c0c | 2 years ago |
@ -0,0 +1,200 @@
|
||||
---
|
||||
app-id: org.openmw.OpenMW.devel
|
||||
runtime: org.kde.Platform
|
||||
runtime-version: '5.15-21.08'
|
||||
sdk: org.kde.Sdk
|
||||
command: openmw-launcher
|
||||
rename-appdata-file: openmw.appdata.xml
|
||||
finish-args:
|
||||
- "--share=ipc"
|
||||
- "--socket=x11"
|
||||
- "--device=all"
|
||||
- "--filesystem=host"
|
||||
- "--socket=pulseaudio"
|
||||
build-options:
|
||||
cflags: "-O2 -g"
|
||||
cxxflags: "-O2 -g"
|
||||
cleanup:
|
||||
- "/include"
|
||||
- "/lib/pkgconfig"
|
||||
- "/lib/cmake"
|
||||
- "/share/pkgconfig"
|
||||
- "/share/aclocal"
|
||||
- "/share/doc"
|
||||
- "/man"
|
||||
- "/share/man"
|
||||
- "/share/gtk-doc"
|
||||
- "/share/vala"
|
||||
- "*.la"
|
||||
- "*.a"
|
||||
|
||||
modules:
|
||||
- name: boost
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- ./bootstrap.sh --prefix=/app --with-libraries=filesystem,iostreams,program_options,system
|
||||
- ./b2 headers
|
||||
- ./b2 install
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
|
||||
sha256: aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
|
||||
|
||||
- name: collada-dom
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- "-DOPT_COLLADA14=1"
|
||||
- "-DOPT_COLLADA15=0"
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/rdiankov/collada-dom/archive/c1e20b7d6ff806237030fe82f126cb86d661f063.zip
|
||||
sha256: 6c51cd068c7d6760b587391884942caaac8a515d138535041e42d00d3e5c9152
|
||||
|
||||
- name: ffmpeg
|
||||
config-opts:
|
||||
- "--disable-static"
|
||||
- "--enable-shared"
|
||||
- "--disable-programs"
|
||||
- "--disable-doc"
|
||||
- "--disable-avdevice"
|
||||
- "--disable-avfilter"
|
||||
- "--disable-postproc"
|
||||
|
||||
- "--disable-encoders"
|
||||
- "--disable-muxers"
|
||||
- "--disable-protocols"
|
||||
- "--disable-indevs"
|
||||
- "--disable-devices"
|
||||
- "--disable-filters"
|
||||
sources:
|
||||
- type: archive
|
||||
url: http://ffmpeg.org/releases/ffmpeg-4.3.2.tar.xz
|
||||
sha256: 46e4e64f1dd0233cbc0934b9f1c0da676008cad34725113fb7f802cfa84ccddb
|
||||
cleanup:
|
||||
- "/share/ffmpeg"
|
||||
|
||||
- name: openscenegraph
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- "-DBUILD_OSG_PLUGINS_BY_DEFAULT=0"
|
||||
- "-DBUILD_OSG_PLUGIN_OSG=1"
|
||||
- "-DBUILD_OSG_PLUGIN_DDS=1"
|
||||
- "-DBUILD_OSG_PLUGIN_DAE=1"
|
||||
- "-DBUILD_OSG_PLUGIN_TGA=1"
|
||||
- "-DBUILD_OSG_PLUGIN_BMP=1"
|
||||
- "-DBUILD_OSG_PLUGIN_JPEG=1"
|
||||
- "-DBUILD_OSG_PLUGIN_PNG=1"
|
||||
- "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0"
|
||||
- "-DBUILD_OSG_APPLICATIONS=0"
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
build-options:
|
||||
env:
|
||||
COLLADA_DIR: /app/include/collada-dom2.5
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/openmw/osg/archive/76e061739610bc9a3420a59e7c9395e742ce2f97.zip
|
||||
sha256: fa1100362eae260192819d65d90b29ec0b88fdf80e30cee677730b7a0d68637e
|
||||
|
||||
- name: bullet
|
||||
# The cmake + ninja buildsystem doesn't install the required binaries correctly
|
||||
buildsystem: cmake
|
||||
config-opts:
|
||||
- "-DBUILD_BULLET2_DEMOS=0"
|
||||
- "-DBUILD_BULLET3=0"
|
||||
- "-DBUILD_CPU_DEMOS=0"
|
||||
- "-DBUILD_EXTRAS=0"
|
||||
- "-DBUILD_OPENGL3_DEMOS=0"
|
||||
- "-DBUILD_UNIT_TESTS=0"
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DUSE_GLUT=0"
|
||||
- "-DUSE_GRAPHICAL_BENCHMARK=0"
|
||||
- "-DUSE_DOUBLE_PRECISION=on"
|
||||
- "-DBULLET2_MULTITHREADING=on"
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/bulletphysics/bullet3/archive/93be7e644024e92df13b454a4a0b0fcd02b21b10.zip
|
||||
sha256: 82968fbf20a92c51bc71ac9ee8f6381ecf3420c7cbb881ffb7bb633fa13b27f9
|
||||
|
||||
- name: mygui
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DMYGUI_RENDERSYSTEM=1"
|
||||
- "-DMYGUI_BUILD_DEMOS=0"
|
||||
- "-DMYGUI_BUILD_TOOLS=0"
|
||||
- "-DMYGUI_BUILD_PLUGINS=0"
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.1.tar.gz
|
||||
sha256: bdf730bdeb4ad89e6b8223967db01aa5274d2b93adc2c0d6aa4842faeed4de1a
|
||||
|
||||
- name: libunshield
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/twogood/unshield/archive/1.4.3.tar.gz
|
||||
sha256: aa8c978dc0eb1158d266eaddcd1852d6d71620ddfc82807fe4bf2e19022b7bab
|
||||
|
||||
- name: lz4
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- "make lib"
|
||||
- "PREFIX=/app make install"
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/lz4/lz4/archive/refs/tags/v1.9.3.tar.gz
|
||||
sha256: 030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1
|
||||
|
||||
- name: recastnavigation
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DRECASTNAVIGATION_DEMO=no"
|
||||
- "-DRECASTNAVIGATION_TESTS=no"
|
||||
- "-DRECASTNAVIGATION_EXAMPLES=no"
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/recastnavigation/recastnavigation/archive/c5cbd53024c8a9d8d097a4371215e3342d2fdc87.zip
|
||||
sha256: 53dacfd7bead4d3b0c9a04a648caed3e7c3900e0aba765c15dee26b50f6103c6
|
||||
|
||||
- name: yaml-cpp
|
||||
buildsystem: cmake-ninja
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.zip
|
||||
sha256: 4d5e664a7fb2d7445fc548cc8c0e1aa7b1a496540eb382d137e2cc263e6d3ef5
|
||||
|
||||
- name: LuaJIT
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- make install PREFIX=/app
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/LuaJIT/LuaJIT/archive/refs/tags/v2.0.5.zip
|
||||
sha256: 2adbe397a5b6b8ab22fa8396507ce852a2495db50e50734b3daa1ffcadd9eeb4
|
||||
|
||||
- name: openmw
|
||||
builddir: true
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- "-DBUILD_BSATOOL=no"
|
||||
- "-DBUILD_ESMTOOL=no"
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DICONDIR=/app/share/icons"
|
||||
- "-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=yes"
|
||||
sources:
|
||||
- type: dir
|
||||
path: ..
|
||||
- type: shell
|
||||
commands:
|
||||
- "sed -i 's:/wiki:/old-wiki:' ./files/openmw.appdata.xml"
|
||||
- "sed -i 's:>org.openmw.launcher.desktop<:>org.openmw.OpenMW.devel.desktop<:' ./files/openmw.appdata.xml"
|
||||
- "sed -i 's:Icon=openmw:Icon=org.openmw.OpenMW.devel.png:' ./files/org.openmw.launcher.desktop"
|
||||
- "sed -i 's:Icon=openmw-cs:Icon=org.openmw.OpenMW.OpenCS.devel.png:' ./files/org.openmw.cs.desktop"
|
||||
post-install:
|
||||
- "mv /app/share/applications/org.openmw.launcher.desktop /app/share/applications/org.openmw.OpenMW.devel.desktop"
|
||||
- "mv /app/share/applications/org.openmw.cs.desktop /app/share/applications/org.openmw.OpenMW.OpenCS.devel.desktop"
|
||||
- "mv /app/share/icons/openmw.png /app/share/icons/org.openmw.OpenMW.devel.png"
|
||||
- "mv /app/share/icons/openmw-cs.png /app/share/icons/org.openmw.OpenMW.OpenCS.devel.png"
|
@ -1,15 +1,16 @@
|
||||
#ifndef OPENMW_ESMTOOL_TES4_H
|
||||
#define OPENMW_ESMTOOL_TES4_H
|
||||
|
||||
#include <fstream>
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
|
||||
namespace EsmTool
|
||||
{
|
||||
struct Arguments;
|
||||
|
||||
int loadTes4(const Arguments& info, std::unique_ptr<std::ifstream>&& stream);
|
||||
int loadTes4(const Arguments& info, std::unique_ptr<boost::filesystem::ifstream>&& stream);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,39 @@
|
||||
#ifndef GAME_MWWORLD_DURATION_H
|
||||
#define GAME_MWWORLD_DURATION_H
|
||||
|
||||
#include <cmath>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
inline const double maxFloatHour = static_cast<double>(std::nextafter(24.0f, 0.0f));
|
||||
|
||||
class Duration
|
||||
{
|
||||
public:
|
||||
static Duration fromHours(double hours)
|
||||
{
|
||||
if (hours < 0)
|
||||
throw std::runtime_error("Negative hours is not supported Duration");
|
||||
|
||||
return Duration(
|
||||
static_cast<int>(hours / 24), static_cast<float>(std::min(std::fmod(hours, 24), maxFloatHour)));
|
||||
}
|
||||
|
||||
int getDays() const { return mDays; }
|
||||
|
||||
float getHours() const { return mHours; }
|
||||
|
||||
private:
|
||||
int mDays;
|
||||
float mHours;
|
||||
|
||||
explicit Duration(int days, float hours)
|
||||
: mDays(days)
|
||||
, mHours(hours)
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,55 @@
|
||||
#include "gmock/gmock.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <components/lua/luastate.hpp>
|
||||
#include <components/lua/scriptscontainer.hpp>
|
||||
|
||||
#include "../testing_util.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
using namespace testing;
|
||||
using namespace TestingOpenMW;
|
||||
|
||||
struct LuaCoroutineCallbackTest : Test
|
||||
{
|
||||
void SetUp() override
|
||||
{
|
||||
mLua.open_libraries(sol::lib::coroutine);
|
||||
mLua["callback"] = [&](sol::protected_function fn) -> LuaUtil::Callback {
|
||||
sol::table hiddenData(mLua, sol::create);
|
||||
hiddenData[LuaUtil::ScriptsContainer::sScriptIdKey] = sol::table(mLua, sol::create);
|
||||
return LuaUtil::Callback{ std::move(fn), hiddenData };
|
||||
};
|
||||
mLua["pass"] = [this](LuaUtil::Callback callback) { mCb = callback; };
|
||||
}
|
||||
|
||||
sol::state mLua;
|
||||
LuaUtil::Callback mCb;
|
||||
};
|
||||
|
||||
TEST_F(LuaCoroutineCallbackTest, CoroutineCallbacks)
|
||||
{
|
||||
internal::CaptureStdout();
|
||||
mLua.safe_script(R"X(
|
||||
local s = 'test'
|
||||
coroutine.wrap(function()
|
||||
pass(callback(function(v) print(s) end))
|
||||
end)()
|
||||
)X");
|
||||
mLua.collect_garbage();
|
||||
mCb.call();
|
||||
EXPECT_THAT(internal::GetCapturedStdout(), "test\n");
|
||||
}
|
||||
|
||||
TEST_F(LuaCoroutineCallbackTest, ErrorInCoroutineCallbacks)
|
||||
{
|
||||
mLua.safe_script(R"X(
|
||||
coroutine.wrap(function()
|
||||
pass(callback(function() error('COROUTINE CALLBACK') end))
|
||||
end)()
|
||||
)X");
|
||||
mLua.collect_garbage();
|
||||
EXPECT_ERROR(mCb.call(), "COROUTINE CALLBACK");
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue