Commit Graph

86 Commits (master)

Author SHA1 Message Date
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
clang-format-bot ddb0522bbf
Apply clang-format to code base 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
Evil Eye bee94e2afc Treat commas in scripts as whitespace 3 years ago
Evil Eye fef902617a Parse integer format arguments as variable names 3 years ago
Evil Eye 5037def3b3 Parse local variables sharing a name with a function as variables 3 years ago
Evil Eye 6d7cb38834 Remove duplicate GetSquareRoot implementation 3 years ago
Evil Eye c1177d7ffe Allow unquoted string arguments to start with . and - 4 years ago
unknown 71e78c66cd Re-add missing includes removed in 5a824d0333 4 years ago
Bret Curtis 5a824d0333 components/compiler cleanup; also cleaned up related cascading warnings; fixed up final/override issues 4 years ago
Evil Eye 3875b837bc make MenuMode, Random, GetSecondsPassed regular functions 5 years ago
Evil Eye f0e2ee45fa reuse ImplicitRef and ExplicitRef for enable, disable, getdisabled, startscript; move scriptrunning and stopscript 5 years ago
Andrei Kortunov 34873b6065 Fix dead code 5 years ago
Roman Siromakha 4e5aec5c30
Merge pull request #2539 from Capostrophic/scripting
Try to parse strings as number literals (bug #5097)
5 years ago
Capostrophic bde4a38181 Cast Random result to float (bug #5175) 5 years ago
Capostrophic 138a7ac434 Expression parser: Try to parse strings as number literals (bug #5097) 5 years ago
Capostrophic 17dce28705 Improve compiler messages 6 years ago
Capostrophic 9bc360267b Ignore stray explicit references for names in expressions 6 years ago
Capostrophic 95aa05e41b Tweaks to script parser messages and pathgrid warnings 6 years ago
MiroslavR 395e97cf40 Remove evil "implicit GetJournalIndex" hack from expression parser 8 years ago
Marc Zinnschlag ece40b1e96 improved the remaining handling of extra arguments 9 years ago
Marc Zinnschlag 46e32de350 improved handling of extra arguments in DiscardParser 9 years ago
Marc Zinnschlag f9607a47b3 improved handling of extra arguments in StringParser 9 years ago
Marc Zinnschlag 210c77968a Don't report warning about extra arguments, if there are no extra arguments (Fixes #3133) 9 years ago
scrawl e695619aa5 ExprParser: Warn about ignored arguments 9 years ago
Marc Zinnschlag ae54f34f25 removed a redundant else and made unary + work also in the console 9 years ago
Emmanuel Anne dace7ab706 scripts: recognize '+' also as a unary operator
it fixes the armor sorter in "Blades safe house.esp"
9 years ago
scrawl 67bd6cd708 Remove empty line at the beginning of files
git ls-files -z | xargs -0 sed -i '1{/^$/d}'
10 years ago
Marc Zinnschlag cbf9f83b85 allow use of IDs as function arguments, even if the ID matches a keyword (Fixes #2830) 10 years ago
dteviot 1d7f3474fa Fixed more MSVC 2013 warnings. 10 years ago
Marc Zinnschlag 057d0913d6 Merge branch 'scriptfixes' 10 years ago
Marc Zinnschlag b951251572 handle junk in argument lists (Fixes #2206) 10 years ago
Marc Zinnschlag e4f75267d0 in case of arguments not separated with comma the fist token of the next argument was put back incorrectly 10 years ago
Marc Zinnschlag 19f4c46fe4 alllow (and ignore) explicit references for StopScript and ScriptRunning 11 years ago
Marc Zinnschlag aa8c0bccb4 added new argument type: z (optional, any) 11 years ago
Marc Zinnschlag 11a2c767cc some argument parsing cleanup 11 years ago
Marc Zinnschlag 35b27ea8cb ignore stray string argument after GetDisabled 11 years ago
scrawl 750d8b5589 Allow garbage integer argument for addSpell (Fixes #1539) 11 years ago
cc9cii bbe77d656a Minor fixes from static analysis. 11 years ago
Marc Zinnschlag 12fc0aaecb removed an unused parser settings (implicitly fixing a case were this setting was not applied correctly) 11 years ago
Marc Zinnschlag 0d84adb2c6 allow x->(y) instead of (x->y) 11 years ago
Marc Zinnschlag d213c6c36a fixed a constness-issue 11 years ago
Marc Zinnschlag 2086ebe410 fix for inappropriate disable (2nd attempt) 11 years ago
Marc Zinnschlag b01c6dad37 Revert "allow disable as an alias for getDisabled (in most cases)"
This reverts commit f7ff4fbd51.
11 years ago
Marc Zinnschlag f7ff4fbd51 allow disable as an alias for getDisabled (in most cases) 11 years ago
Marc Zinnschlag 309573a3ac allow the use of the keyword end as a variable name in an expression 11 years ago
Marc Zinnschlag a85d3c7dcb ignore unused explicit references for functions 11 years ago
Marc Zinnschlag 93d4743012 interpret instruction keywords as names within expressions 11 years ago