Browse Source

Remove old AnimatedSprite2D and Animation2D.h.

aster2013 11 years ago
parent
commit
53351462ce

+ 0 - 2
Bin/Data/Scripts/Editor/AttributeEditor.as

@@ -884,7 +884,6 @@ void InitResourcePicker()
     Array<String> textureFilters = {"*.dds", "*.png", "*.jpg", "*.bmp", "*.tga", "*.ktx", "*.pvr"};
     Array<String> materialFilters = {"*.xml", "*.material"};
     Array<String> pexFilters = {"*.pex"};
-    Array<String> anmFilters = {"*.anm"};
     Array<String> anmSetFilters = {"*.scml"};
     resourcePickers.Push(ResourcePicker("Animation", "*.ani", ACTION_PICK | ACTION_TEST));
     resourcePickers.Push(ResourcePicker("Font", fontFilters));
@@ -899,7 +898,6 @@ void InitResourcePicker()
     resourcePickers.Push(ResourcePicker("TextureCube", "*.xml"));
     resourcePickers.Push(ResourcePicker("XMLFile", "*.xml"));
     resourcePickers.Push(ResourcePicker("Sprite2D", textureFilters, ACTION_PICK | ACTION_OPEN));
-    resourcePickers.Push(ResourcePicker("Animation2D", anmFilters, ACTION_PICK | ACTION_OPEN));
     resourcePickers.Push(ResourcePicker("ParticleEffect2D", pexFilters, ACTION_PICK | ACTION_OPEN));
     resourcePickers.Push(ResourcePicker("XAnimationSet2D", anmSetFilters, ACTION_PICK | ACTION_OPEN));
 }

+ 0 - 4
Bin/Data/UI/EditorIcons.xml

@@ -251,10 +251,6 @@
         <attribute name="Texture" value="Texture2D;Textures/Editor/EditorIcons.png" />
         <attribute name="Image Rect" value="48 16 62 30" />
     </element>
-    <element type="AnimatedSprite2D">
-        <attribute name="Texture" value="Texture2D;Textures/Editor/EditorIcons.png" />
-        <attribute name="Image Rect" value="48 16 62 30" />
-    </element>
     <element type="XAnimatedSprite2D">
         <attribute name="Texture" value="Texture2D;Textures/Editor/EditorIcons.png" />
         <attribute name="Image Rect" value="48 16 62 30" />

+ 0 - 23
Source/Engine/LuaScript/pkgs/Urho2D/AnimatedSprite2D.pkg

@@ -1,23 +0,0 @@
-$#include "AnimatedSprite2D.h"
-
-enum CycleMode
-{
-    CM_LOOP = 0,
-    CM_CLAMP,
-    CM_PINGPONG,
-};
-
-class AnimatedSprite2D : public StaticSprite2D
-{
-    void SetSpeed(float speed);
-    void SetCycleMode(CycleMode cycleMode);
-    void SetAnimation(Animation2D* animation);
-
-    float GetSpeed() const;
-    CycleMode GetCycleMode() const;
-    Animation2D* GetAnimation() const;
-
-    tolua_property__get_set float speed;
-    tolua_property__get_set CycleMode cycleMode;
-    tolua_property__get_set Animation2D* animation;
-};

+ 0 - 12
Source/Engine/LuaScript/pkgs/Urho2D/Animation2D.pkg

@@ -1,12 +0,0 @@
-$#include "Animation2D.h"
-
-class Animation2D : public Resource
-{
-    float GetTotalTime() const;
-    unsigned GetNumFrames() const;
-    Sprite2D* GetFrameSprite(unsigned index) const;
-    Sprite2D* GetFrameSpriteByTime(float time) const;
-    
-    tolua_readonly tolua_property__get_set float totalTime;
-    tolua_readonly tolua_property__get_set unsigned numFrames;
-};

+ 0 - 2
Source/Engine/LuaScript/pkgs/Urho2DLuaAPI.pkg

@@ -2,8 +2,6 @@ $pfile "Urho2D/Sprite2D.pkg"
 $pfile "Urho2D/SpriteSheet2D.pkg"
 $pfile "Urho2D/Drawable2D.pkg"
 $pfile "Urho2D/StaticSprite2D.pkg"
-$pfile "Urho2D/Animation2D.pkg"
-$pfile "Urho2D/AnimatedSprite2D.pkg"
 $pfile "Urho2D/ParticleEffect2D.pkg"
 $pfile "Urho2D/ParticleEmitter2D.pkg"
 $pfile "Urho2D/XAnimation2D.pkg"

+ 0 - 29
Source/Engine/Script/Urho2DAPI.cpp

@@ -22,8 +22,6 @@
 
 #include "Precompiled.h"
 #include "APITemplates.h"
-#include "AnimatedSprite2D.h"
-#include "Animation2D.h"
 #include "CollisionBox2D.h"
 #include "CollisionChain2D.h"
 #include "CollisionCircle2D.h"
@@ -125,31 +123,6 @@ static void RegisterStaticSprite2D(asIScriptEngine* engine)
     RegisterStaticSprite2D<StaticSprite2D>(engine, "StaticSprite2D");
 }
 
-static void RegisterAnimation2D(asIScriptEngine* engine)
-{
-    RegisterResource<Animation2D>(engine, "Animation2D");
-    engine->RegisterObjectMethod("Animation2D", "float get_totalTime() const", asMETHOD(Animation2D, GetTotalTime), asCALL_THISCALL);
-    engine->RegisterObjectMethod("Animation2D", "uint get_numFrames() const", asMETHOD(Animation2D, GetNumFrames), asCALL_THISCALL);
-    engine->RegisterObjectMethod("Animation2D", "Sprite@+ GetFrameSprite(uint) const", asMETHOD(Animation2D, GetFrameSprite), asCALL_THISCALL);
-    engine->RegisterObjectMethod("Animation2D", "Sprite@+ GetFrameSpriteByTime(float) const", asMETHOD(Animation2D, GetFrameSpriteByTime), asCALL_THISCALL);
-}
-
-static void RegisterAnimatedSprite2D(asIScriptEngine* engine)
-{
-    engine->RegisterEnum("CycleMode");
-    engine->RegisterEnumValue("CycleMode", "CM_LOOP", CM_LOOP);
-    engine->RegisterEnumValue("CycleMode", "CM_CLAMP", CM_CLAMP);
-    engine->RegisterEnumValue("CycleMode", "CM_PINGPONG", CM_PINGPONG);
-
-    RegisterStaticSprite2D<AnimatedSprite2D>(engine, "AnimatedSprite2D");
-    engine->RegisterObjectMethod("AnimatedSprite2D", "void set_speed(float)", asMETHOD(AnimatedSprite2D, SetSpeed), asCALL_THISCALL);
-    engine->RegisterObjectMethod("AnimatedSprite2D", "float get_speed() const", asMETHOD(AnimatedSprite2D, GetSpeed), asCALL_THISCALL);
-    engine->RegisterObjectMethod("AnimatedSprite2D", "void set_cycleMode(CycleMode)", asMETHOD(AnimatedSprite2D, SetCycleMode), asCALL_THISCALL);
-    engine->RegisterObjectMethod("AnimatedSprite2D", "CycleMode get_cycleMode() const", asMETHOD(AnimatedSprite2D, GetCycleMode), asCALL_THISCALL);
-    engine->RegisterObjectMethod("AnimatedSprite2D", "void set_animation(Animation2D@+)", asMETHOD(AnimatedSprite2D, SetAnimation), asCALL_THISCALL);
-    engine->RegisterObjectMethod("AnimatedSprite2D", "Animation2D@+ get_animation() const", asMETHOD(AnimatedSprite2D, GetAnimation), asCALL_THISCALL);
-}
-
 static void RegisterParticleEffect2D(asIScriptEngine* engine)
 {
     engine->RegisterEnum("EmitterType2D");
@@ -629,8 +602,6 @@ void RegisterUrho2DAPI(asIScriptEngine* engine)
     RegisterSpriteSheet2D(engine);
     RegisterDrawable2D(engine);
     RegisterStaticSprite2D(engine);
-    RegisterAnimation2D(engine);
-    RegisterAnimatedSprite2D(engine);
     RegisterParticleEffect2D(engine);
     RegisterParticleEmitter2D(engine);
     RegisterXAnimation2D(engine);

+ 0 - 191
Source/Engine/Urho2D/AnimatedSprite2D.cpp

@@ -1,191 +0,0 @@
-//
-// Copyright (c) 2008-2014 the Urho3D project.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-
-#include "Precompiled.h"
-#include "AnimatedSprite2D.h"
-#include "Animation2D.h"
-#include "Context.h"
-#include "ResourceCache.h"
-#include "Scene.h"
-#include "SceneEvents.h"
-#include "Sprite2D.h"
-#include "Texture2D.h"
-
-#include "DebugNew.h"
-
-namespace Urho3D
-{
-
-extern const char* URHO2D_CATEGORY;
-
-const char* cycleModeNames[] =
-{
-    "Loop",
-    "Clamp",
-    "Pingpong",
-    0
-};
-
-template<> CycleMode Variant::Get<CycleMode>() const
-{
-    return (CycleMode)GetInt();
-}
-
-AnimatedSprite2D::AnimatedSprite2D(Context* context) :
-    StaticSprite2D(context),
-    speed_(1.0f),
-    cycleMode_(CM_LOOP),
-    animationTime_(0.0f),
-    animationTotalTime_(1.0f)
-{
-}
-
-AnimatedSprite2D::~AnimatedSprite2D()
-{
-}
-
-void AnimatedSprite2D::RegisterObject(Context* context)
-{
-    context->RegisterFactory<AnimatedSprite2D>(URHO2D_CATEGORY);
-    ACCESSOR_ATTRIBUTE(AnimatedSprite2D, VAR_FLOAT, "Speed", GetSpeed, SetSpeed, float, 1.0f, AM_DEFAULT);
-    ENUM_ACCESSOR_ATTRIBUTE(AnimatedSprite2D, "Cycle Mode", GetCycleMode, SetCycleMode, CycleMode, cycleModeNames, 0, AM_DEFAULT);
-    ACCESSOR_ATTRIBUTE(AnimatedSprite2D, VAR_RESOURCEREF, "Animation", GetAnimationAttr, SetAnimationAttr, ResourceRef, ResourceRef(Animation2D::GetTypeStatic()), AM_DEFAULT);
-    COPY_BASE_ATTRIBUTES(AnimatedSprite2D, StaticSprite2D);
-}
-
-void AnimatedSprite2D::OnSetEnabled()
-{
-    StaticSprite2D::OnSetEnabled();
-
-    Scene* scene = GetScene();
-    if (scene)
-    {
-        if (IsEnabledEffective())
-            SubscribeToEvent(scene, E_SCENEPOSTUPDATE, HANDLER(AnimatedSprite2D, HandleScenePostUpdate));
-        else
-            UnsubscribeFromEvent(scene, E_SCENEPOSTUPDATE);
-    }
-}
-
-void AnimatedSprite2D::SetSpeed(float speed)
-{
-    speed_ = speed;
-    MarkNetworkUpdate();
-}
-
-void AnimatedSprite2D::SetCycleMode(CycleMode cycleMode)
-{
-    cycleMode_ = cycleMode;
-    MarkNetworkUpdate();
-}
-
-void AnimatedSprite2D::SetAnimation(Animation2D* animation)
-{
-    animationTime_ = 0.0f;
-
-    if (animation_ == animation)
-        return;
-
-    if (animation_)
-        SetSprite(0);
-
-    animation_ = animation;
-
-    if (animation_)
-    {
-        SetSprite(animation_->GetFrameSprite(0));
-        animationTotalTime_ = animation_->GetTotalTime();
-    }
-
-    MarkNetworkUpdate();
-}
-
-Animation2D* AnimatedSprite2D::GetAnimation() const
-{
-    return animation_;
-}
-
-void AnimatedSprite2D::SetAnimationAttr(ResourceRef value)
-{
-    materialUpdatePending_ = true;
-
-    ResourceCache* cache = GetSubsystem<ResourceCache>();
-    SetAnimation(cache->GetResource<Animation2D>(value.name_));
-}
-
-Urho3D::ResourceRef AnimatedSprite2D::GetAnimationAttr() const
-{
-    return GetResourceRef(animation_, Animation2D::GetTypeStatic());
-}
-
-void AnimatedSprite2D::OnNodeSet(Node* node)
-{
-    StaticSprite2D::OnNodeSet(node);
-
-    if (node)
-    {
-        Scene* scene = GetScene();
-        if (scene && IsEnabledEffective())
-            SubscribeToEvent(scene, E_SCENEPOSTUPDATE, HANDLER(AnimatedSprite2D, HandleScenePostUpdate));
-    }
-}
-
-void AnimatedSprite2D::HandleScenePostUpdate(StringHash eventType, VariantMap& eventData)
-{
-    using namespace ScenePostUpdate;
-    float timeStep = eventData[P_TIMESTEP].GetFloat();
-    animationTime_ += timeStep * speed_;
-
-    if (!animation_)
-        return;
-
-    float time;
-
-    switch (cycleMode_)
-    {
-    case CM_LOOP:
-        time = fmodf(animationTime_, animationTotalTime_);
-        if (time < 0.0f)
-            time += animationTotalTime_;
-        break;
-
-    case CM_CLAMP:
-        time = Clamp(animationTime_, 0.0f, animationTotalTime_);
-        break;
-
-    case CM_PINGPONG:
-        {
-            float doubleTotalTime = animationTotalTime_ * 2.0f;
-            float fract = fmodf(animationTime_, doubleTotalTime);
-            time = (fract < animationTotalTime_) ? fract : doubleTotalTime - fract;
-        }
-        break;
-    }
-
-    Sprite2D* sprite = animation_->GetFrameSpriteByTime(time);
-    if (GetSprite() != sprite)
-        SetSprite(sprite);
-
-    MarkForUpdate();
-}
-
-}

+ 0 - 96
Source/Engine/Urho2D/AnimatedSprite2D.h

@@ -1,96 +0,0 @@
-//
-// Copyright (c) 2008-2014 the Urho3D project.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-
-#pragma once
-
-#include "StaticSprite2D.h"
-
-namespace Urho3D
-{
-
-class Animation2D;
-
-/// Cycle mode.
-enum CycleMode
-{
-    /// Loop mode.
-    CM_LOOP = 0,
-    /// Clamp mode.
-    CM_CLAMP,
-    /// Pingpong Mode.
-    CM_PINGPONG,
-};
-
-/// Animated sprite component.
-class URHO3D_API AnimatedSprite2D : public StaticSprite2D
-{
-    OBJECT(AnimatedSprite2D);
-
-public:
-    /// Construct.
-    AnimatedSprite2D(Context* context);
-    /// Destruct.
-    ~AnimatedSprite2D();
-    /// Register object factory.
-    static void RegisterObject(Context* context);
-
-    /// Handle enabled/disabled state change.
-    virtual void OnSetEnabled();
-
-    /// Set speed.
-    void SetSpeed(float speed);
-    /// Set cycle mode.
-    void SetCycleMode(CycleMode cycleMode);
-    /// Set animation.
-    void SetAnimation(Animation2D* animation);
-
-    /// Return speed.
-    float GetSpeed() const { return speed_; }
-    /// Return cycle mode.
-    CycleMode GetCycleMode() const { return cycleMode_; }
-    /// Return Animation.
-    Animation2D* GetAnimation() const;
-
-    /// Set animation attr.
-    void SetAnimationAttr(ResourceRef value);
-    /// Return animation attr.
-    ResourceRef GetAnimationAttr() const;
-
-protected:
-    /// Handle node being assigned.
-    virtual void OnNodeSet(Node* node);
-    /// Handle scene post update.
-    void HandleScenePostUpdate(StringHash eventType, VariantMap& eventData);
-
-    /// Speed.
-    float speed_;
-    /// Cycle mode.
-    CycleMode cycleMode_;
-    /// Animation.
-    SharedPtr<Animation2D> animation_;
-    /// Animation time.
-    float animationTime_;
-    /// Animation total time.
-    float animationTotalTime_;
-};
-
-}

+ 0 - 181
Source/Engine/Urho2D/Animation2D.cpp

@@ -1,181 +0,0 @@
-//
-// Copyright (c) 2008-2014 the Urho3D project.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-
-#include "Precompiled.h"
-#include "Animation2D.h"
-#include "Context.h"
-#include "Deserializer.h"
-#include "FileSystem.h"
-#include "Log.h"
-#include "ResourceCache.h"
-#include "Serializer.h"
-#include "Sprite2D.h"
-#include "SpriteSheet2D.h"
-#include "XMLFile.h"
-
-#include "DebugNew.h"
-
-namespace Urho3D
-{
-
-Animation2D::Animation2D(Context* context) :
-    Resource(context)
-{
-
-}
-
-Animation2D::~Animation2D()
-{
-
-}
-
-void Animation2D::RegisterObject(Context* context)
-{
-    context->RegisterFactory<Animation2D>();
-}
-
-bool Animation2D::Load(Deserializer& source)
-{
-    frameEndTimes_.Clear();
-    frameSprites_.Clear();
-
-    SharedPtr<XMLFile> xmlFile(new XMLFile(context_));
-    if(!xmlFile->Load(source))
-    {
-        LOGERROR("Could not load animation");
-        return false;
-    }
-
-    SetMemoryUse(source.GetSize());
-
-    XMLElement rootElem = xmlFile->GetRoot("animation");
-    if (!rootElem)
-    {
-        LOGERROR("Invalid animation");
-        return false;
-    }
-
-    ResourceCache* cache = GetSubsystem<ResourceCache>();
-
-    XMLElement keyFrameElem = rootElem.GetChild("frame");
-    if (!keyFrameElem)
-    {
-        LOGERROR("Could not found key frame");
-        return false;
-    }
-
-    float endTime = 0.0f;
-
-    while (keyFrameElem)
-    {
-        endTime += keyFrameElem.GetFloat("duration");
-        frameEndTimes_.Push(endTime);
-
-        SharedPtr<Sprite2D> sprite;
-        Vector<String> names = keyFrameElem.GetAttribute("sprite").Split('@');
-        if (names.Size() == 1)
-            sprite = cache->GetResource<Sprite2D>(names[0]);
-        else if (names.Size() == 2)
-        {
-            SpriteSheet2D* spriteSheet = cache->GetResource<SpriteSheet2D>(names[0], false);
-            // If sprite sheet not found, try get in current directory
-            if (!spriteSheet)
-                spriteSheet = cache->GetResource<SpriteSheet2D>(GetParentPath(GetName()) + names[0]);
-
-            if (!spriteSheet)
-            {
-                LOGERROR("Could not get sprite speet");
-                return false;
-            }
-
-            sprite = spriteSheet->GetSprite(names[1]);
-        }
-
-        if (!sprite)
-        {
-            LOGERROR("Could not get sprite");
-            return false;
-        }
-
-        frameSprites_.Push(sprite);
-        keyFrameElem = keyFrameElem.GetNext("frame");
-    }
-
-    return true;
-}
-
-bool Animation2D::Save(Serializer& dest) const
-{
-    XMLFile xmlFile(context_);
-    XMLElement rootElem = xmlFile.CreateRoot("animation");
-    
-    float endTime = 0.0f;
-    for (unsigned i = 0; i < frameSprites_.Size(); ++i)
-    {
-        XMLElement frameElem = rootElem.CreateChild("frame");
-        frameElem.SetFloat("duration", frameEndTimes_[i] - endTime);
-        endTime = frameEndTimes_[i];
-
-        Sprite2D* sprite = frameSprites_[i];
-        SpriteSheet2D* spriteSheet = sprite->GetSpriteSheet();
-        if (!spriteSheet)
-            frameElem.SetString("sprite", sprite->GetName());
-        else
-            frameElem.SetString("sprite", spriteSheet->GetName() + "@" + sprite->GetName());
-    }
-
-    return xmlFile.Save(dest);
-}
-
-float Animation2D::GetTotalTime() const
-{
-    return frameEndTimes_.Empty() ? 0.0f : frameEndTimes_.Back();
-}
-
-unsigned Animation2D::GetNumFrames() const
-{
-    return frameSprites_.Size();
-}
-
-Sprite2D* Animation2D::GetFrameSprite(unsigned index) const
-{
-    if (index < frameSprites_.Size())
-        return frameSprites_[index];
-
-    return 0;
-}
-
-Sprite2D* Animation2D::GetFrameSpriteByTime(float time) const
-{
-    if (time < 0.0f)
-        return 0;
-
-    for (unsigned i = 0; i < frameEndTimes_.Size(); ++i)
-    {
-        if (time <= frameEndTimes_[i])
-            return frameSprites_[i];
-    }
-
-    return 0;
-}
-
-}

+ 0 - 66
Source/Engine/Urho2D/Animation2D.h

@@ -1,66 +0,0 @@
-//
-// Copyright (c) 2008-2014 the Urho3D project.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-
-#pragma once
-
-#include "Resource.h"
-
-namespace Urho3D
-{
-
-class Sprite2D;
-
-/// 2D animation.
-class URHO3D_API Animation2D : public Resource
-{
-    OBJECT(Animation2D);
-
-public:
-    /// Construct.
-    Animation2D(Context* context);
-    /// Destruct.
-    virtual ~Animation2D();
-    /// Register object factory.
-    static void RegisterObject(Context* context);
-
-    /// Load resource. Return true if successful.
-    virtual bool Load(Deserializer& source);
-    /// Save resource. Return true if successful.
-    virtual bool Save(Serializer& dest) const;
-
-    /// Return total time.
-    float GetTotalTime() const;
-    /// Return number of frames.
-    unsigned GetNumFrames() const;
-    /// Return Frame sprite.
-    Sprite2D* GetFrameSprite(unsigned index) const;
-    /// Return frame sprite by time.
-    Sprite2D* GetFrameSpriteByTime(float time) const;
-
-private:
-    /// Frame end times.
-    PODVector<float> frameEndTimes_;
-    /// Frame sprites.
-    Vector<SharedPtr<Sprite2D> > frameSprites_;
-};
-
-}

+ 0 - 4
Source/Engine/Urho2D/Urho2D.cpp

@@ -21,8 +21,6 @@
 //
 
 #include "Precompiled.h"
-#include "AnimatedSprite2D.h"
-#include "Animation2D.h"
 #include "CollisionBox2D.h"
 #include "CollisionChain2D.h"
 #include "CollisionCircle2D.h"
@@ -70,8 +68,6 @@ void RegisterUrho2DLibrary(Context* context)
     // Must register objects from base to derived order
     Drawable2D::RegisterObject(context);
     StaticSprite2D::RegisterObject(context);
-    AnimatedSprite2D::RegisterObject(context);
-    Animation2D::RegisterObject(context);
     ParticleEffect2D::RegisterObject(context);
     ParticleEmitter2D::RegisterObject(context);
     XAnimationSet2D::RegisterObject(context);