Commit Graph

407 Commits (master)

Author SHA1 Message Date
Evil Eye d3e3083006 CI match script names and remove dead code 6 months ago
Evil Eye 1cea604257 Use string_view in register methods 6 months ago
Evil Eye ad7fb3d13f Avoid a few copies in mwscript 6 months ago
Alexei Kotov 89eccffbf6 Complain if a function or an integer is used as a local variable name 7 months ago
Evil Eye 54429cd23b Parse special characters that have been put back as names too 11 months ago
Evil Eye b835114ce2 Prevent input type assertion 1 year ago
Evil Eye 02775c490b Discard additional tokens in non-expression contexts 1 year ago
Shi Han a90e3b8c3b Move from std::atoi to std::from_char 2 years ago
Evil Eye c6a545766c Remove redundant string_view 2 years ago
unknown 868a398b86 Allow comparison operators of arbitrary length 2 years ago
elsid 996153f78d
Convert RefId to class 2 years ago
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.
2 years ago
psi29a 80e2cd79ec Merge branch 'boat_closer_to_todd' into 'master'
Ignore special characters preceding script commands

Closes #6807

See merge request OpenMW/openmw!2555
2 years ago
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
2 years ago
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
2 years ago
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!
2 years ago
Evil Eye b19ad079c2 Ignore special characters preceding script commands 2 years ago
Evil Eye 0ae5755abb Implement TestModels/T3D 2 years ago
elsid 063fff7fa4
Fix and prevent -Wextra-semi warning 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid 410a2881fe
Add comma to the last array element to prevent putting multiple elements on a single line 2 years ago
psi29a 1859c6eded Merge branch 'pcvisionbonus' into 'master'
Implement PCVisionBonus functions

Closes #6983

See merge request OpenMW/openmw!2371
2 years ago
Evil Eye 489c7a10b6 Implement PCVisionBonus functions 2 years ago
Evil Eye 0b5c2b4609 Implement the full version of the ori command 2 years ago
elsid cc8c7002ea
Cleanup components includes 2 years ago
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2 years ago
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.
3 years ago
Evil Eye e79f803402 Change includes 3 years ago
Evil Eye c6ca0e78c9 Make getStringLiteral return a string_view 3 years ago
Evil Eye ac747f02f3 Don't teleport NPCs to unknown cells 3 years ago
Evil Eye bee94e2afc Treat commas in scripts as whitespace 3 years ago
Evil Eye 9b565c4cf9 Remove dead code 3 years ago
Evil Eye fef902617a Parse integer format arguments as variable names 3 years ago
Evil Eye 31aa19574b Make PositionCell take additional junk arguments 3 years ago
Evil Eye dfb6bdf77e Allow integer variable names 3 years ago
Evil Eye 5037def3b3 Parse local variables sharing a name with a function as variables 3 years ago
Evil Eye c679565893 Make names starting with digits use normal name parsing code 3 years ago
Evil Eye 6d7cb38834 Remove duplicate GetSquareRoot implementation 3 years ago
Petr Mikheev d5cda61855 Console command "reload lua" 4 years ago
Evil Eye eced6f2126 Implement the help command 4 years ago
jvoisin b4cfa4328e Merge branch 'keyword_soup' into 'master'
Strip quotes when treating keywords as strings

Closes #6066

See merge request OpenMW/openmw!921
4 years ago
Evil Eye 22f7d4eee2 Strip quotes when treating keywords as strings 4 years ago
jvoisin aec3c74fa5 Sprinkle some [[noreturn]] where possible 4 years ago
Evil Eye c1177d7ffe Allow unquoted string arguments to start with . and - 4 years ago
Andrei Kortunov 963e1b8b3f Fix MSVC's C4244 warnings 4 years ago
Andrei Kortunov f9d42ed396 Fix MSVC's C4267 warnings 4 years ago
Andrei Kortunov 7fc4c9f3f6 Avoid dead code 4 years ago
Andrei Kortunov 8084a336b5 Replace zeroes and nulls by nullptrs 4 years ago
Alexei Dobrohotov 53f91a3aa5
Merge pull request #3018 from akortunov/emplace
Use emplace_back instead of push_back
4 years ago
unknown 71e78c66cd Re-add missing includes removed in 5a824d0333 4 years ago