mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-06 05:21:35 +00:00
replaced NULL with nullptr
This commit is contained in:
parent
3c76764ef4
commit
91d1bab4ac
188 changed files with 682 additions and 682 deletions
|
@ -21,7 +21,7 @@
|
||||||
CS::Editor::Editor ()
|
CS::Editor::Editor ()
|
||||||
: mUserSettings (mCfgMgr), mDocumentManager (mCfgMgr),
|
: mUserSettings (mCfgMgr), mDocumentManager (mCfgMgr),
|
||||||
mViewManager (mDocumentManager), mPid(""),
|
mViewManager (mDocumentManager), mPid(""),
|
||||||
mLock(), mIpcServerName ("org.openmw.OpenCS"), mServer(NULL), mClientSocket(NULL)
|
mLock(), mIpcServerName ("org.openmw.OpenCS"), mServer(nullptr), mClientSocket(nullptr)
|
||||||
{
|
{
|
||||||
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig();
|
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig();
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ bool CS::Editor::makeIPCServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
mServer->close();
|
mServer->close();
|
||||||
mServer = NULL;
|
mServer = nullptr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "document.hpp"
|
#include "document.hpp"
|
||||||
|
|
||||||
CSMDoc::DocumentManager::DocumentManager (const Files::ConfigurationManager& configuration)
|
CSMDoc::DocumentManager::DocumentManager (const Files::ConfigurationManager& configuration)
|
||||||
: mConfiguration (configuration), mEncoding (ToUTF8::WINDOWS_1252), mVFS(NULL)
|
: mConfiguration (configuration), mEncoding (ToUTF8::WINDOWS_1252), mVFS(nullptr)
|
||||||
{
|
{
|
||||||
boost::filesystem::path projectPath = configuration.getUserDataPath() / "projects";
|
boost::filesystem::path projectPath = configuration.getUserDataPath() / "projects";
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ CSMSettings::UserSettings *CSMSettings::UserSettings::sUserSettingsInstance = 0;
|
||||||
|
|
||||||
CSMSettings::UserSettings::UserSettings (const Files::ConfigurationManager& configurationManager)
|
CSMSettings::UserSettings::UserSettings (const Files::ConfigurationManager& configurationManager)
|
||||||
: mCfgMgr (configurationManager)
|
: mCfgMgr (configurationManager)
|
||||||
, mSettingDefinitions(NULL)
|
, mSettingDefinitions(nullptr)
|
||||||
{
|
{
|
||||||
assert(!sUserSettingsInstance);
|
assert(!sUserSettingsInstance);
|
||||||
sUserSettingsInstance = this;
|
sUserSettingsInstance = this;
|
||||||
|
|
|
@ -62,7 +62,7 @@ void CSMWorld::CreateCommand::applyModifications()
|
||||||
if (!mNestedValues.empty())
|
if (!mNestedValues.empty())
|
||||||
{
|
{
|
||||||
CSMWorld::IdTree *tree = dynamic_cast<CSMWorld::IdTree *>(&mModel);
|
CSMWorld::IdTree *tree = dynamic_cast<CSMWorld::IdTree *>(&mModel);
|
||||||
if (tree == NULL)
|
if (tree == nullptr)
|
||||||
{
|
{
|
||||||
throw std::logic_error("CSMWorld::CreateCommand: Attempt to add nested values to the non-nested model");
|
throw std::logic_error("CSMWorld::CreateCommand: Attempt to add nested values to the non-nested model");
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ void CSMWorld::IdCompletionManager::generateCompleters(CSMWorld::Data &data)
|
||||||
{
|
{
|
||||||
QAbstractItemModel *model = data.getTableModel(current->second);
|
QAbstractItemModel *model = data.getTableModel(current->second);
|
||||||
CSMWorld::IdTableBase *table = dynamic_cast<CSMWorld::IdTableBase *>(model);
|
CSMWorld::IdTableBase *table = dynamic_cast<CSMWorld::IdTableBase *>(model);
|
||||||
if (table != NULL)
|
if (table != nullptr)
|
||||||
{
|
{
|
||||||
int idColumn = table->searchColumnIndex(CSMWorld::Columns::ColumnId_Id);
|
int idColumn = table->searchColumnIndex(CSMWorld::Columns::ColumnId_Id);
|
||||||
if (idColumn != -1)
|
if (idColumn != -1)
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace
|
||||||
CSMWorld::InfoTableProxyModel::InfoTableProxyModel(CSMWorld::UniversalId::Type type, QObject *parent)
|
CSMWorld::InfoTableProxyModel::InfoTableProxyModel(CSMWorld::UniversalId::Type type, QObject *parent)
|
||||||
: IdTableProxyModel(parent),
|
: IdTableProxyModel(parent),
|
||||||
mType(type),
|
mType(type),
|
||||||
mSourceModel(NULL),
|
mSourceModel(nullptr),
|
||||||
mInfoColumnId(type == UniversalId::Type_TopicInfos ? Columns::ColumnId_Topic :
|
mInfoColumnId(type == UniversalId::Type_TopicInfos ? Columns::ColumnId_Topic :
|
||||||
Columns::ColumnId_Journal)
|
Columns::ColumnId_Journal)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ void CSMWorld::InfoTableProxyModel::setSourceModel(QAbstractItemModel *sourceMod
|
||||||
{
|
{
|
||||||
IdTableProxyModel::setSourceModel(sourceModel);
|
IdTableProxyModel::setSourceModel(sourceModel);
|
||||||
mSourceModel = dynamic_cast<IdTableBase *>(sourceModel);
|
mSourceModel = dynamic_cast<IdTableBase *>(sourceModel);
|
||||||
if (mSourceModel != NULL)
|
if (mSourceModel != nullptr)
|
||||||
{
|
{
|
||||||
connect(mSourceModel,
|
connect(mSourceModel,
|
||||||
SIGNAL(rowsInserted(const QModelIndex &, int, int)),
|
SIGNAL(rowsInserted(const QModelIndex &, int, int)),
|
||||||
|
|
|
@ -295,13 +295,13 @@ void CSMWorld::ContainerRefIdAdapter::setData (const RefIdColumn *column, RefIdD
|
||||||
|
|
||||||
CSMWorld::CreatureColumns::CreatureColumns (const ActorColumns& actorColumns)
|
CSMWorld::CreatureColumns::CreatureColumns (const ActorColumns& actorColumns)
|
||||||
: ActorColumns (actorColumns),
|
: ActorColumns (actorColumns),
|
||||||
mType(NULL),
|
mType(nullptr),
|
||||||
mSoul(NULL),
|
mSoul(nullptr),
|
||||||
mScale(NULL),
|
mScale(nullptr),
|
||||||
mOriginal(NULL),
|
mOriginal(nullptr),
|
||||||
mCombat(NULL),
|
mCombat(nullptr),
|
||||||
mMagic(NULL),
|
mMagic(nullptr),
|
||||||
mStealth(NULL)
|
mStealth(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CSMWorld::CreatureRefIdAdapter::CreatureRefIdAdapter (const CreatureColumns& columns)
|
CSMWorld::CreatureRefIdAdapter::CreatureRefIdAdapter (const CreatureColumns& columns)
|
||||||
|
@ -543,14 +543,14 @@ void CSMWorld::MiscRefIdAdapter::setData (const RefIdColumn *column, RefIdData&
|
||||||
|
|
||||||
CSMWorld::NpcColumns::NpcColumns (const ActorColumns& actorColumns)
|
CSMWorld::NpcColumns::NpcColumns (const ActorColumns& actorColumns)
|
||||||
: ActorColumns (actorColumns),
|
: ActorColumns (actorColumns),
|
||||||
mRace(NULL),
|
mRace(nullptr),
|
||||||
mClass(NULL),
|
mClass(nullptr),
|
||||||
mFaction(NULL),
|
mFaction(nullptr),
|
||||||
mHair(NULL),
|
mHair(nullptr),
|
||||||
mHead(NULL),
|
mHead(nullptr),
|
||||||
mAttributes(NULL),
|
mAttributes(nullptr),
|
||||||
mSkills(NULL),
|
mSkills(nullptr),
|
||||||
mMisc(NULL)
|
mMisc(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CSMWorld::NpcRefIdAdapter::NpcRefIdAdapter (const NpcColumns& columns)
|
CSMWorld::NpcRefIdAdapter::NpcRefIdAdapter (const NpcColumns& columns)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
CSMWorld::ResourcesManager::ResourcesManager()
|
CSMWorld::ResourcesManager::ResourcesManager()
|
||||||
: mVFS(NULL)
|
: mVFS(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ void CSVDoc::FileDialog::slotRejected()
|
||||||
if(mFileWidget)
|
if(mFileWidget)
|
||||||
{
|
{
|
||||||
delete mFileWidget;
|
delete mFileWidget;
|
||||||
mFileWidget = NULL;
|
mFileWidget = nullptr;
|
||||||
}
|
}
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ void CSVDoc::FileDialog::slotNewFile()
|
||||||
if(mFileWidget)
|
if(mFileWidget)
|
||||||
{
|
{
|
||||||
delete mFileWidget;
|
delete mFileWidget;
|
||||||
mFileWidget = NULL;
|
mFileWidget = nullptr;
|
||||||
}
|
}
|
||||||
disconnect (ui.projectButtonBox, SIGNAL (accepted()), this, SLOT (slotNewFile()));
|
disconnect (ui.projectButtonBox, SIGNAL (accepted()), this, SLOT (slotNewFile()));
|
||||||
close();
|
close();
|
||||||
|
|
|
@ -536,7 +536,7 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SubView *view = NULL;
|
SubView *view = nullptr;
|
||||||
if(isReferenceable)
|
if(isReferenceable)
|
||||||
{
|
{
|
||||||
view = mSubViewFactory.makeSubView (CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, id.getId()), *mDocument);
|
view = mSubViewFactory.makeSubView (CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, id.getId()), *mDocument);
|
||||||
|
|
|
@ -71,7 +71,7 @@ CSVRender::Cell::Cell (CSMWorld::Data& data, osg::Group* rootNode, const std::st
|
||||||
const ESM::Land* esmLand = land.getRecord(mId).get().mLand.get();
|
const ESM::Land* esmLand = land.getRecord(mId).get().mLand.get();
|
||||||
if(esmLand && esmLand->mDataTypes&ESM::Land::DATA_VHGT)
|
if(esmLand && esmLand->mDataTypes&ESM::Land::DATA_VHGT)
|
||||||
{
|
{
|
||||||
mTerrain.reset(new Terrain::TerrainGrid(mCellNode, data.getResourceSystem(), NULL, new TerrainStorage(mData), Element_Terrain<<1));
|
mTerrain.reset(new Terrain::TerrainGrid(mCellNode, data.getResourceSystem(), nullptr, new TerrainStorage(mData), Element_Terrain<<1));
|
||||||
mTerrain->loadCell(esmLand->mX,
|
mTerrain->loadCell(esmLand->mX,
|
||||||
esmLand->mY);
|
esmLand->mY);
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ std::string CSVRender::PagedWorldspaceWidget::getStartupInstruction()
|
||||||
|
|
||||||
CSVRender::PagedWorldspaceWidget::PagedWorldspaceWidget (QWidget* parent, CSMDoc::Document& document)
|
CSVRender::PagedWorldspaceWidget::PagedWorldspaceWidget (QWidget* parent, CSMDoc::Document& document)
|
||||||
: WorldspaceWidget (document, parent), mDocument (document), mWorldspace ("std::default"),
|
: WorldspaceWidget (document, parent), mDocument (document), mWorldspace ("std::default"),
|
||||||
mControlElements(NULL), mDisplayCellCoord(true)
|
mControlElements(nullptr), mDisplayCellCoord(true)
|
||||||
{
|
{
|
||||||
QAbstractItemModel *cells =
|
QAbstractItemModel *cells =
|
||||||
document.getData().getTableModel (CSMWorld::UniversalId::Type_Cells);
|
document.getData().getTableModel (CSMWorld::UniversalId::Type_Cells);
|
||||||
|
|
|
@ -135,7 +135,7 @@ void CompositeViewer::update()
|
||||||
SceneWidget::SceneWidget(Resource::SceneManager* sceneManager, QWidget *parent, Qt::WindowFlags f)
|
SceneWidget::SceneWidget(Resource::SceneManager* sceneManager, QWidget *parent, Qt::WindowFlags f)
|
||||||
: RenderWidget(parent, f)
|
: RenderWidget(parent, f)
|
||||||
, mSceneManager(sceneManager)
|
, mSceneManager(sceneManager)
|
||||||
, mLighting(NULL)
|
, mLighting(nullptr)
|
||||||
, mHasDefaultAmbient(false)
|
, mHasDefaultAmbient(false)
|
||||||
{
|
{
|
||||||
// we handle lighting manually
|
// we handle lighting manually
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace CSVRender
|
||||||
// has to wrap the vertices of the last row and column to the next cell, which may be a nonexisting cell
|
// has to wrap the vertices of the last row and column to the next cell, which may be a nonexisting cell
|
||||||
int index = mData.getLand().searchId(stream.str());
|
int index = mData.getLand().searchId(stream.str());
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
return NULL;
|
return nullptr;
|
||||||
|
|
||||||
ESM::Land* land = mData.getLand().getRecord(index).get().mLand.get();
|
ESM::Land* land = mData.getLand().getRecord(index).get().mLand.get();
|
||||||
int mask = ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX;
|
int mask = ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "view.hpp"
|
#include "view.hpp"
|
||||||
|
|
||||||
CSVSettings::SettingWindow::SettingWindow(QWidget *parent)
|
CSVSettings::SettingWindow::SettingWindow(QWidget *parent)
|
||||||
: QMainWindow(parent), mModel(NULL)
|
: QMainWindow(parent), mModel(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void CSVSettings::SettingWindow::createPages()
|
void CSVSettings::SettingWindow::createPages()
|
||||||
|
|
|
@ -46,7 +46,7 @@ void CSVWidget::ColorPickerPopup::showPicker(const QPoint &position, const QColo
|
||||||
void CSVWidget::ColorPickerPopup::mousePressEvent(QMouseEvent *event)
|
void CSVWidget::ColorPickerPopup::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
QPushButton *button = qobject_cast<QPushButton *>(parentWidget());
|
QPushButton *button = qobject_cast<QPushButton *>(parentWidget());
|
||||||
if (button != NULL)
|
if (button != nullptr)
|
||||||
{
|
{
|
||||||
QStyleOptionButton option;
|
QStyleOptionButton option;
|
||||||
option.init(button);
|
option.init(button);
|
||||||
|
|
|
@ -11,7 +11,7 @@ CSVWidget::CompleterPopup::CompleterPopup(QWidget *parent)
|
||||||
|
|
||||||
int CSVWidget::CompleterPopup::sizeHintForRow(int row) const
|
int CSVWidget::CompleterPopup::sizeHintForRow(int row) const
|
||||||
{
|
{
|
||||||
if (model() == NULL)
|
if (model() == nullptr)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ std::string CSVWorld::CellCreator::getId() const
|
||||||
void CSVWorld::CellCreator::configureCreateCommand(CSMWorld::CreateCommand& command) const
|
void CSVWorld::CellCreator::configureCreateCommand(CSMWorld::CreateCommand& command) const
|
||||||
{
|
{
|
||||||
CSMWorld::IdTree *model = dynamic_cast<CSMWorld::IdTree *>(getData().getTableModel(getCollectionId()));
|
CSMWorld::IdTree *model = dynamic_cast<CSMWorld::IdTree *>(getData().getTableModel(getCollectionId()));
|
||||||
Q_ASSERT(model != NULL);
|
Q_ASSERT(model != nullptr);
|
||||||
int parentIndex = model->findColumnIndex(CSMWorld::Columns::ColumnId_Cell);
|
int parentIndex = model->findColumnIndex(CSMWorld::Columns::ColumnId_Cell);
|
||||||
int index = model->findNestedColumnIndex(parentIndex, CSMWorld::Columns::ColumnId_Interior);
|
int index = model->findNestedColumnIndex(parentIndex, CSMWorld::Columns::ColumnId_Interior);
|
||||||
command.addNestedValue(parentIndex, index, mType->currentIndex() == 0);
|
command.addNestedValue(parentIndex, index, mType->currentIndex() == 0);
|
||||||
|
|
|
@ -154,7 +154,7 @@ mNotEditableDelegate(table, parent)
|
||||||
|
|
||||||
CSVWorld::CommandDelegate* CSVWorld::DialogueDelegateDispatcher::makeDelegate(CSMWorld::ColumnBase::Display display)
|
CSVWorld::CommandDelegate* CSVWorld::DialogueDelegateDispatcher::makeDelegate(CSMWorld::ColumnBase::Display display)
|
||||||
{
|
{
|
||||||
CommandDelegate *delegate = NULL;
|
CommandDelegate *delegate = nullptr;
|
||||||
std::map<int, CommandDelegate*>::const_iterator delegateIt(mDelegates.find(display));
|
std::map<int, CommandDelegate*>::const_iterator delegateIt(mDelegates.find(display));
|
||||||
if (delegateIt == mDelegates.end())
|
if (delegateIt == mDelegates.end())
|
||||||
{
|
{
|
||||||
|
@ -247,11 +247,11 @@ QWidget* CSVWorld::DialogueDelegateDispatcher::makeEditor(CSMWorld::ColumnBase::
|
||||||
variant = index.data(Qt::DisplayRole);
|
variant = index.data(Qt::DisplayRole);
|
||||||
if (!variant.isValid())
|
if (!variant.isValid())
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget* editor = NULL;
|
QWidget* editor = nullptr;
|
||||||
if (! (mTable->flags (index) & Qt::ItemIsEditable))
|
if (! (mTable->flags (index) & Qt::ItemIsEditable))
|
||||||
{
|
{
|
||||||
return mNotEditableDelegate.createEditor(qobject_cast<QWidget*>(mParent),
|
return mNotEditableDelegate.createEditor(qobject_cast<QWidget*>(mParent),
|
||||||
|
@ -321,7 +321,7 @@ CSVWorld::IdContextMenu::IdContextMenu(QWidget *widget, CSMWorld::ColumnBase::Di
|
||||||
mWidget(widget),
|
mWidget(widget),
|
||||||
mIdType(CSMWorld::TableMimeData::convertEnums(display))
|
mIdType(CSMWorld::TableMimeData::convertEnums(display))
|
||||||
{
|
{
|
||||||
Q_ASSERT(mWidget != NULL);
|
Q_ASSERT(mWidget != nullptr);
|
||||||
Q_ASSERT(CSMWorld::ColumnBase::isId(display));
|
Q_ASSERT(CSMWorld::ColumnBase::isId(display));
|
||||||
Q_ASSERT(mIdType != CSMWorld::UniversalId::Type_None);
|
Q_ASSERT(mIdType != CSMWorld::UniversalId::Type_None);
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ CSVWorld::IdContextMenu::IdContextMenu(QWidget *widget, CSMWorld::ColumnBase::Di
|
||||||
connect(mEditIdAction, SIGNAL(triggered()), this, SLOT(editIdRequest()));
|
connect(mEditIdAction, SIGNAL(triggered()), this, SLOT(editIdRequest()));
|
||||||
|
|
||||||
QLineEdit *lineEdit = qobject_cast<QLineEdit *>(mWidget);
|
QLineEdit *lineEdit = qobject_cast<QLineEdit *>(mWidget);
|
||||||
if (lineEdit != NULL)
|
if (lineEdit != nullptr)
|
||||||
{
|
{
|
||||||
mContextMenu = lineEdit->createStandardContextMenu();
|
mContextMenu = lineEdit->createStandardContextMenu();
|
||||||
}
|
}
|
||||||
|
@ -356,11 +356,11 @@ QString CSVWorld::IdContextMenu::getWidgetValue() const
|
||||||
QLabel *label = qobject_cast<QLabel *>(mWidget);
|
QLabel *label = qobject_cast<QLabel *>(mWidget);
|
||||||
|
|
||||||
QString value = "";
|
QString value = "";
|
||||||
if (lineEdit != NULL)
|
if (lineEdit != nullptr)
|
||||||
{
|
{
|
||||||
value = lineEdit->text();
|
value = lineEdit->text();
|
||||||
}
|
}
|
||||||
else if (label != NULL)
|
else if (label != nullptr)
|
||||||
{
|
{
|
||||||
value = label->text();
|
value = label->text();
|
||||||
}
|
}
|
||||||
|
@ -432,7 +432,7 @@ void CSVWorld::EditWidget::createEditorContextMenu(QWidget *editor,
|
||||||
CSMWorld::ColumnBase::Display display,
|
CSMWorld::ColumnBase::Display display,
|
||||||
int currentRow) const
|
int currentRow) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(editor != NULL);
|
Q_ASSERT(editor != nullptr);
|
||||||
|
|
||||||
if (CSMWorld::ColumnBase::isId(display) &&
|
if (CSMWorld::ColumnBase::isId(display) &&
|
||||||
CSMWorld::TableMimeData::convertEnums(display) != CSMWorld::UniversalId::Type_None)
|
CSMWorld::TableMimeData::convertEnums(display) != CSMWorld::UniversalId::Type_None)
|
||||||
|
@ -466,11 +466,11 @@ CSVWorld::EditWidget::EditWidget(QWidget *parent,
|
||||||
int row, CSMWorld::IdTable* table, CSMWorld::CommandDispatcher& commandDispatcher,
|
int row, CSMWorld::IdTable* table, CSMWorld::CommandDispatcher& commandDispatcher,
|
||||||
CSMDoc::Document& document, bool createAndDelete) :
|
CSMDoc::Document& document, bool createAndDelete) :
|
||||||
QScrollArea(parent),
|
QScrollArea(parent),
|
||||||
mWidgetMapper(NULL),
|
mWidgetMapper(nullptr),
|
||||||
mNestedTableMapper(NULL),
|
mNestedTableMapper(nullptr),
|
||||||
mDispatcher(NULL),
|
mDispatcher(nullptr),
|
||||||
mNestedTableDispatcher(NULL),
|
mNestedTableDispatcher(nullptr),
|
||||||
mMainWidget(NULL),
|
mMainWidget(nullptr),
|
||||||
mTable(table),
|
mTable(table),
|
||||||
mCommandDispatcher (commandDispatcher),
|
mCommandDispatcher (commandDispatcher),
|
||||||
mDocument (document)
|
mDocument (document)
|
||||||
|
@ -725,7 +725,7 @@ bool CSVWorld::SimpleDialogueSubView::isLocked() const
|
||||||
CSVWorld::SimpleDialogueSubView::SimpleDialogueSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) :
|
CSVWorld::SimpleDialogueSubView::SimpleDialogueSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) :
|
||||||
SubView (id),
|
SubView (id),
|
||||||
mEditWidget(0),
|
mEditWidget(0),
|
||||||
mMainLayout(NULL),
|
mMainLayout(nullptr),
|
||||||
mTable(dynamic_cast<CSMWorld::IdTable*>(document.getData().getTableModel(id))),
|
mTable(dynamic_cast<CSMWorld::IdTable*>(document.getData().getTableModel(id))),
|
||||||
mLocked(false),
|
mLocked(false),
|
||||||
mDocument(document),
|
mDocument(document),
|
||||||
|
|
|
@ -12,7 +12,7 @@ const CSMWorld::TableMimeData *CSVWorld::DragDropUtils::getTableMimeData(const Q
|
||||||
bool CSVWorld::DragDropUtils::canAcceptData(const QDropEvent &event, CSMWorld::ColumnBase::Display type)
|
bool CSVWorld::DragDropUtils::canAcceptData(const QDropEvent &event, CSMWorld::ColumnBase::Display type)
|
||||||
{
|
{
|
||||||
const CSMWorld::TableMimeData *data = getTableMimeData(event);
|
const CSMWorld::TableMimeData *data = getTableMimeData(event);
|
||||||
return data != NULL && data->holdsType(type);
|
return data != nullptr && data->holdsType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMWorld::UniversalId CSVWorld::DragDropUtils::getAcceptedData(const QDropEvent &event,
|
CSMWorld::UniversalId CSVWorld::DragDropUtils::getAcceptedData(const QDropEvent &event,
|
||||||
|
|
|
@ -83,7 +83,7 @@ void CSVWorld::DragRecordTable::dropEvent(QDropEvent *event)
|
||||||
|
|
||||||
CSMWorld::ColumnBase::Display CSVWorld::DragRecordTable::getIndexDisplayType(const QModelIndex &index) const
|
CSMWorld::ColumnBase::Display CSVWorld::DragRecordTable::getIndexDisplayType(const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(model() != NULL);
|
Q_ASSERT(model() != nullptr);
|
||||||
|
|
||||||
if (index.isValid())
|
if (index.isValid())
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace CSVWorld
|
||||||
bool mEditLock;
|
bool mEditLock;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DragRecordTable(CSMDoc::Document& document, QWidget* parent = NULL);
|
DragRecordTable(CSMDoc::Document& document, QWidget* parent = nullptr);
|
||||||
|
|
||||||
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const = 0;
|
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const = 0;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ QWidget *CSVWorld::IdCompletionDelegate::createEditor(QWidget *parent,
|
||||||
{
|
{
|
||||||
if (!index.data(Qt::EditRole).isValid() && !index.data(Qt::DisplayRole).isValid())
|
if (!index.data(Qt::EditRole).isValid() && !index.data(Qt::DisplayRole).isValid())
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMWorld::IdCompletionManager &completionManager = getDocument().getIdCompletionManager();
|
CSMWorld::IdCompletionManager &completionManager = getDocument().getIdCompletionManager();
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace CSVWorld
|
||||||
NestedTable(CSMDoc::Document& document,
|
NestedTable(CSMDoc::Document& document,
|
||||||
CSMWorld::UniversalId id,
|
CSMWorld::UniversalId id,
|
||||||
CSMWorld::NestedTableProxyModel* model,
|
CSMWorld::NestedTableProxyModel* model,
|
||||||
QWidget* parent = NULL);
|
QWidget* parent = nullptr);
|
||||||
|
|
||||||
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const;
|
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "creator.hpp"
|
#include "creator.hpp"
|
||||||
|
|
||||||
CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
||||||
: SubView (id), mScene(NULL), mLayout(new QHBoxLayout), mDocument(document), mToolbar(NULL)
|
: SubView (id), mScene(nullptr), mLayout(new QHBoxLayout), mDocument(document), mToolbar(nullptr)
|
||||||
{
|
{
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::D
|
||||||
|
|
||||||
mLayout->setContentsMargins (QMargins (0, 0, 0, 0));
|
mLayout->setContentsMargins (QMargins (0, 0, 0, 0));
|
||||||
|
|
||||||
CSVRender::WorldspaceWidget* worldspaceWidget = NULL;
|
CSVRender::WorldspaceWidget* worldspaceWidget = nullptr;
|
||||||
widgetType whatWidget;
|
widgetType whatWidget;
|
||||||
|
|
||||||
if (id.getId()=="sys::default")
|
if (id.getId()=="sys::default")
|
||||||
|
@ -197,9 +197,9 @@ void CSVWorld::SceneSubView::cellSelectionChanged (const CSMWorld::CellSelection
|
||||||
|
|
||||||
void CSVWorld::SceneSubView::handleDrop (const std::vector< CSMWorld::UniversalId >& data)
|
void CSVWorld::SceneSubView::handleDrop (const std::vector< CSMWorld::UniversalId >& data)
|
||||||
{
|
{
|
||||||
CSVRender::PagedWorldspaceWidget* pagedNewWidget = NULL;
|
CSVRender::PagedWorldspaceWidget* pagedNewWidget = nullptr;
|
||||||
CSVRender::UnpagedWorldspaceWidget* unPagedNewWidget = NULL;
|
CSVRender::UnpagedWorldspaceWidget* unPagedNewWidget = nullptr;
|
||||||
CSVWidget::SceneToolbar* toolbar = NULL;
|
CSVWidget::SceneToolbar* toolbar = nullptr;
|
||||||
|
|
||||||
CSVRender::WorldspaceWidget::DropType type = CSVRender::WorldspaceWidget::getDropType (data);
|
CSVRender::WorldspaceWidget::DropType type = CSVRender::WorldspaceWidget::getDropType (data);
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ void CSVWorld::CommandDelegate::setModelDataImp (QWidget *editor, QAbstractItemM
|
||||||
QVariant new_;
|
QVariant new_;
|
||||||
// Color columns use a custom editor, so we need explicitly extract a data from it
|
// Color columns use a custom editor, so we need explicitly extract a data from it
|
||||||
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
||||||
if (colorEditor != NULL)
|
if (colorEditor != nullptr)
|
||||||
{
|
{
|
||||||
new_ = colorEditor->color();
|
new_ = colorEditor->color();
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ void CSVWorld::CommandDelegate::setEditorData (QWidget *editor, const QModelInde
|
||||||
|
|
||||||
// Color columns use a custom editor, so we need explicitly set a data for it
|
// Color columns use a custom editor, so we need explicitly set a data for it
|
||||||
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
||||||
if (colorEditor != NULL)
|
if (colorEditor != nullptr)
|
||||||
{
|
{
|
||||||
colorEditor->setColor(index.data().value<QColor>());
|
colorEditor->setColor(index.data().value<QColor>());
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -63,7 +63,7 @@ static const struct {
|
||||||
{ "Illegal instruction", SIGILL },
|
{ "Illegal instruction", SIGILL },
|
||||||
{ "FPU exception", SIGFPE },
|
{ "FPU exception", SIGFPE },
|
||||||
{ "System BUS error", SIGBUS },
|
{ "System BUS error", SIGBUS },
|
||||||
{ NULL, 0 }
|
{ nullptr, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
|
@ -80,7 +80,7 @@ static const struct {
|
||||||
{ ILL_COPROC, "Coprocessor error" },
|
{ ILL_COPROC, "Coprocessor error" },
|
||||||
{ ILL_BADSTK, "Internal stack error" },
|
{ ILL_BADSTK, "Internal stack error" },
|
||||||
#endif
|
#endif
|
||||||
{ 0, NULL }
|
{ 0, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
|
@ -95,7 +95,7 @@ static const struct {
|
||||||
{ FPE_FLTRES, "Floating point inexact result" },
|
{ FPE_FLTRES, "Floating point inexact result" },
|
||||||
{ FPE_FLTINV, "Floating point invalid operation" },
|
{ FPE_FLTINV, "Floating point invalid operation" },
|
||||||
{ FPE_FLTSUB, "Subscript out of range" },
|
{ FPE_FLTSUB, "Subscript out of range" },
|
||||||
{ 0, NULL }
|
{ 0, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
|
@ -106,7 +106,7 @@ static const struct {
|
||||||
{ SEGV_MAPERR, "Address not mapped to object" },
|
{ SEGV_MAPERR, "Address not mapped to object" },
|
||||||
{ SEGV_ACCERR, "Invalid permissions for mapped object" },
|
{ SEGV_ACCERR, "Invalid permissions for mapped object" },
|
||||||
#endif
|
#endif
|
||||||
{ 0, NULL }
|
{ 0, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
|
@ -118,7 +118,7 @@ static const struct {
|
||||||
{ BUS_ADRERR, "Non-existent physical address" },
|
{ BUS_ADRERR, "Non-existent physical address" },
|
||||||
{ BUS_OBJERR, "Object specific hardware error" },
|
{ BUS_OBJERR, "Object specific hardware error" },
|
||||||
#endif
|
#endif
|
||||||
{ 0, NULL }
|
{ 0, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
static int (*cc_user_info)(char*, char*);
|
static int (*cc_user_info)(char*, char*);
|
||||||
|
@ -132,7 +132,7 @@ static void gdb_info(pid_t pid)
|
||||||
|
|
||||||
/* Create a temp file to put gdb commands into */
|
/* Create a temp file to put gdb commands into */
|
||||||
strcpy(respfile, "/tmp/gdb-respfile-XXXXXX");
|
strcpy(respfile, "/tmp/gdb-respfile-XXXXXX");
|
||||||
if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != NULL)
|
if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != nullptr)
|
||||||
{
|
{
|
||||||
fprintf(f, "attach %d\n"
|
fprintf(f, "attach %d\n"
|
||||||
"shell echo \"\"\n"
|
"shell echo \"\"\n"
|
||||||
|
@ -255,7 +255,7 @@ static void crash_catcher(int signum, siginfo_t *siginfo, void *context)
|
||||||
close(fd[0]);
|
close(fd[0]);
|
||||||
close(fd[1]);
|
close(fd[1]);
|
||||||
|
|
||||||
execl(argv0, argv0, crash_switch, NULL);
|
execl(argv0, argv0, crash_switch, nullptr);
|
||||||
|
|
||||||
safe_write(STDERR_FILENO, exec_err, sizeof(exec_err)-1);
|
safe_write(STDERR_FILENO, exec_err, sizeof(exec_err)-1);
|
||||||
_exit(1);
|
_exit(1);
|
||||||
|
@ -390,7 +390,7 @@ static void crash_handler(const char *logfile)
|
||||||
if(logfile)
|
if(logfile)
|
||||||
{
|
{
|
||||||
std::string message = "OpenMW has encountered a fatal error.\nCrash log saved to '" + std::string(logfile) + "'.\n Please report this to https://bugs.openmw.org !";
|
std::string message = "OpenMW has encountered a fatal error.\nCrash log saved to '" + std::string(logfile) + "'.\n Please report this to https://bugs.openmw.org !";
|
||||||
SDL_ShowSimpleMessageBox(0, "Fatal Error", message.c_str(), NULL);
|
SDL_ShowSimpleMessageBox(0, "Fatal Error", message.c_str(), nullptr);
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ int cc_install_handlers(int argc, char **argv, int num_signals, int *signals, co
|
||||||
altss.ss_sp = altstack;
|
altss.ss_sp = altstack;
|
||||||
altss.ss_flags = 0;
|
altss.ss_flags = 0;
|
||||||
altss.ss_size = sizeof(altstack);
|
altss.ss_size = sizeof(altstack);
|
||||||
sigaltstack(&altss, NULL);
|
sigaltstack(&altss, nullptr);
|
||||||
|
|
||||||
memset(&sa, 0, sizeof(sa));
|
memset(&sa, 0, sizeof(sa));
|
||||||
sa.sa_sigaction = crash_catcher;
|
sa.sa_sigaction = crash_catcher;
|
||||||
|
@ -437,7 +437,7 @@ int cc_install_handlers(int argc, char **argv, int num_signals, int *signals, co
|
||||||
while(num_signals--)
|
while(num_signals--)
|
||||||
{
|
{
|
||||||
if((*signals != SIGSEGV && *signals != SIGILL && *signals != SIGFPE && *signals != SIGABRT &&
|
if((*signals != SIGSEGV && *signals != SIGILL && *signals != SIGFPE && *signals != SIGABRT &&
|
||||||
*signals != SIGBUS) || sigaction(*signals, &sa, NULL) == -1)
|
*signals != SIGBUS) || sigaction(*signals, &sa, nullptr) == -1)
|
||||||
{
|
{
|
||||||
*signals = 0;
|
*signals = 0;
|
||||||
retval = -1;
|
retval = -1;
|
||||||
|
|
|
@ -193,9 +193,9 @@ void OMW::Engine::frame(float frametime)
|
||||||
}
|
}
|
||||||
|
|
||||||
OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
||||||
: mWindow(NULL)
|
: mWindow(nullptr)
|
||||||
, mEncoding(ToUTF8::WINDOWS_1252)
|
, mEncoding(ToUTF8::WINDOWS_1252)
|
||||||
, mEncoder(NULL)
|
, mEncoder(nullptr)
|
||||||
, mVerboseScripts (false)
|
, mVerboseScripts (false)
|
||||||
, mSkipMenu (false)
|
, mSkipMenu (false)
|
||||||
, mUseSound (true)
|
, mUseSound (true)
|
||||||
|
@ -233,16 +233,16 @@ OMW::Engine::~Engine()
|
||||||
mEnvironment.cleanup();
|
mEnvironment.cleanup();
|
||||||
|
|
||||||
delete mScriptContext;
|
delete mScriptContext;
|
||||||
mScriptContext = NULL;
|
mScriptContext = nullptr;
|
||||||
|
|
||||||
mResourceSystem.reset();
|
mResourceSystem.reset();
|
||||||
|
|
||||||
mViewer = NULL;
|
mViewer = nullptr;
|
||||||
|
|
||||||
if (mWindow)
|
if (mWindow)
|
||||||
{
|
{
|
||||||
SDL_DestroyWindow(mWindow);
|
SDL_DestroyWindow(mWindow);
|
||||||
mWindow = NULL;
|
mWindow = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
|
|
|
@ -368,7 +368,7 @@ int main(int argc, char**argv)
|
||||||
if ((argc == 2 && strcmp(argv[1], "--cc-handle-crash") == 0) || !is_debugger_attached())
|
if ((argc == 2 && strcmp(argv[1], "--cc-handle-crash") == 0) || !is_debugger_attached())
|
||||||
{
|
{
|
||||||
int s[5] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS, SIGABRT };
|
int s[5] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS, SIGABRT };
|
||||||
cc_install_handlers(argc, argv, 5, s, (cfgMgr.getLogPath() / "crash.log").string().c_str(), NULL);
|
cc_install_handlers(argc, argv, 5, s, (cfgMgr.getLogPath() / "crash.log").string().c_str(), nullptr);
|
||||||
std::cout << "Installing crash catcher" << std::endl;
|
std::cout << "Installing crash catcher" << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -393,7 +393,7 @@ int main(int argc, char**argv)
|
||||||
#if (defined(__APPLE__) || defined(__linux) || defined(__unix) || defined(__posix))
|
#if (defined(__APPLE__) || defined(__linux) || defined(__unix) || defined(__posix))
|
||||||
if (!isatty(fileno(stdin)))
|
if (!isatty(fileno(stdin)))
|
||||||
#endif
|
#endif
|
||||||
SDL_ShowSimpleMessageBox(0, "OpenMW: Fatal error", e.what(), NULL);
|
SDL_ShowSimpleMessageBox(0, "OpenMW: Fatal error", e.what(), nullptr);
|
||||||
|
|
||||||
std::cerr << "\nERROR: " << e.what() << std::endl;
|
std::cerr << "\nERROR: " << e.what() << std::endl;
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Activator> *ref =
|
MWWorld::LiveCellRef<ESM::Activator> *ref =
|
||||||
ptr.get<ESM::Activator>();
|
ptr.get<ESM::Activator>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||||
ptr.get<ESM::Apparatus>();
|
ptr.get<ESM::Apparatus>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||||
ptr.get<ESM::Armor>();
|
ptr.get<ESM::Armor>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||||
ptr.get<ESM::Book>();
|
ptr.get<ESM::Book>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||||
ptr.get<ESM::Clothing>();
|
ptr.get<ESM::Clothing>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace MWClass
|
||||||
ptr.get<ESM::Container>();
|
ptr.get<ESM::Container>();
|
||||||
if (ref->mBase->mFlags & ESM::Container::Respawn)
|
if (ref->mBase->mFlags & ESM::Container::Respawn)
|
||||||
{
|
{
|
||||||
ptr.getRefData().setCustomData(NULL);
|
ptr.getRefData().setCustomData(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Container> *ref =
|
MWWorld::LiveCellRef<ESM::Container> *ref =
|
||||||
ptr.get<ESM::Container>();
|
ptr.get<ESM::Container>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -184,7 +184,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Creature> *ref =
|
MWWorld::LiveCellRef<ESM::Creature> *ref =
|
||||||
ptr.get<ESM::Creature>();
|
ptr.get<ESM::Creature>();
|
||||||
assert (ref->mBase != NULL);
|
assert (ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
@ -280,7 +280,7 @@ namespace MWClass
|
||||||
bool healthdmg = true;
|
bool healthdmg = true;
|
||||||
if (!weapon.isEmpty())
|
if (!weapon.isEmpty())
|
||||||
{
|
{
|
||||||
const unsigned char *attack = NULL;
|
const unsigned char *attack = nullptr;
|
||||||
if(type == ESM::Weapon::AT_Chop)
|
if(type == ESM::Weapon::AT_Chop)
|
||||||
attack = weapon.get<ESM::Weapon>()->mBase->mData.mChop;
|
attack = weapon.get<ESM::Weapon>()->mBase->mData.mChop;
|
||||||
else if(type == ESM::Weapon::AT_Slash)
|
else if(type == ESM::Weapon::AT_Slash)
|
||||||
|
@ -862,7 +862,7 @@ namespace MWClass
|
||||||
// Reset to original position
|
// Reset to original position
|
||||||
ptr.getRefData().setPosition(ptr.getCellRef().getPosition());
|
ptr.getRefData().setPosition(ptr.getCellRef().getPosition());
|
||||||
|
|
||||||
ptr.getRefData().setCustomData(NULL);
|
ptr.getRefData().setCustomData(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Door> *ref =
|
MWWorld::LiveCellRef<ESM::Door> *ref =
|
||||||
ptr.get<ESM::Door>();
|
ptr.get<ESM::Door>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||||
ptr.get<ESM::Ingredient>();
|
ptr.get<ESM::Ingredient>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||||
ptr.get<ESM::Light>();
|
ptr.get<ESM::Light>();
|
||||||
assert (ref->mBase != NULL);
|
assert (ref->mBase != nullptr);
|
||||||
|
|
||||||
// TODO: add option somewhere to enable collision for placeable objects
|
// TODO: add option somewhere to enable collision for placeable objects
|
||||||
if (!model.empty() && (ref->mBase->mData.mFlags & ESM::Light::Carry) == 0)
|
if (!model.empty() && (ref->mBase->mData.mFlags & ESM::Light::Carry) == 0)
|
||||||
|
@ -63,7 +63,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||||
ptr.get<ESM::Light>();
|
ptr.get<ESM::Light>();
|
||||||
assert (ref->mBase != NULL);
|
assert (ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Lockpick> *ref =
|
MWWorld::LiveCellRef<ESM::Lockpick> *ref =
|
||||||
ptr.get<ESM::Lockpick>();
|
ptr.get<ESM::Lockpick>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||||
ptr.get<ESM::Miscellaneous>();
|
ptr.get<ESM::Miscellaneous>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -430,7 +430,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::NPC> *ref =
|
MWWorld::LiveCellRef<ESM::NPC> *ref =
|
||||||
ptr.get<ESM::NPC>();
|
ptr.get<ESM::NPC>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
std::string model = "meshes\\base_anim.nif";
|
std::string model = "meshes\\base_anim.nif";
|
||||||
const ESM::Race* race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().find(ref->mBase->mRace);
|
const ESM::Race* race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().find(ref->mBase->mRace);
|
||||||
|
@ -524,7 +524,7 @@ namespace MWClass
|
||||||
float damage = 0.0f;
|
float damage = 0.0f;
|
||||||
if(!weapon.isEmpty())
|
if(!weapon.isEmpty())
|
||||||
{
|
{
|
||||||
const unsigned char *attack = NULL;
|
const unsigned char *attack = nullptr;
|
||||||
if(type == ESM::Weapon::AT_Chop)
|
if(type == ESM::Weapon::AT_Chop)
|
||||||
attack = weapon.get<ESM::Weapon>()->mBase->mData.mChop;
|
attack = weapon.get<ESM::Weapon>()->mBase->mData.mChop;
|
||||||
else if(type == ESM::Weapon::AT_Slash)
|
else if(type == ESM::Weapon::AT_Slash)
|
||||||
|
@ -1300,7 +1300,7 @@ namespace MWClass
|
||||||
// Reset to original position
|
// Reset to original position
|
||||||
ptr.getRefData().setPosition(ptr.getCellRef().getPosition());
|
ptr.getRefData().setPosition(ptr.getCellRef().getPosition());
|
||||||
|
|
||||||
ptr.getRefData().setCustomData(NULL);
|
ptr.getRefData().setCustomData(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||||
ptr.get<ESM::Potion>();
|
ptr.get<ESM::Potion>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||||
ptr.get<ESM::Probe>();
|
ptr.get<ESM::Probe>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||||
ptr.get<ESM::Repair>();
|
ptr.get<ESM::Repair>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Static> *ref =
|
MWWorld::LiveCellRef<ESM::Static> *ref =
|
||||||
ptr.get<ESM::Static>();
|
ptr.get<ESM::Static>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||||
ptr.get<ESM::Weapon>();
|
ptr.get<ESM::Weapon>();
|
||||||
assert(ref->mBase != NULL);
|
assert(ref->mBase != nullptr);
|
||||||
|
|
||||||
const std::string &model = ref->mBase->mModel;
|
const std::string &model = ref->mBase->mModel;
|
||||||
if (!model.empty()) {
|
if (!model.empty()) {
|
||||||
|
|
|
@ -622,7 +622,7 @@ namespace MWDialogue
|
||||||
|
|
||||||
Filter filter(actor, 0, false);
|
Filter filter(actor, 0, false);
|
||||||
const ESM::DialInfo *info = filter.search(*dial, false);
|
const ESM::DialInfo *info = filter.search(*dial, false);
|
||||||
if(info != NULL)
|
if(info != nullptr)
|
||||||
{
|
{
|
||||||
MWBase::WindowManager *winMgr = MWBase::Environment::get().getWindowManager();
|
MWBase::WindowManager *winMgr = MWBase::Environment::get().getWindowManager();
|
||||||
if(winMgr->getSubtitlesEnabled())
|
if(winMgr->getSubtitlesEnabled())
|
||||||
|
|
|
@ -596,7 +596,7 @@ const ESM::DialInfo* MWDialogue::Filter::search (const ESM::Dialogue& dialogue,
|
||||||
std::vector<const ESM::DialInfo *> suitableInfos = list (dialogue, fallbackToInfoRefusal, false);
|
std::vector<const ESM::DialInfo *> suitableInfos = list (dialogue, fallbackToInfoRefusal, false);
|
||||||
|
|
||||||
if (suitableInfos.empty())
|
if (suitableInfos.empty())
|
||||||
return NULL;
|
return nullptr;
|
||||||
else
|
else
|
||||||
return suitableInfos[0];
|
return suitableInfos[0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace MWDialogue
|
||||||
{
|
{
|
||||||
if (actor.isEmpty())
|
if (actor.isEmpty())
|
||||||
{
|
{
|
||||||
MWScript::InterpreterContext interpreterContext(NULL,MWWorld::Ptr());
|
MWScript::InterpreterContext interpreterContext(nullptr,MWWorld::Ptr());
|
||||||
mText = Interpreter::fixDefinesDialog(iter->mResponse, interpreterContext);
|
mText = Interpreter::fixDefinesDialog(iter->mResponse, interpreterContext);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
AlchemyWindow::AlchemyWindow()
|
AlchemyWindow::AlchemyWindow()
|
||||||
: WindowBase("openmw_alchemy_window.layout")
|
: WindowBase("openmw_alchemy_window.layout")
|
||||||
, mSortModel(NULL)
|
, mSortModel(nullptr)
|
||||||
, mAlchemy(new MWMechanics::Alchemy())
|
, mAlchemy(new MWMechanics::Alchemy())
|
||||||
, mApparatus (4)
|
, mApparatus (4)
|
||||||
, mIngredients (4)
|
, mIngredients (4)
|
||||||
|
|
|
@ -10,7 +10,7 @@ void BackgroundImage::setBackgroundImage (const std::string& image, bool fixedRa
|
||||||
if (mChild)
|
if (mChild)
|
||||||
{
|
{
|
||||||
MyGUI::Gui::getInstance().destroyWidget(mChild);
|
MyGUI::Gui::getInstance().destroyWidget(mChild);
|
||||||
mChild = NULL;
|
mChild = nullptr;
|
||||||
}
|
}
|
||||||
if (!stretch)
|
if (!stretch)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
||||||
MYGUI_RTTI_DERIVED(BackgroundImage)
|
MYGUI_RTTI_DERIVED(BackgroundImage)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BackgroundImage() : mChild(NULL), mAspect(0) {}
|
BackgroundImage() : mChild(nullptr), mAspect(0) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param fixedRatio Use a fixed ratio of 4:3, regardless of the image dimensions
|
* @param fixedRatio Use a fixed ratio of 4:3, regardless of the image dimensions
|
||||||
|
|
|
@ -112,7 +112,7 @@ struct TypesetBookImpl : TypesetBook
|
||||||
Contents::iterator i = mContents.insert (mContents.end (), Content (text.first, text.second));
|
Contents::iterator i = mContents.insert (mContents.end (), Content (text.first, text.second));
|
||||||
|
|
||||||
if (i->empty())
|
if (i->empty())
|
||||||
return Range (Utf8Point (NULL), Utf8Point (NULL));
|
return Range (Utf8Point (nullptr), Utf8Point (nullptr));
|
||||||
|
|
||||||
Utf8Point begin = &i->front ();
|
Utf8Point begin = &i->front ();
|
||||||
Utf8Point end = &i->front () + i->size ();
|
Utf8Point end = &i->front () + i->size ();
|
||||||
|
@ -150,7 +150,7 @@ struct TypesetBookImpl : TypesetBook
|
||||||
template <typename Visitor>
|
template <typename Visitor>
|
||||||
void visitRuns (int top, int bottom, Visitor const & visitor) const
|
void visitRuns (int top, int bottom, Visitor const & visitor) const
|
||||||
{
|
{
|
||||||
visitRuns (top, bottom, NULL, visitor);
|
visitRuns (top, bottom, nullptr, visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
StyleImpl * hitTest (int left, int top) const
|
StyleImpl * hitTest (int left, int top) const
|
||||||
|
@ -187,7 +187,7 @@ struct TypesetBookImpl : TypesetBook
|
||||||
for (Styles::iterator i = mStyles.begin (); i != mStyles.end (); ++i)
|
for (Styles::iterator i = mStyles.begin (); i != mStyles.end (); ++i)
|
||||||
if (&*i == style)
|
if (&*i == style)
|
||||||
return i->mFont;
|
return i->mFont;
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Typesetter;
|
struct Typesetter;
|
||||||
|
@ -227,8 +227,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
|
|
||||||
Typesetter (size_t width, size_t height) :
|
Typesetter (size_t width, size_t height) :
|
||||||
mPageWidth (width), mPageHeight(height),
|
mPageWidth (width), mPageHeight(height),
|
||||||
mSection (NULL), mLine (NULL), mRun (NULL),
|
mSection (nullptr), mLine (nullptr), mRun (nullptr),
|
||||||
mCurrentContent (NULL),
|
mCurrentContent (nullptr),
|
||||||
mCurrentAlignment (AlignLeft)
|
mCurrentAlignment (AlignLeft)
|
||||||
{
|
{
|
||||||
mBook = std::make_shared <Book> ();
|
mBook = std::make_shared <Book> ();
|
||||||
|
@ -306,7 +306,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
|
|
||||||
void write (Style * style, size_t begin, size_t end)
|
void write (Style * style, size_t begin, size_t end)
|
||||||
{
|
{
|
||||||
assert (mCurrentContent != NULL);
|
assert (mCurrentContent != nullptr);
|
||||||
assert (end <= mCurrentContent->size ());
|
assert (end <= mCurrentContent->size ());
|
||||||
assert (begin <= mCurrentContent->size ());
|
assert (begin <= mCurrentContent->size ());
|
||||||
|
|
||||||
|
@ -322,8 +322,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
|
|
||||||
add_partial_text();
|
add_partial_text();
|
||||||
|
|
||||||
mRun = NULL;
|
mRun = nullptr;
|
||||||
mLine = NULL;
|
mLine = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sectionBreak (int margin)
|
void sectionBreak (int margin)
|
||||||
|
@ -332,9 +332,9 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
|
|
||||||
if (mBook->mSections.size () > 0)
|
if (mBook->mSections.size () > 0)
|
||||||
{
|
{
|
||||||
mRun = NULL;
|
mRun = nullptr;
|
||||||
mLine = NULL;
|
mLine = nullptr;
|
||||||
mSection = NULL;
|
mSection = nullptr;
|
||||||
|
|
||||||
if (mBook->mRect.bottom < (mBook->mSections.back ().mRect.bottom + margin))
|
if (mBook->mRect.bottom < (mBook->mSections.back ().mRect.bottom + margin))
|
||||||
mBook->mRect.bottom = (mBook->mSections.back ().mRect.bottom + margin);
|
mBook->mRect.bottom = (mBook->mSections.back ().mRect.bottom + margin);
|
||||||
|
@ -345,7 +345,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
{
|
{
|
||||||
add_partial_text();
|
add_partial_text();
|
||||||
|
|
||||||
if (mSection != NULL)
|
if (mSection != nullptr)
|
||||||
mSectionAlignment.back () = sectionAlignment;
|
mSectionAlignment.back () = sectionAlignment;
|
||||||
mCurrentAlignment = sectionAlignment;
|
mCurrentAlignment = sectionAlignment;
|
||||||
}
|
}
|
||||||
|
@ -449,7 +449,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
{
|
{
|
||||||
add_partial_text();
|
add_partial_text();
|
||||||
stream.consume ();
|
stream.consume ();
|
||||||
mLine = NULL, mRun = NULL;
|
mLine = nullptr, mRun = nullptr;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -508,7 +508,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
|
|
||||||
if (left + space_width + word_width > mPageWidth)
|
if (left + space_width + word_width > mPageWidth)
|
||||||
{
|
{
|
||||||
mLine = NULL, mRun = NULL, left = 0;
|
mLine = nullptr, mRun = nullptr, left = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -539,7 +539,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
|
|
||||||
void append_run (StyleImpl * style, Utf8Stream::Point begin, Utf8Stream::Point end, int pc, int right, int bottom)
|
void append_run (StyleImpl * style, Utf8Stream::Point begin, Utf8Stream::Point end, int pc, int right, int bottom)
|
||||||
{
|
{
|
||||||
if (mSection == NULL)
|
if (mSection == nullptr)
|
||||||
{
|
{
|
||||||
mBook->mSections.push_back (Section ());
|
mBook->mSections.push_back (Section ());
|
||||||
mSection = &mBook->mSections.back ();
|
mSection = &mBook->mSections.back ();
|
||||||
|
@ -547,7 +547,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
mSectionAlignment.push_back (mCurrentAlignment);
|
mSectionAlignment.push_back (mCurrentAlignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLine == NULL)
|
if (mLine == nullptr)
|
||||||
{
|
{
|
||||||
mSection->mLines.push_back (Line ());
|
mSection->mLines.push_back (Line ());
|
||||||
mLine = &mSection->mLines.back ();
|
mLine = &mSection->mLines.back ();
|
||||||
|
@ -572,7 +572,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
if (mLine->mRect.bottom < bottom)
|
if (mLine->mRect.bottom < bottom)
|
||||||
mLine->mRect.bottom = bottom;
|
mLine->mRect.bottom = bottom;
|
||||||
|
|
||||||
if (mRun == NULL || mRun->mStyle != style || mRun->mRange.second != begin)
|
if (mRun == nullptr || mRun->mStyle != style || mRun->mRange.second != begin)
|
||||||
{
|
{
|
||||||
int left = mRun ? mRun->mRight : mLine->mRect.left;
|
int left = mRun ? mRun->mRight : mLine->mRect.left;
|
||||||
|
|
||||||
|
@ -802,17 +802,17 @@ protected:
|
||||||
TextFormat (MyGUI::IFont* id, PageDisplay * display) :
|
TextFormat (MyGUI::IFont* id, PageDisplay * display) :
|
||||||
mFont (id),
|
mFont (id),
|
||||||
mCountVertex (0),
|
mCountVertex (0),
|
||||||
mTexture (NULL),
|
mTexture (nullptr),
|
||||||
mRenderItem (NULL),
|
mRenderItem (nullptr),
|
||||||
mDisplay (display)
|
mDisplay (display)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void createDrawItem (MyGUI::ILayerNode* node)
|
void createDrawItem (MyGUI::ILayerNode* node)
|
||||||
{
|
{
|
||||||
assert (mRenderItem == NULL);
|
assert (mRenderItem == nullptr);
|
||||||
|
|
||||||
if (mTexture != NULL)
|
if (mTexture != nullptr)
|
||||||
{
|
{
|
||||||
mRenderItem = node->addToRenderItem(mTexture, false, false);
|
mRenderItem = node->addToRenderItem(mTexture, false, false);
|
||||||
mRenderItem->addDrawItem(this, mCountVertex);
|
mRenderItem->addDrawItem(this, mCountVertex);
|
||||||
|
@ -821,12 +821,12 @@ protected:
|
||||||
|
|
||||||
void destroyDrawItem (MyGUI::ILayerNode* node)
|
void destroyDrawItem (MyGUI::ILayerNode* node)
|
||||||
{
|
{
|
||||||
assert (mTexture != NULL ? mRenderItem != NULL : mRenderItem == NULL);
|
assert (mTexture != nullptr ? mRenderItem != nullptr : mRenderItem == nullptr);
|
||||||
|
|
||||||
if (mTexture != NULL)
|
if (mTexture != nullptr)
|
||||||
{
|
{
|
||||||
mRenderItem->removeDrawItem (this);
|
mRenderItem->removeDrawItem (this);
|
||||||
mRenderItem = NULL;
|
mRenderItem = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -879,9 +879,9 @@ public:
|
||||||
resetPage ();
|
resetPage ();
|
||||||
mViewTop = 0;
|
mViewTop = 0;
|
||||||
mViewBottom = 0;
|
mViewBottom = 0;
|
||||||
mFocusItem = NULL;
|
mFocusItem = nullptr;
|
||||||
mItemActive = false;
|
mItemActive = false;
|
||||||
mNode = NULL;
|
mNode = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dirtyFocusItem ()
|
void dirtyFocusItem ()
|
||||||
|
@ -999,14 +999,14 @@ public:
|
||||||
|
|
||||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||||
{
|
{
|
||||||
if (mNode != NULL)
|
if (mNode != nullptr)
|
||||||
i->second->destroyDrawItem (mNode);
|
i->second->destroyDrawItem (mNode);
|
||||||
delete i->second;
|
delete i->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
mActiveTextFormats.clear ();
|
mActiveTextFormats.clear ();
|
||||||
|
|
||||||
if (newBook != NULL)
|
if (newBook != nullptr)
|
||||||
{
|
{
|
||||||
createActiveFormats (newBook);
|
createActiveFormats (newBook);
|
||||||
|
|
||||||
|
@ -1035,7 +1035,7 @@ public:
|
||||||
else
|
else
|
||||||
if (mBook && isPageDifferent (newPage))
|
if (mBook && isPageDifferent (newPage))
|
||||||
{
|
{
|
||||||
if (mNode != NULL)
|
if (mNode != nullptr)
|
||||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||||
mNode->outOfDate(i->second->mRenderItem);
|
mNode->outOfDate(i->second->mRenderItem);
|
||||||
|
|
||||||
|
@ -1083,7 +1083,7 @@ public:
|
||||||
{
|
{
|
||||||
newBook->visitRuns (0, 0x7FFFFFFF, CreateActiveFormat (this));
|
newBook->visitRuns (0, 0x7FFFFFFF, CreateActiveFormat (this));
|
||||||
|
|
||||||
if (mNode != NULL)
|
if (mNode != nullptr)
|
||||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||||
i->second->createDrawItem (mNode);
|
i->second->createDrawItem (mNode);
|
||||||
}
|
}
|
||||||
|
@ -1187,7 +1187,7 @@ public:
|
||||||
{
|
{
|
||||||
_checkMargin ();
|
_checkMargin ();
|
||||||
|
|
||||||
if (mNode != NULL)
|
if (mNode != nullptr)
|
||||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||||
mNode->outOfDate (i->second->mRenderItem);
|
mNode->outOfDate (i->second->mRenderItem);
|
||||||
|
|
||||||
|
@ -1198,7 +1198,7 @@ public:
|
||||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||||
i->second->destroyDrawItem (mNode);
|
i->second->destroyDrawItem (mNode);
|
||||||
|
|
||||||
mNode = NULL;
|
mNode = nullptr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -381,12 +381,12 @@ namespace MWGui
|
||||||
|
|
||||||
CreateClassDialog::CreateClassDialog()
|
CreateClassDialog::CreateClassDialog()
|
||||||
: WindowModal("openmw_chargen_create_class.layout")
|
: WindowModal("openmw_chargen_create_class.layout")
|
||||||
, mSpecDialog(NULL)
|
, mSpecDialog(nullptr)
|
||||||
, mAttribDialog(NULL)
|
, mAttribDialog(nullptr)
|
||||||
, mSkillDialog(NULL)
|
, mSkillDialog(nullptr)
|
||||||
, mDescDialog(NULL)
|
, mDescDialog(nullptr)
|
||||||
, mAffectedAttribute(NULL)
|
, mAffectedAttribute(nullptr)
|
||||||
, mAffectedSkill(NULL)
|
, mAffectedSkill(nullptr)
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
|
|
@ -37,8 +37,8 @@ namespace MWGui
|
||||||
|
|
||||||
CompanionWindow::CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager* manager)
|
CompanionWindow::CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager* manager)
|
||||||
: WindowBase("openmw_companion_window.layout")
|
: WindowBase("openmw_companion_window.layout")
|
||||||
, mSortModel(NULL)
|
, mSortModel(nullptr)
|
||||||
, mModel(NULL)
|
, mModel(nullptr)
|
||||||
, mSelectedItem(-1)
|
, mSelectedItem(-1)
|
||||||
, mDragAndDrop(dragAndDrop)
|
, mDragAndDrop(dragAndDrop)
|
||||||
, mMessageBoxManager(manager)
|
, mMessageBoxManager(manager)
|
||||||
|
@ -89,7 +89,7 @@ void CompanionWindow::onItemSelected(int index)
|
||||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &CompanionWindow::dragItem);
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &CompanionWindow::dragItem);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dragItem (NULL, count);
|
dragItem (nullptr, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompanionWindow::dragItem(MyGUI::Widget* sender, int count)
|
void CompanionWindow::dragItem(MyGUI::Widget* sender, int count)
|
||||||
|
@ -177,9 +177,9 @@ void CompanionWindow::onReferenceUnavailable()
|
||||||
void CompanionWindow::resetReference()
|
void CompanionWindow::resetReference()
|
||||||
{
|
{
|
||||||
ReferenceInterface::resetReference();
|
ReferenceInterface::resetReference();
|
||||||
mItemView->setModel(NULL);
|
mItemView->setModel(nullptr);
|
||||||
mModel = NULL;
|
mModel = nullptr;
|
||||||
mSortModel = NULL;
|
mSortModel = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
// Apparently, hidden widgets can retain key focus
|
// Apparently, hidden widgets can retain key focus
|
||||||
// Remove for MyGUI 3.2.2
|
// Remove for MyGUI 3.2.2
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Console::exit()
|
void Console::exit()
|
||||||
|
|
|
@ -34,8 +34,8 @@ namespace MWGui
|
||||||
: WindowBase("openmw_container_window.layout")
|
: WindowBase("openmw_container_window.layout")
|
||||||
, mDragAndDrop(dragAndDrop)
|
, mDragAndDrop(dragAndDrop)
|
||||||
, mPickpocketDetected(false)
|
, mPickpocketDetected(false)
|
||||||
, mSortModel(NULL)
|
, mSortModel(nullptr)
|
||||||
, mModel(NULL)
|
, mModel(nullptr)
|
||||||
, mSelectedItem(-1)
|
, mSelectedItem(-1)
|
||||||
{
|
{
|
||||||
getWidget(mDisposeCorpseButton, "DisposeCorpseButton");
|
getWidget(mDisposeCorpseButton, "DisposeCorpseButton");
|
||||||
|
@ -88,7 +88,7 @@ namespace MWGui
|
||||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &ContainerWindow::dragItem);
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &ContainerWindow::dragItem);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dragItem (NULL, count);
|
dragItem (nullptr, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContainerWindow::dragItem(MyGUI::Widget* sender, int count)
|
void ContainerWindow::dragItem(MyGUI::Widget* sender, int count)
|
||||||
|
@ -169,9 +169,9 @@ namespace MWGui
|
||||||
void ContainerWindow::resetReference()
|
void ContainerWindow::resetReference()
|
||||||
{
|
{
|
||||||
ReferenceInterface::resetReference();
|
ReferenceInterface::resetReference();
|
||||||
mItemView->setModel(NULL);
|
mItemView->setModel(nullptr);
|
||||||
mModel = NULL;
|
mModel = nullptr;
|
||||||
mSortModel = NULL;
|
mSortModel = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContainerWindow::close()
|
void ContainerWindow::close()
|
||||||
|
@ -200,7 +200,7 @@ namespace MWGui
|
||||||
|
|
||||||
void ContainerWindow::exit()
|
void ContainerWindow::exit()
|
||||||
{
|
{
|
||||||
if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop)
|
if(mDragAndDrop == nullptr || !mDragAndDrop->mIsOnDragAndDrop)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Container);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Container);
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ namespace MWGui
|
||||||
|
|
||||||
void ContainerWindow::onTakeAllButtonClicked(MyGUI::Widget* _sender)
|
void ContainerWindow::onTakeAllButtonClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop)
|
if(mDragAndDrop == nullptr || !mDragAndDrop->mIsOnDragAndDrop)
|
||||||
{
|
{
|
||||||
// transfer everything into the player's inventory
|
// transfer everything into the player's inventory
|
||||||
ItemModel* playerModel = MWBase::Environment::get().getWindowManager()->getInventoryWindow()->getModel();
|
ItemModel* playerModel = MWBase::Environment::get().getWindowManager()->getInventoryWindow()->getModel();
|
||||||
|
@ -242,7 +242,7 @@ namespace MWGui
|
||||||
|
|
||||||
void ContainerWindow::onDisposeCorpseButtonClicked(MyGUI::Widget *sender)
|
void ContainerWindow::onDisposeCorpseButtonClicked(MyGUI::Widget *sender)
|
||||||
{
|
{
|
||||||
if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop)
|
if(mDragAndDrop == nullptr || !mDragAndDrop->mIsOnDragAndDrop)
|
||||||
{
|
{
|
||||||
onTakeAllButtonClicked(mTakeButton);
|
onTakeAllButtonClicked(mTakeButton);
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace MWGui
|
||||||
|
|
||||||
void CountDialog::onOkButtonClicked(MyGUI::Widget* _sender)
|
void CountDialog::onOkButtonClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
eventOkClicked(NULL, mSlider->getScrollPosition()+1);
|
eventOkClicked(nullptr, mSlider->getScrollPosition()+1);
|
||||||
|
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ namespace MWGui
|
||||||
// Enter key
|
// Enter key
|
||||||
void CountDialog::onEnterKeyPressed(MyGUI::EditBox* _sender)
|
void CountDialog::onEnterKeyPressed(MyGUI::EditBox* _sender)
|
||||||
{
|
{
|
||||||
eventOkClicked(NULL, mSlider->getScrollPosition()+1);
|
eventOkClicked(nullptr, mSlider->getScrollPosition()+1);
|
||||||
|
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace MWGui
|
||||||
|
|
||||||
|
|
||||||
ResourceImageSetPointerFix::ResourceImageSetPointerFix()
|
ResourceImageSetPointerFix::ResourceImageSetPointerFix()
|
||||||
: mImageSet(NULL)
|
: mImageSet(nullptr)
|
||||||
, mRotation(0)
|
, mRotation(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ namespace MWGui
|
||||||
|
|
||||||
void ResourceImageSetPointerFix::setImage(MyGUI::ImageBox* _image)
|
void ResourceImageSetPointerFix::setImage(MyGUI::ImageBox* _image)
|
||||||
{
|
{
|
||||||
if (mImageSet != NULL)
|
if (mImageSet != nullptr)
|
||||||
_image->setItemResourceInfo(mImageSet->getIndexInfo(0, 0));
|
_image->setItemResourceInfo(mImageSet->getIndexInfo(0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,10 @@ namespace MWGui
|
||||||
|
|
||||||
DragAndDrop::DragAndDrop()
|
DragAndDrop::DragAndDrop()
|
||||||
: mIsOnDragAndDrop(false)
|
: mIsOnDragAndDrop(false)
|
||||||
, mDraggedWidget(NULL)
|
, mDraggedWidget(nullptr)
|
||||||
, mSourceModel(NULL)
|
, mSourceModel(nullptr)
|
||||||
, mSourceView(NULL)
|
, mSourceView(nullptr)
|
||||||
, mSourceSortModel(NULL)
|
, mSourceSortModel(nullptr)
|
||||||
, mDraggedCount(0)
|
, mDraggedCount(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace MWGui
|
||||||
EnchantingDialog::EnchantingDialog()
|
EnchantingDialog::EnchantingDialog()
|
||||||
: WindowBase("openmw_enchanting_dialog.layout")
|
: WindowBase("openmw_enchanting_dialog.layout")
|
||||||
, EffectEditorBase(EffectEditorBase::Enchanting)
|
, EffectEditorBase(EffectEditorBase::Enchanting)
|
||||||
, mItemSelectionDialog(NULL)
|
, mItemSelectionDialog(nullptr)
|
||||||
{
|
{
|
||||||
getWidget(mName, "NameEdit");
|
getWidget(mName, "NameEdit");
|
||||||
getWidget(mCancelButton, "CancelButton");
|
getWidget(mCancelButton, "CancelButton");
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
||||||
if (widgets.empty())
|
if (widgets.empty())
|
||||||
{
|
{
|
||||||
MYGUI_ASSERT( ! _throw, "widget name '" << _name << "' not found in skin of layout '" << getName() << "'");
|
MYGUI_ASSERT( ! _throw, "widget name '" << _name << "' not found in skin of layout '" << getName() << "'");
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace MWGui
|
||||||
BookTextParser::BookTextParser(const std::string & text)
|
BookTextParser::BookTextParser(const std::string & text)
|
||||||
: mIndex(0), mText(text), mIgnoreNewlineTags(true), mIgnoreLineEndings(true), mClosingTag(false)
|
: mIndex(0), mText(text), mIgnoreNewlineTags(true), mIgnoreLineEndings(true), mClosingTag(false)
|
||||||
{
|
{
|
||||||
MWScript::InterpreterContext interpreterContext(NULL, MWWorld::Ptr()); // empty arguments, because there is no locals or actor
|
MWScript::InterpreterContext interpreterContext(nullptr, MWWorld::Ptr()); // empty arguments, because there is no locals or actor
|
||||||
mText = Interpreter::fixDefinesBook(mText, interpreterContext);
|
mText = Interpreter::fixDefinesBook(mText, interpreterContext);
|
||||||
|
|
||||||
boost::algorithm::replace_all(mText, "\r", "");
|
boost::algorithm::replace_all(mText, "\r", "");
|
||||||
|
|
|
@ -70,23 +70,23 @@ namespace MWGui
|
||||||
HUD::HUD(CustomMarkerCollection &customMarkers, bool showFps, DragAndDrop* dragAndDrop, MWRender::LocalMap* localMapRender)
|
HUD::HUD(CustomMarkerCollection &customMarkers, bool showFps, DragAndDrop* dragAndDrop, MWRender::LocalMap* localMapRender)
|
||||||
: Layout("openmw_hud.layout")
|
: Layout("openmw_hud.layout")
|
||||||
, LocalMapBase(customMarkers, localMapRender)
|
, LocalMapBase(customMarkers, localMapRender)
|
||||||
, mHealth(NULL)
|
, mHealth(nullptr)
|
||||||
, mMagicka(NULL)
|
, mMagicka(nullptr)
|
||||||
, mStamina(NULL)
|
, mStamina(nullptr)
|
||||||
, mDrowning(NULL)
|
, mDrowning(nullptr)
|
||||||
, mWeapImage(NULL)
|
, mWeapImage(nullptr)
|
||||||
, mSpellImage(NULL)
|
, mSpellImage(nullptr)
|
||||||
, mWeapStatus(NULL)
|
, mWeapStatus(nullptr)
|
||||||
, mSpellStatus(NULL)
|
, mSpellStatus(nullptr)
|
||||||
, mEffectBox(NULL)
|
, mEffectBox(nullptr)
|
||||||
, mMinimap(NULL)
|
, mMinimap(nullptr)
|
||||||
, mCompass(NULL)
|
, mCompass(nullptr)
|
||||||
, mCrosshair(NULL)
|
, mCrosshair(nullptr)
|
||||||
, mCellNameBox(NULL)
|
, mCellNameBox(nullptr)
|
||||||
, mDrowningFrame(NULL)
|
, mDrowningFrame(nullptr)
|
||||||
, mDrowningFlash(NULL)
|
, mDrowningFlash(nullptr)
|
||||||
, mFpsBox(NULL)
|
, mFpsBox(nullptr)
|
||||||
, mFpsCounter(NULL)
|
, mFpsCounter(nullptr)
|
||||||
, mHealthManaStaminaBaseLeft(0)
|
, mHealthManaStaminaBaseLeft(0)
|
||||||
, mWeapBoxBaseLeft(0)
|
, mWeapBoxBaseLeft(0)
|
||||||
, mSpellBoxBaseLeft(0)
|
, mSpellBoxBaseLeft(0)
|
||||||
|
@ -268,7 +268,7 @@ namespace MWGui
|
||||||
float mouseY = cursorPosition.top / float(viewSize.height);
|
float mouseY = cursorPosition.top / float(viewSize.height);
|
||||||
|
|
||||||
WorldItemModel drop (mouseX, mouseY);
|
WorldItemModel drop (mouseX, mouseY);
|
||||||
mDragAndDrop->drop(&drop, NULL);
|
mDragAndDrop->drop(&drop, nullptr);
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->changePointer("arrow");
|
MWBase::Environment::get().getWindowManager()->changePointer("arrow");
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,8 +56,8 @@ namespace MWGui
|
||||||
: WindowPinnableBase("openmw_inventory_window.layout")
|
: WindowPinnableBase("openmw_inventory_window.layout")
|
||||||
, mDragAndDrop(dragAndDrop)
|
, mDragAndDrop(dragAndDrop)
|
||||||
, mSelectedItem(-1)
|
, mSelectedItem(-1)
|
||||||
, mSortModel(NULL)
|
, mSortModel(nullptr)
|
||||||
, mTradeModel(NULL)
|
, mTradeModel(nullptr)
|
||||||
, mGuiMode(GM_Inventory)
|
, mGuiMode(GM_Inventory)
|
||||||
, mLastXSize(0)
|
, mLastXSize(0)
|
||||||
, mLastYSize(0)
|
, mLastYSize(0)
|
||||||
|
@ -249,9 +249,9 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mSelectedItem = index;
|
mSelectedItem = index;
|
||||||
if (mTrading)
|
if (mTrading)
|
||||||
sellItem (NULL, count);
|
sellItem (nullptr, count);
|
||||||
else
|
else
|
||||||
dragItem (NULL, count);
|
dragItem (nullptr, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace MWGui
|
||||||
ItemStack::ItemStack()
|
ItemStack::ItemStack()
|
||||||
: mType(Type_Normal)
|
: mType(Type_Normal)
|
||||||
, mFlags(0)
|
, mFlags(0)
|
||||||
, mCreator(NULL)
|
, mCreator(nullptr)
|
||||||
, mCount(0)
|
, mCount(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ namespace MWGui
|
||||||
|
|
||||||
ItemSelectionDialog::ItemSelectionDialog(const std::string &label)
|
ItemSelectionDialog::ItemSelectionDialog(const std::string &label)
|
||||||
: WindowModal("openmw_itemselection_dialog.layout")
|
: WindowModal("openmw_itemselection_dialog.layout")
|
||||||
, mSortModel(NULL)
|
, mSortModel(nullptr)
|
||||||
, mModel(NULL)
|
, mModel(nullptr)
|
||||||
{
|
{
|
||||||
getWidget(mItemView, "ItemView");
|
getWidget(mItemView, "ItemView");
|
||||||
mItemView->eventItemClicked += MyGUI::newDelegate(this, &ItemSelectionDialog::onSelectedItem);
|
mItemView->eventItemClicked += MyGUI::newDelegate(this, &ItemSelectionDialog::onSelectedItem);
|
||||||
|
|
|
@ -18,8 +18,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
ItemView::ItemView()
|
ItemView::ItemView()
|
||||||
: mModel(NULL)
|
: mModel(nullptr)
|
||||||
, mScrollView(NULL)
|
, mScrollView(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ void ItemView::initialiseOverride()
|
||||||
Base::initialiseOverride();
|
Base::initialiseOverride();
|
||||||
|
|
||||||
assignWidget(mScrollView, "ScrollView");
|
assignWidget(mScrollView, "ScrollView");
|
||||||
if (mScrollView == NULL)
|
if (mScrollView == nullptr)
|
||||||
throw std::runtime_error("Item view needs a scroll view");
|
throw std::runtime_error("Item view needs a scroll view");
|
||||||
|
|
||||||
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
||||||
|
|
|
@ -27,9 +27,9 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
ItemWidget::ItemWidget()
|
ItemWidget::ItemWidget()
|
||||||
: mItem(NULL)
|
: mItem(nullptr)
|
||||||
, mFrame(NULL)
|
, mFrame(nullptr)
|
||||||
, mText(NULL)
|
, mText(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ struct JournalViewModelImpl : JournalViewModel
|
||||||
static Utf8Span toUtf8Span (std::string const & str)
|
static Utf8Span toUtf8Span (std::string const & str)
|
||||||
{
|
{
|
||||||
if (str.size () == 0)
|
if (str.size () == 0)
|
||||||
return Utf8Span (Utf8Point (NULL), Utf8Point (NULL));
|
return Utf8Span (Utf8Point (nullptr), Utf8Point (nullptr));
|
||||||
|
|
||||||
Utf8Point point = reinterpret_cast <Utf8Point> (str.c_str ());
|
Utf8Point point = reinterpret_cast <Utf8Point> (str.c_str ());
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ namespace MWGui
|
||||||
|
|
||||||
// Callback removes itself when done
|
// Callback removes itself when done
|
||||||
if (renderInfo.getCurrentCamera())
|
if (renderInfo.getCurrentCamera())
|
||||||
renderInfo.getCurrentCamera()->setInitialDrawCallback(NULL);
|
renderInfo.getCurrentCamera()->setInitialDrawCallback(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -32,10 +32,10 @@ namespace MWGui
|
||||||
: Layout("openmw_mainmenu.layout")
|
: Layout("openmw_mainmenu.layout")
|
||||||
, mWidth (w), mHeight (h)
|
, mWidth (w), mHeight (h)
|
||||||
, mVFS(vfs), mButtonBox(0)
|
, mVFS(vfs), mButtonBox(0)
|
||||||
, mBackground(NULL)
|
, mBackground(nullptr)
|
||||||
, mVideoBackground(NULL)
|
, mVideoBackground(nullptr)
|
||||||
, mVideo(NULL)
|
, mVideo(nullptr)
|
||||||
, mSaveGameDialog(NULL)
|
, mSaveGameDialog(nullptr)
|
||||||
{
|
{
|
||||||
getWidget(mVersionText, "VersionText");
|
getWidget(mVersionText, "VersionText");
|
||||||
std::stringstream sstream;
|
std::stringstream sstream;
|
||||||
|
@ -149,13 +149,13 @@ namespace MWGui
|
||||||
if (mVideo && !show)
|
if (mVideo && !show)
|
||||||
{
|
{
|
||||||
MyGUI::Gui::getInstance().destroyWidget(mVideoBackground);
|
MyGUI::Gui::getInstance().destroyWidget(mVideoBackground);
|
||||||
mVideoBackground = NULL;
|
mVideoBackground = nullptr;
|
||||||
mVideo = NULL;
|
mVideo = nullptr;
|
||||||
}
|
}
|
||||||
if (mBackground && !show)
|
if (mBackground && !show)
|
||||||
{
|
{
|
||||||
MyGUI::Gui::getInstance().destroyWidget(mBackground);
|
MyGUI::Gui::getInstance().destroyWidget(mBackground);
|
||||||
mBackground = NULL;
|
mBackground = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!show)
|
if (!show)
|
||||||
|
|
|
@ -146,8 +146,8 @@ namespace MWGui
|
||||||
, mCurX(0)
|
, mCurX(0)
|
||||||
, mCurY(0)
|
, mCurY(0)
|
||||||
, mInterior(false)
|
, mInterior(false)
|
||||||
, mLocalMap(NULL)
|
, mLocalMap(nullptr)
|
||||||
, mCompass(NULL)
|
, mCompass(nullptr)
|
||||||
, mPrefix()
|
, mPrefix()
|
||||||
, mChanged(true)
|
, mChanged(true)
|
||||||
, mFogOfWar(true)
|
, mFogOfWar(true)
|
||||||
|
@ -377,7 +377,7 @@ namespace MWGui
|
||||||
box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 1.f, 1.f, 0.f));
|
box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 1.f, 1.f, 0.f));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
box->setRenderItemTexture(NULL);
|
box->setRenderItemTexture(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mMapTextures.swap(textures);
|
mMapTextures.swap(textures);
|
||||||
|
@ -551,7 +551,7 @@ namespace MWGui
|
||||||
addDetectionMarkers(MWBase::World::Detect_Enchantment);
|
addDetectionMarkers(MWBase::World::Detect_Enchantment);
|
||||||
|
|
||||||
// Add marker for the spot marked with Mark magic effect
|
// Add marker for the spot marked with Mark magic effect
|
||||||
MWWorld::CellStore* markedCell = NULL;
|
MWWorld::CellStore* markedCell = nullptr;
|
||||||
ESM::Position markedPosition;
|
ESM::Position markedPosition;
|
||||||
MWBase::Environment::get().getWorld()->getPlayer().getMarkedPosition(markedCell, markedPosition);
|
MWBase::Environment::get().getWorld()->getPlayer().getMarkedPosition(markedCell, markedPosition);
|
||||||
if (markedCell && markedCell->isExterior() == !mInterior
|
if (markedCell && markedCell->isExterior() == !mInterior
|
||||||
|
@ -580,11 +580,11 @@ namespace MWGui
|
||||||
, LocalMapBase(customMarkers, localMapRender)
|
, LocalMapBase(customMarkers, localMapRender)
|
||||||
, NoDrop(drag, mMainWidget)
|
, NoDrop(drag, mMainWidget)
|
||||||
, mGlobalMap(0)
|
, mGlobalMap(0)
|
||||||
, mGlobalMapImage(NULL)
|
, mGlobalMapImage(nullptr)
|
||||||
, mGlobalMapOverlay(NULL)
|
, mGlobalMapOverlay(nullptr)
|
||||||
, mGlobal(false)
|
, mGlobal(false)
|
||||||
, mEventBoxGlobal(NULL)
|
, mEventBoxGlobal(nullptr)
|
||||||
, mEventBoxLocal(NULL)
|
, mEventBoxLocal(nullptr)
|
||||||
, mGlobalMapRender(new MWRender::GlobalMap(localMapRender->getRoot()))
|
, mGlobalMapRender(new MWRender::GlobalMap(localMapRender->getRoot()))
|
||||||
, mEditNoteDialog()
|
, mEditNoteDialog()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,8 +19,8 @@ namespace MWGui
|
||||||
|
|
||||||
MessageBoxManager::MessageBoxManager (float timePerChar)
|
MessageBoxManager::MessageBoxManager (float timePerChar)
|
||||||
{
|
{
|
||||||
mInterMessageBoxe = NULL;
|
mInterMessageBoxe = nullptr;
|
||||||
mStaticMessageBox = NULL;
|
mStaticMessageBox = nullptr;
|
||||||
mLastButtonPressed = -1;
|
mLastButtonPressed = -1;
|
||||||
mMessageBoxSpeed = timePerChar;
|
mMessageBoxSpeed = timePerChar;
|
||||||
}
|
}
|
||||||
|
@ -37,13 +37,13 @@ namespace MWGui
|
||||||
void MessageBoxManager::clear()
|
void MessageBoxManager::clear()
|
||||||
{
|
{
|
||||||
delete mInterMessageBoxe;
|
delete mInterMessageBoxe;
|
||||||
mInterMessageBoxe = NULL;
|
mInterMessageBoxe = nullptr;
|
||||||
|
|
||||||
std::vector<MessageBox*>::iterator it(mMessageBoxes.begin());
|
std::vector<MessageBox*>::iterator it(mMessageBoxes.begin());
|
||||||
for (; it != mMessageBoxes.end(); ++it)
|
for (; it != mMessageBoxes.end(); ++it)
|
||||||
{
|
{
|
||||||
if (*it == mStaticMessageBox)
|
if (*it == mStaticMessageBox)
|
||||||
mStaticMessageBox = NULL;
|
mStaticMessageBox = nullptr;
|
||||||
delete *it;
|
delete *it;
|
||||||
}
|
}
|
||||||
mMessageBoxes.clear();
|
mMessageBoxes.clear();
|
||||||
|
@ -75,10 +75,10 @@ namespace MWGui
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mInterMessageBoxe != NULL && mInterMessageBoxe->mMarkedToDelete) {
|
if(mInterMessageBoxe != nullptr && mInterMessageBoxe->mMarkedToDelete) {
|
||||||
mLastButtonPressed = mInterMessageBoxe->readPressedButton();
|
mLastButtonPressed = mInterMessageBoxe->readPressedButton();
|
||||||
delete mInterMessageBoxe;
|
delete mInterMessageBoxe;
|
||||||
mInterMessageBoxe = NULL;
|
mInterMessageBoxe = nullptr;
|
||||||
MWBase::Environment::get().getInputManager()->changeInputMode(
|
MWBase::Environment::get().getInputManager()->changeInputMode(
|
||||||
MWBase::Environment::get().getWindowManager()->isGuiMode());
|
MWBase::Environment::get().getWindowManager()->isGuiMode());
|
||||||
}
|
}
|
||||||
|
@ -112,12 +112,12 @@ namespace MWGui
|
||||||
void MessageBoxManager::removeStaticMessageBox ()
|
void MessageBoxManager::removeStaticMessageBox ()
|
||||||
{
|
{
|
||||||
removeMessageBox(mStaticMessageBox);
|
removeMessageBox(mStaticMessageBox);
|
||||||
mStaticMessageBox = NULL;
|
mStaticMessageBox = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MessageBoxManager::createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons)
|
bool MessageBoxManager::createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons)
|
||||||
{
|
{
|
||||||
if(mInterMessageBoxe != NULL) {
|
if(mInterMessageBoxe != nullptr) {
|
||||||
throw std::runtime_error("There is a message box already");
|
throw std::runtime_error("There is a message box already");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ namespace MWGui
|
||||||
|
|
||||||
bool MessageBoxManager::isInteractiveMessageBox ()
|
bool MessageBoxManager::isInteractiveMessageBox ()
|
||||||
{
|
{
|
||||||
return mInterMessageBoxe != NULL;
|
return mInterMessageBoxe != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -133,10 +133,10 @@ namespace MWGui
|
||||||
updateSkills();
|
updateSkills();
|
||||||
updateSpellPowers();
|
updateSpellPowers();
|
||||||
|
|
||||||
mPreviewImage->setRenderItemTexture(NULL);
|
mPreviewImage->setRenderItemTexture(nullptr);
|
||||||
|
|
||||||
mPreview.reset(NULL);
|
mPreview.reset(nullptr);
|
||||||
mPreviewTexture.reset(NULL);
|
mPreviewTexture.reset(nullptr);
|
||||||
|
|
||||||
mPreview.reset(new MWRender::RaceSelectionPreview(mViewer, mResourceSystem));
|
mPreview.reset(new MWRender::RaceSelectionPreview(mViewer, mResourceSystem));
|
||||||
mPreview->rebuild();
|
mPreview->rebuild();
|
||||||
|
@ -189,10 +189,10 @@ namespace MWGui
|
||||||
|
|
||||||
void RaceDialog::close()
|
void RaceDialog::close()
|
||||||
{
|
{
|
||||||
mPreviewImage->setRenderItemTexture(NULL);
|
mPreviewImage->setRenderItemTexture(nullptr);
|
||||||
|
|
||||||
mPreviewTexture.reset(NULL);
|
mPreviewTexture.reset(nullptr);
|
||||||
mPreview.reset(NULL);
|
mPreview.reset(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
ReferenceInterface::ReferenceInterface()
|
ReferenceInterface::ReferenceInterface()
|
||||||
: mCurrentPlayerCell(NULL)
|
: mCurrentPlayerCell(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ namespace MWGui
|
||||||
MWWorld::CellStore* playerCell = MWBase::Environment::get().getWorld()->getPlayerPtr().getCell();
|
MWWorld::CellStore* playerCell = MWBase::Environment::get().getWorld()->getPlayerPtr().getCell();
|
||||||
|
|
||||||
// check if player has changed cell, or count of the reference has become 0
|
// check if player has changed cell, or count of the reference has become 0
|
||||||
if ((playerCell != mCurrentPlayerCell && mCurrentPlayerCell != NULL)
|
if ((playerCell != mCurrentPlayerCell && mCurrentPlayerCell != nullptr)
|
||||||
|| (!mPtr.isEmpty() && mPtr.getRefData().getCount() == 0))
|
|| (!mPtr.isEmpty() && mPtr.getRefData().getCount() == 0))
|
||||||
{
|
{
|
||||||
if (!mPtr.isEmpty())
|
if (!mPtr.isEmpty())
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace MWGui
|
||||||
|
|
||||||
void checkReferenceAvailable(); ///< closes the window, if the MW-reference has become unavailable
|
void checkReferenceAvailable(); ///< closes the window, if the MW-reference has become unavailable
|
||||||
|
|
||||||
virtual void resetReference() { mPtr = MWWorld::Ptr(); mCurrentPlayerCell = NULL; }
|
virtual void resetReference() { mPtr = MWWorld::Ptr(); mCurrentPlayerCell = nullptr; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void onReferenceUnavailable() = 0; ///< called when reference has become unavailable
|
virtual void onReferenceUnavailable() = 0; ///< called when reference has become unavailable
|
||||||
|
|
|
@ -32,8 +32,8 @@ namespace MWGui
|
||||||
SaveGameDialog::SaveGameDialog()
|
SaveGameDialog::SaveGameDialog()
|
||||||
: WindowModal("openmw_savegame_dialog.layout")
|
: WindowModal("openmw_savegame_dialog.layout")
|
||||||
, mSaving(true)
|
, mSaving(true)
|
||||||
, mCurrentCharacter(NULL)
|
, mCurrentCharacter(nullptr)
|
||||||
, mCurrentSlot(NULL)
|
, mCurrentSlot(nullptr)
|
||||||
{
|
{
|
||||||
getWidget(mScreenshot, "Screenshot");
|
getWidget(mScreenshot, "Screenshot");
|
||||||
getWidget(mCharacterSelection, "SelectCharacter");
|
getWidget(mCharacterSelection, "SelectCharacter");
|
||||||
|
@ -120,8 +120,8 @@ namespace MWGui
|
||||||
|
|
||||||
mCharacterSelection->setCaption("");
|
mCharacterSelection->setCaption("");
|
||||||
mCharacterSelection->removeAllItems();
|
mCharacterSelection->removeAllItems();
|
||||||
mCurrentCharacter = NULL;
|
mCurrentCharacter = nullptr;
|
||||||
mCurrentSlot = NULL;
|
mCurrentSlot = nullptr;
|
||||||
mSaveList->removeAllItems();
|
mSaveList->removeAllItems();
|
||||||
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
|
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
|
||||||
|
|
||||||
|
@ -224,12 +224,12 @@ namespace MWGui
|
||||||
void SaveGameDialog::accept(bool reallySure)
|
void SaveGameDialog::accept(bool reallySure)
|
||||||
{
|
{
|
||||||
// Remove for MyGUI 3.2.2
|
// Remove for MyGUI 3.2.2
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||||
|
|
||||||
if (mSaving)
|
if (mSaving)
|
||||||
{
|
{
|
||||||
// If overwriting an existing slot, ask for confirmation first
|
// If overwriting an existing slot, ask for confirmation first
|
||||||
if (mCurrentSlot != NULL && !reallySure)
|
if (mCurrentSlot != nullptr && !reallySure)
|
||||||
{
|
{
|
||||||
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
||||||
dialog->askForConfirmation("#{sMessage4}");
|
dialog->askForConfirmation("#{sMessage4}");
|
||||||
|
@ -275,7 +275,7 @@ namespace MWGui
|
||||||
MWBase::StateManager* mgr = MWBase::Environment::get().getStateManager();
|
MWBase::StateManager* mgr = MWBase::Environment::get().getStateManager();
|
||||||
|
|
||||||
unsigned int i=0;
|
unsigned int i=0;
|
||||||
const MWState::Character* character = NULL;
|
const MWState::Character* character = nullptr;
|
||||||
for (MWBase::StateManager::CharacterIterator it = mgr->characterBegin(); it != mgr->characterEnd(); ++it, ++i)
|
for (MWBase::StateManager::CharacterIterator it = mgr->characterBegin(); it != mgr->characterEnd(); ++it, ++i)
|
||||||
{
|
{
|
||||||
if (i == pos)
|
if (i == pos)
|
||||||
|
@ -284,7 +284,7 @@ namespace MWGui
|
||||||
assert(character && "Can't find selected character");
|
assert(character && "Can't find selected character");
|
||||||
|
|
||||||
mCurrentCharacter = character;
|
mCurrentCharacter = character;
|
||||||
mCurrentSlot = NULL;
|
mCurrentSlot = nullptr;
|
||||||
fillSaveList();
|
fillSaveList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ namespace MWGui
|
||||||
|
|
||||||
if (pos == MyGUI::ITEM_NONE || !mCurrentCharacter)
|
if (pos == MyGUI::ITEM_NONE || !mCurrentCharacter)
|
||||||
{
|
{
|
||||||
mCurrentSlot = NULL;
|
mCurrentSlot = nullptr;
|
||||||
mInfoText->setCaption("");
|
mInfoText->setCaption("");
|
||||||
mScreenshot->setImageTexture("");
|
mScreenshot->setImageTexture("");
|
||||||
return;
|
return;
|
||||||
|
@ -325,7 +325,7 @@ namespace MWGui
|
||||||
if (mSaving)
|
if (mSaving)
|
||||||
mSaveNameEdit->setCaption(sender->getItemNameAt(pos));
|
mSaveNameEdit->setCaption(sender->getItemNameAt(pos));
|
||||||
|
|
||||||
mCurrentSlot = NULL;
|
mCurrentSlot = nullptr;
|
||||||
unsigned int i=0;
|
unsigned int i=0;
|
||||||
for (MWState::Character::SlotIterator it = mCurrentCharacter->begin(); it != mCurrentCharacter->end(); ++it, ++i)
|
for (MWState::Character::SlotIterator it = mCurrentCharacter->begin(); it != mCurrentCharacter->end(); ++it, ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace MWGui
|
||||||
EditEffectDialog::EditEffectDialog()
|
EditEffectDialog::EditEffectDialog()
|
||||||
: WindowModal("openmw_edit_effect.layout")
|
: WindowModal("openmw_edit_effect.layout")
|
||||||
, mEditing(false)
|
, mEditing(false)
|
||||||
, mMagicEffect(NULL)
|
, mMagicEffect(nullptr)
|
||||||
, mConstantEffect(false)
|
, mConstantEffect(false)
|
||||||
{
|
{
|
||||||
init(mEffect);
|
init(mEffect);
|
||||||
|
@ -482,11 +482,11 @@ namespace MWGui
|
||||||
|
|
||||||
|
|
||||||
EffectEditorBase::EffectEditorBase(Type type)
|
EffectEditorBase::EffectEditorBase(Type type)
|
||||||
: mAvailableEffectsList(NULL)
|
: mAvailableEffectsList(nullptr)
|
||||||
, mUsedEffectsView(NULL)
|
, mUsedEffectsView(nullptr)
|
||||||
, mAddEffectDialog()
|
, mAddEffectDialog()
|
||||||
, mSelectAttributeDialog(NULL)
|
, mSelectAttributeDialog(nullptr)
|
||||||
, mSelectSkillDialog(NULL)
|
, mSelectSkillDialog(nullptr)
|
||||||
, mSelectedEffect(0)
|
, mSelectedEffect(0)
|
||||||
, mSelectedKnownEffectId(0)
|
, mSelectedKnownEffectId(0)
|
||||||
, mConstantEffect(false)
|
, mConstantEffect(false)
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellView::SpellView()
|
SpellView::SpellView()
|
||||||
: mScrollView(NULL)
|
: mScrollView(nullptr)
|
||||||
, mShowCostColumn(true)
|
, mShowCostColumn(true)
|
||||||
, mHighlightSelected(true)
|
, mHighlightSelected(true)
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ namespace MWGui
|
||||||
Base::initialiseOverride();
|
Base::initialiseOverride();
|
||||||
|
|
||||||
assignWidget(mScrollView, "ScrollView");
|
assignWidget(mScrollView, "ScrollView");
|
||||||
if (mScrollView == NULL)
|
if (mScrollView == nullptr)
|
||||||
throw std::runtime_error("Item view needs a scroll view");
|
throw std::runtime_error("Item view needs a scroll view");
|
||||||
|
|
||||||
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
||||||
|
@ -126,7 +126,7 @@ namespace MWGui
|
||||||
mLines.push_back(LineInfo(t, costChance, i));
|
mLines.push_back(LineInfo(t, costChance, i));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mLines.push_back(LineInfo(t, (MyGUI::Widget*)NULL, i));
|
mLines.push_back(LineInfo(t, (MyGUI::Widget*)nullptr, i));
|
||||||
|
|
||||||
t->setStateSelected(spell.mSelected);
|
t->setStateSelected(spell.mSelected);
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
maxSpellIndexFound = spellIndex;
|
maxSpellIndexFound = spellIndex;
|
||||||
Gui::SharedStateButton* costButton = reinterpret_cast<Gui::SharedStateButton*>(it->mRightWidget);
|
Gui::SharedStateButton* costButton = reinterpret_cast<Gui::SharedStateButton*>(it->mRightWidget);
|
||||||
if ((costButton != NULL) && (costButton->getCaption() != spell.mCostColumn))
|
if ((costButton != nullptr) && (costButton->getCaption() != spell.mCostColumn))
|
||||||
{
|
{
|
||||||
costButton->setCaption(spell.mCostColumn);
|
costButton->setCaption(spell.mCostColumn);
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ namespace MWGui
|
||||||
MyGUI::IntCoord(0, 0, mScrollView->getWidth(), 18),
|
MyGUI::IntCoord(0, 0, mScrollView->getWidth(), 18),
|
||||||
MyGUI::Align::Left | MyGUI::Align::Top);
|
MyGUI::Align::Left | MyGUI::Align::Top);
|
||||||
separator->setNeedMouseFocus(false);
|
separator->setNeedMouseFocus(false);
|
||||||
mLines.push_back(LineInfo(separator, (MyGUI::Widget*)NULL, NoSpellIndex));
|
mLines.push_back(LineInfo(separator, (MyGUI::Widget*)nullptr, NoSpellIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
MyGUI::TextBox* groupWidget = mScrollView->createWidget<MyGUI::TextBox>("SandBrightText",
|
MyGUI::TextBox* groupWidget = mScrollView->createWidget<MyGUI::TextBox>("SandBrightText",
|
||||||
|
@ -254,7 +254,7 @@ namespace MWGui
|
||||||
mLines.push_back(LineInfo(groupWidget, groupWidget2, NoSpellIndex));
|
mLines.push_back(LineInfo(groupWidget, groupWidget2, NoSpellIndex));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mLines.push_back(LineInfo(groupWidget, (MyGUI::Widget*)NULL, NoSpellIndex));
|
mLines.push_back(LineInfo(groupWidget, (MyGUI::Widget*)nullptr, NoSpellIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace MWGui
|
||||||
SpellWindow::SpellWindow(DragAndDrop* drag)
|
SpellWindow::SpellWindow(DragAndDrop* drag)
|
||||||
: WindowPinnableBase("openmw_spell_window.layout")
|
: WindowPinnableBase("openmw_spell_window.layout")
|
||||||
, NoDrop(drag, mMainWidget)
|
, NoDrop(drag, mMainWidget)
|
||||||
, mSpellView(NULL)
|
, mSpellView(nullptr)
|
||||||
, mUpdateTimer(0.0f)
|
, mUpdateTimer(0.0f)
|
||||||
{
|
{
|
||||||
mSpellIcons = new SpellIcons();
|
mSpellIcons = new SpellIcons();
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace MWGui
|
||||||
StatsWindow::StatsWindow (DragAndDrop* drag)
|
StatsWindow::StatsWindow (DragAndDrop* drag)
|
||||||
: WindowPinnableBase("openmw_stats_window.layout")
|
: WindowPinnableBase("openmw_stats_window.layout")
|
||||||
, NoDrop(drag, mMainWidget)
|
, NoDrop(drag, mMainWidget)
|
||||||
, mSkillView(NULL)
|
, mSkillView(nullptr)
|
||||||
, mMajorSkills()
|
, mMajorSkills()
|
||||||
, mMinorSkills()
|
, mMinorSkills()
|
||||||
, mMiscSkills()
|
, mMiscSkills()
|
||||||
|
@ -68,7 +68,7 @@ namespace MWGui
|
||||||
for (int i = 0; i < ESM::Skill::Length; ++i)
|
for (int i = 0; i < ESM::Skill::Length; ++i)
|
||||||
{
|
{
|
||||||
mSkillValues.insert(std::pair<int, MWMechanics::SkillValue >(i, MWMechanics::SkillValue()));
|
mSkillValues.insert(std::pair<int, MWMechanics::SkillValue >(i, MWMechanics::SkillValue()));
|
||||||
mSkillWidgetMap.insert(std::pair<int, MyGUI::TextBox*>(i, (MyGUI::TextBox*)NULL));
|
mSkillWidgetMap.insert(std::pair<int, MyGUI::TextBox*>(i, (MyGUI::TextBox*)nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
MyGUI::Window* t = mMainWidget->castType<MyGUI::Window>();
|
MyGUI::Window* t = mMainWidget->castType<MyGUI::Window>();
|
||||||
|
|
|
@ -54,8 +54,8 @@ namespace MWGui
|
||||||
|
|
||||||
TradeWindow::TradeWindow()
|
TradeWindow::TradeWindow()
|
||||||
: WindowBase("openmw_trade_window.layout")
|
: WindowBase("openmw_trade_window.layout")
|
||||||
, mSortModel(NULL)
|
, mSortModel(nullptr)
|
||||||
, mTradeModel(NULL)
|
, mTradeModel(nullptr)
|
||||||
, mItemToSell(-1)
|
, mItemToSell(-1)
|
||||||
, mCurrentBalance(0)
|
, mCurrentBalance(0)
|
||||||
, mCurrentMerchantOffer(0)
|
, mCurrentMerchantOffer(0)
|
||||||
|
@ -203,7 +203,7 @@ namespace MWGui
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mItemToSell = mSortModel->mapToSource(index);
|
mItemToSell = mSortModel->mapToSource(index);
|
||||||
sellItem (NULL, count);
|
sellItem (nullptr, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,8 +560,8 @@ namespace MWGui
|
||||||
void TradeWindow::resetReference()
|
void TradeWindow::resetReference()
|
||||||
{
|
{
|
||||||
ReferenceInterface::resetReference();
|
ReferenceInterface::resetReference();
|
||||||
mItemView->setModel(NULL);
|
mItemView->setModel(nullptr);
|
||||||
mTradeModel = NULL;
|
mTradeModel = nullptr;
|
||||||
mSortModel = NULL;
|
mSortModel = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
VideoWidget::VideoWidget()
|
VideoWidget::VideoWidget()
|
||||||
: mVFS(NULL)
|
: mVFS(nullptr)
|
||||||
{
|
{
|
||||||
mPlayer.reset(new Video::VideoPlayer());
|
mPlayer.reset(new Video::VideoPlayer());
|
||||||
setNeedKeyFocus(true);
|
setNeedKeyFocus(true);
|
||||||
|
|
|
@ -229,7 +229,7 @@ namespace MWGui
|
||||||
mSleeping = canRest;
|
mSleeping = canRest;
|
||||||
|
|
||||||
Gui::Box* box = dynamic_cast<Gui::Box*>(mMainWidget);
|
Gui::Box* box = dynamic_cast<Gui::Box*>(mMainWidget);
|
||||||
if (box == NULL)
|
if (box == nullptr)
|
||||||
throw std::runtime_error("main widget must be a box");
|
throw std::runtime_error("main widget must be a box");
|
||||||
box->notifyChildrenSizeChanged();
|
box->notifyChildrenSizeChanged();
|
||||||
center();
|
center();
|
||||||
|
|
|
@ -23,8 +23,8 @@ namespace MWGui
|
||||||
|
|
||||||
MWSkill::MWSkill()
|
MWSkill::MWSkill()
|
||||||
: mSkillId(ESM::Skill::Length)
|
: mSkillId(ESM::Skill::Length)
|
||||||
, mSkillNameWidget(NULL)
|
, mSkillNameWidget(nullptr)
|
||||||
, mSkillValueWidget(NULL)
|
, mSkillValueWidget(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,8 +114,8 @@ namespace MWGui
|
||||||
|
|
||||||
MWAttribute::MWAttribute()
|
MWAttribute::MWAttribute()
|
||||||
: mId(-1)
|
: mId(-1)
|
||||||
, mAttributeNameWidget(NULL)
|
, mAttributeNameWidget(nullptr)
|
||||||
, mAttributeValueWidget(NULL)
|
, mAttributeValueWidget(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ namespace MWGui
|
||||||
/* MWSpell */
|
/* MWSpell */
|
||||||
|
|
||||||
MWSpell::MWSpell()
|
MWSpell::MWSpell()
|
||||||
: mSpellNameWidget(NULL)
|
: mSpellNameWidget(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
// We don't know the width of all the elements beforehand, so we do it in
|
// We don't know the width of all the elements beforehand, so we do it in
|
||||||
// 2 steps: first, create all widgets and check their width....
|
// 2 steps: first, create all widgets and check their width....
|
||||||
MWSpellEffectPtr effect = NULL;
|
MWSpellEffectPtr effect = nullptr;
|
||||||
int maxwidth = coord.width;
|
int maxwidth = coord.width;
|
||||||
|
|
||||||
for (SpellEffectList::iterator it=mEffectList.begin();
|
for (SpellEffectList::iterator it=mEffectList.begin();
|
||||||
|
@ -359,8 +359,8 @@ namespace MWGui
|
||||||
/* MWSpellEffect */
|
/* MWSpellEffect */
|
||||||
|
|
||||||
MWSpellEffect::MWSpellEffect()
|
MWSpellEffect::MWSpellEffect()
|
||||||
: mImageWidget(NULL)
|
: mImageWidget(nullptr)
|
||||||
, mTextWidget(NULL)
|
, mTextWidget(nullptr)
|
||||||
, mRequestedWidth(0)
|
, mRequestedWidth(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -489,9 +489,9 @@ namespace MWGui
|
||||||
MWDynamicStat::MWDynamicStat()
|
MWDynamicStat::MWDynamicStat()
|
||||||
: mValue(0)
|
: mValue(0)
|
||||||
, mMax(1)
|
, mMax(1)
|
||||||
, mTextWidget(NULL)
|
, mTextWidget(nullptr)
|
||||||
, mBarWidget(NULL)
|
, mBarWidget(nullptr)
|
||||||
, mBarTextWidget(NULL)
|
, mBarTextWidget(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,11 @@ void WindowBase::setVisible(bool visible)
|
||||||
if (!visible)
|
if (!visible)
|
||||||
{
|
{
|
||||||
MyGUI::Widget* keyFocus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
MyGUI::Widget* keyFocus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
||||||
while (keyFocus != mMainWidget && keyFocus != NULL)
|
while (keyFocus != mMainWidget && keyFocus != nullptr)
|
||||||
keyFocus = keyFocus->getParent();
|
keyFocus = keyFocus->getParent();
|
||||||
|
|
||||||
if (keyFocus == mMainWidget)
|
if (keyFocus == mMainWidget)
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ NoDrop::NoDrop(DragAndDrop *drag, MyGUI::Widget *widget)
|
||||||
: mWidget(widget), mDrag(drag), mTransparent(false)
|
: mWidget(widget), mDrag(drag), mTransparent(false)
|
||||||
{
|
{
|
||||||
if (!mWidget)
|
if (!mWidget)
|
||||||
throw std::runtime_error("NoDrop needs a non-NULL widget!");
|
throw std::runtime_error("NoDrop needs a non-nullptr widget!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoDrop::onFrame(float dt)
|
void NoDrop::onFrame(float dt)
|
||||||
|
|
|
@ -115,52 +115,52 @@ namespace MWGui
|
||||||
, mViewer(viewer)
|
, mViewer(viewer)
|
||||||
, mConsoleOnlyScripts(consoleOnlyScripts)
|
, mConsoleOnlyScripts(consoleOnlyScripts)
|
||||||
, mCurrentModals()
|
, mCurrentModals()
|
||||||
, mHud(NULL)
|
, mHud(nullptr)
|
||||||
, mMap(NULL)
|
, mMap(nullptr)
|
||||||
, mLocalMapRender(NULL)
|
, mLocalMapRender(nullptr)
|
||||||
, mMenu(NULL)
|
, mMenu(nullptr)
|
||||||
, mToolTips(NULL)
|
, mToolTips(nullptr)
|
||||||
, mStatsWindow(NULL)
|
, mStatsWindow(nullptr)
|
||||||
, mMessageBoxManager(NULL)
|
, mMessageBoxManager(nullptr)
|
||||||
, mConsole(NULL)
|
, mConsole(nullptr)
|
||||||
, mJournal(NULL)
|
, mJournal(nullptr)
|
||||||
, mDialogueWindow(NULL)
|
, mDialogueWindow(nullptr)
|
||||||
, mContainerWindow(NULL)
|
, mContainerWindow(nullptr)
|
||||||
, mDragAndDrop(NULL)
|
, mDragAndDrop(nullptr)
|
||||||
, mInventoryWindow(NULL)
|
, mInventoryWindow(nullptr)
|
||||||
, mScrollWindow(NULL)
|
, mScrollWindow(nullptr)
|
||||||
, mBookWindow(NULL)
|
, mBookWindow(nullptr)
|
||||||
, mCountDialog(NULL)
|
, mCountDialog(nullptr)
|
||||||
, mTradeWindow(NULL)
|
, mTradeWindow(nullptr)
|
||||||
, mSpellBuyingWindow(NULL)
|
, mSpellBuyingWindow(nullptr)
|
||||||
, mTravelWindow(NULL)
|
, mTravelWindow(nullptr)
|
||||||
, mSettingsWindow(NULL)
|
, mSettingsWindow(nullptr)
|
||||||
, mConfirmationDialog(NULL)
|
, mConfirmationDialog(nullptr)
|
||||||
, mAlchemyWindow(NULL)
|
, mAlchemyWindow(nullptr)
|
||||||
, mSpellWindow(NULL)
|
, mSpellWindow(nullptr)
|
||||||
, mQuickKeysMenu(NULL)
|
, mQuickKeysMenu(nullptr)
|
||||||
, mLoadingScreen(NULL)
|
, mLoadingScreen(nullptr)
|
||||||
, mLevelupDialog(NULL)
|
, mLevelupDialog(nullptr)
|
||||||
, mWaitDialog(NULL)
|
, mWaitDialog(nullptr)
|
||||||
, mSpellCreationDialog(NULL)
|
, mSpellCreationDialog(nullptr)
|
||||||
, mEnchantingDialog(NULL)
|
, mEnchantingDialog(nullptr)
|
||||||
, mTrainingWindow(NULL)
|
, mTrainingWindow(nullptr)
|
||||||
, mMerchantRepair(NULL)
|
, mMerchantRepair(nullptr)
|
||||||
, mSoulgemDialog(NULL)
|
, mSoulgemDialog(nullptr)
|
||||||
, mRepair(NULL)
|
, mRepair(nullptr)
|
||||||
, mRecharge(NULL)
|
, mRecharge(nullptr)
|
||||||
, mCompanionWindow(NULL)
|
, mCompanionWindow(nullptr)
|
||||||
, mVideoBackground(NULL)
|
, mVideoBackground(nullptr)
|
||||||
, mVideoWidget(NULL)
|
, mVideoWidget(nullptr)
|
||||||
, mWerewolfFader(NULL)
|
, mWerewolfFader(nullptr)
|
||||||
, mBlindnessFader(NULL)
|
, mBlindnessFader(nullptr)
|
||||||
, mHitFader(NULL)
|
, mHitFader(nullptr)
|
||||||
, mScreenFader(NULL)
|
, mScreenFader(nullptr)
|
||||||
, mDebugWindow(NULL)
|
, mDebugWindow(nullptr)
|
||||||
, mJailScreen(NULL)
|
, mJailScreen(nullptr)
|
||||||
, mTranslationDataStorage (translationDataStorage)
|
, mTranslationDataStorage (translationDataStorage)
|
||||||
, mCharGen(NULL)
|
, mCharGen(nullptr)
|
||||||
, mInputBlocker(NULL)
|
, mInputBlocker(nullptr)
|
||||||
, mCrosshairEnabled(Settings::Manager::getBool ("crosshair", "HUD"))
|
, mCrosshairEnabled(Settings::Manager::getBool ("crosshair", "HUD"))
|
||||||
, mSubtitlesEnabled(Settings::Manager::getBool ("subtitles", "GUI"))
|
, mSubtitlesEnabled(Settings::Manager::getBool ("subtitles", "GUI"))
|
||||||
, mHitFaderEnabled(Settings::Manager::getBool ("hit fader", "GUI"))
|
, mHitFaderEnabled(Settings::Manager::getBool ("hit fader", "GUI"))
|
||||||
|
@ -174,9 +174,9 @@ namespace MWGui
|
||||||
, mPlayerMajorSkills()
|
, mPlayerMajorSkills()
|
||||||
, mPlayerMinorSkills()
|
, mPlayerMinorSkills()
|
||||||
, mPlayerSkillValues()
|
, mPlayerSkillValues()
|
||||||
, mGui(NULL)
|
, mGui(nullptr)
|
||||||
, mGuiModes()
|
, mGuiModes()
|
||||||
, mCursorManager(NULL)
|
, mCursorManager(nullptr)
|
||||||
, mGarbageDialogs()
|
, mGarbageDialogs()
|
||||||
, mShown(GW_ALL)
|
, mShown(GW_ALL)
|
||||||
, mForceHidden(GW_None)
|
, mForceHidden(GW_None)
|
||||||
|
@ -505,7 +505,7 @@ namespace MWGui
|
||||||
setCursorVisible(!gameMode);
|
setCursorVisible(!gameMode);
|
||||||
|
|
||||||
if (gameMode)
|
if (gameMode)
|
||||||
setKeyFocusWidget (NULL);
|
setKeyFocusWidget (nullptr);
|
||||||
|
|
||||||
if (!mGuiEnabled)
|
if (!mGuiEnabled)
|
||||||
{
|
{
|
||||||
|
@ -1179,7 +1179,7 @@ namespace MWGui
|
||||||
return; //the cursor manager doesn't want any more info about this cursor
|
return; //the cursor manager doesn't want any more info about this cursor
|
||||||
//See if we can get the information we need out of the cursor resource
|
//See if we can get the information we need out of the cursor resource
|
||||||
ResourceImageSetPointerFix* imgSetPtr = dynamic_cast<ResourceImageSetPointerFix*>(MyGUI::PointerManager::getInstance().getByName(name));
|
ResourceImageSetPointerFix* imgSetPtr = dynamic_cast<ResourceImageSetPointerFix*>(MyGUI::PointerManager::getInstance().getByName(name));
|
||||||
if(imgSetPtr != NULL)
|
if(imgSetPtr != nullptr)
|
||||||
{
|
{
|
||||||
MyGUI::ResourceImageSet* imgSet = imgSetPtr->getImageSet();
|
MyGUI::ResourceImageSet* imgSet = imgSetPtr->getImageSet();
|
||||||
|
|
||||||
|
@ -1555,7 +1555,7 @@ namespace MWGui
|
||||||
// Remove this method for MyGUI 3.2.2
|
// Remove this method for MyGUI 3.2.2
|
||||||
void WindowManager::setKeyFocusWidget(MyGUI::Widget *widget)
|
void WindowManager::setKeyFocusWidget(MyGUI::Widget *widget)
|
||||||
{
|
{
|
||||||
if (widget == NULL)
|
if (widget == nullptr)
|
||||||
MyGUI::InputManager::getInstance().resetKeyFocusWidget();
|
MyGUI::InputManager::getInstance().resetKeyFocusWidget();
|
||||||
else
|
else
|
||||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(widget);
|
MyGUI::InputManager::getInstance().setKeyFocusWidget(widget);
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
||||||
|
|
||||||
mPinButton->eventMouseButtonPressed += MyGUI::newDelegate(this, &WindowPinnableBase::onPinButtonPressed);
|
mPinButton->eventMouseButtonPressed += MyGUI::newDelegate(this, &WindowPinnableBase::onPinButtonPressed);
|
||||||
|
|
||||||
MyGUI::Button* button = NULL;
|
MyGUI::Button* button = nullptr;
|
||||||
MyGUI::VectorWidgetPtr widgets = window->getSkinWidgetsByName("Action");
|
MyGUI::VectorWidgetPtr widgets = window->getSkinWidgetsByName("Action");
|
||||||
for (MyGUI::VectorWidgetPtr::iterator it = widgets.begin(); it != widgets.end(); ++it)
|
for (MyGUI::VectorWidgetPtr::iterator it = widgets.begin(); it != widgets.end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,10 +42,10 @@ namespace MWInput
|
||||||
: mWindow(window)
|
: mWindow(window)
|
||||||
, mViewer(viewer)
|
, mViewer(viewer)
|
||||||
, mJoystickLastUsed(false)
|
, mJoystickLastUsed(false)
|
||||||
, mPlayer(NULL)
|
, mPlayer(nullptr)
|
||||||
, mEngine(engine)
|
, mEngine(engine)
|
||||||
, mInputManager(NULL)
|
, mInputManager(nullptr)
|
||||||
, mVideoWrapper(NULL)
|
, mVideoWrapper(nullptr)
|
||||||
, mUserFile(userFile)
|
, mUserFile(userFile)
|
||||||
, mDragDrop(false)
|
, mDragDrop(false)
|
||||||
, mGrabCursor (Settings::Manager::getBool("grab cursor", "Input"))
|
, mGrabCursor (Settings::Manager::getBool("grab cursor", "Input"))
|
||||||
|
@ -82,7 +82,7 @@ namespace MWInput
|
||||||
Settings::Manager::getFloat("contrast", "Video"));
|
Settings::Manager::getFloat("contrast", "Video"));
|
||||||
|
|
||||||
std::string file = userFileExists ? userFile : "";
|
std::string file = userFileExists ? userFile : "";
|
||||||
mInputBinder = new ICS::InputControlSystem(file, true, this, NULL, A_Last);
|
mInputBinder = new ICS::InputControlSystem(file, true, this, nullptr, A_Last);
|
||||||
|
|
||||||
loadKeyDefaults();
|
loadKeyDefaults();
|
||||||
loadControllerDefaults();
|
loadControllerDefaults();
|
||||||
|
|
|
@ -1150,7 +1150,7 @@ namespace MWMechanics
|
||||||
iter->second->getCharacterController()->updateContinuousVfx();
|
iter->second->getCharacterController()->updateContinuousVfx();
|
||||||
|
|
||||||
// Animation/movement update
|
// Animation/movement update
|
||||||
CharacterController* playerCharacter = NULL;
|
CharacterController* playerCharacter = nullptr;
|
||||||
for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter)
|
for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter)
|
||||||
{
|
{
|
||||||
if (iter->first != player &&
|
if (iter->first != player &&
|
||||||
|
@ -1505,7 +1505,7 @@ namespace MWMechanics
|
||||||
for (; it != mActors.end(); ++it)
|
for (; it != mActors.end(); ++it)
|
||||||
{
|
{
|
||||||
delete it->second;
|
delete it->second;
|
||||||
it->second = NULL;
|
it->second = nullptr;
|
||||||
}
|
}
|
||||||
mActors.clear();
|
mActors.clear();
|
||||||
mDeathCount.clear();
|
mDeathCount.clear();
|
||||||
|
|
|
@ -107,7 +107,7 @@ namespace MWMechanics
|
||||||
mFollowTarget(false),
|
mFollowTarget(false),
|
||||||
mCombatMove(false),
|
mCombatMove(false),
|
||||||
mLastTargetPos(0,0,0),
|
mLastTargetPos(0,0,0),
|
||||||
mCell(NULL),
|
mCell(nullptr),
|
||||||
mCurrentAction(),
|
mCurrentAction(),
|
||||||
mActionCooldown(0),
|
mActionCooldown(0),
|
||||||
mStrength(),
|
mStrength(),
|
||||||
|
@ -284,7 +284,7 @@ namespace MWMechanics
|
||||||
currentAction->getCombatRange(rangeAttack, rangeFollow);
|
currentAction->getCombatRange(rangeAttack, rangeFollow);
|
||||||
|
|
||||||
// FIXME: consider moving this stuff to ActionWeapon::getCombatRange
|
// FIXME: consider moving this stuff to ActionWeapon::getCombatRange
|
||||||
const ESM::Weapon *weapon = NULL;
|
const ESM::Weapon *weapon = nullptr;
|
||||||
MWMechanics::WeaponType weaptype = WeapType_None;
|
MWMechanics::WeaponType weaptype = WeapType_None;
|
||||||
float weapRange = 1.0f;
|
float weapRange = 1.0f;
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ ESM::Weapon::AttackType chooseBestAttack(const ESM::Weapon* weapon, MWMechanics:
|
||||||
{
|
{
|
||||||
ESM::Weapon::AttackType attackType;
|
ESM::Weapon::AttackType attackType;
|
||||||
|
|
||||||
if (weapon == NULL)
|
if (weapon == nullptr)
|
||||||
{
|
{
|
||||||
//hand-to-hand deal equal damage for each type
|
//hand-to-hand deal equal damage for each type
|
||||||
float roll = Misc::Rng::rollClosedProbability();
|
float roll = Misc::Rng::rollClosedProbability();
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace MWMechanics
|
||||||
|
|
||||||
bool empty() const
|
bool empty() const
|
||||||
{
|
{
|
||||||
return mStorage == NULL;
|
return mStorage == nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::type_info& getType() const
|
const std::type_info& getType() const
|
||||||
|
@ -68,7 +68,7 @@ namespace MWMechanics
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DerivedClassStorage():mStorage(NULL){}
|
DerivedClassStorage():mStorage(nullptr){}
|
||||||
~DerivedClassStorage()
|
~DerivedClassStorage()
|
||||||
{
|
{
|
||||||
if(mStorage)
|
if(mStorage)
|
||||||
|
|
|
@ -71,7 +71,7 @@ namespace MWMechanics
|
||||||
mReaction(0),
|
mReaction(0),
|
||||||
mSaidGreeting(AiWander::Greet_None),
|
mSaidGreeting(AiWander::Greet_None),
|
||||||
mGreetingTimer(0),
|
mGreetingTimer(0),
|
||||||
mCell(NULL),
|
mCell(nullptr),
|
||||||
mChooseAction(true),
|
mChooseAction(true),
|
||||||
mIdleNow(false),
|
mIdleNow(false),
|
||||||
mMoveNow(false),
|
mMoveNow(false),
|
||||||
|
|
|
@ -712,7 +712,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
||||||
CharacterController::~CharacterController()
|
CharacterController::~CharacterController()
|
||||||
{
|
{
|
||||||
if (mAnimation)
|
if (mAnimation)
|
||||||
mAnimation->setTextKeyListener(NULL);
|
mAnimation->setTextKeyListener(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
void split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
||||||
|
@ -1914,7 +1914,7 @@ void CharacterController::skipAnim()
|
||||||
|
|
||||||
bool CharacterController::isAnimPlaying(const std::string &groupName)
|
bool CharacterController::isAnimPlaying(const std::string &groupName)
|
||||||
{
|
{
|
||||||
if(mAnimation == NULL)
|
if(mAnimation == nullptr)
|
||||||
return false;
|
return false;
|
||||||
return mAnimation->isPlaying(groupName);
|
return mAnimation->isPlaying(groupName);
|
||||||
}
|
}
|
||||||
|
@ -2102,9 +2102,9 @@ void CharacterController::updateHeadTracking(float duration)
|
||||||
if (MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(mHeadTrackTarget))
|
if (MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(mHeadTrackTarget))
|
||||||
{
|
{
|
||||||
const osg::Node* node = anim->getNode("Head");
|
const osg::Node* node = anim->getNode("Head");
|
||||||
if (node == NULL)
|
if (node == nullptr)
|
||||||
node = anim->getNode("Bip01 Head");
|
node = anim->getNode("Bip01 Head");
|
||||||
if (node != NULL)
|
if (node != nullptr)
|
||||||
{
|
{
|
||||||
osg::MatrixList mats = node->getWorldMatrices();
|
osg::MatrixList mats = node->getWorldMatrices();
|
||||||
if (mats.size())
|
if (mats.size())
|
||||||
|
|
|
@ -203,8 +203,8 @@ class CharacterController : public MWRender::Animation::TextKeyListener
|
||||||
void playRandomDeath(float startpoint = 0.0f);
|
void playRandomDeath(float startpoint = 0.0f);
|
||||||
|
|
||||||
/// choose a random animation group with \a prefix and numeric suffix
|
/// choose a random animation group with \a prefix and numeric suffix
|
||||||
/// @param num if non-NULL, the chosen animation number will be written here
|
/// @param num if non-nullptr, the chosen animation number will be written here
|
||||||
std::string chooseRandomGroup (const std::string& prefix, int* num = NULL);
|
std::string chooseRandomGroup (const std::string& prefix, int* num = nullptr);
|
||||||
|
|
||||||
bool updateCarriedLeftVisible(WeaponType weaptype) const;
|
bool updateCarriedLeftVisible(WeaponType weaptype) const;
|
||||||
|
|
||||||
|
|
|
@ -216,12 +216,12 @@ namespace MWMechanics
|
||||||
|
|
||||||
float baseMagicka = fPCbaseMagickaMult * creatureStats.getAttribute(ESM::Attribute::Intelligence).getBase();
|
float baseMagicka = fPCbaseMagickaMult * creatureStats.getAttribute(ESM::Attribute::Intelligence).getBase();
|
||||||
bool reachedLimit = false;
|
bool reachedLimit = false;
|
||||||
const ESM::Spell* weakestSpell = NULL;
|
const ESM::Spell* weakestSpell = nullptr;
|
||||||
int minCost = INT_MAX;
|
int minCost = INT_MAX;
|
||||||
|
|
||||||
std::vector<std::string> selectedSpells;
|
std::vector<std::string> selectedSpells;
|
||||||
|
|
||||||
const ESM::Race* race = NULL;
|
const ESM::Race* race = nullptr;
|
||||||
if (mRaceSelected)
|
if (mRaceSelected)
|
||||||
race = esmStore.get<ESM::Race>().find(player->mRace);
|
race = esmStore.get<ESM::Race>().find(player->mRace);
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ Objects::~Objects()
|
||||||
for (; it != mObjects.end();++it)
|
for (; it != mObjects.end();++it)
|
||||||
{
|
{
|
||||||
delete it->second;
|
delete it->second;
|
||||||
it->second = NULL;
|
it->second = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace MWMechanics
|
||||||
bool closed = true);
|
bool closed = true);
|
||||||
|
|
||||||
/// Returns door pointer within range. No guarentee is given as too which one
|
/// Returns door pointer within range. No guarentee is given as too which one
|
||||||
/** \return Pointer to the door, or NULL if none exists **/
|
/** \return Pointer to the door, or nullptr if none exists **/
|
||||||
MWWorld::Ptr getNearbyDoor(const MWWorld::Ptr& actor,
|
MWWorld::Ptr getNearbyDoor(const MWWorld::Ptr& actor,
|
||||||
float minSqr = MIN_DIST_TO_DOOR_SQUARED,
|
float minSqr = MIN_DIST_TO_DOOR_SQUARED,
|
||||||
bool closed = true);
|
bool closed = true);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue