Commit graph

510 commits

Author SHA1 Message Date
ehouse
b88112b311 Reset all relay-related variable on new game. Fixes bug where devices
couldn't switch roles or join a new game.
2009-02-28 19:27:45 +00:00
ehouse
4db8c5cddf Make all of a non-server's players local. 2009-02-28 19:25:46 +00:00
ehouse
9b4ff54f03 fix checkServerRole which was incorrectly counting players in client
case.
2009-02-28 19:25:08 +00:00
ehouse
498f8fdb45 Empty out queue and use existing code to re-add elems we want to keep.
Candidate for 4.2.
2009-02-28 16:11:09 +00:00
ehouse
48627a3f11 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
45d41d2872 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
14c1e9fd8b Create type to hold array rather than passing array whose lenght is assumed. 2009-02-23 04:01:15 +00:00
ehouse
3026549ab3 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
771b9d9169 Add simple helper for keeping a queue of buffers in a single array. 2009-02-09 02:44:58 +00:00
ehouse
f42142f52e validate initial message correctly when comms heartbeat not being
used; improve logging.
2009-02-07 18:14:28 +00:00
ehouse
5c2f7496b8 If platform doesn't provide a game id, use current seconds. 2009-02-07 18:12:46 +00:00
ehouse
4b969503e3 new files into svn:ignore 2009-02-01 16:03:31 +00:00
ehouse
7556ecf49f 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
7698393780 cleanup; set locale based on ENV 2009-01-25 20:31:13 +00:00
ehouse
53808a7098 Add __func__ to what's tracked for allocation in debug builds 2009-01-18 16:37:44 +00:00
ehouse
a24f743856 Don't pass valid bitmaps ptr when drawing blank tile. 2009-01-17 18:24:18 +00:00
ehouse
088d96f403 Get rid of bogus assert 2009-01-14 13:02:38 +00:00
ehouse
b40d8e3f2d Don't pass new bitmaps struct to draw code uninitialized 2009-01-14 12:51:55 +00:00
ehouse
bf0d27388a 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
47f6ab7da3 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
bf77466ea0 cleanup. SMS, not BT, is the default conType for other than Palm. 2009-01-05 02:07:30 +00:00
ehouse
ad9d0b7ee1 Remove newlines from debug statements. 2009-01-05 01:59:04 +00:00
ehouse
73c32f0441 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
227a58d115 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
fa4adbfcea 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
23b07772c0 invalCellsUnderRect didn't work for rects not intersecting board; fix. 2008-12-16 05:30:25 +00:00
ehouse
3e749c898c 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
6c9c013f1a fix occasional crash: null-out ptrs after deleting what they point to. 2008-12-11 13:42:21 +00:00
ehouse
07e3b26e60 Quash some compile-time warnings. snprintf instead of sprintf. 2008-12-06 15:59:30 +00:00
ehouse
4529e564e4 Pass string for tile even when it has a bitmap. Let platform decide which to use. 2008-12-04 06:13:59 +00:00
ehouse
28638c4f23 When hideTileValues changes, inval all tray tiles. 2008-12-03 13:38:54 +00:00
ehouse
206b56a50a Don't draw hint rect, or start drag to change it, if hints are disallowed. 2008-12-01 13:06:37 +00:00
ehouse
7fd26c39fc When tray overlaps board yet is hidden, should not be on top except
when focussed.  Remember state before gained focus, and restore it
when loses.
2008-12-01 13:04:14 +00:00
ehouse
8a81089d22 When tray overlaps board yet is hidden, should not be on top except
when focussed.  Remember state before gained focus, and restore it
when loses.
2008-12-01 13:03:42 +00:00
ehouse
e9beb2fc79 a bit of cleanup 2008-11-22 19:43:47 +00:00
ehouse
bbe53cd273 Fix bug: when using hint limits to restrict first move on empty board
limits were ignored for the vertical search.  Fix is to make
special-case treatment of first move more integrated so special limits
code isn't needed.
2008-11-22 19:32:42 +00:00
ehouse
239227ada3 hide focus when pen used, but remember where it was (don't set to
OBJ_NONE) so can replace it when focus keys used again.
2008-11-22 16:37:29 +00:00
ehouse
e1cf1573b0 fix inval of focussed tile to take divider into account. 2008-11-20 05:12:48 +00:00
ehouse
c65d2cf574 add getters 2008-11-10 16:01:46 +00:00
ehouse
2dac68f3e8 Don't assert when unknown key seen; just ignore. 2008-11-08 16:19:04 +00:00
ehouse
e26a01dd62 New Ubuntu has a stricter compiler... 2008-11-06 03:16:09 +00:00
ehouse
8492bc7c7a Don't skip over occupied tiles when moving cursor unless alt key is
down.  Smartphone doesn't have an alt key, and this
simplier-to-understand behavior should be the default.
2008-11-02 03:43:33 +00:00
ehouse
bf8c079db4 When tray's not revealed, cursor should travel over all tiles to be
consistent with display of 7 tiles even if some are really on board.
2008-10-31 04:30:58 +00:00
ehouse
3b28583d0d track focus on Rem: region of scoreboard in addition to players' score
areas, pass into draw whether to show it highlighted, and fire a util
method when it's clicked on.  Intent is that platforms show the
remaining tiles dialog.
2008-10-24 08:56:20 +00:00
ehouse
bc8ebcc1b2 use three bits for scoreboard cursor in anticipate of making Rem selectable. 2008-10-21 03:19:54 +00:00
ehouse
1fb537ba41 back out 2245: having scrollbar be focusable is a better way of allowing scrolling than overloading cursor movement; scroll cursor onscreen when diving and it is off 2008-10-20 02:23:17 +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
8c6c177c99 flag unusued param to fix compile error; move code used only in
multi-device games inside ifdefs.
2008-10-11 17:30:35 +00:00
ehouse
182db5a396 debug changes: change defines to remove gremlin-only code; add missing constants. 2008-10-11 16:46:08 +00:00
ehouse
b5acad0e35 fix bug: need to reset engine when divider moved via keys as well as
when dragged.
2008-10-10 08:38:23 +00:00