ehouse
2838f421a5
fix a couple of null ptr exceptions
2009-04-05 23:48:33 +00:00
ehouse
de4c57e740
include strerror output in logging when socket read fails
2009-03-08 19:56:01 +00:00
ehouse
aa48b4c3ed
plug memory leak by closing relay socket when quitting
2009-02-28 19:19:42 +00:00
ehouse
3f01c9129e
Lots of changes to make gtk version better test with relay: make
...
possible to start without specifying comms params, to switch roles
and/or number of players when starting new game; clean up dialogs,
esp. use notebook widget to have tab switch between comms types.
2009-02-28 18:52:44 +00:00
ehouse
46cb6c2955
fix assertion on exit: nuke mempool after everything it contains; call
...
gtk_main_quit rather than gtk_exit() so can exit from main()
2009-02-28 16:31:03 +00:00
ehouse
80b3425b5b
log size of incoming packets
2009-02-07 18:15:17 +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
7158ef3802
Cleanup; add sms example to usage()
2009-01-05 02:11:13 +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
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
b24f3d66a7
fix warning when DEBUG not defined
2008-11-22 17:14:08 +00:00
ehouse
5cb97bf636
New Ubuntu has a stricter compiler...
2008-11-06 03:16:09 +00:00
ehouse
e30c72c829
make -q option take number of seconds to pause before quitting
2008-10-26 15:33:21 +00:00
ehouse
9b17c20117
gtk/ncurses support for Rem: focus and showing remaining tiles. Also
...
rewrite gtkask to use gtk_message_dialog and add sigint handler.
2008-10-24 09:07:30 +00:00
ehouse
f021964213
fix ncurses version so it can save games and read them back in: make existing gtk code run on both.
2008-09-18 03:46:27 +00:00
ehouse
ad52e63ff0
separate UI-specific code so that a non-UI linux library can be compiled, e.g. for use with a toolkit not gtk or ncurses
2008-06-30 03:39:27 +00:00
ehouse
bbfdeb6bf8
Draw tiles hanging a bit below board when hidden to allow testing of
...
common case on wince devices.
2008-06-07 23:03:47 +00:00
ehouse
c6da605b56
add missing error message
2008-05-24 16:08:13 +00:00
ehouse
5502c3ef8b
Trying to give smartphone users way to use keypad to move tiles to
...
board. Enabling key-to-text works, but constants to turn it off
aren't in cegcc. So for b2 add a quick hack where 1 means first tile
in tray, 7 means last (rightmost). Enable and test on gtk.
2008-05-11 20:29:43 +00:00
ehouse
ff254fcef4
add ability to scroll the board by dragging it. add new method
...
util_altKeyDown to allow user to choose between scrolling board and
dragging the hint rect when both are possible. add adjustYOffset;
make it and board_setYOffset more tolerant of out-of-bounds inputs and
use that to simplify calling code.
2008-04-08 03:55:53 +00:00
ehouse
75ab88565d
implement util_yOffsetChange; increase pen timer to half second.
2008-03-27 04:12:16 +00:00
ehouse
a3bc875191
Fix errors, all in debug-only code, flagged by __attribute__ format addition.
2008-03-11 12:24:23 +00:00
ehouse
f30dd17e00
rename constants to begin with GTK so they're unique.
2008-03-10 00:51:20 +00:00
ehouse
0b1f4b8f0a
merge with drag_n_drop branch: apply patch generated with this command on that branch: svn diff -r 2080:2087
2008-03-08 23:16:21 +00:00
ehouse
6e9e5b5c99
Fix to compile and run standalone
2008-01-19 16:03:53 +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
880254c17f
Fix tray hanging below main window; draw pending tiles white-on-black as on other platforms.
2007-10-24 12:46:15 +00:00
ehouse
dd7a5c8104
type name change only
2007-05-26 14:14:01 +00:00
ehouse
3f111c5657
name change only: Connectedness becomes DeviceRole
2007-02-02 08:34:37 +00:00
ehouse
7ed3ad89b7
Remove assert that's firing; don't inval_all from util_yOffsetChange:
...
that blocks testing common inval code.
2007-01-21 23:00:52 +00:00
ehouse
e0010901f1
add board_handleKeyRepeat, and call it from palm and gtk. This lets a
...
held nav key walk the cursor across the board.
2007-01-07 04:32:29 +00:00
ehouse
593980817f
Clean up for non-keyboard and non-keyboard-nav cases. Wince is the
...
latter: make it compile again.
2007-01-07 01:01:20 +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
cac0fd94d7
Use new top-level focus drawing model, and new API indicating whether
...
key handled.
2006-11-14 06:47:50 +00:00
ehouse
4ccddbd93f
add a done button
2006-11-13 02:02:15 +00:00
ehouse
2945a120f9
resend_all when a socket connects. This is the strategy needed with
...
Palm where apps quit and reopen connections many times during a game.
2006-11-11 22:44:31 +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
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
4479cf530d
Get rid of separate accept thread, instead integrating listening
...
socket into main event loop (poll underneath). Works for gtk; still
debugging ncurses.
2006-09-10 19:01:06 +00:00
ehouse
c27abcd486
Attempt to listen for connections on a separate thread so connected
...
game could disconnect and reconnect, but still need work on adding a
socket to the main thread's io queue from a different thread.
2006-09-08 07:23:19 +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
968dcf2835
removed a param from board_handlePenUp
2006-06-27 06:31:36 +00:00
ehouse
a4ac6f9ff4
call server_do after gameinfo dialog returns in case a player has
...
become a robot.
2006-06-14 06:22:21 +00:00
ehouse
b80808bc57
Support new tri-part enabled type; add "game info" dialog/menu to test
...
read-only side; support new attributes for column head and nplayers
label; hide labels as well as controls that go with them.
2006-06-10 05:50:27 +00:00