forked from teamnwah/openmw-tes3coop
Issue #107: CellStore moved from ESMS to MWWorld
This commit is contained in:
parent
fc063472d0
commit
76174098c7
48 changed files with 396 additions and 427 deletions
|
@ -50,7 +50,7 @@ add_openmw_dir (mwworld
|
|||
refdata world 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
|
||||
|
|
|
@ -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>
|
||||
|
@ -42,6 +41,7 @@
|
|||
#include "mwworld/world.hpp"
|
||||
#include "mwworld/class.hpp"
|
||||
#include "mwworld/player.hpp"
|
||||
#include "mwworld/cellstore.hpp"
|
||||
|
||||
#include "mwclass/classes.hpp"
|
||||
|
||||
|
|
|
@ -3,18 +3,20 @@
|
|||
|
||||
#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 "../mwrender/objects.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -30,7 +32,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
|
||||
|
@ -44,7 +46,7 @@ namespace MWClass
|
|||
|
||||
std::string Activator::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -52,7 +54,7 @@ namespace MWClass
|
|||
|
||||
std::string Activator::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -67,7 +69,7 @@ namespace MWClass
|
|||
|
||||
bool Activator::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -75,7 +77,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Activator::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Activator, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,14 +3,13 @@
|
|||
|
||||
#include <components/esm/loadappa.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/actionalchemy.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
|
@ -23,7 +22,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -39,7 +38,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
|
||||
|
@ -53,7 +52,7 @@ namespace MWClass
|
|||
|
||||
std::string Apparatus::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -70,7 +69,7 @@ namespace MWClass
|
|||
|
||||
std::string Apparatus::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -78,7 +77,7 @@ namespace MWClass
|
|||
|
||||
int Apparatus::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -103,7 +102,7 @@ namespace MWClass
|
|||
|
||||
std::string Apparatus::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -111,7 +110,7 @@ namespace MWClass
|
|||
|
||||
bool Apparatus::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -119,7 +118,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Apparatus::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Apparatus, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -5,13 +5,12 @@
|
|||
#include <components/esm/loadskil.hpp>
|
||||
#include <components/esm/loadgmst.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.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 "../mwbase/environment.hpp"
|
||||
|
||||
|
@ -25,7 +24,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -41,7 +40,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
const std::string &model = ref->base->model;
|
||||
|
@ -54,7 +53,7 @@ namespace MWClass
|
|||
|
||||
std::string Armor::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -76,7 +75,7 @@ namespace MWClass
|
|||
|
||||
int Armor::getItemMaxHealth (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->data.health;
|
||||
|
@ -84,7 +83,7 @@ namespace MWClass
|
|||
|
||||
std::string Armor::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -92,7 +91,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
std::vector<int> slots;
|
||||
|
@ -126,7 +125,7 @@ namespace MWClass
|
|||
|
||||
int Armor::getEquipmentSkill (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
std::string typeGmst;
|
||||
|
@ -164,7 +163,7 @@ namespace MWClass
|
|||
|
||||
int Armor::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -201,7 +200,7 @@ namespace MWClass
|
|||
|
||||
std::string Armor::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -209,7 +208,7 @@ namespace MWClass
|
|||
|
||||
bool Armor::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -217,7 +216,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Armor::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -260,7 +259,7 @@ namespace MWClass
|
|||
|
||||
std::string Armor::getEnchantment (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
|
||||
return ref->base->enchant;
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
|
||||
#include <components/esm/loadbook.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actionread.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
|
@ -21,7 +20,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -37,7 +36,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
|
||||
|
@ -51,7 +50,7 @@ namespace MWClass
|
|||
|
||||
std::string Book::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -66,7 +65,7 @@ namespace MWClass
|
|||
|
||||
std::string Book::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -74,7 +73,7 @@ namespace MWClass
|
|||
|
||||
int Book::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -99,7 +98,7 @@ namespace MWClass
|
|||
|
||||
std::string Book::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -107,7 +106,7 @@ namespace MWClass
|
|||
|
||||
bool Book::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -115,7 +114,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Book::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -143,7 +142,7 @@ namespace MWClass
|
|||
|
||||
std::string Book::getEnchantment (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
|
||||
return ref->base->enchant;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <components/esm/loadclot.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
@ -12,6 +10,7 @@
|
|||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
|
@ -24,7 +23,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -40,7 +39,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
|
||||
|
@ -54,7 +53,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -71,7 +70,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -79,7 +78,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
std::vector<int> slots;
|
||||
|
@ -119,7 +118,7 @@ namespace MWClass
|
|||
|
||||
int Clothing::getEquipmentSkill (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
if (ref->base->data.type==ESM::Clothing::Shoes)
|
||||
|
@ -130,7 +129,7 @@ namespace MWClass
|
|||
|
||||
int Clothing::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -145,7 +144,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getUpSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
if (ref->base->data.type == 8)
|
||||
|
@ -157,7 +156,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getDownSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
if (ref->base->data.type == 8)
|
||||
|
@ -169,7 +168,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -177,7 +176,7 @@ namespace MWClass
|
|||
|
||||
bool Clothing::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -185,7 +184,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Clothing::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -213,7 +212,7 @@ namespace MWClass
|
|||
|
||||
std::string Clothing::getEnchantment (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
|
||||
return ref->base->enchant;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <components/esm/loadcont.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
@ -12,6 +10,7 @@
|
|||
#include "../mwworld/containerstore.hpp"
|
||||
#include "../mwworld/customdata.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
@ -53,7 +52,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -69,7 +68,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
|
||||
|
@ -117,7 +116,7 @@ namespace MWClass
|
|||
|
||||
std::string Container::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -133,7 +132,7 @@ namespace MWClass
|
|||
|
||||
std::string Container::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -148,7 +147,7 @@ namespace MWClass
|
|||
|
||||
bool Container::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -156,7 +155,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Container::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -182,7 +181,7 @@ namespace MWClass
|
|||
|
||||
float Container::getCapacity (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
|
||||
return ref->base->weight;
|
||||
|
|
|
@ -40,7 +40,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, MWWorld::RefData> *ref = ptr.get<ESM::Creature>();
|
||||
|
||||
// creature stats
|
||||
data->mCreatureStats.mAttributes[0].set (ref->base->data.strength);
|
||||
|
@ -69,7 +69,7 @@ namespace MWClass
|
|||
|
||||
std::string Creature::getId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
return ref->base->mId;
|
||||
|
@ -83,7 +83,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
const std::string &model = ref->base->model;
|
||||
|
@ -97,7 +97,7 @@ namespace MWClass
|
|||
|
||||
std::string Creature::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -126,7 +126,7 @@ namespace MWClass
|
|||
|
||||
std::string Creature::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -148,7 +148,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Creature::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <components/esm/loaddoor.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
|
@ -12,6 +10,7 @@
|
|||
#include "../mwworld/nullaction.hpp"
|
||||
#include "../mwworld/actionteleport.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
@ -24,7 +23,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -40,7 +39,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
const std::string &model = ref->base->model;
|
||||
|
@ -52,7 +51,7 @@ namespace MWClass
|
|||
|
||||
std::string Door::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
if (ref->ref.teleport && !ref->ref.destCell.empty()) // TODO doors that lead to exteriors
|
||||
|
@ -64,7 +63,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
const std::string &openSound = ref->base->openSound;
|
||||
|
@ -134,7 +133,7 @@ namespace MWClass
|
|||
|
||||
std::string Door::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -149,7 +148,7 @@ namespace MWClass
|
|||
|
||||
bool Door::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -157,7 +156,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Door::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
|
||||
#include <components/esm/loadingr.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
@ -22,7 +21,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -38,7 +37,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
const std::string &model = ref->base->model;
|
||||
|
@ -50,7 +49,7 @@ namespace MWClass
|
|||
|
||||
std::string Ingredient::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -67,7 +66,7 @@ namespace MWClass
|
|||
|
||||
std::string Ingredient::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -75,7 +74,7 @@ namespace MWClass
|
|||
|
||||
int Ingredient::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -100,7 +99,7 @@ namespace MWClass
|
|||
|
||||
std::string Ingredient::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -108,7 +107,7 @@ namespace MWClass
|
|||
|
||||
bool Ingredient::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -116,7 +115,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Ingredient::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <components/esm/loadligh.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
@ -13,6 +11,7 @@
|
|||
#include "../mwworld/nullaction.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
@ -25,7 +24,7 @@ namespace MWClass
|
|||
{
|
||||
void Light::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -47,7 +46,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -65,7 +64,7 @@ namespace MWClass
|
|||
|
||||
std::string Light::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
if (ref->base->model.empty())
|
||||
|
@ -77,7 +76,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
if (!(ref->base->data.flags & ESM::Light::Carry))
|
||||
|
@ -91,7 +90,7 @@ namespace MWClass
|
|||
|
||||
std::string Light::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -99,7 +98,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
std::vector<int> slots;
|
||||
|
@ -112,7 +111,7 @@ namespace MWClass
|
|||
|
||||
int Light::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -138,7 +137,7 @@ namespace MWClass
|
|||
|
||||
std::string Light::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -146,7 +145,7 @@ namespace MWClass
|
|||
|
||||
bool Light::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -154,7 +153,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Light::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <components/esm/loadlocks.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
@ -12,6 +10,8 @@
|
|||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
|
@ -23,7 +23,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -39,7 +39,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace MWClass
|
|||
|
||||
std::string Lockpick::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -71,7 +71,7 @@ namespace MWClass
|
|||
|
||||
std::string Lockpick::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -88,7 +88,7 @@ namespace MWClass
|
|||
|
||||
int Lockpick::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -113,7 +113,7 @@ namespace MWClass
|
|||
|
||||
std::string Lockpick::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -121,7 +121,7 @@ namespace MWClass
|
|||
|
||||
bool Lockpick::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -129,7 +129,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Lockpick::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Tool, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Tool>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -5,13 +5,12 @@
|
|||
|
||||
#include <components/esm/loadmisc.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
@ -26,7 +25,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -42,7 +41,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
|
||||
|
@ -56,7 +55,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -73,7 +72,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -81,7 +80,7 @@ namespace MWClass
|
|||
|
||||
int Miscellaneous::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -96,7 +95,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getUpSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
||||
|
@ -108,7 +107,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getDownSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
||||
|
@ -120,7 +119,7 @@ namespace MWClass
|
|||
|
||||
std::string Miscellaneous::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -128,7 +127,7 @@ namespace MWClass
|
|||
|
||||
bool Miscellaneous::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -136,7 +135,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Miscellaneous::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -53,7 +53,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, MWWorld::RefData> *ref = ptr.get<ESM::NPC>();
|
||||
|
||||
// NPC stats
|
||||
if (!ref->base->faction.empty())
|
||||
|
@ -107,7 +107,7 @@ namespace MWClass
|
|||
|
||||
std::string Npc::getId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
return ref->base->mId;
|
||||
|
@ -120,7 +120,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -138,7 +138,7 @@ namespace MWClass
|
|||
|
||||
std::string Npc::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -182,7 +182,7 @@ namespace MWClass
|
|||
|
||||
std::string Npc::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -302,7 +302,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Npc::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
|
||||
#include <components/esm/loadalch.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
@ -22,7 +21,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -38,7 +37,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
|
||||
|
@ -52,7 +51,7 @@ namespace MWClass
|
|||
|
||||
std::string Potion::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -69,7 +68,7 @@ namespace MWClass
|
|||
|
||||
std::string Potion::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -77,7 +76,7 @@ namespace MWClass
|
|||
|
||||
int Potion::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -102,7 +101,7 @@ namespace MWClass
|
|||
|
||||
std::string Potion::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -110,7 +109,7 @@ namespace MWClass
|
|||
|
||||
bool Potion::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -118,7 +117,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Potion::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <components/esm/loadlocks.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
@ -12,6 +10,8 @@
|
|||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
|
@ -23,7 +23,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -39,7 +39,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace MWClass
|
|||
|
||||
std::string Probe::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -70,7 +70,7 @@ namespace MWClass
|
|||
|
||||
std::string Probe::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -87,7 +87,7 @@ namespace MWClass
|
|||
|
||||
int Probe::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -112,7 +112,7 @@ namespace MWClass
|
|||
|
||||
std::string Probe::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -120,7 +120,7 @@ namespace MWClass
|
|||
|
||||
bool Probe::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -128,7 +128,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Probe::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Probe, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
#include <components/esm/loadlocks.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
|
@ -21,7 +21,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -37,7 +37,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ namespace MWClass
|
|||
|
||||
std::string Repair::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -68,7 +68,7 @@ namespace MWClass
|
|||
|
||||
std::string Repair::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -76,7 +76,7 @@ namespace MWClass
|
|||
|
||||
int Repair::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -101,7 +101,7 @@ namespace MWClass
|
|||
|
||||
std::string Repair::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -109,7 +109,7 @@ namespace MWClass
|
|||
|
||||
bool Repair::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -117,7 +117,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Repair::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Repair, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace MWClass
|
|||
{
|
||||
void Static::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Static, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Static, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Static>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -27,7 +27,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Static>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <components/esm/loadweap.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
@ -12,6 +10,7 @@
|
|||
#include "../mwworld/actionequip.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
|
||||
#include "../mwgui/window_manager.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
@ -24,7 +23,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
@ -40,7 +39,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
|
||||
|
@ -54,7 +53,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getName (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->name;
|
||||
|
@ -76,7 +75,7 @@ namespace MWClass
|
|||
|
||||
int Weapon::getItemMaxHealth (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->data.health;
|
||||
|
@ -84,7 +83,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getScript (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->script;
|
||||
|
@ -92,7 +91,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
std::vector<int> slots;
|
||||
|
@ -116,7 +115,7 @@ namespace MWClass
|
|||
|
||||
int Weapon::getEquipmentSkill (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
const int size = 12;
|
||||
|
@ -146,7 +145,7 @@ namespace MWClass
|
|||
|
||||
int Weapon::getValue (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->data.value;
|
||||
|
@ -161,7 +160,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getUpSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
int type = ref->base->data.type;
|
||||
|
@ -207,7 +206,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getDownSoundId (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
int type = ref->base->data.type;
|
||||
|
@ -253,7 +252,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getInventoryIcon (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->icon;
|
||||
|
@ -261,7 +260,7 @@ namespace MWClass
|
|||
|
||||
bool Weapon::hasToolTip (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return (ref->base->name != "");
|
||||
|
@ -269,7 +268,7 @@ namespace MWClass
|
|||
|
||||
MWGui::ToolTipInfo Weapon::getToolTipInfo (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
|
@ -351,7 +350,7 @@ namespace MWClass
|
|||
|
||||
std::string Weapon::getEnchantment (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
|
||||
return ref->base->enchant;
|
||||
|
|
|
@ -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, MWWorld::RefData>* 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, MWWorld::RefData>* 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, MWWorld::RefData>* 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, MWWorld::RefData> *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, MWWorld::RefData> *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, MWWorld::RefData>* 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, MWWorld::RefData>* 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, MWWorld::RefData>* ref = mActor.get<ESM::Creature>();
|
||||
if (ref->base->hasAI)
|
||||
services = ref->base->AI.services;
|
||||
}
|
||||
|
|
|
@ -275,7 +275,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, MWWorld::RefData>* 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 +420,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, MWWorld::RefData>* ref = ingredient->getUserData<MWWorld::Ptr>()->get<ESM::Ingredient>();
|
||||
for (int i=0; i<4; ++i)
|
||||
{
|
||||
if (ref->base->data.effectID[i] < 0)
|
||||
|
|
|
@ -55,7 +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 =
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
mBook.get<ESM::Book>();
|
||||
|
||||
BookTextParser parser;
|
||||
|
|
|
@ -273,7 +273,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, MWWorld::RefData>* ref = mPtr.get<ESM::Container>();
|
||||
if (ref->base->flags & ESM::Container::Organic)
|
||||
{
|
||||
// user notification
|
||||
|
@ -556,7 +556,7 @@ void ContainerBase::addItem(MWWorld::Ptr item, int count)
|
|||
{
|
||||
MWWorld::ContainerStore& containerStore = MWWorld::Class::get(mPtr).getContainerStore(mPtr);
|
||||
|
||||
int origCount = item.getRefData().getCount();
|
||||
int origCount = item.getRefData().getCount();
|
||||
|
||||
item.getRefData().setCount(count);
|
||||
MWWorld::ContainerStoreIterator it = containerStore.add(item);
|
||||
|
|
|
@ -31,7 +31,7 @@ void ScrollWindow::open (MWWorld::Ptr scroll)
|
|||
|
||||
mScroll = scroll;
|
||||
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
mScroll.get<ESM::Book>();
|
||||
|
||||
BookTextParser parser;
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace MWGui
|
|||
offerButtonWidth,
|
||||
mOfferButton->getHeight());
|
||||
|
||||
setCoord(400, 0, 400, 300);
|
||||
setCoord(400, 0, 400, 300);
|
||||
|
||||
static_cast<MyGUI::Window*>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &TradeWindow::onWindowResize);
|
||||
}
|
||||
|
@ -161,7 +161,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, MWWorld::RefData>* ref = mPtr.get<ESM::NPC>();
|
||||
if (ref->base->npdt52.gold == -10)
|
||||
merchantgold = ref->base->npdt12.gold;
|
||||
else
|
||||
|
@ -169,7 +169,7 @@ namespace MWGui
|
|||
}
|
||||
else // ESM::Creature
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData>* ref = mPtr.get<ESM::Creature>();
|
||||
MWWorld::LiveCellRef<ESM::Creature, MWWorld::RefData>* ref = mPtr.get<ESM::Creature>();
|
||||
merchantgold = ref->base->data.gold;
|
||||
}
|
||||
if (mCurrentBalance > 0 && merchantgold < mCurrentBalance)
|
||||
|
@ -244,7 +244,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, MWWorld::RefData>* ref = mPtr.get<ESM::NPC>();
|
||||
if (ref->base->npdt52.gold == -10)
|
||||
merchantgold = ref->base->npdt12.gold;
|
||||
else
|
||||
|
@ -252,7 +252,7 @@ namespace MWGui
|
|||
}
|
||||
else // ESM::Creature
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData>* ref = mPtr.get<ESM::Creature>();
|
||||
MWWorld::LiveCellRef<ESM::Creature, MWWorld::RefData>* ref = mPtr.get<ESM::Creature>();
|
||||
merchantgold = ref->base->data.gold;
|
||||
}
|
||||
|
||||
|
@ -289,13 +289,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, MWWorld::RefData>* 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, MWWorld::RefData>* ref = mPtr.get<ESM::Creature>();
|
||||
if (ref->base->hasAI)
|
||||
services = ref->base->AI.services;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
#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"
|
||||
|
||||
|
|
|
@ -12,7 +12,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
|
||||
assert (ref->base != NULL);
|
||||
|
|
|
@ -38,7 +38,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, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
Ogre::Entity* blank = 0;
|
||||
std::vector<Nif::NiTriShapeCopy>* blankshape = 0;
|
||||
|
|
|
@ -56,7 +56,7 @@ void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_)
|
|||
|
||||
insert->setPosition(f[0], f[1], f[2]);
|
||||
insert->setScale(ptr.getCellRef().scale, ptr.getCellRef().scale, ptr.getCellRef().scale);
|
||||
|
||||
|
||||
|
||||
// Convert MW rotation to a quaternion:
|
||||
f = ptr.getCellRef().pos.rot;
|
||||
|
@ -194,7 +194,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 =
|
||||
MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
|
||||
LightInfo info;
|
||||
|
@ -307,7 +307,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())
|
||||
{
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwworld/refdata.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
|
@ -88,7 +86,7 @@ public:
|
|||
///< \return found?
|
||||
|
||||
void removeCell(MWWorld::Ptr::CellStore* store);
|
||||
void buildStaticGeometry(ESMS::CellStore<MWWorld::RefData> &cell);
|
||||
void buildStaticGeometry(MWWorld::Ptr::CellStore &cell);
|
||||
void setMwRoot(Ogre::SceneNode* root);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -323,7 +323,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 +372,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();
|
||||
|
|
|
@ -136,13 +136,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::Ptr::CellStore &mCell);
|
||||
|
||||
void requestMap (MWWorld::Ptr::CellStore* cell);
|
||||
///< request the local map for a cell
|
||||
|
||||
/// configure fog according to cell
|
||||
void configureFog(ESMS::CellStore<MWWorld::RefData> &mCell);
|
||||
void configureFog(MWWorld::Ptr::CellStore &mCell);
|
||||
|
||||
/// configure fog manually
|
||||
void configureFog(const float density, const Ogre::ColourValue& colour);
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace MWWorld
|
|||
|
||||
void ActionRead::execute ()
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
||||
mObject.get<ESM::Book>();
|
||||
|
||||
if (ref->base->data.isScroll)
|
||||
|
@ -28,4 +28,3 @@ namespace MWWorld
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,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, RefData>::List::iterator iter (
|
||||
cellStore.containers.list.begin());
|
||||
iter!=cellStore.containers.list.end(); ++iter)
|
||||
{
|
||||
|
@ -49,7 +49,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, RefData>::List::iterator iter (
|
||||
cellStore.creatures.list.begin());
|
||||
iter!=cellStore.creatures.list.end(); ++iter)
|
||||
{
|
||||
|
@ -59,7 +59,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, RefData>::List::iterator iter (
|
||||
cellStore.npcs.list.begin());
|
||||
iter!=cellStore.npcs.list.end(); ++iter)
|
||||
{
|
||||
|
@ -168,64 +168,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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *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, RefData> *ref = cell.weapons.find (name))
|
||||
return Ptr (ref, &cell);
|
||||
|
||||
return Ptr();
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
#ifndef _GAME_CELL_STORE_H
|
||||
#define _GAME_CELL_STORE_H
|
||||
#ifndef GAME_MWWORLD_CELLSTORE_H
|
||||
#define GAME_MWWORLD_CELLSTORE_H
|
||||
|
||||
/*
|
||||
Cell storage.
|
||||
#include <components/esm/records.hpp>
|
||||
|
||||
Used to load, look up and store all references in a single cell.
|
||||
|
||||
Depends on esm/loadcell.hpp (loading from ESM) and esm_store.hpp
|
||||
(looking up references.) Neither of these modules depend on us.
|
||||
*/
|
||||
|
||||
#include "store.hpp"
|
||||
#include "components/esm/records.hpp"
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
@ -20,10 +12,8 @@
|
|||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
|
||||
namespace ESMS
|
||||
namespace MWWorld
|
||||
{
|
||||
using namespace ESM;
|
||||
|
||||
/// A reference to one object (of any type) in a cell.
|
||||
///
|
||||
/// Constructing this with a CellRef instance in the constructor means that
|
||||
|
@ -33,7 +23,7 @@ namespace ESMS
|
|||
template <typename X, typename D>
|
||||
struct LiveCellRef
|
||||
{
|
||||
LiveCellRef(const CellRef& cref, const X* b = NULL) : base(b), ref(cref),
|
||||
LiveCellRef(const ESM::CellRef& cref, const X* b = NULL) : base(b), ref(cref),
|
||||
mData(ref) {}
|
||||
|
||||
|
||||
|
@ -45,7 +35,7 @@ namespace ESMS
|
|||
/* Information about this instance, such as 3D location and
|
||||
rotation and individual type-dependent data.
|
||||
*/
|
||||
CellRef ref;
|
||||
ESM::CellRef ref;
|
||||
|
||||
/// runtime-data
|
||||
D mData;
|
||||
|
@ -63,7 +53,7 @@ namespace ESMS
|
|||
// ESMStore. Insert the reference into the list if a match is
|
||||
// found. If not, throw an exception.
|
||||
template <typename Y>
|
||||
void find(CellRef &ref, const Y& recList)
|
||||
void find(ESM::CellRef &ref, const Y& recList)
|
||||
{
|
||||
const X* obj = recList.find(ref.refID);
|
||||
if(obj == NULL)
|
||||
|
@ -107,28 +97,28 @@ namespace ESMS
|
|||
float mWaterLevel;
|
||||
|
||||
// Lists for each individual object type
|
||||
CellRefList<Activator, D> activators;
|
||||
CellRefList<Potion, D> potions;
|
||||
CellRefList<Apparatus, D> appas;
|
||||
CellRefList<Armor, D> armors;
|
||||
CellRefList<Book, D> books;
|
||||
CellRefList<Clothing, D> clothes;
|
||||
CellRefList<Container, D> containers;
|
||||
CellRefList<Creature, D> creatures;
|
||||
CellRefList<Door, D> doors;
|
||||
CellRefList<Ingredient, D> ingreds;
|
||||
CellRefList<CreatureLevList, D> creatureLists;
|
||||
CellRefList<ItemLevList, D> itemLists;
|
||||
CellRefList<ESM::Activator, D> activators;
|
||||
CellRefList<ESM::Potion, D> potions;
|
||||
CellRefList<ESM::Apparatus, D> appas;
|
||||
CellRefList<ESM::Armor, D> armors;
|
||||
CellRefList<ESM::Book, D> books;
|
||||
CellRefList<ESM::Clothing, D> clothes;
|
||||
CellRefList<ESM::Container, D> containers;
|
||||
CellRefList<ESM::Creature, D> creatures;
|
||||
CellRefList<ESM::Door, D> doors;
|
||||
CellRefList<ESM::Ingredient, D> ingreds;
|
||||
CellRefList<ESM::CreatureLevList, D> creatureLists;
|
||||
CellRefList<ESM::ItemLevList, D> itemLists;
|
||||
CellRefList<ESM::Light, D> lights;
|
||||
CellRefList<Tool, D> lockpicks;
|
||||
CellRefList<Miscellaneous, D> miscItems;
|
||||
CellRefList<NPC, D> npcs;
|
||||
CellRefList<Probe, D> probes;
|
||||
CellRefList<Repair, D> repairs;
|
||||
CellRefList<Static, D> statics;
|
||||
CellRefList<Weapon, D> weapons;
|
||||
CellRefList<ESM::Tool, D> lockpicks;
|
||||
CellRefList<ESM::Miscellaneous, D> miscItems;
|
||||
CellRefList<ESM::NPC, D> npcs;
|
||||
CellRefList<ESM::Probe, D> probes;
|
||||
CellRefList<ESM::Repair, D> repairs;
|
||||
CellRefList<ESM::Static, D> statics;
|
||||
CellRefList<ESM::Weapon, D> weapons;
|
||||
|
||||
void load (const ESMStore &store, ESMReader &esm)
|
||||
void load (const ESMS::ESMStore &store, ESM::ESMReader &esm)
|
||||
{
|
||||
if (mState!=State_Loaded)
|
||||
{
|
||||
|
@ -143,7 +133,7 @@ namespace ESMS
|
|||
}
|
||||
}
|
||||
|
||||
void preload (const ESMStore &store, ESMReader &esm)
|
||||
void preload (const ESMS::ESMStore &store, ESM::ESMReader &esm)
|
||||
{
|
||||
if (mState==State_Unloaded)
|
||||
{
|
||||
|
@ -196,7 +186,7 @@ namespace ESMS
|
|||
}
|
||||
|
||||
/// Run through references and store IDs
|
||||
void listRefs(const ESMStore &store, ESMReader &esm)
|
||||
void listRefs(const ESMS::ESMStore &store, ESM::ESMReader &esm)
|
||||
{
|
||||
assert (cell);
|
||||
|
||||
|
@ -206,7 +196,7 @@ namespace ESMS
|
|||
// Reopen the ESM reader and seek to the right position.
|
||||
cell->restore (esm);
|
||||
|
||||
CellRef ref;
|
||||
ESM::CellRef ref;
|
||||
|
||||
// Get each reference in turn
|
||||
while (cell->getNextRef (esm, ref))
|
||||
|
@ -222,7 +212,7 @@ namespace ESMS
|
|||
std::sort (mIds.begin(), mIds.end());
|
||||
}
|
||||
|
||||
void loadRefs(const ESMStore &store, ESMReader &esm)
|
||||
void loadRefs(const ESMS::ESMStore &store, ESM::ESMReader &esm)
|
||||
{
|
||||
assert (cell);
|
||||
|
||||
|
@ -232,7 +222,7 @@ namespace ESMS
|
|||
// Reopen the ESM reader and seek to the right position.
|
||||
cell->restore(esm);
|
||||
|
||||
CellRef ref;
|
||||
ESM::CellRef ref;
|
||||
|
||||
// Get each reference in turn
|
||||
while(cell->getNextRef(esm, ref))
|
||||
|
@ -253,26 +243,26 @@ namespace ESMS
|
|||
*/
|
||||
switch(rec)
|
||||
{
|
||||
case REC_ACTI: activators.find(ref, store.activators); break;
|
||||
case REC_ALCH: potions.find(ref, store.potions); break;
|
||||
case REC_APPA: appas.find(ref, store.appas); break;
|
||||
case REC_ARMO: armors.find(ref, store.armors); break;
|
||||
case REC_BOOK: books.find(ref, store.books); break;
|
||||
case REC_CLOT: clothes.find(ref, store.clothes); break;
|
||||
case REC_CONT: containers.find(ref, store.containers); break;
|
||||
case REC_CREA: creatures.find(ref, store.creatures); break;
|
||||
case REC_DOOR: doors.find(ref, store.doors); break;
|
||||
case REC_INGR: ingreds.find(ref, store.ingreds); break;
|
||||
case REC_LEVC: creatureLists.find(ref, store.creatureLists); break;
|
||||
case REC_LEVI: itemLists.find(ref, store.itemLists); break;
|
||||
case REC_LIGH: lights.find(ref, store.lights); break;
|
||||
case REC_LOCK: lockpicks.find(ref, store.lockpicks); break;
|
||||
case REC_MISC: miscItems.find(ref, store.miscItems); break;
|
||||
case REC_NPC_: npcs.find(ref, store.npcs); break;
|
||||
case REC_PROB: probes.find(ref, store.probes); break;
|
||||
case REC_REPA: repairs.find(ref, store.repairs); break;
|
||||
case REC_STAT: statics.find(ref, store.statics); break;
|
||||
case REC_WEAP: weapons.find(ref, store.weapons); break;
|
||||
case ESM::REC_ACTI: activators.find(ref, store.activators); break;
|
||||
case ESM::REC_ALCH: potions.find(ref, store.potions); break;
|
||||
case ESM::REC_APPA: appas.find(ref, store.appas); break;
|
||||
case ESM::REC_ARMO: armors.find(ref, store.armors); break;
|
||||
case ESM::REC_BOOK: books.find(ref, store.books); break;
|
||||
case ESM::REC_CLOT: clothes.find(ref, store.clothes); break;
|
||||
case ESM::REC_CONT: containers.find(ref, store.containers); break;
|
||||
case ESM::REC_CREA: creatures.find(ref, store.creatures); break;
|
||||
case ESM::REC_DOOR: doors.find(ref, store.doors); break;
|
||||
case ESM::REC_INGR: ingreds.find(ref, store.ingreds); break;
|
||||
case ESM::REC_LEVC: creatureLists.find(ref, store.creatureLists); break;
|
||||
case ESM::REC_LEVI: itemLists.find(ref, store.itemLists); break;
|
||||
case ESM::REC_LIGH: lights.find(ref, store.lights); break;
|
||||
case ESM::REC_LOCK: lockpicks.find(ref, store.lockpicks); break;
|
||||
case ESM::REC_MISC: miscItems.find(ref, store.miscItems); break;
|
||||
case ESM::REC_NPC_: npcs.find(ref, store.npcs); break;
|
||||
case ESM::REC_PROB: probes.find(ref, store.probes); break;
|
||||
case ESM::REC_REPA: repairs.find(ref, store.repairs); break;
|
||||
case ESM::REC_STAT: statics.find(ref, store.statics); break;
|
||||
case ESM::REC_WEAP: weapons.find(ref, store.weapons); break;
|
||||
|
||||
case 0: std::cout << "Cell reference " + ref.refID + " not found!\n"; break;
|
||||
default:
|
|
@ -5,7 +5,7 @@
|
|||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <components/esm/loadcont.hpp>
|
||||
|
||||
|
@ -19,11 +19,11 @@
|
|||
namespace
|
||||
{
|
||||
template<typename T>
|
||||
float getTotalWeight (const ESMS::CellRefList<T, MWWorld::RefData>& cellRefList)
|
||||
float getTotalWeight (const MWWorld::CellRefList<T, MWWorld::RefData>& cellRefList)
|
||||
{
|
||||
float sum = 0;
|
||||
|
||||
for (typename ESMS::CellRefList<T, MWWorld::RefData>::List::const_iterator iter (
|
||||
for (typename MWWorld::CellRefList<T, MWWorld::RefData>::List::const_iterator iter (
|
||||
cellRefList.list.begin());
|
||||
iter!=cellRefList.list.end();
|
||||
++iter)
|
||||
|
@ -78,7 +78,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& ptr)
|
|||
// this ensures that gold piles of different sizes stack with each other (also, several scripts rely on Gold_001 for detecting player gold)
|
||||
if (MWWorld::Class::get(ptr).getName(ptr) == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *gold =
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData> *gold =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
if (compare_string_ci(gold->ref.refID, "gold_001")
|
||||
|
@ -281,29 +281,29 @@ MWWorld::ContainerStoreIterator::ContainerStoreIterator (int mask, ContainerStor
|
|||
++*this;
|
||||
}
|
||||
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Potion, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Potion, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Potion), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mPotion(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Apparatus, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Apparatus, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Apparatus), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mApparatus(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Armor, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Armor, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Armor), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mArmor(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Book, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Book, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Book), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mBook(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Clothing, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Clothing, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Clothing), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mClothing(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Ingredient, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Ingredient, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Ingredient), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mIngredient(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Light, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Light, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Light), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mLight(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Tool, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Tool, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Lockpick), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mLockpick(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Miscellaneous, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Miscellaneous, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Miscellaneous), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mMiscellaneous(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Probe, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Probe, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Probe), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mProbe(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Repair, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Repair, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Repair), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mRepair(iterator){}
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Weapon, RefData>::List::iterator iterator)
|
||||
MWWorld::ContainerStoreIterator::ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Weapon, RefData>::List::iterator iterator)
|
||||
: mType(MWWorld::ContainerStore::Type_Weapon), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mWeapon(iterator){}
|
||||
|
||||
void MWWorld::ContainerStoreIterator::incType()
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
|
||||
#include <iterator>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "cellstore.hpp"
|
||||
#include "refdata.hpp"
|
||||
#include "ptr.hpp"
|
||||
|
||||
|
@ -40,18 +39,18 @@ namespace MWWorld
|
|||
|
||||
private:
|
||||
|
||||
ESMS::CellRefList<ESM::Potion, RefData> potions;
|
||||
ESMS::CellRefList<ESM::Apparatus, RefData> appas;
|
||||
ESMS::CellRefList<ESM::Armor, RefData> armors;
|
||||
ESMS::CellRefList<ESM::Book, RefData> books;
|
||||
ESMS::CellRefList<ESM::Clothing, RefData> clothes;
|
||||
ESMS::CellRefList<ESM::Ingredient, RefData> ingreds;
|
||||
ESMS::CellRefList<ESM::Light, RefData> lights;
|
||||
ESMS::CellRefList<ESM::Tool, RefData> lockpicks;
|
||||
ESMS::CellRefList<ESM::Miscellaneous, RefData> miscItems;
|
||||
ESMS::CellRefList<ESM::Probe, RefData> probes;
|
||||
ESMS::CellRefList<ESM::Repair, RefData> repairs;
|
||||
ESMS::CellRefList<ESM::Weapon, RefData> weapons;
|
||||
MWWorld::CellRefList<ESM::Potion, RefData> potions;
|
||||
MWWorld::CellRefList<ESM::Apparatus, RefData> appas;
|
||||
MWWorld::CellRefList<ESM::Armor, RefData> armors;
|
||||
MWWorld::CellRefList<ESM::Book, RefData> books;
|
||||
MWWorld::CellRefList<ESM::Clothing, RefData> clothes;
|
||||
MWWorld::CellRefList<ESM::Ingredient, RefData> ingreds;
|
||||
MWWorld::CellRefList<ESM::Light, RefData> lights;
|
||||
MWWorld::CellRefList<ESM::Tool, RefData> lockpicks;
|
||||
MWWorld::CellRefList<ESM::Miscellaneous, RefData> miscItems;
|
||||
MWWorld::CellRefList<ESM::Probe, RefData> probes;
|
||||
MWWorld::CellRefList<ESM::Repair, RefData> repairs;
|
||||
MWWorld::CellRefList<ESM::Weapon, RefData> weapons;
|
||||
int mStateId;
|
||||
mutable float mCachedWeight;
|
||||
mutable bool mWeightUpToDate;
|
||||
|
@ -122,18 +121,18 @@ namespace MWWorld
|
|||
ContainerStore *mContainer;
|
||||
mutable Ptr mPtr;
|
||||
|
||||
ESMS::CellRefList<ESM::Potion, RefData>::List::iterator mPotion;
|
||||
ESMS::CellRefList<ESM::Apparatus, RefData>::List::iterator mApparatus;
|
||||
ESMS::CellRefList<ESM::Armor, RefData>::List::iterator mArmor;
|
||||
ESMS::CellRefList<ESM::Book, RefData>::List::iterator mBook;
|
||||
ESMS::CellRefList<ESM::Clothing, RefData>::List::iterator mClothing;
|
||||
ESMS::CellRefList<ESM::Ingredient, RefData>::List::iterator mIngredient;
|
||||
ESMS::CellRefList<ESM::Light, RefData>::List::iterator mLight;
|
||||
ESMS::CellRefList<ESM::Tool, RefData>::List::iterator mLockpick;
|
||||
ESMS::CellRefList<ESM::Miscellaneous, RefData>::List::iterator mMiscellaneous;
|
||||
ESMS::CellRefList<ESM::Probe, RefData>::List::iterator mProbe;
|
||||
ESMS::CellRefList<ESM::Repair, RefData>::List::iterator mRepair;
|
||||
ESMS::CellRefList<ESM::Weapon, RefData>::List::iterator mWeapon;
|
||||
MWWorld::CellRefList<ESM::Potion, RefData>::List::iterator mPotion;
|
||||
MWWorld::CellRefList<ESM::Apparatus, RefData>::List::iterator mApparatus;
|
||||
MWWorld::CellRefList<ESM::Armor, RefData>::List::iterator mArmor;
|
||||
MWWorld::CellRefList<ESM::Book, RefData>::List::iterator mBook;
|
||||
MWWorld::CellRefList<ESM::Clothing, RefData>::List::iterator mClothing;
|
||||
MWWorld::CellRefList<ESM::Ingredient, RefData>::List::iterator mIngredient;
|
||||
MWWorld::CellRefList<ESM::Light, RefData>::List::iterator mLight;
|
||||
MWWorld::CellRefList<ESM::Tool, RefData>::List::iterator mLockpick;
|
||||
MWWorld::CellRefList<ESM::Miscellaneous, RefData>::List::iterator mMiscellaneous;
|
||||
MWWorld::CellRefList<ESM::Probe, RefData>::List::iterator mProbe;
|
||||
MWWorld::CellRefList<ESM::Repair, RefData>::List::iterator mRepair;
|
||||
MWWorld::CellRefList<ESM::Weapon, RefData>::List::iterator mWeapon;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -144,18 +143,18 @@ namespace MWWorld
|
|||
///< Begin-iterator
|
||||
|
||||
// construct iterator using a CellRefList iterator
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Potion, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Apparatus, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Armor, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Book, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Clothing, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Ingredient, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Light, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Tool, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Miscellaneous, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Probe, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Repair, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Weapon, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Potion, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Apparatus, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Armor, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Book, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Clothing, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Ingredient, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Light, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Tool, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Miscellaneous, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Probe, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Repair, RefData>::List::iterator);
|
||||
ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Weapon, RefData>::List::iterator);
|
||||
|
||||
void incType();
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
|
||||
#include "localscripts.hpp"
|
||||
|
||||
#include "cellstore.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
template<typename T>
|
||||
void listCellScripts (MWWorld::LocalScripts& localScripts,
|
||||
ESMS::CellRefList<T, MWWorld::RefData>& cellRefList, MWWorld::Ptr::CellStore *cell)
|
||||
MWWorld::CellRefList<T, MWWorld::RefData>& cellRefList, MWWorld::Ptr::CellStore *cell)
|
||||
{
|
||||
for (typename ESMS::CellRefList<T, MWWorld::RefData>::List::iterator iter (
|
||||
for (typename MWWorld::CellRefList<T, MWWorld::RefData>::List::iterator iter (
|
||||
cellRefList.list.begin());
|
||||
iter!=cellRefList.list.end(); ++iter)
|
||||
{
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
#include <boost/any.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
||||
#include "ptr.hpp"
|
||||
#include "cellstore.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
|
@ -24,11 +24,11 @@ namespace MWWorld
|
|||
{
|
||||
if (const T *instance = list.search (name))
|
||||
{
|
||||
ESMS::LiveCellRef<T, RefData> ref;
|
||||
LiveCellRef<T, RefData> ref;
|
||||
ref.base = instance;
|
||||
|
||||
mRef = ref;
|
||||
mPtr = Ptr (&boost::any_cast<ESMS::LiveCellRef<T, RefData>&> (mRef), 0);
|
||||
mPtr = Ptr (&boost::any_cast<LiveCellRef<T, RefData>&> (mRef), 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -41,11 +41,11 @@ namespace MWWorld
|
|||
{
|
||||
if (const T *instance = list.search (name))
|
||||
{
|
||||
ESMS::LiveCellRef<T, RefData> ref;
|
||||
LiveCellRef<T, RefData> ref;
|
||||
ref.base = instance;
|
||||
|
||||
mRef = ref;
|
||||
mPtr = Ptr (&boost::any_cast<ESMS::LiveCellRef<T, RefData>&> (mRef), 0);
|
||||
mPtr = Ptr (&boost::any_cast<LiveCellRef<T, RefData>&> (mRef), 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
|
||||
#include "OgreCamera.h"
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "../mwworld/refdata.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
|
@ -20,9 +19,9 @@ namespace MWWorld
|
|||
class World;
|
||||
|
||||
/// \brief NPC object representing the player and additional player data
|
||||
class Player
|
||||
class Player
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> mPlayer;
|
||||
LiveCellRef<ESM::NPC, MWWorld::RefData> mPlayer;
|
||||
MWWorld::Ptr::CellStore *mCellStore;
|
||||
MWRender::Player *mRenderer;
|
||||
MWWorld::World& mWorld;
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
#include <components/esm/loadcell.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "cellstore.hpp"
|
||||
#include "refdata.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
|
@ -21,7 +20,7 @@ namespace MWWorld
|
|||
{
|
||||
public:
|
||||
|
||||
typedef ESMS::CellStore<RefData> CellStore;
|
||||
typedef MWWorld::CellStore<RefData> CellStore;
|
||||
|
||||
boost::any mPtr;
|
||||
ESM::CellRef *mCellRef;
|
||||
|
@ -51,7 +50,7 @@ namespace MWWorld
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
Ptr (ESMS::LiveCellRef<T, RefData> *liveCellRef, CellStore *cell)
|
||||
Ptr (MWWorld::LiveCellRef<T, RefData> *liveCellRef, CellStore *cell)
|
||||
: mContainerStore (0)
|
||||
{
|
||||
mPtr = liveCellRef;
|
||||
|
@ -62,9 +61,9 @@ namespace MWWorld
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
ESMS::LiveCellRef<T, RefData> *get() const
|
||||
MWWorld::LiveCellRef<T, RefData> *get() const
|
||||
{
|
||||
return boost::any_cast<ESMS::LiveCellRef<T, RefData>*> (mPtr);
|
||||
return boost::any_cast<MWWorld::LiveCellRef<T, RefData>*> (mPtr);
|
||||
}
|
||||
|
||||
ESM::CellRef& getCellRef() const;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
#include "refdata.hpp"
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "customdata.hpp"
|
||||
#include "cellstore.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace
|
|||
|
||||
template<typename T>
|
||||
void insertCellRefList(MWRender::RenderingManager& rendering,
|
||||
T& cellRefList, ESMS::CellStore<MWWorld::RefData> &cell, MWWorld::PhysicsSystem& physics)
|
||||
T& cellRefList, MWWorld::CellStore<MWWorld::RefData> &cell, MWWorld::PhysicsSystem& physics)
|
||||
{
|
||||
if (!cellRefList.list.empty())
|
||||
{
|
||||
|
@ -312,7 +312,7 @@ namespace MWWorld
|
|||
mCellChanged = false;
|
||||
}
|
||||
|
||||
void Scene::insertCell(ESMS::CellStore<MWWorld::RefData> &cell)
|
||||
void Scene::insertCell (Ptr::CellStore &cell)
|
||||
{
|
||||
// Loop through all references in the cell
|
||||
insertCellRefList(mRendering, cell.activators, cell, *mPhysics);
|
||||
|
@ -348,67 +348,67 @@ namespace MWWorld
|
|||
// insert into the correct CellRefList
|
||||
if (type == typeid(ESM::Potion).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData>* ref = ptr.get<ESM::Potion>();
|
||||
MWWorld::LiveCellRef<ESM::Potion, MWWorld::RefData>* ref = ptr.get<ESM::Potion>();
|
||||
cell->potions.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->potions.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Apparatus).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData>* ref = ptr.get<ESM::Apparatus>();
|
||||
MWWorld::LiveCellRef<ESM::Apparatus, MWWorld::RefData>* ref = ptr.get<ESM::Apparatus>();
|
||||
cell->appas.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->appas.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Armor).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData>* ref = ptr.get<ESM::Armor>();
|
||||
MWWorld::LiveCellRef<ESM::Armor, MWWorld::RefData>* ref = ptr.get<ESM::Armor>();
|
||||
cell->armors.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->armors.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Book).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData>* ref = ptr.get<ESM::Book>();
|
||||
MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData>* ref = ptr.get<ESM::Book>();
|
||||
cell->books.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->books.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Clothing).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData>* ref = ptr.get<ESM::Clothing>();
|
||||
MWWorld::LiveCellRef<ESM::Clothing, MWWorld::RefData>* ref = ptr.get<ESM::Clothing>();
|
||||
cell->clothes.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->clothes.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Ingredient).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData>* ref = ptr.get<ESM::Ingredient>();
|
||||
MWWorld::LiveCellRef<ESM::Ingredient, MWWorld::RefData>* ref = ptr.get<ESM::Ingredient>();
|
||||
cell->ingreds.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->ingreds.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Light).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData>* ref = ptr.get<ESM::Light>();
|
||||
MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData>* ref = ptr.get<ESM::Light>();
|
||||
cell->lights.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->lights.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Tool).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData>* ref = ptr.get<ESM::Tool>();
|
||||
MWWorld::LiveCellRef<ESM::Tool, MWWorld::RefData>* ref = ptr.get<ESM::Tool>();
|
||||
cell->lockpicks.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->lockpicks.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Repair).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData>* ref = ptr.get<ESM::Repair>();
|
||||
MWWorld::LiveCellRef<ESM::Repair, MWWorld::RefData>* ref = ptr.get<ESM::Repair>();
|
||||
cell->repairs.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->repairs.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Probe).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData>* ref = ptr.get<ESM::Probe>();
|
||||
MWWorld::LiveCellRef<ESM::Probe, MWWorld::RefData>* ref = ptr.get<ESM::Probe>();
|
||||
cell->probes.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->probes.list.back(), cell);
|
||||
}
|
||||
else if (type == typeid(ESM::Weapon).name())
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData>* ref = ptr.get<ESM::Weapon>();
|
||||
MWWorld::LiveCellRef<ESM::Weapon, MWWorld::RefData>* ref = ptr.get<ESM::Weapon>();
|
||||
cell->weapons.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->weapons.list.back(), cell);
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ namespace MWWorld
|
|||
|
||||
MWWorld::ManualRef newRef (MWBase::Environment::get().getWorld()->getStore(), base);
|
||||
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData>* ref = newRef.getPtr().get<ESM::Miscellaneous>();
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData>* ref = newRef.getPtr().get<ESM::Miscellaneous>();
|
||||
|
||||
cell->miscItems.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->miscItems.list.back(), cell);
|
||||
|
@ -444,7 +444,7 @@ namespace MWWorld
|
|||
}
|
||||
else
|
||||
{
|
||||
ESMS::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData>* ref = ptr.get<ESM::Miscellaneous>();
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous, MWWorld::RefData>* ref = ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
cell->miscItems.list.push_back( *ref );
|
||||
newPtr = MWWorld::Ptr(&cell->miscItems.list.back(), cell);
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
#include <openengine/bullet/physic.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
|
||||
#include "../mwrender/renderingmanager.hpp"
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
|
||||
|
@ -98,7 +96,7 @@ namespace MWWorld
|
|||
|
||||
void markCellAsUnchanged();
|
||||
|
||||
void insertCell(ESMS::CellStore<MWWorld::RefData> &cell);
|
||||
void insertCell (Ptr::CellStore &cell);
|
||||
|
||||
/// this method is only meant for dropping objects into the gameworld from a container
|
||||
/// and thus only handles object types that can be placed in a container
|
||||
|
|
|
@ -33,10 +33,10 @@ namespace
|
|||
{
|
||||
template<typename T>
|
||||
void listCellScripts (const ESMS::ESMStore& store,
|
||||
ESMS::CellRefList<T, MWWorld::RefData>& cellRefList, MWWorld::LocalScripts& localScripts,
|
||||
MWWorld::CellRefList<T, MWWorld::RefData>& cellRefList, MWWorld::LocalScripts& localScripts,
|
||||
MWWorld::Ptr::CellStore *cell)
|
||||
{
|
||||
for (typename ESMS::CellRefList<T, MWWorld::RefData>::List::iterator iter (
|
||||
for (typename MWWorld::CellRefList<T, MWWorld::RefData>::List::iterator iter (
|
||||
cellRefList.list.begin());
|
||||
iter!=cellRefList.list.end(); ++iter)
|
||||
{
|
||||
|
@ -53,10 +53,10 @@ namespace
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
ESMS::LiveCellRef<T, MWWorld::RefData> *searchViaHandle (const std::string& handle,
|
||||
ESMS::CellRefList<T, MWWorld::RefData>& refList)
|
||||
MWWorld::LiveCellRef<T, MWWorld::RefData> *searchViaHandle (const std::string& handle,
|
||||
MWWorld::CellRefList<T, MWWorld::RefData>& refList)
|
||||
{
|
||||
typedef typename ESMS::CellRefList<T, MWWorld::RefData>::List::iterator iterator;
|
||||
typedef typename MWWorld::CellRefList<T, MWWorld::RefData>::List::iterator iterator;
|
||||
|
||||
for (iterator iter (refList.list.begin()); iter!=refList.list.end(); ++iter)
|
||||
{
|
||||
|
@ -75,45 +75,45 @@ namespace MWWorld
|
|||
{
|
||||
Ptr World::getPtrViaHandle (const std::string& handle, Ptr::CellStore& cell)
|
||||
{
|
||||
if (ESMS::LiveCellRef<ESM::Activator, RefData> *ref =
|
||||
if (MWWorld::LiveCellRef<ESM::Activator, RefData> *ref =
|
||||
searchViaHandle (handle, cell.activators))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Potion, RefData> *ref = searchViaHandle (handle, cell.potions))
|
||||
if (MWWorld::LiveCellRef<ESM::Potion, RefData> *ref = searchViaHandle (handle, cell.potions))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Apparatus, RefData> *ref = searchViaHandle (handle, cell.appas))
|
||||
if (MWWorld::LiveCellRef<ESM::Apparatus, RefData> *ref = searchViaHandle (handle, cell.appas))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Armor, RefData> *ref = searchViaHandle (handle, cell.armors))
|
||||
if (MWWorld::LiveCellRef<ESM::Armor, RefData> *ref = searchViaHandle (handle, cell.armors))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Book, RefData> *ref = searchViaHandle (handle, cell.books))
|
||||
if (MWWorld::LiveCellRef<ESM::Book, RefData> *ref = searchViaHandle (handle, cell.books))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Clothing, RefData> *ref = searchViaHandle (handle, cell.clothes))
|
||||
if (MWWorld::LiveCellRef<ESM::Clothing, RefData> *ref = searchViaHandle (handle, cell.clothes))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Container, RefData> *ref =
|
||||
if (MWWorld::LiveCellRef<ESM::Container, RefData> *ref =
|
||||
searchViaHandle (handle, cell.containers))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Creature, RefData> *ref =
|
||||
if (MWWorld::LiveCellRef<ESM::Creature, RefData> *ref =
|
||||
searchViaHandle (handle, cell.creatures))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Door, RefData> *ref = searchViaHandle (handle, cell.doors))
|
||||
if (MWWorld::LiveCellRef<ESM::Door, RefData> *ref = searchViaHandle (handle, cell.doors))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Ingredient, RefData> *ref =
|
||||
if (MWWorld::LiveCellRef<ESM::Ingredient, RefData> *ref =
|
||||
searchViaHandle (handle, cell.ingreds))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Light, RefData> *ref = searchViaHandle (handle, cell.lights))
|
||||
if (MWWorld::LiveCellRef<ESM::Light, RefData> *ref = searchViaHandle (handle, cell.lights))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Tool, RefData> *ref = searchViaHandle (handle, cell.lockpicks))
|
||||
if (MWWorld::LiveCellRef<ESM::Tool, RefData> *ref = searchViaHandle (handle, cell.lockpicks))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Miscellaneous, RefData> *ref = searchViaHandle (handle, cell.miscItems))
|
||||
if (MWWorld::LiveCellRef<ESM::Miscellaneous, RefData> *ref = searchViaHandle (handle, cell.miscItems))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::NPC, RefData> *ref = searchViaHandle (handle, cell.npcs))
|
||||
if (MWWorld::LiveCellRef<ESM::NPC, RefData> *ref = searchViaHandle (handle, cell.npcs))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Probe, RefData> *ref = searchViaHandle (handle, cell.probes))
|
||||
if (MWWorld::LiveCellRef<ESM::Probe, RefData> *ref = searchViaHandle (handle, cell.probes))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Repair, RefData> *ref = searchViaHandle (handle, cell.repairs))
|
||||
if (MWWorld::LiveCellRef<ESM::Repair, RefData> *ref = searchViaHandle (handle, cell.repairs))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Static, RefData> *ref = searchViaHandle (handle, cell.statics))
|
||||
if (MWWorld::LiveCellRef<ESM::Static, RefData> *ref = searchViaHandle (handle, cell.statics))
|
||||
return Ptr (ref, &cell);
|
||||
if (ESMS::LiveCellRef<ESM::Weapon, RefData> *ref = searchViaHandle (handle, cell.weapons))
|
||||
if (MWWorld::LiveCellRef<ESM::Weapon, RefData> *ref = searchViaHandle (handle, cell.weapons))
|
||||
return Ptr (ref, &cell);
|
||||
return Ptr();
|
||||
}
|
||||
|
@ -961,8 +961,8 @@ namespace MWWorld
|
|||
|
||||
Ogre::Vector2 World::getNorthVector(Ptr::CellStore* cell)
|
||||
{
|
||||
ESMS::CellRefList<ESM::Static, MWWorld::RefData> statics = cell->statics;
|
||||
ESMS::LiveCellRef<ESM::Static, MWWorld::RefData>* ref = statics.find("northmarker");
|
||||
MWWorld::CellRefList<ESM::Static, MWWorld::RefData> statics = cell->statics;
|
||||
MWWorld::LiveCellRef<ESM::Static, MWWorld::RefData>* ref = statics.find("northmarker");
|
||||
if (!ref)
|
||||
return Vector2(0, 1);
|
||||
Ogre::SceneNode* node = ref->mData.getBaseNode();
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <components/esm_store/cell_store.hpp>
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include "../mwrender/debugging.hpp"
|
||||
|
|
|
@ -35,7 +35,7 @@ add_component_dir (file_finder
|
|||
)
|
||||
|
||||
add_component_dir (esm_store
|
||||
cell_store reclists store
|
||||
reclists store
|
||||
)
|
||||
|
||||
add_component_dir (esm
|
||||
|
@ -74,4 +74,3 @@ target_link_libraries(components ${Boost_LIBRARIES} ${OGRE_LIBRARIES})
|
|||
|
||||
# Make the variable accessible for other subdirectories
|
||||
set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE)
|
||||
|
||||
|
|
Loading…
Reference in a new issue