Commit graph

43 commits

Author SHA1 Message Date
ehouse
6e9e5b5c99 Fix to compile and run standalone 2008-01-19 16:03:53 +00:00
ehouse
b115cc6f0c fix unused param warning 2008-01-02 01:43:45 +00:00
ehouse
d5d29adc0c Change util function to use signed type; other cleanup to compile with various features. 2007-12-05 06:28:51 +00:00
ehouse
5457ea1b59 replace all __FUNCTION__ with __func__ 2007-12-02 19:13:25 +00:00
ehouse
a560c9f8a8 Add files forgotten with last checkin; add additional parameter to
addListener so listeners can be removed on reset.
2007-11-28 03:59:26 +00:00
ehouse
e1d5632a7b Re-add direct-via-ip transport, and implement for linux in order to
better test heartbeats.  Fix so can play against Palm over BT.
Assertions failing on Linux when reset, but it's otherwise done.
2007-11-26 02:58:25 +00:00
ehouse
4c8cf98d24 Add and set a compile-time option so comms will set a periodic timer
and use it to send and check for heartbeats over any transport.
Caller must supply a reset proc which is called when heartbeat hasn't
been received in too long.  No changes required to comms protocol, but
that means the heartbeat interval is fixed at compile time: can't be
negotiated, and the two ends had better agree.  Currently tested with
linux host and PalmOS guest, where only the first heartbeat failure is
recovered from.  So there's some debugging to be done still.
2007-11-18 23:43:27 +00:00
ehouse
edfdda6fd2 Fix so compiles curses-only, and so curses cell can be 2x1 (for square board) 2007-06-01 02:08:04 +00:00
ehouse
dd7a5c8104 type name change only 2007-05-26 14:14:01 +00:00
ehouse
20ecd5f7d7 get rid of draw methods; always highlight cursor same way;
board_handleKeyUp becomse board_handleKey for curses
2007-01-19 08:20:58 +00:00
ehouse
098a2ec5c4 Use new keydown/up APIs from linux, and add key support and drawing
changes to implement keyboard navigation/focus in gtk port.
2007-01-06 17:46:02 +00:00
ehouse
afc302a29b When alt key pressed cursor can move onto occupied squares it normally skips. 2006-11-22 13:49:14 +00:00
ehouse
7fe5718cc5 When "dived" focus reaches and crosses border of object, return as if
not handled.  This causes the platform to handle the key event itself,
typically by moving the focus to the next top-level object.
2006-11-17 13:41:13 +00:00
ehouse
cac0fd94d7 Use new top-level focus drawing model, and new API indicating whether
key handled.
2006-11-14 06:47:50 +00:00
ehouse
b171900dfb When moving focus through tray, skip empty space; when through board,
skip cells with tiles permanently played.  Space char raises focus but does
not move it laterally.
2006-11-09 06:05:40 +00:00
ehouse
e8b74e1cc3 set focus to board if not held prior to passing keys 2006-11-08 05:05:11 +00:00
ehouse
2aa9664884 When internal focus reaches edge of object, move it back up and onto
the next object using a callback to the platform to determine what, if
any, object is next.  Adjust curses platform to cooperate.  Works
well.  Palm is next.
2006-11-07 05:46:44 +00:00
ehouse
44eaa36319 More progress on one-handed navigation: fix ncurses board clipped to
bottom of tray; add focus-related params to draw*Finished routines
(and simplify to one) so platforms don't have to save from Begin
routines (and stop palm doing that); check version of saved game, and
handle case where older binary tries to open newer version; redraw
Palm tray buttons after focus change to stop focus-rect ghosting; fix
annoying overlap in saved games dialog; palm version goes to a3.
2006-11-05 16:54:18 +00:00
ehouse
3153e2b867 Lots of progress on one-handed navigation: add gadgets to stand in for board
scoreboard and tray on palm; make center drill into the focussed object and
spacebar come back up then move the focus among them.  Integrate with other
focussable objects on main form.  Go from separate drawCursor routines to
same for all three, with cursor only visible when focus is drilled down.
On curses, add a hilite rect routine that can be called after text is laid
down, and use for cursors.
2006-11-03 06:23:54 +00:00
ehouse
5f25ba9f57 remove BEYOND_IR, replacing with XWFEATURE_RELAY and
XWFEATURE_BLUETOOTH.  The goal is to be able to build to support
bluetooth only, or relay/ip only, e.g. for a palm bluetooth beta.
Seems to work.
2006-10-10 01:34:37 +00:00
ehouse
9137eff9fa Largely untested changes to allow BT in ncurses mode, centered around
integrating sockets into poll fdset; move relay and bt globals out of
a union so can test if in use without knowing current connection method.
2006-09-19 03:39:08 +00:00
ehouse
fb87fd31d2 Start adding bt support to linux port. Required removing assumptions
that all connectivity was with relay and over streaming sockets (since
BT is using l2cap's datagram-style sockets.)  With this checkin, a full
robot-vs-robot game is possible with palm as host and linux as client.
Linux as host isn't started yet.
2006-08-26 21:15:20 +00:00
ehouse
4daabf6fe5 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
19414ae505 Finish scrollbar work by passing number of visible rows to
util_trayHiddenChange, which means an API change.  In board, calculate
bottom of board based on bottom of tray when tray is hidden, and round
so that it's an exact multiple of cell height.  In wince, take
advantage of the new parameter to fix the scrollbar so that very
constrained boards can be scrolled even when the tray is hidden.
2006-05-19 13:44:05 +00:00
ehouse
3a4c5dfff6 catch up with API change 2006-05-09 04:04:56 +00:00
ehouse
e9499cb4ed formatting only 2006-02-17 07:27:58 +00:00
ehouse
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
5e693ee022 fix misspelling; tweak error messages 2005-10-19 03:21:19 +00:00
ehouse
50df4d7cf4 catch up with API change 2005-10-01 15:53:56 +00:00
ehouse
5dace1cc7a add enough timer support for heartbeat; fix redraw bug 2005-09-09 03:14:11 +00:00
ehouse
2871778cb7 remove logging 2005-06-25 05:44:30 +00:00
ehouse
767de5a284 implement new util_setTimer, and handle heartbeat timer 2005-06-23 04:20:00 +00:00
ehouse
b64103ad7e don't use null comms 2005-03-25 13:41:18 +00:00
ehouse
7d622f9484 fix and cleanup linux client to move to using tcp. Add the ability to
deal with socket dying and (maybe) being replaced.  Only connect on
demand now, when first packet's ready to go.
2005-03-19 22:07:53 +00:00
ehouse
1c7e530538 deal with tcp streams the same in curses as on gtk. Both work now
with the relay.
2005-03-12 05:33:30 +00:00
ehouse
ef828a0bdf fix misspelling 2005-03-09 15:12:57 +00:00
ehouse
897caf4e88 Replace UDP-based messaging with TCP. Stream protocol says distinct
message is length plus data.  Use non-deprecated gtk select-like
function.  With these changes can play full games through the relay on
gtk.  Untested on ncurses but probably broken.
2005-03-06 18:07:00 +00:00
ehouse
f5a5d3d7a6 util function sig change 2005-01-13 04:30:50 +00:00
ehouse
d9efe4258b cleanup for no hintlimit feature case 2004-06-27 04:35:42 +00:00
ehouse
0244afcde6 make util_userQuery return bool 2004-02-17 04:00:12 +00:00
ehouse
31017a455b folloe board_requestHint signature change 2003-11-30 19:07:01 +00:00
ehouse
4d31200290 util_userPickTile replaces util_askBlankFace 2003-11-16 17:17:04 +00:00
ehouse
5776da0b93 first checkin 2003-11-01 05:35:29 +00:00