mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:23:52 +00:00
Merged pull request #1960
This commit is contained in:
commit
38a3632be7
205 changed files with 717 additions and 721 deletions
|
@ -22,7 +22,7 @@ CS::Editor::Editor (int argc, char **argv)
|
|||
: mSettingsState (mCfgMgr), mDocumentManager (mCfgMgr),
|
||||
mViewManager (mDocumentManager), mPid(""),
|
||||
mLock(), mMerge (mDocumentManager),
|
||||
mIpcServerName ("org.openmw.OpenCS"), mServer(NULL), mClientSocket(NULL)
|
||||
mIpcServerName ("org.openmw.OpenCS"), mServer(nullptr), mClientSocket(nullptr)
|
||||
{
|
||||
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig();
|
||||
|
||||
|
@ -339,7 +339,7 @@ bool CS::Editor::makeIPCServer()
|
|||
}
|
||||
|
||||
mServer->close();
|
||||
mServer = NULL;
|
||||
mServer = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "operation.hpp"
|
||||
|
||||
CSMDoc::OperationHolder::OperationHolder (Operation *operation)
|
||||
: mOperation(NULL)
|
||||
: mOperation(nullptr)
|
||||
, mRunning (false)
|
||||
{
|
||||
if (operation)
|
||||
|
|
|
@ -318,7 +318,7 @@ namespace CSMWorld
|
|||
|
||||
QVariant BodyPartRaceColumn::get(const Record<ESM::BodyPart> &record) const
|
||||
{
|
||||
if (mMeshType != NULL && mMeshType->get(record) == ESM::BodyPart::MT_Skin)
|
||||
if (mMeshType != nullptr && mMeshType->get(record) == ESM::BodyPart::MT_Skin)
|
||||
{
|
||||
return QString::fromUtf8(record.get().mRace.c_str());
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ void CSMWorld::CreateCommand::applyModifications()
|
|||
if (!mNestedValues.empty())
|
||||
{
|
||||
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");
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ void CSMWorld::IdCompletionManager::generateCompleters(CSMWorld::Data &data)
|
|||
{
|
||||
QAbstractItemModel *model = data.getTableModel(current->second);
|
||||
CSMWorld::IdTableBase *table = dynamic_cast<CSMWorld::IdTableBase *>(model);
|
||||
if (table != NULL)
|
||||
if (table != nullptr)
|
||||
{
|
||||
int idColumn = table->searchColumnIndex(CSMWorld::Columns::ColumnId_Id);
|
||||
if (idColumn != -1)
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace
|
|||
|
||||
void CSMWorld::IdTableProxyModel::updateColumnMap()
|
||||
{
|
||||
Q_ASSERT(mSourceModel != NULL);
|
||||
Q_ASSERT(mSourceModel != nullptr);
|
||||
|
||||
mColumnMap.clear();
|
||||
if (mFilter)
|
||||
|
@ -33,7 +33,7 @@ void CSMWorld::IdTableProxyModel::updateColumnMap()
|
|||
bool CSMWorld::IdTableProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent)
|
||||
const
|
||||
{
|
||||
Q_ASSERT(mSourceModel != NULL);
|
||||
Q_ASSERT(mSourceModel != nullptr);
|
||||
|
||||
// It is not possible to use filterAcceptsColumn() and check for
|
||||
// sourceModel()->headerData (sourceColumn, Qt::Horizontal, CSMWorld::ColumnBase::Role_Flags)
|
||||
|
@ -51,14 +51,14 @@ bool CSMWorld::IdTableProxyModel::filterAcceptsRow (int sourceRow, const QModelI
|
|||
|
||||
CSMWorld::IdTableProxyModel::IdTableProxyModel (QObject *parent)
|
||||
: QSortFilterProxyModel (parent),
|
||||
mSourceModel(NULL)
|
||||
mSourceModel(nullptr)
|
||||
{
|
||||
setSortCaseSensitivity (Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
QModelIndex CSMWorld::IdTableProxyModel::getModelIndex (const std::string& id, int column) const
|
||||
{
|
||||
Q_ASSERT(mSourceModel != NULL);
|
||||
Q_ASSERT(mSourceModel != nullptr);
|
||||
|
||||
return mapFromSource(mSourceModel->getModelIndex (id, column));
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ bool CSMWorld::IdTableProxyModel::lessThan(const QModelIndex &left, const QModel
|
|||
|
||||
QString CSMWorld::IdTableProxyModel::getRecordId(int sourceRow) const
|
||||
{
|
||||
Q_ASSERT(mSourceModel != NULL);
|
||||
Q_ASSERT(mSourceModel != nullptr);
|
||||
|
||||
int idColumn = mSourceModel->findColumnIndex(Columns::ColumnId_Id);
|
||||
return mSourceModel->data(mSourceModel->index(sourceRow, idColumn)).toString();
|
||||
|
|
|
@ -28,7 +28,7 @@ void CSMWorld::InfoTableProxyModel::setSourceModel(QAbstractItemModel *sourceMod
|
|||
{
|
||||
IdTableProxyModel::setSourceModel(sourceModel);
|
||||
|
||||
if (mSourceModel != NULL)
|
||||
if (mSourceModel != nullptr)
|
||||
{
|
||||
mInfoColumnIndex = mSourceModel->findColumnIndex(mInfoColumnId);
|
||||
mFirstRowCache.clear();
|
||||
|
@ -37,7 +37,7 @@ void CSMWorld::InfoTableProxyModel::setSourceModel(QAbstractItemModel *sourceMod
|
|||
|
||||
bool CSMWorld::InfoTableProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
|
||||
{
|
||||
Q_ASSERT(mSourceModel != NULL);
|
||||
Q_ASSERT(mSourceModel != nullptr);
|
||||
|
||||
QModelIndex first = mSourceModel->index(getFirstInfoRow(left.row()), left.column());
|
||||
QModelIndex second = mSourceModel->index(getFirstInfoRow(right.row()), right.column());
|
||||
|
@ -52,7 +52,7 @@ bool CSMWorld::InfoTableProxyModel::lessThan(const QModelIndex &left, const QMod
|
|||
|
||||
int CSMWorld::InfoTableProxyModel::getFirstInfoRow(int currentRow) const
|
||||
{
|
||||
Q_ASSERT(mSourceModel != NULL);
|
||||
Q_ASSERT(mSourceModel != nullptr);
|
||||
|
||||
int row = currentRow;
|
||||
int column = mInfoColumnIndex;
|
||||
|
|
|
@ -453,13 +453,13 @@ void CSMWorld::ContainerRefIdAdapter::setData (const RefIdColumn *column, RefIdD
|
|||
|
||||
CSMWorld::CreatureColumns::CreatureColumns (const ActorColumns& actorColumns)
|
||||
: ActorColumns (actorColumns),
|
||||
mType(NULL),
|
||||
mScale(NULL),
|
||||
mOriginal(NULL),
|
||||
mAttributes(NULL),
|
||||
mAttacks(NULL),
|
||||
mMisc(NULL),
|
||||
mBloodType(NULL)
|
||||
mType(nullptr),
|
||||
mScale(nullptr),
|
||||
mOriginal(nullptr),
|
||||
mAttributes(nullptr),
|
||||
mAttacks(nullptr),
|
||||
mMisc(nullptr),
|
||||
mBloodType(nullptr)
|
||||
{}
|
||||
|
||||
CSMWorld::CreatureRefIdAdapter::CreatureRefIdAdapter (const CreatureColumns& columns)
|
||||
|
@ -748,16 +748,16 @@ void CSMWorld::MiscRefIdAdapter::setData (const RefIdColumn *column, RefIdData&
|
|||
|
||||
CSMWorld::NpcColumns::NpcColumns (const ActorColumns& actorColumns)
|
||||
: ActorColumns (actorColumns),
|
||||
mRace(NULL),
|
||||
mClass(NULL),
|
||||
mFaction(NULL),
|
||||
mHair(NULL),
|
||||
mHead(NULL),
|
||||
mAttributes(NULL),
|
||||
mSkills(NULL),
|
||||
mMisc(NULL),
|
||||
mBloodType(NULL),
|
||||
mGender(NULL)
|
||||
mRace(nullptr),
|
||||
mClass(nullptr),
|
||||
mFaction(nullptr),
|
||||
mHair(nullptr),
|
||||
mHead(nullptr),
|
||||
mAttributes(nullptr),
|
||||
mSkills(nullptr),
|
||||
mMisc(nullptr),
|
||||
mBloodType(nullptr),
|
||||
mGender(nullptr)
|
||||
{}
|
||||
|
||||
CSMWorld::NpcRefIdAdapter::NpcRefIdAdapter (const NpcColumns& columns)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <stdexcept>
|
||||
|
||||
CSMWorld::ResourcesManager::ResourcesManager()
|
||||
: mVFS(NULL)
|
||||
: mVFS(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ void CSVDoc::FileDialog::slotRejected()
|
|||
if(mFileWidget)
|
||||
{
|
||||
delete mFileWidget;
|
||||
mFileWidget = NULL;
|
||||
mFileWidget = nullptr;
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void CSVDoc::FileDialog::slotNewFile()
|
|||
if(mFileWidget)
|
||||
{
|
||||
delete mFileWidget;
|
||||
mFileWidget = NULL;
|
||||
mFileWidget = nullptr;
|
||||
}
|
||||
disconnect (ui.projectButtonBox, SIGNAL (accepted()), this, SLOT (slotNewFile()));
|
||||
close();
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace CSVDoc
|
|||
|
||||
void updateTitle();
|
||||
|
||||
void updateSubViewIndices (SubView *view = NULL);
|
||||
void updateSubViewIndices (SubView *view = nullptr);
|
||||
|
||||
void universalIdChanged (const CSMWorld::UniversalId& universalId);
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ void CSVDoc::View::updateSubViewIndices(SubView *view)
|
|||
else
|
||||
{
|
||||
delete subView->titleBarWidget();
|
||||
subView->setTitleBarWidget (NULL);
|
||||
subView->setTitleBarWidget (nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ void CSVDoc::View::updateActions()
|
|||
|
||||
CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews)
|
||||
: mViewManager (viewManager), mDocument (document), mViewIndex (totalViews-1),
|
||||
mViewTotal (totalViews), mScroll(NULL), mScrollbarOnly(false)
|
||||
mViewTotal (totalViews), mScroll(nullptr), mScrollbarOnly(false)
|
||||
{
|
||||
CSMPrefs::Category& windows = CSMPrefs::State::get()["Windows"];
|
||||
|
||||
|
@ -563,7 +563,7 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
|||
return;
|
||||
}
|
||||
|
||||
SubView *view = NULL;
|
||||
SubView *view = nullptr;
|
||||
if(isReferenceable)
|
||||
{
|
||||
view = mSubViewFactory.makeSubView (CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, id.getId()), *mDocument);
|
||||
|
@ -631,7 +631,7 @@ void CSVDoc::View::moveScrollBarToEnd(int min, int max)
|
|||
void CSVDoc::View::settingChanged (const CSMPrefs::Setting *setting)
|
||||
{
|
||||
if (*setting=="Windows/hide-subview")
|
||||
updateSubViewIndices (NULL);
|
||||
updateSubViewIndices (nullptr);
|
||||
else if (*setting=="Windows/mainwindow-scrollbar")
|
||||
{
|
||||
if (setting->toString()!="Grow Only")
|
||||
|
@ -659,7 +659,7 @@ void CSVDoc::View::settingChanged (const CSMPrefs::Setting *setting)
|
|||
mScroll->takeWidget();
|
||||
setCentralWidget (&mSubViewWindow);
|
||||
mScroll->deleteLater();
|
||||
mScroll = NULL;
|
||||
mScroll = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace CSVDoc
|
|||
void updateTitle();
|
||||
|
||||
// called when subviews are added or removed
|
||||
void updateSubViewIndices (SubView *view = NULL);
|
||||
void updateSubViewIndices (SubView *view = nullptr);
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace CSVRender
|
|||
, mCameraSensitivity(1/650.f)
|
||||
, mSecondaryMoveMult(50)
|
||||
, mWheelMoveMult(8)
|
||||
, mCamera(NULL)
|
||||
, mCamera(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ namespace CSVRender
|
|||
bool wasActive = mActive;
|
||||
|
||||
mCamera = camera;
|
||||
mActive = (mCamera != NULL);
|
||||
mActive = (mCamera != nullptr);
|
||||
|
||||
if (mActive != wasActive)
|
||||
{
|
||||
|
|
|
@ -86,7 +86,7 @@ void CSVRender::Object::update()
|
|||
const int ModelIndex = referenceables.findColumnIndex (CSMWorld::Columns::ColumnId_Model);
|
||||
|
||||
int index = referenceables.searchId (mReferenceableId);
|
||||
const ESM::Light* light = NULL;
|
||||
const ESM::Light* light = nullptr;
|
||||
|
||||
mBaseNode->removeChildren(0, mBaseNode->getNumChildren());
|
||||
|
||||
|
|
|
@ -527,7 +527,7 @@ void CSVRender::PagedWorldspaceWidget::addCellToSceneFromCamera (int offsetX, in
|
|||
|
||||
CSVRender::PagedWorldspaceWidget::PagedWorldspaceWidget (QWidget* parent, CSMDoc::Document& document)
|
||||
: WorldspaceWidget (document, parent), mDocument (document), mWorldspace ("std::default"),
|
||||
mControlElements(NULL), mDisplayCellCoord(true)
|
||||
mControlElements(nullptr), mDisplayCellCoord(true)
|
||||
{
|
||||
QAbstractItemModel *cells =
|
||||
document.getData().getTableModel (CSMWorld::UniversalId::Type_Cells);
|
||||
|
|
|
@ -185,7 +185,7 @@ SceneWidget::SceneWidget(std::shared_ptr<Resource::ResourceSystem> resourceSyste
|
|||
bool retrieveInput)
|
||||
: RenderWidget(parent, f)
|
||||
, mResourceSystem(resourceSystem)
|
||||
, mLighting(NULL)
|
||||
, mLighting(nullptr)
|
||||
, mHasDefaultAmbient(false)
|
||||
, mPrevMouseX(0)
|
||||
, mPrevMouseY(0)
|
||||
|
@ -425,21 +425,21 @@ void SceneWidget::selectNavigationMode (const std::string& mode)
|
|||
{
|
||||
if (mode=="1st")
|
||||
{
|
||||
mCurrentCamControl->setCamera(NULL);
|
||||
mCurrentCamControl->setCamera(nullptr);
|
||||
mCurrentCamControl = mFreeCamControl;
|
||||
mFreeCamControl->setCamera(getCamera());
|
||||
mFreeCamControl->fixUpAxis(CameraController::WorldUp);
|
||||
}
|
||||
else if (mode=="free")
|
||||
{
|
||||
mCurrentCamControl->setCamera(NULL);
|
||||
mCurrentCamControl->setCamera(nullptr);
|
||||
mCurrentCamControl = mFreeCamControl;
|
||||
mFreeCamControl->setCamera(getCamera());
|
||||
mFreeCamControl->unfixUpAxis();
|
||||
}
|
||||
else if (mode=="orbit")
|
||||
{
|
||||
mCurrentCamControl->setCamera(NULL);
|
||||
mCurrentCamControl->setCamera(nullptr);
|
||||
mCurrentCamControl = mOrbitCamControl;
|
||||
mOrbitCamControl->setCamera(getCamera());
|
||||
mOrbitCamControl->reset();
|
||||
|
|
|
@ -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
|
||||
int index = mData.getLand().searchId(CSMWorld::Land::createUniqueRecordId(cellX, cellY));
|
||||
if (index == -1)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
const ESM::Land& land = mData.getLand().getRecord(index).get();
|
||||
return new ESMTerrain::LandObject(&land, ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX);
|
||||
|
|
|
@ -45,7 +45,7 @@ void CSVWidget::ColorPickerPopup::showPicker(const QPoint &position, const QColo
|
|||
void CSVWidget::ColorPickerPopup::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
QPushButton *button = qobject_cast<QPushButton *>(parentWidget());
|
||||
if (button != NULL)
|
||||
if (button != nullptr)
|
||||
{
|
||||
QStyleOptionButton option;
|
||||
option.init(button);
|
||||
|
|
|
@ -11,7 +11,7 @@ CSVWidget::CompleterPopup::CompleterPopup(QWidget *parent)
|
|||
|
||||
int CSVWidget::CompleterPopup::sizeHintForRow(int row) const
|
||||
{
|
||||
if (model() == NULL)
|
||||
if (model() == nullptr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ std::string CSVWorld::CellCreator::getId() const
|
|||
void CSVWorld::CellCreator::configureCreateCommand(CSMWorld::CreateCommand& command) const
|
||||
{
|
||||
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 index = model->findNestedColumnIndex(parentIndex, CSMWorld::Columns::ColumnId_Interior);
|
||||
command.addNestedValue(parentIndex, index, mType->currentIndex() == 0);
|
||||
|
|
|
@ -158,7 +158,7 @@ mNotEditableDelegate(table, parent)
|
|||
|
||||
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));
|
||||
if (delegateIt == mDelegates.end())
|
||||
{
|
||||
|
@ -251,11 +251,11 @@ QWidget* CSVWorld::DialogueDelegateDispatcher::makeEditor(CSMWorld::ColumnBase::
|
|||
variant = index.data(Qt::DisplayRole);
|
||||
if (!variant.isValid())
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
QWidget* editor = NULL;
|
||||
QWidget* editor = nullptr;
|
||||
if (! (mTable->flags (index) & Qt::ItemIsEditable))
|
||||
{
|
||||
return mNotEditableDelegate.createEditor(qobject_cast<QWidget*>(mParent),
|
||||
|
@ -325,7 +325,7 @@ CSVWorld::IdContextMenu::IdContextMenu(QWidget *widget, CSMWorld::ColumnBase::Di
|
|||
mWidget(widget),
|
||||
mIdType(CSMWorld::TableMimeData::convertEnums(display))
|
||||
{
|
||||
Q_ASSERT(mWidget != NULL);
|
||||
Q_ASSERT(mWidget != nullptr);
|
||||
Q_ASSERT(CSMWorld::ColumnBase::isId(display));
|
||||
Q_ASSERT(mIdType != CSMWorld::UniversalId::Type_None);
|
||||
|
||||
|
@ -339,7 +339,7 @@ CSVWorld::IdContextMenu::IdContextMenu(QWidget *widget, CSMWorld::ColumnBase::Di
|
|||
connect(mEditIdAction, SIGNAL(triggered()), this, SLOT(editIdRequest()));
|
||||
|
||||
QLineEdit *lineEdit = qobject_cast<QLineEdit *>(mWidget);
|
||||
if (lineEdit != NULL)
|
||||
if (lineEdit != nullptr)
|
||||
{
|
||||
mContextMenu = lineEdit->createStandardContextMenu();
|
||||
}
|
||||
|
@ -360,11 +360,11 @@ QString CSVWorld::IdContextMenu::getWidgetValue() const
|
|||
QLabel *label = qobject_cast<QLabel *>(mWidget);
|
||||
|
||||
QString value = "";
|
||||
if (lineEdit != NULL)
|
||||
if (lineEdit != nullptr)
|
||||
{
|
||||
value = lineEdit->text();
|
||||
}
|
||||
else if (label != NULL)
|
||||
else if (label != nullptr)
|
||||
{
|
||||
value = label->text();
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ void CSVWorld::EditWidget::createEditorContextMenu(QWidget *editor,
|
|||
CSMWorld::ColumnBase::Display display,
|
||||
int currentRow) const
|
||||
{
|
||||
Q_ASSERT(editor != NULL);
|
||||
Q_ASSERT(editor != nullptr);
|
||||
|
||||
if (CSMWorld::ColumnBase::isId(display) &&
|
||||
CSMWorld::TableMimeData::convertEnums(display) != CSMWorld::UniversalId::Type_None)
|
||||
|
@ -470,11 +470,11 @@ CSVWorld::EditWidget::EditWidget(QWidget *parent,
|
|||
int row, CSMWorld::IdTable* table, CSMWorld::CommandDispatcher& commandDispatcher,
|
||||
CSMDoc::Document& document, bool createAndDelete) :
|
||||
QScrollArea(parent),
|
||||
mWidgetMapper(NULL),
|
||||
mNestedTableMapper(NULL),
|
||||
mDispatcher(NULL),
|
||||
mNestedTableDispatcher(NULL),
|
||||
mMainWidget(NULL),
|
||||
mWidgetMapper(nullptr),
|
||||
mNestedTableMapper(nullptr),
|
||||
mDispatcher(nullptr),
|
||||
mNestedTableDispatcher(nullptr),
|
||||
mMainWidget(nullptr),
|
||||
mTable(table),
|
||||
mCommandDispatcher (commandDispatcher),
|
||||
mDocument (document)
|
||||
|
@ -733,7 +733,7 @@ bool CSVWorld::SimpleDialogueSubView::isLocked() const
|
|||
CSVWorld::SimpleDialogueSubView::SimpleDialogueSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) :
|
||||
SubView (id),
|
||||
mEditWidget(0),
|
||||
mMainLayout(NULL),
|
||||
mMainLayout(nullptr),
|
||||
mTable(dynamic_cast<CSMWorld::IdTable*>(document.getData().getTableModel(id))),
|
||||
mLocked(false),
|
||||
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)
|
||||
{
|
||||
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,
|
||||
|
|
|
@ -83,7 +83,7 @@ void CSVWorld::DragRecordTable::dropEvent(QDropEvent *event)
|
|||
|
||||
CSMWorld::ColumnBase::Display CSVWorld::DragRecordTable::getIndexDisplayType(const QModelIndex &index) const
|
||||
{
|
||||
Q_ASSERT(model() != NULL);
|
||||
Q_ASSERT(model() != nullptr);
|
||||
|
||||
if (index.isValid())
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace CSVWorld
|
|||
bool mEditLock;
|
||||
|
||||
public:
|
||||
DragRecordTable(CSMDoc::Document& document, QWidget* parent = NULL);
|
||||
DragRecordTable(CSMDoc::Document& document, QWidget* parent = nullptr);
|
||||
|
||||
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const = 0;
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ void CSVWorld::ExtendedCommandConfigurator::setupGroupLayout()
|
|||
int divider = 1;
|
||||
do
|
||||
{
|
||||
while (layout->itemAt(0) != NULL)
|
||||
while (layout->itemAt(0) != nullptr)
|
||||
{
|
||||
layout->removeItem(layout->itemAt(0));
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ QWidget *CSVWorld::IdCompletionDelegate::createEditor(QWidget *parent,
|
|||
{
|
||||
if (!index.data(Qt::EditRole).isValid() && !index.data(Qt::DisplayRole).isValid())
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// The completer for InfoCondVar needs to return a completer based on the first column
|
||||
|
|
|
@ -23,9 +23,9 @@ CSVWorld::NestedTable::NestedTable(CSMDoc::Document& document,
|
|||
bool editable,
|
||||
bool fixedRows)
|
||||
: DragRecordTable(document, parent),
|
||||
mAddNewRowAction(NULL),
|
||||
mRemoveRowAction(NULL),
|
||||
mEditIdAction(NULL),
|
||||
mAddNewRowAction(nullptr),
|
||||
mRemoveRowAction(nullptr),
|
||||
mEditIdAction(nullptr),
|
||||
mModel(model)
|
||||
{
|
||||
mDispatcher = new CSMWorld::CommandDispatcher (document, id, this);
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace CSVWorld
|
|||
NestedTable(CSMDoc::Document& document,
|
||||
CSMWorld::UniversalId id,
|
||||
CSMWorld::NestedTableProxyModel* model,
|
||||
QWidget* parent = NULL,
|
||||
QWidget* parent = nullptr,
|
||||
bool editable = true,
|
||||
bool fixedRows = false);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "creator.hpp"
|
||||
|
||||
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;
|
||||
|
||||
|
@ -35,7 +35,7 @@ CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::D
|
|||
|
||||
mLayout->setContentsMargins (QMargins (0, 0, 0, 0));
|
||||
|
||||
CSVRender::WorldspaceWidget* worldspaceWidget = NULL;
|
||||
CSVRender::WorldspaceWidget* worldspaceWidget = nullptr;
|
||||
widgetType whatWidget;
|
||||
|
||||
if (id.getId()==ESM::CellId::sDefaultWorldspace)
|
||||
|
@ -189,9 +189,9 @@ void CSVWorld::SceneSubView::cellSelectionChanged (const CSMWorld::CellSelection
|
|||
|
||||
void CSVWorld::SceneSubView::handleDrop (const std::vector< CSMWorld::UniversalId >& universalIdData)
|
||||
{
|
||||
CSVRender::PagedWorldspaceWidget* pagedNewWidget = NULL;
|
||||
CSVRender::UnpagedWorldspaceWidget* unPagedNewWidget = NULL;
|
||||
CSVWidget::SceneToolbar* toolbar = NULL;
|
||||
CSVRender::PagedWorldspaceWidget* pagedNewWidget = nullptr;
|
||||
CSVRender::UnpagedWorldspaceWidget* unPagedNewWidget = nullptr;
|
||||
CSVWidget::SceneToolbar* toolbar = nullptr;
|
||||
|
||||
CSVRender::WorldspaceWidget::DropType type = CSVRender::WorldspaceWidget::getDropType (universalIdData);
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ void CSVWorld::CommandDelegate::setModelDataImp (QWidget *editor, QAbstractItemM
|
|||
|
||||
// Color columns use a custom editor, so we need to fetch selected color from it.
|
||||
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
||||
if (colorEditor != NULL)
|
||||
if (colorEditor != nullptr)
|
||||
{
|
||||
variant = colorEditor->colorInt();
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ void CSVWorld::CommandDelegate::setEditorData (QWidget *editor, const QModelInde
|
|||
|
||||
// Color columns use a custom editor, so we need explicitly set a data for it
|
||||
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
||||
if (colorEditor != NULL)
|
||||
if (colorEditor != nullptr)
|
||||
{
|
||||
colorEditor->setColor(variant.toInt());
|
||||
return;
|
||||
|
|
|
@ -20,14 +20,14 @@ void releaseArgv();
|
|||
|
||||
int Java_org_libsdl_app_SDLActivity_getMouseX(JNIEnv *env, jclass cls, jobject obj) {
|
||||
int ret = 0;
|
||||
SDL_GetMouseState(&ret, NULL);
|
||||
SDL_GetMouseState(&ret, nullptr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int Java_org_libsdl_app_SDLActivity_getMouseY(JNIEnv *env, jclass cls, jobject obj) {
|
||||
int ret = 0;
|
||||
SDL_GetMouseState(NULL, &ret);
|
||||
SDL_GetMouseState(nullptr, &ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -197,9 +197,9 @@ bool OMW::Engine::frame(float frametime)
|
|||
}
|
||||
|
||||
OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
||||
: mWindow(NULL)
|
||||
: mWindow(nullptr)
|
||||
, mEncoding(ToUTF8::WINDOWS_1252)
|
||||
, mEncoder(NULL)
|
||||
, mEncoder(nullptr)
|
||||
, mScreenCaptureOperation(nullptr)
|
||||
, mSkipMenu (false)
|
||||
, mUseSound (true)
|
||||
|
@ -237,18 +237,18 @@ OMW::Engine::~Engine()
|
|||
mEnvironment.cleanup();
|
||||
|
||||
delete mScriptContext;
|
||||
mScriptContext = NULL;
|
||||
mScriptContext = nullptr;
|
||||
|
||||
mWorkQueue = NULL;
|
||||
mWorkQueue = nullptr;
|
||||
|
||||
mResourceSystem.reset();
|
||||
|
||||
mViewer = NULL;
|
||||
mViewer = nullptr;
|
||||
|
||||
if (mWindow)
|
||||
{
|
||||
SDL_DestroyWindow(mWindow);
|
||||
mWindow = NULL;
|
||||
mWindow = nullptr;
|
||||
}
|
||||
|
||||
SDL_Quit();
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace MWClass
|
|||
if (ref->mBase->mFlags & ESM::Container::Respawn)
|
||||
{
|
||||
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
|
||||
ptr.getRefData().setCustomData(NULL);
|
||||
ptr.getRefData().setCustomData(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ namespace MWClass
|
|||
bool healthdmg = true;
|
||||
if (!weapon.isEmpty())
|
||||
{
|
||||
const unsigned char *attack = NULL;
|
||||
const unsigned char *attack = nullptr;
|
||||
if(type == ESM::Weapon::AT_Chop)
|
||||
attack = weapon.get<ESM::Weapon>()->mBase->mData.mChop;
|
||||
else if(type == ESM::Weapon::AT_Slash)
|
||||
|
@ -828,7 +828,7 @@ namespace MWClass
|
|||
ptr.getRefData().setCount(1);
|
||||
|
||||
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
|
||||
ptr.getRefData().setCustomData(NULL);
|
||||
ptr.getRefData().setCustomData(nullptr);
|
||||
|
||||
// Reset to original position
|
||||
MWBase::Environment::get().getWorld()->moveObject(ptr, ptr.getCellRef().getPosition().pos[0],
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
assert (ref->mBase != NULL);
|
||||
assert (ref->mBase != nullptr);
|
||||
|
||||
// TODO: add option somewhere to enable collision for placeable objects
|
||||
if (!model.empty() && (ref->mBase->mData.mFlags & ESM::Light::Carry) == 0)
|
||||
|
|
|
@ -610,7 +610,7 @@ namespace MWClass
|
|||
float damage = 0.0f;
|
||||
if(!weapon.isEmpty())
|
||||
{
|
||||
const unsigned char *attack = NULL;
|
||||
const unsigned char *attack = nullptr;
|
||||
if(type == ESM::Weapon::AT_Chop)
|
||||
attack = weapon.get<ESM::Weapon>()->mBase->mData.mChop;
|
||||
else if(type == ESM::Weapon::AT_Slash)
|
||||
|
@ -1382,7 +1382,7 @@ namespace MWClass
|
|||
ptr.getRefData().setCount(1);
|
||||
|
||||
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
|
||||
ptr.getRefData().setCustomData(NULL);
|
||||
ptr.getRefData().setCustomData(nullptr);
|
||||
|
||||
// Reset to original position
|
||||
MWBase::Environment::get().getWorld()->moveObject(ptr, ptr.getCellRef().getPosition().pos[0],
|
||||
|
|
|
@ -572,7 +572,7 @@ namespace MWDialogue
|
|||
const MWMechanics::CreatureStats& creatureStats = actor.getClass().getCreatureStats(actor);
|
||||
Filter filter(actor, 0, creatureStats.hasTalkedToPlayer());
|
||||
const ESM::DialInfo *info = filter.search(*dial, false);
|
||||
if(info != NULL)
|
||||
if(info != nullptr)
|
||||
{
|
||||
MWBase::WindowManager *winMgr = MWBase::Environment::get().getWindowManager();
|
||||
if(winMgr->getSubtitlesEnabled())
|
||||
|
|
|
@ -621,7 +621,7 @@ const ESM::DialInfo* MWDialogue::Filter::search (const ESM::Dialogue& dialogue,
|
|||
std::vector<const ESM::DialInfo *> suitableInfos = list (dialogue, fallbackToInfoRefusal, false);
|
||||
|
||||
if (suitableInfos.empty())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
else
|
||||
return suitableInfos[0];
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace MWDialogue
|
|||
{
|
||||
if (actor.isEmpty())
|
||||
{
|
||||
MWScript::InterpreterContext interpreterContext(NULL,MWWorld::Ptr());
|
||||
MWScript::InterpreterContext interpreterContext(nullptr, MWWorld::Ptr());
|
||||
mText = Interpreter::fixDefinesDialog(iter->mResponse, interpreterContext);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace MWGui
|
|||
|
||||
AlchemyWindow::AlchemyWindow()
|
||||
: WindowBase("openmw_alchemy_window.layout")
|
||||
, mSortModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mAlchemy(new MWMechanics::Alchemy())
|
||||
, mApparatus (4)
|
||||
, mIngredients (4)
|
||||
|
|
|
@ -10,7 +10,7 @@ void BackgroundImage::setBackgroundImage (const std::string& image, bool fixedRa
|
|||
if (mChild)
|
||||
{
|
||||
MyGUI::Gui::getInstance().destroyWidget(mChild);
|
||||
mChild = NULL;
|
||||
mChild = nullptr;
|
||||
}
|
||||
if (!stretch)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
|||
MYGUI_RTTI_DERIVED(BackgroundImage)
|
||||
|
||||
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
|
||||
|
|
|
@ -110,7 +110,7 @@ struct TypesetBookImpl : TypesetBook
|
|||
Contents::iterator i = mContents.insert (mContents.end (), Content (text.first, text.second));
|
||||
|
||||
if (i->empty())
|
||||
return Range (Utf8Point (NULL), Utf8Point (NULL));
|
||||
return Range (Utf8Point (nullptr), Utf8Point (nullptr));
|
||||
|
||||
Utf8Point begin = &i->front ();
|
||||
Utf8Point end = &i->front () + i->size ();
|
||||
|
@ -148,7 +148,7 @@ struct TypesetBookImpl : TypesetBook
|
|||
template <typename Visitor>
|
||||
void visitRuns (int top, int bottom, Visitor const & visitor) const
|
||||
{
|
||||
visitRuns (top, bottom, NULL, visitor);
|
||||
visitRuns (top, bottom, nullptr, visitor);
|
||||
}
|
||||
|
||||
/// hit test with a margin for error. only hits on interactive text fragments are reported.
|
||||
|
@ -176,7 +176,7 @@ struct TypesetBookImpl : TypesetBook
|
|||
return hit;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
StyleImpl * hitTest (int left, int top) const
|
||||
|
@ -213,7 +213,7 @@ struct TypesetBookImpl : TypesetBook
|
|||
for (Styles::iterator i = mStyles.begin (); i != mStyles.end (); ++i)
|
||||
if (&*i == style)
|
||||
return i->mFont;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
struct Typesetter;
|
||||
|
@ -253,8 +253,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
Typesetter (size_t width, size_t height) :
|
||||
mPageWidth (width), mPageHeight(height),
|
||||
mSection (NULL), mLine (NULL), mRun (NULL),
|
||||
mCurrentContent (NULL),
|
||||
mSection (nullptr), mLine (nullptr), mRun (nullptr),
|
||||
mCurrentContent (nullptr),
|
||||
mCurrentAlignment (AlignLeft)
|
||||
{
|
||||
mBook = std::make_shared <Book> ();
|
||||
|
@ -342,7 +342,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
void write (Style * style, size_t begin, size_t end)
|
||||
{
|
||||
assert (mCurrentContent != NULL);
|
||||
assert (mCurrentContent != nullptr);
|
||||
assert (end <= mCurrentContent->size ());
|
||||
assert (begin <= mCurrentContent->size ());
|
||||
|
||||
|
@ -358,8 +358,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
add_partial_text();
|
||||
|
||||
mRun = NULL;
|
||||
mLine = NULL;
|
||||
mRun = nullptr;
|
||||
mLine = nullptr;
|
||||
}
|
||||
|
||||
void sectionBreak (int margin)
|
||||
|
@ -368,9 +368,9 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
if (mBook->mSections.size () > 0)
|
||||
{
|
||||
mRun = NULL;
|
||||
mLine = NULL;
|
||||
mSection = NULL;
|
||||
mRun = nullptr;
|
||||
mLine = nullptr;
|
||||
mSection = nullptr;
|
||||
|
||||
if (mBook->mRect.bottom < (mBook->mSections.back ().mRect.bottom + margin))
|
||||
mBook->mRect.bottom = (mBook->mSections.back ().mRect.bottom + margin);
|
||||
|
@ -381,7 +381,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
{
|
||||
add_partial_text();
|
||||
|
||||
if (mSection != NULL)
|
||||
if (mSection != nullptr)
|
||||
mSectionAlignment.back () = sectionAlignment;
|
||||
mCurrentAlignment = sectionAlignment;
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
{
|
||||
add_partial_text();
|
||||
stream.consume ();
|
||||
mLine = NULL, mRun = NULL;
|
||||
mLine = nullptr, mRun = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -551,7 +551,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
if (left + space_width + word_width > mPageWidth)
|
||||
{
|
||||
mLine = NULL, mRun = NULL, left = 0;
|
||||
mLine = nullptr, mRun = nullptr, left = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -580,7 +580,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
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 ());
|
||||
mSection = &mBook->mSections.back ();
|
||||
|
@ -588,7 +588,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
mSectionAlignment.push_back (mCurrentAlignment);
|
||||
}
|
||||
|
||||
if (mLine == NULL)
|
||||
if (mLine == nullptr)
|
||||
{
|
||||
mSection->mLines.push_back (Line ());
|
||||
mLine = &mSection->mLines.back ();
|
||||
|
@ -613,7 +613,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
if (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;
|
||||
|
||||
|
@ -843,17 +843,17 @@ protected:
|
|||
TextFormat (MyGUI::IFont* id, PageDisplay * display) :
|
||||
mFont (id),
|
||||
mCountVertex (0),
|
||||
mTexture (NULL),
|
||||
mRenderItem (NULL),
|
||||
mTexture (nullptr),
|
||||
mRenderItem (nullptr),
|
||||
mDisplay (display)
|
||||
{
|
||||
}
|
||||
|
||||
void createDrawItem (MyGUI::ILayerNode* node)
|
||||
{
|
||||
assert (mRenderItem == NULL);
|
||||
assert (mRenderItem == nullptr);
|
||||
|
||||
if (mTexture != NULL)
|
||||
if (mTexture != nullptr)
|
||||
{
|
||||
mRenderItem = node->addToRenderItem(mTexture, false, false);
|
||||
mRenderItem->addDrawItem(this, mCountVertex);
|
||||
|
@ -862,12 +862,12 @@ protected:
|
|||
|
||||
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 = NULL;
|
||||
mRenderItem = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -920,9 +920,9 @@ public:
|
|||
resetPage ();
|
||||
mViewTop = 0;
|
||||
mViewBottom = 0;
|
||||
mFocusItem = NULL;
|
||||
mFocusItem = nullptr;
|
||||
mItemActive = false;
|
||||
mNode = NULL;
|
||||
mNode = nullptr;
|
||||
}
|
||||
|
||||
void dirtyFocusItem ()
|
||||
|
@ -1053,7 +1053,7 @@ public:
|
|||
|
||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
{
|
||||
if (mNode != NULL)
|
||||
if (mNode != nullptr)
|
||||
i->second->destroyDrawItem (mNode);
|
||||
i->second.reset();
|
||||
}
|
||||
|
@ -1089,7 +1089,7 @@ public:
|
|||
else
|
||||
if (mBook && isPageDifferent (newPage))
|
||||
{
|
||||
if (mNode != NULL)
|
||||
if (mNode != nullptr)
|
||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
mNode->outOfDate(i->second->mRenderItem);
|
||||
|
||||
|
@ -1137,7 +1137,7 @@ public:
|
|||
{
|
||||
newBook->visitRuns (0, 0x7FFFFFFF, CreateActiveFormat (this));
|
||||
|
||||
if (mNode != NULL)
|
||||
if (mNode != nullptr)
|
||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
i->second->createDrawItem (mNode);
|
||||
}
|
||||
|
@ -1238,7 +1238,7 @@ public:
|
|||
{
|
||||
_checkMargin();
|
||||
|
||||
if (mNode != NULL)
|
||||
if (mNode != nullptr)
|
||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
mNode->outOfDate (i->second->mRenderItem);
|
||||
}
|
||||
|
@ -1247,7 +1247,7 @@ public:
|
|||
{
|
||||
_checkMargin ();
|
||||
|
||||
if (mNode != NULL)
|
||||
if (mNode != nullptr)
|
||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
mNode->outOfDate (i->second->mRenderItem);
|
||||
|
||||
|
@ -1258,7 +1258,7 @@ public:
|
|||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
i->second->destroyDrawItem (mNode);
|
||||
|
||||
mNode = NULL;
|
||||
mNode = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1269,7 +1269,7 @@ MYGUI_RTTI_DERIVED(BookPage)
|
|||
public:
|
||||
|
||||
BookPageImpl()
|
||||
: mPageDisplay(NULL)
|
||||
: mPageDisplay(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -399,12 +399,12 @@ namespace MWGui
|
|||
|
||||
CreateClassDialog::CreateClassDialog()
|
||||
: WindowModal("openmw_chargen_create_class.layout")
|
||||
, mSpecDialog(NULL)
|
||||
, mAttribDialog(NULL)
|
||||
, mSkillDialog(NULL)
|
||||
, mDescDialog(NULL)
|
||||
, mAffectedAttribute(NULL)
|
||||
, mAffectedSkill(NULL)
|
||||
, mSpecDialog(nullptr)
|
||||
, mAttribDialog(nullptr)
|
||||
, mSkillDialog(nullptr)
|
||||
, mDescDialog(nullptr)
|
||||
, mAffectedAttribute(nullptr)
|
||||
, mAffectedSkill(nullptr)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
|
|
@ -37,8 +37,8 @@ namespace MWGui
|
|||
|
||||
CompanionWindow::CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager* manager)
|
||||
: WindowBase("openmw_companion_window.layout")
|
||||
, mSortModel(NULL)
|
||||
, mModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mModel(nullptr)
|
||||
, mSelectedItem(-1)
|
||||
, mDragAndDrop(dragAndDrop)
|
||||
, mMessageBoxManager(manager)
|
||||
|
@ -89,7 +89,7 @@ void CompanionWindow::onItemSelected(int index)
|
|||
dialog->eventOkClicked += MyGUI::newDelegate(this, &CompanionWindow::dragItem);
|
||||
}
|
||||
else
|
||||
dragItem (NULL, count);
|
||||
dragItem (nullptr, count);
|
||||
}
|
||||
|
||||
void CompanionWindow::dragItem(MyGUI::Widget* sender, int count)
|
||||
|
@ -179,9 +179,9 @@ void CompanionWindow::onReferenceUnavailable()
|
|||
void CompanionWindow::resetReference()
|
||||
{
|
||||
ReferenceInterface::resetReference();
|
||||
mItemView->setModel(NULL);
|
||||
mModel = NULL;
|
||||
mSortModel = NULL;
|
||||
mItemView->setModel(nullptr);
|
||||
mModel = nullptr;
|
||||
mSortModel = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ namespace MWGui
|
|||
ContainerWindow::ContainerWindow(DragAndDrop* dragAndDrop)
|
||||
: WindowBase("openmw_container_window.layout")
|
||||
, mDragAndDrop(dragAndDrop)
|
||||
, mSortModel(NULL)
|
||||
, mModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mModel(nullptr)
|
||||
, mSelectedItem(-1)
|
||||
{
|
||||
getWidget(mDisposeCorpseButton, "DisposeCorpseButton");
|
||||
|
@ -83,7 +83,7 @@ namespace MWGui
|
|||
dialog->eventOkClicked += MyGUI::newDelegate(this, &ContainerWindow::dragItem);
|
||||
}
|
||||
else
|
||||
dragItem (NULL, count);
|
||||
dragItem (nullptr, count);
|
||||
}
|
||||
|
||||
void ContainerWindow::dragItem(MyGUI::Widget* sender, int count)
|
||||
|
@ -151,9 +151,9 @@ namespace MWGui
|
|||
void ContainerWindow::resetReference()
|
||||
{
|
||||
ReferenceInterface::resetReference();
|
||||
mItemView->setModel(NULL);
|
||||
mModel = NULL;
|
||||
mSortModel = NULL;
|
||||
mItemView->setModel(nullptr);
|
||||
mModel = nullptr;
|
||||
mSortModel = nullptr;
|
||||
}
|
||||
|
||||
void ContainerWindow::onClose()
|
||||
|
@ -171,7 +171,7 @@ namespace MWGui
|
|||
|
||||
void ContainerWindow::onTakeAllButtonClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
if(mDragAndDrop != NULL && mDragAndDrop->mIsOnDragAndDrop)
|
||||
if(mDragAndDrop != nullptr && mDragAndDrop->mIsOnDragAndDrop)
|
||||
return;
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mCloseButton);
|
||||
|
@ -219,7 +219,7 @@ namespace MWGui
|
|||
|
||||
void ContainerWindow::onDisposeCorpseButtonClicked(MyGUI::Widget *sender)
|
||||
{
|
||||
if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop)
|
||||
if(mDragAndDrop == nullptr || !mDragAndDrop->mIsOnDragAndDrop)
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mCloseButton);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace MWGui
|
|||
|
||||
void CountDialog::onOkButtonClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
eventOkClicked(NULL, mSlider->getScrollPosition()+1);
|
||||
eventOkClicked(nullptr, mSlider->getScrollPosition()+1);
|
||||
|
||||
setVisible(false);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ namespace MWGui
|
|||
// Enter key
|
||||
void CountDialog::onEnterKeyPressed(MyGUI::EditBox* _sender)
|
||||
{
|
||||
eventOkClicked(NULL, mSlider->getScrollPosition()+1);
|
||||
eventOkClicked(nullptr, mSlider->getScrollPosition()+1);
|
||||
setVisible(false);
|
||||
|
||||
// To do not spam onEnterKeyPressed() again and again
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace MWGui
|
|||
|
||||
|
||||
ResourceImageSetPointerFix::ResourceImageSetPointerFix()
|
||||
: mImageSet(NULL)
|
||||
: mImageSet(nullptr)
|
||||
, mRotation(0)
|
||||
{
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ namespace MWGui
|
|||
|
||||
void ResourceImageSetPointerFix::setImage(MyGUI::ImageBox* _image)
|
||||
{
|
||||
if (mImageSet != NULL)
|
||||
if (mImageSet != nullptr)
|
||||
_image->setItemResourceInfo(mImageSet->getIndexInfo(0, 0));
|
||||
}
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ namespace MWGui
|
|||
|
||||
DragAndDrop::DragAndDrop()
|
||||
: mIsOnDragAndDrop(false)
|
||||
, mDraggedWidget(NULL)
|
||||
, mSourceModel(NULL)
|
||||
, mSourceView(NULL)
|
||||
, mSourceSortModel(NULL)
|
||||
, mDraggedWidget(nullptr)
|
||||
, mSourceModel(nullptr)
|
||||
, mSourceView(nullptr)
|
||||
, mSourceSortModel(nullptr)
|
||||
, mDraggedCount(0)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace MWGui
|
|||
EnchantingDialog::EnchantingDialog()
|
||||
: WindowBase("openmw_enchanting_dialog.layout")
|
||||
, EffectEditorBase(EffectEditorBase::Enchanting)
|
||||
, mItemSelectionDialog(NULL)
|
||||
, mItemSelectionDialog(nullptr)
|
||||
{
|
||||
getWidget(mName, "NameEdit");
|
||||
getWidget(mCancelButton, "CancelButton");
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
|||
if (widgets.empty())
|
||||
{
|
||||
MYGUI_ASSERT( ! _throw, "widget name '" << _name << "' not found in skin of layout '" << getName() << "'");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MWGui
|
|||
BookTextParser::BookTextParser(const std::string & text)
|
||||
: 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);
|
||||
|
||||
boost::algorithm::replace_all(mText, "\r", "");
|
||||
|
|
|
@ -70,20 +70,20 @@ namespace MWGui
|
|||
HUD::HUD(CustomMarkerCollection &customMarkers, DragAndDrop* dragAndDrop, MWRender::LocalMap* localMapRender)
|
||||
: WindowBase("openmw_hud.layout")
|
||||
, LocalMapBase(customMarkers, localMapRender, Settings::Manager::getBool("local map hud fog of war", "Map"))
|
||||
, mHealth(NULL)
|
||||
, mMagicka(NULL)
|
||||
, mStamina(NULL)
|
||||
, mDrowning(NULL)
|
||||
, mWeapImage(NULL)
|
||||
, mSpellImage(NULL)
|
||||
, mWeapStatus(NULL)
|
||||
, mSpellStatus(NULL)
|
||||
, mEffectBox(NULL)
|
||||
, mMinimap(NULL)
|
||||
, mCrosshair(NULL)
|
||||
, mCellNameBox(NULL)
|
||||
, mDrowningFrame(NULL)
|
||||
, mDrowningFlash(NULL)
|
||||
, mHealth(nullptr)
|
||||
, mMagicka(nullptr)
|
||||
, mStamina(nullptr)
|
||||
, mDrowning(nullptr)
|
||||
, mWeapImage(nullptr)
|
||||
, mSpellImage(nullptr)
|
||||
, mWeapStatus(nullptr)
|
||||
, mSpellStatus(nullptr)
|
||||
, mEffectBox(nullptr)
|
||||
, mMinimap(nullptr)
|
||||
, mCrosshair(nullptr)
|
||||
, mCellNameBox(nullptr)
|
||||
, mDrowningFrame(nullptr)
|
||||
, mDrowningFlash(nullptr)
|
||||
, mHealthManaStaminaBaseLeft(0)
|
||||
, mWeapBoxBaseLeft(0)
|
||||
, mSpellBoxBaseLeft(0)
|
||||
|
@ -247,7 +247,7 @@ namespace MWGui
|
|||
float mouseY = cursorPosition.top / float(viewSize.height);
|
||||
|
||||
WorldItemModel drop (mouseX, mouseY);
|
||||
mDragAndDrop->drop(&drop, NULL);
|
||||
mDragAndDrop->drop(&drop, nullptr);
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->changePointer("arrow");
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@ namespace MWGui
|
|||
: WindowPinnableBase("openmw_inventory_window.layout")
|
||||
, mDragAndDrop(dragAndDrop)
|
||||
, mSelectedItem(-1)
|
||||
, mSortModel(NULL)
|
||||
, mTradeModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mTradeModel(nullptr)
|
||||
, mGuiMode(GM_Inventory)
|
||||
, mLastXSize(0)
|
||||
, mLastYSize(0)
|
||||
|
@ -157,9 +157,9 @@ namespace MWGui
|
|||
void InventoryWindow::clear()
|
||||
{
|
||||
mPtr = MWWorld::Ptr();
|
||||
mTradeModel = NULL;
|
||||
mSortModel = NULL;
|
||||
mItemView->setModel(NULL);
|
||||
mTradeModel = nullptr;
|
||||
mSortModel = nullptr;
|
||||
mItemView->setModel(nullptr);
|
||||
}
|
||||
|
||||
void InventoryWindow::setGuiMode(GuiMode mode)
|
||||
|
@ -296,9 +296,9 @@ namespace MWGui
|
|||
{
|
||||
mSelectedItem = index;
|
||||
if (mTrading)
|
||||
sellItem (NULL, count);
|
||||
sellItem (nullptr, count);
|
||||
else
|
||||
dragItem (NULL, count);
|
||||
dragItem (nullptr, count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
namespace MWGui
|
||||
{
|
||||
ItemChargeView::ItemChargeView()
|
||||
: mScrollView(NULL),
|
||||
: mScrollView(nullptr),
|
||||
mDisplayMode(DisplayMode_Health)
|
||||
{
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace MWGui
|
|||
Base::initialiseOverride();
|
||||
|
||||
assignWidget(mScrollView, "ScrollView");
|
||||
if (mScrollView == NULL)
|
||||
if (mScrollView == nullptr)
|
||||
throw std::runtime_error("Item charge view needs a scroll view");
|
||||
|
||||
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace MWGui
|
|||
ItemStack::ItemStack()
|
||||
: mType(Type_Normal)
|
||||
, mFlags(0)
|
||||
, mCreator(NULL)
|
||||
, mCreator(nullptr)
|
||||
, mCount(0)
|
||||
{
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ namespace MWGui
|
|||
|
||||
|
||||
ProxyItemModel::ProxyItemModel()
|
||||
: mSourceModel(NULL)
|
||||
: mSourceModel(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ namespace MWGui
|
|||
if (mSourceModel)
|
||||
{
|
||||
delete mSourceModel;
|
||||
mSourceModel = NULL;
|
||||
mSourceModel = nullptr;
|
||||
}
|
||||
|
||||
mSourceModel = sourceModel;
|
||||
|
|
|
@ -12,8 +12,8 @@ namespace MWGui
|
|||
|
||||
ItemSelectionDialog::ItemSelectionDialog(const std::string &label)
|
||||
: WindowModal("openmw_itemselection_dialog.layout")
|
||||
, mSortModel(NULL)
|
||||
, mModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mModel(nullptr)
|
||||
{
|
||||
getWidget(mItemView, "ItemView");
|
||||
mItemView->eventItemClicked += MyGUI::newDelegate(this, &ItemSelectionDialog::onSelectedItem);
|
||||
|
|
|
@ -18,8 +18,8 @@ namespace MWGui
|
|||
{
|
||||
|
||||
ItemView::ItemView()
|
||||
: mModel(NULL)
|
||||
, mScrollView(NULL)
|
||||
: mModel(nullptr)
|
||||
, mScrollView(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ void ItemView::initialiseOverride()
|
|||
Base::initialiseOverride();
|
||||
|
||||
assignWidget(mScrollView, "ScrollView");
|
||||
if (mScrollView == NULL)
|
||||
if (mScrollView == nullptr)
|
||||
throw std::runtime_error("Item view needs a scroll view");
|
||||
|
||||
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
||||
|
|
|
@ -32,10 +32,10 @@ namespace MWGui
|
|||
{
|
||||
|
||||
ItemWidget::ItemWidget()
|
||||
: mItem(NULL)
|
||||
, mItemShadow(NULL)
|
||||
, mFrame(NULL)
|
||||
, mText(NULL)
|
||||
: mItem(nullptr)
|
||||
, mItemShadow(nullptr)
|
||||
, mFrame(nullptr)
|
||||
, mText(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ struct JournalViewModelImpl : JournalViewModel
|
|||
static Utf8Span toUtf8Span (std::string const & str)
|
||||
{
|
||||
if (str.size () == 0)
|
||||
return Utf8Span (Utf8Point (NULL), Utf8Point (NULL));
|
||||
return Utf8Span (Utf8Point (nullptr), Utf8Point (nullptr));
|
||||
|
||||
Utf8Point point = reinterpret_cast <Utf8Point> (str.c_str ());
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ namespace MWGui
|
|||
|
||||
// Callback removes itself when done
|
||||
if (renderInfo.getCurrentCamera())
|
||||
renderInfo.getCurrentCamera()->setInitialDrawCallback(NULL);
|
||||
renderInfo.getCurrentCamera()->setInitialDrawCallback(nullptr);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -208,7 +208,7 @@ namespace MWGui
|
|||
else
|
||||
mImportantLabel = false; // label was already shown on loading screen
|
||||
|
||||
mViewer->getSceneData()->setComputeBoundingSphereCallback(NULL);
|
||||
mViewer->getSceneData()->setComputeBoundingSphereCallback(nullptr);
|
||||
mViewer->getSceneData()->dirtyBound();
|
||||
|
||||
//std::cout << "loading took " << mTimer.time_m() - mLoadingOnTime << std::endl;
|
||||
|
|
|
@ -25,10 +25,10 @@ namespace MWGui
|
|||
: WindowBase("openmw_mainmenu.layout")
|
||||
, mWidth (w), mHeight (h)
|
||||
, mVFS(vfs), mButtonBox(0)
|
||||
, mBackground(NULL)
|
||||
, mVideoBackground(NULL)
|
||||
, mVideo(NULL)
|
||||
, mSaveGameDialog(NULL)
|
||||
, mBackground(nullptr)
|
||||
, mVideoBackground(nullptr)
|
||||
, mVideo(nullptr)
|
||||
, mSaveGameDialog(nullptr)
|
||||
{
|
||||
getWidget(mVersionText, "VersionText");
|
||||
mVersionText->setCaption(versionDescription);
|
||||
|
@ -147,13 +147,13 @@ namespace MWGui
|
|||
if (mVideo && !show)
|
||||
{
|
||||
MyGUI::Gui::getInstance().destroyWidget(mVideoBackground);
|
||||
mVideoBackground = NULL;
|
||||
mVideo = NULL;
|
||||
mVideoBackground = nullptr;
|
||||
mVideo = nullptr;
|
||||
}
|
||||
if (mBackground && !show)
|
||||
{
|
||||
MyGUI::Gui::getInstance().destroyWidget(mBackground);
|
||||
mBackground = NULL;
|
||||
mBackground = nullptr;
|
||||
}
|
||||
|
||||
if (!show)
|
||||
|
|
|
@ -161,8 +161,8 @@ namespace MWGui
|
|||
, mCurX(0)
|
||||
, mCurY(0)
|
||||
, mInterior(false)
|
||||
, mLocalMap(NULL)
|
||||
, mCompass(NULL)
|
||||
, mLocalMap(nullptr)
|
||||
, mCompass(nullptr)
|
||||
, mChanged(true)
|
||||
, mFogOfWarToggled(true)
|
||||
, mFogOfWarEnabled(fogOfWarEnabled)
|
||||
|
@ -388,7 +388,7 @@ namespace MWGui
|
|||
box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||
}
|
||||
else
|
||||
box->setRenderItemTexture(NULL);
|
||||
box->setRenderItemTexture(nullptr);
|
||||
}
|
||||
}
|
||||
mMapTextures.swap(textures);
|
||||
|
@ -598,7 +598,7 @@ namespace MWGui
|
|||
addDetectionMarkers(MWBase::World::Detect_Enchantment);
|
||||
|
||||
// Add marker for the spot marked with Mark magic effect
|
||||
MWWorld::CellStore* markedCell = NULL;
|
||||
MWWorld::CellStore* markedCell = nullptr;
|
||||
ESM::Position markedPosition;
|
||||
MWBase::Environment::get().getWorld()->getPlayer().getMarkedPosition(markedCell, markedPosition);
|
||||
if (markedCell && markedCell->isExterior() == !mInterior
|
||||
|
@ -627,11 +627,11 @@ namespace MWGui
|
|||
, LocalMapBase(customMarkers, localMapRender)
|
||||
, NoDrop(drag, mMainWidget)
|
||||
, mGlobalMap(0)
|
||||
, mGlobalMapImage(NULL)
|
||||
, mGlobalMapOverlay(NULL)
|
||||
, mGlobalMapImage(nullptr)
|
||||
, mGlobalMapOverlay(nullptr)
|
||||
, mGlobal(Settings::Manager::getBool("global", "Map"))
|
||||
, mEventBoxGlobal(NULL)
|
||||
, mEventBoxLocal(NULL)
|
||||
, mEventBoxGlobal(nullptr)
|
||||
, mEventBoxLocal(nullptr)
|
||||
, mGlobalMapRender(new MWRender::GlobalMap(localMapRender->getRoot(), workQueue))
|
||||
, mEditNoteDialog()
|
||||
{
|
||||
|
@ -872,7 +872,7 @@ namespace MWGui
|
|||
|
||||
if (!destNotes.empty())
|
||||
{
|
||||
MarkerUserData data (NULL);
|
||||
MarkerUserData data (nullptr);
|
||||
data.notes = destNotes;
|
||||
data.caption = markerWidget->getUserString("Caption_TextOneLine");
|
||||
markerWidget->setUserData(data);
|
||||
|
|
|
@ -20,8 +20,8 @@ namespace MWGui
|
|||
|
||||
MessageBoxManager::MessageBoxManager (float timePerChar)
|
||||
{
|
||||
mInterMessageBoxe = NULL;
|
||||
mStaticMessageBox = NULL;
|
||||
mInterMessageBoxe = nullptr;
|
||||
mStaticMessageBox = nullptr;
|
||||
mLastButtonPressed = -1;
|
||||
mMessageBoxSpeed = timePerChar;
|
||||
}
|
||||
|
@ -42,14 +42,14 @@ namespace MWGui
|
|||
mInterMessageBoxe->setVisible(false);
|
||||
|
||||
delete mInterMessageBoxe;
|
||||
mInterMessageBoxe = NULL;
|
||||
mInterMessageBoxe = nullptr;
|
||||
}
|
||||
|
||||
std::vector<MessageBox*>::iterator it(mMessageBoxes.begin());
|
||||
for (; it != mMessageBoxes.end(); ++it)
|
||||
{
|
||||
if (*it == mStaticMessageBox)
|
||||
mStaticMessageBox = NULL;
|
||||
mStaticMessageBox = nullptr;
|
||||
delete *it;
|
||||
}
|
||||
mMessageBoxes.clear();
|
||||
|
@ -81,11 +81,11 @@ namespace MWGui
|
|||
++it;
|
||||
}
|
||||
|
||||
if(mInterMessageBoxe != NULL && mInterMessageBoxe->mMarkedToDelete) {
|
||||
if(mInterMessageBoxe != nullptr && mInterMessageBoxe->mMarkedToDelete) {
|
||||
mLastButtonPressed = mInterMessageBoxe->readPressedButton();
|
||||
mInterMessageBoxe->setVisible(false);
|
||||
delete mInterMessageBoxe;
|
||||
mInterMessageBoxe = NULL;
|
||||
mInterMessageBoxe = nullptr;
|
||||
MWBase::Environment::get().getInputManager()->changeInputMode(
|
||||
MWBase::Environment::get().getWindowManager()->isGuiMode());
|
||||
}
|
||||
|
@ -119,17 +119,17 @@ namespace MWGui
|
|||
void MessageBoxManager::removeStaticMessageBox ()
|
||||
{
|
||||
removeMessageBox(mStaticMessageBox);
|
||||
mStaticMessageBox = NULL;
|
||||
mStaticMessageBox = nullptr;
|
||||
}
|
||||
|
||||
bool MessageBoxManager::createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons)
|
||||
{
|
||||
if (mInterMessageBoxe != NULL)
|
||||
if (mInterMessageBoxe != nullptr)
|
||||
{
|
||||
Log(Debug::Warning) << "Warning: replacing an interactive message box that was not answered yet";
|
||||
mInterMessageBoxe->setVisible(false);
|
||||
delete mInterMessageBoxe;
|
||||
mInterMessageBoxe = NULL;
|
||||
mInterMessageBoxe = nullptr;
|
||||
}
|
||||
|
||||
mInterMessageBoxe = new InteractiveMessageBox(*this, message, buttons);
|
||||
|
@ -140,7 +140,7 @@ namespace MWGui
|
|||
|
||||
bool MessageBoxManager::isInteractiveMessageBox ()
|
||||
{
|
||||
return mInterMessageBoxe != NULL;
|
||||
return mInterMessageBoxe != nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -373,7 +373,7 @@ namespace MWGui
|
|||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void InteractiveMessageBox::mousePressed (MyGUI::Widget* pressed)
|
||||
|
|
|
@ -129,10 +129,10 @@ namespace MWGui
|
|||
updateSkills();
|
||||
updateSpellPowers();
|
||||
|
||||
mPreviewImage->setRenderItemTexture(NULL);
|
||||
mPreviewImage->setRenderItemTexture(nullptr);
|
||||
|
||||
mPreview.reset(NULL);
|
||||
mPreviewTexture.reset(NULL);
|
||||
mPreview.reset(nullptr);
|
||||
mPreviewTexture.reset(nullptr);
|
||||
|
||||
mPreview.reset(new MWRender::RaceSelectionPreview(mParent, mResourceSystem));
|
||||
mPreview->rebuild();
|
||||
|
@ -190,10 +190,10 @@ namespace MWGui
|
|||
{
|
||||
WindowModal::onClose();
|
||||
|
||||
mPreviewImage->setRenderItemTexture(NULL);
|
||||
mPreviewImage->setRenderItemTexture(nullptr);
|
||||
|
||||
mPreviewTexture.reset(NULL);
|
||||
mPreview.reset(NULL);
|
||||
mPreviewTexture.reset(nullptr);
|
||||
mPreview.reset(nullptr);
|
||||
}
|
||||
|
||||
// widget controls
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace MWGui
|
|||
|
||||
Recharge::Recharge()
|
||||
: WindowBase("openmw_recharge_dialog.layout")
|
||||
, mItemSelectionDialog(NULL)
|
||||
, mItemSelectionDialog(nullptr)
|
||||
{
|
||||
getWidget(mBox, "Box");
|
||||
getWidget(mGemBox, "GemBox");
|
||||
|
@ -90,7 +90,7 @@ void Recharge::updateView()
|
|||
mBox->update();
|
||||
|
||||
Gui::Box* box = dynamic_cast<Gui::Box*>(mMainWidget);
|
||||
if (box == NULL)
|
||||
if (box == nullptr)
|
||||
throw std::runtime_error("main widget must be a box");
|
||||
|
||||
box->notifyChildrenSizeChanged();
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MWGui
|
|||
|
||||
Repair::Repair()
|
||||
: WindowBase("openmw_repair.layout")
|
||||
, mItemSelectionDialog(NULL)
|
||||
, mItemSelectionDialog(nullptr)
|
||||
{
|
||||
getWidget(mRepairBox, "RepairBox");
|
||||
getWidget(mToolBox, "ToolBox");
|
||||
|
@ -99,7 +99,7 @@ void Repair::updateRepairView()
|
|||
mRepairBox->update();
|
||||
|
||||
Gui::Box* box = dynamic_cast<Gui::Box*>(mMainWidget);
|
||||
if (box == NULL)
|
||||
if (box == nullptr)
|
||||
throw std::runtime_error("main widget must be a box");
|
||||
|
||||
box->notifyChildrenSizeChanged();
|
||||
|
|
|
@ -379,7 +379,7 @@ namespace MWGui
|
|||
// starting spells
|
||||
std::vector<std::string> spells;
|
||||
|
||||
const ESM::Race* race = NULL;
|
||||
const ESM::Race* race = nullptr;
|
||||
if (!mRaceId.empty())
|
||||
race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().find(mRaceId);
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ namespace MWGui
|
|||
SaveGameDialog::SaveGameDialog()
|
||||
: WindowModal("openmw_savegame_dialog.layout")
|
||||
, mSaving(true)
|
||||
, mCurrentCharacter(NULL)
|
||||
, mCurrentSlot(NULL)
|
||||
, mCurrentCharacter(nullptr)
|
||||
, mCurrentSlot(nullptr)
|
||||
{
|
||||
getWidget(mScreenshot, "Screenshot");
|
||||
getWidget(mCharacterSelection, "SelectCharacter");
|
||||
|
@ -99,7 +99,7 @@ namespace MWGui
|
|||
if (mSaveList->getItemCount() == 0)
|
||||
{
|
||||
size_t previousIndex = mCharacterSelection->getIndexSelected();
|
||||
mCurrentCharacter = NULL;
|
||||
mCurrentCharacter = nullptr;
|
||||
mCharacterSelection->removeItemAt(previousIndex);
|
||||
if (mCharacterSelection->getItemCount())
|
||||
{
|
||||
|
@ -146,8 +146,8 @@ namespace MWGui
|
|||
|
||||
mCharacterSelection->setCaption("");
|
||||
mCharacterSelection->removeAllItems();
|
||||
mCurrentCharacter = NULL;
|
||||
mCurrentSlot = NULL;
|
||||
mCurrentCharacter = nullptr;
|
||||
mCurrentSlot = nullptr;
|
||||
mSaveList->removeAllItems();
|
||||
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
|
||||
|
||||
|
@ -250,12 +250,12 @@ namespace MWGui
|
|||
void SaveGameDialog::accept(bool reallySure)
|
||||
{
|
||||
// Remove for MyGUI 3.2.2
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||
|
||||
if (mSaving)
|
||||
{
|
||||
// If overwriting an existing slot, ask for confirmation first
|
||||
if (mCurrentSlot != NULL && !reallySure)
|
||||
if (mCurrentSlot != nullptr && !reallySure)
|
||||
{
|
||||
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
||||
dialog->askForConfirmation("#{sMessage4}");
|
||||
|
@ -318,7 +318,7 @@ namespace MWGui
|
|||
MWBase::StateManager* mgr = MWBase::Environment::get().getStateManager();
|
||||
|
||||
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)
|
||||
{
|
||||
if (i == pos)
|
||||
|
@ -327,7 +327,7 @@ namespace MWGui
|
|||
assert(character && "Can't find selected character");
|
||||
|
||||
mCurrentCharacter = character;
|
||||
mCurrentSlot = NULL;
|
||||
mCurrentSlot = nullptr;
|
||||
fillSaveList();
|
||||
}
|
||||
|
||||
|
@ -379,7 +379,7 @@ namespace MWGui
|
|||
|
||||
if (pos == MyGUI::ITEM_NONE || !mCurrentCharacter)
|
||||
{
|
||||
mCurrentSlot = NULL;
|
||||
mCurrentSlot = nullptr;
|
||||
mInfoText->setCaption("");
|
||||
mScreenshot->setImageTexture("");
|
||||
return;
|
||||
|
@ -388,7 +388,7 @@ namespace MWGui
|
|||
if (mSaving)
|
||||
mSaveNameEdit->setCaption(sender->getItemNameAt(pos));
|
||||
|
||||
mCurrentSlot = NULL;
|
||||
mCurrentSlot = nullptr;
|
||||
unsigned int i=0;
|
||||
for (MWState::Character::SlotIterator it = mCurrentCharacter->begin(); it != mCurrentCharacter->end(); ++it, ++i)
|
||||
{
|
||||
|
@ -404,7 +404,7 @@ namespace MWGui
|
|||
timeinfo = localtime(&time);
|
||||
|
||||
// Use system/environment locale settings for datetime formatting
|
||||
char* oldLctime = setlocale(LC_TIME, NULL);
|
||||
char* oldLctime = setlocale(LC_TIME, nullptr);
|
||||
setlocale(LC_TIME, "");
|
||||
|
||||
const int size=1024;
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace MWGui
|
|||
EditEffectDialog::EditEffectDialog()
|
||||
: WindowModal("openmw_edit_effect.layout")
|
||||
, mEditing(false)
|
||||
, mMagicEffect(NULL)
|
||||
, mMagicEffect(nullptr)
|
||||
, mConstantEffect(false)
|
||||
{
|
||||
init(mEffect);
|
||||
|
@ -481,7 +481,7 @@ namespace MWGui
|
|||
|
||||
mPriceLabel->setCaption(MyGUI::utility::toString(int(price)));
|
||||
|
||||
float chance = MWMechanics::calcSpellBaseSuccessChance(&mSpell, MWMechanics::getPlayer(), NULL);
|
||||
float chance = MWMechanics::calcSpellBaseSuccessChance(&mSpell, MWMechanics::getPlayer(), nullptr);
|
||||
|
||||
int intChance = std::min(100, int(chance));
|
||||
mSuccessChance->setCaption(MyGUI::utility::toString(intChance));
|
||||
|
@ -491,11 +491,11 @@ namespace MWGui
|
|||
|
||||
|
||||
EffectEditorBase::EffectEditorBase(Type type)
|
||||
: mAvailableEffectsList(NULL)
|
||||
, mUsedEffectsView(NULL)
|
||||
: mAvailableEffectsList(nullptr)
|
||||
, mUsedEffectsView(nullptr)
|
||||
, mAddEffectDialog()
|
||||
, mSelectAttributeDialog(NULL)
|
||||
, mSelectSkillDialog(NULL)
|
||||
, mSelectAttributeDialog(nullptr)
|
||||
, mSelectSkillDialog(nullptr)
|
||||
, mSelectedEffect(0)
|
||||
, mSelectedKnownEffectId(0)
|
||||
, mConstantEffect(false)
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace MWGui
|
|||
{
|
||||
newSpell.mType = Spell::Type_Spell;
|
||||
std::string cost = std::to_string(spell->mData.mCost);
|
||||
std::string chance = std::to_string(int(MWMechanics::getSpellSuccessChance(spell, mActor, NULL, true, true)));
|
||||
std::string chance = std::to_string(int(MWMechanics::getSpellSuccessChance(spell, mActor, nullptr, true, true)));
|
||||
newSpell.mCostColumn = cost + "/" + chance;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace MWGui
|
|||
}
|
||||
|
||||
SpellView::SpellView()
|
||||
: mScrollView(NULL)
|
||||
: mScrollView(nullptr)
|
||||
, mShowCostColumn(true)
|
||||
, mHighlightSelected(true)
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ namespace MWGui
|
|||
Base::initialiseOverride();
|
||||
|
||||
assignWidget(mScrollView, "ScrollView");
|
||||
if (mScrollView == NULL)
|
||||
if (mScrollView == nullptr)
|
||||
throw std::runtime_error("Item view needs a scroll view");
|
||||
|
||||
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
||||
|
@ -131,7 +131,7 @@ namespace MWGui
|
|||
mLines.push_back(LineInfo(t, costChance, i));
|
||||
}
|
||||
else
|
||||
mLines.push_back(LineInfo(t, (MyGUI::Widget*)NULL, i));
|
||||
mLines.push_back(LineInfo(t, (MyGUI::Widget*)nullptr, i));
|
||||
|
||||
t->setStateSelected(spell.mSelected);
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ namespace MWGui
|
|||
{
|
||||
maxSpellIndexFound = spellIndex;
|
||||
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);
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ namespace MWGui
|
|||
MyGUI::IntCoord(0, 0, mScrollView->getWidth(), 18),
|
||||
MyGUI::Align::Left | MyGUI::Align::Top);
|
||||
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<Gui::TextBox>("SandBrightText",
|
||||
|
@ -260,7 +260,7 @@ namespace MWGui
|
|||
mLines.push_back(LineInfo(groupWidget, groupWidget2, NoSpellIndex));
|
||||
}
|
||||
else
|
||||
mLines.push_back(LineInfo(groupWidget, (MyGUI::Widget*)NULL, NoSpellIndex));
|
||||
mLines.push_back(LineInfo(groupWidget, (MyGUI::Widget*)nullptr, NoSpellIndex));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace MWGui
|
|||
SpellWindow::SpellWindow(DragAndDrop* drag)
|
||||
: WindowPinnableBase("openmw_spell_window.layout")
|
||||
, NoDrop(drag, mMainWidget)
|
||||
, mSpellView(NULL)
|
||||
, mSpellView(nullptr)
|
||||
, mUpdateTimer(0.0f)
|
||||
{
|
||||
mSpellIcons = new SpellIcons();
|
||||
|
@ -72,7 +72,7 @@ namespace MWGui
|
|||
// Reset the filter focus when opening the window
|
||||
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
||||
if (focus == mFilterEdit)
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||
|
||||
updateSpells();
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace MWGui
|
|||
StatsWindow::StatsWindow (DragAndDrop* drag)
|
||||
: WindowPinnableBase("openmw_stats_window.layout")
|
||||
, NoDrop(drag, mMainWidget)
|
||||
, mSkillView(NULL)
|
||||
, mSkillView(nullptr)
|
||||
, mMajorSkills()
|
||||
, mMinorSkills()
|
||||
, mMiscSkills()
|
||||
|
@ -68,7 +68,7 @@ namespace MWGui
|
|||
for (int i = 0; i < ESM::Skill::Length; ++i)
|
||||
{
|
||||
mSkillValues.insert(std::make_pair(i, MWMechanics::SkillValue()));
|
||||
mSkillWidgetMap.insert(std::make_pair(i, std::make_pair((MyGUI::TextBox*)NULL, (MyGUI::TextBox*)NULL)));
|
||||
mSkillWidgetMap.insert(std::make_pair(i, std::make_pair((MyGUI::TextBox*)nullptr, (MyGUI::TextBox*)nullptr)));
|
||||
}
|
||||
|
||||
MyGUI::Window* t = mMainWidget->castType<MyGUI::Window>();
|
||||
|
|
|
@ -50,8 +50,8 @@ namespace MWGui
|
|||
|
||||
TradeWindow::TradeWindow()
|
||||
: WindowBase("openmw_trade_window.layout")
|
||||
, mSortModel(NULL)
|
||||
, mTradeModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mTradeModel(nullptr)
|
||||
, mItemToSell(-1)
|
||||
, mCurrentBalance(0)
|
||||
, mCurrentMerchantOffer(0)
|
||||
|
@ -205,7 +205,7 @@ namespace MWGui
|
|||
else
|
||||
{
|
||||
mItemToSell = mSortModel->mapToSource(index);
|
||||
sellItem (NULL, count);
|
||||
sellItem (nullptr, count);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -514,8 +514,8 @@ namespace MWGui
|
|||
void TradeWindow::resetReference()
|
||||
{
|
||||
ReferenceInterface::resetReference();
|
||||
mItemView->setModel(NULL);
|
||||
mTradeModel = NULL;
|
||||
mSortModel = NULL;
|
||||
mItemView->setModel(nullptr);
|
||||
mTradeModel = nullptr;
|
||||
mSortModel = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace MWGui
|
|||
{
|
||||
|
||||
VideoWidget::VideoWidget()
|
||||
: mVFS(NULL)
|
||||
: mVFS(nullptr)
|
||||
{
|
||||
mPlayer.reset(new Video::VideoPlayer());
|
||||
setNeedKeyFocus(true);
|
||||
|
|
|
@ -281,7 +281,7 @@ namespace MWGui
|
|||
mSleeping = canRest;
|
||||
|
||||
Gui::Box* box = dynamic_cast<Gui::Box*>(mMainWidget);
|
||||
if (box == NULL)
|
||||
if (box == nullptr)
|
||||
throw std::runtime_error("main widget must be a box");
|
||||
box->notifyChildrenSizeChanged();
|
||||
center();
|
||||
|
|
|
@ -23,8 +23,8 @@ namespace MWGui
|
|||
|
||||
MWSkill::MWSkill()
|
||||
: mSkillId(ESM::Skill::Length)
|
||||
, mSkillNameWidget(NULL)
|
||||
, mSkillValueWidget(NULL)
|
||||
, mSkillNameWidget(nullptr)
|
||||
, mSkillValueWidget(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -114,8 +114,8 @@ namespace MWGui
|
|||
|
||||
MWAttribute::MWAttribute()
|
||||
: mId(-1)
|
||||
, mAttributeNameWidget(NULL)
|
||||
, mAttributeValueWidget(NULL)
|
||||
, mAttributeNameWidget(nullptr)
|
||||
, mAttributeValueWidget(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ namespace MWGui
|
|||
/* 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
|
||||
// 2 steps: first, create all widgets and check their width....
|
||||
MWSpellEffectPtr effect = NULL;
|
||||
MWSpellEffectPtr effect = nullptr;
|
||||
int maxwidth = coord.width;
|
||||
|
||||
for (SpellEffectList::iterator it=mEffectList.begin();
|
||||
|
@ -359,8 +359,8 @@ namespace MWGui
|
|||
/* MWSpellEffect */
|
||||
|
||||
MWSpellEffect::MWSpellEffect()
|
||||
: mImageWidget(NULL)
|
||||
, mTextWidget(NULL)
|
||||
: mImageWidget(nullptr)
|
||||
, mTextWidget(nullptr)
|
||||
, mRequestedWidth(0)
|
||||
{
|
||||
}
|
||||
|
@ -489,9 +489,9 @@ namespace MWGui
|
|||
MWDynamicStat::MWDynamicStat()
|
||||
: mValue(0)
|
||||
, mMax(1)
|
||||
, mTextWidget(NULL)
|
||||
, mBarWidget(NULL)
|
||||
, mBarTextWidget(NULL)
|
||||
, mTextWidget(nullptr)
|
||||
, mBarWidget(nullptr)
|
||||
, mBarTextWidget(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -33,11 +33,11 @@ void WindowBase::setVisible(bool visible)
|
|||
if (!visible)
|
||||
{
|
||||
MyGUI::Widget* keyFocus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
||||
while (keyFocus != mMainWidget && keyFocus != NULL)
|
||||
while (keyFocus != mMainWidget && keyFocus != nullptr)
|
||||
keyFocus = keyFocus->getParent();
|
||||
|
||||
if (keyFocus == mMainWidget)
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace MWGui
|
|||
public:
|
||||
WindowBase(const std::string& parLayout);
|
||||
|
||||
virtual MyGUI::Widget* getDefaultKeyFocus() { return NULL; }
|
||||
virtual MyGUI::Widget* getDefaultKeyFocus() { return nullptr; }
|
||||
|
||||
// Events
|
||||
typedef MyGUI::delegates::CMultiDelegate1<WindowBase*> EventHandle_WindowBase;
|
||||
|
|
|
@ -134,44 +134,44 @@ namespace MWGui
|
|||
osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::ResourceSystem* resourceSystem, SceneUtil::WorkQueue* workQueue,
|
||||
const std::string& logpath, const std::string& resourcePath, bool consoleOnlyScripts, Translation::Storage& translationDataStorage,
|
||||
ToUTF8::FromType encoding, bool exportFonts, const std::map<std::string, std::string>& fallbackMap, const std::string& versionDescription, const std::string& userDataPath)
|
||||
: mStore(NULL)
|
||||
: mStore(nullptr)
|
||||
, mResourceSystem(resourceSystem)
|
||||
, mWorkQueue(workQueue)
|
||||
, mViewer(viewer)
|
||||
, mConsoleOnlyScripts(consoleOnlyScripts)
|
||||
, mCurrentModals()
|
||||
, mHud(NULL)
|
||||
, mMap(NULL)
|
||||
, mLocalMapRender(NULL)
|
||||
, mToolTips(NULL)
|
||||
, mStatsWindow(NULL)
|
||||
, mMessageBoxManager(NULL)
|
||||
, mConsole(NULL)
|
||||
, mDialogueWindow(NULL)
|
||||
, mDragAndDrop(NULL)
|
||||
, mInventoryWindow(NULL)
|
||||
, mScrollWindow(NULL)
|
||||
, mBookWindow(NULL)
|
||||
, mCountDialog(NULL)
|
||||
, mTradeWindow(NULL)
|
||||
, mSettingsWindow(NULL)
|
||||
, mConfirmationDialog(NULL)
|
||||
, mSpellWindow(NULL)
|
||||
, mQuickKeysMenu(NULL)
|
||||
, mLoadingScreen(NULL)
|
||||
, mWaitDialog(NULL)
|
||||
, mSoulgemDialog(NULL)
|
||||
, mVideoBackground(NULL)
|
||||
, mVideoWidget(NULL)
|
||||
, mWerewolfFader(NULL)
|
||||
, mBlindnessFader(NULL)
|
||||
, mHitFader(NULL)
|
||||
, mScreenFader(NULL)
|
||||
, mDebugWindow(NULL)
|
||||
, mJailScreen(NULL)
|
||||
, mHud(nullptr)
|
||||
, mMap(nullptr)
|
||||
, mLocalMapRender(nullptr)
|
||||
, mToolTips(nullptr)
|
||||
, mStatsWindow(nullptr)
|
||||
, mMessageBoxManager(nullptr)
|
||||
, mConsole(nullptr)
|
||||
, mDialogueWindow(nullptr)
|
||||
, mDragAndDrop(nullptr)
|
||||
, mInventoryWindow(nullptr)
|
||||
, mScrollWindow(nullptr)
|
||||
, mBookWindow(nullptr)
|
||||
, mCountDialog(nullptr)
|
||||
, mTradeWindow(nullptr)
|
||||
, mSettingsWindow(nullptr)
|
||||
, mConfirmationDialog(nullptr)
|
||||
, mSpellWindow(nullptr)
|
||||
, mQuickKeysMenu(nullptr)
|
||||
, mLoadingScreen(nullptr)
|
||||
, mWaitDialog(nullptr)
|
||||
, mSoulgemDialog(nullptr)
|
||||
, mVideoBackground(nullptr)
|
||||
, mVideoWidget(nullptr)
|
||||
, mWerewolfFader(nullptr)
|
||||
, mBlindnessFader(nullptr)
|
||||
, mHitFader(nullptr)
|
||||
, mScreenFader(nullptr)
|
||||
, mDebugWindow(nullptr)
|
||||
, mJailScreen(nullptr)
|
||||
, mTranslationDataStorage (translationDataStorage)
|
||||
, mCharGen(NULL)
|
||||
, mInputBlocker(NULL)
|
||||
, mCharGen(nullptr)
|
||||
, mInputBlocker(nullptr)
|
||||
, mCrosshairEnabled(Settings::Manager::getBool ("crosshair", "HUD"))
|
||||
, mSubtitlesEnabled(Settings::Manager::getBool ("subtitles", "GUI"))
|
||||
, mHitFaderEnabled(Settings::Manager::getBool ("hit fader", "GUI"))
|
||||
|
@ -185,9 +185,9 @@ namespace MWGui
|
|||
, mPlayerMajorSkills()
|
||||
, mPlayerMinorSkills()
|
||||
, mPlayerSkillValues()
|
||||
, mGui(NULL)
|
||||
, mGui(nullptr)
|
||||
, mGuiModes()
|
||||
, mCursorManager(NULL)
|
||||
, mCursorManager(nullptr)
|
||||
, mGarbageDialogs()
|
||||
, mShown(GW_ALL)
|
||||
, mForceHidden(GW_None)
|
||||
|
@ -704,7 +704,7 @@ namespace MWGui
|
|||
setCursorVisible(!gameMode);
|
||||
|
||||
if (gameMode)
|
||||
setKeyFocusWidget (NULL);
|
||||
setKeyFocusWidget (nullptr);
|
||||
|
||||
// Icons of forced hidden windows are displayed
|
||||
setMinimapVisibility((mAllowed & GW_Map) && (!mMap->pinned() || (mForceHidden & GW_Map)));
|
||||
|
@ -1651,7 +1651,7 @@ namespace MWGui
|
|||
// Remove this method for MyGUI 3.2.2
|
||||
void WindowManager::setKeyFocusWidget(MyGUI::Widget *widget)
|
||||
{
|
||||
if (widget == NULL)
|
||||
if (widget == nullptr)
|
||||
MyGUI::InputManager::getInstance().resetKeyFocusWidget();
|
||||
else
|
||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(widget);
|
||||
|
@ -1913,7 +1913,7 @@ namespace MWGui
|
|||
}
|
||||
if (mCurrentModals.empty())
|
||||
{
|
||||
mKeyboardNavigation->setModalWindow(NULL);
|
||||
mKeyboardNavigation->setModalWindow(nullptr);
|
||||
mKeyboardNavigation->restoreFocus(getMode());
|
||||
}
|
||||
else
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
|||
|
||||
mPinButton->eventMouseButtonPressed += MyGUI::newDelegate(this, &WindowPinnableBase::onPinButtonPressed);
|
||||
|
||||
MyGUI::Button* button = NULL;
|
||||
MyGUI::Button* button = nullptr;
|
||||
MyGUI::VectorWidgetPtr widgets = window->getSkinWidgetsByName("Action");
|
||||
for (MyGUI::VectorWidgetPtr::iterator it = widgets.begin(); it != widgets.end(); ++it)
|
||||
{
|
||||
|
|
|
@ -46,9 +46,9 @@ namespace MWInput
|
|||
, mScreenCaptureHandler(screenCaptureHandler)
|
||||
, mScreenCaptureOperation(screenCaptureOperation)
|
||||
, mJoystickLastUsed(false)
|
||||
, mPlayer(NULL)
|
||||
, mInputManager(NULL)
|
||||
, mVideoWrapper(NULL)
|
||||
, mPlayer(nullptr)
|
||||
, mInputManager(nullptr)
|
||||
, mVideoWrapper(nullptr)
|
||||
, mUserFile(userFile)
|
||||
, mDragDrop(false)
|
||||
, mGrabCursor (Settings::Manager::getBool("grab cursor", "Input"))
|
||||
|
@ -84,7 +84,7 @@ namespace MWInput
|
|||
Settings::Manager::getFloat("contrast", "Video"));
|
||||
|
||||
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();
|
||||
loadControllerDefaults();
|
||||
|
|
|
@ -1420,7 +1420,7 @@ namespace MWMechanics
|
|||
iter->second->getCharacterController()->updateContinuousVfx();
|
||||
|
||||
// Animation/movement update
|
||||
CharacterController* playerCharacter = NULL;
|
||||
CharacterController* playerCharacter = nullptr;
|
||||
for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter)
|
||||
{
|
||||
const float animationDistance = aiProcessingDistance + 400; // Slightly larger than AI distance so there is time to switch back to the idle animation.
|
||||
|
@ -1987,7 +1987,7 @@ namespace MWMechanics
|
|||
for (; it != mActors.end(); ++it)
|
||||
{
|
||||
delete it->second;
|
||||
it->second = NULL;
|
||||
it->second = nullptr;
|
||||
}
|
||||
mActors.clear();
|
||||
mDeathCount.clear();
|
||||
|
|
|
@ -586,7 +586,7 @@ std::string chooseBestAttack(const ESM::Weapon* weapon)
|
|||
{
|
||||
std::string attackType;
|
||||
|
||||
if (weapon != NULL)
|
||||
if (weapon != nullptr)
|
||||
{
|
||||
//the more damage attackType deals the more probability it has
|
||||
int slash = (weapon->mData.mSlash[0] + weapon->mData.mSlash[1])/2;
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace MWMechanics
|
|||
mAttackRange(0.0f),
|
||||
mCombatMove(false),
|
||||
mLastTargetPos(0,0,0),
|
||||
mCell(NULL),
|
||||
mCell(nullptr),
|
||||
mCurrentAction(),
|
||||
mActionCooldown(0.0f),
|
||||
mStrength(),
|
||||
|
|
|
@ -138,7 +138,7 @@ namespace MWMechanics
|
|||
const ESM::Weapon* ActionWeapon::getWeapon() const
|
||||
{
|
||||
if (mWeapon.isEmpty())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return mWeapon.get<ESM::Weapon>()->mBase;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace MWMechanics
|
|||
virtual void prepare(const MWWorld::Ptr& actor) = 0;
|
||||
virtual float getCombatRange (bool& isRanged) const = 0;
|
||||
virtual float getActionCooldown() { return 0.f; }
|
||||
virtual const ESM::Weapon* getWeapon() const { return NULL; };
|
||||
virtual const ESM::Weapon* getWeapon() const { return nullptr; };
|
||||
virtual bool isAttackingOrSpell() const { return true; }
|
||||
virtual bool isFleeing() const { return false; }
|
||||
};
|
||||
|
|
|
@ -275,7 +275,7 @@ bool MWMechanics::AiPackage::shortcutPath(const ESM::Pathgrid::Point& startPoint
|
|||
static_cast<float>(startPoint.mX), static_cast<float>(startPoint.mY), static_cast<float>(startPoint.mZ),
|
||||
static_cast<float>(endPoint.mX), static_cast<float>(endPoint.mY), static_cast<float>(endPoint.mZ));
|
||||
|
||||
if (destInLOS != NULL) *destInLOS = isPathClear;
|
||||
if (destInLOS != nullptr) *destInLOS = isPathClear;
|
||||
|
||||
if (!isPathClear)
|
||||
return false;
|
||||
|
|
|
@ -114,7 +114,7 @@ namespace MWMechanics
|
|||
|
||||
/// Check if there aren't any obstacles along the path to make shortcut possible
|
||||
/// If a shortcut is possible then path will be cleared and filled with the destination point.
|
||||
/// \param destInLOS If not NULL function will return ray cast check result
|
||||
/// \param destInLOS If not nullptr function will return ray cast check result
|
||||
/// \return If can shortcut the path
|
||||
bool shortcutPath(const ESM::Pathgrid::Point& startPoint, const ESM::Pathgrid::Point& endPoint, const MWWorld::Ptr& actor, bool *destInLOS, bool isPathClear);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace MWMechanics
|
|||
|
||||
bool empty() const
|
||||
{
|
||||
return mStorage == NULL;
|
||||
return mStorage == nullptr;
|
||||
}
|
||||
|
||||
const std::type_info& getType() const
|
||||
|
@ -67,16 +67,12 @@ namespace MWMechanics
|
|||
return typeid(mStorage);
|
||||
}
|
||||
|
||||
|
||||
DerivedClassStorage():mStorage(NULL){}
|
||||
DerivedClassStorage():mStorage(nullptr){}
|
||||
~DerivedClassStorage()
|
||||
{
|
||||
if(mStorage)
|
||||
delete mStorage;
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace MWMechanics
|
|||
mReaction(0),
|
||||
mSaidGreeting(Greet_None),
|
||||
mGreetingTimer(0),
|
||||
mCell(NULL),
|
||||
mCell(nullptr),
|
||||
mState(Wander_ChooseAction),
|
||||
mIsWanderingManually(false),
|
||||
mCanWanderAlongPathGrid(true),
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace MWMechanics
|
|||
|
||||
float baseMagicka = fPCbaseMagickaMult * actorAttributes[ESM::Attribute::Intelligence];
|
||||
bool reachedLimit = false;
|
||||
const ESM::Spell* weakestSpell = NULL;
|
||||
const ESM::Spell* weakestSpell = nullptr;
|
||||
int minCost = std::numeric_limits<int>::max();
|
||||
|
||||
std::vector<std::string> selectedSpells;
|
||||
|
|
|
@ -931,7 +931,7 @@ CharacterController::~CharacterController()
|
|||
if (mAnimation)
|
||||
{
|
||||
persistAnimationState();
|
||||
mAnimation->setTextKeyListener(NULL);
|
||||
mAnimation->setTextKeyListener(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1159,7 @@ bool CharacterController::updateCreatureState()
|
|||
|
||||
if (!spellid.empty() && canCast)
|
||||
{
|
||||
MWMechanics::CastSpell cast(mPtr, NULL, false, mCastingManualSpell);
|
||||
MWMechanics::CastSpell cast(mPtr, nullptr, false, mCastingManualSpell);
|
||||
cast.playSpellCastingEffects(spellid);
|
||||
|
||||
if (!mAnimation->hasAnimation("spellcast"))
|
||||
|
@ -1463,7 +1463,7 @@ bool CharacterController::updateWeaponState(CharacterState& idle)
|
|||
|
||||
if(!spellid.empty() && canCast)
|
||||
{
|
||||
MWMechanics::CastSpell cast(mPtr, NULL, false, mCastingManualSpell);
|
||||
MWMechanics::CastSpell cast(mPtr, nullptr, false, mCastingManualSpell);
|
||||
cast.playSpellCastingEffects(spellid);
|
||||
|
||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||
|
@ -2306,7 +2306,7 @@ void CharacterController::persistAnimationState()
|
|||
{
|
||||
anim.mLoopCount = mAnimation->getCurrentLoopCount(anim.mGroup);
|
||||
float complete;
|
||||
mAnimation->getInfo(anim.mGroup, &complete, NULL);
|
||||
mAnimation->getInfo(anim.mGroup, &complete, nullptr);
|
||||
anim.mTime = complete;
|
||||
}
|
||||
else
|
||||
|
@ -2438,7 +2438,7 @@ bool CharacterController::isPersistentAnimPlaying()
|
|||
|
||||
bool CharacterController::isAnimPlaying(const std::string &groupName)
|
||||
{
|
||||
if(mAnimation == NULL)
|
||||
if(mAnimation == nullptr)
|
||||
return false;
|
||||
return mAnimation->isPlaying(groupName);
|
||||
}
|
||||
|
@ -2735,9 +2735,9 @@ void CharacterController::updateHeadTracking(float duration)
|
|||
if (const MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(mHeadTrackTarget))
|
||||
{
|
||||
const osg::Node* node = anim->getNode("Head");
|
||||
if (node == NULL)
|
||||
if (node == nullptr)
|
||||
node = anim->getNode("Bip01 Head");
|
||||
if (node != NULL)
|
||||
if (node != nullptr)
|
||||
{
|
||||
nodepaths = node->getParentalNodePaths();
|
||||
if (!nodepaths.empty())
|
||||
|
|
|
@ -240,8 +240,8 @@ class CharacterController : public MWRender::Animation::TextKeyListener
|
|||
void playRandomDeath(float startpoint = 0.0f);
|
||||
|
||||
/// choose a random animation group with \a prefix and numeric suffix
|
||||
/// @param num if non-NULL, the chosen animation number will be written here
|
||||
std::string chooseRandomGroup (const std::string& prefix, int* num = NULL) const;
|
||||
/// @param num if non-nullptr, the chosen animation number will be written here
|
||||
std::string chooseRandomGroup (const std::string& prefix, int* num = nullptr) const;
|
||||
|
||||
bool updateCarriedLeftVisible(WeaponType weaptype) const;
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace MWMechanics
|
|||
}
|
||||
|
||||
// F_PCStart spells
|
||||
const ESM::Race* race = NULL;
|
||||
const ESM::Race* race = nullptr;
|
||||
if (mRaceSelected)
|
||||
race = esmStore.get<ESM::Race>().find(player->mRace);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Objects::~Objects()
|
|||
for (; it != mObjects.end();++it)
|
||||
{
|
||||
delete it->second;
|
||||
it->second = NULL;
|
||||
it->second = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace MWMechanics
|
|||
bool proximityToDoor(const MWWorld::Ptr& actor, float minDist);
|
||||
|
||||
/// Returns door pointer within range. No guarantee is given as to which one
|
||||
/** \return Pointer to the door, or NULL if none exists **/
|
||||
/** \return Pointer to the door, or empty pointer if none exists **/
|
||||
const MWWorld::Ptr getNearbyDoor(const MWWorld::Ptr& actor, float minDist);
|
||||
|
||||
class ObstacleCheck
|
||||
|
|
|
@ -120,8 +120,8 @@ namespace MWMechanics
|
|||
}
|
||||
|
||||
PathFinder::PathFinder()
|
||||
: mPathgrid(NULL)
|
||||
, mCell(NULL)
|
||||
: mPathgrid(nullptr)
|
||||
, mCell(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue