<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puzzles/icons, branch devel</title>
<subtitle>My sgt-puzzles tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/'/>
<entry>
<title>Generate more common icon sizes</title>
<updated>2023-07-14T07:31:44+00:00</updated>
<author>
<name>Emmanuel Gil Peyrot</name>
<email>linkmauve@linkmauve.fr</email>
</author>
<published>2023-07-13T17:30:04+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=02cdafaa15eb5c2ccde76bbe1f1dcb0e893f4cec'/>
<id>02cdafaa15eb5c2ccde76bbe1f1dcb0e893f4cec</id>
<content type='text'>
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 &lt;linkmauve@linkmauve.fr&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;linkmauve@linkmauve.fr&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Isolate icons build from the running user's preferences.</title>
<updated>2023-05-05T11:51:25+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2023-05-05T11:51:25+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=d0f97926e80482d9cbb3679165a09ca6e695f83f'/>
<id>d0f97926e80482d9cbb3679165a09ca6e695f83f</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Turn off Leak Sanitiser in the icons build.</title>
<updated>2023-04-20T18:38:09+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2023-04-20T18:38:09+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=777dbffd4219be87190803be876ec3924aa92aee'/>
<id>777dbffd4219be87190803be876ec3924aa92aee</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix missing statics and #includes on variables.</title>
<updated>2023-02-18T08:55:13+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2023-02-18T07:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=873d613dd597f550b1b64946c4577b012d61d1c9'/>
<id>873d613dd597f550b1b64946c4577b012d61d1c9</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Generate a possibly suitable marketing banner for the KaiStore</title>
<updated>2023-01-19T20:34:48+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2022-12-19T14:23:02+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=87f21b2de436477e5d92cfe9850583296a88a90c'/>
<id>87f21b2de436477e5d92cfe9850583296a88a90c</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Properly-styled icons for KaiOS</title>
<updated>2023-01-19T20:34:48+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2022-12-10T21:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=241f68b543de62a800ff5cbf6c06580d45ab8a13'/>
<id>241f68b543de62a800ff5cbf6c06580d45ab8a13</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Create an icon for the Null Game</title>
<updated>2022-12-31T16:18:53+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2022-12-31T15:54:58+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=14c025d192579961d1ade51f2a322bd765aef0e5'/>
<id>14c025d192579961d1ade51f2a322bd765aef0e5</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support the generation of icons from uniformly-coloured screenshots</title>
<updated>2022-12-31T16:18:53+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2022-12-31T15:20:17+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=b403f8f97a97f9f55205d57149fd355a09727bd4'/>
<id>b403f8f97a97f9f55205d57149fd355a09727bd4</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Mid-move icon for Cube</title>
<updated>2022-11-23T21:28:10+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2022-11-23T21:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=b1b2da98961c3ec6561a934834026c117f4366d3'/>
<id>b1b2da98961c3ec6561a934834026c117f4366d3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing dependency of screenshots on their save files</title>
<updated>2022-11-23T14:34:37+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2022-11-23T14:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=96cda05b8957fb20e475e6db5fa3cffc23aa24ae'/>
<id>96cda05b8957fb20e475e6db5fa3cffc23aa24ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
