Andy2
8e0e8d911e
fix compile errors
2011-09-26 18:12:16 -07:00
Eric House
26ba812aff
cleanup
2011-09-22 17:31:57 -07:00
Eric House
f0c3e2c5f0
Merge branch 'android_branch' into send_in_background
2011-09-22 17:22:01 -07:00
Andy2
35a0a3a291
passing pool into word-listing code a mistake as it put tiles back
...
when undoing and so the pool grew each time. Fix, and remove server
API as it's unneeded.
2011-09-22 06:41:48 -07:00
Andy2
d000c430b9
thought there was an internal problem with pool and wrote debug-only
...
code to check. There wasn't, and it's unused, but no point writing it
again.
2011-09-22 06:40:44 -07:00
Andy2
92614370ce
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/common/comms.c
2011-09-20 06:21:54 -07:00
Andy2
43e8bd7879
formatting only
2011-09-18 19:05:29 -07:00
Andy2
26ce5a119a
in model_getWordsPlayed, make '\n' a separator rather than a
...
terminator. Makes it easier to split in the Java world without
getting an extra empty word.
2011-09-18 19:05:00 -07:00
Andy2
9eacdb3856
add server_listWordsPlayed, and implement via function in model.c that
...
uses existing stack and undo features to run a WordNotifierInfo over
some number of scoring passes to gather the words seen. Seems to work
as tested from gtk version. Now need to try from android....
2011-09-18 17:20:01 -07:00
Andy2
63893b8a0d
add stream_getPtr() and use to remove a couple of allocs, including
...
one per message sent.
2011-09-18 16:54:36 -07:00
eehouse@eehouse.org
98c2617613
Merge branch 'android_branch' into send_in_background
2011-09-14 06:47:12 -07:00
Andy2
f8f06a7768
raise same error when try to commit exchange out-of-turn is raised for
...
out-of-turn move attempt -- and don't exit exchange mode.
2011-09-12 18:33:33 -07:00
Andy2
e709ea730c
only exit exchange mode if user confirms trade
2011-09-09 21:30:40 -07:00
Andy2
c9c498786e
add to game state whether any tiles selected. Use that to disable
...
'commit exchange' button when there's nothing to commit, and get rid
of error message used when committing nothing since it's now
impossible (on Android).
2011-09-09 19:04:25 -07:00
Andy2
66fb5f87fb
don't exit trade mode if no tiles selected; fix warning string to match.
2011-09-09 18:40:19 -07:00
Andy2
201db9415c
sort tiles after trade too
2011-09-09 18:32:04 -07:00
Eric House
84931f34ff
Merge branch 'android_branch' into send_in_background
2011-09-07 21:44:36 -07:00
Andy2
e4b952222a
unify two ways of saving words encountered during scoring, removing
...
one and changing the site that used it to use the other. Not visible
outside of common, but should make it easier to harvest a list of all
words for one move or the entire game.
2011-09-02 19:11:04 -07:00
Andy2
2d2f3e23fd
change signature of util_playerScoreHeld(): pass player num rather
...
than formatted text. Client code can use new
model_getPlayersLastScore() or whatever else it wants to build text to
show the user.
2011-09-02 18:36:03 -07:00
Andy2
b6a4621617
trivial optimization
2011-09-02 18:34:07 -07:00
Andy2
99679357a8
Exit trade mode on "commit" even if no tiles selected (in keeping with
...
error message on Android); don't block trade if pending tiles are on
board; instead undo them. There's redo now so there's no need to
confirm, no data loss.
2011-09-02 06:48:06 -07:00
Andy2
e94524958f
get rid of util_setInTrade(); fix passing of selBits when trading
...
(broken with prev checkin.)
2011-09-01 19:51:26 -07:00
Andy2
8e45dcd720
exit trade mode only in the case where we're asking user to confirm,
...
and do it before server can call callback that changes selPlayer so
it'll actually work.
2011-09-01 18:50:09 -07:00
eehouse@eehouse.org
b6e5327b1a
Merge branch 'android_branch' into send_in_background
2011-08-31 06:46:42 -07:00
Andy2
9c60a5c05b
make sure util_setInTrade() gets called every time internal state
...
changes, including on creation/load from stream.
2011-08-31 06:33:36 -07:00
Eric House
c01981bc8f
Make miniwindow stuff compile-time optional. The goal's to use native
...
features where they look better or are easier to manage, e.g. Toasts
and dialogs on Android.
2011-08-29 20:36:01 -07:00
eehouse@eehouse.org
3cdd4c1c9b
Merge branch 'android_branch' into send_in_background
2011-08-21 15:04:25 -07:00
Andy2
9612b28b1f
use goto to avoid having multiple returns. No behavior change.
2011-08-21 14:20:59 -07:00
Andy2
eb00984563
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java
2011-08-20 12:44:17 -07:00
Andy2
7a1346e530
add assert to catch bad dict earlier
2011-08-18 07:49:40 -07:00
Andy2
b9be2b45f4
sendMsg needs to report success if no-conn send works.
2011-08-17 18:41:45 -07:00
Andy2
7ab8c6eca4
re-factor sending code so essentially same message (without cookieID
...
that implies a connection) is sent and received by no-conn code. Use
flags to determine if comms can support no-conn sending without making
up the message only to have it fail to send.
2011-08-16 19:36:23 -07:00
Andy2
dfab747504
make server_do() take a new param to allow caller to call it until
...
there's nothing more to do (without the assumption it's driven from an
event queue.)
2011-08-16 19:28:59 -07:00
Andy2
e88af19e0a
toward the ability to send replies to messages received in background
...
without user having to open the game, which will e.g. allow a host to
assign tiles, or a robot to move, without the phone's owner noticing
there's a message. This is on a branch because it may never work.
2011-08-10 18:28:34 -07:00
Andy2
35f059e14c
remove logging
2011-08-08 20:21:55 -07:00
Eric House
cbfdf992bd
add compile-time option to allow passing game seed from commandline.
...
This should allow testing relay changes to deal better with duplicate
seeds.
2011-07-31 22:23:46 -07:00
Andy2
de16ee93d7
get rid of some logging
2011-07-20 18:46:55 -07:00
Andy2
ecaca66a96
move turn-in-range assert to where it won't fail
2011-07-19 06:17:50 -07:00
Andy2
5deb68486c
add a ton of asserts (no code change otherwise)
2011-07-18 06:44:17 -07:00
Eric House
febb640049
add name of remote player to notification that remote player moved.
...
And remove a few dead strings.
2011-07-15 18:13:55 -07:00
Andy2
f4a11d2be5
ignore commit turn request when player has 0 tiles. This catches,
...
awkwardly, the case in a networked game where a player runs out of
tiles in his turn but the server hasn't responded yet to kill the
game. It remains the player's turn and he can make lots of 0-point
moves while waiting. (Making it the next player's turn would be the
right thing to do if that player were always on a different device.)
2011-07-12 07:13:21 -07:00
Andy2
42e7a113b9
tweak logging
2011-07-12 07:09:40 -07:00
Andy2
f3ab40519d
add new error message to DEBUG-only printing code.
2011-07-06 06:47:56 -07:00
Andy2
4b75174170
save stateAfterShow as part of serialized game state. Fixes problem
...
where games with more than two devices would hang because server.c
code was dropping messages that comms.c code thought were good and so
ACK'd preventing them from being sent again. They were being dropped
because the game was in the wrong state after displaying a move-made
dialog because the state it was to move to after doing that display
had not been saved.
2011-07-04 12:51:00 -07:00
Andy2
0eec455119
change one return type; improve logging
2011-07-04 12:46:48 -07:00
Andy2
8904f37e1a
force XW_STATE to be 1 byte.
2011-07-04 12:45:51 -07:00
Andy2
a96dfb57f6
drop-packet test got an assert because we assumed the effects of a
...
dropped packet. Instead, now treat the connection as broken and
restart.
2011-06-27 18:30:52 -07:00
Andy2
e886a1aefe
lots more changes -- another snapshot, this, rather than stuff
...
carefully polished and reviewed. Shows progress, though, in getting
through tests.
2011-06-23 07:12:50 -07:00
eehouse@eehouse.org
484bb295d0
Merge branch 'android_branch' into android_invite
2011-06-06 22:08:49 -07:00
Andy2
1bc70f2c8f
google reports a crash in warnIllegalWord that only makes sense if I'm
...
passing a 0-length array of bad words. That in turn suggests a
screwup where a move's rejected for some reason other that a word not
being in the dictionary. This is all supposition, and all stuff
that'd be caught by asserts in a debug build, but: when there are no
bad words don't report them -- even if the move's rejected.
2011-06-06 20:33:10 -07:00
Andy2
a29f08616e
what I meant to check in.
2011-05-19 22:53:58 -07:00
Andy2
89911ecaa4
add server_getMissingPlayers to return a bitvector indicating players
...
not yet received on device. Meant to be included in summary. I'm not
happy with how much code it took to figure this. I don't know
server.c all that well any more.
2011-05-19 22:48:21 -07:00
Andy2
4c5c435fb5
add new parameter so client always gets notified on connection
...
including how many players are still missing.
2011-05-19 05:51:00 -07:00
Andy2
3b3a822dcc
a gmae may have several dictionaries in several places, but all should
...
share the same language. So pick one to send to draw_dictChanged
rather than sending all (some of which may be null.)
2011-04-28 18:40:44 -07:00
Andy2
af08b2e5b0
add a couple of asserts
2011-04-25 20:17:54 -07:00
Andy2
4e7570020f
remove mistaken (I think) assert
2011-04-20 22:13:44 -07:00
eehouse@eehouse.org
5a21aea2e5
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-04-13 06:58:58 -07:00
Eric House
3cc105da0b
add ability to dump board (model) as text, protected by ifdef that
...
will likely only get set on Linux. Uses lower-case to designate
blanks. For that and maybe string size assumptions is very broken for
non-ascii languages, including Spanish.
2011-04-13 06:45:22 -07:00
Eric House
92ac25ed3f
don't require MAX_NUM_PLAYERS==4
2011-04-12 22:17:45 -07:00
Andy2
002bb40a09
report counts/values using language rather than dictionary name. To
...
support that, pass lang name from java into jni.
2011-04-11 18:55:42 -07:00
Andy2
96254ad8b5
when opening saved game, notify draw of per-player dicts as well as of
...
a single game-wide one.
2011-04-11 06:39:31 -07:00
Eric House
c77d3039cc
add XP_FREEP. Should be no change in behavior.
2011-04-07 18:07:45 -07:00
Andy2
3b7b4802a9
add ability to specify, track and use separate dictionaries for each
...
player. Works for gtk client. Compiles for Android but there's no UI
yet to specify more than one dict. Management of dupicate dicts
without duplicating memory -- refcounting -- will be up to the
platforms.
2011-04-01 19:57:10 -07:00
Eric House
67a3349919
Don't move arrow on pen-up if pen-down was in a different cell.
2011-03-29 18:13:38 -07:00
Eric House
f4ea54c30b
cleanup; no behavior change
2011-03-29 18:12:55 -07:00
Andy2
d9bb5197d4
Add two new menus to be available only when in trade mode. Hide and
...
show them and another group depending on whether trading at the time.
To make that work, replace the individual calls made to dis/enable
toolbar buttons with a single jin call that takes a struct full of
booleans and make that struct available in BoardActivity where menus
are hidden/shown. Remove the individual calls from the jin interface.
2011-03-10 18:13:56 -08:00
Andy2
aa88503cfb
have board_canHint() return false when trade in progress.
2011-03-08 07:40:38 -08:00
Andy2
828bd9aa4c
fire user error rather than committing turn when trade attempted
...
without any tiles selected.
2011-03-07 06:28:43 -08:00
Andy2
d2fda267e5
fix assertion failure that happened when I changed whether remote
...
scores were shown mid-game. If the value's not as expected just don't
show the score.
2011-02-18 17:43:01 -08:00
Eric House
984227955b
make two versions the same since there's been no release since first was added.
2011-02-09 22:17:18 -08:00
Andy2
c56f0b5cea
Save cached prev move explanation as part of stream so can be shown to
...
user when game is opened later. Fixes problem displaying empty
explanation on first open of game that was updated in the background.
2011-02-09 06:30:51 -08:00
Andy2
8a7029435c
fix some comments
2011-02-01 18:55:48 -08:00
Andy2
4b8e462b8b
check for null ptrs to allow creating loading games that won't draw or
...
communicate with users.
2011-01-23 21:45:41 -08:00
Andy2
d98a3fe232
when peeking is disabled (the default on android), don't allow
...
swapping to view of the current player's board if the current player
is remote -- because then won't be able to swap back to own view until
it's your turn. Fixes annoyance in multi-device game on Android.
2011-01-21 21:32:52 -08:00
Andy2
7d6e136ca3
fix comment
2011-01-19 06:21:31 -08:00
Andy2
cd5dedfa67
add compile-time flag to disable selection of tiles in tray (other
...
than as part of an exchange) and to remove feature where tapping empty
cell moves selected tile there. This is to address user confusion on
Android, and I'll ask for testing before putting this in the main
branch. This leaves only place-arrow-then-tap as an alternative to
drag-and-drop, and may annoy people. Worth trying: disable only the
automatic selection of another tile after the selected one is dropped.
2011-01-12 19:00:48 -08:00
Andy2
6ccf0c167c
fix next-hint which I just broke: need to track whether working on
...
behalf of robot after all, though it's not needed in the API, to
distinguish case where moves must be cached (for next-hint feature).
2011-01-11 18:10:48 -08:00
Eric House
2b502a39c6
fix mod-by-zero error when iq == 2
2011-01-10 18:19:10 -08:00
Andy2
efb54c7b05
fix compile errors the stricter android compiler found.
2011-01-10 06:56:11 -08:00
Andy2
f111b78714
switch from tracking robot intelligence as a per-game boolean
...
implemented (when not smart) as trying to match the human's score to a
per-robot value between 1 and 100 that gives the percentage of best
moves to store before picking randomly from among them. So a 1 means
save only the best move and always pick it; 100 means save all the
best moves (how many are saved is compile-time configurable) and pick
one of them. Because it's settable per-robot a smarter robot can be
played against a dumber one (though I may choose not to make it
settable per-robot on shipping versions.)
2011-01-10 06:44:28 -08:00
eehouse@eehouse.org
64bcb8bb2b
Revert "replace call to rand() with android_only function that reads two bytes"
...
This reverts commit 1653b9f6e9
.
2010-12-08 05:38:41 -08:00
Andy2
4a12f7a96f
Revert "in attempt to work around non-random rand() in jni world, call back"
...
This reverts commit 99c92e779d
.
Conflicts:
xwords4/android/XWords4/jni/utilwrapper.c
2010-12-07 18:43:53 -08:00
Andy2
e4999acc98
add dict_getWordCount()
2010-12-06 18:24:31 -08:00
Eric House
c4cdc24b78
initial changes to add a header to xwd format so that stuff like
...
number of words can be included. Changed to build dicts and linux to
open them. Android still needs to learn. Also, some of the tools in
dawg/ need to be fixed to read old-format (pre-utf8) .xwd files.
2010-12-05 19:33:10 -08:00
Andy2
99c92e779d
in attempt to work around non-random rand() in jni world, call back
...
into the java world by making it a util_ctxt function. Do same on
linux to test. We'll see how it is -- and can back this commit out if
there's no improvement.
2010-12-02 19:02:36 -08:00
Andy2
1653b9f6e9
replace call to rand() with android_only function that reads two bytes
...
from /dev/urandom. rand() has been returning pretty crappy numbers
resulting in lots of clustering of tiles in trays. Let's see if this
is any better.
2010-11-29 17:12:12 -08:00
Andy2
3ee3af8881
init crosshairs correctly so 0th column and row aren't drawn short.
2010-11-22 07:04:51 -08:00
Andy2
92940e6638
add model_getNPlayers()
2010-11-19 18:22:39 -08:00
Eric House
7a2d279308
add logging so script can better track what state relay game is in
2010-11-18 22:27:06 -08:00
Andy2
b0a4790ce0
respond to new game-gone message by passing to utils.
2010-11-11 06:41:24 -08:00
eehouse@eehouse.org
048eff92b8
Merge branch 'relay_proxy' of /home/andy2/dev/git/LOCAL_ORIGIN into relay_proxy
2010-11-10 07:17:39 -08:00
Eric House
2a2f4d4395
been a while since cvs...
2010-11-09 05:53:49 -08:00
Andy2
22f7a42c1d
make comms_getChannelSeed non-static so jni can call it
2010-11-08 17:22:38 -08:00
Andy2
cfd4345287
remove too-frequent logging
2010-11-07 13:31:43 -08:00
Andy2
99a557a604
fix blanks-first option to assign one blank per tray rather than all
...
to first. Makes for more realistic test.
2010-11-07 12:20:39 -08:00
Andy2
dd3bd1f661
don't show hint buttons until there are tiles assigned
2010-11-06 21:31:53 -07:00
Andy2
9e05e6c2b3
add lastMsgRcd to status printout
2010-11-03 18:28:54 -07:00
Andy2
3d70da5a8d
cleanup
2010-11-01 06:57:54 -07:00
Andy2
804070efc7
base comms_canChat() on whether connID's been assigned. It's possible
...
to send a message from a client immediately after its initial message
but init-message dupe-detection in comms will drop that because only
one channel-0 message is expected -- the initial connection message.
So don't encourage platform code to enable the feature before common
code can deliver the message.
2010-11-01 06:57:41 -07:00
Andy2
8c7043d42c
fix crash using undo/redo after a turn has overwritten pending tiles:
...
when redoing need to check that cell is still empty.
2010-10-29 20:07:09 -07:00
Andy2
5b33df4e25
modify model_getTile to take NULL for out parms where the result is
...
often ignored, then pass NULL instead of the address of variables
called 'ignore'. Should be no behavior change.
2010-10-29 19:52:15 -07:00
Andy2
0d7f2c4f23
add devOrder (= hostID) to params passed on connect. Should make for
...
better explanatory message.
2010-10-29 06:31:33 -07:00
Andy2
4cd15a9c6a
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy
...
Conflicts:
xwords4/common/comms.c
2010-10-29 05:27:07 -07:00
Andy2
41fc05106b
add room name to callback used when device connects
2010-10-28 18:45:55 -07:00
Eric House
eba5b77494
add comms_isConnected; public room variables default to false
2010-10-27 20:50:11 -07:00
Eric House
b878599f7b
remove comment
2010-10-26 20:57:27 -07:00
Eric House
fd85bd35da
set dictLang to 0 (unknown) when reading old-version stream
2010-10-26 20:56:41 -07:00
Andy2
e909e4b343
remove redundant message; advance state to ALLCONNECTED on receipt of
...
RECONN or CONN that lists the game as full. This means we get the
all-green icon (or the A in the gtk case) when in a consummated game
rather than only when all devices are actually connected.
2010-10-23 20:29:24 -07:00
Eric House
85d29cf560
if can't send allcond to a device because it's not connected queue the
...
message to be sent next time it does. And since the cookieID will
change and should be there already anyway, remove it. (Should remove
the hostID too for the same reason.)
2010-10-22 19:02:52 -07:00
Andy2
99dbbb443c
add comms_canChat, which knows better than java code what state a
...
connected game is in, and call it to determine whether to show the
chat icon.
2010-10-21 19:14:10 -07:00
Andy2
b9e3ca212b
turn off glib-dependant checksuming for non-linux builds
2010-10-18 22:08:04 -07:00
Eric House
3648c22bd4
fix long-standing bug where initial messages were not getting deleted
...
and multiplying; log md5 sums of messages in debug build.
2010-10-18 20:17:44 -07:00
Eric House
f246178b8f
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy
2010-10-12 19:18:21 -07:00
Eric House
0cf94dda8b
fix frequent assertion failure that dates from when no messages passed
...
outside of ALLCOND state. With this fix the test script is running
all games to completion if given enough time.
2010-10-12 19:16:46 -07:00
Andy2
e637a64d96
Change param signage to fix compiler warning
2010-10-11 06:20:30 -07:00
Eric House
61b228f189
implement simple chat on top of current server-level protocol --
...
meaning it'll work on any tranport but relay doesn't know about it.
(If relay knew about it I could send a "shutting down for a minute"
message to every connected device, which would be cool. But this is
easier.) Written, BTW, enroute from Seattle with help from beer from
Chris in first class. :-)
2010-10-03 18:11:51 -07:00
Eric House
4a5de0a24c
cleanup
2010-10-03 18:09:15 -07:00
Eric House
a89520a377
use __func__
2010-09-28 18:04:31 -07:00
Eric House
047f41b516
send cookieid as part of [RE]CONNECT_RESPONSE in addition to ALL_COND (where it's now redundant).
2010-09-20 22:06:35 -07:00
Andy2
6d6ad96cde
don't clear seed when changing roles from guest to host.
2010-09-20 04:56:19 -07:00
Andy2
821e4d9c39
add ACK to protocol, returned by device after gets connName on initial
...
connection. Space is held for device on assumption ack will come
back, then given up if it fails.
2010-09-14 13:54:52 -07:00
eehouse@eehouse.org
0b46455044
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy
2010-09-12 02:34:20 -07:00
Andy2
bd71a15ddc
turn off heartbeats on client side
2010-09-11 01:23:13 -07:00
Eric House
54611df679
nuke unused variable
2010-09-10 05:55:59 -07:00
Andy2
2ee9031fdc
langcode belongs in connect, not reconnect, message
2010-09-10 01:56:58 -07:00
Andy2
20312144dd
tons of changes, still rough, snapshoted here: a gtk device vs device
...
game works to completion with both signing up as guests (no -s) with
one local and one remote player (identical commandlines.) Not yet
tested: if any signs up as a host, reconnecting rather than
connecting, etc. This is just a snapshot.
2010-09-10 01:30:40 -07:00
Andy2
01fe388f85
remove logging accidentally checked in
2010-09-03 06:40:17 -07:00
Andy2
b742c7dbb7
add new booleans to relay address record around public rooms
2010-09-03 06:38:46 -07:00
Andy2
0b91e9634e
save/restore new dictLang field; up stream version
2010-09-01 06:51:44 -07:00
eehouse@eehouse.org
ecd0280353
Merge branch 'android_branch' into relay_proxy
2010-08-26 18:36:55 -07:00
Andy2
d1f6057987
fix stupid typo that meant crosshairs started on top row was only
...
three cols wide at first.
2010-08-26 18:20:24 -07:00
Andy2
4208c33ecf
make lang code support non-conditional
2010-08-25 06:31:38 -07:00
Andy2
3dba8ba13b
Fix bug reported by user: if robot finishes a search but fails to find
...
a move it's still done with its turn and must trade or pass.
2010-08-24 18:38:12 -07:00
Andy2
a34ccb424f
device now passes list of "relayID"s, consisting of connName plus
...
device id, to relay, one for each stored game that's communicating via
the relay. Relay parses out each relayID. Next relay can use these
to look up whether messages are available and reply with that, and
device can put up a notification.
2010-08-22 12:16:57 -07:00
Andy2
09bc83429e
add and set new flags for crosshairs so platforms can do better than
...
fill cells as is done for focus.
2010-08-11 18:50:16 -07:00
Andy2
205723e03b
add missing event to logging
2010-07-30 17:44:20 -07:00
Andy2
d67e421541
get rid of excess logging
2010-07-27 21:36:14 -07:00
Andy2
5b3e41f4e9
fix bug: allow switch *to* player whose turn it is even if allowPeek
...
is off (typically because it was turned off after game was loaded and
while non-turn player's tiles are visible)
2010-07-17 07:11:46 -07:00
Andy2
639feb8965
nuke extra line -- change I forgot to save
2010-07-17 06:23:14 -07:00
Andy2
5b8cf716b3
add pref controlling whether can switch to look at tray of user whose
...
turn it isn't
2010-07-17 06:21:24 -07:00
Andy2
dbed23e240
change definition of movement during drag to include not just drag of
...
a tile but motion on the board which will include crosshairs. This
prevents miniwindow from coming up and stopping crosshairs movement
when it happened to start on a bonus square.
2010-07-16 18:57:08 -07:00
Andy2
a99e8142b0
Merge branch 'android_branch' into toolbar
...
Conflicts:
xwords4/android/XWords4/jni/Android.mk
xwords4/android/XWords4/jni/xwjni.c
xwords4/android/XWords4/res/values/strings.xml
xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java
xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/XwJNI.java
2010-07-16 06:32:32 -07:00
Andy2
a76cdac0c5
don't put up mini window when have penned-down on a draggable tile.
2010-07-13 06:26:55 -07:00
Andy2
21d705c6e7
make wrap code for popping tile up above cursor hotspot (or finger)
...
conditionally compiled. I probably want it off on Android now that I
have crosshairs.
2010-07-12 19:11:24 -07:00
Andy2
0957c95c8e
write and read dummy values to/from stream when KEYBOARD_NAV isn't
...
defined so that the versions are compatible. This will let existing
saved games be read if I turn this off on Android.
2010-07-12 18:49:36 -07:00
Andy2
de32e514ab
cherry-pick three revisions from toolbar branch ( d1c7d4097c
, f848473c1a
and 6484a2fb9b
) and manually fix conflicts.
2010-07-12 18:48:03 -07:00
Andy2
fd9464b909
first cut at crosshairs: drawing in focus color the entire column and
...
row that's currently being touched/dragged through. Meant to aid
users of capacitive touch screens in figuring out what cell they're
on.
2010-07-12 06:39:46 -07:00
Andy2
8172e38cef
write and read dummy values to/from stream when KEYBOARD_NAV isn't
...
defined so that the versions are compatible. This will let existing
saved games be read if I turn this off on Android.
2010-07-09 18:21:05 -07:00
Andy2
6b9b97231a
fix to compile with KEYBOARD_NAV undefined
2010-07-09 06:49:32 -07:00
Andy2
40323b03d2
board_canFlip -> board_visTileCount
2010-07-08 06:38:51 -07:00
Andy2
ac6dc400ce
add board_canHint
2010-07-07 18:47:02 -07:00
Andy2
c98451c62a
remove excess logging
2010-07-07 06:50:47 -07:00
Andy2
a7c77785f6
return false if no move found -- to really fix the crash
2010-07-07 06:40:34 -07:00
Andy2
5725f36db8
detect when no moves found that meet criteria to fix (I think) crash
...
when iterating from highest to lowest move using prevMove.
2010-07-07 06:33:01 -07:00
Andy2
992f45e1bf
new feature: previous move. Modify engine to traverse the set of all
...
possible moves in either order both within a cached subset and when
building cached subsets. Still a bit buggy (shows the same move twice
when moving backwards and reaches the top-scoring move) and not well
tested.
2010-07-07 05:27:57 -07:00
Andy2
5f92491ca3
add and implement board_canTogglePending
2010-07-03 11:38:37 -07:00
Andy2
d44b9907cf
save redoable pending tiles -- and up stream version since format's
...
changed
2010-07-03 11:25:01 -07:00
Andy2
57e246da3b
handle blanks as well in redo of undone pending tiles
2010-07-02 22:44:50 -07:00
Andy2
f77cf0e23d
add board_redoReplacedTiles and model_redoPendingTiles. The latter
...
works as long as no blanks are involved. And new state isn't being
saved so will be lost unless format changed.
2010-07-02 18:52:55 -07:00
Andy2
491cfe7616
add board_canShuffle and implement
2010-07-01 18:55:49 -07:00
Andy2
43c34aa466
add board_canFlip and model_canFlip -- which seem to work though
...
there's no test that when a single tile is on the board it's not in
the middle. Sue me.
2010-06-30 20:25:34 -07:00
Andy2
953b2bcc55
cleanup; allow setting NUM_SAVED_ENGINE_MOVES per-platform
2010-06-28 21:08:13 -07:00
Andy2
0c852981e7
make zoomBy param passed to board_zoom give distance rather than just
...
direction.
2010-06-27 13:12:30 -07:00
Andy2
80aa22b2d1
add common prefs field sortNewTiles and way to set on linux cmdline
2010-06-17 18:10:32 -07:00
Andy2
e0dd3701a0
Add model_sortTiles(); use it; fix some comments and const decls.
...
Sorting always happens now when tiles added; needs to be based on a
preference.
2010-06-17 06:43:16 -07:00
Eric House
34ecac303a
make optional and then turn off feature whereby tap in empty part of
...
tray undoes current move. It's too easy to hit this on a capacitive
display.
2010-06-06 13:32:12 -07:00
eehouse
f514717428
Change board_zoom to indicate direction only of zoom, not number of
...
cols. When figuring internal dimensions zoom out as needed to meet
maxSize value. This fixes problem where rotating a zoomed portrait
board to landscape leaves cells bigger than they can be made by
zooming, but then the desired zoom has been changed and stored and so
on return to portrait cells are smaller/less zoomed. Need to see if I
can live with that.
2010-06-05 03:40:23 +00:00
eehouse
ea6166f8c7
add comms_resetSame that resets relay with existing params.
2010-06-05 03:39:16 +00:00
eehouse
a80d874e9d
change api for board_zoom and change callers. No effect on java and
...
no behavior change.
2010-06-05 03:39:06 +00:00
eehouse
9af9df884b
use same logic to decide to zoom and to report whether can zoom next
...
time. Fixes bug preventing + button from greying out when fully
zoomed in.
2010-06-05 03:38:49 +00:00
eehouse
1f246d20a3
oops. Fix assertion by not stopping dragging unless it's been
...
started.
2010-06-04 03:47:56 +00:00
eehouse
57013a9267
stop dragging before putting up miniwindow. This allows to drag
...
finger off of bonus hint just displayed without scrolling the screen.
2010-06-04 03:47:46 +00:00
eehouse
628f8d9cf3
don't zoom in if doing so will make cells larger than the limit passed
...
in.
2010-06-03 04:57:11 +00:00
eehouse
4f16eee1b6
pass maxCellSize into board_setPos, and use it as limit in calculating
...
whether any further zooming is possible.
2010-06-02 04:58:32 +00:00
eehouse
f5ac51ae73
fix crash using older dict by using current stream version rather than
...
one from before gameSeconds was being preserved in the stream by
write_gi code. I fixed this on a branch a week ago as well, so look
for a merge glitch. Need now to confirm that I'm sending char lists
in initial connect message in the right (null-separated utf8) format.
2010-05-28 02:31:13 +00:00
eehouse
4ce0a30b2d
save gameSeconds even if timer not enabled. Means stream version change.
2010-05-14 12:42:53 +00:00
eehouse
c79b3e2395
make draw_scoreBegin return a boolean like the other two draw_*Begin
...
methods
2010-05-12 11:51:14 +00:00
ehouse
71110a195d
for some reason on wince coords are passed to coordToCell() that are
...
above/left of the board firing an assertion. return false to indicate
not on board but don't assert.
2010-04-24 03:51:39 +00:00
eehouse
166c1ac779
make coordToCell() more inclusive to match pointOnSomething(), otherwise
...
the latter says a point is on the board and the former can't assign it
a row.
2010-04-23 09:35:15 +00:00
eehouse
a07cdd8513
limit depth of zoom further
2010-04-17 04:16:17 +00:00
eehouse
da2cfa5934
changes (commited earlier but now somehow missing) putting
...
scroll-related fields into a struct so vertical and horizontal can be
handled by the same code; add to board_zoom out params indicating
whether further zooming is possible.
2010-04-15 02:15:50 +00:00
eehouse
339fc5a9e6
don't zoom down below two cells so we can still drag-scroll
2010-04-08 04:15:33 +00:00
eehouse
41b29c9ba3
distribute extra pixels evenly, with extras one each at the beginning
...
of the arrays.
2010-04-08 04:15:25 +00:00
eehouse
d01a30d1be
adjust yOffset same as x so we zoom in toward center; reduce xOffset
...
when zoom out makes it too big.
2010-04-08 04:15:16 +00:00
eehouse
a87ecf5638
pass vScale and hScale into draw_boardBegin so platform can use same
...
size font for all cells regardless of size; fix scrolling to pass
actual sum of the disappearing rows' heights.
2010-04-08 04:14:55 +00:00
eehouse
5922d8c96a
fix coordToCell to return false when cell off board -- to fix bug
...
where blank tiles were drawn on top of tray area when scrolled down
there.
2010-04-08 04:14:42 +00:00
eehouse
774d3f8a13
copyright change
2010-04-08 04:14:34 +00:00
eehouse
b1ed0200cc
stretch rows to fill space given by platform: they don't have to be square.
2010-04-08 04:14:22 +00:00
eehouse
d263b47a56
lots of changes, still rough, to allow zooming in and out on board.
...
Includes ability to scroll horizontally by dragging. Board init API
changes to specify board width and max height instead of cell
dimensions, so now board owns task of picking cell size. If the
number of cells does not evenly divide into a board dimension then the
extra pixels are distributed among some columns/rows in a way that
still allows bitblit-based scroll implementations (though horizontal
scrolling at this point always does an invalAll()). Not yet tested
with overlapping tray. And still need to allow rows to be taller than
cols are wide if platform code has given the space. Stream format
changes with this checkin.
2010-04-08 04:14:14 +00:00
eehouse
9b955ae770
resendAll on REconnect as well as connect since it doesn't otherwise
...
seem to get done.
2010-03-28 16:09:34 +00:00
eehouse
55abf1116b
get relay port from prefs and pass into jni
2010-03-25 04:50:19 +00:00
eehouse
786541e9ae
pass default hostname in from platform code rather than compiling it
...
into jni; in java pull it from preferences and pass into jni.
2010-03-21 03:12:58 +00:00
eehouse
05f7da8c33
ignore more
2010-03-14 16:25:27 +00:00
eehouse
ef15f50edf
add model_getNMoves
2010-03-13 23:09:53 +00:00
eehouse
47387990e9
represent mid-drag tiles on the board as pending -- usually drawn
...
inverted by platforms -- since that's how they'll look once they drop.
Inverted color is easier to follow too.
2010-03-08 06:12:01 +00:00
eehouse
3b94642e3d
don't consider specials that are blanks to be bitmap-backed tiles.
...
This prevents the board from passing an array of empty bitmaps into
draw code which in turn allows platform code to be less defensive.
2010-03-08 06:11:42 +00:00
eehouse
ec24df8546
include any mid-drag tile, if it's a blank, in the set of blank tiles
...
rendered in the second pass. Mid-drag tiles were not being rendered
if they happened to be blanks.
2010-03-08 06:10:37 +00:00
eehouse
b6a151a7e8
don't adjust y upward if divider's being dragged -- should be tiles
...
only. Fixes bug where divider can't be dragged unless grabbed low or
started quickly.
2010-02-27 18:04:40 +00:00
eehouse
6d1c09e756
fix compile errors introduced by addition of const
2010-02-27 18:03:22 +00:00
eehouse
b52c9f0d14
Fixes bug found by alpha tester by dragging third tile to left of
...
divider. Inval all tiles when a drag ends off any managed space. We
don't know what tiles have already been moved, and when it's returned
to its initial spot may appear a dup.
2010-02-27 18:03:15 +00:00