<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puzzles/loopy.c, branch rockbox</title>
<subtitle>My sgt-puzzles tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/'/>
<entry>
<title>Add method for frontends to query the backend's cursor location.</title>
<updated>2020-12-07T19:40:06+00:00</updated>
<author>
<name>Franklin Wei</name>
<email>franklin@rockbox.org</email>
</author>
<published>2020-07-07T02:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=78bc9ea7f79f379634f822d5f95242900f5716b9'/>
<id>78bc9ea7f79f379634f822d5f95242900f5716b9</id>
<content type='text'>
The Rockbox frontend allows games to be displayed in a "zoomed-in"
state targets with small displays. Currently we use a modal interface
-- a "viewing" mode in which the cursor keys are used to pan around
the rendered bitmap; and an "interaction" mode that actually sends
keys to the game.

This commit adds a midend_get_cursor_location() function to allow the
frontend to retrieve the backend's cursor location or other "region of
interest" -- such as the player location in Cube or Inertia.

With this information, the Rockbox frontend can now intelligently
follow the cursor around in the zoomed-in state, eliminating the need
for a modal interface.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Rockbox frontend allows games to be displayed in a "zoomed-in"
state targets with small displays. Currently we use a modal interface
-- a "viewing" mode in which the cursor keys are used to pan around
the rendered bitmap; and an "interaction" mode that actually sends
keys to the game.

This commit adds a midend_get_cursor_location() function to allow the
frontend to retrieve the backend's cursor location or other "region of
interest" -- such as the player location in Cube or Inertia.

With this information, the Rockbox frontend can now intelligently
follow the cursor around in the zoomed-in state, eliminating the need
for a modal interface.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use C99 bool within source modules.</title>
<updated>2018-11-13T21:48:24+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2018-11-13T21:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=5f5b284c0bddbe67de14b2d2bfb596bc7ba1298a'/>
<id>5f5b284c0bddbe67de14b2d2bfb596bc7ba1298a</id>
<content type='text'>
This is the main bulk of this boolification work, but although it's
making the largest actual change, it should also be the least
disruptive to anyone interacting with this code base downstream of me,
because it doesn't modify any interface between modules: all the
inter-module APIs were updated one by one in the previous commits.
This just cleans up the code within each individual source file to use
bool in place of int where I think that makes things clearer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the main bulk of this boolification work, but although it's
making the largest actual change, it should also be the least
disruptive to anyone interacting with this code base downstream of me,
because it doesn't modify any interface between modules: all the
inter-module APIs were updated one by one in the previous commits.
This just cleans up the code within each individual source file to use
bool in place of int where I think that makes things clearer.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace TRUE/FALSE with C99 true/false throughout.</title>
<updated>2018-11-13T21:48:24+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2018-11-13T21:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=a550ea0a47374705a37f36b0f05ffe9e4c8161fb'/>
<id>a550ea0a47374705a37f36b0f05ffe9e4c8161fb</id>
<content type='text'>
This commit removes the old #defines of TRUE and FALSE from puzzles.h,
and does a mechanical search-and-replace throughout the code to
replace them with the C99 standard lowercase spellings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit removes the old #defines of TRUE and FALSE from puzzles.h,
and does a mechanical search-and-replace throughout the code to
replace them with the C99 standard lowercase spellings.
</pre>
</div>
</content>
</entry>
<entry>
<title>Adopt C99 bool in the edsf API.</title>
<updated>2018-11-13T21:48:24+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2018-11-13T21:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=20b56788bc61de5b3d10c90a9fd588d373134aae'/>
<id>20b56788bc61de5b3d10c90a9fd588d373134aae</id>
<content type='text'>
Now the flag passed to edsf_merge to say whether two items are the
same or opposite is a bool, and so is the flag returned via a pointer
argument from edsf_canonify.

The latter requires client code to be updated to match (otherwise
you'll get a pointer type error), so I've done that update in Loopy,
which is edsf's only current in-tree client.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now the flag passed to edsf_merge to say whether two items are the
same or opposite is a bool, and so is the flag returned via a pointer
argument from edsf_canonify.

The latter requires client code to be updated to match (otherwise
you'll get a pointer type error), so I've done that update in Loopy,
which is edsf's only current in-tree client.
</pre>
</div>
</content>
</entry>
<entry>
<title>Adopt C99 bool in the game backend API.</title>
<updated>2018-11-13T21:34:42+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2018-11-13T21:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=a76d269cf222ba81e717c7e9046db391f19036eb'/>
<id>a76d269cf222ba81e717c7e9046db391f19036eb</id>
<content type='text'>
encode_params, validate_params and new_desc now take a bool parameter;
fetch_preset, can_format_as_text_now and timing_state all return bool;
and the data fields is_timed, wants_statusbar and can_* are all bool.
All of those were previously typed as int, but semantically boolean.

This commit changes the API declarations in puzzles.h, updates all the
games to match (including the unfinisheds), and updates the developer
docs as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
encode_params, validate_params and new_desc now take a bool parameter;
fetch_preset, can_format_as_text_now and timing_state all return bool;
and the data fields is_timed, wants_statusbar and can_* are all bool.
All of those were previously typed as int, but semantically boolean.

This commit changes the API declarations in puzzles.h, updates all the
games to match (including the unfinisheds), and updates the developer
docs as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a request_keys() function with a midend wrapper.</title>
<updated>2018-04-22T16:04:50+00:00</updated>
<author>
<name>Franklin Wei</name>
<email>me@fwei.tk</email>
</author>
<published>2018-04-17T20:18:16+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=60a929a250cf4f7f87ac082e5705f9a838a7f8c8'/>
<id>60a929a250cf4f7f87ac082e5705f9a838a7f8c8</id>
<content type='text'>
This function gives the front end a way to find out what keys the back
end requires; and as such it is mostly useful for ports without a
keyboard. It is based on changes originally found in Chris Boyle's
Android port, though some modifications were needed to make it more
flexible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function gives the front end a way to find out what keys the back
end requires; and as such it is mostly useful for ports without a
keyboard. It is based on changes originally found in Chris Boyle's
Android port, though some modifications were needed to make it more
flexible.
</pre>
</div>
</content>
</entry>
<entry>
<title>New grid type: the trihexagonal tiling, or 'kagome lattice'.</title>
<updated>2017-11-18T15:26:13+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2017-11-18T15:16:40+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=8af0c29615fdfe30035f2d4c3a7d2ccf06d6efa9'/>
<id>8af0c29615fdfe30035f2d4c3a7d2ccf06d6efa9</id>
<content type='text'>
Regular hexagons and equilateral triangles in strict alternation, with
two of each interleaved around each vertex.
https://en.wikipedia.org/wiki/Trihexagonal_tiling

Thanks to Michael Quevillon for the patch.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Regular hexagons and equilateral triangles in strict alternation, with
two of each interleaved around each vertex.
https://en.wikipedia.org/wiki/Trihexagonal_tiling

Thanks to Michael Quevillon for the patch.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the code base clean under -Wwrite-strings.</title>
<updated>2017-10-01T15:35:40+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2017-10-01T13:45:12+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=a58c1b216bb1d4547f7b2ef2703fe2d0cd3b5cac'/>
<id>a58c1b216bb1d4547f7b2ef2703fe2d0cd3b5cac</id>
<content type='text'>
I've also added that warning option and -Werror to the build script,
so that I'll find out if I break this property in future.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I've also added that warning option and -Werror to the build script,
so that I'll find out if I break this property in future.
</pre>
</div>
</content>
</entry>
<entry>
<title>Return error messages as 'const char *', not 'char *'.</title>
<updated>2017-10-01T15:34:41+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2017-10-01T12:53:24+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=b3243d75043cf1d70beb88d2a36eaebfe85c2c3f'/>
<id>b3243d75043cf1d70beb88d2a36eaebfe85c2c3f</id>
<content type='text'>
They're never dynamically allocated, and are almost always string
literals, so const is more appropriate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They're never dynamically allocated, and are almost always string
literals, so const is more appropriate.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use a proper union in struct config_item.</title>
<updated>2017-10-01T15:34:41+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2017-10-01T12:38:35+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/puzzles/commit/?id=de67801b0fd3dfa11777c1ef86cd617baf376b7b'/>
<id>de67801b0fd3dfa11777c1ef86cd617baf376b7b</id>
<content type='text'>
This allows me to use different types for the mutable, dynamically
allocated string value in a C_STRING control and the fixed constant
list of option names in a C_CHOICES.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows me to use different types for the mutable, dynamically
allocated string value in a C_STRING control and the fixed constant
list of option names in a C_CHOICES.
</pre>
</div>
</content>
</entry>
</feed>
