H.G. Muller [Mon, 4 Apr 2011 17:26:53 +0000]
Fix animation masks on changing piece pixmaps
The animation masks were not remade when new pieces were loaded
interactively through the board-options dialog.
H.G. Muller [Mon, 4 Apr 2011 17:09:21 +0000]
Fix linegap option in board dialog
The lineGC was not recalculated, so the grid lines stayed the same
thickness. In addition, setting the line-gap override to -1 now
retrieves the original line gap that belongs to the current board size.
H.G. Muller [Sat, 5 Mar 2011 22:27:48 +0000]
Make a kind of ICS text menu in XBoard as a dialog
The dialog with buttons can be opened from the View menu. It is
configured by the option -icsMenu; a default setting for this is
included in the master settings file.
The commands specified by the -icsMenu can now contain $name and $input
keywords, which will be replaced by the current primary selection, or
text the user types, respectively. Commands that contain $name will not
be sent when the current selection is empty. Commands that do not
contain $input will be sent to the ICS immediately; otherwise they will
be placed in the ICS Input Box, with the cursor at the point of the
$input, and input focus given to the Input Box, so the user can start
typing. When a command is prefixed by "$add " it will be appended to the
existing ICS Input Box contents, rather than replace it.
The items now have to be separated by ";\n", and button text from
command by ';' (with optional linefeed). This allows configuring of
multi-line commands, as a single linefeed no longer has special
sigificance.
H.G. Muller [Thu, 31 Mar 2011 11:36:05 +0000]
Redo ICS input box with generic popup
This box is just a single text edit, but the complexity is in the added
callbacks. These callbacks remain in xboard.c, and were altered to
access the edit through the option.handle field.
H.G. Muller [Sun, 3 Apr 2011 10:54:51 +0000]
Activate -path and -file options
In XBoard the generic popup was prepared for this. In WinBoard, for
-path options the BrowseFolder routine is used, and had to be made
global (prototype in winboard.h).
H.G. Muller [Sat, 2 Apr 2011 16:40:33 +0000]
Let generic popup generate Engine Settings dialog
H.G. Muller [Sat, 2 Apr 2011 16:36:09 +0000]
Merge SettingsPopUp into GenericPopUp
Based on currentCps the values read from the dialog are sent to the
engine, or stored into the option.target in the callback, and fetched
from the option.target in the PopUp. The currentCps is cleared in the
generic popdown of a transient dialog.
H.G. Muller [Sun, 6 Mar 2011 09:11:06 +0000]
Make generic dialog popup reentrant
To allow persistent dialogs to be implemented through the generic popup,
it must be possible to have several dialogs open at the same time, and
thus make sure the popdowns under the cacel or close-window button know
which one to pop down. To this end an array shells[] is created that
takes over the function of settingsShell, and GenericPopUp gets an extra
parameter telling it which element to use for storing the dialog shell.
This number is then also passed to the callbacks that trigger popdown.
This was a bit nasty for the CatchDeleteWindow stuff, which passes user
data to the callback as text strings.
Keep a separate up/down indicator, so that shell widgets can be kept
for persistent dialogs. Also keep a currentOption per dialog type.
The coordinates and size of the window is read out and stored in a
WindowPlacement structure, (if one is specified for that dialog), when
the dialog is popped down. When initialized the structure is also used
to set the window parameters when the dialog is created. (The idea being
that the structure was saved in the settings file.)
The routine MarkMenu checkmarks a given menu item, and logs it for the
given dialog type, so that a later popdown automatically unchecks is.
H.G. Muller [Fri, 25 Feb 2011 11:14:25 +0000]
Implement Machine Match menu item and options dialog
An item to start a match from the menu is added, similar to what
WinBoard has. (The code is duplicated, so I guess it should be moved to
the back-end now, as MachineMatchEvent(), but it was tiny.) A dialog in
the Options menu was added with the aid of the generic popup, and allows
the user to set the load Game / Position File and Index.
H.G. Muller [Fri, 1 Apr 2011 12:54:26 +0000]
Create General-Options dialog
The generic popup is used to implement a General-Options dialog, which
contains all Boolaen options that used to be set directly from the main
Options menu, plus a spin option for the flash count and flash rate.
The corresponing options are removed from the main Options menu, but the
whole thing is made conditional on a compiler switch OPTIONSDIALOG.
The dialog needs an OK callback for sending an altered ponder-state to
the engine. (Why isn't this option disabled in -ncp mode, btw?)
A spin control is added to adjust -animateSpeed between 5 and 100.
Add dropMenu and showTargetSquares item as well.
H.G. Muller [Fri, 1 Apr 2011 16:16:47 +0000]
Redo new-variant dialog with generic popup
Some special code was added in GenericPopUp() to force buttons of the
type needed in the New Variant dialog (wide, colored, greyed-out on
variant type). The dialog was implemented with these, and callbacks for
the buttons directly exit the dialog, without the need for OK. New spin
controls are added to the dialog for adjusting the board format.
H.G. Muller [Fri, 1 Apr 2011 12:48:48 +0000]
Redo common-engine dialog with generic popup
The ponder option was removed, as it is already in the main Options
menu, and would require nastiness in the OK callback. Added book options
in common-engine dialog.
H.G. Muller [Thu, 24 Feb 2011 12:32:01 +0000]
Redo adjudications dialog through generic popup
We dropped the periodic-updates option, as it is already in the main
Option menu.
H.G. Muller [Fri, 1 Apr 2011 19:56:07 +0000]
Make sounds dialog for XBoard
This uses the combo boxes. A 'play' button isimplemented for a test
sound. A sound directory is introduced, and can be set through the
dialog. A default setting for -soundDirectory is added to xboard.conf.
H.G. Muller [Fri, 1 Apr 2011 21:11:29 +0000]
Add ICS options dialog
H.G. Muller [Fri, 1 Apr 2011 19:52:48 +0000]
Add board dialog XBoard
The GenericPopUp() is used to implement a dialog for board options. The
board dialog needs to trigger redraw and redefinition of the
colors, through an OK callback. Color-pickers are used for the 6 basic
color settings.
To allow changing board settings during the session (i.e. from a menu
dialog), the routines to allocate resources have to free the resources
for the previous settings first. This patch take care of XtCreateGCs(),
preventing re-creation of resources that are unchangeable (such as the
grid color), and calling XtReleastGC() on GCs that can be changed.
To prevent resource leaks the old pixmaps are deleted before making new
ones on second or later calls of CreateXPMPieces().
H.G. Muller [Sun, 3 Apr 2011 09:39:26 +0000]
Add browse button to generic popup
Options of type FileName and PathName cause a browse button to be added
behind the text field. The SpinCallback is used to handle the
button presses, and invokes the file browser dialog to obtain a
filename, which is then copied to the text field.
H.G. Muller [Fri, 1 Apr 2011 19:49:26 +0000]
Make generic XBoard popup, and implement 2 dialogs
The Engine-Settings dialog of XBoard was cloned to work on predefined
lists of (XBoard) options, rather than engine options. An extra field
was added to the Option struct, to hold a pointer to the XBoard variable
that should hold the option setting, so on OK'ing the dialog the altered
values can be copied there. Not usable for options which should trigger
an action (like redraw, or sending something to the engine).
A Load Game, Save Game and ICS Options dialog were then defined by
tables fed to GenericPopUp(). Options set from these dialogs were removed
from the main Option menu, which removes a lot of code from xboard.c
(for checkmarking, disabling the menu items).
A button defined in the GenericPopUp can attain the color indicated
by a previous text field, and add a callback to change the color in a
spin-like manner (but using R G B W in stead of + - butons).
The EndMark option can specify a callback, to be used on OK.
A non-zero max field in the Option descriptor will be used to set the
width of ComboBox, TextBox and Button optons.
The elements are chained such that extra space goes fully into the input
fields. A label type is added for clarifying texts that would not fit in
the option names. A break-type (pseudo-)option is added. Make OK and
cancel button suppressable in generic popup (by 2 bit of the option.min
field).
H.G. Muller [Sun, 3 Apr 2011 09:34:21 +0000]
Add file-browser option to just return name
By passing mode "f" the file browser dialog will not open the selected
file at all, so it can be used to retreive the name for the benefit of a
file-browser button to a -file option. A mode "p" will limit the
selection to directories only, to browse for a path.
H.G. Muller [Sun, 3 Apr 2011 11:15:17 +0000]
Put insertion point at end of text on SetFocus
Arun Persaud [Wed, 6 Apr 2011 06:47:34 +0000]
fixed 64 bit warnings by casting integers to intptr_t before casting to int
Arun Persaud [Wed, 6 Apr 2011 06:24:24 +0000]
removed check and #includes for malloc.h, since it's not needed
hopefully this doesn't break things on non-linux systems. OS X seems to be ok, not sure about others ;)
Arun Persaud [Mon, 4 Apr 2011 03:23:49 +0000]
check if malloc.h is present before including it
OS X 10.6 doesn't have malloc.h, so it complained.
Arun Persaud [Mon, 4 Apr 2011 03:01:36 +0000]
Fix bug introduced in commit 89b4744: removed a "/" and forgot to add it in the config file
removed a "/" to make OS X happy, but forgot to add the "/" again in the xboard.conf.in file
H.G. Muller [Sat, 12 Mar 2011 13:08:50 +0000]
Fix display of promotion piece in ICS superchess
In Great Shatranj and Superchess promoted Pawns were displayed as shadow
piece because these variants had holdings, while captured pieces should
go back into the holdings unchanged, rather than reverted to Pawns.
H.G. Muller [Sun, 13 Mar 2011 13:09:14 +0000]
Fix o-o castling in new parser
The non-compliant notation of castling with lower-case 'o' should be
preferred over the non-compliant interpretation of moving a Pawn along
the o-file. Not doing so breaks ICS play, as ICS use o-o and o-o-o for
castling! So an exception is now made for the o-file in the 'fxg'
case.
H.G. Muller [Thu, 10 Mar 2011 18:27:41 +0000]
Implement yynewstr entry point in new parser
This entry point, used for parsing an ICS move list, was forgotten, and
was still an empty routine. This made XBoard crash when observing an ICS
game.
Arun Persaud [Tue, 8 Mar 2011 07:11:00 +0000]
fixed wrong default for polyglotDir mentioned in docs.
Thanks to Hans Aberg for reporting it.
Arun Persaud [Sat, 5 Mar 2011 20:39:01 +0000]
Fix "make install" on Os X10.6.6 (removed a "/")
seems like an extra "/" made "make install" unhappy
Arun Persaud [Fri, 4 Mar 2011 05:19:05 +0000]
removed parser.l from build process, also removed flex dependency from configure
H.G. Muller [Wed, 2 Mar 2011 21:14:57 +0000]
New parser, written in C
A new parser was written to replace the flex-generated one. Immediate
improvements are that it understand double-digit rank numbers, and Shogi
coordinates. No changes were made in the Makefile yet to reflect the
new, flexless building procedure.
H.G. Muller [Wed, 2 Mar 2011 21:23:21 +0000]
Fix bugs in FRC castling rights
When parsing a castling move in FRC when no rights existed, the parser
returned 0 (= EndOfFile) rather than ImpossibleMove. The recognition of
the absence of rights was not adapted to the new encoding NoRights in
stead of -1.
H.G. Muller [Tue, 1 Mar 2011 22:42:34 +0000]
Fix parsing bug of FRC castling
The code that was supposed to intercept castling when no rights existed
in FRC was not adapted to the new encoding for this by NoRights, rather
than -1, and furthermore returned 0 (= EndOfFile) rather than
ImpossibleMove. Not sure if the former would manifest itself in any
way, but the latter seems bad.
H.G. Muller [Tue, 1 Mar 2011 22:32:25 +0000]
Fix two bugs in reading position diagram
When reading a game without FEN tag, a position diagram is used to set
the initial position. This calls CharToPiece() with a '.' as argument,
because that is the position-diagram way to indicate empty squares.
altered CharToPiece() over time this would be recognized as the first
undefined piece or, more recently, the first piece without nickName,
which is a white Pawn. Now it returns EmptySquare again in that case.
A second problem was that for position diagrams in braces the brace was
not in the list of ignored characters, and would cause the reading to
get out of phase, so that the side to move was not recognized.
H.G. Muller [Sat, 26 Feb 2011 20:12:08 +0000]
Fix flipBlack option XBoard with board texture
In XBoard -flipBlack is implemented by swapping white and black pieces,
because the Shogi bitmaps from XShogi are made that way. But the mask
used to cut out the whole in the board texture to fit the piece was not
swapped, both when drawing static pieces, as well as during animation.
H.G. Muller [Fri, 25 Feb 2011 13:38:21 +0000]
Improve repairing damage of arrow highlight XBoard
With line gap the highlight arrow necessitated redrawing of the entire
board, to repair damage on the grid. This interfered with flashing of
pieces, which was only done on selective redraws. In stead of forcing a
total repaint we now just redraw the grid lines.
H.G. Muller [Wed, 23 Feb 2011 15:41:36 +0000]
Fix unintended translation in debug file
The words "first" and "second" (cps->which) were sometimes used in
context that should definitely not be translated. (e.g. the indicator
for which engine printed/got the line in the debug file.) So translation
is now deferred to all uses in popups.
H.G. Muller [Wed, 23 Feb 2011 15:29:12 +0000]
Fix nps bug
The nps settingwas tested for being > 0 in stead of >=0, so that the
case of CPU time was not properly handled.
Kamil Blank [Thu, 24 Feb 2011 18:06:27 +0000]
Added missing fclose()
(tiny change)
Signed-off-by: Arun Persaud <apersaud@lbl.gov>
Arun Persaud [Mon, 21 Feb 2011 00:12:19 +0000]
release of version 4.5.1
Arun Persaud [Mon, 21 Feb 2011 00:10:16 +0000]
updated Changelog, NEWS, etc.
H.G. Muller [Sun, 20 Feb 2011 19:36:28 +0000]
Fix two typos in option names in texi file
Polyglot was capitalyzed
H.G. Muller [Sat, 19 Feb 2011 23:03:19 +0000]
Fix some resource leaks
Some files were opened not closed in XBoard, when loading XIM images
(which I doubt anyone ever does) but also when copying the clipboard
(which has the potential of being done very often). There was also some
code that would not work if conditional code which is permanently
disabled would be enabled.
Arun Persaud [Fri, 18 Feb 2011 04:17:04 +0000]
new developer release
Arun Persaud [Fri, 18 Feb 2011 04:14:38 +0000]
updated Changelog, NEWS, etc.
H.G. Muller [Thu, 17 Feb 2011 14:40:02 +0000]
Fix MSVC snprintf problem
In MSVC snprintf has to be redefined as _snprintf, and this happens
conditionally in config.c. But the latter was not #included in help.c.
Arun Persaud [Thu, 17 Feb 2011 03:41:27 +0000]
updated configure.ac to check for Xaw header files
check for Xaw header files when --without-Xaw3d was given. Before the test was
only done when Xaw3d was specified, but could not be found.
If Xaw3d or Xaw can't be found, print a hopefully useful error message and exit the configure script.
H.G. Muller [Wed, 16 Feb 2011 11:03:22 +0000]
Fix ICS channel 0
Channel 0 messages were not displayed in the console, because the test
for channel number considered every non-numeric or non-existent handle
in a chatbox to be zero. So the messages were diverted to a non-exsting
chatbox. Now it test first for the handle to start with a digit.
H.G. Muller [Tue, 15 Feb 2011 18:13:33 +0000]
Make language choice from menu persistent
Set appData.language to the chosen language file, or empty if English is
chosen, so that the choice is saved with the settings. Increase the
number of possible language choices from 5 to 20. (After all, we already
have 7 now!)
H.G. Muller [Mon, 14 Feb 2011 10:09:24 +0000]
Fix showing of user move after adjudication
The correction of the fishy patch (removing ShowMove() from Adjudicate())
had broken the adjudication of user moves (that actually did work before
the fishy patch, because there the gobal fromX/Y and toX/Y do contain
the correct values for the move to be shown). An entered move that led
to adjudication (like a checkmate) now was not displayed at all. Adding
an extra ShowMove() after (successful) return of Adudicate() solves it.
H.G. Muller [Sun, 13 Feb 2011 22:49:44 +0000]
Fix Xiangqi King facing
The Spartan patch had broken the CheckTest for Xiangqi, because cl.check
was cleared after the King-facing test, rather than before it.
H.G. Muller [Sun, 13 Feb 2011 21:30:59 +0000]
Fix variant janus size prefix
The default board size of Janus Chess was not consistently taken to be
10x8, which resulted the name to be sent as 10x8+0_janus to the engine.
H.G. Muller [Sun, 13 Feb 2011 11:18:52 +0000]
Fix Alfil bug
The test for Alfil (suppressing single steps on the Elephant) contained
a wrong logical operator, so that it could never be active. It also
failed to include Xiangqi as variant with traditional Alfil. This led to
one-step moves of the Elephant in these variants, and false check or
unreliable mate detections.
Fix move of Xiangqi Elephant
Arun Persaud [Thu, 10 Feb 2011 07:19:09 +0000]
fixed configure script to correctly detect Xaw3d library
H.G. Muller [Sun, 6 Feb 2011 21:07:17 +0000]
Fix unmarked translation
The file-browser wndowtitle in WB was not marked for translation.
H.G. Muller [Fri, 4 Feb 2011 09:27:49 +0000]
Put warning in HTML help
A warning is added that the help file is not yet updated for the new
menu organzation.
H.G. Muller [Fri, 4 Feb 2011 09:22:29 +0000]
Fix 64-bit Windows compilability
The API interface for Set/GetWindowLong has been changed for 64-bit
Windows, both in the name of the call as in the arguments.
H.G. Muller [Fri, 4 Feb 2011 09:21:06 +0000]
Fix MSVC compilability
Both the makefile and the project file had to be adapted for the new
source file history.c, and the new location of parser.c.
Arun Persaud [Sat, 5 Feb 2011 18:11:58 +0000]
added missing #includes and missing prototypes to filebrowser
thanks to Max Funk for reporting. Now using HAVE_DIRENT_H.
Also cleaned up missing prototypes and some casts.
Arun Persaud [Sat, 5 Feb 2011 17:21:48 +0000]
added missing header file for sprintf
Arun Persaud [Thu, 3 Feb 2011 16:50:50 +0000]
added history.c to the tar-ball. Needed for Winboard
H.G. Muller [Mon, 31 Jan 2011 22:03:05 +0000]
Fix deselection of greyed-out variant button (WB)
In Windows a disabled radiobutton refuses to deselect when you select
another (enabled) button from the group. There are then 2 buttons
checked, and the code to readout the buttons took the first one. Now it
is changed to take the first enabled one.
Arun Persaud [Thu, 3 Feb 2011 16:28:15 +0000]
Revert "Implement -reset option feature in WinBoard"
This reverts commit
efecf86cd9b54072c6a2f38d62f1d775e69c545b.
picked the wrong commit from HGM's git tree.
Arun Persaud [Wed, 2 Feb 2011 06:01:12 +0000]
add DIFFSTAT and SHORTLOG to tar-ball
was only in the v4.4.x branch and not in master
Arun Persaud [Sun, 30 Jan 2011 17:52:15 +0000]
release of version 4.5.0
Arun Persaud [Tue, 1 Feb 2011 15:41:04 +0000]
changed size of borders around squares from 0 to 1 as a default
this way highlights show up again.
H.G. Muller [Sat, 29 Jan 2011 19:11:30 +0000]
Implement -reset option feature in WinBoard
Arun Persaud [Sun, 30 Jan 2011 18:12:08 +0000]
updated Changelog, NEWS, etc.
Arun Persaud [Sun, 30 Jan 2011 17:56:39 +0000]
updated parser.c form parser.l
H.G. Muller [Sat, 29 Jan 2011 18:59:11 +0000]
Clean up fishy patch
None of the ShowMove() calls in Adjudicate() was working, because when
this code was taken out of HandleMachineMove() it was taken outside the
scope of the local fromX, fromY etc. there, so that it started using the
global variables from the mouse driver. As these usually contain -1,
this suppressed move animation and highlighting. All these calls have
now been removed, and ShowMove() is called after a positive return (from
HandleMachineMove(), so within the correct scope).
This improves the previous fix, which led to some flicker, because the
erroneous ShowMove() calls did draw the new board (instantly), wich in
the fishy patch was then immediately overwritten by the old position, to
start animation. This drawing of the old position is now no longer
needed either.
H.G. Muller [Sat, 29 Jan 2011 12:36:30 +0000]
Update RTF file
The RTF file is adapted to the new menu organization.
H.G. Muller [Sat, 29 Jan 2011 12:31:48 +0000]
Update texi file
The highlight-with-arrow and one-click-move menu items are described.
The highlightMoveWithArrow and variations option are described.
Load Next /Previous Position descriptions are moved to File menu.
The description for entering variations is updated (using Shift key).
The remark that editing holdings is impossible is removed.
Spartan Chess is added to the list of supported variants.
Arun Persaud [Sat, 29 Jan 2011 02:35:48 +0000]
Updated copyright notice to 2011
H.G. Muller [Mon, 24 Jan 2011 14:01:25 +0000]
Greyout unavailable variants in New Variant dialog
The WB radio-button code is refactored to be driven from a list (which
must be kept in phase with the variant definitions in common.h!). It now
also checks if the first engine supports the variant, and greys out the
item if it isn't. XB now also makes this check. Slight re-ordering of
10x8 variants there, to have the more common on top.
If no radio button is selected, keep old variant even on OK.
H.G. Muller [Wed, 19 Jan 2011 10:10:59 +0000]
Move clock-click code to back-end
Some duplicated (or should-be-duplicated) code for handling clicks on
the clocks from the XBoard and WinBoard front-ends was merged and
relocated to the back-end, so it can be shared. Noticeable was that
XBoard allowed turn change in ICS examine mode by clock clicking,
while WinBoard did not. WB, on the other hand, allowed clock adjustment.
H.G. Muller [Sun, 16 Jan 2011 22:15:17 +0000]
Fix legality testing of drop moves
Drops of noexistent pieces (i.e. with a piece indicator letter that is
not corresponding to any defined piece) are now parsed as
ImpossibleMove, rather than IllegalMove, so they are also rejected with
legality testing off.
H.G. Muller [Sun, 16 Jan 2011 23:28:32 +0000]
Fix WB Sound Options greyout and remove some grossness
The sound and ICS Options menu items in WB were accessed 'by position',
with fixed defined positions (always messing up any reorganization of
the menus when you forgot to redefine the position constants in
winboard.h). And not only that, but for completely mysterious reasons,
the greying of the sound item greyed out the game-list options (above
it) in stead when it was defined as 9, and the ICS options (below it)
when it was 10 !!!. Now they are addressed 'by command' (and the
position definitions are removed), which fixes things.
H.G. Muller [Tue, 25 Jan 2011 20:35:10 +0000]
Re-instate load next/prev position menu items
As positions do not use something similar to the game list, these are
still useful. For some reason I could not get Alt+Shift+PgUp/Dn to work,
so I settled for Shift+PgUp/Dn.
H.G. Muller [Sun, 16 Jan 2011 20:56:14 +0000]
Remove superfluous copying of machine move
There was explicit code in HandleMachineMove() and FinishMove() to put
the move in the moveList, while MakeMove() already does this later in a
more reliable way by calling CoordsToComputerAlgebraic(). This
superfluous code is removed now.
H.G. Muller [Sun, 16 Jan 2011 20:44:26 +0000]
Fix spurious mate test in Edit Game mode
When entering a game, it was terminated by the mate test even when
legality checking was switched off (so that mates might not be reliably
recognized). The mate test is now made dependent on legality testing.
H.G. Muller [Sun, 16 Jan 2011 20:37:16 +0000]
Fix type-in of drop moves
Drop moves entered through the move type-in already come in the (piece,
DROP_RANK, x, y) format, rather than having a holdings from square. This
caused UserMoveEvent to consider them illegal when testing if the
piecewas of the side to move, and when this was fixed, to recognize
Knight drops as coming from between board and holdings (and thus
illegal).
H.G. Muller [Sun, 16 Jan 2011 20:31:42 +0000]
Fix move type-in truncating game
Starting a new variation by keeping Shift pressed did not work when
OK'ing the move type-in, because there was some code ther that truncated
the game. While this could be safely left to UserMoveEvent, which it
calls, as the situation is not different from entering moves through the
mouse.
H.G. Muller [Tue, 11 Jan 2011 15:12:02 +0000]
Fix legality testing for promotions
Turns out WB has never tested for the legality of the chosen promotion
piece, and would allow promotion to King innorml chess even with
legality testing on (when entered through the keyboard)! Now strict
testing is done, outlawing Pawns and Kings (or Unicorns in
Knightmate). Only in suicide / giveaway Kings are stillallowed, and in
spartan a black King if you do not have two yet.(And promotion
toLnce,representing Hoplite Pawn,is forbidden there.)
H.G. Muller [Tue, 11 Jan 2011 10:34:07 +0000]
Reset 50-move counter on all pawn-like Lance moves
Now the Lance represents a Pawn-like piece not only in variant fairy,
but anywhere outside Shogi / Superchess, its moves should also reset the
50-move counter in those cases. Especially important for Spartan Chess,
where the Lance actually participates.
H.G. Muller [Tue, 11 Jan 2011 10:18:15 +0000]
Fix logo repainting
The logos were not repainted when the main window was moved out of the
display area, and then back into view. The reason for this is
unknown, as the PaintProc calls HDCDrawPosition, which was calling
DrawLogoOnDC. But the logos were not drawn, (or on an expose event
sometimes half drawn!) despite the fact that the rest of the board was.
The drawing of logos now has been decoupled from drawing the board,
and has been moved to a separate routine DisplayLogos() (in analogy to
DisplayBothClocks()). This is cleaner anyway, as the logos usually do
not change when the board does. So apart from in PaintProc, it has only
to be called when the mode changes (ModeHighlight()) or on swap clocks.
This seems to fix the problem.
H.G. Muller [Mon, 10 Jan 2011 19:36:48 +0000]
Fix time in PGN info
Saving of the thinking time in the PGN was broken by the patch that
removed the race condition in the clock switching, because that moved
the incrementing of forwardMostMove to behind the code that used fmm to
index pvInfoList. As a result the time was stored in the slot for the
opponent's previous move. The value is corrected now.
H.G. Muller [Sat, 8 Jan 2011 23:24:17 +0000]
Fishy fix
The move that delivers checkmate in two-machines mode is not animated
when adjudication is on. There then also is no highlighting of this move
Redrawing the board and calling ShowMove fixes it. Which is rather
strange, because ShowMove was already called in Adjudicate (when it
adjudicates), before GameEnds. For reasons that are not understood this
call to ShowMove() (which calls AnimateMove()) is not effective.
H.G. Muller [Sat, 8 Jan 2011 23:21:41 +0000]
Reset machine colors after match
The colors each engine playse are set to the originals after the last
match game, so that a new match or two-machines game will not have
swapped colors.
H.G. Muller [Sat, 8 Jan 2011 23:15:18 +0000]
Reset win/loss counters before match
The win/loss counters were not reset, because the code counted on them
being initialized to zero. But with matches startable from the menu,
this is no longer true after the first match.
H.G. Muller [Sat, 8 Jan 2011 23:08:52 +0000]
Show move that causes false illegal-move claim
Without claim testing XBoard takes back moves that an engine objects to.
But when the engine is forfeited for a false claim, the move should of
course stay. So the claim test is moved to before the take-back.
H.G. Muller [Sat, 8 Jan 2011 23:05:38 +0000]
Fix Spartan promotion to King
Promotions toKing were refused when in check, because XBoard thought
they would not resolve the check. Now the promotion is actually
performed before doing the check test.
H.G. Muller [Wed, 5 Jan 2011 16:31:37 +0000]
Fix WB font-based piece rendering on variant switch
The piece bitmaps were only created from the font characters when the
number of ranks or files changed, because it was done in
InitDrawingSizes(). This caused missing pieces when changing to a
variant on the same board that used other pieces. Now InitDrawingSizes()
is called for any variant switch.
H.G. Muller [Wed, 5 Jan 2011 16:25:11 +0000]
Fix right-alignment pproblem in WB ICS window
Use of Ctrl-R to summon the context menu still trickled through to the
default text-edit window routine, and caused right-alignment. This was
because the text-edit reacts on keyDown rather than the character event.
KeyDown of R with Ctrl pressed is now also intercepted and ignored.
H.G. Muller [Mon, 3 Jan 2011 12:04:56 +0000]
Fix chat window title
The title was using the engine name, rather than the ICS handle, which
did not work outside zippy mode. Now it only uses the engine name when
no ICS handle is known. The titleis now also subjected to translation.
H.G. Muller [Mon, 3 Jan 2011 11:50:54 +0000]
Fix spurious reading of old game title by JAWS
Because focus was switched to the board window before loading the
selected game from the game list, the titlebar still contained the
name of the previously loaded game, which would spontaneously be read by
JAWS. Now the focus switch is done after loading the new game (which
updates the window title.)
H.G. Muller [Mon, 3 Jan 2011 11:37:17 +0000]
Add variant Spartan Chess
In the WB menu it takes the place of the defunct Twilight Chess item.
The setup routine needed patching for setting up Lances in stead of
Pawns for black, the check test had to be adapted to handle duple check,
Alfil and Dragon moves were fine tuned in this variant to make the exact
moves, and the promotion popup was adapted to show King and interpret
Rook and Bishop as Dragon and Alfil for black. The Alfil now always
moves as Modern Elephant except in Shatranj and Courier.
H.G. Muller [Mon, 3 Jan 2011 11:23:39 +0000]
Fix mate test
Due to a bug in logical operators drops were tried for mate evasions
even in non-drop games, which broke it in Superchess and Great Shatranj,
and wasted CPU time in other variants.
H.G. Muller [Wed, 5 Jan 2011 16:19:35 +0000]
Fix promotion suffixon disambiguated piece moves
The promotion suffixon piecemoves that needed disambiguation was not
passedon to the back-end in most variants. Now it is passed on in any
variant.
H.G. Muller [Mon, 3 Jan 2011 11:08:19 +0000]
Fix promotion of Pawn-like Lance
In variants where the Lance is used to represent an unorthodox Pawn, it
must promote when it reaches last rank. With legality testing on,
however, the promoChar was ignored in ApplyMove in this case. The
promotion suffix also was not appended in SAN moves.
H.G. Muller [Mon, 3 Jan 2011 10:57:23 +0000]
Fix WB promotion popup
The promotion popup did not work properly in variants where black did
not use the pieces that white wanted to promote to. Now the character
for the selected piece is taken from the piece encodings of the side to
move. In addition, selection of undefined pieces is ignored.