mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-24 09:48:46 +00:00
Fixed: #961 Allow use of UAnimationSet without activate headers optimization
This commit is contained in:
parent
58bab79dad
commit
585fafd917
4 changed files with 8 additions and 9 deletions
|
@ -54,7 +54,7 @@ private:
|
|||
public:
|
||||
|
||||
/// Constructor
|
||||
CAnimationSetUser(CDriverUser *owner)
|
||||
CAnimationSetUser(CDriverUser *owner, bool headerOptim = true)
|
||||
{
|
||||
nlassert(owner);
|
||||
_Owner= owner;
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
nlassert((uint)UAnimationSet::NotFound == (uint)CAnimationSet::NotFound );
|
||||
|
||||
// create a smartptred animation set. Allow header compression
|
||||
_AnimationSet= new CAnimationSet(true);
|
||||
_AnimationSet= new CAnimationSet(headerOptim);
|
||||
}
|
||||
|
||||
/// Constructor
|
||||
|
|
|
@ -229,7 +229,7 @@ public:
|
|||
/// \name AnimationSet gestion.
|
||||
// @{
|
||||
/// Create an empty AnimationSet.
|
||||
virtual UAnimationSet *createAnimationSet();
|
||||
virtual UAnimationSet *createAnimationSet(bool headerOptim = true);
|
||||
/// Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found.
|
||||
virtual UAnimationSet *createAnimationSet(const std::string &animationSetFile);
|
||||
/// Delete a AnimationSet.
|
||||
|
|
|
@ -294,7 +294,7 @@ public:
|
|||
/// \name AnimationSet gestion.
|
||||
// @{
|
||||
/// Create an empty AnimationSet.
|
||||
virtual UAnimationSet *createAnimationSet() =0;
|
||||
virtual UAnimationSet *createAnimationSet(bool headerOptim = true) =0;
|
||||
/// Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found.
|
||||
virtual UAnimationSet *createAnimationSet(const std::string &animationSetFile) =0;
|
||||
/// Delete a AnimationSet. NB: actually, this animation set is internally deleted only when no more UPlayList use it.
|
||||
|
|
|
@ -135,17 +135,16 @@ UMaterial CDriverUser::createMaterial()
|
|||
// ***************************************************************************
|
||||
void CDriverUser::deleteMaterial(UMaterial &umat)
|
||||
{
|
||||
|
||||
delete umat.getObjectPtr();
|
||||
umat.detach();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
UAnimationSet *CDriverUser::createAnimationSet()
|
||||
UAnimationSet *CDriverUser::createAnimationSet(bool headerOptim)
|
||||
{
|
||||
|
||||
return _AnimationSets.insert(new CAnimationSetUser(this));
|
||||
return _AnimationSets.insert(new CAnimationSetUser(this, headerOptim));
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
UAnimationSet *CDriverUser::createAnimationSet(const std::string &animationSetFile)
|
||||
{
|
||||
|
@ -157,10 +156,10 @@ UAnimationSet *CDriverUser::createAnimationSet(const std::string &animationSet
|
|||
f.open(path);
|
||||
return _AnimationSets.insert(new CAnimationSetUser(this, f));
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
void CDriverUser::deleteAnimationSet(UAnimationSet *animationSet)
|
||||
{
|
||||
|
||||
_AnimationSets.erase((CAnimationSetUser*)animationSet, "deleteAnimationSet(): Bad AnimationSet ptr");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue