From f5784608ca34a1a75b65e6f018a5c2f20aca5e51 Mon Sep 17 00:00:00 2001 From: start1a Date: Mon, 28 Sep 2020 16:52:32 +0900 Subject: [PATCH] move function prototype to animation.h To prevent function prototype duplicate code in source.cpp. --- example/rlottiePlayer/Source.cpp | 1 + example/rlottiePlayer/animation.h | 10 ++++++++++ example/rlottiePlayer/rlottiePlayer.h | 10 +--------- example/rlottiePlayer/rlottiePlayer.vcxproj | 1 + example/rlottiePlayer/rlottiePlayer.vcxproj.filters | 3 +++ 5 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 example/rlottiePlayer/animation.h diff --git a/example/rlottiePlayer/Source.cpp b/example/rlottiePlayer/Source.cpp index 2db0ba3..2eab13c 100644 --- a/example/rlottiePlayer/Source.cpp +++ b/example/rlottiePlayer/Source.cpp @@ -1,4 +1,5 @@ #include "rlottie.h" +#include "animation.h" using namespace rlottie; std::unique_ptr anim; diff --git a/example/rlottiePlayer/animation.h b/example/rlottiePlayer/animation.h new file mode 100644 index 0000000..0b1c199 --- /dev/null +++ b/example/rlottiePlayer/animation.h @@ -0,0 +1,10 @@ +#pragma once +#include + +void setAnimation(char* path, size_t w, size_t h); +void initAnimation(size_t w, size_t h); +uint32_t* renderRLottieAnimation(uint32_t frameNum); +size_t getTotalFrame(); +bool isAnimNULL(); +void setAnimationColor(int r, int g, int b); +void freeAnimation(); \ No newline at end of file diff --git a/example/rlottiePlayer/rlottiePlayer.h b/example/rlottiePlayer/rlottiePlayer.h index 404d97b..07e5fd2 100644 --- a/example/rlottiePlayer/rlottiePlayer.h +++ b/example/rlottiePlayer/rlottiePlayer.h @@ -1,11 +1,11 @@ #pragma once #include "resource.h" +#include "animation.h" #include // OPENFILENAME #include "atlconv.h" // String cast. (ex. LPWSTR <-> LPSTR) #include #include // slider handle -#include // interval #define UI_INTERVAL 20 @@ -22,14 +22,6 @@ #define RDOBTN_HEIGHT 20 #define RESIZE_LENGTH 10 -void setAnimation(char* path, size_t w, size_t h); -void initAnimation(size_t w, size_t h); -uint32_t* renderRLottieAnimation(uint32_t frameNum); -size_t getTotalFrame(); -bool isAnimNULL(); -void setAnimationColor(int r, int g, int b); -void freeAnimation(); - typedef struct RlottieBitmap { Gdiplus::Bitmap* image = NULL; diff --git a/example/rlottiePlayer/rlottiePlayer.vcxproj b/example/rlottiePlayer/rlottiePlayer.vcxproj index 700b030..18e6533 100644 --- a/example/rlottiePlayer/rlottiePlayer.vcxproj +++ b/example/rlottiePlayer/rlottiePlayer.vcxproj @@ -141,6 +141,7 @@ + diff --git a/example/rlottiePlayer/rlottiePlayer.vcxproj.filters b/example/rlottiePlayer/rlottiePlayer.vcxproj.filters index 5c0486e..c8cf65b 100644 --- a/example/rlottiePlayer/rlottiePlayer.vcxproj.filters +++ b/example/rlottiePlayer/rlottiePlayer.vcxproj.filters @@ -27,6 +27,9 @@ Header Files + + Header Files + -- 2.34.1