From a0383275211ce4031d44ace7a76768ed28e61f08 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Wed, 17 Jan 2018 23:03:11 -0500 Subject: [PATCH 01/28] SDLCursorManager: fix possibly invalid read when no cursor present On android we have no cursor so I moved the check closer to usage --- components/sdlutil/sdlcursormanager.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/components/sdlutil/sdlcursormanager.cpp b/components/sdlutil/sdlcursormanager.cpp index c32891e37..65aa2106f 100644 --- a/components/sdlutil/sdlcursormanager.cpp +++ b/components/sdlutil/sdlcursormanager.cpp @@ -203,19 +203,14 @@ namespace SDLUtil void SDLCursorManager::cursorChanged(const std::string& name) { mCurrentCursor = name; - - CursorMap::const_iterator curs_iter = mCursorMap.find(name); - - if(curs_iter != mCursorMap.end()) - { - //we have this cursor - _setGUICursor(name); - } + _setGUICursor(name); } void SDLCursorManager::_setGUICursor(const std::string &name) { - SDL_SetCursor(mCursorMap.find(name)->second); + auto it = mCursorMap.find(name); + if (it != mCursorMap.end()) + SDL_SetCursor(it->second); } void SDLCursorManager::createCursor(const std::string& name, int rotDegrees, osg::Image* image, Uint8 hotspot_x, Uint8 hotspot_y) From 455f718394ee490a302ab0997c3c25a39cf73eba Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Wed, 17 Jan 2018 23:14:23 -0500 Subject: [PATCH 02/28] Android: register a virtual controller definition --- apps/openmw/android_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/openmw/android_main.c b/apps/openmw/android_main.c index 344d3e871..132e8ecf8 100644 --- a/apps/openmw/android_main.c +++ b/apps/openmw/android_main.c @@ -1,7 +1,7 @@ int stderr = 0; // Hack: fix linker error -#ifdef __ANDROID__ #include "SDL_main.h" +#include /******************************************************************************* Functions called by JNI @@ -24,6 +24,9 @@ int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, SDL_SetMainReady(); + // On Android, we use a virtual controller with guid="Virtual" + SDL_GameControllerAddMapping("5669727475616c000000000000000000,Virtual,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4"); + /* Run the application code! */ int status; @@ -36,5 +39,3 @@ int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, return status; } -#endif /* __ANDROID__ */ - From 359910762d459a798132e06e4d8a0dba692f8a71 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Thu, 18 Jan 2018 17:11:22 -0500 Subject: [PATCH 03/28] GraphicsWindowSDL2: support setting up GLESv2 context for android --- components/sdlutil/sdlgraphicswindow.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/components/sdlutil/sdlgraphicswindow.cpp b/components/sdlutil/sdlgraphicswindow.cpp index c2cf2536e..de82ca850 100644 --- a/components/sdlutil/sdlgraphicswindow.cpp +++ b/components/sdlutil/sdlgraphicswindow.cpp @@ -92,9 +92,18 @@ void GraphicsWindowSDL2::init() SDL_GLContext oldCtx = SDL_GL_GetCurrentContext(); #if defined(OPENGL_ES) || defined(ANDROID) - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); + int major = 1; + int minor = 1; + char *ver = getenv("OPENMW_GLES_VERSION"); + + if (ver && strcmp(ver, "2") == 0) { + major = 2; + minor = 0; + } + + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, major); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minor); #endif mContext = SDL_GL_CreateContext(mWindow); From 8d44d3124e714f4c53fb71e6111b09c990b85238 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Thu, 18 Jan 2018 21:18:31 -0500 Subject: [PATCH 04/28] Android: Add callbacks for basic cursor handling. --- apps/openmw/android_main.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/apps/openmw/android_main.c b/apps/openmw/android_main.c index 132e8ecf8..3f28afa1b 100644 --- a/apps/openmw/android_main.c +++ b/apps/openmw/android_main.c @@ -2,6 +2,8 @@ int stderr = 0; // Hack: fix linker error #include "SDL_main.h" #include +#include +#include /******************************************************************************* Functions called by JNI @@ -15,6 +17,25 @@ extern int argcData; extern const char **argvData; void releaseArgv(); + +int Java_org_libsdl_app_SDLActivity_getMouseX(JNIEnv *env, jclass cls, jobject obj) { + int ret = 0; + SDL_GetMouseState(&ret, NULL); + return ret; +} + + +int Java_org_libsdl_app_SDLActivity_getMouseY(JNIEnv *env, jclass cls, jobject obj) { + int ret = 0; + SDL_GetMouseState(NULL, &ret); + return ret; +} + +int Java_org_libsdl_app_SDLActivity_isMouseShown(JNIEnv *env, jclass cls, jobject obj) { + return SDL_ShowCursor(SDL_QUERY); +} + + int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject obj) { From b4ec8aaf5ef3bb5f344a6a8886124a6d2d0fba28 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Sun, 21 Jan 2018 12:21:22 -0500 Subject: [PATCH 05/28] VideoState::queue_picture: ffmpeg expects a buffer of 4 pointers in sws_scale --- extern/osg-ffmpeg-videoplayer/videostate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extern/osg-ffmpeg-videoplayer/videostate.cpp b/extern/osg-ffmpeg-videoplayer/videostate.cpp index 9fd209d56..35bfca4aa 100644 --- a/extern/osg-ffmpeg-videoplayer/videostate.cpp +++ b/extern/osg-ffmpeg-videoplayer/videostate.cpp @@ -315,9 +315,9 @@ int VideoState::queue_picture(AVFrame *pFrame, double pts) vp->pts = pts; vp->data.resize((*this->video_st)->codec->width * (*this->video_st)->codec->height * 4); - uint8_t *dst = &vp->data[0]; + uint8_t *dst[4] = { &vp->data[0], nullptr, nullptr, nullptr }; sws_scale(this->sws_context, pFrame->data, pFrame->linesize, - 0, (*this->video_st)->codec->height, &dst, this->rgbaFrame->linesize); + 0, (*this->video_st)->codec->height, dst, this->rgbaFrame->linesize); // now we inform our display thread that we have a pic ready this->pictq_windex = (this->pictq_windex+1) % VIDEO_PICTURE_ARRAY_SIZE; From 9e9f6f31329e360ad675c6d31dd1ae0df99ab510 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Sun, 21 Jan 2018 23:25:54 -0500 Subject: [PATCH 06/28] loadtes3: don't pack() non-POD structs --- components/esm/loadtes3.hpp | 50 +++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/components/esm/loadtes3.hpp b/components/esm/loadtes3.hpp index f2dde4d1f..896936cf5 100644 --- a/components/esm/loadtes3.hpp +++ b/components/esm/loadtes3.hpp @@ -13,24 +13,37 @@ namespace ESM #pragma pack(push) #pragma pack(1) + struct Data + { + /* File format version. This is actually a float, the supported + versions are 1.2 and 1.3. These correspond to: + 1.2 = 0x3f99999a and 1.3 = 0x3fa66666 + */ + unsigned int version; + int type; // 0=esp, 1=esm, 32=ess (unused) + NAME32 author; // Author's name + NAME256 desc; // File description + int records; // Number of records + }; + + struct GMDT + { + float mCurrentHealth; + float mMaximumHealth; + float mHour; + unsigned char unknown1[12]; + NAME64 mCurrentCell; + unsigned char unknown2[4]; + NAME32 mPlayerName; + }; + +#pragma pack(pop) + /// \brief File header record struct Header { static const int CurrentFormat = 0; // most recent known format - struct Data - { - /* File format version. This is actually a float, the supported - versions are 1.2 and 1.3. These correspond to: - 1.2 = 0x3f99999a and 1.3 = 0x3fa66666 - */ - unsigned int version; - int type; // 0=esp, 1=esm, 32=ess (unused) - NAME32 author; // Author's name - NAME256 desc; // File description - int records; // Number of records - }; - // Defines another files (esm or esp) that this file depends upon. struct MasterData { @@ -39,16 +52,6 @@ namespace ESM int index; // Position of the parent file in the global list of loaded files }; - struct GMDT - { - float mCurrentHealth; - float mMaximumHealth; - float mHour; - unsigned char unknown1[12]; - NAME64 mCurrentCell; - unsigned char unknown2[4]; - NAME32 mPlayerName; - }; GMDT mGameData; // Used in .ess savegames only std::vector mSCRD; // Used in .ess savegames only, unknown std::vector mSCRS; // Used in .ess savegames only, screenshot @@ -62,7 +65,6 @@ namespace ESM void load (ESMReader &esm); void save (ESMWriter &esm); }; -#pragma pack(pop) } From 8837046d9c47f765cf404fd1eb92d1836acad340 Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Sun, 28 Jan 2018 22:49:49 -0600 Subject: [PATCH 07/28] Adding panel for advanced settings.cfg options --- apps/launcher/CMakeLists.txt | 4 + apps/launcher/advancedpage.cpp | 89 ++++++ apps/launcher/advancedpage.hpp | 32 ++ apps/launcher/maindialog.cpp | 17 +- apps/launcher/maindialog.hpp | 2 + .../icons/tango/48x48/emblem-system.png | Bin 0 -> 3423 bytes files/launcher/launcher.qrc | 3 +- files/ui/advancedpage.ui | 286 ++++++++++++++++++ files/ui/mainwindow.ui | 4 +- 9 files changed, 430 insertions(+), 7 deletions(-) create mode 100644 apps/launcher/advancedpage.cpp create mode 100644 apps/launcher/advancedpage.hpp create mode 100644 files/launcher/icons/tango/48x48/emblem-system.png create mode 100644 files/ui/advancedpage.ui diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt index aac076404..aec8c2533 100644 --- a/apps/launcher/CMakeLists.txt +++ b/apps/launcher/CMakeLists.txt @@ -6,6 +6,7 @@ set(LAUNCHER playpage.cpp textslotmsgbox.cpp settingspage.cpp + advancedpage.cpp utils/profilescombobox.cpp utils/textinputdialog.cpp @@ -21,6 +22,7 @@ set(LAUNCHER_HEADER playpage.hpp textslotmsgbox.hpp settingspage.hpp + advancedpage.hpp utils/profilescombobox.hpp utils/textinputdialog.hpp @@ -35,6 +37,7 @@ set(LAUNCHER_HEADER_MOC playpage.hpp textslotmsgbox.hpp settingspage.hpp + advancedpage.hpp utils/textinputdialog.hpp utils/profilescombobox.hpp @@ -49,6 +52,7 @@ set(LAUNCHER_UI ${CMAKE_SOURCE_DIR}/files/ui/playpage.ui ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui ${CMAKE_SOURCE_DIR}/files/ui/settingspage.ui + ${CMAKE_SOURCE_DIR}/files/ui/advancedpage.ui ) source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER}) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp new file mode 100644 index 000000000..da142ff26 --- /dev/null +++ b/apps/launcher/advancedpage.cpp @@ -0,0 +1,89 @@ +#include "advancedpage.hpp" + +#include + +Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg, Settings::Manager &engineSettings, QWidget *parent) + : QWidget(parent) + , mCfgMgr(cfg) + , mEngineSettings(engineSettings) +{ + setObjectName ("AdvancedPage"); + setupUi(this); + + loadSettings(); +} + +bool Launcher::AdvancedPage::loadSettings() +{ + // Game Settings + loadSettingBool(canLootDuringDeathAnimationCheckBox, "can loot during death animation", "Game"); + 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(showMeleeInfoCheckBox, "show melee info", "Game"); + loadSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game"); + + // Expected values are (0, 1, 2, 3) + int showOwnedIndex = mEngineSettings.getInt("show owned", "Game"); + // Match the index with the option. Will default to 0 if invalid. + if (showOwnedIndex >= 0 && showOwnedIndex <= 3) + showOwnedComboBox->setCurrentIndex(showOwnedIndex); + + // Input Settings + loadSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input"); + loadSettingBool(grabCursorCheckBox, "grab cursor", "Input"); + loadSettingBool(toggleSneakCheckBox, "toggle sneak", "Input"); + + // Other Settings + loadSettingBool(timePlayedCheckbox, "timeplayed", "Saves"); + + QString screenshotFormatString = QString::fromStdString(mEngineSettings.getString("screenshot format", "General")).toUpper(); + if (screenshotFormatComboBox->findText(screenshotFormatString) == -1) + screenshotFormatComboBox->addItem(screenshotFormatString); + screenshotFormatComboBox->setCurrentText(screenshotFormatString); + + return true; +} + +void Launcher::AdvancedPage::saveSettings() +{ + // Ensure we only set the new settings if they changed. This is to avoid cluttering the + // user settings file (which by definition should only contain settings the user has touched) + + // Game Settings + saveSettingBool(canLootDuringDeathAnimationCheckBox, "can loot during death animation", "Game"); + 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(showMeleeInfoCheckBox, "show melee info", "Game"); + saveSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game"); + + int showOwnedCurrentIndex = showOwnedComboBox->currentIndex(); + if (showOwnedCurrentIndex != mEngineSettings.getInt("show owned", "Game")) + mEngineSettings.setInt("show owned", "Game", showOwnedCurrentIndex); + + // Input Settings + saveSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input"); + saveSettingBool(grabCursorCheckBox, "grab cursor", "Input"); + saveSettingBool(toggleSneakCheckBox, "toggle sneak", "Input"); + + // Other Settings + saveSettingBool(timePlayedCheckbox, "timeplayed", "Saves"); + + std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString(); + if (screenshotFormatString != mEngineSettings.getString("screenshot format", "General")) + mEngineSettings.setString("screenshot format", "General", screenshotFormatString); +} + +void Launcher::AdvancedPage::loadSettingBool(QCheckBox *checkbox, const std::string &setting, const std::string &group) { + if (mEngineSettings.getBool(setting, group)) + checkbox->setCheckState(Qt::Checked); +} + +void Launcher::AdvancedPage::saveSettingBool(QCheckBox *checkbox, const std::string &setting, const std::string &group) { + bool cValue = checkbox->checkState(); + if (cValue != mEngineSettings.getBool(setting, group)) + mEngineSettings.setBool(setting, group, cValue); +} \ No newline at end of file diff --git a/apps/launcher/advancedpage.hpp b/apps/launcher/advancedpage.hpp new file mode 100644 index 000000000..a8361c98e --- /dev/null +++ b/apps/launcher/advancedpage.hpp @@ -0,0 +1,32 @@ +#ifndef ADVANCEDPAGE_H +#define ADVANCEDPAGE_H + +#include + +#include "ui_advancedpage.h" + +#include + +namespace Files { struct ConfigurationManager; } + +namespace Launcher +{ + class AdvancedPage : public QWidget, private Ui::AdvancedPage + { + Q_OBJECT + + public: + AdvancedPage(Files::ConfigurationManager &cfg, Settings::Manager &engineSettings, QWidget *parent = 0); + + bool loadSettings(); + void saveSettings(); + + private: + Files::ConfigurationManager &mCfgMgr; + Settings::Manager &mEngineSettings; + + void loadSettingBool(QCheckBox *checkbox, const std::string& setting, const std::string& group); + void saveSettingBool(QCheckBox *checkbox, const std::string& setting, const std::string& group); + }; +} +#endif diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp index 31da90d2f..1a210ccc5 100644 --- a/apps/launcher/maindialog.cpp +++ b/apps/launcher/maindialog.cpp @@ -2,9 +2,7 @@ #include -#include #include -#include #include #include #include @@ -12,8 +10,6 @@ #include #include #include -#include -#include #include @@ -21,6 +17,7 @@ #include "graphicspage.hpp" #include "datafilespage.hpp" #include "settingspage.hpp" +#include "advancedpage.hpp" using namespace Process; @@ -104,6 +101,12 @@ void Launcher::MainDialog::createIcons() settingsButton->setTextAlignment(Qt::AlignHCenter | Qt::AlignBottom); settingsButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + QListWidgetItem *advancedButton = new QListWidgetItem(iconWidget); + advancedButton->setIcon(QIcon::fromTheme("emblem-system")); + advancedButton->setText(tr("Advanced")); + advancedButton->setTextAlignment(Qt::AlignHCenter | Qt::AlignBottom); + advancedButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + connect(iconWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(changePage(QListWidgetItem*,QListWidgetItem*))); @@ -116,6 +119,7 @@ void Launcher::MainDialog::createPages() mDataFilesPage = new DataFilesPage(mCfgMgr, mGameSettings, mLauncherSettings, this); mGraphicsPage = new GraphicsPage(mCfgMgr, mEngineSettings, this); mSettingsPage = new SettingsPage(mCfgMgr, mGameSettings, mLauncherSettings, this); + mAdvancedPage = new AdvancedPage(mCfgMgr, mEngineSettings, this); // Set the combobox of the play page to imitate the combobox on the datafilespage mPlayPage->setProfilesModel(mDataFilesPage->profilesModel()); @@ -126,6 +130,7 @@ void Launcher::MainDialog::createPages() pagesWidget->addWidget(mDataFilesPage); pagesWidget->addWidget(mGraphicsPage); pagesWidget->addWidget(mSettingsPage); + pagesWidget->addWidget(mAdvancedPage); // Select the first page iconWidget->setCurrentItem(iconWidget->item(0), QItemSelectionModel::Select); @@ -245,6 +250,9 @@ bool Launcher::MainDialog::reloadSettings() if (!mGraphicsPage->loadSettings()) return false; + if (!mAdvancedPage->loadSettings()) + return false; + return true; } @@ -483,6 +491,7 @@ bool Launcher::MainDialog::writeSettings() mDataFilesPage->saveSettings(); mGraphicsPage->saveSettings(); mSettingsPage->saveSettings(); + mAdvancedPage->saveSettings(); QString userPath = QString::fromUtf8(mCfgMgr.getUserConfigPath().string().c_str()); QDir dir(userPath); diff --git a/apps/launcher/maindialog.hpp b/apps/launcher/maindialog.hpp index 8d0d61b8f..6d3871b7c 100644 --- a/apps/launcher/maindialog.hpp +++ b/apps/launcher/maindialog.hpp @@ -30,6 +30,7 @@ namespace Launcher class DataFilesPage; class UnshieldThread; class SettingsPage; + class AdvancedPage; enum FirstRunDialogResult { @@ -88,6 +89,7 @@ namespace Launcher GraphicsPage *mGraphicsPage; DataFilesPage *mDataFilesPage; SettingsPage *mSettingsPage; + AdvancedPage *mAdvancedPage; Process::ProcessInvoker *mGameInvoker; Process::ProcessInvoker *mWizardInvoker; diff --git a/files/launcher/icons/tango/48x48/emblem-system.png b/files/launcher/icons/tango/48x48/emblem-system.png new file mode 100644 index 0000000000000000000000000000000000000000..9a765247cac594055fb1b80c2c164680070cc9f6 GIT binary patch literal 3423 zcmV-l4WROgP)b)L-ur1ltjd#20I+m9nxVfI<2&)NPDZmA#Q`vVej4t$G~A<0IKF!tb=FynELr)RpWyY55WLwh`9n}jRrQJ34(Rlon!Pd)Y2*aZI%t*NQ$SB~TS z#I|jX5CTGoNhzJ+oHNE)^P`+gew2f`jS%v}&Ye58a5xM}l0XPi`}_OV&d$y)03N9T z=}`^_0L{(K8i3kJB!X-k8-{_3pjlE@Lx1GHZGpSNB=AujZy%RWf`(8Ly{z@stQfhIAiRInI2}0NwHY$ z0Ap;)T)5^WfHC%CMN$5X5OO^hi~Vq>&r(V^M5EC%LI`A82Bj3TEQ1h&>gs9^;Jc-s zZE9*-q-om!)YjG>Q&qK#F}7(owpm|iV`Jl6p-|{heSLiy=NuO5yK z>n+_KhcWg&Ns{&wLVotrOD_d0Dk|VO4k)FdltR-qeER99W=~H~+_vps131&r(D1*W zdG^b){LkCAZ7W-~Y84$G9>$q7XC@{lCSGBT{r(#Xh{a+*DK9Vom+jlPmzkysN-0!T zMR#|1?$)ha2_eMGLWmkl=`p|G|M-d(EBuQWFQ%21l`u^cgb+xQlz)y=iqX+g^!4?b z*REaTLWuu1P4lRtC)(6ty(-sD~{v9w(Tin+`W4jXV0F!UsF>v@AcPTw;tvVkfx@li%&lJ z;kzH%>?ZB2_aJeT~8N! z-gU<4=qNfmIwma3+6zFGVx%((0D$)P_CG%N+;bZ#rF9DyERemKWj1enz3zqfu9d={ z2_dj;8>dd4%9y74Dr2mBCcZiC1D0jI*45QTIp@$cZB}m=!n>X=^mMVGDW$k^;|46t zx^n2yq4Tq`%}D?uUfe0bK{ zY1R;GZf@2r%WB=RV@Jg2^G(S_h46}^K+`m&(`j74e%2<%)Ud&K=XXZMmYN zLQ+)~ob!?)WZO0rMSy9L@`9Y;61wO6gNVi20#V$gHlecB0X! zFB*+1b#-;%oKJ&ychy`jhZ84GjG3l6pD~u1?X5D#mX(#2T|aQ(K$))V`HjqLLI}8P z&bDogkB=jjN+FR*@ZsU%Tr!#LY-niMCc9n%uxsDGeR41ugd|Cddk}FqAQ#+Q4!HOG z`uc3n`LE{!KRMs6BS(&WIy^l5d?*w`Hk+LS?}m|k-`yWVp%B91usnbMe7UWyZ2|Bg zjYbqjG0V%#VOdt*BLMQAE>;e>HOt+*cMZpJF3knrZI)%V4i6980KhrVn_F6V&9W>Q zh5=pIkxVAtDxeB@aHua=Rn>7pOU1bh?#&oN2pERp02q510RYAf!{9;)>aB$eL#gn- z<2Y_ql;;J=vTWG4ozEujV)eq$wEdTtms0?>4?|A~Sr7;WRPP%v6yVlcg$cy6EC8_c z0yyWo<2b(0KKqQ<)YQmTRaJ;YBA}EOEyBDaIOkZrc(MQb_3OIW9%cN2%ZWx9iKtJ#xjgnX__I*OgIz>^Q6+*1zoIe(g zMvdjmm#dpMZ`RyN3Plh?pePDXoH&u;oUeNK-FNTI1|N&XwpCYGpWU}_pTEDqzi8MH zLJ$lF(bCdl%d&jYw(ZY^5I2Mnp9AP+jE#E*Ol!@}%~~RnSS`!)r2_{J_*GRc`X+=B z&@>HSe)*-{($dmvn&w8vSi01>jIo8XEO+nSySGx3BqS1vqA~CD`H)VharNre%MA?; zn@f#XvY310jW=?Pu`XGb|Ipvx4*=5&FV_siz_Mk_=*Ep3mnn+UefaR;7Bofmyj+=!PML|3s&j}%ZSBeps!&i&hZ1&W(YuC0dU%oszQ!SrPr?Fwf z2CcTXcIo-^=Pw;Oa^wrn`R|1gUr|aI5<;Dk@-E*0d0ECr+hOsI06c`}glJyMO=wn$gkGHMv}l z`+Pn*8jT_l2q2kEVqjok+V1OJ#Gz0KgM)((fJ=lpwL?V)=X~<+U7#SJC#Kgpm@RU+iR8-*V)vE^Q{O{V^ z+rOBJZ%zjqA;iDmyLV3+8ym}~)xzqraOc!@9f?E&qobp^fB!yoUC;0GrEGF8SeAul z%a*BL!l5X%bK!)OTiQ?2}<4bekCJG62`~Jv2^KDITDFH z6N|-u{;dQwHa5QE_xty3-n`kD%jKqd{b4|h-E#{yuK*zgbX~_Y&phL&l>QTA>^t8` zKvPrG6OttT>#kk90F_k8W$`CSpFX+oA|tY5$0M=3pX`t<3d>$Ri+ z#+Xb9`Oo_L`d}~^%!iIELen%@mIa^B2U(Vju7y(YLI@~|f=DESnwlEiyLZpYX0xcS zu7;|rc@gP!8VeULl&Y$#mi6}b{-PM?OlkDbg%B$jEm|abvj!mqnx^5#jT`)vPd-6q zWu^JlQ&0J8YHE2lqQE`#y6N%p#~+7jn&|KE=UrW0*@1z9 z+qZAu{@Jl($BrwC@*BV3zjkP7XkJ}ioicf_LVJ6=VHn09#@HvtIA=Z7H#IdKk3=G` zz4+pb{=vaP=i>L{;^}nemm&^8Vm;2J$v?SUAS=JU#Y6PK~WUtg%@5>Na-vg??N+t$|B0RRfV4neO`0F*KIhwa<9`;y6I zezAu_A?Uh}%a<=-K6>=%+b;0r)$)k2_U+rZWcBLRClZN7?D+BH=O=$}0dNW-ORa%C zJOK6R(WAe5_0?Cew6wJJrBW#gfHo<>YqERgoR3UQOe|CsC7$z-4? zNG%-CCZA=Y6@70Ab`PZ3;5m4Bq z0s(~!tyJh03Mdrf!q2%q(*Ik)1Mt}dxc05v{{b)@Ww8q+=<@&o002ovPDHLkV1mVP BtH=NV literal 0 HcmV?d00001 diff --git a/files/launcher/launcher.qrc b/files/launcher/launcher.qrc index 4f55fccd5..ddcc26e59 100644 --- a/files/launcher/launcher.qrc +++ b/files/launcher/launcher.qrc @@ -9,8 +9,9 @@ icons/tango/index.theme - icons/tango/48x48/video-display.png + icons/tango/48x48/emblem-system.png icons/tango/48x48/preferences-system.png + icons/tango/48x48/video-display.png icons/tango/16x16/document-new.png icons/tango/16x16/edit-copy.png icons/tango/16x16/edit-delete.png diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui new file mode 100644 index 000000000..426cce0f8 --- /dev/null +++ b/files/ui/advancedpage.ui @@ -0,0 +1,286 @@ + + + AdvancedPage + + + + 0 + 0 + 434 + 373 + + + + + + + <html><head/><body><p>These settings are not available in the game. <span style=" font-weight:600;">Use at your own risk!</span></p></body></html> + + + + + + + true + + + + + 0 + 0 + 393 + 437 + + + + + + + Game + + + + + + <html><head/><body><p>If this setting is true, the player is allowed to loot actors (e.g. summoned creatures) during death animation, if they are not in combat. However disposing corpses during death animation is not recommended - death counter may not be incremented, and this behaviour can break quests. This is how original Morrowind behaves.</p><p>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.</p></body></html> + + + Can loot during death animation + + + + + + + <html><head/><body><p>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.</p></body></html> + + + Followers attack on sight + + + + + + + <html><head/><body><p>Prevents merchants from equipping items that are sold to them.</p></body></html> + + + Prevent merchant equipping + + + + + + + <html><head/><body><p>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. </p><p>The default value is false.</p></body></html> + + + Show effect duration + + + + + + + <html><head/><body><p>Whether or not the chance of success will be displayed in the enchanting menu.</p><p>The default value is false.</p></body></html> + + + Show enchant chance + + + + + + + <html><head/><body><p>If this setting is true, melee weapons reach and speed will be showed on item tooltip.</p><p>The default value is false.</p></body></html> + + + Show melee info + + + + + + + <html><head/><body><p>If this setting is true, damage bonus of arrows and bolts will be showed on item tooltip.</p><p>The default value is false.</p></body></html> + + + Show projectile damage + + + + + + + <html><head/><body><p>Enable visual clues for items owned by NPCs when the crosshair is on the object.</p><p>The default value is Off.</p></body></html> + + + + -1 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Show owned: + + + + + + + + Off + + + + + Tool Tip Only + + + + + Crosshair Only + + + + + Tooltip and Crosshair + + + + + + + + + + + + + + Input + + + + + + <html><head/><body><p>Allow zooming in and out using the middle mouse wheel in third person view. This feature may not work correctly if the mouse wheel is bound to other actions, and may be triggered accidentally in some cases, so is disabled by default.</p></body></html> + + + Allow third person zoom + + + + + + + <html><head/><body><p>OpenMW will capture control of the cursor if this setting is true.</p><p>In “look mode”, OpenMW will center the cursor regardless of the value of this setting (since the cursor/crosshair is always centered in the OpenMW window). However, in GUI mode, this setting determines the behavior when the cursor is moved outside the OpenMW window. If true, the cursor movement stops at the edge of the window preventing access to other applications. If false, the cursor is allowed to move freely on the desktop.</p><p>This setting does not apply to the screen where escape has been pressed, where the cursor is never captured. Regardless of this setting “Alt-Tab” or some other operating system dependent key sequence can be used to allow the operating system to regain control of the mouse cursor. This setting interacts with the minimize on focus loss setting by affecting what counts as a focus loss. Specifically on a two-screen configuration it may be more convenient to access the second screen with setting disabled.</p><p>Note for developers: it’s desirable to have this setting disabled when running the game in a debugger, to prevent the mouse cursor from becoming unusable when the game pauses on a breakpoint.</p></body></html> + + + Grab cursor + + + + + + + <html><head/><body><p>This setting causes the behavior of the sneak key (bound to Ctrl by default) to toggle sneaking on and off rather than requiring the key to be held down while sneaking. Players that spend significant time sneaking may find the character easier to control with this option enabled. </p></body></html> + + + Toggle sneak + + + + + + + + + + Other + + + + + + <html><head/><body><p>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.</p></body></html> + + + Add "Time Played" to saves + + + + + + + <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 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Screenshot Format + + + + + + + + JPG + + + + + PNG + + + + + TGA + + + + + + + + + + + + + + + + + + + diff --git a/files/ui/mainwindow.ui b/files/ui/mainwindow.ui index 45578ef9e..13e8593e0 100644 --- a/files/ui/mainwindow.ui +++ b/files/ui/mainwindow.ui @@ -6,13 +6,13 @@ 0 0 - 635 + 720 565 - 635 + 720 565 From 04f79c34a2d68ffd1d81cc1b016757cf7c15f060 Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Sun, 28 Jan 2018 23:31:40 -0600 Subject: [PATCH 08/28] Fixing typo "Tooltip" -> "Tool Tip" --- files/ui/advancedpage.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 426cce0f8..39bb58758 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -156,7 +156,7 @@ - Tooltip and Crosshair + Tool Tip and Crosshair From 25a6a67508f777d326fcfab105f8509cbb62cda9 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Mon, 29 Jan 2018 19:44:12 +0000 Subject: [PATCH 09/28] Fix the optimizer messing up LOD node's children (Fixes #4301) --- components/sceneutil/optimizer.cpp | 13 +++++++++++++ components/sceneutil/optimizer.hpp | 2 ++ 2 files changed, 15 insertions(+) diff --git a/components/sceneutil/optimizer.cpp b/components/sceneutil/optimizer.cpp index e7d5b3a40..b86744599 100644 --- a/components/sceneutil/optimizer.cpp +++ b/components/sceneutil/optimizer.cpp @@ -800,6 +800,13 @@ bool Optimizer::RemoveRedundantNodesVisitor::isOperationPermissible(osg::Node& n isOperationPermissibleForObject(&node); } +void Optimizer::RemoveRedundantNodesVisitor::apply(osg::LOD& lod) +{ + // don't remove any direct children of the LOD because they are used to define each LOD level. + for (unsigned int i=0; i Date: Mon, 29 Jan 2018 21:14:31 -0600 Subject: [PATCH 10/28] Replacing Qt5-only method with Qt4-compatible code --- apps/launcher/advancedpage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index da142ff26..779556df7 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -41,7 +41,7 @@ bool Launcher::AdvancedPage::loadSettings() QString screenshotFormatString = QString::fromStdString(mEngineSettings.getString("screenshot format", "General")).toUpper(); if (screenshotFormatComboBox->findText(screenshotFormatString) == -1) screenshotFormatComboBox->addItem(screenshotFormatString); - screenshotFormatComboBox->setCurrentText(screenshotFormatString); + screenshotFormatComboBox->setCurrentIndex(screenshotFormatComboBox->findText(screenshotFormatString)); return true; } From b1b8e3156253f45c8f1eeaf81bbe537df765ad74 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Tue, 30 Jan 2018 22:05:16 +0000 Subject: [PATCH 11/28] Use unique_ptr over new/delete (Fixes #4305) --- apps/openmw/mwworld/worldimp.cpp | 36 +++++++++++++------------------- apps/openmw/mwworld/worldimp.hpp | 11 +++++----- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index d8f801420..02e0737ee 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -148,16 +148,16 @@ namespace MWWorld ToUTF8::Utf8Encoder* encoder, const std::map& fallbackMap, int activationDistanceOverride, const std::string& startCell, const std::string& startupScript, const std::string& resourcePath, const std::string& userDataPath) - : mResourceSystem(resourceSystem), mFallback(fallbackMap), mPlayer (0), mLocalScripts (mStore), + : mResourceSystem(resourceSystem), mFallback(fallbackMap), mLocalScripts (mStore), mSky (true), mCells (mStore, mEsm), mGodMode(false), mScriptsEnabled(true), mContentFiles (contentFiles), mUserDataPath(userDataPath), mActivationDistanceOverride (activationDistanceOverride), mStartupScript(startupScript), mStartCell (startCell), mDistanceToFacedObject(-1), mTeleportEnabled(true), mLevitationEnabled(true), mGoToJail(false), mDaysInPrison(0), mSpellPreloadTimer(0.f) { - mPhysics = new MWPhysics::PhysicsSystem(resourceSystem, rootNode); - mRendering = new MWRender::RenderingManager(viewer, rootNode, resourceSystem, workQueue, &mFallback, resourcePath); - mProjectileManager.reset(new ProjectileManager(mRendering->getLightRoot(), resourceSystem, mRendering, mPhysics)); + mPhysics.reset(new MWPhysics::PhysicsSystem(resourceSystem, rootNode)); + mRendering.reset(new MWRender::RenderingManager(viewer, rootNode, resourceSystem, workQueue, &mFallback, resourcePath)); + mProjectileManager.reset(new ProjectileManager(mRendering->getLightRoot(), resourceSystem, mRendering.get(), mPhysics.get())); mRendering->preloadCommonAssets(); @@ -189,9 +189,9 @@ namespace MWWorld mSwimHeightScale = mStore.get().find("fSwimHeightScale")->getFloat(); - mWeatherManager = new MWWorld::WeatherManager(*mRendering, mFallback, mStore); + mWeatherManager.reset(new MWWorld::WeatherManager(*mRendering, mFallback, mStore)); - mWorldScene = new Scene(*mRendering, mPhysics); + mWorldScene.reset(new Scene(*mRendering.get(), mPhysics.get())); } void World::fillGlobalVariables() @@ -224,8 +224,8 @@ namespace MWWorld // we don't want old weather to persist on a new game // Note that if reset later, the initial ChangeWeather that the chargen script calls will be lost. - delete mWeatherManager; - mWeatherManager = new MWWorld::WeatherManager(*mRendering, mFallback, mStore); + mWeatherManager.reset(); + mWeatherManager.reset(new MWWorld::WeatherManager(*mRendering.get(), mFallback, mStore)); if (!bypass) { @@ -492,12 +492,6 @@ namespace MWWorld { // Must be cleared before mRendering is destroyed mProjectileManager->clear(); - delete mWeatherManager; - delete mWorldScene; - delete mRendering; - delete mPhysics; - - delete mPlayer; } const ESM::Cell *World::getExterior (const std::string& cellName) const @@ -2214,7 +2208,7 @@ namespace MWWorld { const ESM::NPC *player = mStore.get().find("player"); if (!mPlayer) - mPlayer = new MWWorld::Player(player); + mPlayer.reset(new MWWorld::Player(player)); else { // Remove the old CharacterController @@ -3478,17 +3472,17 @@ namespace MWWorld if (MWMechanics::isSummoningEffect(it->mEffectID)) { - preload(mWorldScene, mStore, "VFX_Summon_Start"); - preload(mWorldScene, mStore, MWMechanics::getSummonedCreature(it->mEffectID)); + preload(mWorldScene.get(), mStore, "VFX_Summon_Start"); + preload(mWorldScene.get(), mStore, MWMechanics::getSummonedCreature(it->mEffectID)); } - preload(mWorldScene, mStore, effect->mCasting); - preload(mWorldScene, mStore, effect->mHit); + preload(mWorldScene.get(), mStore, effect->mCasting); + preload(mWorldScene.get(), mStore, effect->mHit); if (it->mArea > 0) - preload(mWorldScene, mStore, effect->mArea); + preload(mWorldScene.get(), mStore, effect->mArea); if (it->mRange == ESM::RT_Target) - preload(mWorldScene, mStore, effect->mBolt); + preload(mWorldScene.get(), mStore, effect->mBolt); } } diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index 7af7b2968..02b3756d5 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -74,17 +74,11 @@ namespace MWWorld Resource::ResourceSystem* mResourceSystem; Fallback::Map mFallback; - MWRender::RenderingManager* mRendering; - MWWorld::WeatherManager* mWeatherManager; - - MWWorld::Scene *mWorldScene; - MWWorld::Player *mPlayer; std::vector mEsm; MWWorld::ESMStore mStore; LocalScripts mLocalScripts; MWWorld::Globals mGlobalVariables; - MWPhysics::PhysicsSystem *mPhysics; bool mSky; ESM::Variant* mGameHour; @@ -98,6 +92,11 @@ namespace MWWorld std::string mCurrentWorldSpace; + std::unique_ptr mPlayer; + std::unique_ptr mPhysics; + std::unique_ptr mRendering; + std::unique_ptr mWorldScene; + std::unique_ptr mWeatherManager; std::shared_ptr mProjectileManager; bool mGodMode; From cc0f7d19dcb4e11dbbdcf6df86785a13797b6f99 Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Fri, 2 Feb 2018 12:09:25 -0600 Subject: [PATCH 12/28] Removing "Use these settings at your own risk" --- files/ui/advancedpage.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 39bb58758..34fa8cf24 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -14,7 +14,7 @@ - <html><head/><body><p>These settings are not available in the game. <span style=" font-weight:600;">Use at your own risk!</span></p></body></html> + <html><head/><body><p>These settings are not available in the game.</p></body></html> From a78acbac8599005b8ab5d2ef6818936faa6d2d1b Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Sun, 4 Feb 2018 13:38:11 -0600 Subject: [PATCH 13/28] Changing page description to address Zini's concerns --- files/ui/advancedpage.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 34fa8cf24..8a0795d34 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -12,9 +12,9 @@ - + - <html><head/><body><p>These settings are not available in the game.</p></body></html> + <html><head/><body><p>This temporary page contains new settings that will be available in-game in a post-1.0 release of OpenMW.</p></body></html> From 86c25f5dba5c384df911fef539bd36af5f94d7fd Mon Sep 17 00:00:00 2001 From: uramer Date: Fri, 9 Feb 2018 01:53:52 +0100 Subject: [PATCH 14/28] 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 15/28] 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 f626a7fcc74c9d91e7843dcd290c43288058bb83 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 10 Feb 2018 17:58:30 +0400 Subject: [PATCH 16/28] Take in account PC rank during disposition calculation (bug #4322) --- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index b51b55421..bd5fa1b11 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -566,9 +566,16 @@ namespace MWMechanics { std::string itFaction = playerFactionIt->first; + // Ignore the faction, if a player was expelled from it. + if (playerStats.getExpelled(itFaction)) + continue; + int itReaction = MWBase::Environment::get().getDialogueManager()->getFactionReaction(npcFaction, itFaction); if (playerFactionIt == playerStats.getFactionRanks().begin() || itReaction < reaction) + { reaction = static_cast(itReaction); + rank = playerFactionIt->second; + } } } else From f28024b54151b662d9ae3fadade0187492766698 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Sat, 10 Feb 2018 23:11:03 +0000 Subject: [PATCH 17/28] Don't use Activate and Move keys for GUI navigation if bound to mouse buttons (Fixes #4225, Fixes #4320) --- apps/openmw/mwinput/inputmanagerimp.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 400dd7213..3b4ff25a0 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -174,10 +174,25 @@ namespace MWInput } } + bool isLeftOrRightButton(int action, ICS::InputControlSystem* ics, int deviceId, bool joystick) + { + int mouseBinding = ics->getMouseButtonBinding(ics->getControl(action), ICS::Control::INCREASE); + if (mouseBinding != ICS_MAX_DEVICE_BUTTONS) + return true; + int buttonBinding = ics->getJoystickButtonBinding(ics->getControl(action), deviceId, ICS::Control::INCREASE); + if (joystick && (buttonBinding == 0 || buttonBinding == 1)) + return true; + return false; + } + void InputManager::handleGuiArrowKey(int action) { if (SDL_IsTextInputActive()) return; + + if (isLeftOrRightButton(action, mInputBinder, mFakeDeviceID, mJoystickLastUsed)) + return; + MyGUI::KeyCode key; switch (action) { @@ -1115,7 +1130,7 @@ namespace MWInput { if (MWBase::Environment::get().getWindowManager()->isGuiMode()) { - if (!SDL_IsTextInputActive()) + if (!SDL_IsTextInputActive() && !isLeftOrRightButton(A_Activate, mInputBinder, mFakeDeviceID, mJoystickLastUsed)) MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Return, 0); } else if (mControlSwitch["playercontrols"]) From 899d464b0df6811d0a0c544d30da31807b1fdc8a Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Sat, 10 Feb 2018 23:14:41 +0000 Subject: [PATCH 18/28] Cap the rain emitter's frame time (Fixes #4314) --- apps/openmw/mwrender/sky.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index 6c599fc3f..2e4329f69 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -1203,6 +1203,18 @@ void SkyManager::create() mCreated = true; } +class RainCounter : public osgParticle::ConstantRateCounter +{ +public: + virtual int numParticlesToCreate(double dt) const + { + // limit dt to avoid large particle emissions if there are jumps in the simulation time + // 0.2 seconds is the same cap as used in Engine's frame loop + dt = std::min(dt, 0.2); + return ConstantRateCounter::numParticlesToCreate(dt); + } +}; + class RainShooter : public osgParticle::Shooter { public: @@ -1473,7 +1485,7 @@ void SkyManager::createRain() placer->setZRange(300, 300); emitter->setPlacer(placer); - osg::ref_ptr counter (new osgParticle::ConstantRateCounter); + osg::ref_ptr counter (new RainCounter); counter->setNumberOfParticlesPerSecondToCreate(600.0); emitter->setCounter(counter); 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 19/28] 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 20/28] 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) { - mTimeAvailable = time; + mMinimumTimeAvailable = time; +} + +void CompositeMapRenderer::setTargetFrameRate(float framerate) +{ + 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 21/28] 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 22/28] 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 99360e132f9c73b30eed8d176ddc6bb630dce5a0 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 18 Feb 2018 16:01:50 +0300 Subject: [PATCH 23/28] 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 24/28] 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 25/28] 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 26/28] 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 27/28] 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 + x = 0.015 - y = 0.4275 + y = 0.54 - h = 0.6225 - - 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 28/28] 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)