aboutsummaryrefslogtreecommitdiff
path: root/icons (follow)
Commit message (Collapse)AuthorAge
* Generate more common icon sizesEmmanuel Gil Peyrot2023-07-14
| | | | | | | | | | | | This adds sizes 24×24 (common on Linux desktop, for instance in application bars), as well as 64×64 and 128×128 (common on Linux mobile). I kept the existing border sizes, but using the same one from 44×44 to 96×96 sounds a bit weird, it’d probably be best to revisit them at some point. Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
* Isolate icons build from the running user's preferences.Simon Tatham2023-05-05
| | | | | | | Preferences that adjust the display, such as Pearl graphics style or Light Up lit-blobs toggling, shouldn't affect the official icons, even if a ~/.config/sgt-puzzles exists in the account that builds the puzzles.
* Turn off Leak Sanitiser in the icons build.Simon Tatham2023-04-20
| | | | | | | | | | | | | | | | | | | | | If you configure a Linux build of Puzzles with -fsanitize=address, it will fail during the icons build, because the icon-maker programs leak memory when they're run, and by default, this causes ASan to report all the memory leaks at the end of the program *and then exit 1*. I don't think 'just fix the memory leaks' is a viable answer. _Some_ of the leaks come from the Puzzles code, and could be fixed by being more punctilious about freeing everything before exiting (although that is not necessary for any actually sensible purpose and would _only_ serve to stop Leak Sanitiser complaining). But some are outside the Puzzles code completely, apparently from fontconfig. So even if we fixed all the leaks we could find, we wouldn't prevent the failure status. When I want to build with ASan, I've been working around this by setting ASAN_OPTIONS=detect_leaks=0 in the environment before running the build command. Easier all round if we just do that _inside_ the cmake setup.
* Fix missing statics and #includes on variables.Simon Tatham2023-02-18
| | | | | | | | | | | | | | | | | | | | | | | After Ben fixed all the unwanted global functions by using gcc's -Wmissing-declarations to spot any that were not predeclared, I remembered that clang has -Wmissing-variable-declarations, which does the same job for global objects. Enabled it in -DSTRICT=ON, and made the code clean under it. Mostly this was just a matter of sticking 'static' on the front of things. One variable was outright removed ('verbose' in signpost.c) because after I made it static clang was then able to spot that it was also unused. The more interesting cases were the ones where declarations had to be _added_ to header files. In particular, in COMBINED builds, puzzles.h now arranges to have predeclared each 'game' structure defined by a puzzle backend. Also there's a new tiny header file gtk.h, containing the declarations of xpm_icons and n_xpm_icons which are exported by each puzzle's autogenerated icon source file and by no-icon.c. Happily even the real XPM icon files were generated by our own Perl script rather than being raw xpm output from ImageMagick, so there was no difficulty adding the corresponding #include in there.
* Generate a possibly suitable marketing banner for the KaiStoreBen Harris2023-01-19
| | | | | | | | It wants a 240x130 pixel JPEG. I've gone for rotating the screenshot a bit because the store overlays text on the picture and I don't want horizontal lines in the picture confusing the text. I think the store handles dimming the image, so the picture we produce is at full brightness.
* Properly-styled icons for KaiOSBen Harris2023-01-19
| | | | | | | These are built alongside other icons as part of the GTK build. It builds new icon sizes of 44 and 88 pixels and then uses ImageMagick to round off the corners and add a shadow in accordance with the KaiOS design guide.
* Create an icon for the Null GameBen Harris2022-12-31
| | | | | | This might be useful for creating a KaiOS app of it. It also conveniently ensures that Null Game doesn't just build but also runs correctly.
* Support the generation of icons from uniformly-coloured screenshotsBen Harris2022-12-31
| | | | | | | The square.pl script removed all pixels that were the same colour as the edge ones, even if that meant removing all of the pixels. Now it stops removing pixels at 1x1 so that there will be something left for ImageMagick to work on.
* Mid-move icon for CubeBen Harris2022-11-23
|
* Add missing dependency of screenshots on their save filesBen Harris2022-11-23
|
* Fix mid-move iconsBen Harris2022-11-22
| | | | | They've been broken since the move to CMake, which had an incorrect variable substitution in the --redo argument.
* New puzzle: 'Mosaic'.Simon Tatham2021-04-25
| | | | | | | | | | | | | | | | | | This is similar in concept to Minesweeper, in that each clue tells you the number of things (in this case, just 'black squares') in the surrounding 3x3 grid section. But unlike Minesweeper, there's no separation between squares that can contain clues, and squares that can contain the things you're looking for - a clue square may or may not itself be coloured black, and if so, its clue counts itself. So there's also no hidden information: the clues can all be shown up front, and the difficulty arises from the game generator choosing which squares to provide clues for at all. Contributed by a new author, Didi Kohen. Currently only has one difficulty level, but harder ones would be possible to add later.
* icons.cmake: explicitly search for Perl.Simon Tatham2021-04-13
| | | | | | | | This allows the icons build to automatically disable itself if Perl can't be found at all (and print a warning explaining that that's why). It also means that if Perl exists on the system but is somewhere other than /usr/bin (where our #! lines expect it), the icons build can still run.
* Provide pre-built icons in the source tarball.Simon Tatham2021-03-31
| | | | | | | | | | | | | | | | | This reinstates the feature of the previous build system, that the C icon files for the GTK puzzles were included in the source tarball, so that users building from that instead of from the raw git repo would not need to run the fiddly piece of build that regenerates them. Running that fiddly piece of build is much easier in the CMake world (because it's integrated with the main makefile), but it has a build dependency on ImageMagick which is easily avoided. The makefile will still build the icons if it _can_. But in the case where it can't, it will use pre-built icon source files if they're available, and only fall back to no-icon.c if it can't even do that. (So a user checking out from git and building without ImageMagick present will still be able to build _something_ playable.)
* Make the icons build step optional.Simon Tatham2021-03-31
| | | | | | | | | | | This way, ImageMagick is no longer a hard build dependency. For developers or users, building puzzles without nice icons is preferable to not building them at all. (Also, thanks to Michael Quevillon for pointing out very promptly that my use of 'REQUIRED' in the find_program command was implicitly depending on a version of CMake in advance of my minimum_required specification. This change fixes that too, in passing.)
* Migrate to a CMake-based build system.Simon Tatham2021-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This completely removes the old system of mkfiles.pl + Recipe + .R files that I used to manage the various per-platform makefiles and other build scripts in this code base. In its place is a CMakeLists.txt setup, which is still able to compile for Linux, Windows, MacOS, NestedVM and Emscripten. The main reason for doing this is because mkfiles.pl was a horrible pile of unmaintainable cruft. It was hard to keep up to date (e.g. didn't reliably support the latest Visual Studio project files); it was so specific to me that nobody else could maintain it (or was even interested in trying, and who can blame them?), and it wasn't even easy to _use_ if you weren't me. And it didn't even produce very good makefiles. In fact I've been wanting to hurl mkfiles.pl in the bin for years, but was blocked by CMake not quite being able to support my clang-cl based system for cross-compiling for Windows on Linux. But CMake 3.20 was released this month and fixes the last bug in that area (it had to do with preprocessing of .rc files), so now I'm unblocked! CMake is not perfect, but it's better at mkfiles.pl's job than mkfiles.pl was, and it has the great advantage that lots of other people already know about it. Other advantages of the CMake system: - Easier to build with. At least for the big three platforms, it's possible to write down a list of build commands that's actually the same everywhere ("cmake ." followed by "cmake --build ."). There's endless scope for making your end-user cmake commands more fancy than that, for various advantages, but very few people _have_ to. - Less effort required to add a new puzzle. You just add a puzzle() statement to the top-level CMakeLists.txt, instead of needing to remember eight separate fiddly things to put in the .R file. (Look at the reduction in CHECKLST.txt!) - The 'unfinished' subdirectory is now _built_ unconditionally, even if the things in it don't go into the 'make install' target. So they won't bit-rot in future. - Unix build: unified the old icons makefile with the main build, so that each puzzle builds without an icon, runs to build its icon, then relinks with it. - Windows build: far easier to switch back and forth between debug and release than with the old makefiles. - MacOS build: CMake has its own .dmg generator, which is surely better thought out than my ten-line bodge. - net reduction in the number of lines of code in the code base. In fact, that's still true _even_ if you don't count the deletion of mkfiles.pl itself - that script didn't even have the virtue of allowing everything else to be done exceptionally concisely.
* Create 96x96 icons for gnome-shellAdrian Heine2018-01-21
|
* Explicitly set RGB colourspace in icon.pl's use of convert.Simon Tatham2016-04-24
| | | | | | | | | | | | | | This is that annoying feature of up-to-date 'convert' in which converting to or from a PNG file defaults to returning RGB values that have been 'helpfully' gamma-corrected (or some such) from the exact data stored in the source file to some nonsense you didn't want. Usually the worst this causes is slightly washed-out looking graphics, but in this case, since my entire aim was to squash the image into a specific set of exact RGB values so as to turn it into a paletted Windows icon file, it caused an actual build failure when the next loop in icon.pl couldn't find the gamma-corrected values in its expected palette map, and no wonder.
* Improve 'illegal colour' error message in icon.pl.Simon Tatham2016-04-24
| | | | | | It actually went off this morning, after an upgrade of ImageMagick, and I found that it contained both unprintable characters in the colour description and the wrong variable in the coordinate display.
* Add a new puzzle: Palisade.Jonas Kölker2015-10-18
|
* Add '-set colorspace RGB' to some icon convert commands.Simon Tatham2015-10-03
| | | | | | | | Its absence was breaking the icon build on Ubuntu 14.04, because you ask convert to map an image into a specific 16-colour palette, and it does so and _then_ nonconsensually maps those colours in turn through a colourspace transformation you didn't ask for, causing icon.pl to fail an assertion when it finds an RGB value not in the palette.
* New puzzle from James Harvey: 'Tracks'.Simon Tatham2015-02-08
|
* New puzzle: 'Flood'.Simon Tatham2015-01-12
| | | | | | | | | | Based on a web game I saw a few years ago, and dashed off this weekend after I thought of a way to write a good (though not quite optimal) heuristic solver, here's a random little thing not quite in the same line as the most usual kind of Puzzles fare: instead of making you scratch your head to find any move to make at all, it's easy to find solutions in principle, and the challenge comes from having to do so within a move limit.
* Fix the icon makefile in the wake of r9795.Simon Tatham2013-03-31
| | | | | [originally from svn r9797] [r9795 == 3fc5a644a72e747b1f88125b38b2f178a9bc7ed3]
* New puzzle! 'Unruly', contributed by Lennard Sprong, is anSimon Tatham2012-10-07
| | | | | | implementation of a puzzle usually called 'Tohu wa Vohu'. [originally from svn r9680]
* New puzzle! Contributed by Steffen Bauer, an implementation ofSimon Tatham2012-09-08
| | | | | | | | 'Haunted Mirror Maze', a game involving placing ghosts, zombies and vampires in a grid so that the right numbers of them are visible along sight-lines reflected through multiple mirrors. [originally from svn r9652]
* New puzzle! Or rather, new-ish, because this one has been lying aroundSimon Tatham2012-01-22
| | | | | | | | | | | | | in the 'unfinished' directory for a while, and has now been finished up thanks to James Harvey putting in some effort and galvanising me to put in the rest. This is 'Pearl', an implementation of Nikoli's 'Masyu'. The code in Loopy that generates a random loop along grid edges to use as the puzzle solution has been abstracted out into loopgen.[ch] so that Pearl can use it for its puzzle solutions too. I've also introduced a new utility module called 'tdq' (for 'to-do queue'). [originally from svn r9379]
* New puzzle from Jonas Koelker: 'Range', an implementation of theSimon Tatham2010-09-14
| | | | | | | puzzle variously known (depending on which website you look at) as Kurodoko, Kuromasu or 'Where is Black Cells'. [originally from svn r8996]
* New puzzle! Setting what might be a record for how long we've sat onSimon Tatham2010-02-15
| | | | | | | a puzzle before it was ready to commit, here is 'Signpost': a clone of janko.at's "Arrow Path", by James Harvey. [originally from svn r8861]
* New puzzle from James H: 'Magnets'.Simon Tatham2010-01-13
| | | | [originally from svn r8836]
* New puzzle from James Harvey: 'Singles', an implementation ofSimon Tatham2010-01-11
| | | | | | | | Hitori. One infrastructure change in the process: latin.c has acquired a utility function to generate a latin rectangle rather than a full square. [originally from svn r8828]
* Crop the Towers icon more sensibly (i.e. at all).Simon Tatham2010-01-07
| | | | [originally from svn r8821]
* New puzzle, again using the revised latin.c: 'Towers', a clone of aSimon Tatham2010-01-07
| | | | | | | latin-square puzzle which I've seen described by several names but the most common is 'Skyscrapers'. [originally from svn r8816]
* New puzzle! 'Keen', a clone of KenKen.Simon Tatham2009-12-27
| | | | [originally from svn r8796]
* Make icon building cope with Solo's increased default tilesize as of r8455.Jacob Nevins2009-02-23
| | | | | [originally from svn r8459] [r8455 == 3d6de1eb47af21a9d9c0e6390b115febbf8b1d91]
* New Loopy save file, compatible with the new Loopy.Simon Tatham2008-09-06
| | | | [originally from svn r8165]
* Dariusz Olszewski's changes to support compiling for PocketPC. ThisSimon Tatham2007-02-26
| | | | | | | | | | | | is mostly done with ifdefs in windows.c; so mkfiles.pl generates a new makefile (Makefile.wce) and Recipe enables it, but it's hardly any different from Makefile.vc apart from a few definitions at the top of the files. Currently the PocketPC build is not enabled in the build script, but with any luck I'll be able to do so reasonably soon. [originally from svn r7337]
* Tweak the cropping of the Filling icon very slightly.Simon Tatham2007-02-25
| | | | [originally from svn r7330]
* New puzzle: `Filling', a Fillomino implementation by Jonas Koelker.Simon Tatham2007-02-25
| | | | [originally from svn r7326]
* Add James Harvey's excellent new puzzle, `Galaxies'.Simon Tatham2007-02-22
| | | | [originally from svn r7304]
* Give all the intermediate files distinct file names, so that aSimon Tatham2007-01-14
| | | | | | | multi-CPU machine can speed up the icon build using `make -j' and not have it break. [originally from svn r7106]
* Icon for Unequal.Simon Tatham2007-01-13
| | | | [originally from svn r7101]
* Enhance icon.pl to be a fully general Windows icon builder: it nowSimon Tatham2006-12-28
| | | | | | | | | | | | | | supports monochrome icons, can deal with any size of image you're mad enough to put in there, and will construct icons with whatever combination of sizes and resolutions you feel like specifying. This has involved a change in the command-line syntax, hence the adjustment to Makefile. (I don't imagine that the changes described here will be critical to Puzzles any time soon, but I might reuse this script elsewhere and then I won't want it to have arbitrary limitations.) [originally from svn r7031]
* `make all' targets are usually useful.Simon Tatham2006-12-27
| | | | [originally from svn r7026]
* Aha, this seems to be a more sensible way of getting screenshots:Simon Tatham2006-12-27
| | | | | | | | | instead of having the puzzle binary export its window ID to a script which then runs xwd, we can use the gdk-pixbuf library to have the puzzle binary _itself_ read its own internal pixmap and save it straight to a PNG. How handy. And faster, and less timing-sensitive. [originally from svn r7022]
* Support for run-time icons in the GTK puzzles. This involved anotherSimon Tatham2006-12-27
| | | | | | | | | | mkfiles.pl change (I don't seem to be planning ahead very well this week), this time to provide a list of fallback options for an object file. That way, I have a no-icon.c which quietly replaces icons/foo-icon.c if the latter doesn't exist, and so again people checking straight out from Subversion shouldn't have trouble. [originally from svn r7021]
* Actually introduce the ability to build the Windows icons into theSimon Tatham2006-12-27
| | | | | | | | | | | | | | | | | | | Windows puzzle binaries. This checkin involves several distinct changes: - mkfiles.pl now has an extra feature: if an object file is listed in Recipe with a trailing question mark, it will be considered optional, and silently dropped from the makefile if its primary source file isn't present at the time mkfiles.pl runs. This means people who check out the puzzles from Subversion and just run mkfiles.pl shouldn't get build failures; they just won't get the icons. - all the .R files now use this feature to include an optional Windows resource file. - the .rc resource source files are built by icons/Makefile. - windows.c finds the icon if present and uses it in place of the standard Windows application icon. [originally from svn r7020]
* Improve the icon images by cropping selected pieces out of most ofSimon Tatham2006-12-27
| | | | | | | | | | the main screenshots. (A few, like Map, were perfect already.) In the process I've vertically reflected the puzzle shown in the Pattern save file, to bring a more interesting piece of it into the top left corner :-) [originally from svn r7019]
* Code to construct Windows icon files for the puzzles, by munging theSimon Tatham2006-12-26
| | | | | | | | | | | | | | screenshots into appropriate sizes and colour depths. This is all done with a nasty Perl script, because ImageMagick does not output correct .ICO format. Not sure why; it isn't _that_ hard. I intend at some point to link the resulting icons into the actual Windows puzzle binaries, but before then I have to make them prettier: most of them would benefit from being derived from a smaller crop of the puzzle screenshot instead of trying to fit the whole thing in. [originally from svn r7017]
* New mechanism for automatic generation of the puzzle screenshots onSimon Tatham2006-12-26
the web, which I hope will also end up being extended to generate both Windows and X icons for each individual puzzle. The mechanism is: for each puzzle there's a save file in the `icons' subdirectory showing a game state which I think is a decent illustration of the puzzle, and then there's a nasty set of scripts which runs each puzzle binary, loads that save file, grabs a screenshot using xwd, and munges it into shape. In order to support this I've added two new options (--redo and --windowid) to all the GTK puzzles, which I don't expect ever to be used outside the icons makefile. I've also added two more options (--load and --id) which force a GTK puzzle to treat its command-line option as a save file or as a game ID respectively (the previous behaviour was always to guess, and sometimes it guessed wrong). [originally from svn r7014]