forked from teamnwah/openmw-tes3coop
Merge branch 'decouple'
This commit is contained in:
commit
cc7c6aa0ad
132 changed files with 1616 additions and 1144 deletions
|
@ -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
|
||||
|
@ -64,7 +64,7 @@ add_openmw_dir (mwmechanics
|
|||
)
|
||||
|
||||
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())
|
||||
|
@ -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;
|
||||
|
@ -302,7 +307,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:
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
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"
|
||||
|
@ -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();
|
||||
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace MWGui
|
|||
MWWorld::Ptr mPtr;
|
||||
|
||||
private:
|
||||
MWWorld::Ptr::CellStore* mCurrentPlayerCell;
|
||||
MWWorld::CellStore* mCurrentPlayerCell;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -11,8 +11,12 @@
|
|||
#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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
#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;
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
#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,
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
@ -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);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <OgreHighLevelGpuProgramManager.h>
|
||||
#include <OgreHighLevelGpuProgram.h>
|
||||
#include <OgreGpuProgramParams.h>
|
||||
#include <OgreShadowCameraSetupPSSM.h>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
|
|
|
@ -4,14 +4,22 @@
|
|||
#include <OgreRenderWindow.h>
|
||||
#include <OgreSceneNode.h>
|
||||
#include <OgreMesh.h>
|
||||
#include <OgreSubMesh.h>
|
||||
#include <OgreSceneManager.h>
|
||||
#include <OgreHardwareVertexBuffer.h>
|
||||
#include <OgreHighLevelGpuProgramManager.h>
|
||||
#include <OgreBillboardSet.h>
|
||||
#include <OgreEntity.h>
|
||||
#include <OgreSubEntity.h>
|
||||
#include <OgreOverlay.h>
|
||||
#include <OgreOverlayManager.h>
|
||||
#include <OgreOverlayContainer.h>
|
||||
|
||||
#include <components/nifogre/ogre_nif_loader.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "renderconst.hpp"
|
||||
#include "renderingmanager.hpp"
|
||||
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
#include <OgreTerrain.h>
|
||||
#include <OgreTerrainGroup.h>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include <OgreTerrain.h>
|
||||
#include <OgreTerrainGroup.h>
|
||||
#include <OgreHardwarePixelBuffer.h>
|
||||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "terrainmaterial.hpp"
|
||||
#include "terrain.hpp"
|
||||
#include "renderconst.hpp"
|
||||
#include "shadows.hpp"
|
||||
#include <components/settings/settings.hpp>
|
||||
#include "renderingmanager.hpp"
|
||||
|
||||
using namespace Ogre;
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
|
||||
#include <OgreTerrain.h>
|
||||
#include <OgreTerrainGroup.h>
|
||||
#include "terrainmaterial.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include <components/esm/loadland.hpp>
|
||||
|
||||
#include "terrainmaterial.hpp"
|
||||
|
||||
namespace Ogre{
|
||||
class SceneManager;
|
||||
|
@ -14,8 +15,15 @@ namespace Ogre{
|
|||
class Terrain;
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWRender{
|
||||
|
||||
class RenderingManager;
|
||||
|
||||
/**
|
||||
* Implements the Morrowind terrain using the Ogre Terrain Component
|
||||
*
|
||||
|
@ -30,8 +38,8 @@ namespace MWRender{
|
|||
void setDiffuse(const Ogre::ColourValue& diffuse);
|
||||
void setAmbient(const Ogre::ColourValue& ambient);
|
||||
|
||||
void cellAdded(MWWorld::Ptr::CellStore* store);
|
||||
void cellRemoved(MWWorld::Ptr::CellStore* store);
|
||||
void cellAdded(MWWorld::CellStore* store);
|
||||
void cellRemoved(MWWorld::CellStore* store);
|
||||
private:
|
||||
Ogre::TerrainGlobalOptions* mTerrainGlobals;
|
||||
Ogre::TerrainGroup mTerrainGroup;
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
#include "water.hpp"
|
||||
|
||||
#include <OgreRenderTarget.h>
|
||||
#include <OgreEntity.h>
|
||||
#include <OgreMeshManager.h>
|
||||
#include <OgreHardwarePixelBuffer.h>
|
||||
#include <OgreCompositorManager.h>
|
||||
#include <OgreCompositorInstance.h>
|
||||
#include <OgreCompositorChain.h>
|
||||
#include <OgreRoot.h>
|
||||
|
||||
#include "sky.hpp"
|
||||
#include "renderingmanager.hpp"
|
||||
#include "compositors.hpp"
|
||||
|
|
|
@ -1,12 +1,27 @@
|
|||
#ifndef GAME_MWRENDER_WATER_H
|
||||
#define GAME_MWRENDER_WATER_H
|
||||
|
||||
#include <Ogre.h>
|
||||
#include <OgrePlane.h>
|
||||
#include <OgreRenderQueue.h>
|
||||
#include <OgreRenderQueueListener.h>
|
||||
#include <OgreRenderTargetListener.h>
|
||||
#include <OgreMaterial.h>
|
||||
#include <OgreTexture.h>
|
||||
|
||||
#include <components/esm/loadcell.hpp>
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include "renderconst.hpp"
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
class Camera;
|
||||
class SceneManager;
|
||||
class SceneNode;
|
||||
class Entity;
|
||||
class Vector3;
|
||||
struct RenderTargetEvent;
|
||||
};
|
||||
|
||||
namespace MWRender {
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include <components/interpreter/runtime.hpp>
|
||||
#include <components/interpreter/opcodes.hpp>
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
#include "../mwmechanics/creaturestats.hpp"
|
||||
|
||||
#include "interpretercontext.hpp"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <components/interpreter/runtime.hpp>
|
||||
#include <components/interpreter/opcodes.hpp>
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "interpretercontext.hpp"
|
||||
#include "ref.hpp"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
#include "cellextensions.hpp"
|
||||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include <components/compiler/extensions.hpp>
|
||||
|
||||
#include <components/interpreter/interpreter.hpp>
|
||||
|
@ -8,8 +10,8 @@
|
|||
#include <components/interpreter/opcodes.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
|
||||
#include "interpretercontext.hpp"
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
|
||||
#include "compilercontext.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
#include "scriptmanager.hpp"
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
#include "../mwmechanics/npcstats.hpp"
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include <cassert>
|
||||
|
||||
#include <components/esm_store/reclists.hpp>
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "interpretercontext.hpp"
|
||||
#include "scriptmanager.hpp"
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
#include <cmath>
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
|
||||
#include <components/interpreter/types.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
|
||||
#include <components/interpreter/context.hpp>
|
||||
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/action.hpp"
|
||||
|
||||
namespace MWSound
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
#include "miscextensions.hpp"
|
||||
|
||||
#include <libs/openengine/ogre/fader.hpp>
|
||||
|
||||
#include <components/compiler/extensions.hpp>
|
||||
|
||||
#include <components/interpreter/interpreter.hpp>
|
||||
|
@ -102,7 +104,7 @@ namespace MWScript
|
|||
static_cast<InterpreterContext&> (runtime.getContext());
|
||||
|
||||
bool enabled =
|
||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWWorld::World::Render_CollisionDebug);
|
||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_CollisionDebug);
|
||||
|
||||
context.report (enabled ?
|
||||
"Collision Mesh Rendering -> On" : "Collision Mesh Rendering -> Off");
|
||||
|
@ -119,7 +121,7 @@ namespace MWScript
|
|||
static_cast<InterpreterContext&> (runtime.getContext());
|
||||
|
||||
bool enabled =
|
||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWWorld::World::Render_Wireframe);
|
||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_Wireframe);
|
||||
|
||||
context.report (enabled ?
|
||||
"Wireframe Rendering -> On" : "Wireframe Rendering -> Off");
|
||||
|
@ -135,7 +137,7 @@ namespace MWScript
|
|||
static_cast<InterpreterContext&> (runtime.getContext());
|
||||
|
||||
bool enabled =
|
||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWWorld::World::Render_Pathgrid);
|
||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_Pathgrid);
|
||||
|
||||
context.report (enabled ?
|
||||
"Path Grid rendering -> On" : "Path Grid Rendering -> Off");
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
#include <components/interpreter/runtime.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
|
||||
#include "interpretercontext.hpp"
|
||||
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
#include <components/interpreter/opcodes.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
|
|
|
@ -9,10 +9,12 @@
|
|||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
|
||||
#include "../mwrender/player.hpp"
|
||||
|
||||
#include "sound_output.hpp"
|
||||
#include "sound_decoder.hpp"
|
||||
#include "sound.hpp"
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace MWSound
|
|||
void stopSound3D(MWWorld::Ptr reference);
|
||||
///< Stop the given object from playing all sounds.
|
||||
|
||||
void stopSound(const MWWorld::Ptr::CellStore *cell);
|
||||
void stopSound(const MWWorld::CellStore *cell);
|
||||
///< Stop all sounds for the given cell.
|
||||
|
||||
void stopSound(const std::string& soundId);
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#include "actionequip.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "inventorystore.hpp"
|
||||
#include "player.hpp"
|
||||
#include "class.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
|
@ -14,7 +16,7 @@ namespace MWWorld
|
|||
void ActionEquip::execute ()
|
||||
{
|
||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayer().getPlayer();
|
||||
MWWorld::InventoryStore& invStore = static_cast<MWWorld::InventoryStore&>(MWWorld::Class::get(player).getContainerStore(player));
|
||||
MWWorld::InventoryStore& invStore = MWWorld::Class::get(player).getInventoryStore(player);
|
||||
|
||||
// slots that this item can be equipped in
|
||||
std::pair<std::vector<int>, bool> slots = MWWorld::Class::get(mObject).getEquipmentSlots(mObject);
|
||||
|
@ -51,4 +53,3 @@ namespace MWWorld
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#include "actionopen.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "class.hpp"
|
||||
#include "world.hpp"
|
||||
#include "containerstore.hpp"
|
||||
|
||||
#include "../mwclass/container.hpp"
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/container.hpp"
|
||||
|
||||
#include "class.hpp"
|
||||
#include "containerstore.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
ActionOpen::ActionOpen (const MWWorld::Ptr& container) : mContainer (container) {
|
||||
|
|
|
@ -13,8 +13,7 @@ namespace MWWorld
|
|||
|
||||
void ActionRead::execute ()
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
mObject.get<ESM::Book>();
|
||||
LiveCellRef<ESM::Book> *ref = mObject.get<ESM::Book>();
|
||||
|
||||
if (ref->base->data.isScroll)
|
||||
{
|
||||
|
@ -28,4 +27,3 @@ namespace MWWorld
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
#include "actiontake.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
|
||||
#include "class.hpp"
|
||||
#include "world.hpp"
|
||||
#include "containerstore.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
#include "actionteleport.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "world.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
#include "world.hpp"
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "class.hpp"
|
||||
#include "containerstore.hpp"
|
||||
|
||||
|
@ -39,7 +43,7 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getCellStore (const ESM::Cell *cell)
|
|||
|
||||
void MWWorld::Cells::fillContainers (Ptr::CellStore& cellStore)
|
||||
{
|
||||
for (ESMS::CellRefList<ESM::Container, RefData>::List::iterator iter (
|
||||
for (CellRefList<ESM::Container>::List::iterator iter (
|
||||
cellStore.containers.list.begin());
|
||||
iter!=cellStore.containers.list.end(); ++iter)
|
||||
{
|
||||
|
@ -49,7 +53,7 @@ void MWWorld::Cells::fillContainers (Ptr::CellStore& cellStore)
|
|||
iter->base->inventory, mStore);
|
||||
}
|
||||
|
||||
for (ESMS::CellRefList<ESM::Creature, RefData>::List::iterator iter (
|
||||
for (CellRefList<ESM::Creature>::List::iterator iter (
|
||||
cellStore.creatures.list.begin());
|
||||
iter!=cellStore.creatures.list.end(); ++iter)
|
||||
{
|
||||
|
@ -59,7 +63,7 @@ void MWWorld::Cells::fillContainers (Ptr::CellStore& cellStore)
|
|||
iter->base->inventory, mStore);
|
||||
}
|
||||
|
||||
for (ESMS::CellRefList<ESM::NPC, RefData>::List::iterator iter (
|
||||
for (CellRefList<ESM::NPC>::List::iterator iter (
|
||||
cellStore.npcs.list.begin());
|
||||
iter!=cellStore.npcs.list.end(); ++iter)
|
||||
{
|
||||
|
@ -85,8 +89,8 @@ MWWorld::Ptr MWWorld::Cells::getPtrAndCache (const std::string& name, Ptr::CellS
|
|||
return ptr;
|
||||
}
|
||||
|
||||
MWWorld::Cells::Cells (const ESMS::ESMStore& store, ESM::ESMReader& reader, MWWorld::World& world)
|
||||
: mStore (store), mReader (reader), mWorld (world),
|
||||
MWWorld::Cells::Cells (const ESMS::ESMStore& store, ESM::ESMReader& reader)
|
||||
: mStore (store), mReader (reader),
|
||||
mIdCache (20, std::pair<std::string, Ptr::CellStore *> ("", 0)), /// \todo make cache size configurable
|
||||
mIdCacheIndex (0)
|
||||
{}
|
||||
|
@ -111,11 +115,11 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getExterior (int x, int y)
|
|||
record.water = 0;
|
||||
record.mapColor = 0;
|
||||
|
||||
cell = mWorld.createRecord (record);
|
||||
cell = MWBase::Environment::get().getWorld()->createRecord (record);
|
||||
}
|
||||
|
||||
result = mExteriors.insert (std::make_pair (
|
||||
std::make_pair (x, y), Ptr::CellStore (cell))).first;
|
||||
std::make_pair (x, y), CellStore (cell))).first;
|
||||
}
|
||||
|
||||
if (result->second.mState!=Ptr::CellStore::State_Loaded)
|
||||
|
@ -168,64 +172,64 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name, Ptr::CellStore& ce
|
|||
return Ptr();
|
||||
}
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Activator, RefData> *ref = cell.activators.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Activator> *ref = cell.activators.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Potion, RefData> *ref = cell.potions.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Potion> *ref = cell.potions.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Apparatus, RefData> *ref = cell.appas.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Apparatus> *ref = cell.appas.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Armor, RefData> *ref = cell.armors.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Armor> *ref = cell.armors.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Book, RefData> *ref = cell.books.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Book> *ref = cell.books.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Clothing, RefData> *ref = cell.clothes.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Clothing> *ref = cell.clothes.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Container, RefData> *ref = cell.containers.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Container> *ref = cell.containers.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Creature, RefData> *ref = cell.creatures.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Creature> *ref = cell.creatures.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Door, RefData> *ref = cell.doors.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Door> *ref = cell.doors.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Ingredient, RefData> *ref = cell.ingreds.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Ingredient> *ref = cell.ingreds.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::CreatureLevList, RefData> *ref = cell.creatureLists.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::CreatureLevList> *ref = cell.creatureLists.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::ItemLevList, RefData> *ref = cell.itemLists.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::ItemLevList> *ref = cell.itemLists.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Light, RefData> *ref = cell.lights.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Light> *ref = cell.lights.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Tool, RefData> *ref = cell.lockpicks.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Tool> *ref = cell.lockpicks.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Miscellaneous, RefData> *ref = cell.miscItems.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Miscellaneous> *ref = cell.miscItems.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::NPC, RefData> *ref = cell.npcs.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::NPC> *ref = cell.npcs.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Probe, RefData> *ref = cell.probes.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Probe> *ref = cell.probes.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Repair, RefData> *ref = cell.repairs.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Repair> *ref = cell.repairs.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Static, RefData> *ref = cell.statics.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Static> *ref = cell.statics.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
if (ESMS::LiveCellRef<ESM::Weapon, RefData> *ref = cell.weapons.find (name))
|
||||
if (MWWorld::LiveCellRef<ESM::Weapon> *ref = cell.weapons.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
return Ptr();
|
||||
|
|
|
@ -18,39 +18,36 @@ namespace ESM
|
|||
|
||||
namespace MWWorld
|
||||
{
|
||||
class World;
|
||||
|
||||
/// \brief Cell container
|
||||
class Cells
|
||||
{
|
||||
const ESMS::ESMStore& mStore;
|
||||
ESM::ESMReader& mReader;
|
||||
std::map<std::string, Ptr::CellStore> mInteriors;
|
||||
std::map<std::pair<int, int>, Ptr::CellStore> mExteriors;
|
||||
MWWorld::World& mWorld;
|
||||
std::vector<std::pair<std::string, Ptr::CellStore *> > mIdCache;
|
||||
std::map<std::string, CellStore> mInteriors;
|
||||
std::map<std::pair<int, int>, CellStore> mExteriors;
|
||||
std::vector<std::pair<std::string, CellStore *> > mIdCache;
|
||||
std::size_t mIdCacheIndex;
|
||||
|
||||
Cells (const Cells&);
|
||||
Cells& operator= (const Cells&);
|
||||
|
||||
Ptr::CellStore *getCellStore (const ESM::Cell *cell);
|
||||
CellStore *getCellStore (const ESM::Cell *cell);
|
||||
|
||||
void fillContainers (Ptr::CellStore& cellStore);
|
||||
void fillContainers (CellStore& cellStore);
|
||||
|
||||
Ptr getPtrAndCache (const std::string& name, Ptr::CellStore& cellStore);
|
||||
Ptr getPtrAndCache (const std::string& name, CellStore& cellStore);
|
||||
|
||||
public:
|
||||
|
||||
Cells (const ESMS::ESMStore& store, ESM::ESMReader& reader, MWWorld::World& world);
|
||||
Cells (const ESMS::ESMStore& store, ESM::ESMReader& reader);
|
||||
///< \todo pass the dynamic part of the ESMStore isntead (once it is written) of the whole
|
||||
/// world
|
||||
|
||||
Ptr::CellStore *getExterior (int x, int y);
|
||||
CellStore *getExterior (int x, int y);
|
||||
|
||||
Ptr::CellStore *getInterior (const std::string& name);
|
||||
CellStore *getInterior (const std::string& name);
|
||||
|
||||
Ptr getPtr (const std::string& name, Ptr::CellStore& cellStore);
|
||||
Ptr getPtr (const std::string& name, CellStore& cellStore);
|
||||
|
||||
Ptr getPtr (const std::string& name);
|
||||
};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue