From 7fea2267e78de935af6010d5ac7300e51f471601 Mon Sep 17 00:00:00 2001 From: scratko Date: Mon, 18 Nov 2024 02:45:54 +0300 Subject: Uploading custom images --- puzzle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'puzzle.cpp') diff --git a/puzzle.cpp b/puzzle.cpp index 1addc73..0d9dc11 100644 --- a/puzzle.cpp +++ b/puzzle.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include @@ -32,7 +32,7 @@ static void find_path_to_picture(std::string& path, int number) { path = "resources/tucan/" + std::to_string(number / puzzles_per_side) + - std::to_string(number % puzzles_per_side) + ".jpg"; + std::to_string(number % puzzles_per_side) + ".png"; } void GameParams::NextUntestedPuzzles() @@ -67,7 +67,7 @@ void GameParams::NextUntestedPuzzles() standard_puzzle_coordinates[i].y)); tmp_puzzle->sequence_number = idx_random_puzzle; find_path_to_picture(tmp_puzzle->path, tmp_puzzle->sequence_number); - Fl_JPEG_Image *img = new Fl_JPEG_Image(tmp_puzzle->path.c_str()); + Fl_PNG_Image *img = new Fl_PNG_Image(tmp_puzzle->path.c_str()); // TODO check fails img->fail(); tmp_puzzle->image(img); tmp_puzzle->callback(press_button_callback, this); -- cgit v1.2.3