From 28fe61704fe1b7750da79efe04ec3b51c01dc520 Mon Sep 17 00:00:00 2001 From: omigamedev Date: Sun, 16 Apr 2017 01:57:54 +0200 Subject: [PATCH] implement simple stroke undo based on actions history --- android/CMakeLists.txt | 1 + android/src/main/cpp/main.cpp | 2 +- data/layout.xml | 1 + engine.xcodeproj/project.pbxproj | 6 ++++++ engine/action.cpp | 4 ++++ engine/action.h | 24 ++++++++++++++++++++++++ engine/app.cpp | 6 ++++++ engine/canvas.cpp | 30 ++++++++++++++++++++++++------ engine/canvas.h | 29 +++++++++++++++++++++++++++-- engine/pch.h | 1 + 10 files changed, 95 insertions(+), 9 deletions(-) create mode 100644 engine/action.cpp create mode 100644 engine/action.h diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt index 2599bcd..38b70c7 100644 --- a/android/CMakeLists.txt +++ b/android/CMakeLists.txt @@ -40,6 +40,7 @@ add_library( ../engine/brush.cpp ../engine/canvas.cpp ../engine/log.cpp + ../engine/action.cpp ) target_include_directories(native-lib PRIVATE diff --git a/android/src/main/cpp/main.cpp b/android/src/main/cpp/main.cpp index b8e9406..8bedff9 100755 --- a/android/src/main/cpp/main.cpp +++ b/android/src/main/cpp/main.cpp @@ -26,7 +26,7 @@ #include "pch.h" #include "app.h" -#include "..\..\..\..\engine\asset.h" +#include "../../../../engine/asset.h" typedef void (*GLDEBUGPROC)(GLenum source, GLenum type, diff --git a/data/layout.xml b/data/layout.xml index fa9c48c..40d2143 100644 --- a/data/layout.xml +++ b/data/layout.xml @@ -371,6 +371,7 @@ -->