back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/puzzle.cpp
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-11-18 02:45:54 +0300
committerscratko <m@scratko.xyz>2024-11-18 15:32:49 +0300
commit7fea2267e78de935af6010d5ac7300e51f471601 (patch)
tree42a417b778c6f826b84bcc6515c292bd862dcd99 /puzzle.cpp
parent22d4fdabf17aebebfcb73c7d86b5bbc81b6530f4 (diff)
downloadpicture-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.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/puzzle.cpp b/puzzle.cpp
index 1addc73..0d9dc11 100644
--- a/puzzle.cpp
+++ b/puzzle.cpp
@@ -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);