Commit graph

11643 commits

Author SHA1 Message Date
Eric House
07f4774a7c refactor so common dictnry does more work
Linux and Android duplicated all the code to parse a wordlist file --
and shared a bug that needed fixing. So now most of that is in a common/
function both call, and the bug -- failing to mask out flag bits I don't
care about -- is fixed.
2020-05-01 09:18:27 -07:00
Eric House
f1f6d5b642 change name of Spanish wordlist
"Spanish" is redundant
2020-05-01 08:59:58 -07:00
Eric House
dfbbf2d480 don't assert wordlist length wrong
For some reason the header and dawg data in Spanish wordlist don't
agree. Until I fix this, remove the assertion from the (dev-use-only)
script that dumps wordlist since it breaks it for other uses.
2020-05-01 08:59:58 -07:00
Eric House
71575934b8 mark-bad menuitm (DEBUG) for standalone games too 2020-04-30 13:25:25 -07:00
Eric House
f7374f54c5 fix Spanish support for lowercase
"special" casing is specified in two places, and I forgot to modify the
second one when I added allowing lowercase alternative spellings
2020-04-30 13:06:01 -07:00
Eric House
2d6aa1d019 final change list change? 2020-04-30 09:21:30 -07:00
Eric House
5eef348a6c remove mistaken code (replacing with assert for now) 2020-04-29 12:31:31 -07:00
Eric House
fb2fcf15cc tmp fix for Hungarian: remove duplicate words
Find-prefix feature in current code crashes on Hungarian because it
allows duplicates (words that occur spelled with the same letters but
different tile combinations.) Modify Makefile to exclude those (as it
does for all other multi-letter-tile languages). And to pull the git
source of the wordlist on demand.
2020-04-29 12:29:26 -07:00
Eric House
7efd084d35 don't assert in race condition loss 2020-04-29 10:54:19 -07:00
Eric House
0e0615f5d2 fix another likely race condition
Use an ArrayList rather than an array, though that the size of the array
changed mid-calc suggests there could be other problems later. We'll see.
2020-04-29 10:44:31 -07:00
Eric House
8fb21002ad word around some race condition to avoid crash
Reported by Play Store user; can't reproduce but this should fix it.
2020-04-29 10:37:42 -07:00
Eric House
1969b1137e turn off thread->env mapping for DEBUG too (for now)
I'm getting crashes and don't want to think about it. It may be time to
remove this, though it's needed for logging-storage to work from jni.
To be revisited....
2020-04-29 10:31:37 -07:00
Eric House
e34da24393 revert wordlist changes
There are bugs there still to resolve and I need to ship. Will return
once they're fixed.
2020-04-29 10:15:58 -07:00
Eric House
0078e58535 cleanup around jni wrapping and checking
Separated the refcounting and ptr-as-long wrapping aspects of GamePtr
into a superclass that others might later inherit from. Cleaned up
dict_iter entrypoints, and added sanity checks to both structs so I'll
quickly notice if I get the ptr management wrong.
2020-04-28 20:13:59 -07:00
Eric House
9aaeee19b1 remove unused (and confusing) fields 2020-04-28 15:34:29 -07:00
Eric House
8097a6ba0b fix not indicating when no results 2020-04-28 15:24:32 -07:00
Eric House
e7c96290ea name change only
It was confusing using dict_ as the prefix for two "classes"
2020-04-28 15:24:22 -07:00
Eric House
b2bc4e34cf do wordlist lookups using tiles not chars
Fixing a problem with languages (like Hungarian) where it's legal to use
a two-letter tile or two single-letter tiles to play the same word. When
words are seen, or searched for, as char-arrays, there are
duplicates. Current code crashes, but there's also risk the user gets
unexpected behavior. Crash is fixed, and foundation laid for better UX,
by doing all searches for tile arrays. If a search string translates to
more than one tile array the user must choose. For that choice to make
sense it's now possible to translate tile[] to char[] with a delimiter
between the tile strings.
2020-04-28 13:29:12 -07:00
Eric House
f8aa204842 another changelog addition 2020-04-26 15:42:28 -07:00
Eric House
182b8e0489 fix compilation where DEBUG not set 2020-04-26 13:49:54 -07:00
Eric House
9fa23af6e0 retain thread->env mapping in DEBUG builds only
I'm keeping it AND asserting at every possible location that the env
passed all the way in is the same as what the mapping produces. If in
months I haven't seen a single crash then I can evaluate which way of
passing the env around is better. (It'd be code size vs. performance,
as the passing of env is noticably faster. Code size could be fixed by
turning 'XWEnv xwe,' into a macro that goes away on some builds.)
2020-04-26 13:39:21 -07:00
Eric House
88335d38f2 stop using thread->env mapping for util callbacks 2020-04-26 13:39:21 -07:00
Eric House
eb9ef738e4 remove comms/transport from using thread->env map 2020-04-26 13:39:21 -07:00
Eric House
2343c34a44 remove more use of thread->env mapping 2020-04-26 13:39:21 -07:00
Eric House
b7b7da795a remove use of thread->env mapper for drawing 2020-04-26 13:39:21 -07:00
Eric House
cfaa6849b2 pass env into dict-related methods
I was getting an occasional crash using a stale env to delete a dict's
resources because the dict was cacheing the env that created it. Dumb!
Using the thread->env mapping stuff worked, but that felt risky and so I
tried just passing it in. It's safe, and involves an amount of change I
can tolerate. So likely going that way.
2020-04-26 13:39:16 -07:00
Eric House
72cf605792 update changelog 2020-04-24 23:42:27 -07:00
Eric House
b618c99fa8 just print the upper-case versions of tile faces 2020-04-24 22:21:02 -07:00
Eric House
a35cc760f2 get rid of the stupid '->' in game submenu title 2020-04-24 22:17:39 -07:00
Eric House
4e1018d7d2 reflect log-storage state in what menus are available
It'd debug-build-only, but I like knowing what's going on.
2020-04-24 21:57:32 -07:00
Eric House
267a24619a don't require .xwd's extension to be omitted for file to be found! 2020-04-24 21:36:16 -07:00
Eric House
1c0348dbf1 add option to print a delimiter between tiles
For Hungarian, there are "duplicate" words because e.g. the string CS
can be spelled with two tiles or one. If a delimiter is printed at tile
boundaries the duplication goes away.
2020-04-24 21:14:20 -07:00
Eric House
adadbd8647 make symlink relative
Useless if it specifies my machine :-)
2020-04-24 20:09:08 -07:00
Eric House
cbf81c64bd track and pass all words when phonies==BLOCKED 2020-04-24 14:58:17 -07:00
Eric House
cc4776d29d Populate an actual wordlist for Hungarian
Add Makefile filters to create a wordlist with about 42K words derived
from a github project (thanks to pointers from an informant. :-) Per
him, and contrary to how Catalan does it, double-letter-tile words
also appear in single-letter variants if the tiles allow.
2020-04-24 13:44:55 -07:00
Eric House
ebc6c4629d make language names localizable (and add Hungarian) 2020-04-24 13:36:01 -07:00
Eric House
99df8806c3 wrap test-only feature in new compile-time flag 2020-04-24 13:33:40 -07:00
Eric House
3ee6f95a16 update changelog 2020-04-24 13:13:49 -07:00
Eric House
5786151e76 Merge branch 'android_branch' into android_translate 2020-04-24 13:07:34 -07:00
Eric House
951c0c00de fix malformed format specifier 2020-04-24 13:04:32 -07:00
Eric House
83a5d32ed0 check for null 2020-04-24 12:58:02 -07:00
Eric House
f51030186f fix non-debug build warnings 2020-04-24 08:54:57 -07:00
Eric House
e8a4c6e39a don't run duplicate games by default
Duplicate games get lots of crashes when mixed with phonies code. Will
need to fix that before enabling duplicate mode. In general there are
lots of assertion failures mixing trades and undos and phonies and
running dozens of games at once. I don't think that's new so will ship
now and fix later.
2020-04-24 08:38:31 -07:00
Eric House
70479710bc changelog for new release 2020-04-24 07:40:25 -07:00
Eric House
cc28562061 files to create empty Hungarian wordlist 2020-04-24 06:34:30 -07:00
Eric House
d4e71caed1 fix warning 2020-04-24 06:34:30 -07:00
Eric House
abc34f623f add Hungarian to display wordlist 2020-04-24 06:34:30 -07:00
Adnan1091
0ac68548b6
Translated using Weblate (Turkish)
Currently translated at 2.0% (17 of 825 strings)
2020-04-24 11:11:15 +02:00
Eric House
2204d951a7 don't crash dumping empty wordlists 2020-04-23 22:10:25 -07:00
Eric House
f35136099d don't crash when wordlist provides no bitmap 2020-04-23 22:01:07 -07:00