Commit graph

903 commits

Author SHA1 Message Date
Eric House
fe614e9efc delegate phone number comparison to platform code which in Android
case has a method for it.  strcmp is not enough.
2012-03-19 07:36:18 -07:00
Eric House
9caeff4a5e recover a bit better from messages not meant for me, as is happening
when a devices sends to self via SMS and client winds up getting a
registration message it just sent.  Not perfect yet (and may require a
change in the comms protocol -- that's not versioned :-(.
2012-03-19 07:35:20 -07:00
Eric House
cd8889f90e Merge branch 'android_branch' into android_bt
Conflicts:
	xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java
	xwords4/linux/Makefile
2012-03-12 07:04:06 -07:00
Eric House
3b5dcdc2e0 add const param decls; remove redundant method call 2012-03-12 06:59:08 -07:00
Eric House
f51c0b39e6 use const where possible for game_writeToStream and others it calls.
No other code changes.
2012-03-11 18:28:14 -07:00
Eric House
07fba2c71b Fix problem with writing server to stream changing its internal state
so that snapshotting made score strings disappear.  Also rename
stream_copyFromStream to stream_getFromStream to make it clearer that
the src is modified.  And swap params in stream_setPos().
2012-03-11 14:57:28 -07:00
Eric House
5c11f1b284 add XP_LOGSTREAM 2012-03-11 14:46:03 -07:00
Eric House
a2493ffa97 Merge branch 'android_branch' into android_bt 2012-03-06 07:47:05 -08:00
Eric House
24ac205917 cleanup -- no behavior change 2012-03-06 06:23:04 -08:00
Eric House
eec1cb00a1 wrap UUID in #ifdef XWFEATURE_BLUETOOTH 2012-02-27 20:30:48 -08:00
Eric House
9a2b488183 Merge branch 'android_branch' into android_bt 2012-02-14 16:56:20 -08:00
Eric House
914fa857be return COMMS_CONN_NONE as address type of null comms rather than asserting. 2012-02-14 16:54:19 -08:00
Eric House
1ed1bce7d1 call informMissing after loading game -- before that it'll never be 0. 2012-02-12 22:27:58 -08:00
Eric House
0755a9e781 add new util function that gets called when a game is opened to inform
it if any players are missing.  Idea's to allow for non-relay devices
the invitation opportunity that comes when a game connects to the
relay and learns that no other games have joined its room.
2012-02-09 05:19:03 -08:00
Eric House
7214b7e12a turn off the palmos-era bt wrapper stuff I was trying to use to know
when to reset the stack.  It breaks Android when I turn on
XWFEATURE_BLUETOOTH and adds no value I can see.
2012-02-07 17:38:24 -08:00
Eric House
47c3bd3090 track a BT game's set (singleton for two-device game) of remote
devices in summary DB so, e.g., we can quickly determine what games
care when a devices becomes available via BT.  First use of this is
notifying when a remote game's deleted -- least that's the plan.  This
commit just adds to the DB and scans the DB to build a map of
device->gameIDs array.
2012-02-06 19:02:19 -08:00
Eric House
606e733b19 add _ to typedef to reduce number of etags hits on name. No code change. 2012-02-06 06:27:53 -08:00
Eric House
6326e45892 make btAddr a string rather than array of bytes. 2012-01-31 18:43:26 -08:00
Eric House
6bfd6e74e6 Merge branch 'android_branch' into android_bt 2012-01-26 06:24:18 -08:00
Eric House
866aeb2387 change relay connect message format to include client version (meaning
of which is TBD).  When a new-version client connects, store the value
it's passed. At first this will let me track how quickly people
upgrade.  Later I can use it to let different clients have different
formats to their messages e.g. to proxy.
2012-01-26 05:43:54 -08:00
Eric House
0934f83106 add gameID to params passed to comms' sendproc, including passing
through to java layer.
2012-01-25 18:27:37 -08:00
Eric House
a34921155f make gameID consistently 32 bits in C code. It's been stored as 16,
so stream version must change.  Plan's to use it to address incoming
BT packets so a game needn't be open to receive.
2012-01-19 18:47:53 -08:00
Eric House
5f77ef6e13 get uuid from C code so can ensure linux version has same. 2012-01-19 18:28:27 -08:00
Eric House
814e4dd088 cut some logging 2012-01-03 18:53:58 -08:00
Andy2
2a34cd1e05 remove second param from server_do() -- it doesn't work anyway. 2011-12-21 18:45:05 -08:00
Eric House
b04604595f change assertion to log -- fails very infrequently which is probably to be expected. 2011-12-15 18:37:20 -08:00
Andy2
17edc79aaf Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java
2011-12-06 19:56:10 -08:00
Andy2
b0470d5276 add new preference that when set prevents calculation and drawing of
crosshairs.
2011-12-06 18:17:55 -08:00
eehouse@eehouse.org
e1e8516e1b Merge branch 'android_branch' into send_in_background 2011-12-02 19:04:12 -08:00
Andy2
52d02f04dd pass tile value into drawCell(). Java code doesn't use it yet, but I
want to play with drawing cells tray-tile-style when they're big
enough.
2011-12-02 18:58:52 -08:00
Andy2
08063d9444 Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/android/XWords4/src/org/eehouse/android/xw4/NetUtils.java
	xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java
2011-12-01 21:18:37 -08:00
Andy2
3e21b7845a comment 2011-12-01 21:04:31 -08:00
Eric House
cbd455148d comment only. I tracked down the most recent network proto change
from before which devices probably can't upgrade mid-game once the
MAX_COLS=32 change is enabled and wanted to record it.
2011-12-01 20:23:58 -08:00
Eric House
4a32942e57 two fixes that seem to allow old- and new-proto devices to play games
with 15x15 and 17x17 (and presumably larger) with the old games being
upgraded mid-game: when server's new and wants to use a larger board
but not all clients are capable, shrink the board; and, when new
server is opening state saved by pre-upgrade code, assume a non-0
proto version for clients that registered earlier (as old code didn't
save the client's proto version.)
2011-12-01 20:22:16 -08:00
Eric House
1e48a8d615 Merge remote branch 'origin/android_branch' into android_branch
Conflicts:
	xwords4/common/model.c
2011-12-01 20:12:27 -08:00
Eric House
c1e420f726 Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/relay/rq.c
2011-11-29 06:45:32 -08:00
Eric House
adb9b3853d fix bugs around new variable-length tiles array changes, and otherwise
improve storage of col/row data so that test runs succeed with
MAX_COLS of 16 or 32.  Still to do: test mid-game upgrade.
2011-11-28 18:46:08 -08:00
Eric House
42d1d2f7bd define variable before it's first used. 2011-11-28 18:21:46 -08:00
Eric House
2bfe120014 do away with need to accept out-of-bounds values in getTileRaw(). 2011-11-23 18:25:12 -08:00
eehouse@eehouse.org
93a7d15a5e Merge remote branch 'origin/send_in_background' into send_in_background 2011-11-23 17:57:54 -08:00
Andy2
d37424ad7f Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/linux/linuxutl.h
2011-11-21 22:18:52 -08:00
Andy2
d856b9a8ce Don't behave badly in presence of empty dict: word count should be 0
and sanity test should pass.
2011-11-21 18:06:46 -08:00
Eric House
eec83fe5b6 don't fail when RELAY_ALLHERE comes without a connection, as that will
happen when messages come in background.  I'm not sure what the test
I'm removing was there to catch so need to test thoroughly.
2011-11-21 17:38:50 -08:00
Andy2
872ebe68f4 make array one large to hold word whose len is == max 2011-11-18 21:14:24 -08:00
Andy2
21330af568 make tiles array variable sizes. 32*32*2 is too many bytes to use
when the typical board at 15*15 requires less than 1/4 of that.
2011-11-18 18:59:59 -08:00
Andy2
cc0105e14c add param to dict_countWords in which it accumulates counts per word
length.  Shouldn't hurt speed too much if null passed.
2011-11-18 08:15:21 -08:00
Andy2
598be8b404 MAX_COLS -> MAX_COLS_DICT for dict-related stuff (since dicts are
staying with fewer words for now.)
2011-11-18 07:56:02 -08:00
Andy2
2eac8e70e0 adding missing ifdef 2011-11-18 07:43:37 -08:00
Andy2
37e81fd062 use number of bits based on stream version not current build --
required in case new code is talking with old in networked game.
2011-11-18 07:43:10 -08:00
Andy2
f9c3a95603 move stream version definitions 2011-11-18 07:41:57 -08:00