Commit graph

82 commits

Author SHA1 Message Date
Eric House
b57e50a255 snapshot toward building with gtk3
Board renders, but only when touched. Tray and scoreboard skipped for
now. Lots of changed still to go, and some asserts added where I didn't
want to stop to solve a compile problem.
2016-08-03 15:19:12 -07:00
Eric House
2ade75158b gtk: update constants 2016-08-03 08:20:05 -07:00
Eric House
799e89fdc1 gtk: use accessors instead of peeking at structs 2016-08-03 08:09:47 -07:00
Eric House
bd8e829a06 replace deprecated gtk symbols (lightly tested) 2016-08-03 07:11:02 -07:00
Eric House
406eb77f54 post notification (rather than just play sound) when turn comes into
boarddelegate but it's not visible
2016-04-14 22:16:18 -07:00
Eric House
19713a40ad add param to comms_resendAll to limit type of message sent
(e.g. BT). Meant to be used when a single type has become available.
2016-02-02 07:01:48 -08:00
Eric House
87517edd6f fix counting of messages sent by "Resend messages" menuitem: actually
count them, and do so based on new msgNo passed from comms that's
concatenation of channelNo and msgID so that duplicates (over multiple
transports) aren't counted twice.
2015-09-30 06:50:04 -07:00
Eric House
47954f82d0 add index of sending player to chat transmission, and on receiving
side translate that into showing the sender's name in
notification. Not yet done: replacing silly "not me" in chat listing
with same, but now it should be easy.

Conflicts:
	xwords4/android/XWords4/archive/R.java
2015-08-12 07:43:20 -07:00
Eric House
dad39eedde Remove devID from comms address. It's not needed yet, may never be,
and I don't want to store it until it is.
2015-07-22 06:16:29 -07:00
Eric House
1423bc933d rename common file and methods for consistency with android. No logic
change.
2015-07-11 08:40:49 -07:00
Eric House
b5ae54f313 use common/native NetLaunchInfo to implement invite-via-relay that
works between linux and Android clients. Required renaming so struct
names and names of fields within match in c and java code. The point
is to test this as the foundation of rematch: now you have to type in
a deviceID in order to invite, which clearly sucks for users. Either
that goes away, or it's replaced with something that scans existing
games and lists past opponents as possible invitees.
2015-07-10 23:19:38 -07:00
Eric House
0f33228155 get rematch working on linux, at least for two-device games. (Handling
the case where one of several guests wants to rematch is a hard
problem for later.) Requires passing old-style relayIDs (connname plus
device index) when devIDs aren't available, which they may not always
be.
2015-07-06 20:28:16 -07:00
Eric House
3a896df199 show game-over dialog (with its Rematch button) when a over game is
opened
2015-07-01 18:38:33 -07:00
Eric House
8f794fbd32 beginning of support for invite-by-relay (which is mostly interesting
for Rematch): works for linux version, provided you know the relayID
of the device you're inviting. Added to common/ a stream-saving
version of java's NetLaunchInfo I'll probably want to use there too
for cross-platform compatibility (there being no jni support for
json.)
2015-07-01 07:10:45 -07:00
Eric House
ad6be1bb7e add debug-only "tag" to open games so logging can more easily track
what's going on when multiple participants in a single game are on the
same device. But for a couple of strings passed into the jni the
changes are only in DEBUG code.
2015-02-09 19:15:43 -08:00
Eric House
28bfa3c904 make forceChannel part of CurGameInfo rather than comms, since Android
needs to save it there on receipt of an invitation (doesn't create
full game with comms until later.)  Passes discon2 tests and seems to
work on a single Android device. (Haven't tested inviting on Android
yet.)
2014-12-29 07:39:28 -08:00
Eric House
897c4d5786 add param to force a client to connect to host requesting a particular
channel. Works well enough that relay test script works. Not yet
integrated for let alone tested on Android.
2014-12-21 17:40:00 -08:00
Eric House
b2b60d6c48 add commandline params that disable comms types on game creation so
relay not connecting initally can be tested.
2014-12-02 06:49:35 -08:00
Eric House
c008f55133 add invite button only if I'm a host and am missing players 2014-11-12 06:52:40 -08:00
Eric House
10a960930c collect number to be invited. (Not tested: whether a number other than 1 works) 2014-11-11 07:35:14 -08:00
Eric House
540d3e9622 wire disabling checkboxes into comms. They work -- and show that
multi-addressing needs debugging still.
2014-11-06 06:35:28 -08:00
Eric House
b1de8663d6 fix to compile with DEBUG undefined 2014-11-06 06:32:00 -08:00
Eric House
564e671b47 quick hack to add checkboxes for turning off transport sends and
receives to be used for testing after it's actually hooked up.  This
is just the UI.
2014-11-05 18:48:53 -08:00
Eric House
17bc0ab47c snapshot of work toward communicating when two addresses are in use.
An invitation works with relay and (fake) SMS on, and the invited
client connects successfully using both (the second to arrive being
correctly identified as a dupe.)  While the game can be played after,
only SMS messages are being received. And opening a saved game
crashes.
2014-11-05 07:41:20 -08:00
Eric House
9b336bde49 fix crash: must iterate when multiple types are possible 2014-10-28 08:04:05 -07:00
Eric House
fe4c7b52f2 snapshot: relay test script works with a second address type set
(though with its actual transport stubbed out).  Android doesn't even
compile.
2014-10-15 07:26:18 -07:00
Eric House
43bd3c018a make an addr's conType a bitfield rather than holding a single value.
Works for large numbers of relay games in test, but will not yet
actually hold more than one value.  Should be safe to merge to main
branch once stream upgrade is verified.
2014-09-25 20:05:37 -07:00
Eric House
49689ab04c always log error message 2014-09-23 07:30:34 -07:00
Eric House
6f07098cf3 return succes from server_initClientConnection() 2014-09-14 13:42:11 -07:00
Eric House
88248131da show new client-formatted turn summary in notification; remove old
common-formatting code.
2014-08-26 21:37:33 -07:00
Eric House
2d08848715 snapshot: toward having a better description of the last move in
notifications.
2014-08-26 06:55:26 -07:00
Eric House
622760b71a post response to long-tap on player as a gtk dialog rather than just logging it. 2014-08-25 07:52:18 -07:00
Eric House
a7c114e3f9 refcount dicts. Model "owns" its copy and so increments the refcount when gaining one and decrements the count on any being replaced (and on all on exit). This is setting up the real change, which is to let the java world wrap dicts in objects that hang onto them until they're destroyed, which should fix problems where dicts are referenced after they've been destroyed. 2014-03-08 20:57:27 -08:00
Eric House
8a6adfec34 cleanup -- no logic change 2014-03-08 20:51:49 -08:00
Eric House
e34cc9007d fix problems with opening and using wordlists on 64-bit linux by
making XP_U32 32 rather than 64 bits. Duh. Do same on Android jni just
in case.
2014-01-07 06:58:20 -08:00
Eric House
e15fb02d8a add ability in ask dialog to display buttons with arbitrary text
returning custom results.  Use to add "Rematch" option (which so far
only fires an assert when chosen.)
2013-12-30 07:16:52 -08:00
Eric House
35c12eb7bb add --ask-timeout param 2013-12-30 07:08:43 -08:00
Eric House
6d84dfea7e cleanup: remove '2' from function and struct names 2013-12-30 07:08:42 -08:00
Eric House
ebdf5ed492 fix to compile on 64-bit system (untested on 32-bit :-) 2013-12-27 19:13:54 -08:00
Eric House
a1d5553266 fix invite button disabling logic 2013-12-19 07:58:32 -08:00
Eric House
79fae43100 enable invite and commit buttons based on game state 2013-12-19 06:59:34 -08:00
Eric House
bece99bb98 load dict named in invite 2013-12-17 22:11:21 -08:00
Eric House
f45f3bacbf fix so invitation results in a playable game (though dictionary is not
yet available to invitation recipient)
2013-12-17 21:57:10 -08:00
Eric House
6bdd939531 rename field 2013-12-17 20:02:31 -08:00
Eric House
8d20c33b76 snapshot: still not correctly recording return address 2013-12-16 08:06:29 -08:00
Eric House
2a56a0ba98 snapshot: more linux-sms stuff 2013-12-12 21:08:25 -08:00
Eric House
78d8c0398f another snapshot: invites are received but don't create game correctly yet 2013-12-12 07:58:02 -08:00
Eric House
5f97f8197c progress on inviting via SMS 2013-12-12 06:08:56 -08:00
Eric House
833a3384b3 remove assert; add empty invite button 2013-12-11 08:02:29 -08:00
Eric House
7cffa27a88 snapshot toward implementing fake-sms as per-device rather than per-game 2013-12-11 07:54:26 -08:00