1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 21:59:55 +00:00
Commit graph

400 commits

Author SHA1 Message Date
Shi Han
a90e3b8c3b Move from std::atoi to std::from_char 2023-03-18 09:30:48 +00:00
Evil Eye
c6a545766c Remove redundant string_view 2023-03-05 21:45:03 +01:00
unknown
868a398b86 Allow comparison operators of arbitrary length 2023-03-05 19:15:43 +01:00
elsid
996153f78d
Convert RefId to class 2023-02-15 23:20:44 +01:00
elsid
b88f0d2dbd
Replace mwscript program serialization into a vector with simple struct
Mostly to avoid string literal lookup by index with iteration over all preciding
literals and calling strlen. This is very inefficient. In genral this makes code
much more straightforward but also makes it portable since now int and float of
different sizes are properly supported.
2023-01-14 00:07:37 +01:00
psi29a
80e2cd79ec Merge branch 'boat_closer_to_todd' into 'master'
Ignore special characters preceding script commands

Closes #6807

See merge request OpenMW/openmw!2555
2022-12-28 11:21:24 +00:00
florent.teppe
42e45723b7 Fixes issue in MW script compilation that would silently produce the wrong bytecode
Fixes issue when fetching MyGui values that were stored as RefId but fetched as String

Removed some uncessary copies, fixed issues with lowercase and uneeded changes
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
125b21de20 Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID

Slowly going through all the changes to make, still hundreds of errors

a lot of functions/structures use std::string or stringview to designate an ID. So it takes time

Continues slowly replacing ids. There are technically more and more compilation errors

I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type

Continue moving forward, changes to the stores

slowly moving along

Starting to see the fruit of those changes.

still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.

More replacements. Things are starting to get easier

I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.

Still moving forward, and for the first time error count is going down!

Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably

Cells are back to using string for the name, haven't fixed everything yet. Many other changes

Under the bar of 400 compilation errors.

more good progress <100 compile errors!

More progress

Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string

some more progress on other fronts

Mostly game settings clean

one error opened a lot of other errors. Down to 18, but more will prbably appear

only link errors left??

Fixed link errors

OpenMW compiles, and launches, with some issues, but still!
2022-12-27 19:15:54 +01:00
Evil Eye
b19ad079c2 Ignore special characters preceding script commands 2022-12-27 14:59:56 +01:00
Evil Eye
0ae5755abb Implement TestModels/T3D 2022-11-08 22:36:15 +01:00
elsid
063fff7fa4
Fix and prevent -Wextra-semi warning 2022-10-06 00:26:43 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
elsid
410a2881fe
Add comma to the last array element to prevent putting multiple elements on a single line 2022-09-14 00:36:02 +02:00
psi29a
1859c6eded Merge branch 'pcvisionbonus' into 'master'
Implement PCVisionBonus functions

Closes #6983

See merge request OpenMW/openmw!2371
2022-09-07 20:27:22 +00:00
Evil Eye
489c7a10b6 Implement PCVisionBonus functions 2022-09-05 20:21:19 +02:00
Evil Eye
0b5c2b4609 Implement the full version of the ori command 2022-09-05 17:27:01 +02:00
elsid
cc8c7002ea
Cleanup components includes 2022-08-16 19:14:04 +02:00
elsid
f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2022-08-03 22:06:24 +02:00
elsid
bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
2022-07-05 01:41:28 +02:00
Evil Eye
e79f803402 Change includes 2022-05-21 10:48:32 +02:00
Evil Eye
c6ca0e78c9 Make getStringLiteral return a string_view 2022-05-21 01:21:55 +02:00
Evil Eye
ac747f02f3 Don't teleport NPCs to unknown cells 2021-12-26 15:27:25 +00:00
Evil Eye
bee94e2afc Treat commas in scripts as whitespace 2021-11-13 14:06:21 +01:00
Evil Eye
9b565c4cf9 Remove dead code 2021-10-28 22:16:43 +02:00
Evil Eye
fef902617a Parse integer format arguments as variable names 2021-10-24 17:23:15 +02:00
Evil Eye
31aa19574b Make PositionCell take additional junk arguments 2021-10-23 11:47:42 +02:00
Evil Eye
dfb6bdf77e Allow integer variable names 2021-10-23 11:47:35 +02:00
Evil Eye
5037def3b3 Parse local variables sharing a name with a function as variables 2021-10-06 21:27:08 +02:00
Evil Eye
c679565893 Make names starting with digits use normal name parsing code 2021-09-26 22:13:53 +02:00
Evil Eye
6d7cb38834 Remove duplicate GetSquareRoot implementation 2021-09-19 19:53:38 +02:00
Petr Mikheev
d5cda61855 Console command "reload lua" 2021-07-09 20:24:56 +02:00
Evil Eye
eced6f2126 Implement the help command 2021-07-07 18:48:25 +02:00
jvoisin
b4cfa4328e Merge branch 'keyword_soup' into 'master'
Strip quotes when treating keywords as strings

Closes #6066

See merge request OpenMW/openmw!921
2021-06-24 19:51:58 +00:00
Evil Eye
22f7d4eee2 Strip quotes when treating keywords as strings 2021-06-22 16:54:35 +02:00
jvoisin
aec3c74fa5 Sprinkle some [[noreturn]] where possible 2021-06-22 12:51:08 +02:00
Evil Eye
c1177d7ffe Allow unquoted string arguments to start with . and - 2021-06-19 11:21:37 +02:00
Andrei Kortunov
963e1b8b3f Fix MSVC's C4244 warnings 2021-05-12 10:34:40 +04:00
Andrei Kortunov
f9d42ed396 Fix MSVC's C4267 warnings 2021-05-12 10:34:39 +04:00
Andrei Kortunov
7fc4c9f3f6 Avoid dead code 2021-01-09 13:52:01 +04:00
Andrei Kortunov
8084a336b5 Replace zeroes and nulls by nullptrs 2020-11-29 11:14:07 +04:00
Alexei Dobrohotov
53f91a3aa5
Merge pull request #3018 from akortunov/emplace
Use emplace_back instead of push_back
2020-11-01 01:58:56 +03:00
unknown
71e78c66cd Re-add missing includes removed in 5a824d0333 2020-10-25 14:33:23 +01:00
Bret Curtis
5aa053c53e components/compiler/streamerrorhandler.cpp needs sstream for MacOS 2020-10-23 00:13:51 +02:00
Bret Curtis
5a824d0333 components/compiler cleanup; also cleaned up related cascading warnings; fixed up final/override issues 2020-10-22 23:57:53 +02:00
Andrei Kortunov
065ed5138e Use emplace_back instead of push_back 2020-10-18 10:27:35 +04:00
Andrei Kortunov
8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
fredzio
460e69e92a Get rid of warning: dynamic exception specifications are deprecated 2020-10-10 12:12:55 +02:00
Capostrophic
e02b66cdf4 Ignore bogus string arguments for Disable/Enable again 2020-06-06 20:04:09 +03:00
Andrei Kortunov
5468fcb29f Store attributes and skills values as floats (bug #4021) 2020-06-03 17:34:15 +04:00