mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 23:36:43 +00:00
Merge branch 'skillgain' into potions
Conflicts: apps/openmw/mwmechanics/activespells.cpp
This commit is contained in:
commit
ec9ebe6b58
194 changed files with 2193 additions and 1454 deletions
|
@ -1,12 +1,25 @@
|
|||
#include "graphicspage.hpp"
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/math/common_factor.hpp>
|
||||
|
||||
#include <components/files/configurationmanager.hpp>
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include "graphicspage.hpp"
|
||||
#include "naturalsort.hpp"
|
||||
|
||||
QString getAspect(int x, int y)
|
||||
{
|
||||
int gcd = boost::math::gcd (x, y);
|
||||
int xaspect = x / gcd;
|
||||
int yaspect = y / gcd;
|
||||
// special case: 8 : 5 is usually referred to as 16:10
|
||||
if (xaspect == 8 && yaspect == 5)
|
||||
return QString("16:10");
|
||||
|
||||
return QString(QString::number(xaspect) + ":" + QString::number(yaspect));
|
||||
}
|
||||
|
||||
GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, mCfgMgr(cfg)
|
||||
|
@ -21,57 +34,38 @@ GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, QWidget *parent)
|
|||
renderSystemLayout->addWidget(rendererLabel, 0, 0, 1, 1);
|
||||
renderSystemLayout->addWidget(mRendererComboBox, 0, 1, 1, 1);
|
||||
|
||||
QVBoxLayout *rendererGroupLayout = new QVBoxLayout(rendererGroup);
|
||||
|
||||
rendererGroupLayout->addLayout(renderSystemLayout);
|
||||
|
||||
// Display
|
||||
QGroupBox *displayGroup = new QGroupBox(tr("Display"), this);
|
||||
|
||||
mDisplayStackedWidget = new QStackedWidget(displayGroup);
|
||||
mVSyncCheckBox = new QCheckBox(tr("Vertical Sync"), displayGroup);
|
||||
mFullScreenCheckBox = new QCheckBox(tr("Full Screen"), displayGroup);
|
||||
|
||||
QVBoxLayout *displayGroupLayout = new QVBoxLayout(displayGroup);
|
||||
QSpacerItem *vSpacer3 = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
QLabel *antiAliasingLabel = new QLabel(tr("Antialiasing:"), displayGroup);
|
||||
QLabel *resolutionLabel = new QLabel(tr("Resolution:"), displayGroup);
|
||||
|
||||
displayGroupLayout->addWidget(mDisplayStackedWidget);
|
||||
displayGroupLayout->addItem(vSpacer3);
|
||||
mResolutionComboBox = new QComboBox(displayGroup);
|
||||
mAntiAliasingComboBox = new QComboBox(displayGroup);
|
||||
|
||||
QVBoxLayout *rendererGroupLayout = new QVBoxLayout(rendererGroup);
|
||||
rendererGroupLayout->addLayout(renderSystemLayout);
|
||||
|
||||
QGridLayout *displayGroupLayout = new QGridLayout(displayGroup);
|
||||
displayGroupLayout->addWidget(mVSyncCheckBox, 0, 0, 1, 1);
|
||||
displayGroupLayout->addWidget(mFullScreenCheckBox, 1, 0, 1, 1);
|
||||
displayGroupLayout->addWidget(antiAliasingLabel, 2, 0, 1, 1);
|
||||
displayGroupLayout->addWidget(mAntiAliasingComboBox, 2, 1, 1, 1);
|
||||
displayGroupLayout->addWidget(resolutionLabel, 3, 0, 1, 1);
|
||||
displayGroupLayout->addWidget(mResolutionComboBox, 3, 1, 1, 1);
|
||||
|
||||
// Layout for the whole page
|
||||
QVBoxLayout *pageLayout = new QVBoxLayout(this);
|
||||
QSpacerItem *vSpacer1 = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
|
||||
pageLayout->addWidget(rendererGroup);
|
||||
pageLayout->addWidget(displayGroup);
|
||||
pageLayout->addItem(vSpacer1);
|
||||
|
||||
connect(mRendererComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(rendererChanged(const QString&)));
|
||||
|
||||
createPages();
|
||||
}
|
||||
|
||||
void GraphicsPage::createPages()
|
||||
{
|
||||
QWidget *main = new QWidget();
|
||||
QGridLayout *grid = new QGridLayout(main);
|
||||
|
||||
mVSyncCheckBox = new QCheckBox(tr("Vertical Sync"), main);
|
||||
grid->addWidget(mVSyncCheckBox, 0, 0, 1, 1);
|
||||
|
||||
mFullScreenCheckBox = new QCheckBox(tr("Full Screen"), main);
|
||||
grid->addWidget(mFullScreenCheckBox, 1, 0, 1, 1);
|
||||
|
||||
QLabel *antiAliasingLabel = new QLabel(tr("Antialiasing:"), main);
|
||||
mAntiAliasingComboBox = new QComboBox(main);
|
||||
grid->addWidget(antiAliasingLabel, 2, 0, 1, 1);
|
||||
grid->addWidget(mAntiAliasingComboBox, 2, 1, 1, 1);
|
||||
|
||||
QLabel *resolutionLabel = new QLabel(tr("Resolution:"), main);
|
||||
mResolutionComboBox = new QComboBox(main);
|
||||
grid->addWidget(resolutionLabel, 3, 0, 1, 1);
|
||||
grid->addWidget(mResolutionComboBox, 3, 1, 1, 1);
|
||||
|
||||
QSpacerItem *vSpacer1 = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
grid->addItem(vSpacer1, 4, 0, 1, 1);
|
||||
|
||||
mDisplayStackedWidget->addWidget(main);
|
||||
}
|
||||
|
||||
bool GraphicsPage::setupOgre()
|
||||
|
@ -85,11 +79,11 @@ bool GraphicsPage::setupOgre()
|
|||
|
||||
try
|
||||
{
|
||||
#if defined(ENABLE_PLUGIN_GL) || defined(ENABLE_PLUGIN_Direct3D9)
|
||||
#if defined(ENABLE_PLUGIN_GL) || defined(ENABLE_PLUGIN_Direct3D9)
|
||||
mOgre = new Ogre::Root("", "", "./launcherOgre.log");
|
||||
#else
|
||||
#else
|
||||
mOgre = new Ogre::Root(pluginCfg.toStdString(), "", "./launcherOgre.log");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
catch(Ogre::Exception &ex)
|
||||
{
|
||||
|
@ -108,14 +102,14 @@ bool GraphicsPage::setupOgre()
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_PLUGIN_GL
|
||||
mGLPlugin = new Ogre::GLPlugin();
|
||||
mOgre->installPlugin(mGLPlugin);
|
||||
#endif
|
||||
#ifdef ENABLE_PLUGIN_Direct3D9
|
||||
mD3D9Plugin = new Ogre::D3D9Plugin();
|
||||
mOgre->installPlugin(mD3D9Plugin);
|
||||
#endif
|
||||
#ifdef ENABLE_PLUGIN_GL
|
||||
mGLPlugin = new Ogre::GLPlugin();
|
||||
mOgre->installPlugin(mGLPlugin);
|
||||
#endif
|
||||
#ifdef ENABLE_PLUGIN_Direct3D9
|
||||
mD3D9Plugin = new Ogre::D3D9Plugin();
|
||||
mOgre->installPlugin(mD3D9Plugin);
|
||||
#endif
|
||||
|
||||
// Get the available renderers and put them in the combobox
|
||||
const Ogre::RenderSystemList &renderers = mOgre->getAvailableRenderers();
|
||||
|
@ -125,30 +119,16 @@ bool GraphicsPage::setupOgre()
|
|||
mRendererComboBox->addItem((*r)->getName().c_str());
|
||||
}
|
||||
|
||||
int index = mRendererComboBox->findText(QString::fromStdString(Settings::Manager::getString("render system", "Video")));
|
||||
|
||||
if ( index != -1) {
|
||||
mRendererComboBox->setCurrentIndex(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
||||
mRendererComboBox->setCurrentIndex(mRendererComboBox->findText("Direct3D9 Rendering Subsystem"));
|
||||
#else
|
||||
mRendererComboBox->setCurrentIndex(mRendererComboBox->findText("OpenGL Rendering Subsystem"));
|
||||
#endif
|
||||
}
|
||||
QString openGLName = QString("OpenGL Rendering Subsystem");
|
||||
QString direct3DName = QString("Direct3D9 Rendering Subsystem");
|
||||
|
||||
// Create separate rendersystems
|
||||
QString openGLName = mRendererComboBox->itemText(mRendererComboBox->findText(QString("OpenGL"), Qt::MatchStartsWith));
|
||||
QString direct3DName = mRendererComboBox->itemText(mRendererComboBox->findText(QString("Direct3D"), Qt::MatchStartsWith));
|
||||
|
||||
mOpenGLRenderSystem = mOgre->getRenderSystemByName(openGLName.toStdString());
|
||||
mDirect3DRenderSystem = mOgre->getRenderSystemByName(direct3DName.toStdString());
|
||||
|
||||
if (!mOpenGLRenderSystem && !mDirect3DRenderSystem) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setWindowTitle("Error creating renderer");
|
||||
msgBox.setWindowTitle(tr("Error creating renderer"));
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setText(tr("<br><b>Could not select a valid render system</b><br><br> \
|
||||
|
@ -159,10 +139,24 @@ bool GraphicsPage::setupOgre()
|
|||
}
|
||||
|
||||
// Now fill the GUI elements
|
||||
int index = mRendererComboBox->findText(QString::fromStdString(Settings::Manager::getString("render system", "Video")));
|
||||
|
||||
if ( index != -1) {
|
||||
mRendererComboBox->setCurrentIndex(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
||||
mRendererComboBox->setCurrentIndex(mRendererComboBox->findText(direct3DName));
|
||||
#else
|
||||
mRendererComboBox->setCurrentIndex(mRendererComboBox->findText(openGLName));
|
||||
#endif
|
||||
}
|
||||
|
||||
mAntiAliasingComboBox->clear();
|
||||
mResolutionComboBox->clear();
|
||||
mAntiAliasingComboBox->addItems(getAvailableOptions(QString("FSAA"), mSelectedRenderSystem));
|
||||
mResolutionComboBox->addItems(getAvailableOptions(QString("Video Mode"), mSelectedRenderSystem));
|
||||
mResolutionComboBox->addItems(getAvailableResolutions(mSelectedRenderSystem));
|
||||
|
||||
readConfig();
|
||||
return true;
|
||||
|
@ -180,9 +174,10 @@ void GraphicsPage::readConfig()
|
|||
if (aaIndex != -1)
|
||||
mAntiAliasingComboBox->setCurrentIndex(aaIndex);
|
||||
|
||||
std::string resolution = boost::lexical_cast<std::string>(Settings::Manager::getInt("resolution x", "Video"))
|
||||
+ " x " + boost::lexical_cast<std::string>(Settings::Manager::getInt("resolution y", "Video"));
|
||||
int resIndex = mResolutionComboBox->findText(QString::fromStdString(resolution));
|
||||
QString resolution = QString::number(Settings::Manager::getInt("resolution x", "Video"));
|
||||
resolution.append(" x " + QString::number(Settings::Manager::getInt("resolution y", "Video")));
|
||||
|
||||
int resIndex = mResolutionComboBox->findText(resolution, Qt::MatchStartsWith);
|
||||
if (resIndex != -1)
|
||||
mResolutionComboBox->setCurrentIndex(resIndex);
|
||||
}
|
||||
|
@ -194,11 +189,12 @@ void GraphicsPage::writeConfig()
|
|||
Settings::Manager::setString("antialiasing", "Video", mAntiAliasingComboBox->currentText().toStdString());
|
||||
Settings::Manager::setString("render system", "Video", mRendererComboBox->currentText().toStdString());
|
||||
|
||||
// parse resolution x and y from a string like "800 x 600"
|
||||
QString resolution = mResolutionComboBox->currentText();
|
||||
// Get the current resolution, but with the tabs replaced with a single space
|
||||
QString resolution = mResolutionComboBox->currentText().simplified();
|
||||
QStringList tokens = resolution.split(" ", QString::SkipEmptyParts);
|
||||
int resX = boost::lexical_cast<int>(tokens.at(0).toStdString());
|
||||
int resY = boost::lexical_cast<int>(tokens.at(2).toStdString());
|
||||
|
||||
int resX = tokens.at(0).toInt();
|
||||
int resY = tokens.at(2).toInt();
|
||||
Settings::Manager::setInt("resolution x", "Video", resX);
|
||||
Settings::Manager::setInt("resolution y", "Video", resY);
|
||||
}
|
||||
|
@ -220,15 +216,21 @@ QStringList GraphicsPage::getAvailableOptions(const QString &key, Ogre::RenderSy
|
|||
|
||||
if (strcmp (key.toStdString().c_str(), i->first.c_str()) == 0)
|
||||
{
|
||||
if (key == "FSAA" && *opt_it == "0")
|
||||
result << QString("none");
|
||||
else
|
||||
result << ((key == "FSAA") ? QString("MSAA ") : QString("")) + QString::fromStdString((*opt_it).c_str()).simplified();
|
||||
result << ((key == "FSAA") ? QString("MSAA ") : QString("")) + QString::fromStdString((*opt_it).c_str()).simplified();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Sort ascending
|
||||
qSort(result.begin(), result.end(), naturalSortLessThanCI);
|
||||
|
||||
// Replace the zero option with Off
|
||||
int index = result.indexOf("MSAA 0");
|
||||
|
||||
if (index != -1)
|
||||
result.replace(index, tr("Off"));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -247,24 +249,36 @@ QStringList GraphicsPage::getAvailableResolutions(Ogre::RenderSystem *renderer)
|
|||
|
||||
Ogre::StringVector::iterator opt_it;
|
||||
uint idx = 0;
|
||||
|
||||
for (opt_it = i->second.possibleValues.begin ();
|
||||
opt_it != i->second.possibleValues.end (); opt_it++, idx++)
|
||||
opt_it != i->second.possibleValues.end (); opt_it++, idx++)
|
||||
{
|
||||
QString qval = QString::fromStdString(*opt_it).simplified();
|
||||
// remove extra tokens after the resolution (for example bpp, can be there or not depending on rendersystem)
|
||||
QStringList tokens = qval.split(" ", QString::SkipEmptyParts);
|
||||
assert (tokens.size() >= 3);
|
||||
QString resolutionStr = tokens.at(0) + QString(" x ") + tokens.at(2);
|
||||
{
|
||||
|
||||
// do not add duplicate resolutions
|
||||
if (!result.contains(resolutionStr))
|
||||
result << resolutionStr;
|
||||
// do not add duplicate resolutions
|
||||
if (!result.contains(resolutionStr)) {
|
||||
|
||||
QString aspect = getAspect(tokens.at(0).toInt(),tokens.at(2).toInt());
|
||||
|
||||
if (aspect == QLatin1String("16:9") || aspect == QLatin1String("16:10")) {
|
||||
resolutionStr.append(tr("\t(Widescreen ") + aspect + ")");
|
||||
|
||||
} else if (aspect == QLatin1String("4:3")) {
|
||||
resolutionStr.append(tr("\t(Standard 4:3)"));
|
||||
}
|
||||
|
||||
result << resolutionStr;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Sort the resolutions in descending order
|
||||
qSort(result.begin(), result.end(), naturalSortGreaterThanCI);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -229,7 +229,6 @@ void MainDialog::closeEvent(QCloseEvent *event)
|
|||
|
||||
// Save user settings
|
||||
const std::string settingspath = (mCfgMgr.getUserPath() / "settings.cfg").string();
|
||||
qDebug() << QString::fromStdString(settingspath);
|
||||
mSettings.saveUser(settingspath);
|
||||
|
||||
event->accept();
|
||||
|
@ -241,6 +240,10 @@ void MainDialog::play()
|
|||
mDataFilesPage->writeConfig();
|
||||
mGraphicsPage->writeConfig();
|
||||
|
||||
// Save user settings
|
||||
const std::string settingspath = (mCfgMgr.getUserPath() / "settings.cfg").string();
|
||||
mSettings.saveUser(settingspath);
|
||||
|
||||
#ifdef Q_WS_WIN
|
||||
QString game = "./openmw.exe";
|
||||
QFile file(game);
|
||||
|
|
|
@ -93,3 +93,13 @@ bool naturalSortLessThanCI( const QString &left, const QString &right )
|
|||
{
|
||||
return (naturalCompare( left, right, Qt::CaseInsensitive ) < 0);
|
||||
}
|
||||
|
||||
bool naturalSortGreaterThanCS( const QString &left, const QString &right )
|
||||
{
|
||||
return (naturalCompare( left, right, Qt::CaseSensitive ) > 0);
|
||||
}
|
||||
|
||||
bool naturalSortGreaterThanCI( const QString &left, const QString &right )
|
||||
{
|
||||
return (naturalCompare( left, right, Qt::CaseInsensitive ) > 0);
|
||||
}
|
||||
|
|
|
@ -5,5 +5,7 @@
|
|||
|
||||
bool naturalSortLessThanCS( const QString &left, const QString &right );
|
||||
bool naturalSortLessThanCI( const QString &left, const QString &right );
|
||||
bool naturalSortGreaterThanCS( const QString &left, const QString &right );
|
||||
bool naturalSortGreaterThanCI( const QString &left, const QString &right );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <QDebug>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "pluginsview.hpp"
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 63 KiB |
Binary file not shown.
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 236 KiB |
|
@ -47,10 +47,10 @@ add_openmw_dir (mwsound
|
|||
)
|
||||
|
||||
add_openmw_dir (mwworld
|
||||
refdata world physicssystem scene globals class action nullaction actionteleport
|
||||
refdata worldimp physicssystem scene globals class action nullaction actionteleport
|
||||
containerstore actiontalk actiontake manualref player cellfunctors
|
||||
cells localscripts customdata weather inventorystore ptr actionopen actionread
|
||||
actionequip timestamp actionalchemy
|
||||
actionequip timestamp actionalchemy cellstore
|
||||
)
|
||||
|
||||
add_openmw_dir (mwclass
|
||||
|
@ -60,11 +60,11 @@ add_openmw_dir (mwclass
|
|||
|
||||
add_openmw_dir (mwmechanics
|
||||
mechanicsmanager stat creaturestats magiceffects movement actors drawstate spells
|
||||
activespells
|
||||
activespells npcstats
|
||||
)
|
||||
|
||||
add_openmw_dir (mwbase
|
||||
environment
|
||||
environment world
|
||||
)
|
||||
|
||||
# Main executable
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <openengine/gui/manager.hpp>
|
||||
|
||||
#include <components/esm/records.hpp>
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
#include <components/bsa/bsa_archive.hpp>
|
||||
#include <components/esm/esm_reader.hpp>
|
||||
#include <components/files/fixedpath.hpp>
|
||||
|
@ -39,9 +38,10 @@
|
|||
|
||||
#include "mwsound/soundmanager.hpp"
|
||||
|
||||
#include "mwworld/world.hpp"
|
||||
#include "mwworld/class.hpp"
|
||||
#include "mwworld/player.hpp"
|
||||
#include "mwworld/cellstore.hpp"
|
||||
#include "mwworld/worldimp.hpp"
|
||||
|
||||
#include "mwclass/classes.hpp"
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
|||
#include "mwmechanics/mechanicsmanager.hpp"
|
||||
|
||||
#include "mwbase/environment.hpp"
|
||||
#include "mwbase/world.hpp"
|
||||
|
||||
|
||||
void OMW::Engine::executeLocalScripts()
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
|
||||
#include "../mwdialogue/dialoguemanager.hpp"
|
||||
#include "../mwdialogue/journal.hpp"
|
||||
|
||||
#include "../mwmechanics/mechanicsmanager.hpp"
|
||||
|
||||
#include "world.hpp"
|
||||
|
||||
MWBase::Environment *MWBase::Environment::sThis = 0;
|
||||
|
||||
MWBase::Environment::Environment()
|
||||
|
@ -32,7 +32,7 @@ MWBase::Environment::~Environment()
|
|||
sThis = 0;
|
||||
}
|
||||
|
||||
void MWBase::Environment::setWorld (MWWorld::World *world)
|
||||
void MWBase::Environment::setWorld (World *world)
|
||||
{
|
||||
mWorld = world;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ void MWBase::Environment::setFrameDuration (float duration)
|
|||
mFrameDuration = duration;
|
||||
}
|
||||
|
||||
MWWorld::World *MWBase::Environment::getWorld() const
|
||||
MWBase::World *MWBase::Environment::getWorld() const
|
||||
{
|
||||
assert (mWorld);
|
||||
return mWorld;
|
||||
|
|
|
@ -32,13 +32,10 @@ namespace MWInput
|
|||
struct MWInputManager;
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class World;
|
||||
}
|
||||
|
||||
namespace MWBase
|
||||
{
|
||||
class World;
|
||||
|
||||
/// \brief Central hub for mw-subsystems
|
||||
///
|
||||
/// This class allows each mw-subsystem to access any others subsystem's top-level manager class.
|
||||
|
@ -49,7 +46,7 @@ namespace MWBase
|
|||
{
|
||||
static Environment *sThis;
|
||||
|
||||
MWWorld::World *mWorld;
|
||||
World *mWorld;
|
||||
MWSound::SoundManager *mSoundManager;
|
||||
MWScript::ScriptManager *mScriptManager;
|
||||
MWGui::WindowManager *mWindowManager;
|
||||
|
@ -71,7 +68,7 @@ namespace MWBase
|
|||
|
||||
~Environment();
|
||||
|
||||
void setWorld (MWWorld::World *world);
|
||||
void setWorld (World *world);
|
||||
|
||||
void setSoundManager (MWSound::SoundManager *soundManager);
|
||||
|
||||
|
@ -90,7 +87,7 @@ namespace MWBase
|
|||
void setFrameDuration (float duration);
|
||||
///< Set length of current frame in seconds.
|
||||
|
||||
MWWorld::World *getWorld() const;
|
||||
World *getWorld() const;
|
||||
|
||||
MWSound::SoundManager *getSoundManager() const;
|
||||
|
||||
|
|
245
apps/openmw/mwbase/world.hpp
Normal file
245
apps/openmw/mwbase/world.hpp
Normal file
|
@ -0,0 +1,245 @@
|
|||
#ifndef GAME_MWBASE_WORLD_H
|
||||
#define GAME_MWBASE_WORLD_H
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include "../mwworld/globals.hpp"
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
class Vector2;
|
||||
class Vector3;
|
||||
}
|
||||
|
||||
namespace OEngine
|
||||
{
|
||||
namespace Render
|
||||
{
|
||||
class Fader;
|
||||
}
|
||||
}
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
class ESMReader;
|
||||
struct Position;
|
||||
struct Cell;
|
||||
struct Class;
|
||||
struct Potion;
|
||||
}
|
||||
|
||||
namespace ESMS
|
||||
{
|
||||
struct ESMStore;
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class CellStore;
|
||||
class Player;
|
||||
class LocalScripts;
|
||||
class Ptr;
|
||||
class TimeStamp;
|
||||
}
|
||||
|
||||
namespace MWBase
|
||||
{
|
||||
class World
|
||||
{
|
||||
World (const World&);
|
||||
///< not implemented
|
||||
|
||||
World& operator= (const World&);
|
||||
///< not implemented
|
||||
|
||||
public:
|
||||
|
||||
enum RenderMode
|
||||
{
|
||||
Render_CollisionDebug,
|
||||
Render_Wireframe,
|
||||
Render_Pathgrid,
|
||||
Render_Compositors
|
||||
};
|
||||
|
||||
World() {}
|
||||
|
||||
virtual ~World() {}
|
||||
|
||||
virtual OEngine::Render::Fader* getFader() = 0;
|
||||
///< \ŧodo remove this function. Rendering details should not be exposed.
|
||||
|
||||
virtual MWWorld::CellStore *getExterior (int x, int y) = 0;
|
||||
|
||||
virtual MWWorld::CellStore *getInterior (const std::string& name) = 0;
|
||||
|
||||
virtual void setWaterHeight(const float height) = 0;
|
||||
|
||||
virtual void toggleWater() = 0;
|
||||
|
||||
virtual void adjustSky() = 0;
|
||||
|
||||
virtual void getTriangleBatchCount(unsigned int &triangles, unsigned int &batches) = 0;
|
||||
|
||||
virtual void setFallbackValues (const std::map<std::string, std::string>& fallbackMap) = 0;
|
||||
|
||||
virtual std::string getFallback (const std::string& key) const = 0;
|
||||
|
||||
virtual std::string getFallback (const std::string& key, const std::string& def) const = 0;
|
||||
|
||||
virtual MWWorld::Player& getPlayer() = 0;
|
||||
|
||||
virtual const ESMS::ESMStore& getStore() const = 0;
|
||||
|
||||
virtual ESM::ESMReader& getEsmReader() = 0;
|
||||
|
||||
virtual MWWorld::LocalScripts& getLocalScripts() = 0;
|
||||
|
||||
virtual bool hasCellChanged() const = 0;
|
||||
///< Has the player moved to a different cell, since the last frame?
|
||||
|
||||
virtual bool isCellExterior() const = 0;
|
||||
|
||||
virtual bool isCellQuasiExterior() const = 0;
|
||||
|
||||
virtual Ogre::Vector2 getNorthVector (MWWorld::CellStore* cell) = 0;
|
||||
///< get north vector (OGRE coordinates) for given interior cell
|
||||
|
||||
virtual MWWorld::Globals::Data& getGlobalVariable (const std::string& name) = 0;
|
||||
|
||||
virtual MWWorld::Globals::Data getGlobalVariable (const std::string& name) const = 0;
|
||||
|
||||
virtual char getGlobalVariableType (const std::string& name) const = 0;
|
||||
///< Return ' ', if there is no global variable with this name.
|
||||
|
||||
virtual MWWorld::Ptr getPtr (const std::string& name, bool activeOnly) = 0;
|
||||
///< Return a pointer to a liveCellRef with the given name.
|
||||
/// \param activeOnly do non search inactive cells.
|
||||
|
||||
virtual MWWorld::Ptr getPtrViaHandle (const std::string& handle) = 0;
|
||||
///< Return a pointer to a liveCellRef with the given Ogre handle.
|
||||
|
||||
/// \todo enable reference in the OGRE scene
|
||||
virtual void enable (const MWWorld::Ptr& ptr) = 0;
|
||||
|
||||
/// \todo disable reference in the OGRE scene
|
||||
virtual void disable (const MWWorld::Ptr& ptr) = 0;
|
||||
|
||||
virtual void advanceTime (double hours) = 0;
|
||||
///< Advance in-game time.
|
||||
|
||||
virtual void setHour (double hour) = 0;
|
||||
///< Set in-game time hour.
|
||||
|
||||
virtual void setMonth (int month) = 0;
|
||||
///< Set in-game time month.
|
||||
|
||||
virtual void setDay (int day) = 0;
|
||||
///< Set in-game time day.
|
||||
|
||||
virtual MWWorld::TimeStamp getTimeStamp() const = 0;
|
||||
///< Return current in-game time stamp.
|
||||
|
||||
virtual bool toggleSky() = 0;
|
||||
///< \return Resulting mode
|
||||
|
||||
virtual void changeWeather(const std::string& region, unsigned int id) = 0;
|
||||
|
||||
virtual int getCurrentWeather() const = 0;
|
||||
|
||||
virtual int getMasserPhase() const = 0;
|
||||
|
||||
virtual int getSecundaPhase() const = 0;
|
||||
|
||||
virtual void setMoonColour (bool red) = 0;
|
||||
|
||||
virtual float getTimeScaleFactor() const = 0;
|
||||
|
||||
virtual void changeToInteriorCell (const std::string& cellName,
|
||||
const ESM::Position& position) = 0;
|
||||
///< Move to interior cell.
|
||||
|
||||
virtual void changeToExteriorCell (const ESM::Position& position) = 0;
|
||||
///< Move to exterior cell.
|
||||
|
||||
virtual const ESM::Cell *getExterior (const std::string& cellName) const = 0;
|
||||
///< Return a cell matching the given name or a 0-pointer, if there is no such cell.
|
||||
|
||||
virtual void markCellAsUnchanged() = 0;
|
||||
|
||||
virtual std::string getFacedHandle() = 0;
|
||||
///< Return handle of the object the player is looking at
|
||||
|
||||
virtual void deleteObject (const MWWorld::Ptr& ptr) = 0;
|
||||
|
||||
virtual void moveObject (const MWWorld::Ptr& ptr, float x, float y, float z) = 0;
|
||||
|
||||
virtual void indexToPosition (int cellX, int cellY, float &x, float &y, bool centre = false)
|
||||
const = 0;
|
||||
///< Convert cell numbers to position.
|
||||
|
||||
virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const = 0;
|
||||
///< Convert position to cell numbers
|
||||
|
||||
virtual void doPhysics (const std::vector<std::pair<std::string, Ogre::Vector3> >& actors,
|
||||
float duration) = 0;
|
||||
///< Run physics simulation and modify \a world accordingly.
|
||||
|
||||
virtual bool toggleCollisionMode() = 0;
|
||||
///< Toggle collision mode for player. If disabled player object should ignore
|
||||
/// collisions and gravity.
|
||||
///< \return Resulting mode
|
||||
|
||||
virtual bool toggleRenderMode (RenderMode mode) = 0;
|
||||
///< Toggle a render mode.
|
||||
///< \return Resulting mode
|
||||
|
||||
virtual std::pair<std::string, const ESM::Potion *> createRecord (const ESM::Potion& record)
|
||||
= 0;
|
||||
///< Create a new recrod (of type potion) in the ESM store.
|
||||
/// \return ID, pointer to created record
|
||||
|
||||
virtual std::pair<std::string, const ESM::Class *> createRecord (const ESM::Class& record)
|
||||
= 0;
|
||||
///< Create a new recrod (of type class) in the ESM store.
|
||||
/// \return ID, pointer to created record
|
||||
|
||||
virtual const ESM::Cell *createRecord (const ESM::Cell& record) = 0;
|
||||
///< Create a new recrod (of type cell) in the ESM store.
|
||||
/// \return ID, pointer to created record
|
||||
|
||||
virtual void playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName,
|
||||
int mode, int number = 1) = 0;
|
||||
///< Run animation for a MW-reference. Calls to this function for references that are
|
||||
/// currently not in the rendered scene should be ignored.
|
||||
///
|
||||
/// \param mode: 0 normal, 1 immediate start, 2 immediate loop
|
||||
/// \param number How offen the animation should be run
|
||||
|
||||
virtual void skipAnimation (const MWWorld::Ptr& ptr) = 0;
|
||||
///< Skip the animation for the given MW-reference for one frame. Calls to this function for
|
||||
/// references that are currently not in the rendered scene should be ignored.
|
||||
|
||||
virtual void update (float duration) = 0;
|
||||
|
||||
virtual bool placeObject(const MWWorld::Ptr& object, float cursorX, float cursorY) = 0;
|
||||
///< place an object into the gameworld at the specified cursor position
|
||||
/// @param object
|
||||
/// @param cursor X (relative 0-1)
|
||||
/// @param cursor Y (relative 0-1)
|
||||
/// @return true if the object was placed, or false if it was rejected because the position is too far away
|
||||
|
||||
virtual void dropObjectOnGround (const MWWorld::Ptr& object) = 0;
|
||||
|
||||
virtual bool canPlaceObject (float cursorX, float cursorY) = 0;
|
||||
///< @return true if it is possible to place on object at specified cursor location
|
||||
|
||||
virtual void processChangedSettings (const Settings::CategorySettingVector& settings) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -3,18 +3,23 @@
|
|||
|
||||
#include <components/esm/loadacti.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld//cellstore.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
void Activator::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -30,7 +35,7 @@ namespace MWClass
|
|||
|
||||
void Activator::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
|
||||
|
@ -44,7 +49,7 @@ namespace MWClass
|
|||
|
||||
std::string Activator::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -52,7 +57,7 @@ namespace MWClass
|
|||
|
||||
std::string Activator::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -67,7 +72,7 @@ namespace MWClass
|
|||
|
||||
bool Activator::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -75,7 +80,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Activator::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,16 +3,17 @@
|
|||
|
||||
#include <components/esm/loadappa.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/actionalchemy.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
@ -23,7 +24,7 @@ namespace MWClass
|
|||
{
|
||||
void Apparatus::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -39,7 +40,7 @@ namespace MWClass
|
|||
|
||||
void Apparatus::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
|
||||
|
@ -53,7 +54,7 @@ namespace MWClass
|
|||
|
||||
std::string Apparatus::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -70,7 +71,7 @@ namespace MWClass
|
|||
|
||||
std::string Apparatus::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -78,7 +79,7 @@ namespace MWClass
|
|||
|
||||
int Apparatus::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -103,7 +104,7 @@ namespace MWClass
|
|||
|
||||
std::string Apparatus::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -111,7 +112,7 @@ namespace MWClass
|
|||
|
||||
bool Apparatus::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -119,7 +120,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Apparatus::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -5,19 +5,21 @@
|
|||
#include <components/esm/loadskil.hpp>
|
||||
#include <components/esm/loadgmst.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -25,7 +27,7 @@ namespace MWClass
|
|||
{
|
||||
void Armor::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -41,7 +43,7 @@ namespace MWClass
|
|||
|
||||
void Armor::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
const std::string &model = ref->base->model;
|
||||
|
@ -54,7 +56,7 @@ namespace MWClass
|
|||
|
||||
std::string Armor::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -76,7 +78,7 @@ namespace MWClass
|
|||
|
||||
int Armor::getItemMaxHealth (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->data.health;
|
||||
|
@ -84,7 +86,7 @@ namespace MWClass
|
|||
|
||||
std::string Armor::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -92,7 +94,7 @@ namespace MWClass
|
|||
|
||||
std::pair<std::vector<int>, bool> Armor::getEquipmentSlots (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
std::vector<int> slots;
|
||||
|
@ -126,7 +128,7 @@ namespace MWClass
|
|||
|
||||
int Armor::getEquipmentSkill (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
std::string typeGmst;
|
||||
|
@ -164,7 +166,7 @@ namespace MWClass
|
|||
|
||||
int Armor::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -201,7 +203,7 @@ namespace MWClass
|
|||
|
||||
std::string Armor::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -209,7 +211,7 @@ namespace MWClass
|
|||
|
||||
bool Armor::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -217,7 +219,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Armor::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -260,7 +262,7 @@ namespace MWClass
|
|||
|
||||
std::string Armor::getEnchantment (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->enchant;
|
||||
|
|
|
@ -3,17 +3,19 @@
|
|||
|
||||
#include <components/esm/loadbook.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actionread.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -21,7 +23,7 @@ namespace MWClass
|
|||
{
|
||||
void Book::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -37,7 +39,7 @@ namespace MWClass
|
|||
|
||||
void Book::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
|
||||
|
@ -51,7 +53,7 @@ namespace MWClass
|
|||
|
||||
std::string Book::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -66,7 +68,7 @@ namespace MWClass
|
|||
|
||||
std::string Book::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -74,7 +76,7 @@ namespace MWClass
|
|||
|
||||
int Book::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -99,7 +101,7 @@ namespace MWClass
|
|||
|
||||
std::string Book::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -107,7 +109,7 @@ namespace MWClass
|
|||
|
||||
bool Book::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -115,7 +117,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Book::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -143,7 +145,7 @@ namespace MWClass
|
|||
|
||||
std::string Book::getEnchantment (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->enchant;
|
||||
|
|
|
@ -3,20 +3,21 @@
|
|||
|
||||
#include <components/esm/loadclot.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -24,7 +25,7 @@ namespace MWClass
|
|||
{
|
||||
void Clothing::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -40,7 +41,7 @@ namespace MWClass
|
|||
|
||||
void Clothing::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
|
||||
|
@ -54,7 +55,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -71,7 +72,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -79,7 +80,7 @@ namespace MWClass
|
|||
|
||||
std::pair<std::vector<int>, bool> Clothing::getEquipmentSlots (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
std::vector<int> slots;
|
||||
|
@ -119,7 +120,7 @@ namespace MWClass
|
|||
|
||||
int Clothing::getEquipmentSkill (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
if (ref->base->data.type==ESM::Clothing::Shoes)
|
||||
|
@ -130,7 +131,7 @@ namespace MWClass
|
|||
|
||||
int Clothing::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -145,7 +146,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getUpSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
if (ref->base->data.type == 8)
|
||||
|
@ -157,7 +158,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getDownSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
if (ref->base->data.type == 8)
|
||||
|
@ -169,7 +170,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -177,7 +178,7 @@ namespace MWClass
|
|||
|
||||
bool Clothing::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -185,7 +186,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Clothing::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -213,7 +214,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getEnchantment (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->enchant;
|
||||
|
|
|
@ -3,21 +3,22 @@
|
|||
|
||||
#include <components/esm/loadcont.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/nullaction.hpp"
|
||||
#include "../mwworld/containerstore.hpp"
|
||||
#include "../mwworld/customdata.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/actionopen.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwworld/actionopen.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -53,7 +54,7 @@ namespace MWClass
|
|||
|
||||
void Container::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -69,7 +70,7 @@ namespace MWClass
|
|||
|
||||
void Container::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
|
||||
|
@ -117,7 +118,7 @@ namespace MWClass
|
|||
|
||||
std::string Container::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -133,7 +134,7 @@ namespace MWClass
|
|||
|
||||
std::string Container::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -148,7 +149,7 @@ namespace MWClass
|
|||
|
||||
bool Container::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -156,7 +157,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Container::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -182,7 +183,7 @@ namespace MWClass
|
|||
|
||||
float Container::getCapacity (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
return ref->base->weight;
|
||||
|
|
|
@ -13,8 +13,12 @@
|
|||
#include "../mwworld/actiontalk.hpp"
|
||||
#include "../mwworld/customdata.hpp"
|
||||
#include "../mwworld/containerstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -40,7 +44,7 @@ namespace MWClass
|
|||
{
|
||||
std::auto_ptr<CustomData> data (new CustomData);
|
||||
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref = ptr.get<ESM::Creature>();
|
||||
MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
|
||||
|
||||
// creature stats
|
||||
data->mCreatureStats.mAttributes[0].set (ref->base->data.strength);
|
||||
|
@ -69,7 +73,7 @@ namespace MWClass
|
|||
|
||||
std::string Creature::getId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
return ref->base->mId;
|
||||
|
@ -83,7 +87,7 @@ namespace MWClass
|
|||
|
||||
void Creature::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
const std::string &model = ref->base->model;
|
||||
|
@ -97,7 +101,7 @@ namespace MWClass
|
|||
|
||||
std::string Creature::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -126,7 +130,7 @@ namespace MWClass
|
|||
|
||||
std::string Creature::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -148,7 +152,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Creature::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,20 +3,21 @@
|
|||
|
||||
#include <components/esm/loaddoor.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/nullaction.hpp"
|
||||
#include "../mwworld/actionteleport.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -24,7 +25,7 @@ namespace MWClass
|
|||
{
|
||||
void Door::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -40,7 +41,7 @@ namespace MWClass
|
|||
|
||||
void Door::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
const std::string &model = ref->base->model;
|
||||
|
@ -52,7 +53,7 @@ namespace MWClass
|
|||
|
||||
std::string Door::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
if (ref->ref.teleport && !ref->ref.destCell.empty()) // TODO doors that lead to exteriors
|
||||
|
@ -64,7 +65,7 @@ namespace MWClass
|
|||
boost::shared_ptr<MWWorld::Action> Door::activate (const MWWorld::Ptr& ptr,
|
||||
const MWWorld::Ptr& actor) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
const std::string &openSound = ref->base->openSound;
|
||||
|
@ -134,7 +135,7 @@ namespace MWClass
|
|||
|
||||
std::string Door::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -149,7 +150,7 @@ namespace MWClass
|
|||
|
||||
bool Door::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -157,7 +158,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Door::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,18 +3,19 @@
|
|||
|
||||
#include <components/esm/loadingr.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -22,7 +23,7 @@ namespace MWClass
|
|||
{
|
||||
void Ingredient::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -38,7 +39,7 @@ namespace MWClass
|
|||
|
||||
void Ingredient::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
const std::string &model = ref->base->model;
|
||||
|
@ -50,7 +51,7 @@ namespace MWClass
|
|||
|
||||
std::string Ingredient::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -67,7 +68,7 @@ namespace MWClass
|
|||
|
||||
std::string Ingredient::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -75,7 +76,7 @@ namespace MWClass
|
|||
|
||||
int Ingredient::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -100,7 +101,7 @@ namespace MWClass
|
|||
|
||||
std::string Ingredient::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -108,7 +109,7 @@ namespace MWClass
|
|||
|
||||
bool Ingredient::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -116,7 +117,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Ingredient::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
|
||||
#include <components/esm/loadligh.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/nullaction.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
@ -20,12 +20,13 @@
|
|||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
void Light::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -47,7 +48,7 @@ namespace MWClass
|
|||
|
||||
void Light::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -65,7 +66,7 @@ namespace MWClass
|
|||
|
||||
std::string Light::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
if (ref->base->model.empty())
|
||||
|
@ -77,7 +78,7 @@ namespace MWClass
|
|||
boost::shared_ptr<MWWorld::Action> Light::activate (const MWWorld::Ptr& ptr,
|
||||
const MWWorld::Ptr& actor) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
if (!(ref->base->data.flags & ESM::Light::Carry))
|
||||
|
@ -91,7 +92,7 @@ namespace MWClass
|
|||
|
||||
std::string Light::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -99,7 +100,7 @@ namespace MWClass
|
|||
|
||||
std::pair<std::vector<int>, bool> Light::getEquipmentSlots (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
std::vector<int> slots;
|
||||
|
@ -112,7 +113,7 @@ namespace MWClass
|
|||
|
||||
int Light::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -138,7 +139,7 @@ namespace MWClass
|
|||
|
||||
std::string Light::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -146,7 +147,7 @@ namespace MWClass
|
|||
|
||||
bool Light::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -154,7 +155,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Light::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,19 +3,21 @@
|
|||
|
||||
#include <components/esm/loadlocks.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -23,7 +25,7 @@ namespace MWClass
|
|||
{
|
||||
void Lockpick::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -39,7 +41,7 @@ namespace MWClass
|
|||
|
||||
void Lockpick::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
|
||||
|
@ -54,7 +56,7 @@ namespace MWClass
|
|||
|
||||
std::string Lockpick::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -71,7 +73,7 @@ namespace MWClass
|
|||
|
||||
std::string Lockpick::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -88,7 +90,7 @@ namespace MWClass
|
|||
|
||||
int Lockpick::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -113,7 +115,7 @@ namespace MWClass
|
|||
|
||||
std::string Lockpick::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -121,7 +123,7 @@ namespace MWClass
|
|||
|
||||
bool Lockpick::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -129,7 +131,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Lockpick::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -5,18 +5,19 @@
|
|||
|
||||
#include <components/esm/loadmisc.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -26,7 +27,7 @@ namespace MWClass
|
|||
{
|
||||
void Miscellaneous::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -42,7 +43,7 @@ namespace MWClass
|
|||
|
||||
void Miscellaneous::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
|
||||
|
@ -56,7 +57,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -73,7 +74,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -81,7 +82,7 @@ namespace MWClass
|
|||
|
||||
int Miscellaneous::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -96,7 +97,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getUpSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
||||
|
@ -108,7 +109,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getDownSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
||||
|
@ -120,7 +121,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -128,7 +129,7 @@ namespace MWClass
|
|||
|
||||
bool Miscellaneous::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -136,7 +137,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Miscellaneous::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
|
||||
#include <components/esm/loadnpc.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwmechanics/creaturestats.hpp"
|
||||
#include "../mwmechanics/npcstats.hpp"
|
||||
#include "../mwmechanics/movement.hpp"
|
||||
|
@ -16,13 +19,15 @@
|
|||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontalk.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/customdata.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwrender/actors.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -53,7 +58,7 @@ namespace MWClass
|
|||
{
|
||||
std::auto_ptr<CustomData> data (new CustomData);
|
||||
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref = ptr.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC> *ref = ptr.get<ESM::NPC>();
|
||||
|
||||
// NPC stats
|
||||
if (!ref->base->faction.empty())
|
||||
|
@ -62,11 +67,11 @@ namespace MWClass
|
|||
boost::algorithm::to_lower(faction);
|
||||
if(ref->base->npdt52.gold != -10)
|
||||
{
|
||||
data->mNpcStats.mFactionRank[faction] = (int)ref->base->npdt52.rank;
|
||||
data->mNpcStats.getFactionRanks()[faction] = (int)ref->base->npdt52.rank;
|
||||
}
|
||||
else
|
||||
{
|
||||
data->mNpcStats.mFactionRank[faction] = (int)ref->base->npdt12.rank;
|
||||
data->mNpcStats.getFactionRanks()[faction] = (int)ref->base->npdt12.rank;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,7 +79,7 @@ namespace MWClass
|
|||
if(ref->base->npdt52.gold != -10)
|
||||
{
|
||||
for (int i=0; i<27; ++i)
|
||||
data->mNpcStats.mSkill[i].setBase (ref->base->npdt52.skills[i]);
|
||||
data->mNpcStats.getSkill (i).setBase (ref->base->npdt52.skills[i]);
|
||||
|
||||
data->mCreatureStats.mAttributes[0].set (ref->base->npdt52.strength);
|
||||
data->mCreatureStats.mAttributes[1].set (ref->base->npdt52.intelligence);
|
||||
|
@ -107,7 +112,7 @@ namespace MWClass
|
|||
|
||||
std::string Npc::getId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
return ref->base->mId;
|
||||
|
@ -120,7 +125,7 @@ namespace MWClass
|
|||
|
||||
void Npc::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -138,7 +143,7 @@ namespace MWClass
|
|||
|
||||
std::string Npc::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -182,7 +187,7 @@ namespace MWClass
|
|||
|
||||
std::string Npc::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -196,12 +201,12 @@ namespace MWClass
|
|||
{
|
||||
case Run:
|
||||
|
||||
stats.mForceRun = force;
|
||||
stats.setMovementFlag (MWMechanics::NpcStats::Flag_ForceRun, force);
|
||||
break;
|
||||
|
||||
case Sneak:
|
||||
|
||||
stats.mForceSneak = force;
|
||||
stats.setMovementFlag (MWMechanics::NpcStats::Flag_ForceSneak, force);
|
||||
break;
|
||||
|
||||
case Combat:
|
||||
|
@ -218,17 +223,18 @@ namespace MWClass
|
|||
{
|
||||
case Run:
|
||||
|
||||
stats.mRun = set;
|
||||
stats.setMovementFlag (MWMechanics::NpcStats::Flag_Run, set);
|
||||
break;
|
||||
|
||||
case Sneak:
|
||||
|
||||
stats.mSneak = set;
|
||||
stats.setMovementFlag (MWMechanics::NpcStats::Flag_Sneak, set);
|
||||
break;
|
||||
|
||||
case Combat:
|
||||
|
||||
stats.mCombat = set;
|
||||
// Combat stance ignored for now; need to be determined based on draw state instead of
|
||||
// being maunally set.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -241,21 +247,21 @@ namespace MWClass
|
|||
{
|
||||
case Run:
|
||||
|
||||
if (!ignoreForce && stats.mForceRun)
|
||||
if (!ignoreForce && stats.getMovementFlag (MWMechanics::NpcStats::Flag_ForceRun))
|
||||
return true;
|
||||
|
||||
return stats.mRun;
|
||||
return stats.getMovementFlag (MWMechanics::NpcStats::Flag_Run);
|
||||
|
||||
case Sneak:
|
||||
|
||||
if (!ignoreForce && stats.mForceSneak)
|
||||
if (!ignoreForce && stats.getMovementFlag (MWMechanics::NpcStats::Flag_ForceSneak))
|
||||
return true;
|
||||
|
||||
return stats.mSneak;
|
||||
return stats.getMovementFlag (MWMechanics::NpcStats::Flag_Sneak);
|
||||
|
||||
case Combat:
|
||||
|
||||
return stats.mCombat;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -302,7 +308,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Npc::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,18 +3,19 @@
|
|||
|
||||
#include <components/esm/loadalch.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -22,7 +23,7 @@ namespace MWClass
|
|||
{
|
||||
void Potion::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -38,7 +39,7 @@ namespace MWClass
|
|||
|
||||
void Potion::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
|
||||
|
@ -52,7 +53,7 @@ namespace MWClass
|
|||
|
||||
std::string Potion::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -69,7 +70,7 @@ namespace MWClass
|
|||
|
||||
std::string Potion::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -77,7 +78,7 @@ namespace MWClass
|
|||
|
||||
int Potion::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -102,7 +103,7 @@ namespace MWClass
|
|||
|
||||
std::string Potion::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -110,7 +111,7 @@ namespace MWClass
|
|||
|
||||
bool Potion::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -118,7 +119,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Potion::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,19 +3,21 @@
|
|||
|
||||
#include <components/esm/loadlocks.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -23,7 +25,7 @@ namespace MWClass
|
|||
{
|
||||
void Probe::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -39,7 +41,7 @@ namespace MWClass
|
|||
|
||||
void Probe::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
|
||||
|
@ -54,7 +56,7 @@ namespace MWClass
|
|||
|
||||
std::string Probe::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -70,7 +72,7 @@ namespace MWClass
|
|||
|
||||
std::string Probe::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -87,7 +89,7 @@ namespace MWClass
|
|||
|
||||
int Probe::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -112,7 +114,7 @@ namespace MWClass
|
|||
|
||||
std::string Probe::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -120,7 +122,7 @@ namespace MWClass
|
|||
|
||||
bool Probe::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -128,7 +130,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Probe::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,17 +3,19 @@
|
|||
|
||||
#include <components/esm/loadlocks.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -21,7 +23,7 @@ namespace MWClass
|
|||
{
|
||||
void Repair::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -37,7 +39,7 @@ namespace MWClass
|
|||
|
||||
void Repair::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
|
||||
|
@ -51,7 +53,7 @@ namespace MWClass
|
|||
|
||||
std::string Repair::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -68,7 +70,7 @@ namespace MWClass
|
|||
|
||||
std::string Repair::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -76,7 +78,7 @@ namespace MWClass
|
|||
|
||||
int Repair::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -101,7 +103,7 @@ namespace MWClass
|
|||
|
||||
std::string Repair::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -109,7 +111,7 @@ namespace MWClass
|
|||
|
||||
bool Repair::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -117,7 +119,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Repair::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -4,14 +4,16 @@
|
|||
#include <components/esm/loadstat.hpp>
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
void Static::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Static, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Static> *ref =
|
||||
ptr.get<ESM::Static>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -27,7 +29,7 @@ namespace MWClass
|
|||
|
||||
void Static::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Static, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Static> *ref =
|
||||
ptr.get<ESM::Static>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
|
|
@ -3,20 +3,21 @@
|
|||
|
||||
#include <components/esm/loadweap.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
@ -24,7 +25,7 @@ namespace MWClass
|
|||
{
|
||||
void Weapon::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -40,7 +41,7 @@ namespace MWClass
|
|||
|
||||
void Weapon::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
|
||||
|
@ -54,7 +55,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -76,7 +77,7 @@ namespace MWClass
|
|||
|
||||
int Weapon::getItemMaxHealth (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->data.health;
|
||||
|
@ -84,7 +85,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -92,7 +93,7 @@ namespace MWClass
|
|||
|
||||
std::pair<std::vector<int>, bool> Weapon::getEquipmentSlots (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
std::vector<int> slots;
|
||||
|
@ -116,7 +117,7 @@ namespace MWClass
|
|||
|
||||
int Weapon::getEquipmentSkill (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
const int size = 12;
|
||||
|
@ -146,7 +147,7 @@ namespace MWClass
|
|||
|
||||
int Weapon::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -161,7 +162,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getUpSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
int type = ref->base->data.type;
|
||||
|
@ -207,7 +208,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getDownSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
int type = ref->base->data.type;
|
||||
|
@ -253,7 +254,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -261,7 +262,7 @@ namespace MWClass
|
|||
|
||||
bool Weapon::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -269,7 +270,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Weapon::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -351,7 +352,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getEnchantment (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->enchant;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/refdata.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/containerstore.hpp"
|
||||
|
@ -121,24 +121,24 @@ namespace
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
bool checkGlobal (char comp, const std::string& name, T value, MWWorld::World& world)
|
||||
bool checkGlobal (char comp, const std::string& name, T value)
|
||||
{
|
||||
switch (world.getGlobalVariableType (name))
|
||||
switch (MWBase::Environment::get().getWorld()->getGlobalVariableType (name))
|
||||
{
|
||||
case 's':
|
||||
return selectCompare (comp, world.getGlobalVariable (name).mShort, value);
|
||||
return selectCompare (comp, MWBase::Environment::get().getWorld()->getGlobalVariable (name).mShort, value);
|
||||
|
||||
case 'l':
|
||||
|
||||
return selectCompare (comp, world.getGlobalVariable (name).mLong, value);
|
||||
return selectCompare (comp, MWBase::Environment::get().getWorld()->getGlobalVariable (name).mLong, value);
|
||||
|
||||
case 'f':
|
||||
|
||||
return selectCompare (comp, world.getGlobalVariable (name).mFloat, value);
|
||||
return selectCompare (comp, MWBase::Environment::get().getWorld()->getGlobalVariable (name).mFloat, value);
|
||||
|
||||
case ' ':
|
||||
|
||||
world.getGlobalVariable (name); // trigger exception
|
||||
MWBase::Environment::get().getWorld()->getGlobalVariable (name); // trigger exception
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -203,10 +203,10 @@ namespace MWDialogue
|
|||
MWMechanics::NpcStats PCstats = MWWorld::Class::get(MWBase::Environment::get().getWorld()->getPlayer().getPlayer()).getNpcStats(MWBase::Environment::get().getWorld()->getPlayer().getPlayer());
|
||||
MWMechanics::NpcStats NPCstats = MWWorld::Class::get(actor).getNpcStats(actor);
|
||||
int sameFaction = 0;
|
||||
if(!NPCstats.mFactionRank.empty())
|
||||
if(!NPCstats.getFactionRanks().empty())
|
||||
{
|
||||
std::string NPCFaction = NPCstats.mFactionRank.begin()->first;
|
||||
if(PCstats.mFactionRank.find(toLower(NPCFaction)) != PCstats.mFactionRank.end()) sameFaction = 1;
|
||||
std::string NPCFaction = NPCstats.getFactionRanks().begin()->first;
|
||||
if(PCstats.getFactionRanks().find(toLower(NPCFaction)) != PCstats.getFactionRanks().end()) sameFaction = 1;
|
||||
}
|
||||
if(!selectCompare<int,int>(comp,sameFaction,select.i)) return false;
|
||||
}
|
||||
|
@ -309,12 +309,12 @@ namespace MWDialogue
|
|||
if (select.type==ESM::VT_Short || select.type==ESM::VT_Int ||
|
||||
select.type==ESM::VT_Long)
|
||||
{
|
||||
if (!checkGlobal (comp, toLower (name), select.i, *MWBase::Environment::get().getWorld()))
|
||||
if (!checkGlobal (comp, toLower (name), select.i))
|
||||
return false;
|
||||
}
|
||||
else if (select.type==ESM::VT_Float)
|
||||
{
|
||||
if (!checkGlobal (comp, toLower (name), select.f, *MWBase::Environment::get().getWorld()))
|
||||
if (!checkGlobal (comp, toLower (name), select.f))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -392,7 +392,7 @@ namespace MWDialogue
|
|||
|
||||
if(select.type==ESM::VT_Int)
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* npc = actor.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC>* npc = actor.get<ESM::NPC>();
|
||||
int isFaction = int(toLower(npc->base->faction) == toLower(name));
|
||||
if(selectCompare<int,int>(comp,!isFaction,select.i))
|
||||
return false;
|
||||
|
@ -409,7 +409,7 @@ namespace MWDialogue
|
|||
|
||||
if(select.type==ESM::VT_Int)
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* npc = actor.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC>* npc = actor.get<ESM::NPC>();
|
||||
int isClass = int(toLower(npc->base->cls) == toLower(name));
|
||||
if(selectCompare<int,int>(comp,!isClass,select.i))
|
||||
return false;
|
||||
|
@ -426,7 +426,7 @@ namespace MWDialogue
|
|||
|
||||
if(select.type==ESM::VT_Int)
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* npc = actor.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC>* npc = actor.get<ESM::NPC>();
|
||||
int isRace = int(toLower(npc->base->race) == toLower(name));
|
||||
if(selectCompare<int,int>(comp,!isRace,select.i))
|
||||
return false;
|
||||
|
@ -493,7 +493,7 @@ namespace MWDialogue
|
|||
if (isCreature)
|
||||
return false;
|
||||
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *cellRef = actor.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC> *cellRef = actor.get<ESM::NPC>();
|
||||
|
||||
if (!cellRef)
|
||||
return false;
|
||||
|
@ -508,7 +508,7 @@ namespace MWDialogue
|
|||
if (isCreature)
|
||||
return false;
|
||||
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *cellRef = actor.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC> *cellRef = actor.get<ESM::NPC>();
|
||||
|
||||
if (!cellRef)
|
||||
return false;
|
||||
|
@ -525,8 +525,8 @@ namespace MWDialogue
|
|||
|
||||
//MWWorld::Class npcClass = MWWorld::Class::get(actor);
|
||||
MWMechanics::NpcStats stats = MWWorld::Class::get(actor).getNpcStats(actor);
|
||||
std::map<std::string,int>::iterator it = stats.mFactionRank.find(toLower(info.npcFaction));
|
||||
if(it!=stats.mFactionRank.end())
|
||||
std::map<std::string,int>::iterator it = stats.getFactionRanks().find(toLower(info.npcFaction));
|
||||
if(it!=stats.getFactionRanks().end())
|
||||
{
|
||||
//check rank
|
||||
if(it->second < (int)info.data.rank) return false;
|
||||
|
@ -542,8 +542,8 @@ namespace MWDialogue
|
|||
if(!info.pcFaction.empty())
|
||||
{
|
||||
MWMechanics::NpcStats stats = MWWorld::Class::get(MWBase::Environment::get().getWorld()->getPlayer().getPlayer()).getNpcStats(MWBase::Environment::get().getWorld()->getPlayer().getPlayer());
|
||||
std::map<std::string,int>::iterator it = stats.mFactionRank.find(toLower(info.pcFaction));
|
||||
if(it!=stats.mFactionRank.end())
|
||||
std::map<std::string,int>::iterator it = stats.getFactionRanks().find(toLower(info.pcFaction));
|
||||
if(it!=stats.getFactionRanks().end())
|
||||
{
|
||||
//check rank
|
||||
if(it->second < (int)info.data.PCrank) return false;
|
||||
|
@ -558,7 +558,7 @@ namespace MWDialogue
|
|||
//check gender
|
||||
if (!isCreature)
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* npc = actor.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC>* npc = actor.get<ESM::NPC>();
|
||||
if(npc->base->flags&npc->base->Female)
|
||||
{
|
||||
if(static_cast<int> (info.data.gender)==0) return false;
|
||||
|
@ -706,7 +706,7 @@ namespace MWDialogue
|
|||
}
|
||||
return false;
|
||||
}
|
||||
catch (const Compiler::SourceException& error)
|
||||
catch (const Compiler::SourceException& /* error */)
|
||||
{
|
||||
// error has already been reported via error handler
|
||||
}
|
||||
|
@ -771,13 +771,13 @@ namespace MWDialogue
|
|||
int services = 0;
|
||||
if (mActor.getTypeName() == typeid(ESM::NPC).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* ref = mActor.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC>* ref = mActor.get<ESM::NPC>();
|
||||
if (ref->base->hasAI)
|
||||
services = ref->base->AI.services;
|
||||
}
|
||||
else if (mActor.getTypeName() == typeid(ESM::Creature).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData>* ref = mActor.get<ESM::Creature>();
|
||||
MWWorld::LiveCellRef<ESM::Creature>* ref = mActor.get<ESM::Creature>();
|
||||
if (ref->base->hasAI)
|
||||
services = ref->base->AI.services;
|
||||
}
|
||||
|
@ -903,13 +903,13 @@ namespace MWDialogue
|
|||
|
||||
std::string factionID("");
|
||||
MWMechanics::NpcStats stats = MWWorld::Class::get(mActor).getNpcStats(mActor);
|
||||
if(stats.mFactionRank.empty())
|
||||
if(stats.getFactionRanks().empty())
|
||||
{
|
||||
std::cout << "No faction for this actor!";
|
||||
}
|
||||
else
|
||||
{
|
||||
factionID = stats.mFactionRank.begin()->first;
|
||||
factionID = stats.getFactionRanks().begin()->first;
|
||||
}
|
||||
return factionID;
|
||||
}
|
||||
|
|
|
@ -2,12 +2,11 @@
|
|||
#include "journal.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/messagebox.hpp"
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
|
||||
namespace MWDialogue
|
||||
{
|
||||
Quest& Journal::getQuest (const std::string& id)
|
||||
|
@ -30,14 +29,13 @@ namespace MWDialogue
|
|||
|
||||
void Journal::addEntry (const std::string& id, int index)
|
||||
{
|
||||
StampedJournalEntry entry =
|
||||
StampedJournalEntry::makeFromQuest (id, index, *MWBase::Environment::get().getWorld());
|
||||
StampedJournalEntry entry = StampedJournalEntry::makeFromQuest (id, index);
|
||||
|
||||
mJournal.push_back (entry);
|
||||
|
||||
Quest& quest = getQuest (id);
|
||||
|
||||
quest.addEntry (entry, *MWBase::Environment::get().getWorld()); // we are doing slicing on purpose here
|
||||
quest.addEntry (entry); // we are doing slicing on purpose here
|
||||
|
||||
std::vector<std::string> empty;
|
||||
std::string notification = MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sJournalEntry")->str;
|
||||
|
@ -48,7 +46,7 @@ namespace MWDialogue
|
|||
{
|
||||
Quest& quest = getQuest (id);
|
||||
|
||||
quest.setIndex (index, *MWBase::Environment::get().getWorld());
|
||||
quest.setIndex (index);
|
||||
}
|
||||
|
||||
void Journal::addTopic (const std::string& topicId, const std::string& infoId)
|
||||
|
@ -63,7 +61,7 @@ namespace MWDialogue
|
|||
iter = result.first;
|
||||
}
|
||||
|
||||
iter->second.addEntry (JournalEntry (topicId, infoId), *MWBase::Environment::get().getWorld());
|
||||
iter->second.addEntry (JournalEntry (topicId, infoId));
|
||||
}
|
||||
|
||||
int Journal::getJournalIndex (const std::string& id) const
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
namespace MWDialogue
|
||||
{
|
||||
|
@ -27,16 +28,14 @@ namespace MWDialogue
|
|||
throw std::runtime_error ("unknown info ID " + mInfoId + " for topic " + mTopic);
|
||||
}
|
||||
|
||||
JournalEntry JournalEntry::makeFromQuest (const std::string& topic, int index,
|
||||
const MWWorld::World& world)
|
||||
JournalEntry JournalEntry::makeFromQuest (const std::string& topic, int index)
|
||||
{
|
||||
return JournalEntry (topic, idFromIndex (topic, index, world));
|
||||
return JournalEntry (topic, idFromIndex (topic, index));
|
||||
}
|
||||
|
||||
std::string JournalEntry::idFromIndex (const std::string& topic, int index,
|
||||
const MWWorld::World& world)
|
||||
std::string JournalEntry::idFromIndex (const std::string& topic, int index)
|
||||
{
|
||||
const ESM::Dialogue *dialogue = world.getStore().dialogs.find (topic);
|
||||
const ESM::Dialogue *dialogue = MWBase::Environment::get().getWorld()->getStore().dialogs.find (topic);
|
||||
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin());
|
||||
iter!=dialogue->mInfo.end(); ++iter)
|
||||
|
@ -57,13 +56,12 @@ namespace MWDialogue
|
|||
: JournalEntry (topic, infoId), mDay (day), mMonth (month), mDayOfMonth (dayOfMonth)
|
||||
{}
|
||||
|
||||
StampedJournalEntry StampedJournalEntry::makeFromQuest (const std::string& topic, int index,
|
||||
const MWWorld::World& world)
|
||||
StampedJournalEntry StampedJournalEntry::makeFromQuest (const std::string& topic, int index)
|
||||
{
|
||||
int day = world.getGlobalVariable ("dayspassed").mLong;
|
||||
int month = world.getGlobalVariable ("day").mLong;
|
||||
int dayOfMonth = world.getGlobalVariable ("month").mLong;
|
||||
int day = MWBase::Environment::get().getWorld()->getGlobalVariable ("dayspassed").mLong;
|
||||
int month = MWBase::Environment::get().getWorld()->getGlobalVariable ("day").mLong;
|
||||
int dayOfMonth = MWBase::Environment::get().getWorld()->getGlobalVariable ("month").mLong;
|
||||
|
||||
return StampedJournalEntry (topic, idFromIndex (topic, index, world), day, month, dayOfMonth);
|
||||
return StampedJournalEntry (topic, idFromIndex (topic, index), day, month, dayOfMonth);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,11 +8,6 @@ namespace ESMS
|
|||
struct ESMStore;
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class World;
|
||||
}
|
||||
|
||||
namespace MWDialogue
|
||||
{
|
||||
/// \brief A quest or dialogue entry
|
||||
|
@ -27,11 +22,9 @@ namespace MWDialogue
|
|||
|
||||
std::string getText (const ESMS::ESMStore& store) const;
|
||||
|
||||
static JournalEntry makeFromQuest (const std::string& topic, int index,
|
||||
const MWWorld::World& world);
|
||||
static JournalEntry makeFromQuest (const std::string& topic, int index);
|
||||
|
||||
static std::string idFromIndex (const std::string& topic, int index,
|
||||
const MWWorld::World& world);
|
||||
static std::string idFromIndex (const std::string& topic, int index);
|
||||
};
|
||||
|
||||
/// \biref A quest entry with a timestamp.
|
||||
|
@ -46,8 +39,7 @@ namespace MWDialogue
|
|||
StampedJournalEntry (const std::string& topic, const std::string& infoId,
|
||||
int day, int month, int dayOfMonth);
|
||||
|
||||
static StampedJournalEntry makeFromQuest (const std::string& topic, int index,
|
||||
const MWWorld::World& world);
|
||||
static StampedJournalEntry makeFromQuest (const std::string& topic, int index);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
namespace MWDialogue
|
||||
{
|
||||
|
@ -15,9 +16,9 @@ namespace MWDialogue
|
|||
: Topic (topic), mIndex (0), mFinished (false)
|
||||
{}
|
||||
|
||||
const std::string Quest::getName (const MWWorld::World& world) const
|
||||
const std::string Quest::getName() const
|
||||
{
|
||||
const ESM::Dialogue *dialogue = world.getStore().dialogs.find (mTopic);
|
||||
const ESM::Dialogue *dialogue = MWBase::Environment::get().getWorld()->getStore().dialogs.find (mTopic);
|
||||
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin());
|
||||
iter!=dialogue->mInfo.end(); ++iter)
|
||||
|
@ -32,9 +33,9 @@ namespace MWDialogue
|
|||
return mIndex;
|
||||
}
|
||||
|
||||
void Quest::setIndex (int index, const MWWorld::World& world)
|
||||
void Quest::setIndex (int index)
|
||||
{
|
||||
const ESM::Dialogue *dialogue = world.getStore().dialogs.find (mTopic);
|
||||
const ESM::Dialogue *dialogue = MWBase::Environment::get().getWorld()->getStore().dialogs.find (mTopic);
|
||||
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin());
|
||||
iter!=dialogue->mInfo.end(); ++iter)
|
||||
|
@ -58,11 +59,11 @@ namespace MWDialogue
|
|||
return mFinished;
|
||||
}
|
||||
|
||||
void Quest::addEntry (const JournalEntry& entry, const MWWorld::World& world)
|
||||
void Quest::addEntry (const JournalEntry& entry)
|
||||
{
|
||||
int index = -1;
|
||||
|
||||
const ESM::Dialogue *dialogue = world.getStore().dialogs.find (entry.mTopic);
|
||||
const ESM::Dialogue *dialogue = MWBase::Environment::get().getWorld()->getStore().dialogs.find (entry.mTopic);
|
||||
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin());
|
||||
iter!=dialogue->mInfo.end(); ++iter)
|
||||
|
@ -75,7 +76,7 @@ namespace MWDialogue
|
|||
if (index==-1)
|
||||
throw std::runtime_error ("unknown journal entry for topic " + mTopic);
|
||||
|
||||
setIndex (index, world);
|
||||
setIndex (index);
|
||||
|
||||
for (TEntryIter iter (mEntries.begin()); iter!=mEntries.end(); ++iter)
|
||||
if (*iter==entry.mInfoId)
|
||||
|
|
|
@ -17,17 +17,17 @@ namespace MWDialogue
|
|||
|
||||
Quest (const std::string& topic);
|
||||
|
||||
const std::string getName (const MWWorld::World& world) const;
|
||||
const std::string getName() const;
|
||||
///< May be an empty string
|
||||
|
||||
int getIndex() const;
|
||||
|
||||
void setIndex (int index, const MWWorld::World& world);
|
||||
void setIndex (int index);
|
||||
///< Calling this function with a non-existant index while throw an exception.
|
||||
|
||||
bool isFinished() const;
|
||||
|
||||
virtual void addEntry (const JournalEntry& entry, const MWWorld::World& world);
|
||||
virtual void addEntry (const JournalEntry& entry);
|
||||
///< Add entry and adjust index accordingly.
|
||||
///
|
||||
/// \note Redundant entries are ignored, but the index is still adjusted.
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
|
||||
namespace MWDialogue
|
||||
{
|
||||
Topic::Topic()
|
||||
|
@ -17,7 +15,7 @@ namespace MWDialogue
|
|||
Topic::~Topic()
|
||||
{}
|
||||
|
||||
void Topic::addEntry (const JournalEntry& entry, const MWWorld::World& world)
|
||||
void Topic::addEntry (const JournalEntry& entry)
|
||||
{
|
||||
if (entry.mTopic!=mTopic)
|
||||
throw std::runtime_error ("topic does not match: " + mTopic);
|
||||
|
|
|
@ -6,11 +6,6 @@
|
|||
|
||||
#include "journalentry.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class World;
|
||||
}
|
||||
|
||||
namespace MWDialogue
|
||||
{
|
||||
/// \brief Collection of seen responses for a topic
|
||||
|
@ -34,7 +29,7 @@ namespace MWDialogue
|
|||
|
||||
virtual ~Topic();
|
||||
|
||||
virtual void addEntry (const JournalEntry& entry, const MWWorld::World& world);
|
||||
virtual void addEntry (const JournalEntry& entry);
|
||||
///< Add entry
|
||||
///
|
||||
/// \note Redundant entries are ignored.
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/manualref.hpp"
|
||||
#include "../mwworld/containerstore.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
|
@ -27,7 +29,7 @@ namespace
|
|||
namespace MWGui
|
||||
{
|
||||
AlchemyWindow::AlchemyWindow(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_alchemy_window_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_alchemy_window.layout", parWindowManager)
|
||||
, ContainerBase(0)
|
||||
{
|
||||
getWidget(mCreateButton, "CreateButton");
|
||||
|
@ -275,7 +277,7 @@ namespace MWGui
|
|||
for (MWWorld::ContainerStoreIterator it(store.begin(MWWorld::ContainerStore::Type_Apparatus));
|
||||
it != store.end(); ++it)
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData>* ref = it->get<ESM::Apparatus>();
|
||||
MWWorld::LiveCellRef<ESM::Apparatus>* ref = it->get<ESM::Apparatus>();
|
||||
if (ref->base->data.type == ESM::Apparatus::Albemic
|
||||
&& (bestAlbemic.isEmpty() || ref->base->data.quality > bestAlbemic.get<ESM::Apparatus>()->base->data.quality))
|
||||
bestAlbemic = *it;
|
||||
|
@ -420,7 +422,7 @@ namespace MWGui
|
|||
continue;
|
||||
|
||||
// add the effects of this ingredient to list of effects
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData>* ref = ingredient->getUserData<MWWorld::Ptr>()->get<ESM::Ingredient>();
|
||||
MWWorld::LiveCellRef<ESM::Ingredient>* ref = ingredient->getUserData<MWWorld::Ptr>()->get<ESM::Ingredient>();
|
||||
for (int i=0; i<4; ++i)
|
||||
{
|
||||
if (ref->base->data.effectID[i] < 0)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "window_base.hpp"
|
||||
#include "container.hpp"
|
||||
#include "widgets.hpp"
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ using namespace MWGui;
|
|||
using namespace Widgets;
|
||||
|
||||
BirthDialog::BirthDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_birth_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_birth.layout", parWindowManager)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
/*
|
||||
This file contains the dialog for choosing a birth sign.
|
||||
Layout is defined by resources/mygui/openmw_chargen_race_layout.xml.
|
||||
Layout is defined by resources/mygui/openmw_chargen_race.layout.
|
||||
*/
|
||||
|
||||
namespace MWGui
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
using namespace MWGui;
|
||||
|
||||
BookWindow::BookWindow (WindowManager& parWindowManager) :
|
||||
WindowBase("openmw_book_layout.xml", parWindowManager)
|
||||
WindowBase("openmw_book.layout", parWindowManager)
|
||||
{
|
||||
getWidget(mCloseButton, "CloseButton");
|
||||
mCloseButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BookWindow::onCloseButtonClicked);
|
||||
|
@ -55,8 +55,7 @@ void BookWindow::open (MWWorld::Ptr book)
|
|||
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("book open", 1.0, 1.0);
|
||||
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
mBook.get<ESM::Book>();
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref = mBook.get<ESM::Book>();
|
||||
|
||||
BookTextParser parser;
|
||||
std::vector<std::string> results = parser.split(ref->base->text, mLeftPage->getSize().width, mLeftPage->getSize().height);
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
|
||||
#include "window_manager.hpp"
|
||||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwmechanics/mechanicsmanager.hpp"
|
||||
#include "../mwmechanics/stat.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ using namespace MWGui;
|
|||
/* GenerateClassResultDialog */
|
||||
|
||||
GenerateClassResultDialog::GenerateClassResultDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_generate_class_result_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_generate_class_result.layout", parWindowManager)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
@ -77,7 +77,7 @@ void GenerateClassResultDialog::onBackClicked(MyGUI::Widget* _sender)
|
|||
/* PickClassDialog */
|
||||
|
||||
PickClassDialog::PickClassDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_class_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_class.layout", parWindowManager)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
@ -283,7 +283,7 @@ void InfoBoxDialog::layoutVertically(MyGUI::WidgetPtr widget, int margin)
|
|||
}
|
||||
|
||||
InfoBoxDialog::InfoBoxDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_infobox_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_infobox.layout", parWindowManager)
|
||||
, currentButton(-1)
|
||||
{
|
||||
getWidget(textBox, "TextBox");
|
||||
|
@ -381,7 +381,7 @@ ClassChoiceDialog::ClassChoiceDialog(WindowManager& parWindowManager)
|
|||
/* CreateClassDialog */
|
||||
|
||||
CreateClassDialog::CreateClassDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_create_class_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_create_class.layout", parWindowManager)
|
||||
, specDialog(nullptr)
|
||||
, attribDialog(nullptr)
|
||||
, skillDialog(nullptr)
|
||||
|
@ -703,7 +703,7 @@ void CreateClassDialog::onBackClicked(MyGUI::Widget* _sender)
|
|||
/* SelectSpecializationDialog */
|
||||
|
||||
SelectSpecializationDialog::SelectSpecializationDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_select_specialization_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_select_specialization.layout", parWindowManager)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
@ -768,7 +768,7 @@ void SelectSpecializationDialog::onCancelClicked(MyGUI::Widget* _sender)
|
|||
/* SelectAttributeDialog */
|
||||
|
||||
SelectAttributeDialog::SelectAttributeDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_select_attribute_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_select_attribute.layout", parWindowManager)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
@ -820,7 +820,7 @@ void SelectAttributeDialog::onCancelClicked(MyGUI::Widget* _sender)
|
|||
/* SelectSkillDialog */
|
||||
|
||||
SelectSkillDialog::SelectSkillDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_select_skill_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_select_skill.layout", parWindowManager)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
@ -916,7 +916,7 @@ void SelectSkillDialog::onCancelClicked(MyGUI::Widget* _sender)
|
|||
/* DescriptionDialog */
|
||||
|
||||
DescriptionDialog::DescriptionDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_class_description_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_class_description.layout", parWindowManager)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
/*
|
||||
This file contains the dialogs for choosing a class.
|
||||
Layout is defined by resources/mygui/openmw_chargen_class_layout.xml.
|
||||
Layout is defined by resources/mygui/openmw_chargen_class.layout.
|
||||
*/
|
||||
|
||||
namespace MWGui
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
ConfirmationDialog::ConfirmationDialog(WindowManager& parWindowManager) :
|
||||
WindowBase("openmw_confirmation_dialog_layout.xml", parWindowManager)
|
||||
WindowBase("openmw_confirmation_dialog.layout", parWindowManager)
|
||||
{
|
||||
getWidget(mMessage, "Message");
|
||||
getWidget(mOkButton, "OkButton");
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
#include <components/esm_store/reclists.hpp>
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include <components/compiler/exception.hpp>
|
||||
|
||||
#include "../mwscript/extensions.hpp"
|
||||
|
@ -103,7 +106,7 @@ namespace MWGui
|
|||
}
|
||||
|
||||
Console::Console(int w, int h, const Compiler::Extensions& extensions)
|
||||
: Layout("openmw_console_layout.xml"),
|
||||
: Layout("openmw_console.layout"),
|
||||
mCompilerContext (MWScript::CompilerContext::Type_Console)
|
||||
{
|
||||
setCoord(10,10, w-10, h/2);
|
||||
|
|
|
@ -3,19 +3,23 @@
|
|||
#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/manualref.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/containerstore.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
|
||||
#include "../mwclass/container.hpp"
|
||||
|
||||
#include "../mwinput/inputmanager.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
|
@ -273,7 +277,7 @@ void ContainerBase::onContainerClicked(MyGUI::Widget* _sender)
|
|||
// check the container's Organic flag (if this is a container). container with Organic flag doesn't allow putting items inside
|
||||
if (mPtr.getTypeName() == typeid(ESM::Container).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData>* ref = mPtr.get<ESM::Container>();
|
||||
MWWorld::LiveCellRef<ESM::Container>* ref = mPtr.get<ESM::Container>();
|
||||
if (ref->base->flags & ESM::Container::Organic)
|
||||
{
|
||||
// user notification
|
||||
|
@ -556,7 +560,7 @@ void ContainerBase::addItem(MWWorld::Ptr item, int count)
|
|||
{
|
||||
MWWorld::ContainerStore& containerStore = MWWorld::Class::get(mPtr).getContainerStore(mPtr);
|
||||
|
||||
int origCount = item.getRefData().getCount();
|
||||
int origCount = item.getRefData().getCount();
|
||||
|
||||
item.getRefData().setCount(count);
|
||||
MWWorld::ContainerStoreIterator it = containerStore.add(item);
|
||||
|
@ -592,7 +596,7 @@ MWWorld::ContainerStore& ContainerBase::getContainerStore()
|
|||
|
||||
ContainerWindow::ContainerWindow(WindowManager& parWindowManager,DragAndDrop* dragAndDrop)
|
||||
: ContainerBase(dragAndDrop)
|
||||
, WindowBase("openmw_container_window_layout.xml", parWindowManager)
|
||||
, WindowBase("openmw_container_window.layout", parWindowManager)
|
||||
{
|
||||
getWidget(mTakeButton, "TakeButton");
|
||||
getWidget(mCloseButton, "CloseButton");
|
||||
|
@ -612,12 +616,9 @@ ContainerWindow::ContainerWindow(WindowManager& parWindowManager,DragAndDrop* dr
|
|||
mCloseButton->setCoord(600-20-closeButtonWidth, mCloseButton->getCoord().top, closeButtonWidth, mCloseButton->getCoord().height);
|
||||
mTakeButton->setCoord(600-20-closeButtonWidth-takeButtonWidth-8, mTakeButton->getCoord().top, takeButtonWidth, mTakeButton->getCoord().height);
|
||||
|
||||
int w = MyGUI::RenderManager::getInstance().getViewSize().width;
|
||||
//int h = MyGUI::RenderManager::getInstance().getViewSize().height;
|
||||
|
||||
static_cast<MyGUI::Window*>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &ContainerWindow::onWindowResize);
|
||||
|
||||
setCoord(w-600,0,600,300);
|
||||
setCoord(200,0,600,300);
|
||||
}
|
||||
|
||||
ContainerWindow::~ContainerWindow()
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
CountDialog::CountDialog(WindowManager& parWindowManager) :
|
||||
WindowBase("openmw_count_window_layout.xml", parWindowManager)
|
||||
WindowBase("openmw_count_window.layout", parWindowManager)
|
||||
{
|
||||
getWidget(mSlider, "CountSlider");
|
||||
getWidget(mItemEdit, "ItemEdit");
|
||||
|
@ -77,7 +77,7 @@ namespace MWGui
|
|||
{
|
||||
if (_sender->getCaption() == "")
|
||||
return;
|
||||
|
||||
|
||||
unsigned int count;
|
||||
try
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ std::string::size_type find_str_ci(const std::string& str, const std::string& su
|
|||
|
||||
|
||||
DialogueWindow::DialogueWindow(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_dialogue_window_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_dialogue_window.layout", parWindowManager)
|
||||
, mEnabled(true)
|
||||
, mShowTrade(false)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace MWGui
|
|||
|
||||
/*
|
||||
This file contains the dialouge window
|
||||
Layout is defined by resources/mygui/openmw_dialogue_window_layout.xml.
|
||||
Layout is defined by resources/mygui/openmw_dialogue_window.layout.
|
||||
*/
|
||||
|
||||
namespace MWGui
|
||||
|
|
|
@ -7,11 +7,15 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "../mwgui/widgets.hpp"
|
||||
|
||||
#include "inventorywindow.hpp"
|
||||
#include "window_manager.hpp"
|
||||
#include "container.hpp"
|
||||
|
@ -20,7 +24,7 @@
|
|||
using namespace MWGui;
|
||||
|
||||
HUD::HUD(int width, int height, int fpsLevel, DragAndDrop* dragAndDrop)
|
||||
: Layout("openmw_hud_layout.xml")
|
||||
: Layout("openmw_hud.layout")
|
||||
, health(NULL)
|
||||
, magicka(NULL)
|
||||
, stamina(NULL)
|
||||
|
@ -239,7 +243,7 @@ void HUD::onWorldClicked(MyGUI::Widget* _sender)
|
|||
// drop item into the gameworld
|
||||
MWWorld::Ptr object = *mDragAndDrop->mDraggedWidget->getUserData<MWWorld::Ptr>();
|
||||
|
||||
MWWorld::World* world = MWBase::Environment::get().getWorld();
|
||||
MWBase::World* world = MWBase::Environment::get().getWorld();
|
||||
|
||||
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
||||
MyGUI::IntPoint cursorPosition = MyGUI::InputManager::getInstance().getMousePosition();
|
||||
|
@ -282,7 +286,7 @@ void HUD::onWorldClicked(MyGUI::Widget* _sender)
|
|||
{
|
||||
object = MWBase::Environment::get().getWorld()->getPtrViaHandle(handle);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
catch (std::exception& /* e */)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -308,7 +312,7 @@ void HUD::onWorldMouseOver(MyGUI::Widget* _sender, int x, int y)
|
|||
float mouseX = cursorPosition.left / float(viewSize.width);
|
||||
float mouseY = cursorPosition.top / float(viewSize.height);
|
||||
|
||||
MWWorld::World* world = MWBase::Environment::get().getWorld();
|
||||
MWBase::World* world = MWBase::Environment::get().getWorld();
|
||||
|
||||
// if we can't drop the object at the wanted position, show the "drop on ground" cursor.
|
||||
bool canDrop = world->canPlaceObject(mouseX, mouseY);
|
||||
|
|
|
@ -3,21 +3,24 @@
|
|||
#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <assert.h>
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwclass/container.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/containerstore.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/manualref.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "../mwclass/container.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
#include "widgets.hpp"
|
||||
#include "bookwindow.hpp"
|
||||
|
@ -42,7 +45,7 @@ namespace MWGui
|
|||
|
||||
InventoryWindow::InventoryWindow(WindowManager& parWindowManager,DragAndDrop* dragAndDrop)
|
||||
: ContainerBase(dragAndDrop)
|
||||
, WindowPinnableBase("openmw_inventory_window_layout.xml", parWindowManager)
|
||||
, WindowPinnableBase("openmw_inventory_window.layout", parWindowManager)
|
||||
, mTrading(false)
|
||||
{
|
||||
static_cast<MyGUI::Window*>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &InventoryWindow::onWindowResize);
|
||||
|
@ -171,7 +174,7 @@ namespace MWGui
|
|||
/// \todo scripts
|
||||
|
||||
boost::shared_ptr<MWWorld::Action> action = MWWorld::Class::get(ptr).use(ptr);
|
||||
|
||||
|
||||
action->execute();
|
||||
|
||||
// this is necessary for books/scrolls: if they are already in the player's inventory,
|
||||
|
@ -307,6 +310,9 @@ namespace MWGui
|
|||
&& (type != typeid(ESM::Potion).name()))
|
||||
return;
|
||||
|
||||
if (MWWorld::Class::get(object).getName(object) == "") // objects without name presented to user can never be picked up
|
||||
return;
|
||||
|
||||
// sound
|
||||
std::string sound = MWWorld::Class::get(object).getUpSoundId(object);
|
||||
MWBase::Environment::get().getSoundManager()->playSound(sound, 1, 1);
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
#include "journalwindow.hpp"
|
||||
#include "window_manager.hpp"
|
||||
#include "../mwdialogue/journal.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwdialogue/journal.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
struct book
|
||||
|
@ -80,7 +83,7 @@ book formatText(std::string text,book mBook,int maxLine, int lineSize)
|
|||
|
||||
|
||||
MWGui::JournalWindow::JournalWindow (WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_journal_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_journal.layout", parWindowManager)
|
||||
, lastPos(0)
|
||||
, mVisible(false)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace MWGui
|
|||
{
|
||||
public:
|
||||
MainMenu(int w, int h)
|
||||
: Layout("openmw_mainmenu_layout.xml")
|
||||
: Layout("openmw_mainmenu.layout")
|
||||
{
|
||||
setCoord(0,0,w,h);
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ void LocalMapBase::setPlayerDir(const float x, const float y)
|
|||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
MapWindow::MapWindow(WindowManager& parWindowManager) :
|
||||
MWGui::WindowPinnableBase("openmw_map_window_layout.xml", parWindowManager),
|
||||
MWGui::WindowPinnableBase("openmw_map_window.layout", parWindowManager),
|
||||
mGlobal(false)
|
||||
{
|
||||
setCoord(500,0,320,300);
|
||||
|
|
|
@ -147,7 +147,7 @@ int MessageBoxManager::readPressedButton ()
|
|||
|
||||
|
||||
MessageBox::MessageBox(MessageBoxManager& parMessageBoxManager, const std::string& message)
|
||||
: Layout("openmw_messagebox_layout.xml")
|
||||
: Layout("openmw_messagebox.layout")
|
||||
, mMessageBoxManager(parMessageBoxManager)
|
||||
, cMessage(message)
|
||||
{
|
||||
|
@ -177,7 +177,7 @@ MessageBox::MessageBox(MessageBoxManager& parMessageBoxManager, const std::strin
|
|||
size.height = mHeight = textSize.height + 20; // this is the padding between the text and the box
|
||||
|
||||
mMainWidget->setSize(size);
|
||||
size.width -= 15; // this is to center the text (see messagebox_layout.xml, Widget type="Edit" position="-2 -3 0 0")
|
||||
size.width -= 15; // this is to center the text (see messagebox.layout, Widget type="Edit" position="-2 -3 0 0")
|
||||
mMessageWidget->setSize(size);
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ int MessageBox::getHeight ()
|
|||
|
||||
|
||||
InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxManager, const std::string& message, const std::vector<std::string>& buttons)
|
||||
: Layout("openmw_interactive_messagebox_layout.xml")
|
||||
: Layout("openmw_interactive_messagebox.layout")
|
||||
, mMessageBoxManager(parMessageBoxManager)
|
||||
, mButtonPressed(-1)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace MWGui;
|
|||
using namespace Widgets;
|
||||
|
||||
RaceDialog::RaceDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_race_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_race.layout", parWindowManager)
|
||||
, genderIndex(0)
|
||||
, faceIndex(0)
|
||||
, hairIndex(0)
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
|||
|
||||
/*
|
||||
This file contains the dialog for choosing a race.
|
||||
Layout is defined by resources/mygui/openmw_chargen_race_layout.xml.
|
||||
Layout is defined by resources/mygui/openmw_chargen_race.layout.
|
||||
*/
|
||||
|
||||
namespace MWGui
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#include "referenceinterface.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
ReferenceInterface::ReferenceInterface()
|
||||
|
@ -11,6 +12,10 @@ namespace MWGui
|
|||
{
|
||||
}
|
||||
|
||||
ReferenceInterface::~ReferenceInterface()
|
||||
{
|
||||
}
|
||||
|
||||
void ReferenceInterface::checkReferenceAvailable()
|
||||
{
|
||||
if (mPtr.isEmpty())
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace MWGui
|
|||
{
|
||||
public:
|
||||
ReferenceInterface();
|
||||
virtual ~ReferenceInterface();
|
||||
|
||||
void checkReferenceAvailable(); ///< closes the window, if the MW-reference has become unavailable
|
||||
|
||||
|
@ -22,7 +23,7 @@ namespace MWGui
|
|||
MWWorld::Ptr mPtr;
|
||||
|
||||
private:
|
||||
MWWorld::Ptr::CellStore* mCurrentPlayerCell;
|
||||
MWWorld::CellStore* mCurrentPlayerCell;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ using namespace Widgets;
|
|||
const int ReviewDialog::lineHeight = 18;
|
||||
|
||||
ReviewDialog::ReviewDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_chargen_review_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_chargen_review.layout", parWindowManager)
|
||||
, lastPos(0)
|
||||
{
|
||||
// Centre dialog
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace MWGui
|
|||
|
||||
/*
|
||||
This file contains the dialog for reviewing the generated character.
|
||||
Layout is defined by resources/mygui/openmw_chargen_review_layout.xml.
|
||||
Layout is defined by resources/mygui/openmw_chargen_review.layout.
|
||||
*/
|
||||
|
||||
namespace MWGui
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
using namespace MWGui;
|
||||
|
||||
ScrollWindow::ScrollWindow (WindowManager& parWindowManager) :
|
||||
WindowBase("openmw_scroll_layout.xml", parWindowManager)
|
||||
WindowBase("openmw_scroll.layout", parWindowManager)
|
||||
{
|
||||
getWidget(mTextView, "TextView");
|
||||
|
||||
|
@ -31,8 +31,7 @@ void ScrollWindow::open (MWWorld::Ptr scroll)
|
|||
|
||||
mScroll = scroll;
|
||||
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
mScroll.get<ESM::Book>();
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref = mScroll.get<ESM::Book>();
|
||||
|
||||
BookTextParser parser;
|
||||
MyGUI::IntSize size = parser.parse(ref->base->text, mTextView, 390);
|
||||
|
|
|
@ -6,12 +6,17 @@
|
|||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/math/common_factor_rt.hpp>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwrender/renderingmanager.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "../mwinput/inputmanager.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
|
@ -44,19 +49,37 @@ namespace
|
|||
void parseResolution (int &x, int &y, const std::string& str)
|
||||
{
|
||||
std::vector<std::string> split;
|
||||
boost::algorithm::split (split, str, boost::is_any_of("x"));
|
||||
boost::algorithm::split (split, str, boost::is_any_of("@(x"));
|
||||
assert (split.size() >= 2);
|
||||
boost::trim(split[0]);
|
||||
boost::trim(split[1]);
|
||||
x = boost::lexical_cast<int> (split[0]);
|
||||
y = boost::lexical_cast<int> (split[1]);
|
||||
}
|
||||
|
||||
bool sortResolutions (std::pair<int, int> left, std::pair<int, int> right)
|
||||
{
|
||||
if (left.first == right.first)
|
||||
return left.second > right.second;
|
||||
return left.first > right.first;
|
||||
}
|
||||
|
||||
std::string getAspect (int x, int y)
|
||||
{
|
||||
int gcd = boost::math::gcd (x, y);
|
||||
int xaspect = x / gcd;
|
||||
int yaspect = y / gcd;
|
||||
// special case: 8 : 5 is usually referred to as 16:10
|
||||
if (xaspect == 8 && yaspect == 5)
|
||||
return "16 : 10";
|
||||
return boost::lexical_cast<std::string>(xaspect) + " : " + boost::lexical_cast<std::string>(yaspect);
|
||||
}
|
||||
}
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
SettingsWindow::SettingsWindow(WindowManager& parWindowManager) :
|
||||
WindowBase("openmw_settings_window_layout.xml", parWindowManager)
|
||||
WindowBase("openmw_settings_window.layout", parWindowManager)
|
||||
{
|
||||
getWidget(mOkButton, "OkButton");
|
||||
getWidget(mResolutionList, "ResolutionList");
|
||||
|
@ -111,13 +134,22 @@ namespace MWGui
|
|||
|
||||
// fill resolution list
|
||||
Ogre::RenderSystem* rs = Ogre::Root::getSingleton().getRenderSystem();
|
||||
const Ogre::StringVector& videoModes = rs->getConfigOptions()["Video Mode"].possibleValues;
|
||||
Ogre::StringVector videoModes = rs->getConfigOptions()["Video Mode"].possibleValues;
|
||||
std::vector < std::pair<int, int> > resolutions;
|
||||
for (Ogre::StringVector::const_iterator it=videoModes.begin();
|
||||
it!=videoModes.end(); ++it)
|
||||
{
|
||||
|
||||
int resX, resY;
|
||||
parseResolution (resX, resY, *it);
|
||||
std::string str = boost::lexical_cast<std::string>(resX) + " x " + boost::lexical_cast<std::string>(resY);
|
||||
resolutions.push_back(std::make_pair(resX, resY));
|
||||
}
|
||||
std::sort(resolutions.begin(), resolutions.end(), sortResolutions);
|
||||
for (std::vector < std::pair<int, int> >::const_iterator it=resolutions.begin();
|
||||
it!=resolutions.end(); ++it)
|
||||
{
|
||||
std::string str = boost::lexical_cast<std::string>(it->first) + " x " + boost::lexical_cast<std::string>(it->second)
|
||||
+ " (" + getAspect(it->first,it->second) + ")";
|
||||
|
||||
if (mResolutionList->findItemIndexWith(str) == MyGUI::ITEM_NONE)
|
||||
mResolutionList->addItem(str);
|
||||
|
@ -185,7 +217,6 @@ namespace MWGui
|
|||
dialog->eventOkClicked.clear();
|
||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &SettingsWindow::onResolutionAccept);
|
||||
dialog->eventCancelClicked.clear();
|
||||
dialog->eventCancelClicked += MyGUI::newDelegate(this, &SettingsWindow::onResolutionAccept);
|
||||
}
|
||||
|
||||
void SettingsWindow::onResolutionAccept()
|
||||
|
|
|
@ -4,13 +4,18 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/format.hpp>
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwmechanics/spells.hpp"
|
||||
#include "../mwmechanics/creaturestats.hpp"
|
||||
#include "../mwmechanics/spellsuccess.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
|
@ -39,7 +44,7 @@ namespace
|
|||
namespace MWGui
|
||||
{
|
||||
SpellWindow::SpellWindow(WindowManager& parWindowManager)
|
||||
: WindowPinnableBase("openmw_spell_window_layout.xml", parWindowManager)
|
||||
: WindowPinnableBase("openmw_spell_window.layout", parWindowManager)
|
||||
, mHeight(0)
|
||||
, mWidth(0)
|
||||
{
|
||||
|
|
|
@ -6,10 +6,13 @@
|
|||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwmechanics/mechanicsmanager.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
#include "../mwmechanics/mechanicsmanager.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
#include "tooltips.hpp"
|
||||
|
@ -19,7 +22,7 @@ using namespace MWGui;
|
|||
const int StatsWindow::lineHeight = 18;
|
||||
|
||||
StatsWindow::StatsWindow (WindowManager& parWindowManager)
|
||||
: WindowPinnableBase("openmw_stats_window_layout.xml", parWindowManager)
|
||||
: WindowPinnableBase("openmw_stats_window.layout", parWindowManager)
|
||||
, skillAreaWidget(NULL)
|
||||
, skillClientWidget(NULL)
|
||||
, skillScrollerWidget(NULL)
|
||||
|
@ -267,7 +270,7 @@ void StatsWindow::onFrame ()
|
|||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayer().getPlayer();
|
||||
MWMechanics::NpcStats PCstats = MWWorld::Class::get(player).getNpcStats(player);
|
||||
|
||||
setFactions(PCstats.mFactionRank);
|
||||
setFactions(PCstats.getFactionRanks());
|
||||
|
||||
setBirthSign(MWBase::Environment::get().getWorld()->getPlayer().getBirthsign());
|
||||
|
||||
|
@ -539,7 +542,7 @@ void StatsWindow::updateSkillArea()
|
|||
skillWidgets[skillWidgets.size()-1-i]->setUserString("ToolTipLayout", "TextToolTip");
|
||||
skillWidgets[skillWidgets.size()-1-i]->setUserString("Caption_Text", "#{sSkillsMenuReputationHelp}");
|
||||
}
|
||||
|
||||
|
||||
addValueItem(mWindowManager.getGameSettingString("sBounty", "Bounty"),
|
||||
boost::lexical_cast<std::string>(static_cast<int>(bounty)), "normal", coord1, coord2);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
using namespace MWGui;
|
||||
|
||||
TextInputDialog::TextInputDialog(WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_text_input_layout.xml", parWindowManager)
|
||||
: WindowBase("openmw_text_input.layout", parWindowManager)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
#include "tooltips.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
#include "widgets.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <OgreResourceGroupManager.h>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
#include "window_manager.hpp"
|
||||
#include "widgets.hpp"
|
||||
|
||||
using namespace MWGui;
|
||||
using namespace MyGUI;
|
||||
|
||||
ToolTips::ToolTips(WindowManager* windowManager) :
|
||||
Layout("openmw_tooltips.xml")
|
||||
Layout("openmw_tooltips.layout")
|
||||
, mGameMode(true)
|
||||
, mWindowManager(windowManager)
|
||||
, mFullHelp(false)
|
||||
|
@ -77,7 +81,7 @@ void ToolTips::onFrame(float frameDuration)
|
|||
{
|
||||
mFocusObject = MWBase::Environment::get().getWorld()->getPtrViaHandle(handle);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
catch (std::exception /* & e */)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -392,7 +396,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
|||
|
||||
/**
|
||||
* \todo
|
||||
* the various potion effects should appear in the tooltip depending if the player
|
||||
* the various potion effects should appear in the tooltip depending if the player
|
||||
* has enough skill in alchemy to know about the effects of this potion.
|
||||
*/
|
||||
|
||||
|
@ -564,8 +568,6 @@ void ToolTips::createAttributeToolTip(MyGUI::Widget* widget, int attributeId)
|
|||
if (attributeId == -1)
|
||||
return;
|
||||
|
||||
const ESM::Attribute* attr = MWBase::Environment::get().getWorld()->getStore().attributes.search(attributeId);
|
||||
assert(attr);
|
||||
std::string icon = ESM::Attribute::attributeIcons[attributeId];
|
||||
std::string name = ESM::Attribute::gmstAttributeIds[attributeId];
|
||||
std::string desc = ESM::Attribute::gmstAttributeDescIds[attributeId];
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/manualref.hpp"
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
@ -14,7 +15,7 @@
|
|||
namespace MWGui
|
||||
{
|
||||
TradeWindow::TradeWindow(WindowManager& parWindowManager) :
|
||||
WindowBase("openmw_trade_window_layout.xml", parWindowManager)
|
||||
WindowBase("openmw_trade_window.layout", parWindowManager)
|
||||
, ContainerBase(NULL) // no drag&drop
|
||||
, mCurrentBalance(0)
|
||||
{
|
||||
|
@ -86,7 +87,7 @@ namespace MWGui
|
|||
offerButtonWidth,
|
||||
mOfferButton->getHeight());
|
||||
|
||||
setCoord(400, 0, 400, 300);
|
||||
setCoord(400, 0, 400, 300);
|
||||
|
||||
static_cast<MyGUI::Window*>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &TradeWindow::onWindowResize);
|
||||
}
|
||||
|
@ -161,7 +162,7 @@ namespace MWGui
|
|||
int merchantgold;
|
||||
if (mPtr.getTypeName() == typeid(ESM::NPC).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* ref = mPtr.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC>* ref = mPtr.get<ESM::NPC>();
|
||||
if (ref->base->npdt52.gold == -10)
|
||||
merchantgold = ref->base->npdt12.gold;
|
||||
else
|
||||
|
@ -169,7 +170,7 @@ namespace MWGui
|
|||
}
|
||||
else // ESM::Creature
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData>* ref = mPtr.get<ESM::Creature>();
|
||||
MWWorld::LiveCellRef<ESM::Creature>* ref = mPtr.get<ESM::Creature>();
|
||||
merchantgold = ref->base->data.gold;
|
||||
}
|
||||
if (mCurrentBalance > 0 && merchantgold < mCurrentBalance)
|
||||
|
@ -244,7 +245,7 @@ namespace MWGui
|
|||
int merchantgold;
|
||||
if (mPtr.getTypeName() == typeid(ESM::NPC).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* ref = mPtr.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC>* ref = mPtr.get<ESM::NPC>();
|
||||
if (ref->base->npdt52.gold == -10)
|
||||
merchantgold = ref->base->npdt12.gold;
|
||||
else
|
||||
|
@ -252,7 +253,7 @@ namespace MWGui
|
|||
}
|
||||
else // ESM::Creature
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData>* ref = mPtr.get<ESM::Creature>();
|
||||
MWWorld::LiveCellRef<ESM::Creature>* ref = mPtr.get<ESM::Creature>();
|
||||
merchantgold = ref->base->data.gold;
|
||||
}
|
||||
|
||||
|
@ -289,13 +290,13 @@ namespace MWGui
|
|||
int services = 0;
|
||||
if (mPtr.getTypeName() == typeid(ESM::NPC).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* ref = mPtr.get<ESM::NPC>();
|
||||
MWWorld::LiveCellRef<ESM::NPC>* ref = mPtr.get<ESM::NPC>();
|
||||
if (ref->base->hasAI)
|
||||
services = ref->base->AI.services;
|
||||
}
|
||||
else if (mPtr.getTypeName() == typeid(ESM::Creature).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData>* ref = mPtr.get<ESM::Creature>();
|
||||
MWWorld::LiveCellRef<ESM::Creature>* ref = mPtr.get<ESM::Creature>();
|
||||
if (ref->base->hasAI)
|
||||
services = ref->base->AI.services;
|
||||
}
|
||||
|
|
|
@ -26,14 +26,16 @@
|
|||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "console.hpp"
|
||||
#include "journalwindow.hpp"
|
||||
#include "charactercreation.hpp"
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include <assert.h>
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
|
||||
using namespace MWGui;
|
||||
|
@ -82,7 +84,7 @@ WindowManager::WindowManager(
|
|||
// Set up the GUI system
|
||||
mGuiManager = new OEngine::GUI::MyGUIManager(mOgre->getWindow(), mOgre->getScene(), false, logpath);
|
||||
gui = mGuiManager->getGui();
|
||||
|
||||
|
||||
//Register own widgets with MyGUI
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<DialogueHistory>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWSkill>("Widget");
|
||||
|
@ -638,6 +640,9 @@ void WindowManager::processChangedSettings(const Settings::CategorySettingVector
|
|||
hud->onResChange(x, y);
|
||||
console->onResChange(x, y);
|
||||
mSettingsWindow->center();
|
||||
mAlchemyWindow->center();
|
||||
mScrollWindow->center();
|
||||
mBookWindow->center();
|
||||
mDragAndDrop->mDragAndDropWidget->setSize(MyGUI::IntSize(x, y));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <openengine/gui/manager.hpp>
|
||||
|
||||
#include "../mwmechanics/stat.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
#include "mode.hpp"
|
||||
|
||||
|
@ -39,7 +38,8 @@ namespace Compiler
|
|||
|
||||
namespace MWWorld
|
||||
{
|
||||
class World;
|
||||
class Ptr;
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWMechanics
|
||||
|
@ -181,7 +181,7 @@ namespace MWGui
|
|||
void setBounty (int bounty); ///< set the current bounty value
|
||||
void updateSkillArea(); ///< update display of skills, factions, birth sign, reputation and bounty
|
||||
|
||||
void changeCell(MWWorld::Ptr::CellStore* cell); ///< change the active cell
|
||||
void changeCell(MWWorld::CellStore* cell); ///< change the active cell
|
||||
void setPlayerPos(const float x, const float y); ///< set player position in map space
|
||||
void setPlayerDir(const float x, const float y); ///< set player view direction in map space
|
||||
|
||||
|
@ -302,7 +302,7 @@ namespace MWGui
|
|||
|
||||
/**
|
||||
* Called when MyGUI tries to retrieve a tag. This usually corresponds to a GMST string,
|
||||
* so this method will retrieve the GMST with the name \a _tag and place the result in \a _result
|
||||
* so this method will retrieve the GMST with the name \a _tag and place the result in \a _result
|
||||
*/
|
||||
void onRetrieveTag(const MyGUI::UString& _tag, MyGUI::UString& _result);
|
||||
};
|
||||
|
|
|
@ -102,15 +102,15 @@ private:
|
|||
{
|
||||
if (windows.isGuiMode()) return;
|
||||
|
||||
DrawState state = player.getDrawState();
|
||||
if (state == DrawState_Weapon || state == DrawState_Nothing)
|
||||
MWMechanics::DrawState_ state = player.getDrawState();
|
||||
if (state == MWMechanics::DrawState_Weapon || state == MWMechanics::DrawState_Nothing)
|
||||
{
|
||||
player.setDrawState(DrawState_Spell);
|
||||
player.setDrawState(MWMechanics::DrawState_Spell);
|
||||
std::cout << "Player has now readied his hands for spellcasting!\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setDrawState(DrawState_Nothing);
|
||||
player.setDrawState(MWMechanics::DrawState_Nothing);
|
||||
std::cout << "Player does not have any kind of attack ready now.\n";
|
||||
}
|
||||
}
|
||||
|
@ -119,15 +119,15 @@ private:
|
|||
{
|
||||
if (windows.isGuiMode()) return;
|
||||
|
||||
DrawState state = player.getDrawState();
|
||||
if (state == DrawState_Spell || state == DrawState_Nothing)
|
||||
MWMechanics::DrawState_ state = player.getDrawState();
|
||||
if (state == MWMechanics::DrawState_Spell || state == MWMechanics::DrawState_Nothing)
|
||||
{
|
||||
player.setDrawState(DrawState_Weapon);
|
||||
player.setDrawState(MWMechanics::DrawState_Weapon);
|
||||
std::cout << "Player is now drawing his weapon.\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setDrawState(DrawState_Nothing);
|
||||
player.setDrawState(MWMechanics::DrawState_Nothing);
|
||||
std::cout << "Player does not have any kind of attack ready now.\n";
|
||||
}
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ private:
|
|||
poller.bind(A_MoveRight, KC_D);
|
||||
poller.bind(A_MoveForward, KC_W);
|
||||
poller.bind(A_MoveBackward, KC_S);
|
||||
|
||||
|
||||
poller.bind(A_Jump, KC_E);
|
||||
poller.bind(A_Crouch, KC_LCONTROL);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,10 @@
|
|||
#include <components/esm/loadalch.hpp>
|
||||
#include <components/esm/loadspel.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
namespace MWMechanics
|
||||
{
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <typeinfo>
|
||||
|
||||
#include <OgreVector3.h>
|
||||
|
||||
#include <components/esm/loadnpc.hpp>
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
|
|
|
@ -5,13 +5,17 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
class Vector3;
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class Ptr;
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWMechanics
|
||||
{
|
||||
class Actors
|
||||
|
@ -35,7 +39,7 @@ namespace MWMechanics
|
|||
///
|
||||
/// \note Ignored, if \a ptr is not a registered actor.
|
||||
|
||||
void dropActors (const MWWorld::Ptr::CellStore *cellStore);
|
||||
void dropActors (const MWWorld::CellStore *cellStore);
|
||||
///< Deregister all actors in the given cell.
|
||||
|
||||
void update (std::vector<std::pair<std::string, Ogre::Vector3> >& movement,
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
#ifndef GAME_MWMECHANICS_DRAWSTATE_H
|
||||
#define GAME_MWMECHANICS_DRAWSTATE_H
|
||||
|
||||
#undef DrawState
|
||||
|
||||
enum DrawState
|
||||
namespace MWMechanics
|
||||
{
|
||||
DrawState_Weapon = 0,
|
||||
DrawState_Spell = 1,
|
||||
DrawState_Nothing = 2,
|
||||
};
|
||||
/// \note The _ suffix is required to avoid a collision with a Windoze macro. Die, Microsoft! Die!
|
||||
enum DrawState_
|
||||
{
|
||||
DrawState_Weapon = 0,
|
||||
DrawState_Spell = 1,
|
||||
DrawState_Nothing = 2,
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
|
||||
namespace MWMechanics
|
||||
{
|
||||
void MechanicsManager::buildPlayer()
|
||||
|
@ -28,7 +28,7 @@ namespace MWMechanics
|
|||
creatureStats.mMagicEffects = MagicEffects();
|
||||
|
||||
for (int i=0; i<27; ++i)
|
||||
npcStats.mSkill[i].setBase (player->npdt52.skills[i]);
|
||||
npcStats.getSkill (i).setBase (player->npdt52.skills[i]);
|
||||
|
||||
creatureStats.mAttributes[0].setBase (player->npdt52.strength);
|
||||
creatureStats.mAttributes[1].setBase (player->npdt52.intelligence);
|
||||
|
@ -73,8 +73,8 @@ namespace MWMechanics
|
|||
|
||||
if (index>=0 && index<27)
|
||||
{
|
||||
npcStats.mSkill[index].setBase (
|
||||
npcStats.mSkill[index].getBase() + race->data.bonus[i].bonus);
|
||||
npcStats.getSkill (index).setBase (
|
||||
npcStats.getSkill (index).getBase() + race->data.bonus[i].bonus);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,8 +124,8 @@ namespace MWMechanics
|
|||
|
||||
if (index>=0 && index<27)
|
||||
{
|
||||
npcStats.mSkill[index].setBase (
|
||||
npcStats.mSkill[index].getBase() + bonus);
|
||||
npcStats.getSkill (index).setBase (
|
||||
npcStats.getSkill (index).getBase() + bonus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -141,8 +141,8 @@ namespace MWMechanics
|
|||
|
||||
if (index>=0 && index<27)
|
||||
{
|
||||
npcStats.mSkill[index].setBase (
|
||||
npcStats.mSkill[index].getBase() + 5);
|
||||
npcStats.getSkill (index).setBase (
|
||||
npcStats.getSkill (index).getBase() + 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -236,11 +236,11 @@ namespace MWMechanics
|
|||
//Loop over ESM::Skill::SkillEnum
|
||||
for(int i = 0; i < 27; ++i)
|
||||
{
|
||||
if(npcStats.mSkill[i] != mWatchedNpc.mSkill[i])
|
||||
if(npcStats.getSkill (i) != mWatchedNpc.getSkill (i))
|
||||
{
|
||||
update = true;
|
||||
mWatchedNpc.mSkill[i] = npcStats.mSkill[i];
|
||||
MWBase::Environment::get().getWindowManager()->setValue((ESM::Skill::SkillEnum)i, npcStats.mSkill[i]);
|
||||
mWatchedNpc.getSkill (i) = npcStats.getSkill (i);
|
||||
MWBase::Environment::get().getWindowManager()->setValue((ESM::Skill::SkillEnum)i, npcStats.getSkill (i));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,11 @@ namespace Ogre
|
|||
class Vector3;
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWMechanics
|
||||
{
|
||||
class MechanicsManager
|
||||
|
@ -43,7 +48,7 @@ namespace MWMechanics
|
|||
void removeActor (const MWWorld::Ptr& ptr);
|
||||
///< Deregister an actor for stats management
|
||||
|
||||
void dropActors (const MWWorld::Ptr::CellStore *cellStore);
|
||||
void dropActors (const MWWorld::CellStore *cellStore);
|
||||
///< Deregister all actors in the given cell.
|
||||
|
||||
void watchActor (const MWWorld::Ptr& ptr);
|
||||
|
|
140
apps/openmw/mwmechanics/npcstats.cpp
Normal file
140
apps/openmw/mwmechanics/npcstats.cpp
Normal file
|
@ -0,0 +1,140 @@
|
|||
|
||||
#include "npcstats.hpp"
|
||||
|
||||
#include <cmath>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <components/esm/loadskil.hpp>
|
||||
#include <components/esm/loadclas.hpp>
|
||||
#include <components/esm/loadgmst.hpp>
|
||||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
MWMechanics::NpcStats::NpcStats()
|
||||
: mMovementFlags (0), mDrawState (DrawState_Nothing)
|
||||
{}
|
||||
|
||||
MWMechanics::DrawState_ MWMechanics::NpcStats::getDrawState() const
|
||||
{
|
||||
return mDrawState;
|
||||
}
|
||||
|
||||
void MWMechanics::NpcStats::setDrawState (DrawState_ state)
|
||||
{
|
||||
mDrawState = state;
|
||||
}
|
||||
|
||||
bool MWMechanics::NpcStats::getMovementFlag (Flag flag) const
|
||||
{
|
||||
return mMovementFlags & flag;
|
||||
}
|
||||
|
||||
void MWMechanics::NpcStats::setMovementFlag (Flag flag, bool state)
|
||||
{
|
||||
if (state)
|
||||
mMovementFlags |= flag;
|
||||
else
|
||||
mMovementFlags &= ~flag;
|
||||
}
|
||||
|
||||
const MWMechanics::Stat<float>& MWMechanics::NpcStats::getSkill (int index) const
|
||||
{
|
||||
if (index<0 || index>=27)
|
||||
throw std::runtime_error ("skill index out of range");
|
||||
|
||||
return mSkill[index];
|
||||
}
|
||||
|
||||
MWMechanics::Stat<float>& MWMechanics::NpcStats::getSkill (int index)
|
||||
{
|
||||
if (index<0 || index>=27)
|
||||
throw std::runtime_error ("skill index out of range");
|
||||
|
||||
return mSkill[index];
|
||||
}
|
||||
|
||||
std::map<std::string, int>& MWMechanics::NpcStats::getFactionRanks()
|
||||
{
|
||||
return mFactionRank;
|
||||
}
|
||||
|
||||
const std::map<std::string, int>& MWMechanics::NpcStats::getFactionRanks() const
|
||||
{
|
||||
return mFactionRank;
|
||||
}
|
||||
|
||||
float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& class_, int usageType,
|
||||
int level) const
|
||||
{
|
||||
if (level<0)
|
||||
level = static_cast<int> (getSkill (skillIndex).getBase());
|
||||
|
||||
const ESM::Skill *skill = MWBase::Environment::get().getWorld()->getStore().skills.find (skillIndex);
|
||||
|
||||
float skillFactor = 1;
|
||||
|
||||
if (usageType>=4)
|
||||
throw std::runtime_error ("skill usage type out of range");
|
||||
|
||||
if (usageType>0)
|
||||
{
|
||||
skillFactor = skill->data.useValue[usageType];
|
||||
|
||||
if (skillFactor<=0)
|
||||
throw std::runtime_error ("invalid skill gain factor");
|
||||
}
|
||||
|
||||
float typeFactor =
|
||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMiscSkillBonus")->f;
|
||||
|
||||
for (int i=0; i<5; ++i)
|
||||
if (class_.data.skills[i][0]==skillIndex)
|
||||
{
|
||||
typeFactor =
|
||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMinorSkillBonus")->f;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i=0; i<5; ++i)
|
||||
if (class_.data.skills[i][1]==skillIndex)
|
||||
{
|
||||
typeFactor =
|
||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMajorSkillBonus")->f;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (typeFactor<=0)
|
||||
throw std::runtime_error ("invalid skill type factor");
|
||||
|
||||
float specialisationFactor = 1;
|
||||
|
||||
if (skill->data.specialization==class_.data.specialization)
|
||||
{
|
||||
specialisationFactor =
|
||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fSpecialSkillBonus")->f;
|
||||
|
||||
if (specialisationFactor<=0)
|
||||
throw std::runtime_error ("invalid skill specialisation factor");
|
||||
}
|
||||
|
||||
return 1.0 / (level +1) * (1.0 / skillFactor) * typeFactor * specialisationFactor;
|
||||
}
|
||||
|
||||
void MWMechanics::NpcStats::useSkill (int skillIndex, const ESM::Class& class_, int usageType)
|
||||
{
|
||||
float base = getSkill (skillIndex).getBase();
|
||||
|
||||
int level = static_cast<int> (base);
|
||||
|
||||
base += getSkillGain (skillIndex, class_, usageType);
|
||||
|
||||
if (static_cast<int> (base)!=level)
|
||||
base = level+1;
|
||||
|
||||
getSkill (skillIndex).setBase (base);
|
||||
}
|
|
@ -3,10 +3,16 @@
|
|||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "stat.hpp"
|
||||
#include "drawstate.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
struct Class;
|
||||
}
|
||||
|
||||
namespace MWMechanics
|
||||
{
|
||||
/// \brief Additional stats for NPCs
|
||||
|
@ -16,24 +22,57 @@ namespace MWMechanics
|
|||
/// \note For technical reasons the spell list and the currently selected spell is also handled by
|
||||
/// CreatureStats, even though they are actually NPC stats.
|
||||
|
||||
struct NpcStats
|
||||
class NpcStats
|
||||
{
|
||||
// NPCs other than the player can only have one faction. But for the sake of consistency
|
||||
// we use the same data structure for the PC and the NPCs.
|
||||
/// \note the faction key must be in lowercase
|
||||
std::map<std::string, int> mFactionRank;
|
||||
public:
|
||||
|
||||
Stat<float> mSkill[27];
|
||||
enum Flag
|
||||
{
|
||||
Flag_ForceRun = 1,
|
||||
Flag_ForceSneak = 2,
|
||||
Flag_Run = 4,
|
||||
Flag_Sneak = 8
|
||||
};
|
||||
|
||||
bool mForceRun;
|
||||
bool mForceSneak;
|
||||
bool mRun;
|
||||
bool mSneak;
|
||||
bool mCombat;
|
||||
DrawState mDrawState;
|
||||
private:
|
||||
|
||||
NpcStats() : mForceRun (false), mForceSneak (false), mRun (false), mSneak (false),
|
||||
mCombat (false) , mDrawState(DrawState_Nothing) {}
|
||||
/// NPCs other than the player can only have one faction. But for the sake of consistency
|
||||
/// we use the same data structure for the PC and the NPCs.
|
||||
/// \note the faction key must be in lowercase
|
||||
std::map<std::string, int> mFactionRank;
|
||||
|
||||
DrawState_ mDrawState;
|
||||
unsigned int mMovementFlags;
|
||||
Stat<float> mSkill[27];
|
||||
|
||||
public:
|
||||
|
||||
NpcStats();
|
||||
|
||||
DrawState_ getDrawState() const;
|
||||
|
||||
void setDrawState (DrawState_ state);
|
||||
|
||||
bool getMovementFlag (Flag flag) const;
|
||||
|
||||
void setMovementFlag (Flag flag, bool state);
|
||||
|
||||
const Stat<float>& getSkill (int index) const;
|
||||
|
||||
Stat<float>& getSkill (int index);
|
||||
|
||||
std::map<std::string, int>& getFactionRanks();
|
||||
|
||||
const std::map<std::string, int>& getFactionRanks() const;
|
||||
|
||||
float getSkillGain (int skillIndex, const ESM::Class& class_, int usageType = -1,
|
||||
int level = -1) const;
|
||||
///< \param usageType: Usage specific factor, specified in the respective skill record;
|
||||
/// -1: use a factor of 1.0 instead.
|
||||
/// \param level Level to base calculation on; -1: use current level.
|
||||
|
||||
void useSkill (int skillIndex, const ESM::Class& class_, int usageType = -1);
|
||||
///< Increase skill by usage.
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
|
||||
#include "spells.hpp"
|
||||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include <components/esm/loadspel.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "magiceffects.hpp"
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#ifndef MWMECHANICS_SPELLSUCCESS_H
|
||||
#define MWMECHANICS_SPELLSUCCESS_H
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwmechanics/creaturestats.hpp"
|
||||
|
||||
#include "npcstats.hpp"
|
||||
|
@ -39,7 +41,7 @@ namespace MWMechanics
|
|||
{
|
||||
const ESM::MagicEffect* effect = MWBase::Environment::get().getWorld()->getStore().magicEffects.find(it->effectID);
|
||||
int _school = effect->data.school;
|
||||
int _skillLevel = stats.mSkill[spellSchoolToSkill(_school)].getModified();
|
||||
int _skillLevel = stats.getSkill (spellSchoolToSkill(_school)).getModified();
|
||||
|
||||
if (school == -1)
|
||||
{
|
||||
|
@ -76,7 +78,7 @@ namespace MWMechanics
|
|||
NpcStats& stats = MWWorld::Class::get(actor).getNpcStats(actor);
|
||||
CreatureStats& creatureStats = MWWorld::Class::get(actor).getCreatureStats(actor);
|
||||
|
||||
int skillLevel = stats.mSkill[getSpellSchool(spellId, actor)].getModified();
|
||||
int skillLevel = stats.getSkill (getSpellSchool(spellId, actor)).getModified();
|
||||
|
||||
// Sound magic effect (reduces spell casting chance)
|
||||
int soundMagnitude = creatureStats.mMagicEffects.get (MWMechanics::EffectKey (48)).mMagnitude;
|
||||
|
|
|
@ -31,6 +31,11 @@ namespace MWMechanics
|
|||
return mModified;
|
||||
}
|
||||
|
||||
T getModifier() const
|
||||
{
|
||||
return mModified-mBase;
|
||||
}
|
||||
|
||||
/// Set base and modified to \a value.
|
||||
void set (const T& value)
|
||||
{
|
||||
|
@ -65,10 +70,9 @@ namespace MWMechanics
|
|||
mBase += diff;
|
||||
}
|
||||
|
||||
/// Change modified relatively.
|
||||
void modify (const T& diff)
|
||||
void setModifier (const T& modifier)
|
||||
{
|
||||
mModified += diff;
|
||||
mModified = mBase + modifier;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "actors.hpp"
|
||||
|
||||
#include <OgreSceneNode.h>
|
||||
|
||||
|
||||
#include <OgreSceneManager.h>
|
||||
|
||||
|
||||
using namespace Ogre;
|
||||
|
|
|
@ -1,26 +1,29 @@
|
|||
#ifndef _GAME_RENDER_ACTORS_H
|
||||
#define _GAME_RENDER_ACTORS_H
|
||||
|
||||
#include "components/esm_store/cell_store.hpp"
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
||||
|
||||
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
#include "components/nifogre/ogre_nif_loader.hpp"
|
||||
|
||||
#include "../mwworld/refdata.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontalk.hpp"
|
||||
|
||||
#include "npcanimation.hpp"
|
||||
#include "creatureanimation.hpp"
|
||||
#include <openengine/bullet/physic.hpp>
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class Ptr;
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWRender{
|
||||
class Actors{
|
||||
OEngine::Render::OgreRenderer &mRend;
|
||||
std::map<MWWorld::Ptr::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
|
||||
std::map<MWWorld::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
|
||||
Ogre::SceneNode* mMwRoot;
|
||||
std::map<MWWorld::Ptr, Animation*> mAllActors;
|
||||
|
||||
|
@ -36,7 +39,7 @@ namespace MWRender{
|
|||
bool deleteObject (const MWWorld::Ptr& ptr);
|
||||
///< \return found?
|
||||
|
||||
void removeCell(MWWorld::Ptr::CellStore* store);
|
||||
void removeCell(MWWorld::CellStore* store);
|
||||
|
||||
void playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, int mode,
|
||||
int number = 1);
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#include "animation.hpp"
|
||||
|
||||
#include <OgreHardwarePixelBuffer.h>
|
||||
#include <OgreSkeletonInstance.h>
|
||||
#include <OgreEntity.h>
|
||||
#include <OgreBone.h>
|
||||
#include <OgreSubMesh.h>
|
||||
|
||||
namespace MWRender{
|
||||
std::map<std::string, int> Animation::mUniqueIDs;
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
#include "creatureanimation.hpp"
|
||||
|
||||
#include <OgreEntity.h>
|
||||
#include <OgreSceneManager.h>
|
||||
#include <OgreSubEntity.h>
|
||||
|
||||
#include "renderconst.hpp"
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
using namespace Ogre;
|
||||
using namespace NifOgre;
|
||||
|
@ -12,7 +17,7 @@ CreatureAnimation::~CreatureAnimation(){
|
|||
}
|
||||
CreatureAnimation::CreatureAnimation(const MWWorld::Ptr& ptr, OEngine::Render::OgreRenderer& _rend): Animation(_rend){
|
||||
insert = ptr.getRefData().getBaseNode();
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
|
|
@ -1,18 +1,23 @@
|
|||
#include "debugging.hpp"
|
||||
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
#include <OgreNode.h>
|
||||
#include <OgreSceneManager.h>
|
||||
#include <OgreMaterial.h>
|
||||
#include <OgreMaterialManager.h>
|
||||
#include <OgreManualObject.h>
|
||||
|
||||
#include "../mwworld/world.hpp" // these includes can be removed once the static-hack is gone
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include <components/esm/loadstat.hpp>
|
||||
#include <components/esm/loadpgrd.hpp>
|
||||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwbase/world.hpp" // these includes can be removed once the static-hack is gone
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
#include "player.hpp"
|
||||
|
||||
using namespace Ogre;
|
||||
|
@ -162,11 +167,11 @@ Debugging::~Debugging()
|
|||
bool Debugging::toggleRenderMode (int mode){
|
||||
switch (mode)
|
||||
{
|
||||
case MWWorld::World::Render_CollisionDebug:
|
||||
case MWBase::World::Render_CollisionDebug:
|
||||
|
||||
return mEngine->toggleDebugRendering();
|
||||
|
||||
case MWWorld::World::Render_Pathgrid:
|
||||
case MWBase::World::Render_Pathgrid:
|
||||
togglePathgrid();
|
||||
return mPathgridEnabled;
|
||||
}
|
||||
|
|
|
@ -4,11 +4,15 @@
|
|||
#include <utility>
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
#include <openengine/bullet/physic.hpp>
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
struct Pathgrid;
|
||||
}
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
class Camera;
|
||||
|
@ -22,7 +26,8 @@ namespace Ogre
|
|||
|
||||
namespace MWWorld
|
||||
{
|
||||
class World;
|
||||
class Ptr;
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWRender
|
||||
|
@ -39,7 +44,7 @@ namespace MWRender
|
|||
|
||||
void togglePathgrid();
|
||||
|
||||
typedef std::vector<MWWorld::Ptr::CellStore *> CellList;
|
||||
typedef std::vector<MWWorld::CellStore *> CellList;
|
||||
CellList mActiveCells;
|
||||
|
||||
Ogre::SceneNode *mMwRoot;
|
||||
|
@ -50,8 +55,8 @@ namespace MWRender
|
|||
ExteriorPathgridNodes mExteriorPathgridNodes;
|
||||
Ogre::SceneNode *mInteriorPathgridNode;
|
||||
|
||||
void enableCellPathgrid(MWWorld::Ptr::CellStore *store);
|
||||
void disableCellPathgrid(MWWorld::Ptr::CellStore *store);
|
||||
void enableCellPathgrid(MWWorld::CellStore *store);
|
||||
void disableCellPathgrid(MWWorld::CellStore *store);
|
||||
|
||||
// utility
|
||||
void destroyCellPathgridNode(Ogre::SceneNode *node);
|
||||
|
@ -70,8 +75,8 @@ namespace MWRender
|
|||
~Debugging();
|
||||
bool toggleRenderMode (int mode);
|
||||
|
||||
void cellAdded(MWWorld::Ptr::CellStore* store);
|
||||
void cellRemoved(MWWorld::Ptr::CellStore* store);
|
||||
void cellAdded(MWWorld::CellStore* store);
|
||||
void cellRemoved(MWWorld::CellStore* store);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
#include "localmap.hpp"
|
||||
#include "renderingmanager.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "renderconst.hpp"
|
||||
|
||||
#include <OgreOverlayManager.h>
|
||||
#include <OgreMaterialManager.h>
|
||||
#include <OgreHardwarePixelBuffer.h>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
|
||||
#include "renderconst.hpp"
|
||||
#include "renderingmanager.hpp"
|
||||
|
||||
using namespace MWRender;
|
||||
using namespace Ogre;
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
#ifndef _GAME_RENDER_LOCALMAP_H
|
||||
#define _GAME_RENDER_LOCALMAP_H
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
|
||||
#include <OgreAxisAlignedBox.h>
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWRender
|
||||
{
|
||||
class RenderingManager;
|
||||
|
@ -24,7 +29,7 @@ namespace MWRender
|
|||
* or rendered if it is not already cached.
|
||||
* @param exterior cell
|
||||
*/
|
||||
void requestMap (MWWorld::Ptr::CellStore* cell);
|
||||
void requestMap (MWWorld::CellStore* cell);
|
||||
|
||||
/**
|
||||
* Request the local map for an interior cell.
|
||||
|
@ -33,7 +38,7 @@ namespace MWRender
|
|||
* @param interior cell
|
||||
* @param bounding box of the cell
|
||||
*/
|
||||
void requestMap (MWWorld::Ptr::CellStore* cell,
|
||||
void requestMap (MWWorld::CellStore* cell,
|
||||
Ogre::AxisAlignedBox bounds);
|
||||
|
||||
/**
|
||||
|
@ -51,7 +56,7 @@ namespace MWRender
|
|||
* new cell, as well as when the game is quit.
|
||||
* @param current cell
|
||||
*/
|
||||
void saveFogOfWar(MWWorld::Ptr::CellStore* cell);
|
||||
void saveFogOfWar(MWWorld::CellStore* cell);
|
||||
|
||||
private:
|
||||
OEngine::Render::OgreRenderer* mRendering;
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
#include "npcanimation.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "renderconst.hpp"
|
||||
|
||||
#include <OgreSceneManager.h>
|
||||
#include <OgreEntity.h>
|
||||
#include <OgreSubEntity.h>
|
||||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "renderconst.hpp"
|
||||
|
||||
using namespace Ogre;
|
||||
using namespace NifOgre;
|
||||
|
@ -38,7 +45,7 @@ NpcAnimation::NpcAnimation(const MWWorld::Ptr& ptr, OEngine::Render::OgreRendere
|
|||
lfoot(0),
|
||||
rfoot(0)
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
Ogre::Entity* blank = 0;
|
||||
std::vector<Nif::NiTriShapeCopy>* blankshape = 0;
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
#include "objects.hpp"
|
||||
|
||||
#include <OgreSceneNode.h>
|
||||
#include <OgreSceneManager.h>
|
||||
#include <OgreEntity.h>
|
||||
#include <OgreLight.h>
|
||||
#include <OgreSubEntity.h>
|
||||
#include <OgreStaticGeometry.h>
|
||||
|
||||
#include <components/nifogre/ogre_nif_loader.hpp>
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
#include "renderconst.hpp"
|
||||
|
||||
using namespace MWRender;
|
||||
|
@ -56,7 +64,7 @@ void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_)
|
|||
|
||||
insert->setPosition(f[0], f[1], f[2]);
|
||||
insert->setScale(ptr.getCellRef().scale, ptr.getCellRef().scale, ptr.getCellRef().scale);
|
||||
|
||||
|
||||
|
||||
// Convert MW rotation to a quaternion:
|
||||
f = ptr.getCellRef().pos.rot;
|
||||
|
@ -194,8 +202,7 @@ void Objects::insertLight (const MWWorld::Ptr& ptr, float r, float g, float b, f
|
|||
Ogre::Light *light = mRenderer.getScene()->createLight();
|
||||
light->setDiffuseColour (r, g, b);
|
||||
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref = ptr.get<ESM::Light>();
|
||||
|
||||
LightInfo info;
|
||||
info.name = light->getName();
|
||||
|
@ -307,7 +314,7 @@ void Objects::removeCell(MWWorld::Ptr::CellStore* store)
|
|||
mBounds.erase(store);
|
||||
}
|
||||
|
||||
void Objects::buildStaticGeometry(ESMS::CellStore<MWWorld::RefData>& cell)
|
||||
void Objects::buildStaticGeometry(MWWorld::Ptr::CellStore& cell)
|
||||
{
|
||||
if(mStaticGeometry.find(&cell) != mStaticGeometry.end())
|
||||
{
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
#ifndef _GAME_RENDER_OBJECTS_H
|
||||
#define _GAME_RENDER_OBJECTS_H
|
||||
|
||||
#include <OgreColourValue.h>
|
||||
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwworld/refdata.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
namespace MWWorld
|
||||
{
|
||||
class Ptr;
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWRender{
|
||||
|
||||
|
@ -47,10 +50,10 @@ struct LightInfo
|
|||
|
||||
class Objects{
|
||||
OEngine::Render::OgreRenderer &mRenderer;
|
||||
std::map<MWWorld::Ptr::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
|
||||
std::map<MWWorld::Ptr::CellStore *, Ogre::StaticGeometry*> mStaticGeometry;
|
||||
std::map<MWWorld::Ptr::CellStore *, Ogre::StaticGeometry*> mStaticGeometrySmall;
|
||||
std::map<MWWorld::Ptr::CellStore *, Ogre::AxisAlignedBox> mBounds;
|
||||
std::map<MWWorld::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
|
||||
std::map<MWWorld::CellStore *, Ogre::StaticGeometry*> mStaticGeometry;
|
||||
std::map<MWWorld::CellStore *, Ogre::StaticGeometry*> mStaticGeometrySmall;
|
||||
std::map<MWWorld::CellStore *, Ogre::AxisAlignedBox> mBounds;
|
||||
std::vector<LightInfo> mLights;
|
||||
Ogre::SceneNode* mMwRoot;
|
||||
bool mIsStatic;
|
||||
|
@ -81,14 +84,14 @@ public:
|
|||
void update (const float dt);
|
||||
///< per-frame update
|
||||
|
||||
Ogre::AxisAlignedBox getDimensions(MWWorld::Ptr::CellStore*);
|
||||
Ogre::AxisAlignedBox getDimensions(MWWorld::CellStore*);
|
||||
///< get a bounding box that encloses all objects in the specified cell
|
||||
|
||||
bool deleteObject (const MWWorld::Ptr& ptr);
|
||||
///< \return found?
|
||||
|
||||
void removeCell(MWWorld::Ptr::CellStore* store);
|
||||
void buildStaticGeometry(ESMS::CellStore<MWWorld::RefData> &cell);
|
||||
void removeCell(MWWorld::CellStore* store);
|
||||
void buildStaticGeometry(MWWorld::CellStore &cell);
|
||||
void setMwRoot(Ogre::SceneNode* root);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
#include "player.hpp"
|
||||
|
||||
#include <OgreSceneNode.h>
|
||||
|
||||
namespace MWRender
|
||||
{
|
||||
Player::Player (Ogre::Camera *camera, Ogre::SceneNode* node)
|
||||
|
@ -24,4 +26,9 @@ namespace MWRender
|
|||
pitchNode->setOrientation(xr);
|
||||
yawNode->setOrientation(yr);
|
||||
}
|
||||
|
||||
std::string Player::getHandle() const
|
||||
{
|
||||
return mNode->getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#ifndef GAME_MWRENDER_PLAYER_H
|
||||
#define GAME_MWRENDER_PLAYER_H
|
||||
|
||||
#include <iostream>
|
||||
#include <Ogre.h>
|
||||
#include <string>
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
class Camera;
|
||||
class SceneNode;
|
||||
}
|
||||
|
||||
namespace MWRender
|
||||
|
@ -26,7 +26,7 @@ namespace MWRender
|
|||
/// Set where the player is looking at. Uses Morrowind (euler) angles
|
||||
void setRot(float x, float y, float z);
|
||||
|
||||
std::string getHandle() const { return mNode->getName(); }
|
||||
std::string getHandle() const;
|
||||
Ogre::SceneNode* getNode() {return mNode;}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,30 +1,37 @@
|
|||
#include "renderingmanager.hpp"
|
||||
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
#include "OgreRoot.h"
|
||||
#include "OgreRenderWindow.h"
|
||||
#include "OgreSceneManager.h"
|
||||
#include "OgreViewport.h"
|
||||
#include "OgreCamera.h"
|
||||
#include "OgreTextureManager.h"
|
||||
#include <OgreRoot.h>
|
||||
#include <OgreRenderWindow.h>
|
||||
#include <OgreSceneManager.h>
|
||||
#include <OgreViewport.h>
|
||||
#include <OgreCamera.h>
|
||||
#include <OgreTextureManager.h>
|
||||
#include <OgreCompositorManager.h>
|
||||
#include <OgreCompositorChain.h>
|
||||
#include <OgreCompositionTargetPass.h>
|
||||
#include <OgreCompositionPass.h>
|
||||
#include <OgreHardwarePixelBuffer.h>
|
||||
|
||||
#include "../mwworld/world.hpp" // these includes can be removed once the static-hack is gone
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include <components/esm/loadstat.hpp>
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include "../mwbase/world.hpp" // these includes can be removed once the static-hack is gone
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp" // FIXME
|
||||
#include "../mwinput/inputmanager.hpp" // FIXME
|
||||
|
||||
#include "shadows.hpp"
|
||||
#include "shaderhelper.hpp"
|
||||
#include "localmap.hpp"
|
||||
#include "water.hpp"
|
||||
#include "compositors.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp" // FIXME
|
||||
#include "../mwinput/inputmanager.hpp" // FIXME
|
||||
|
||||
using namespace MWRender;
|
||||
using namespace Ogre;
|
||||
|
||||
|
@ -298,9 +305,9 @@ void RenderingManager::skySetMoonColour (bool red){
|
|||
|
||||
bool RenderingManager::toggleRenderMode(int mode)
|
||||
{
|
||||
if (mode == MWWorld::World::Render_CollisionDebug || mode == MWWorld::World::Render_Pathgrid)
|
||||
if (mode == MWBase::World::Render_CollisionDebug || mode == MWBase::World::Render_Pathgrid)
|
||||
return mDebugging->toggleRenderMode(mode);
|
||||
else if (mode == MWWorld::World::Render_Wireframe)
|
||||
else if (mode == MWBase::World::Render_Wireframe)
|
||||
{
|
||||
if (mRendering.getCamera()->getPolygonMode() == PM_SOLID)
|
||||
{
|
||||
|
@ -323,7 +330,7 @@ bool RenderingManager::toggleRenderMode(int mode)
|
|||
}
|
||||
}
|
||||
|
||||
void RenderingManager::configureFog(ESMS::CellStore<MWWorld::RefData> &mCell)
|
||||
void RenderingManager::configureFog(MWWorld::Ptr::CellStore &mCell)
|
||||
{
|
||||
Ogre::ColourValue color;
|
||||
color.setAsABGR (mCell.cell->ambi.fog);
|
||||
|
@ -372,7 +379,7 @@ void RenderingManager::setAmbientMode()
|
|||
}
|
||||
}
|
||||
|
||||
void RenderingManager::configureAmbient(ESMS::CellStore<MWWorld::RefData> &mCell)
|
||||
void RenderingManager::configureAmbient(MWWorld::Ptr::CellStore &mCell)
|
||||
{
|
||||
mAmbientColor.setAsABGR (mCell.cell->ambi.ambient);
|
||||
setAmbientMode();
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include "renderinginterface.hpp"
|
||||
|
@ -41,7 +39,8 @@ namespace Ogre
|
|||
|
||||
namespace MWWorld
|
||||
{
|
||||
class World;
|
||||
class Ptr;
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWRender
|
||||
|
@ -79,18 +78,18 @@ class RenderingManager: private RenderingInterface, public Ogre::WindowEventList
|
|||
|
||||
OEngine::Render::Fader* getFader();
|
||||
|
||||
void removeCell (MWWorld::Ptr::CellStore *store);
|
||||
void removeCell (MWWorld::CellStore *store);
|
||||
|
||||
/// \todo this function should be removed later. Instead the rendering subsystems should track
|
||||
/// when rebatching is needed and update automatically at the end of each frame.
|
||||
void cellAdded (MWWorld::Ptr::CellStore *store);
|
||||
void waterAdded(MWWorld::Ptr::CellStore *store);
|
||||
void cellAdded (MWWorld::CellStore *store);
|
||||
void waterAdded(MWWorld::CellStore *store);
|
||||
|
||||
void removeWater();
|
||||
|
||||
static const bool useMRT();
|
||||
|
||||
void preCellChange (MWWorld::Ptr::CellStore* store);
|
||||
void preCellChange (MWWorld::CellStore* store);
|
||||
///< this event is fired immediately before changing cell
|
||||
|
||||
void addObject (const MWWorld::Ptr& ptr);
|
||||
|
@ -105,7 +104,7 @@ class RenderingManager: private RenderingInterface, public Ogre::WindowEventList
|
|||
void toggleWater();
|
||||
|
||||
/// \param store Cell the object was in previously (\a ptr has already been updated to the new cell).
|
||||
void moveObjectToCell (const MWWorld::Ptr& ptr, const Ogre::Vector3& position, MWWorld::Ptr::CellStore *store);
|
||||
void moveObjectToCell (const MWWorld::Ptr& ptr, const Ogre::Vector3& position, MWWorld::CellStore *store);
|
||||
|
||||
void update (float duration);
|
||||
|
||||
|
@ -136,13 +135,13 @@ class RenderingManager: private RenderingInterface, public Ogre::WindowEventList
|
|||
int skyGetMasserPhase() const;
|
||||
int skyGetSecundaPhase() const;
|
||||
void skySetMoonColour (bool red);
|
||||
void configureAmbient(ESMS::CellStore<MWWorld::RefData> &mCell);
|
||||
void configureAmbient(MWWorld::CellStore &mCell);
|
||||
|
||||
void requestMap (MWWorld::Ptr::CellStore* cell);
|
||||
void requestMap (MWWorld::CellStore* cell);
|
||||
///< request the local map for a cell
|
||||
|
||||
/// configure fog according to cell
|
||||
void configureFog(ESMS::CellStore<MWWorld::RefData> &mCell);
|
||||
void configureFog(MWWorld::CellStore &mCell);
|
||||
|
||||
/// configure fog manually
|
||||
void configureFog(const float density, const Ogre::ColourValue& colour);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue