1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 07:23:53 +00:00
Commit graph

211 commits

Author SHA1 Message Date
Cédric Mocquillon
512d64e514 Extract correctSoundPath method to avoid code duplication. Add unit test for the new method 2021-11-10 23:06:35 +01:00
elsid
9f808fbe3a
Move findPath-like navigator functions into a separate header 2021-11-06 00:34:06 +01:00
Bo Svensson
1960e976e2
refactors stringops.hpp (#3192)
With this PR we refactor `StringUtils::replaceAll` to accept `string_view` as suggested in a code comment. In addition, while we are touching this rebuild happy file, we slim it down a bit by moving a few sparingly used functions elsewhere.
2021-11-05 10:53:52 +01:00
Bo Svensson
4657c655b1 refactors parentFileIndices (#3211)
This PR aims to start addressing `ESM` design issues that have silenced errors we incorporated into groundcover `ESM` loading approaches.

- We move the resolution of `parentFileIndices` from `ESMStore` to `ESMReader` as suggested in a `TODO` comment.
- We improve a highly misleading comment which downplayed the significance of `parentFileIndices`.
- We document important preconditions.
- We move a user facing error message to the highest level and improve its context.
- We remove an inappropriate `setGlobalReaderList` method. We now pass this reader list into the method that requires it.
- We remove a thoroughly pointless optimisation of `Store<ESM::LandTexture>`'s construction that has unnecessarily depended on `getGlobalReaderList`.

There should be no functional changes for `master`, but this PR should remove an issue blocking PR #3208.
2021-11-03 11:07:28 +01:00
elsid
2b057f5c15
Expect nif node children to have parent 2021-11-02 22:44:33 +01:00
elsid
4e8e8304aa
Avoid mesh allocation when data is invalid 2021-11-02 22:44:33 +01:00
elsid
4631d95739
Add more tests for BulletNifLoader 2021-11-02 22:44:32 +01:00
psi29a
523289c531 Merge branch 'refactor_bullet_shape' into 'master'
Refactor bullet shape

See merge request OpenMW/openmw!1333
2021-11-02 20:30:22 +00:00
Evil Eye
ae08f942d5 Test binary operators 2021-10-30 12:23:14 +02:00
Evil Eye
3c5a50cf90 Add issues from Redmine 2021-10-30 12:09:02 +02:00
Evil Eye
319d30fb85 Add AddTopic testing 2021-10-30 10:42:11 +02:00
Evil Eye
b3208f4066 Add more issues and a forum thread 2021-10-30 10:42:10 +02:00
Evil Eye
8e0dfe3a8a Add tests for more issues 2021-10-30 10:42:10 +02:00
Evil Eye
b2cdbe2e61 Add tests for certain issues 2021-10-30 10:42:10 +02:00
Evil Eye
3dada0796a Validate integer math 2021-10-30 10:42:10 +02:00
Evil Eye
f027acf575 Move boilerplate to separate file 2021-10-30 10:42:09 +02:00
Evil Eye
be759e576a Be sure to verify the opcode got executed 2021-10-30 10:42:09 +02:00
Evil Eye
6ad8549163 Allow validation of constant arguments 2021-10-30 10:42:09 +02:00
Evil Eye
e1ac871672 Start adding compiler tests 2021-10-30 10:42:08 +02:00
elsid
8e71c246bf
Remove redundant BulletShape getters 2021-10-30 03:44:08 +02:00
elsid
b905dd17c3
Use unique_ptr to store btCollisionShape in BulletShape 2021-10-30 03:44:07 +02:00
elsid
29a772c33f
Rename Resource::BulletShape::CollisionBox fields according to styleguide 2021-10-29 21:05:58 +02:00
Petr Mikheev
47c89567fb Load LuaScriptsCfg from both *.omwscripts and *.omwaddon files. 2021-10-26 21:52:42 +02:00
Petr Mikheev
9adc190209 Redesign LuaUtil::ScriptsContainer to work with ScriptsConfiguration 2021-10-26 21:32:48 +02:00
Petr Mikheev
33d71be81f Add LuaUtil::ScriptsConfiguration 2021-10-26 21:32:02 +02:00
elsid
a58f1a94e3
Add helpers for binary serialization
To construct serializer from given entities:
* Data source/destination - any value that has to be serialized/deserialized,
  usually already existing type.
* Format - functional object to define high level serialization logic to
  define specific format and data schema. Like order of fields, allocation.
* Visitor - functional object to define low level serialization logic to
  operator on given data part.
  * BinaryWriter - copies given value into provided buffer.
  * BinaryReader - copies value into given destination from provided buffer.
  * SizeAccumulator - calculates required buffer size for given data.
2021-10-24 14:20:44 +02:00
psi29a
1ffa02b2fd Merge branch 'fix_windows_tests' into 'master'
Fix tests on windows

See merge request OpenMW/openmw!1313
2021-10-22 12:35:10 +00:00
elsid
b5f0057ac9
Fix tests on windows 2021-10-21 19:48:31 +02:00
elsid
a3b6bc7263
Fix logic expression for not found value 2021-10-20 17:48:10 +02:00
elsid
e5413c0664
Add functions to compress/decompress vector of bytes 2021-10-18 20:46:22 +02:00
Petr Mikheev
17f7a1a2ea Merge branch 'fix_lua_test' into 'master'
Fix LuaUtilPackageTest.Transform

See merge request OpenMW/openmw!1302
2021-10-18 07:16:10 +00:00
elsid
bb26ba30b6
Add progress reporter type
To log/report progress of long duration operations using given time period.
2021-10-18 01:26:10 +02:00
elsid
23026caacc
Fix LuaUtilPackageTest.Transform
It can fail due to float arithmetic precision with error:
Expected equality of these values:
  getAsString(lua, "moveAndScale")
    Which is: "TransformM{ move(6, 22, 18) scale(0.5, 1, 0.5) rotation(angle=8.53284e-17, axis=(1, 0, 0)) }"
  "TransformM{ move(6, 22, 18) scale(0.5, 1, 0.5) }"
2021-10-17 22:47:18 +02:00
elsid
046b5f83ee
Add ESM data loader
A component to load ESM content files with limited support for record types and
selection which of them to load. Supported record types are:
ACTI, CELL, CONT, DOOR, GMST, LAND, STAT.
2021-10-17 19:55:29 +02:00
elsid
c88367b6a6
Add sqlite3 helpers 2021-10-16 17:43:08 +02:00
psi29a
ae31138686 Merge branch 'options_tests' into 'master'
Add tests for openmw options

See merge request OpenMW/openmw!1253
2021-10-08 08:02:40 +00:00
florent teppe
e5abadc234 Fix keyword search when the keyword is preceded by a non whitespace non alpha character 2021-10-07 13:26:40 +00:00
elsid
035307b012
Add tests for openmw options
In attempt to document current behaviour. Add commented out checks as desired
behaviour.
2021-10-05 22:51:12 +02:00
Petr Mikheev
48538d5cef 3D transforms in Lua 2021-09-28 20:37:47 +02:00
Evil Eye
2f4df12b2e Merge branch 'Fix_ASCII' into 'master'
Fixed an issue where keyword search expected the text to be all ASCII characters

See merge request OpenMW/openmw!1227
2021-09-26 20:08:55 +00:00
florent.teppe
2d32954888 Replaced Assert_true with expect_eq 2021-09-20 19:56:47 +02:00
florent.teppe
0e06e9b221 Removed useless comment and converted the file to UTF8 to keep special characters 2021-09-19 20:31:22 +02:00
florent.teppe
c1c501ca35 Added test to make sure keyword search works even with non ascii characters 2021-09-19 15:05:48 +02:00
Petr Mikheev
2f25257a3e Move LuaState::makeReadOnly(sol::table) out of the class because it doesn't need to access LuaState internals. 2021-09-19 14:38:27 +02:00
elsid
6b7434ca69
Pass std::string_view instead of const std::string&
* Starting with Actor::getBodyPartMesh and ending with
  Misc::StringUtils::ciEqual.
* Add tests for Misc::StringUtils::ciEqual.
2021-09-09 18:39:50 +02:00
Petr Mikheev
33d4d88447 Function LuaUtil::toString 2021-08-31 09:41:58 +02:00
elsid
fea4fb6e69
Make AiPursue path destination to be as close as possible to target
Even when target is not reachable actor will try to run there either because
target navmesh polygon is selected within extended area or because partial path
is built to the closest possible polygon.
2021-08-18 23:44:36 +02:00
psi29a
6595c731f7 Merge branch 'fix_rc_poly_mesh_flags_length' into 'master'
Fix flags length for rcPolyMesh

See merge request OpenMW/openmw!1134
2021-08-17 09:19:32 +00:00
elsid
54a676f2e3
Add functions to get length of recast type arrays
To avoid duplicating same formulas in multiple places.
2021-08-12 22:43:01 +02:00
elsid
05258ed644
Remove redundant TileCachedRecastMeshManager::hasTile function
It's used only for tests. getMesh is a valid replacement.
2021-08-12 22:40:06 +02:00