anagramarama
14 years agoUpdate NSIS installer script for French support.
Pat Thoyts [Wed, 21 Jul 2010 22:57:34 +0000 (23:57 +0100)]
Update NSIS installer script for French support.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoFrench language support.
Pat Thoyts [Wed, 21 Jul 2010 19:53:35 +0000 (20:53 +0100)]
French language support.

The set of words is taken from the ODS5 scrabble word list with all words
under 3 or over 7 letters removed.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoSupport config file re-definition of the active click regions.
Pat Thoyts [Wed, 21 Jul 2010 19:52:00 +0000 (20:52 +0100)]
Support config file re-definition of the active click regions.

To support languages that might use longer words than English for the
action regions (New, Solve, Quit etc) we need to read the regions from
a config file. This will also permit using backgrounds that move everything
around if it is extended to define the positions of the text boxes and
clock as well.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoMinor build fixes for linux due to recent win32 mods.
Pat Thoyts [Wed, 23 Jun 2010 19:23:02 +0000 (20:23 +0100)]
Minor build fixes for linux due to recent win32 mods.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoSearch locale elements and ask the system on Windows.
Pat Thoyts [Wed, 23 Jun 2010 00:05:16 +0000 (01:05 +0100)]
Search locale elements and ask the system on Windows.
Locales are made of language_region parts so first look for a resource
using both, then just the language part. On Windows use the Win32 API
methods to find the locale. Default is english.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoSupport windows error and debug output and msvc8 support.
Pat Thoyts [Tue, 22 Jun 2010 22:40:06 +0000 (23:40 +0100)]
Support windows error and debug output and msvc8 support.
Windows cannot print to standard output as it is not connected for a GUI
mode program. So divert the debug output to OutputDebugString and raise
error messages using the standard messagebox.
Fixed a stack overflow noted by msvc8.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoIsolate the core anagram management functions.
Pat Thoyts [Tue, 22 Jun 2010 21:41:57 +0000 (22:41 +0100)]
Isolate the core anagram management functions.
This patch moves the anagram manipulation functions into a separate file
for testing and validation without needing SDL.
Also clean a few warnings noted by MSVC6.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoRefine the dictionary.
Pat Thoyts [Mon, 21 Jun 2010 14:42:53 +0000 (15:42 +0100)]
Refine the dictionary.
Added script that refines the unix dictionary, removing words we don't
want and checking them against the scrabble file.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoFixed stack overrun when checking word.
Pat Thoyts [Mon, 21 Jun 2010 12:09:34 +0000 (13:09 +0100)]
Fixed stack overrun when checking word.
Also fixed a c99ism and removed the thumb files.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoFixed random word to use whole file.
Pat Thoyts [Sat, 19 Jun 2010 23:48:14 +0000 (00:48 +0100)]
Fixed random word to use whole file.
The getrandomword function did not use the whole file. Changed to seek
to a random location and then read the next full word that is 7 chars.
Checked for memleaks using valgrind and added cleanup for the word
tree and answers list. No more leaks reported.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoTidied up the word tree and implemented a free tree function.
Pat Thoyts [Sat, 19 Jun 2010 23:45:42 +0000 (00:45 +0100)]
Tidied up the word tree and implemented a free tree function.
This cleans the C code and the naming of the tree functions and adds
a function to walk the tree and free everything. Checked using valgrind
that nothing is leaked when this is used with unit tests.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoChecked the tests using valgrind and eliminated misused calls.
Pat Thoyts [Sat, 19 Jun 2010 08:35:02 +0000 (09:35 +0100)]
Checked the tests using valgrind and eliminated misused calls.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoSelected a better dictionary.
Pat Thoyts [Sat, 19 Jun 2010 00:01:11 +0000 (01:01 +0100)]
Selected a better dictionary.
This is the ubuntu british-english unix dictionary file with all words
over 7 or under 3 characters and any proper names or apostrophe words
removed. Then checked against the Scrabble words to ensure they are all
valid. Using the full scrabble list provides too many stupid words. This
seems like a more realistic list.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoFix errors preventing compilation with optimizing gcc 4.
Pat Thoyts [Fri, 18 Jun 2010 23:59:03 +0000 (00:59 +0100)]
Fix errors preventing compilation with optimizing gcc 4.
Added some assertion checks and some styling updates.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoC style for linked list implementation and unit testing.
Pat Thoyts [Fri, 18 Jun 2010 23:57:10 +0000 (00:57 +0100)]
C style for linked list implementation and unit testing.
This removes a memory leak in the swap and sort functions. Also an off
by one error in the push function.
Ensure the sort does so by alpha and then size.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoC coding style changes
Pat Thoyts [Fri, 18 Jun 2010 22:35:03 +0000 (23:35 +0100)]
C coding style changes

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoUse a macro to indicate the space character substitution.
Pat Thoyts [Thu, 17 Jun 2010 00:00:02 +0000 (01:00 +0100)]
Use a macro to indicate the space character substitution.
It is somewhat safer to avoid non-ASCII characters in the source files
so avoid potential encoding issues on non-English platforms. And we may
as well use the # char as anything else. Macroified all usage of this
character and cleaned the errors reported by gcc for unchecked results.
Use fseek rather than reopening the wordlist file to start again.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoFinished the NSI installer - default create the start menu items.
Pat Thoyts [Wed, 16 Jun 2010 23:33:23 +0000 (00:33 +0100)]
Finished the NSI installer - default create the start menu items.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoProvide a Windows installer.
Pat Thoyts [Wed, 16 Jun 2010 12:38:07 +0000 (13:38 +0100)]
Provide a Windows installer.
This patch implements an installer for Windows using the open source
Nullsoft Scriptable Installation System (http://nsis.sourceforge.net) to
create a simple installation option for end users.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoMerged C code cleanup and low-cpu branch to master
Pat Thoyts [Wed, 16 Jun 2010 00:13:16 +0000 (01:13 +0100)]
Merged C code cleanup and low-cpu branch to master

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoAdded some unit tests for some of the utility functions.
Pat Thoyts [Tue, 15 Jun 2010 23:31:01 +0000 (00:31 +0100)]
Added some unit tests for some of the utility functions.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoCleanup of the C code
Pat Thoyts [Tue, 15 Jun 2010 23:30:15 +0000 (00:30 +0100)]
Cleanup of the C code
This patch cleans up some dubious constructs and replaces some functions
with standard library equivalents. Lots of C style changes.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agolowcpu: reduce the cpu usage by the gameloop.
Pat Thoyts [Tue, 15 Jun 2010 21:03:19 +0000 (22:03 +0100)]
lowcpu: reduce the cpu usage by the gameloop.
This patch adds support for building using nmake and MSVC on windows and
also modifies the gameloop to drop the cpu usage significantly using a
timer and waiting rather than constantly polling the SDL loop.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agoImported anagramarama-0.3.tar.gz v0.3
Pat Thoyts [Tue, 15 Jun 2010 20:13:20 +0000 (21:13 +0100)]
Imported anagramarama-0.3.tar.gz

14 years agoImported anagramarama-0.2.tar.gz v0.2
Pat Thoyts [Tue, 15 Jun 2010 19:57:37 +0000 (20:57 +0100)]
Imported anagramarama-0.2.tar.gz

14 years agoImported anagramarama-src-01.tar.gz v0.1
Pat Thoyts [Tue, 15 Jun 2010 19:47:54 +0000 (20:47 +0100)]
Imported anagramarama-src-01.tar.gz