Commit graph

224 commits

Author SHA1 Message Date
Eric House
1a830fbff2 use clang instead of gcc for ndk builds
And make changes to C code to fix resulting warning. The .so file
basically works but is not thoroughly tested.
2016-10-25 06:09:40 -07:00
Eric House
4c923ead08 add isLocal param to server_getCurrentTurn
I want to store this information separately in summaries tables so
e.g. games can be displayed sorted by whether it's the local player's
turn.
2016-08-26 06:58:55 -07:00
Eric House
2faf9c5334 bug: update lastturn timestamp for single-player games too 2016-07-25 08:38:24 -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
22dde029c8 Merge tag 'android_beta_100' into android_branch
ready for release
2016-01-03 11:36:37 -08:00
Eric House
ebcae1a523 move hashing into memstream impl, and reintroduce the old/broken
treatment of the final 8 bits. I'll need to release a version that
still produces the incorrect hash for compatibility with existing
clients that expect it, but that also looks for the correct hash. When
that's out there I can do a new release that sends the correct hash.
2016-01-01 17:57:14 -08:00
Eric House
4813c95976 cleanup: rename function and remove unused param 2015-12-31 15:47:48 -08:00
Eric House
02d5d26c60 when a move comes in whose hash doesn't match the top of the move
stack, go down the stack looking for a match. If it's found, pop down
to that point then apply the move. This fixes stalls in the test
engine when undo is enabled, and so I assume that undos and turns are
somehow coming in out-of-order. Should be rare that this happens.
2015-12-31 06:04:55 -08:00
Eric House
a2ca381890 remove assert when hashes don't match. As currently implemented, this
can happen when somebody does an undo, since the ordering of undos and
moves is not assured. The result is a temporary (I think) stall, where
a move is rejected because the hash doesn't match, but that will be
accepted later when the undo's been processed and the hash will now
match.
2015-12-30 05:59:06 -08:00
Eric House
c96861b329 wrap hash-related logging in ifdefs so can be easily turned on 2015-12-29 19:00:30 -08:00
Eric House
299b8ddc70 assert when hashes don't match. This may be legit, but I need to
understand when it can happen because I think it's the cause of games
failing to communicate in the field
2015-12-29 07:11:05 -08:00
Eric House
122335c53c Merge branch 'android_branch' into relay_noconn
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2015-09-17 07:00:04 -07:00
Eric House
cba1293bec make return value void since it's never used 2015-09-15 20:54:01 -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
8f7267b3ec 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.
2015-08-12 07:36:36 -07:00
Eric House
33d0db93e8 add some consts 2015-07-06 20:23:22 -07:00
Eric House
90dbd52bfd On client, when game ends locally set turn to -1 (nobody) so that
display won't be confusing during the interval before the server
receives the move and responds with a game-over message.
2015-06-10 07:35:39 -07:00
Eric House
e66260950e change final score formatting so it can be properly localized.
Note: because the substitution is done in common code I can't use the
positional specifiers (%1$s vs %s) and so this breaks the generated
"translations". The scripts that do the generation need to be fixed to
understand the formatted="false" attribute.
2015-05-13 07:51:32 -07:00
Eric House
75a805634f increase buffer size so French strings don't overflow and get
truncated.
2015-03-19 06:28:40 -07:00
Eric House
5f33d99c2e toward making full use of getQuantityString(): add util method to pass
quantity through to java world, use it, convert English <string>
resources to <plurals> (using python script) based on parallel changes
in French, and modify callsites to call getQuantityString() where
R.string.xxx became R.plurals.xxx.
2015-03-18 21:23:30 -07:00
Eric House
f039ee8338 reject message for client that arrives for server rather than asserting 2015-02-07 13:20:47 -08:00
Eric House
688b3944bb fixes to invite: don't allow non-servers to invite; have common code
inform of number of missing even when it hasn't dropped to 0 (so
second invite can be sent for 3+ device games); take down older alerts
before posting new (again since number of missing may have changed)
2015-01-05 07:43:45 -08:00
Eric House
4701fe2b90 pass in number of devices already connected so forceChannel can be set
more correctly; put up alert when device rejects an invitation as a
duplicate.
2015-01-03 09:50:07 -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
c008f55133 add invite button only if I'm a host and am missing players 2014-11-12 06:52:40 -08:00
Eric House
c3e7b12103 merge android_branch 2014-10-23 06:33:28 -07:00
Eric House
51a1ddfe39 include robot name in report of his score 2014-10-23 06:32:24 -07:00
Eric House
878a16b3bc snapshot: android compiles, and works well enough to exchange moves
via relay!  Lots of changes, mostly around treating connTypes as a Set
inside the java world.  Jni to translate to that is a pain.
2014-10-16 06:45:24 -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
aa566ad1f0 call util_informMissing when the pendingPlayers count drops to 0 2014-09-25 06:36:07 -07:00
Eric House
1e80109c3e add assert, and don't pass pendingRegistrations to clients -- it confuses them 2014-09-24 19:33:59 -07:00
Eric House
743d532fc7 putting back recent change: this works for automated test and gtk
manual app.  I'm not sure what's up with pendingRegistrations but it
needs more studying before I can change it.
2014-09-24 19:16:06 -07:00
Eric House
3d6f972e9e fix number of missing players not being calculated correctly 2014-09-23 21:30:31 -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
242f722f2e remove logging 2014-02-28 18:56:39 -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
f46f8ed560 cleanup 2013-12-30 07:08:42 -08:00
Eric House
762945857e fix to work for standalone games too 2013-12-19 07:59:00 -08:00
Eric House
8fa5e3e4bd drop duplicate packet rather than asserting 2013-09-11 07:30:12 -07:00
Eric House
a25d664eb5 Merge branch 'from_android_beta_65' into android_branch
Conflicts:
	xwords4/android/XWords4/res/raw/changes
	xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java
2013-09-09 08:01:28 -07:00
Eric House
94b2eddda6 fix crash by adding byte protocol expects 2013-09-09 07:42:00 -07:00
Eric House
573a87993e Don't propogate chat when queue too full. This *should* only impact
tests since users won't keep chatting at a non-responsive friend.
2013-07-20 08:01:56 -07:00
Eric House
e6248210a5 when formatting final scores, print all players with top score as
Winner (fixing bug that occurred in case of a tie)
2013-07-04 12:37:10 -07:00
Eric House
3364dcbf46 remove unused enum 2013-07-03 07:26:23 -07:00
Eric House
1f63745e34 add more logging in search of channelNo bug 2013-07-01 07:54:38 -07:00
Eric House
b58fe30ecc add synonyms to tile counts/values summary 2013-05-14 22:00:22 -07:00
Eric House
83b1d4c364 fix compiler warnings 2012-12-08 06:40:21 -08:00
Eric House
e7d5be06e9 fix crash when old client connects to new host by making host use the
right version test in deciding what to send.
2012-10-27 08:52:54 -07:00
Eric House
b097e0825e fix linux crash do to casting problem 2012-10-26 06:49:15 -07:00
Eric House
aec03fc572 When a game's consumated and guest discovers it isn't using the same
dict, give chance to switch, and to download if required.  Because of
the way the JNI thread works, and JNI's requirement in general that
env instances match up (e.g. dicts must be destroyed in the same
thread that creates them), substituting into a live game is too hard.
So the game's saved with its new dict and then reloaded.
2012-10-24 07:17:21 -07:00