Commit graph

53 commits

Author SHA1 Message Date
ehouse
8f08667f5d Lots more changes, and some reversions. Win32, gtk and ncurses all
work now including saving/opening games.  Network play probably
doesn't as writing/reading a dict from stream has to change.  It's
doubtful patches from this branch will be merged.  Rather, I'll take
the concepts and crib some code when re-implementing.  Concepts:
XP_UCHAR becomes UTF-8 on both platforms, and on wince we translate to
wchar_t just as now but from the utf-8 codepage.  That keeps the work
and risk to a minimum.
2009-03-29 15:53:15 +00:00
ehouse
2d33d47d67 Too many changes to list. Linux works to display utf-8 dict text on
gtk and curses, but crashes when saving game (-f option.)  Wince
doesn't even compile.  This is to backup partial changes, not a
revision to build.
2009-03-22 23:58:22 +00:00
ehouse
5b8c6844a5 cleanup: get rid of confusing but harmless * 2009-01-13 13:03:59 +00:00
ehouse
7125fb097c remove redundant set of #defines for whether we're compiling for desktop or wince 2008-11-22 16:43:55 +00:00
ehouse
455940731d fix release build compile error. 2008-11-06 06:30:30 +00:00
ehouse
3771b0a4e6 Use SHGetSpecialFolderPath to locate dicts in /Document Files/Crosswords; reserve 1-pixel space around Rem: text 2008-10-29 08:46:02 +00:00
ehouse
e35a0c5e79 mark debug-only formals and wrap in #defines to fix compile-time
warnings of clean wince build.
2008-10-11 17:58:43 +00:00
ehouse
b25f20587a get rid of excessive logging 2008-10-09 12:07:30 +00:00
ehouse
a72e4d0c13 comments and assertions 2008-09-28 16:47:11 +00:00
ehouse
6759fa8601 plug leak: DeleteObject can't nuke an object CE didn't create 2008-09-14 16:06:18 +00:00
ehouse
9b3974b9cb Up copyright date. 2008-09-14 14:37:44 +00:00
ehouse
9ca72bd61a Use GetModuleFileName to find dictionaries in same directory as executable. Replace cute attempt to cons up list of possible dict locations with a string in a resource. Get rid of two-year-old code explaining a change in where dicts live. Fix typo putting 4K buffer on stack. 2008-06-13 05:25:20 +00:00
ehouse
662bc9ec5f for win32, look for dicts locally. 2008-06-07 13:46:27 +00:00
ehouse
7da66696ed Fix dictionary-search code to look in top-level temporary directories
rather than hard-coded "SD Card" etc. to work in non-English cases;
fix password dialog to fit, and simplify it; fix backspace on
smartphone for all dialogs with EDIT fields to actually backspace
rather than exiting app; and in main window have it raise focus.  This
change requires SHSendBackToFocusWindow(), which is not yet in cegcc.
Until I get a patch accepted this breaks wince builds.
2008-05-31 22:07:29 +00:00
ehouse
120592324a remove excessive logging 2008-04-02 03:50:55 +00:00
ehouse
08326c6146 add __attribute__ format and fix resulting compile warnings; add a few
new WM_ strings for debugging.
2008-03-15 14:14:39 +00:00
ehouse
b527110379 replace all __FUNCTION__ with __func__ 2007-12-02 19:13:25 +00:00
ehouse
e891a26756 substitute macro for common sizeof(x)/sizeof(x[0]) pattern; no generated code change 2007-05-26 14:03:07 +00:00
ehouse
912fe93829 add a few consts decls where APIs changed; use XWFEATURE_RELAY rather
than BEYOND_IR
2006-10-22 19:44:30 +00:00
ehouse
5780da7b93 catch up with recent API changes; fix bug in newgame dialog. 2006-09-15 07:39:57 +00:00
ehouse
f561989644 Set -Wunused-parameter for those versions of gcc that support it, and
deal with the output by removing params where possible and elsewhere
by adding XP_UNUSED macro wrapping __attribute__((unused)).  There
should be NO change in function in spite of the large number of files.
2006-08-16 13:44:44 +00:00
ehouse
12daa9bfbb Turned on leak-checking at shutdown for debug version, and fixed leaks and
crashes in destructors that had never been called before.  Seems now to 
free all allocated memory before exiting.
2006-05-30 05:12:02 +00:00
ehouse
35f8004d43 fix a couple of compile warnings 2006-05-28 14:53:02 +00:00
ehouse
8a0b2f3bbb fix compiler warning 2006-05-12 07:55:36 +00:00
ehouse
7d9d97cd88 Turn on -Wall for compilers, and fix warnings that result. Got 'em
all for win32 build, but some remain for wince that I'm unable to fix.
2006-05-12 07:17:35 +00:00
ehouse
5410f1f9f7 move CE_MAXDICTS to header 2006-04-30 19:45:48 +00:00
ehouse
4e2b080be5 Add, and use, stream_putString. Saves 500 bytes on win32. 2006-04-25 13:31:15 +00:00
ehouse
1c4f0a47b7 When unable to open a dictionary whose path has been saved, look for
it elsewhere in the set of possible directories.  This should help
ease the transition to there being a limited number of places where
dicts can be, since games saved previously will still work after the
dicts they reference have been moved.  Also, clean up callbacks making
their return values consistent: true means done.
2006-04-25 04:25:08 +00:00
ehouse
7c50cacc18 On win32 too, return null when dict not found. 2006-04-24 13:36:23 +00:00
ehouse
9acbe29bf5 Replace generic "no dictionaries found" warning with list of directories searched and URL from which to download. 2006-04-24 04:34:42 +00:00
ehouse
6439096812 pass the rigth size to LoadString 2006-04-22 14:31:43 +00:00
ehouse
08b20dc431 More of dict search change: failed to save buffer before checkin 2006-04-22 14:28:22 +00:00
ehouse
e8a18f10de rewrite ceLocateNDicts to do recursive searches from a list of
directories stored in resources.  On device this is currently
"\Program Files\Crosswords" and "\SD Card".  (Just "." for win32.)
Later may need to restrict on the card too.  Still to do: make "no
dicts found" Alert list the places searched.
2006-04-22 14:05:09 +00:00
ehouse
4e483b03a5 forgot to save before commiting.... 2006-04-19 04:57:51 +00:00
ehouse
25b1fb4ecf ceLocateNDicts now takes a callback. Use that to build menu of dicts
rather than call OpenFile, which doesn't let you browse much of the
file system on CE.  Heading for installing dicts in Program Files so
users never have to worry about them.
2006-04-19 04:56:00 +00:00
ehouse
76c6a56f93 Rewrite dictionary location code so that it can more effeciently
produce a list of dictionaries.  The API has changed slightly, but the
new ability isn't used yet.
2006-04-16 05:12:52 +00:00
ehouse
eef7b20544 get rid of unneeded DH() 2006-03-20 04:13:40 +00:00
ehouse
9b77537905 Check .xwd files coming back from OpenFile dlg, and reject with msg to
user those that aren't valid.  This catches corrupt files and other app
files ending with .xwd.
2006-02-20 01:56:34 +00:00
ehouse
9f42faee6d missed one ce-specific struct. This makes it work on ce! 2006-01-31 06:41:49 +00:00
ehouse
df72a59423 use debhacks 2006-01-28 19:03:10 +00:00
ehouse
dcd31cd092 update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
23232d25ba Turn off STUBBED_DICT -- can now load and execute from an .xwd file
running on WINE.
2005-11-27 21:39:06 +00:00
ehouse
0df6b6c049 OpenFileForMapping doesn't seem to exist in win32 -- or at least not
in MinGW's view.
2005-11-27 20:13:13 +00:00
ehouse
91f0094008 fix compile error! 2005-06-30 01:51:40 +00:00
ehouse
b14562e883 Refactor ce_dictionary_make so that it returns NULL rather than an
broken dict when the file's missing or corrupt.
2005-06-30 01:36:51 +00:00
ehouse
3eb04b4161 add debug-version logging to catch dictionary corruption 2005-06-13 13:36:26 +00:00
ehouse
8f5c777b9b dict_getShortName 2004-12-18 01:02:22 +00:00
ehouse
dfdff5fb61 call new dict_super_init 2004-10-16 04:41:23 +00:00
ehouse
fa0bfb7d13 check flags before recognizing dict so shipping versions will not try to open newer format dicts 2004-05-26 04:50:30 +00:00
ehouse
ffc4adc812 return NULL when no dict 2004-01-10 17:59:15 +00:00