Merge branch 'master' into next

Conflicts:
	apps/openmw/mwworld/weather.cpp
	components/fileorderlist/model/datafilesmodel.cpp
This commit is contained in:
scrawl 2013-03-20 02:29:03 +01:00
commit 6c1ff8caca
24 changed files with 326 additions and 164 deletions

View file

@ -15,7 +15,7 @@ include (OpenMWMacros)
# Version # Version
set (OPENMW_VERSION_MAJOR 0) set (OPENMW_VERSION_MAJOR 0)
set (OPENMW_VERSION_MINOR 21) set (OPENMW_VERSION_MINOR 22)
set (OPENMW_VERSION_RELEASE 0) set (OPENMW_VERSION_RELEASE 0)
set (OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VERSION_RELEASE}") set (OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VERSION_RELEASE}")
@ -257,10 +257,10 @@ set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG DEBUG=1)
# Set up Ogre plugin folder & debug suffix # Set up Ogre plugin folder & debug suffix
if (APPLE) if (APPLE)
# Ogre on OS X doesn't use "_d" suffix (see Ogre's CMakeLists.txt) # Ogre on OS X doesn't use "_d" suffix (see Ogre's CMakeLists.txt)
add_definitions(-DOGRE_PLUGIN_DEBUG_SUFFIX="") add_definitions(-DOGRE_PLUGIN_DEBUG_SUFFIX="")
else () else ()
add_definitions(-DOGRE_PLUGIN_DEBUG_SUFFIX="_d") add_definitions(-DOGRE_PLUGIN_DEBUG_SUFFIX="_d")
endif() endif()
add_definitions(-DOGRE_PLUGIN_DIR_REL="${OGRE_PLUGIN_DIR_REL}") add_definitions(-DOGRE_PLUGIN_DIR_REL="${OGRE_PLUGIN_DIR_REL}")
@ -278,9 +278,9 @@ add_subdirectory(files/mygui)
# Specify build paths # Specify build paths
if (APPLE) if (APPLE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${APP_BUNDLE_DIR}/Contents/MacOS") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${APP_BUNDLE_DIR}/Contents/MacOS")
else (APPLE) else (APPLE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OpenMW_BINARY_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OpenMW_BINARY_DIR}")
endif (APPLE) endif (APPLE)
# Other files # Other files
@ -334,7 +334,7 @@ if(DPKG_PROGRAM)
#Install icon and desktop file #Install icon and desktop file
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.desktop" DESTINATION "share/applications/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw") INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.desktop" DESTINATION "share/applications/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_SOURCE_DIR}/apps/launcher/resources/images/openmw.png" DESTINATION "share/pixmaps/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw") INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/launcher/images/openmw.png" DESTINATION "share/pixmaps/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
#Install global configuration files #Install global configuration files
INSTALL(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "../etc/openmw/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw") INSTALL(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "../etc/openmw/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
@ -355,7 +355,7 @@ if(DPKG_PROGRAM)
Data files from the original game is required to run it.") Data files from the original game is required to run it.")
SET(CPACK_DEBIAN_PACKAGE_NAME "openmw") SET(CPACK_DEBIAN_PACKAGE_NAME "openmw")
SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION_STRING}") SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION_STRING}")
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW bsatool;Bsatool esmtool;Esmtool omwlauncher;OMWLauncher mwiniimporter;MWiniImporter") SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW bsatool;Bsatool esmtool;Esmtool omwlauncher;OMWLauncher mwiniimporter;MWiniImporter")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.11.2), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libmpg123-0 (>= 1.12.1), libois-1.3.0 (>= 1.3.0), libopenal1 (>= 1:1.12.854), libsndfile1 (>= 1.0.23), libstdc++6 (>= 4.4.5), libuuid1 (>= 2.17.2), libqtgui4 (>= 4.7.0)") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.11.2), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libmpg123-0 (>= 1.12.1), libois-1.3.0 (>= 1.3.0), libopenal1 (>= 1:1.12.854), libsndfile1 (>= 1.0.23), libstdc++6 (>= 4.4.5), libuuid1 (>= 2.17.2), libqtgui4 (>= 4.7.0)")
SET(CPACK_DEBIAN_PACKAGE_SECTION "Games") SET(CPACK_DEBIAN_PACKAGE_SECTION "Games")
@ -384,6 +384,7 @@ if(WIN32)
"${OpenMW_SOURCE_DIR}/Daedric Font License.txt" "${OpenMW_SOURCE_DIR}/Daedric Font License.txt"
"${OpenMW_BINARY_DIR}/settings-default.cfg" "${OpenMW_BINARY_DIR}/settings-default.cfg"
"${OpenMW_BINARY_DIR}/transparency-overrides.cfg" "${OpenMW_BINARY_DIR}/transparency-overrides.cfg"
"${OpenMW_BINARY_DIR}/Release/mwiniimport.exe"
"${OpenMW_BINARY_DIR}/Release/omwlauncher.exe" "${OpenMW_BINARY_DIR}/Release/omwlauncher.exe"
"${OpenMW_BINARY_DIR}/Release/openmw.exe" "${OpenMW_BINARY_DIR}/Release/openmw.exe"
DESTINATION ".") DESTINATION ".")
@ -409,8 +410,8 @@ if(WIN32)
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.openmw.org") SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.openmw.org")
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.openmw.org") SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.openmw.org")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "omwlauncher.exe") SET(CPACK_NSIS_INSTALLED_ICON_NAME "omwlauncher.exe")
SET(CPACK_NSIS_MUI_ICON "${OpenMW_SOURCE_DIR}/apps/launcher/resources/images/openmw.ico") SET(CPACK_NSIS_MUI_ICON "${OpenMW_SOURCE_DIR}/files/launcher/images/openmw.ico")
SET(CPACK_NSIS_MUI_UNIICON "${OpenMW_SOURCE_DIR}/apps/launcher/resources/images/openmw.ico") SET(CPACK_NSIS_MUI_UNIICON "${OpenMW_SOURCE_DIR}/files/launcher/images/openmw.ico")
SET(CPACK_PACKAGE_ICON "${OpenMW_SOURCE_DIR}\\\\files\\\\openmw.bmp") SET(CPACK_PACKAGE_ICON "${OpenMW_SOURCE_DIR}\\\\files\\\\openmw.bmp")
SET(VCREDIST32 "${OpenMW_BINARY_DIR}/vcredist_x86.exe") SET(VCREDIST32 "${OpenMW_BINARY_DIR}/vcredist_x86.exe")
@ -510,10 +511,10 @@ if (WIN32)
4986 # Undocumented warning that occurs in the crtdbg.h file 4986 # Undocumented warning that occurs in the crtdbg.h file
4996 # Function was declared deprecated 4996 # Function was declared deprecated
# cause by ogre extensivly # cause by ogre extensivly
4193 # #pragma warning(pop) : no matching '#pragma warning(push)' 4193 # #pragma warning(pop) : no matching '#pragma warning(push)'
4251 # class 'XXXX' needs to have dll-interface to be used by clients of class 'YYYY' 4251 # class 'XXXX' needs to have dll-interface to be used by clients of class 'YYYY'
4275 # non dll-interface struct 'XXXX' used as base for dll-interface class 'YYYY' 4275 # non dll-interface struct 'XXXX' used as base for dll-interface class 'YYYY'
# OpenMW specific warnings # OpenMW specific warnings
4099 # Type mismatch, declared class or struct is defined with other type 4099 # Type mismatch, declared class or struct is defined with other type
@ -525,7 +526,7 @@ if (WIN32)
4309 # Variable overflow, trying to store 128 in a signed char for example 4309 # Variable overflow, trying to store 128 in a signed char for example
4355 # Using 'this' in member initialization list 4355 # Using 'this' in member initialization list
4701 # Potentially uninitialized local variable used 4701 # Potentially uninitialized local variable used
4800 # Boolean optimization warning, e.g. myBool = (myInt != 0) instead of myBool = myInt 4800 # Boolean optimization warning, e.g. myBool = (myInt != 0) instead of myBool = myInt
) )
foreach(d ${WARNINGS_DISABLE}) foreach(d ${WARNINGS_DISABLE})
@ -536,12 +537,12 @@ if (WIN32)
set_target_properties(shiny.OgrePlatform PROPERTIES COMPILE_FLAGS ${WARNINGS}) set_target_properties(shiny.OgrePlatform PROPERTIES COMPILE_FLAGS ${WARNINGS})
set_target_properties(components PROPERTIES COMPILE_FLAGS ${WARNINGS}) set_target_properties(components PROPERTIES COMPILE_FLAGS ${WARNINGS})
if (BUILD_LAUNCHER) if (BUILD_LAUNCHER)
set_target_properties(omwlauncher PROPERTIES COMPILE_FLAGS ${WARNINGS}) set_target_properties(omwlauncher PROPERTIES COMPILE_FLAGS ${WARNINGS})
endif (BUILD_LAUNCHER) endif (BUILD_LAUNCHER)
set_target_properties(openmw PROPERTIES COMPILE_FLAGS ${WARNINGS}) set_target_properties(openmw PROPERTIES COMPILE_FLAGS ${WARNINGS})
if (BUILD_BSATOOL) if (BUILD_BSATOOL)
set_target_properties(bsatool PROPERTIES COMPILE_FLAGS ${WARNINGS}) set_target_properties(bsatool PROPERTIES COMPILE_FLAGS ${WARNINGS})
endif (BUILD_BSATOOL) endif (BUILD_BSATOOL)
if (BUILD_ESMTOOL) if (BUILD_ESMTOOL)
set_target_properties(esmtool PROPERTIES COMPILE_FLAGS ${WARNINGS}) set_target_properties(esmtool PROPERTIES COMPILE_FLAGS ${WARNINGS})
endif (BUILD_ESMTOOL) endif (BUILD_ESMTOOL)
@ -666,9 +667,9 @@ if (NOT WIN32 AND NOT DPKG_PROGRAM AND NOT APPLE)
IF(BUILD_LAUNCHER) IF(BUILD_LAUNCHER)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/omwlauncher" DESTINATION "${BINDIR}" ) INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/omwlauncher" DESTINATION "${BINDIR}" )
ENDIF(BUILD_LAUNCHER) ENDIF(BUILD_LAUNCHER)
IF(BUILD_BSATOOL) IF(BUILD_BSATOOL)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/bsatool" DESTINATION "${BINDIR}" ) INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/bsatool" DESTINATION "${BINDIR}" )
ENDIF(BUILD_BSATOOL) ENDIF(BUILD_BSATOOL)
IF(BUILD_ESMTOOL) IF(BUILD_ESMTOOL)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/esmtool" DESTINATION "${BINDIR}" ) INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/esmtool" DESTINATION "${BINDIR}" )
ENDIF(BUILD_ESMTOOL) ENDIF(BUILD_ESMTOOL)
@ -680,7 +681,7 @@ if (NOT WIN32 AND NOT DPKG_PROGRAM AND NOT APPLE)
ENDIF(BUILD_OPENCS) ENDIF(BUILD_OPENCS)
# Install icon and .desktop # Install icon and .desktop
INSTALL(FILES "${OpenMW_SOURCE_DIR}/apps/launcher/resources/images/openmw.png" DESTINATION "${ICONDIR}") INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/launcher/images/openmw.png" DESTINATION "${ICONDIR}")
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.desktop" DESTINATION "${DATAROOTDIR}/applications") INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.desktop" DESTINATION "${DATAROOTDIR}/applications")
# Install global configuration files # Install global configuration files

View file

@ -12,7 +12,7 @@ set(LAUNCHER
utils/checkablemessagebox.cpp utils/checkablemessagebox.cpp
utils/textinputdialog.cpp utils/textinputdialog.cpp
launcher.rc ${CMAKE_SOURCE_DIR}/files/launcher/launcher.rc
) )
set(LAUNCHER_HEADER set(LAUNCHER_HEADER
@ -43,10 +43,10 @@ set(LAUNCHER_HEADER_MOC
) )
set(LAUNCHER_UI set(LAUNCHER_UI
../../files/ui/datafilespage.ui ${CMAKE_SOURCE_DIR}/files/ui/datafilespage.ui
../../files/ui/graphicspage.ui ${CMAKE_SOURCE_DIR}/files/ui/graphicspage.ui
../../files/ui/mainwindow.ui ${CMAKE_SOURCE_DIR}/files/ui/mainwindow.ui
../../files/ui/playpage.ui ${CMAKE_SOURCE_DIR}/files/ui/playpage.ui
) )
source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER}) source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER})

View file

@ -1,6 +1,9 @@
#include "datafilespage.hpp" #include "datafilespage.hpp"
#include <QtGui> #include <QPushButton>
#include <QMessageBox>
#include <QCheckBox>
#include <QMenu>
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>
@ -144,7 +147,7 @@ void DataFilesPage::setupDataFiles()
profilesComboBox->addItems(profiles); profilesComboBox->addItems(profiles);
// Add the current profile if empty // Add the current profile if empty
if (profilesComboBox->findText(profile) == -1) if (profilesComboBox->findText(profile) == -1 && !profile.isEmpty())
profilesComboBox->addItem(profile); profilesComboBox->addItem(profile);
if (profilesComboBox->findText(QString("Default")) == -1) if (profilesComboBox->findText(QString("Default")) == -1)

View file

