Commit 8165f844 authored by hybrid's avatar hybrid

Slight cleanup, bringing some things towards Irrlicht.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3696 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 2463db9b
This diff is collapsed.
...@@ -223,7 +223,7 @@ namespace scene ...@@ -223,7 +223,7 @@ namespace scene
} PACK_STRUCT mstudiopivot_t; } PACK_STRUCT mstudiopivot_t;
// attachment // attachment
struct SHalfelifeAttachment struct SHalflifeAttachment
{ {
c8 name[32]; c8 name[32];
s32 type; s32 type;
...@@ -238,7 +238,7 @@ namespace scene ...@@ -238,7 +238,7 @@ namespace scene
} PACK_STRUCT; } PACK_STRUCT;
// animation frames // animation frames
union SHalfelifeAnimationFrame union SHalflifeAnimationFrame
{ {
struct { struct {
u8 valid; u8 valid;
...@@ -487,7 +487,7 @@ namespace scene ...@@ -487,7 +487,7 @@ namespace scene
public: public:
//! constructor //! constructor
CAnimatedMeshHalfLife( ); CAnimatedMeshHalfLife();
//! destructor //! destructor
virtual ~CAnimatedMeshHalfLife(); virtual ~CAnimatedMeshHalfLife();
...@@ -539,7 +539,6 @@ namespace scene ...@@ -539,7 +539,6 @@ namespace scene
//! return a Mesh per frame //! return a Mesh per frame
SMesh MeshIPol; SMesh MeshIPol;
ISceneManager *SceneManager; ISceneManager *SceneManager;
SHalflifeHeader *Header; SHalflifeHeader *Header;
...@@ -548,7 +547,6 @@ namespace scene ...@@ -548,7 +547,6 @@ namespace scene
SHalflifeHeader *AnimationHeader[32]; // sequences named model01.mdl, model02.mdl SHalflifeHeader *AnimationHeader[32]; // sequences named model01.mdl, model02.mdl
void initData (); void initData ();
void freeModel ();
SHalflifeHeader * loadModel( io::IReadFile* file, const io::path &filename ); SHalflifeHeader * loadModel( io::IReadFile* file, const io::path &filename );
bool postLoadModel( const io::path &filename ); bool postLoadModel( const io::path &filename );
...@@ -556,13 +554,12 @@ namespace scene ...@@ -556,13 +554,12 @@ namespace scene
f32 CurrentFrame; // Current Frame f32 CurrentFrame; // Current Frame
#define MOUTH_CONTROLLER 4 #define MOUTH_CONTROLLER 4
u8 BoneController[4 + 1 ]; // bone controllers + mouth position u8 BoneController[4 + 1 ]; // bone controllers + mouth position
u8 Blending[2]; // animation blending u8 Blending[2]; // animation blending
f32 SetController( s32 controllerIndex, f32 value ); f32 SetController( s32 controllerIndex, f32 value );
u32 SkinGroupSelection; // skin group selection
u32 SkinGroupSelection; // skin group selection
u32 SetSkin( u32 value ); u32 SetSkin( u32 value );
void initModel (); void initModel ();
...@@ -570,7 +567,6 @@ namespace scene ...@@ -570,7 +567,6 @@ namespace scene
void ExtractBbox( s32 sequence, core::aabbox3df &box ); void ExtractBbox( s32 sequence, core::aabbox3df &box );
void setUpBones (); void setUpBones ();
SHalflifeAnimOffset * getAnim( SHalflifeSequence *seq ); SHalflifeAnimOffset * getAnim( SHalflifeSequence *seq );
void slerpBones( vec4_hl q1[], vec3_hl pos1[], vec4_hl q2[], vec3_hl pos2[], f32 s ); void slerpBones( vec4_hl q1[], vec3_hl pos1[], vec4_hl q2[], vec3_hl pos2[], f32 s );
...@@ -578,8 +574,8 @@ namespace scene ...@@ -578,8 +574,8 @@ namespace scene
vec4_hl BoneAdj; vec4_hl BoneAdj;
void calcBoneAdj(); void calcBoneAdj();
void calcBoneQuaternion( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *q ) const; void calcBoneQuaternion(const s32 frame, const SHalflifeBone *bone, SHalflifeAnimOffset *anim, const u32 j, f32& angle1, f32& angle2) const;
void calcBonePosition( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *pos ) const; void calcBonePosition(const s32 frame, f32 s, const SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *pos ) const;
void buildVertices (); void buildVertices ();
...@@ -587,7 +583,6 @@ namespace scene ...@@ -587,7 +583,6 @@ namespace scene
#define HL_TEXTURE_ATLAS #define HL_TEXTURE_ATLAS
#ifdef HL_TEXTURE_ATLAS #ifdef HL_TEXTURE_ATLAS
STextureAtlas TextureAtlas; STextureAtlas TextureAtlas;
video::ITexture *TextureMaster; video::ITexture *TextureMaster;
...@@ -605,13 +600,14 @@ namespace scene ...@@ -605,13 +600,14 @@ namespace scene
CHalflifeMDLMeshFileLoader( scene::ISceneManager* smgr ); CHalflifeMDLMeshFileLoader( scene::ISceneManager* smgr );
//! returns true if the file maybe is able to be loaded by this class //! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".bsp") /** based on the file extension (e.g. ".bsp") */
virtual bool isALoadableFileExtension(const io::path& filename) const; virtual bool isALoadableFileExtension(const io::path& filename) const;
//! creates/loads an animated mesh from the file. //! creates/loads an animated mesh from the file.
//! \return Pointer to the created mesh. Returns 0 if loading failed. /** \return Pointer to the created mesh. Returns 0 if loading failed.
//! If you no longer need the mesh, you should call IAnimatedMesh::drop(). If you no longer need the mesh, you should call IAnimatedMesh::drop().
//! See IReferenceCounted::drop() for more information. See IReferenceCounted::drop() for more information.
*/
virtual IAnimatedMesh* createMesh(io::IReadFile* file); virtual IAnimatedMesh* createMesh(io::IReadFile* file);
private: private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment