From 7fa6c6209f5079bc23482aacacef973df7107968 Mon Sep 17 00:00:00 2001
From: emb <>
Date: Wed, 25 Nov 2015 07:08:02 -0600
Subject: [PATCH] Adding animations library (incomplete)
---
RetroFE/Source/CMakeLists.txt | 9 ++
RetroFE/Source/Graphics/Animate/Animation.cpp | 68 ----------
RetroFE/Source/Graphics/Animate/Animation.h | 43 ++-----
.../Graphics/Animate/AnimationChain.cpp | 17 +++
.../Source/Graphics/Animate/AnimationChain.h | 17 +++
.../Graphics/Animate/AnimationEvents.cpp | 95 --------------
.../Source/Graphics/Animate/AnimationEvents.h | 38 ------
.../Graphics/Animate/AnimationManager.cpp | 118 ++++++++++++++++++
.../Graphics/Animate/AnimationManager.h | 20 +++
RetroFE/Source/Graphics/Animate/Tween.cpp | 50 +-------
RetroFE/Source/Graphics/Animate/Tween.h | 12 +-
RetroFE/Source/Graphics/Animate/TweenSet.cpp | 65 ----------
RetroFE/Source/Graphics/Animate/TweenSet.h | 35 ------
.../Source/Graphics/Component/Component.cpp | 75 -----------
RetroFE/Source/Graphics/Component/Component.h | 11 --
RetroFE/Source/Lua/LuaAnimate.cpp | 93 ++++++++++++++
RetroFE/Source/Lua/LuaAnimate.h | 13 ++
RetroFE/Source/Lua/LuaImage.cpp | 48 -------
RetroFE/Source/Lua/LuaImage.h | 2 -
RetroFE/Source/RetroFE.cpp | 17 ++-
RetroFE/Source/RetroFE.h | 10 +-
21 files changed, 321 insertions(+), 535 deletions(-)
delete mode 100644 RetroFE/Source/Graphics/Animate/Animation.cpp
create mode 100644 RetroFE/Source/Graphics/Animate/AnimationChain.cpp
create mode 100644 RetroFE/Source/Graphics/Animate/AnimationChain.h
delete mode 100644 RetroFE/Source/Graphics/Animate/AnimationEvents.cpp
delete mode 100644 RetroFE/Source/Graphics/Animate/AnimationEvents.h
create mode 100644 RetroFE/Source/Graphics/Animate/AnimationManager.cpp
create mode 100644 RetroFE/Source/Graphics/Animate/AnimationManager.h
delete mode 100644 RetroFE/Source/Graphics/Animate/TweenSet.cpp
delete mode 100644 RetroFE/Source/Graphics/Animate/TweenSet.h
create mode 100644 RetroFE/Source/Lua/LuaAnimate.cpp
create mode 100644 RetroFE/Source/Lua/LuaAnimate.h
diff --git a/RetroFE/Source/CMakeLists.txt b/RetroFE/Source/CMakeLists.txt
index d350ede..5a749b5 100644
--- a/RetroFE/Source/CMakeLists.txt
+++ b/RetroFE/Source/CMakeLists.txt
@@ -98,11 +98,16 @@ set(RETROFE_HEADERS
"${RETROFE_DIR}/Source/Database/DB.h"
"${RETROFE_DIR}/Source/Database/Metadata.h"
"${RETROFE_DIR}/Source/Database/MetadataDatabase.h"
+ "${RETROFE_DIR}/Source/Graphics/Animate/Animation.h"
+ "${RETROFE_DIR}/Source/Graphics/Animate/AnimationChain.h"
+ "${RETROFE_DIR}/Source/Graphics/Animate/AnimationManager.h"
+ "${RETROFE_DIR}/Source/Graphics/Animate/Tween.h"
"${RETROFE_DIR}/Source/Graphics/Component/Image.h"
"${RETROFE_DIR}/Source/Graphics/Component/Component.h"
"${RETROFE_DIR}/Source/Graphics/Component/ComponentData.h"
"${RETROFE_DIR}/Source/Graphics/Component/ComponentFactory.h"
"${RETROFE_DIR}/Source/Lua/Lua.h"
+ "${RETROFE_DIR}/Source/Lua/LuaAnimate.h"
"${RETROFE_DIR}/Source/Lua/LuaCollection.h"
"${RETROFE_DIR}/Source/Lua/LuaDisplay.h"
"${RETROFE_DIR}/Source/Lua/LuaEvent.h"
@@ -121,12 +126,16 @@ set(RETROFE_SOURCES
"${RETROFE_DIR}/Source/Database/Configuration.cpp"
"${RETROFE_DIR}/Source/Database/DB.cpp"
"${RETROFE_DIR}/Source/Database/MetadataDatabase.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Animate/Tween.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Animate/AnimationChain.cpp"
+ "${RETROFE_DIR}/Source/Graphics/Animate/AnimationManager.cpp"
"${RETROFE_DIR}/Source/Graphics/Component/Image.cpp"
"${RETROFE_DIR}/Source/Graphics/Component/Component.cpp"
"${RETROFE_DIR}/Source/Graphics/Component/ComponentFactory.cpp"
"${RETROFE_DIR}/Source/Utility/Log.cpp"
"${RETROFE_DIR}/Source/Utility/Utils.cpp"
"${RETROFE_DIR}/Source/Lua/Lua.cpp"
+ "${RETROFE_DIR}/Source/Lua/LuaAnimate.cpp"
"${RETROFE_DIR}/Source/Lua/LuaDisplay.cpp"
"${RETROFE_DIR}/Source/Lua/LuaImage.cpp"
"${RETROFE_DIR}/Source/Lua/LuaCollection.cpp"
diff --git a/RetroFE/Source/Graphics/Animate/Animation.cpp b/RetroFE/Source/Graphics/Animate/Animation.cpp
deleted file mode 100644
index c55c302..0000000
--- a/RetroFE/Source/Graphics/Animate/Animation.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/* This file is part of RetroFE.
- *
- * RetroFE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * RetroFE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with RetroFE. If not, see .
- */
-
-#include "Animation.h"
-#include
-
-Animation::Animation()
-{
-}
-
-Animation::Animation(Animation ©)
-{
- for(std::vector::iterator it = copy.animationVector_.begin(); it != copy.animationVector_.end(); it++)
- {
- Push(new TweenSet(**it));
- }
-}
-Animation::~Animation()
-{
- Clear();
-}
-
-void Animation::Push(TweenSet *set)
-{
- animationVector_.push_back(set);
-}
-
-void Animation::Clear()
-{
- std::vector::iterator it = animationVector_.begin();
- while(it != animationVector_.end())
- {
- delete *it;
- animationVector_.erase(it);
- it = animationVector_.begin();
- }
-
- animationVector_.clear();
-}
-
-std::vector *Animation::tweenSets()
-{
- return &animationVector_;
-}
-
-TweenSet *Animation::tweenSet(unsigned int index)
-{
- return animationVector_[index];
-}
-
-
-unsigned int Animation::size()
-{
- return animationVector_.size();
-}
diff --git a/RetroFE/Source/Graphics/Animate/Animation.h b/RetroFE/Source/Graphics/Animate/Animation.h
index d2f2254..dec1c16 100644
--- a/RetroFE/Source/Graphics/Animate/Animation.h
+++ b/RetroFE/Source/Graphics/Animate/Animation.h
@@ -1,36 +1,15 @@
-/* This file is part of RetroFE.
- *
- * RetroFE is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * RetroFE is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with RetroFE. If not, see .
- */
#pragma once
-
-#include "TweenSet.h"
+#include "../Component/Component.h"
+#include "../Component/ComponentData.h"
+#include "TweenTypes.h"
#include
-#include
-#include