Fix entering pencil marks from the keyboard; the cursor is no longer removed
(this brings Undead into line with Solo, etc).


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9769 cda61777-01e9-0310-a592-d414129be87e
Make Unruly's keyboard controls match the documentation and other puzzles in
the collection -- now Enter = black and Space = white.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9770 cda61777-01e9-0310-a592-d414129be87e
Clarify instructions for 'Range' -- I initially read the last point as
meaning the maximum white squares in any direction, rather than the total of
all directions.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9771 cda61777-01e9-0310-a592-d414129be87e
Remove a redundant and also erroneous memset.

(If you're going to memset a struct to 0 before filling in the fields
you care about, do use sizeof the struct rather than sizeof the
pointer; but also, if you're filling in _every_ field, there's no need
to bother anyway.)


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9773 cda61777-01e9-0310-a592-d414129be87e
Found a bug in nullgame! Its vestigial game_redraw lacked a
draw_update, which isn't really setting a good example for people
cloning it :-) Add the missing draw_update call.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9776 cda61777-01e9-0310-a592-d414129be87e
Add documentation for the identify_game() function which I introduced
in r9749 and forgot to write up.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9777 cda61777-01e9-0310-a592-d414129be87e
Add a midend function to return the current random seed, parallel to
the existing one that returns the game id. No front end has so far
needed this, but one is about to.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9778 cda61777-01e9-0310-a592-d414129be87e
Edit the paragraph in the midend_deserialise() docs which I forgot to
fix in r9777 when I added documentation of the function it wistfully
imagined might one day exist.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9779 cda61777-01e9-0310-a592-d414129be87e
Introduce a mechanism in this source tree for building the container
web pages for the Java applets. Previously, those have all been
maintained by hand in my website's svn area, which is a bit silly. Now
we have a file per puzzle in the 'html' subdirectory which contains
the puzzle's name, one or two attributes, and the instructions snippet
to go below the puzzle applet; and then there's a Perl script that
builds all the real web pages out of that by adding in the parts
common across all files: the header, footer, and middle fragment with
the <applet> tag and resizing bits and pieces.

One piece _not_ checked in here is the footer text specific to my
hosting at chiark, which I think does still belong in the www area. So
Buildscr doesn't actually build the web pages; it just delivers the
bits and pieces by which my nightly snapshot script will be able to
run the program that _does_ build them, passing that footer as an
extra argument.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9780 cda61777-01e9-0310-a592-d414129be87e
New front end! To complement the webification of my puzzles via Java
applets, here's an alternative webification in Javascript, using
Emscripten in asm.js mode (so that as browsers incorporate asm.js
optimisation, the game generation should run really fast).


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9781 cda61777-01e9-0310-a592-d414129be87e
Forgot to make the web-page-building scripts executable.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9786 cda61777-01e9-0310-a592-d414129be87e
Stop using the dangerously unescaped 'innerHTML' for <option>
contents; use document.createTextNode like I do everywhere else.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9787 cda61777-01e9-0310-a592-d414129be87e
Apply a bodge to arrange that if the user selects Custom from the game
type dropdown, we still get an 'onchange' event if they select it a
second time. Normally this wouldn't happen, because onchange means
what it says and we only get it if a _different_ element is selected.

My solution is to create two list items called Custom, set one of them
as display:none to stop it showing up when the list is dropped down,
and to select it after the configuration box closes.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9788 cda61777-01e9-0310-a592-d414129be87e
Don't forget to restore the correct selection in the dropdown list if
the user cancels a configuration dialog.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9789 cda61777-01e9-0310-a592-d414129be87e
Fix a crash when changing presets in Inertia. Turns out that my
Javascript-side blitter creation function had forgotten to return the
new blitter's id, so the C code was still trying to use blitter #0
after it had been thrown away and replaced.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9790 cda61777-01e9-0310-a592-d414129be87e
Oops. I consistently misspelled my desired lineCap and lineJoin values
as "1" rather than "round". Must have had my Postscript brain in,
and/or been confused by lineWidth = "1" just beforehand. This fixes a
display glitch in Towers, where there's a tiny spike at the top left
corner of each tower due to a very sharp mitred line join.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9791 cda61777-01e9-0310-a592-d414129be87e
Reinstate a missing semicolon.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9792 cda61777-01e9-0310-a592-d414129be87e
Introduce a mechanism by which calls to midend_supersede_game_desc()
can trigger a call to a front end notification function. Use this to
update the game ID permalink when Mines supersedes its game ID.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9793 cda61777-01e9-0310-a592-d414129be87e
Make sure the right element of the game-type dropdown starts off
selected. Previously we were leaving the first element on the list
selected, which is _usually_ right, but not right for Slant.

In the process of doing this, I've also reorganised to fix a crash
which shows up with non-configurable games (admittedly currently only
Nullgame :-) when we still try to call js_select_preset in spite of
not having any preset options to select.


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9794 cda61777-01e9-0310-a592-d414129be87e
Undead was not ever actually draw_update()ing to the edges of its
rectangle, which showed up on the Javascript front end since the JS
canvas doesn't start out defaulting to COL_BACKGROUND. Fixed it to
draw_update to the edge of its area, and while I'm at it, narrowed the
border (since this proves we didn't really need that much space
anyway).


git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9795 cda61777-01e9-0310-a592-d414129be87e