From 97924d97c785fda67f690ad49d9b624996526fc8 Mon Sep 17 00:00:00 2001 From: Daniel Vukelich Date: Fri, 12 Jan 2018 20:02:43 -0500 Subject: [PATCH 01/38] Add the option for multiple quicksave slots With more than 1 quicksave slot, slots will be created each time you quicksave until the maximum number (configured in settings) of quicksaves has been reached. After that, the oldest quicksave slot will be replaced each time you quicksave. Saves are numbered sequentially, unless the maximum number of slots is 1, in which case it is not numbered. --- apps/openmw/CMakeLists.txt | 3 +- apps/openmw/mwstate/quicksavemanager.cpp | 73 +++++++++++++++++++ apps/openmw/mwstate/quicksavemanager.hpp | 42 +++++++++++ apps/openmw/mwstate/statemanagerimp.cpp | 17 +++-- .../reference/modding/settings/saves.rst | 13 +++- files/settings-default.cfg | 8 +- 6 files changed, 146 insertions(+), 10 deletions(-) create mode 100644 apps/openmw/mwstate/quicksavemanager.cpp create mode 100644 apps/openmw/mwstate/quicksavemanager.hpp diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 491394324..6e97df297 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -89,7 +89,7 @@ add_openmw_dir (mwmechanics ) add_openmw_dir (mwstate - statemanagerimp charactermanager character + statemanagerimp charactermanager character quicksavemanager ) add_openmw_dir (mwbase @@ -223,4 +223,3 @@ endif (MSVC) if (WIN32) INSTALL(TARGETS openmw RUNTIME DESTINATION ".") endif (WIN32) - diff --git a/apps/openmw/mwstate/quicksavemanager.cpp b/apps/openmw/mwstate/quicksavemanager.cpp new file mode 100644 index 000000000..3ead7165a --- /dev/null +++ b/apps/openmw/mwstate/quicksavemanager.cpp @@ -0,0 +1,73 @@ +#include "quicksavemanager.hpp" + +#include + +MWState::QuickSaveManager::QuickSaveManager(std::string &saveName, int maxSaves){ + this->saveName = saveName; + this->maxSaves = maxSaves; + this->oldestSlotVisited = NULL; + this->oldestSlotId = 0; + this->slotsVisited = 0; +} + +void MWState::QuickSaveManager::visitSave(const Slot *saveSlot){ + int slotId; + if(tryExtractSlotId(saveSlot->mProfile.mDescription, slotId)){ + ++slotsVisited; + if(isOldestSave(saveSlot)){ + oldestSlotVisited = saveSlot; + oldestSlotId = slotId; + } + } +} + +bool MWState::QuickSaveManager::isOldestSave(const Slot *compare){ + if(oldestSlotVisited == NULL) + return true; + return (compare->mTimeStamp < oldestSlotVisited->mTimeStamp); +} + +bool MWState::QuickSaveManager::tryExtractSlotId(const std::string &slotName, int &extractedId){ + std::istringstream formattedExtractor = std::istringstream(slotName); + + std::string nameToTest; + formattedExtractor >> nameToTest; + if(nameToTest == saveName){ + //Only try to extract the id if maxSaves > 1 + //With maxSaves == 1, we don't append the slotId to the name + if(formattedExtractor >> extractedId) + return (isSlotIdValid(extractedId)); + else if(maxSaves == 1) + return formattedExtractor.eof(); + } + return false; +} + +bool MWState::QuickSaveManager::isSlotIdValid(int slotId){ + return (slotId > 0 && slotId <= maxSaves); +} + +bool MWState::QuickSaveManager::shouldCreateNewSlot(){ + return (slotsVisited < maxSaves); +} + +const MWState::Slot *MWState::QuickSaveManager::getNextQuickSaveSlot(){ + if(shouldCreateNewSlot()) + return NULL; + return oldestSlotVisited; +} + +std::string MWState::QuickSaveManager::getNextQuickSaveName(){ + std::ostringstream nameFormatter; + nameFormatter << saveName; + //Only print the number if there will be more than 1 + if(maxSaves > 1) + nameFormatter << " " << calcNextSlotId(); + return nameFormatter.str(); +} + +int MWState::QuickSaveManager::calcNextSlotId(){ + if(shouldCreateNewSlot()) + return (slotsVisited + 1); + return oldestSlotId; +} diff --git a/apps/openmw/mwstate/quicksavemanager.hpp b/apps/openmw/mwstate/quicksavemanager.hpp new file mode 100644 index 000000000..04341897f --- /dev/null +++ b/apps/openmw/mwstate/quicksavemanager.hpp @@ -0,0 +1,42 @@ +#ifndef GAME_STATE_QUICKSAVEMANAGER_H +#define GAME_STATE_QUICKSAVEMANAGER_H + +#include "character.hpp" +#include "../mwbase/statemanager.hpp" + +#include + +namespace MWState{ + class QuickSaveManager{ + std::string saveName; + int maxSaves; + int slotsVisited; + int oldestSlotId; + const Slot *oldestSlotVisited; + private: + bool tryExtractSlotId(const std::string &slotName, int &extractedIdll); + bool isSlotIdValid(int slotId); + bool shouldCreateNewSlot(); + bool isOldestSave(const Slot *compare); + int calcNextSlotId(); + public: + QuickSaveManager(std::string &saveName, int maxSaves); + ///< A utility class to manage multiple quicksave slots + /// + /// \param saveName The name of the save ("QuickSave", "AutoSave", etc) + /// \param maxSaves The maximum number of save slots to use before recycling old ones + + void visitSave(const Slot *saveSlot); + ///< Visits the given \a slot \a + + const Slot *getNextQuickSaveSlot(); + ///< Get the slot that the next quicksave should use. + /// + ///\return Either the oldest quicksave slot visited, or NULL if a new slot can be made + + std::string getNextQuickSaveName(); + ///< Get the name that the next quicksave should use ("QuickSave 1", "AutoSave 10", etc) + }; +} + +#endif diff --git a/apps/openmw/mwstate/statemanagerimp.cpp b/apps/openmw/mwstate/statemanagerimp.cpp index 14ee5adee..5b126cbb5 100644 --- a/apps/openmw/mwstate/statemanagerimp.cpp +++ b/apps/openmw/mwstate/statemanagerimp.cpp @@ -37,6 +37,8 @@ #include "../mwscript/globalscripts.hpp" +#include "quicksavemanager.hpp" + void MWState::StateManager::cleanup (bool force) { if (mState!=State_NoGame || force) @@ -324,20 +326,25 @@ void MWState::StateManager::quickSave (std::string name) return; } - const Slot* slot = NULL; + int maxSaves = Settings::Manager::getInt("max quicksaves", "Saves"); + if(maxSaves < 1) + maxSaves = 1; + Character* currentCharacter = getCurrentCharacter(); //Get current character + QuickSaveManager saveFinder = QuickSaveManager(name, maxSaves); - //Find quicksave slot if (currentCharacter) { for (Character::SlotIterator it = currentCharacter->begin(); it != currentCharacter->end(); ++it) { - if (it->mProfile.mDescription == name) - slot = &*it; + //Visiting slots allows the quicksave finder to find the oldest quicksave + saveFinder.visitSave(&*it); } } - saveGame(name, slot); + //Once all the saves have been visited, the save finder can tell us which + //one to replace (or create) + saveGame(saveFinder.getNextQuickSaveName(), saveFinder.getNextQuickSaveSlot()); } void MWState::StateManager::loadGame(const std::string& filepath) diff --git a/docs/source/reference/modding/settings/saves.rst b/docs/source/reference/modding/settings/saves.rst index 90bd56ca5..f5fd553a9 100644 --- a/docs/source/reference/modding/settings/saves.rst +++ b/docs/source/reference/modding/settings/saves.rst @@ -5,7 +5,7 @@ character --------- :Type: string -:Range: +:Range: :Default: "" This setting contains the default character name for loading saved games. @@ -35,3 +35,14 @@ This setting determines whether the amount of the time the player has spent play for each saved game in the Load menu. This setting can only be configured by editing the settings configuration file. + +max quicksaves +---------- + +:Type: integer +:Range: >0 +:Default: 5 + +This setting determines how many quicksave and autosave slots you can have at a time. If greater than 1, quicksaves will be sequentially created each time you quicksave. Once the maximum number of quicksaves has been reached, the oldest quicksave will be recycled the next time you perform a quicksave. + +This setting can only be configured by editing the settings configuration file. diff --git a/files/settings-default.cfg b/files/settings-default.cfg index c694d4db2..3da88b01a 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -7,7 +7,7 @@ # significance of each setting, interaction with other settings, hard # limits on value ranges and more information in general, please read # the detailed documentation at: -# +# # http://openmw.readthedocs.io/en/master/reference/modding/settings/index.html # @@ -288,6 +288,10 @@ autosave = true # Display the time played on each save file in the load menu. timeplayed = false +# The maximum number of quick (or auto) save slots to have. +# If all slots are used, the oldest save is reused +max quicksaves = 5 + [Sound] # Name of audio device file. Blank means use the default device. @@ -376,7 +380,7 @@ reflect actors = false # Overrides the value in '[Camera] small feature culling pixel size' specifically for water reflection/refraction textures. small feature culling pixel size = 20.0 -# By what factor water downscales objects. Only works with water shader and refractions on. +# By what factor water downscales objects. Only works with water shader and refractions on. refraction scale = 1.0 [Windows] From f09fd6795c4519523e7ea927106a17e573019d17 Mon Sep 17 00:00:00 2001 From: Daniel Vukelich Date: Fri, 12 Jan 2018 20:02:43 -0500 Subject: [PATCH 02/38] Follow openmw style guide --- apps/openmw/mwstate/quicksavemanager.cpp | 74 ++++++++++++++---------- apps/openmw/mwstate/quicksavemanager.hpp | 14 ++--- 2 files changed, 50 insertions(+), 38 deletions(-) diff --git a/apps/openmw/mwstate/quicksavemanager.cpp b/apps/openmw/mwstate/quicksavemanager.cpp index 3ead7165a..1457f7075 100644 --- a/apps/openmw/mwstate/quicksavemanager.cpp +++ b/apps/openmw/mwstate/quicksavemanager.cpp @@ -2,72 +2,84 @@ #include -MWState::QuickSaveManager::QuickSaveManager(std::string &saveName, int maxSaves){ - this->saveName = saveName; - this->maxSaves = maxSaves; - this->oldestSlotVisited = NULL; - this->oldestSlotId = 0; - this->slotsVisited = 0; +MWState::QuickSaveManager::QuickSaveManager(std::string &saveName, int maxSaves) +{ + this->mSaveName = saveName; + this->mMaxSaves = maxSaves; + this->mOldestSlotVisited = NULL; + this->mOldestSlotId = 0; + this->mSlotsVisited = 0; } -void MWState::QuickSaveManager::visitSave(const Slot *saveSlot){ +void MWState::QuickSaveManager::visitSave(const Slot *saveSlot) +{ int slotId; - if(tryExtractSlotId(saveSlot->mProfile.mDescription, slotId)){ - ++slotsVisited; - if(isOldestSave(saveSlot)){ - oldestSlotVisited = saveSlot; - oldestSlotId = slotId; + if(tryExtractSlotId(saveSlot->mProfile.mDescription, slotId)) + { + ++mSlotsVisited; + if(isOldestSave(saveSlot)) + { + mOldestSlotVisited = saveSlot; + mOldestSlotId = slotId; } } } -bool MWState::QuickSaveManager::isOldestSave(const Slot *compare){ - if(oldestSlotVisited == NULL) +bool MWState::QuickSaveManager::isOldestSave(const Slot *compare) +{ + if(mOldestSlotVisited == NULL) return true; - return (compare->mTimeStamp < oldestSlotVisited->mTimeStamp); + return (compare->mTimeStamp <= mOldestSlotVisited->mTimeStamp); } -bool MWState::QuickSaveManager::tryExtractSlotId(const std::string &slotName, int &extractedId){ - std::istringstream formattedExtractor = std::istringstream(slotName); +bool MWState::QuickSaveManager::tryExtractSlotId(const std::string &slotName, int &extractedId) +{ + std::istringstream formattedExtractor(slotName); std::string nameToTest; formattedExtractor >> nameToTest; - if(nameToTest == saveName){ + if(nameToTest == mSaveName) + { //Only try to extract the id if maxSaves > 1 //With maxSaves == 1, we don't append the slotId to the name if(formattedExtractor >> extractedId) return (isSlotIdValid(extractedId)); - else if(maxSaves == 1) + else if(mMaxSaves == 1) return formattedExtractor.eof(); } return false; } -bool MWState::QuickSaveManager::isSlotIdValid(int slotId){ - return (slotId > 0 && slotId <= maxSaves); +bool MWState::QuickSaveManager::isSlotIdValid(int slotId) +{ + return (slotId > 0 && slotId <= mMaxSaves); } -bool MWState::QuickSaveManager::shouldCreateNewSlot(){ - return (slotsVisited < maxSaves); +bool MWState::QuickSaveManager::shouldCreateNewSlot() +{ + return (mSlotsVisited < mMaxSaves); } -const MWState::Slot *MWState::QuickSaveManager::getNextQuickSaveSlot(){ +const MWState::Slot *MWState::QuickSaveManager::getNextQuickSaveSlot() +{ if(shouldCreateNewSlot()) return NULL; - return oldestSlotVisited; + return mOldestSlotVisited; } -std::string MWState::QuickSaveManager::getNextQuickSaveName(){ +std::string MWState::QuickSaveManager::getNextQuickSaveName() +{ std::ostringstream nameFormatter; - nameFormatter << saveName; + nameFormatter << mSaveName; //Only print the number if there will be more than 1 - if(maxSaves > 1) + if(mMaxSaves > 1) nameFormatter << " " << calcNextSlotId(); return nameFormatter.str(); } -int MWState::QuickSaveManager::calcNextSlotId(){ +int MWState::QuickSaveManager::calcNextSlotId() +{ if(shouldCreateNewSlot()) - return (slotsVisited + 1); - return oldestSlotId; + return (mSlotsVisited + 1); + return mOldestSlotId; } diff --git a/apps/openmw/mwstate/quicksavemanager.hpp b/apps/openmw/mwstate/quicksavemanager.hpp index 04341897f..6a06171d9 100644 --- a/apps/openmw/mwstate/quicksavemanager.hpp +++ b/apps/openmw/mwstate/quicksavemanager.hpp @@ -1,18 +1,18 @@ #ifndef GAME_STATE_QUICKSAVEMANAGER_H #define GAME_STATE_QUICKSAVEMANAGER_H +#include + #include "character.hpp" #include "../mwbase/statemanager.hpp" -#include - namespace MWState{ class QuickSaveManager{ - std::string saveName; - int maxSaves; - int slotsVisited; - int oldestSlotId; - const Slot *oldestSlotVisited; + std::string mSaveName; + int mMaxSaves; + int mSlotsVisited; + int mOldestSlotId; + const Slot *mOldestSlotVisited; private: bool tryExtractSlotId(const std::string &slotName, int &extractedIdll); bool isSlotIdValid(int slotId); From 3af8f63895c94e1a0268720be0680af83130954b Mon Sep 17 00:00:00 2001 From: Daniel Vukelich Date: Wed, 17 Jan 2018 21:43:30 -0500 Subject: [PATCH 03/38] Use unsigned integer types for QuickSave indices --- apps/openmw/mwstate/quicksavemanager.cpp | 8 ++++---- apps/openmw/mwstate/quicksavemanager.hpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwstate/quicksavemanager.cpp b/apps/openmw/mwstate/quicksavemanager.cpp index 1457f7075..e49f376d6 100644 --- a/apps/openmw/mwstate/quicksavemanager.cpp +++ b/apps/openmw/mwstate/quicksavemanager.cpp @@ -2,7 +2,7 @@ #include -MWState::QuickSaveManager::QuickSaveManager(std::string &saveName, int maxSaves) +MWState::QuickSaveManager::QuickSaveManager(std::string &saveName, unsigned int maxSaves) { this->mSaveName = saveName; this->mMaxSaves = maxSaves; @@ -13,7 +13,7 @@ MWState::QuickSaveManager::QuickSaveManager(std::string &saveName, int maxSaves) void MWState::QuickSaveManager::visitSave(const Slot *saveSlot) { - int slotId; + unsigned int slotId; if(tryExtractSlotId(saveSlot->mProfile.mDescription, slotId)) { ++mSlotsVisited; @@ -32,7 +32,7 @@ bool MWState::QuickSaveManager::isOldestSave(const Slot *compare) return (compare->mTimeStamp <= mOldestSlotVisited->mTimeStamp); } -bool MWState::QuickSaveManager::tryExtractSlotId(const std::string &slotName, int &extractedId) +bool MWState::QuickSaveManager::tryExtractSlotId(const std::string &slotName, unsigned int &extractedId) { std::istringstream formattedExtractor(slotName); @@ -50,7 +50,7 @@ bool MWState::QuickSaveManager::tryExtractSlotId(const std::string &slotName, in return false; } -bool MWState::QuickSaveManager::isSlotIdValid(int slotId) +bool MWState::QuickSaveManager::isSlotIdValid(unsigned int slotId) { return (slotId > 0 && slotId <= mMaxSaves); } diff --git a/apps/openmw/mwstate/quicksavemanager.hpp b/apps/openmw/mwstate/quicksavemanager.hpp index 6a06171d9..abe7ef426 100644 --- a/apps/openmw/mwstate/quicksavemanager.hpp +++ b/apps/openmw/mwstate/quicksavemanager.hpp @@ -9,18 +9,18 @@ namespace MWState{ class QuickSaveManager{ std::string mSaveName; - int mMaxSaves; - int mSlotsVisited; - int mOldestSlotId; + unsigned int mMaxSaves; + unsigned int mSlotsVisited; + unsigned int mOldestSlotId; const Slot *mOldestSlotVisited; private: - bool tryExtractSlotId(const std::string &slotName, int &extractedIdll); - bool isSlotIdValid(int slotId); + bool tryExtractSlotId(const std::string &slotName, unsigned int &extractedIdll); + bool isSlotIdValid(unsigned int slotId); bool shouldCreateNewSlot(); bool isOldestSave(const Slot *compare); int calcNextSlotId(); public: - QuickSaveManager(std::string &saveName, int maxSaves); + QuickSaveManager(std::string &saveName, unsigned int maxSaves); ///< A utility class to manage multiple quicksave slots /// /// \param saveName The name of the save ("QuickSave", "AutoSave", etc) From 86c25f5dba5c384df911fef539bd36af5f94d7fd Mon Sep 17 00:00:00 2001 From: uramer Date: Fri, 9 Feb 2018 01:53:52 +0100 Subject: [PATCH 04/38] Removed NIF flag handling to replicate vanilla engine behaviour --- components/nifbullet/bulletnifloader.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/components/nifbullet/bulletnifloader.cpp b/components/nifbullet/bulletnifloader.cpp index 9e9fe3759..598b0f0f5 100644 --- a/components/nifbullet/bulletnifloader.cpp +++ b/components/nifbullet/bulletnifloader.cpp @@ -245,11 +245,6 @@ void BulletNifLoader::handleNiTriShape(const Nif::NiTriShape *shape, int flags, { assert(shape != NULL); - // Interpret flags - bool hidden = (flags&Nif::NiNode::Flag_Hidden) != 0; - bool collide = (flags&Nif::NiNode::Flag_MeshCollision) != 0; - bool bbcollide = (flags&Nif::NiNode::Flag_BBoxCollision) != 0; - // If the object was marked "NCO" earlier, it shouldn't collide with // anything. So don't do anything. if ((flags & 0x800)) @@ -257,10 +252,17 @@ void BulletNifLoader::handleNiTriShape(const Nif::NiTriShape *shape, int flags, return; } + + /* this is an improper way to handle NIF flags, see https://bugs.openmw.org/issues/4319#change-22066 for more details + // Interpret flags + bool hidden = (flags&Nif::NiNode::Flag_Hidden) != 0; + bool collide = (flags&Nif::NiNode::Flag_MeshCollision) != 0; + bool bbcollide = (flags&Nif::NiNode::Flag_BBoxCollision) != 0; + if (!collide && !bbcollide && hidden) // This mesh apparently isn't being used for anything, so don't // bother setting it up. - return; + return;*/ if (!shape->skin.empty()) isAnimated = false; From 5502790ed91bb985f6fcc7d541644b6e6838afa0 Mon Sep 17 00:00:00 2001 From: uramer Date: Fri, 9 Feb 2018 16:34:55 +0100 Subject: [PATCH 05/38] removed the unnecessary comment --- components/nifbullet/bulletnifloader.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/components/nifbullet/bulletnifloader.cpp b/components/nifbullet/bulletnifloader.cpp index 598b0f0f5..8f827e4e2 100644 --- a/components/nifbullet/bulletnifloader.cpp +++ b/components/nifbullet/bulletnifloader.cpp @@ -252,18 +252,6 @@ void BulletNifLoader::handleNiTriShape(const Nif::NiTriShape *shape, int flags, return; } - - /* this is an improper way to handle NIF flags, see https://bugs.openmw.org/issues/4319#change-22066 for more details - // Interpret flags - bool hidden = (flags&Nif::NiNode::Flag_Hidden) != 0; - bool collide = (flags&Nif::NiNode::Flag_MeshCollision) != 0; - bool bbcollide = (flags&Nif::NiNode::Flag_BBoxCollision) != 0; - - if (!collide && !bbcollide && hidden) - // This mesh apparently isn't being used for anything, so don't - // bother setting it up. - return;*/ - if (!shape->skin.empty()) isAnimated = false; From a708ac488e34c85a783243f462e4301093e62db8 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Tue, 13 Feb 2018 00:38:55 +0000 Subject: [PATCH 06/38] Don't call Store::setUp() unnecessarily Fixes a threading issue with ESM::Land store caused by calling setUp() while it's being used. --- apps/openmw/mwworld/store.cpp | 5 +++++ apps/openmw/mwworld/store.hpp | 1 + apps/openmw/mwworld/worldimp.cpp | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/store.cpp b/apps/openmw/mwworld/store.cpp index 704dbf970..9279e3fe7 100644 --- a/apps/openmw/mwworld/store.cpp +++ b/apps/openmw/mwworld/store.cpp @@ -607,6 +607,11 @@ namespace MWWorld } return ptr; } + void Store::clearDynamic() + { + setUp(); + } + void Store::setUp() { typedef DynamicExt::iterator ExtIterator; diff --git a/apps/openmw/mwworld/store.hpp b/apps/openmw/mwworld/store.hpp index 3babea86a..00ea6f66f 100644 --- a/apps/openmw/mwworld/store.hpp +++ b/apps/openmw/mwworld/store.hpp @@ -293,6 +293,7 @@ namespace MWWorld const ESM::Cell *find(const std::string &id) const; const ESM::Cell *find(int x, int y) const; + virtual void clearDynamic(); void setUp(); RecordId load(ESM::ESMReader &esm); diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 02e0737ee..7786b6823 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -295,7 +295,6 @@ namespace MWWorld mWorldScene->clear(); mStore.clearDynamic(); - mStore.setUp(); if (mPlayer) { From 123f7b83d59800f869a7454dcd3bcbe8b1ad51a3 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Tue, 13 Feb 2018 00:40:41 +0000 Subject: [PATCH 07/38] Make the CompositeMapRenderer use available time and add related setting --- apps/openmw/mwgui/loadingscreen.cpp | 1 - apps/openmw/mwrender/renderingmanager.cpp | 4 ++++ components/terrain/compositemaprenderer.cpp | 22 +++++++++++++++---- components/terrain/compositemaprenderer.hpp | 9 ++++++-- components/terrain/world.cpp | 5 +++++ components/terrain/world.hpp | 3 +++ .../reference/modding/settings/cells.rst | 8 +++++++ files/settings-default.cfg | 3 +++ 8 files changed, 48 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwgui/loadingscreen.cpp b/apps/openmw/mwgui/loadingscreen.cpp index 4753c39f2..2c12547fd 100644 --- a/apps/openmw/mwgui/loadingscreen.cpp +++ b/apps/openmw/mwgui/loadingscreen.cpp @@ -163,7 +163,6 @@ namespace MWGui if (mViewer->getIncrementalCompileOperation()) { mViewer->getIncrementalCompileOperation()->setMaximumNumOfObjectsToCompilePerFrame(100); - mViewer->getIncrementalCompileOperation()->setTargetFrameRate(getTargetFrameRate()); } // Assign dummy bounding sphere callback to avoid the bounding sphere of the entire scene being recomputed after each frame of loading diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 4fbcdc4d5..3281a787b 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -205,7 +205,10 @@ namespace MWRender mObjects.reset(new Objects(mResourceSystem, sceneRoot, mUnrefQueue.get())); if (getenv("OPENMW_DONT_PRECOMPILE") == NULL) + { mViewer->setIncrementalCompileOperation(new osgUtil::IncrementalCompileOperation); + mViewer->getIncrementalCompileOperation()->setTargetFrameRate(Settings::Manager::getFloat("target framerate", "Cells")); + } mResourceSystem->getSceneManager()->setIncrementalCompileOperation(mViewer->getIncrementalCompileOperation()); @@ -223,6 +226,7 @@ namespace MWRender else mTerrain.reset(new Terrain::TerrainGrid(sceneRoot, mRootNode, mResourceSystem, mTerrainStorage, Mask_Terrain, Mask_PreCompile)); mTerrain->setDefaultViewer(mViewer->getCamera()); + mTerrain->setTargetFrameRate(Settings::Manager::getFloat("target framerate", "Cells")); mCamera.reset(new Camera(mViewer->getCamera())); diff --git a/components/terrain/compositemaprenderer.cpp b/components/terrain/compositemaprenderer.cpp index 653ac53ec..6626a5713 100644 --- a/components/terrain/compositemaprenderer.cpp +++ b/components/terrain/compositemaprenderer.cpp @@ -10,7 +10,8 @@ namespace Terrain { CompositeMapRenderer::CompositeMapRenderer() - : mTimeAvailable(0.0005) + : mTargetFrameRate(120) + , mMinimumTimeAvailable(0.0025) { setSupportsDisplayList(false); setCullingActive(false); @@ -22,6 +23,14 @@ CompositeMapRenderer::CompositeMapRenderer() void CompositeMapRenderer::drawImplementation(osg::RenderInfo &renderInfo) const { + double dt = mTimer.time_s(); + dt = std::min(dt, 0.2); + mTimer.setStartTick(); + double targetFrameTime = 1.0/static_cast(mTargetFrameRate); + double conservativeTimeRatio(0.75); + double availableTime = std::max((targetFrameTime - dt)*conservativeTimeRatio, + mMinimumTimeAvailable); + mCompiled.clear(); OpenThreads::ScopedLock lock(mMutex); @@ -39,7 +48,7 @@ void CompositeMapRenderer::drawImplementation(osg::RenderInfo &renderInfo) const mImmediateCompileSet.erase(mImmediateCompileSet.begin()); } - double timeLeft = mTimeAvailable; + double timeLeft = availableTime; while (!mCompileSet.empty() && timeLeft > 0) { @@ -126,9 +135,14 @@ void CompositeMapRenderer::compile(CompositeMap &compositeMap, osg::RenderInfo & ext->glBindFramebuffer(GL_FRAMEBUFFER_EXT, fboId); } -void CompositeMapRenderer::setTimeAvailableForCompile(double time) +void CompositeMapRenderer::setMinimumTimeAvailableForCompile(double time) +{ + mMinimumTimeAvailable = time; +} + +void CompositeMapRenderer::setTargetFrameRate(float framerate) { - mTimeAvailable = time; + mTargetFrameRate = framerate; } void CompositeMapRenderer::addCompositeMap(CompositeMap* compositeMap, bool immediate) diff --git a/components/terrain/compositemaprenderer.hpp b/components/terrain/compositemaprenderer.hpp index 15e939389..54e158ed4 100644 --- a/components/terrain/compositemaprenderer.hpp +++ b/components/terrain/compositemaprenderer.hpp @@ -40,7 +40,10 @@ namespace Terrain void compile(CompositeMap& compositeMap, osg::RenderInfo& renderInfo, double* timeLeft) const; /// Set the available time in seconds for compiling (non-immediate) composite maps each frame - void setTimeAvailableForCompile(double time); + void setMinimumTimeAvailableForCompile(double time); + + /// If current frame rate is higher than this, the extra time will be set aside to do more compiling + void setTargetFrameRate(float framerate); /// Add a composite map to be rendered void addCompositeMap(CompositeMap* map, bool immediate=false); @@ -51,7 +54,9 @@ namespace Terrain unsigned int getCompileSetSize() const; private: - double mTimeAvailable; + float mTargetFrameRate; + double mMinimumTimeAvailable; + mutable osg::Timer mTimer; typedef std::set > CompileSet; diff --git a/components/terrain/world.cpp b/components/terrain/world.cpp index 335bb496b..213d5c8a7 100644 --- a/components/terrain/world.cpp +++ b/components/terrain/world.cpp @@ -65,6 +65,11 @@ World::~World() delete mStorage; } +void World::setTargetFrameRate(float rate) +{ + mCompositeMapRenderer->setTargetFrameRate(rate); +} + float World::getHeightAt(const osg::Vec3f &worldPos) { return mStorage->getHeightAt(worldPos); diff --git a/components/terrain/world.hpp b/components/terrain/world.hpp index e1c3828fc..688ed84d5 100644 --- a/components/terrain/world.hpp +++ b/components/terrain/world.hpp @@ -57,6 +57,9 @@ namespace Terrain World(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, Storage* storage, int nodeMask, int preCompileMask); virtual ~World(); + /// See CompositeMapRenderer::setTargetFrameRate + void setTargetFrameRate(float rate); + /// Apply the scene manager's texture filtering settings to all cached textures. /// @note Thread safe. void updateTextureFiltering(); diff --git a/docs/source/reference/modding/settings/cells.rst b/docs/source/reference/modding/settings/cells.rst index d2e7cf5be..aa5d43231 100644 --- a/docs/source/reference/modding/settings/cells.rst +++ b/docs/source/reference/modding/settings/cells.rst @@ -178,6 +178,14 @@ cache expiry delay The amount of time (in seconds) that a preloaded texture or object will stay in cache after it is no longer referenced or required, for example, when all cells containing this texture have been unloaded. +target framerate +---------------- +:Type: floating point +:Range: >0 +:Default: 60 + +Affects the time to be set aside each frame for graphics preloading operations. The game will distribute the preloading over several frames so as to not go under the specified framerate. For best results, set this value to the monitor's refresh rate. If you still experience stutters on turning around, you can try a lower value, although the framerate during loading will suffer a bit in that case. + pointers cache size ------------------ diff --git a/files/settings-default.cfg b/files/settings-default.cfg index c694d4db2..8a28c42e4 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -79,6 +79,9 @@ prediction time = 1 # How long to keep models/textures/collision shapes in cache after they're no longer referenced/required (in seconds) cache expiry delay = 5 +# Affects the time to be set aside each frame for graphics preloading operations +target framerate = 60 + # The count of pointers, that will be saved for a faster search by object ID. pointers cache size = 40 From 145b47a550425acc2055c6494e302d67c0b6c042 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ananace\" Olofsson" Date: Tue, 13 Feb 2018 17:47:38 +0100 Subject: [PATCH 08/38] Fix Windows builds `std::min`/`std::max` are part of algorithm, which is not implicitly included in Windows builds --- components/terrain/compositemaprenderer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/terrain/compositemaprenderer.cpp b/components/terrain/compositemaprenderer.cpp index 6626a5713..f9dae5b2f 100644 --- a/components/terrain/compositemaprenderer.cpp +++ b/components/terrain/compositemaprenderer.cpp @@ -6,6 +6,8 @@ #include #include +#include + namespace Terrain { From 9b8c56761b5c9b398aebb91fec6adf25208c24d9 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Tue, 13 Feb 2018 18:25:28 +0000 Subject: [PATCH 09/38] Fix timing error --- components/terrain/compositemaprenderer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/components/terrain/compositemaprenderer.cpp b/components/terrain/compositemaprenderer.cpp index f9dae5b2f..d3fdfa1f8 100644 --- a/components/terrain/compositemaprenderer.cpp +++ b/components/terrain/compositemaprenderer.cpp @@ -64,6 +64,7 @@ void CompositeMapRenderer::drawImplementation(osg::RenderInfo &renderInfo) const mCompileSet.erase(mCompileSet.begin()); } } + mTimer.setStartTick(); } void CompositeMapRenderer::compile(CompositeMap &compositeMap, osg::RenderInfo &renderInfo, double* timeLeft) const From 886b3431bc51d7a94fa51494663caa4a6917b296 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 13 Feb 2018 21:54:46 +0200 Subject: [PATCH 10/38] [Client] When resurrecting players, set pcknownwerewolf to 0 This makes it so players are no longer known werewolves and are no longer attacked infinitely by guards. --- apps/openmw/mwmp/LocalPlayer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 4265b5c57..03e370d4f 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -816,9 +816,11 @@ void LocalPlayer::resurrect() // Record that the player has died since the last attempt was made to arrest them, // used to make guards lenient enough to attempt an arrest again diedSinceArrestAttempt = true; - LOG_APPEND(Log::LOG_INFO, "- diedSinceArrestAttempt is now true"); + // Record that we are no longer a known werewolf, to avoid being attacked infinitely + MWBase::Environment::get().getWorld()->setGlobalInt("pcknownwerewolf", 0); + // Ensure we unequip any items with constant effects that can put us into an infinite // death loop MechanicsHelper::unequipItemsByEffect(ptrPlayer, ESM::Enchantment::ConstantEffect, ESM::MagicEffect::DrainHealth); From 3bdd989a509fd5d1b56c86ed7db3604583407ace Mon Sep 17 00:00:00 2001 From: Daniel Vukelich Date: Tue, 13 Feb 2018 21:01:15 -0500 Subject: [PATCH 11/38] Remove numeric quicksave slot IDs When multiple quicksaves occurred in quick succession, the numeric order of the saves could not be guaranteed. To prevent players from getting confused as to why their saves appear out of order, don't number them. --- apps/openmw/mwstate/quicksavemanager.cpp | 49 +----------------------- apps/openmw/mwstate/quicksavemanager.hpp | 9 +---- apps/openmw/mwstate/statemanagerimp.cpp | 2 +- 3 files changed, 3 insertions(+), 57 deletions(-) diff --git a/apps/openmw/mwstate/quicksavemanager.cpp b/apps/openmw/mwstate/quicksavemanager.cpp index e49f376d6..4bae9e674 100644 --- a/apps/openmw/mwstate/quicksavemanager.cpp +++ b/apps/openmw/mwstate/quicksavemanager.cpp @@ -1,27 +1,20 @@ #include "quicksavemanager.hpp" -#include - MWState::QuickSaveManager::QuickSaveManager(std::string &saveName, unsigned int maxSaves) { this->mSaveName = saveName; this->mMaxSaves = maxSaves; this->mOldestSlotVisited = NULL; - this->mOldestSlotId = 0; this->mSlotsVisited = 0; } void MWState::QuickSaveManager::visitSave(const Slot *saveSlot) { - unsigned int slotId; - if(tryExtractSlotId(saveSlot->mProfile.mDescription, slotId)) + if(mSaveName == saveSlot->mProfile.mDescription) { ++mSlotsVisited; if(isOldestSave(saveSlot)) - { mOldestSlotVisited = saveSlot; - mOldestSlotId = slotId; - } } } @@ -32,29 +25,6 @@ bool MWState::QuickSaveManager::isOldestSave(const Slot *compare) return (compare->mTimeStamp <= mOldestSlotVisited->mTimeStamp); } -bool MWState::QuickSaveManager::tryExtractSlotId(const std::string &slotName, unsigned int &extractedId) -{ - std::istringstream formattedExtractor(slotName); - - std::string nameToTest; - formattedExtractor >> nameToTest; - if(nameToTest == mSaveName) - { - //Only try to extract the id if maxSaves > 1 - //With maxSaves == 1, we don't append the slotId to the name - if(formattedExtractor >> extractedId) - return (isSlotIdValid(extractedId)); - else if(mMaxSaves == 1) - return formattedExtractor.eof(); - } - return false; -} - -bool MWState::QuickSaveManager::isSlotIdValid(unsigned int slotId) -{ - return (slotId > 0 && slotId <= mMaxSaves); -} - bool MWState::QuickSaveManager::shouldCreateNewSlot() { return (mSlotsVisited < mMaxSaves); @@ -66,20 +36,3 @@ const MWState::Slot *MWState::QuickSaveManager::getNextQuickSaveSlot() return NULL; return mOldestSlotVisited; } - -std::string MWState::QuickSaveManager::getNextQuickSaveName() -{ - std::ostringstream nameFormatter; - nameFormatter << mSaveName; - //Only print the number if there will be more than 1 - if(mMaxSaves > 1) - nameFormatter << " " << calcNextSlotId(); - return nameFormatter.str(); -} - -int MWState::QuickSaveManager::calcNextSlotId() -{ - if(shouldCreateNewSlot()) - return (mSlotsVisited + 1); - return mOldestSlotId; -} diff --git a/apps/openmw/mwstate/quicksavemanager.hpp b/apps/openmw/mwstate/quicksavemanager.hpp index abe7ef426..e52cd609f 100644 --- a/apps/openmw/mwstate/quicksavemanager.hpp +++ b/apps/openmw/mwstate/quicksavemanager.hpp @@ -11,20 +11,16 @@ namespace MWState{ std::string mSaveName; unsigned int mMaxSaves; unsigned int mSlotsVisited; - unsigned int mOldestSlotId; const Slot *mOldestSlotVisited; private: - bool tryExtractSlotId(const std::string &slotName, unsigned int &extractedIdll); - bool isSlotIdValid(unsigned int slotId); bool shouldCreateNewSlot(); bool isOldestSave(const Slot *compare); - int calcNextSlotId(); public: QuickSaveManager(std::string &saveName, unsigned int maxSaves); ///< A utility class to manage multiple quicksave slots /// /// \param saveName The name of the save ("QuickSave", "AutoSave", etc) - /// \param maxSaves The maximum number of save slots to use before recycling old ones + /// \param maxSaves The maximum number of save slots to create before recycling old ones void visitSave(const Slot *saveSlot); ///< Visits the given \a slot \a @@ -33,9 +29,6 @@ namespace MWState{ ///< Get the slot that the next quicksave should use. /// ///\return Either the oldest quicksave slot visited, or NULL if a new slot can be made - - std::string getNextQuickSaveName(); - ///< Get the name that the next quicksave should use ("QuickSave 1", "AutoSave 10", etc) }; } diff --git a/apps/openmw/mwstate/statemanagerimp.cpp b/apps/openmw/mwstate/statemanagerimp.cpp index 5b126cbb5..c1bb589e8 100644 --- a/apps/openmw/mwstate/statemanagerimp.cpp +++ b/apps/openmw/mwstate/statemanagerimp.cpp @@ -344,7 +344,7 @@ void MWState::StateManager::quickSave (std::string name) //Once all the saves have been visited, the save finder can tell us which //one to replace (or create) - saveGame(saveFinder.getNextQuickSaveName(), saveFinder.getNextQuickSaveSlot()); + saveGame(name, saveFinder.getNextQuickSaveSlot()); } void MWState::StateManager::loadGame(const std::string& filepath) From 104495a9a432acfbb34f2eb7c9d38766573564d8 Mon Sep 17 00:00:00 2001 From: Daniel Vukelich Date: Tue, 13 Feb 2018 21:05:24 -0500 Subject: [PATCH 12/38] Set default number of quicksaves to 1 --- docs/source/reference/modding/settings/saves.rst | 2 +- files/settings-default.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/reference/modding/settings/saves.rst b/docs/source/reference/modding/settings/saves.rst index f5fd553a9..a3cf5b4e0 100644 --- a/docs/source/reference/modding/settings/saves.rst +++ b/docs/source/reference/modding/settings/saves.rst @@ -41,7 +41,7 @@ max quicksaves :Type: integer :Range: >0 -:Default: 5 +:Default: 1 This setting determines how many quicksave and autosave slots you can have at a time. If greater than 1, quicksaves will be sequentially created each time you quicksave. Once the maximum number of quicksaves has been reached, the oldest quicksave will be recycled the next time you perform a quicksave. diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 3da88b01a..e2a0bdf54 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -290,7 +290,7 @@ timeplayed = false # The maximum number of quick (or auto) save slots to have. # If all slots are used, the oldest save is reused -max quicksaves = 5 +max quicksaves = 1 [Sound] From 60f686ee43c7ecc494b08d5182dadf8312ea3aeb Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 14 Feb 2018 05:53:44 +0200 Subject: [PATCH 13/38] [General] Implement setting of physics framerate as part of GameSettings --- apps/openmw-mp/Script/Functions/Settings.cpp | 8 +++++++ apps/openmw-mp/Script/Functions/Settings.hpp | 14 ++++++++++++ apps/openmw/mwbase/world.hpp | 10 +++++++++ apps/openmw/mwmp/LocalPlayer.cpp | 1 + .../player/ProcessorGameSettings.hpp | 3 +++ apps/openmw/mwphysics/physicssystem.cpp | 22 +++++++++++++++++++ apps/openmw/mwphysics/physicssystem.hpp | 10 +++++++++ apps/openmw/mwworld/worldimp.cpp | 13 +++++++++++ apps/openmw/mwworld/worldimp.hpp | 10 +++++++++ components/openmw-mp/Base/BasePlayer.hpp | 1 + .../Packets/Player/PacketGameSettings.cpp | 1 + 11 files changed, 93 insertions(+) diff --git a/apps/openmw-mp/Script/Functions/Settings.cpp b/apps/openmw-mp/Script/Functions/Settings.cpp index 24e914036..eaee5a56c 100644 --- a/apps/openmw-mp/Script/Functions/Settings.cpp +++ b/apps/openmw-mp/Script/Functions/Settings.cpp @@ -17,6 +17,14 @@ void SettingFunctions::SetDifficulty(unsigned short pid, int difficulty) player->difficulty = difficulty; } +void SettingFunctions::SetPhysicsFramerate(unsigned short pid, double physicsFramerate) +{ + Player *player; + GET_PLAYER(pid, player, ); + + player->physicsFramerate = physicsFramerate; +} + void SettingFunctions::SetConsoleAllowed(unsigned short pid, bool state) { Player *player; diff --git a/apps/openmw-mp/Script/Functions/Settings.hpp b/apps/openmw-mp/Script/Functions/Settings.hpp index e0db786fe..763a5e69e 100644 --- a/apps/openmw-mp/Script/Functions/Settings.hpp +++ b/apps/openmw-mp/Script/Functions/Settings.hpp @@ -5,6 +5,8 @@ #define SETTINGSAPI \ {"SetDifficulty", SettingFunctions::SetDifficulty},\ + {"SetPhysicsFramerate", SettingFunctions::SetPhysicsFramerate},\ + \ {"SetConsoleAllowed", SettingFunctions::SetConsoleAllowed},\ {"SetBedRestAllowed", SettingFunctions::SetBedRestAllowed},\ {"SetWildernessRestAllowed", SettingFunctions::SetWildernessRestAllowed},\ @@ -28,6 +30,18 @@ public: */ static void SetDifficulty(unsigned short pid, int difficulty); + /** + * \brief Set the physics framerate for a player. + * + * This changes the physics framerate for that player in the server memory, but does not by itself + * send a packet. + * + * \param pid The player ID. + * \param bool The physics framerate. + * \return void + */ + static void SetPhysicsFramerate(unsigned short pid, double physicsFramerate); + /** * \brief Set whether the console is allowed for a player. * diff --git a/apps/openmw/mwbase/world.hpp b/apps/openmw/mwbase/world.hpp index bc4beda7c..8767b0f09 100644 --- a/apps/openmw/mwbase/world.hpp +++ b/apps/openmw/mwbase/world.hpp @@ -318,6 +318,16 @@ namespace MWBase End of tes3mp addition */ + /* + Start of tes3mp addition + + Make it possible to set the physics framerate from elsewhere + */ + virtual void World::setPhysicsFramerate(float physFramerate) = 0; + /* + End of tes3mp addition + */ + virtual bool castRay (float x1, float y1, float z1, float x2, float y2, float z2) = 0; ///< cast a Ray and return true if there is an object in the ray path. diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 03e370d4f..c3c69108f 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -48,6 +48,7 @@ LocalPlayer::LocalPlayer() charGenStage.end = 1; difficulty = 0; + physicsFramerate = 60.0; consoleAllowed = false; bedRestAllowed = true; wildernessRestAllowed = true; diff --git a/apps/openmw/mwmp/processors/player/ProcessorGameSettings.hpp b/apps/openmw/mwmp/processors/player/ProcessorGameSettings.hpp index f5e5aaebd..dc3027bdd 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorGameSettings.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorGameSettings.hpp @@ -2,6 +2,7 @@ #define OPENMW_PROCESSORGAMESETTINGS_HPP #include "apps/openmw/mwbase/environment.hpp" +#include "apps/openmw/mwworld/worldimp.hpp" #include "apps/openmw/mwgui/windowmanagerimp.hpp" #include "../PlayerProcessor.hpp" @@ -28,6 +29,8 @@ namespace mwmp (!player->bedRestAllowed || !player->wildernessRestAllowed || !player->waitAllowed)) MWBase::Environment::get().getWindowManager()->popGuiMode(); } + + MWBase::Environment::get().getWorld()->setPhysicsFramerate(player->physicsFramerate); } } }; diff --git a/apps/openmw/mwphysics/physicssystem.cpp b/apps/openmw/mwphysics/physicssystem.cpp index 174560e6b..6efab6f32 100644 --- a/apps/openmw/mwphysics/physicssystem.cpp +++ b/apps/openmw/mwphysics/physicssystem.cpp @@ -794,6 +794,28 @@ namespace MWPhysics return true; } + /* + Start of tes3mp addition + + Make it possible to set the physics framerate from elsewhere + */ + void PhysicsSystem::setPhysicsFramerate(float physFramerate) + { + if (physFramerate > 0 && physFramerate < 100) + { + mPhysicsDt = 1.f / physFramerate; + std::cerr << "Warning: physics framerate was overridden (a new value is " << physFramerate << ")." << std::endl; + } + else + { + std::cerr << "Warning: attempted to override physics framerate with new value of " << physFramerate << + ", but it was outside accepted values." << std::endl; + } + } + /* + End of tes3mp addition + */ + class DeepestNotMeContactTestResultCallback : public btCollisionWorld::ContactResultCallback { const btCollisionObject* mMe; diff --git a/apps/openmw/mwphysics/physicssystem.hpp b/apps/openmw/mwphysics/physicssystem.hpp index 3ef9990f5..b458f936e 100644 --- a/apps/openmw/mwphysics/physicssystem.hpp +++ b/apps/openmw/mwphysics/physicssystem.hpp @@ -170,6 +170,16 @@ namespace MWPhysics bool isOnSolidGround (const MWWorld::Ptr& actor) const; + /* + Start of tes3mp addition + + Make it possible to set the physics framerate from elsewhere + */ + void setPhysicsFramerate(float physFramerate); + /* + End of tes3mp addition + */ + private: void updateWater(); diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 93b6f03c3..0a3dba047 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1522,6 +1522,19 @@ namespace MWWorld End of tes3mp addition */ + /* + Start of tes3mp addition + + Make it possible to set the physics framerate from elsewhere + */ + void World::setPhysicsFramerate(float physFramerate) + { + mPhysics->setPhysicsFramerate(physFramerate); + } + /* + End of tes3mp addition + */ + void World::doPhysics(float duration) { mPhysics->stepSimulation(duration); diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index de3e20c7e..153c41c47 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -417,6 +417,16 @@ namespace MWWorld End of tes3mp addition */ + /* + Start of tes3mp addition + + Make it possible to set the physics framerate from elsewhere + */ + void World::setPhysicsFramerate(float physFramerate); + /* + End of tes3mp addition + */ + bool castRay (float x1, float y1, float z1, float x2, float y2, float z2) override; ///< cast a Ray and return true if there is an object in the ray path. diff --git a/components/openmw-mp/Base/BasePlayer.hpp b/components/openmw-mp/Base/BasePlayer.hpp index 1a024c6a9..04aafb4d4 100644 --- a/components/openmw-mp/Base/BasePlayer.hpp +++ b/components/openmw-mp/Base/BasePlayer.hpp @@ -253,6 +253,7 @@ namespace mwmp CurrentContainer currentContainer; int difficulty; + float physicsFramerate; bool consoleAllowed; bool bedRestAllowed; bool wildernessRestAllowed; diff --git a/components/openmw-mp/Packets/Player/PacketGameSettings.cpp b/components/openmw-mp/Packets/Player/PacketGameSettings.cpp index c02527e8d..24c275e71 100644 --- a/components/openmw-mp/Packets/Player/PacketGameSettings.cpp +++ b/components/openmw-mp/Packets/Player/PacketGameSettings.cpp @@ -14,6 +14,7 @@ void PacketGameSettings::Packet(RakNet::BitStream *bs, bool send) PlayerPacket::Packet(bs, send); RW(player->difficulty, send); + RW(player->physicsFramerate, send); RW(player->consoleAllowed, send); RW(player->bedRestAllowed, send); RW(player->wildernessRestAllowed, send); From 99360e132f9c73b30eed8d176ddc6bb630dce5a0 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 18 Feb 2018 16:01:50 +0300 Subject: [PATCH 14/38] Only display "new journal entry" message in dialogue if there *is* a new entry --- apps/openmw/mwdialogue/journalimp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwdialogue/journalimp.cpp b/apps/openmw/mwdialogue/journalimp.cpp index b56db1ebd..b21951618 100644 --- a/apps/openmw/mwdialogue/journalimp.cpp +++ b/apps/openmw/mwdialogue/journalimp.cpp @@ -83,8 +83,10 @@ namespace MWDialogue if (i->mTopic == id && i->mInfoId == infoId) { if (getJournalIndex(id) < index) + { setJournalIndex(id, index); - MWBase::Environment::get().getWindowManager()->messageBox ("#{sJournalEntry}"); + MWBase::Environment::get().getWindowManager()->messageBox ("#{sJournalEntry}"); + } return; } From a67373d1160c317a86812e8afefec6f763404a6b Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Mon, 19 Feb 2018 18:28:04 -0600 Subject: [PATCH 15/38] Fixing "Show Enchant Chance" checkbox setting melee info instead --- apps/launcher/advancedpage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index 779556df7..3ba378599 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -20,7 +20,7 @@ bool Launcher::AdvancedPage::loadSettings() loadSettingBool(followersAttackOnSightCheckBox, "followers attack on sight", "Game"); loadSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game"); loadSettingBool(showEffectDurationCheckBox, "show effect duration", "Game"); - loadSettingBool(showMeleeInfoCheckBox, "show enchant chance", "Game"); + loadSettingBool(showEnchantChanceCheckBox, "show enchant chance", "Game"); loadSettingBool(showMeleeInfoCheckBox, "show melee info", "Game"); loadSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game"); @@ -56,7 +56,7 @@ void Launcher::AdvancedPage::saveSettings() saveSettingBool(followersAttackOnSightCheckBox, "followers attack on sight", "Game"); saveSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game"); saveSettingBool(showEffectDurationCheckBox, "show effect duration", "Game"); - saveSettingBool(showMeleeInfoCheckBox, "show enchant chance", "Game"); + saveSettingBool(showEnchantChanceCheckBox, "show enchant chance", "Game"); saveSettingBool(showMeleeInfoCheckBox, "show melee info", "Game"); saveSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game"); From ea028a20769f27882677b2f680c776e47db59210 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Thu, 22 Feb 2018 18:50:07 +0000 Subject: [PATCH 16/38] Improve settings documentation --- .../source/reference/modding/settings/GUI.rst | 20 +++++------------ .../source/reference/modding/settings/HUD.rst | 5 +++-- .../reference/modding/settings/camera.rst | 11 ++++------ .../reference/modding/settings/cells.rst | 7 +++--- .../reference/modding/settings/game.rst | 22 +++++++++++-------- .../reference/modding/settings/input.rst | 2 +- .../source/reference/modding/settings/map.rst | 7 ++---- .../reference/modding/settings/saves.rst | 7 ++---- .../reference/modding/settings/shaders.rst | 13 ++++++----- .../reference/modding/settings/sound.rst | 21 +++++++----------- .../reference/modding/settings/terrain.rst | 8 ++++--- .../reference/modding/settings/video.rst | 13 +++++------ .../reference/modding/settings/windows.rst | 5 +---- 13 files changed, 63 insertions(+), 78 deletions(-) diff --git a/docs/source/reference/modding/settings/GUI.rst b/docs/source/reference/modding/settings/GUI.rst index ad3514ffa..3040fc48b 100644 --- a/docs/source/reference/modding/settings/GUI.rst +++ b/docs/source/reference/modding/settings/GUI.rst @@ -9,11 +9,7 @@ scaling factor :Default: 1.0 This setting scales the GUI interface windows. -The value must be greater than 0.0. A value of 1.0 results in the normal scale. -Values much larger than 2.0 may result in user interface components being inaccessible. -Until a gamepad interface is created, -increasing this setting is helpful for simulating the larger interface used in console games. - +A value of 1.0 results in the normal scale. Larger values are useful to increase the scale of the GUI for high resolution displays. This setting can only be configured by editing the settings configuration file. menu transparency @@ -24,7 +20,6 @@ menu transparency :Default: 0.84 This setting controls the transparency of the GUI windows. -The value should be between 0.0 (transparent) and 1.0 (opaque). This setting can be adjusted in game with the Menu Transparency slider in the Prefs panel of the Options menu. tooltip delay @@ -36,7 +31,6 @@ tooltip delay This value determines the number of seconds between when you begin hovering over an item and when its tooltip appears. This setting only affects the tooltip delay for objects under the crosshair in GUI mode windows. -There does not appear to be a setting to control the tool tip delay in outside of GUI mode. The tooltip displays context sensitive information on the selected GUI element, such as weight, value, damage, armor rating, magical effects, and detailed description. @@ -82,7 +76,7 @@ This setting enables or disables the "red flash" overlay that provides a visual If this setting is disabled, the player will "bleed" like NPCs do. -The default value is true. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. werewolf overlay ---------------- @@ -91,16 +85,16 @@ werewolf overlay :Range: True/False :Default: True -Enable or disable the werewolf overlay. +Enable or disable the werewolf visual effect in first-person mode. -The default value is true. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. color background owned ---------------------- :Type: RGBA floating point :Range: 0.0 to 1.0 -:Default: 0.15 0.0 0.0 1.0 +:Default: 0.15 0.0 0.0 1.0 (dark red) The following two settings determine the background color of the tool tip and the crosshair when hovering over an item owned by an NPC. @@ -108,7 +102,6 @@ The color definitions are composed of four floating point values between 0.0 and representing the red, green, blue and alpha channels. The alpha value is currently ignored. The crosshair color will have no effect if the crosshair setting in the HUD section is disabled. -The default value is "0.15 0.0 0.0 1.0", which is a dark red color. This setting can only be configured by editing the settings configuration file. This setting has no effect if the show owned setting in the Game Settings Section is false. @@ -117,13 +110,12 @@ color crosshair owned :Type: RGBA floating point :Range: 0.0 to 1.0 -:Default: 1.0 0.15 0.15 1.0 +:Default: 1.0 0.15 0.15 1.0 (bright red) This setting sets the color of the crosshair when hovering over an item owned by an NPC. The value is composed of four floating point values representing the red, green, blue and alpha channels. The alpha value is currently ignored. -The default value is "1.0 0.15 0.15 1.0" which is a bright red color. This setting can only be configured by editing the settings configuration file. This setting has no effect if the crosshair setting in the HUD Settings Section is false. This setting has no effect if the show owned setting in the Game Settings Section is false. diff --git a/docs/source/reference/modding/settings/HUD.rst b/docs/source/reference/modding/settings/HUD.rst index 920c4460e..83811420f 100644 --- a/docs/source/reference/modding/settings/HUD.rst +++ b/docs/source/reference/modding/settings/HUD.rst @@ -8,9 +8,10 @@ crosshair :Range: True/False :Default: True -This setting determines whether the crosshair or reticle is displayed. +This setting determines whether the crosshair or reticle is displayed. Enabling the crosshair provides more immediate feedback about which object is currently the focus of actions. Some players perceive that disabling the crosshair provides a more immersive experience. Another common use is to disable the crosshair for screen shots. -Enabling the crosshair provides more immediate feedback about which object is currently the focus of actions. + +As an alternative to this setting, the complete GUI, including the crosshair, may be toggled at runtime with the F11 key. This setting can be toggled with the Crosshair button in the Prefs panel of the Options menu. diff --git a/docs/source/reference/modding/settings/camera.rst b/docs/source/reference/modding/settings/camera.rst index 222391fa8..aed68658f 100644 --- a/docs/source/reference/modding/settings/camera.rst +++ b/docs/source/reference/modding/settings/camera.rst @@ -13,8 +13,7 @@ Values greater than approximately 18.0 will occasionally clip objects in the wor Values greater than approximately 8.0 will clip the character's hands in first person view and/or the back of their head in third person view. -The default value is 1.0. This setting can only be configured by editing the settings configuration file. -The value must be greater than 0.0, but it's unclear if the engine enforces this limitation. +This setting can only be configured by editing the settings configuration file. small feature culling --------------------- @@ -28,7 +27,7 @@ It generally improves performance to enable this feature, and by definition the culled objects will be very small on screen. The size in pixels for an object to be considered 'small' is controlled by a separate setting. -The default value is true. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. small feature culling pixel size -------------------------------- @@ -88,7 +87,6 @@ Enabling the distant terrain setting is an alternative to increasing exterior ce Note that the distant land setting does not include rendering of distant static objects, so the resulting visual effect is not the same. -The default value is 6666.0. This setting can be adjusted in game from the ridiculously low value of 2000.0 to a maximum of 6666.0 using the View Distance slider in the Detail tab of the Video panel of the Options menu. @@ -105,8 +103,7 @@ while large values cause distortion at the edges of the screen. The "field of view" setting interacts with aspect ratio of your video resolution in that more square aspect ratios (e.g. 4:3) need a wider field of view to more resemble the same field of view on a widescreen (e.g. 16:9) monitor. -The default value is 55.0. This setting can be changed in game using the Field of View slider -from the Video tab of the Video panel of the Options menu. +This setting can be changed in game using the Field of View slider from the Video tab of the Video panel of the Options menu. first person field of view -------------------------- @@ -120,4 +117,4 @@ It is not recommended to change this value from its default value because the Bethesda provided Morrowind assets do not adapt well to large values, while small values can result in the hands not being visible. -The default value is 55.0. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. diff --git a/docs/source/reference/modding/settings/cells.rst b/docs/source/reference/modding/settings/cells.rst index aa5d43231..171ddb7c8 100644 --- a/docs/source/reference/modding/settings/cells.rst +++ b/docs/source/reference/modding/settings/cells.rst @@ -9,8 +9,9 @@ exterior cell load distance :Default: 1 This setting determines the number of exterior cells adjacent to the character that will be loaded for rendering. -Values greater than 1 may significantly affect loading times when exiting interior spaces -or loading additional exterior cells. Caution is advised when increasing this setting. + +.. Warning:: + Values greater than 1 will significantly affect the frame rate and loading times. This setting is mainly intended for making screenshots of scenic vistas and not for real-time gameplay. Loading more cells can break certain scripts or quests in the game that expect cells to not be loaded until the player is there. These limitations will be addressed in a future version with a separate technique for rendering distant cells. This setting interacts with viewing distance and field of view settings. @@ -193,4 +194,4 @@ pointers cache size :Range: >0 :Default: 40 -The count of object pointers, that will be saved for a faster search by object ID. +The count of object pointers that will be saved for a faster search by object ID. This is a temporary setting that can be used to mitigate scripting performance issues with certain game files. If your profiler (press F3 twice) displays a large overhead for the Scripting section, try increasing this setting. diff --git a/docs/source/reference/modding/settings/game.rst b/docs/source/reference/modding/settings/game.rst index e1d5d75f6..45ac81d64 100644 --- a/docs/source/reference/modding/settings/game.rst +++ b/docs/source/reference/modding/settings/game.rst @@ -16,7 +16,7 @@ If the setting is 2, the crosshair is the color of the color crosshair owned set If the setting is 3, both the tool tip background and the crosshair are colored. The crosshair is not visible if crosshair is false. -The default value is 0 (no clues). This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. show projectile damage ---------------------- @@ -25,9 +25,9 @@ show projectile damage :Range: True/False :Default: False -If this setting is true, damage bonus of arrows and bolts will be showed on item tooltip. +If this setting is true, the damage bonus of arrows and bolts will show on their tooltip. -The default value is false. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. show melee info --------------- @@ -36,9 +36,9 @@ show melee info :Range: True/False :Default: False -If this setting is true, melee weapons reach and speed will be showed on item tooltip. +If this setting is true, the reach and speed of melee weapons will show on their tooltip. -The default value is false. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. show enchant chance ------------------- @@ -49,7 +49,7 @@ show enchant chance Whether or not the chance of success will be displayed in the enchanting menu. -The default value is false. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. best attack ----------- @@ -62,7 +62,6 @@ If this setting is true, the player character will always use the most powerful (chop, slash or thrust). If this setting is false, the type of attack is determined by the direction that the character is moving at the time the attack begins. -The default value is false. This setting can be toggled with the Always Use Best Attack button in the Prefs panel of the Options menu. can loot during death animation @@ -79,7 +78,7 @@ This is how original Morrowind behaves. If this setting is false, player has to wait until end of death animation in all cases. This case is more safe, but makes using of summoned creatures exploit (looting summoned Dremoras and Golden Saints for expensive weapons) a lot harder. -The default value is true. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. difficulty ---------- @@ -107,7 +106,7 @@ show effect duration Show the remaining duration of magic effects and lights if this setting is true. The remaining duration is displayed in the tooltip by hovering over the magical effect. -The default value is false. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. prevent merchant equipping -------------------------- @@ -118,6 +117,8 @@ prevent merchant equipping Prevents merchants from equipping items that are sold to them. +This setting can only be configured by editing the settings configuration file. + followers attack on sight ------------------------- @@ -127,3 +128,6 @@ followers attack on sight Makes player followers and escorters start combat with enemies who have started combat with them or the player. Otherwise they wait for the enemies or the player to do an attack first. +Please note this setting has not been extensively tested and could have side effects with certain quests. + +This setting can only be configured by editing the settings configuration file. diff --git a/docs/source/reference/modding/settings/input.rst b/docs/source/reference/modding/settings/input.rst index 042dba119..36c8fa41a 100644 --- a/docs/source/reference/modding/settings/input.rst +++ b/docs/source/reference/modding/settings/input.rst @@ -75,7 +75,7 @@ camera sensitivity This setting controls the overall camera/mouse sensitivity when not in GUI mode. The default sensitivity is 1.0, with smaller values requiring more mouse movement, -and larger values requiring less. This setting is multiplicative in magnitude. +and larger values requiring less. This setting does not affect mouse speed in GUI mode, which is instead controlled by your operating system mouse speed setting. diff --git a/docs/source/reference/modding/settings/map.rst b/docs/source/reference/modding/settings/map.rst index e2dc71824..c973c26e5 100644 --- a/docs/source/reference/modding/settings/map.rst +++ b/docs/source/reference/modding/settings/map.rst @@ -8,9 +8,7 @@ global :Range: True/False :Default: False -If this setting is true, a world map on a map window will be displayed, otherwise a local map will be displayed. - -This setting can be toggled with the local/world map switch button on the map window. +If this value is true, the map window will display the world map, otherwise the local map. The setting updates automatically when pressing the local/world map switch button on the map window. global map cell size -------------------- @@ -112,5 +110,4 @@ local map cell distance :Range: >= 1 :Default: 1 -Similar to "[Cells] exterior cell load distance", controls how many cells are rendered on the local map. -Values higher than the default may result in longer loading times. \ No newline at end of file +Similar to "exterior cell load distance" in the Cells section, controls how many cells are rendered on the local map. Values higher than the default may result in longer loading times. Please note that only loaded cells can be rendered, so this setting must be lower or equal to "exterior cell load distance" to work properly. diff --git a/docs/source/reference/modding/settings/saves.rst b/docs/source/reference/modding/settings/saves.rst index 90bd56ca5..777404ebf 100644 --- a/docs/source/reference/modding/settings/saves.rst +++ b/docs/source/reference/modding/settings/saves.rst @@ -8,10 +8,7 @@ character :Range: :Default: "" -This setting contains the default character name for loading saved games. - -The default value is the empty string, which results in no character being selected by default. -This setting is automatically updated from the Load menu when a different character is selected. +This contains the default character for the Load Game menu and is automatically updated when a different character is selected. autosave -------- @@ -32,6 +29,6 @@ timeplayed :Default: False This setting determines whether the amount of the time the player has spent playing will be displayed -for each saved game in the Load menu. +for each saved game in the Load menu. Currently, the counter includes time spent in menus, including the pause menu, but does not include time spent with the game window minimized. This setting can only be configured by editing the settings configuration file. diff --git a/docs/source/reference/modding/settings/shaders.rst b/docs/source/reference/modding/settings/shaders.rst index 3794c7d9a..17d092917 100644 --- a/docs/source/reference/modding/settings/shaders.rst +++ b/docs/source/reference/modding/settings/shaders.rst @@ -12,6 +12,8 @@ Force rendering with shaders. By default, only bump-mapped objects will use shad Enabling this option may cause slightly different visuals if the "clamp lighting" option is set to false. Otherwise, there should not be a visual difference. +Please note enabling shaders has a significant performance impact on most systems. + force per pixel lighting ------------------------ @@ -21,7 +23,7 @@ force per pixel lighting Force the use of per pixel lighting. By default, only bump mapped objects use per-pixel lighting. Has no effect if the 'force shaders' option is false. -Enabling per-pixel lighting can result in visual differences to the original MW engine. +Enabling per-pixel lighting results in visual differences to the original MW engine. It is not recommended to enable this option when using vanilla Morrowind files, because certain lights in Morrowind rely on vertex lighting to look as intended. @@ -34,9 +36,10 @@ clamp lighting Restrict the amount of lighting that an object can receive to a maximum of (1,1,1). Only affects objects that render with shaders (see 'force shaders' option). -Always affects terrain. Setting this option to 'true' results in fixed-function compatible lighting, -but the lighting may appear 'dull' and there might be color shifts. -Setting this option to 'false' results in more realistic lighting. +Always affects terrain. + +Leaving this option at its default makes the lighting compatible with Morrowind's fixed-function method, +but the lighting may appear dull and there might be color shifts. Setting this option to 'false' results in more dynamic lighting. auto use object normal maps --------------------------- @@ -119,4 +122,4 @@ terrain specular map pattern :Range: :Default: _diffusespec -The filename pattern to probe for when detecting terrain specular maps (see 'auto use terrain specular maps') \ No newline at end of file +The filename pattern to probe for when detecting terrain specular maps (see 'auto use terrain specular maps') diff --git a/docs/source/reference/modding/settings/sound.rst b/docs/source/reference/modding/settings/sound.rst index 33185ed66..b9587a5c4 100644 --- a/docs/source/reference/modding/settings/sound.rst +++ b/docs/source/reference/modding/settings/sound.rst @@ -13,67 +13,62 @@ which should usually be sufficient, but if you need to explicitly specify a devi The names of detected devices can be found in the openmw.log file in your configuration directory. -The default value is the empty string. This setting can only be configured by editing the settings configuration file. +This setting can only be configured by editing the settings configuration file. master volume ------------- :Type: floating point -:Range: 0.0 to 1.0 +:Range: 0.0 (silent) to 1.0 (maximum volume) :Default: 1.0 This setting controls the overall volume. -The master volume is multiplied with all other volume settings to determine the final volume. +The master volume is multiplied with specific volume settings to determine the final volume. -The default value is 1.0. Valid values range from 0.0 (silent) to 1.0 (maximum volume). This setting can be changed in game using the Master slider from the Audio panel of the Options menu. footsteps volume ---------------- :Type: floating point -:Range: 0.0 to 1.0 +:Range: 0.0 (silent) to 1.0 (maximum volume) :Default: 0.2 This setting controls the volume of footsteps from the character and other actors. -Valid values range from 0.0 (silent) to 1.0 (maximum volume). This setting can be changed in game using the Footsteps slider from the Audio panel of the Options menu. music volume ------------ :Type: floating point -:Range: 0.0 to 1.0 +:Range: 0.0 (silent) to 1.0 (maximum volume) :Default: 0.5 This setting controls the volume for music tracks. -The default value is 0.5. Valid values range from 0.0 (silent) to 1.0 (maximum volume). This setting can be changed in game using the Music slider from the Audio panel of the Options menu. sfx volume ---------- :Type: floating point -:Range: 0.0 to 1.0 +:Range: 0.0 (silent) to 1.0 (maximum volume) :Default: 1.0 This setting controls the volume for special sound effects such as combat noises. -Valid values range from 0.0 (silent) to 1.0 (maximum volume). This setting can be changed in game using the Effects slider from the Audio panel of the Options menu. voice volume ------------ :Type: floating point -:Range: 0.0 to 1.0 +:Range: 0.0 (silent) to 1.0 (maximum volume) :Default: 0.8 This setting controls the volume for spoken dialog from NPCs. -Valid values range from 0.0 (silent) to 1.0 (maximum volume). This setting can be changed in game using the Voice slider from the Audio panel of the Options menu. buffer cache min @@ -129,5 +124,5 @@ This setting specifies which HRTF profile to use when HRTF is enabled. Blank mea This setting has no effect if HRTF is not enabled based on the hrtf enable setting. Allowed values for this field are enumerated in openmw.log file is an HRTF enabled ausio system is installed. -The default value is the empty string, which uses the default profile. +The default value is empty, which uses the default profile. This setting can only be configured by editing the settings configuration file. diff --git a/docs/source/reference/modding/settings/terrain.rst b/docs/source/reference/modding/settings/terrain.rst index 6bb87629a..7f641888a 100644 --- a/docs/source/reference/modding/settings/terrain.rst +++ b/docs/source/reference/modding/settings/terrain.rst @@ -8,9 +8,11 @@ distant terrain :Range: True/False :Default: False -Controls whether the engine will use paging and LOD algorithms to render the terrain of the entire world at all times. -Otherwise, only the terrain of the loaded cells is displayed. -This setting is best used together with the 'viewing distance' setting in the camera section. +Controls whether the engine will use paging and LOD algorithms to load the terrain of the entire world at all times. +Otherwise, only the terrain of the surrounding cells is loaded. + +.. note:: + When enabling distant terrain, make sure the 'viewing distance' in the camera section is set to a larger value so that you can actually see the additional terrain. To avoid frame drops as the player moves around, nearby terrain pages are always preloaded in the background, regardless of the preloading settings in the 'Cells' section, diff --git a/docs/source/reference/modding/settings/video.rst b/docs/source/reference/modding/settings/video.rst index 3581d7226..3eb7c5128 100644 --- a/docs/source/reference/modding/settings/video.rst +++ b/docs/source/reference/modding/settings/video.rst @@ -10,7 +10,7 @@ resolution x This setting determines the horizontal resolution of the OpenMW game window. Larger values produce more detailed images within the constraints of your graphics hardware, -but also significantly reduce the frame rate. +but may reduce the frame rate. The window resolution can be selected from a menu of common screen sizes in the Video tab of the Video Panel of the Options menu, or in the Graphics tab of the OpenMW Launcher. @@ -25,7 +25,7 @@ resolution y This setting determines the vertical resolution of the OpenMW game window. Larger values produce more detailed images within the constraints of your graphics hardware, -but also significantly reduce the frame rate. +but may reduce the frame rate. The window resolution can be selected from a menu of common screen sizes in the Video tab of the Video Panel of the Options menu, or in the Graphics tab of the OpenMW Launcher. @@ -128,9 +128,9 @@ vsync This setting determines whether frame draws are synchronized with the vertical refresh rate of your monitor. Enabling this setting can reduce screen tearing, a visual defect caused by updating the image buffer in the middle of a screen draw. -Enabling this option typically implies limiting the framerate to 60 frames per second, +Enabling this option typically implies limiting the framerate to the refresh rate of your monitor, but may also introduce additional delays caused by having to wait until the appropriate time -(the vertical blanking interval) to draw a frame. +(the vertical blanking interval) to draw a frame, and a loss in mouse responsiveness known as 'input lag'. This setting can be adjusted in game using the VSync button in the Video tab of the Video panel in the Options menu. It can also be changed by toggling the Vertical Sync check box in the Graphics tab of the OpenMW Launcher. @@ -170,8 +170,7 @@ contrast This setting controls the contrast correction for all video in the game. -This setting can only be configured by editing the settings configuration file. -This setting does not currently work under Linux. +This setting can only be configured by editing the settings configuration file. It has been reported to not work on some Linux systems. gamma ----- @@ -184,4 +183,4 @@ This setting controls the gamma correction for all video in the game. Gamma is an exponent that makes colors brighter if greater than 1.0 and darker if less than 1.0. This setting can be changed in the Detail tab of the Video panel of the Options menu. -This setting does not currently work under Linux, and the in-game setting in the Options menu has been disabled. +It has been reported to not work on some Linux systems, and therefore the in-game setting in the Options menu has been disabled on Linux systems. diff --git a/docs/source/reference/modding/settings/windows.rst b/docs/source/reference/modding/settings/windows.rst index 170f68381..28f09f085 100644 --- a/docs/source/reference/modding/settings/windows.rst +++ b/docs/source/reference/modding/settings/windows.rst @@ -25,7 +25,7 @@ Hand editing the configuration file might result in some fine tuning for alignme but the settings will be overwritten if a window is moved. .. note:: - To scale the windows, making the widgets proportionally larger, see the scaling factor setting instead. + To scale the windows, making the widgets proportionally larger, see the scaling factor setting in the GUI section instead. :Type: boolean :Range: True/False @@ -40,9 +40,6 @@ For example, to pin only the map window, the actual settings will be:: The pinnable window can be pinned/unpinned by clicking on a button in the right upper corner of the window. -.. note:: - A world/local map switch button on the map window will be shown only in GUI mode. - stats ----- From 534f3ef0947adf73c334d885f7360d8cead95e69 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sat, 24 Feb 2018 12:23:44 +0300 Subject: [PATCH 17/38] Bring UI dimensions and positions more in line with Morrowind UI --- files/settings-default.cfg | 92 +++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 8a28c42e4..cab2e357e 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -388,34 +388,34 @@ refraction scale = 1.0 # screen size. (0.0 to 1.0). X & Y, Width & Height. # Stats window displaying level, race, class, skills and stats. -stats x = 0.0 -stats y = 0.0 -stats w = 0.375 -stats h = 0.4275 +stats x = 0.015 +stats y = 0.015 +stats w = 0.4275 +stats h = 0.45 # Stats window pin status stats pin = false # Spells window displaying powers, spells, and magical items. -spells x = 0.625 -spells y = 0.5725 -spells w = 0.375 -spells h = 0.4275 +spells x = 0.63 +spells y = 0.39 +spells w = 0.36 +spells h = 0.51 # Spells window pin status spells pin = false # Local and world map window. -map x = 0.625 -map y = 0.0 -map w = 0.375 -map h = 0.5725 +map x = 0.63 +map y = 0.015 +map w = 0.36 +map h = 0.37 # Map window pin status map pin = false # Dialog window for talking with NPCs. -dialogue x = 0.095 -dialogue y = 0.095 -dialogue w = 0.810 -dialogue h = 0.810 +dialogue x = 0.15 +dialogue y = 0.5 +dialogue w = 0.7 +dialogue h = 0.45 # Alchemy window for crafting potions. alchemy x = 0.25 @@ -424,51 +424,51 @@ alchemy w = 0.5 alchemy h = 0.5 # Console command window for debugging commands. -console x = 0.0 -console y = 0.0 +console x = 0.015 +console y = 0.015 console w = 1.0 console h = 0.5 # Player inventory window when explicitly opened. -inventory x = 0.0 -inventory y = 0.4275 -inventory w = 0.6225 -inventory h = 0.5725 +inventory x = 0.015 +inventory y = 0.54 +inventory w = 0.45 +inventory h = 0.38 # Inventory window pin status inventory pin = false # Player inventory window when searching a container. -inventory container x = 0.0 -inventory container y = 0.4275 -inventory container w = 0.6225 -inventory container h = 0.5725 +inventory container x = 0.015 +inventory container y = 0.54 +inventory container w = 0.45 +inventory container h = 0.38 # Player inventory window when bartering with a shopkeeper. -inventory barter x = 0.0 -inventory barter y = 0.4275 -inventory barter w = 0.6225 -inventory barter h = 0.5725 +inventory barter x = 0.015 +inventory barter y = 0.54 +inventory barter w = 0.45 +inventory barter h = 0.38 # Player inventory window when trading with a companion. -inventory companion x = 0.0 -inventory companion y = 0.4275 -inventory companion w = 0.6225 -inventory companion h = 0.5725 +inventory companion x = 0.015 +inventory companion y = 0.54 +inventory companion w = 0.45 +inventory companion h = 0.38 # Container inventory when searching a container. -container x = 0.25 -container y = 0.0 -container w = 0.75 -container h = 0.375 +container x = 0.49 +container y = 0.54 +container w = 0.39 +container h = 0.38 # NPC inventory window when bartering with a shopkeeper. -barter x = 0.25 -barter y = 0.0 -barter w = 0.75 -barter h = 0.375 +barter x = 0.6 +barter y = 0.27 +barter w = 0.38 +barter h = 0.63 # NPC inventory window when trading with a companion. -companion x = 0.25 -companion y = 0.0 -companion w = 0.75 -companion h = 0.375 +companion x = 0.6 +companion y = 0.27 +companion w = 0.38 +companion h = 0.63 From 46377fa3482962932dda2f01cc646dbdcd33aec5 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sat, 24 Feb 2018 12:25:11 +0300 Subject: [PATCH 18/38] Update [Windows] documentation --- .../reference/modding/settings/windows.rst | 91 +++++++++---------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/docs/source/reference/modding/settings/windows.rst b/docs/source/reference/modding/settings/windows.rst index 170f68381..4f3bd241c 100644 --- a/docs/source/reference/modding/settings/windows.rst +++ b/docs/source/reference/modding/settings/windows.rst @@ -47,11 +47,11 @@ stats ----- :Default: - x = 0.0 + x = 0.015 - y = 0.0 + y = 0.015 - h = 0.375 + h = 0.45 w = 0.4275 @@ -64,13 +64,13 @@ spells ------ :Default: - x = 0.625 + x = 0.63 - y = 0.5725 + y = 0.39 - h = 0.375 + h = 0.36 - w = 0.4275 + w = 0.51 pin = false @@ -81,13 +81,13 @@ map --- :Default: - x = 0.625 + x = 0.63 - y = 0.0 + y = 0.015 - h = 0.375 + h = 0.36 - w = 0.5725 + w = 0.37 pin = false @@ -98,13 +98,13 @@ inventory --------- :Default: - x = 0.0 + x = 0.015 - y = 0.4275 + y = 0.54 - h = 0.6225 + h = 0.45 - w = 0.5725 + w = 0.38 pin = false @@ -115,14 +115,13 @@ inventory container ------------------- :Default: - x = 0.0 - - y = 0.4275 + x = 0.015 - h = 0.6225 + y = 0.54 - w = 0.5725 + h = 0.45 + w = 0.38 The player's inventory window while searching a container, showing the contents of the character's inventory. Activated by clicking on a container. The same window is used for searching dead bodies, and pickpocketing people. @@ -131,13 +130,13 @@ inventory barter ---------------- :Default: - x = 0.0 + x = 0.015 - y = 0.4275 + y = 0.54 - h = 0.6225 + h = 0.45 - w = 0.5725 + w = 0.38 The player's inventory window while bartering. It displays goods owned by the character while bartering. Activated by clicking on the Barter choice in the dialog window for an NPC. @@ -146,13 +145,13 @@ inventory companion ------------------- :Default: - x = 0.0 + x = 0.015 - y = 0.4275 + y = 0.54 - h = 0.6225 + h = 0.45 - w = 0.5725 + w = 0.38 The player's inventory window while interacting with a companion. The companion windows were added in the Tribunal expansion, but are available everywhere in the OpenMW engine. @@ -161,13 +160,13 @@ container --------- :Default: - x = 0.25 + x = 0.49 - y = 0.0 + y = 0.54 - h = 0.75 + h = 0.39 - w = 0.375 + w = 0.38 The container window, showing the contents of the container. Activated by clicking on a container. The same window is used for searching dead bodies, and pickpocketing people. @@ -176,13 +175,13 @@ barter ------ :Default: - x = 0.25 + x = 0.6 - y = 0.0 + y = 0.27 - h = 0.75 + h = 0.38 - w = 0.375 + w = 0.63 The NPC bartering window, displaying goods owned by the shopkeeper while bartering. Activated by clicking on the Barter choice in the dialog window for an NPC. @@ -191,13 +190,13 @@ companion --------- :Default: - x = 0.25 + x = 0.6 - y = 0.0 + y = 0.27 - h = 0.75 + h = 0.38 - w = 0.375 + w = 0.63 The NPC's inventory window while interacting with a companion. The companion windows were added in the Tribunal expansion, but are available everywhere in the OpenMW engine. @@ -206,13 +205,13 @@ dialogue -------- :Default: - x = 0.095 + x = 0.15 - y = 0.095 + y = 0.5 - h = 0.810 + h = 0.7 - w = 0.810 + w = 0.45 The dialog window, for talking with NPCs. Activated by clicking on a NPC. @@ -237,9 +236,9 @@ console ------- :Default: - x = 0.0 + x = 0.015 - y = 0.0 + y = 0.015 h = 1.0 From 089666dd686a70495a0e5be4f2c082ac99763ac5 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sat, 24 Feb 2018 15:13:14 +0300 Subject: [PATCH 19/38] Round up displayed encumbrance --- apps/openmw/mwgui/companionwindow.cpp | 4 +++- apps/openmw/mwgui/inventorywindow.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwgui/companionwindow.cpp b/apps/openmw/mwgui/companionwindow.cpp index ad71be7df..c6ef2890d 100644 --- a/apps/openmw/mwgui/companionwindow.cpp +++ b/apps/openmw/mwgui/companionwindow.cpp @@ -1,5 +1,7 @@ #include "companionwindow.hpp" +#include + #include #include "../mwbase/environment.hpp" @@ -129,7 +131,7 @@ void CompanionWindow::updateEncumbranceBar() return; float capacity = mPtr.getClass().getCapacity(mPtr); float encumbrance = mPtr.getClass().getEncumbrance(mPtr); - mEncumbranceBar->setValue(static_cast(encumbrance), static_cast(capacity)); + mEncumbranceBar->setValue(std::ceil(encumbrance), static_cast(capacity)); if (mModel && mModel->hasProfit(mPtr)) { diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index aacc1314b..7bf8ad025 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -1,5 +1,6 @@ #include "inventorywindow.hpp" +#include #include #include @@ -598,7 +599,7 @@ namespace MWGui float capacity = player.getClass().getCapacity(player); float encumbrance = player.getClass().getEncumbrance(player); mTradeModel->adjustEncumbrance(encumbrance); - mEncumbranceBar->setValue(static_cast(encumbrance), static_cast(capacity)); + mEncumbranceBar->setValue(std::ceil(encumbrance), static_cast(capacity)); } void InventoryWindow::onFrame(float dt) From 03266d7648bd6545cc1503eba5f393cdbc87f922 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 25 Feb 2018 21:33:04 +0200 Subject: [PATCH 20/38] [Client] Prevent guards from arresting players who are currently jailed --- apps/openmw/mwgui/jailscreen.cpp | 24 +++++++++++++++++------- apps/openmw/mwmechanics/aipursue.cpp | 5 ++++- apps/openmw/mwmp/LocalPlayer.cpp | 2 +- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/apps/openmw/mwgui/jailscreen.cpp b/apps/openmw/mwgui/jailscreen.cpp index 7267912ae..7b3d87a7c 100644 --- a/apps/openmw/mwgui/jailscreen.cpp +++ b/apps/openmw/mwgui/jailscreen.cpp @@ -112,6 +112,16 @@ namespace MWGui MWWorld::Ptr player = MWMechanics::getPlayer(); + /* + Start of tes3mp addition + + Declare pointer to LocalPlayer for use in other additions + */ + mwmp::LocalPlayer* localPlayer = mwmp::Main::get().getLocalPlayer(); + /* + End of tes3mp addition + */ + for (int i=0; irest(true); MWBase::Environment::get().getWorld()->advanceTime(mDays * 24); @@ -129,7 +139,7 @@ namespace MWGui Disable increases for Security and Sneak when using ignoreJailSkillIncreases */ - if (mwmp::Main::get().getLocalPlayer()->ignoreJailSkillIncreases) + if (localPlayer->ignoreJailSkillIncreases) value.setBase(std::max(0, value.getBase()-1)); else if (skill == ESM::Skill::Security || skill == ESM::Skill::Sneak) /* @@ -153,7 +163,7 @@ namespace MWGui If we've received a packet overriding the default jail end text, use the new text */ - if (!mwmp::Main::get().getLocalPlayer()->jailEndText.empty()) + if (!localPlayer->jailEndText.empty()) message = mwmp::Main::get().getLocalPlayer()->jailEndText; /* End of tes3mp addition @@ -176,7 +186,7 @@ namespace MWGui Account for usage of ignoreJailSkillIncreases */ - if (!mwmp::Main::get().getLocalPlayer()->ignoreJailSkillIncreases && + if (!localPlayer->ignoreJailSkillIncreases && (*it == ESM::Skill::Sneak || *it == ESM::Skill::Security)) /* End of tes3mp change (minor) @@ -195,10 +205,10 @@ namespace MWGui Reset all PlayerJail-related overrides */ - mwmp::Main::get().getLocalPlayer()->ignoreJailTeleportation = false; - mwmp::Main::get().getLocalPlayer()->ignoreJailSkillIncreases = false; - mwmp::Main::get().getLocalPlayer()->jailProgressText = ""; - mwmp::Main::get().getLocalPlayer()->jailEndText = ""; + localPlayer->ignoreJailTeleportation = false; + localPlayer->ignoreJailSkillIncreases = false; + localPlayer->jailProgressText = ""; + localPlayer->jailEndText = ""; /* End of tes3mp addition */ diff --git a/apps/openmw/mwmechanics/aipursue.cpp b/apps/openmw/mwmechanics/aipursue.cpp index c3aff89b8..ebe2d6f64 100644 --- a/apps/openmw/mwmechanics/aipursue.cpp +++ b/apps/openmw/mwmechanics/aipursue.cpp @@ -64,10 +64,13 @@ bool AiPursue::execute (const MWWorld::Ptr& actor, CharacterController& characte Because multiplayer does not pause the game, prevent infinite arrest loops by ignoring players already engaged in dialogue + + Additionally, do not arrest players who are currently jailed */ if (target == MWBase::Environment::get().getWorld()->getPlayerPtr()) { - if (MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Dialogue)) + if (MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Dialogue) || + MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Jail)) { return true; } diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index c3c69108f..d9d0fc665 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -69,9 +69,9 @@ LocalPlayer::LocalPlayer() scale = 1; isWerewolf = false; - diedSinceArrestAttempt = false; isReceivingQuickKeys = false; isPlayingAnimation = false; + diedSinceArrestAttempt = false; } LocalPlayer::~LocalPlayer() From 929fc68160a031e17d419af74ed6354bef895dd9 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Mon, 26 Feb 2018 23:21:51 +0300 Subject: [PATCH 21/38] Consider items with dead owner not stolen (fixes bug #4328) --- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index bd5fa1b11..cd3cd1f80 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -1118,8 +1118,11 @@ namespace MWMechanics Misc::StringUtils::lowerCaseInPlace(owner.first); if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId)) - mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count; - + { + const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(item.getCellRef().getOwner(), true); + if (!victimRef.getClass().getCreatureStats(victimRef).isDead()) + mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count; + } if (alarm) commitCrime(ptr, victim, OT_Theft, item.getClass().getValue(item) * count); } From 3393ad623fde05ce8957d556ae5430b436c6100a Mon Sep 17 00:00:00 2001 From: bret curtis Date: Tue, 27 Feb 2018 16:15:43 +0100 Subject: [PATCH 22/38] fix rtd --- docs/source/conf.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index b18b40c50..e3fe58bc7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -60,13 +60,29 @@ copyright = u'2017, OpenMW Team' # The short X.Y version. # The full version, including alpha/beta/rc tags. +def get_openmw_version(haystack): + needle = 'OPENMW_VERSION_MAJOR' + line_counter = 0 + for hay in haystack: + if needle in str(hay): + break + line_counter += 1 + + if line_counter == 0: + raise ImportError('Unable to find OpenMW Version') + + version = '.'.join([haystack[line_counter][1][1].contents, + haystack[line_counter+1][1][1].contents, + haystack[line_counter+2][1][1].contents]) + return version + + try: from parse_cmake import parsing cmake_raw = open(project_root+'/CMakeLists.txt', 'r').read() cmake_data = parsing.parse(cmake_raw) - release = version = '.'.join([cmake_data[24][1][1].contents, - cmake_data[25][1][1].contents, - cmake_data[26][1][1].contents]) + release = version = get_openmw_version(cmake_data) + except ImportError: release = "UNRELEASED" print("WARNING: Unable to import parse_cmake, version will be set to: {0}.".format(release)) From 81d90d7fb725007783a419eeaaf30dcac8a3c6fa Mon Sep 17 00:00:00 2001 From: bret curtis Date: Tue, 27 Feb 2018 18:57:37 +0100 Subject: [PATCH 23/38] break for all errors that would raise when checking for version, make them UNRELEASED --- docs/source/conf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index e3fe58bc7..0ba8567c0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -60,6 +60,9 @@ copyright = u'2017, OpenMW Team' # The short X.Y version. # The full version, including alpha/beta/rc tags. +release = version = "UNRELEASED" + + def get_openmw_version(haystack): needle = 'OPENMW_VERSION_MAJOR' line_counter = 0 @@ -68,9 +71,6 @@ def get_openmw_version(haystack): break line_counter += 1 - if line_counter == 0: - raise ImportError('Unable to find OpenMW Version') - version = '.'.join([haystack[line_counter][1][1].contents, haystack[line_counter+1][1][1].contents, haystack[line_counter+2][1][1].contents]) @@ -83,9 +83,9 @@ try: cmake_data = parsing.parse(cmake_raw) release = version = get_openmw_version(cmake_data) -except ImportError: - release = "UNRELEASED" - print("WARNING: Unable to import parse_cmake, version will be set to: {0}.".format(release)) +except Exception as ex: + print("WARNING: Version will be set to '{0}' because: '{1}'.".format(release, str(ex))) + import traceback; traceback.print_exc() # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 4a2e9f2e3d8c9a5bad6fe795d24fb286549f4540 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Tue, 27 Feb 2018 23:52:12 +0000 Subject: [PATCH 24/38] Update AUTHORS.md --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index 155d017f3..f6cc51181 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -41,6 +41,7 @@ Programmers Cory F. Cohen (cfcohen) Cris Mihalache (Mirceam) crussell187 + DanielVukelich darkf devnexen Dieho From 4292351993c2d10ef72a26d4925e27684f4312f4 Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Tue, 27 Feb 2018 20:17:21 -0600 Subject: [PATCH 25/38] Adding Max Quicksaves setting to Launcher --- apps/launcher/advancedpage.cpp | 9 +++-- files/ui/advancedpage.ui | 66 +++++++++++++++++++++++++++++----- 2 files changed, 65 insertions(+), 10 deletions(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index 3ba378599..27f3cc39d 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -35,8 +35,11 @@ bool Launcher::AdvancedPage::loadSettings() loadSettingBool(grabCursorCheckBox, "grab cursor", "Input"); loadSettingBool(toggleSneakCheckBox, "toggle sneak", "Input"); - // Other Settings + // Saves Settings loadSettingBool(timePlayedCheckbox, "timeplayed", "Saves"); + maximumQuicksavesComboBox->setValue(mEngineSettings.getInt("max quicksaves", "Saves")); + + // Other Settings QString screenshotFormatString = QString::fromStdString(mEngineSettings.getString("screenshot format", "General")).toUpper(); if (screenshotFormatComboBox->findText(screenshotFormatString) == -1) @@ -69,9 +72,11 @@ void Launcher::AdvancedPage::saveSettings() saveSettingBool(grabCursorCheckBox, "grab cursor", "Input"); saveSettingBool(toggleSneakCheckBox, "toggle sneak", "Input"); - // Other Settings + // Saves Settings saveSettingBool(timePlayedCheckbox, "timeplayed", "Saves"); + mEngineSettings.setInt("max quicksaves", "Saves", maximumQuicksavesComboBox->value()); + // Other Settings std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString(); if (screenshotFormatString != mEngineSettings.getString("screenshot format", "General")) mEngineSettings.setString("screenshot format", "General", screenshotFormatString); diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 8a0795d34..6832b86df 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -6,7 +6,7 @@ 0 0 - 434 + 671 373 @@ -27,9 +27,9 @@ 0 - 0 - 393 - 437 + -187 + 630 + 510 @@ -139,6 +139,9 @@ + + 1 + Off @@ -207,11 +210,11 @@ - + - Other + Saves - + @@ -222,12 +225,59 @@ + + + + <html><head/><body><p>This setting determines how many quicksave and autosave slots you can have at a time. If greater than 1, quicksaves will be sequentially created each time you quicksave. Once the maximum number of quicksaves has been reached, the oldest quicksave will be recycled the next time you perform a quicksave.</p></body></html> + + + + -1 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Maximum Quicksaves + + + + + + + 1 + + + + + + + + + + + + + Other + + <html><head/><body><p>Specify the format for screen shots taken by pressing the screen shot key (bound to F12 by default). This setting should be the file extension commonly associated with the desired format. The formats supported will be determined at compilation, but “jpg”, “png”, and “tga” should be allowed.</p></body></html> - + -1 From b6d9b6f544ee1e761be5dc8ffa82b9b665eec59f Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Tue, 27 Feb 2018 20:17:43 -0600 Subject: [PATCH 26/38] Formatting improvement for advanced page --- apps/launcher/advancedpage.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index 27f3cc39d..0abefcc8f 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -40,7 +40,6 @@ bool Launcher::AdvancedPage::loadSettings() maximumQuicksavesComboBox->setValue(mEngineSettings.getInt("max quicksaves", "Saves")); // Other Settings - QString screenshotFormatString = QString::fromStdString(mEngineSettings.getString("screenshot format", "General")).toUpper(); if (screenshotFormatComboBox->findText(screenshotFormatString) == -1) screenshotFormatComboBox->addItem(screenshotFormatString); From c18d07827ddc9a9eca7ccbec1ecc8e4188e8dd2f Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 1 Mar 2018 09:31:21 +0200 Subject: [PATCH 27/38] [Client] Hide difficulty widget because it has no use in multiplayer --- apps/openmw/mwgui/settingswindow.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index 9bf6e4385..9e67b96a9 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -120,6 +120,21 @@ namespace MWGui } if (type == sliderType) { + /* + Start of tes3mp addition + + Hide difficulty widget because it has no use in multiplayer, with + the difficulty being set by the server instead + */ + if (getSettingName(current) == "difficulty") + { + widget->setEnabled(false); + widget->setVisible(false); + } + /* + End of tes3mp addition + */ + MyGUI::ScrollBar* scroll = current->castType(); std::string valueStr; if (getSettingValueType(current) == "Float") From 839196e4faaa4782c2cc339413e964e4ed698b78 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Sat, 3 Mar 2018 00:15:57 +0000 Subject: [PATCH 28/38] Force normal polygon mode for the map camera (Fixes #4235) --- apps/openmw/mwrender/localmap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw/mwrender/localmap.cpp b/apps/openmw/mwrender/localmap.cpp index b78c4dcd2..0b65a6b13 100644 --- a/apps/openmw/mwrender/localmap.cpp +++ b/apps/openmw/mwrender/localmap.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include @@ -174,6 +175,7 @@ osg::ref_ptr LocalMap::createOrthographicCamera(float x, float y, f camera->setNodeMask(Mask_RenderToTexture); osg::ref_ptr stateset = new osg::StateSet; + stateset->setAttribute(new osg::PolygonMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::FILL), osg::StateAttribute::OVERRIDE); // assign large value to effectively turn off fog // shaders don't respect glDisable(GL_FOG) From cc0c6ddaa6aed5c93f83597a58d12fbacba34d46 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 28 Feb 2018 14:04:56 +0300 Subject: [PATCH 29/38] Account for empty victimRef (Bug #4328) --- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index cd3cd1f80..be5125a2b 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -1120,7 +1120,7 @@ namespace MWMechanics if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId)) { const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(item.getCellRef().getOwner(), true); - if (!victimRef.getClass().getCreatureStats(victimRef).isDead()) + if (victimRef.isEmpty() || !victimRef.getClass().getCreatureStats(victimRef).isDead()) mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count; } if (alarm) From d371bebb333c419c0c5589bfca090410eb25a1be Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Fri, 2 Mar 2018 21:10:05 +0300 Subject: [PATCH 30/38] Prevent items in a container owned by a dead actor from being counted as stolen (Bug #4328) --- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index be5125a2b..225427829 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -1119,7 +1119,7 @@ namespace MWMechanics if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId)) { - const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(item.getCellRef().getOwner(), true); + const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(ownerCellRef->getOwner(), true); if (victimRef.isEmpty() || !victimRef.getClass().getCreatureStats(victimRef).isDead()) mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count; } From 6c3ac834c43600ae3e3829e6d1f3c6080982de7d Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Mon, 5 Mar 2018 19:57:19 -0600 Subject: [PATCH 31/38] Preventing max quicksaves from being saved to settings.cfg if it is unchanged. --- apps/launcher/advancedpage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index 0abefcc8f..9b6e5fa8c 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -73,7 +73,10 @@ void Launcher::AdvancedPage::saveSettings() // Saves Settings saveSettingBool(timePlayedCheckbox, "timeplayed", "Saves"); - mEngineSettings.setInt("max quicksaves", "Saves", maximumQuicksavesComboBox->value()); + int maximumQuicksaves = maximumQuicksavesComboBox->value(); + if (maximumQuicksaves != mEngineSettings.getInt("max quicksaves", "Saves")) { + mEngineSettings.setInt("max quicksaves", "Saves", maximumQuicksaves); + } // Other Settings std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString(); From 60a663ef58dfed6f84d613942266b397d61cb420 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Tue, 6 Mar 2018 16:14:29 +0300 Subject: [PATCH 32/38] Account for all possible count values in getCountString (Bug #4346) --- apps/openmw/mwgui/itemwidget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/itemwidget.cpp b/apps/openmw/mwgui/itemwidget.cpp index a31eb9c76..e793dbf58 100644 --- a/apps/openmw/mwgui/itemwidget.cpp +++ b/apps/openmw/mwgui/itemwidget.cpp @@ -16,7 +16,12 @@ namespace { if (count == 1) return ""; - if (count > 9999) + + if (count > 999999999) + return MyGUI::utility::toString(int(count/1000000000.f)) + "b"; + else if (count > 999999) + return MyGUI::utility::toString(int(count/1000000.f)) + "m"; + else if (count > 9999) return MyGUI::utility::toString(int(count/1000.f)) + "k"; else return MyGUI::utility::toString(count); From 3b922d810a01401d8a8d9b138375c5dbaed63beb Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 7 Mar 2018 14:10:58 +0300 Subject: [PATCH 33/38] Don't use floating point arithmetics for formatted count (Bug #4346) --- apps/openmw/mwgui/itemwidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/itemwidget.cpp b/apps/openmw/mwgui/itemwidget.cpp index e793dbf58..6b5be0314 100644 --- a/apps/openmw/mwgui/itemwidget.cpp +++ b/apps/openmw/mwgui/itemwidget.cpp @@ -18,11 +18,11 @@ namespace return ""; if (count > 999999999) - return MyGUI::utility::toString(int(count/1000000000.f)) + "b"; + return MyGUI::utility::toString(count/1000000000) + "b"; else if (count > 999999) - return MyGUI::utility::toString(int(count/1000000.f)) + "m"; + return MyGUI::utility::toString(count/1000000) + "m"; else if (count > 9999) - return MyGUI::utility::toString(int(count/1000.f)) + "k"; + return MyGUI::utility::toString(count/1000) + "k"; else return MyGUI::utility::toString(count); } From dfcd243150243af5f1f0e049309ba1dc6f6acbd1 Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Wed, 7 Mar 2018 19:57:54 -0600 Subject: [PATCH 34/38] Remove the word "interior" from cell not found message --- apps/openmw/mwworld/store.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/store.cpp b/apps/openmw/mwworld/store.cpp index 9279e3fe7..158d3f771 100644 --- a/apps/openmw/mwworld/store.cpp +++ b/apps/openmw/mwworld/store.cpp @@ -592,7 +592,7 @@ namespace MWWorld const ESM::Cell *ptr = search(id); if (ptr == 0) { std::ostringstream msg; - msg << "Interior cell '" << id << "' not found"; + msg << "Cell '" << id << "' not found"; throw std::runtime_error(msg.str()); } return ptr; From d3b623b5d32e8eba6c135ba62acfe049840040a4 Mon Sep 17 00:00:00 2001 From: Harald H Date: Thu, 8 Mar 2018 21:23:24 +0100 Subject: [PATCH 35/38] http to https for supported urls (#1625) * http to https for supported urls * http to https * http to https * http to https * http to https * http to https * http to https * http to https * http tp https * http to https * http to https * http to https * http to https * http to https * http to https * http to https * http to https * some url fixes * http to https --- CI/before_script.msvc.sh | 16 +- CMakeLists.txt | 4 +- CONTRIBUTING.md | 2 +- LICENSE | 8 +- README.md | 6 +- apps/openmw/mwclass/npc.cpp | 2 +- apps/openmw/mwmechanics/character.cpp | 2 +- apps/openmw/mwmechanics/pathgrid.cpp | 2 +- apps/openmw/mwsound/alext.h | 2 +- apps/openmw/mwsound/ffmpeg_decoder.hpp | 2 +- cmake/FindFreetype.cmake | 2 +- cmake/FindLIBUNSHIELD.cmake | 2 +- cmake/FindOpenGLES.cmake | 2 +- components/bsa/bsa_file.cpp | 4 +- components/bsa/bsa_file.hpp | 4 +- components/nif/controlled.hpp | 4 +- components/nif/controller.hpp | 4 +- components/nif/data.hpp | 4 +- components/nif/effect.hpp | 4 +- components/nif/extra.hpp | 4 +- components/nif/niftypes.hpp | 4 +- components/nif/property.hpp | 4 +- components/nif/record.hpp | 4 +- components/settings/settings.cpp | 2 +- docs/Doxyfile.cmake | 53 +++--- docs/DoxyfilePages.cmake | 16 +- .../openmw-cs/files-and-directories.rst | 6 +- docs/source/manuals/openmw-cs/tour.rst | 32 ++-- .../modding/convert_bump_mapped_mods.rst | 24 +-- docs/source/reference/modding/font.rst | 4 +- extern/oics/tinyxmlparser.cpp | 153 +++++++++--------- files/mac/openmw-Info.plist.in | 2 +- files/mac/openmw-cs-Info.plist.in | 2 +- files/openmw.appdata.xml | 6 +- files/settings-default.cfg | 2 +- files/shaders/water_fragment.glsl | 20 +-- 36 files changed, 205 insertions(+), 209 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index ee48c1f68..2a052912a 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -303,25 +303,25 @@ if [ -z $SKIP_DOWNLOAD ]; then # Boost if [ -z $APPVEYOR ]; then download "Boost 1.61.0" \ - "http://sourceforge.net/projects/boost/files/boost-binaries/1.61.0/boost_1_61_0-msvc-${MSVC_VER}.0-${BITS}.exe" \ + "https://sourceforge.net/projects/boost/files/boost-binaries/1.61.0/boost_1_61_0-msvc-${MSVC_VER}.0-${BITS}.exe" \ "boost-1.61.0-msvc${MSVC_YEAR}-win${BITS}.exe" fi # Bullet download "Bullet 2.86" \ - "http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.86-msvc${MSVC_YEAR}-win${BITS}.7z" \ + "https://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.86-msvc${MSVC_YEAR}-win${BITS}.7z" \ "Bullet-2.86-msvc${MSVC_YEAR}-win${BITS}.7z" # FFmpeg download "FFmpeg 3.2.4" \ - "http://ffmpeg.zeranoe.com/builds/win${BITS}/shared/ffmpeg-3.2.4-win${BITS}-shared.zip" \ + "https://ffmpeg.zeranoe.com/builds/win${BITS}/shared/ffmpeg-3.2.4-win${BITS}-shared.zip" \ "ffmpeg-3.2.4-win${BITS}.zip" \ - "http://ffmpeg.zeranoe.com/builds/win${BITS}/dev/ffmpeg-3.2.4-win${BITS}-dev.zip" \ + "https://ffmpeg.zeranoe.com/builds/win${BITS}/dev/ffmpeg-3.2.4-win${BITS}-dev.zip" \ "ffmpeg-3.2.4-dev-win${BITS}.zip" # MyGUI download "MyGUI 3.2.2" \ - "http://www.lysator.liu.se/~ace/OpenMW/deps/MyGUI-3.2.2-msvc${MSVC_YEAR}-win${BITS}.7z" \ + "https://www.lysator.liu.se/~ace/OpenMW/deps/MyGUI-3.2.2-msvc${MSVC_YEAR}-win${BITS}.7z" \ "MyGUI-3.2.2-msvc${MSVC_YEAR}-win${BITS}.7z" # OpenAL @@ -331,7 +331,7 @@ if [ -z $SKIP_DOWNLOAD ]; then # OSG download "OpenSceneGraph 3.4.1-scrawl" \ - "http://www.lysator.liu.se/~ace/OpenMW/deps/OSG-3.4.1-scrawl-msvc${MSVC_YEAR}-win${BITS}.7z" \ + "https://www.lysator.liu.se/~ace/OpenMW/deps/OSG-3.4.1-scrawl-msvc${MSVC_YEAR}-win${BITS}.7z" \ "OSG-3.4.1-scrawl-msvc${MSVC_YEAR}-win${BITS}.7z" # Qt @@ -343,9 +343,9 @@ if [ -z $SKIP_DOWNLOAD ]; then fi download "Qt 5.7.2" \ - "http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-windows-x86-msvc${MSVC_YEAR}${QT_SUFFIX}-5.7.0.exe" \ + "https://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-windows-x86-msvc${MSVC_YEAR}${QT_SUFFIX}-5.7.0.exe" \ "qt-5.7.0-msvc${MSVC_YEAR}-win${BITS}.exe" \ - "http://www.lysator.liu.se/~ace/OpenMW/deps/qt-5-install.qs" \ + "https://www.lysator.liu.se/~ace/OpenMW/deps/qt-5-install.qs" \ "qt-5-install.qs" fi diff --git a/CMakeLists.txt b/CMakeLists.txt index 2923612fb..7c1f961f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -505,8 +505,8 @@ if(WIN32) SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenMW_SOURCE_DIR}/README.md") SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") SET(CPACK_NSIS_DISPLAY_NAME "OpenMW ${OPENMW_VERSION}") - SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.openmw.org") - SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.openmw.org") + SET(CPACK_NSIS_HELP_LINK "https:\\\\\\\\www.openmw.org") + SET(CPACK_NSIS_URL_INFO_ABOUT "https:\\\\\\\\www.openmw.org") SET(CPACK_NSIS_INSTALLED_ICON_NAME "openmw-launcher.exe") SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "openmw-launcher.exe") SET(CPACK_NSIS_MUI_ICON "${OpenMW_SOURCE_DIR}/files/windows/openmw.ico") diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6c82d1dfd..b5543d11e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ How to contribute to OpenMW Not sure what to do with all your free time? Pick out a task from here: -http://bugs.openmw.org/ +https://bugs.openmw.org/ Currently, we are focused on completing the MW game experience and general polishing. Features out of this scope may be approved in some cases, but you should probably start a discussion first. diff --git a/LICENSE b/LICENSE index 9cecc1d46..9d742475f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. diff --git a/README.md b/README.md index 0b5f63f93..368609332 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ OpenMW also comes with OpenMW-CS, a replacement for Morrowind's TES Construction * Version: 0.43.0 * License: GPLv3 (see [LICENSE](https://github.com/OpenMW/openmw/blob/master/LICENSE) for more information) -* Website: http://www.openmw.org +* Website: https://www.openmw.org * IRC: #openmw on irc.freenode.net Font Licenses: @@ -30,8 +30,8 @@ Getting Started * [Build from source](https://wiki.openmw.org/index.php?title=Development_Environment_Setup) * [Testing the game](https://wiki.openmw.org/index.php?title=Testing) * [How to contribute](https://wiki.openmw.org/index.php?title=Contribution_Wanted) -* [Report a bug](http://bugs.openmw.org/projects/openmw) - read the [guidelines](https://wiki.openmw.org/index.php?title=Bug_Reporting_Guidelines) before submitting your first bug! -* [Known issues](http://bugs.openmw.org/projects/openmw/issues?utf8=%E2%9C%93&set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=%3D&v%5Bstatus_id%5D%5B%5D=7&f%5B%5D=tracker_id&op%5Btracker_id%5D=%3D&v%5Btracker_id%5D%5B%5D=1&f%5B%5D=&c%5B%5D=project&c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=priority&c%5B%5D=subject&c%5B%5D=assigned_to&c%5B%5D=updated_on&group_by=tracker) +* [Report a bug](https://bugs.openmw.org/projects/openmw) - read the [guidelines](https://wiki.openmw.org/index.php?title=Bug_Reporting_Guidelines) before submitting your first bug! +* [Known issues](https://bugs.openmw.org/projects/openmw/issues?utf8=%E2%9C%93&set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=%3D&v%5Bstatus_id%5D%5B%5D=7&f%5B%5D=tracker_id&op%5Btracker_id%5D=%3D&v%5Btracker_id%5D%5B%5D=1&f%5B%5D=&c%5B%5D=project&c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=priority&c%5B%5D=subject&c%5B%5D=assigned_to&c%5B%5D=updated_on&group_by=tracker) The data path ------------- diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 134bbf943..974a08c11 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -406,7 +406,7 @@ namespace MWClass // store ptr.getRefData().setCustomData (data.release()); - getInventoryStore(ptr).autoEquip(ptr); + getInventoryStore(ptr).autoEquip(ptr); } } diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 676f01922..f88b20a10 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * version 3 along with this program. If not, see - * http://www.gnu.org/licenses/ . + * https://www.gnu.org/licenses/ . */ #include "character.hpp" diff --git a/apps/openmw/mwmechanics/pathgrid.cpp b/apps/openmw/mwmechanics/pathgrid.cpp index c0122a861..ea4c973b7 100644 --- a/apps/openmw/mwmechanics/pathgrid.cpp +++ b/apps/openmw/mwmechanics/pathgrid.cpp @@ -8,7 +8,7 @@ namespace { - // See http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html + // See https://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html // // One of the smallest cost in Seyda Neen is between points 77 & 78: // pt x y diff --git a/apps/openmw/mwsound/alext.h b/apps/openmw/mwsound/alext.h index 4b9a15537..7162fa955 100644 --- a/apps/openmw/mwsound/alext.h +++ b/apps/openmw/mwsound/alext.h @@ -15,7 +15,7 @@ * License along with this library; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * Or go to http://www.gnu.org/copyleft/lgpl.html + * Or go to https://www.gnu.org/copyleft/lgpl.html */ #ifndef AL_ALEXT_H diff --git a/apps/openmw/mwsound/ffmpeg_decoder.hpp b/apps/openmw/mwsound/ffmpeg_decoder.hpp index e06a68d64..2b76e0d7d 100644 --- a/apps/openmw/mwsound/ffmpeg_decoder.hpp +++ b/apps/openmw/mwsound/ffmpeg_decoder.hpp @@ -21,7 +21,7 @@ extern "C" // From version 54.56 binkaudio encoding format changed from S16 to FLTP. See: // https://gitorious.org/ffmpeg/ffmpeg/commit/7bfd1766d1c18f07b0a2dd042418a874d49ea60d -// http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=15&t=872 +// https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=15&t=872 #include } diff --git a/cmake/FindFreetype.cmake b/cmake/FindFreetype.cmake index 3d28613ae..3b7586835 100644 --- a/cmake/FindFreetype.cmake +++ b/cmake/FindFreetype.cmake @@ -1,7 +1,7 @@ #------------------------------------------------------------------- # This file is part of the CMake build system for OGRE # (Object-oriented Graphics Rendering Engine) -# For the latest info, see http://www.ogre3d.org/ +# For the latest info, see https://www.ogre3d.org/ # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. diff --git a/cmake/FindLIBUNSHIELD.cmake b/cmake/FindLIBUNSHIELD.cmake index 285740b63..ee6414646 100644 --- a/cmake/FindLIBUNSHIELD.cmake +++ b/cmake/FindLIBUNSHIELD.cmake @@ -4,7 +4,7 @@ # LIBUNSHIELD_FOUND, if false, do not try to link to LibUnshield # LIBUNSHIELD_INCLUDE_DIRS, where to find the headers # -# Created by Tom Mason (wheybags) for OpenMW (http://openmw.org), based on FindMPG123.cmake +# Created by Tom Mason (wheybags) for OpenMW (https://openmw.org), based on FindMPG123.cmake # # Ripped off from other sources. In fact, this file is so generic (I # just did a search and replace on another file) that I wonder why the diff --git a/cmake/FindOpenGLES.cmake b/cmake/FindOpenGLES.cmake index 7ee2c07f1..6a0466409 100644 --- a/cmake/FindOpenGLES.cmake +++ b/cmake/FindOpenGLES.cmake @@ -1,7 +1,7 @@ #------------------------------------------------------------------- # This file is part of the CMake build system for OGRE # (Object-oriented Graphics Rendering Engine) -# For the latest info, see http://www.ogre3d.org/ +# For the latest info, see https://www.ogre3d.org/ # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. diff --git a/components/bsa/bsa_file.cpp b/components/bsa/bsa_file.cpp index c4be428b3..8905a86a1 100644 --- a/components/bsa/bsa_file.cpp +++ b/components/bsa/bsa_file.cpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (bsa_file.cpp) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/bsa/bsa_file.hpp b/components/bsa/bsa_file.hpp index 5ff86ef65..196dc30fb 100644 --- a/components/bsa/bsa_file.hpp +++ b/components/bsa/bsa_file.hpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (bsa_file.h) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/nif/controlled.hpp b/components/nif/controlled.hpp index 5601474ac..be48e912e 100644 --- a/components/nif/controlled.hpp +++ b/components/nif/controlled.hpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (controlled.h) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/nif/controller.hpp b/components/nif/controller.hpp index 0861dfa6b..527bb74af 100644 --- a/components/nif/controller.hpp +++ b/components/nif/controller.hpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (controller.h) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/nif/data.hpp b/components/nif/data.hpp index 9b4a3a67c..6b7aa579b 100644 --- a/components/nif/data.hpp +++ b/components/nif/data.hpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (data.h) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/nif/effect.hpp b/components/nif/effect.hpp index 015809a68..453e4b04c 100644 --- a/components/nif/effect.hpp +++ b/components/nif/effect.hpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (effect.h) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/nif/extra.hpp b/components/nif/extra.hpp index 1e5a8616d..d935add55 100644 --- a/components/nif/extra.hpp +++ b/components/nif/extra.hpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (extra.h) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/nif/niftypes.hpp b/components/nif/niftypes.hpp index 5827448fd..778625717 100644 --- a/components/nif/niftypes.hpp +++ b/components/nif/niftypes.hpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (nif_types.h) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/nif/property.hpp b/components/nif/property.hpp index 96156c6d8..f46f8ef27 100644 --- a/components/nif/property.hpp +++ b/components/nif/property.hpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (property.h) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/nif/record.hpp b/components/nif/record.hpp index 605c4d76e..b8597f7d1 100644 --- a/components/nif/record.hpp +++ b/components/nif/record.hpp @@ -2,7 +2,7 @@ OpenMW - The completely unofficial reimplementation of Morrowind Copyright (C) 2008-2010 Nicolay Korslund Email: < korslund@gmail.com > - WWW: http://openmw.sourceforge.net/ + WWW: https://openmw.org/ This file (record.h) is part of the OpenMW package. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License version 3 along with this program. If not, see - http://www.gnu.org/licenses/ . + https://www.gnu.org/licenses/ . */ diff --git a/components/settings/settings.cpp b/components/settings/settings.cpp index 2e7b5a8ae..15a222d31 100644 --- a/components/settings/settings.cpp +++ b/components/settings/settings.cpp @@ -292,7 +292,7 @@ public: ostream << "# to its default, simply remove it from this file. For available" << std::endl; ostream << "# settings, see the file 'settings-default.cfg' or the documentation at:" << std::endl; ostream << "#" << std::endl; - ostream << "# http://openmw.readthedocs.io/en/master/reference/modding/settings/index.html" << std::endl; + ostream << "# https://openmw.readthedocs.io/en/master/reference/modding/settings/index.html" << std::endl; } // We still have one more thing to do before we're completely done writing the file. diff --git a/docs/Doxyfile.cmake b/docs/Doxyfile.cmake index 38ad84165..71ce32069 100644 --- a/docs/Doxyfile.cmake +++ b/docs/Doxyfile.cmake @@ -20,7 +20,7 @@ # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# built into libc) for the transcoding. See https://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. @@ -295,7 +295,7 @@ EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. +# documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. @@ -328,7 +328,7 @@ BUILTIN_STL_SUPPORT = YES CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# https://riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. @@ -687,7 +687,7 @@ LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. Do not use file names with spaces, bibtex cannot handle them. See @@ -772,7 +772,7 @@ INPUT = @OpenMW_SOURCE_DIR@/apps \ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# documentation (see: https://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. @@ -993,7 +993,7 @@ SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version +# (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: @@ -1136,7 +1136,7 @@ HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the stylesheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. @@ -1194,7 +1194,7 @@ HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# environment (see: https://developer.apple.com/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in @@ -1239,7 +1239,7 @@ DOCSET_PUBLISHER_NAME = OpenMW # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output @@ -1315,7 +1315,7 @@ QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1323,8 +1323,7 @@ QHP_NAMESPACE = org.openmw # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). +# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1332,23 +1331,21 @@ QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = @@ -1453,7 +1450,7 @@ FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering +# https://www.mathjax.org) which uses client side Javascript for the rendering # instead of using prerendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path @@ -1465,7 +1462,7 @@ USE_MATHJAX = YES # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. +# https://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. @@ -1480,11 +1477,11 @@ MATHJAX_FORMAT = HTML-CSS # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example @@ -1495,7 +1492,7 @@ MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# (see: https://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -1542,7 +1539,7 @@ SERVER_BASED_SEARCH = NO # # Doxygen ships with an example indexer ( doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). +# Xapian (see: https://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1555,7 +1552,7 @@ EXTERNAL_SEARCH = NO # # Doxygen ships with an example indexer ( doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Xapian (see: https://xapian.org/). See the section "External Indexing and # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. @@ -1726,7 +1723,7 @@ LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See -# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1882,7 +1879,7 @@ DOCBOOK_OUTPUT = docbook #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of +# Definitions (see http://autogen.sourceforge.net) file that captures the structure of # the code including all documentation. Note that this feature is still # experimental and incomplete at the moment. # The default value is: NO. @@ -2093,7 +2090,7 @@ HIDE_UNDOC_RELATIONS = NO # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz (see: -# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent +# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # Bell Labs. The other options in this section have no effect if this option is # set to NO # The default value is: YES. diff --git a/docs/DoxyfilePages.cmake b/docs/DoxyfilePages.cmake index d50a043d6..f3454c9d0 100644 --- a/docs/DoxyfilePages.cmake +++ b/docs/DoxyfilePages.cmake @@ -18,7 +18,7 @@ # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. +# https://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 @@ -581,7 +581,7 @@ INPUT = @OpenMW_SOURCE_DIR@/apps \ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# into libc) for the transcoding. See https://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 @@ -753,7 +753,7 @@ REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# tagging system (see https://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO @@ -928,30 +928,30 @@ QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace QHP_NAMESPACE = # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. # For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# Qt Help Project / Custom Filters. +# Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's # filter section matches. -# Qt Help Project / Filter Attributes. +# Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = diff --git a/docs/source/manuals/openmw-cs/files-and-directories.rst b/docs/source/manuals/openmw-cs/files-and-directories.rst index 77593dece..ae39082d7 100644 --- a/docs/source/manuals/openmw-cs/files-and-directories.rst +++ b/docs/source/manuals/openmw-cs/files-and-directories.rst @@ -145,7 +145,7 @@ and a place where OpenMW CS looks for already existing files. Resource files ============== -.. TODO This paragraph sounds weird +.. TODO This paragraph sounds weird Unless we are talking about a fully text based game, like Zork or Rogue, one would expect that a video game is using some media files: 3D models with @@ -219,6 +219,6 @@ files for textures. .. Hyperlink targets for the entire document -.. _FFmpeg: http://ffmpeg.org +.. _FFmpeg: https://ffmpeg.org .. _Vorbis: http://www.vorbis.com -.. _Theora: http://www.theora.org +.. _Theora: https://www.theora.org diff --git a/docs/source/manuals/openmw-cs/tour.rst b/docs/source/manuals/openmw-cs/tour.rst index 645c18453..83b7aae27 100644 --- a/docs/source/manuals/openmw-cs/tour.rst +++ b/docs/source/manuals/openmw-cs/tour.rst @@ -3,7 +3,7 @@ A Tour through OpenMW CS: making a magic ring In this first chapter we will create a mod that adds a new ring with a simple enchantment to the game. The ring will give its wearer a permanent Night Vision -effect while being worn. You do not need previous Morrowind modding experience, +effect while being worn. You do not need previous Morrowind modding experience, but you should be familiar with the game itself. There will be no scripting necessary, we can achieve everything using just what the base game offers out of the box. Before continuing make sure that OpenMW is properly @@ -133,7 +133,7 @@ the filter directly into the filter field rather than the name of an existing filter. To signify that we are using an instant filter the have to use `!` as the first character. Type the following into the field: -.. code:: +.. code:: !string("id", ".*ring.*") @@ -217,20 +217,20 @@ actually modify the contents of the game. Adding to an NPC ================ -The simplest way is probably to add it to the inventory of a shopkeeper. +The simplest way is probably to add it to the inventory of a shopkeeper. An obvious candidate is Arrille in Seyda Neen - he's quick to find in a new game and he's easy to find in the CS as his name comes early alphabetically. .. figure:: _static/images/chapter-1/Ring_to_Arrille.png :alt: Putting the ring into Arrille's inventory - -Open the CS and open the *Objects* table (*World* → *Objects*). + +Open the CS and open the *Objects* table (*World* → *Objects*). Scroll down to Arrille, or use a filter like !string("ID","arrille"). -Open another pane to edit him - either right click and select edit or use the +Open another pane to edit him - either right click and select edit or use the shortcut (default is shift double-click). Scroll down to the inventory section -and right click to add a new row. Type in the id of the ring (or find it in the -object pane, and drag and drop). Set the number of rings for him to stock - with +and right click to add a new row. Type in the id of the ring (or find it in the +object pane, and drag and drop). Set the number of rings for him to stock - with a negative number indicating that he will restock again to maintain that level. However, it's an attractive item, so he will probably wear it rather than sell it. @@ -241,7 +241,7 @@ Fargoth to give it to the player in exchange for his healing ring. .. figure:: _static/images/chapter-1/Ring_to_Fargoth_1.png :alt: Editing Fargoth to give ring to player - + Open the *Topicinfo* Table (*Characters* → *Topic Infos*). Use a filter !string(Topic,ring) and select the row with a response starting with "You found it!". Edit the record, firstly by adding a bit more to the response, then by adding a line to the script @@ -297,7 +297,7 @@ Placing in plain sight ===================== Let's hide the Ring of Night vision in the cabin of the [Ancient Shipwreck] -(http://en.uesp.net/wiki/Morrowind:Ancient_Shipwreck), a derelict vessel +(https://en.uesp.net/wiki/Morrowind:Ancient_Shipwreck), a derelict vessel southeast of Dagon Fel. Open the list of Cells (*World* → *Cells*) and find "Ancient Shipwreck, Cabin". @@ -333,8 +333,8 @@ This is probably a suitable place to start talking about how navigation differs in vanilla Morrowind. There is advice in Scripting for Dummies, the definitive manual for Morrowind Scripting: -"If you give your scripts a common tag, that will make it easier to jump between the -different scripts of your project, e.g. start every script name with AA_Scriptname +"If you give your scripts a common tag, that will make it easier to jump between the +different scripts of your project, e.g. start every script name with AA_Scriptname this will put them right at the beginning of the list and keep them neatly together." This is valid for the rather poorer navigation facilities there, but it's not sensible for @@ -359,12 +359,12 @@ the base game. "Modified" status will cover items from the base game which have been modified in this addon. -Click on the top of the column to toggle between ascending and descending order - thus between "Added" -and "Modified" at the top. Or put your desired modified status into a filter then sort alpabetically +Click on the top of the column to toggle between ascending and descending order - thus between "Added" +and "Modified" at the top. Or put your desired modified status into a filter then sort alpabetically on a different column. - + Checking your new addon ======================= @@ -372,4 +372,4 @@ Launch OpenMW and in the launcher under *Data Files* check your addon, if it's n already checked. Load a game and make your way to Seyda Neen - or start a new game. Check whether Arrille has one (or more) for sale, and whether Fargoth give you one -when you return his healing ring. \ No newline at end of file +when you return his healing ring. diff --git a/docs/source/reference/modding/convert_bump_mapped_mods.rst b/docs/source/reference/modding/convert_bump_mapped_mods.rst index 71ac29468..1891b5c4d 100644 --- a/docs/source/reference/modding/convert_bump_mapped_mods.rst +++ b/docs/source/reference/modding/convert_bump_mapped_mods.rst @@ -20,7 +20,7 @@ General introduction to normal map conversion :Authors: Joakim (Lysol) Berg :Updated: 2016-11-11 -This page has general information and tutorials on how normal mapping works in OpenMW and how you can make mods using the old fake normal mapping technique (such as `Netch Bump mapped`_ and `Hlaalu Bump mapped`_, and maybe the most (in)famous one to give shiny rocks in OpenMW, the mod `On the Rocks`_!, featured in MGSO and Morrowind Rebirth) work in OpenMW. +This page has general information and tutorials on how normal mapping works in OpenMW and how you can make mods using the old fake normal mapping technique (such as `Netch Bump mapped`_ and `Hlaalu Bump mapped`_, and maybe the most (in)famous one to give shiny rocks in OpenMW, the mod `On the Rocks`_!, featured in MGSO and Morrowind Rebirth) work in OpenMW. *Note:* The conversion made in the `Converting Apel's Various Things - Sacks`_-part of this tutorial require the use of the application NifSkope. There are binaries available for Windows, but not for Mac or Linux. Reports say that NifSkope versions 1.X will compile on Linux as long as you have Qt packages installed, while the later 2.X versions will not compile. @@ -179,24 +179,24 @@ The sacks included in Apel's `Various Things - Sacks`_ come in two versions – #. Remove all these tags by selecting them one at a time and press right click>Block>Remove Branch. (Ctrl-Del) #. Repeat this on all the affected models. #. If you launch OpenMW now, you'll `no longer have shiny models`_. But one thing is missing. Can you see it? It's actually hard to spot on still pictures, but we have no normal maps here. -#. Now, go back to the root of where you installed the mod. Now go to ``./Textures/`` and you'll find the texture files in question. +#. Now, go back to the root of where you installed the mod. Now go to ``./Textures/`` and you'll find the texture files in question. #. OpenMW detects normal maps if they have the same name as the base diffuse texture, but with a *_n.dds* suffix. In this mod, the normal maps has a suffix of *_nm.dds*. Change all the files that ends with *_nm.dds* to instead end with *_n.dds*. #. Finally, `we are done`_! Since these models have one or two textures applied to them, the fix was not that time-consuming. It gets worse when you have to fix a model that uses loads of textures. The principle is the same, it just requires more manual work which is annoying and takes time. -.. _`Netch Bump mapped`: http://www.nexusmods.com/morrowind/mods/42851/? -.. _`Hlaalu Bump mapped`: http://www.nexusmods.com/morrowind/mods/42396/? +.. _`Netch Bump mapped`: https://www.nexusmods.com/morrowind/mods/42851/? +.. _`Hlaalu Bump mapped`: https://www.nexusmods.com/morrowind/mods/42396/? .. _`On the Rocks`: http://mw.modhistory.com/download-44-14107 .. _`texture modding`: https://wiki.openmw.org/index.php?title=TextureModding -.. _`MGE XE`: http://www.nexusmods.com/morrowind/mods/26348/? -.. _PeterBitt: http://www.nexusmods.com/morrowind/users/4381248/? -.. _`PBR Scamp Replacer`: http://www.nexusmods.com/morrowind/mods/44314/? +.. _`MGE XE`: https://www.nexusmods.com/morrowind/mods/26348/? +.. _PeterBitt: https://www.nexusmods.com/morrowind/users/4381248/? +.. _`PBR Scamp Replacer`: https://www.nexusmods.com/morrowind/mods/44314/? .. _settings.cfg: https://wiki.openmw.org/index.php?title=Settings .. _`Multiple data folders`: https://wiki.openmw.org/index.php?title=Mod_installation -.. _`Various Things - Sacks`: http://www.nexusmods.com/morrowind/mods/42558/? -.. _Lead: http://imgur.com/bwpcYlc +.. _`Various Things - Sacks`: https://www.nexusmods.com/morrowind/mods/42558/? +.. _Lead: https://imgur.com/bwpcYlc .. _NifSkope: http://niftools.sourceforge.net/wiki/NifSkope -.. _Blocks: http://imgur.com/VmQC0WG -.. _`no longer have shiny models`: http://imgur.com/vu1k7n1 -.. _`we are done`: http://imgur.com/yyZxlTw +.. _Blocks: https://imgur.com/VmQC0WG +.. _`no longer have shiny models`: https://imgur.com/vu1k7n1 +.. _`we are done`: https://imgur.com/yyZxlTw diff --git a/docs/source/reference/modding/font.rst b/docs/source/reference/modding/font.rst index 5f01b12d9..80d01c27f 100644 --- a/docs/source/reference/modding/font.rst +++ b/docs/source/reference/modding/font.rst @@ -15,7 +15,7 @@ Unlike vanilla Morrowind, OpenMW directly supports TrueType (``.ttf``) fonts. Th - To replace the primary "Magic Cards" font: - #. Download `Pelagiad `_ by Isak Larborn (aka Isaskar). + #. Download `Pelagiad `_ by Isak Larborn (aka Isaskar). #. Install the ``openmw_font.xml`` file into ``resources/mygui/openmw_font.xml`` in your OpenMW installation. #. Copy ``Pelagiad.ttf`` into ``resources/mygui/`` as well. #. If desired, you can now delete the original ``Magic_Cards.*`` files from your Data Files/Fonts directory. @@ -74,4 +74,4 @@ Unlike vanilla Morrowind, OpenMW directly supports TrueType (``.ttf``) fonts. Th Bitmap fonts ------------ -Morrowind ``.fnt`` files are essentially a bitmap font, but using them is discouraged because of no Unicode support. MyGUI has its own format for bitmap fonts. An example can be seen by using the --export-fonts command line option (see above), which converts Morrowind ``.fnt`` to a MyGUI bitmap font. This is the recommended format to use if you wish to edit Morrowind's bitmap font or create a new bitmap font. \ No newline at end of file +Morrowind ``.fnt`` files are essentially a bitmap font, but using them is discouraged because of no Unicode support. MyGUI has its own format for bitmap fonts. An example can be seen by using the --export-fonts command line option (see above), which converts Morrowind ``.fnt`` to a MyGUI bitmap font. This is the recommended format to use if you wish to edit Morrowind's bitmap font or create a new bitmap font. diff --git a/extern/oics/tinyxmlparser.cpp b/extern/oics/tinyxmlparser.cpp index 253cd93ff..d5bda8fee 100644 --- a/extern/oics/tinyxmlparser.cpp +++ b/extern/oics/tinyxmlparser.cpp @@ -2,23 +2,23 @@ www.sourceforge.net/projects/tinyxml Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com) -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -1. The origin of this software must not be misrepresented; you must +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source +3. This notice may not be removed or altered from any source distribution. */ @@ -39,8 +39,8 @@ distribution. // Note tha "PutString" hardcodes the same list. This // is less flexible than it appears. Changing the entries -// or order will break putstring. -TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] = +// or order will break putstring. +TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] = { { "&", 5, '&' }, { "<", 4, '<' }, @@ -50,20 +50,20 @@ TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] = }; // Bunch of unicode info at: -// http://www.unicode.org/faq/utf_bom.html +// https://www.unicode.org/faq/utf_bom.html // Including the basic of this table, which determines the #bytes in the // sequence from the lead byte. 1 placed for invalid sequences -- // although the result will be junk, pass it through as much as possible. -// Beware of the non-characters in UTF-8: +// Beware of the non-characters in UTF-8: // ef bb bf (Microsoft "lead bytes") // ef bf be -// ef bf bf +// ef bf bf const unsigned char TIXML_UTF_LEAD_0 = 0xefU; const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; -const int TiXmlBase::utf8ByteTable[256] = +const int TiXmlBase::utf8ByteTable[256] = { // 0 1 2 3 4 5 6 7 8 9 a b c d e f 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 @@ -75,9 +75,9 @@ const int TiXmlBase::utf8ByteTable[256] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte @@ -91,7 +91,7 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng const unsigned long BYTE_MARK = 0x80; const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; - if (input < 0x80) + if (input < 0x80) *length = 1; else if ( input < 0x800 ) *length = 2; @@ -105,22 +105,22 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng output += *length; // Scary scary fall throughs. - switch (*length) + switch (*length) { case 4: - --output; - *output = (char)((input | BYTE_MARK) & BYTE_MASK); + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; case 3: - --output; - *output = (char)((input | BYTE_MARK) & BYTE_MASK); + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; case 2: - --output; - *output = (char)((input | BYTE_MARK) & BYTE_MASK); + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; case 1: - --output; + --output; *output = (char)(input | FIRST_BYTE_MARK[*length]); } } @@ -130,7 +130,7 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng { // This will only work for low-ascii, everything else is assumed to be a valid // letter. I'm not sure this is the best approach, but it is quite tricky trying - // to figure out alhabetical vs. not across encoding. So take a very + // to figure out alhabetical vs. not across encoding. So take a very // conservative approach. // if ( encoding == TIXML_ENCODING_UTF8 ) @@ -151,7 +151,7 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng { // This will only work for low-ascii, everything else is assumed to be a valid // letter. I'm not sure this is the best approach, but it is quite tricky trying - // to figure out alhabetical vs. not across encoding. So take a very + // to figure out alhabetical vs. not across encoding. So take a very // conservative approach. // if ( encoding == TIXML_ENCODING_UTF8 ) @@ -224,7 +224,7 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) case '\r': // bump down to the next line ++row; - col = 0; + col = 0; // Eat the character ++p; @@ -266,11 +266,11 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) // In these cases, don't advance the column. These are // 0-width spaces. if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) - p += 3; + p += 3; else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU ) - p += 3; + p += 3; else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU ) - p += 3; + p += 3; else { p +=3; ++col; } // A normal character. } @@ -322,10 +322,10 @@ const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) while ( *p ) { const unsigned char* pU = (const unsigned char*)p; - + // Skip the stupid Microsoft UTF-8 Byte order marks if ( *(pU+0)==TIXML_UTF_LEAD_0 - && *(pU+1)==TIXML_UTF_LEAD_1 + && *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) { p += 3; @@ -413,12 +413,12 @@ const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncodi // After that, they can be letters, underscores, numbers, // hyphens, or colons. (Colons are valid ony for namespaces, // but tinyxml can't tell namespaces from names.) - if ( p && *p + if ( p && *p && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) { const char* start = p; while( p && *p - && ( IsAlphaNum( (unsigned char ) *p, encoding ) + && ( IsAlphaNum( (unsigned char ) *p, encoding ) || *p == '_' || *p == '-' || *p == '.' @@ -469,7 +469,7 @@ const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXml ucs += mult * (*q - 'a' + 10); else if ( *q >= 'A' && *q <= 'F' ) ucs += mult * (*q - 'A' + 10 ); - else + else return 0; mult *= 16; --q; @@ -492,7 +492,7 @@ const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXml { if ( *q >= '0' && *q <= '9' ) ucs += mult * (*q - '0'); - else + else return 0; mult *= 10; --q; @@ -571,10 +571,10 @@ bool TiXmlBase::StringEqual( const char* p, return false; } -const char* TiXmlBase::ReadText( const char* p, - TIXML_STRING * text, - bool trimWhiteSpace, - const char* endTag, +const char* TiXmlBase::ReadText( const char* p, + TIXML_STRING * text, + bool trimWhiteSpace, + const char* endTag, bool caseInsensitive, TiXmlEncoding encoding ) { @@ -631,7 +631,7 @@ const char* TiXmlBase::ReadText( const char* p, } } } - if ( p ) + if ( p ) p += strlen( endTag ); return p; } @@ -647,7 +647,7 @@ void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag ) // This "pre-streaming" will never read the closing ">" so the // sub-tag can orient itself. - if ( !StreamTo( in, '<', tag ) ) + if ( !StreamTo( in, '<', tag ) ) { SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); return; @@ -669,7 +669,7 @@ void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag ) if ( in->good() ) { - // We now have something we presume to be a node of + // We now have something we presume to be a node of // some sort. Identify it, and call the node to // continue streaming. TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING ); @@ -778,7 +778,7 @@ const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiX encoding = TIXML_ENCODING_UTF8; else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) ) encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice - else + else encoding = TIXML_ENCODING_LEGACY; } @@ -796,7 +796,7 @@ const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiX } void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding ) -{ +{ // The first error in a chain is more accurate - don't set again! if ( error ) return; @@ -833,7 +833,7 @@ TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ) return 0; } - // What is this thing? + // What is this thing? // - Elements start with a letter or underscore, but xml is reserved. // - Comments: