Commit graph

482 commits

Author SHA1 Message Date
ehouse
af1ca9af84 Quash some compile-time warnings. snprintf instead of sprintf. 2008-12-06 15:59:30 +00:00
ehouse
d3d3dd561f Pass string for tile even when it has a bitmap. Let platform decide which to use. 2008-12-04 06:13:59 +00:00
ehouse
7ae7b91e40 When hideTileValues changes, inval all tray tiles. 2008-12-03 13:38:54 +00:00
ehouse
f8870da48f Don't draw hint rect, or start drag to change it, if hints are disallowed. 2008-12-01 13:06:37 +00:00
ehouse
438be9dd2a When tray overlaps board yet is hidden, should not be on top except
when focussed.  Remember state before gained focus, and restore it
when loses.
2008-12-01 13:04:14 +00:00
ehouse
b78a46e110 When tray overlaps board yet is hidden, should not be on top except
when focussed.  Remember state before gained focus, and restore it
when loses.
2008-12-01 13:03:42 +00:00
ehouse
ce2420840d a bit of cleanup 2008-11-22 19:43:47 +00:00
ehouse
6e9f5791d6 Fix bug: when using hint limits to restrict first move on empty board
limits were ignored for the vertical search.  Fix is to make
special-case treatment of first move more integrated so special limits
code isn't needed.
2008-11-22 19:32:42 +00:00
ehouse
542e441b69 hide focus when pen used, but remember where it was (don't set to
OBJ_NONE) so can replace it when focus keys used again.
2008-11-22 16:37:29 +00:00
ehouse
46b574b4e7 fix inval of focussed tile to take divider into account. 2008-11-20 05:12:48 +00:00
ehouse
d4bc42b0a1 add getters 2008-11-10 16:01:46 +00:00
ehouse
30df2166ab Don't assert when unknown key seen; just ignore. 2008-11-08 16:19:04 +00:00
ehouse
5cb97bf636 New Ubuntu has a stricter compiler... 2008-11-06 03:16:09 +00:00
ehouse
93e615b44c Don't skip over occupied tiles when moving cursor unless alt key is
down.  Smartphone doesn't have an alt key, and this
simplier-to-understand behavior should be the default.
2008-11-02 03:43:33 +00:00
ehouse
4ff04dac84 When tray's not revealed, cursor should travel over all tiles to be
consistent with display of 7 tiles even if some are really on board.
2008-10-31 04:30:58 +00:00
ehouse
77d14163b1 track focus on Rem: region of scoreboard in addition to players' score
areas, pass into draw whether to show it highlighted, and fire a util
method when it's clicked on.  Intent is that platforms show the
remaining tiles dialog.
2008-10-24 08:56:20 +00:00
ehouse
944789b14c use three bits for scoreboard cursor in anticipate of making Rem selectable. 2008-10-21 03:19:54 +00:00
ehouse
c48f836fe7 back out 2245: having scrollbar be focusable is a better way of allowing scrolling than overloading cursor movement; scroll cursor onscreen when diving and it is off 2008-10-20 02:23:17 +00:00
ehouse
ac5bbced8f mark debug-only formals and wrap in #defines to fix compile-time
warnings of clean wince build.
2008-10-11 17:58:43 +00:00
ehouse
a26f6ad658 flag unusued param to fix compile error; move code used only in
multi-device games inside ifdefs.
2008-10-11 17:30:35 +00:00
ehouse
bbe8cceb6e debug changes: change defines to remove gremlin-only code; add missing constants. 2008-10-11 16:46:08 +00:00
ehouse
018be047ad fix bug: need to reset engine when divider moved via keys as well as
when dragged.
2008-10-10 08:38:23 +00:00
ehouse
d7f17ecbe0 add function for logging location reached when debugging 2008-10-09 12:04:57 +00:00
ehouse
d1603aa543 Fix crash when switching to game with same-language dict: inform draw
even if tile sets the same since old is about to be destroyed.
2008-09-28 16:43:24 +00:00
ehouse
79ec57be8d Bug: tap on hidden tray doesn't reveal it (likely new). Fix by always
reversing hidden tray on giving it focus and by finding tray to be
location of pen even when hidden (but only the part not under the
board.)
2008-09-27 16:59:04 +00:00
ehouse
63422f9c1d When moving cursor within board, scroll board if it's possible to do
so, and only if it is not move the cursor (or if needed to keep it
visible after scroll.)  This makes it easier for users to scroll --
but may not be needed if focussing scrolbar works.
2008-09-27 15:07:48 +00:00
ehouse
eb1f083a19 Require two key events to reveal tray and act on a tile; don't treat
divider as wider (to make it easier to tap on) when keyboard being
used to select.
2008-09-18 03:53:53 +00:00
ehouse
d2cb36029b Had to comment out BLANKS_FIRST to compile new wince font code, so
assert that blank test catches only one tile per dict.
2008-09-09 12:20:09 +00:00
ehouse
61a3602dc5 Don't save dict as part of model. It's redundant as the platform code
already saves the name and passes the dict in.
2008-09-09 12:18:32 +00:00
ehouse
a1f3e3d174 call draw_dictChanged on load so draw can calc fonts immediately 2008-09-09 12:16:06 +00:00
ehouse
36627fb051 Add listeners to model so board can be notified whenever dictionary
changes.  Pass dict into draw via new API, removing it from the
draw_begin calls.
2008-09-05 12:11:37 +00:00
ehouse
bd2eff236c catch up with API changes. GTK to use this still needs to be fixed! 2008-08-30 13:54:47 +00:00
ehouse
5e6ba430fe fix newg_attrChanged to exit quickly when there's no change 2008-08-27 12:09:30 +00:00
ehouse
07e7032c16 give serverRole a default value. 2008-08-27 12:08:07 +00:00
ehouse
454788ad04 better leak debugging 2008-07-28 05:05:39 +00:00
ehouse
6c5e3b7149 draw divider focussed when all of tray has focus 2008-07-28 05:04:34 +00:00
ehouse
0c751cc4d1 Add feature lost when five-way drag of divider became possible: don't
allow focus rect to stop on any empty tray slot but the leftmost.
2008-07-24 12:39:46 +00:00
ehouse
ac0a9f4ac5 Put up dialog when user asks for hint and the feature's disabled. 2008-07-24 12:37:05 +00:00
ehouse
fd805791e4 Quiet over-enthusiastic logging of state transitions. 2008-07-18 09:06:09 +00:00
ehouse
47088c8030 Return true on preflight for cursor move so will get called again.
Fixes tray nav on Palm.
2008-07-18 09:05:04 +00:00
ehouse
ab89d78ac8 selInfo can't be left null when board created, as selPlayer is 0.
Point at pti[0] to fix crasher.
2008-07-18 09:03:54 +00:00
ehouse
c20e85eccd combine all per-player arrays in board into a single array of structs.
access can then be via a ptr, more effecient and faster.  The change
seems to save 1K of generated code.  No changes to algorithms, only to
field access.
2008-07-18 07:49:00 +00:00
ehouse
5422b82fd3 Implement new model for focus/tray interaction aimed at smartphones
with five-ways and no obvious alt key.  Focus once dived into tray
moves over tiles *and* divider.  Tap of center key toggles
selectedness of object under focus.  Movement of focus when object is
selected drags the object (tile or divider) unless in trade mode.
This is easier to discover and behaves more like drag-and-drop -- and
lets you move the divider.  Works for linux and win32.  Key nav in
tray is broken on palm.
2008-07-17 05:16:09 +00:00
ehouse
0d44c26373 break board.c up so isn't too large for 68K on palm when compiled for
debugging.
2008-07-17 05:06:08 +00:00
ehouse
bc05761c4a change API for drawing divider so it can be focussed as well as
selected.  Being using that information in palm and wince.  For GTK,
use color rather than ugly black rects to indicate focus.
2008-07-17 05:03:01 +00:00
ehouse
2ed08ac7da Fix cosmetic problems when changing focus and board overlaps tray.
The goal is to have the tray drawn on top, even if it's otherwise
hidden, when the whole thing's focussed.  Fix is to inval and
recalculate rects more often as focus changes or tray is hidden.
2008-06-07 23:14:26 +00:00
ehouse
2905af749e Fix crasher: don't start a board-scroll operation and attempt to end
by dropping a tile.  (This part is to detect that no drag actuall happened.)
2008-06-07 23:07:31 +00:00
ehouse
183d5514ca Fix crasher: don't start a board-scroll operation and attempt to end
by dropping a tile.
2008-06-07 23:05:54 +00:00
ehouse
f749fdd560 Remove all tabs. No code changes. 2008-05-31 03:26:16 +00:00
ehouse
bd6aed4b5a Fix so curses-only builds and curses build doesn't segfault. 2008-05-26 00:27:48 +00:00