ehouse
355cfa9fcc
add owner param to drawTileMidDrag so can color tiles correctly
2008-03-11 11:48:53 +00:00
ehouse
0b1f4b8f0a
merge with drag_n_drop branch: apply patch generated with this command on that branch: svn diff -r 2080:2087
2008-03-08 23:16:21 +00:00
ehouse
b397c30178
add and call util_turnChanged
2008-02-26 13:46:33 +00:00
ehouse
005694b0b1
Don't hide tray if there's only one player.
2008-02-16 15:53:00 +00:00
ehouse
1d61635ebd
Don't cast char array to long and write to it! Newer arm compilers
...
don't like this -- or maybe I was just lucky until now.
2008-02-04 06:13:11 +00:00
ehouse
33cb34abfe
Remove excessive focus logging; fix timer bug for BT by posting event so EvtGetEvent can exit
2007-12-06 05:26:44 +00:00
ehouse
5457ea1b59
replace all __FUNCTION__ with __func__
2007-12-02 19:13:25 +00:00
ehouse
eeafb5c4f2
reset in/out var before each call to util_askPassword
2007-06-10 14:54:47 +00:00
ehouse
edfdda6fd2
Fix so compiles curses-only, and so curses cell can be 2x1 (for square board)
2007-06-01 02:08:04 +00:00
ehouse
45d5bb6260
Hide tray on turn transitions when more than one non-robot local player present in game.
2007-05-20 20:46:29 +00:00
ehouse
aa3d3bc76c
Fix bug where arrow gets placed in wrong cell when tapping on tentative tiles to remove them while board is flipped.
2007-05-18 04:09:10 +00:00
ehouse
13803e2596
When showing cell values, also show tile values if the don't-show tile values preference is set.
2007-04-06 01:41:16 +00:00
ehouse
ad4fd26d88
fix bug where arrow replaces tile at edge of board by returning false
...
from figureNextLoc unless an empty space found.
2007-04-03 03:36:14 +00:00
ehouse
c0b515457b
Cleanup: compile warning and to make logging easier.
2007-02-08 15:17:23 +00:00
ehouse
7c8b7294cd
add const to a bunch of char* decls in APIs and variables; no code change
2007-02-03 17:54:20 +00:00
ehouse
f441b22e78
cleanup: only one return per function.
2007-02-02 08:11:14 +00:00
ehouse
1890fcac6b
forward declaration stops compiler warning
2007-01-27 15:04:19 +00:00
ehouse
ebeefe457f
check and flip before hiliting cells. Fixes bug with feedback on hint
...
search on flipped board.
2007-01-23 04:09:26 +00:00
ehouse
a998e96de9
Tweak scroll-of-focussed-board inval code so we don't inval the whole
...
board, which looks crappy. Instead inval only what was previously a
border row, and pass a new param to draw_vertScrollBoard so the
platform can choose not to scroll cells that will just get overwritten
with different bits.
2007-01-21 22:59:29 +00:00
ehouse
15acf8c8bb
When scrolling a focussed board, inval everything. Otherwise border
...
cells scroll into the center drawn as border.
2007-01-21 18:05:25 +00:00
ehouse
6ed6fe4976
Change how flip works, keeping board data like invalFlags and limits
...
in sync with the board rather than the model and flipping coordinates
only in time to access the model or pass to engine. With that done,
drawing can skip any rows scrolled off-screen, and the board's
perimeter focus rect can be drawn and invalidated correctly on a
flipped, scrolled screen: zodiac, eventually.
2007-01-21 06:21:12 +00:00
ehouse
0a426b0876
Get rid of draw_eraseMiniWindow: just inval what's under it; make use
...
of CELL_ISCURSOR consistent: when focus not dived all elements have it
set (or only perimeter for board, settable at compile time); get rid
of draw_drawCursor since CELL_ISCURSOR is all that's needed;
2007-01-19 08:20:11 +00:00
ehouse
c01615e86b
reintroduce board_handleKey
2007-01-18 02:42:37 +00:00
ehouse
c02c3fec17
Set focusHasDived before invalidating so newly focussed object drawn correctly.
2007-01-16 02:42:58 +00:00
ehouse
1afe502436
Fix bugs in recent focus/key changes.
2007-01-12 03:37:30 +00:00
ehouse
f329966a8a
on keyDown, look at what keyUp will do and, if nothing, don't handle
...
the event. This lets focus transfer work as before there was keyDown.
2007-01-12 03:28:20 +00:00
ehouse
fef8891e3c
fix problems created by key-nav changes: don't drop hardware scroll
...
keys, and redraw after key-repeat if either up or down handled.
2007-01-07 05:25:28 +00:00
ehouse
e0010901f1
add board_handleKeyRepeat, and call it from palm and gtk. This lets a
...
held nav key walk the cursor across the board.
2007-01-07 04:32:29 +00:00
ehouse
593980817f
Clean up for non-keyboard and non-keyboard-nav cases. Wince is the
...
latter: make it compile again.
2007-01-07 01:01:20 +00:00
ehouse
0303e56c43
Break key handling into keyUp and keyDown, and treat keyDown the same
...
as penDown. Idea is to be able to set timers to get bonus square
hints etc. without stylus. Works, but transitions are rough because
keyDown doesn't know whether keyUp will result in a focus change.
2007-01-06 17:32:08 +00:00
ehouse
5b34e786bc
bug fix: clear focusHasDived on pen event along with other focus state
2006-12-20 04:11:17 +00:00
ehouse
bb45f89a6f
Unfocus any board object whenever pen touches board
2006-11-27 01:13:48 +00:00
ehouse
afc302a29b
When alt key pressed cursor can move onto occupied squares it normally skips.
2006-11-22 13:49:14 +00:00
ehouse
7fe5718cc5
When "dived" focus reaches and crosses border of object, return as if
...
not handled. This causes the platform to handle the key event itself,
typically by moving the focus to the next top-level object.
2006-11-17 13:41:13 +00:00
ehouse
abca6a4092
Two big changes. Pass focus bit into all or and players when focus
...
not dived and tray or scoreboard focussed. This lets platform decide
to display top-level focus via mods to all elements. Second, when
moving focus to top level from dived, claim not to have handled the
key event (but return true if needs redraw). This allows platform to
handle shifting focus without requiring callback (which removed.)
2006-11-14 06:46:04 +00:00
ehouse
29c4cb7c10
Exit trade mode silently if user clicks 'D' when it's not his turn.
...
(Better than refusing because "not your turn".)
2006-11-13 02:01:54 +00:00
ehouse
bfd555c22f
bug: need to OR in inval value rather than replace.
2006-11-12 21:03:15 +00:00
ehouse
8125f8405b
Break scoreboard code out into a new module. board.o was getting too
...
big on palm.
2006-11-12 20:09:00 +00:00
ehouse
a37fab39e8
new UNUSED macro for keynav
2006-11-12 15:20:36 +00:00
ehouse
d3812271a2
Add to draw APIs of individual elements (e.g. board cells) whether
...
they're focussed so that they can draw that during rather than after
everything else. On palm, use this to draw focus using the system
selected color rather than with the blue nav rect. Since a new param
was too much, add new enum type CellFlags and pass as bitvector to
draw APIs.
2006-11-12 14:36:15 +00:00
ehouse
b171900dfb
When moving focus through tray, skip empty space; when through board,
...
skip cells with tiles permanently played. Space char raises focus but does
not move it laterally.
2006-11-09 06:05:40 +00:00
ehouse
1f5ec02172
If no arrow visible, use cursor loc as destination when moving tile to tray.
2006-11-08 13:44:34 +00:00
ehouse
414580904f
board doesn't handle focus-related keys unless it has the focus.
2006-11-08 05:04:44 +00:00
ehouse
2e9afb1ff2
remove typo blocking compilation
2006-11-07 13:43:30 +00:00
ehouse
2aa9664884
When internal focus reaches edge of object, move it back up and onto
...
the next object using a callback to the platform to determine what, if
any, object is next. Adjust curses platform to cooperate. Works
well. Palm is next.
2006-11-07 05:46:44 +00:00
ehouse
44eaa36319
More progress on one-handed navigation: fix ncurses board clipped to
...
bottom of tray; add focus-related params to draw*Finished routines
(and simplify to one) so platforms don't have to save from Begin
routines (and stop palm doing that); check version of saved game, and
handle case where older binary tries to open newer version; redraw
Palm tray buttons after focus change to stop focus-rect ghosting; fix
annoying overlap in saved games dialog; palm version goes to a3.
2006-11-05 16:54:18 +00:00
ehouse
3153e2b867
Lots of progress on one-handed navigation: add gadgets to stand in for board
...
scoreboard and tray on palm; make center drill into the focussed object and
spacebar come back up then move the focus among them. Integrate with other
focussable objects on main form. Go from separate drawCursor routines to
same for all three, with cursor only visible when focus is drilled down.
On curses, add a hilite rect routine that can be called after text is laid
down, and use for cursors.
2006-11-03 06:23:54 +00:00
ehouse
a5f71143c0
Fix crash on pre-fiveway palmos where FrmGetFocus always returns -1;
...
add new preference for whether small value nums are drawn in tiles in
tray.
2006-10-29 17:41:14 +00:00
ehouse
878acbc759
Fix opening games and messages saved by last shipping version on Palm
...
by checking version and loading new fields conditionally. (Not yet
tested for current wince version.)
2006-10-05 01:17:03 +00:00
ehouse
4daabf6fe5
Set -Wunused-parameter for those versions of gcc that support it, and
...
deal with the output by removing params where possible and elsewhere
by adding XP_UNUSED macro wrapping __attribute__((unused)). There
should be NO change in function in spite of the large number of files.
2006-08-16 13:44:44 +00:00
ehouse
27057de11e
Replace a bunch of doMirror parameters with a single function, called
...
after a flip, that invalidates y,x for every x,y that's invalid.
2006-07-07 08:27:13 +00:00
ehouse
354cde389e
remove unused parameter
2006-06-26 04:39:48 +00:00
ehouse
b8d3d477a5
fix scrolling and invalidation for flipped boards, and especially
...
where the board is still not fully visible when the tray is hidden.
2006-05-28 16:08:58 +00:00
ehouse
65540759b5
clear multiple tile selection when trade ends even if cancelled
2006-05-23 01:53:18 +00:00
ehouse
19414ae505
Finish scrollbar work by passing number of visible rows to
...
util_trayHiddenChange, which means an API change. In board, calculate
bottom of board based on bottom of tray when tray is hidden, and round
so that it's an exact multiple of cell height. In wince, take
advantage of the new parameter to fix the scrollbar so that very
constrained boards can be scrolled even when the tray is hidden.
2006-05-19 13:44:05 +00:00
ehouse
f69d433b7c
Reset divider location on new game.
2006-05-19 13:31:18 +00:00
ehouse
70be257d8c
First attempt to set board bounds based on tray bottom if tray
...
overlaps board.
2006-05-17 06:12:40 +00:00
ehouse
bb7e827703
for vertical scoreboards, force miniwindow to be entirely inside the board.
2006-05-14 15:27:29 +00:00
ehouse
4bb82554e5
Since board can now sometimes only partially hide tray, introduce
...
distinction between obscuring and completely hiding. In former case,
erase the tray rather than draw it partially hidden. This means
drawing the tray before rather than after the board, which is a big
change that so far doesn't seem to have hurt anything. If it does, it
might be necessary to draw it before and after the board.
2006-05-12 08:03:08 +00:00
ehouse
c496593800
tweak score layout, and remove a U8 that was overflowing on win32
2006-05-10 13:42:44 +00:00
ehouse
28411a4466
API change: board is responsible for figuring tile size and giving
...
extra pixels to divider.
2006-05-06 14:42:38 +00:00
ehouse
6b140d641b
fix b5 crasher: check for stream equivalence with the older version
...
now that current version's been upped. Rename old version to better
indicate when it was current.
2006-03-04 06:12:38 +00:00
ehouse
dd9298e95f
make remDim 16-bit so doesn't overflow on large-screened devices
2006-02-14 04:53:45 +00:00
ehouse
92485783af
update email address in header comments: no code change
2006-01-08 01:25:02 +00:00
ehouse
bc3515272c
Get rid of unused param
2005-07-14 02:54:47 +00:00
ehouse
dc84bd22df
dict_tilesToString sig change
2005-07-08 03:02:31 +00:00
ehouse
9e76871306
(conditionally) modify dicts to support getting height of platform
...
glyphs, pass into drawing code so can be fetched and cached, and
implement for Palm. This is to allow drawing glyphs (like Danish's
A-with-circle) that are taller than normal without the visual padding
the rest can have. So far works for 68K/non-highres. Will not
compile for ARM yet.
2005-07-07 03:46:07 +00:00
ehouse
e92234b324
cleanup: make module-local functions static
2005-06-25 05:43:56 +00:00
ehouse
dfccb19667
convert util_setTimer to take procptr; remove timer call on board; add
...
heartbeat to comms that uses util_setTimer with new timer type.
2005-06-23 04:16:53 +00:00
ehouse
9d5ea796f3
don't draw board before it's set up
2005-06-13 14:51:21 +00:00
ehouse
36bba4024b
move playerNum into dsi so can be used in formatting score
2005-03-15 03:27:24 +00:00
ehouse
974bf14ec4
ex/internalize cursor locations
2005-01-23 17:26:38 +00:00
ehouse
67be3191c8
revert change to board_invalRect
2005-01-23 08:17:37 +00:00
ehouse
ee3d6381dd
board_invalRect params change
2005-01-23 06:14:07 +00:00
ehouse
3cc77cc8ce
remove dead param; fix inval and choice of inverted cells so recent
...
move is not shown when pending move is.
2005-01-23 06:00:27 +00:00
ehouse
4d98925b91
provide callback for most recent score; return key on hidden tray
...
attempts to reveal; add focus obj to saved state.
2005-01-22 19:51:48 +00:00
ehouse
70266c075d
don't call board_draw except in response to Draw() on Symbian
2005-01-13 02:52:45 +00:00
ehouse
8b44ad1324
start cursor near middle of board
2005-01-04 03:23:12 +00:00
ehouse
cd4f97bd15
remove too-frequent logging
2004-12-17 15:17:20 +00:00
ehouse
ebec5b9b17
remove hint-drag logging (no change to non-debug code)
2004-11-14 16:29:13 +00:00
ehouse
47f81507af
add HintAtts param to draw_drawBoardArrow
2004-11-14 16:06:30 +00:00
ehouse
47b4de73e7
add board_formatRemainingTiles
2004-11-06 02:54:25 +00:00
ehouse
b7dd4fd50c
bug: hide arrow when it can't be moved in case where tile comes via keyboard
2004-10-05 02:32:58 +00:00
ehouse
6e53150418
always hide arrow when undoing partial move, not just when done from
...
tray.
2004-07-10 22:57:17 +00:00
ehouse
bb291f1e75
Hide cursor arrow when pen in empty tray region returns tiles to tray.
2004-07-10 22:40:50 +00:00
ehouse
9e1391af32
missed name change
2004-06-25 07:09:08 +00:00
ehouse
8e8e6896c1
framework for smarter inval of hint rect during drag
2004-06-25 06:56:58 +00:00
ehouse
f900988bcc
pass to engine boolean telling it whether to ask for tray hint limits;
...
address, for penDown only, confusion between whether pen events are
handled and whether the handling means a redraw is required. Might
need to do same for penMoved and penUp.
2004-06-25 06:47:35 +00:00
ehouse
6c14b290eb
preserve hint limits
2004-06-24 05:17:59 +00:00
ehouse
fe681ddf86
move some actions to penUp from penDown
2004-06-23 03:33:06 +00:00
ehouse
debca15ba5
scroll as part of hint rect drag
2004-06-22 06:28:22 +00:00
ehouse
dce8eb2ea5
remove dead code and bogus assert
2004-06-18 13:52:12 +00:00
ehouse
2a9d5b7832
polish hintrect stuff; fix inval, etc
2004-06-18 13:25:57 +00:00
ehouse
e3f57eed44
make hint rect per-player; hide when tray not visible; make upward
...
drag remove it.
2004-06-16 04:06:02 +00:00
ehouse
da4fe889f1
Track drag on board to form a rect whose borders are drawn via
...
attributes on cells; pass that rect to engine when hint requested.
Still rough, and needs to be made per-user. Also needs a way to hide
the rect.
2004-06-15 01:56:01 +00:00
ehouse
b4b3681cd3
show last turn in addition to player name when pen held on score; fix
...
revealing tray to show REVERSED when done for robot.
2004-04-30 08:26:54 +00:00
ehouse
d25c553ece
assert non-null objects when making board
2004-04-03 16:42:20 +00:00
ehouse
508d98d8e0
make rectContainsPt params signed to avoid errors on palm
2004-03-02 05:58:15 +00:00
ehouse
6a9228bb43
fix arrow movement when board flipped
2004-03-01 02:30:45 +00:00
ehouse
be219aaf81
get rid of tabs/fix formatting. No code changes.
2004-02-29 01:08:50 +00:00
ehouse
e3149b0e42
abort draw quickly if platform can't
2004-02-13 04:46:50 +00:00
ehouse
6dade8d97f
inval tray when miniwindow disappears
2004-02-12 04:18:38 +00:00
ehouse
6bc3be9711
fix reported bug: when tile placed on arrow and arrow can't move
...
further, hide the arrow so tile can be drawn.
2004-02-10 05:23:32 +00:00
ehouse
1072bf2499
add option to limit number of tiles used by robot
2003-11-30 09:34:40 +00:00
ehouse
5776da0b93
first checkin
2003-11-01 05:35:29 +00:00