1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 10:23:51 +00:00

Made corrections

This commit is contained in:
Jason Hooks 2011-11-12 15:58:22 -05:00
parent 0b3bb2719f
commit bc58ef28cd
29 changed files with 61 additions and 25 deletions

View file

@ -1,5 +1,6 @@
#include "activator.hpp" #include "activator.hpp"
#include "../mwrender/objects.hpp"
#include <components/esm/loadacti.hpp> #include <components/esm/loadacti.hpp>

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_APPARATUS_H #define GAME_MWCLASS_APPARATUS_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_ARMOR_H #define GAME_MWCLASS_ARMOR_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_BOOK_H #define GAME_MWCLASS_BOOK_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_CLOTHING_H #define GAME_MWCLASS_CLOTHING_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_CONTAINER_H #define GAME_MWCLASS_CONTAINER_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -33,9 +33,9 @@ namespace MWClass
if (!model.empty()) if (!model.empty())
{ {
MWRender::Objects objects = renderingInterface.getObjects(); MWRender::Creatures creatures = renderingInterface.getCreatures();
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false); //creatures.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
objects.insertMesh(ptr, "meshes\\" + model); //creatures.insertMesh(ptr, "meshes\\" + model);
} }
} }

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_CREATURE_H #define GAME_MWCLASS_CREATURE_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/creatures.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -13,6 +13,7 @@
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "../mwrender/cellimp.hpp" #include "../mwrender/cellimp.hpp"
#include "../mwrender/objects.hpp"
#include <iostream> #include <iostream>

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_DOOR_H #define GAME_MWCLASS_DOOR_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_INGREDIENT_H #define GAME_MWCLASS_INGREDIENT_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -9,6 +9,11 @@ namespace MWClass
{ {
public: 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; 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); ///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string. /// can return an empty string.

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_LIGHT_H #define GAME_MWCLASS_LIGHT_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_LOCKPICK_H #define GAME_MWCLASS_LOCKPICK_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_MISC_H #define GAME_MWCLASS_MISC_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -15,6 +15,7 @@
#include "../mwmechanics/mechanicsmanager.hpp" #include "../mwmechanics/mechanicsmanager.hpp"
#include <OgreSceneNode.h> #include <OgreSceneNode.h>
#include "../mwrender/objects.hpp"
namespace namespace
{ {
@ -42,9 +43,9 @@ namespace MWClass
if (!model.empty()) if (!model.empty())
{ {
MWRender::Objects objects = renderingInterface.getObjects(); MWRender::Npcs npcs = renderingInterface.getNPCs();
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false); //npcs.insertBegin(ptr, ptr.getRefData().isEnabled(), false);
objects.insertMesh(ptr, "meshes\\" + model); //npcs.insertMesh(ptr, "meshes\\" + model);
} }
} }

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_NPC_H #define GAME_MWCLASS_NPC_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/npcs.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_POTION_H #define GAME_MWCLASS_POTION_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_PROBE_H #define GAME_MWCLASS_PROBE_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_REPAIR_H #define GAME_MWCLASS_REPAIR_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_STATIC_H #define GAME_MWCLASS_STATIC_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -2,6 +2,7 @@
#define GAME_MWCLASS_WEAPON_H #define GAME_MWCLASS_WEAPON_H
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwrender/objects.hpp"
namespace MWClass namespace MWClass
{ {

View file

@ -1,3 +1,5 @@
#ifndef _GAME_RENDER_CREATURES_H
#define _GAME_RENDER_CREATURES_H
#include <openengine/ogre/renderer.hpp> #include <openengine/ogre/renderer.hpp>
namespace MWRender{ namespace MWRender{
@ -5,3 +7,4 @@ class Creatures{
}; };
} }
#endif

View file

@ -1,6 +1,9 @@
#ifndef _GAME_RENDER_NPCS_H
#define _GAME_RENDER_NPCS_H
#include <openengine/ogre/renderer.hpp> #include <openengine/ogre/renderer.hpp>
namespace MWRender{ namespace MWRender{
class Npcs{ class Npcs{
}; };
} }
#endif

View file

@ -1,3 +1,6 @@
#ifndef _GAME_RENDER_OBJECTS_H
#define _GAME_RENDER_OBJECTS_H
#include "components/esm_store/cell_store.hpp" #include "components/esm_store/cell_store.hpp"
#include "../mwworld/refdata.hpp" #include "../mwworld/refdata.hpp"
@ -41,3 +44,4 @@ public:
}; };
} }
#endif

View file

@ -1,14 +1,17 @@
#include "objects.hpp" #ifndef _GAME_RENDERING_INTERFACE_H
#include "npcs.hpp" #define _GAME_RENDERING_INTERFACE_H
#include "creatures.hpp"
#include "player.hpp"
#define RENDERING_INTERFACE 1
namespace MWRender{ namespace MWRender{
class Npcs;
class Creatures;
class Objects;
class Player;
class RenderingInterface{ class RenderingInterface{
public: public:
virtual MWRender::Npcs& getNPCs() = 0; virtual MWRender::Npcs& getNPCs() = 0;
virtual MWRender::Creatures& getCreatures() = 0; virtual MWRender::Creatures& getCreatures() = 0;
virtual MWRender::Objects& getObjects() = 0; virtual MWRender::Objects& getObjects() = 0;
virtual MWRender::Player& getPlayer() = 0; virtual MWRender::Player& getPlayer() = 0;
virtual ~RenderingInterface(){};
}; };
} }
#endif

View file

@ -12,7 +12,7 @@
#include "../mwworld/world.hpp" // these includes can be removed once the static-hack is gone #include "../mwworld/world.hpp" // these includes can be removed once the static-hack is gone
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
#include <components/esm/loadstat.hpp> #include <components/esm/loadstat.hpp>
#include "renderinginterface.hpp"
using namespace MWRender; using namespace MWRender;

View file

@ -19,10 +19,11 @@
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#ifndef RENDERING_INTERFACE
#include "renderinginterface.hpp" #include "renderinginterface.hpp"
#endif #include "npcs.hpp"
#include "creatures.hpp"
#include "objects.hpp"
#include "player.hpp"
namespace Ogre namespace Ogre
{ {
@ -42,7 +43,7 @@ namespace MWWorld
namespace MWRender namespace MWRender
{ {
class Player;
class RenderingManager: private RenderingInterface { class RenderingManager: private RenderingInterface {
@ -51,7 +52,7 @@ class RenderingManager: private RenderingInterface {
public: public:
RenderingManager(OEngine::Render::OgreRenderer& _rend, const boost::filesystem::path& resDir, OEngine::Physic::PhysicEngine* engine); RenderingManager(OEngine::Render::OgreRenderer& _rend, const boost::filesystem::path& resDir, OEngine::Physic::PhysicEngine* engine);
~RenderingManager(); virtual ~RenderingManager();
virtual MWRender::Npcs& getNPCs(); virtual MWRender::Npcs& getNPCs();
virtual MWRender::Creatures& getCreatures(); virtual MWRender::Creatures& getCreatures();
virtual MWRender::Objects& getObjects(); virtual MWRender::Objects& getObjects();

View file

@ -9,11 +9,8 @@
#include "action.hpp" #include "action.hpp"
#include "containerstore.hpp" #include "containerstore.hpp"
#include "refdata.hpp" #include "refdata.hpp"
#include "physicssystem.hpp"
#ifndef RENDERING_INTERFACE
#include "../mwrender/renderinginterface.hpp" #include "../mwrender/renderinginterface.hpp"
#endif #include "physicssystem.hpp"
namespace Ogre namespace Ogre
{ {