diff options
author | scratko <m@scratko.xyz> | 2024-11-18 02:45:54 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-11-18 15:32:49 +0300 |
commit | 7fea2267e78de935af6010d5ac7300e51f471601 (patch) | |
tree | 42a417b778c6f826b84bcc6515c292bd862dcd99 /puzzle.cpp | |
parent | 22d4fdabf17aebebfcb73c7d86b5bbc81b6530f4 (diff) | |
download | picture-puzzle-7fea2267e78de935af6010d5ac7300e51f471601.tar.gz picture-puzzle-7fea2267e78de935af6010d5ac7300e51f471601.tar.bz2 picture-puzzle-7fea2267e78de935af6010d5ac7300e51f471601.zip |
Uploading custom images
Diffstat (limited to 'puzzle.cpp')
-rw-r--r-- | puzzle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3,7 +3,7 @@ #include <stdlib.h> #include <string> -#include <FL/Fl_JPEG_Image.H> +#include <FL/Fl_PNG_Image.H> #include <utility> #include <memory> @@ -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); |