mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
puzzles: resync with upstream (adds new Palisade cursor interface).
Resyncs properly with this slightly modified upstream: https://www.franklinwei.com/git/puzzles/commit/?h=rockbox-devel&id=1c62dac3f4f1a819a394ff33cc82912cf9079b50 Change-Id: I2018e81647c22010f9d74d8d14d13982f2969a8f
This commit is contained in:
parent
09aa8de52c
commit
62b0456a4b
46 changed files with 309 additions and 128 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
@ -7,14 +7,15 @@
|
||||||
struct style_text help_text_style[] = {
|
struct style_text help_text_style[] = {
|
||||||
{ 0, TEXT_CENTER | C_RED },
|
{ 0, TEXT_CENTER | C_RED },
|
||||||
{ 88, TEXT_CENTER | C_RED },
|
{ 88, TEXT_CENTER | C_RED },
|
||||||
{ 150, TEXT_CENTER | C_RED },
|
{ 199, TEXT_CENTER | C_RED },
|
||||||
{ 167, TEXT_UNDERLINE },
|
{ 216, TEXT_UNDERLINE },
|
||||||
{ 168, TEXT_UNDERLINE },
|
{ 217, TEXT_UNDERLINE },
|
||||||
{ 178, TEXT_UNDERLINE },
|
{ 227, TEXT_UNDERLINE },
|
||||||
|
{ 244, TEXT_CENTER | C_RED },
|
||||||
LAST_STYLE_ITEM
|
LAST_STYLE_ITEM
|
||||||
};
|
};
|
||||||
|
|
||||||
/* orig 1135 comp 902 ratio 0.794714 level 3 saved 233 */
|
/* orig 1672 comp 1186 ratio 0.70933 level 4 saved 486 */
|
||||||
const char help_text[] = {
|
const char help_text[] = {
|
||||||
0xff, 0x08, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x20,
|
0xff, 0x08, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x20,
|
||||||
0x34, 0x31, 0x3a, 0x20, 0x50, 0x61, 0x6c, 0x69, 0x73, 0x61,
|
0x34, 0x31, 0x3a, 0x20, 0x50, 0x61, 0x6c, 0x69, 0x73, 0x61,
|
||||||
|
@ -69,46 +70,74 @@ const char help_text[] = {
|
||||||
0x40, 0x70, 0x6c, 0x61, 0x63, 0x0e, 0x01, 0x01, 0x3b, 0x01,
|
0x40, 0x70, 0x6c, 0x61, 0x63, 0x0e, 0x01, 0x01, 0x3b, 0x01,
|
||||||
0x67, 0x2e, 0x00, 0x52, 0x69, 0x67, 0x68, 0x1e, 0x00, 0xc1,
|
0x67, 0x2e, 0x00, 0x52, 0x69, 0x67, 0x68, 0x1e, 0x00, 0xc1,
|
||||||
0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x60,
|
0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x60,
|
||||||
0x6e, 0x6f, 0x22, 0x00, 0xf1, 0x02, 0x27, 0x2e, 0x00, 0x41,
|
0x6e, 0x6f, 0x22, 0x00, 0x10, 0x27, 0x93, 0x00, 0xe1, 0x41,
|
||||||
0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
|
0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
|
||||||
0x6c, 0x79, 0x2c, 0x36, 0x01, 0xf0, 0x07, 0x61, 0x72, 0x72,
|
0x6c, 0x79, 0x2c, 0x38, 0x01, 0xf0, 0x07, 0x61, 0x72, 0x72,
|
||||||
0x6f, 0x77, 0x00, 0x6b, 0x65, 0x79, 0x73, 0x00, 0x77, 0x69,
|
0x6f, 0x77, 0x00, 0x6b, 0x65, 0x79, 0x73, 0x00, 0x77, 0x69,
|
||||||
0x6c, 0x6c, 0x00, 0x6d, 0x6f, 0x76, 0x65, 0x00, 0x61, 0x11,
|
0x6c, 0x6c, 0x00, 0x6d, 0x6f, 0x76, 0x65, 0x00, 0x61, 0x11,
|
||||||
0x00, 0xf1, 0x02, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x00, 0x63,
|
0x00, 0xf1, 0x04, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x00, 0x63,
|
||||||
0x75, 0x72, 0x73, 0x6f, 0x72, 0x2e, 0x00, 0x48, 0x6f, 0x6c,
|
0x75, 0x72, 0x73, 0x6f, 0x72, 0x2e, 0x00, 0x44, 0x65, 0x70,
|
||||||
0x96, 0x01, 0x12, 0x43, 0x8f, 0x00, 0x00, 0x6b, 0x02, 0x81,
|
0x65, 0x6e, 0x9a, 0x01, 0x12, 0x6f, 0x8f, 0x01, 0x21, 0x60,
|
||||||
0x6c, 0x65, 0x00, 0x70, 0x72, 0x65, 0x73, 0x73, 0xe8, 0x01,
|
0x43, 0x1a, 0x00, 0xf3, 0x09, 0x00, 0x6d, 0x6f, 0x64, 0x65,
|
||||||
0x16, 0x6e, 0x4a, 0x00, 0x02, 0x49, 0x00, 0x0b, 0x9e, 0x00,
|
0x27, 0x00, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
|
||||||
0x10, 0x50, 0x2a, 0x00, 0x72, 0x00, 0x53, 0x68, 0x69, 0x66,
|
0x63, 0x65, 0x00, 0x28, 0x73, 0x65, 0x65, 0x00, 0x73, 0x19,
|
||||||
0x74, 0x2d, 0x2b, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x8d, 0x02,
|
0x01, 0x52, 0x34, 0x31, 0x2e, 0x33, 0x29, 0x6a, 0x00, 0x02,
|
||||||
0x97, 0x77, 0x69, 0x74, 0x63, 0x68, 0x00, 0x6f, 0x66, 0x66,
|
0x4a, 0x00, 0x02, 0x66, 0x00, 0xc0, 0x65, 0x69, 0x74, 0x68,
|
||||||
0xcb, 0x00, 0x51, 0x65, 0x70, 0x65, 0x61, 0x74, 0x55, 0x00,
|
0x65, 0x72, 0x00, 0x6e, 0x61, 0x76, 0x69, 0x67, 0xa6, 0x00,
|
||||||
0x02, 0x5e, 0x01, 0x00, 0xee, 0x00, 0xf0, 0x03, 0x65, 0x72,
|
0x56, 0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x90, 0x02, 0x05, 0xdb,
|
||||||
0x66, 0x6f, 0x72, 0x6d, 0x00, 0x69, 0x74, 0x73, 0x00, 0x69,
|
0x02, 0x53, 0x6f, 0x72, 0x00, 0x61, 0x6c, 0x1b, 0x00, 0x71,
|
||||||
0x6e, 0x76, 0x65, 0x72, 0x73, 0x65, 0x64, 0x01, 0x42, 0x28,
|
0x69, 0x72, 0x00, 0x62, 0x6f, 0x72, 0x64, 0xd4, 0x02, 0x90,
|
||||||
0x41, 0x6c, 0x6c, 0xc9, 0x00, 0x01, 0x2a, 0x00, 0xa0, 0x73,
|
0x49, 0x6e, 0x00, 0x60, 0x46, 0x75, 0x6c, 0x6c, 0x2d, 0x2f,
|
||||||
0x00, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0xd4,
|
0x00, 0x11, 0x27, 0x84, 0x00, 0x82, 0x2c, 0x00, 0x68, 0x6f,
|
||||||
0x02, 0x23, 0x00, 0x73, 0x9e, 0x01, 0x40, 0x32, 0x2e, 0x31,
|
0x6c, 0x64, 0x00, 0x43, 0x31, 0x01, 0x00, 0x0d, 0x03, 0x20,
|
||||||
0x00, 0x9a, 0x02, 0xf2, 0x01, 0x61, 0x6c, 0x73, 0x6f, 0x00,
|
0x6c, 0x65, 0x97, 0x00, 0x21, 0x73, 0x73, 0x8a, 0x02, 0x16,
|
||||||
0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x2e,
|
0x6e, 0xea, 0x00, 0x0d, 0x3e, 0x01, 0x11, 0x2c, 0x55, 0x02,
|
||||||
0x29, 0x6e, 0x01, 0x16, 0x32, 0x6e, 0x01, 0x91, 0x70, 0x61,
|
0x01, 0x2c, 0x00, 0x71, 0x00, 0x53, 0x68, 0x69, 0x66, 0x74,
|
||||||
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x70, 0x01, 0x66,
|
0x2d, 0x2c, 0x00, 0x03, 0x2b, 0x00, 0xa6, 0x73, 0x77, 0x69,
|
||||||
0x54, 0x68, 0x65, 0x73, 0x65, 0x00, 0x14, 0x00, 0x02, 0x44,
|
0x74, 0x63, 0x68, 0x00, 0x6f, 0x66, 0x66, 0x6e, 0x01, 0x00,
|
||||||
0x00, 0x04, 0x3f, 0x00, 0x51, 0x00, 0x66, 0x72, 0x6f, 0x6d,
|
0x80, 0x00, 0x68, 0x48, 0x61, 0x6c, 0x66, 0x2d, 0x00, 0x81,
|
||||||
0x7c, 0x00, 0xe1, 0x60, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
|
0x00, 0x02, 0x42, 0x00, 0x5f, 0x45, 0x6e, 0x74, 0x65, 0x72,
|
||||||
0x2e, 0x2e, 0x2e, 0x27, 0x00, 0x6f, 0x70, 0x72, 0x00, 0x22,
|
0x64, 0x00, 0x04, 0x20, 0x53, 0x70, 0x13, 0x00, 0x0f, 0x55,
|
||||||
0x6f, 0x6e, 0x1a, 0x00, 0xa0, 0x54, 0x79, 0x70, 0x65, 0x27,
|
0x00, 0x07, 0x03, 0x18, 0x01, 0x02, 0x4f, 0x00, 0xe1, 0x79,
|
||||||
0x00, 0x6d, 0x65, 0x6e, 0x75, 0xae, 0x00, 0x90, 0x57, 0x69,
|
0x6f, 0x75, 0x00, 0x63, 0x61, 0x6e, 0x00, 0x72, 0x65, 0x70,
|
||||||
0x64, 0x74, 0x68, 0x2c, 0x00, 0x48, 0x65, 0xac, 0x01, 0x61,
|
0x65, 0x61, 0x74, 0xc3, 0x00, 0x02, 0x55, 0x01, 0x00, 0x5c,
|
||||||
0x00, 0x00, 0x00, 0x53, 0x69, 0x7a, 0xc0, 0x02, 0x03, 0x84,
|
0x00, 0xf0, 0x03, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x00,
|
||||||
0x03, 0x04, 0xd2, 0x03, 0x00, 0x2b, 0x00, 0x11, 0x52, 0x82,
|
0x69, 0x74, 0x73, 0x00, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
0x03, 0x10, 0x20, 0x68, 0x03, 0x02, 0x8a, 0x00, 0x01, 0x73,
|
0x65, 0xe1, 0x01, 0x42, 0x28, 0x41, 0x6c, 0x6c, 0xd7, 0x01,
|
||||||
0x03, 0x04, 0xed, 0x02, 0x03, 0xa0, 0x03, 0x02, 0xb8, 0x03,
|
0x01, 0x2a, 0x00, 0xa0, 0x73, 0x00, 0x64, 0x65, 0x73, 0x63,
|
||||||
0x02, 0xf7, 0x03, 0x05, 0xcc, 0x03, 0x74, 0x6d, 0x75, 0x73,
|
0x72, 0x69, 0x62, 0x65, 0xe4, 0x03, 0x05, 0x95, 0x01, 0x40,
|
||||||
0x74, 0x00, 0x62, 0x65, 0xe7, 0x03, 0x50, 0x64, 0x65, 0x64,
|
0x32, 0x2e, 0x31, 0x00, 0xaa, 0x03, 0xf2, 0x01, 0x61, 0x6c,
|
||||||
0x2e, 0x00,
|
0x73, 0x6f, 0x00, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
|
||||||
|
0x6c, 0x65, 0x2e, 0x29, 0x7e, 0x02, 0x16, 0x32, 0x7e, 0x02,
|
||||||
|
0x91, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
|
||||||
|
0x80, 0x02, 0x66, 0x54, 0x68, 0x65, 0x73, 0x65, 0x00, 0x14,
|
||||||
|
0x00, 0x02, 0x44, 0x00, 0x04, 0x3f, 0x00, 0x54, 0x00, 0x66,
|
||||||
|
0x72, 0x6f, 0x6d, 0x1a, 0x02, 0xb1, 0x73, 0x74, 0x6f, 0x6d,
|
||||||
|
0x2e, 0x2e, 0x2e, 0x27, 0x00, 0x6f, 0x70, 0x72, 0x00, 0x04,
|
||||||
|
0x34, 0x02, 0xa0, 0x54, 0x79, 0x70, 0x65, 0x27, 0x00, 0x6d,
|
||||||
|
0x65, 0x6e, 0x75, 0xae, 0x00, 0x90, 0x57, 0x69, 0x64, 0x74,
|
||||||
|
0x68, 0x2c, 0x00, 0x48, 0x65, 0xbc, 0x02, 0x61, 0x00, 0x00,
|
||||||
|
0x00, 0x53, 0x69, 0x7a, 0xd0, 0x03, 0x03, 0x94, 0x04, 0x04,
|
||||||
|
0x07, 0x02, 0x00, 0x2b, 0x00, 0x11, 0x52, 0x92, 0x04, 0x10,
|
||||||
|
0x20, 0x78, 0x04, 0x02, 0x8a, 0x00, 0x01, 0x83, 0x04, 0x04,
|
||||||
|
0xfd, 0x03, 0x03, 0xb0, 0x04, 0x02, 0xc8, 0x04, 0x02, 0x07,
|
||||||
|
0x05, 0x05, 0x4c, 0x02, 0x76, 0x6d, 0x75, 0x73, 0x74, 0x00,
|
||||||
|
0x62, 0x65, 0xf7, 0x04, 0x22, 0x64, 0x2e, 0xe8, 0x00, 0x16,
|
||||||
|
0x33, 0xe8, 0x00, 0x56, 0x75, 0x73, 0x65, 0x72, 0x20, 0xc3,
|
||||||
|
0x02, 0x01, 0xee, 0x00, 0x20, 0x4f, 0x6e, 0xc1, 0x01, 0x10,
|
||||||
|
0x74, 0x66, 0x01, 0x12, 0x73, 0xa9, 0x04, 0x80, 0x73, 0x75,
|
||||||
|
0x70, 0x70, 0x6f, 0x72, 0x74, 0x00, 0x2e, 0x00, 0x07, 0xf1,
|
||||||
|
0x02, 0x12, 0x73, 0xdf, 0x02, 0x26, 0x60, 0x50, 0x12, 0x00,
|
||||||
|
0x0d, 0xf8, 0x00, 0x33, 0x47, 0x61, 0x6d, 0xf8, 0x00, 0x02,
|
||||||
|
0x00, 0x03, 0x32, 0x6c, 0x65, 0x74, 0xdf, 0x01, 0x72, 0x6f,
|
||||||
|
0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x8c, 0x05, 0x84, 0x62,
|
||||||
|
0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0xd7, 0x00, 0x03,
|
||||||
|
0x32, 0x03, 0x01, 0x9d, 0x03, 0x2f, 0x74, 0x6f, 0x35, 0x03,
|
||||||
|
0x04, 0x4f, 0x66, 0x75, 0x6c, 0x6c, 0x36, 0x03, 0x08, 0x04,
|
||||||
|
0x34, 0x03, 0x08, 0x28, 0x05, 0xa0, 0x00, 0x73, 0x71, 0x75,
|
||||||
|
0x61, 0x72, 0x65, 0x73, 0x2e, 0x00,
|
||||||
};
|
};
|
||||||
|
|
||||||
const unsigned short help_text_len = 1135;
|
const unsigned short help_text_len = 1672;
|
||||||
const unsigned short help_text_words = 193;
|
const unsigned short help_text_words = 285;
|
||||||
const char quick_help_text[] = "Divide the grid into equal-sized areas in accordance with the clues.";
|
const char quick_help_text[] = "Divide the grid into equal-sized areas in accordance with the clues.";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* auto-generated on Jul 22 2024 by genhelp.sh */
|
/* auto-generated on Jul 23 2024 by genhelp.sh */
|
||||||
/* help text is compressed using LZ4; see compress.c for details */
|
/* help text is compressed using LZ4; see compress.c for details */
|
||||||
/* DO NOT EDIT! */
|
/* DO NOT EDIT! */
|
||||||
|
|
||||||
|
|
|
@ -1886,6 +1886,11 @@ static void draw_player(drawing *dr, game_drawstate *ds, int x, int y,
|
||||||
coords[d*4+2] = x + TILESIZE/2 + (int)((TILESIZE*3/7) * x2);
|
coords[d*4+2] = x + TILESIZE/2 + (int)((TILESIZE*3/7) * x2);
|
||||||
coords[d*4+3] = y + TILESIZE/2 + (int)((TILESIZE*3/7) * y2);
|
coords[d*4+3] = y + TILESIZE/2 + (int)((TILESIZE*3/7) * y2);
|
||||||
}
|
}
|
||||||
|
/* rockbox hack */
|
||||||
|
int tmp[2] = { coords[0], coords[1] };
|
||||||
|
memmove(coords, coords + 2, sizeof(int) * DIRECTIONS * 4 - 2);
|
||||||
|
memcpy(coords + DIRECTIONS * 4 - 2, tmp, 2 * sizeof(int));
|
||||||
|
|
||||||
draw_polygon(dr, coords, DIRECTIONS*2, COL_DEAD_PLAYER, COL_OUTLINE);
|
draw_polygon(dr, coords, DIRECTIONS*2, COL_DEAD_PLAYER, COL_OUTLINE);
|
||||||
} else {
|
} else {
|
||||||
draw_circle(dr, x + TILESIZE/2, y + TILESIZE/2,
|
draw_circle(dr, x + TILESIZE/2, y + TILESIZE/2,
|
||||||
|
@ -1901,8 +1906,6 @@ static void draw_player(drawing *dr, game_drawstate *ds, int x, int y,
|
||||||
int coords[14], *c;
|
int coords[14], *c;
|
||||||
|
|
||||||
c = coords;
|
c = coords;
|
||||||
*c++ = ox + px/9;
|
|
||||||
*c++ = oy + py/9;
|
|
||||||
*c++ = ox + px/9 + ax*2/3;
|
*c++ = ox + px/9 + ax*2/3;
|
||||||
*c++ = oy + py/9 + ay*2/3;
|
*c++ = oy + py/9 + ay*2/3;
|
||||||
*c++ = ox + px/3 + ax*2/3;
|
*c++ = ox + px/3 + ax*2/3;
|
||||||
|
@ -1915,6 +1918,8 @@ static void draw_player(drawing *dr, game_drawstate *ds, int x, int y,
|
||||||
*c++ = oy - py/9 + ay*2/3;
|
*c++ = oy - py/9 + ay*2/3;
|
||||||
*c++ = ox - px/9;
|
*c++ = ox - px/9;
|
||||||
*c++ = oy - py/9;
|
*c++ = oy - py/9;
|
||||||
|
*c++ = ox + px/9;
|
||||||
|
*c++ = oy + py/9;
|
||||||
draw_polygon(dr, coords, 7, COL_HINT, COL_OUTLINE);
|
draw_polygon(dr, coords, 7, COL_HINT, COL_OUTLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2867,12 +2867,12 @@ static void draw_tile(drawing *dr, game_drawstate *ds,
|
||||||
coords[(n)*2+0] = x + (int)(TILE_SIZE * (dx)); \
|
coords[(n)*2+0] = x + (int)(TILE_SIZE * (dx)); \
|
||||||
coords[(n)*2+1] = y + (int)(TILE_SIZE * (dy)); \
|
coords[(n)*2+1] = y + (int)(TILE_SIZE * (dy)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
SETCOORD(0, 0.6F, 0.35F);
|
SETCOORD(0, 0.6F, 0.7F);
|
||||||
SETCOORD(1, 0.6F, 0.7F);
|
SETCOORD(1, 0.8F, 0.8F);
|
||||||
SETCOORD(2, 0.8F, 0.8F);
|
SETCOORD(2, 0.25F, 0.8F);
|
||||||
SETCOORD(3, 0.25F, 0.8F);
|
SETCOORD(3, 0.55F, 0.7F);
|
||||||
SETCOORD(4, 0.55F, 0.7F);
|
SETCOORD(4, 0.55F, 0.35F);
|
||||||
SETCOORD(5, 0.55F, 0.35F);
|
SETCOORD(5, 0.6F, 0.35F);
|
||||||
draw_polygon(dr, coords, 6, COL_FLAGBASE, COL_FLAGBASE);
|
draw_polygon(dr, coords, 6, COL_FLAGBASE, COL_FLAGBASE);
|
||||||
|
|
||||||
SETCOORD(0, 0.6F, 0.2F);
|
SETCOORD(0, 0.6F, 0.2F);
|
||||||
|
|
|
@ -868,18 +868,48 @@ static char *game_text_format(const game_state *state)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct game_ui {
|
struct game_ui {
|
||||||
|
/* These are half-grid coordinates - (0,0) is the top left corner
|
||||||
|
* of the top left square; (1,1) is the center of the top left
|
||||||
|
* grid square. */
|
||||||
int x, y;
|
int x, y;
|
||||||
bool show;
|
bool show;
|
||||||
|
|
||||||
|
bool legacy_cursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
static game_ui *new_ui(const game_state *state)
|
static game_ui *new_ui(const game_state *state)
|
||||||
{
|
{
|
||||||
game_ui *ui = snew(game_ui);
|
game_ui *ui = snew(game_ui);
|
||||||
ui->x = ui->y = 0;
|
ui->x = ui->y = 1;
|
||||||
ui->show = getenv_bool("PUZZLES_SHOW_CURSOR", false);
|
ui->show = getenv_bool("PUZZLES_SHOW_CURSOR", false);
|
||||||
|
ui->legacy_cursor = false;
|
||||||
return ui;
|
return ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static config_item *get_prefs(game_ui *ui)
|
||||||
|
{
|
||||||
|
config_item *cfg;
|
||||||
|
|
||||||
|
cfg = snewn(2, config_item);
|
||||||
|
|
||||||
|
cfg[0].name = "Cursor mode";
|
||||||
|
cfg[0].kw = "cursor-mode";
|
||||||
|
cfg[0].type = C_CHOICES;
|
||||||
|
cfg[0].u.choices.choicenames = ":Half-grid:Full-grid";
|
||||||
|
cfg[0].u.choices.choicekws = ":half:full";
|
||||||
|
cfg[0].u.choices.selected = ui->legacy_cursor;
|
||||||
|
|
||||||
|
cfg[1].name = NULL;
|
||||||
|
cfg[1].type = C_END;
|
||||||
|
|
||||||
|
return cfg;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_prefs(game_ui *ui, const config_item *cfg)
|
||||||
|
{
|
||||||
|
ui->legacy_cursor = cfg[0].u.choices.selected;
|
||||||
|
}
|
||||||
|
|
||||||
static void free_ui(game_ui *ui)
|
static void free_ui(game_ui *ui)
|
||||||
{
|
{
|
||||||
sfree(ui);
|
sfree(ui);
|
||||||
|
@ -890,7 +920,7 @@ static void game_changed_state(game_ui *ui, const game_state *oldstate,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef unsigned short dsflags;
|
typedef int dsflags;
|
||||||
|
|
||||||
struct game_drawstate {
|
struct game_drawstate {
|
||||||
int tilesize;
|
int tilesize;
|
||||||
|
@ -921,9 +951,6 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
||||||
|
|
||||||
if (OUT_OF_BOUNDS(gx, gy, w, h)) return NULL;
|
if (OUT_OF_BOUNDS(gx, gy, w, h)) return NULL;
|
||||||
|
|
||||||
ui->x = gx;
|
|
||||||
ui->y = gy;
|
|
||||||
|
|
||||||
/* find edge closest to click point */
|
/* find edge closest to click point */
|
||||||
possible &=~ (2*px < TILESIZE ? BORDER_R : BORDER_L);
|
possible &=~ (2*px < TILESIZE ? BORDER_R : BORDER_L);
|
||||||
possible &=~ (2*py < TILESIZE ? BORDER_D : BORDER_U);
|
possible &=~ (2*py < TILESIZE ? BORDER_D : BORDER_U);
|
||||||
|
@ -934,6 +961,9 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
||||||
for (dir = 0; dir < 4 && BORDER(dir) != possible; ++dir);
|
for (dir = 0; dir < 4 && BORDER(dir) != possible; ++dir);
|
||||||
if (dir == 4) return NULL; /* there's not exactly one such edge */
|
if (dir == 4) return NULL; /* there's not exactly one such edge */
|
||||||
|
|
||||||
|
ui->x = min(max(2*gx + 1 + dx[dir], 1), 2*w-1);
|
||||||
|
ui->y = min(max(2*gy + 1 + dy[dir], 1), 2*h-1);
|
||||||
|
|
||||||
hx = gx + dx[dir];
|
hx = gx + dx[dir];
|
||||||
hy = gy + dy[dir];
|
hy = gy + dy[dir];
|
||||||
|
|
||||||
|
@ -963,17 +993,17 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_CURSOR_MOVE(button)) {
|
if (IS_CURSOR_MOVE(button)) {
|
||||||
if (control || shift) {
|
if(ui->legacy_cursor && (control || shift)) {
|
||||||
borderflag flag = 0, newflag;
|
borderflag flag = 0, newflag;
|
||||||
int dir, i = ui->y * w + ui->x;
|
int dir, i = (ui->y/2) * w + (ui->x/2);
|
||||||
ui->show = true;
|
ui->show = true;
|
||||||
x = ui->x;
|
x = ui->x/2;
|
||||||
y = ui->y;
|
y = ui->y/2;
|
||||||
move_cursor(button, &x, &y, w, h, false, NULL);
|
move_cursor(button, &x, &y, w, h, false, NULL);
|
||||||
if (OUT_OF_BOUNDS(x, y, w, h)) return NULL;
|
if (OUT_OF_BOUNDS(x, y, w, h)) return NULL;
|
||||||
|
|
||||||
for (dir = 0; dir < 4; ++dir)
|
for (dir = 0; dir < 4; ++dir)
|
||||||
if (dx[dir] == x - ui->x && dy[dir] == y - ui->y) break;
|
if (dx[dir] == x - ui->x/2 && dy[dir] == y - ui->y/2) break;
|
||||||
if (dir == 4) return NULL; /* how the ... ?! */
|
if (dir == 4) return NULL; /* how the ... ?! */
|
||||||
|
|
||||||
if (control) flag |= BORDER(dir);
|
if (control) flag |= BORDER(dir);
|
||||||
|
@ -987,9 +1017,67 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
||||||
if (control) newflag |= BORDER(FLIP(dir));
|
if (control) newflag |= BORDER(FLIP(dir));
|
||||||
if (shift) newflag |= DISABLED(BORDER(FLIP(dir)));
|
if (shift) newflag |= DISABLED(BORDER(FLIP(dir)));
|
||||||
return string(80, "F%d,%d,%dF%d,%d,%d",
|
return string(80, "F%d,%d,%dF%d,%d,%d",
|
||||||
ui->x, ui->y, flag, x, y, newflag);
|
ui->x/2, ui->y/2, flag, x, y, newflag);
|
||||||
} else
|
} else {
|
||||||
return move_cursor(button, &ui->x, &ui->y, w, h, false, &ui->show);
|
/* TODO: Refactor this and other half-grid cursor games
|
||||||
|
* (Tracks, etc.) */
|
||||||
|
int dx = (button == CURSOR_LEFT) ? -1 : ((button == CURSOR_RIGHT) ? +1 : 0);
|
||||||
|
int dy = (button == CURSOR_DOWN) ? +1 : ((button == CURSOR_UP) ? -1 : 0);
|
||||||
|
|
||||||
|
if(ui->legacy_cursor) {
|
||||||
|
dx *= 2; dy *= 2;
|
||||||
|
|
||||||
|
ui->x |= 1;
|
||||||
|
ui->y |= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ui->show) {
|
||||||
|
ui->show = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->x = min(max(ui->x + dx, 1), 2*w-1);
|
||||||
|
ui->y = min(max(ui->y + dy, 1), 2*h-1);
|
||||||
|
|
||||||
|
return MOVE_UI_UPDATE;
|
||||||
|
}
|
||||||
|
} else if (IS_CURSOR_SELECT(button)) {
|
||||||
|
int px = ui->x % 2, py = ui->y % 2;
|
||||||
|
int gx = ui->x / 2, gy = ui->y / 2;
|
||||||
|
int dir = (px == 0) ? 3 : 0; /* left = 3; up = 0 */
|
||||||
|
int hx = gx + dx[dir];
|
||||||
|
int hy = gy + dy[dir];
|
||||||
|
|
||||||
|
int i = gy * w + gx;
|
||||||
|
|
||||||
|
if(!ui->show) {
|
||||||
|
ui->show = true;
|
||||||
|
return MOVE_UI_UPDATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* clicks on square corners and centers do nothing */
|
||||||
|
if (px == py)
|
||||||
|
return MOVE_NO_EFFECT;
|
||||||
|
|
||||||
|
/* TODO: Refactor this and the mouse click handling code
|
||||||
|
* above. */
|
||||||
|
switch ((button == CURSOR_SELECT2) |
|
||||||
|
((state->borders[i] & BORDER(dir)) >> dir << 1) |
|
||||||
|
((state->borders[i] & DISABLED(BORDER(dir))) >> dir >> 2)) {
|
||||||
|
|
||||||
|
case MAYBE_LEFT:
|
||||||
|
case ON_LEFT:
|
||||||
|
case ON_RIGHT:
|
||||||
|
return string(80, "F%d,%d,%dF%d,%d,%d",
|
||||||
|
gx, gy, BORDER(dir),
|
||||||
|
hx, hy, BORDER(FLIP(dir)));
|
||||||
|
|
||||||
|
case MAYBE_RIGHT:
|
||||||
|
case OFF_LEFT:
|
||||||
|
case OFF_RIGHT:
|
||||||
|
return string(80, "F%d,%d,%dF%d,%d,%d",
|
||||||
|
gx, gy, DISABLED(BORDER(dir)),
|
||||||
|
hx, hy, DISABLED(BORDER(FLIP(dir))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1098,7 +1186,7 @@ static float *game_colours(frontend *fe, int *ncolours)
|
||||||
#define F_ERROR_L BORDER_ERROR(BORDER_L) /* BIT(11) */
|
#define F_ERROR_L BORDER_ERROR(BORDER_L) /* BIT(11) */
|
||||||
#define F_ERROR_CLUE BIT(12)
|
#define F_ERROR_CLUE BIT(12)
|
||||||
#define F_FLASH BIT(13)
|
#define F_FLASH BIT(13)
|
||||||
#define F_CURSOR BIT(14)
|
#define CONTAINS_CURSOR(x) ((x) << 14)
|
||||||
|
|
||||||
static game_drawstate *game_new_drawstate(drawing *dr, const game_state *state)
|
static game_drawstate *game_new_drawstate(drawing *dr, const game_state *state)
|
||||||
{
|
{
|
||||||
|
@ -1132,9 +1220,6 @@ static void draw_tile(drawing *dr, game_drawstate *ds, int r, int c,
|
||||||
draw_rect(dr, x + WIDTH, y + WIDTH, TILESIZE - WIDTH, TILESIZE - WIDTH,
|
draw_rect(dr, x + WIDTH, y + WIDTH, TILESIZE - WIDTH, TILESIZE - WIDTH,
|
||||||
(flags & F_FLASH ? COL_FLASH : COL_BACKGROUND));
|
(flags & F_FLASH ? COL_FLASH : COL_BACKGROUND));
|
||||||
|
|
||||||
if (flags & F_CURSOR)
|
|
||||||
draw_rect_corners(dr, x + CENTER, y + CENTER, TILESIZE / 3, COL_GRID);
|
|
||||||
|
|
||||||
if (clue != EMPTY) {
|
if (clue != EMPTY) {
|
||||||
char buf[2];
|
char buf[2];
|
||||||
buf[0] = '0' + clue;
|
buf[0] = '0' + clue;
|
||||||
|
@ -1158,6 +1243,47 @@ static void draw_tile(drawing *dr, game_drawstate *ds, int r, int c,
|
||||||
draw_update(dr, x, y, TILESIZE + WIDTH, TILESIZE + WIDTH);
|
draw_update(dr, x, y, TILESIZE + WIDTH, TILESIZE + WIDTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void draw_cursor(drawing *dr, game_drawstate *ds,
|
||||||
|
int cur_x, int cur_y, bool legacy_cursor)
|
||||||
|
{
|
||||||
|
int off_x = cur_x % 2, off_y = cur_y % 2;
|
||||||
|
|
||||||
|
/* Figure out the tile coordinates corresponding to these cursor
|
||||||
|
* coordinates. */
|
||||||
|
int x = MARGIN + TILESIZE * (cur_x / 2), y = MARGIN + TILESIZE * (cur_y / 2);
|
||||||
|
|
||||||
|
/* off_x and off_y are either 0 or 1. The possible cases are
|
||||||
|
* therefore:
|
||||||
|
*
|
||||||
|
* (0, 0): the cursor is in the top left corner of the tile.
|
||||||
|
* (0, 1): the cursor is on the left border of the tile.
|
||||||
|
* (1, 0): the cursor is on the top border of the tile.
|
||||||
|
* (1, 1): the cursor is in the center of the tile.
|
||||||
|
*/
|
||||||
|
enum { TOP_LEFT_CORNER, LEFT_BORDER, TOP_BORDER, TILE_CENTER } cur_type = (off_x << 1) + off_y;
|
||||||
|
|
||||||
|
int center_x = x + ((off_x == 0) ? WIDTH/2 : CENTER),
|
||||||
|
center_y = y + ((off_y == 0) ? WIDTH/2 : CENTER);
|
||||||
|
|
||||||
|
struct { int w, h; } cursor_dimensions[] = {
|
||||||
|
{ TILESIZE / 3, TILESIZE / 3 }, /* top left corner */
|
||||||
|
{ TILESIZE / 3, 2 * TILESIZE / 3}, /* left border */
|
||||||
|
{ 2 * TILESIZE / 3, TILESIZE / 3}, /* top border */
|
||||||
|
{ 2 * TILESIZE / 3, 2 * TILESIZE / 3 } /* center */
|
||||||
|
}, *dims = cursor_dimensions + cur_type;
|
||||||
|
|
||||||
|
if(legacy_cursor && cur_type == TILE_CENTER)
|
||||||
|
draw_rect_corners(dr, center_x, center_y, TILESIZE / 3, COL_GRID);
|
||||||
|
else
|
||||||
|
draw_rect_outline(dr,
|
||||||
|
center_x - dims->w / 2, center_y - dims->h / 2,
|
||||||
|
dims->w, dims->h, COL_GRID);
|
||||||
|
|
||||||
|
draw_update(dr,
|
||||||
|
center_x - dims->w / 2, center_y - dims->h / 2,
|
||||||
|
dims->w, dims->h);
|
||||||
|
}
|
||||||
|
|
||||||
#define FLASH_TIME 0.7F
|
#define FLASH_TIME 0.7F
|
||||||
|
|
||||||
static void game_redraw(drawing *dr, game_drawstate *ds,
|
static void game_redraw(drawing *dr, game_drawstate *ds,
|
||||||
|
@ -1203,8 +1329,13 @@ static void game_redraw(drawing *dr, game_drawstate *ds,
|
||||||
if (clue != EMPTY && (on > clue || clue > 4 - off))
|
if (clue != EMPTY && (on > clue || clue > 4 - off))
|
||||||
flags |= F_ERROR_CLUE;
|
flags |= F_ERROR_CLUE;
|
||||||
|
|
||||||
if (ui->show && ui->x == c && ui->y == r)
|
if (ui->show) {
|
||||||
flags |= F_CURSOR;
|
int u, v;
|
||||||
|
for(u = 0; u < 3; u++)
|
||||||
|
for(v = 0; v < 3; v++)
|
||||||
|
if(ui->x == 2*c+u && ui->y == 2*r+v)
|
||||||
|
flags |= CONTAINS_CURSOR(BIT(3*u+v));
|
||||||
|
}
|
||||||
|
|
||||||
/* border errors */
|
/* border errors */
|
||||||
for (dir = 0; dir < 4; ++dir) {
|
for (dir = 0; dir < 4; ++dir) {
|
||||||
|
@ -1248,6 +1379,9 @@ static void game_redraw(drawing *dr, game_drawstate *ds,
|
||||||
draw_tile(dr, ds, r, c, ds->grid[i], clue);
|
draw_tile(dr, ds, r, c, ds->grid[i], clue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ui->show)
|
||||||
|
draw_cursor(dr, ds, ui->x, ui->y, ui->legacy_cursor);
|
||||||
|
|
||||||
dsf_free(black_border_dsf);
|
dsf_free(black_border_dsf);
|
||||||
dsf_free(yellow_border_dsf);
|
dsf_free(yellow_border_dsf);
|
||||||
}
|
}
|
||||||
|
@ -1375,7 +1509,7 @@ const struct game thegame = {
|
||||||
free_game,
|
free_game,
|
||||||
true, solve_game,
|
true, solve_game,
|
||||||
true, game_can_format_as_text_now, game_text_format,
|
true, game_can_format_as_text_now, game_text_format,
|
||||||
NULL, NULL, /* get_prefs, set_prefs */
|
get_prefs, set_prefs, /* get_prefs, set_prefs */
|
||||||
new_ui,
|
new_ui,
|
||||||
free_ui,
|
free_ui,
|
||||||
NULL, /* encode_ui */
|
NULL, /* encode_ui */
|
||||||
|
|
|
@ -3519,10 +3519,15 @@ Palisade was contributed to this collection by Jonas K\u00F6{oe}lker.
|
||||||
\H{palisade-controls} \I{controls, for Palisade}Palisade controls
|
\H{palisade-controls} \I{controls, for Palisade}Palisade controls
|
||||||
|
|
||||||
Left-click to place an edge. Right-click to indicate \q{no edge}.
|
Left-click to place an edge. Right-click to indicate \q{no edge}.
|
||||||
Alternatively, the arrow keys will move a keyboard cursor. Holding
|
|
||||||
Control while pressing an arrow key will place an edge. Press
|
Alternatively, the arrow keys will move a keyboard cursor. Depending
|
||||||
Shift-arrowkey to switch off an edge. Repeat an action to perform
|
on the \q{Cursor mode} preference (see \k{palisade-prefs}), the cursor
|
||||||
its inverse.
|
will either navigate among the grid squares, or along their
|
||||||
|
borders. In \q{Full-grid} mode, hold Control while pressing an arrow
|
||||||
|
key to place an edge, and press Shift-arrowkey to switch off an
|
||||||
|
edge. In \q{Half-grid} mode, press Enter to place an edge, and Space
|
||||||
|
to switch off an edge. In either mode, you can repeat an action to
|
||||||
|
perform its inverse.
|
||||||
|
|
||||||
(All the actions described in \k{common-actions} are also available.)
|
(All the actions described in \k{common-actions} are also available.)
|
||||||
|
|
||||||
|
@ -3539,6 +3544,13 @@ These parameters are available from the \q{Custom...} option on the
|
||||||
|
|
||||||
\dd The size of the regions into which the grid must be subdivided.
|
\dd The size of the regions into which the grid must be subdivided.
|
||||||
|
|
||||||
|
\H{palisade-prefs} \I{preferences, for Palisade}Palisade user preferences
|
||||||
|
|
||||||
|
On platforms that support user preferences, the \q{Preferences} option
|
||||||
|
on the \q{Game} menu will let you configure the behavior of the cursor
|
||||||
|
keys to either navigate among full grid squares, or along the borders
|
||||||
|
of the grid squares.
|
||||||
|
|
||||||
\C{mosaic} \i{Mosaic}
|
\C{mosaic} \i{Mosaic}
|
||||||
|
|
||||||
\cfg{winhelp-topic}{games.mosaic}
|
\cfg{winhelp-topic}{games.mosaic}
|
||||||
|
|
|
@ -1895,8 +1895,9 @@ static void draw_star(drawing *dr, int cx, int cy, int rad, int npoints,
|
||||||
coords = snewn(npoints * 2 * 2, int);
|
coords = snewn(npoints * 2 * 2, int);
|
||||||
|
|
||||||
for (n = 0; n < npoints * 2; n++) {
|
for (n = 0; n < npoints * 2; n++) {
|
||||||
a = 2.0 * PI * ((double)n / ((double)npoints * 2.0)) + angle_offset;
|
/* hack to accomodate rockbox's concave polygon drawing */
|
||||||
r = (n % 2) ? (double)rad/2.0 : (double)rad;
|
a = 2.0 * PI * ((double)n / ((double)npoints * 2.0)) + angle_offset - PI / npoints;
|
||||||
|
r = (n % 2 == 0) ? (double)rad/2.0 : (double)rad;
|
||||||
|
|
||||||
/* We're rotating the point at (0, -r) by a degrees */
|
/* We're rotating the point at (0, -r) by a degrees */
|
||||||
coords[2*n+0] = cx + (int)( r * sin(a));
|
coords[2*n+0] = cx + (int)( r * sin(a));
|
||||||
|
|
|
@ -1844,18 +1844,18 @@ static void draw_gt(drawing *dr, int ox, int oy,
|
||||||
{
|
{
|
||||||
int coords[12];
|
int coords[12];
|
||||||
int xdx = (dx1+dx2 ? 0 : 1), xdy = (dx1+dx2 ? 1 : 0);
|
int xdx = (dx1+dx2 ? 0 : 1), xdy = (dx1+dx2 ? 1 : 0);
|
||||||
coords[0] = ox + xdx;
|
coords[0] = ox + xdx + dx1;
|
||||||
coords[1] = oy + xdy;
|
coords[1] = oy + xdy + dy1;
|
||||||
coords[2] = ox + xdx + dx1;
|
coords[2] = ox + xdx + dx1 + dx2;
|
||||||
coords[3] = oy + xdy + dy1;
|
coords[3] = oy + xdy + dy1 + dy2;
|
||||||
coords[4] = ox + xdx + dx1 + dx2;
|
coords[4] = ox - xdx + dx1 + dx2;
|
||||||
coords[5] = oy + xdy + dy1 + dy2;
|
coords[5] = oy - xdy + dy1 + dy2;
|
||||||
coords[6] = ox - xdx + dx1 + dx2;
|
coords[6] = ox - xdx + dx1;
|
||||||
coords[7] = oy - xdy + dy1 + dy2;
|
coords[7] = oy - xdy + dy1;
|
||||||
coords[8] = ox - xdx + dx1;
|
coords[8] = ox - xdx;
|
||||||
coords[9] = oy - xdy + dy1;
|
coords[9] = oy - xdy;
|
||||||
coords[10] = ox - xdx;
|
coords[10] = ox + xdx;
|
||||||
coords[11] = oy - xdy;
|
coords[11] = oy + xdy;
|
||||||
draw_polygon(dr, coords, 6, col, col);
|
draw_polygon(dr, coords, 6, col, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue