Commit Graph

301 Commits (master)

Author SHA1 Message Date
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
Andrei Kortunov 5d94a94a98 Use a Boost API to resolve symlinks instead of low-level code 3 years ago
elsid 5891d58f63
Fix C4456 msvc warning
declaration of 'it' hides previous local declaration
3 years ago
elsid 7e6c13630a Use target_precompile_headers for the most expensive headers 3 years ago
elsid 10fbf170a2
Reduce number of includes for boost/program_options 3 years ago
AnyOldName3 6a5ad4ca43 Fix regression from https://gitlab.com/OpenMW/openmw/-/merge_requests/1776 3 years ago
jvoisin a204f392c9 Minor simplification in multidircollection.cpp 3 years ago
Petr Mikheev c7ab67c2c1 Allow relative paths in openmw.cfg; support --replace=config. 3 years ago
elsid 0dcb1f5aac
Fix build on Windows
Use wrapper header over Windows.h to undefine far and near in a single place.
3 years ago
elsid 94c1d0cced
Use unique_ptr to store istream 3 years ago
elsid c94d8be7bf
Add generic StreamWithBuffer owning the underlying buffer 3 years ago
elsid 9d6d0c6ffb
Move ConstrainedStreamBuf into separate file 3 years ago
elsid fbc853804d
Fix recover from errors in Files::getHash 3 years ago
elsid b09570692e
Use ifstream for ESMReader
ESMReader reads the whole file, there is no need in the ConstrainedFileStream.
3 years ago
elsid 5eb8c4aebe
Avoid redundant conversion to const char* and use make_shared 3 years ago
Petr Mikheev 5f74df75c6 Add default value for `config`. 3 years ago
Petr Mikheev ac5cd6c80a Add default value for `user-data` in openmw.cfg 3 years ago
Petr Mikheev 6084dbfc3a Add a warning if replace==config is used. 3 years ago
Petr Mikheev 5b23ba3faf Fix `defaulted` in ConfigurationManager::mergeComposingVariables 3 years ago
Petr Mikheev 9c1ff16b62 Add config variable `user-data="?userdata?"`. Allows to override paths to saves and screenshots. 3 years ago
Petr Mikheev 5ff2fc55ac Make ConfigurationManager::getUserConfigPath to return the actual config path where the settings, logs, and Lua storage are stored. 3 years ago
Petr Mikheev 5ca56a4f8a New option "config" for specifying additional config directories. 3 years ago
elsid ecbcdd0e54
Add missing initialization 3 years ago
AnyOldName3 8fc09f8c51 Merge remote-tracking branch 'upstream/master' into detain-hash-selectively-reluctant
Merge conflicts included:
* One setting being removed (branch had changed its type).
* One setting's description being changed (branch had changed its type).
* List of files in components/files was changed both upstream and on the
  branch.
* Upstream had changed something in a file the branch deletes.
3 years ago
AnyOldName3 b991263a92 Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89062 3 years ago
AnyOldName3 5e9d460032 Remove redundant conversion operator 3 years ago
AnyOldName3 84d6de3eba Parse paths with boost rules when it's quoted, but use the string verbatim when it's not 3 years ago
elsid a665a38aca
Use MurmurHash3_x64_128 for file hash 3 years ago
Evil Eye 751e8cf76b Do a bounds check before calling functions defined in cctype 3 years ago
AnyOldName3 8fb0b5846e Allow paths with trailing data, emmitting a warning 3 years ago
elsid d7041613ef
Store BulletShape source file name and content hash 3 years ago
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.
3 years ago
AnyOldName3 9be606a40d Finish removing old Escape classes 3 years ago
AnyOldName3 1b83b08d80 Merge remote-tracking branch 'upstream/master' into detain-hash
Tests which no longer work are commented out.
Some of these don't work because they're effectively testing for the
presence of bugs in the old implementation.
Others don't work because we're no longer accidentally disabling the
boost::program_options feature where it generates an error if only part
of a token gets consumed.
These will be fixed by later commits.
3 years ago
AnyOldName3 af0d399103 Purge all uses of Escape Hash types 3 years ago
AnyOldName3 cf3596fbb4 Add copyright preamble 3 years ago
AnyOldName3 e382f71aea Add implementation of config file parser lifted from Boost 3 years ago
elsid 035307b012
Add tests for openmw options
In attempt to document current behaviour. Add commented out checks as desired
behaviour.
3 years ago
AnyOldName3 4727ae4b3b Make it possible to opt out of composing variables 3 years ago
jvoisin 22153cca7b Reduce a bit the code bloat in hot paths/small functions
There is no need to bloat hot/small functions with
a ton of function calls and involving locales
for simple error messages.
4 years ago
Andrei Kortunov f9d42ed396 Fix MSVC's C4267 warnings 4 years ago
Andrei Kortunov 801e2d6ad0 Avoid to use uninitialized variables 4 years ago
Andrei Kortunov 8084a336b5 Replace zeroes and nulls by nullptrs 4 years ago
Andrei Kortunov 4acd910b37 Rework file error messages handling 4 years ago
Alexei Dobrohotov 53f91a3aa5
Merge pull request #3018 from akortunov/emplace
Use emplace_back instead of push_back
4 years ago
AnyOldName3 5869ac71e3 Merge all composing variables, not just those in destination already
This resolves a regression where the local openmw.cfg doesn't exist, so
we fall back to the global openmw.cfg, but because we've not loaded
anything from the local openmw.cfg, there are no variables with which to
merge.
4 years ago
AnyOldName3 8b28b6e55e Compose BSA, context and script blacklist lists
These would only take their value from the highest priority source, so
specifying `openmw --content anExtraEsp.esp` would override all the
content files in the user cfg file, and the user cfg file would override
any in the global/local one.
4 years ago
AnyOldName3 fca8634b74 Remove debugging lines 4 years ago
AnyOldName3 cf81f1bbb7 Make composing variables compose in the expected order 4 years ago
AnyOldName3 6c311f4a3d Partially revert 3a912485
While it solved the bug it was supposed to, it caused a regression where
the user config could no longer override the global config.
4 years ago
Andrei Kortunov 065ed5138e Use emplace_back instead of push_back 4 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
Fanael Linithien e8ec62b298 Use all-lowercase names for windows API headers
This allows the code to successfully cross-compile from hosts with case
sensitive file names, like linux.
5 years ago
p4r4digm 0741fe5b80 removed path configuration and made screenshots just save in a folder 5 years ago
p4r4digm 2b54e6216b Added setting to change the directory screenshots are stored in 5 years ago
Andrei Kortunov 75fed1d236 Print error code when failed to open file on Windows 5 years ago
Capostrophic 3a912485ca openmw.cfg-related fixes
Make sure the defaults exist in local openmw.cfg too
Make sure constant attenuation settings are defined now that they are implemented
Fix config file loading order once and for all (bug #2976)
5 years ago
capostrophic 7b6af4a893 Make sure local path includes trailing slash
Launcher assumes it does
5 years ago
fredzio ca7ac30f6d Use the POSIX pathconf(2) to determine the maximum path length.
It fixes build on BSD platforms where PATH_MAX is defined in
<sys/syslimits.h> vs <linux/limits.h> on Linux.
6 years ago
Alexei Dobrohotov e4c596adf8
Fix CI builds (attempt №2)
Gosh darn dem tabs
6 years ago
Alexei Dobrohotov e4e513c5dc
Fix CI builds
Apparently the only tab characters are in this file.
6 years ago
Nat Meo bcc5142b32 Issue #4202: Open .omwaddon files without needing to open openmw-cs first. 6 years ago
AnyOldName3 8a6a8086da Make in-memory buffers seekable to fix fog of war 6 years ago
Ilya Zhuravlev 2e1ac51203 Clean up androidpath 6 years ago
Capostrophic e70cc10305 Some more de-boosting 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
Andrei Kortunov aca6625af4 Avoid possible memory leak by using the unique_ptr 6 years ago
Andrei Kortunov c7a5548475 Use new logging system for editor 6 years ago
Andrei Kortunov 1452684d9e Use new logging system for components 6 years ago
Alexander Stillich 70d578d050 Removed escape_hash_filter::mPrevious, removed usage of boost::replace_all 7 years ago
Alexander Stillich 7d39c5450c Fixed escaping @ in boost program options filter 7 years ago
AnyOldName3 7329e6a9ef Load 'data=...' lines correctly when starting the wizard or launcher, and save them correctly when exiting the launcher. 7 years ago
c72aa19d6d first pass on optimization of nif parsing functions from the file stream 7 years ago
Allofich 42402976e3 Fixes for building in MSVC 8 years ago
David Carlier 8a5c62de97 needs this head for getuid 8 years ago
Bret Curtis c781d1f8ed purge unnecessary imports
add fstream back

add fstream back

add fstream back

add fstream back

add fstream back

add fstream back

add fstream back
8 years ago
Bret Curtis 98752a9702 replace boost::bind 8 years ago
Bret Curtis d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 8 years ago
Bret Curtis 07f75e1104 replace boost::shared_ptr in extern and components 8 years ago
Nikolay Kasyanov db69342b5d [macOS] Move all configs & resources into app bundles
Fixes #3566 (https://bugs.openmw.org/issues/3566).
8 years ago
Roman Proskuryakov 416466e53e Fix uninitialized escape_hash_filter 8 years ago
scrawl 2f6075329b Clang warning fixes 8 years ago
David Carlier 83bab29e4b Mainly making compilable under OpenBSD.
Renaming one resource file as the space led to issue for qt/moc.
9 years ago
AnyOldName3 a0699ce20d Change some <> characters to double quotes, resolving compilation problems. 9 years ago
AnyOldName3 20f73f4a32 Relocate escape-related code to new files escape.hpp and escape.cpp. 9 years ago
AnyOldName3 7243583963 Change a switch to a series of if/else if/.../else, hopefully resolving compilation issues on OSX and Linux. 9 years ago
AnyOldName3 2b829f7f7b Move some stuff to a header, removing the need for a dodgy hack. 9 years ago
AnyOldName3 becc053555 Trick the software into building by using what I assume is a really dirty hack. 9 years ago
AnyOldName3 32f0ded8f6 Fix bug in unescape filter, but still manage not to fix build issue. 9 years ago
AnyOldName3 95d2c7ea5c Attempt to unescape characters when constructing file paths, introducing compilation errors. 9 years ago
AnyOldName3 f1b5ad5804 Remove unused unsafe function and properly remove inheritance from std::string, providing implementations of missing stream operators preventing boost reading and writing to escape strings. 9 years ago
AnyOldName3 e6f78ae5b7 Switch indentation to spaces to remain consistent with the rest of the project 9 years ago
AnyOldName3 08df463c94 Separate declaration and definition of some static members to hopefully calm Travis down. 9 years ago
AnyOldName3 5121e77a95 Remove the cause of a warning which upset Travis (but not the thing that made the Travis build fail, as I have no idea why it wouldn't work or how to fix it 9 years ago
AnyOldName3 195dd27780 Resolve obvious runtime error revealing more subtle one 9 years ago
AnyOldName3 fbe6dc9704 Change compilation error to runtime exception and decide that inheriting from std::string may have been a bad idea in C++ 9 years ago
AnyOldName3 c1ffc9e776 Remove a compilation error and set up framework to remove the others 9 years ago
AnyOldName3 e17e354e84 Make # only start a comment in openmw.cfg if it starts a line and introduct compilation errors 9 years ago
scrawl fcbcc004a3 Don't use unordered_map 9 years ago
scrawl f3e9fd49f3 Don't add the autodetected mw path in global config file
The wizard takes care of detecting the MW installation path already. By having this path permanently in the global cfg-file, there exists no way to *not* use an autodetected installation, which is a problem.
9 years ago