diff options
author | Franklin Wei <git@fwei.tk> | 2017-04-29 18:21:56 -0400 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2017-04-29 18:24:42 -0400 |
commit | 881746789a489fad85aae8317555f73dbe261556 (patch) | |
tree | cec2946362c4698c8db3c10f3242ef546c2c22dd /apps/plugins/puzzles/src/icons/screenshot.sh | |
parent | 03dd4b92be7dcd5c8ab06da3810887060e06abd5 (diff) | |
download | rockbox-881746789a489fad85aae8317555f73dbe261556.tar.gz rockbox-881746789a489fad85aae8317555f73dbe261556.zip |
puzzles: refactor and resync with upstream
This brings puzzles up-to-date with upstream revision
2d333750272c3967cfd5cd3677572cddeaad5932, though certain changes made
by me, including cursor-only Untangle and some compilation fixes
remain. Upstream code has been moved to its separate subdirectory and
future syncs can be done by simply copying over the new sources.
Change-Id: Ia6506ca5f78c3627165ea6791d38db414ace0804
Diffstat (limited to 'apps/plugins/puzzles/src/icons/screenshot.sh')
-rwxr-xr-x | apps/plugins/puzzles/src/icons/screenshot.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/src/icons/screenshot.sh b/apps/plugins/puzzles/src/icons/screenshot.sh new file mode 100755 index 0000000000..0e2a06eea7 --- /dev/null +++ b/apps/plugins/puzzles/src/icons/screenshot.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Generate a screenshot from a puzzle save file. Takes the | ||
4 | # following arguments, in order: | ||
5 | # | ||
6 | # - the name of the puzzle binary | ||
7 | # - the name of the save file | ||
8 | # - the name of the output image file | ||
9 | # - (optionally) the proportion of the next move to redo before | ||
10 | # taking the screenshot. | ||
11 | # | ||
12 | # This script requires access to an X server in order to run, but | ||
13 | # seems to work fine under xvfb-run if you haven't got a real one | ||
14 | # available (or if you don't want to use it for some reason). | ||
15 | |||
16 | binary="$1" | ||
17 | save="$2" | ||
18 | image="$3" | ||
19 | if test "x$4" != "x"; then | ||
20 | redo="--redo $4" | ||
21 | else | ||
22 | redo= | ||
23 | fi | ||
24 | |||
25 | "$binary" $redo --screenshot "$image" --load "$save" | ||