Commit graph

1136 commits

Author SHA1 Message Date
Eric House
b6551abd2f some cleanup, e.g. to assert my signals are valid 2019-02-22 21:25:26 -08:00
Eric House
97eb6018d9 comment out dead code I keep reading 2019-02-22 19:59:55 -08:00
Eric House
956e9c540f fix valgrind-noted empty array cruft. 2019-02-22 19:29:56 -08:00
Eric House
e6b59ea11d add debug-only option for invitee players to be robots
It's useful when testing to have the remote device play without human
interaction. So add an option, and UI to trigger it, for the players
created remotely in response to an invitation to be robots. There are
guards in place to catch the feature slipping into a release build.
2019-02-07 08:17:54 -08:00
Eric House
e04f8d7fba fix just the warnings; VSIZE is safe 2019-01-29 09:15:56 -08:00
Eric House
15a2897112 Revert "toward compiling with gcc8"
This reverts commit d293517e7c.
2019-01-29 09:05:54 -08:00
Eric House
d293517e7c toward compiling with gcc8
My VSIZE is no longer legal, and apparently there's no workaround (no
way to safely figure the length of an array whose size is known at
compile time.) To avoid the risk of duplicating little constants, added
macros that define length in a way a new VSIZE can pick it up. Couldn't
make that work for struct field arrays, however, so there I'm using
constants.
2019-01-28 17:24:53 -08:00
Eric House
b616f79cfd remove the last critical error 2019-01-27 09:23:56 -08:00
Eric House
f7b6d30dc2 fix another critical warning 2019-01-27 09:12:58 -08:00
Eric House
2b5b4ba982 fix gtk critical errors 2019-01-27 08:46:51 -08:00
Eric House
a14b43bba0 communicate variant to relay, and store in new column 2019-01-27 06:31:21 -08:00
Eric House
db641c4664 log gameSeed; generate on linux too
I'm seeing a rare case where a game connectes to relay specifying a room
and somehow gets both slots, having provided different gameSeeds the two
times. This means an opponent won't connect, the room being full in that
game. I can't reproduce, so am logging seed changes better and switching
linux client to leave seed generation to comms as Android does.
2019-01-08 08:16:50 -08:00
Eric House
454e3da578 fix to compile when #define not defined 2019-01-08 07:41:22 -08:00
Eric House
4a90792dec If game's in Spanish, don't require 7 tiles for trade.
Put up an error message if too many tiles selected for trade
(a condition that couldn't exist when the pool was guaranteed to
have at least 7 in it.) (It's a hack: there's not even an enum
giving Spanish's code, and the lang_locale stuff in info.txt isn't
making it into the .xwd format.)
2018-12-29 18:47:48 -08:00
Eric House
e9ae36f68d fix invite via relayID (linux test app)
I broke it adding SMS invite support?
2018-12-29 07:41:03 -08:00
Eric House
e637f49b95 include port and proto
Pretty sure couldn't have played against an older build without this.
2018-07-26 21:13:09 -07:00
Eric House
9ddc6e4b89 Move transision of cmd and gameid and port (pending) into smsproto
common code, simplifying and unifying what the platform-specific code
has to do. Seems to work.
2018-07-26 07:50:16 -07:00
Eric House
2d8ac995b7 add test case where (fake) sms messages never arrive 2018-07-14 15:43:42 -07:00
Eric House
89ec7987e6 move test to after db's inited to avoid crash 2018-07-13 18:20:56 -07:00
Eric House
9c2a722cc5 change two method names 2018-07-10 07:07:30 -07:00
Eric House
8c14ccc0d2 add new dutil to store by ptr; use for smsproto msgID 2018-07-10 06:36:34 -07:00
Eric House
13cc6c79f1 add save/restore of partial messages
Handles case where the app receives only a subset of the SMS messages
into which a larger game-level message has been broken. Now when it
restarts and the remaining parts come in the whole can be reassembled.
2018-07-07 22:56:32 -07:00
Eric House
1c58ab3d99 clean up linux db usage
For load/store I'll need more flexibility to store large values.
2018-07-06 08:04:53 -07:00
Eric House
1941642607 add load and store to dutils, and implement with stubs 2018-07-06 06:56:54 -07:00
Eric House
2e9fbb8204 add common implementation of the SMS proto stuff
And use in linux client. Goal here is to reproduce then improve the
Android SMS pre- and post-processing stuff with a common/ implementation
that can be tested on linux and used wherever.
2018-07-05 21:40:56 -07:00
Eric House
87418d63d1 fix linux "sms" and modify script to test it
My linux sms hack used inotify and didn't check for messages that were
there when the app launched. Replace inotify with a simple glib periodic
timer. A bit of latency mimics SMS better anyway. Update test script to
support SMS, and add params to and otherwise fix linux client so
everything works.
2018-07-05 21:22:20 -07:00
Eric House
d4436b7706 Break part of util into dutil
Trying to separate what's game-specific from what can be app/device
specific (i.e. with a long lifespan, and available when a game isn't
open.)

Android will be broken after this commit and fixed after the next
2018-07-05 07:58:50 -07:00
Eric House
d70b089835 use mem_stream_make_raw() where possible in linux code 2018-06-27 23:37:28 -07:00
Eric House
976db7b181 add mem_stream_make_raw 2018-06-27 23:24:45 -07:00
Eric House
d2ab796fac test script tweaks 2018-06-18 07:11:38 -07:00
Eric House
80167fb2d9 one more assert 2018-06-01 05:58:04 -07:00
Eric House
b7981cc8da print based on time rather than number of iterations 2018-05-31 23:06:51 -07:00
Eric House
ffaa47f893 fix creation of bogus game
Snapshot can be the first write. Save the rowid if it's new.
2018-05-31 22:19:03 -07:00
Eric House
b24d60e7bf add assert to verify no need for mutex 2018-05-31 21:23:25 -07:00
Eric House
dff130d6c6 ignore log dir 2018-05-31 21:23:10 -07:00
Eric House
d240e30bf4 test script: log and show tiles left in tray
Once the pool count drops to 0, start showing the number of tiles left
in the user's tray. This prevents there being a long time when nothing
seems to be changing *and* the script from exiting early because it
thinks all games are hung.
2018-05-25 21:36:25 -07:00
Eric House
1821d197b9 fix to compile on 32-bit system 2018-05-23 19:48:30 -07:00
Eric House
cee7d696fc fix stuff to make valgrind happy 2018-04-17 21:13:53 -07:00
Eric House
1b71198d4e add valgrind option to test script 2018-04-14 10:48:20 -07:00
Eric House
ca54371515 tweaks to test script
Make fewer games with > 2 players, as that's rare. Fix calculation of
total number of launches to include games that have ended.
2018-04-14 10:42:53 -07:00
Eric House
317df71588 more valgrind fixes 2018-04-14 10:17:12 -07:00
Eric House
05892c630e lazy: use glib to avoid gcc warnings 2018-04-14 09:39:27 -07:00
Eric House
3bb6f842b2 fix valgrind-flagged errors 2018-04-14 09:13:43 -07:00
Eric House
afbf5a2218 fix python script to catch relay.py errors 2018-04-06 21:50:13 -07:00
Eric House
89809e051d compile with latest gcc (untested on old) 2018-04-06 21:49:51 -07:00
Eric House
4504302b3b make "release" builds compile again
Release isn't really a thing on linux, but I'm fixing something that
only reproduces when DEBUG is undefined.
2018-02-18 11:30:54 -08:00
Eric House
19a6672785 don't show current players tiles in list of remaining 2018-01-18 22:02:06 -08:00
Eric House
af58110489 add missing deb packages 2017-12-20 21:45:20 -08:00
Eric House
da1c3f992a Merge branch 'android_branch' into relay_via_http 2017-12-15 07:20:53 -08:00
Eric House
2e71aedc02 fix --game-dict option 2017-12-09 21:32:05 -08:00