Merge branch 'master' of https://github.com/zinnschlag/openmw into tgm

actorid
mckibbenta 11 years ago
commit 85b8af6262

@ -24,7 +24,6 @@ set(LAUNCHER_HEADER
graphicspage.hpp
maindialog.hpp
playpage.hpp
unshieldthread.hpp
textslotmsgbox.hpp
settings/gamesettings.hpp
@ -47,7 +46,6 @@ set(LAUNCHER_HEADER_MOC
graphicspage.hpp
maindialog.hpp
playpage.hpp
unshieldthread.hpp
textslotmsgbox.hpp
utils/checkablemessagebox.hpp

@ -216,7 +216,12 @@ namespace
else
{
if(copy)
bfs::copy_file(dir->path(), to / dir->path().filename());
{
bfs::path dest = to / dir->path().filename();
if(bfs::exists(dest))
bfs::remove_all(dest);
bfs::copy_file(dir->path(), dest);
}
else
bfs::rename(dir->path(), to / dir->path().filename());
}
@ -481,6 +486,7 @@ void UnshieldThread::run()
UnshieldThread::UnshieldThread()
{
unshield_set_log_level(0);
mMorrowindDone = false;
mTribunalDone = false;
mBloodmoonDone = false;

@ -7,7 +7,6 @@
#include <libunshield.h>
class UnshieldThread : public QThread
{
Q_OBJECT

@ -43,7 +43,8 @@ opencs_units_noqt (model/tools
opencs_units (view/doc
viewmanager view operations operation subview startup filedialog
viewmanager view operations operation subview startup filedialog newgame filewidget
adjusterwidget
)

@ -4,24 +4,35 @@
#include <QApplication>
#include <QLocalServer>
#include <QLocalSocket>
#include <QMessageBox>
#include "model/doc/document.hpp"
#include "model/world/data.hpp"
CS::Editor::Editor() : mViewManager (mDocumentManager)
{
mIpcServerName = "org.openmw.OpenCS";
mIpcServerName = "org.openmw.OpenCS";
setupDataFiles();
mNewGame.setLocalData (mLocal);
connect (&mViewManager, SIGNAL (newDocumentRequest ()), this, SLOT (createDocument ()));
connect (&mViewManager, SIGNAL (newGameRequest ()), this, SLOT (createGame ()));
connect (&mViewManager, SIGNAL (newAddonRequest ()), this, SLOT (createAddon ()));
connect (&mViewManager, SIGNAL (loadDocumentRequest ()), this, SLOT (loadDocument ()));
connect (&mViewManager, SIGNAL (editSettingsRequest()), this, SLOT (showSettings ()));
connect (&mStartup, SIGNAL (createDocument()), this, SLOT (createDocument ()));
connect (&mStartup, SIGNAL (createGame()), this, SLOT (createGame ()));
connect (&mStartup, SIGNAL (createAddon()), this, SLOT (createAddon ()));
connect (&mStartup, SIGNAL (loadDocument()), this, SLOT (loadDocument ()));
connect (&mStartup, SIGNAL (editConfig()), this, SLOT (showSettings ()));
connect (&mFileDialog, SIGNAL(openFiles()), this, SLOT(openFiles()));
connect (&mFileDialog, SIGNAL(createNewFile()), this, SLOT(createNewFile()));
setupDataFiles();
connect (&mNewGame, SIGNAL (createRequest (const boost::filesystem::path&)),
this, SLOT (createNewGame (const boost::filesystem::path&)));
}
void CS::Editor::setupDataFiles()
@ -39,26 +50,39 @@ void CS::Editor::setupDataFiles()
mCfgMgr.readConfiguration(variables, desc);
Files::PathContainer mDataDirs, mDataLocal;
Files::PathContainer dataDirs, dataLocal;
if (!variables["data"].empty()) {
mDataDirs = Files::PathContainer(variables["data"].as<Files::PathContainer>());
dataDirs = Files::PathContainer(variables["data"].as<Files::PathContainer>());
}
std::string local = variables["data-local"].as<std::string>();
if (!local.empty()) {
mDataLocal.push_back(Files::PathContainer::value_type(local));
dataLocal.push_back(Files::PathContainer::value_type(local));
}
mCfgMgr.processPaths(mDataDirs);
mCfgMgr.processPaths(mDataLocal);
mCfgMgr.processPaths (dataDirs);
mCfgMgr.processPaths (dataLocal, true);
if (!dataLocal.empty())
mLocal = dataLocal[0];
else
{
QMessageBox messageBox;
messageBox.setWindowTitle (tr ("No local data path available"));
messageBox.setIcon (QMessageBox::Critical);
messageBox.setStandardButtons (QMessageBox::Ok);
messageBox.setText(tr("<br><b>OpenCS is unable to access the local data directory. This may indicate a faulty configuration or a broken install.</b>"));
messageBox.exec();
QApplication::exit (1);
return;
}
// Set the charset for reading the esm/esp files
QString encoding = QString::fromStdString(variables["encoding"].as<std::string>());
mFileDialog.setEncoding(encoding);
Files::PathContainer dataDirs;
dataDirs.insert(dataDirs.end(), mDataDirs.begin(), mDataDirs.end());
dataDirs.insert(dataDirs.end(), mDataLocal.begin(), mDataLocal.end());
dataDirs.insert (dataDirs.end(), dataLocal.begin(), dataLocal.end());
for (Files::PathContainer::const_iterator iter = dataDirs.begin(); iter != dataDirs.end(); ++iter)
{
@ -69,10 +93,20 @@ void CS::Editor::setupDataFiles()
//load the settings into the userSettings instance.
const QString settingFileName = "opencs.cfg";
CSMSettings::UserSettings::instance().loadSettings(settingFileName);
}
void CS::Editor::createDocument()
void CS::Editor::createGame()
{
mStartup.hide();
if (mNewGame.isHidden())
mNewGame.show();
mNewGame.raise();
mNewGame.activateWindow();
}
void CS::Editor::createAddon()
{
mStartup.hide();
@ -95,7 +129,9 @@ void CS::Editor::openFiles()
files.push_back(path.toStdString());
}
CSMDoc::Document *document = mDocumentManager.addDocument(files, false);
/// \todo Get the save path from the file dialogue
CSMDoc::Document *document = mDocumentManager.addDocument (files, *files.rbegin(), false);
mViewManager.addView (document);
mFileDialog.hide();
@ -112,43 +148,70 @@ void CS::Editor::createNewFile()
files.push_back(mFileDialog.fileName().toStdString());
CSMDoc::Document *document = mDocumentManager.addDocument (files, true);
/// \todo Get the save path from the file dialogue.
CSMDoc::Document *document = mDocumentManager.addDocument (files, *files.rbegin(), true);
mViewManager.addView (document);
mFileDialog.hide();
}
void CS::Editor::createNewGame (const boost::filesystem::path& file)
{
std::vector<boost::filesystem::path> files;
files.push_back (file);
CSMDoc::Document *document = mDocumentManager.addDocument (files, file, true);
mViewManager.addView (document);
mNewGame.hide();
}
void CS::Editor::showStartup()
{
if(mStartup.isHidden())
mStartup.show();
mStartup.raise();
mStartup.activateWindow();
if(mStartup.isHidden())
mStartup.show();
mStartup.raise();
mStartup.activateWindow();
}
void CS::Editor::showSettings()
{
if (mSettings.isHidden())
mSettings.show();
mSettings.raise();
mSettings.activateWindow();
}
bool CS::Editor::makeIPCServer()
{
mServer = new QLocalServer(this);
mServer = new QLocalServer(this);
if(mServer->listen(mIpcServerName))
{
connect(mServer, SIGNAL(newConnection()), this, SLOT(showStartup()));
return true;
}
if(mServer->listen(mIpcServerName))
{
connect(mServer, SIGNAL(newConnection()), this, SLOT(showStartup()));
return true;
}
mServer->close();
return false;
mServer->close();
return false;
}
void CS::Editor::connectToIPCServer()
{
mClientSocket = new QLocalSocket(this);
mClientSocket->connectToServer(mIpcServerName);
mClientSocket->close();
mClientSocket = new QLocalSocket(this);
mClientSocket->connectToServer(mIpcServerName);
mClientSocket->close();
}
int CS::Editor::run()
{
if (mLocal.empty())
return 1;
mStartup.show();
QApplication::setQuitOnLastWindowClosed (true);

@ -9,12 +9,16 @@
#ifndef Q_MOC_RUN
#include <components/files/configurationmanager.hpp>
#endif
#include "model/settings/usersettings.hpp"
#include "model/doc/documentmanager.hpp"
#include "view/doc/viewmanager.hpp"
#include "view/doc/startup.hpp"
#include "view/doc/filedialog.hpp"
#include "model/settings/usersettings.hpp"
#include "view/doc/newgame.hpp"
#include "view/settings/usersettingsdialog.hpp"
namespace CS
{
@ -26,9 +30,13 @@ namespace CS
CSMDoc::DocumentManager mDocumentManager;
CSVDoc::ViewManager mViewManager;
CSVDoc::StartupDialogue mStartup;
CSVDoc::NewGameDialogue mNewGame;
CSVSettings::UserSettingsDialog mSettings;
FileDialog mFileDialog;
Files::ConfigurationManager mCfgMgr;
boost::filesystem::path mLocal;
void setupDataFiles();
// not implemented
@ -47,14 +55,18 @@ namespace CS
private slots:
void createDocument();
void createGame();
void createAddon();
void loadDocument();
void openFiles();
void createNewFile();
void createNewGame (const boost::filesystem::path& file);
void showStartup();
void showSettings();
private:
QString mIpcServerName;

@ -41,8 +41,8 @@ int main(int argc, char *argv[])
if(!editor.makeIPCServer())
{
editor.connectToIPCServer();
return 0;
editor.connectToIPCServer();
return 0;
}
return editor.run();

@ -2139,18 +2139,13 @@ void CSMDoc::Document::createBase()
}
}
CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files, bool new_)
: mTools (mData)
CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files,
const boost::filesystem::path& savePath, bool new_)
: mSavePath (savePath), mTools (mData)
{
if (files.empty())
throw std::runtime_error ("Empty content file sequence");
/// \todo adjust last file name:
/// \li make sure it is located in the data-local directory (adjust path if necessary)
/// \li make sure the extension matches the new scheme (change it if necesarry)
mName = files.back().filename().string();
if (new_ && files.size()==1)
createBase();
else
@ -2201,9 +2196,9 @@ int CSMDoc::Document::getState() const
return state;
}
const std::string& CSMDoc::Document::getName() const
const boost::filesystem::path& CSMDoc::Document::getSavePath() const
{
return mName;
return mSavePath;
}
void CSMDoc::Document::save()

@ -31,7 +31,7 @@ namespace CSMDoc
private:
std::string mName; ///< \todo replace name with ESX list
boost::filesystem::path mSavePath;
CSMWorld::Data mData;
CSMTools::Tools mTools;
@ -64,15 +64,16 @@ namespace CSMDoc
public:
Document (const std::vector<boost::filesystem::path>& files, bool new_);
Document (const std::vector<boost::filesystem::path>& files,
const boost::filesystem::path& savePath, bool new_);
~Document();
QUndoStack& getUndoStack();
int getState() const;
const std::string& getName() const;
///< \todo replace with ESX list
const boost::filesystem::path& getSavePath() const;
void save();

@ -14,10 +14,10 @@ CSMDoc::DocumentManager::~DocumentManager()
delete *iter;
}
CSMDoc::Document *CSMDoc::DocumentManager::addDocument (const std::vector<boost::filesystem::path>& files,
CSMDoc::Document *CSMDoc::DocumentManager::addDocument (const std::vector<boost::filesystem::path>& files, const boost::filesystem::path& savePath,
bool new_)
{
Document *document = new Document (files, new_);
Document *document = new Document (files, savePath, new_);
mDocuments.push_back (document);

@ -23,7 +23,8 @@ namespace CSMDoc
~DocumentManager();
Document *addDocument (const std::vector<boost::filesystem::path>& files, bool new_);
Document *addDocument (const std::vector<boost::filesystem::path>& files,
const boost::filesystem::path& savePath, bool new_);
///< The ownership of the returned document is not transferred to the caller.
///
/// \param new_ Do not load the last content file in \a files and instead create in an

@ -49,19 +49,31 @@ namespace CSMFilter
Token (Type type = Type_None);
Token (Type type, const std::string& string);
///< Non-string type that can also be interpreted as a string.
Token (const std::string& string);
Token (double number);
operator bool() const;
bool isString() const;
};
Token::Token (Type type) : mType (type) {}
Token::Token (Type type, const std::string& string) : mType (type), mString (string) {}
Token::Token (const std::string& string) : mType (Type_String), mString (string) {}
Token::Token (double number) : mType (Type_Number), mNumber (number) {}
bool Token::isString() const
{
return mType==Type_String || mType>=Type_Keyword_True;
}
Token::operator bool() const
{
return mType!=Type_None;
@ -120,7 +132,7 @@ CSMFilter::Token CSMFilter::Parser::getStringToken()
}
if (string[0]=='"')
string = string.substr (1, string.size()-2);
return string.substr (1, string.size()-2);
}
return checkKeywords (string);
@ -182,7 +194,7 @@ CSMFilter::Token CSMFilter::Parser::checkKeywords (const Token& token)
for (int i=0; sKeywords[i]; ++i)
if (sKeywords[i]==string || (string.size()==1 && sKeywords[i][0]==string[0]))
return Token (static_cast<Token::Type> (i+Token::Type_Keyword_True));
return Token (static_cast<Token::Type> (i+Token::Type_Keyword_True), token.mString);
return token;
}
@ -351,7 +363,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
if (static_cast<int> (token.mNumber)==token.mNumber)
columnId = static_cast<int> (token.mNumber);
}
else if (token.mType==Token::Type_String)
else if (token.isString())
{
columnId = CSMWorld::Columns::getId (token.mString);
}
@ -373,7 +385,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
// parse text pattern
token = getNextToken();
if (token.mType!=Token::Type_String)
if (!token.isString())
{
error();
return boost::shared_ptr<Node>();
@ -415,7 +427,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
if (static_cast<int> (token.mNumber)==token.mNumber)
columnId = static_cast<int> (token.mNumber);
}
else if (token.mType==Token::Type_String)
else if (token.isString())
{
columnId = CSMWorld::Columns::getId (token.mString);
}
@ -437,22 +449,22 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
// parse value
double lower = 0;
double upper = 0;
bool min = false;
bool max = false;
ValueNode::Type lowerType = ValueNode::Type_Open;
ValueNode::Type upperType = ValueNode::Type_Open;
token = getNextToken();
if (token.mType==Token::Type_Number)
{
// single value
min = max = true;
lower = upper = token.mNumber;
lowerType = upperType = ValueNode::Type_Closed;
}
else
{
// interval
if (token.mType==Token::Type_OpenSquare)
min = true;
lowerType = ValueNode::Type_Closed;
else if (token.mType!=Token::Type_CloseSquare && token.mType!=Token::Type_Open)
{
error();
@ -461,17 +473,23 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
token = getNextToken();
if (token.mType!=Token::Type_Number)
if (token.mType==Token::Type_Number)
{
error();
return boost::shared_ptr<Node>();
}
lower = token.mNumber;
lower = token.mNumber;
token = getNextToken();
token = getNextToken();
if (token.mType!=Token::Type_Comma)
if (token.mType!=Token::Type_Comma)
{
error();
return boost::shared_ptr<Node>();
}
}
else if (token.mType==Token::Type_Comma)
{
lowerType = ValueNode::Type_Infinite;
}
else
{
error();
return boost::shared_ptr<Node>();
@ -479,18 +497,20 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
token = getNextToken();
if (token.mType!=Token::Type_Number)
if (token.mType==Token::Type_Number)
{
error();
return boost::shared_ptr<Node>();
}
upper = token.mNumber;
upper = token.mNumber;
token = getNextToken();
token = getNextToken();
}
else
upperType = ValueNode::Type_Infinite;
if (token.mType==Token::Type_CloseSquare)
max = true;
{
if (upperType!=ValueNode::Type_Infinite)
upperType = ValueNode::Type_Closed;
}
else if (token.mType!=Token::Type_OpenSquare && token.mType!=Token::Type_Close)
{
error();
@ -506,7 +526,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
return boost::shared_ptr<Node>();
}
return boost::shared_ptr<Node> (new ValueNode (columnId, lower, upper, min, max));
return boost::shared_ptr<Node> (new ValueNode (columnId, lowerType, upperType, lower, upper));
}
void CSMFilter::Parser::error()
@ -553,6 +573,8 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined)
return true;
}
// We do not use isString() here, because there could be a pre-defined filter with an ID that is
// equal a filter keyword.
else if (token.mType==Token::Type_String && allowPredefined)
{
if (getNextToken()!=Token (Token::Type_EOS))

@ -28,13 +28,34 @@ bool CSMFilter::TextNode::test (const CSMWorld::IdTable& table, int row,
QVariant data = table.data (index);
if (data.type()!=QVariant::String)
QString string;
if (data.type()==QVariant::String)
{
string = data.toString();
}
else if (data.type()==QVariant::Int || data.type()==QVariant::UInt ||
CSMWorld::Columns::hasEnums (static_cast<CSMWorld::Columns::ColumnId> (mColumnId)))
{
int value = data.toInt();
std::vector<std::string> enums =
CSMWorld::Columns::getEnums (static_cast<CSMWorld::Columns::ColumnId> (mColumnId));
if (value>=0 && value<static_cast<int> (enums.size()))
string = QString::fromUtf8 (enums[value].c_str());
}
else if (data.type()==QVariant::Bool)
{
string = data.toBool() ? "true" : " false";
}
else
return false;
/// \todo make pattern syntax configurable
QRegExp regExp (QString::fromUtf8 (mText.c_str()), Qt::CaseInsensitive);
return regExp.exactMatch (data.toString());
return regExp.exactMatch (string);
}
std::vector<int> CSMFilter::TextNode::getReferencedColumns() const

@ -7,10 +7,9 @@
#include "../world/columns.hpp"
#include "../world/idtable.hpp"
CSMFilter::ValueNode::ValueNode (int columnId,
double lower, double upper, bool min, bool max)
: mColumnId (columnId), mLower (lower), mUpper (upper), mMin (min), mMax (max)
{}
CSMFilter::ValueNode::ValueNode (int columnId, Type lowerType, Type upperType,
double lower, double upper)
: mColumnId (columnId), mLowerType (lowerType), mUpperType (upperType), mLower (lower), mUpper (upper){}
bool CSMFilter::ValueNode::test (const CSMWorld::IdTable& table, int row,
const std::map<int, int>& columns) const
@ -33,10 +32,21 @@ bool CSMFilter::ValueNode::test (const CSMWorld::IdTable& table, int row,
double value = data.toDouble();
if (mLower==mUpper && mMin && mMax)
return value==mLower;
return (mMin ? value>=mLower : value>mLower) && (mMax ? value<=mUpper : value<mUpper);
switch (mLowerType)
{
case Type_Closed: if (value<mLower) return false; break;
case Type_Open: if (value<=mLower) return false; break;
case Type_Infinite: break;
}
switch (mUpperType)
{
case Type_Closed: if (value>mUpper) return false; break;
case Type_Open: if (value>=mUpper) return false; break;
case Type_Infinite: break;
}
return true;
}
std::vector<int> CSMFilter::ValueNode::getReferencedColumns() const
@ -60,10 +70,26 @@ std::string CSMFilter::ValueNode::toString (bool numericColumns) const
stream << ", \"";
if (mLower==mUpper && mMin && mMax)
if (mLower==mUpper && mLowerType!=Type_Infinite && mUpperType!=Type_Infinite)
stream << mLower;
else
stream << (mMin ? "[" : "(") << mLower << ", " << mUpper << (mMax ? "]" : ")");
{
switch (mLowerType)
{
case Type_Closed: stream << "[" << mLower; break;
case Type_Open: stream << "(" << mLower; break;
case Type_Infinite: stream << "("; break;
}
stream << ", ";
switch (mUpperType)
{
case Type_Closed: stream << mUpper << "]"; break;
case Type_Open: stream << mUpper << ")"; break;
case Type_Infinite: stream << ")"; break;
}
}
stream << ")";

@ -7,16 +7,25 @@ namespace CSMFilter
{
class ValueNode : public LeafNode
{
public:
enum Type
{
Type_Closed, Type_Open, Type_Infinite
};
private:
int mColumnId;
std::string mText;
double mLower;
double mUpper;
bool mMin;
bool mMax;
Type mLowerType;
Type mUpperType;
public:
ValueNode (int columnId, double lower, double upper, bool min, bool max);
ValueNode (int columnId, Type lowerType, Type upperType, double lower, double upper);
virtual bool test (const CSMWorld::IdTable& table, int row,
const std::map<int, int>& columns) const;

@ -3,6 +3,8 @@
#include <components/misc/stringops.hpp>
#include "universalid.hpp"
namespace CSMWorld
{
namespace Columns
@ -196,4 +198,104 @@ int CSMWorld::Columns::getId (const std::string& name)
return sNames[i].mId;
return -1;
}
namespace
{
static const char *sSpecialisations[] =
{
"Combat", "Magic", "Stealth", 0
};
static const char *sAttributes[] =
{
"Strength", "Intelligence", "Willpower", "Agility", "Speed", "Endurance", "Personality",
"Luck", 0
};
static const char *sSpellTypes[] =
{
"Spell", "Ability", "Blight", "Disease", "Curse", "Power", 0
};
static const char *sApparatusTypes[] =
{
"Mortar & Pestle", "Albemic", "Calcinator", "Retort", 0
};
static const char *sArmorTypes[] =
{
"Helmet", "Cuirass", "Left Pauldron", "Right Pauldron", "Greaves", "Boots", "Left Gauntlet",
"Right Gauntlet", "Shield", "Left Bracer", "Right Bracer", 0
};
static const char *sClothingTypes[] =
{
"Pants", "Shoes", "Shirt", "Belt", "Robe", "Right Glove", "Left Glove", "Skirt", "Ring",
"Amulet", 0
};
static const char *sCreatureTypes[] =
{
"Creature", "Deadra", "Undead", "Humanoid", 0
};
static const char *sWeaponTypes[] =
{
"Short Blade 1H", "Long Blade 1H", "Long Blade 2H", "Blunt 1H", "Blunt 2H Close",
"Blunt 2H Wide", "Spear 2H", "Axe 1H", "Axe 2H", "Bow", "Crossbow", "Thrown", "Arrow",
"Bolt", 0
};
static const char *sModificationEnums[] =
{
"Base", "Modified", "Added", "Deleted", "Deleted", 0
};
static const char *sVarTypeEnums[] =
{
"unknown", "none", "short", "integer", "long", "float", "string", 0
};
const char **getEnumNames (CSMWorld::Columns::ColumnId column)
{
switch (column)
{
case CSMWorld::Columns::ColumnId_Specialisation: return sSpecialisations;
case CSMWorld::Columns::ColumnId_Attribute: return sAttributes;
case CSMWorld::Columns::ColumnId_SpellType: return sSpellTypes;
case CSMWorld::Columns::ColumnId_ApparatusType: return sApparatusTypes;
case CSMWorld::Columns::ColumnId_ArmorType: return sArmorTypes;
case CSMWorld::Columns::ColumnId_ClothingType: return sClothingTypes;
case CSMWorld::Columns::ColumnId_CreatureType: return sCreatureTypes;
case CSMWorld::Columns::ColumnId_WeaponType: return sWeaponTypes;
case CSMWorld::Columns::ColumnId_Modification: return sModificationEnums;
case CSMWorld::Columns::ColumnId_ValueType: return sVarTypeEnums;
default: return 0;
}
}
}
bool CSMWorld::Columns::hasEnums (ColumnId column)
{
return getEnumNames (column)!=0 || column==ColumnId_RecordType;
}
std::vector<std::string> CSMWorld::Columns::getEnums (ColumnId column)
{
std::vector<std::string> enums;
if (const char **table = getEnumNames (column))
for (int i=0; table[i]; ++i)
enums.push_back (table[i]);
else if (column==ColumnId_RecordType)
{
enums.push_back (""); // none
for (int i=UniversalId::Type_None+1; i<UniversalId::NumberOfTypes; ++i)
enums.push_back (UniversalId (static_cast<UniversalId::Type> (i)).getTypeName());
}
return enums;
}

@ -2,6 +2,7 @@
#define CSM_WOLRD_COLUMNS_H
#include <string>
#include <vector>
namespace CSMWorld
{
@ -180,6 +181,11 @@ namespace CSMWorld
int getId (const std::string& name);
///< Will return -1 for an invalid name.
bool hasEnums (ColumnId column);
std::vector<std::string> getEnums (ColumnId column);
///< Returns an empty vector, if \æ column isn't an enum type column.
}
}

@ -6,10 +6,6 @@
#include "ref.hpp"
#include "cell.hpp"
CSMWorld::RefCollection::RefCollection (Collection<Cell>& cells)
: mCells (cells), mNextId (0)
{}
void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool base)
{
Record<Cell> cell = mCells.getRecord (cellIndex);

@ -16,8 +16,10 @@ namespace CSMWorld
int mNextId;
public:
RefCollection (Collection<Cell>& cells);
// MSVC needs the constructor for a class inheriting a template to be defined in header
RefCollection (Collection<Cell>& cells)
: mCells (cells), mNextId (0)
{}
void load (ESM::ESMReader& reader, int cellIndex, bool base);
///< Load a sequence of references.

@ -80,7 +80,7 @@ namespace
{ CSMWorld::UniversalId::Class_RefRecord, CSMWorld::UniversalId::Type_Static, "Static", ":./static.png" },
{ CSMWorld::UniversalId::Class_RefRecord, CSMWorld::UniversalId::Type_Weapon, "Weapon", ":./weapon.png" },
{ CSMWorld::UniversalId::Class_SubRecord, CSMWorld::UniversalId::Type_Reference, "Reference", 0 },
{ CSMWorld::UniversalId::Class_SubRecord, CSMWorld::UniversalId::Type_Filter, "Filter", 0 },
{ CSMWorld::UniversalId::Class_None, CSMWorld::UniversalId::Type_None, 0, 0 } // end marker
};
@ -90,8 +90,6 @@ namespace
{ CSMWorld::UniversalId::Class_None, CSMWorld::UniversalId::Type_None, 0, 0 } // end marker
};
static const unsigned int IDARG_SIZE = sizeof (sIdArg) / sizeof (TypeData);
}
CSMWorld::UniversalId::UniversalId (const std::string& universalId)
@ -151,6 +149,22 @@ CSMWorld::UniversalId::UniversalId (Type type) : mArgumentType (ArgumentType_Non
return;
}
for (int i=0; sIdArg[i].mName; ++i)
if (type==sIdArg[i].mType)
{
mArgumentType = ArgumentType_Id;
mClass = sIdArg[i].mClass;
return;
}
for (int i=0; sIndexArg[i].mName; ++i)
if (type==sIndexArg[i].mType)
{
mArgumentType = ArgumentType_Index;
mClass = sIndexArg[i].mClass;
return;
}
throw std::logic_error ("invalid argument-less UniversalId type");
}
@ -293,25 +307,6 @@ std::vector<CSMWorld::UniversalId::Type> CSMWorld::UniversalId::listReferenceabl
return list;
}
std::pair<int, const char *> CSMWorld::UniversalId::getIdArgPair (unsigned int index)
{
std::pair<int, const char *> retPair;
if ( index < IDARG_SIZE )
{
retPair.first = sIdArg[index].mType;
retPair.second = sIdArg[index].mName;
}
return retPair;
}
unsigned int CSMWorld::UniversalId::getIdArgSize()
{
return IDARG_SIZE;
}
bool CSMWorld::operator== (const CSMWorld::UniversalId& left, const CSMWorld::UniversalId& right)
{
return left.isEqual (right);

@ -34,7 +34,7 @@ namespace CSMWorld
enum Type
{
Type_None,
Type_None = 0,
Type_Globals,
Type_Global,
Type_VerificationResults,
@ -89,6 +89,8 @@ namespace CSMWorld
Type_Filters
};
enum { NumberOfTypes = Type_Filters+1 };
private:
Class mClass;
@ -102,7 +104,6 @@ namespace CSMWorld
UniversalId (const std::string& universalId);
UniversalId (Type type = Type_None);
///< Using a type for a non-argument-less UniversalId will throw an exception.
UniversalId (Type type, const std::string& id);
///< Using a type for a non-ID-argument UniversalId will throw an exception.
@ -134,9 +135,6 @@ namespace CSMWorld
///< Will return an empty string, if no icon is available.
static std::vector<Type> listReferenceableTypes();
static std::pair<int, const char *> getIdArgPair (unsigned int index);
static unsigned int getIdArgSize ();
};
bool operator== (const UniversalId& left, const UniversalId& right);

@ -0,0 +1,90 @@
#include "adjusterwidget.hpp"
#include <stdexcept>
#include <boost/filesystem.hpp>
#include <QHBoxLayout>
#include <QLabel>
#include <QStyle>
CSVDoc::AdjusterWidget::AdjusterWidget (QWidget *parent)
: QWidget (parent), mValid (false)
{
QHBoxLayout *layout = new QHBoxLayout (this);
mIcon = new QLabel (this);
layout->addWidget (mIcon, 0);
mMessage = new QLabel (this);
mMessage->setWordWrap (true);
mMessage->setSizePolicy (QSizePolicy (QSizePolicy::Minimum, QSizePolicy::Minimum));
layout->addWidget (mMessage, 1);
setName ("", false);
setLayout (layout);
}
void CSVDoc::AdjusterWidget::setLocalData (const boost::filesystem::path& localData)
{
mLocalData = localData;
}
boost::filesystem::path CSVDoc::AdjusterWidget::getPath() const
{
if (!mValid)
throw std::logic_error ("invalid content file path");
return mResultPath;
}
void CSVDoc::AdjusterWidget::setName (const QString& name, bool addon)
{
QString message;
if (name.isEmpty())
{
mValid = false;
message = "No name.";
}
else
{
boost::filesystem::path path (name.toUtf8().data());
path.replace_extension (addon ? ".omwaddon" : ".omwgame");
if (path.parent_path().string()==mLocalData.string())
{
// path already points to the local data directory
message = QString::fromUtf8 (("Will be saved as: " + path.native()).c_str());
mResultPath = path;
mValid = true;
}
else
{
// path points somewhere else or is a leaf name.
path = mLocalData / path.filename();
message = QString::fromUtf8 (("Will be saved as: " + path.native()).c_str());
mResultPath = path;
mValid = true;
if (boost::filesystem::exists (path))
{
/// \todo add an user setting to make this an error.
message += "<p>But a file with the same name already exists. If you continue, it will be overwritten.";
}
}
}
mMessage->setText (message);
mIcon->setPixmap (style()->standardIcon (
mValid ? QStyle::SP_MessageBoxInformation : QStyle::SP_MessageBoxWarning).
pixmap (QSize (16, 16)));
emit stateChanged (mValid);
}

@ -0,0 +1,41 @@
#ifndef CSV_DOC_ADJUSTERWIDGET_H
#define CSV_DOC_ADJUSTERWIDGET_H
#include <boost/filesystem/path.hpp>
#include <QWidget>
class QLabel;
namespace CSVDoc
{
class AdjusterWidget : public QWidget
{
Q_OBJECT
boost::filesystem::path mLocalData;
QLabel *mMessage;
QLabel *mIcon;
bool mValid;
boost::filesystem::path mResultPath;
public:
AdjusterWidget (QWidget *parent = 0);
void setLocalData (const boost::filesystem::path& localData);
boost::filesystem::path getPath() const;
///< This function must not be called if there is no valid path.
public slots:
void setName (const QString& name, bool addon);
signals:
void stateChanged (bool valid);
};
}
#endif

@ -0,0 +1,53 @@
#include "filewidget.hpp"
#include <QHBoxLayout>
#include <QLineEdit>
#include <QLabel>
#include <QRegExpValidator>
#include <QRegExp>
QString CSVDoc::FileWidget::getExtension() const
{
return mAddon ? ".omwaddon" : ".omwgame";
}
CSVDoc::FileWidget::FileWidget (QWidget *parent) : QWidget (parent), mAddon (false)
{
QHBoxLayout *layout = new QHBoxLayout (this);
mInput = new QLineEdit (this);
mInput->setValidator (new QRegExpValidator(QRegExp("^[a-zA-Z0-9\\s]*$")));
layout->addWidget (mInput, 1);
mType = new QLabel (this);
layout ->addWidget (mType);
connect (mInput, SIGNAL (textChanged (const QString&)), this, SLOT (textChanged (const QString&)));
setLayout (layout);
}
void CSVDoc::FileWidget::setType (bool addon)
{
mAddon = addon;
mType->setText (getExtension());
}
QString CSVDoc::FileWidget::getName() const
{
QString text = mInput->text();
if (text.isEmpty())
return "";
return text + getExtension();
}
void CSVDoc::FileWidget::textChanged (const QString& text)
{
emit nameChanged (getName(), mAddon);
}

@ -0,0 +1,40 @@
#ifndef CSV_DOC_FILEWIDGET_H
#define CSV_DOC_FILEWIDGET_H
#include <QWidget>
class QLabel;
class QString;
class QLineEdit;
namespace CSVDoc
{
class FileWidget : public QWidget
{
Q_OBJECT
bool mAddon;
QLineEdit *mInput;
QLabel *mType;
QString getExtension() const;
public:
FileWidget (QWidget *parent = 0);
void setType (bool addon);
QString getName() const;
private slots:
void textChanged (const QString& text);
signals:
void nameChanged (const QString& file, bool addon);
};
}
#endif

@ -0,0 +1,68 @@
#include "newgame.hpp"
#include <QApplication>
#include <QDesktopWidget>
#include <QVBoxLayout>
#include <QDialogButtonBox>
#include <QPushButton>
#include "filewidget.hpp"
#include "adjusterwidget.hpp"
CSVDoc::NewGameDialogue::NewGameDialogue()
{
setWindowTitle ("Create New Game");
QVBoxLayout *layout = new QVBoxLayout (this);
mFileWidget = new FileWidget (this);
mFileWidget->setType (false);
layout->addWidget (mFileWidget, 1);
mAdjusterWidget = new AdjusterWidget (this);
layout->addWidget (mAdjusterWidget, 1);
QDialogButtonBox *buttons = new QDialogButtonBox (this);
mCreate = new QPushButton ("Create", this);
mCreate->setDefault (true);
mCreate->setEnabled (false);
buttons->addButton (mCreate, QDialogButtonBox::AcceptRole);
QPushButton *cancel = new QPushButton ("Cancel", this);
buttons->addButton (cancel, QDialogButtonBox::RejectRole);
layout->addWidget (buttons);
setLayout (layout);
connect (mAdjusterWidget, SIGNAL (stateChanged (bool)), this, SLOT (stateChanged (bool)));
connect (mCreate, SIGNAL (clicked()), this, SLOT (create()));
connect (cancel, SIGNAL (clicked()), this, SLOT (reject()));
connect (mFileWidget, SIGNAL (nameChanged (const QString&, bool)),
mAdjusterWidget, SLOT (setName (const QString&, bool)));
QRect scr = QApplication::desktop()->screenGeometry();
QRect rect = geometry();
move (scr.center().x() - rect.center().x(), scr.center().y() - rect.center().y());
}
void CSVDoc::NewGameDialogue::setLocalData (const boost::filesystem::path& localData)
{
mAdjusterWidget->setLocalData (localData);
}
void CSVDoc::NewGameDialogue::stateChanged (bool valid)
{
mCreate->setEnabled (valid);
}
void CSVDoc::NewGameDialogue::create()
{
emit createRequest (mAdjusterWidget->getPath());
}

@ -0,0 +1,44 @@
#ifndef CSV_DOC_NEWGAME_H
#define CSV_DOC_NEWGAME_H
#include <boost/filesystem/path.hpp>
#include <QDialog>
#include <QMetaType>
Q_DECLARE_METATYPE (boost::filesystem::path)
class QPushButton;
namespace CSVDoc
{
class FileWidget;
class AdjusterWidget;
class NewGameDialogue : public QDialog
{
Q_OBJECT
QPushButton *mCreate;
FileWidget *mFileWidget;
AdjusterWidget *mAdjusterWidget;
public:
NewGameDialogue();
void setLocalData (const boost::filesystem::path& localData);
signals:
void createRequest (const boost::filesystem::path& file);
private slots:
void stateChanged (bool valid);
void create();
};
}
#endif

@ -3,21 +3,106 @@
#include <QApplication>
#include <QDesktopWidget>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QRect>
#include <QGridLayout>
#include <QLabel>
#include <QIcon>
#include <QPushButton>
QPushButton *CSVDoc::StartupDialogue::addButton (const QString& label, const QIcon& icon)
{
int column = mColumn--;
QPushButton *button = new QPushButton (this);
button->setIcon (QIcon (icon));
button->setSizePolicy (QSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred));
mLayout->addWidget (button, 0, column);
mLayout->addWidget (new QLabel (label, this), 1, column, Qt::AlignCenter);
int width = mLayout->itemAtPosition (1, column)->widget()->sizeHint().width();
CSVDoc::StartupDialogue::StartupDialogue()
if (width>mWidth)
mWidth = width;
return button;
}
QWidget *CSVDoc::StartupDialogue::createButtons()
{
QHBoxLayout *layout = new QHBoxLayout (this);
QWidget *widget = new QWidget (this);
QPushButton *createDocument = new QPushButton ("new", this);
connect (createDocument, SIGNAL (clicked()), this, SIGNAL (createDocument()));
layout->addWidget (createDocument);
mLayout = new QGridLayout (widget);
QPushButton *loadDocument = new QPushButton ("load", this);
/// \todo add icons
QPushButton *loadDocument = addButton ("Edit A Content File", QIcon (":startup/edit-content"));
connect (loadDocument, SIGNAL (clicked()), this, SIGNAL (loadDocument()));
layout->addWidget (loadDocument);
QPushButton *createAddon = addButton ("Create A New Addon", QIcon (":startup/create-addon"));
connect (createAddon, SIGNAL (clicked()), this, SIGNAL (createAddon()));
QPushButton *createGame = addButton ("Create A New Game", QIcon (":startup/create-game"));
connect (createGame, SIGNAL (clicked()), this, SIGNAL (createGame()));
for (int i=0; i<3; ++i)
mLayout->setColumnMinimumWidth (i, mWidth);
mLayout->setRowMinimumHeight (0, mWidth);
mLayout->setSizeConstraint (QLayout::SetMinimumSize);
mLayout->setHorizontalSpacing (32);
mLayout->setContentsMargins (16, 16, 16, 8);
loadDocument->setIconSize (QSize (mWidth, mWidth));
createGame->setIconSize (QSize (mWidth, mWidth));
createAddon->setIconSize (QSize (mWidth, mWidth));
widget->setLayout (mLayout);
return widget;
}
QWidget *CSVDoc::StartupDialogue::createTools()
{
QWidget *widget = new QWidget (this);
QHBoxLayout *layout = new QHBoxLayout (widget);
layout->setDirection (QBoxLayout::RightToLeft);
layout->setContentsMargins (4, 4, 4, 4);
QPushButton *config = new QPushButton (widget);
config->setSizePolicy (QSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed));
config->setIcon (QIcon (":startup/configure"));
layout->addWidget (config);
layout->addWidget (new QWidget, 1); // dummy widget; stops buttons from taking all the space
widget->setLayout (layout);
connect (config, SIGNAL (clicked()), this, SIGNAL (editConfig()));
return widget;
}
CSVDoc::StartupDialogue::StartupDialogue() : mWidth (0), mColumn (2)
{
setWindowTitle ("Open CS");
QVBoxLayout *layout = new QVBoxLayout (this);
layout->setContentsMargins (0, 0, 0, 0);
layout->addWidget (createButtons());
layout->addWidget (createTools());
setLayout (layout);

@ -3,21 +3,43 @@
#include <QWidget>
class QGridLayout;
class QString;
class QPushButton;
class QWidget;
class QIcon;
namespace CSVDoc
{
class StartupDialogue : public QWidget
{
Q_OBJECT
private:
int mWidth;
int mColumn;
QGridLayout *mLayout;
QPushButton *addButton (const QString& label, const QIcon& icon);
QWidget *createButtons();
QWidget *createTools();
public:
StartupDialogue();
signals:
void createDocument();
void createGame();
void createAddon();
void loadDocument();
void editConfig();
};
}

@ -27,9 +27,13 @@ void CSVDoc::View::setupFileMenu()
{
QMenu *file = menuBar()->addMenu (tr ("&File"));
QAction *new_ = new QAction (tr ("New"), this);
connect (new_, SIGNAL (triggered()), this, SIGNAL (newDocumentRequest()));
file->addAction (new_);
QAction *newGame = new QAction (tr ("New Game"), this);
connect (newGame, SIGNAL (triggered()), this, SIGNAL (newGameRequest()));
file->addAction (newGame);
QAction *newAddon = new QAction (tr ("New Addon"), this);
connect (newAddon, SIGNAL (triggered()), this, SIGNAL (newAddonRequest()));
file->addAction (newAddon);
QAction *open = new QAction (tr ("&Open"), this);
connect (open, SIGNAL (triggered()), this, SIGNAL (loadDocumentRequest()));
@ -67,7 +71,7 @@ void CSVDoc::View::setupEditMenu()
edit->addAction (mRedo);
QAction *userSettings = new QAction (tr ("&Preferences"), this);
connect (userSettings, SIGNAL (triggered()), this, SLOT (showUserSettings()));
connect (userSettings, SIGNAL (triggered()), this, SIGNAL (editSettingsRequest()));
edit->addAction (userSettings);
}
@ -180,7 +184,7 @@ void CSVDoc::View::updateTitle()
{
std::ostringstream stream;
stream << mDocument->getName();
stream << mDocument->getSavePath().filename().string();
if (mDocument->getState() & CSMDoc::State_Modified)
stream << " *";
@ -415,13 +419,6 @@ void CSVDoc::View::exit()
emit exitApplicationRequest (this);
}
void CSVDoc::View::showUserSettings()
{
CSVSettings::UserSettingsDialog *settingsDialog = new CSVSettings::UserSettingsDialog(this);
settingsDialog->show();
}
void CSVDoc::View::resizeViewWidth (int width)
{
if (width >= 0)

@ -106,12 +106,16 @@ namespace CSVDoc
signals:
void newDocumentRequest();
void newGameRequest();
void newAddonRequest();
void loadDocumentRequest();
void exitApplicationRequest (CSVDoc::View *view);
void editSettingsRequest();
public slots:
void addSubView (const CSMWorld::UniversalId& id);
@ -160,8 +164,6 @@ namespace CSVDoc
void addFiltersSubView();
void showUserSettings();
void toggleShowStatusBar (bool show);
};
}

@ -8,6 +8,7 @@
#include "../../model/doc/documentmanager.hpp"
#include "../../model/doc/document.hpp"
#include "../../model/world/columns.hpp"
#include "../world/util.hpp"
#include "../world/enumdelegate.hpp"
@ -43,51 +44,6 @@ void CSVDoc::ViewManager::updateIndices()
CSVDoc::ViewManager::ViewManager (CSMDoc::DocumentManager& documentManager)
: mDocumentManager (documentManager), mExitOnSaveStateChange(false), mUserWarned(false)
{
static const char *sSpecialisations[] =
{
"Combat", "Magic", "Stealth", 0
};
static const char *sAttributes[] =
{
"Strength", "Intelligence", "Willpower", "Agility", "Speed", "Endurance", "Personality",
"Luck", 0
};
static const char *sSpellTypes[] =
{
"Spell", "Ability", "Blight", "Disease", "Curse", "Power", 0
};
static const char *sApparatusTypes[] =
{
"Mortar & Pestle", "Albemic", "Calcinator", "Retort", 0
};
static const char *sArmorTypes[] =
{
"Helmet", "Cuirass", "Left Pauldron", "Right Pauldron", "Greaves", "Boots", "Left Gauntlet",
"Right Gauntlet", "Shield", "Left Bracer", "Right Bracer", 0
};
static const char *sClothingTypes[] =
{
"Pants", "Shoes", "Shirt", "Belt", "Robe", "Right Glove", "Left Glove", "Skirt", "Ring",
"Amulet", 0
};
static const char *sCreatureTypes[] =
{
"Creature", "Deadra", "Undead", "Humanoid", 0
};
static const char *sWeaponTypes[] =
{
"Short Blade 1H", "Long Blade 1H", "Long Blade 2H", "Blunt 1H", "Blunt 2H Close",
"Blunt 2H Wide", "Spear 2H", "Axe 1H", "Axe 2H", "Bow", "Crossbow", "Thrown", "Arrow",
"Bolt", 0
};
mDelegateFactories = new CSVWorld::CommandDelegateFactoryCollection;
mDelegateFactories->add (CSMWorld::ColumnBase::Display_GmstVarType,
@ -96,38 +52,37 @@ CSVDoc::ViewManager::ViewManager (CSMDoc::DocumentManager& documentManager)
mDelegateFactories->add (CSMWorld::ColumnBase::Display_GlobalVarType,
new CSVWorld::VarTypeDelegateFactory (ESM::VT_Short, ESM::VT_Long, ESM::VT_Float));
mDelegateFactories->add (CSMWorld::ColumnBase::Display_Specialisation,
new CSVWorld::EnumDelegateFactory (sSpecialisations));
mDelegateFactories->add (CSMWorld::ColumnBase::Display_Attribute,
new CSVWorld::EnumDelegateFactory (sAttributes, true));
mDelegateFactories->add (CSMWorld::ColumnBase::Display_SpellType,
new CSVWorld::EnumDelegateFactory (sSpellTypes));
mDelegateFactories->add (CSMWorld::ColumnBase::Display_ApparatusType,
new CSVWorld::EnumDelegateFactory (sApparatusTypes));
mDelegateFactories->add (CSMWorld::ColumnBase::Display_ArmorType,
new CSVWorld::EnumDelegateFactory (sArmorTypes));
mDelegateFactories->add (CSMWorld::ColumnBase::Display_ClothingType,
new CSVWorld::EnumDelegateFactory (sClothingTypes));
mDelegateFactories->add (CSMWorld::ColumnBase::Display_RecordState,
new CSVWorld::RecordStatusDelegateFactory());
mDelegateFactories->add (CSMWorld::ColumnBase::Display_CreatureType,
new CSVWorld::EnumDelegateFactory (sCreatureTypes));
mDelegateFactories->add (CSMWorld::ColumnBase::Display_RefRecordType,
new CSVWorld::RefIdTypeDelegateFactory());
mDelegateFactories->add (CSMWorld::ColumnBase::Display_WeaponType,
new CSVWorld::EnumDelegateFactory (sWeaponTypes));
struct Mapping
{
CSMWorld::ColumnBase::Display mDisplay;
CSMWorld::Columns::ColumnId mColumnId;
bool mAllowNone;
};
mDelegateFactories->add (CSMWorld::ColumnBase::Display_RecordState,
new CSVWorld::RecordStatusDelegateFactory() );
static const Mapping sMapping[] =
{
{ CSMWorld::ColumnBase::Display_Specialisation, CSMWorld::Columns::ColumnId_Specialisation, false },
{ CSMWorld::ColumnBase::Display_Attribute, CSMWorld::Columns::ColumnId_Attribute, true },
{ CSMWorld::ColumnBase::Display_SpellType, CSMWorld::Columns::ColumnId_SpellType, false },
{ CSMWorld::ColumnBase::Display_ApparatusType, CSMWorld::Columns::ColumnId_ApparatusType, false },
{ CSMWorld::ColumnBase::Display_ArmorType, CSMWorld::Columns::ColumnId_ArmorType, false },
{ CSMWorld::ColumnBase::Display_ClothingType, CSMWorld::Columns::ColumnId_ClothingType, false },
{ CSMWorld::ColumnBase::Display_CreatureType, CSMWorld::Columns::ColumnId_CreatureType, false },
{ CSMWorld::ColumnBase::Display_WeaponType, CSMWorld::Columns::ColumnId_WeaponType, false }
};
mDelegateFactories->add (CSMWorld::ColumnBase::Display_RefRecordType,
new CSVWorld::RefIdTypeDelegateFactory() );
for (std::size_t i=0; i<sizeof (sMapping)/sizeof (Mapping); ++i)
mDelegateFactories->add (sMapping[i].mDisplay, new CSVWorld::EnumDelegateFactory (
CSMWorld::Columns::getEnums (sMapping[i].mColumnId), sMapping[i].mAllowNone));
connect (&CSMSettings::UserSettings::instance(), SIGNAL (signalUpdateEditorSetting (const QString &, const QString &)),
this, SLOT (slotUpdateEditorSetting (const QString &, const QString &)));
this, SLOT (slotUpdateEditorSetting (const QString &, const QString &)));
}
CSVDoc::ViewManager::~ViewManager()
@ -152,13 +107,14 @@ CSVDoc::View *CSVDoc::ViewManager::addView (CSMDoc::Document *document)
View *view = new View (*this, document, countViews (document)+1);
mViews.push_back (view);
view->show();
connect (view, SIGNAL (newDocumentRequest ()), this, SIGNAL (newDocumentRequest()));
connect (view, SIGNAL (newGameRequest ()), this, SIGNAL (newGameRequest()));
connect (view, SIGNAL (newAddonRequest ()), this, SIGNAL (newAddonRequest()));
connect (view, SIGNAL (loadDocumentRequest ()), this, SIGNAL (loadDocumentRequest()));
connect (view, SIGNAL (editSettingsRequest()), this, SIGNAL (editSettingsRequest()));
updateIndices();

@ -55,12 +55,16 @@ namespace CSVDoc
signals:
void newDocumentRequest();
void newGameRequest();
void newAddonRequest();
void loadDocumentRequest();
void closeMessageBox();
void editSettingsRequest();
public slots:
void exitApplication (CSVDoc::View *view);

@ -1,5 +1,7 @@
#include "usersettingsdialog.hpp"
#include <boost/filesystem/path.hpp>
#include <QApplication>
#include <QDesktopWidget>
#include <QWidget>
@ -9,14 +11,14 @@
#include <QFile>
#include <QPushButton>
#include <QDockWidget>
#include <QGridLayout>
#include <QApplication>
#include <QDesktopWidget>
#include "../../model/settings/support.hpp"
#include "datadisplayformatpage.hpp"
#include "windowpage.hpp"
#include "../../model/settings/support.hpp"
#include <boost/filesystem/path.hpp>
#include "settingwidget.hpp"
CSVSettings::UserSettingsDialog::UserSettingsDialog(QMainWindow *parent) :
@ -29,7 +31,11 @@ CSVSettings::UserSettingsDialog::UserSettingsDialog(QMainWindow *parent) :
connect (mListWidget,
SIGNAL (currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
this,
SLOT (slotChangePage (QListWidgetItem*, QListWidgetItem*)));
SLOT (slotChangePage (QListWidgetItem*, QListWidgetItem*)));
QRect scr = QApplication::desktop()->screenGeometry();
QRect rect = geometry();
move (scr.center().x() - rect.center().x(), scr.center().y() - rect.center().y());
}
CSVSettings::UserSettingsDialog::~UserSettingsDialog()

@ -109,6 +109,18 @@ CSVWorld::EnumDelegateFactory::EnumDelegateFactory (const char **names, bool all
add (i, names[i]);
}
CSVWorld::EnumDelegateFactory::EnumDelegateFactory (const std::vector<std::string>& names,
bool allowNone)
{
if (allowNone)
add (-1, "");
int size = static_cast<int> (names.size());
for (int i=0; i<size; ++i)
add (i, names[i].c_str());
}
CSVWorld::CommandDelegate *CSVWorld::EnumDelegateFactory::makeDelegate (QUndoStack& undoStack,
QObject *parent) const
{

@ -54,6 +54,9 @@ namespace CSVWorld
///< \param names Array of char pointer with a 0-pointer as end mark
/// \param allowNone Use value of -1 for "none selected" (empty string)
EnumDelegateFactory (const std::vector<std::string>& names, bool allowNone = false);
/// \param allowNone Use value of -1 for "none selected" (empty string)
virtual CommandDelegate *makeDelegate (QUndoStack& undoStack, QObject *parent) const;
///< The ownership of the returned CommandDelegate is transferred to the caller.

@ -1,8 +1,11 @@
#include "recordstatusdelegate.hpp"
#include <QPainter>
#include <QApplication>
#include <QUndoStack>
#include "../../model/settings/usersettings.hpp"
#include "../../model/world/columns.hpp"
CSVWorld::RecordStatusDelegate::RecordStatusDelegate(const ValueList& values,
const IconList & icons,
@ -37,9 +40,14 @@ bool CSVWorld::RecordStatusDelegate::updateEditorSetting (const QString &setting
CSVWorld::RecordStatusDelegateFactory::RecordStatusDelegateFactory()
{
DataDisplayDelegateFactory::add ( CSMWorld::RecordBase::State_BaseOnly, "Base", ":./base.png");
DataDisplayDelegateFactory::add ( CSMWorld::RecordBase::State_Deleted, "Deleted", ":./removed.png");
DataDisplayDelegateFactory::add ( CSMWorld::RecordBase::State_Erased, "Deleted", ":./removed.png");
DataDisplayDelegateFactory::add ( CSMWorld::RecordBase::State_Modified, "Modified", ":./modified.png");
DataDisplayDelegateFactory::add ( CSMWorld::RecordBase::State_ModifiedOnly, "Added", ":./added.png");
std::vector<std::string> enums =
CSMWorld::Columns::getEnums (CSMWorld::Columns::ColumnId_Modification);
static const char *sIcons[] =
{
":./base.png", ":./modified.png", ":./added.png", ":./removed.png", ":./removed.png", 0
};
for (int i=0; sIcons[i]; ++i)
add (i, enums.at (i).c_str(), sIcons[i]);
}

@ -1,4 +1,5 @@
#include "refidtypedelegate.hpp"
#include "../../model/world/universalid.hpp"
CSVWorld::RefIdTypeDelegate::RefIdTypeDelegate
@ -6,6 +7,26 @@ CSVWorld::RefIdTypeDelegate::RefIdTypeDelegate
: DataDisplayDelegate (values, icons, undoStack, parent)
{}
bool CSVWorld::RefIdTypeDelegate::updateEditorSetting (const QString &settingName, const QString &settingValue)
{
if (settingName == "Referenceable ID Type Display")
{
if (settingValue == "Icon and Text")
mDisplayMode = Mode_IconAndText;
else if (settingValue == "Icon Only")
mDisplayMode = Mode_IconOnly;
else if (settingValue == "Text Only")
mDisplayMode = Mode_TextOnly;
return true;
}
return false;
}
CSVWorld::RefIdTypeDelegateFactory::RefIdTypeDelegateFactory()
{
UidTypeList uIdList = buildUidTypeList();
@ -39,22 +60,3 @@ CSVWorld::RefIdTypeDelegateFactory::UidTypeList CSVWorld::RefIdTypeDelegateFacto
return list;
}
bool CSVWorld::RefIdTypeDelegate::updateEditorSetting (const QString &settingName, const QString &settingValue)
{
if (settingName == "Referenceable ID Type Display")
{
if (settingValue == "Icon and Text")
mDisplayMode = Mode_IconAndText;
else if (settingValue == "Icon Only")
mDisplayMode = Mode_IconOnly;
else if (settingValue == "Text Only")
mDisplayMode = Mode_TextOnly;
return true;
}
return false;
}

@ -1,25 +0,0 @@
#include "refrecordtypedelegate.hpp"
#include "../../model/world/universalid.hpp"
CSVWorld::RefRecordTypeDelegate::RefRecordTypeDelegate
(const std::vector<std::pair<int, QString> > &values, QUndoStack& undoStack, QObject *parent)
: EnumDelegate (values, undoStack, parent)
{}
CSVWorld::RefRecordTypeDelegateFactory::RefRecordTypeDelegateFactory()
{
unsigned int argSize = CSMWorld::UniversalId::getIdArgSize();
for (unsigned int i = 0; i < argSize; i++)
{
std::pair<int, const char *> idPair = CSMWorld::UniversalId::getIdArgPair(i);
mValues.push_back (std::pair<int, QString>(idPair.first, QString::fromUtf8(idPair.second)));
}
}
CSVWorld::CommandDelegate *CSVWorld::RefRecordTypeDelegateFactory::makeDelegate (QUndoStack& undoStack,
QObject *parent) const
{
return new RefRecordTypeDelegate (mValues, undoStack, parent);
}

@ -1,58 +0,0 @@
#ifndef REFRECORDTYPEDELEGATE_HPP
#define REFRECORDTYPEDELEGATE_HPP
#include "enumdelegate.hpp"
#include "util.hpp"
namespace CSVWorld
{
class RefRecordTypeDelegate : public EnumDelegate
{
public:
RefRecordTypeDelegate (const std::vector<std::pair<int, QString> > &mValues, QUndoStack& undoStack, QObject *parent);
};
class RefRecordTypeDelegateFactory : public CommandDelegateFactory
{
std::vector<std::pair<int, QString> > mValues;
public:
RefRecordTypeDelegateFactory();
virtual CommandDelegate *makeDelegate (QUndoStack& undoStack, QObject *parent) const;
///< The ownership of the returned CommandDelegate is transferred to the caller.
};
}
/*
class VarTypeDelegate : public EnumDelegate
{
private:
virtual void addCommands (QAbstractItemModel *model,
const QModelIndex& index, int type) const;
public:
VarTypeDelegate (const std::vector<std::pair<int, QString> >& values,
QUndoStack& undoStack, QObject *parent);
};
class VarTypeDelegateFactory : public CommandDelegateFactory
{
std::vector<std::pair<int, QString> > mValues;
public:
VarTypeDelegateFactory (ESM::VarType type0 = ESM::VT_Unknown,
ESM::VarType type1 = ESM::VT_Unknown, ESM::VarType type2 = ESM::VT_Unknown,
ESM::VarType type3 = ESM::VT_Unknown);
virtual CommandDelegate *makeDelegate (QUndoStack& undoStack, QObject *parent) const;
///< The ownership of the returned CommandDelegate is transferred to the caller.
void add (ESM::VarType type);
};
*/
#endif // REFRECORDTYPEDELEGATE_HPP

@ -4,6 +4,7 @@
#include <QUndoStack>
#include "../../model/world/commands.hpp"
#include "../../model/world/columns.hpp"
void CSVWorld::VarTypeDelegate::addCommands (QAbstractItemModel *model, const QModelIndex& index, int type)
const
@ -75,29 +76,11 @@ CSVWorld::CommandDelegate *CSVWorld::VarTypeDelegateFactory::makeDelegate (QUndo
void CSVWorld::VarTypeDelegateFactory::add (ESM::VarType type)
{
struct Name
{
ESM::VarType mType;
const char *mName;
};
std::vector<std::string> enums =
CSMWorld::Columns::getEnums (CSMWorld::Columns::ColumnId_ValueType);
static const Name sNames[] =
{
{ ESM::VT_None, "empty" },
{ ESM::VT_Short, "short" },
{ ESM::VT_Int, "integer" },
{ ESM::VT_Long, "long" },
{ ESM::VT_Float, "float" },
{ ESM::VT_String, "string" },
{ ESM::VT_Unknown, 0 } // end marker
};
for (int i=0; sNames[i].mName; ++i)
if (sNames[i].mType==type)
{
mValues.push_back (std::make_pair (type, sNames[i].mName));
return;
}
throw std::logic_error ("Unsupported variable type");
if (type<0 && type>=enums.size())
throw std::logic_error ("Unsupported variable type");
mValues.push_back (std::make_pair (type, QString::fromUtf8 (enums[type].c_str())));
}

@ -9,6 +9,7 @@
#include <MyGUI_XmlDocument.h>
#include <MyGUI_FactoryManager.h>
#include <components/misc/stringops.hpp>
namespace
@ -62,6 +63,58 @@ namespace
return unicode;
}
std::string getUtf8 (unsigned char c, ToUTF8::Utf8Encoder& encoder, ToUTF8::FromType encoding)
{
if (encoding == ToUTF8::WINDOWS_1250)
{
unsigned char win1250;
std::map<unsigned char, unsigned char> conv;
conv[0x80] = 0xc6;
conv[0x81] = 0x9c;
conv[0x82] = 0xe6;
conv[0x83] = 0xb3;
conv[0x84] = 0xf1;
conv[0x85] = 0xb9;
conv[0x86] = 0xbf;
conv[0x87] = 0x9f;
conv[0x88] = 0xea;
conv[0x89] = 0xea;
conv[0x8a] = 0x0; // not contained in win1250
conv[0x8b] = 0x0; // not contained in win1250
conv[0x8c] = 0x8f;
conv[0x8d] = 0xaf;
conv[0x8e] = 0xa5;
conv[0x8f] = 0x8c;
conv[0x90] = 0xca;
conv[0x93] = 0xa3;
conv[0x94] = 0xf6;
conv[0x95] = 0xf3;
conv[0x96] = 0xaf;
conv[0x97] = 0x8f;
conv[0x99] = 0xd3;
conv[0x9a] = 0xd1;
conv[0x9c] = 0x0; // not contained in win1250
conv[0xa0] = 0xb9;
conv[0xa1] = 0xaf;
conv[0xa2] = 0xf3;
conv[0xa3] = 0xbf;
conv[0xa4] = 0x0; // not contained in win1250
conv[0xe1] = 0x8c;
conv[0xe1] = 0x8c;
conv[0xe3] = 0x0; // not contained in win1250
conv[0xf5] = 0x0; // not contained in win1250
if (conv.find(c) != conv.end())
win1250 = conv[c];
else
win1250 = c;
return encoder.getUtf8(std::string(1, win1250));
}
else
return encoder.getUtf8(std::string(1, c));
}
}
namespace MWGui
@ -184,7 +237,7 @@ namespace MWGui
int h = data[i].bottom_left.y*height - y1;
ToUTF8::Utf8Encoder encoder(mEncoding);
unsigned long unicodeVal = utf8ToUnicode(encoder.getUtf8(std::string(1, (unsigned char)(i))));
unsigned long unicodeVal = utf8ToUnicode(getUtf8(i, encoder, mEncoding));
MyGUI::xml::ElementPtr code = codes->createChild("Code");
code->addAttribute("index", unicodeVal);

@ -80,7 +80,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::end()
bool MWWorld::ContainerStore::stacks(const Ptr& ptr1, const Ptr& ptr2)
{
/// \todo add current enchantment charge here when it is implemented
if ( ptr1.getCellRef().mRefID == ptr2.getCellRef().mRefID
if ( Misc::StringUtils::ciEqual(ptr1.getCellRef().mRefID, ptr2.getCellRef().mRefID)
&& MWWorld::Class::get(ptr1).getScript(ptr1) == "" // item with a script never stacks
&& MWWorld::Class::get(ptr1).getEnchantment(ptr1) == "" // item with enchantment never stacks (we could revisit this later, but for now it makes selecting items in the spell window much easier)
&& ptr1.getCellRef().mOwner == ptr2.getCellRef().mOwner

@ -11,7 +11,7 @@ namespace ESM
enum VarType
{
VT_Unknown,
VT_Unknown = 0,
VT_None,
VT_Short, // stored as a float, kinda
VT_Int,

@ -56,7 +56,7 @@ void ConfigurationManager::readConfiguration(boost::program_options::variables_m
}
void ConfigurationManager::processPaths(Files::PathContainer& dataDirs)
void ConfigurationManager::processPaths(Files::PathContainer& dataDirs, bool create)
{
std::string path;
for (Files::PathContainer::iterator it = dataDirs.begin(); it != dataDirs.end(); ++it)
@ -94,6 +94,18 @@ void ConfigurationManager::processPaths(Files::PathContainer& dataDirs)
if (!boost::filesystem::is_directory(*it))
{
if (create)
{
try
{
boost::filesystem::create_directories (*it);
}
catch (...) {}
if (boost::filesystem::is_directory(*it))
continue;
}
(*it).clear();
}
}

@ -30,7 +30,9 @@ struct ConfigurationManager
void readConfiguration(boost::program_options::variables_map& variables,
boost::program_options::options_description& description);
void processPaths(Files::PathContainer& dataDirs);
void processPaths(Files::PathContainer& dataDirs, bool create = false);
///< \param create Try creating the directory, if it does not exist.
/**< Fixed paths */
const boost::filesystem::path& getGlobalPath() const;

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 747 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -25,5 +25,9 @@
<file>repair.png</file>
<file>static.png</file>
<file>weapon.png</file>
<file alias="startup/create-addon">raster/startup/big/create-addon.png</file>
<file alias="startup/create-game">raster/startup/big/new-game.png</file>
<file alias="startup/edit-content">raster/startup/big/edit-content.png</file>
<file alias="startup/configure">raster/startup/small/configure.png</file>
</qresource>
</RCC>

@ -1,7 +1,7 @@
[Dolphin]
GroupedSorting=true
SortFoldersFirst=false
Timestamp=2013,8,11,16,50,43
Timestamp=2013,8,25,18,35,16
Version=3
ViewMode=2
VisibleRoles=Compact_text,Compact_size

@ -1,965 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48"
height="48"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="miscelanius.svg">
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="8.0000002"
inkscape:cx="3.9119117"
inkscape:cy="-1.8033034"
inkscape:document-units="px"
inkscape:current-layer="g4862"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1280"
inkscape:window-height="994"
inkscape:window-x="0"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:snap-page="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="true"
inkscape:snap-global="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-grids="false" />
<defs
id="defs4">
<linearGradient
id="linearGradient3902"
inkscape:collect="always">
<stop
id="stop3904"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
id="stop3906"
offset="1"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3886"
inkscape:collect="always">
<stop
id="stop3888"
offset="0"
style="stop-color:#fff226;stop-opacity:1;" />
<stop
id="stop3890"
offset="1"
style="stop-color:#fff226;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient9248">
<stop
id="stop9250"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop9252"
offset="1"
style="stop-color:#b4b4b4;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient8521">
<stop
id="stop8523"
offset="0"
style="stop-color:#00105d;stop-opacity:1;" />
<stop
id="stop8525"
offset="1"
style="stop-color:#00105d;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient7487">
<stop
style="stop-color:#000e50;stop-opacity:1;"
offset="0"
id="stop7489" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop7491" />
</linearGradient>
<linearGradient
id="linearGradient6034">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop6036" />
<stop
style="stop-color:#b3bbad;stop-opacity:1;"
offset="1"
id="stop6038" />
</linearGradient>
<linearGradient
id="linearGradient6815">
<stop
id="stop6817"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
style="stop-color:#3c3c3c;stop-opacity:0.58823532;"
offset="0.40229002"
id="stop6825" />
<stop
id="stop6819"
offset="1"
style="stop-color:#3c3c3c;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient4022">
<stop
id="stop4024"
offset="0"
style="stop-color:#204a87;stop-opacity:1;" />
<stop
id="stop4026"
offset="1"
style="stop-color:#729fcf;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3723">
<stop
id="stop3725"
offset="0"
style="stop-color:#ffffff;stop-opacity:0.78431374;" />
<stop
id="stop3727"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3715">
<stop
id="stop3717"
offset="0"
style="stop-color:#99bbd4;stop-opacity:1;" />
<stop
id="stop3719"
offset="1"
style="stop-color:#5d93ba;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3707">
<stop
id="stop3709"
offset="0"
style="stop-color:#a6c4d9;stop-opacity:0.78431374;" />
<stop
id="stop3711"
offset="1"
style="stop-color:#75a3c3;stop-opacity:1;" />
</linearGradient>
<inkscape:perspective
id="perspective10"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 526.18109 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
id="perspective2920" />
<linearGradient
gradientTransform="translate(0.2341189,5.74082)"
gradientUnits="userSpaceOnUse"
y2="1029.8864"
x2="63.765881"
y1="949.3266"
x1="63.765881"
id="linearGradient3713"
xlink:href="#linearGradient3707"
inkscape:collect="always" />
<linearGradient
gradientTransform="translate(0.2341196,6.0908086)"
gradientUnits="userSpaceOnUse"
y2="983.41931"
x2="63.765881"
y1="936.95227"
x1="63.765881"
id="linearGradient3721"
xlink:href="#linearGradient3715"
inkscape:collect="always" />
<linearGradient
gradientTransform="translate(0.2341189,5.74082)"
gradientUnits="userSpaceOnUse"
y2="1030.7611"
x2="37.375645"
y1="948.8266"
x1="37.375645"
id="linearGradient3729"
xlink:href="#linearGradient3723"
inkscape:collect="always" />
<linearGradient
y2="983.41931"
x2="63.765881"
y1="936.95227"
x1="63.765881"
gradientTransform="translate(0.2341196,6.0908086)"
gradientUnits="userSpaceOnUse"
id="linearGradient3735"
xlink:href="#linearGradient3715"
inkscape:collect="always" />
<linearGradient
y2="1029.8864"
x2="63.765881"
y1="949.3266"
x1="63.765881"
gradientTransform="translate(0.2341189,5.74082)"
gradientUnits="userSpaceOnUse"
id="linearGradient3737"
xlink:href="#linearGradient3707"
inkscape:collect="always" />
<linearGradient
y2="1030.7611"
x2="37.375645"
y1="948.8266"
x1="37.375645"
gradientTransform="translate(0.2341189,5.74082)"
gradientUnits="userSpaceOnUse"
id="linearGradient3739"
xlink:href="#linearGradient3723"
inkscape:collect="always" />
<linearGradient
y2="1029.8864"
x2="63.765881"
y1="949.3266"
x1="63.765881"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965498,-1.1089658)"
gradientUnits="userSpaceOnUse"
id="linearGradient3742"
xlink:href="#linearGradient3707"
inkscape:collect="always" />
<linearGradient
y2="1030.7611"
x2="37.375645"
y1="948.8266"
x1="37.375645"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965498,-1.1089658)"
gradientUnits="userSpaceOnUse"
id="linearGradient3744"
xlink:href="#linearGradient3723"
inkscape:collect="always" />
<linearGradient
y2="983.41931"
x2="63.765881"
y1="936.95227"
x1="63.765881"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965567,-0.75665045)"
gradientUnits="userSpaceOnUse"
id="linearGradient3747"
xlink:href="#linearGradient3715"
inkscape:collect="always" />
<linearGradient
y2="983.41931"
x2="63.765881"
y1="936.95227"
x1="63.765881"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965567,-0.75665045)"
gradientUnits="userSpaceOnUse"
id="linearGradient3753"
xlink:href="#linearGradient3715"
inkscape:collect="always" />
<linearGradient
y2="1029.8864"
x2="63.765881"
y1="949.3266"
x1="63.765881"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965498,-1.1089658)"
gradientUnits="userSpaceOnUse"
id="linearGradient3755"
xlink:href="#linearGradient3707"
inkscape:collect="always" />
<linearGradient
y2="1030.7611"
x2="37.375645"
y1="948.8266"
x1="37.375645"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965498,-1.1089658)"
gradientUnits="userSpaceOnUse"
id="linearGradient3757"
xlink:href="#linearGradient3723"
inkscape:collect="always" />
<linearGradient
gradientTransform="matrix(0.91716429,0,0,0.91716429,2.2512556,85.18512)"
gradientUnits="userSpaceOnUse"
y2="1008.9376"
x2="47.902649"
y1="1048.3364"
x1="14.991861"
id="linearGradient4028"
xlink:href="#linearGradient4022"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3818"
id="linearGradient5433"
x1="-14.939182"
y1="166.73387"
x2="-15.495684"
y2="164.65698"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.71906912,0,0,0.71906912,35.096859,924.87424)" />
<linearGradient
id="linearGradient3818">
<stop
style="stop-color:#1e1e1e;stop-opacity:1;"
offset="0"
id="stop3820" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3822" />
</linearGradient>
<linearGradient
id="linearGradient3715-2">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3717-4" />
<stop
style="stop-color:#b3bbad;stop-opacity:1;"
offset="1"
id="stop3719-9" />
</linearGradient>
<linearGradient
id="linearGradient5299">
<stop
style="stop-color:#000e50;stop-opacity:1;"
offset="0"
id="stop5301" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop5303" />
</linearGradient>
<radialGradient
r="29.000444"
fy="119.59179"
fx="-172.875"
cy="119.59179"
cx="-172.875"
gradientTransform="matrix(1.0541003,0.65674043,-0.42405323,0.68062603,240.54684,45.0811)"
gradientUnits="userSpaceOnUse"
id="radialGradient6812"
xlink:href="#linearGradient3715-2"
inkscape:collect="always" />
<linearGradient
y2="965.56183"
x2="63.765881"
y1="941.44623"
x1="63.765881"
gradientTransform="matrix(0.37749331,0,0,0.37749331,-0.0711918,657.55701)"
gradientUnits="userSpaceOnUse"
id="linearGradient2843"
xlink:href="#linearGradient3715-6"
inkscape:collect="always" />
<linearGradient
id="linearGradient3715-6">
<stop
id="stop3717-6"
offset="0"
style="stop-color:#99bbd4;stop-opacity:1;" />
<stop
id="stop3719-4"
offset="1"
style="stop-color:#5d93ba;stop-opacity:1;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3715-6"
id="linearGradient3184"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.37749331,0,0,0.37749331,4.1838142,536.26868)"
x1="63.765881"
y1="941.44623"
x2="63.765881"
y2="965.56183" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3715-6"
id="linearGradient3321"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.28231332,0,0,0.28231332,64.982195,664.15172)"
x1="63.765881"
y1="941.44623"
x2="63.765881"
y2="965.56183" />
<linearGradient
id="linearGradient6815-6">
<stop
id="stop6817-4"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
style="stop-color:#3c3c3c;stop-opacity:0.58823532;"
offset="0.40229002"
id="stop6825-9" />
<stop
id="stop6819-5"
offset="1"
style="stop-color:#3c3c3c;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3715-2-4">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3717-4-8" />
<stop
style="stop-color:#b3bbad;stop-opacity:1;"
offset="1"
id="stop3719-9-7" />
</linearGradient>
<radialGradient
r="28.421875"
fy="116.19179"
fx="-182.4375"
cy="116.19179"
cx="-182.4375"
gradientTransform="matrix(0.30667246,1.5835715,-1.396495,0.27044345,218.94267,1272.3725)"
gradientUnits="userSpaceOnUse"
id="radialGradient5641-1"
xlink:href="#linearGradient5299-7"
inkscape:collect="always" />
<linearGradient
id="linearGradient5299-7">
<stop
style="stop-color:#000e50;stop-opacity:1;"
offset="0"
id="stop5301-2" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop5303-7" />
</linearGradient>
<linearGradient
y2="350.56357"
x2="518.24652"
y1="536.11566"
x1="553.62225"
gradientTransform="translate(-26.263966,56.568543)"
gradientUnits="userSpaceOnUse"
id="linearGradient4078-954"
xlink:href="#linearGradient3955-87-471"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
id="linearGradient3955-87-471">
<stop
style="stop-color:#436123;stop-opacity:1"
offset="0"
id="stop4122" />
<stop
id="stop4124"
offset="0.04243463"
style="stop-color:#74984d;stop-opacity:1;" />
<stop
style="stop-color:#74984d;stop-opacity:1"
offset="1"
id="stop4126" />
</linearGradient>
<pattern
patternUnits="userSpaceOnUse"
width="2"
height="1"
patternTransform="matrix(0,4.4721359,-4.4721359,0,-50.004131,-3.0322266e-6)"
id="Strips1_1"
inkscape:stockid="Stripes 1:1">
<rect
style="fill:black;stroke:none"
x="0"
y="-0.5"
width="1"
height="2"
id="rect3917" />
</pattern>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6034"
id="linearGradient6042"
gradientUnits="userSpaceOnUse"
x1="-2256.6802"
y1="1067.036"
x2="37.487514"
y2="2532.4438"
gradientTransform="translate(-1.6900304,-354.84909)" />
<linearGradient
y2="2444.7776"
x2="-2151.6707"
y1="2903.8035"
x1="-2148.2864"
gradientUnits="userSpaceOnUse"
id="linearGradient8509"
xlink:href="#linearGradient7487"
inkscape:collect="always"
gradientTransform="translate(-1.6900304,-354.84909)" />
<linearGradient
gradientUnits="userSpaceOnUse"
y2="3353.4497"
x2="-1962.6486"
y1="2540.8635"
x1="-1962.6486"
id="linearGradient8527"
xlink:href="#linearGradient7487"
inkscape:collect="always" />
<linearGradient
spreadMethod="reflect"
gradientUnits="userSpaceOnUse"
y2="2914.2673"
x2="-115.04873"
y1="2899.3862"
x1="-115.04873"
id="linearGradient9254"
xlink:href="#linearGradient9248"
inkscape:collect="always"
gradientTransform="translate(-1.6900304,-354.84909)" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.60717495,0,6.6355278)"
r="3.1054714"
fy="16.891813"
fx="29.111721"
cy="16.891813"
cx="29.111721"
id="radialGradient3892"
xlink:href="#linearGradient3886"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.1494315,0.36121083,-0.30519899,1.8161266,2.9871553,-34.404392)"
r="15.46875"
fy="32.971859"
fx="13.599908"
cy="32.971859"
cx="13.599908"
id="radialGradient3908"
xlink:href="#linearGradient3902"
inkscape:collect="always" />
<inkscape:path-effect
fuse_tolerance="0"
vertical_pattern="false"
prop_units="false"
tang_offset="0"
normal_offset="0"
spacing="0"
scale_y_rel="false"
prop_scale="1"
copytype="single_stretched"
pattern="m 1273.479,-26681.071 0,10 10,-5 z"
is_visible="true"
id="path-effect4754"
effect="skeletal" />
<inkscape:path-effect
effect="skeletal"
id="path-effect4760"
is_visible="true"
pattern="m 1315.479,-26621.071 0,10 10,-5 z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect2991"
is_visible="true"
pattern="m 595.66194,-26736.611 0,10 10,-5 z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4904"
id="radialGradient4910"
cx="270.45764"
cy="499.72882"
fx="270.45764"
fy="499.72882"
r="96.228813"
gradientTransform="matrix(1,0,0,0.44359312,0,278.05255)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4904">
<stop
style="stop-color:#321b00;stop-opacity:1;"
offset="0"
id="stop4906" />
<stop
style="stop-color:#653700;stop-opacity:1;"
offset="1"
id="stop4908" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4787"
id="linearGradient4793"
x1="270.45764"
y1="458.54239"
x2="270.45764"
y2="540.91528"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient4787">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4789" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4791" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4805"
id="radialGradient4813"
cx="279.13174"
cy="537.41302"
fx="279.13174"
fy="537.41302"
r="94.728813"
gradientTransform="matrix(1.0793238,-0.1626202,0.09156796,0.60774413,-71.351608,234.89611)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4805">
<stop
style="stop-color:#cf0000;stop-opacity:1;"
offset="0"
id="stop4807" />
<stop
style="stop-color:#800000;stop-opacity:1;"
offset="1"
id="stop4809" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4850"
id="linearGradient4856"
x1="9"
y1="314.39062"
x2="136.21875"
y2="314.39062"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4850">
<stop
style="stop-color:#232620;stop-opacity:1;"
offset="0"
id="stop4852" />
<stop
id="stop4858"
offset="0.5"
style="stop-color:#ffffff;stop-opacity:0;" />
<stop
style="stop-color:#232620;stop-opacity:1;"
offset="1"
id="stop4854" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4795"
id="linearGradient4801"
x1="179.76239"
y1="205.93243"
x2="211.7963"
y2="205.93243"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4795">
<stop
style="stop-color:#800000;stop-opacity:1;"
offset="0"
id="stop4797" />
<stop
id="stop4803"
offset="0.5"
style="stop-color:#d07200;stop-opacity:1;" />
<stop
style="stop-color:#800000;stop-opacity:1;"
offset="1"
id="stop4799" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4805"
id="radialGradient4872"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0793238,-0.1626202,0.09156796,0.60774413,-71.351608,234.89611)"
cx="279.13174"
cy="537.41302"
fx="279.13174"
fy="537.41302"
r="94.728813" />
<linearGradient
id="linearGradient4965">
<stop
style="stop-color:#cf0000;stop-opacity:1;"
offset="0"
id="stop4967" />
<stop
style="stop-color:#800000;stop-opacity:1;"
offset="1"
id="stop4969" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4850"
id="linearGradient4874"
gradientUnits="userSpaceOnUse"
x1="9"
y1="314.39062"
x2="136.21875"
y2="314.39062" />
<linearGradient
id="linearGradient4972">
<stop
style="stop-color:#232620;stop-opacity:1;"
offset="0"
id="stop4974" />
<stop
id="stop4976"
offset="0.5"
style="stop-color:#ffffff;stop-opacity:0;" />
<stop
style="stop-color:#232620;stop-opacity:1;"
offset="1"
id="stop4978" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4882"
id="radialGradient4888"
cx="195.79498"
cy="55.193817"
fx="195.79498"
fy="55.193817"
r="30.780195"
gradientTransform="matrix(0.68778076,0,0,0.83721193,61.130961,8.984896)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4882">
<stop
style="stop-color:#824700;stop-opacity:1;"
offset="0"
id="stop4884" />
<stop
style="stop-color:#d07200;stop-opacity:1;"
offset="1"
id="stop4886" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4892"
id="linearGradient4902"
x1="165.0148"
y1="55.193817"
x2="226.5752"
y2="55.193817"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.68778076,0,0,0.68778076,61.130961,17.232572)" />
<linearGradient
id="linearGradient4892">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4894" />
<stop
id="stop4900"
offset="0.5"
style="stop-color:#595d56;stop-opacity:0;" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop4896" />
</linearGradient>
<linearGradient
y2="55.193817"
x2="226.5752"
y1="55.193817"
x1="165.0148"
gradientTransform="matrix(0.68778076,0,0,0.68778076,61.130961,17.232572)"
gradientUnits="userSpaceOnUse"
id="linearGradient5008"
xlink:href="#linearGradient4892"
inkscape:collect="always" />
</defs>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-1004.3622)"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Livello 1">
<g
id="g3891"
transform="matrix(0.02092262,0,0,0.02092262,47.215663,982.03701)">
<path
style="fill:#fa0000;fill-opacity:1;stroke:none"
d="m -684.61499,2674.2647 0,170.9884 -318.88181,0 520.49211,515.9507 520.492204,-515.9507 -318.881804,0 0,-170.9884 -403.2207,0 z"
id="path5146"
inkscape:connector-curvature="0" />
<g
transform="matrix(5.0625238,0,0,5.0625238,-2302.2429,918.07499)"
id="g4912">
<g
transform="matrix(-1,0,0,1,391.56935,0.01189)"
id="g4860">
<g
id="g4862">
<path
sodipodi:type="arc"
style="fill:url(#radialGradient4872);fill-opacity:1;stroke:none"
id="path4864"
sodipodi:cx="270.45764"
sodipodi:cy="499.72882"
sodipodi:rx="94.728813"
sodipodi:ry="41.18644"
d="m 365.18645,499.72882 c 0,22.74664 -42.41153,41.18644 -94.72881,41.18644 -52.31728,0 -94.72881,-18.4398 -94.72881,-41.18644 0,-22.74664 42.41153,-41.18644 94.72881,-41.18644 52.31728,0 94.72881,18.4398 94.72881,41.18644 z"
transform="matrix(-0.67149758,0,0,0.67149758,254.22789,-33.552002)" />
<path
style="fill:none;stroke:#d07200;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="M 130.40221,313.59159 76.506851,145.58186 16.670251,315.18688"
id="path4866"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#d07200;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 76.506851,145.58186 -3.8906,128.77624"
id="path4868"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4870"
d="M 9.375,299.125 C 9.1474242,300.07637 9,301.02245 9,302 c 0,15.27432 28.494074,27.65625 63.625,27.65625 35.13093,0 63.59375,-12.38193 63.59375,-27.65625 0,-0.97755 -0.11617,-1.92363 -0.34375,-2.875 -3.35909,13.89991 -30.39038,24.71875 -63.25,24.71875 -32.85962,0 -59.890909,-10.81884 -63.25,-24.71875 z"
style="opacity:0.5;fill:url(#linearGradient4874);fill-opacity:1;stroke:none" />
</g>
</g>
<path
transform="translate(-74.678308,-139.57606)"
sodipodi:type="arc"
style="fill:url(#radialGradient4910);fill-opacity:1;stroke:#000023;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3344"
sodipodi:cx="270.45764"
sodipodi:cy="499.72882"
sodipodi:rx="94.728813"
sodipodi:ry="41.18644"
d="m 365.18645,499.72882 c 0,22.74664 -42.41153,41.18644 -94.72881,41.18644 -52.31728,0 -94.72881,-18.4398 -94.72881,-41.18644 0,-22.74664 42.41153,-41.18644 94.72881,-41.18644 52.31728,0 94.72881,18.4398 94.72881,41.18644 z" />
<path
inkscape:connector-curvature="0"
id="rect3350"
d="m 76.5,126.5 0,19.09375 c 0,-4.64658 6.52034,-8.4375 14.5625,-8.4375 8.04215,0 14.5625,3.79092 14.5625,8.4375 l 180.3125,0 c 0,-4.64658 6.52035,-8.4375 14.5625,-8.4375 8.04215,0 14.5625,3.79092 14.5625,8.4375 l 0,-19.09375 -238.5625,0 z"
style="fill:#d07200;fill-opacity:1;stroke:none" />
<path
d="m 365.18645,499.72882 c 0,22.74664 -42.41153,41.18644 -94.72881,41.18644 -52.31728,0 -94.72881,-18.4398 -94.72881,-41.18644 0,-22.74664 42.41153,-41.18644 94.72881,-41.18644 52.31728,0 94.72881,18.4398 94.72881,41.18644 z"
sodipodi:ry="41.18644"
sodipodi:rx="94.728813"
sodipodi:cy="499.72882"
sodipodi:cx="270.45764"
id="path4785"
style="opacity:0.5;fill:url(#linearGradient4793);fill-opacity:1;stroke:none"
sodipodi:type="arc"
transform="translate(-74.678303,-139.57606)" />
<g
id="g3358">
<g
id="g4832">
<path
transform="matrix(-0.67149758,0,0,0.67149758,254.22789,-33.552002)"
d="m 365.18645,499.72882 c 0,22.74664 -42.41153,41.18644 -94.72881,41.18644 -52.31728,0 -94.72881,-18.4398 -94.72881,-41.18644 0,-22.74664 42.41153,-41.18644 94.72881,-41.18644 52.31728,0 94.72881,18.4398 94.72881,41.18644 z"
sodipodi:ry="41.18644"
sodipodi:rx="94.728813"
sodipodi:cy="499.72882"
sodipodi:cx="270.45764"
id="path3388"
style="fill:url(#radialGradient4813);fill-opacity:1;stroke:none"
sodipodi:type="arc" />
<path
inkscape:connector-curvature="0"
id="path3390"
d="M 130.40221,313.59159 76.506851,145.58186 16.670251,315.18688"
style="fill:none;stroke:#d07200;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
id="path3392"
d="m 76.506851,145.58186 -3.8906,128.77624"
style="fill:none;stroke:#d07200;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
style="opacity:0.5;fill:url(#linearGradient4856);fill-opacity:1;stroke:none"
d="M 9.375,299.125 C 9.1474242,300.07637 9,301.02245 9,302 c 0,15.27432 28.494074,27.65625 63.625,27.65625 35.13093,0 63.59375,-12.38193 63.59375,-27.65625 0,-0.97755 -0.11617,-1.92363 -0.34375,-2.875 -3.35909,13.89991 -30.39038,24.71875 -63.25,24.71875 -32.85962,0 -59.890909,-10.81884 -63.25,-24.71875 z"
id="path4821" />
</g>
</g>
<rect
y="51.71209"
x="179.76239"
height="308.44067"
width="32.033897"
id="rect3340"
style="fill:url(#linearGradient4801);fill-opacity:1;stroke:none" />
<path
inkscape:connector-curvature="0"
id="path4876"
d="m 195.7894,29.424271 c -8.89509,0 -16.09832,7.214351 -16.09832,16.109438 0,0.172769 0.005,0.339601 0.0111,0.511058 -3.16547,3.699588 -5.07725,8.503386 -5.07725,13.754126 0,11.690687 9.47378,21.16447 21.16447,21.16447 11.69069,0 21.17558,-9.473783 21.17558,-21.16447 0,-5.25074 -1.91178,-10.054538 -5.07725,-13.754126 0.005,-0.171457 0.0111,-0.338289 0.0111,-0.511058 0,-8.895087 -7.21435,-16.109438 -16.10943,-16.109438 z"
style="fill:url(#radialGradient4888);fill-opacity:1;stroke:none" />
<path
style="opacity:0.35;fill:url(#linearGradient5008);fill-opacity:1;stroke:none"
d="m 195.7894,29.424271 c -8.89509,0 -16.09832,7.214351 -16.09832,16.109438 0,0.172769 0.005,0.339601 0.0111,0.511058 -3.16547,3.699588 -5.07725,8.503386 -5.07725,13.754126 0,11.690687 9.47378,21.16447 21.16447,21.16447 11.69069,0 21.17558,-9.473783 21.17558,-21.16447 0,-5.25074 -1.91178,-10.054538 -5.07725,-13.754126 0.005,-0.171457 0.0111,-0.338289 0.0111,-0.511058 0,-8.895087 -7.21435,-16.109438 -16.10943,-16.109438 z"
id="path4890"
inkscape:connector-curvature="0" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 32 KiB

