shithub: puzzles

Download patch

ref: 5dda5cf1d039767c632fe5e58ed7b95f5a615c0f
parent: b6ee9debcfe46c7ed4e958511e754f150f4e9773
author: Simon Tatham <anakin@pobox.com>
date: Sat Jun 8 12:29:15 EDT 2013

Rename wingames.lst to gamedesc.txt, and add a couple of extra fields
to it giving each game's "internal" name (as seen in the source file,
.R etc) and also a brief description of the game. The idea of the
latter is that it should be usable as a comment field in .desktop
files and similar.

[originally from svn r9858]

--- a/Buildscr
+++ b/Buildscr
@@ -29,7 +29,7 @@
 in puzzles do make -f Makefile.doc clean
 in puzzles do make -f Makefile.doc chm
 in puzzles do make -f Makefile.doc # build help file for installer
-in puzzles do perl winiss.pl $(revision) wingames.lst > puzzles.iss
+in puzzles do perl winiss.pl $(revision) gamedesc.txt > puzzles.iss
 delegate windows
   # Ignore the poorly controlled return value from HHC, and instead
   # just test that the output file was generated.
@@ -66,7 +66,7 @@
 # approaches such as a third-party CAB generator), I don't think I
 # can sensibly enable this build.
 
-#in puzzles do perl wceinf.pl wingames.lst > puzzles.inf
+#in puzzles do perl wceinf.pl gamedesc.txt > puzzles.inf
 #delegate windows
 #  in puzzles do cmd /c 'wcearmv4 & nmake -f Makefile.wce clean'
 #  in puzzles do cmd /c 'wcearmv4 & nmake -f Makefile.wce VER=-DREVISION=$(revision)'
@@ -89,11 +89,11 @@
 in puzzles/devel do halibut --html -Chtml-contents-filename:index.html -Chtml-index-filename:indexpage.html -Chtml-template-filename:%k.html -Chtml-template-fragment:%k ../devel.but
 
 # Move the deliver-worthy Windows binaries (those specified in
-# wingames.lst, which is generated by mkfiles.pl and helpfully
+# gamedesc.txt, which is generated by mkfiles.pl and helpfully
 # excludes the command-line auxiliary utilities such as solosolver,
 # and nullgame.exe) into a subdirectory for easy access.
 in puzzles do mkdir winbin
-in puzzles do mv `cut -f1 -d: wingames.lst` winbin
+in puzzles do mv `cut -f2 -d: gamedesc.txt` winbin
 
 # Make a zip file of the Windows binaries and help files.
 in puzzles do zip -j puzzles.zip winbin/*.exe puzzles.chm puzzles.hlp puzzles.cnt
--- a/CHECKLST.txt
+++ b/CHECKLST.txt
@@ -17,8 +17,8 @@
  - adds auxiliary solver binaries if any
  - adds it to $(GAMES) in the GTK makefile, for `make install'
  - adds it to list.c for the OS X binary
- - adds it to wingames.lst along with a textual name, for the build
-   system and Windows installer.
+ - adds it to gamedesc.txt, with its Windows executable name, display
+   name, and slightly longer description.
 
 If the puzzle is by a new author, modify the copyright notice in
 LICENCE and in puzzles.but. (Also in index.html, but that's listed
--- a/blackbox.R
+++ b/blackbox.R
@@ -14,6 +14,6 @@
     A(blackbox) \
 !end
 
-!begin >wingames.lst
-blackbox.exe:Black Box
+!begin >gamedesc.txt
+blackbox:blackbox.exe:Black Box:Ball-finding puzzle
 !end
--- a/bridges.R
+++ b/bridges.R
@@ -16,6 +16,6 @@
     A(bridges) \
 !end
 
-!begin >wingames.lst
-bridges.exe:Bridges
+!begin >gamedesc.txt
+bridges:bridges.exe:Bridges:Bridge-placing puzzle
 !end
--- a/cube.R
+++ b/cube.R
@@ -14,6 +14,6 @@
     A(cube) \
 !end
 
-!begin >wingames.lst
-cube.exe:Cube
+!begin >gamedesc.txt
+cube:cube.exe:Cube:Rolling cube puzzle
 !end
--- a/dominosa.R
+++ b/dominosa.R
@@ -16,6 +16,6 @@
     A(dominosa) \
 !end
 
-!begin >wingames.lst
-dominosa.exe:Dominosa
+!begin >gamedesc.txt
+dominosa:dominosa.exe:Dominosa:Domino tiling puzzle
 !end
--- a/fifteen.R
+++ b/fifteen.R
@@ -14,6 +14,6 @@
     A(fifteen) \
 !end
 
-!begin >wingames.lst
-fifteen.exe:Fifteen
+!begin >gamedesc.txt
+fifteen:fifteen.exe:Fifteen:Sliding block puzzle
 !end
--- a/filling.R
+++ b/filling.R
@@ -19,6 +19,6 @@
     A(filling) \
 !end
 
-!begin >wingames.lst
-filling.exe:Filling
+!begin >gamedesc.txt
+filling:filling.exe:Filling:Polyomino puzzle
 !end
--- a/flip.R
+++ b/flip.R
@@ -16,6 +16,6 @@
     A(flip) \
 !end
 
-!begin >wingames.lst
-flip.exe:Flip
+!begin >gamedesc.txt
+flip:flip.exe:Flip:Tile inversion puzzle
 !end
--- a/galaxies.R
+++ b/galaxies.R
@@ -23,6 +23,6 @@
     A(galaxies) \
 !end
 
-!begin >wingames.lst
-galaxies.exe:Galaxies
+!begin >gamedesc.txt
+galaxies:galaxies.exe:Galaxies:Symmetric polyomino puzzle
 !end
--- a/guess.R
+++ b/guess.R
@@ -14,6 +14,6 @@
     A(guess) \
 !end
 
-!begin >wingames.lst
-guess.exe:Guess
+!begin >gamedesc.txt
+guess:guess.exe:Guess:Combination-guessing puzzle
 !end
--- a/inertia.R
+++ b/inertia.R
@@ -14,6 +14,6 @@
     A(inertia) \
 !end
 
-!begin >wingames.lst
-inertia.exe:Inertia
+!begin >gamedesc.txt
+inertia:inertia.exe:Inertia:Gem-collecting puzzle
 !end
--- a/keen.R
+++ b/keen.R
@@ -20,6 +20,6 @@
     A(keen) \
 !end
 
-!begin >wingames.lst
-keen.exe:Keen
+!begin >gamedesc.txt
+keen:keen.exe:Keen:Arithmetic Latin square puzzle
 !end
--- a/lightup.R
+++ b/lightup.R
@@ -19,6 +19,6 @@
     A(lightup) \
 !end
 
-!begin >wingames.lst
-lightup.exe:Light Up
+!begin >gamedesc.txt
+lightup:lightup.exe:Light Up:Light-bulb placing puzzle
 !end
--- a/loopy.R
+++ b/loopy.R
@@ -26,6 +26,6 @@
     A(loopy) \
 !end
 
-!begin >wingames.lst
-loopy.exe:Loopy
+!begin >gamedesc.txt
+loopy:loopy.exe:Loopy:Loop-drawing puzzle
 !end
--- a/magnets.R
+++ b/magnets.R
@@ -19,6 +19,6 @@
     A(magnets) \
 !end
 
-!begin >wingames.lst
-magnets.exe:Magnets
+!begin >gamedesc.txt
+magnets:magnets.exe:Magnets:Magnet-placing puzzle
 !end
--- a/map.R
+++ b/map.R
@@ -19,6 +19,6 @@
     A(map) \
 !end
 
-!begin >wingames.lst
-map.exe:Map
+!begin >gamedesc.txt
+map:map.exe:Map:Map-colouring puzzle
 !end
--- a/mines.R
+++ b/mines.R
@@ -19,6 +19,6 @@
     A(mines) \
 !end
 
-!begin >wingames.lst
-mines.exe:Mines
+!begin >gamedesc.txt
+mines:mines.exe:Mines:Mine-finding puzzle
 !end
--- a/net.R
+++ b/net.R
@@ -18,6 +18,6 @@
     A(net) \
 !end
 
-!begin >wingames.lst
-netgame.exe:Net
+!begin >gamedesc.txt
+net:netgame.exe:Net:Network jigsaw puzzle
 !end
--- a/netslide.R
+++ b/netslide.R
@@ -16,6 +16,6 @@
     A(netslide) \
 !end
 
-!begin >wingames.lst
-netslide.exe:Netslide
+!begin >gamedesc.txt
+netslide:netslide.exe:Netslide:Toroidal sliding network puzzle
 !end
--- a/pattern.R
+++ b/pattern.R
@@ -17,6 +17,6 @@
     A(pattern) \
 !end
 
-!begin >wingames.lst
-pattern.exe:Pattern
+!begin >gamedesc.txt
+pattern:pattern.exe:Pattern:Pattern puzzle
 !end
--- a/pearl.R
+++ b/pearl.R
@@ -18,6 +18,6 @@
     A(pearl) \
 !end
 
-!begin >wingames.lst
-pearl.exe:Pearl
+!begin >gamedesc.txt
+pearl:pearl.exe:Pearl:Loop-drawing puzzle
 !end
--- a/pegs.R
+++ b/pegs.R
@@ -16,6 +16,6 @@
     A(pegs) \
 !end
 
-!begin >wingames.lst
-pegs.exe:Pegs
+!begin >gamedesc.txt
+pegs:pegs.exe:Pegs:Peg solitaire puzzle
 !end
--- a/range.R
+++ b/range.R
@@ -14,6 +14,6 @@
     A(range) \
 !end
 
-!begin >wingames.lst
-range.exe:Range
+!begin >gamedesc.txt
+range:range.exe:Range:Visible-distance puzzle
 !end
--- a/rect.R
+++ b/rect.R
@@ -14,6 +14,6 @@
     A(rect) \
 !end
 
-!begin >wingames.lst
-rect.exe:Rectangles
+!begin >gamedesc.txt
+rect:rect.exe:Rectangles:Rectangles puzzle
 !end
--- a/samegame.R
+++ b/samegame.R
@@ -14,6 +14,6 @@
     A(samegame) \
 !end
 
-!begin >wingames.lst
-samegame.exe:Same Game
+!begin >gamedesc.txt
+samegame:samegame.exe:Same Game:Block-clearing puzzle
 !end
--- a/signpost.R
+++ b/signpost.R
@@ -18,6 +18,6 @@
     A(signpost) \
 !end
 
-!begin >wingames.lst
-signpost.exe:Signpost
+!begin >gamedesc.txt
+signpost:signpost.exe:Signpost:Square-connecting puzzle
 !end
--- a/singles.R
+++ b/singles.R
@@ -18,6 +18,6 @@
     A(singles) \
 !end
 
-!begin >wingames.lst
-singles.exe:Singles
+!begin >gamedesc.txt
+singles:singles.exe:Singles:Number-removing puzzle
 !end
--- a/sixteen.R
+++ b/sixteen.R
@@ -14,6 +14,6 @@
     A(sixteen) \
 !end
 
-!begin >wingames.lst
-sixteen.exe:Sixteen
+!begin >gamedesc.txt
+sixteen:sixteen.exe:Sixteen:Toroidal sliding block puzzle
 !end
--- a/slant.R
+++ b/slant.R
@@ -19,6 +19,6 @@
     A(slant) \
 !end
 
-!begin >wingames.lst
-slant.exe:Slant
+!begin >gamedesc.txt
+slant:slant.exe:Slant:Maze-drawing puzzle
 !end
--- a/solo.R
+++ b/solo.R
@@ -19,6 +19,6 @@
     A(solo) \
 !end
 
-!begin >wingames.lst
-solo.exe:Solo
+!begin >gamedesc.txt
+solo:solo.exe:Solo:Number placement puzzle
 !end
--- a/tents.R
+++ b/tents.R
@@ -19,6 +19,6 @@
     A(tents) \
 !end
 
-!begin >wingames.lst
-tents.exe:Tents
+!begin >gamedesc.txt
+tents:tents.exe:Tents:Tent-placing puzzle
 !end
--- a/towers.R
+++ b/towers.R
@@ -20,6 +20,6 @@
     A(towers) \
 !end
 
-!begin >wingames.lst
-towers.exe:Towers
+!begin >gamedesc.txt
+towers:towers.exe:Towers:Tower-placing Latin square puzzle
 !end
--- a/twiddle.R
+++ b/twiddle.R
@@ -14,6 +14,6 @@
     A(twiddle) \
 !end
 
-!begin >wingames.lst
-twiddle.exe:Twiddle
+!begin >gamedesc.txt
+twiddle:twiddle.exe:Twiddle:Rotational sliding block puzzle
 !end
--- a/undead.R
+++ b/undead.R
@@ -13,6 +13,6 @@
     A(undead) \
 !end
 
-!begin >wingames.lst
-undead.exe:Undead
+!begin >gamedesc.txt
+undead:undead.exe:Undead:Monster-placing puzzle
 !end
--- a/unequal.R
+++ b/unequal.R
@@ -22,6 +22,6 @@
     A(unequal) \
 !end
 
-!begin >wingames.lst
-unequal.exe:Unequal
+!begin >gamedesc.txt
+unequal:unequal.exe:Unequal:Latin square puzzle
 !end
--- a/unfinished/group.R
+++ b/unfinished/group.R
@@ -20,6 +20,6 @@
     A(group) \
 !end
 
-!begin >wingames.lst
-group.exe:Group
+!begin >gamedesc.txt
+unfinished/group:group.exe:Group:Group theory puzzle
 !end
--- a/unfinished/separate.R
+++ b/unfinished/separate.R
@@ -16,6 +16,6 @@
     A(separate) \
 !end
 
-!begin >wingames.lst
-separate.exe:Separate
+!begin >gamedesc.txt
+unfinished/separate:separate.exe:Separate:Rectangle-dividing puzzle
 !end
--- a/unfinished/slide.R
+++ b/unfinished/slide.R
@@ -19,6 +19,6 @@
     A(slide) \
 !end
 
-!begin >wingames.lst
-slide.exe:Slide
+!begin >gamedesc.txt
+unfinished/slide:slide.exe:Slide:Sliding block puzzle
 !end
--- a/unfinished/sokoban.R
+++ b/unfinished/sokoban.R
@@ -14,6 +14,6 @@
     A(sokoban) \
 !end
 
-!begin >wingames.lst
-sokoban.exe:Sokoban
+!begin >gamedesc.txt
+unfinished/sokoban:sokoban.exe:Sokoban:Barrel-pushing puzzle
 !end
--- a/unruly.R
+++ b/unruly.R
@@ -16,6 +16,6 @@
     A(unruly) \
 !end
 
-!begin >wingames.lst
-unruly.exe:Unruly
+!begin >gamedesc.txt
+unruly:unruly.exe:Unruly:Black and white grid puzzle
 !end
--- a/untangle.R
+++ b/untangle.R
@@ -16,6 +16,6 @@
     A(untangle) \
 !end
 
-!begin >wingames.lst
-untangle.exe:Untangle
+!begin >gamedesc.txt
+untangle:untangle.exe:Untangle:Planar graph layout puzzle
 !end
--- a/wceinf.pl
+++ b/wceinf.pl
@@ -2,22 +2,22 @@
 
 # Perl script to generate a .INF file for building a Pocket PC .CAB
 # archive of Puzzles. This has to be scripted so that it can read
-# wingames.lst and automatically adjust to the current available
+# gamedesc.txt and automatically adjust to the current available
 # set of puzzles.
 
 # Usage:
 #
-#   $ ./wceinf.pl wingames.lst > puzzles.inf
+#   $ ./wceinf.pl gamedesc.txt > puzzles.inf
 
-$lst = shift @ARGV;
-open LST, "<", $lst;
-while (<LST>) {
+$desc = shift @ARGV;
+open DESC, "<", $desc;
+while (<DESC>) {
     chomp;
-    split /:/;
-    push @exes, $_[0];
-    $names{$_[0]} = $_[1];
+    @_ = split /:/;
+    push @exes, $_[1];
+    $names{$_[1]} = $_[2];
 }
-close LST;
+close DESC;
 
 print '[Version]'."\n";
 print 'Signature   = "$Windows NT$"    ; required as-is'."\n";
--- a/winiss.pl
+++ b/winiss.pl
@@ -1,12 +1,12 @@
 #!/usr/bin/perl
 
 # Perl script to generate an Inno Setup installer script for
-# Puzzles. This has to be scripted so that it can read wingames.lst
+# Puzzles. This has to be scripted so that it can read gamedesc.txt
 # and automatically adjust to the current available set of puzzles.
 
 # Usage:
 #
-#   $ ./winiss.pl 1234 wingames.lst > puzzles.iss
+#   $ ./winiss.pl 1234 gamedesc.txt > puzzles.iss
 #
 # where `1234' is the revision number which will be encoded in the
 # installer's version indicators.
@@ -15,15 +15,15 @@
 
 $rev = shift @ARGV;
 ($revclean=$rev) =~ s/M$//;
-$lst = shift @ARGV;
-open LST, "<", $lst;
-while (<LST>) {
+$desc = shift @ARGV;
+open DESC, "<", $desc;
+while (<DESC>) {
     chomp;
     @_ = split /:/;
-    push @exes, $_[0];
-    $names{$_[0]} = $_[1];
+    push @exes, $_[1];
+    $names{$_[1]} = $_[2];
 }
-close LST;
+close DESC;
 
 print '; -*- no -*-'."\n";
 print ';'."\n";