aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/board/BoardCanvas.hpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-12-29 10:08:22 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-12-29 10:08:22 +0100
commit3efabf1c331bef94d27e2818ab734a02dc401dfe (patch)
tree78f5e01f697934387f2c85cdc804a73ac08d2ef3 /src/game_tab/left_panel/board/BoardCanvas.hpp
parent7187e6d6ee8d2cec38cd9580e315a00d0c763e99 (diff)
Implement pieces move animations
Diffstat (limited to 'src/game_tab/left_panel/board/BoardCanvas.hpp')
-rw-r--r--src/game_tab/left_panel/board/BoardCanvas.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/game_tab/left_panel/board/BoardCanvas.hpp b/src/game_tab/left_panel/board/BoardCanvas.hpp
index 9e375d1..1da45b2 100644
--- a/src/game_tab/left_panel/board/BoardCanvas.hpp
+++ b/src/game_tab/left_panel/board/BoardCanvas.hpp
@@ -60,14 +60,13 @@ class BoardCanvas : public wxPanel {
// Drawing buffer (ANIMATIONS)
wxBitmap *buffer;
bool reuseBuffer;
- wxTimer timer;
- int frame,duration,fps;
+ int frame,duration,fps,duration_fast;
std::string final_board;
bool final_is_black_turn;
std::map<char, std::uint8_t> final_captures;
- std::string src;
- std::string dst;
char piece_moved;
+ wxPoint src;
+ wxPoint transVect;
public:
BoardCanvas(wxFrame *parent);
@@ -82,7 +81,7 @@ public:
void Swap();
void SetupBoard(std::string board, bool is_black_turn,
std::map<char, std::uint8_t> captures);
- void Animate(std::string board, bool is_black_turn, std::map<char, std::uint8_t> captures, std::string src, std::string dst);
+ void Animate(std::string board, bool is_black_turn, std::map<char, std::uint8_t> captures, std::string src, std::string dst,bool faster);
void SetClockTime(short hours, short min, short sec, bool IsBlack);
DECLARE_EVENT_TABLE()
};