Commit graph

49 commits

Author SHA1 Message Date
Eric House
459c12d91f copy string's null terminator too 2014-01-06 07:05:34 -08:00
Eric House
ac969793ea remove assert preventing large screen 2014-01-06 06:38:08 -08:00
Eric House
83692fd2e8 format rem text as two lines 2014-01-05 13:30:27 -08:00
Eric House
123141e0df draw scoreboard entries centered 2014-01-05 13:15:09 -08:00
Eric House
b43855a313 fix curses build for 64bit compile and to use common layout (meaning
tray is now under the board unstead of to the right).  Works on 64-bit
system at least for non-networked games.
2014-01-05 13:04:59 -08:00
Eric House
093a260f1d fix memory corruption on 64-bit systems 2014-01-02 07:48:12 -08:00
Eric House
a26dced506 drawing tray tiles can fail, e.g. when font info not yet available, so
only clear bits when successful. Fixes problem where tray didn't get
drawn until tiles were somehow invalidated.
2013-11-07 07:29:54 -08:00
Eric House
d41c1a4ca8 add new param so pending text can be drawn differently when it's not
the player's turn.
2013-05-30 07:17:13 -07:00
Eric House
0c030360bf fix compile warning 2012-07-26 20:42:25 -07:00
Eric House
9b0436d1ee Make rem string measure function return boolean to indicate rect will
be invisible rather than setting width and height to 0.  No real
change beyond simplifying/speeding platform code.
2012-07-15 09:30:27 -07:00
Eric House
2fc2a60842 create alternate scoreboard draw flow, disabled by compile-time flag,
that does layout and draw in a single pass and with more information
so platform has more responsibilty for dealing with space constraints
and can, I hope, do a better job.  There's no change until the flag is
turned on.  Works for GTK with flag on, but is stubbed out for ncurses.
2012-06-26 07:20:09 -07:00
Eric House
405cb23023 fix bug where current player's scoreboard would disappear if other
players' names were too long by giving all a the same proportion of
what they request and passing in the percent given in case draw
implementation wants to use it as a cue to truncate.
2012-06-15 06:26:40 -07:00
Andy2
52d02f04dd pass tile value into drawCell(). Java code doesn't use it yet, but I
want to play with drawing cells tray-tile-style when they're big
enough.
2011-12-02 18:58:52 -08:00
Andy2
3ec97d5c07 Turn "Turn done" into "Pass" when the pending score is 0. To do that
I had to pass the score into draw_trayBegin since
draw_drawPendingScore() isn't called until the first tile's placed.
Note: as long as I'm messinng with this menuitem it should be disabled
when it's not the player's turn.
2011-10-04 18:48:33 -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
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
442b3983cf highlight during draw where possible because doing it after isn't
possible with wide chars -- meaning I haven't figured out how yet.
ncurses documentation is well hidden....
2010-12-13 22:07:25 -08:00
eehouse
92e02c9c2e catch up with API changes 2010-05-28 02:31:04 +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
ehouse
b8e7cd411f fix to use new API. (this and prev checkin via terminal app on phone :-) 2009-11-19 02:26:38 +00:00
ehouse
f80b1d74f2 include name of player whose turn it is in scoreboard entry, reducing
length until it fits.  (Still needs polishing...)
2009-10-15 12:44:53 +00:00
ehouse
99a5a7912b Use new draw API but same bitmap as always (large in tile, small in
cell.)  In cases where bitmap and text provided, prefer bitmap.
2009-01-13 13:02:17 +00:00
ehouse
cefd69d8b3 Since there's now a flag indicating whether to show the value of a
tile, make value unsigned.  Adjust/fix platforms.  Add cmdline flag to
linux apps for hiding values.
2008-12-29 03:09:35 +00:00
ehouse
9b17c20117 gtk/ncurses support for Rem: focus and showing remaining tiles. Also
rewrite gtkask to use gtk_message_dialog and add sigint handler.
2008-10-24 09:07:30 +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
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
bd6aed4b5a Fix so curses-only builds and curses build doesn't segfault. 2008-05-26 00:27:48 +00:00
ehouse
2910bab3a0 fix perimeter focus clearing and board size setting. 2008-02-02 17:21:57 +00:00
ehouse
b98b7fd993 Move toward running curses on a small screen: replace omnipresent menu
with one drawn on demand; change size and location of scoreboard and
tray if needed; use wgetch rather than reading stdin to support keypad
keys for navigation.  Also stick g_ in front of some frequently used
global names.
2008-02-02 16:56:20 +00:00
ehouse
6e715d63ee change name of field. No code change. Pending on symbian and franklin which don't compile. 2008-02-02 15:17:53 +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
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
20ecd5f7d7 get rid of draw methods; always highlight cursor same way;
board_handleKeyUp becomse board_handleKey for curses
2007-01-19 08:20:58 +00:00
ehouse
cac0fd94d7 Use new top-level focus drawing model, and new API indicating whether
key handled.
2006-11-14 06:47:50 +00:00
ehouse
84321fa158 fix drawing of empty tray space. 2006-11-12 15:39:10 +00:00
ehouse
eb32609a1d Fix to compile and work with draw API changes 2006-11-12 14:51:47 +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
7b7b7006a7 clean scoreboard rects before drawing in case player's location has changed as new players added 2006-09-19 03:35:26 +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
aa09dfba91 catch up with API changes 2006-05-05 12:49:02 +00:00
ehouse
fb0d471dae add const decls to draw.h and dictnry.h functions where appropriate,
and modify "subclass" methods to match.  Should be no code change, but
this makes the intent of the APIs clearer.
2006-02-18 06:39:40 +00:00
ehouse
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
e3cadfbf79 catch up with API changes 2005-09-02 06:24:47 +00:00
ehouse
912f53178b move playerNum into dsi so can be used in formatting score; show
most recent turn (like symbian 80)
2005-03-15 03:29:37 +00:00
ehouse
6a569d5632 add missing param 2004-12-11 04:17:07 +00:00
ehouse
2d63cdeda0 cleanup for no hintlimit feature case; add new param 2004-06-27 04:35:20 +00:00
ehouse
f684ec9461 draw_boardBegin returns bool now 2004-02-17 03:58:40 +00:00
ehouse
5776da0b93 first checkin 2003-11-01 05:35:29 +00:00