Commit graph

236 commits

Author SHA1 Message Date
Eric House
31df12747b fix prev hint to work not just compile 2010-11-01 22:20:35 -07:00
Eric House
e54bf588ab fix to compile on wince/win32 2010-11-01 21:54:04 -07:00
Andy2
d99241ccbc accomodate API changes 2010-06-07 05:45:37 -07:00
ehouse
377fc3c87a Fix to compile and work with recent API changes. Still need to have
font caching in draw code work with the cellHt passed into
draw_boardBegin rather than each cell's height since the latter can
change now.
2010-04-24 03:56:50 +00:00
eehouse
6893fe742a fix r3013 breakage: remove gameID params 2010-02-01 01:50:38 +00:00
ehouse
4425eaa99e move showColors into CommonPrefs, removing separate storage in linux
and wince and removing setter from board and jni APIs.  Palm change
pending.
2010-01-26 04:14:18 +00:00
ehouse
dfe1d849cd Set up ConnMgr proc ptrs *before* attempting to use them. 2009-12-27 23:53:41 +00:00
ehouse
d5e641ee52 Add the ALL_HERE alert to the set not duplicated. 2009-12-27 19:04:29 +00:00
ehouse
37b80527e6 Don't put certain alerts up more than once at a time -- to prevent a
huge number of stacking up when networked device is unattended or in
background.  Same infrastructure should support a checkbox in some
dialogs by which users say "Don't show me this again."
2009-12-27 02:54:30 +00:00
ehouse
9b2eb9273c remove mistaken assert 2009-12-27 00:49:13 +00:00
ehouse
3ae0df2764 Add ifdefs to work with and without cegcc support for ConnMgr (which
for now seems to lack ability to link so I'm still loading procs by
name); don't close ConnMgr connection when phone stopped so can get
notified of further changes and needn't restart; on WM_ACTIVATE, put
full-screen mode in sync with prefs setting to fix crash where app is
launched while running and yields to prev running copy which then crashes
on exit on Treo700w (see recent checkin 2853).
2009-12-23 06:01:26 +00:00
ehouse
488a102977 Fix to compile for win32. 2009-12-21 15:31:06 +00:00
ehouse
098cd1b297 Implement enough connmgr support, loading the dll and getting proc
addresses by name, to successfully bring up cellular connection for
rest of networking to use when it's down.  This is a start: eventually
the stuff in connmgr.h (being added here) should be replaced by
support added to cegcc (including link info so the proc ptrs go away.)
Still to do: figure out how to detect when phone is turned on so can
try again without user needing to restart the app.
2009-12-21 06:43:21 +00:00
ehouse
3fb3616e6c When exiting turn on fullscreen mode after saving prefs to prevent,
for some unknown reason, crash on Wince 5.0 (or at least the Treo700W
I'm testing on.)
2009-12-21 06:36:04 +00:00
ehouse
638337384b set flag on exit and don't allocate anything or try to send via
network; clear globals var after freeing it.
2009-12-18 04:24:55 +00:00
ehouse
da4b288838 inform of need to reboot after language change as FYI rather than error 2009-12-16 02:46:00 +00:00
ehouse
0a381b5a44 Implement callback for connect-to-relay success and new error message
for provinding too many players.
2009-12-14 04:12:20 +00:00
ehouse
07be694df6 Respond to disconnect error from comms with new error message then new
game dialog with conns already open on top.  It's opened as soon as
new game gets its first WM_PAINT message, which may not be best.
Tested only on win32 so far.
2009-12-04 09:09:07 +00:00
ehouse
077b2c4789 Fix to compile when RELAY feature disabled; handle error code for
incorrect relay version flags.
2009-11-22 17:58:59 +00:00
ehouse
b7e2567c7d account for new comms relay state in displaying relay conn status 2009-11-09 03:29:13 +00:00
ehouse
244e0f58db Don't set address in standalone game (should fix assertion
failure/possible crash); set default menu to Undo after it's been used
once.
2009-10-24 15:12:45 +00:00
ehouse
6aca59abe0 Make state private to ceblank.c; all dict strings are utf8, so don't
ever convert using CP_ACP.  Fixes misdisplay of Spanish Ñ.
2009-10-23 08:54:54 +00:00
ehouse
ad2ba1c249 Don't assume resources aren't utf-8 because current dict isn't.
Always assuming they're utf-8 seems to work, so do that for now.
Fixes problems with Catalan messages when using English dict.
2009-10-17 04:10:28 +00:00
ehouse
1929505c10 Make GameInfo struct private 2009-10-17 03:38:37 +00:00
ehouse
33903f5d61 bug fix: warn about language change when it, not prefs, changes. 2009-10-16 03:17:17 +00:00
ehouse
5ba99f45d7 warn about need to restart to pick up language change after last
opportunity to cancel is passed.  Change wording to make sense.
2009-10-02 05:48:48 +00:00
ehouse
dac3ecdda1 Make cestrbox state private. And set font of TEXTEDIT to one that, at
least on English-localized WINE, prevents dropping accents and other
diacriticals from Polish text (so that StrBox behaves same as
MessageBox in that regard.)  Still need to test on US and localized
Wince and with other languages (.dlls and dicts).
2009-10-01 04:15:18 +00:00
ehouse
91ccf3bac5 Replace four bitmaps with one drawn on top of background of green and
red based on connection progress.  Store the bitmap as a pgm, and
generate the .bmp from it at build time.
2009-09-24 04:26:28 +00:00
ehouse
98e175965d Replace letters as indicators of network status with icons. So far
just rects that change from red to green as we connect -- which could
be done in less space by painting.
2009-09-22 03:49:26 +00:00
ehouse
a13e1d6488 add util_clearTimer, implement on all platforms, and call when closing
comms to fix crash on Wince when timer fired after comms had been
deleted.  The closure stored and passed in was no longer a valid ptr.
2009-09-21 12:49:08 +00:00
ehouse
63fc1e048a Fix crash going from connected to standalone game: don't invoke sockrw
code when its "self" is null.
2009-09-20 22:23:56 +00:00
ehouse
e8b372c274 fix more release build unused var warnings 2009-09-20 21:11:58 +00:00
ehouse
7d48ad714f fix some warnings when building without debugging 2009-09-20 20:49:37 +00:00
ehouse
a3b326205a Do a better job of handling failure to connect or loss of connection:
look for errors coming with FD_CONNECT message, look for FD_CLOSE
message, and inform relay when connection is lost so its reconnect
logic is triggered.  This seems at least to handle the case where I
kill the relay mid-game.
2009-09-20 19:00:54 +00:00
ehouse
cfad371bb6 use D-A instead of arbitrary letters for conn state -- which will be icons soon anyway. 2009-09-17 03:49:25 +00:00
ehouse
4ce9a87be5 Use new relay status callback, and similar callback added to socket
read/writer, to provide connection status beside scoreboard (in area
outside that managed by code in common/).  Simple letters now, it'll
be icons eventually.
2009-09-15 13:04:34 +00:00
ehouse
5c95c7b603 fix wince to compile with new APIs 2009-09-12 23:31:48 +00:00
ehouse
2f0ec7e583 fix some string display bugs by using utf8 when converting; handle
Resend Messages menuitem (with error when standalone); add string for
that new error.
2009-09-11 07:44:27 +00:00
ehouse
03eeb93925 Prefs file is created HIDDEN; open it that way too. 2009-09-07 18:22:52 +00:00
ehouse
9ae95366eb merge in changes from 2546 to current HEAD on wince_42_branch to catch up with localizability. Tested only on win32 so far, where can switch locales and play via relay 2009-08-29 13:37:37 +00:00
ehouse
481e2acb92 Add dialog for choosing localization .dll; save choice in prefs and open on boot. 2009-04-19 17:33:39 +00:00
ehouse
51b0fd5e4e Changes to use .dll on wince: create window, which creates its menu,
after loading prefs since that's where language pref will be stored.
But for now, hard-code to load French so translator can see it
immediately.  Also, create l10n directory in which localized .rc files
will live and modify Make file to .dlls from all.
2009-04-14 03:33:46 +00:00
ehouse
d19f052503 Track HINSTANCE of localization .dll separately, passing it where
appropriate; move rest (I think) of strings into resource; load menu
for win32 app after loading localization .dll.
2009-04-11 15:45:59 +00:00
ehouse
2727cacae0 Start factoring out strings for localization: move most to resource,
add new file that loads resources (working around LoadString not
working as docs say it should).  Add all-caps version for testing and
not-yet-working cmdline change to use it.
2009-04-09 13:48:38 +00:00
ehouse
669e423ca8 Use new dict API to get rid of XP_UCHAR4 type, replacing with const XP_UCHAR*. 2009-04-07 04:23:56 +00:00
ehouse
f3b53e4aaf When dict is utf8, convert to wchar_t assuming CP_UTF8 rather than CP_ACP. 2009-04-05 20:18:46 +00:00
ehouse
f9e6c5631d Move WSACleanup into main where it can be called once per launch
rather than per use of relay, parallel to WSAStartup.
2009-03-08 20:01:47 +00:00
ehouse
4909ae0137 Close down relay connection when comms going away. Fixes crashes when
new game is standalone and prev used relay.  Add logging code in comms.
2009-03-06 13:43:03 +00:00
ehouse
8fd1d5b2a9 cleanup for new compiler: -D option, winsock2.h, fix warning 2009-03-06 04:53:56 +00:00
ehouse
14cb742b38 don't pass wrong proc ptr 2009-03-02 01:45:16 +00:00