@ -1,6 +1,8 @@
#include "graphicspage.hpp" #include "graphicspage.hpp"
#include <QtGui> #include <QDesktopWidget>
#include <QMessageBox>
#include <QDir>
#include <cstdlib> #include <cstdlib>
@ -257,7 +259,7 @@ QStringList GraphicsPage::getAvailableResolutions(Ogre::RenderSystem *renderer)
for (opt_it = i->second.possibleValues.begin (); for (opt_it = i->second.possibleValues.begin ();
opt_it != i->second.possibleValues.end (); opt_it++, idx++) opt_it != i->second.possibleValues.end (); opt_it++, idx++)
{ {
QRegExp resolutionRe(QString("(\\d+) x (\\d+)")); QRegExp resolutionRe(QString("(\\d+) x (\\d+).*"));
QString resolution = QString::fromStdString(*opt_it).simplified(); QString resolution = QString::fromStdString(*opt_it).simplified();
if (resolutionRe.exactMatch(resolution)) { if (resolutionRe.exactMatch(resolution)) {
@ -266,16 +268,17 @@ QStringList GraphicsPage::getAvailableResolutions(Ogre::RenderSystem *renderer)
int height = resolutionRe.cap(2).toInt(); int height = resolutionRe.cap(2).toInt();
QString aspect = getAspect(width, height); QString aspect = getAspect(width, height);
QString cleanRes = resolutionRe.cap(1) + QString(" x ") + resolutionRe.cap(2);
if (aspect == QLatin1String("16:9") || aspect == QLatin1String("16:10")) { if (aspect == QLatin1String("16:9") || aspect == QLatin1String("16:10")) {
resolution.append(tr("\t(Wide ") + aspect + ")"); cleanRes.append(tr("\t(Wide ") + aspect + ")");
} else if (aspect == QLatin1String("4:3")) { } else if (aspect == QLatin1String("4:3")) {
resolution.append(tr("\t(Standard 4:3)")); cleanRes.append(tr("\t(Standard 4:3)"));
} }
// do not add duplicate resolutions // do not add duplicate resolutions
if (!result.contains(resolution)) if (!result.contains(cleanRes))
result.append(resolution); result.append(cleanRes);
} }
} }
} }

View file

@ -1 +0,0 @@
IDI_ICON1 ICON DISCARDABLE "resources/images/openmw.ico"

View file

@ -1,6 +1,15 @@
#include "maindialog.hpp" #include "maindialog.hpp"
#include <QtGui> #include <QFontDatabase>
#include <QInputDialog>
#include <QFileDialog>
#include <QCloseEvent>
#include <QTextCodec>
#include <QProcess>
#include <QFile>
#include <QDir>
#include <QDebug>
#include "utils/checkablemessagebox.hpp" #include "utils/checkablemessagebox.hpp"
@ -113,6 +122,51 @@ void MainDialog::createPages()
bool MainDialog::showFirstRunDialog() bool MainDialog::showFirstRunDialog()
{ {
QStringList iniPaths;
foreach (const QString &path, mGameSettings.getDataDirs()) {
QDir dir(path);
dir.setPath(dir.canonicalPath()); // Resolve symlinks
if (!dir.cdUp())
continue; // Cannot move from Data Files
if (dir.exists(QString("Morrowind.ini")))
iniPaths.append(dir.absoluteFilePath(QString("Morrowind.ini")));
}
// Ask the user where the Morrowind.ini is
if (iniPaths.empty()) {
QMessageBox msgBox;
msgBox.setWindowTitle(tr("Error detecting Morrowind configuration"));
msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Cancel);
msgBox.setText(QObject::tr("<br><b>Could not find Morrowind.ini</b><br><br> \
OpenMW needs to import settings from this file.<br><br> \
Press \"Browse...\" to specify the location manually.<br>"));
QAbstractButton *dirSelectButton =
msgBox.addButton(QObject::tr("B&rowse..."), QMessageBox::ActionRole);
msgBox.exec();
QString iniFile;
if (msgBox.clickedButton() == dirSelectButton) {
iniFile = QFileDialog::getOpenFileName(
NULL,
QObject::tr("Select configuration file"),
QDir::currentPath(),
QString(tr("Morrowind configuration file (*.ini)")));
}
if (iniFile.isEmpty())
return false; // Cancel was clicked;
QFileInfo info(iniFile);
iniPaths.clear();
iniPaths.append(info.absoluteFilePath());
}
CheckableMessageBox msgBox(this); CheckableMessageBox msgBox(this);
msgBox.setWindowTitle(tr("Morrowind installation detected")); msgBox.setWindowTitle(tr("Morrowind installation detected"));
@ -120,7 +174,6 @@ bool MainDialog::showFirstRunDialog()
int size = QApplication::style()->pixelMetric(QStyle::PM_MessageBoxIconSize); int size = QApplication::style()->pixelMetric(QStyle::PM_MessageBoxIconSize);
msgBox.setIconPixmap(icon.pixmap(size, size)); msgBox.setIconPixmap(icon.pixmap(size, size));
QAbstractButton *importerButton = QAbstractButton *importerButton =
msgBox.addButton(tr("Import"), QDialogButtonBox::AcceptRole); // ActionRole doesn't work?! msgBox.addButton(tr("Import"), QDialogButtonBox::AcceptRole); // ActionRole doesn't work?!
QAbstractButton *skipButton = QAbstractButton *skipButton =
@ -129,54 +182,28 @@ bool MainDialog::showFirstRunDialog()
Q_UNUSED(skipButton); // Surpress compiler unused warning Q_UNUSED(skipButton); // Surpress compiler unused warning
msgBox.setStandardButtons(QDialogButtonBox::NoButton); msgBox.setStandardButtons(QDialogButtonBox::NoButton);
msgBox.setText(tr("<br><b>An existing Morrowind configuration was detected</b><br> \
msgBox.setText(tr("<br><b>An existing Morrowind installation was detected</b><br><br> \ <br>Would you like to import settings from Morrowind.ini?<br> \
Would you like to import settings from Morrowind.ini?<br>")); <br><b>Warning: In most cases OpenMW needs these settings to run properly</b><br>"));
msgBox.setCheckBoxText(tr("Include selected masters and plugins (creates a new profile)")); msgBox.setCheckBoxText(tr("Include selected masters and plugins (creates a new profile)"));
msgBox.exec(); msgBox.exec();
if (msgBox.clickedButton() == importerButton) { if (msgBox.clickedButton() == importerButton) {
QStringList iniPaths;
foreach (const QString &path, mGameSettings.getDataDirs()) {
QDir dir(path);
dir.setPath(dir.canonicalPath()); // Resolve symlinks
if (!dir.cdUp())
continue; // Cannot move from Data Files
if (dir.exists(QString("Morrowind.ini")))
iniPaths.append(dir.absoluteFilePath(QString("Morrowind.ini")));
}
if (iniPaths.isEmpty()) {
QMessageBox msgBox;
msgBox.setWindowTitle(tr("Error reading Morrowind configuration file"));
msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(QObject::tr("<br><b>Could not find Morrowind.ini</b><br><br> \
The problem may be due to an incomplete installation of Morrowind.<br> \
Reinstalling Morrowind may resolve the problem."));
msgBox.exec();
return false;
}
if (iniPaths.count() > 1) { if (iniPaths.count() > 1) {
// Multiple Morrowind.ini files found // Multiple Morrowind.ini files found
bool ok; bool ok;
QString path = QInputDialog::getItem(this, tr("Multiple configurations found"), QString path = QInputDialog::getItem(this, tr("Multiple configurations found"),
tr("<br><b>There are multiple Morrowind.ini files found.</b><br><br> \ tr("<br><b>There are multiple Morrowind.ini files found.</b><br><br> \
Please select the one you wish to import from:"), iniPaths, 0, false, &ok); Please select the one you wish to import from:"), iniPaths, 0, false, &ok);
if (ok && !path.isEmpty()) { if (ok && !path.isEmpty()) {
iniPaths.clear(); iniPaths.clear();
iniPaths.append(path); iniPaths.append(path);
} else { } else {
// Cancel was clicked TODO: should we abort here? // Cancel was clicked
return false; return false;
} }
} }
// Create the file if it doesn't already exist, else the importer will fail // Create the file if it doesn't already exist, else the importer will fail
@ -204,9 +231,13 @@ bool MainDialog::showFirstRunDialog()
QStringList arguments; QStringList arguments;
if (msgBox.isChecked()) if (msgBox.isChecked())
arguments.append(QString("-g")); arguments.append(QString("--game-files"));
arguments.append(QString("--encoding"));
arguments.append(mGameSettings.value(QString("encoding"), QString("win1252")));
arguments.append(QString("--ini"));
arguments.append(iniPaths.first()); arguments.append(iniPaths.first());
arguments.append(QString("--cfg"));
arguments.append(path); arguments.append(path);
if (!startProgram(QString("mwiniimport"), arguments, false)) if (!startProgram(QString("mwiniimport"), arguments, false))
@ -218,7 +249,7 @@ bool MainDialog::showFirstRunDialog()
// Add a new profile // Add a new profile
if (msgBox.isChecked()) { if (msgBox.isChecked()) {
mLauncherSettings.setValue(QString("Profiles/CurrentProfile"), QString("Imported")); mLauncherSettings.setValue(QString("Profiles/currentprofile"), QString("Imported"));
mLauncherSettings.remove(QString("Profiles/Imported/master")); mLauncherSettings.remove(QString("Profiles/Imported/master"));
mLauncherSettings.remove(QString("Profiles/Imported/plugin")); mLauncherSettings.remove(QString("Profiles/Imported/plugin"));
@ -659,7 +690,7 @@ bool MainDialog::startProgram(const QString &name, const QStringList &arguments,
return false; return false;
} }
if (process.exitCode() != 0) { if (process.exitCode() != 0 || process.exitStatus() == QProcess::CrashExit) {
QString error(process.readAllStandardError()); QString error(process.readAllStandardError());
error.append(tr("\nArguments:\n")); error.append(tr("\nArguments:\n"));
error.append(arguments.join(" ")); error.append(arguments.join(" "));

View file

@ -1,6 +1,10 @@
#include "playpage.hpp" #include "playpage.hpp"
#include <QtGui> #include <QListView>
#ifdef Q_OS_MAC
#include <QPlastiqueStyle>
#endif
PlayPage::PlayPage(QWidget *parent) : QWidget(parent) PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
{ {

View file

@ -241,7 +241,7 @@ namespace MWDialogue
} }
} }
void DialogueManager::executeTopic (const std::string& topic) void DialogueManager::executeTopic (const std::string& topic, bool randomResponse)
{ {
Filter filter (mActor, mChoice, mTalkedTo); Filter filter (mActor, mChoice, mTalkedTo);
@ -256,7 +256,7 @@ namespace MWDialogue
if (!infos.empty()) if (!infos.empty())
{ {
const ESM::DialInfo* info = infos[std::rand() % infos.size()]; const ESM::DialInfo* info = infos[randomResponse ? std::rand() % infos.size() : 0];
parseText (info->mResponse); parseText (info->mResponse);
@ -505,7 +505,7 @@ namespace MWDialogue
text = "Bribe"; text = "Bribe";
} }
executeTopic (text + (success ? " Success" : " Fail")); executeTopic (text + (success ? " Success" : " Fail"), true);
} }
int DialogueManager::getTemporaryDispositionChange() const int DialogueManager::getTemporaryDispositionChange() const

View file

@ -48,7 +48,7 @@ namespace MWDialogue
void printError (const std::string& error); void printError (const std::string& error);
void executeTopic (const std::string& topic); void executeTopic (const std::string& topic, bool randomResponse=false);
public: public:

View file

@ -674,9 +674,6 @@ void CharacterCreation::showClassQuestionDialog()
void CharacterCreation::onGenerateClassBack() void CharacterCreation::onGenerateClassBack()
{ {
if(mCreationStage < CSE_ClassChosen)
mCreationStage = CSE_ClassChosen;
mWM->removeDialog(mGenerateClassResultDialog); mWM->removeDialog(mGenerateClassResultDialog);
mGenerateClassResultDialog = 0; mGenerateClassResultDialog = 0;

View file

@ -454,10 +454,13 @@ namespace MWGui
mAvailableEffectsList->clear (); mAvailableEffectsList->clear ();
int i=0;
for (std::vector<short>::const_iterator it = knownEffects.begin(); it != knownEffects.end(); ++it) for (std::vector<short>::const_iterator it = knownEffects.begin(); it != knownEffects.end(); ++it)
{ {
mAvailableEffectsList->addItem(MWBase::Environment::get().getWorld ()->getStore ().get<ESM::GameSetting>().find( mAvailableEffectsList->addItem(MWBase::Environment::get().getWorld ()->getStore ().get<ESM::GameSetting>().find(
ESM::MagicEffect::effectIdToString (*it))->getString()); ESM::MagicEffect::effectIdToString (*it))->getString());
mButtonMapping[i] = *it;
++i;
} }
mAvailableEffectsList->adjustSize (); mAvailableEffectsList->adjustSize ();
@ -466,7 +469,6 @@ namespace MWGui
std::string name = MWBase::Environment::get().getWorld ()->getStore ().get<ESM::GameSetting>().find( std::string name = MWBase::Environment::get().getWorld ()->getStore ().get<ESM::GameSetting>().find(
ESM::MagicEffect::effectIdToString (*it))->getString(); ESM::MagicEffect::effectIdToString (*it))->getString();
MyGUI::Widget* w = mAvailableEffectsList->getItemWidget(name); MyGUI::Widget* w = mAvailableEffectsList->getItemWidget(name);
w->setUserData(*it);
ToolTips::createMagicEffectToolTip (w, *it); ToolTips::createMagicEffectToolTip (w, *it);
} }
@ -518,7 +520,8 @@ namespace MWGui
return; return;
} }
short effectId = *sender->getUserData<short>(); int buttonId = *sender->getUserData<int>();
short effectId = mButtonMapping[buttonId];
for (std::vector<ESM::ENAMstruct>::const_iterator it = mEffects.begin(); it != mEffects.end(); ++it) for (std::vector<ESM::ENAMstruct>::const_iterator it = mEffects.begin(); it != mEffects.end(); ++it)
{ {

View file

@ -88,6 +88,8 @@ namespace MWGui
protected: protected:
std::map<int, short> mButtonMapping; // maps button ID to effect ID
Widgets::MWList* mAvailableEffectsList; Widgets::MWList* mAvailableEffectsList;
MyGUI::ScrollView* mUsedEffectsView; MyGUI::ScrollView* mUsedEffectsView;

View file

@ -187,18 +187,20 @@ namespace MWWorld
T item; T item;
item.mId = Misc::StringUtils::lowerCase(id); item.mId = Misc::StringUtils::lowerCase(id);
// delete from the static part of mShared
typename std::vector<T *>::iterator sharedIter = mShared.begin();
for (; sharedIter != (mShared.begin()+mStatic.size()); ++sharedIter) {
if((*sharedIter)->mId == item.mId) {
mShared.erase(sharedIter);
break;
}
}
typename std::map<std::string, T>::iterator it = mStatic.find(item.mId); typename std::map<std::string, T>::iterator it = mStatic.find(item.mId);
if (it != mStatic.end() && Misc::StringUtils::ciEqual(it->second.mId, id)) { if (it != mStatic.end() && Misc::StringUtils::ciEqual(it->second.mId, id)) {
// delete from the static part of mShared
typename std::vector<T *>::iterator sharedIter = mShared.begin();
typename std::vector<T *>::iterator end = sharedIter + mStatic.size();
while (sharedIter != mShared.end() && sharedIter != end) {
if((*sharedIter)->mId == item.mId) {
mShared.erase(sharedIter);
break;
}
++sharedIter;
}
mStatic.erase(it); mStatic.erase(it);
} }

View file

@ -18,7 +18,18 @@ using namespace Ogre;
using namespace MWWorld; using namespace MWWorld;
using namespace MWSound; using namespace MWSound;
#define lerp(x, y) (x * (1-factor) + y * factor) namespace
{
float lerp (float x, float y, float factor)
{
return x * (1-factor) + y * factor;
}
Ogre::ColourValue lerp (const Ogre::ColourValue& x, const Ogre::ColourValue& y, float factor)
{
return x * (1-factor) + y * factor;
}
}
void WeatherManager::setFallbackWeather(Weather& weather,const std::string& name) void WeatherManager::setFallbackWeather(Weather& weather,const std::string& name)
{ {
std::string upper=name; std::string upper=name;
@ -66,7 +77,8 @@ WeatherManager::WeatherManager(MWRender::RenderingManager* rendering,MWWorld::Fa
mSunsetTime = mFallback->getFallbackFloat("Weather_Sunset_Time"); mSunsetTime = mFallback->getFallbackFloat("Weather_Sunset_Time");
mSunriseDuration = mFallback->getFallbackFloat("Weather_Sunrise_Duration"); mSunriseDuration = mFallback->getFallbackFloat("Weather_Sunrise_Duration");
mSunsetDuration = mFallback->getFallbackFloat("Weather_Sunset_Duration"); mSunsetDuration = mFallback->getFallbackFloat("Weather_Sunset_Duration");
mWeatherUpdateTime = mFallback->getFallbackFloat("Weather_Hours_Between_Weather_Changes"); mHoursBetweenWeatherChanges = mFallback->getFallbackFloat("Weather_Hours_Between_Weather_Changes");
mWeatherUpdateTime = mHoursBetweenWeatherChanges*3600;
mThunderFrequency = mFallback->getFallbackFloat("Weather_Thunderstorm_Thunder_Frequency"); mThunderFrequency = mFallback->getFallbackFloat("Weather_Thunderstorm_Thunder_Frequency");
mThunderThreshold = mFallback->getFallbackFloat("Weather_Thunderstorm_Thunder_Threshold"); mThunderThreshold = mFallback->getFallbackFloat("Weather_Thunderstorm_Thunder_Threshold");
mThunderSoundDelay = 0.25; mThunderSoundDelay = 0.25;
@ -181,10 +193,10 @@ WeatherResult WeatherManager::getResult(const String& weather)
// fade in // fade in
float advance = 6-mHour; float advance = 6-mHour;
float factor = advance / 0.5f; float factor = advance / 0.5f;
result.mFogColor = lerp(current.mFogSunriseColor, current.mFogNightColor); result.mFogColor = lerp(current.mFogSunriseColor, current.mFogNightColor, factor);
result.mAmbientColor = lerp(current.mAmbientSunriseColor, current.mAmbientNightColor); result.mAmbientColor = lerp(current.mAmbientSunriseColor, current.mAmbientNightColor, factor);
result.mSunColor = lerp(current.mSunSunriseColor, current.mSunNightColor); result.mSunColor = lerp(current.mSunSunriseColor, current.mSunNightColor, factor);
result.mSkyColor = lerp(current.mSkySunriseColor, current.mSkyNightColor); result.mSkyColor = lerp(current.mSkySunriseColor, current.mSkyNightColor, factor);
result.mNightFade = factor; result.mNightFade = factor;
} }
else //if (mHour >= 6) else //if (mHour >= 6)
@ -192,10 +204,10 @@ WeatherResult WeatherManager::getResult(const String& weather)
// fade out // fade out
float advance = mHour-6; float advance = mHour-6;
float factor = advance / 3.f; float factor = advance / 3.f;
result.mFogColor = lerp(current.mFogSunriseColor, current.mFogDayColor); result.mFogColor = lerp(current.mFogSunriseColor, current.mFogDayColor, factor);
result.mAmbientColor = lerp(current.mAmbientSunriseColor, current.mAmbientDayColor); result.mAmbientColor = lerp(current.mAmbientSunriseColor, current.mAmbientDayColor, factor);
result.mSunColor = lerp(current.mSunSunriseColor, current.mSunDayColor); result.mSunColor = lerp(current.mSunSunriseColor, current.mSunDayColor, factor);
result.mSkyColor = lerp(current.mSkySunriseColor, current.mSkyDayColor); result.mSkyColor = lerp(current.mSkySunriseColor, current.mSkyDayColor, factor);
} }
} }
@ -216,20 +228,20 @@ WeatherResult WeatherManager::getResult(const String& weather)
// fade in // fade in
float advance = 19-mHour; float advance = 19-mHour;
float factor = (advance / 2); float factor = (advance / 2);
result.mFogColor = lerp(current.mFogSunsetColor, current.mFogDayColor); result.mFogColor = lerp(current.mFogSunsetColor, current.mFogDayColor, factor);
result.mAmbientColor = lerp(current.mAmbientSunsetColor, current.mAmbientDayColor); result.mAmbientColor = lerp(current.mAmbientSunsetColor, current.mAmbientDayColor, factor);
result.mSunColor = lerp(current.mSunSunsetColor, current.mSunDayColor); result.mSunColor = lerp(current.mSunSunsetColor, current.mSunDayColor, factor);
result.mSkyColor = lerp(current.mSkySunsetColor, current.mSkyDayColor); result.mSkyColor = lerp(current.mSkySunsetColor, current.mSkyDayColor, factor);
} }
else //if (mHour >= 19) else //if (mHour >= 19)
{ {
// fade out // fade out
float advance = mHour-19; float advance = mHour-19;
float factor = advance / 2.f; float factor = advance / 2.f;
result.mFogColor = lerp(current.mFogSunsetColor, current.mFogNightColor); result.mFogColor = lerp(current.mFogSunsetColor, current.mFogNightColor, factor);
result.mAmbientColor = lerp(current.mAmbientSunsetColor, current.mAmbientNightColor); result.mAmbientColor = lerp(current.mAmbientSunsetColor, current.mAmbientNightColor, factor);
result.mSunColor = lerp(current.mSunSunsetColor, current.mSunNightColor); result.mSunColor = lerp(current.mSunSunsetColor, current.mSunNightColor, factor);
result.mSkyColor = lerp(current.mSkySunsetColor, current.mSkyNightColor); result.mSkyColor = lerp(current.mSkySunsetColor, current.mSkyNightColor, factor);
result.mNightFade = factor; result.mNightFade = factor;
} }
} }
@ -247,19 +259,19 @@ WeatherResult WeatherManager::transition(float factor)
result.mNextCloudTexture = other.mCloudTexture; result.mNextCloudTexture = other.mCloudTexture;
result.mCloudBlendFactor = factor; result.mCloudBlendFactor = factor;
result.mCloudOpacity = lerp(current.mCloudOpacity, other.mCloudOpacity); result.mCloudOpacity = lerp(current.mCloudOpacity, other.mCloudOpacity, factor);
result.mFogColor = lerp(current.mFogColor, other.mFogColor); result.mFogColor = lerp(current.mFogColor, other.mFogColor, factor);
result.mSunColor = lerp(current.mSunColor, other.mSunColor); result.mSunColor = lerp(current.mSunColor, other.mSunColor, factor);
result.mSkyColor = lerp(current.mSkyColor, other.mSkyColor); result.mSkyColor = lerp(current.mSkyColor, other.mSkyColor, factor);
result.mAmbientColor = lerp(current.mAmbientColor, other.mAmbientColor); result.mAmbientColor = lerp(current.mAmbientColor, other.mAmbientColor, factor);
result.mSunDiscColor = lerp(current.mSunDiscColor, other.mSunDiscColor); result.mSunDiscColor = lerp(current.mSunDiscColor, other.mSunDiscColor, factor);
result.mFogDepth = lerp(current.mFogDepth, other.mFogDepth); result.mFogDepth = lerp(current.mFogDepth, other.mFogDepth, factor);
result.mWindSpeed = lerp(current.mWindSpeed, other.mWindSpeed); result.mWindSpeed = lerp(current.mWindSpeed, other.mWindSpeed, factor);
result.mCloudSpeed = lerp(current.mCloudSpeed, other.mCloudSpeed); result.mCloudSpeed = lerp(current.mCloudSpeed, other.mCloudSpeed, factor);
result.mCloudOpacity = lerp(current.mCloudOpacity, other.mCloudOpacity); result.mCloudOpacity = lerp(current.mCloudOpacity, other.mCloudOpacity, factor);
result.mGlareView = lerp(current.mGlareView, other.mGlareView); result.mGlareView = lerp(current.mGlareView, other.mGlareView, factor);
result.mNightFade = lerp(current.mNightFade, other.mNightFade); result.mNightFade = lerp(current.mNightFade, other.mNightFade, factor);
result.mNight = current.mNight; result.mNight = current.mNight;
@ -283,7 +295,7 @@ void WeatherManager::update(float duration)
if (mWeatherUpdateTime <= 0 || regionstr != mCurrentRegion) if (mWeatherUpdateTime <= 0 || regionstr != mCurrentRegion)
{ {
mCurrentRegion = regionstr; mCurrentRegion = regionstr;
mWeatherUpdateTime = mWeatherUpdateTime*3600; mWeatherUpdateTime = mHoursBetweenWeatherChanges*3600;
std::string weather = "clear"; std::string weather = "clear";

View file

@ -177,6 +177,7 @@ namespace MWWorld
float mSunriseDuration; float mSunriseDuration;
float mSunsetDuration; float mSunsetDuration;
float mWeatherUpdateTime; float mWeatherUpdateTime;
float mHoursBetweenWeatherChanges;
float mThunderFrequency; float mThunderFrequency;
float mThunderThreshold; float mThunderThreshold;
float mThunderSoundDelay; float mThunderSoundDelay;

View file

@ -1,3 +1,5 @@
#include <QTextDecoder>
#include <QTextCodec>
#include <QFileInfo> #include <QFileInfo>
#include <QDir> #include <QDir>
#include <QDebug> #include <QDebug>
@ -237,10 +239,6 @@ bool lessThanDate(const EsmFile *e1, const EsmFile *e2)
} else { } else {
return false; return false;
} }
// if (!e1->fileName().endsWith(".esm") && e2->fileName().endsWith(".esm"))
// return false;
// return e1->fileName().toLower() < e2->fileName().toLower();
} }
void DataFilesModel::sort(int column, Qt::SortOrder order) void DataFilesModel::sort(int column, Qt::SortOrder order)
@ -270,18 +268,33 @@ void DataFilesModel::addFiles(const QString &path)
filters << "*.esp" << "*.esm"; filters << "*.esp" << "*.esm";
dir.setNameFilters(filters); dir.setNameFilters(filters);
// Create a decoder for non-latin characters in esx metadata
QTextCodec *codec;
if (mEncoding == QLatin1String("win1252")) {
codec = QTextCodec::codecForName("windows-1252");
} else if (mEncoding == QLatin1String("win1251")) {
codec = QTextCodec::codecForName("windows-1251");
} else if (mEncoding == QLatin1String("win1250")) {
codec = QTextCodec::codecForName("windows-1250");
} else {
return; // This should never happen;
}
QTextDecoder *decoder = codec->makeDecoder();
foreach (const QString &path, dir.entryList()) { foreach (const QString &path, dir.entryList()) {
QFileInfo info(dir.absoluteFilePath(path)); QFileInfo info(dir.absoluteFilePath(path));
EsmFile *file = new EsmFile(path); EsmFile *file = new EsmFile(path);
try { try {
ESM::ESMReader fileReader; ESM::ESMReader fileReader;
ToUTF8::Utf8Encoder encoder (ToUTF8::calculateEncoding(mEncoding.toStdString())); ToUTF8::Utf8Encoder encoder(ToUTF8::calculateEncoding(mEncoding.toStdString()));
fileReader.setEncoder(&encoder); fileReader.setEncoder(&encoder);
fileReader.open(dir.absoluteFilePath(path).toStdString()); fileReader.open(dir.absoluteFilePath(path).toStdString());
std::vector<ESM::Header::MasterData> mlist = fileReader.getMasters(); std::vector<ESM::Header::MasterData> mlist = fileReader.getMasters();
QStringList masters; QStringList masters;
for (unsigned int i = 0; i < mlist.size(); ++i) { for (unsigned int i = 0; i < mlist.size(); ++i) {
@ -289,13 +302,13 @@ void DataFilesModel::addFiles(const QString &path)
masters.append(master); masters.append(master);
} }
file->setAuthor(QString::fromStdString(fileReader.getAuthor())); file->setAuthor(decoder->toUnicode(fileReader.getAuthor().c_str()));
file->setSize(info.size()); file->setSize(info.size());
file->setDates(info.lastModified(), info.lastRead()); file->setDates(info.lastModified(), info.lastRead());
file->setVersion(fileReader.getFVer()); file->setVersion(fileReader.getFVer());
file->setPath(info.absoluteFilePath()); file->setPath(info.absoluteFilePath());
file->setMasters(masters); file->setMasters(masters);
file->setDescription(QString::fromStdString(fileReader.getDesc())); file->setDescription(decoder->toUnicode(fileReader.getDesc().c_str()));
// Put the file in the table // Put the file in the table
@ -308,6 +321,8 @@ void DataFilesModel::addFiles(const QString &path)
} }
} }
delete decoder;
} }
QModelIndex DataFilesModel::indexFromItem(EsmFile *item) const QModelIndex DataFilesModel::indexFromItem(EsmFile *item) const

