mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-25 16:43:33 +00:00
Merged pull request #1960
This commit is contained in:
commit
38a3632be7
@ -22,7 +22,7 @@ CS::Editor::Editor (int argc, char **argv)
|
|||||||
: mSettingsState (mCfgMgr), mDocumentManager (mCfgMgr),
|
: mSettingsState (mCfgMgr), mDocumentManager (mCfgMgr),
|
||||||
mViewManager (mDocumentManager), mPid(""),
|
mViewManager (mDocumentManager), mPid(""),
|
||||||
mLock(), mMerge (mDocumentManager),
|
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();
|
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig();
|
||||||
|
|
||||||
@ -339,7 +339,7 @@ bool CS::Editor::makeIPCServer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
mServer->close();
|
mServer->close();
|
||||||
mServer = NULL;
|
mServer = nullptr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "operation.hpp"
|
#include "operation.hpp"
|
||||||
|
|
||||||
CSMDoc::OperationHolder::OperationHolder (Operation *operation)
|
CSMDoc::OperationHolder::OperationHolder (Operation *operation)
|
||||||
: mOperation(NULL)
|
: mOperation(nullptr)
|
||||||
, mRunning (false)
|
, mRunning (false)
|
||||||
{
|
{
|
||||||
if (operation)
|
if (operation)
|
||||||
|
@ -318,7 +318,7 @@ namespace CSMWorld
|
|||||||
|
|
||||||
QVariant BodyPartRaceColumn::get(const Record<ESM::BodyPart> &record) const
|
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());
|
return QString::fromUtf8(record.get().mRace.c_str());
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,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");
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,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)
|
||||||
|
@ -18,7 +18,7 @@ namespace
|
|||||||
|
|
||||||
void CSMWorld::IdTableProxyModel::updateColumnMap()
|
void CSMWorld::IdTableProxyModel::updateColumnMap()
|
||||||
{
|
{
|
||||||
Q_ASSERT(mSourceModel != NULL);
|
Q_ASSERT(mSourceModel != nullptr);
|
||||||
|
|
||||||
mColumnMap.clear();
|
mColumnMap.clear();
|
||||||
if (mFilter)
|
if (mFilter)
|
||||||
@ -33,7 +33,7 @@ void CSMWorld::IdTableProxyModel::updateColumnMap()
|
|||||||
bool CSMWorld::IdTableProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent)
|
bool CSMWorld::IdTableProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent)
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
Q_ASSERT(mSourceModel != NULL);
|
Q_ASSERT(mSourceModel != nullptr);
|
||||||
|
|
||||||
// It is not possible to use filterAcceptsColumn() and check for
|
// It is not possible to use filterAcceptsColumn() and check for
|
||||||
// sourceModel()->headerData (sourceColumn, Qt::Horizontal, CSMWorld::ColumnBase::Role_Flags)
|
// 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)
|
CSMWorld::IdTableProxyModel::IdTableProxyModel (QObject *parent)
|
||||||
: QSortFilterProxyModel (parent),
|
: QSortFilterProxyModel (parent),
|
||||||
mSourceModel(NULL)
|
mSourceModel(nullptr)
|
||||||
{
|
{
|
||||||
setSortCaseSensitivity (Qt::CaseInsensitive);
|
setSortCaseSensitivity (Qt::CaseInsensitive);
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex CSMWorld::IdTableProxyModel::getModelIndex (const std::string& id, int column) const
|
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));
|
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
|
QString CSMWorld::IdTableProxyModel::getRecordId(int sourceRow) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(mSourceModel != NULL);
|
Q_ASSERT(mSourceModel != nullptr);
|
||||||
|
|
||||||
int idColumn = mSourceModel->findColumnIndex(Columns::ColumnId_Id);
|
int idColumn = mSourceModel->findColumnIndex(Columns::ColumnId_Id);
|
||||||
return mSourceModel->data(mSourceModel->index(sourceRow, idColumn)).toString();
|
return mSourceModel->data(mSourceModel->index(sourceRow, idColumn)).toString();
|
||||||
|
@ -28,7 +28,7 @@ void CSMWorld::InfoTableProxyModel::setSourceModel(QAbstractItemModel *sourceMod
|
|||||||
{
|
{
|
||||||
IdTableProxyModel::setSourceModel(sourceModel);
|
IdTableProxyModel::setSourceModel(sourceModel);
|
||||||
|
|
||||||
if (mSourceModel != NULL)
|
if (mSourceModel != nullptr)
|
||||||
{
|
{
|
||||||
mInfoColumnIndex = mSourceModel->findColumnIndex(mInfoColumnId);
|
mInfoColumnIndex = mSourceModel->findColumnIndex(mInfoColumnId);
|
||||||
mFirstRowCache.clear();
|
mFirstRowCache.clear();
|
||||||
@ -37,7 +37,7 @@ void CSMWorld::InfoTableProxyModel::setSourceModel(QAbstractItemModel *sourceMod
|
|||||||
|
|
||||||
bool CSMWorld::InfoTableProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
|
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 first = mSourceModel->index(getFirstInfoRow(left.row()), left.column());
|
||||||
QModelIndex second = mSourceModel->index(getFirstInfoRow(right.row()), right.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
|
int CSMWorld::InfoTableProxyModel::getFirstInfoRow(int currentRow) const
|
||||||
{
|
{
|
||||||
Q_ASSERT(mSourceModel != NULL);
|
Q_ASSERT(mSourceModel != nullptr);
|
||||||
|
|
||||||
int row = currentRow;
|
int row = currentRow;
|
||||||
int column = mInfoColumnIndex;
|
int column = mInfoColumnIndex;
|
||||||
|
@ -453,13 +453,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),
|
||||||
mScale(NULL),
|
mScale(nullptr),
|
||||||
mOriginal(NULL),
|
mOriginal(nullptr),
|
||||||
mAttributes(NULL),
|
mAttributes(nullptr),
|
||||||
mAttacks(NULL),
|
mAttacks(nullptr),
|
||||||
mMisc(NULL),
|
mMisc(nullptr),
|
||||||
mBloodType(NULL)
|
mBloodType(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CSMWorld::CreatureRefIdAdapter::CreatureRefIdAdapter (const CreatureColumns& columns)
|
CSMWorld::CreatureRefIdAdapter::CreatureRefIdAdapter (const CreatureColumns& columns)
|
||||||
@ -748,16 +748,16 @@ 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),
|
||||||
mBloodType(NULL),
|
mBloodType(nullptr),
|
||||||
mGender(NULL)
|
mGender(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CSMWorld::NpcRefIdAdapter::NpcRefIdAdapter (const NpcColumns& columns)
|
CSMWorld::NpcRefIdAdapter::NpcRefIdAdapter (const NpcColumns& columns)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
CSMWorld::ResourcesManager::ResourcesManager()
|
CSMWorld::ResourcesManager::ResourcesManager()
|
||||||
: mVFS(NULL)
|
: mVFS(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ void CSVDoc::FileDialog::slotRejected()
|
|||||||
if(mFileWidget)
|
if(mFileWidget)
|
||||||
{
|
{
|
||||||
delete mFileWidget;
|
delete mFileWidget;
|
||||||
mFileWidget = NULL;
|
mFileWidget = nullptr;
|
||||||
}
|
}
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
@ -200,7 +200,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();
|
||||||
|
@ -64,7 +64,7 @@ namespace CSVDoc
|
|||||||
|
|
||||||
void updateTitle();
|
void updateTitle();
|
||||||
|
|
||||||
void updateSubViewIndices (SubView *view = NULL);
|
void updateSubViewIndices (SubView *view = nullptr);
|
||||||
|
|
||||||
void universalIdChanged (const CSMWorld::UniversalId& universalId);
|
void universalIdChanged (const CSMWorld::UniversalId& universalId);
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ void CSVDoc::View::updateSubViewIndices(SubView *view)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
delete subView->titleBarWidget();
|
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)
|
CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews)
|
||||||
: mViewManager (viewManager), mDocument (document), mViewIndex (totalViews-1),
|
: 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"];
|
CSMPrefs::Category& windows = CSMPrefs::State::get()["Windows"];
|
||||||
|
|
||||||
@ -563,7 +563,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);
|
||||||
@ -631,7 +631,7 @@ void CSVDoc::View::moveScrollBarToEnd(int min, int max)
|
|||||||
void CSVDoc::View::settingChanged (const CSMPrefs::Setting *setting)
|
void CSVDoc::View::settingChanged (const CSMPrefs::Setting *setting)
|
||||||
{
|
{
|
||||||
if (*setting=="Windows/hide-subview")
|
if (*setting=="Windows/hide-subview")
|
||||||
updateSubViewIndices (NULL);
|
updateSubViewIndices (nullptr);
|
||||||
else if (*setting=="Windows/mainwindow-scrollbar")
|
else if (*setting=="Windows/mainwindow-scrollbar")
|
||||||
{
|
{
|
||||||
if (setting->toString()!="Grow Only")
|
if (setting->toString()!="Grow Only")
|
||||||
@ -659,7 +659,7 @@ void CSVDoc::View::settingChanged (const CSMPrefs::Setting *setting)
|
|||||||
mScroll->takeWidget();
|
mScroll->takeWidget();
|
||||||
setCentralWidget (&mSubViewWindow);
|
setCentralWidget (&mSubViewWindow);
|
||||||
mScroll->deleteLater();
|
mScroll->deleteLater();
|
||||||
mScroll = NULL;
|
mScroll = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ namespace CSVDoc
|
|||||||
void updateTitle();
|
void updateTitle();
|
||||||
|
|
||||||
// called when subviews are added or removed
|
// called when subviews are added or removed
|
||||||
void updateSubViewIndices (SubView *view = NULL);
|
void updateSubViewIndices (SubView *view = nullptr);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ namespace CSVRender
|
|||||||
, mCameraSensitivity(1/650.f)
|
, mCameraSensitivity(1/650.f)
|
||||||
, mSecondaryMoveMult(50)
|
, mSecondaryMoveMult(50)
|
||||||
, mWheelMoveMult(8)
|
, mWheelMoveMult(8)
|
||||||
, mCamera(NULL)
|
, mCamera(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ namespace CSVRender
|
|||||||
bool wasActive = mActive;
|
bool wasActive = mActive;
|
||||||
|
|
||||||
mCamera = camera;
|
mCamera = camera;
|
||||||
mActive = (mCamera != NULL);
|
mActive = (mCamera != nullptr);
|
||||||
|
|
||||||
if (mActive != wasActive)
|
if (mActive != wasActive)
|
||||||
{
|
{
|
||||||
|
@ -86,7 +86,7 @@ void CSVRender::Object::update()
|
|||||||
const int ModelIndex = referenceables.findColumnIndex (CSMWorld::Columns::ColumnId_Model);
|
const int ModelIndex = referenceables.findColumnIndex (CSMWorld::Columns::ColumnId_Model);
|
||||||
|
|
||||||
int index = referenceables.searchId (mReferenceableId);
|
int index = referenceables.searchId (mReferenceableId);
|
||||||
const ESM::Light* light = NULL;
|
const ESM::Light* light = nullptr;
|
||||||
|
|
||||||
mBaseNode->removeChildren(0, mBaseNode->getNumChildren());
|
mBaseNode->removeChildren(0, mBaseNode->getNumChildren());
|
||||||
|
|
||||||
|
@ -527,7 +527,7 @@ void CSVRender::PagedWorldspaceWidget::addCellToSceneFromCamera (int offsetX, in
|
|||||||
|
|
||||||
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);
|
||||||
|
@ -185,7 +185,7 @@ SceneWidget::SceneWidget(std::shared_ptr<Resource::ResourceSystem> resourceSyste
|
|||||||
bool retrieveInput)
|
bool retrieveInput)
|
||||||
: RenderWidget(parent, f)
|
: RenderWidget(parent, f)
|
||||||
, mResourceSystem(resourceSystem)
|
, mResourceSystem(resourceSystem)
|
||||||
, mLighting(NULL)
|
, mLighting(nullptr)
|
||||||
, mHasDefaultAmbient(false)
|
, mHasDefaultAmbient(false)
|
||||||
, mPrevMouseX(0)
|
, mPrevMouseX(0)
|
||||||
, mPrevMouseY(0)
|
, mPrevMouseY(0)
|
||||||
@ -425,21 +425,21 @@ void SceneWidget::selectNavigationMode (const std::string& mode)
|
|||||||
{
|
{
|
||||||
if (mode=="1st")
|
if (mode=="1st")
|
||||||
{
|
{
|
||||||
mCurrentCamControl->setCamera(NULL);
|
mCurrentCamControl->setCamera(nullptr);
|
||||||
mCurrentCamControl = mFreeCamControl;
|
mCurrentCamControl = mFreeCamControl;
|
||||||
mFreeCamControl->setCamera(getCamera());
|
mFreeCamControl->setCamera(getCamera());
|
||||||
mFreeCamControl->fixUpAxis(CameraController::WorldUp);
|
mFreeCamControl->fixUpAxis(CameraController::WorldUp);
|
||||||
}
|
}
|
||||||
else if (mode=="free")
|
else if (mode=="free")
|
||||||
{
|
{
|
||||||
mCurrentCamControl->setCamera(NULL);
|
mCurrentCamControl->setCamera(nullptr);
|
||||||
mCurrentCamControl = mFreeCamControl;
|
mCurrentCamControl = mFreeCamControl;
|
||||||
mFreeCamControl->setCamera(getCamera());
|
mFreeCamControl->setCamera(getCamera());
|
||||||
mFreeCamControl->unfixUpAxis();
|
mFreeCamControl->unfixUpAxis();
|
||||||
}
|
}
|
||||||
else if (mode=="orbit")
|
else if (mode=="orbit")
|
||||||
{
|
{
|
||||||
mCurrentCamControl->setCamera(NULL);
|
mCurrentCamControl->setCamera(nullptr);
|
||||||
mCurrentCamControl = mOrbitCamControl;
|
mCurrentCamControl = mOrbitCamControl;
|
||||||
mOrbitCamControl->setCamera(getCamera());
|
mOrbitCamControl->setCamera(getCamera());
|
||||||
mOrbitCamControl->reset();
|
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
|
// 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));
|
int index = mData.getLand().searchId(CSMWorld::Land::createUniqueRecordId(cellX, cellY));
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
return NULL;
|
return nullptr;
|
||||||
|
|
||||||
const ESM::Land& land = mData.getLand().getRecord(index).get();
|
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);
|
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)
|
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;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,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);
|
||||||
|
@ -158,7 +158,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())
|
||||||
{
|
{
|
||||||
@ -251,11 +251,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),
|
||||||
@ -325,7 +325,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);
|
||||||
|
|
||||||
@ -339,7 +339,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();
|
||||||
}
|
}
|
||||||
@ -360,11 +360,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();
|
||||||
}
|
}
|
||||||
@ -436,7 +436,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)
|
||||||
@ -470,11 +470,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)
|
||||||
@ -733,7 +733,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;
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ void CSVWorld::ExtendedCommandConfigurator::setupGroupLayout()
|
|||||||
int divider = 1;
|
int divider = 1;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
while (layout->itemAt(0) != NULL)
|
while (layout->itemAt(0) != nullptr)
|
||||||
{
|
{
|
||||||
layout->removeItem(layout->itemAt(0));
|
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())
|
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
|
// 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 editable,
|
||||||
bool fixedRows)
|
bool fixedRows)
|
||||||
: DragRecordTable(document, parent),
|
: DragRecordTable(document, parent),
|
||||||
mAddNewRowAction(NULL),
|
mAddNewRowAction(nullptr),
|
||||||
mRemoveRowAction(NULL),
|
mRemoveRowAction(nullptr),
|
||||||
mEditIdAction(NULL),
|
mEditIdAction(nullptr),
|
||||||
mModel(model)
|
mModel(model)
|
||||||
{
|
{
|
||||||
mDispatcher = new CSMWorld::CommandDispatcher (document, id, this);
|
mDispatcher = new CSMWorld::CommandDispatcher (document, id, this);
|
||||||
|
@ -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,
|
||||||
bool editable = true,
|
bool editable = true,
|
||||||
bool fixedRows = false);
|
bool fixedRows = false);
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
@ -35,7 +35,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()==ESM::CellId::sDefaultWorldspace)
|
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)
|
void CSVWorld::SceneSubView::handleDrop (const std::vector< CSMWorld::UniversalId >& universalIdData)
|
||||||
{
|
{
|
||||||
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 (universalIdData);
|
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.
|
// Color columns use a custom editor, so we need to fetch selected color from it.
|
||||||
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
||||||
if (colorEditor != NULL)
|
if (colorEditor != nullptr)
|
||||||
{
|
{
|
||||||
variant = colorEditor->colorInt();
|
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
|
// 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(variant.toInt());
|
colorEditor->setColor(variant.toInt());
|
||||||
return;
|
return;
|
||||||
|
@ -20,14 +20,14 @@ void releaseArgv();
|
|||||||
|
|
||||||
int Java_org_libsdl_app_SDLActivity_getMouseX(JNIEnv *env, jclass cls, jobject obj) {
|
int Java_org_libsdl_app_SDLActivity_getMouseX(JNIEnv *env, jclass cls, jobject obj) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
SDL_GetMouseState(&ret, NULL);
|
SDL_GetMouseState(&ret, nullptr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Java_org_libsdl_app_SDLActivity_getMouseY(JNIEnv *env, jclass cls, jobject obj) {
|
int Java_org_libsdl_app_SDLActivity_getMouseY(JNIEnv *env, jclass cls, jobject obj) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
SDL_GetMouseState(NULL, &ret);
|
SDL_GetMouseState(nullptr, &ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,9 +197,9 @@ bool 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)
|
||||||
, mScreenCaptureOperation(nullptr)
|
, mScreenCaptureOperation(nullptr)
|
||||||
, mSkipMenu (false)
|
, mSkipMenu (false)
|
||||||
, mUseSound (true)
|
, mUseSound (true)
|
||||||
@ -237,18 +237,18 @@ OMW::Engine::~Engine()
|
|||||||
mEnvironment.cleanup();
|
mEnvironment.cleanup();
|
||||||
|
|
||||||
delete mScriptContext;
|
delete mScriptContext;
|
||||||
mScriptContext = NULL;
|
mScriptContext = nullptr;
|
||||||
|
|
||||||
mWorkQueue = NULL;
|
mWorkQueue = 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();
|
||||||
|
@ -74,7 +74,7 @@ namespace MWClass
|
|||||||
if (ref->mBase->mFlags & ESM::Container::Respawn)
|
if (ref->mBase->mFlags & ESM::Container::Respawn)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
|
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
|
||||||
ptr.getRefData().setCustomData(NULL);
|
ptr.getRefData().setCustomData(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,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)
|
||||||
@ -828,7 +828,7 @@ namespace MWClass
|
|||||||
ptr.getRefData().setCount(1);
|
ptr.getRefData().setCount(1);
|
||||||
|
|
||||||
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
|
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
|
||||||
ptr.getRefData().setCustomData(NULL);
|
ptr.getRefData().setCustomData(nullptr);
|
||||||
|
|
||||||
// Reset to original position
|
// Reset to original position
|
||||||
MWBase::Environment::get().getWorld()->moveObject(ptr, ptr.getCellRef().getPosition().pos[0],
|
MWBase::Environment::get().getWorld()->moveObject(ptr, ptr.getCellRef().getPosition().pos[0],
|
||||||
|
@ -41,7 +41,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)
|
||||||
|
@ -610,7 +610,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)
|
||||||
@ -1382,7 +1382,7 @@ namespace MWClass
|
|||||||
ptr.getRefData().setCount(1);
|
ptr.getRefData().setCount(1);
|
||||||
|
|
||||||
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
|
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
|
||||||
ptr.getRefData().setCustomData(NULL);
|
ptr.getRefData().setCustomData(nullptr);
|
||||||
|
|
||||||
// Reset to original position
|
// Reset to original position
|
||||||
MWBase::Environment::get().getWorld()->moveObject(ptr, ptr.getCellRef().getPosition().pos[0],
|
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);
|
const MWMechanics::CreatureStats& creatureStats = actor.getClass().getCreatureStats(actor);
|
||||||
Filter filter(actor, 0, creatureStats.hasTalkedToPlayer());
|
Filter filter(actor, 0, creatureStats.hasTalkedToPlayer());
|
||||||
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())
|
||||||
|
@ -621,7 +621,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];
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,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
|
||||||
|
@ -30,7 +30,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
|
||||||
|
@ -110,7 +110,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 ();
|
||||||
@ -148,7 +148,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// hit test with a margin for error. only hits on interactive text fragments are reported.
|
/// 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 hit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
StyleImpl * hitTest (int left, int top) const
|
StyleImpl * hitTest (int left, int top) const
|
||||||
@ -213,7 +213,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;
|
||||||
@ -253,8 +253,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> ();
|
||||||
@ -342,7 +342,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 ());
|
||||||
|
|
||||||
@ -358,8 +358,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)
|
||||||
@ -368,9 +368,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);
|
||||||
@ -381,7 +381,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;
|
||||||
}
|
}
|
||||||
@ -491,7 +491,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,7 +551,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
|
||||||
{
|
{
|
||||||
@ -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)
|
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 ();
|
||||||
@ -588,7 +588,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 ();
|
||||||
@ -613,7 +613,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;
|
||||||
|
|
||||||
@ -843,17 +843,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);
|
||||||
@ -862,12 +862,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -920,9 +920,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 ()
|
||||||
@ -1053,7 +1053,7 @@ 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);
|
||||||
i->second.reset();
|
i->second.reset();
|
||||||
}
|
}
|
||||||
@ -1089,7 +1089,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);
|
||||||
|
|
||||||
@ -1137,7 +1137,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);
|
||||||
}
|
}
|
||||||
@ -1238,7 +1238,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);
|
||||||
}
|
}
|
||||||
@ -1247,7 +1247,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);
|
||||||
|
|
||||||
@ -1258,7 +1258,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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1269,7 +1269,7 @@ MYGUI_RTTI_DERIVED(BookPage)
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
BookPageImpl()
|
BookPageImpl()
|
||||||
: mPageDisplay(NULL)
|
: mPageDisplay(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,12 +399,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)
|
||||||
@ -179,9 +179,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ namespace MWGui
|
|||||||
ContainerWindow::ContainerWindow(DragAndDrop* dragAndDrop)
|
ContainerWindow::ContainerWindow(DragAndDrop* dragAndDrop)
|
||||||
: WindowBase("openmw_container_window.layout")
|
: WindowBase("openmw_container_window.layout")
|
||||||
, mDragAndDrop(dragAndDrop)
|
, mDragAndDrop(dragAndDrop)
|
||||||
, mSortModel(NULL)
|
, mSortModel(nullptr)
|
||||||
, mModel(NULL)
|
, mModel(nullptr)
|
||||||
, mSelectedItem(-1)
|
, mSelectedItem(-1)
|
||||||
{
|
{
|
||||||
getWidget(mDisposeCorpseButton, "DisposeCorpseButton");
|
getWidget(mDisposeCorpseButton, "DisposeCorpseButton");
|
||||||
@ -83,7 +83,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)
|
||||||
@ -151,9 +151,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::onClose()
|
void ContainerWindow::onClose()
|
||||||
@ -171,7 +171,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)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mCloseButton);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mCloseButton);
|
||||||
@ -219,7 +219,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)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mCloseButton);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mCloseButton);
|
||||||
|
|
||||||
|
@ -63,7 +63,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);
|
||||||
}
|
}
|
||||||
@ -72,7 +72,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);
|
||||||
|
|
||||||
// To do not spam onEnterKeyPressed() again and again
|
// To do not spam onEnterKeyPressed() again and again
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,10 +20,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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,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
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,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,20 +70,20 @@ namespace MWGui
|
|||||||
HUD::HUD(CustomMarkerCollection &customMarkers, DragAndDrop* dragAndDrop, MWRender::LocalMap* localMapRender)
|
HUD::HUD(CustomMarkerCollection &customMarkers, DragAndDrop* dragAndDrop, MWRender::LocalMap* localMapRender)
|
||||||
: WindowBase("openmw_hud.layout")
|
: WindowBase("openmw_hud.layout")
|
||||||
, LocalMapBase(customMarkers, localMapRender, Settings::Manager::getBool("local map hud fog of war", "Map"))
|
, LocalMapBase(customMarkers, localMapRender, Settings::Manager::getBool("local map hud fog of war", "Map"))
|
||||||
, 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)
|
||||||
, mCrosshair(NULL)
|
, mCrosshair(nullptr)
|
||||||
, mCellNameBox(NULL)
|
, mCellNameBox(nullptr)
|
||||||
, mDrowningFrame(NULL)
|
, mDrowningFrame(nullptr)
|
||||||
, mDrowningFlash(NULL)
|
, mDrowningFlash(nullptr)
|
||||||
, mHealthManaStaminaBaseLeft(0)
|
, mHealthManaStaminaBaseLeft(0)
|
||||||
, mWeapBoxBaseLeft(0)
|
, mWeapBoxBaseLeft(0)
|
||||||
, mSpellBoxBaseLeft(0)
|
, mSpellBoxBaseLeft(0)
|
||||||
@ -247,7 +247,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");
|
||||||
}
|
}
|
||||||
|
@ -60,8 +60,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)
|
||||||
@ -157,9 +157,9 @@ namespace MWGui
|
|||||||
void InventoryWindow::clear()
|
void InventoryWindow::clear()
|
||||||
{
|
{
|
||||||
mPtr = MWWorld::Ptr();
|
mPtr = MWWorld::Ptr();
|
||||||
mTradeModel = NULL;
|
mTradeModel = nullptr;
|
||||||
mSortModel = NULL;
|
mSortModel = nullptr;
|
||||||
mItemView->setModel(NULL);
|
mItemView->setModel(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryWindow::setGuiMode(GuiMode mode)
|
void InventoryWindow::setGuiMode(GuiMode mode)
|
||||||
@ -296,9 +296,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
ItemChargeView::ItemChargeView()
|
ItemChargeView::ItemChargeView()
|
||||||
: mScrollView(NULL),
|
: mScrollView(nullptr),
|
||||||
mDisplayMode(DisplayMode_Health)
|
mDisplayMode(DisplayMode_Health)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ namespace MWGui
|
|||||||
Base::initialiseOverride();
|
Base::initialiseOverride();
|
||||||
|
|
||||||
assignWidget(mScrollView, "ScrollView");
|
assignWidget(mScrollView, "ScrollView");
|
||||||
if (mScrollView == NULL)
|
if (mScrollView == nullptr)
|
||||||
throw std::runtime_error("Item charge view needs a scroll view");
|
throw std::runtime_error("Item charge view needs a scroll view");
|
||||||
|
|
||||||
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
||||||
|
@ -31,7 +31,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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ namespace MWGui
|
|||||||
|
|
||||||
|
|
||||||
ProxyItemModel::ProxyItemModel()
|
ProxyItemModel::ProxyItemModel()
|
||||||
: mSourceModel(NULL)
|
: mSourceModel(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ namespace MWGui
|
|||||||
if (mSourceModel)
|
if (mSourceModel)
|
||||||
{
|
{
|
||||||
delete mSourceModel;
|
delete mSourceModel;
|
||||||
mSourceModel = NULL;
|
mSourceModel = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
mSourceModel = sourceModel;
|
mSourceModel = sourceModel;
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +44,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);
|
||||||
|
@ -32,10 +32,10 @@ namespace MWGui
|
|||||||
{
|
{
|
||||||
|
|
||||||
ItemWidget::ItemWidget()
|
ItemWidget::ItemWidget()
|
||||||
: mItem(NULL)
|
: mItem(nullptr)
|
||||||
, mItemShadow(NULL)
|
, mItemShadow(nullptr)
|
||||||
, mFrame(NULL)
|
, mFrame(nullptr)
|
||||||
, mText(NULL)
|
, mText(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,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 ());
|
||||||
|
|
||||||
|
@ -140,7 +140,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:
|
||||||
@ -208,7 +208,7 @@ namespace MWGui
|
|||||||
else
|
else
|
||||||
mImportantLabel = false; // label was already shown on loading screen
|
mImportantLabel = false; // label was already shown on loading screen
|
||||||
|
|
||||||
mViewer->getSceneData()->setComputeBoundingSphereCallback(NULL);
|
mViewer->getSceneData()->setComputeBoundingSphereCallback(nullptr);
|
||||||
mViewer->getSceneData()->dirtyBound();
|
mViewer->getSceneData()->dirtyBound();
|
||||||
|
|
||||||
//std::cout << "loading took " << mTimer.time_m() - mLoadingOnTime << std::endl;
|
//std::cout << "loading took " << mTimer.time_m() - mLoadingOnTime << std::endl;
|
||||||
|
@ -25,10 +25,10 @@ namespace MWGui
|
|||||||
: WindowBase("openmw_mainmenu.layout")
|
: WindowBase("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");
|
||||||
mVersionText->setCaption(versionDescription);
|
mVersionText->setCaption(versionDescription);
|
||||||
@ -147,13 +147,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)
|
||||||
|
@ -161,8 +161,8 @@ namespace MWGui
|
|||||||
, mCurX(0)
|
, mCurX(0)
|
||||||
, mCurY(0)
|
, mCurY(0)
|
||||||
, mInterior(false)
|
, mInterior(false)
|
||||||
, mLocalMap(NULL)
|
, mLocalMap(nullptr)
|
||||||
, mCompass(NULL)
|
, mCompass(nullptr)
|
||||||
, mChanged(true)
|
, mChanged(true)
|
||||||
, mFogOfWarToggled(true)
|
, mFogOfWarToggled(true)
|
||||||
, mFogOfWarEnabled(fogOfWarEnabled)
|
, mFogOfWarEnabled(fogOfWarEnabled)
|
||||||
@ -388,7 +388,7 @@ namespace MWGui
|
|||||||
box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
box->setRenderItemTexture(NULL);
|
box->setRenderItemTexture(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mMapTextures.swap(textures);
|
mMapTextures.swap(textures);
|
||||||
@ -598,7 +598,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
|
||||||
@ -627,11 +627,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(Settings::Manager::getBool("global", "Map"))
|
, mGlobal(Settings::Manager::getBool("global", "Map"))
|
||||||
, mEventBoxGlobal(NULL)
|
, mEventBoxGlobal(nullptr)
|
||||||
, mEventBoxLocal(NULL)
|
, mEventBoxLocal(nullptr)
|
||||||
, mGlobalMapRender(new MWRender::GlobalMap(localMapRender->getRoot(), workQueue))
|
, mGlobalMapRender(new MWRender::GlobalMap(localMapRender->getRoot(), workQueue))
|
||||||
, mEditNoteDialog()
|
, mEditNoteDialog()
|
||||||
{
|
{
|
||||||
@ -872,7 +872,7 @@ namespace MWGui
|
|||||||
|
|
||||||
if (!destNotes.empty())
|
if (!destNotes.empty())
|
||||||
{
|
{
|
||||||
MarkerUserData data (NULL);
|
MarkerUserData data (nullptr);
|
||||||
data.notes = destNotes;
|
data.notes = destNotes;
|
||||||
data.caption = markerWidget->getUserString("Caption_TextOneLine");
|
data.caption = markerWidget->getUserString("Caption_TextOneLine");
|
||||||
markerWidget->setUserData(data);
|
markerWidget->setUserData(data);
|
||||||
|
@ -20,8 +20,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;
|
||||||
}
|
}
|
||||||
@ -42,14 +42,14 @@ namespace MWGui
|
|||||||
mInterMessageBoxe->setVisible(false);
|
mInterMessageBoxe->setVisible(false);
|
||||||
|
|
||||||
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();
|
||||||
@ -81,11 +81,11 @@ namespace MWGui
|
|||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mInterMessageBoxe != NULL && mInterMessageBoxe->mMarkedToDelete) {
|
if(mInterMessageBoxe != nullptr && mInterMessageBoxe->mMarkedToDelete) {
|
||||||
mLastButtonPressed = mInterMessageBoxe->readPressedButton();
|
mLastButtonPressed = mInterMessageBoxe->readPressedButton();
|
||||||
mInterMessageBoxe->setVisible(false);
|
mInterMessageBoxe->setVisible(false);
|
||||||
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());
|
||||||
}
|
}
|
||||||
@ -119,17 +119,17 @@ 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)
|
||||||
{
|
{
|
||||||
Log(Debug::Warning) << "Warning: replacing an interactive message box that was not answered yet";
|
Log(Debug::Warning) << "Warning: replacing an interactive message box that was not answered yet";
|
||||||
mInterMessageBoxe->setVisible(false);
|
mInterMessageBoxe->setVisible(false);
|
||||||
delete mInterMessageBoxe;
|
delete mInterMessageBoxe;
|
||||||
mInterMessageBoxe = NULL;
|
mInterMessageBoxe = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
mInterMessageBoxe = new InteractiveMessageBox(*this, message, buttons);
|
mInterMessageBoxe = new InteractiveMessageBox(*this, message, buttons);
|
||||||
@ -140,7 +140,7 @@ namespace MWGui
|
|||||||
|
|
||||||
bool MessageBoxManager::isInteractiveMessageBox ()
|
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)
|
void InteractiveMessageBox::mousePressed (MyGUI::Widget* pressed)
|
||||||
|
@ -129,10 +129,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(mParent, mResourceSystem));
|
mPreview.reset(new MWRender::RaceSelectionPreview(mParent, mResourceSystem));
|
||||||
mPreview->rebuild();
|
mPreview->rebuild();
|
||||||
@ -190,10 +190,10 @@ namespace MWGui
|
|||||||
{
|
{
|
||||||
WindowModal::onClose();
|
WindowModal::onClose();
|
||||||
|
|
||||||
mPreviewImage->setRenderItemTexture(NULL);
|
mPreviewImage->setRenderItemTexture(nullptr);
|
||||||
|
|
||||||
mPreviewTexture.reset(NULL);
|
mPreviewTexture.reset(nullptr);
|
||||||
mPreview.reset(NULL);
|
mPreview.reset(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
|
@ -31,7 +31,7 @@ namespace MWGui
|
|||||||
|
|
||||||
Recharge::Recharge()
|
Recharge::Recharge()
|
||||||
: WindowBase("openmw_recharge_dialog.layout")
|
: WindowBase("openmw_recharge_dialog.layout")
|
||||||
, mItemSelectionDialog(NULL)
|
, mItemSelectionDialog(nullptr)
|
||||||
{
|
{
|
||||||
getWidget(mBox, "Box");
|
getWidget(mBox, "Box");
|
||||||
getWidget(mGemBox, "GemBox");
|
getWidget(mGemBox, "GemBox");
|
||||||
@ -90,7 +90,7 @@ void Recharge::updateView()
|
|||||||
mBox->update();
|
mBox->update();
|
||||||
|
|
||||||
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();
|
||||||
|
@ -27,7 +27,7 @@ namespace MWGui
|
|||||||
|
|
||||||
Repair::Repair()
|
Repair::Repair()
|
||||||
: WindowBase("openmw_repair.layout")
|
: WindowBase("openmw_repair.layout")
|
||||||
, mItemSelectionDialog(NULL)
|
, mItemSelectionDialog(nullptr)
|
||||||
{
|
{
|
||||||
getWidget(mRepairBox, "RepairBox");
|
getWidget(mRepairBox, "RepairBox");
|
||||||
getWidget(mToolBox, "ToolBox");
|
getWidget(mToolBox, "ToolBox");
|
||||||
@ -99,7 +99,7 @@ void Repair::updateRepairView()
|
|||||||
mRepairBox->update();
|
mRepairBox->update();
|
||||||
|
|
||||||
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();
|
||||||
|
@ -379,7 +379,7 @@ namespace MWGui
|
|||||||
// starting spells
|
// starting spells
|
||||||
std::vector<std::string> spells;
|
std::vector<std::string> spells;
|
||||||
|
|
||||||
const ESM::Race* race = NULL;
|
const ESM::Race* race = nullptr;
|
||||||
if (!mRaceId.empty())
|
if (!mRaceId.empty())
|
||||||
race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().find(mRaceId);
|
race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().find(mRaceId);
|
||||||
|
|
||||||
|
@ -37,8 +37,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");
|
||||||
@ -99,7 +99,7 @@ namespace MWGui
|
|||||||
if (mSaveList->getItemCount() == 0)
|
if (mSaveList->getItemCount() == 0)
|
||||||
{
|
{
|
||||||
size_t previousIndex = mCharacterSelection->getIndexSelected();
|
size_t previousIndex = mCharacterSelection->getIndexSelected();
|
||||||
mCurrentCharacter = NULL;
|
mCurrentCharacter = nullptr;
|
||||||
mCharacterSelection->removeItemAt(previousIndex);
|
mCharacterSelection->removeItemAt(previousIndex);
|
||||||
if (mCharacterSelection->getItemCount())
|
if (mCharacterSelection->getItemCount())
|
||||||
{
|
{
|
||||||
@ -146,8 +146,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);
|
||||||
|
|
||||||
@ -250,12 +250,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}");
|
||||||
@ -318,7 +318,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)
|
||||||
@ -327,7 +327,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();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,7 +379,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;
|
||||||
@ -388,7 +388,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)
|
||||||
{
|
{
|
||||||
@ -404,7 +404,7 @@ namespace MWGui
|
|||||||
timeinfo = localtime(&time);
|
timeinfo = localtime(&time);
|
||||||
|
|
||||||
// Use system/environment locale settings for datetime formatting
|
// Use system/environment locale settings for datetime formatting
|
||||||
char* oldLctime = setlocale(LC_TIME, NULL);
|
char* oldLctime = setlocale(LC_TIME, nullptr);
|
||||||
setlocale(LC_TIME, "");
|
setlocale(LC_TIME, "");
|
||||||
|
|
||||||
const int size=1024;
|
const int size=1024;
|
||||||
|
@ -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);
|
||||||
@ -481,7 +481,7 @@ namespace MWGui
|
|||||||
|
|
||||||
mPriceLabel->setCaption(MyGUI::utility::toString(int(price)));
|
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));
|
int intChance = std::min(100, int(chance));
|
||||||
mSuccessChance->setCaption(MyGUI::utility::toString(intChance));
|
mSuccessChance->setCaption(MyGUI::utility::toString(intChance));
|
||||||
@ -491,11 +491,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)
|
||||||
|
@ -71,7 +71,7 @@ namespace MWGui
|
|||||||
{
|
{
|
||||||
newSpell.mType = Spell::Type_Spell;
|
newSpell.mType = Spell::Type_Spell;
|
||||||
std::string cost = std::to_string(spell->mData.mCost);
|
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;
|
newSpell.mCostColumn = cost + "/" + chance;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -24,7 +24,7 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
SpellView::SpellView()
|
SpellView::SpellView()
|
||||||
: mScrollView(NULL)
|
: mScrollView(nullptr)
|
||||||
, mShowCostColumn(true)
|
, mShowCostColumn(true)
|
||||||
, mHighlightSelected(true)
|
, mHighlightSelected(true)
|
||||||
{
|
{
|
||||||
@ -35,7 +35,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);
|
||||||
@ -131,7 +131,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);
|
||||||
}
|
}
|
||||||
@ -177,7 +177,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);
|
||||||
}
|
}
|
||||||
@ -238,7 +238,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<Gui::TextBox>("SandBrightText",
|
MyGUI::TextBox* groupWidget = mScrollView->createWidget<Gui::TextBox>("SandBrightText",
|
||||||
@ -260,7 +260,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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,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();
|
||||||
@ -72,7 +72,7 @@ namespace MWGui
|
|||||||
// Reset the filter focus when opening the window
|
// Reset the filter focus when opening the window
|
||||||
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
||||||
if (focus == mFilterEdit)
|
if (focus == mFilterEdit)
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||||
|
|
||||||
updateSpells();
|
updateSpells();
|
||||||
}
|
}
|
||||||
|
@ -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::make_pair(i, MWMechanics::SkillValue()));
|
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>();
|
MyGUI::Window* t = mMainWidget->castType<MyGUI::Window>();
|
||||||
|
@ -50,8 +50,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)
|
||||||
@ -205,7 +205,7 @@ namespace MWGui
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
mItemToSell = mSortModel->mapToSource(index);
|
mItemToSell = mSortModel->mapToSource(index);
|
||||||
sellItem (NULL, count);
|
sellItem (nullptr, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -514,8 +514,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,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);
|
||||||
|
@ -281,7 +281,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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,11 +33,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ namespace MWGui
|
|||||||
public:
|
public:
|
||||||
WindowBase(const std::string& parLayout);
|
WindowBase(const std::string& parLayout);
|
||||||
|
|
||||||
virtual MyGUI::Widget* getDefaultKeyFocus() { return NULL; }
|
virtual MyGUI::Widget* getDefaultKeyFocus() { return nullptr; }
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
typedef MyGUI::delegates::CMultiDelegate1<WindowBase*> EventHandle_WindowBase;
|
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,
|
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,
|
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)
|
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)
|
, mResourceSystem(resourceSystem)
|
||||||
, mWorkQueue(workQueue)
|
, mWorkQueue(workQueue)
|
||||||
, mViewer(viewer)
|
, mViewer(viewer)
|
||||||
, mConsoleOnlyScripts(consoleOnlyScripts)
|
, mConsoleOnlyScripts(consoleOnlyScripts)
|
||||||
, mCurrentModals()
|
, mCurrentModals()
|
||||||
, mHud(NULL)
|
, mHud(nullptr)
|
||||||
, mMap(NULL)
|
, mMap(nullptr)
|
||||||
, mLocalMapRender(NULL)
|
, mLocalMapRender(nullptr)
|
||||||
, mToolTips(NULL)
|
, mToolTips(nullptr)
|
||||||
, mStatsWindow(NULL)
|
, mStatsWindow(nullptr)
|
||||||
, mMessageBoxManager(NULL)
|
, mMessageBoxManager(nullptr)
|
||||||
, mConsole(NULL)
|
, mConsole(nullptr)
|
||||||
, mDialogueWindow(NULL)
|
, mDialogueWindow(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)
|
||||||
, mSettingsWindow(NULL)
|
, mSettingsWindow(nullptr)
|
||||||
, mConfirmationDialog(NULL)
|
, mConfirmationDialog(nullptr)
|
||||||
, mSpellWindow(NULL)
|
, mSpellWindow(nullptr)
|
||||||
, mQuickKeysMenu(NULL)
|
, mQuickKeysMenu(nullptr)
|
||||||
, mLoadingScreen(NULL)
|
, mLoadingScreen(nullptr)
|
||||||
, mWaitDialog(NULL)
|
, mWaitDialog(nullptr)
|
||||||
, mSoulgemDialog(NULL)
|
, mSoulgemDialog(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"))
|
||||||
@ -185,9 +185,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)
|
||||||
@ -704,7 +704,7 @@ namespace MWGui
|
|||||||
setCursorVisible(!gameMode);
|
setCursorVisible(!gameMode);
|
||||||
|
|
||||||
if (gameMode)
|
if (gameMode)
|
||||||
setKeyFocusWidget (NULL);
|
setKeyFocusWidget (nullptr);
|
||||||
|
|
||||||
// Icons of forced hidden windows are displayed
|
// Icons of forced hidden windows are displayed
|
||||||
setMinimapVisibility((mAllowed & GW_Map) && (!mMap->pinned() || (mForceHidden & GW_Map)));
|
setMinimapVisibility((mAllowed & GW_Map) && (!mMap->pinned() || (mForceHidden & GW_Map)));
|
||||||
@ -1651,7 +1651,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);
|
||||||
@ -1913,7 +1913,7 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
if (mCurrentModals.empty())
|
if (mCurrentModals.empty())
|
||||||
{
|
{
|
||||||
mKeyboardNavigation->setModalWindow(NULL);
|
mKeyboardNavigation->setModalWindow(nullptr);
|
||||||
mKeyboardNavigation->restoreFocus(getMode());
|
mKeyboardNavigation->restoreFocus(getMode());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -46,9 +46,9 @@ namespace MWInput
|
|||||||
, mScreenCaptureHandler(screenCaptureHandler)
|
, mScreenCaptureHandler(screenCaptureHandler)
|
||||||
, mScreenCaptureOperation(screenCaptureOperation)
|
, mScreenCaptureOperation(screenCaptureOperation)
|
||||||
, mJoystickLastUsed(false)
|
, mJoystickLastUsed(false)
|
||||||
, mPlayer(NULL)
|
, mPlayer(nullptr)
|
||||||
, 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"))
|
||||||
@ -84,7 +84,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();
|
||||||
|
@ -1420,7 +1420,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)
|
||||||
{
|
{
|
||||||
const float animationDistance = aiProcessingDistance + 400; // Slightly larger than AI distance so there is time to switch back to the idle animation.
|
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)
|
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();
|
||||||
|
@ -586,7 +586,7 @@ std::string chooseBestAttack(const ESM::Weapon* weapon)
|
|||||||
{
|
{
|
||||||
std::string attackType;
|
std::string attackType;
|
||||||
|
|
||||||
if (weapon != NULL)
|
if (weapon != nullptr)
|
||||||
{
|
{
|
||||||
//the more damage attackType deals the more probability it has
|
//the more damage attackType deals the more probability it has
|
||||||
int slash = (weapon->mData.mSlash[0] + weapon->mData.mSlash[1])/2;
|
int slash = (weapon->mData.mSlash[0] + weapon->mData.mSlash[1])/2;
|
||||||
|
@ -64,7 +64,7 @@ namespace MWMechanics
|
|||||||
mAttackRange(0.0f),
|
mAttackRange(0.0f),
|
||||||
mCombatMove(false),
|
mCombatMove(false),
|
||||||
mLastTargetPos(0,0,0),
|
mLastTargetPos(0,0,0),
|
||||||
mCell(NULL),
|
mCell(nullptr),
|
||||||
mCurrentAction(),
|
mCurrentAction(),
|
||||||
mActionCooldown(0.0f),
|
mActionCooldown(0.0f),
|
||||||
mStrength(),
|
mStrength(),
|
||||||
|
@ -138,7 +138,7 @@ namespace MWMechanics
|
|||||||
const ESM::Weapon* ActionWeapon::getWeapon() const
|
const ESM::Weapon* ActionWeapon::getWeapon() const
|
||||||
{
|
{
|
||||||
if (mWeapon.isEmpty())
|
if (mWeapon.isEmpty())
|
||||||
return NULL;
|
return nullptr;
|
||||||
return mWeapon.get<ESM::Weapon>()->mBase;
|
return mWeapon.get<ESM::Weapon>()->mBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ namespace MWMechanics
|
|||||||
virtual void prepare(const MWWorld::Ptr& actor) = 0;
|
virtual void prepare(const MWWorld::Ptr& actor) = 0;
|
||||||
virtual float getCombatRange (bool& isRanged) const = 0;
|
virtual float getCombatRange (bool& isRanged) const = 0;
|
||||||
virtual float getActionCooldown() { return 0.f; }
|
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 isAttackingOrSpell() const { return true; }
|
||||||
virtual bool isFleeing() const { return false; }
|
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>(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));
|
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)
|
if (!isPathClear)
|
||||||
return false;
|
return false;
|
||||||
|
@ -114,7 +114,7 @@ namespace MWMechanics
|
|||||||
|
|
||||||
/// Check if there aren't any obstacles along the path to make shortcut possible
|
/// 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.
|
/// 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
|
/// \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);
|
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
|
bool empty() const
|
||||||
{
|
{
|
||||||
return mStorage == NULL;
|
return mStorage == nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::type_info& getType() const
|
const std::type_info& getType() const
|
||||||
@ -67,16 +67,12 @@ namespace MWMechanics
|
|||||||
return typeid(mStorage);
|
return typeid(mStorage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DerivedClassStorage():mStorage(nullptr){}
|
||||||
DerivedClassStorage():mStorage(NULL){}
|
|
||||||
~DerivedClassStorage()
|
~DerivedClassStorage()
|
||||||
{
|
{
|
||||||
if(mStorage)
|
if(mStorage)
|
||||||
delete mStorage;
|
delete mStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ namespace MWMechanics
|
|||||||
mReaction(0),
|
mReaction(0),
|
||||||
mSaidGreeting(Greet_None),
|
mSaidGreeting(Greet_None),
|
||||||
mGreetingTimer(0),
|
mGreetingTimer(0),
|
||||||
mCell(NULL),
|
mCell(nullptr),
|
||||||
mState(Wander_ChooseAction),
|
mState(Wander_ChooseAction),
|
||||||
mIsWanderingManually(false),
|
mIsWanderingManually(false),
|
||||||
mCanWanderAlongPathGrid(true),
|
mCanWanderAlongPathGrid(true),
|
||||||
|
@ -149,7 +149,7 @@ namespace MWMechanics
|
|||||||
|
|
||||||
float baseMagicka = fPCbaseMagickaMult * actorAttributes[ESM::Attribute::Intelligence];
|
float baseMagicka = fPCbaseMagickaMult * actorAttributes[ESM::Attribute::Intelligence];
|
||||||
bool reachedLimit = false;
|
bool reachedLimit = false;
|
||||||
const ESM::Spell* weakestSpell = NULL;
|
const ESM::Spell* weakestSpell = nullptr;
|
||||||
int minCost = std::numeric_limits<int>::max();
|
int minCost = std::numeric_limits<int>::max();
|
||||||
|
|
||||||
std::vector<std::string> selectedSpells;
|
std::vector<std::string> selectedSpells;
|
||||||
|
@ -931,7 +931,7 @@ CharacterController::~CharacterController()
|
|||||||
if (mAnimation)
|
if (mAnimation)
|
||||||
{
|
{
|
||||||
persistAnimationState();
|
persistAnimationState();
|
||||||
mAnimation->setTextKeyListener(NULL);
|
mAnimation->setTextKeyListener(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1159,7 +1159,7 @@ bool CharacterController::updateCreatureState()
|
|||||||
|
|
||||||
if (!spellid.empty() && canCast)
|
if (!spellid.empty() && canCast)
|
||||||
{
|
{
|
||||||
MWMechanics::CastSpell cast(mPtr, NULL, false, mCastingManualSpell);
|
MWMechanics::CastSpell cast(mPtr, nullptr, false, mCastingManualSpell);
|
||||||
cast.playSpellCastingEffects(spellid);
|
cast.playSpellCastingEffects(spellid);
|
||||||
|
|
||||||
if (!mAnimation->hasAnimation("spellcast"))
|
if (!mAnimation->hasAnimation("spellcast"))
|
||||||
@ -1463,7 +1463,7 @@ bool CharacterController::updateWeaponState(CharacterState& idle)
|
|||||||
|
|
||||||
if(!spellid.empty() && canCast)
|
if(!spellid.empty() && canCast)
|
||||||
{
|
{
|
||||||
MWMechanics::CastSpell cast(mPtr, NULL, false, mCastingManualSpell);
|
MWMechanics::CastSpell cast(mPtr, nullptr, false, mCastingManualSpell);
|
||||||
cast.playSpellCastingEffects(spellid);
|
cast.playSpellCastingEffects(spellid);
|
||||||
|
|
||||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
@ -2306,7 +2306,7 @@ void CharacterController::persistAnimationState()
|
|||||||
{
|
{
|
||||||
anim.mLoopCount = mAnimation->getCurrentLoopCount(anim.mGroup);
|
anim.mLoopCount = mAnimation->getCurrentLoopCount(anim.mGroup);
|
||||||
float complete;
|
float complete;
|
||||||
mAnimation->getInfo(anim.mGroup, &complete, NULL);
|
mAnimation->getInfo(anim.mGroup, &complete, nullptr);
|
||||||
anim.mTime = complete;
|
anim.mTime = complete;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2438,7 +2438,7 @@ bool CharacterController::isPersistentAnimPlaying()
|
|||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
@ -2735,9 +2735,9 @@ void CharacterController::updateHeadTracking(float duration)
|
|||||||
if (const MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(mHeadTrackTarget))
|
if (const 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)
|
||||||
{
|
{
|
||||||
nodepaths = node->getParentalNodePaths();
|
nodepaths = node->getParentalNodePaths();
|
||||||
if (!nodepaths.empty())
|
if (!nodepaths.empty())
|
||||||
|
@ -240,8 +240,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) const;
|
std::string chooseRandomGroup (const std::string& prefix, int* num = nullptr) const;
|
||||||
|
|
||||||
bool updateCarriedLeftVisible(WeaponType weaptype) const;
|
bool updateCarriedLeftVisible(WeaponType weaptype) const;
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ namespace MWMechanics
|
|||||||
}
|
}
|
||||||
|
|
||||||
// F_PCStart spells
|
// F_PCStart spells
|
||||||
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);
|
||||||
|
|
||||||
|
@ -20,7 +20,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace MWMechanics
|
|||||||
bool proximityToDoor(const MWWorld::Ptr& actor, float minDist);
|
bool proximityToDoor(const MWWorld::Ptr& actor, float minDist);
|
||||||
|
|
||||||
/// Returns door pointer within range. No guarantee is given as to which one
|
/// 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);
|
const MWWorld::Ptr getNearbyDoor(const MWWorld::Ptr& actor, float minDist);
|
||||||
|
|
||||||
class ObstacleCheck
|
class ObstacleCheck
|
||||||
|
@ -120,8 +120,8 @@ namespace MWMechanics
|
|||||||
}
|
}
|
||||||
|
|
||||||
PathFinder::PathFinder()
|
PathFinder::PathFinder()
|
||||||
: mPathgrid(NULL)
|
: mPathgrid(nullptr)
|
||||||
, mCell(NULL)
|
, mCell(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user