Commit graph

12637 commits

Author SHA1 Message Date
Eric House
829242c9bb fix to deal with failed downloads 2021-03-19 14:29:48 -07:00
Eric House
52b1300d90 cleanup; remove dead code 2021-03-19 14:29:48 -07:00
Eric House
17311dc757 get rid of dict processing where possible
The old API required passing dict into game creation/loading. New
doesn't, but in some places I was doing other stuff there (like checking
existance), so can't remove there. Still code goes away.
2021-03-19 14:29:20 -07:00
Eric House
970c2f6f9a make android compile/run with wasm changes 2021-03-19 14:29:20 -07:00
Eric House
34aee3d7d0 add remaining langs to code-to-lang table 2021-03-19 14:29:20 -07:00
Eric House
598565836d separate indexeddb filesystems for dbg and rel 2021-03-19 14:29:20 -07:00
Eric House
ef673d8df0 prune some logging 2021-03-19 14:29:20 -07:00
Eric House
c859caae8d cleanup (and get rid of constant JS error) 2021-03-19 14:29:20 -07:00
Eric House
430b6894f0 correctly render utf
Was using the wrong API. Also upgraded font to DejaVu Sans
2021-03-19 14:29:20 -07:00
Eric House
f0d8a71deb split dict faces using js so utf8 chars are ok
As with java, the platform knows utf-8 better than vanilla C, so use a
JS inlined function to split a binary stream into its "face" components.
2021-03-19 14:29:20 -07:00
Eric House
b3e4bc24af remove dead file 2021-03-19 14:28:34 -07:00
Eric House
c19d82541d allow language selection in newgame dialog 2021-03-19 14:28:34 -07:00
Eric House
4f524d0bb0 download wordlists when needed for invitation 2021-03-19 14:28:34 -07:00
Eric House
3c0edb3531 use constant consistently 2021-03-19 14:27:04 -07:00
Eric House
39be910b13 tweaks 2021-03-19 14:27:04 -07:00
Eric House
567c3dbf9e show mempool stats (DEBUG builds) 2021-03-19 14:27:04 -07:00
Eric House
4937d13273 use indexeddb for storage 2021-03-19 14:27:04 -07:00
Eric House
2a6931fdcf add and start using indexeddb via emscripten APIs
Replace a couple of load/store actions with new APIs that do so
asynchronously (using indexeddb underneath, via emscripten APIs.)
Required restructuring how app starts. More changes to come. The idea is
to replace wordlist storage: this'll keep 'em smaller and not require
conversion to string.
2021-03-19 14:27:04 -07:00
Eric House
55f590ca0b choose the smallest dict available
I'm running out of memory when using the largest English
dicts. Something other than LocalStorage will have to be used for
Polish, but for now limp along with smaller wordlists.
2021-03-19 14:27:04 -07:00
Eric House
dd78abb116 separate dbg and rel directories 2021-03-19 14:27:04 -07:00
Eric House
664913b2eb fix NPE when len not initialized
Duh....
2021-03-19 14:27:04 -07:00
Eric House
d5e7dc4c97 game from a downloaded wordlist works!!!! 2021-03-19 14:27:04 -07:00
Eric House
afc3ff156e make game ask for dicts when needed
It's awkward for platform code to create a dictionary prior to opening a
game whose data contains the information about what dict to open. So add
a dutil method to fetch a dict, and call it from inside game opening
code. Makes linux code better at least.
2021-03-19 14:27:04 -07:00
Eric House
7924c046d6 fix linux compile 2021-03-19 14:27:04 -07:00
Eric House
5e9863adaf snapshot: downloading wordlist seems to work 2021-03-19 14:27:04 -07:00
Eric House
2ab2f5642e add name button and store wordlist
As a p.o.c., load the built-in wordlist into storage once, and
thereafter use it from there rather than as a file. Now it can go away
and a wordlist for the user's locale be downloaded and stored instead.
2021-03-19 14:27:04 -07:00
Eric House
c829017150 comment out logging 2021-03-19 14:27:04 -07:00
Eric House
0508fe1418 hide device buttons sometimes 2021-03-19 14:27:04 -07:00
Eric House
46ec7e5e3e remove removed file 2021-03-19 14:27:04 -07:00
Eric House
06b530c443 add notion of index to storage
I'm heading toward being able to know what all the games are by how
they're stored in a xplatform way. This is a start. Adding a second key
to storage, and looking at grouping everything where one key or the
other matches.
2021-03-19 14:27:04 -07:00
Eric House
39161a1170 just some notes 2021-03-19 14:27:04 -07:00
Eric House
c9ea5c1f69 remove stuff from html 2021-03-19 14:27:04 -07:00
Eric House
4eede76780 add callback called when window regains focus
I need to redraw the canvas then, but haven't figured out yet.
2021-03-19 14:27:04 -07:00
Eric House
fa8bcd3c2c url-decode args prior to passing to main() 2021-03-19 14:27:04 -07:00
Eric House
6b650907b2 regression: notify remote when deleted game messaged 2021-03-19 14:27:04 -07:00
Eric House
c801243dd5 hide game buttons when no game visible 2021-03-19 14:27:04 -07:00
Eric House
ffc42ed5e0 remove deleted games from games list
Was getting crashes since they could still be looked up
2021-03-19 14:27:04 -07:00
Eric House
61be81cf1a invite known players 2021-03-19 14:27:04 -07:00
Eric House
30e6182c7a sort game names in opengames dialog 2021-03-19 14:27:04 -07:00
Eric House
280390990f use new scheme to simplify blank picking 2021-03-19 14:27:04 -07:00
Eric House
ae05e62a5a Don't fail when two games have same name
Needed to change how callbacks worked, and that temporarily killed
sorting. Will fix.
2021-03-19 14:27:04 -07:00
Eric House
ab6abea6a7 use a callback instead of malloc inside js 2021-03-19 14:27:04 -07:00
Eric House
534e245048 change load-from-storage to not require free() 2021-03-19 14:27:04 -07:00
Eric House
03d76fbacd use name from invitation 2021-03-19 14:27:04 -07:00
Eric House
523c9b270a keep games open and switch between them
Motiviation was to be able to deliver a message in the background, but
at least for now it's easier not to close games again. Can always do
that later if it's a memory problem.
2021-03-19 14:27:04 -07:00
Eric House
5cd4b31648 fix to do num-based comparison 2021-03-19 14:27:04 -07:00
Eric House
c8f22f5fb1 register with mqtt host 2021-03-19 14:27:04 -07:00
Eric House
033290bd69 cleanup, esp around js callbacks 2021-03-19 14:27:04 -07:00
Eric House
940e2569c9 fix exiting when another tab opened. And cleanup. 2021-03-19 14:27:04 -07:00
Eric House
41cd3d8f39 open game to receive message 2021-03-19 14:27:04 -07:00