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 "../mwworld/globals.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
|
@ -42,7 +43,6 @@ namespace MWWorld
|
|||
class CellStore;
|
||||
class Player;
|
||||
class LocalScripts;
|
||||
class Ptr;
|
||||
class TimeStamp;
|
||||
class ESMStore;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "../mwworld/physicssystem.hpp"
|
||||
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
#include "../mwrender/actors.hpp"
|
||||
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#ifndef GAME_MWCLASS_CREATURE_H
|
||||
#define GAME_MWCLASS_CREATURE_H
|
||||
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
#include "../mwrender/actors.hpp"
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -3,15 +3,20 @@
|
|||
#include <OgreSceneNode.h>
|
||||
#include <OgreSceneManager.h>
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
#include "animation.hpp"
|
||||
#include "creatureanimation.hpp"
|
||||
#include "npcanimation.hpp"
|
||||
|
||||
#include "renderconst.hpp"
|
||||
|
||||
|
||||
namespace MWRender
|
||||
{
|
||||
using namespace Ogre;
|
||||
using namespace MWRender;
|
||||
using namespace NifOgre;
|
||||
|
||||
Actors::~Actors(){
|
||||
|
||||
std::map<MWWorld::Ptr, Animation*>::iterator it = mAllActors.begin();
|
||||
for (; it != mAllActors.end(); ++it) {
|
||||
delete it->second;
|
||||
|
@ -156,3 +161,5 @@ Actors::updateObjectCell(const MWWorld::Ptr &ptr)
|
|||
mAllActors[ptr] = anim;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,25 +1,27 @@
|
|||
#ifndef _GAME_RENDER_ACTORS_H
|
||||
#define _GAME_RENDER_ACTORS_H
|
||||
|
||||
#include "npcanimation.hpp"
|
||||
#include "creatureanimation.hpp"
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class Ptr;
|
||||
class CellStore;
|
||||
class InventoryStore;
|
||||
}
|
||||
|
||||
namespace MWRender{
|
||||
class Actors{
|
||||
namespace MWRender
|
||||
{
|
||||
class Animation;
|
||||
|
||||
class Actors
|
||||
{
|
||||
OEngine::Render::OgreRenderer &mRend;
|
||||
std::map<MWWorld::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
|
||||
Ogre::SceneNode* mMwRoot;
|
||||
std::map<MWWorld::Ptr, Animation*> mAllActors;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
public:
|
||||
Actors(OEngine::Render::OgreRenderer& _rend): mRend(_rend) {}
|
||||
~Actors();
|
||||
void setMwRoot(Ogre::SceneNode* root);
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
#ifndef _GAME_RENDER_ANIMATION_H
|
||||
#define _GAME_RENDER_ANIMATION_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#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
|
||||
{
|
||||
|
||||
|
||||
|
||||
namespace MWRender {
|
||||
|
||||
class Animation {
|
||||
class Animation
|
||||
{
|
||||
struct GroupTimes {
|
||||
float mStart;
|
||||
float mStop;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
#include "renderconst.hpp"
|
||||
#include "npcanimation.hpp"
|
||||
|
|
|
@ -3,18 +3,21 @@
|
|||
|
||||
#include "animation.hpp"
|
||||
|
||||
#include "components/nifogre/ogre_nif_loader.hpp"
|
||||
namespace MWWorld
|
||||
{
|
||||
class Ptr;
|
||||
}
|
||||
|
||||
|
||||
namespace MWRender{
|
||||
|
||||
class CreatureAnimation: public Animation
|
||||
namespace MWRender
|
||||
{
|
||||
class CreatureAnimation : public Animation
|
||||
{
|
||||
public:
|
||||
virtual ~CreatureAnimation();
|
||||
CreatureAnimation(const MWWorld::Ptr& ptr);
|
||||
virtual void runAnimation(float timepassed);
|
||||
virtual ~CreatureAnimation();
|
||||
|
||||
virtual void runAnimation(float timepassed);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
|
||||
#include "animation.hpp"
|
||||
|
||||
#include "components/nifogre/ogre_nif_loader.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwclass/npc.hpp"
|
||||
#include "../mwworld/containerstore.hpp"
|
||||
|
||||
namespace ESM
|
||||
|
@ -13,9 +11,11 @@ namespace ESM
|
|||
struct NPC;
|
||||
}
|
||||
|
||||
namespace MWRender{
|
||||
namespace MWRender
|
||||
{
|
||||
|
||||
class NpcAnimation: public Animation{
|
||||
class NpcAnimation : public Animation
|
||||
{
|
||||
private:
|
||||
MWWorld::InventoryStore& mInv;
|
||||
int mStateID;
|
||||
|
@ -91,4 +91,5 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
#include <extern/shiny/Platforms/Ogre/OgrePlatform.hpp>
|
||||
|
||||
#include <components/esm/loadstat.hpp>
|
||||
#include "../mwworld/esmstore.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/environment.hpp"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "player.hpp"
|
||||
#include "localscripts.hpp"
|
||||
#include "esmstore.hpp"
|
||||
#include "class.hpp"
|
||||
|
||||
#include "cellfunctors.hpp"
|
||||
|
||||
|
|
Loading…
Reference in a new issue