rockbox/apps/plugins/puzzles/icons/screenshot.sh
Franklin Wei 1a6a8b52f7 Port of Simon Tatham's Puzzle Collection
Original revision: 5123b1bf68777ffa86e651f178046b26a87cf2d9

MIT Licensed. Some games still crash and others are unplayable due to
issues with controls. Still need a "real" polygon filling algorithm.

Currently builds one plugin per puzzle (about 40 in total, around 100K
each on ARM), but can easily be made to build a single monolithic
overlay (800K or so on ARM).

The following games are at least partially broken for various reasons,
and have been disabled on this commit:

Cube:     failed assertion with "Icosahedron" setting
Keen:     input issues
Mines:    weird stuff happens on target
Palisade: input issues
Solo:     input issues, occasional crash on target
Towers:   input issues
Undead:   input issues
Unequal:  input and drawing issues (concave polys)
Untangle: input issues

Features left to do:
 - In-game help system
 - Figure out the weird bugs

Change-Id: I7c69b6860ab115f973c8d76799502e9bb3d52368
2016-12-18 18:13:22 +01:00

25 lines
650 B
Bash
Executable file

#!/bin/sh
# Generate a screenshot from a puzzle save file. Takes the
# following arguments, in order:
#
# - the name of the puzzle binary
# - the name of the save file
# - the name of the output image file
# - (optionally) the proportion of the next move to redo before
# taking the screenshot.
#
# This script requires access to an X server in order to run, but
# seems to work fine under xvfb-run if you haven't got a real one
# available (or if you don't want to use it for some reason).
binary="$1"
save="$2"
image="$3"
if test "x$4" != "x"; then
redo="--redo $4"
else
redo=
fi
"$binary" $redo --screenshot "$image" --load "$save"