View file

@ -743,8 +743,6 @@ static Ogre::String getMaterial(const Nif::NiTriShape *shape, const Ogre::String
blend_mode += getBlendFactor((alphaFlags>>5)&0xf); blend_mode += getBlendFactor((alphaFlags>>5)&0xf);
instance->setProperty("scene_blend", sh::makeProperty(new sh::StringValue(blend_mode))); instance->setProperty("scene_blend", sh::makeProperty(new sh::StringValue(blend_mode)));
} }
else
instance->getMaterial()->setShadowCasterMaterial("openmw_shadowcaster_noalpha");
if((alphaFlags>>9)&1) if((alphaFlags>>9)&1)
{ {
@ -754,9 +752,12 @@ static Ogre::String getMaterial(const Nif::NiTriShape *shape, const Ogre::String
reject += Ogre::StringConverter::toString(alphaTest); reject += Ogre::StringConverter::toString(alphaTest);
instance->setProperty("alpha_rejection", sh::makeProperty(new sh::StringValue(reject))); instance->setProperty("alpha_rejection", sh::makeProperty(new sh::StringValue(reject)));
} }
else
instance->getMaterial()->setShadowCasterMaterial("openmw_shadowcaster_noalpha");
// Ogre usually only sorts if depth write is disabled, so we want "force" instead of "on" // Ogre usually only sorts if depth write is disabled, so we want "force" instead of "on"
instance->setProperty("transparent_sorting", sh::makeProperty(new sh::StringValue(!((alphaFlags>>13)&1) ? "force" : "off"))); instance->setProperty("transparent_sorting", sh::makeProperty(new sh::StringValue(
((alphaFlags&1) && !((alphaFlags>>13)&1)) ? "force" : "off")));
instance->setProperty("depth_check", sh::makeProperty(new sh::StringValue((depthFlags&1) ? "on" : "off"))); instance->setProperty("depth_check", sh::makeProperty(new sh::StringValue((depthFlags&1) ? "on" : "off")));
instance->setProperty("depth_write", sh::makeProperty(new sh::StringValue(((depthFlags>>1)&1) ? "on" : "off"))); instance->setProperty("depth_write", sh::makeProperty(new sh::StringValue(((depthFlags>>1)&1) ? "on" : "off")));

View file

@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "images/openmw.ico"

View file

@ -14,12 +14,21 @@
SH_START_PROGRAM SH_START_PROGRAM
{ {
#if !SH_HLSL
const float3 offset[4] = float3[4]( const float3 offset[4] = float3[4](
float3(-1.0, 0.0, 0.25), float3(-1.0, 0.0, 0.25),
float3( 1.0, 0.0, 0.25), float3( 1.0, 0.0, 0.25),
float3( 0.0,-1.0, 0.25), float3( 0.0,-1.0, 0.25),
float3( 0.0, 1.0, 0.25) float3( 0.0, 1.0, 0.25)
); );
#else
const float3 offset[4] = {
float3(-1.0, 0.0, 0.25),
float3( 1.0, 0.0, 0.25),
float3( 0.0,-1.0, 0.25),
float3( 0.0, 1.0, 0.25)
};
#endif
float fHeightPrev = DecodeHeightmap(heightPrevSampler, UV.xy + previousFrameOffset.xy + currentFrameOffset.xy); float fHeightPrev = DecodeHeightmap(heightPrevSampler, UV.xy + previousFrameOffset.xy + currentFrameOffset.xy);

View file

@ -8,12 +8,21 @@
SH_START_PROGRAM SH_START_PROGRAM
{ {
float2 offset[4] = float2[4] ( #if !SH_HLSL
vec2(-1.0, 0.0), float2 offset[4] = float2[4] (
vec2( 1.0, 0.0), float2(-1.0, 0.0),
vec2( 0.0,-1.0), float2( 1.0, 0.0),
vec2( 0.0, 1.0) float2( 0.0,-1.0),
); float2( 0.0, 1.0)
);
#else
float2 offset[4] = {
float2(-1.0, 0.0),
float2( 1.0, 0.0),
float2( 0.0,-1.0),
float2( 0.0, 1.0)
};
#endif
float fHeightL = DecodeHeightmap(heightCurrentSampler, UV.xy + offset[0]*rippleTextureSize.xy); float fHeightL = DecodeHeightmap(heightCurrentSampler, UV.xy + offset[0]*rippleTextureSize.xy);
float fHeightR = DecodeHeightmap(heightCurrentSampler, UV.xy + offset[1]*rippleTextureSize.xy); float fHeightR = DecodeHeightmap(heightCurrentSampler, UV.xy + offset[1]*rippleTextureSize.xy);

View file

@ -5,7 +5,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>575</width> <width>575</width>
<height>525</height> <height>535</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">

View file

@ -19,6 +19,9 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
</property> </property>
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>30</number> <number>30</number>
@ -40,10 +43,14 @@
border-color: rgba(0, 0, 0, 125); border-color: rgba(0, 0, 0, 125);
border-style: solid; border-style: solid;
border-radius: 2px; border-radius: 2px;
font-size: 12pt;
font-family: &quot;EB Garamond&quot;, &quot;EB Garamond 08&quot;;
color: black;
} }
/*QComboBox gets the &quot;on&quot; state when the popup is open */ /*QComboBox gets the &quot;on&quot; state when the popup is open */
#profilesComboBox:!editable:on, #ProfilesComboBox::drop-down:editable:on { #profilesComboBox:!editable:on {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 rgba(0, 0, 0, 75), stop:0 rgba(0, 0, 0, 75),
stop:0.1 rgba(0, 0, 0, 15), stop:0.1 rgba(0, 0, 0, 15),
@ -52,13 +59,9 @@
border: 1px solid rgba(0, 0, 0, 55); border: 1px solid rgba(0, 0, 0, 55);
} }
#profilesComboBox { /* shift the text when the popup opens */ #profilesComboBox:on { /* shift the text when the popup opens */
padding-top: 3px; padding-top: 3px;
padding-left: 4px; padding-left: 4px;
font-size: 12pt;
font-family: &quot;EB Garamond&quot;, &quot;EB Garamond 08&quot;;
color: black;
} }
#profilesComboBox::drop-down { #profilesComboBox::drop-down {
@ -82,7 +85,6 @@
left: 1px; left: 1px;
} }
#profilesComboBox QAbstractItemView { #profilesComboBox QAbstractItemView {
border: 0px; border: 0px;
}</string> }</string>

View file

@ -229,15 +229,6 @@ void OgreRenderer::createWindow(const std::string &title, const WindowSettings&
assert(mRoot); assert(mRoot);
mRoot->initialise(false); mRoot->initialise(false);
// create a hidden 1x1 background window to keep resources when recreating the secondary (real) window
NameValuePairList params_;
params_.insert(std::make_pair("title", title));
params_.insert(std::make_pair("FSAA", "0"));
params_.insert(std::make_pair("vsync", "false"));
params_.insert(std::make_pair("hidden", "true"));
Ogre::RenderWindow* hiddenWindow = mRoot->createRenderWindow("InactiveHidden", 1, 1, false, &params_);
hiddenWindow->setActive(false);
NameValuePairList params; NameValuePairList params;
params.insert(std::make_pair("title", title)); params.insert(std::make_pair("title", title));
params.insert(std::make_pair("FSAA", settings.fsaa)); params.insert(std::make_pair("FSAA", settings.fsaa));

View file

@ -3,7 +3,7 @@ OpenMW: A reimplementation of The Elder Scrolls III: Morrowind
OpenMW is an attempt at recreating the engine for the popular role-playing game OpenMW is an attempt at recreating the engine for the popular role-playing game
Morrowind by Bethesda Softworks. You need to own and install the original game for OpenMW to work. Morrowind by Bethesda Softworks. You need to own and install the original game for OpenMW to work.
Version: 0.21.0 Version: 0.22.0
License: GPL (see GPL3.txt for more information) License: GPL (see GPL3.txt for more information)
Website: http://www.openmw.org Website: http://www.openmw.org
@ -94,6 +94,82 @@ Allowed options:
CHANGELOG CHANGELOG
0.22.0
Bug #311: Potential infinite recursion in script compiler
Bug #355: Keyboard repeat rate (in Xorg) are left disabled after game exit.
Bug #382: Weird effect in 3rd person on water
Bug #387: Always use detailed shape for physics raycasts
Bug #420: Potion/ingredient effects do not stack
Bug #429: Parts of dwemer door not picked up correctly for activation/tooltips
Bug #434/Bug #605: Object movement between cells not properly implemented
Bug #502: Duplicate player collision model at origin
Bug #509: Dialogue topic list shifts inappropriately
Bug #513: Sliding stairs
Bug #515: Launcher does not support non-latin strings
Bug #525: Race selection preview camera wrong position
Bug #526: Attributes / skills should not go below zero
Bug #529: Class and Birthsign menus options should be preselected
Bug #530: Lock window button graphic missing
Bug #532: Missing map menu graphics
Bug #545: ESX selector does not list ESM files properly
Bug #547: Global variables of type short are read incorrectly
Bug #550: Invisible meshes collision and tooltip
Bug #551: Performance drop when loading multiple ESM files
Bug #552: Don't list CG in options if it is not available
Bug #555: Character creation windows "OK" button broken
Bug #558: Segmentation fault when Alt-tabbing with console opened
Bug #559: Dialog window should not be available before character creation is finished
Bug #560: Tooltip borders should be stretched
Bug #562: Sound should not be played when an object cannot be picked up
Bug #565: Water animation speed + timescale
Bug #572: Better Bodies' textures don't work
Bug #573: OpenMW doesn't load if TR_Mainland.esm is enabled (Tamriel Rebuilt mod)
Bug #574: Moving left/right should not cancel auto-run
Bug #575: Crash entering the Chamber of Song
Bug #576: Missing includes
Bug #577: Left Gloves Addon causes ESMReader exception
Bug #579: Unable to open container "Kvama Egg Sack"
Bug #581: Mimicking vanilla Morrowind water
Bug #583: Gender not recognized
Bug #586: Wrong char gen behaviour
Bug #587: "End" script statements with spaces don't work
Bug #589: Closing message boxes by pressing the activation key
Bug #590: Ugly Dagoth Ur rendering
Bug #591: Race selection issues
Bug #593: Persuasion response should be random
Bug #595: Footless guard
Bug #599: Waterfalls are invisible from a certain distance
Bug #600: Waterfalls rendered incorrectly, cut off by water
Bug #607: New beast bodies mod crashes
Bug #608: Crash in cell "Mournhold, Royal Palace"
Bug #611: OpenMW doesn't find some of textures used in Tamriel Rebuilt
Bug #613: Messagebox causing assert to fail
Bug #615: Meshes invisible from above water
Bug #617: Potion effects should be hidden until discovered
Bug #619: certain moss hanging from tree has rendering bug
Bug #621: Batching bloodmoon's trees
Bug #623: NiMaterialProperty alpha unhandled
Bug #628: Launcher in latest master crashes the game
Bug #633: Crash on startup: Better Heads
Bug #636: Incorrect Char Gen Menu Behavior
Feature #29: Allow ESPs and multiple ESMs
Feature #94: Finish class selection-dialogue
Feature #149: Texture Alphas
Feature #237: Run Morrowind-ini importer from launcher
Feature #286: Update Active Spell Icons
Feature #334: Swimming animation
Feature #335: Walking animation
Feature #360: Proper collision shapes for NPCs and creatures
Feature #367: Lights that behave more like original morrowind implementation
Feature #477: Special local scripting variables
Feature #528: Message boxes should close when enter is pressed under certain conditions.
Feature #543: Add bsa files to the settings imported by the ini importer
Feature #594: coordinate space and utility functions
Feature #625: Zoom in vanity mode
Task #464: Refactor launcher ESX selector into a re-usable component
Task #624: Unified implementation of type-variable sub-records
0.21.0 0.21.0
Bug #253: Dialogs don't work for Russian version of Morrowind Bug #253: Dialogs don't work for Russian version of Morrowind