1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-12 17:43:05 +00:00

Issue #107: CellStore moved from ESMS to MWWorld

This commit is contained in:
Marc Zinnschlag 2012-06-29 16:48:50 +02:00
parent fc063472d0
commit 76174098c7
48 changed files with 396 additions and 427 deletions

View file

@ -50,7 +50,7 @@ add_openmw_dir (mwworld
refdata world physicssystem scene globals class action nullaction actionteleport refdata world physicssystem scene globals class action nullaction actionteleport
containerstore actiontalk actiontake manualref player cellfunctors containerstore actiontalk actiontake manualref player cellfunctors
cells localscripts customdata weather inventorystore ptr actionopen actionread cells localscripts customdata weather inventorystore ptr actionopen actionread
actionequip timestamp actionalchemy actionequip timestamp actionalchemy cellstore
) )
add_openmw_dir (mwclass add_openmw_dir (mwclass

View file

@ -15,7 +15,6 @@
#include <openengine/gui/manager.hpp> #include <openengine/gui/manager.hpp>
#include <components/esm/records.hpp> #include <components/esm/records.hpp>
#include <components/esm_store/cell_store.hpp>
#include <components/bsa/bsa_archive.hpp> #include <components/bsa/bsa_archive.hpp>
#include <components/esm/esm_reader.hpp> #include <components/esm/esm_reader.hpp>
#include <components/files/fixedpath.hpp> #include <components/files/fixedpath.hpp>
@ -42,6 +41,7 @@
#include "mwworld/world.hpp" #include "mwworld/world.hpp"
#include "mwworld/class.hpp" #include "mwworld/class.hpp"
#include "mwworld/player.hpp" #include "mwworld/player.hpp"
#include "mwworld/cellstore.hpp"
#include "mwclass/classes.hpp" #include "mwclass/classes.hpp"

View file

@ -3,18 +3,20 @@
#include <components/esm/loadacti.hpp> #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 "../mwbase/environment.hpp"
#include "../mwworld//cellstore.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwrender/objects.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
namespace MWClass namespace MWClass
{ {
void Activator::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Activator>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -30,7 +32,7 @@ namespace MWClass
void Activator::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Activator>();
@ -44,7 +46,7 @@ namespace MWClass
std::string Activator::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Activator>();
return ref->base->name; return ref->base->name;
@ -52,7 +54,7 @@ namespace MWClass
std::string Activator::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Activator>();
return ref->base->script; return ref->base->script;
@ -67,7 +69,7 @@ namespace MWClass
bool Activator::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Activator>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -75,7 +77,7 @@ namespace MWClass
MWGui::ToolTipInfo Activator::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Activator>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -3,14 +3,13 @@
#include <components/esm/loadappa.hpp> #include <components/esm/loadappa.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp" #include "../mwworld/actiontake.hpp"
#include "../mwworld/actionalchemy.hpp" #include "../mwworld/actionalchemy.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwrender/objects.hpp" #include "../mwrender/objects.hpp"
@ -23,7 +22,7 @@ namespace MWClass
{ {
void Apparatus::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Apparatus>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -39,7 +38,7 @@ namespace MWClass
void Apparatus::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Apparatus>();
@ -53,7 +52,7 @@ namespace MWClass
std::string Apparatus::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Apparatus>();
return ref->base->name; return ref->base->name;
@ -70,7 +69,7 @@ namespace MWClass
std::string Apparatus::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Apparatus>();
return ref->base->script; return ref->base->script;
@ -78,7 +77,7 @@ namespace MWClass
int Apparatus::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Apparatus>();
return ref->base->data.value; return ref->base->data.value;
@ -103,7 +102,7 @@ namespace MWClass
std::string Apparatus::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Apparatus>();
return ref->base->icon; return ref->base->icon;
@ -111,7 +110,7 @@ namespace MWClass
bool Apparatus::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Apparatus>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -119,7 +118,7 @@ namespace MWClass
MWGui::ToolTipInfo Apparatus::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Apparatus>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -5,13 +5,12 @@
#include <components/esm/loadskil.hpp> #include <components/esm/loadskil.hpp>
#include <components/esm/loadgmst.hpp> #include <components/esm/loadgmst.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp" #include "../mwworld/actiontake.hpp"
#include "../mwworld/actionequip.hpp" #include "../mwworld/actionequip.hpp"
#include "../mwworld/inventorystore.hpp" #include "../mwworld/inventorystore.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
@ -25,7 +24,7 @@ namespace MWClass
{ {
void Armor::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Armor>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -41,7 +40,7 @@ namespace MWClass
void Armor::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Armor>();
const std::string &model = ref->base->model; const std::string &model = ref->base->model;
@ -54,7 +53,7 @@ namespace MWClass
std::string Armor::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
return ref->base->name; return ref->base->name;
@ -76,7 +75,7 @@ namespace MWClass
int Armor::getItemMaxHealth (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
return ref->base->data.health; return ref->base->data.health;
@ -84,7 +83,7 @@ namespace MWClass
std::string Armor::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
return ref->base->script; return ref->base->script;
@ -92,7 +91,7 @@ namespace MWClass
std::pair<std::vector<int>, bool> Armor::getEquipmentSlots (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
std::vector<int> slots; std::vector<int> slots;
@ -126,7 +125,7 @@ namespace MWClass
int Armor::getEquipmentSkill (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
std::string typeGmst; std::string typeGmst;
@ -164,7 +163,7 @@ namespace MWClass
int Armor::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
return ref->base->data.value; return ref->base->data.value;
@ -201,7 +200,7 @@ namespace MWClass
std::string Armor::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
return ref->base->icon; return ref->base->icon;
@ -209,7 +208,7 @@ namespace MWClass
bool Armor::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -217,7 +216,7 @@ namespace MWClass
MWGui::ToolTipInfo Armor::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;
@ -260,7 +259,7 @@ namespace MWClass
std::string Armor::getEnchantment (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Armor>();
return ref->base->enchant; return ref->base->enchant;

View file

@ -3,13 +3,12 @@
#include <components/esm/loadbook.hpp> #include <components/esm/loadbook.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
#include "../mwworld/actionread.hpp" #include "../mwworld/actionread.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwrender/objects.hpp" #include "../mwrender/objects.hpp"
@ -21,7 +20,7 @@ namespace MWClass
{ {
void Book::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Book>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -37,7 +36,7 @@ namespace MWClass
void Book::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Book>();
@ -51,7 +50,7 @@ namespace MWClass
std::string Book::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Book>();
return ref->base->name; return ref->base->name;
@ -66,7 +65,7 @@ namespace MWClass
std::string Book::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Book>();
return ref->base->script; return ref->base->script;
@ -74,7 +73,7 @@ namespace MWClass
int Book::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Book>();
return ref->base->data.value; return ref->base->data.value;
@ -99,7 +98,7 @@ namespace MWClass
std::string Book::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Book>();
return ref->base->icon; return ref->base->icon;
@ -107,7 +106,7 @@ namespace MWClass
bool Book::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Book>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -115,7 +114,7 @@ namespace MWClass
MWGui::ToolTipInfo Book::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Book>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;
@ -143,7 +142,7 @@ namespace MWClass
std::string Book::getEnchantment (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Book>();
return ref->base->enchant; return ref->base->enchant;

View file

@ -3,8 +3,6 @@
#include <components/esm/loadclot.hpp> #include <components/esm/loadclot.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -12,6 +10,7 @@
#include "../mwworld/actionequip.hpp" #include "../mwworld/actionequip.hpp"
#include "../mwworld/inventorystore.hpp" #include "../mwworld/inventorystore.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
@ -24,7 +23,7 @@ namespace MWClass
{ {
void Clothing::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Clothing>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -40,7 +39,7 @@ namespace MWClass
void Clothing::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Clothing>();
@ -54,7 +53,7 @@ namespace MWClass
std::string Clothing::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
return ref->base->name; return ref->base->name;
@ -71,7 +70,7 @@ namespace MWClass
std::string Clothing::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
return ref->base->script; return ref->base->script;
@ -79,7 +78,7 @@ namespace MWClass
std::pair<std::vector<int>, bool> Clothing::getEquipmentSlots (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
std::vector<int> slots; std::vector<int> slots;
@ -119,7 +118,7 @@ namespace MWClass
int Clothing::getEquipmentSkill (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
if (ref->base->data.type==ESM::Clothing::Shoes) if (ref->base->data.type==ESM::Clothing::Shoes)
@ -130,7 +129,7 @@ namespace MWClass
int Clothing::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
return ref->base->data.value; return ref->base->data.value;
@ -145,7 +144,7 @@ namespace MWClass
std::string Clothing::getUpSoundId (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
if (ref->base->data.type == 8) if (ref->base->data.type == 8)
@ -157,7 +156,7 @@ namespace MWClass
std::string Clothing::getDownSoundId (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
if (ref->base->data.type == 8) if (ref->base->data.type == 8)
@ -169,7 +168,7 @@ namespace MWClass
std::string Clothing::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
return ref->base->icon; return ref->base->icon;
@ -177,7 +176,7 @@ namespace MWClass
bool Clothing::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -185,7 +184,7 @@ namespace MWClass
MWGui::ToolTipInfo Clothing::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;
@ -213,7 +212,7 @@ namespace MWClass
std::string Clothing::getEnchantment (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Clothing>();
return ref->base->enchant; return ref->base->enchant;

View file

@ -3,8 +3,6 @@
#include <components/esm/loadcont.hpp> #include <components/esm/loadcont.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -12,6 +10,7 @@
#include "../mwworld/containerstore.hpp" #include "../mwworld/containerstore.hpp"
#include "../mwworld/customdata.hpp" #include "../mwworld/customdata.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -53,7 +52,7 @@ namespace MWClass
void Container::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Container>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -69,7 +68,7 @@ namespace MWClass
void Container::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Container>();
@ -117,7 +116,7 @@ namespace MWClass
std::string Container::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Container>();
return ref->base->name; return ref->base->name;
@ -133,7 +132,7 @@ namespace MWClass
std::string Container::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Container>();
return ref->base->script; return ref->base->script;
@ -148,7 +147,7 @@ namespace MWClass
bool Container::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Container>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -156,7 +155,7 @@ namespace MWClass
MWGui::ToolTipInfo Container::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Container>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;
@ -182,7 +181,7 @@ namespace MWClass
float Container::getCapacity (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Container>();
return ref->base->weight; return ref->base->weight;

View file

@ -40,7 +40,7 @@ namespace MWClass
{ {
std::auto_ptr<CustomData> data (new CustomData); 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 // creature stats
data->mCreatureStats.mAttributes[0].set (ref->base->data.strength); data->mCreatureStats.mAttributes[0].set (ref->base->data.strength);
@ -69,7 +69,7 @@ namespace MWClass
std::string Creature::getId (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Creature>();
return ref->base->mId; return ref->base->mId;
@ -83,7 +83,7 @@ namespace MWClass
void Creature::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Creature>();
const std::string &model = ref->base->model; const std::string &model = ref->base->model;
@ -97,7 +97,7 @@ namespace MWClass
std::string Creature::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Creature>();
return ref->base->name; return ref->base->name;
@ -126,7 +126,7 @@ namespace MWClass
std::string Creature::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Creature>();
return ref->base->script; return ref->base->script;
@ -148,7 +148,7 @@ namespace MWClass
MWGui::ToolTipInfo Creature::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Creature>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -3,8 +3,6 @@
#include <components/esm/loaddoor.hpp> #include <components/esm/loaddoor.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/player.hpp" #include "../mwworld/player.hpp"
@ -12,6 +10,7 @@
#include "../mwworld/nullaction.hpp" #include "../mwworld/nullaction.hpp"
#include "../mwworld/actionteleport.hpp" #include "../mwworld/actionteleport.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -24,7 +23,7 @@ namespace MWClass
{ {
void Door::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Door>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -40,7 +39,7 @@ namespace MWClass
void Door::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Door>();
const std::string &model = ref->base->model; const std::string &model = ref->base->model;
@ -52,7 +51,7 @@ namespace MWClass
std::string Door::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Door>();
if (ref->ref.teleport && !ref->ref.destCell.empty()) // TODO doors that lead to exteriors 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, boost::shared_ptr<MWWorld::Action> Door::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref = MWWorld::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
ptr.get<ESM::Door>(); ptr.get<ESM::Door>();
const std::string &openSound = ref->base->openSound; const std::string &openSound = ref->base->openSound;
@ -134,7 +133,7 @@ namespace MWClass
std::string Door::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Door>();
return ref->base->script; return ref->base->script;
@ -149,7 +148,7 @@ namespace MWClass
bool Door::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Door>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -157,7 +156,7 @@ namespace MWClass
MWGui::ToolTipInfo Door::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Door>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -3,13 +3,12 @@
#include <components/esm/loadingr.hpp> #include <components/esm/loadingr.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp" #include "../mwworld/actiontake.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -22,7 +21,7 @@ namespace MWClass
{ {
void Ingredient::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Ingredient>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -38,7 +37,7 @@ namespace MWClass
void Ingredient::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Ingredient>();
const std::string &model = ref->base->model; const std::string &model = ref->base->model;
@ -50,7 +49,7 @@ namespace MWClass
std::string Ingredient::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Ingredient>();
return ref->base->name; return ref->base->name;
@ -67,7 +66,7 @@ namespace MWClass
std::string Ingredient::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Ingredient>();
return ref->base->script; return ref->base->script;
@ -75,7 +74,7 @@ namespace MWClass
int Ingredient::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Ingredient>();
return ref->base->data.value; return ref->base->data.value;
@ -100,7 +99,7 @@ namespace MWClass
std::string Ingredient::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Ingredient>();
return ref->base->icon; return ref->base->icon;
@ -108,7 +107,7 @@ namespace MWClass
bool Ingredient::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Ingredient>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -116,7 +115,7 @@ namespace MWClass
MWGui::ToolTipInfo Ingredient::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Ingredient>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -3,8 +3,6 @@
#include <components/esm/loadligh.hpp> #include <components/esm/loadligh.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -13,6 +11,7 @@
#include "../mwworld/nullaction.hpp" #include "../mwworld/nullaction.hpp"
#include "../mwworld/inventorystore.hpp" #include "../mwworld/inventorystore.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -25,7 +24,7 @@ namespace MWClass
{ {
void Light::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Light>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -47,7 +46,7 @@ namespace MWClass
void Light::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Light>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -65,7 +64,7 @@ namespace MWClass
std::string Light::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Light>();
if (ref->base->model.empty()) if (ref->base->model.empty())
@ -77,7 +76,7 @@ namespace MWClass
boost::shared_ptr<MWWorld::Action> Light::activate (const MWWorld::Ptr& ptr, boost::shared_ptr<MWWorld::Action> Light::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref = MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
ptr.get<ESM::Light>(); ptr.get<ESM::Light>();
if (!(ref->base->data.flags & ESM::Light::Carry)) if (!(ref->base->data.flags & ESM::Light::Carry))
@ -91,7 +90,7 @@ namespace MWClass
std::string Light::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Light>();
return ref->base->script; return ref->base->script;
@ -99,7 +98,7 @@ namespace MWClass
std::pair<std::vector<int>, bool> Light::getEquipmentSlots (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Light>();
std::vector<int> slots; std::vector<int> slots;
@ -112,7 +111,7 @@ namespace MWClass
int Light::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Light>();
return ref->base->data.value; return ref->base->data.value;
@ -138,7 +137,7 @@ namespace MWClass
std::string Light::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Light>();
return ref->base->icon; return ref->base->icon;
@ -146,7 +145,7 @@ namespace MWClass
bool Light::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Light>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -154,7 +153,7 @@ namespace MWClass
MWGui::ToolTipInfo Light::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Light>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -3,8 +3,6 @@
#include <components/esm/loadlocks.hpp> #include <components/esm/loadlocks.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -12,6 +10,8 @@
#include "../mwworld/actionequip.hpp" #include "../mwworld/actionequip.hpp"
#include "../mwworld/inventorystore.hpp" #include "../mwworld/inventorystore.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -23,7 +23,7 @@ namespace MWClass
{ {
void Lockpick::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Tool>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -39,7 +39,7 @@ namespace MWClass
void Lockpick::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Tool>();
@ -54,7 +54,7 @@ namespace MWClass
std::string Lockpick::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Tool>();
return ref->base->name; return ref->base->name;
@ -71,7 +71,7 @@ namespace MWClass
std::string Lockpick::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Tool>();
return ref->base->script; return ref->base->script;
@ -88,7 +88,7 @@ namespace MWClass
int Lockpick::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Tool>();
return ref->base->data.value; return ref->base->data.value;
@ -113,7 +113,7 @@ namespace MWClass
std::string Lockpick::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Tool>();
return ref->base->icon; return ref->base->icon;
@ -121,7 +121,7 @@ namespace MWClass
bool Lockpick::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Tool>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -129,7 +129,7 @@ namespace MWClass
MWGui::ToolTipInfo Lockpick::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Tool>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -5,13 +5,12 @@
#include <components/esm/loadmisc.hpp> #include <components/esm/loadmisc.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp" #include "../mwworld/actiontake.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -26,7 +25,7 @@ namespace MWClass
{ {
void Miscellaneous::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Miscellaneous>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -42,7 +41,7 @@ namespace MWClass
void Miscellaneous::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Miscellaneous>();
@ -56,7 +55,7 @@ namespace MWClass
std::string Miscellaneous::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Miscellaneous>();
return ref->base->name; return ref->base->name;
@ -73,7 +72,7 @@ namespace MWClass
std::string Miscellaneous::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Miscellaneous>();
return ref->base->script; return ref->base->script;
@ -81,7 +80,7 @@ namespace MWClass
int Miscellaneous::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Miscellaneous>();
return ref->base->data.value; return ref->base->data.value;
@ -96,7 +95,7 @@ namespace MWClass
std::string Miscellaneous::getUpSoundId (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Miscellaneous>();
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str) 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 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>(); ptr.get<ESM::Miscellaneous>();
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str) 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 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>(); ptr.get<ESM::Miscellaneous>();
return ref->base->icon; return ref->base->icon;
@ -128,7 +127,7 @@ namespace MWClass
bool Miscellaneous::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Miscellaneous>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -136,7 +135,7 @@ namespace MWClass
MWGui::ToolTipInfo Miscellaneous::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Miscellaneous>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -53,7 +53,7 @@ namespace MWClass
{ {
std::auto_ptr<CustomData> data (new CustomData); 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 // NPC stats
if (!ref->base->faction.empty()) if (!ref->base->faction.empty())
@ -107,7 +107,7 @@ namespace MWClass
std::string Npc::getId (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::NPC>();
return ref->base->mId; return ref->base->mId;
@ -120,7 +120,7 @@ namespace MWClass
void Npc::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::NPC>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -138,7 +138,7 @@ namespace MWClass
std::string Npc::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::NPC>();
return ref->base->name; return ref->base->name;
@ -182,7 +182,7 @@ namespace MWClass
std::string Npc::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::NPC>();
return ref->base->script; return ref->base->script;
@ -302,7 +302,7 @@ namespace MWClass
MWGui::ToolTipInfo Npc::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::NPC>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -3,13 +3,12 @@
#include <components/esm/loadalch.hpp> #include <components/esm/loadalch.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp" #include "../mwworld/actiontake.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -22,7 +21,7 @@ namespace MWClass
{ {
void Potion::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Potion>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -38,7 +37,7 @@ namespace MWClass
void Potion::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Potion>();
@ -52,7 +51,7 @@ namespace MWClass
std::string Potion::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Potion>();
return ref->base->name; return ref->base->name;
@ -69,7 +68,7 @@ namespace MWClass
std::string Potion::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Potion>();
return ref->base->script; return ref->base->script;
@ -77,7 +76,7 @@ namespace MWClass
int Potion::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Potion>();
return ref->base->data.value; return ref->base->data.value;
@ -102,7 +101,7 @@ namespace MWClass
std::string Potion::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Potion>();
return ref->base->icon; return ref->base->icon;
@ -110,7 +109,7 @@ namespace MWClass
bool Potion::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Potion>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -118,7 +117,7 @@ namespace MWClass
MWGui::ToolTipInfo Potion::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Potion>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -3,8 +3,6 @@
#include <components/esm/loadlocks.hpp> #include <components/esm/loadlocks.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -12,6 +10,8 @@
#include "../mwworld/actionequip.hpp" #include "../mwworld/actionequip.hpp"
#include "../mwworld/inventorystore.hpp" #include "../mwworld/inventorystore.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -23,7 +23,7 @@ namespace MWClass
{ {
void Probe::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Probe>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -39,7 +39,7 @@ namespace MWClass
void Probe::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Probe>();
@ -54,7 +54,7 @@ namespace MWClass
std::string Probe::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Probe>();
return ref->base->name; return ref->base->name;
@ -70,7 +70,7 @@ namespace MWClass
std::string Probe::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Probe>();
return ref->base->script; return ref->base->script;
@ -87,7 +87,7 @@ namespace MWClass
int Probe::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Probe>();
return ref->base->data.value; return ref->base->data.value;
@ -112,7 +112,7 @@ namespace MWClass
std::string Probe::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Probe>();
return ref->base->icon; return ref->base->icon;
@ -120,7 +120,7 @@ namespace MWClass
bool Probe::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Probe>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -128,7 +128,7 @@ namespace MWClass
MWGui::ToolTipInfo Probe::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Probe>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -3,13 +3,13 @@
#include <components/esm/loadlocks.hpp> #include <components/esm/loadlocks.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp" #include "../mwworld/actiontake.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -21,7 +21,7 @@ namespace MWClass
{ {
void Repair::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Repair>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -37,7 +37,7 @@ namespace MWClass
void Repair::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Repair>();
@ -51,7 +51,7 @@ namespace MWClass
std::string Repair::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Repair>();
return ref->base->name; return ref->base->name;
@ -68,7 +68,7 @@ namespace MWClass
std::string Repair::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Repair>();
return ref->base->script; return ref->base->script;
@ -76,7 +76,7 @@ namespace MWClass
int Repair::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Repair>();
return ref->base->data.value; return ref->base->data.value;
@ -101,7 +101,7 @@ namespace MWClass
std::string Repair::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Repair>();
return ref->base->icon; return ref->base->icon;
@ -109,7 +109,7 @@ namespace MWClass
bool Repair::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Repair>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -117,7 +117,7 @@ namespace MWClass
MWGui::ToolTipInfo Repair::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Repair>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;

View file

@ -11,7 +11,7 @@ namespace MWClass
{ {
void Static::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Static>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -27,7 +27,7 @@ namespace MWClass
void Static::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Static>();
assert (ref->base != NULL); assert (ref->base != NULL);

View file

@ -3,8 +3,6 @@
#include <components/esm/loadweap.hpp> #include <components/esm/loadweap.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -12,6 +10,7 @@
#include "../mwworld/actionequip.hpp" #include "../mwworld/actionequip.hpp"
#include "../mwworld/inventorystore.hpp" #include "../mwworld/inventorystore.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwgui/window_manager.hpp" #include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp" #include "../mwgui/tooltips.hpp"
@ -24,7 +23,7 @@ namespace MWClass
{ {
void Weapon::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const 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>(); ptr.get<ESM::Weapon>();
assert (ref->base != NULL); assert (ref->base != NULL);
@ -40,7 +39,7 @@ namespace MWClass
void Weapon::insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics) const 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>(); ptr.get<ESM::Weapon>();
@ -54,7 +53,7 @@ namespace MWClass
std::string Weapon::getName (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
return ref->base->name; return ref->base->name;
@ -76,7 +75,7 @@ namespace MWClass
int Weapon::getItemMaxHealth (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
return ref->base->data.health; return ref->base->data.health;
@ -84,7 +83,7 @@ namespace MWClass
std::string Weapon::getScript (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
return ref->base->script; return ref->base->script;
@ -92,7 +91,7 @@ namespace MWClass
std::pair<std::vector<int>, bool> Weapon::getEquipmentSlots (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
std::vector<int> slots; std::vector<int> slots;
@ -116,7 +115,7 @@ namespace MWClass
int Weapon::getEquipmentSkill (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
const int size = 12; const int size = 12;
@ -146,7 +145,7 @@ namespace MWClass
int Weapon::getValue (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
return ref->base->data.value; return ref->base->data.value;
@ -161,7 +160,7 @@ namespace MWClass
std::string Weapon::getUpSoundId (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
int type = ref->base->data.type; int type = ref->base->data.type;
@ -207,7 +206,7 @@ namespace MWClass
std::string Weapon::getDownSoundId (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
int type = ref->base->data.type; int type = ref->base->data.type;
@ -253,7 +252,7 @@ namespace MWClass
std::string Weapon::getInventoryIcon (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
return ref->base->icon; return ref->base->icon;
@ -261,7 +260,7 @@ namespace MWClass
bool Weapon::hasToolTip (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
return (ref->base->name != ""); return (ref->base->name != "");
@ -269,7 +268,7 @@ namespace MWClass
MWGui::ToolTipInfo Weapon::getToolTipInfo (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
MWGui::ToolTipInfo info; MWGui::ToolTipInfo info;
@ -351,7 +350,7 @@ namespace MWClass
std::string Weapon::getEnchantment (const MWWorld::Ptr& ptr) const 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>(); ptr.get<ESM::Weapon>();
return ref->base->enchant; return ref->base->enchant;

View file

@ -392,7 +392,7 @@ namespace MWDialogue
if(select.type==ESM::VT_Int) 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)); int isFaction = int(toLower(npc->base->faction) == toLower(name));
if(selectCompare<int,int>(comp,!isFaction,select.i)) if(selectCompare<int,int>(comp,!isFaction,select.i))
return false; return false;
@ -409,7 +409,7 @@ namespace MWDialogue
if(select.type==ESM::VT_Int) 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)); int isClass = int(toLower(npc->base->cls) == toLower(name));
if(selectCompare<int,int>(comp,!isClass,select.i)) if(selectCompare<int,int>(comp,!isClass,select.i))
return false; return false;
@ -426,7 +426,7 @@ namespace MWDialogue
if(select.type==ESM::VT_Int) 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)); int isRace = int(toLower(npc->base->race) == toLower(name));
if(selectCompare<int,int>(comp,!isRace,select.i)) if(selectCompare<int,int>(comp,!isRace,select.i))
return false; return false;
@ -493,7 +493,7 @@ namespace MWDialogue
if (isCreature) if (isCreature)
return false; 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) if (!cellRef)
return false; return false;
@ -508,7 +508,7 @@ namespace MWDialogue
if (isCreature) if (isCreature)
return false; 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) if (!cellRef)
return false; return false;
@ -558,7 +558,7 @@ namespace MWDialogue
//check gender //check gender
if (!isCreature) 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(npc->base->flags&npc->base->Female)
{ {
if(static_cast<int> (info.data.gender)==0) return false; if(static_cast<int> (info.data.gender)==0) return false;
@ -771,13 +771,13 @@ namespace MWDialogue
int services = 0; int services = 0;
if (mActor.getTypeName() == typeid(ESM::NPC).name()) 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) if (ref->base->hasAI)
services = ref->base->AI.services; services = ref->base->AI.services;
} }
else if (mActor.getTypeName() == typeid(ESM::Creature).name()) 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) if (ref->base->hasAI)
services = ref->base->AI.services; services = ref->base->AI.services;
} }

View file

@ -275,7 +275,7 @@ namespace MWGui
for (MWWorld::ContainerStoreIterator it(store.begin(MWWorld::ContainerStore::Type_Apparatus)); for (MWWorld::ContainerStoreIterator it(store.begin(MWWorld::ContainerStore::Type_Apparatus));
it != store.end(); ++it) 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 if (ref->base->data.type == ESM::Apparatus::Albemic
&& (bestAlbemic.isEmpty() || ref->base->data.quality > bestAlbemic.get<ESM::Apparatus>()->base->data.quality)) && (bestAlbemic.isEmpty() || ref->base->data.quality > bestAlbemic.get<ESM::Apparatus>()->base->data.quality))
bestAlbemic = *it; bestAlbemic = *it;
@ -420,7 +420,7 @@ namespace MWGui
continue; continue;
// add the effects of this ingredient to list of effects // 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) for (int i=0; i<4; ++i)
{ {
if (ref->base->data.effectID[i] < 0) if (ref->base->data.effectID[i] < 0)

View file

@ -55,7 +55,7 @@ void BookWindow::open (MWWorld::Ptr book)
MWBase::Environment::get().getSoundManager()->playSound ("book open", 1.0, 1.0); 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>(); mBook.get<ESM::Book>();
BookTextParser parser; BookTextParser parser;

View file

@ -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 // 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()) 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) if (ref->base->flags & ESM::Container::Organic)
{ {
// user notification // user notification
@ -556,7 +556,7 @@ void ContainerBase::addItem(MWWorld::Ptr item, int count)
{ {
MWWorld::ContainerStore& containerStore = MWWorld::Class::get(mPtr).getContainerStore(mPtr); MWWorld::ContainerStore& containerStore = MWWorld::Class::get(mPtr).getContainerStore(mPtr);
int origCount = item.getRefData().getCount(); int origCount = item.getRefData().getCount();
item.getRefData().setCount(count); item.getRefData().setCount(count);
MWWorld::ContainerStoreIterator it = containerStore.add(item); MWWorld::ContainerStoreIterator it = containerStore.add(item);

View file

@ -31,7 +31,7 @@ void ScrollWindow::open (MWWorld::Ptr scroll)
mScroll = scroll; mScroll = scroll;
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref = MWWorld::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
mScroll.get<ESM::Book>(); mScroll.get<ESM::Book>();
BookTextParser parser; BookTextParser parser;

View file

@ -86,7 +86,7 @@ namespace MWGui
offerButtonWidth, offerButtonWidth,
mOfferButton->getHeight()); mOfferButton->getHeight());
setCoord(400, 0, 400, 300); setCoord(400, 0, 400, 300);
static_cast<MyGUI::Window*>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &TradeWindow::onWindowResize); static_cast<MyGUI::Window*>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &TradeWindow::onWindowResize);
} }
@ -161,7 +161,7 @@ namespace MWGui
int merchantgold; int merchantgold;
if (mPtr.getTypeName() == typeid(ESM::NPC).name()) 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) if (ref->base->npdt52.gold == -10)
merchantgold = ref->base->npdt12.gold; merchantgold = ref->base->npdt12.gold;
else else
@ -169,7 +169,7 @@ namespace MWGui
} }
else // ESM::Creature 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; merchantgold = ref->base->data.gold;
} }
if (mCurrentBalance > 0 && merchantgold < mCurrentBalance) if (mCurrentBalance > 0 && merchantgold < mCurrentBalance)
@ -244,7 +244,7 @@ namespace MWGui
int merchantgold; int merchantgold;
if (mPtr.getTypeName() == typeid(ESM::NPC).name()) 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) if (ref->base->npdt52.gold == -10)
merchantgold = ref->base->npdt12.gold; merchantgold = ref->base->npdt12.gold;
else else
@ -252,7 +252,7 @@ namespace MWGui
} }
else // ESM::Creature 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; merchantgold = ref->base->data.gold;
} }
@ -289,13 +289,13 @@ namespace MWGui
int services = 0; int services = 0;
if (mPtr.getTypeName() == typeid(ESM::NPC).name()) 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) if (ref->base->hasAI)
services = ref->base->AI.services; services = ref->base->AI.services;
} }
else if (mPtr.getTypeName() == typeid(ESM::Creature).name()) 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) if (ref->base->hasAI)
services = ref->base->AI.services; services = ref->base->AI.services;
} }

View file

@ -1,12 +1,9 @@
#ifndef _GAME_RENDER_ACTORS_H #ifndef _GAME_RENDER_ACTORS_H
#define _GAME_RENDER_ACTORS_H #define _GAME_RENDER_ACTORS_H
#include "components/esm_store/cell_store.hpp"
#include <map> #include <map>
#include <list> #include <list>
#include <openengine/ogre/renderer.hpp> #include <openengine/ogre/renderer.hpp>
#include "components/nifogre/ogre_nif_loader.hpp" #include "components/nifogre/ogre_nif_loader.hpp"

View file

@ -12,7 +12,7 @@ CreatureAnimation::~CreatureAnimation(){
} }
CreatureAnimation::CreatureAnimation(const MWWorld::Ptr& ptr, OEngine::Render::OgreRenderer& _rend): Animation(_rend){ CreatureAnimation::CreatureAnimation(const MWWorld::Ptr& ptr, OEngine::Render::OgreRenderer& _rend): Animation(_rend){
insert = ptr.getRefData().getBaseNode(); insert = ptr.getRefData().getBaseNode();
ESMS::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref = MWWorld::LiveCellRef<ESM::Creature, MWWorld::RefData> *ref =
ptr.get<ESM::Creature>(); ptr.get<ESM::Creature>();
assert (ref->base != NULL); assert (ref->base != NULL);

View file

@ -38,7 +38,7 @@ NpcAnimation::NpcAnimation(const MWWorld::Ptr& ptr, OEngine::Render::OgreRendere
lfoot(0), lfoot(0),
rfoot(0) rfoot(0)
{ {
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref = MWWorld::LiveCellRef<ESM::NPC, MWWorld::RefData> *ref =
ptr.get<ESM::NPC>(); ptr.get<ESM::NPC>();
Ogre::Entity* blank = 0; Ogre::Entity* blank = 0;
std::vector<Nif::NiTriShapeCopy>* blankshape = 0; std::vector<Nif::NiTriShapeCopy>* blankshape = 0;

View file

@ -56,7 +56,7 @@ void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_)
insert->setPosition(f[0], f[1], f[2]); insert->setPosition(f[0], f[1], f[2]);
insert->setScale(ptr.getCellRef().scale, ptr.getCellRef().scale, ptr.getCellRef().scale); insert->setScale(ptr.getCellRef().scale, ptr.getCellRef().scale, ptr.getCellRef().scale);
// Convert MW rotation to a quaternion: // Convert MW rotation to a quaternion:
f = ptr.getCellRef().pos.rot; 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(); Ogre::Light *light = mRenderer.getScene()->createLight();
light->setDiffuseColour (r, g, b); light->setDiffuseColour (r, g, b);
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref = MWWorld::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
ptr.get<ESM::Light>(); ptr.get<ESM::Light>();
LightInfo info; LightInfo info;
@ -307,7 +307,7 @@ void Objects::removeCell(MWWorld::Ptr::CellStore* store)
mBounds.erase(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()) if(mStaticGeometry.find(&cell) != mStaticGeometry.end())
{ {

View file

@ -3,8 +3,6 @@
#include <openengine/ogre/renderer.hpp> #include <openengine/ogre/renderer.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwworld/refdata.hpp" #include "../mwworld/refdata.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -88,7 +86,7 @@ public:
///< \return found? ///< \return found?
void removeCell(MWWorld::Ptr::CellStore* store); void removeCell(MWWorld::Ptr::CellStore* store);
void buildStaticGeometry(ESMS::CellStore<MWWorld::RefData> &cell); void buildStaticGeometry(MWWorld::Ptr::CellStore &cell);
void setMwRoot(Ogre::SceneNode* root); void setMwRoot(Ogre::SceneNode* root);
}; };
} }

View file

@ -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; Ogre::ColourValue color;
color.setAsABGR (mCell.cell->ambi.fog); 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); mAmbientColor.setAsABGR (mCell.cell->ambi.ambient);
setAmbientMode(); setAmbientMode();

View file

@ -136,13 +136,13 @@ class RenderingManager: private RenderingInterface, public Ogre::WindowEventList
int skyGetMasserPhase() const; int skyGetMasserPhase() const;
int skyGetSecundaPhase() const; int skyGetSecundaPhase() const;
void skySetMoonColour (bool red); void skySetMoonColour (bool red);
void configureAmbient(ESMS::CellStore<MWWorld::RefData> &mCell); void configureAmbient(MWWorld::Ptr::CellStore &mCell);
void requestMap (MWWorld::Ptr::CellStore* cell); void requestMap (MWWorld::Ptr::CellStore* cell);
///< request the local map for a cell ///< request the local map for a cell
/// configure fog according to cell /// configure fog according to cell
void configureFog(ESMS::CellStore<MWWorld::RefData> &mCell); void configureFog(MWWorld::Ptr::CellStore &mCell);
/// configure fog manually /// configure fog manually
void configureFog(const float density, const Ogre::ColourValue& colour); void configureFog(const float density, const Ogre::ColourValue& colour);

View file

@ -13,7 +13,7 @@ namespace MWWorld
void ActionRead::execute () void ActionRead::execute ()
{ {
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref = LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
mObject.get<ESM::Book>(); mObject.get<ESM::Book>();
if (ref->base->data.isScroll) if (ref->base->data.isScroll)
@ -28,4 +28,3 @@ namespace MWWorld
} }
} }
} }

View file

@ -39,7 +39,7 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getCellStore (const ESM::Cell *cell)
void MWWorld::Cells::fillContainers (Ptr::CellStore& cellStore) 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()); cellStore.containers.list.begin());
iter!=cellStore.containers.list.end(); ++iter) iter!=cellStore.containers.list.end(); ++iter)
{ {
@ -49,7 +49,7 @@ void MWWorld::Cells::fillContainers (Ptr::CellStore& cellStore)
iter->base->inventory, mStore); 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()); cellStore.creatures.list.begin());
iter!=cellStore.creatures.list.end(); ++iter) iter!=cellStore.creatures.list.end(); ++iter)
{ {
@ -59,7 +59,7 @@ void MWWorld::Cells::fillContainers (Ptr::CellStore& cellStore)
iter->base->inventory, mStore); 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()); cellStore.npcs.list.begin());
iter!=cellStore.npcs.list.end(); ++iter) iter!=cellStore.npcs.list.end(); ++iter)
{ {
@ -168,64 +168,64 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name, Ptr::CellStore& ce
return Ptr(); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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 (ref, &cell);
return Ptr(); return Ptr();

View file

@ -1,17 +1,9 @@
#ifndef _GAME_CELL_STORE_H #ifndef GAME_MWWORLD_CELLSTORE_H
#define _GAME_CELL_STORE_H #define GAME_MWWORLD_CELLSTORE_H
/* #include <components/esm/records.hpp>
Cell storage.
Used to load, look up and store all references in a single cell. #include <components/esm_store/store.hpp>
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 <list> #include <list>
#include <string> #include <string>
@ -20,10 +12,8 @@
#include <stdexcept> #include <stdexcept>
#include <algorithm> #include <algorithm>
namespace ESMS namespace MWWorld
{ {
using namespace ESM;
/// A reference to one object (of any type) in a cell. /// A reference to one object (of any type) in a cell.
/// ///
/// Constructing this with a CellRef instance in the constructor means that /// Constructing this with a CellRef instance in the constructor means that
@ -33,7 +23,7 @@ namespace ESMS
template <typename X, typename D> template <typename X, typename D>
struct LiveCellRef 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) {} mData(ref) {}
@ -45,7 +35,7 @@ namespace ESMS
/* Information about this instance, such as 3D location and /* Information about this instance, such as 3D location and
rotation and individual type-dependent data. rotation and individual type-dependent data.
*/ */
CellRef ref; ESM::CellRef ref;
/// runtime-data /// runtime-data
D mData; D mData;
@ -63,7 +53,7 @@ namespace ESMS
// ESMStore. Insert the reference into the list if a match is // ESMStore. Insert the reference into the list if a match is
// found. If not, throw an exception. // found. If not, throw an exception.
template <typename Y> 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); const X* obj = recList.find(ref.refID);
if(obj == NULL) if(obj == NULL)
@ -107,28 +97,28 @@ namespace ESMS
float mWaterLevel; float mWaterLevel;
// Lists for each individual object type // Lists for each individual object type
CellRefList<Activator, D> activators; CellRefList<ESM::Activator, D> activators;
CellRefList<Potion, D> potions; CellRefList<ESM::Potion, D> potions;
CellRefList<Apparatus, D> appas; CellRefList<ESM::Apparatus, D> appas;
CellRefList<Armor, D> armors; CellRefList<ESM::Armor, D> armors;
CellRefList<Book, D> books; CellRefList<ESM::Book, D> books;
CellRefList<Clothing, D> clothes; CellRefList<ESM::Clothing, D> clothes;
CellRefList<Container, D> containers; CellRefList<ESM::Container, D> containers;
CellRefList<Creature, D> creatures; CellRefList<ESM::Creature, D> creatures;
CellRefList<Door, D> doors; CellRefList<ESM::Door, D> doors;
CellRefList<Ingredient, D> ingreds; CellRefList<ESM::Ingredient, D> ingreds;
CellRefList<CreatureLevList, D> creatureLists; CellRefList<ESM::CreatureLevList, D> creatureLists;
CellRefList<ItemLevList, D> itemLists; CellRefList<ESM::ItemLevList, D> itemLists;
CellRefList<ESM::Light, D> lights; CellRefList<ESM::Light, D> lights;
CellRefList<Tool, D> lockpicks; CellRefList<ESM::Tool, D> lockpicks;
CellRefList<Miscellaneous, D> miscItems; CellRefList<ESM::Miscellaneous, D> miscItems;
CellRefList<NPC, D> npcs; CellRefList<ESM::NPC, D> npcs;
CellRefList<Probe, D> probes; CellRefList<ESM::Probe, D> probes;
CellRefList<Repair, D> repairs; CellRefList<ESM::Repair, D> repairs;
CellRefList<Static, D> statics; CellRefList<ESM::Static, D> statics;
CellRefList<Weapon, D> weapons; 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) 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) if (mState==State_Unloaded)
{ {
@ -196,7 +186,7 @@ namespace ESMS
} }
/// Run through references and store IDs /// Run through references and store IDs
void listRefs(const ESMStore &store, ESMReader &esm) void listRefs(const ESMS::ESMStore &store, ESM::ESMReader &esm)
{ {
assert (cell); assert (cell);
@ -206,7 +196,7 @@ namespace ESMS
// Reopen the ESM reader and seek to the right position. // Reopen the ESM reader and seek to the right position.
cell->restore (esm); cell->restore (esm);
CellRef ref; ESM::CellRef ref;
// Get each reference in turn // Get each reference in turn
while (cell->getNextRef (esm, ref)) while (cell->getNextRef (esm, ref))
@ -222,7 +212,7 @@ namespace ESMS
std::sort (mIds.begin(), mIds.end()); std::sort (mIds.begin(), mIds.end());
} }
void loadRefs(const ESMStore &store, ESMReader &esm) void loadRefs(const ESMS::ESMStore &store, ESM::ESMReader &esm)
{ {
assert (cell); assert (cell);
@ -232,7 +222,7 @@ namespace ESMS
// Reopen the ESM reader and seek to the right position. // Reopen the ESM reader and seek to the right position.
cell->restore(esm); cell->restore(esm);
CellRef ref; ESM::CellRef ref;
// Get each reference in turn // Get each reference in turn
while(cell->getNextRef(esm, ref)) while(cell->getNextRef(esm, ref))
@ -253,26 +243,26 @@ namespace ESMS
*/ */
switch(rec) switch(rec)
{ {
case REC_ACTI: activators.find(ref, store.activators); break; case ESM::REC_ACTI: activators.find(ref, store.activators); break;
case REC_ALCH: potions.find(ref, store.potions); break; case ESM::REC_ALCH: potions.find(ref, store.potions); break;
case REC_APPA: appas.find(ref, store.appas); break; case ESM::REC_APPA: appas.find(ref, store.appas); break;
case REC_ARMO: armors.find(ref, store.armors); break; case ESM::REC_ARMO: armors.find(ref, store.armors); break;
case REC_BOOK: books.find(ref, store.books); break; case ESM::REC_BOOK: books.find(ref, store.books); break;
case REC_CLOT: clothes.find(ref, store.clothes); break; case ESM::REC_CLOT: clothes.find(ref, store.clothes); break;
case REC_CONT: containers.find(ref, store.containers); break; case ESM::REC_CONT: containers.find(ref, store.containers); break;
case REC_CREA: creatures.find(ref, store.creatures); break; case ESM::REC_CREA: creatures.find(ref, store.creatures); break;
case REC_DOOR: doors.find(ref, store.doors); break; case ESM::REC_DOOR: doors.find(ref, store.doors); break;
case REC_INGR: ingreds.find(ref, store.ingreds); break; case ESM::REC_INGR: ingreds.find(ref, store.ingreds); break;
case REC_LEVC: creatureLists.find(ref, store.creatureLists); break; case ESM::REC_LEVC: creatureLists.find(ref, store.creatureLists); break;
case REC_LEVI: itemLists.find(ref, store.itemLists); break; case ESM::REC_LEVI: itemLists.find(ref, store.itemLists); break;
case REC_LIGH: lights.find(ref, store.lights); break; case ESM::REC_LIGH: lights.find(ref, store.lights); break;
case REC_LOCK: lockpicks.find(ref, store.lockpicks); break; case ESM::REC_LOCK: lockpicks.find(ref, store.lockpicks); break;
case REC_MISC: miscItems.find(ref, store.miscItems); break; case ESM::REC_MISC: miscItems.find(ref, store.miscItems); break;
case REC_NPC_: npcs.find(ref, store.npcs); break; case ESM::REC_NPC_: npcs.find(ref, store.npcs); break;
case REC_PROB: probes.find(ref, store.probes); break; case ESM::REC_PROB: probes.find(ref, store.probes); break;
case REC_REPA: repairs.find(ref, store.repairs); break; case ESM::REC_REPA: repairs.find(ref, store.repairs); break;
case REC_STAT: statics.find(ref, store.statics); break; case ESM::REC_STAT: statics.find(ref, store.statics); break;
case REC_WEAP: weapons.find(ref, store.weapons); break; case ESM::REC_WEAP: weapons.find(ref, store.weapons); break;
case 0: std::cout << "Cell reference " + ref.refID + " not found!\n"; break; case 0: std::cout << "Cell reference " + ref.refID + " not found!\n"; break;
default: default:

View file

@ -5,7 +5,7 @@
#include <typeinfo> #include <typeinfo>
#include <stdexcept> #include <stdexcept>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <components/esm/loadcont.hpp> #include <components/esm/loadcont.hpp>
@ -19,11 +19,11 @@
namespace namespace
{ {
template<typename T> template<typename T>
float getTotalWeight (const ESMS::CellRefList<T, MWWorld::RefData>& cellRefList) float getTotalWeight (const MWWorld::CellRefList<T, MWWorld::RefData>& cellRefList)
{ {
float sum = 0; 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()); cellRefList.list.begin());
iter!=cellRefList.list.end(); iter!=cellRefList.list.end();
++iter) ++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) // 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) 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>(); ptr.get<ESM::Miscellaneous>();
if (compare_string_ci(gold->ref.refID, "gold_001") if (compare_string_ci(gold->ref.refID, "gold_001")
@ -281,29 +281,29 @@ MWWorld::ContainerStoreIterator::ContainerStoreIterator (int mask, ContainerStor
++*this; ++*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){} : 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){} : 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){} : 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){} : 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){} : 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){} : 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){} : 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){} : 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){} : 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){} : 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){} : 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){} : mType(MWWorld::ContainerStore::Type_Weapon), mMask(MWWorld::ContainerStore::Type_All), mContainer(container), mWeapon(iterator){}
void MWWorld::ContainerStoreIterator::incType() void MWWorld::ContainerStoreIterator::incType()

View file

@ -3,8 +3,7 @@
#include <iterator> #include <iterator>
#include <components/esm_store/cell_store.hpp> #include "cellstore.hpp"
#include "refdata.hpp" #include "refdata.hpp"
#include "ptr.hpp" #include "ptr.hpp"
@ -40,18 +39,18 @@ namespace MWWorld
private: private:
ESMS::CellRefList<ESM::Potion, RefData> potions; MWWorld::CellRefList<ESM::Potion, RefData> potions;
ESMS::CellRefList<ESM::Apparatus, RefData> appas; MWWorld::CellRefList<ESM::Apparatus, RefData> appas;
ESMS::CellRefList<ESM::Armor, RefData> armors; MWWorld::CellRefList<ESM::Armor, RefData> armors;
ESMS::CellRefList<ESM::Book, RefData> books; MWWorld::CellRefList<ESM::Book, RefData> books;
ESMS::CellRefList<ESM::Clothing, RefData> clothes; MWWorld::CellRefList<ESM::Clothing, RefData> clothes;
ESMS::CellRefList<ESM::Ingredient, RefData> ingreds; MWWorld::CellRefList<ESM::Ingredient, RefData> ingreds;
ESMS::CellRefList<ESM::Light, RefData> lights; MWWorld::CellRefList<ESM::Light, RefData> lights;
ESMS::CellRefList<ESM::Tool, RefData> lockpicks; MWWorld::CellRefList<ESM::Tool, RefData> lockpicks;
ESMS::CellRefList<ESM::Miscellaneous, RefData> miscItems; MWWorld::CellRefList<ESM::Miscellaneous, RefData> miscItems;
ESMS::CellRefList<ESM::Probe, RefData> probes; MWWorld::CellRefList<ESM::Probe, RefData> probes;
ESMS::CellRefList<ESM::Repair, RefData> repairs; MWWorld::CellRefList<ESM::Repair, RefData> repairs;
ESMS::CellRefList<ESM::Weapon, RefData> weapons; MWWorld::CellRefList<ESM::Weapon, RefData> weapons;
int mStateId; int mStateId;
mutable float mCachedWeight; mutable float mCachedWeight;
mutable bool mWeightUpToDate; mutable bool mWeightUpToDate;
@ -122,18 +121,18 @@ namespace MWWorld
ContainerStore *mContainer; ContainerStore *mContainer;
mutable Ptr mPtr; mutable Ptr mPtr;
ESMS::CellRefList<ESM::Potion, RefData>::List::iterator mPotion; MWWorld::CellRefList<ESM::Potion, RefData>::List::iterator mPotion;
ESMS::CellRefList<ESM::Apparatus, RefData>::List::iterator mApparatus; MWWorld::CellRefList<ESM::Apparatus, RefData>::List::iterator mApparatus;
ESMS::CellRefList<ESM::Armor, RefData>::List::iterator mArmor; MWWorld::CellRefList<ESM::Armor, RefData>::List::iterator mArmor;
ESMS::CellRefList<ESM::Book, RefData>::List::iterator mBook; MWWorld::CellRefList<ESM::Book, RefData>::List::iterator mBook;
ESMS::CellRefList<ESM::Clothing, RefData>::List::iterator mClothing; MWWorld::CellRefList<ESM::Clothing, RefData>::List::iterator mClothing;
ESMS::CellRefList<ESM::Ingredient, RefData>::List::iterator mIngredient; MWWorld::CellRefList<ESM::Ingredient, RefData>::List::iterator mIngredient;
ESMS::CellRefList<ESM::Light, RefData>::List::iterator mLight; MWWorld::CellRefList<ESM::Light, RefData>::List::iterator mLight;
ESMS::CellRefList<ESM::Tool, RefData>::List::iterator mLockpick; MWWorld::CellRefList<ESM::Tool, RefData>::List::iterator mLockpick;
ESMS::CellRefList<ESM::Miscellaneous, RefData>::List::iterator mMiscellaneous; MWWorld::CellRefList<ESM::Miscellaneous, RefData>::List::iterator mMiscellaneous;
ESMS::CellRefList<ESM::Probe, RefData>::List::iterator mProbe; MWWorld::CellRefList<ESM::Probe, RefData>::List::iterator mProbe;
ESMS::CellRefList<ESM::Repair, RefData>::List::iterator mRepair; MWWorld::CellRefList<ESM::Repair, RefData>::List::iterator mRepair;
ESMS::CellRefList<ESM::Weapon, RefData>::List::iterator mWeapon; MWWorld::CellRefList<ESM::Weapon, RefData>::List::iterator mWeapon;
private: private:
@ -144,18 +143,18 @@ namespace MWWorld
///< Begin-iterator ///< Begin-iterator
// construct iterator using a CellRefList iterator // construct iterator using a CellRefList iterator
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Potion, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Potion, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Apparatus, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Apparatus, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Armor, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Armor, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Book, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Book, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Clothing, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Clothing, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Ingredient, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Ingredient, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Light, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Light, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Tool, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Tool, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Miscellaneous, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Miscellaneous, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Probe, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Probe, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Repair, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Repair, RefData>::List::iterator);
ContainerStoreIterator (ContainerStore *container, ESMS::CellRefList<ESM::Weapon, RefData>::List::iterator); ContainerStoreIterator (ContainerStore *container, MWWorld::CellRefList<ESM::Weapon, RefData>::List::iterator);
void incType(); void incType();

View file

@ -1,13 +1,15 @@
#include "localscripts.hpp" #include "localscripts.hpp"
#include "cellstore.hpp"
namespace namespace
{ {
template<typename T> template<typename T>
void listCellScripts (MWWorld::LocalScripts& localScripts, 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()); cellRefList.list.begin());
iter!=cellRefList.list.end(); ++iter) iter!=cellRefList.list.end(); ++iter)
{ {

View file

@ -3,10 +3,10 @@
#include <boost/any.hpp> #include <boost/any.hpp>
#include <components/esm_store/cell_store.hpp>
#include <components/esm_store/store.hpp> #include <components/esm_store/store.hpp>
#include "ptr.hpp" #include "ptr.hpp"
#include "cellstore.hpp"
namespace MWWorld namespace MWWorld
{ {
@ -24,11 +24,11 @@ namespace MWWorld
{ {
if (const T *instance = list.search (name)) if (const T *instance = list.search (name))
{ {
ESMS::LiveCellRef<T, RefData> ref; LiveCellRef<T, RefData> ref;
ref.base = instance; ref.base = instance;
mRef = ref; 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; return true;
} }
@ -41,11 +41,11 @@ namespace MWWorld
{ {
if (const T *instance = list.search (name)) if (const T *instance = list.search (name))
{ {
ESMS::LiveCellRef<T, RefData> ref; LiveCellRef<T, RefData> ref;
ref.base = instance; ref.base = instance;
mRef = ref; 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; return true;
} }

View file

@ -3,8 +3,7 @@
#include "OgreCamera.h" #include "OgreCamera.h"
#include <components/esm_store/cell_store.hpp> #include "../mwworld/cellstore.hpp"
#include "../mwworld/refdata.hpp" #include "../mwworld/refdata.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -20,9 +19,9 @@ namespace MWWorld
class World; class World;
/// \brief NPC object representing the player and additional player data /// \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; MWWorld::Ptr::CellStore *mCellStore;
MWRender::Player *mRenderer; MWRender::Player *mRenderer;
MWWorld::World& mWorld; MWWorld::World& mWorld;

View file

@ -7,8 +7,7 @@
#include <components/esm/loadcell.hpp> #include <components/esm/loadcell.hpp>
#include <components/esm_store/cell_store.hpp> #include "cellstore.hpp"
#include "refdata.hpp" #include "refdata.hpp"
namespace MWWorld namespace MWWorld
@ -21,7 +20,7 @@ namespace MWWorld
{ {
public: public:
typedef ESMS::CellStore<RefData> CellStore; typedef MWWorld::CellStore<RefData> CellStore;
boost::any mPtr; boost::any mPtr;
ESM::CellRef *mCellRef; ESM::CellRef *mCellRef;
@ -51,7 +50,7 @@ namespace MWWorld
} }
template<typename T> template<typename T>
Ptr (ESMS::LiveCellRef<T, RefData> *liveCellRef, CellStore *cell) Ptr (MWWorld::LiveCellRef<T, RefData> *liveCellRef, CellStore *cell)
: mContainerStore (0) : mContainerStore (0)
{ {
mPtr = liveCellRef; mPtr = liveCellRef;
@ -62,9 +61,9 @@ namespace MWWorld
} }
template<typename T> 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; ESM::CellRef& getCellRef() const;

View file

@ -1,9 +1,8 @@
#include "refdata.hpp" #include "refdata.hpp"
#include <components/esm_store/cell_store.hpp>
#include "customdata.hpp" #include "customdata.hpp"
#include "cellstore.hpp"
namespace MWWorld namespace MWWorld
{ {

View file

@ -23,7 +23,7 @@ namespace
template<typename T> template<typename T>
void insertCellRefList(MWRender::RenderingManager& rendering, 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()) if (!cellRefList.list.empty())
{ {
@ -312,7 +312,7 @@ namespace MWWorld
mCellChanged = false; mCellChanged = false;
} }
void Scene::insertCell(ESMS::CellStore<MWWorld::RefData> &cell) void Scene::insertCell (Ptr::CellStore &cell)
{ {
// Loop through all references in the cell // Loop through all references in the cell
insertCellRefList(mRendering, cell.activators, cell, *mPhysics); insertCellRefList(mRendering, cell.activators, cell, *mPhysics);
@ -348,67 +348,67 @@ namespace MWWorld
// insert into the correct CellRefList // insert into the correct CellRefList
if (type == typeid(ESM::Potion).name()) 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 ); cell->potions.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->potions.list.back(), cell); newPtr = MWWorld::Ptr(&cell->potions.list.back(), cell);
} }
else if (type == typeid(ESM::Apparatus).name()) 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 ); cell->appas.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->appas.list.back(), cell); newPtr = MWWorld::Ptr(&cell->appas.list.back(), cell);
} }
else if (type == typeid(ESM::Armor).name()) 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 ); cell->armors.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->armors.list.back(), cell); newPtr = MWWorld::Ptr(&cell->armors.list.back(), cell);
} }
else if (type == typeid(ESM::Book).name()) 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 ); cell->books.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->books.list.back(), cell); newPtr = MWWorld::Ptr(&cell->books.list.back(), cell);
} }
else if (type == typeid(ESM::Clothing).name()) 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 ); cell->clothes.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->clothes.list.back(), cell); newPtr = MWWorld::Ptr(&cell->clothes.list.back(), cell);
} }
else if (type == typeid(ESM::Ingredient).name()) 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 ); cell->ingreds.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->ingreds.list.back(), cell); newPtr = MWWorld::Ptr(&cell->ingreds.list.back(), cell);
} }
else if (type == typeid(ESM::Light).name()) 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 ); cell->lights.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->lights.list.back(), cell); newPtr = MWWorld::Ptr(&cell->lights.list.back(), cell);
} }
else if (type == typeid(ESM::Tool).name()) 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 ); cell->lockpicks.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->lockpicks.list.back(), cell); newPtr = MWWorld::Ptr(&cell->lockpicks.list.back(), cell);
} }
else if (type == typeid(ESM::Repair).name()) 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 ); cell->repairs.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->repairs.list.back(), cell); newPtr = MWWorld::Ptr(&cell->repairs.list.back(), cell);
} }
else if (type == typeid(ESM::Probe).name()) 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 ); cell->probes.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->probes.list.back(), cell); newPtr = MWWorld::Ptr(&cell->probes.list.back(), cell);
} }
else if (type == typeid(ESM::Weapon).name()) 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 ); cell->weapons.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->weapons.list.back(), cell); newPtr = MWWorld::Ptr(&cell->weapons.list.back(), cell);
} }
@ -432,7 +432,7 @@ namespace MWWorld
MWWorld::ManualRef newRef (MWBase::Environment::get().getWorld()->getStore(), base); 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 ); cell->miscItems.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->miscItems.list.back(), cell); newPtr = MWWorld::Ptr(&cell->miscItems.list.back(), cell);
@ -444,7 +444,7 @@ namespace MWWorld
} }
else 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 ); cell->miscItems.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->miscItems.list.back(), cell); newPtr = MWWorld::Ptr(&cell->miscItems.list.back(), cell);

