forked from mirror/openmw-tes3mp
Made corrections
This commit is contained in:
parent
0b3bb2719f
commit
bc58ef28cd
29 changed files with 61 additions and 25 deletions
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include "activator.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
#include <components/esm/loadacti.hpp>
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_APPARATUS_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_ARMOR_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_BOOK_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_CLOTHING_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_CONTAINER_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -33,9 +33,9 @@ namespace MWClass
|
|||
|
||||
if (!model.empty())
|
||||
{
|
||||
MWRender::Objects objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertMesh(ptr, "meshes\\" + model);
|
||||
MWRender::Creatures creatures = renderingInterface.getCreatures();
|
||||
//creatures.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
//creatures.insertMesh(ptr, "meshes\\" + model);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_CREATURE_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/creatures.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "../mwworld/world.hpp"
|
||||
|
||||
#include "../mwrender/cellimp.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_DOOR_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_INGREDIENT_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -9,6 +9,11 @@ namespace MWClass
|
|||
{
|
||||
public:
|
||||
|
||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||
///< Add reference into a cell for rendering
|
||||
|
||||
virtual void insertObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics, MWWorld::Environment& environment) const;
|
||||
|
||||
virtual std::string getName (const MWWorld::Ptr& ptr) const;
|
||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||
/// can return an empty string.
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_LIGHT_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_LOCKPICK_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_MISC_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "../mwmechanics/mechanicsmanager.hpp"
|
||||
#include <OgreSceneNode.h>
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -42,9 +43,9 @@ namespace MWClass
|
|||
|
||||
if (!model.empty())
|
||||
{
|
||||
MWRender::Objects objects = renderingInterface.getObjects();
|
||||
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
objects.insertMesh(ptr, "meshes\\" + model);
|
||||
MWRender::Npcs npcs = renderingInterface.getNPCs();
|
||||
//npcs.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
|
||||
//npcs.insertMesh(ptr, "meshes\\" + model);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_NPC_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/npcs.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_POTION_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_PROBE_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_REPAIR_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_STATIC_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define GAME_MWCLASS_WEAPON_H
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwrender/objects.hpp"
|
||||
|
||||
namespace MWClass
|
||||
{
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#ifndef _GAME_RENDER_CREATURES_H
|
||||
#define _GAME_RENDER_CREATURES_H
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
|
||||
namespace MWRender{
|
||||
class Creatures{
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef _GAME_RENDER_NPCS_H
|
||||
#define _GAME_RENDER_NPCS_H
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
namespace MWRender{
|
||||
class Npcs{
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#ifndef _GAME_RENDER_OBJECTS_H
|
||||
#define _GAME_RENDER_OBJECTS_H
|
||||
|
||||
#include "components/esm_store/cell_store.hpp"
|
||||
|
||||
#include "../mwworld/refdata.hpp"
|
||||
|
@ -40,4 +43,5 @@ public:
|
|||
/// insert a light related to the most recent insertBegin call.
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -1,14 +1,17 @@
|
|||
#include "objects.hpp"
|
||||
#include "npcs.hpp"
|
||||
#include "creatures.hpp"
|
||||
#include "player.hpp"
|
||||
#define RENDERING_INTERFACE 1
|
||||
#ifndef _GAME_RENDERING_INTERFACE_H
|
||||
#define _GAME_RENDERING_INTERFACE_H
|
||||
namespace MWRender{
|
||||
class Npcs;
|
||||
class Creatures;
|
||||
class Objects;
|
||||
class Player;
|
||||
class RenderingInterface{
|
||||
public:
|
||||
virtual MWRender::Npcs& getNPCs() = 0;
|
||||
virtual MWRender::Creatures& getCreatures() = 0;
|
||||
virtual MWRender::Objects& getObjects() = 0;
|
||||
virtual MWRender::Player& getPlayer() = 0;
|
||||
virtual ~RenderingInterface(){};
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -12,7 +12,7 @@
|
|||
#include "../mwworld/world.hpp" // these includes can be removed once the static-hack is gone
|
||||
#include "../mwworld/ptr.hpp"
|
||||
#include <components/esm/loadstat.hpp>
|
||||
|
||||
#include "renderinginterface.hpp"
|
||||
|
||||
|
||||
using namespace MWRender;
|
||||
|
|
|
@ -19,10 +19,11 @@
|
|||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#ifndef RENDERING_INTERFACE
|
||||
#include "renderinginterface.hpp"
|
||||
#endif
|
||||
|
||||
#include "npcs.hpp"
|
||||
#include "creatures.hpp"
|
||||
#include "objects.hpp"
|
||||
#include "player.hpp"
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
|
@ -42,7 +43,7 @@ namespace MWWorld
|
|||
|
||||
namespace MWRender
|
||||
{
|
||||
class Player;
|
||||
|
||||
|
||||
|
||||
class RenderingManager: private RenderingInterface {
|
||||
|
@ -51,7 +52,7 @@ class RenderingManager: private RenderingInterface {
|
|||
|
||||
public:
|
||||
RenderingManager(OEngine::Render::OgreRenderer& _rend, const boost::filesystem::path& resDir, OEngine::Physic::PhysicEngine* engine);
|
||||
~RenderingManager();
|
||||
virtual ~RenderingManager();
|
||||
virtual MWRender::Npcs& getNPCs();
|
||||
virtual MWRender::Creatures& getCreatures();
|
||||
virtual MWRender::Objects& getObjects();
|
||||
|
@ -96,7 +97,7 @@ class RenderingManager: private RenderingInterface {
|
|||
SkyManager* mSkyManager;
|
||||
OEngine::Render::OgreRenderer &rend;
|
||||
Ogre::Camera* camera;
|
||||
MWRender::Npcs npcs;
|
||||
MWRender::Npcs npcs;
|
||||
MWRender::Creatures creatures;
|
||||
MWRender::Objects objects;
|
||||
|
||||
|
|
|
@ -9,11 +9,8 @@
|
|||
#include "action.hpp"
|
||||
#include "containerstore.hpp"
|
||||
#include "refdata.hpp"
|
||||
|
||||
#include "physicssystem.hpp"
|
||||
#ifndef RENDERING_INTERFACE
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
#endif
|
||||
#include "physicssystem.hpp"
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue