forked from mirror/openmw-tes3mp
Clean up some header includes to reduce nesting
This commit is contained in:
parent
8ebf49a35b
commit
efca5ded47
11 changed files with 45 additions and 37 deletions
|
@ -6,6 +6,7 @@
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
|
|
||||||
#include "../mwworld/globals.hpp"
|
#include "../mwworld/globals.hpp"
|
||||||
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
namespace Ogre
|
namespace Ogre
|
||||||
{
|
{
|
||||||
|
@ -42,7 +43,6 @@ namespace MWWorld
|
||||||
class CellStore;
|
class CellStore;
|
||||||
class Player;
|
class Player;
|
||||||
class LocalScripts;
|
class LocalScripts;
|
||||||
class Ptr;
|
|
||||||
class TimeStamp;
|
class TimeStamp;
|
||||||
class ESMStore;
|
class ESMStore;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "../mwworld/physicssystem.hpp"
|
#include "../mwworld/physicssystem.hpp"
|
||||||
|
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
|
#include "../mwrender/actors.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#ifndef GAME_MWCLASS_CREATURE_H
|
#ifndef GAME_MWCLASS_CREATURE_H
|
||||||
#define GAME_MWCLASS_CREATURE_H
|
#define GAME_MWCLASS_CREATURE_H
|
||||||
|
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwworld/class.hpp"
|
||||||
#include "../mwrender/actors.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,15 +3,20 @@
|
||||||
#include <OgreSceneNode.h>
|
#include <OgreSceneNode.h>
|
||||||
#include <OgreSceneManager.h>
|
#include <OgreSceneManager.h>
|
||||||
|
|
||||||
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
|
#include "animation.hpp"
|
||||||
|
#include "creatureanimation.hpp"
|
||||||
|
#include "npcanimation.hpp"
|
||||||
|
|
||||||
#include "renderconst.hpp"
|
#include "renderconst.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
namespace MWRender
|
||||||
|
{
|
||||||
using namespace Ogre;
|
using namespace Ogre;
|
||||||
using namespace MWRender;
|
|
||||||
using namespace NifOgre;
|
|
||||||
|
|
||||||
Actors::~Actors(){
|
Actors::~Actors(){
|
||||||
|
|
||||||
std::map<MWWorld::Ptr, Animation*>::iterator it = mAllActors.begin();
|
std::map<MWWorld::Ptr, Animation*>::iterator it = mAllActors.begin();
|
||||||
for (; it != mAllActors.end(); ++it) {
|
for (; it != mAllActors.end(); ++it) {
|
||||||
delete it->second;
|
delete it->second;
|
||||||
|
@ -156,3 +161,5 @@ Actors::updateObjectCell(const MWWorld::Ptr &ptr)
|
||||||
mAllActors[ptr] = anim;
|
mAllActors[ptr] = anim;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
#ifndef _GAME_RENDER_ACTORS_H
|
#ifndef _GAME_RENDER_ACTORS_H
|
||||||
#define _GAME_RENDER_ACTORS_H
|
#define _GAME_RENDER_ACTORS_H
|
||||||
|
|
||||||
#include "npcanimation.hpp"
|
#include <openengine/ogre/renderer.hpp>
|
||||||
#include "creatureanimation.hpp"
|
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
{
|
{
|
||||||
class Ptr;
|
class Ptr;
|
||||||
class CellStore;
|
class CellStore;
|
||||||
|
class InventoryStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace MWRender{
|
namespace MWRender
|
||||||
class Actors{
|
{
|
||||||
|
class Animation;
|
||||||
|
|
||||||
|
class Actors
|
||||||
|
{
|
||||||
OEngine::Render::OgreRenderer &mRend;
|
OEngine::Render::OgreRenderer &mRend;
|
||||||
std::map<MWWorld::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
|
std::map<MWWorld::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
|
||||||
Ogre::SceneNode* mMwRoot;
|
Ogre::SceneNode* mMwRoot;
|
||||||
std::map<MWWorld::Ptr, Animation*> mAllActors;
|
std::map<MWWorld::Ptr, Animation*> mAllActors;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
public:
|
|
||||||
Actors(OEngine::Render::OgreRenderer& _rend): mRend(_rend) {}
|
Actors(OEngine::Render::OgreRenderer& _rend): mRend(_rend) {}
|
||||||
~Actors();
|
~Actors();
|
||||||
void setMwRoot(Ogre::SceneNode* root);
|
void setMwRoot(Ogre::SceneNode* root);
|
||||||
|
|
|
@ -1,20 +1,13 @@
|
||||||
#ifndef _GAME_RENDER_ANIMATION_H
|
#ifndef _GAME_RENDER_ANIMATION_H
|
||||||
#define _GAME_RENDER_ANIMATION_H
|
#define _GAME_RENDER_ANIMATION_H
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include <components/nifogre/ogre_nif_loader.hpp>
|
#include <components/nifogre/ogre_nif_loader.hpp>
|
||||||
#include <openengine/ogre/renderer.hpp>
|
|
||||||
#include "../mwworld/actiontalk.hpp"
|
|
||||||
#include <components/nif/node.hpp>
|
|
||||||
#include <openengine/bullet/physic.hpp>
|
|
||||||
|
|
||||||
|
namespace MWRender
|
||||||
|
{
|
||||||
|
|
||||||
|
class Animation
|
||||||
|
{
|
||||||
namespace MWRender {
|
|
||||||
|
|
||||||
class Animation {
|
|
||||||
struct GroupTimes {
|
struct GroupTimes {
|
||||||
float mStart;
|
float mStart;
|
||||||
float mStop;
|
float mStop;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwworld/player.hpp"
|
#include "../mwworld/player.hpp"
|
||||||
|
#include "../mwworld/class.hpp"
|
||||||
|
|
||||||
#include "renderconst.hpp"
|
#include "renderconst.hpp"
|
||||||
#include "npcanimation.hpp"
|
#include "npcanimation.hpp"
|
||||||
|
|
|
@ -3,18 +3,21 @@
|
||||||
|
|
||||||
#include "animation.hpp"
|
#include "animation.hpp"
|
||||||
|
|
||||||
#include "components/nifogre/ogre_nif_loader.hpp"
|
namespace MWWorld
|
||||||
|
{
|
||||||
|
class Ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace MWRender
|
||||||
namespace MWRender{
|
{
|
||||||
|
class CreatureAnimation : public Animation
|
||||||
class CreatureAnimation: public Animation
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~CreatureAnimation();
|
|
||||||
CreatureAnimation(const MWWorld::Ptr& ptr);
|
CreatureAnimation(const MWWorld::Ptr& ptr);
|
||||||
virtual void runAnimation(float timepassed);
|
virtual ~CreatureAnimation();
|
||||||
|
|
||||||
|
virtual void runAnimation(float timepassed);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
|
|
||||||
#include "animation.hpp"
|
#include "animation.hpp"
|
||||||
|
|
||||||
#include "components/nifogre/ogre_nif_loader.hpp"
|
|
||||||
#include "../mwworld/inventorystore.hpp"
|
#include "../mwworld/inventorystore.hpp"
|
||||||
#include "../mwclass/npc.hpp"
|
|
||||||
#include "../mwworld/containerstore.hpp"
|
#include "../mwworld/containerstore.hpp"
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
|
@ -13,9 +11,11 @@ namespace ESM
|
||||||
struct NPC;
|
struct NPC;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace MWRender{
|
namespace MWRender
|
||||||
|
{
|
||||||
|
|
||||||
class NpcAnimation: public Animation{
|
class NpcAnimation : public Animation
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
MWWorld::InventoryStore& mInv;
|
MWWorld::InventoryStore& mInv;
|
||||||
int mStateID;
|
int mStateID;
|
||||||
|
@ -91,4 +91,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,8 +19,9 @@
|
||||||
#include <extern/shiny/Platforms/Ogre/OgrePlatform.hpp>
|
#include <extern/shiny/Platforms/Ogre/OgrePlatform.hpp>
|
||||||
|
|
||||||
#include <components/esm/loadstat.hpp>
|
#include <components/esm/loadstat.hpp>
|
||||||
#include "../mwworld/esmstore.hpp"
|
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
#include "../mwworld/class.hpp"
|
||||||
|
|
||||||
#include "../mwbase/world.hpp" // these includes can be removed once the static-hack is gone
|
#include "../mwbase/world.hpp" // these includes can be removed once the static-hack is gone
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "player.hpp"
|
#include "player.hpp"
|
||||||
#include "localscripts.hpp"
|
#include "localscripts.hpp"
|
||||||
#include "esmstore.hpp"
|
#include "esmstore.hpp"
|
||||||
|
#include "class.hpp"
|
||||||
|
|
||||||
#include "cellfunctors.hpp"
|
#include "cellfunctors.hpp"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue