Commit graph

2375 commits

Author SHA1 Message Date
ehouse
9abb637330 assert queue ok after deleting. Candidate for moving to 4.2 branch if
to be used for Palm.
2009-02-28 15:06:12 +00:00
ehouse
233bf5ffde Fix crasher: removing ACK'd messages left list in inconsistent state.
Candidate for moving to 4.2 branch if to be used for Palm.
2009-02-28 14:40:50 +00:00
ehouse
9cb1f8ab59 minimal test for comparing cegcc versions 2009-02-25 03:45:14 +00:00
ehouse
bac17d8c1e start adding conns dialog 2009-02-24 04:34:37 +00:00
ehouse
8d1289d3b7 Create type to hold array rather than passing array whose lenght is assumed. 2009-02-23 04:01:15 +00:00
ehouse
03c806e961 add tarball target to help 2009-02-21 17:15:09 +00:00
ehouse
b2112371b2 Make it possible to see comms dialog in read-only mode when role
selector is disabled (for game info use of new game dialog.)
2009-02-21 17:03:30 +00:00
ehouse
317b3cbfaf Toward a palm build whose only comms mode is relay (no IR, which was
always default.)  Plays half a robot-robot game via relay as client --
that is, debugging remains.
2009-02-17 05:54:28 +00:00
ehouse
44a3888d6d Add enum to debug-only logging. 2009-02-14 16:24:06 +00:00
ehouse
fb3d4cf2ba Draw arrow only if inval bit set and cell is otherwise unoccupied.
Fixes wince bug where tile dragged onto arrow disappears.  Should be
merged to 4.2 branch.
2009-02-14 16:23:18 +00:00
ehouse
2be682b4e9 Use new bufqueue util 2009-02-09 02:51:43 +00:00
ehouse
b2acdbae91 Add simple helper for keeping a queue of buffers in a single array. 2009-02-09 02:44:58 +00:00
ehouse
9ce82a7c94 fix leak of packet buffers; get rid of multithread code. 2009-02-07 18:20:16 +00:00
ehouse
326e57e742 commented-out setting of default relay host name 2009-02-07 18:18:24 +00:00
ehouse
644dc3b5ad detect duplicate initial connect packets by checking what socket they're on. 2009-02-07 18:17:17 +00:00
ehouse
80b3425b5b log size of incoming packets 2009-02-07 18:15:17 +00:00
ehouse
43982e1a07 validate initial message correctly when comms heartbeat not being
used; improve logging.
2009-02-07 18:14:28 +00:00
ehouse
42b314966b If platform doesn't provide a game id, use current seconds. 2009-02-07 18:12:46 +00:00
ehouse
5a5cba9d1b Handle case where packet contains several messages; attempt to send on
socket-writable and on receiving message to be sent; cleanup.  With
this change full robot-vs-robot game has worked over relay, but not
reliably.  I think it's the relay's fault.  Still tested only on Win32.
2009-02-01 16:46:00 +00:00
ehouse
8d1da3ee0e Put back code initiating connection when starting client game. 2009-02-01 16:43:01 +00:00
ehouse
53b27c96c9 Helps to compile platforms too before checking in... 2009-02-01 16:20:18 +00:00
ehouse
46f72de960 new files into svn:ignore 2009-02-01 16:03:31 +00:00
ehouse
1ac4ef3bc6 Attempt to detect connections that are duplicates by checking if that
socket is already in a connection.  This doesn't seem to always work,
and I may be leaking cref instances when it does, so needs debugging
still.
2009-02-01 16:00:20 +00:00
ehouse
6ba2032187 clean up event logging 2009-02-01 15:55:45 +00:00
ehouse
c672fcfafd Make it possible to run same binary against relay with relay heartbeat
and direct with comms heartbeat.  This mostly means changing ifdefs.
2009-02-01 15:50:58 +00:00
ehouse
1a99dc7e1c Beginning of rewrite of socket code for communication with relay,
replacing dedicated threads for read and write with non-blocking
sockets driven from the main window proc.  So far it can do a
round-trip against the relay on win32, and compiles but isn't tested
on wince.
2009-01-31 18:06:09 +00:00
ehouse
9e7144d8c9 comment about APIs to use for implementation (probably the last checkin of this file.) 2009-01-31 18:03:06 +00:00
ehouse
0d08147472 Turn off SMS by default (pending confirming a way to use the apis in unsigned app); add commented-out NO_DRAW option. 2009-01-31 18:02:02 +00:00
ehouse
b9dce19a93 if setlocale doesn't work, try again with en_US -- works around
problem on my ISP.
2009-01-28 03:32:21 +00:00
ehouse
3a643c51a4 cleanup; set locale based on ENV 2009-01-25 20:31:13 +00:00
ehouse
b7fa674c28 Set locale based on params passed in, only on ENV if not specified. 2009-01-25 20:13:36 +00:00
ehouse
90f8a276e1 Cleanup to run on a machine that's utf8: specify iso-8859-1 when needed. 2009-01-25 18:57:05 +00:00
ehouse
f6d8924593 make tarball ready to be dropped into byod 2009-01-25 18:48:29 +00:00
ehouse
b2dd3f02b0 Need to escape period in grep pattern to get literal dot! 2009-01-22 04:30:35 +00:00
ehouse
24622876bb change default dictionary 2009-01-21 05:36:43 +00:00
ehouse
c2f1ff3d06 smartphone-size small bitmaps 2009-01-21 05:25:43 +00:00
ehouse
52a4a92e14 If smallest bitmap is too big, use it anyway at full size. 2009-01-18 19:52:46 +00:00
ehouse
50a6f93b99 Pick largest possible bitmap; fix inconsistency between cedict's idea
of bitmap format and cedraw's: rows are padded to 8-bit boundary, not
necessarily 16-bit.
2009-01-18 18:29:27 +00:00
ehouse
f422305542 Make smaller bitmaps 8x8 since that's the smallest size that can be
required and StretchBlt to smaller can't work for letters.
2009-01-18 18:25:33 +00:00
ehouse
06632f5495 get rid of excess logging (one line) 2009-01-18 18:17:08 +00:00
ehouse
ac1a88f603 Add __func__ to what's tracked for allocation in debug builds 2009-01-18 16:37:44 +00:00
ehouse
e1bc780beb In tray, when values are hidden draw letters instead of bitmap if
they'll fit.
2009-01-17 20:30:49 +00:00
ehouse
e6132b3dde Scale bitmaps for specials to the size of an M so they look right next
to other letters.
2009-01-17 18:49:35 +00:00
ehouse
dd1f9aa8ca Include function name in assertion failure message; always print to
file before putting up warning.
2009-01-17 18:44:45 +00:00
ehouse
d58d9bedd7 return TRUE after handling WM_INITDIALOG 2009-01-17 18:41:15 +00:00
ehouse
702940fe06 Tweaks to bitmaps; build for wince by default 2009-01-17 18:39:08 +00:00
ehouse
c754726b0f Don't pass valid bitmaps ptr when drawing blank tile. 2009-01-17 18:24:18 +00:00
ehouse
2e488374f1 bug fix: fix reversed width and height params to StretchBlt 2009-01-17 15:45:24 +00:00
ehouse
a56d84b64d add emacs mode line 2009-01-14 13:41:25 +00:00
ehouse
08ceeb85b7 Fix size test for bitmap caching 2009-01-14 13:27:56 +00:00
ehouse
21f5f329a0 Get rid of bogus assert 2009-01-14 13:02:38 +00:00
ehouse
8aadcb3406 Get rid of unused parameter 2009-01-14 13:02:08 +00:00
ehouse
5505c435a2 Don't pass new bitmaps struct to draw code uninitialized 2009-01-14 12:51:55 +00:00
ehouse
09c879dccc Add sms support, largely untested. 2009-01-13 13:33:56 +00:00
ehouse
41ae10f8b6 Allow language Makefile to specify encoding. Pass to perl and c++
dict builders, using it to open files and to determine whether to do
multi-to-wide conversion.
2009-01-13 13:32:07 +00:00
ehouse
7b8e4e0fd3 Add target to build all languages. Stops on Swedish at the moment. 2009-01-13 13:19:15 +00:00
ehouse
4e619601c2 To support Catalan, add Makefile and bitmaps for three special tiles.
The first of these, L-high-dot-L, requires Unicode to be properly
drawn, but the current dict format doesn't support it so it'll be L-L
for now.  Bitmaps are still rough.
2009-01-13 13:17:58 +00:00
ehouse
aee316372e Use new api. Use small for cell and large for tile still, but now
create and cache an actual HBITMAP, and prefer it to letters.  This is
needed for Catalan where "L-L" will never fit.  Still to be done:
prefer letters to bitmap where they'll actually fit (devices where
tiles drawn wider), and position better in tray.  May also want to
allow scaling.
2009-01-13 13:11:05 +00:00
ehouse
88364775a1 cleanup: get rid of confusing but harmless * 2009-01-13 13:03:59 +00:00
ehouse
99a5a7912b Use new draw API but same bitmap as always (large in tile, small in
cell.)  In cases where bitmap and text provided, prefer bitmap.
2009-01-13 13:02:17 +00:00
ehouse
6d7a81fce6 change draw api so all available bitmaps (only 2 in current format)
can be passed for tile and cell drawing
2009-01-13 12:57:56 +00:00
ehouse
eb1e667c17 Add type Letter to represent what are Tiles in Crosswords:
lang-independent indices into the set of letters in use.  Should be no
change in functionality or code generated.
2009-01-07 05:13:45 +00:00
ehouse
948981434b Fix compiler warnings. Should be no change in generated code. 2009-01-07 05:03:13 +00:00
ehouse
5d7ee61448 Turn on relay by default. 2009-01-07 04:54:23 +00:00
ehouse
ac8c06d9cf Turn on and enable UI for relay and sms transport. relay doensn't
work, at least on win32 where threading code is broken, and former is
completely stubbed out.
2009-01-05 14:13:40 +00:00
ehouse
4595191395 Always use GetForegroundWindow to find parent 2009-01-05 14:06:52 +00:00
ehouse
0b82d75bc8 add controls for sms connecting 2009-01-05 14:05:56 +00:00
ehouse
7158ef3802 Cleanup; add sms example to usage() 2009-01-05 02:11:13 +00:00
ehouse
dc82fc6bff Use the new common/strutils binToSms routines. For now, use glib's
too and assert output is the same.
2009-01-05 02:10:27 +00:00
ehouse
abeb5376c0 Implement, with help from glib base64 source, routines to turn binary
into SMS-compatible strings and back.  This should ensure that the
format is cross-platform.
2009-01-05 02:08:55 +00:00
ehouse
e570d692b5 cleanup. SMS, not BT, is the default conType for other than Palm. 2009-01-05 02:07:30 +00:00
ehouse
c731e0d231 Remove newlines from debug statements. 2009-01-05 01:59:04 +00:00
ehouse
4698b835e8 Fix to compile with relay enabled and not STANDALONE_ONLY. Verified
that win32 build can open games saved by previous version, but nothing
else (e.g. use of network or even dialogs to set up relay connection
parameters.)
2009-01-04 00:00:45 +00:00
ehouse
342674276a Cleanup to build with relay enabled; don't enable any network features
if STANDALONE_ONLY is defined.
2009-01-03 23:56:20 +00:00
ehouse
e32e231dd5 New stream version makes standalone and multi-device build formats the
same so new Wince can open files saved by current version.  Tweaks to
build with relay and heartbeat turned on.
2009-01-03 23:54:25 +00:00
ehouse
863f79bfb9 Fix compile errors using latest gcc (fread etc must have return value checked) 2009-01-03 18:12:34 +00:00
ehouse
552f6350f9 tweaks to stop/start script to run on an ISP's server better 2008-12-31 04:26:37 +00:00
ehouse
c53fe0857c Don't parse the same conf file twice in a row. 2008-12-31 04:21:03 +00:00
ehouse
1c3be799b7 start counter for uptime at launch 2008-12-31 04:19:23 +00:00
ehouse
9fc325a334 include new file in tarball 2008-12-31 04:16:55 +00:00
ehouse
32121c5634 include svnversion output in tarball 2008-12-30 05:17:00 +00:00
ehouse
ea6fff8f28 replace int with bool where appropriate; fix to compile with newer g++ 2008-12-30 05:13:30 +00:00
ehouse
cefd69d8b3 Since there's now a flag indicating whether to show the value of a
tile, make value unsigned.  Adjust/fix platforms.  Add cmdline flag to
linux apps for hiding values.
2008-12-29 03:09:35 +00:00
ehouse
1755267d55 Add support to gtk app for tranport over "sms", with files containing
base64-encoded data as the messages.  Make necessary changes to comms.
This is the foundation for doing real SMS transport on handhelds.
Currently a full robot game works for two gtk clients provided the
server is launched first.
2008-12-29 01:35:29 +00:00
ehouse
270006f47b rename variables; fix compiler warning. 2008-12-20 04:25:41 +00:00
ehouse
7e2f2fd38e invalCellsUnderRect didn't work for rects not intersecting board; fix. 2008-12-16 05:30:25 +00:00
ehouse
bc01341f95 When values are hidden, draw letters as large as possible in the tile. 2008-12-13 07:34:16 +00:00
ehouse
13001301ec Indicate tiles whose values should be hidden with a new bit rather
than a negative value.
2008-12-13 07:32:53 +00:00
ehouse
3666235462 App name and game name don't fit most titlebars, so use app name only
when game has none yet.
2008-12-13 07:29:47 +00:00
ehouse
dab2f23479 Use Ok for stringbox, Done for Saved games dialog; next release to be
rc1, not b7
2008-12-13 04:39:06 +00:00
ehouse
9e7bfe0ff7 Provide default player names in game info dialog rather than when
creating the very first game to fix bug where creating a game with n+m
players from a saved game with n yields m blank default names.
2008-12-12 13:42:52 +00:00
ehouse
59cd2a83d1 Make tray tiles one pixel taller, extending all the way to bottom of
screen.
2008-12-12 13:40:41 +00:00
ehouse
cb7b8bf84f Back out change: button to dismiss Saved games dialog is "Done" again,
not "Ok".
2008-12-12 05:28:53 +00:00
ehouse
e28363f369 Warn when unable to open a saved game (generally when an older version
of the app tries to open game saved by newer version.)
2008-12-11 13:48:59 +00:00
ehouse
37518415ea fix occasional crash: null-out ptrs after deleting what they point to. 2008-12-11 13:42:21 +00:00
ehouse
909bcb1dca Don't open saved games dialog unless current game has a name:
cancelling name request cancels saved games dlg too.
2008-12-08 05:51:21 +00:00
ehouse
5aa7289dfe Don't remove extension if there's isn't one (fixes new segfault.) 2008-12-08 05:50:25 +00:00
ehouse
19d8f307b1 Add appropriate icon flags to all uses of MessageBox; remove a couple
of unnecessary Cancel buttons.
2008-12-07 16:24:26 +00:00
ehouse
c38297711e Fix other sites putting up dialogs claiming main window as parent when
it isn't.
2008-12-07 05:21:13 +00:00
ehouse
c791010603 Don't let smartphone users set hintlimits checkbox, and explain
why. Fix bug calling MessageBox with main window ptr from dialog.
Include name of preexisting file when warning user who enters it while
saving/renaming.
2008-12-07 01:30:18 +00:00