Commit graph

2747 commits

Author SHA1 Message Date
eehouse
a6e6e2b05c fix stubbed dict support 2010-01-02 01:40:25 +00:00
ehouse
0dfdb315ee up version to b9 2009-12-28 00:20:15 +00:00
ehouse
5cf5345eb1 Set addrChanged on role change even if conns dlg not used: fixes bug
where freshly installed device fails to connect.
2009-12-28 00:18:52 +00:00
ehouse
a3fa0d402c Don't call getHostAddr until have data to send: it's flat-out wrong on
wince, and works better when done later.
2009-12-28 00:14:09 +00:00
ehouse
dfe1d849cd Set up ConnMgr proc ptrs *before* attempting to use them. 2009-12-27 23:53:41 +00:00
ehouse
56ece4ee5f make provision of dict path optional 2009-12-27 21:33:53 +00:00
ehouse
d5e641ee52 Add the ALL_HERE alert to the set not duplicated. 2009-12-27 19:04:29 +00:00
ehouse
378d02f1f5 Don't enable COMMS_HEARTBEAT for wince either; copy .cab file to www
path if shell variable set.
2009-12-27 19:03:17 +00:00
ehouse
7ac98bfcfb Don't require a timeout waiting for a game to connect initially, and
make no timeout the default.
2009-12-27 18:17:24 +00:00
ehouse
c15998a10a add two missing strings (commented requiring translation) 2009-12-27 17:37:49 +00:00
ehouse
fe69b8403e cleanup script; no functional change 2009-12-27 17:36:18 +00:00
ehouse
d80c04dd6b remove whitespace that was confusing check_ids.sh 2009-12-27 17:33:11 +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
9e8496c429 This should eventually be part of cegcc's headers. But use it locally
until then.
2009-12-23 06:09:25 +00:00
ehouse
9976b8d7a1 remove stuff duplicate by what should be cegcc header file. Renamed
this to make room for that.
2009-12-23 06:08:47 +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
b084c5e5b2 reduce logging 2009-12-21 06:21:37 +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
28265749f9 fix unused var warning in release build 2009-12-17 13:09:10 +00:00
ehouse
81d41a621f fix connsdlg: resize, respace and for French ifdef out unsupported choices (to match other .rc files) 2009-12-16 02:48:27 +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
a1be2fb8fc add ports relay is listening on to http display 2009-12-16 02:43:52 +00:00
ehouse
da6a8eb2f0 Strings for new error and progress messages, in English and marked
needing translation.
2009-12-14 04:17:14 +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
fc17df2a7e When guest connects, check if providing too many players before
reponding to connection request so that we just deny the request (with
new error code) rather than revoking it later.
2009-12-14 04:10:23 +00:00
ehouse
35f068e05c Implement new callback giving progress connecting with relay. 2009-12-14 04:06:26 +00:00
ehouse
8450c9da2b New callback called on first connect to relay and on first ALLHERE
message so users can see progress.  Handle new relay message ALLBACK
meaning "ALLHERE but not for the first time".
2009-12-14 04:03:17 +00:00
ehouse
273f3d2f4a don't show turn confirm dialog by default 2009-12-14 02:54:56 +00:00
ehouse
dd236d55d6 include RELAY_NAME_DEFAULT in help target 2009-12-10 05:29:05 +00:00
ehouse
936ae796fd up version strings to b8 2009-12-10 05:28:28 +00:00
ehouse
d90f6707cc Improve error message 2009-12-10 05:28:03 +00:00
ehouse
6af05df5ba Remember role when changes so can pass to conns dlg. 2009-12-09 05:25:38 +00:00
ehouse
32634c4847 Add help text explaining room and connect order to conns dialog.
Still need to add for other .rc files and polish the text.
2009-12-09 05:11:20 +00:00
ehouse
015b0d42d8 include title in head with summary readable in tab 2009-12-08 14:51:03 +00:00
ehouse
12b17e13b6 My first post-initial-translation pass: lots of little tweaks to make
stuff fit better.
2009-12-05 04:22:33 +00:00
ehouse
770980790c add linebreak 2009-12-05 04:21:44 +00:00
ehouse
4d7637cfe2 cleanup: combine clauses 2009-12-05 02:36:59 +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
9f7c0db09f Always launch host first, sleep to make sure it'll be connected and
the room registered before launching any guests.
2009-12-04 08:56:51 +00:00
ehouse
c893fd4a9e On receipt of connection-denied message via new rerror callback, put
up new error messages and then conns dialog so user can connect again
after changing room name or just waiting.  A new game is started so
that comms is re-inited and will try again to connect to relay.
2009-12-04 08:18:49 +00:00
ehouse
14b060707f Report relay connection denials due to misordering out to platform,
and refuse to connect again until comms has been reset.  This goes
with platform code to put up the new game/conns dialogs on disconnect
errors.
2009-12-04 08:14:03 +00:00
ehouse
65230143e4 Allow editing relay host and port in debug version 2009-12-04 08:11:45 +00:00
ehouse
26469d734c Modify state machine and return new error codes to force host to
connect first, guests second, with clear error messages if the order's
wrong.  This seems to make it simpler for users to get a connection
right.  Code holding multiple games worth of hosts and guests in a
cref is gone.
2009-12-04 08:03:27 +00:00
ehouse
337c36dfd2 remove unused parameter 2009-12-04 07:59:07 +00:00
ehouse
7ad59e3e2b cleanup 2009-12-04 07:54:14 +00:00
ehouse
a8e4eca525 fix debug build compile errors. Duh. 2009-12-04 02:19:58 +00:00
ehouse
c8aa9d7f72 fix non-dbg build compile errors and warnings 2009-12-03 03:05:35 +00:00
ehouse
8c21f74cc3 First cut at Czech translation; include it in set of dlls built. 2009-12-02 06:01:19 +00:00
ehouse
05d6cfbd6e new file ready for localization 2009-11-27 19:35:50 +00:00
ehouse
d6436bbf65 up version number 2009-11-26 02:26:09 +00:00
ehouse
8007e5597b Fix stupid typo that broke both backspace and drag-to-scroll. 2009-11-26 02:23:21 +00:00
ehouse
a0fa8f94da force update scroll info when changing the set of visible widgets. fixes bug where smartphone didn't scroll prefs dlg after switch to global prefs. 2009-11-26 02:20:34 +00:00
ehouse
cc24c63dd9 Tweak control size 2009-11-23 02:15:38 +00:00
ehouse
d5f7a0693f Handle missing relay error messages. 2009-11-22 19:25:49 +00:00
ehouse
8c7aab4247 Add error message for relay/comms protocol version mismatch; remove
ability to edit relay address and port by default.
2009-11-22 18:02:26 +00:00
ehouse
7fbd2bed45 Fix to compile when RELAY feature disabled 2009-11-22 18:00:20 +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
3cdf4aa0bf Fix to compile when RELAY feature disabled 2009-11-22 17:56:54 +00:00
ehouse
5ab3425377 allow default relay port, like name, to be set at compile time 2009-11-22 16:30:20 +00:00
ehouse
55478369e4 listen on only one port by default 2009-11-22 16:29:23 +00:00
ehouse
98ad2c3147 draw pending score smaller when has more digits; move rem up one pixel same as score. 2009-11-19 02:29:39 +00:00
ehouse
b8e7cd411f fix to use new API. (this and prev checkin via terminal app on phone :-) 2009-11-19 02:26:38 +00:00
ehouse
3d6b43f032 fix palm and palm-arm compile problems including using changed APIs. 2009-11-19 02:22:32 +00:00
ehouse
370d04f318 Add notion of minimum length to font match and calc longest score
string in the scoreboard at beginning of draw.  Fixes problem where
scores > 99 didn't fit vertical scoreboard.
2009-11-18 13:51:32 +00:00
ehouse
3eadd93aa6 Pass scores and remaining tiles count to draw_scoreBegin so can
determine font size based on max length.   API change.
2009-11-18 13:24:56 +00:00
ehouse
e9287fcbbf reorder some formal params; provide width so score font isn't
recalculated each time.
2009-11-17 05:32:21 +00:00
ehouse
6bd1c4be15 up version strings to b6 2009-11-16 01:20:30 +00:00
ehouse
17f27f3764 revert r2797; endian issues are screwing up mask calculation 2009-11-15 21:05:44 +00:00
ehouse
784906fde0 set biPlanes and color table entry 0. Now works, though not well yet,
on both PPC and Win32.
2009-11-15 20:44:50 +00:00
ehouse
caf4165eba Process bitmap buffers 16- rather than 8-bits at a time. 2009-11-15 18:25:09 +00:00
ehouse
b38891269e Use scoreboard font for Remaining tiles display. Rewrite
glyph-measurement code to use device-independent monochrome bitmaps
and to look at the buffer rather than call GetPixel over and over.
Not tested yet on WinMo (beyond confirming that it compiles/links) but
it seems much faster on desktop.
2009-11-15 18:19:07 +00:00
ehouse
11a00ddb9b Remove Rem string and up dll version number. 2009-11-15 15:48:35 +00:00
ehouse
6d44cfa7fc assume log strings are utf-8, as they may contain dict letters 2009-11-15 15:46:57 +00:00
ehouse
7966f20829 for REM rect too place innerRect centered in outerRect 2009-11-15 15:45:50 +00:00
ehouse
61e087fbfe new string and some old translated/shortened 2009-11-11 04:35:25 +00:00
ehouse
c1827562dc be consistent is use of variable vs real name 2009-11-10 14:37:42 +00:00
ehouse
3d53711e31 new string translated 2009-11-10 04:21:06 +00:00
ehouse
2ecf415618 Remove on case where HandleEvents was being called recursively and
creating unexpected state transitions; add assert to catch any future
recursion.
2009-11-09 05:30:42 +00:00
ehouse
393cccb86c Add MSGONLY state to indicate cref being kept alive only to preserve
messages for a latter connection.
2009-11-09 05:29:06 +00:00
ehouse
b84c1a10d9 Use different rooms for each game. The relay, or maybe it's the linux
client's TERM handler, can't handle so many connectings on same room.
2009-11-09 05:25:20 +00:00
ehouse
b7e2567c7d account for new comms relay state in displaying relay conn status 2009-11-09 03:29:13 +00:00
ehouse
8be09b3fc4 Complete script so it runs gtk versions one host at a time (after
connecting) to test the relay's new disconnected message-storing
feature.  Works except when the gtk client crashes, which is a lot.
2009-11-09 00:06:53 +00:00
ehouse
4025c37604 Make "Room 1" the default room name. 2009-11-09 00:03:43 +00:00
ehouse
aae12428da Add limited support for store-and-forward (where limitations include
that all devices must be connected initially and that it's all memory
based so a crash wipes stored messages.)  Accept messages for
forwarding when in the MISSING state, not just the ALLHERE state.
Store messages that can't be sent now, and send any that have
accumulated when a host reconnects.  When a cref loses its last
connection, keep it around unless it has no messages stored (as will
be the case when a game ends.)
2009-11-08 21:35:39 +00:00
ehouse
2d4ae3e44a When forwarding message, lookup cref by socket if cookieID == 0, as
can be the case when through to a non-all-connected game.
2009-11-08 21:32:36 +00:00
ehouse
f6fb019732 Send to relay if connected, even if not all hosts present. And detect
duplicate initial packets a bit better.  This change goes with the
next checkin on the relay side: move to modified store-and-forward so
devices can connect at different times once the game is established.
2009-11-08 21:30:13 +00:00
ehouse
8e0dad43c7 get rid of overlogged message 2009-11-08 21:25:43 +00:00
ehouse
066c3de9a7 add to gtk version a quick -F option to use new skip-confirm feature 2009-11-08 17:25:19 +00:00
ehouse
a61d01c5ff add new global preference that allows turning off confirmation dialog
after each turn.  Meant to fix ID: 2735517 feature request on sf.net.
2009-11-08 17:00:20 +00:00
ehouse
86d6f8d0a3 script and helper for testing proposed store-and-forward relay feature. 2009-11-05 04:31:23 +00:00
ehouse
ed52582ea4 get rid of states and code for checking numbers of players -- since
any number is allowed now.
2009-11-03 05:03:20 +00:00
ehouse
3bdfda6548 Make it possible for multiple games to connect using the same room
name.  All new connections are stored together, and after each
connection an attempt is made to build one complete game with a host
and however many guests.  All remaining devices are moved into a new
pending record in the same state, and the completed game is treated as
always.  Seems to work, though nearly 20% of linux instances are
failing to connect the relay run from the new test script samename.sh.
Need to figure out why.

Also added logging of seed and connname to comms.c since games
launched together can no longer be certain to connect on the relay.
This allows the test script to identify joined games from their logs
and detect success or failure.

This checkin changes the relay protocol, so relay and clients will
both need to be upgraded.
2009-11-02 01:01:47 +00:00
ehouse
11b586cd4b lookup hearbeat recipient by socket rather then cookieID since
cookieID isn't always correct until later
2009-11-02 00:45:54 +00:00
ehouse
e65db4b8c2 use log macro rather than fprintf to stderr 2009-11-02 00:09:56 +00:00
ehouse
84ac5223b2 script to test new feature where lots of games can use the same "room"
and will just get mached up as soon as a host and right-sized set of
guests is available.  Basically works, but will never exit if any of
the games fails to exit (as is happening most times), so still need to
detect failures.
2009-11-02 00:09:11 +00:00
ehouse
7d411526d3 add .2 for consistent time formatting 2009-11-01 01:40:18 +00:00