From 8de6761a794550613dfe524e8eefeb36b784eeec Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 27 Jan 2012 15:11:02 +0100 Subject: [PATCH] general cleanup --- apps/openmw/mwclass/apparatus.cpp | 3 ++- apps/openmw/mwclass/apparatus.hpp | 1 - apps/openmw/mwclass/armor.cpp | 3 ++- apps/openmw/mwclass/armor.hpp | 1 - apps/openmw/mwclass/book.cpp | 3 ++- apps/openmw/mwclass/book.hpp | 1 - apps/openmw/mwclass/clothing.cpp | 3 ++- apps/openmw/mwclass/clothing.hpp | 1 - apps/openmw/mwclass/container.cpp | 2 ++ apps/openmw/mwclass/container.hpp | 1 - apps/openmw/mwclass/door.cpp | 8 ++------ apps/openmw/mwclass/door.hpp | 1 - apps/openmw/mwclass/ingredient.cpp | 6 ++---- apps/openmw/mwclass/ingredient.hpp | 1 - apps/openmw/mwclass/light.cpp | 4 +++- apps/openmw/mwclass/light.hpp | 1 - apps/openmw/mwclass/lockpick.cpp | 4 +++- apps/openmw/mwclass/lockpick.hpp | 1 - apps/openmw/mwclass/misc.cpp | 4 +++- apps/openmw/mwclass/misc.hpp | 1 - apps/openmw/mwclass/npc.cpp | 1 + apps/openmw/mwclass/npc.hpp | 1 - apps/openmw/mwclass/potion.cpp | 3 ++- apps/openmw/mwclass/potion.hpp | 1 - apps/openmw/mwclass/probe.hpp | 1 - apps/openmw/mwclass/repair.cpp | 4 +++- apps/openmw/mwclass/repair.hpp | 1 - apps/openmw/mwclass/static.cpp | 3 ++- apps/openmw/mwclass/static.hpp | 1 - apps/openmw/mwclass/weapon.cpp | 3 ++- apps/openmw/mwclass/weapon.hpp | 1 - 31 files changed, 33 insertions(+), 37 deletions(-) diff --git a/apps/openmw/mwclass/apparatus.cpp b/apps/openmw/mwclass/apparatus.cpp index 30b308e70..cc30c6955 100644 --- a/apps/openmw/mwclass/apparatus.cpp +++ b/apps/openmw/mwclass/apparatus.cpp @@ -8,6 +8,7 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" #include "containerutil.hpp" @@ -20,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/apparatus.hpp b/apps/openmw/mwclass/apparatus.hpp index 4c8a2c0e2..9a5a9b955 100644 --- a/apps/openmw/mwclass/apparatus.hpp +++ b/apps/openmw/mwclass/apparatus.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_APPARATUS_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/armor.cpp b/apps/openmw/mwclass/armor.cpp index a8a431acf..9a0936027 100644 --- a/apps/openmw/mwclass/armor.cpp +++ b/apps/openmw/mwclass/armor.cpp @@ -8,6 +8,7 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" #include "containerutil.hpp" @@ -20,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/armor.hpp b/apps/openmw/mwclass/armor.hpp index c5f9812b7..123713a38 100644 --- a/apps/openmw/mwclass/armor.hpp +++ b/apps/openmw/mwclass/armor.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_ARMOR_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/book.cpp b/apps/openmw/mwclass/book.cpp index 011fd2c32..8c5be4793 100644 --- a/apps/openmw/mwclass/book.cpp +++ b/apps/openmw/mwclass/book.cpp @@ -8,6 +8,7 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" #include "containerutil.hpp" @@ -20,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/book.hpp b/apps/openmw/mwclass/book.hpp index f0e38cceb..6e38ea0d3 100644 --- a/apps/openmw/mwclass/book.hpp +++ b/apps/openmw/mwclass/book.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_BOOK_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/clothing.cpp b/apps/openmw/mwclass/clothing.cpp index 0214c72ad..3826c6c40 100644 --- a/apps/openmw/mwclass/clothing.cpp +++ b/apps/openmw/mwclass/clothing.cpp @@ -8,6 +8,7 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" #include "containerutil.hpp" @@ -20,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/clothing.hpp b/apps/openmw/mwclass/clothing.hpp index 76c2c4a3e..353f7f606 100644 --- a/apps/openmw/mwclass/clothing.hpp +++ b/apps/openmw/mwclass/clothing.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_CLOTHING_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/container.cpp b/apps/openmw/mwclass/container.cpp index f81e0b9db..13a6241d4 100644 --- a/apps/openmw/mwclass/container.cpp +++ b/apps/openmw/mwclass/container.cpp @@ -9,6 +9,8 @@ #include "../mwworld/containerstore.hpp" #include "../mwworld/customdata.hpp" +#include "../mwrender/objects.hpp" + namespace { struct CustomData : public MWWorld::CustomData diff --git a/apps/openmw/mwclass/container.hpp b/apps/openmw/mwclass/container.hpp index 9039d11ea..78552ffe9 100644 --- a/apps/openmw/mwclass/container.hpp +++ b/apps/openmw/mwclass/container.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_CONTAINER_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index 26436a012..d0b3b11a2 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -14,8 +14,6 @@ #include "../mwrender/objects.hpp" -#include - namespace MWClass { void Door::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const @@ -25,7 +23,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); @@ -39,13 +37,11 @@ namespace MWClass ESMS::LiveCellRef *ref = ptr.get(); - const std::string &model = ref->base->model; assert (ref->base != NULL); if(!model.empty()){ physics.insertObjectPhysics(ptr, "meshes\\" + model); } - } std::string Door::getName (const MWWorld::Ptr& ptr) const @@ -86,7 +82,7 @@ namespace MWClass } else { - // another NPC or a create is using the door + // another NPC or a creature is using the door // TODO return action for teleporting other NPC/creature return boost::shared_ptr (new MWWorld::NullAction); } diff --git a/apps/openmw/mwclass/door.hpp b/apps/openmw/mwclass/door.hpp index c230cf357..aecb4224c 100644 --- a/apps/openmw/mwclass/door.hpp +++ b/apps/openmw/mwclass/door.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_DOOR_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/ingredient.cpp b/apps/openmw/mwclass/ingredient.cpp index 5e55010eb..ac1076cc1 100644 --- a/apps/openmw/mwclass/ingredient.cpp +++ b/apps/openmw/mwclass/ingredient.cpp @@ -8,6 +8,7 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" #include "containerutil.hpp" @@ -20,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); @@ -34,14 +35,11 @@ namespace MWClass ESMS::LiveCellRef *ref = ptr.get(); - - const std::string &model = ref->base->model; assert (ref->base != NULL); if(!model.empty()){ physics.insertObjectPhysics(ptr, "meshes\\" + model); } - } std::string Ingredient::getName (const MWWorld::Ptr& ptr) const diff --git a/apps/openmw/mwclass/ingredient.hpp b/apps/openmw/mwclass/ingredient.hpp index 47bd1a9e5..6c7409665 100644 --- a/apps/openmw/mwclass/ingredient.hpp +++ b/apps/openmw/mwclass/ingredient.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_INGREDIENT_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/light.cpp b/apps/openmw/mwclass/light.cpp index 3890899b0..2c50472ac 100644 --- a/apps/openmw/mwclass/light.cpp +++ b/apps/openmw/mwclass/light.cpp @@ -12,6 +12,8 @@ #include "../mwsound/soundmanager.hpp" +#include "../mwrender/objects.hpp" + #include "containerutil.hpp" namespace MWClass @@ -23,7 +25,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/light.hpp b/apps/openmw/mwclass/light.hpp index 34421ff51..7df82ae5d 100644 --- a/apps/openmw/mwclass/light.hpp +++ b/apps/openmw/mwclass/light.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_LIGHT_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/lockpick.cpp b/apps/openmw/mwclass/lockpick.cpp index 636a8f0be..67756f23c 100644 --- a/apps/openmw/mwclass/lockpick.cpp +++ b/apps/openmw/mwclass/lockpick.cpp @@ -8,6 +8,8 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" + #include "containerutil.hpp" namespace MWClass @@ -19,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/lockpick.hpp b/apps/openmw/mwclass/lockpick.hpp index c5f1539b4..074a07c93 100644 --- a/apps/openmw/mwclass/lockpick.hpp +++ b/apps/openmw/mwclass/lockpick.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_LOCKPICK_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index a2642d8d5..81e018d96 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -8,6 +8,8 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" + #include "containerutil.hpp" namespace MWClass @@ -19,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/misc.hpp b/apps/openmw/mwclass/misc.hpp index 36ee2c1b2..cb1858315 100644 --- a/apps/openmw/mwclass/misc.hpp +++ b/apps/openmw/mwclass/misc.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_MISC_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index f3f5ca597..d94920041 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -17,6 +17,7 @@ #include "../mwworld/environment.hpp" #include "../mwworld/world.hpp" #include "../mwworld/containerstore.hpp" +#include "../mwworld/customdata.hpp" namespace { diff --git a/apps/openmw/mwclass/npc.hpp b/apps/openmw/mwclass/npc.hpp index 63f5c42dd..bb9b131c9 100644 --- a/apps/openmw/mwclass/npc.hpp +++ b/apps/openmw/mwclass/npc.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_NPC_H #include "../mwworld/class.hpp" -#include "../mwworld/customdata.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/potion.cpp b/apps/openmw/mwclass/potion.cpp index 86d1e2a98..08047a2e8 100644 --- a/apps/openmw/mwclass/potion.cpp +++ b/apps/openmw/mwclass/potion.cpp @@ -8,6 +8,7 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" #include "containerutil.hpp" @@ -20,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/potion.hpp b/apps/openmw/mwclass/potion.hpp index 85678121f..e1a54db3c 100644 --- a/apps/openmw/mwclass/potion.hpp +++ b/apps/openmw/mwclass/potion.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_POTION_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/probe.hpp b/apps/openmw/mwclass/probe.hpp index d7b9df738..287dd0475 100644 --- a/apps/openmw/mwclass/probe.hpp +++ b/apps/openmw/mwclass/probe.hpp @@ -3,7 +3,6 @@ #include "../mwworld/class.hpp" - namespace MWClass { class Probe : public MWWorld::Class diff --git a/apps/openmw/mwclass/repair.cpp b/apps/openmw/mwclass/repair.cpp index f8755b2eb..79c18d426 100644 --- a/apps/openmw/mwclass/repair.cpp +++ b/apps/openmw/mwclass/repair.cpp @@ -8,6 +8,8 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" + #include "containerutil.hpp" namespace MWClass @@ -19,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/repair.hpp b/apps/openmw/mwclass/repair.hpp index 1e0ea5178..174197d9a 100644 --- a/apps/openmw/mwclass/repair.hpp +++ b/apps/openmw/mwclass/repair.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_REPAIR_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/static.cpp b/apps/openmw/mwclass/static.cpp index 946da311d..fbd96182f 100644 --- a/apps/openmw/mwclass/static.cpp +++ b/apps/openmw/mwclass/static.cpp @@ -5,6 +5,7 @@ #include "../mwworld/ptr.hpp" +#include "../mwrender/objects.hpp" namespace MWClass { @@ -15,7 +16,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/static.hpp b/apps/openmw/mwclass/static.hpp index be3fdb180..a4b1d8c54 100644 --- a/apps/openmw/mwclass/static.hpp +++ b/apps/openmw/mwclass/static.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_STATIC_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass { diff --git a/apps/openmw/mwclass/weapon.cpp b/apps/openmw/mwclass/weapon.cpp index 1fbd21f7c..f136aaccd 100644 --- a/apps/openmw/mwclass/weapon.cpp +++ b/apps/openmw/mwclass/weapon.cpp @@ -8,6 +8,7 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwrender/objects.hpp" #include "containerutil.hpp" @@ -20,7 +21,7 @@ namespace MWClass assert (ref->base != NULL); const std::string &model = ref->base->model; - + if (!model.empty()) { MWRender::Objects& objects = renderingInterface.getObjects(); diff --git a/apps/openmw/mwclass/weapon.hpp b/apps/openmw/mwclass/weapon.hpp index 79bc4d4de..84c633ab3 100644 --- a/apps/openmw/mwclass/weapon.hpp +++ b/apps/openmw/mwclass/weapon.hpp @@ -2,7 +2,6 @@ #define GAME_MWCLASS_WEAPON_H #include "../mwworld/class.hpp" -#include "../mwrender/objects.hpp" namespace MWClass {