View file

@ -8,8 +8,6 @@
#include <openengine/bullet/physic.hpp> #include <openengine/bullet/physic.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwrender/renderingmanager.hpp" #include "../mwrender/renderingmanager.hpp"
#include "../mwrender/renderinginterface.hpp" #include "../mwrender/renderinginterface.hpp"
@ -98,7 +96,7 @@ namespace MWWorld
void markCellAsUnchanged(); 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 /// 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 /// and thus only handles object types that can be placed in a container

View file

@ -33,10 +33,10 @@ namespace
{ {
template<typename T> template<typename T>
void listCellScripts (const ESMS::ESMStore& store, 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) 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()); cellRefList.list.begin());
iter!=cellRefList.list.end(); ++iter) iter!=cellRefList.list.end(); ++iter)
{ {
@ -53,10 +53,10 @@ namespace
} }
template<typename T> template<typename T>
ESMS::LiveCellRef<T, MWWorld::RefData> *searchViaHandle (const std::string& handle, MWWorld::LiveCellRef<T, MWWorld::RefData> *searchViaHandle (const std::string& handle,
ESMS::CellRefList<T, MWWorld::RefData>& refList) 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) 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) 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)) searchViaHandle (handle, cell.activators))
return Ptr (ref, &cell); 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); 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); 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); 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); 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); return Ptr (ref, &cell);
if (ESMS::LiveCellRef<ESM::Container, RefData> *ref = if (MWWorld::LiveCellRef<ESM::Container, RefData> *ref =
searchViaHandle (handle, cell.containers)) searchViaHandle (handle, cell.containers))
return Ptr (ref, &cell); return Ptr (ref, &cell);
if (ESMS::LiveCellRef<ESM::Creature, RefData> *ref = if (MWWorld::LiveCellRef<ESM::Creature, RefData> *ref =
searchViaHandle (handle, cell.creatures)) searchViaHandle (handle, cell.creatures))
return Ptr (ref, &cell); 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); return Ptr (ref, &cell);
if (ESMS::LiveCellRef<ESM::Ingredient, RefData> *ref = if (MWWorld::LiveCellRef<ESM::Ingredient, RefData> *ref =
searchViaHandle (handle, cell.ingreds)) searchViaHandle (handle, cell.ingreds))
return Ptr (ref, &cell); 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); 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); 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); 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); 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); 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); 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); 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 (ref, &cell);
return Ptr(); return Ptr();
} }
@ -961,8 +961,8 @@ namespace MWWorld
Ogre::Vector2 World::getNorthVector(Ptr::CellStore* cell) Ogre::Vector2 World::getNorthVector(Ptr::CellStore* cell)
{ {
ESMS::CellRefList<ESM::Static, MWWorld::RefData> statics = cell->statics; MWWorld::CellRefList<ESM::Static, MWWorld::RefData> statics = cell->statics;
ESMS::LiveCellRef<ESM::Static, MWWorld::RefData>* ref = statics.find("northmarker"); MWWorld::LiveCellRef<ESM::Static, MWWorld::RefData>* ref = statics.find("northmarker");
if (!ref) if (!ref)
return Vector2(0, 1); return Vector2(0, 1);
Ogre::SceneNode* node = ref->mData.getBaseNode(); Ogre::SceneNode* node = ref->mData.getBaseNode();

View file

@ -6,7 +6,6 @@
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <components/esm_store/cell_store.hpp>
#include <components/settings/settings.hpp> #include <components/settings/settings.hpp>
#include "../mwrender/debugging.hpp" #include "../mwrender/debugging.hpp"

View file

@ -35,7 +35,7 @@ add_component_dir (file_finder
) )
add_component_dir (esm_store add_component_dir (esm_store
cell_store reclists store reclists store
) )
add_component_dir (esm add_component_dir (esm
@ -74,4 +74,3 @@ target_link_libraries(components ${Boost_LIBRARIES} ${OGRE_LIBRARIES})
# Make the variable accessible for other subdirectories # Make the variable accessible for other subdirectories
set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE) set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE)