1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
Commit Graph

215 Commits

Author SHA1 Message Date
AnyOldName3
26be98966f Modernise Boost CMake stuff
Resolves https://gitlab.com/OpenMW/openmw/-/issues/8100

Also removes some old crud.
Hopefully the old crud is all:
* Handled automatically by CMake now we're using the modern approach.
* A hack-fix for a problem caused by not using the modern approach.
* Massively outdated so no longer necessary.

If it turns out this makes CI fail, I'll tweak things as necessary.

Changes that might not be wanted include:
* Getting rid of our BOOST_STATIC CMake option. In cases where the CMake config doesn't make the one correct choice from the build environment (i.e. because there's a choice) the CMake config exposes the option already.
  However, we were forcing this on for Windows, so that might matter.
  It seems to default to static on my machine even though I thought I read something suggesting otherwise, so we'll see how things go with that.
  If we eventually put CMake in charge of installing dependency DLLs this will be a moot point as we won't need to care.
* Bumping the minimum version of Boost to 1.70.0, as that's the first with working CMake config.
  It's from 2019, so plausibly there are distros too scared to use a library from five years ago as it can't legally drink in the US (although it could in limited quantities with parental supervision in the UK, as long as it's just something inconsequential like a single sip of beer).
2024-08-23 14:06:13 +01:00
elsid
5c3ae3d94c
Make loading and saving script record more robust
* Check the header presence before using it.
* Write the header based on the actual content.
2024-06-21 20:37:37 +02:00
elsid
4571a8b88a
Remove unused SCHD type 2024-06-21 15:39:17 +02:00
elsid
01166b1f26
Split ESM headers 2024-05-03 01:55:20 +02:00
Evil Eye
5a0aed3a78 Use more decomposition, string_view, and implicit sizes in ESM code 2024-03-23 12:15:09 +01:00
elsid
5859fd464c
Add option to disable precompiled headers
To be able to use ccache.

Also fix compilation errors appeared due to absence of precompiled
headers.
2024-03-08 02:11:51 +01:00
Andrei Kortunov
737d3b499b Use move semantics for tools 2024-01-21 20:20:37 +04:00
Evil Eye
e63933efa6 Use NAM9 for stack count 2023-12-31 17:12:46 +00:00
Evil Eye
3e101ab409 Add a variadic getHNOT 2023-12-20 12:28:34 +01:00
Evil Eye
88731f864e Add imports 2023-12-17 15:21:12 +01:00
Evil Eye
dbf9d42cc5 Remove sized reads from essimporter 2023-12-17 14:03:45 +01:00
Andrei Kortunov
6f68df9ac2 Avoid redundant copies 2023-12-06 23:45:25 +04:00
Evil Eye
dc781bad5d Use fixed size unsigned ints for inventory offsets 2023-10-24 17:51:12 +02:00
Andrei Kortunov
d3d7a663c6 Move some objects instead of copying 2023-07-31 20:43:46 +04:00
Andrei Kortunov
d8ec78d732 Fix some Coverity warnings 2023-07-28 20:58:18 +04:00
psi29a
a6d6e16d48 Merge branch 'readsize' into 'master'
Disallow implicitly sized reads of ESM structs

See merge request OpenMW/openmw!3100
2023-07-28 07:01:32 +00:00
Mads Buvik Sandvei
364f2a98e9 Use refnum instead of slot for items during spellcast 2023-07-25 21:23:59 +00:00
Evil Eye
45ba05c0ed Disallow implicitly sized reads of ESM structs 2023-07-20 19:16:53 +02:00
AnyOldName3
34fcfb63cf Eliminate redundant version checks 2023-07-20 00:43:56 +01:00
Evil Eye
6b7e7acd16 Replace a number of incorrect index types 2023-06-03 16:30:35 +02:00
Evil Eye
e01a3076dd Use std::array in NpcStats 2023-06-03 14:26:37 +02:00
Evil Eye
9214ffb50b Replace some empty constructors and destructors with default 2023-05-29 13:37:19 +02:00
florent.teppe
d782d37ee2 Make sure Vec2iRefId is trivially copyable on GCC 11.3
std::pair<int, int> isn't trivially copyable on some compilers
so a specific struct is defined, it's an int pair, but it should be recognised by GCC 11.3 as trivially copyable

Vec2iRefId => ESM3ExteriorCellRefId

more explcit name and use mX,mY instead of pair
renamed files and enum
2023-04-03 14:17:31 +02:00
florent.teppe
f99e65843a Removes most cellId.hpp include, simplifies id generation for cells. 2023-04-03 14:16:32 +02:00
florent.teppe
c2182c2fcc Get Rid of ESM::CellId almost everywhere
it was a competing concept from using RefIds for cell.
There is almost no point to it now, except to load older data.
2023-04-03 14:16:05 +02:00
florent.teppe
c39dd576f8 Gets rid of most ESM::CellId 2023-04-03 14:16:05 +02:00
florent.teppe
1bbf4a3acf fixes teleport to exterior cells.
fixes linux compile

fix compile bis
2023-04-03 14:16:04 +02:00
Evil Eye
54d6fb29c2 Don't store a save's cell name as a RefID 2023-03-22 22:57:52 +01:00
elsid
1857d8a68c
Use target_compile_options to add --coverage 2023-03-10 15:34:08 +01:00
elsid
cc066efa11
Fix identation in CMakeLists.txt 2023-03-10 15:28:06 +01:00
elsid
6d261d38dd
Add functions to read and write ESM::RefId and use them
To be later changed with another implementation.
2023-02-13 22:07:58 +01:00
elsid
80e6d6cbe3
Support variable size strings in ESM3 2023-02-13 10:18:32 +01:00
elsid
080700f8fe
Name all custom ESM format versions and add tests 2023-02-10 19:54:15 +01:00
florent.teppe
3780033837 Reverts Cell name to a string 2023-01-21 18:39:42 +01:00
elsid
c173348cbe
Use default initializers for ESM::RefNum members
Instead of unset function that is removed now and assignments all over the code.
2023-01-10 00:44:51 +01:00
florent.teppe
2c30575b3b CellName is now a RefId, makes more sense that way. 2022-12-27 19:16:21 +01:00
florent.teppe
0f3499f504 Renamed string => Id, makes more sense considering the new underlying type
Fixes unnecessary copies, and issues with case sensitive comparisons.

fixed modification that wasn't necessary

Fixed type mismatch, and unecessary copy
2022-12-27 19:15:57 +01:00
florent.teppe
b61d5d8123 Some RefId == ESM::RefId::StringRefId('constString') still existed 2022-12-27 19:15:57 +01:00
florent.teppe
65cdd489fb create a specific esm reader function for RefID to avoid allocation for string and then again for RefId
Fixed some types

removed useless header

applied clang format

fixed compile tests

fixed clang tidy, and closer to logic before this MR

Removed hardcoded refids

unless there is a returned value we don't use static RefIds
can use == between RefId and hardcoded string

Fix clang format

Fixed a few instances where std::string was used, when only const std::string& was needed

removed unused variable
2022-12-27 19:15:57 +01:00
fteppe
62d8fe3fc2 changed a few hardcoded refIds used in mutliple places to be defined only once in a variable 2022-12-27 19:15:55 +01:00
fteppe
20da0892ef openMW_test_suite compiles and runs
Slowly moving through the open-cs errors

Good progress in openCS

Very good progress on openCS

Getting closer with openCS

OpenCS compiles and runs! Didn't have time to test it all though

ix openMW

everything compiles on windows??

Fix gcc

Fix Clang
2022-12-27 19:15:55 +01:00
elsid
843753da14
Remove unused includes 2022-10-09 16:44:18 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
elsid
4698a4cd2d
Use raw string literals to format command usage messages 2022-09-12 21:00:51 +02:00
elsid
6ae15f08e0
Avoid chained operator() calls to prevent formatting issues 2022-09-12 16:48:15 +02:00
Project579
c226b35f1f Fix some remaining encoding errors due to std::filesystem transition. 2022-09-11 14:41:20 +02:00
Project579
199bf233e8 essimporter: Don't use "std::string" to store paths. 2022-09-11 14:41:20 +02:00
Project579
4e428dee12 Update some settings that accept paths by "std::string" to accept them as "std::filesystem::path" instead. 2022-09-11 14:41:20 +02:00
AnyOldName3
4e8e2e1c60 Eliminate &thing[0] pattern 2022-09-03 16:41:35 +01:00
elsid
73f885db0e
Cleanup includes 2022-08-19 22:05:15 +02:00