forked from len0rd/rockbox
puzzles: resync with upstream
This brings the puzzles source in sync with Simon's branch, commit fd304c5 (from March 2024), with some added Rockbox-specific compatibility changes: https://www.franklinwei.com/git/puzzles/commit/?h=rockbox-devel&id=516830d9d76bdfe64fe5ccf2a9b59c33f5c7c078 There are quite a lot of backend changes, including a new "Mosaic" puzzle. In addition, some new frontend changes were necessary: - New "Preferences" menu to access the user preferences system. - Enabled spacebar input for several games. Change-Id: I94c7df674089c92f32d5f07025f6a1059068af1e
This commit is contained in:
parent
c72030f98c
commit
09aa8de52c
184 changed files with 27833 additions and 15572 deletions
|
|
@ -36,6 +36,9 @@ BEGIN {
|
|||
if($3 ~ "Rectangles")
|
||||
file = "help/rect.c";
|
||||
|
||||
if($3 ~ "Train")
|
||||
file = "help/tracks.c";
|
||||
|
||||
print "/* auto-generated by genhelp.sh (intermediate file) */" > file;
|
||||
print "/* DO NOT EDIT! */" > file;
|
||||
print "const char help_text[] = " > file;
|
||||
|
|
@ -87,8 +90,24 @@ do
|
|||
mv $f.tmp $f
|
||||
done
|
||||
|
||||
# generate quick help from all the .R files
|
||||
cat src/*.R | awk 'print_next { print_next = 0; print; } /!begin/ && />/ && /gamedesc.txt/ { print_next = 1; }' | awk -F ":" '{print "const char quick_help_text[] = \""$5"\";" >> "help/"$1".c" }'
|
||||
# Generate quick help by parsing the CMakeLists.txt file to isolate
|
||||
# the "Objective" text for each puzzle.
|
||||
cat <<EOF > parsed_cmakelists.txt
|
||||
function(puzzle NAME)
|
||||
cmake_parse_arguments(OPT
|
||||
"" "DISPLAYNAME;DESCRIPTION;OBJECTIVE;WINDOWS_EXE_NAME" "" \${ARGN})
|
||||
|
||||
message("\${NAME}:\${OPT_OBJECTIVE}")
|
||||
endfunction()
|
||||
EOF
|
||||
|
||||
# This parses out the puzzle(...) definitions from CMakeLists.
|
||||
|
||||
# TODO: Perhaps ask Simon to include special header/footer comments to
|
||||
# make this less brittle?
|
||||
cat src/CMakeLists.txt | awk '/puzzle\(/{p=1} p{print} /\)/{p=0}' >> parsed_cmakelists.txt
|
||||
cmake -P parsed_cmakelists.txt 2>&1 | awk -F ":" '{print "const char quick_help_text[] = \""$2"\";" >> "help/"$1".c" }'
|
||||
|
||||
rm parsed_cmakelists.txt
|
||||
rm puzzles.txt
|
||||
rm compress
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue