Commit graph

187 commits

Author SHA1 Message Date
ehouse
eccfbb5ccc don't pass wrong proc ptr 2009-03-02 01:45:16 +00:00
ehouse
e5447c5029 fix leak of packet buffers; get rid of multithread code. 2009-02-07 18:20:16 +00:00
ehouse
8026322e8d Put back code initiating connection when starting client game. 2009-02-01 16:43:01 +00:00
ehouse
62d247ee49 Helps to compile platforms too before checking in... 2009-02-01 16:20:18 +00:00
ehouse
7556ecf49f Make it possible to run same binary against relay with relay heartbeat
and direct with comms heartbeat.  This mostly means changing ifdefs.
2009-02-01 15:50:58 +00:00
ehouse
95a93191be Beginning of rewrite of socket code for communication with relay,
replacing dedicated threads for read and write with non-blocking
sockets driven from the main window proc.  So far it can do a
round-trip against the relay on win32, and compiles but isn't tested
on wince.
2009-01-31 18:06:09 +00:00
ehouse
a21898894c Include function name in assertion failure message; always print to
file before putting up warning.
2009-01-17 18:44:45 +00:00
ehouse
cacf676bfd Get rid of unused parameter 2009-01-14 13:02:08 +00:00
ehouse
4939cf1785 Turn on and enable UI for relay and sms transport. relay doensn't
work, at least on win32 where threading code is broken, and former is
completely stubbed out.
2009-01-05 14:13:40 +00:00
ehouse
f06d08a793 Fix to compile with relay enabled and not STANDALONE_ONLY. Verified
that win32 build can open games saved by previous version, but nothing
else (e.g. use of network or even dialogs to set up relay connection
parameters.)
2009-01-04 00:00:45 +00:00
ehouse
6453f49e67 App name and game name don't fit most titlebars, so use app name only
when game has none yet.
2008-12-13 07:29:47 +00:00
ehouse
554b204cf5 Provide default player names in game info dialog rather than when
creating the very first game to fix bug where creating a game with n+m
players from a saved game with n yields m blank default names.
2008-12-12 13:42:52 +00:00
ehouse
d0222385fb Warn when unable to open a saved game (generally when an older version
of the app tries to open game saved by newer version.)
2008-12-11 13:48:59 +00:00
ehouse
4baa620298 Don't open saved games dialog unless current game has a name:
cancelling name request cancels saved games dlg too.
2008-12-08 05:51:21 +00:00
ehouse
ad459c8a0a Add appropriate icon flags to all uses of MessageBox; remove a couple
of unnecessary Cancel buttons.
2008-12-07 16:24:26 +00:00
ehouse
ae9c6f1fe3 Fix other sites putting up dialogs claiming main window as parent when
it isn't.
2008-12-07 05:21:13 +00:00
ehouse
670d0be212 Don't let smartphone users set hintlimits checkbox, and explain
why. Fix bug calling MessageBox with main window ptr from dialog.
Include name of preexisting file when warning user who enters it while
saving/renaming.
2008-12-07 01:30:18 +00:00
ehouse
4748e0dc9f Use SetBkMode to prevent overlapping tile face/value pairs from
erasing each other.
2008-12-06 22:14:40 +00:00
ehouse
fb9ea8b64f Mods to saved games dialog: allow to rename the current game; after
renaming or duplicating a game, make that new name the one initially
selected in the listbox; remove sorting code relying on OS to sort
when CBS_SORT set.
2008-12-06 20:28:01 +00:00
ehouse
ca53a3a74c Make Show values the left softkey after chosen once. 2008-12-03 13:40:07 +00:00
ehouse
9bb510bfd7 draw bitmaps larger when will fit; draw hint region border thicker and
in player color; rename constants.
2008-12-02 13:47:18 +00:00
ehouse
1fb1c28ed8 if scrollbar has focus when removed due to screen resize, don't
continue to draw indicator rects in focus color
2008-12-01 13:11:58 +00:00
ehouse
7125fb097c remove redundant set of #defines for whether we're compiling for desktop or wince 2008-11-22 16:43:55 +00:00
ehouse
0652a85acd When fewer than 4 players shown in game info dialog, move controls
higher that are below player rows. On some screen sizes this prevents
those items from being off-screen. Note that this requires use of
DM_RESETSCROLL message to get Smartphone to recalc scroll info and
that DM_RESETSCROLL is not yet defined in cegcc.
2008-11-18 12:36:27 +00:00
ehouse
2a517c3d32 Fix timer positioning; provide default values for w32 height & width;
put up dialog on assertion failures now that they're uncommon.
2008-11-13 05:46:21 +00:00
ehouse
17b139b2c7 Add checkmarks to four menuitems to show state; add fullScreen
menuitem to w32 version and give it something to do.
2008-11-10 18:49:26 +00:00
ehouse
7d3048bb55 Speed up font calculation by interleaving width and height
constraints; simplify pending score display by using %dp rather than
trying to fit two strings in the many possible sizes of tiles.
2008-11-08 16:25:49 +00:00
ehouse
ff2bef6711 bug: choosing hint menu also chooses commit-turn if focus happens to
be on 7th tile.  Problem is that OS sends key up after handling menu.
Fix is to track when we've seen a keyDown, and drop keyUp events when
we haven't.
2008-10-31 04:36:44 +00:00
ehouse
3771b0a4e6 Use SHGetSpecialFolderPath to locate dicts in /Document Files/Crosswords; reserve 1-pixel space around Rem: text 2008-10-29 08:46:02 +00:00
ehouse
9ac6b1be7a Tray cannot be exactly same height as cells as it has thicker borders.
Reserve that difference from calculation of cell height so tray will
pick it up later.
2008-10-26 15:01:05 +00:00
ehouse
552a6a5560 Get rid of string constants referencing \My Documents, using instead
SHGetSpecialFolderPath.  Cache the result of calling it.  Note that
mingw SHGetSpecialFolderPath headers define SHGetSpecialFolderPath as
SHGetSpecialFolderPathW which isn't in the library; hack around that.
2008-10-25 18:08:36 +00:00
ehouse
a4eb339c59 wince support for Rem: focus and showing remaining tiles 2008-10-24 09:05:13 +00:00
ehouse
f1a975c106 Save games in different directory for debug version to prevent
crashing when opening wrong-format files.
2008-10-24 08:36:44 +00:00
ehouse
76688cd706 Fix bug: tray too short on large screen. Always make tray a multiple
of cell size when possible, using minimum when needed.
2008-10-20 01:24:59 +00:00
ehouse
1bb0217785 Send message on back key only when coming up, not going down, to
prevent double-dismiss of dialogs.
2008-10-18 19:38:31 +00:00
ehouse
cfb42822e4 Test (including a hack on undocumented bits in WM_HOTKEY's lParam)
whether back key resulted in a focus undive, and if it didn't, quit
the app.  Not quitting would best be done using SHNavigateBack, but
cegcc doesn't seem to have that.  And even the default behavior,
without messing with back keys at all, is to minimize, which means you
can't delete the .exe later without soft reset.  That may be my bug,
but for now we're exiting.
2008-10-13 01:17:13 +00:00
ehouse
3bbf428485 Fix bug: don't delete current game name when user might still cancel
new game creation.
2008-10-11 23:56:04 +00:00
ehouse
4f11e4270e inval font cache when new dict has different chars; use cell size as a
minimum font heigth for tray; darken default player 4 color for better
contrast.
2008-10-11 16:53:22 +00:00
ehouse
373a931b3e drawing tweaks: better test for wide short tray tile; don't inval
scroll rects unless focus shifting.
2008-10-09 12:12:25 +00:00
ehouse
8c9cfc358a Modify layout code to keep cells close to square when possible,
leaving significant border space on highly rectangular screens.
2008-10-08 04:42:16 +00:00
ehouse
ab1cc03e41 Draw focussed scrollbar using WM_CTLCOLORSCROLLBAR. Onlyworks on
Win32, so keep old method for Wince.
2008-10-07 04:00:37 +00:00
ehouse
2bc132627f Set aside portion of scrollbar rect above and below it and color that
with focus color when the scrollbar has keyboard focus.  This should
help users figure out how one-handed nav works.  Better would be to
override background color of the scrollbar and draw it full-sized, but
I havne't figured out how.  This is good enough for beta.
2008-10-01 08:31:43 +00:00
ehouse
9289df31a0 add width x height to title bar correctly (debug w32 only) 2008-09-29 05:07:35 +00:00
ehouse
79bb886495 Two large changes. First, layout board etc. based only on screen
dimensions and one constant giving the minimum height of a cell.
Replaces a bunch of constants that didn't scale to different sized
screens well.  Second, add the vertical scrollbar into the focus
rotation.  Once I have it showing that it's focussed it'll be easier
to figure out how to scroll the screen.
2008-09-28 17:50:04 +00:00
ehouse
d2afc68ba8 Fix nasty crashers: restore previous game when unable to open new,
e.g. because it was created with a dict that's no longer available (in
which case warn to that effect.)
2008-09-28 16:48:30 +00:00
ehouse
a9d255592a cleanup: name changes; don't measure the same glyph twice. 2008-09-18 03:50:04 +00:00
ehouse
783b3a2860 move logLastError 2008-09-14 16:01:28 +00:00
ehouse
25c59a25e7 Pass streams to cedraw on save and restore, adding version flag for
backward compatibility.  Within cedraw, save cached font info to
remove the visible delay on startup.
2008-09-10 12:18:30 +00:00
ehouse
7299675adc In case where board can't fully fill screen, track the rects on either
side and erase them when they're invalidated.  When seeking best-fit
font, pull glyphs to measure from dictionary rather than assuming
A-Z. Speed font measuring code by passing over all glyphs only once,
noting tallest and lowest-extending then measuring only those two as
smaller sizes are tried.  This *may* make the process fast enough that
I don't need to cache the information across boots: need to try on
real hardware.
2008-09-09 12:31:02 +00:00
ehouse
9be9842e48 Make CEDrawCtx def private; erase background when OS invalidates it.
This gets rid of what's visible behind the board when it's not
full-screen width, but causes a lot of flashing.  Better will be to
make board.c own an entire rectangle and to decide board dimensions
itself.
2008-09-01 15:10:28 +00:00