diff options
| author | Franklin Wei <frankhwei536@gmail.com> | 2016-11-20 15:16:41 -0500 |
|---|---|---|
| committer | Franklin Wei <frankhwei536@gmail.com> | 2016-11-24 16:23:09 -0500 |
| commit | 56c9984511f016eab7e1278ba9e40d88bb59a162 (patch) | |
| tree | 1bfa6d3aeb3bf2a6ffec71387ac073cd0b8b2a51 /apps/plugins/puzzles/webpage.pl | |
| parent | 29648f817677b84c03c2bcfe89eb8cf53653e7db (diff) | |
| download | rockbox-puzzles.zip rockbox-puzzles.tar.gz rockbox-puzzles.tar.bz2 rockbox-puzzles.tar.xz | |
[WIP] Port of Simon Tatham's Puzzle Collectionpuzzles
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.
The following games are at least partially broken for various reasons:
Cube: crash with certain settings
Galaxies: crash
Inertia: crash
Keen: input issues
Loopy: weird stuff happens
Map: crash on input
Mines: weird stuff happens on target
Palisade: input issues
Signpost: crash on input
Solo: input issues
Towers: input and drawing issues
Train Tracks: drawing issues
Twiddle: weird animation on target
Undead: input and drawing issues
Unequal: input and drawing issues
Untangle: input issues
All in all, about 40% of the games are at least partially broken.
Change-Id: I7c69b6860ab115f973c8d76799502e9bb3d52368
Diffstat (limited to 'apps/plugins/puzzles/webpage.pl')
| -rwxr-xr-x | apps/plugins/puzzles/webpage.pl | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/webpage.pl b/apps/plugins/puzzles/webpage.pl new file mode 100755 index 0000000..3a0779e --- /dev/null +++ b/apps/plugins/puzzles/webpage.pl @@ -0,0 +1,69 @@ +#!/usr/bin/perl + +# Construct the two pieces of my main puzzle collection web page that +# need to vary with the set of puzzles: the big list of <span>s with +# puzzle pictures and links etc, and the list of Windows executable +# files down in the downloads section. + +use strict; +use warnings; +use HTML::Entities; + +open my $desc, "<", "gamedesc.txt" + or die "gamedesc.txt: open: $!\n"; + +open my $spans, ">", "wwwspans.html" + or die "wwwspans.html: open: $!\n"; + +open my $links, ">", "wwwlinks.html" + or die "wwwspans.html: open: $!\n"; + +my $n = 0; +while (<$desc>) { + chomp; + my ($id, $win, $displayname, $description, $summary) = split /:/, $_; + + printf $spans + '<span class="puzzle"><table>'. + '<tr><th align="center">%s</th></tr>'. + '<tr><td align="center">'. + '<img style="margin: 0.5em" alt="" title="%s" width=150 height=150 border=0 src="%s-web.png" />'. + '</td></tr>'. + '<tr><td align="center" style="font-size: 70%%"><code>[</code>'. + ' <a href="java/%s.html">java</a> '. + '|'. + ' <a href="js/%s.html">js</a> '. + '|'. + ' <a href="doc/%s.html#%s">manual</a> '. + '<code>]</code><br><code>[</code>'. + ' <a href="%s"><code>%s</code></a> '. + '<code>]</code></td></tr>'. + '<tr><td align="center">%s</td></tr></table></span>'. + "\n", + encode_entities($displayname), + encode_entities($description), + encode_entities($id), + encode_entities($id), + encode_entities($id), + encode_entities($id), + encode_entities($id), + encode_entities($win), + encode_entities($win), + encode_entities($summary); + + if ($n > 0) { + if ($n % 5 == 0) { + print $links "<br />"; + } else { + print $links " | "; + } + } + printf $links '<a href="%s">%s</a>', + encode_entities($win), encode_entities($win); + + $n++; +} + +close $desc; +close $spans; +close $links; |