Commit graph

110 commits

Author SHA1 Message Date
Olivier Teulière
9e71372c42 Simplified the readFromUTF8() prototype 2011-07-30 19:46:47 +00:00
Olivier Teulière
b5212ebd05 Fixed encoding problems on Windows. 2011-07-30 19:44:18 +00:00
Olivier Teulière
1e543111e9 Detect and ignore the BOM in the letters file 2011-07-16 21:13:42 +00:00
Olivier Teulière
0c76b9d781 Simplified the looging macros, and added logs in various key places. 2011-01-29 23:47:20 +00:00
Olivier Teulière
e175a6d8bc Added a new (optional) dependency on log4cxx, to enable logging.
If disabled (the default), everything is compiled away.
2011-01-16 21:30:30 +00:00
Olivier Teulière
cadc14e8aa Added Indonesian translation, courtesy of Switchu Legitri 2011-01-08 22:27:59 +00:00
Olivier Teulière
c3785555b9 Print to stderr the complete stack trace in case of exception or segmentation fault.
This feature will only be activated in debug mode, and if available on the platform.
The symbols will even be demangled if possible (i.e. if compiled with g++).
2010-10-17 21:23:39 +00:00
Olivier Teulière
5cb6ad38cd New button on the "Dic. info" tab, to save the dictionary words list to a file 2010-09-18 13:07:39 +00:00
Olivier Teulière
170c59481f Ignore '\r' characters when loading the word list 2010-09-10 18:36:36 +00:00
Olivier Teulière
dd003417c0 Ignore empty lines in the word list, instead of throwing an exception 2010-06-12 15:59:07 +00:00
Olivier Teulière
dd44196d21 Renamed _wtoi into wtoi to avoid a name collision with mingw32 headers 2010-05-20 20:27:47 +00:00
Olivier Teulière
7a486ec697 Fixed an encoding bug on Windows 2010-05-19 19:28:26 +00:00
Olivier Teulière
01297ebdb4 Sort the word list before processing it. It allows a much better compression, and avoid problems when a word is a prefix of the word just before.
Also, the word list is not a raw buffer anymore, which makes it a bit easier to understand the algorithm.
2010-05-16 10:06:01 +00:00
Olivier Teulière
9d5c9fe1d0 The dictionary creation is now encapsulated into a dedicated class, to allow reusing it easily 2010-05-15 12:14:53 +00:00
Olivier Teulière
cd78568af4 Fixed BOM handling 2010-04-20 20:49:58 +00:00
Olivier Teulière
3093d0fd7c Fixed an encoding bug on Windows, when trying to convert empty strings 2010-01-29 21:46:13 +00:00
Olivier Teulière
2a1932437c Fixed potential read of invalid memory 2010-01-04 21:57:27 +00:00
Olivier Teulière
d1a1254dbe Made an error message clearer 2010-01-04 21:00:33 +00:00
Olivier Teulière
2404d359ca - Refuse to build a dictionary with a non-alphabetical character (except '?')
- Marked many strings for translation, and improved their formatting
2010-01-02 12:44:56 +00:00
Olivier Teulière
9b52668612 - Allow dictionaries without jokers
- The listdic binary now accepts non-alphabetical characters.
   But playing with such a dictionary is still impossible.
2010-01-01 18:01:35 +00:00
Olivier Teulière
3c7a84d543 Support saving/loading games (any game type) in XML format.
Status:
It works well, but there are still a few details to improve/fix

More details about the changes:
 - New dependency on Arabica and Libxml2 to parse the XML
 - Loading the old format is still supported for this release, but won't be supported anymore in the next one
 - Games are now only saved in the new format
 - In training mode, the player is now created externally, like in the other modes
 - Avoid using GameIO (the one from game/) whenever possible
 - Do not use a FILE* argument anymore when loading a game
 - Throw and catch exceptions correctly when a game cannot be loaded or saved
 - The non-regression tests now use a new method to print the game history
2009-11-29 16:01:31 +00:00
Olivier Teulière
d0a7ce6947 Fixed an encoding problem on Windows: do not assume input is UTF-8.
This fixes a crash when typing a character like 'é' in an input field.
2009-10-23 20:01:49 +00:00
Olivier Teulière
79b6c0b53c Fixed a crash on Windows, when trying to convert an empty string 2009-10-14 19:36:37 +00:00
Olivier Teulière
43d42a0388 Little hack to have the 7+1 search in alphabetical order (or more precisely, in the order of the letters as defined at dictionary creation) 2009-09-21 20:10:34 +00:00
Olivier Teulière
08c9816d32 Tiny optimization of the compressed dictionary 2009-07-03 21:51:08 +00:00
Olivier Teulière
02e4cb2970 - Invalid moves should be in the display form
- Moved some code from Header to Dictionary
2009-07-03 21:40:14 +00:00
Olivier Teulière
8485e317b5 - Improved some strings
- Update of the French translation
 - Fixed make distcheck (compdic.cpp contains non-ascii chars)
2009-06-28 12:11:10 +00:00
Olivier Teulière
e42bc55965 Display the alternative inputs in the dictionary information tab 2009-06-28 11:47:50 +00:00
Olivier Teulière
4fda3fed5e Support display and input strings in the dictionary header 2009-06-28 10:55:24 +00:00
Olivier Teulière
0e9711da25 Accept various inputs for the same tile in the Qt interface.
The dictionary format still needs to support that.
2009-06-27 18:09:44 +00:00
Olivier Teulière
da85bde477 First step in accepting various input strings for the same tile: input coming from the text interface is now passed through a conversion method (... which does nothing yet!) 2009-06-23 21:39:07 +00:00
Olivier Teulière
795c44827d Center correctly multi-chars letters in the text interface 2009-06-23 21:36:33 +00:00
Olivier Teulière
fc04b0604b Little refactoring 2009-06-23 15:36:28 +00:00
Olivier Teulière
7569a58bb7 Each letter (tile) now has a display string, defaulting to its internal char. It is not yet possible to change it.
This display string is used in the ncurses and Qt interfaces.

Display strings are types "wdstring" instead of plain "wstring" in a few places (not all of them) to help recognize them.
2009-06-23 12:41:53 +00:00
Olivier Teulière
9b8526b451 Improved error messages 2009-06-21 12:32:25 +00:00
Olivier Teulière
1b585e8a49 Simplified code a little 2009-06-13 21:44:05 +00:00
Olivier Teulière
3d525af762 Got rid of the custom HashTable class: Boost.Unordered provides a better one for free... 2009-05-01 09:04:47 +00:00
Olivier Teulière
b4140b3fea - Fixed some warnings on Windows build
- Open the dictionary in binary mode. This fixes a bug in the Windows version of compdic
2009-02-28 09:23:07 +00:00
Olivier Teulière
66538b4806 Removed support for the old dictionary format. The code becomes simpler and (very slightly) faster. 2008-11-22 13:11:48 +00:00
Olivier Teulière
70be50c64e A lot of clean-up:
- Removed logiv from the History class
 - Used BOOST_FOREACH to simplify loops
 - Remove useless annotations and doxygen blocks
 - Added some constness
 - Marked Training::setRack() as deprecated
 - Improved compilation order in game/
2008-11-22 13:09:28 +00:00
Olivier Teulière
003b403422 - dic_search.cpp: Do not add twice the same word in a 7+1 search (this can happen when using jokers)
- dic_tools_widget.cpp: Allow up to 2 jokers in the 7+1 search
2008-10-30 19:03:07 +00:00
Olivier Teulière
350666b568 - The last commit in cross.cpp fixed a bug but introduced another one, now both are fixed
- Added unit tests for both bugs
 - Fixed another bug preventing to enter some letters in the training rack
2008-10-15 19:43:23 +00:00
Olivier Teulière
12cc41fce7 Core:
- Fixed a crash on Windows
 - Do not authorize words if the cross-checks are invalid (it was possible when playing a joker)
 - Fixed detextion of invalid moves
 - Improved unit tests, and fixed a bug in one of them

Qt interface:
 - Do not allow playing a word if the coordinates are missing
 - Better focus
2008-09-13 21:32:45 +00:00
Olivier Teulière
37359e97c0 - Renamed the binaries: eliot is now the Qt interface, whereas wxeliot is the wxWidgets interface
- Embed the program icon into the executable on Windows: the icon is not visible in Windows explorer
 - Fixed gettext configuration on Windows. The translations now appear, but the accents still don't display correctly.
 - Fixed a few translation issues
2008-09-07 13:17:39 +00:00
Olivier Teulière
990f4c5212 Qt interface:
- Initialize the random numbers generator, and print the seed value
 - Handle properly Qt builds without STL support
 - Save the position of the main window
 - Got rid of the useless toolbar
 - Better size of the preferences dialog
 - Hopefully fixed translation issues on Windows
 - The Settings class throws an exception when asked for a non-existing setting
2008-09-05 21:31:30 +00:00
Olivier Teulière
f5bde7fb4e - Compilation fix for Windows
- Display the Eliot icon
 - Improved printing
 - Allow changing the level of computer players
 - Generate automatically a default name for players
 - Translate Qt's own strings (only works on Linux at the moment)
2008-09-03 17:28:27 +00:00
Olivier Teulière
75a67b28a5 Dic:
- Throw an exception if a regular expresison is invalid
 - Handle the exception in callers code

Game:
 - Fixed a bug in setRackRandom()

Qt interface:
 - Display the dictionary name in the status bar
 - Implemented printing
 - Translation of the interface into French. The menus have temporarily lost their accelerator keys in English.
2008-08-31 11:48:11 +00:00
Olivier Teulière
a32f1b7aaf Dic:
- regexp search results are now in uppercase, like other results
 - the regexp search indicates if there are more results than the maximum
   allowed
Qt interface:
 - new window with some dictionary tools: check word, word+1 and regexp search
2008-08-27 21:20:03 +00:00
Olivier Teulière
468951ca0f Cosmetic change 2008-07-28 20:24:06 +00:00
Olivier Teulière
cad582d912 Fixed a off-by-one error. 2008-07-28 18:37:09 +00:00