|
|
commit 84c0b7495b0859cce8b79fc6e4ceee19bc4f2f35
Author: Matthias Melcher <github@matthiasm.com>
AuthorDate: Wed Jan 26 22:55:12 2022 +0100
Commit: Matthias Melcher <github@matthiasm.com>
CommitDate: Wed Jan 26 22:55:22 2022 +0100
#31, HiDPI checkers, animation timing
test/checkers.cxx | 3 ++-
test/checkers_pieces.fl | 4 ++--
test/pixmaps/black_checker.png | Bin 14657 -> 19131 bytes
test/pixmaps/black_checker_king.png | Bin 16902 -> 21366 bytes
test/pixmaps/white_checker.png | Bin 17471 -> 18587 bytes
test/pixmaps/white_checker_king.png | Bin 19883 -> 21280 bytes
6 files changed, 4 insertions(+), 3 deletions(-)
diff --git test/checkers.cxx test/checkers.cxx
index 24dd47c..8944bb3 100644
--- test/checkers.cxx
+++ test/checkers.cxx
@@ -907,7 +907,7 @@ public:
#define BOXSIZE 52
#define BORDER 4
#define BOARDSIZE (8*BOXSIZE+BORDER)
-#define BMOFFSET 5
+#define BMOFFSET 3
static int erase_this; // real location of dragging piece, don't draw it
static int dragging; // piece being dragged
@@ -1018,6 +1018,7 @@ void Board::animate(node* move, int backwards) {
int y = y1+(y2-y1)*j/STEPS;
drag_piece(move->from,x,y);
Fl::flush();
+ Fl::wait(0.01);
}
drop_piece(t);
if (move->jump) redraw();
diff --git test/checkers_pieces.fl test/checkers_pieces.fl
index 11e90f5..8c4894f 100644
--- test/checkers_pieces.fl
+++ test/checkers_pieces.fl
@@ -23,10 +23,10 @@ comment {//
data pixmaps_black_checker_png {public local filename {pixmaps/black_checker.png}
}
-data pixmaps_white_checker_png {public local filename {pixmaps/white_checker.png}
+data pixmaps_white_checker_png {selected public local filename {pixmaps/white_checker.png}
}
-data pixmaps_black_checker_king_png {selected public local filename {pixmaps/black_checker_king.png}
+data pixmaps_black_checker_king_png {public local filename {pixmaps/black_checker_king.png}
}
data pixmaps_white_checker_king_png {public local filename {pixmaps/white_checker_king.png}
diff --git test/pixmaps/black_checker.png test/pixmaps/black_checker.png
index 0d466af..4ea47a2 100644
Binary files test/pixmaps/black_checker.png and test/pixmaps/black_checker.png differ
diff --git test/pixmaps/black_checker_king.png test/pixmaps/black_checker_king.png
index a1aba7b..a9b6f1b 100644
Binary files test/pixmaps/black_checker_king.png and test/pixmaps/black_checker_king.png differ
diff --git test/pixmaps/white_checker.png test/pixmaps/white_checker.png
index 55038f8..bd545a4 100644
Binary files test/pixmaps/white_checker.png and test/pixmaps/white_checker.png differ
diff --git test/pixmaps/white_checker_king.png test/pixmaps/white_checker_king.png
index da41b43..f89a1fc 100644
Binary files test/pixmaps/white_checker_king.png and test/pixmaps/white_checker_king.png differ
[ Direct Link to Message ] | |
|
| |