Commit graph

623 commits

Author SHA1 Message Date
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
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
eehouse
eb3d0308e0 add const 2010-02-24 04:34:22 +00:00
eehouse
8b84bdf56e Once user has rejected a bad word, don't ask about any later ones as
the whole turn's being rejected.  Should be merged to trunk.
2010-02-24 04:29:00 +00:00
eehouse
ae63c16473 add some .gitignore files 2010-02-24 04:28:34 +00:00
eehouse
c6b28e9416 turned on -Wall and fixed errors/warnings it reported 2010-02-12 07:13:42 +00:00
eehouse
587159f5d7 fix to compile when XWFEATURE_SEARCHLIMIT off. Same as rev 3023 for
this file.
2010-02-12 07:12:30 +00:00
eehouse
fc2e87e0c4 drop client connection when in the wrong state rather than asserting. 2010-02-11 13:29:28 +00:00
eehouse
bd611bb6f4 implement dictChanged. And so that utf8 dicts could be opened without
their games being drawn (no BoardActivity around) break the two
android-only callbacks out of UtilCtxt and into a new JNIUtils
interface that then requires new handing in C.
2010-02-11 13:27:09 +00:00
eehouse
37646c20f3 accomodate null objects 2010-02-09 14:42:07 +00:00
eehouse
967ba62dff Fix to compile on Palm (68K): remove parameters removed by r3013 and
move slot moved by r2982.  Fix -- with gross ifdefs -- warning in
pool.c caused by Palm's random() being the only 16-bit one.
2010-02-01 03:17:46 +00:00
eehouse
9f250c99ef get rid of gameID param. This change breaks all other platforms... 2010-01-31 21:35:07 +00:00
eehouse
41472c4984 assert have at least one remote player 2010-01-31 21:13:31 +00:00