@ -1,2 +1,5 @@
data="?global?data"
data="?mw?Data Files"
data=./data
data-local="?user?data"
resources=./resources

@ -1,20 +1,11 @@
#include "lights.hpp"
#include <OgreLight.h>
#include <OgreMath.h>
namespace OEngine {
namespace Render {
LightFunction::LightFunction(LightType type)
: ControllerFunction<Ogre::Real>(true)
, mType(type)
, mPhase(Ogre::Math::RangeRandom(-500.0f, +500.0f))
, mDirection(1.0f)
{
}
Ogre::Real LightFunction::pulseAmplitude(Ogre::Real time)
{
return std::sin(time);
@ -97,13 +88,6 @@ Ogre::Real LightFunction::calculate(Ogre::Real value)
return brightness;
}
LightValue::LightValue(Ogre::Light *light, const Ogre::ColourValue &color)
: mTarget(light)
, mColor(color)
{
}
Ogre::Real LightValue::getValue() const
{
return 0.0f;

@ -3,6 +3,7 @@
#include <OgreController.h>
#include <OgreColourValue.h>
#include <OgreMath.h>
/*
* Controller classes to handle pulsing and flicker lights
@ -30,7 +31,14 @@ namespace Render {
static Ogre::Real flickerFrequency(Ogre::Real phase);
public:
LightFunction(LightType type);
// MSVC needs the constructor for a class inheriting a template to be defined in header
LightFunction(LightType type)
: ControllerFunction<Ogre::Real>(true)
, mType(type)
, mPhase(Ogre::Math::RangeRandom(-500.0f, +500.0f))
, mDirection(1.0f)
{
}
virtual Ogre::Real calculate(Ogre::Real value);
};
@ -40,7 +48,12 @@ namespace Render {
Ogre::ColourValue mColor;
public:
LightValue(Ogre::Light *light, const Ogre::ColourValue &color);
// MSVC needs the constructor for a class inheriting a template to be defined in header
LightValue(Ogre::Light *light, const Ogre::ColourValue &color)
: mTarget(light)
, mColor(color)
{
}
virtual Ogre::Real getValue() const;
virtual void setValue(Ogre::Real value);

@ -82,6 +82,50 @@ Allowed options:
CHANGELOG
0.26.0
Bug #274: Inconsistencies in the terrain
Bug #557: Already-dead NPCs do not equip clothing/items.
Bug #592: Window resizing
Bug #612: [Tamriel Rebuilt] Missing terrain (South of Tel Oren)
Bug #664: Heart of lorkhan acts like a dead body (container)
Bug #767: Wonky ramp physics & water
Bug #780: Swimming out of water
Bug #792: Wrong ground alignment on actors when no clipping
Bug #796: Opening and closing door sound issue
Bug #797: No clipping hinders opening and closing of doors
Bug #799: sliders in enchanting window
Bug #838: Pressing key during startup procedure freezes the game
Bug #839: Combat/magic stances during character creation
Bug #843: [Tribunal] Dark Brotherhood assassin appears without equipment
Bug #844: Resting "until healed" option given even with full stats
Bug #846: Equipped torches are invisible.
Bug #847: Incorrect formula for autocalculated NPC initial health
Bug #850: Shealt weapon sound plays when leaving magic-ready stance
Bug #852: Some boots do not produce footstep sounds
Bug #860: FPS bar misalignment
Bug #861: Unable to print screen
Bug #863: No sneaking and jumping at the same time
Bug #866: Empty variables in [Movies] section of Morrowind.ini gets imported into OpenMW.cfg as blank fallback option and crashes game on start.
Bug #867: Dancing girls in "Suran, Desele's House of Earthly Delights" don't dance.
Bug #868: Idle animations are repeated
Bug #874: Underwater swimming close to the ground is jerky
Bug #875: Animation problem while swimming on the surface and looking up
Bug #876: Always a starting upper case letter in the inventory
Bug #878: Active spell effects don't update the layout properly when ended
Bug #891: Cell 24,-12 (Tamriel Rebuilt) crashes on load
Bug #896: New game sound issue
Feature #49: Melee Combat
Feature #71: Lycanthropy
Feature #393: Initialise MWMechanics::AiSequence from ESM::AIPackageList
Feature #622: Multiple positions for inventory window
Feature #627: Drowning
Feature #786: Allow the 'Activate' key to close the countdialog window
Feature #798: Morrowind installation via Launcher (Linux/Max OS only)
Feature #851: First/Third person transitions with mouse wheel
Task #689: change PhysicActor::enableCollisions
Task #707: Reorganise Compiler
0.25.0
Bug #411: Launcher crash on OS X < 10.8

Loading…
Cancel
Save