mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-30 13:57:59 +03:00
more include cleanup (most removing Ogre.h)
This commit is contained in:
parent
87667ab57e
commit
c85aaafac2
25 changed files with 136 additions and 48 deletions
|
@ -25,8 +25,9 @@
|
|||
#define _NIF_DATA_H_
|
||||
|
||||
#include "controlled.hpp"
|
||||
#include <iostream>
|
||||
#include <Ogre.h>
|
||||
|
||||
#include <OgreQuaternion.h>
|
||||
#include <OgreVector3.h>
|
||||
|
||||
namespace Nif
|
||||
{
|
||||
|
@ -466,7 +467,7 @@ public:
|
|||
std::vector<std::vector<Ogre::Vector3> > getAdditionalVertices(){
|
||||
return additionalVertices;
|
||||
}
|
||||
|
||||
|
||||
void read(NIFFile *nif)
|
||||
{
|
||||
int morphCount = nif->getInt();
|
||||
|
@ -481,7 +482,7 @@ void read(NIFFile *nif)
|
|||
float z = nif->getFloat();
|
||||
initialVertices.push_back(Ogre::Vector3(x, y, z));
|
||||
}
|
||||
|
||||
|
||||
for(int i=1; i<morphCount; i++)
|
||||
{
|
||||
magic = nif->getInt();
|
||||
|
@ -543,8 +544,8 @@ class NiKeyframeData : public Record
|
|||
std::vector<Ogre::Vector3> tbcscale;
|
||||
int stype;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
void clone(NiKeyframeData c)
|
||||
{
|
||||
|
@ -559,11 +560,11 @@ public:
|
|||
|
||||
|
||||
translist1 = c.getTranslist1();
|
||||
translist2 = c.getTranslist2();
|
||||
translist2 = c.getTranslist2();
|
||||
translist3 = c.getTranslist3();
|
||||
|
||||
transtime = c.gettTime();
|
||||
|
||||
|
||||
bonename = c.getBonename();
|
||||
|
||||
|
||||
|
@ -611,7 +612,7 @@ public:
|
|||
Ogre::Quaternion quat = Ogre::Quaternion(Ogre::Real(w), Ogre::Real(x), Ogre::Real(y), Ogre::Real(z));
|
||||
quats.push_back(quat);
|
||||
rottime.push_back(time);
|
||||
//if(time == 0.0 || time > 355.5)
|
||||
//if(time == 0.0 || time > 355.5)
|
||||
// std::cout <<"Time:" << time << "W:" << w <<"X:" << x << "Y:" << y << "Z:" << z << "\n";
|
||||
}
|
||||
}
|
||||
|
@ -632,7 +633,7 @@ public:
|
|||
quats.push_back(quat);
|
||||
rottime.push_back(time);
|
||||
tbc.push_back(vec);
|
||||
//if(time == 0.0 || time > 355.5)
|
||||
//if(time == 0.0 || time > 355.5)
|
||||
// std::cout <<"Time:" << time << "W:" << w <<"X:" << x << "Y:" << y << "Z:" << z << "\n";
|
||||
}
|
||||
|
||||
|
@ -661,7 +662,7 @@ public:
|
|||
|
||||
// Then translation
|
||||
count = nif->getInt();
|
||||
|
||||
|
||||
if(count)
|
||||
{
|
||||
ttype = nif->getInt();
|
||||
|
@ -700,7 +701,7 @@ public:
|
|||
translist2.push_back(trans2);
|
||||
translist3.push_back(trans3);
|
||||
}
|
||||
|
||||
|
||||
//nif->getFloatLen(count*10); // trans1 + forward + backward
|
||||
}
|
||||
else if(ttype == 3){
|
||||
|
@ -729,12 +730,12 @@ public:
|
|||
{
|
||||
stype = nif->getInt();
|
||||
|
||||
|
||||
|
||||
for(int i = 0; i < count; i++){
|
||||
|
||||
|
||||
|
||||
|
||||
//int size = 0;
|
||||
if(stype >= 1 && stype < 4)
|
||||
if(stype >= 1 && stype < 4)
|
||||
{
|
||||
float time = nif->getFloat();
|
||||
float scale = nif->getFloat();
|
||||
|
@ -759,10 +760,10 @@ public:
|
|||
|
||||
//size = 5; // 1 + tbc
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
stype = 0;
|
||||
}
|
||||
int getRtype(){
|
||||
|
|
|
@ -25,6 +25,14 @@
|
|||
|
||||
#include "ogre_nif_loader.hpp"
|
||||
|
||||
#include <OgreMaterialManager.h>
|
||||
#include <OgreMeshManager.h>
|
||||
#include <OgreHardwareBufferManager.h>
|
||||
#include <OgreSkeletonManager.h>
|
||||
#include <OgreTechnique.h>
|
||||
#include <OgreSubMesh.h>
|
||||
#include <OgreRoot.h>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
#include <components/nifoverrides/nifoverrides.hpp>
|
||||
|
||||
|
@ -230,7 +238,7 @@ void NIFLoader::createMaterial(const String &name,
|
|||
//tech->setSchemeName("blahblah");
|
||||
Pass* pass = tech->createPass();
|
||||
pass->setVertexProgram("Ogre/BasicVertexPrograms/AmbientOneTexture");*/
|
||||
|
||||
|
||||
|
||||
// This assigns the texture to this material. If the texture name is
|
||||
// a file name, and this file exists (in a resource directory), it
|
||||
|
@ -478,7 +486,7 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
|||
bind->setBinding(nextBuf++, vbuf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Vertex colors
|
||||
if (data->colors.length)
|
||||
{
|
||||
|
@ -795,7 +803,7 @@ void NIFLoader::handleNiTriShape(NiTriShape *shape, int flags, BoundsFinder &bou
|
|||
std::list<VertexBoneAssignment> vertexBoneAssignments;
|
||||
|
||||
Nif::NiTriShapeCopy copy = shape->clone();
|
||||
|
||||
|
||||
if(!shape->controller.empty())
|
||||
{
|
||||
Nif::Controller* cont = shape->controller.getPtr();
|
||||
|
@ -984,7 +992,7 @@ void NIFLoader::handleNiTriShape(NiTriShape *shape, int flags, BoundsFinder &bou
|
|||
}
|
||||
if(!mSkel.isNull() ){
|
||||
int boneIndex;
|
||||
|
||||
|
||||
boneIndex = mSkel->getNumBones() - 1;
|
||||
for(int i = 0; i < numVerts; i++){
|
||||
VertexBoneAssignment vba;
|
||||
|
@ -1388,7 +1396,7 @@ void NIFLoader::loadResource(Resource *resource)
|
|||
vba.boneIndex = boneIndex;
|
||||
vba.vertexIndex = 0;
|
||||
vba.weight = 1;
|
||||
|
||||
|
||||
|
||||
(*iter)->addBoneAssignment(vba);
|
||||
}
|
||||
|
|
|
@ -26,12 +26,10 @@
|
|||
|
||||
#include <OgreResource.h>
|
||||
#include <OgreMesh.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <Ogre.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <libs/mangle/vfs/servers/ogre_vfs.hpp>
|
||||
#include "../nif/nif_file.hpp"
|
||||
|
@ -45,7 +43,6 @@
|
|||
#include <vector>
|
||||
#include <list>
|
||||
// For warning messages
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
using namespace boost::algorithm;
|
||||
|
||||
|
@ -193,7 +190,7 @@ class NIFLoader : Ogre::ManualResourceLoader
|
|||
std::vector<Nif::NiTriShapeCopy> mS;
|
||||
std::vector<Ogre::SubMesh*> needBoneAssignments;
|
||||
bool inTheSkeletonTree;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue