Commit graph

85 commits

Author SHA1 Message Date
ehouse
273f3d2f4a don't show turn confirm dialog by default 2009-12-14 02:54:56 +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
e65db4b8c2 use log macro rather than fprintf to stderr 2009-11-02 00:09:56 +00:00
ehouse
547c1758a9 For testing, add option to send duplicates of all packets 2009-09-26 13:47:51 +00:00
ehouse
a13e1d6488 add util_clearTimer, implement on all platforms, and call when closing
comms to fix crash on Wince when timer fired after comms had been
deleted.  The closure stored and passed in was no longer a valid ptr.
2009-09-21 12:49:08 +00:00
ehouse
18e9301e87 rename Cookie to Invite, a change that may change. Rename everywhere
in clients but not in relay where cookie is too pervasive.  (There are
no code changes in this checkin.)
2009-09-14 03:11:11 +00:00
ehouse
6827ab5d88 Unify signal handlers that do same thing; clean memory leaks and a
double-dispose.
2009-08-30 15:23:05 +00:00
ehouse
537de614b9 remove timer assert; log socket errors 2009-08-21 12:15:40 +00:00
ehouse
fbd3559e3b Fix assertion failures 2009-07-31 13:03:05 +00:00
ehouse
9ab746d8ac Include strerror output in a few socket-related error messages. 2009-07-28 05:17:44 +00:00
ehouse
d7cd277893 Add option to close stdin on startup, which seems required to run
curses version from script.  There's probably a better way...
2009-07-12 01:32:14 +00:00
ehouse
4c523b628c Make slow-robot work for curses client too. 2009-07-10 05:04:04 +00:00
ehouse
184a154c52 New feature, meant for testing relay, makes robot skip random number
of seconds within specified range before making a move.  Working only
on gtk so far, and will probably never be used other than on linux
clients.
2009-07-09 12:43:51 +00:00
ehouse
a954286960 avoid mempool assertions by cleaning up on way out 2009-06-30 12:55:47 +00:00
ehouse
669e423ca8 Use new dict API to get rid of XP_UCHAR4 type, replacing with const XP_UCHAR*. 2009-04-07 04:23:56 +00:00
ehouse
cb72b3ffef call gi_initPlayerInfo() for defaults when not provided on commandline. 2009-03-08 19:57:27 +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
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
3a643c51a4 cleanup; set locale based on ENV 2009-01-25 20:31:13 +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
863f79bfb9 Fix compile errors using latest gcc (fread etc must have return value checked) 2009-01-03 18:12:34 +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
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
86fb79d969 Fix to compile and run for IP-direct case, possibly breaking
heartbeats used over bluetooth.
2008-10-11 17:33:07 +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
4d6aec67fe error message when hit feature is off but you try to use it; clean up memory on way out. 2008-08-30 13:27: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
c6da605b56 add missing error message 2008-05-24 16:08:13 +00:00
ehouse
ebad668227 add some consts. 2008-05-06 12:49:37 +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
a3bc875191 Fix errors, all in debug-only code, flagged by __attribute__ format addition. 2008-03-11 12:24:23 +00:00
ehouse
6e9e5b5c99 Fix to compile and run standalone 2008-01-19 16:03:53 +00:00
ehouse
08da013d4d Warn user, and refuse to continue, when new game is as host and has no remote players. API
changes, so other platforms won't compile until changed.
2008-01-04 14:47:52 +00:00
ehouse
3b1fcceb16 Fix compilation errors due to constant name changes -- no change to binary. 2007-12-14 13:06:44 +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
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
3060888264 Update BT code to advertise and search sdp records and use psm reported to work with new Palm
code.  Log btaddr after converting from name.
2007-11-05 03:38:00 +00:00
ehouse
de640cda98 Update BT code to advertise and search sdp records and use psm reported to work with new Palm
code.  Get rid of pthreads dependency which was for logging only.
2007-11-05 03:17:07 +00:00
ehouse
2f925349a6 Fix so can without BT, and so compiler can be specified to Makefile. 2007-06-02 02:07:45 +00:00
ehouse
dd7a5c8104 type name change only 2007-05-26 14:14:01 +00:00
ehouse
0fd0692748 better logging: include function name 2007-03-17 15:38:44 +00:00
ehouse
5afdcc20db include result of strerror in messages logging errno; turn relay on by default (linux) 2007-02-04 01:22:00 +00:00
ehouse
7c8b7294cd add const to a bunch of char* decls in APIs and variables; no code change 2007-02-03 17:54:20 +00:00