ehouse
f0d6dda9dd
A couple of new types for xp code dealing with utf8.
2009-04-05 19:27:30 +00:00
ehouse
241b24c862
Read new dicts and old into new format.
2009-04-05 19:24:10 +00:00
ehouse
f9e6c5631d
Move WSACleanup into main where it can be called once per launch
...
rather than per use of relay, parallel to WSAStartup.
2009-03-08 20:01:47 +00:00
ehouse
f874183475
Use nwgamest support for separate config button beside role combo, and
...
remove hack responding to tap (without change) on that combo.
2009-03-08 20:00:20 +00:00
ehouse
f598340239
relay name defaults to eehouse.org, easier to set at compile time for testing
2009-03-08 19:47:36 +00:00
ehouse
4909ae0137
Close down relay connection when comms going away. Fixes crashes when
...
new game is standalone and prev used relay. Add logging code in comms.
2009-03-06 13:43:03 +00:00
ehouse
8fd1d5b2a9
cleanup for new compiler: -D option, winsock2.h, fix warning
2009-03-06 04:53:56 +00:00
ehouse
44ef132d85
swprintf->_snwprintf to make newer cegcc happy
2009-03-06 04:52:06 +00:00
ehouse
14cb742b38
don't pass wrong proc ptr
2009-03-02 01:45:16 +00:00
ehouse
9cb1f8ab59
minimal test for comparing cegcc versions
2009-02-25 03:45:14 +00:00
ehouse
b2112371b2
Make it possible to see comms dialog in read-only mode when role
...
selector is disabled (for game info use of new game dialog.)
2009-02-21 17:03:30 +00:00
ehouse
44a3888d6d
Add enum to debug-only logging.
2009-02-14 16:24:06 +00:00
ehouse
2be682b4e9
Use new bufqueue util
2009-02-09 02:51:43 +00:00
ehouse
9ce82a7c94
fix leak of packet buffers; get rid of multithread code.
2009-02-07 18:20:16 +00:00
ehouse
326e57e742
commented-out setting of default relay host name
2009-02-07 18:18:24 +00:00
ehouse
5a5cba9d1b
Handle case where packet contains several messages; attempt to send on
...
socket-writable and on receiving message to be sent; cleanup. With
this change full robot-vs-robot game has worked over relay, but not
reliably. I think it's the relay's fault. Still tested only on Win32.
2009-02-01 16:46:00 +00:00
ehouse
8d1da3ee0e
Put back code initiating connection when starting client game.
2009-02-01 16:43:01 +00:00
ehouse
53b27c96c9
Helps to compile platforms too before checking in...
2009-02-01 16:20:18 +00:00
ehouse
c672fcfafd
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
1a99dc7e1c
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
9e7144d8c9
comment about APIs to use for implementation (probably the last checkin of this file.)
2009-01-31 18:03:06 +00:00
ehouse
0d08147472
Turn off SMS by default (pending confirming a way to use the apis in unsigned app); add commented-out NO_DRAW option.
2009-01-31 18:02:02 +00:00
ehouse
52a4a92e14
If smallest bitmap is too big, use it anyway at full size.
2009-01-18 19:52:46 +00:00
ehouse
50a6f93b99
Pick largest possible bitmap; fix inconsistency between cedict's idea
...
of bitmap format and cedraw's: rows are padded to 8-bit boundary, not
necessarily 16-bit.
2009-01-18 18:29:27 +00:00
ehouse
06632f5495
get rid of excess logging (one line)
2009-01-18 18:17:08 +00:00
ehouse
e1bc780beb
In tray, when values are hidden draw letters instead of bitmap if
...
they'll fit.
2009-01-17 20:30:49 +00:00
ehouse
e6132b3dde
Scale bitmaps for specials to the size of an M so they look right next
...
to other letters.
2009-01-17 18:49:35 +00:00
ehouse
dd1f9aa8ca
Include function name in assertion failure message; always print to
...
file before putting up warning.
2009-01-17 18:44:45 +00:00
ehouse
d58d9bedd7
return TRUE after handling WM_INITDIALOG
2009-01-17 18:41:15 +00:00
ehouse
2e488374f1
bug fix: fix reversed width and height params to StretchBlt
2009-01-17 15:45:24 +00:00
ehouse
08ceeb85b7
Fix size test for bitmap caching
2009-01-14 13:27:56 +00:00
ehouse
8aadcb3406
Get rid of unused parameter
2009-01-14 13:02:08 +00:00
ehouse
aee316372e
Use new api. Use small for cell and large for tile still, but now
...
create and cache an actual HBITMAP, and prefer it to letters. This is
needed for Catalan where "L-L" will never fit. Still to be done:
prefer letters to bitmap where they'll actually fit (devices where
tiles drawn wider), and position better in tray. May also want to
allow scaling.
2009-01-13 13:11:05 +00:00
ehouse
88364775a1
cleanup: get rid of confusing but harmless *
2009-01-13 13:03:59 +00:00
ehouse
ac8c06d9cf
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
4595191395
Always use GetForegroundWindow to find parent
2009-01-05 14:06:52 +00:00
ehouse
0b82d75bc8
add controls for sms connecting
2009-01-05 14:05:56 +00:00
ehouse
4698b835e8
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
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
270006f47b
rename variables; fix compiler warning.
2008-12-20 04:25:41 +00:00
ehouse
bc01341f95
When values are hidden, draw letters as large as possible in the tile.
2008-12-13 07:34:16 +00:00
ehouse
3666235462
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
dab2f23479
Use Ok for stringbox, Done for Saved games dialog; next release to be
...
rc1, not b7
2008-12-13 04:39:06 +00:00
ehouse
9e7bfe0ff7
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
59cd2a83d1
Make tray tiles one pixel taller, extending all the way to bottom of
...
screen.
2008-12-12 13:40:41 +00:00
ehouse
cb7b8bf84f
Back out change: button to dismiss Saved games dialog is "Done" again,
...
not "Ok".
2008-12-12 05:28:53 +00:00
ehouse
e28363f369
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
909bcb1dca
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
5aa7289dfe
Don't remove extension if there's isn't one (fixes new segfault.)
2008-12-08 05:50:25 +00:00
ehouse
19d8f307b1
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
c38297711e
Fix other sites putting up dialogs claiming main window as parent when
...
it isn't.
2008-12-07 05:21:13 +00:00
ehouse
c791010603
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
e37cfa6ce8
up version to b7
2008-12-06 22:21:38 +00:00
ehouse
c82fb50055
Use SetBkMode to prevent overlapping tile face/value pairs from
...
erasing each other.
2008-12-06 22:14:40 +00:00
ehouse
57197f8b2c
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
6da758b5fa
set text color before drawing star bitmap to make color consistent;
...
add utility function for setting colors to reduce code size.
2008-12-06 16:22:43 +00:00
ehouse
af1ca9af84
Quash some compile-time warnings. snprintf instead of sprintf.
2008-12-06 15:59:30 +00:00
ehouse
5508ae4593
Add testcases for Treo-sized screens.
2008-12-04 06:17:14 +00:00
ehouse
a9fbd3c027
Ignore bitmap for tiles, using string instead.
2008-12-04 06:16:37 +00:00
ehouse
dbb8dd4713
Fix blank picker on PPC by making dropdown tall enough to drop.
2008-12-04 06:15:57 +00:00
ehouse
088ab1451e
Use minimum height for tile value; draw bitmaps (clipped) even if too large.
2008-12-03 13:42:30 +00:00
ehouse
62aca48673
Make Show values the left softkey after chosen once.
2008-12-03 13:40:07 +00:00
ehouse
1c6460f64a
Add "Hide tile values" checkbox and support it.
2008-12-03 13:37:55 +00:00
ehouse
de6f6dcdef
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
b3d3f80860
Lots of little tweaks to dialog item locations. Also, don't make
...
phonies combo/list box sorted since that screws up order of choices.
2008-12-01 13:19:14 +00:00
ehouse
3bb15ab093
add (unused) missing defines for IME stuff, which can't work until I
...
figure out how to test for presence of qwerty keyboard
2008-12-01 13:16:58 +00:00
ehouse
5c53620470
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
7d9259f16a
update readme
2008-11-22 16:49:55 +00:00
ehouse
44ae99a075
remove redundant set of #defines for whether we're compiling for desktop or wince
2008-11-22 16:43:55 +00:00
ehouse
5f27b1552c
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
d4e2f5c07a
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
a91aea537a
up beta version
2008-11-12 04:55:54 +00:00
ehouse
ce82507db0
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
e2cd0b5807
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
cfc00206c1
fix release build compile error.
2008-11-06 06:30:30 +00:00
ehouse
3958950ad1
When finding font to fit height, optionally force it to fit width as
...
well. Mechanism used for Rem only so far, but will work for score too
as long as we don't need it to shrink font as score gets longer.
Current impl worries about height first, then width; would be better
to look at both simultaneously to reach the goal more quickly.
2008-11-02 23:17:38 +00:00
ehouse
e6399c74c1
Fix bug making glyphs from random garbage; when narrowing in on
...
correct font size, compute based on ratio from what we have rather
than just reducing by one each pass.
2008-11-02 04:17:42 +00:00
ehouse
be3863dd5a
For win32 builds, locate files relative to ./
2008-11-02 04:15:10 +00:00
ehouse
661a12ae5c
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
9e9d8a9d79
show non-dived focus as tray with background and perimeter tiles with
...
background rather than opaque border. Looks better on a range of
screen sizes.
2008-10-31 04:33:20 +00:00
ehouse
9cd570f152
add a few new WM_ constants for debugging
2008-10-31 04:31:46 +00:00
ehouse
cbdf8edcf5
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
91b20350f7
Make much smaller .ico file by hand using GIMP, and check it in. png
...
files are inputs to that process but not used in the build until I
figure out how to script building the .ico.
2008-10-26 21:05:44 +00:00
ehouse
a59c2456d5
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
b684bb238a
Add a 16x16 icon. Remove the .ico file from svn, adding instead the
...
three .png files from which it's built. Build now depends on icotool,
which is in Debian and so not a problem. The resulting .ico is
probably 3x the size built with winders tools, so eventually I should
fix icotool or nag its author.
2008-10-25 21:59:46 +00:00
ehouse
3c8f9d7049
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
3b5337d7d2
wince support for Rem: focus and showing remaining tiles
2008-10-24 09:05:13 +00:00
ehouse
56cc76b913
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
7c5b8d25fd
change name of platform in about box
2008-10-24 08:35:50 +00:00
ehouse
afbb5ed2fe
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
bff5f9b7c9
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
c81e85deef
Remove overdesigned edit-control-caching mechanism in favor of just
...
asking if the current focus owner is an edit control.
2008-10-14 05:25:15 +00:00
ehouse
4dde28bc28
Walk dialog's controls and make a list of Edit controls so that dialog
...
procs don't have to pass them in. Compare handles rather than IDs.
2008-10-13 05:46:45 +00:00
ehouse
7281423100
Trapped back key should exit dialog even if it has an edit control if
...
that control does not have focus. Do that. And since I can't figure
out how to use APIs available in CE to find edit controls dynamically
each dialog proc has to pass its IDs in. May fix that later, in which
case ceDlgSetEdits() should be removed.
2008-10-13 01:26:20 +00:00
ehouse
3992e4299f
Remove logging; add WM_ constants for message logging.
2008-10-13 01:22:58 +00:00
ehouse
40e33036db
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
4e07fb053d
add 22x22 icon for smartphone
2008-10-13 01:05:42 +00:00
ehouse
097a85d115
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
3e3ff73e52
first cut at script to produce zipfile and readme
2008-10-11 22:59:18 +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
0f3b206371
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
37e922e92b
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
5e839d82e4
get rid of excessive logging
2008-10-09 12:07:30 +00:00
ehouse
190c0aca88
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
a4f27e5525
Draw focussed scrollbar using WM_CTLCOLORSCROLLBAR. Onlyworks on
...
Win32, so keep old method for Wince.
2008-10-07 04:00:37 +00:00
ehouse
5ba97223f8
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
e0d73f4cd4
add width x height to title bar correctly (debug w32 only)
2008-09-29 05:07:35 +00:00
ehouse
8cecbd45c4
put dictionary in place if none there
2008-09-29 05:06:24 +00:00
ehouse
2f618616df
Draw divider using player color, not always black.
2008-09-28 17:55:27 +00:00
ehouse
f8bb0ae202
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
ae6610a94f
Script for testing a bunch of Wince device resolution under Wine.
2008-09-28 17:38:18 +00:00
ehouse
41e6f4abe2
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
8a6992132b
comments and assertions
2008-09-28 16:47:11 +00:00
ehouse
e84a7c7a2d
clean up tile-picker dlg
2008-09-27 15:58:07 +00:00
ehouse
7627672324
Add more WM_ constants
2008-09-27 15:15:14 +00:00
ehouse
df28e86fc8
Improve the font dialog
2008-09-27 15:10:53 +00:00
ehouse
0fd14dc0b7
{G|S}etWindowLong -> {G|S}etWindowLongPtr as per MSDN docs
2008-09-27 15:05:26 +00:00
ehouse
1a1beed2f3
cleanup: name changes; don't measure the same glyph twice.
2008-09-18 03:50:04 +00:00
ehouse
1536a05ac2
bug fix: check which combo is generating events rather than assume all
...
are meant to change number of players.
2008-09-18 03:48:29 +00:00
ehouse
b3f8902307
Check in files forgotten before: simple font browser.
2008-09-18 03:47:04 +00:00
ehouse
33c99a2371
cleanup; to get better idea of what fonts are available on smartphone
...
add rough font chooser dialog. Is commented out and not meant to
ship.
2008-09-17 04:19:20 +00:00
ehouse
fd6345c1cb
move logLastError
2008-09-14 16:06:51 +00:00
ehouse
82030b5382
plug leak: DeleteObject can't nuke an object CE didn't create
2008-09-14 16:06:18 +00:00
ehouse
4d7a781673
move logLastError
2008-09-14 16:01:28 +00:00
ehouse
e176540b5e
remove unused defines
2008-09-14 14:38:16 +00:00
ehouse
93f120e274
Up copyright date.
2008-09-14 14:37:44 +00:00
ehouse
302f7524ef
Up beta version; fix sizes to avoid clipping on some CE devices.
2008-09-14 14:36:31 +00:00
ehouse
d27b0d4eed
Extend use of fitted fonts to scoreboard, allowing scoreboard to have
...
non-constant size eventually.
2008-09-13 15:24:23 +00:00
ehouse
720160e7de
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
1825939981
Reduce parameter count. No logic change.
2008-09-10 11:57:30 +00:00
ehouse
34c4bdab9a
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
69f667fba3
logRect utility
2008-09-09 12:20:45 +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
36213460e0
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
ehouse
cc627f6b6d
Shrink scoreboard a bit. Goal's to not needs scrolling on small
...
screens, but still needs work.
2008-09-01 15:07:46 +00:00
ehouse
2daf7d503a
Pick fonts based on actual size of the subset of glyphs we'll use.
...
This allows a better fit without hard-coding offsets. It also takes
considerable time at startup, so either the algorithm has to be
improved or I need to cache the data as part of prefs (and delete it
when switching between landscape and portrait on devices that allow
that.)
2008-08-30 18:55:20 +00:00
ehouse
1384be6895
Get rid of cute-but-confusing feature whereby the menuitem to which
...
the left softkey is set is removed from the right key's menu. More
important is that menu-9-6 always mean "exit".
2008-08-27 12:38:01 +00:00
ehouse
bf505d1a62
Go back to using combobox on PPC but keep spinners on Smartphone.
...
Meaning: both exist in the resource, and at runtime we disable the
unwanted one and lookup IDs and sometimes window messages in order to
operate on 'em. Also, spinners send WM_NOTIFY messages, so handle
that. Current implementation is a bit of a hack but works.
2008-08-27 12:16:33 +00:00
ehouse
5588ed30ad
Fix cached pen remaining after color preference changed.
2008-08-02 14:35:40 +00:00
ehouse
39eb88b14f
Replace dropdowns in limited-hint dialog with spinners. Combine flags
...
for spinners into a macro to guarantee all same.
2008-08-01 11:13:13 +00:00
ehouse
3859e84c52
fix major leakage by closing one game before opening another.
2008-08-01 10:47:32 +00:00
ehouse
be219b71f2
fix scrollbars now that I finally understand what nPage is supposed to be.
2008-08-01 10:37:52 +00:00
ehouse
691f5fea19
fix drawing on 320x320 devices by forcing Wince to treat them as 320x320.
2008-07-30 04:08:45 +00:00
ehouse
925964675a
add game names in sorted order
2008-07-28 05:02:39 +00:00
ehouse
da105cfb16
fix typo
2008-07-28 05:02:11 +00:00
ehouse
b00a2ac384
Fix drawing of divider -- is too narrow to shrink horizontally so do so vertically; implement warnf with a dialog.
2008-07-24 04:16:48 +00:00
ehouse
9f82df49f6
Draw top-level board and tray focus as rect (like palm) rather than by
...
shading certain tiles/cells. Up version number. Change capitalization.
2008-07-20 16:33:19 +00:00
ehouse
7ded50b908
nuke unused variable
2008-07-20 16:31:50 +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
ebc481ddc0
Implement dup, delete and rename buttons in saved games dialog.
...
Differs from Palm in having no edit field. Rather, a separate dialog
comes up to get the new name. Rather than reload the spinbox with a
new set of saved games after an action, just close and reopen the
dialog.
2008-06-26 04:17:14 +00:00
ehouse
951d7e1c7e
Use GetModuleFileName to find dictionaries in same directory as executable. Replace cute attempt to cons up list of possible dict locations with a string in a resource. Get rid of two-year-old code explaining a change in where dicts live. Fix typo putting 4K buffer on stack.
2008-06-13 05:25:20 +00:00
ehouse
6153fc9854
Up version of APIs being used. Using non-hex may have been a mistake
...
anyway. Remove locally defined function that's available with higher
version.
2008-06-07 15:59:56 +00:00
ehouse
80b73824e1
Cleanup: fix for win32; remove constants that belong in cegcc; etc.
2008-06-07 14:42:20 +00:00
ehouse
930ed69d6b
Finally fix scroll-follows-focus for color edit dialog (the tallest).
...
Trick was to add BS_NOTIFY property to dialog controls and look for
the WM_COMMAND->BN_SETFOCUS message.
2008-06-07 14:40:05 +00:00
ehouse
fa1f65283f
for win32, look for dicts locally.
2008-06-07 13:46:27 +00:00
ehouse
a29ab639fc
rename and reorganize/simplify dialog-handling code common to all
...
dialogs, handling scrolling and backspace key (smartphone only) and
scroll-by-focus in a single place.
2008-06-05 04:29:28 +00:00
ehouse
3555414ffc
Fix dictionary-search code to look in top-level temporary directories
...
rather than hard-coded "SD Card" etc. to work in non-English cases;
fix password dialog to fit, and simplify it; fix backspace on
smartphone for all dialogs with EDIT fields to actually backspace
rather than exiting app; and in main window have it raise focus. This
change requires SHSendBackToFocusWindow(), which is not yet in cegcc.
Until I get a patch accepted this breaks wince builds.
2008-05-31 22:07:29 +00:00
ehouse
af089de849
Move to new cegcc, whose tools have slightly different name.
2008-05-26 00:47:40 +00:00
ehouse
1355b61906
set background color in timer, preventing flash of color when focus on scoreboard.
2008-05-25 15:54:34 +00:00
ehouse
64199cf1ec
clip so arrow doesn't overwrite cell border on smartphone with small cells.
2008-05-25 15:31:54 +00:00
ehouse
556e947cad
Prevent Pts in temp score display from overwriting number: draw it
...
first, and use a font the right size.
2008-05-25 15:08:59 +00:00
ehouse
ec8786b2a7
cleanup: remove dead function; move variables closer to where used
2008-05-25 15:08:03 +00:00
ehouse
51d4c608f9
Don't include mingwm10.dll in .cab. Doesn't seem to be needed.
2008-05-12 02:51:22 +00:00
ehouse
5502c3ef8b
Trying to give smartphone users way to use keypad to move tiles to
...
board. Enabling key-to-text works, but constants to turn it off
aren't in cegcc. So for b2 add a quick hack where 1 means first tile
in tray, 7 means last (rightmost). Enable and test on gtk.
2008-05-11 20:29:43 +00:00
ehouse
f5b5da9dc5
Fix trade window draw and timer draw by setting clip rect. Change
...
softkey to turnDone when trading. Tweak trade-related user messages.
2008-05-11 15:25:04 +00:00
ehouse
cf6a3db940
Work around what appears to be smartphone bug where grouped radio
...
buttons are not kept in sync by manually unchecking one when the
other's selected. Also add terminating WS_GROUP bits; they're supposed
to be there, but did not help.
2008-05-11 13:58:04 +00:00
ehouse
4e9f1c6c2b
remove unnecessary memset
2008-05-11 13:55:58 +00:00
ehouse
9617f503a9
Make prefs dialog narrower so fits smartphone screen.
2008-05-10 22:33:07 +00:00
ehouse
bbd9384a9e
fix win32 build
2008-05-10 21:11:54 +00:00
ehouse
180de81e58
Fix color edit dialog itself. Shrink to fit smartphone screen. And
...
use another owner-drawn button for the sample so it can be located in
the resource file.
2008-05-10 21:09:12 +00:00
ehouse
3d6f26cc3d
Work around apparent limitation to smartphone/ppc, that ownerdraw
...
buttons don't generate WM_MESSAGE events and ownerdraw static controls
don't get drawn: have one disabled ownerdraw button as the color
sample and a real button to trigger the edit.
2008-05-10 18:41:16 +00:00
ehouse
e178b7ccf5
Use SHInitDialog on smartphone to create fullscreen dialogs. Move
...
test for smartphone into util functions so can't forget it. This
fixes scrolling on smartphone.
2008-05-10 15:42:52 +00:00
ehouse
ebad668227
add some consts.
2008-05-06 12:49:37 +00:00
ehouse
ac63d5621f
Clean up saved games dialogs, and remove (temporarily) controls that
...
won't do anything for b2. Rename a couple of structs.
2008-04-13 17:14:16 +00:00
ehouse
63419db11a
Put game name in title bar on launch as well as after opening saved
...
game. Clear when opening unnamed/defaultnamed game
2008-04-13 17:01:09 +00:00
ehouse
18ea57fa38
Set clip rect before scrolling screen. Fixes bug where scroll forced
...
by hint left board drawn incorrectly.
2008-04-12 19:29:20 +00:00
ehouse
b085e0cea7
Fix drawing of cursor arrow by moving the clip rect.
2008-04-12 15:47:15 +00:00
ehouse
c2fbb06438
force miniwindow entirely onto board even if natural position is on
...
tray; fix overdrawing onto miniwindow by making timer proc return a
boolean and only redrawing (on wince) when it's true.
2008-04-12 15:36:31 +00:00
ehouse
ff254fcef4
add ability to scroll the board by dragging it. add new method
...
util_altKeyDown to allow user to choose between scrolling board and
dragging the hint rect when both are possible. add adjustYOffset;
make it and board_setYOffset more tolerant of out-of-bounds inputs and
use that to simplify calling code.
2008-04-08 03:55:53 +00:00
ehouse
fd4cc02c13
shorten dialog
2008-04-02 03:51:12 +00:00
ehouse
97b8d81d40
remove excessive logging
2008-04-02 03:50:55 +00:00
ehouse
0225343c09
Remove params from ceDlgSetup and ceDoDlgFocusScroll; use the right
...
message to fetch text from listbox on CE.
2008-03-31 00:26:18 +00:00
ehouse
4516cde69c
Force redraw after timer fires. This allows scrolling to happen
...
during drag, but isn't the right fix. The timerProc should probably
return a boolean indicating whether redraw is needed.
2008-03-31 00:25:18 +00:00
ehouse
6c0d196f6c
Remove params from ceDlgSetup and ceDoDlgFocusScroll; use DM_SETDEFID
...
message to make self-drawn buttons respond to cr key.
2008-03-31 00:24:04 +00:00
ehouse
10c9b15980
Remove params from ceDlgSetup and ceDoDlgFocusScroll
2008-03-31 00:23:07 +00:00
ehouse
7790bf13ff
make ceDlgSetup figure out from sizes whether to scroll; make
...
ceDoDlgFocusScroll parse params passed into WM_NEXTDLGCTL message to
figure out what object is about to get focus.
2008-03-31 00:22:24 +00:00
ehouse
da118a485a
Tweak layouts. Wrap color prefs dialog controls in macros so easier to tweak. Up version number.
2008-03-31 00:17:41 +00:00
ehouse
9e38eb7336
name change only
2008-03-30 23:58:04 +00:00
ehouse
a6dda53907
Use new APIs to scroll dialogs; use new saved games dialogs.
2008-03-24 12:41:12 +00:00
ehouse
3aaebbc1da
constants for new savegame dialogs
2008-03-23 19:39:08 +00:00
ehouse
8e285f1097
rename ceStackButtonsRight ceDlgSetup, and make it do more general
...
setup of dialogs on CE. No need to move buttons, but now scrolling
may need to be enabled, dialogs made fullscreen, and softkeys added.
Add functions to be called from dialog's wndprocs to implement
scrolling.
2008-03-23 19:37:53 +00:00
ehouse
c06434dd5c
Lots of changes for smartphone, in particular removing Ok and cancel
...
buttons for non-win32 dialogs where they'll be replaced by softkeys.
Also, new dialogs to replace OpenFileName etc. that don't exist on
Smartphone.
2008-03-23 19:29:51 +00:00
ehouse
7759cc98be
New functions to replace OpenFileName etc. that don't exist on Smartphone.
2008-03-23 19:25:49 +00:00
ehouse
996e88a575
Pick fonts for tray and board based on sizes at runtime; bury tile
...
values menuitem.
2008-03-16 14:23:57 +00:00
ehouse
a69092bc53
Use clipping to prevent spillage when cells are very small.
2008-03-15 23:06:06 +00:00
ehouse
f0658b3b20
Use MessageBox instead of my StrBox on Smarthphone; do away with
...
scrollbar on Smarthphone since there's no touchscreen and I want the
space. Still need to find a way to scroll screen.
2008-03-15 21:56:37 +00:00
ehouse
0bf21a1b5e
Change About box implementation from separate dialog to str resource
...
passed to MessageBox
2008-03-15 19:24:59 +00:00
ehouse
b7f35d2958
Don't subtract command bar height from client rect height on
...
smartphone. This prevents windows from being too small in
non-fullscreen mode. Make ceSizeIfFullscreen work based on state
rather than assuming it's toggling.
2008-03-15 18:32:22 +00:00
ehouse
cae88f5b6c
Rework dialogs to fit or (eventually) scroll on small screen; put
...
dialogs in fullscreen mode; switch from dropdowns to spinbuttons on
CE; grab OS version on startup (not yet used.)
2008-03-15 15:39:58 +00:00
ehouse
439dd4d84a
add __attribute__ format and fix resulting compile warnings; add a few
...
new WM_ strings for debugging.
2008-03-15 14:14:39 +00:00
ehouse
a3bc875191
Fix errors, all in debug-only code, flagged by __attribute__ format addition.
2008-03-11 12:24:23 +00:00
ehouse
355cfa9fcc
add owner param to drawTileMidDrag so can color tiles correctly
2008-03-11 11:48:53 +00:00
ehouse
244d58b957
Work on soft key and menu: derive text from menu item being moved so
...
that we can pull out and later replace any item by id alone. Do
something similar on Win32 to ease development. Remove '&' from
menuitem text, allowing winders to assign command keys, so that we
don't have to pull it before assigning text to softkey.
2008-03-10 01:47:46 +00:00
ehouse
963c59b0b5
implement drawTileMidDrag (same as tile in tray for now)
2008-03-09 23:32:24 +00:00
ehouse
4c730be669
make new turnChanged notification compile-time conditional
2008-02-27 05:43:27 +00:00
ehouse
885e7f0192
Put back "turn done" menu, and add call to change the left softkey.
...
Call it when turn changes, new game is begun, and hint feature has
been used. Currently menuitem is duplicated. Goal is to remove the
item being attached to the left button and to replace it when another
is chosen.
2008-02-26 13:49:41 +00:00
ehouse
da60e6211c
add -D_WIN32_IE=0x0400 (needed for some structs in mingw headers)
2008-02-26 13:47:28 +00:00
ehouse
dfe0249490
Add name of color edited to title of color edited. Clean up names and constants in support.
2008-02-26 13:31:36 +00:00
ehouse
a6575b1a2c
Convert prefs in old format to new when encountered so that users
...
don't lose settings on upgrading.
2008-02-23 22:06:05 +00:00
ehouse
04ff991298
Add more message strings
2008-02-23 22:02:10 +00:00
ehouse
551cad98ed
put file menu last where easier to get to
2008-02-23 22:01:36 +00:00
ehouse
bbbad5cbd8
Draw color samples to look more like buttons including thicker border to indicate focus.
2008-02-22 13:27:33 +00:00
ehouse
e6a485f653
Add ENABLE_LOGGING define so logging can be used on non-debug builds, e.g. to trace opening of non-debug saved games and prefs files.
2008-02-17 21:48:48 +00:00
ehouse
5a951647e2
add mingwm10.dll to .cab files
2008-02-16 20:26:47 +00:00
ehouse
ccb8fb4df7
Fix timers to work even when message queue is full; make fullScreen
...
choice persistent; clean up resource file and add missing strings.
2008-02-16 17:36:46 +00:00
ehouse
a79dfdecc0
fix warning
2008-02-16 17:19:31 +00:00
ehouse
02f3e10edc
move or add ceStackButtonsRight
2008-02-16 17:19:06 +00:00
ehouse
4a464b6ef5
modify ceStackButtonsRight to place dialog ok/cancel buttons in
...
bottom menubar where possible; move XP_LOGW to cedebug.c
2008-02-16 17:14:35 +00:00
ehouse
e3b39a9834
Add missing files.
2008-02-16 16:36:37 +00:00
ehouse
de6e0d4f2d
Make cegcc the default build environment for wince. Make inclusion of hacks needed to work with mingw/pocketpc-sdk conditional.
2008-02-16 16:33:46 +00:00
ehouse
f3b8867518
Mark params unused in compiles for standalone; remove unused param.
2008-02-16 16:02:49 +00:00
ehouse
0913936486
Add resource for two-soft-key commandbar and put it up. The single item is "Done" for now.
2008-02-05 04:57:58 +00:00
ehouse
a05138790c
Modify to switch between cegcc and pocketpc-sdk, with pocketpc-sdk
...
choice commented out. cegcc builds it about 30% smaller, in line with
what the older M$ tools could do.
2008-02-05 03:45:24 +00:00
ehouse
3532f7fa61
make "next hint" top sub-item since it'll be most frequently used
2008-02-05 03:38:15 +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
1ac6326563
Add full-screen mode and menu to get to it (leaving the cmdbar/softkey
...
area in place until I figure out how to work a UI without a visible
menu); rework menu to launch new-style from a single softkey; remove
cmdbuttons and associated resources; limited progress on handling
return key/timeouts for keyboard navigation.
2008-01-20 15:36:17 +00:00
ehouse
211100c247
Turn off experimental multi-device features; up copyright; define XP_UCHAR as signed char to fix lots of warnings.
2008-01-19 16:34:21 +00:00
ehouse
b333476d48
Update to use modified newg_store
2008-01-05 16:37:49 +00:00
ehouse
3b1fcceb16
Fix compilation errors due to constant name changes -- no change to binary.
2007-12-14 13:06:44 +00:00
ehouse
86f5193801
Fix compilation errors. Not tested.
2007-12-03 01:18:13 +00:00
ehouse
5457ea1b59
replace all __FUNCTION__ with __func__
2007-12-02 19:13:25 +00:00
ehouse
dd7a5c8104
type name change only
2007-05-26 14:14:01 +00:00
ehouse
eeebeca542
substitute macro for common sizeof(x)/sizeof(x[0]) pattern; no generated code change
2007-05-26 14:03:07 +00:00
ehouse
aad182c2e3
turn stringFromStream into macro to aid logging for leak detection. Debug builds only effected.
2007-03-18 23:31:51 +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
3f111c5657
name change only: Connectedness becomes DeviceRole
2007-02-02 08:34:37 +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
0b68a917f7
preliminary addition of xplatform-only focus, esp drawing of cursor
...
and handling of arrow keys via WM_KEYUP; added focus/cursor color to
prefs and color edit dialog. Tested only on win32 (WINE), and not
integrated with platform nav/focus model.
2007-01-19 08:24:02 +00:00
ehouse
e9871b1fb6
change constant names. No change to code compiled.
2007-01-19 06:43:52 +00:00
ehouse
c01615e86b
reintroduce board_handleKey
2007-01-18 02:42:37 +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
382848f556
Fix to work with draw API changes
2006-11-12 15:22:26 +00:00
ehouse
f1def437c3
Use new XP_TriEnable type; begin work to support bluetooth by tracking
...
connType and adding choice how to connect. Bt connect dialog is
invoked, but the fields won't be populated. Pass conn type into
socket constructor, assuming socket code doesn't change much to use BT
rather than TCP.
2006-10-28 14:56:04 +00:00
ehouse
07e2717cc8
add a few consts decls where APIs changed; use XWFEATURE_RELAY rather
...
than BEYOND_IR
2006-10-22 19:44:30 +00:00
ehouse
5f25ba9f57
remove BEYOND_IR, replacing with XWFEATURE_RELAY and
...
XWFEATURE_BLUETOOTH. The goal is to be able to build to support
bluetooth only, or relay/ip only, e.g. for a palm bluetooth beta.
Seems to work.
2006-10-10 01:34:37 +00:00
ehouse
72cd7c7ec7
tweak svnversion output so make stays happy
2006-09-15 07:52:45 +00:00
ehouse
a292e33c03
catch up with recent API changes; fix bug in newgame dialog.
2006-09-15 07:39:57 +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
35261484a2
include svn version in name of generated .exe file.
2006-08-16 01:30:31 +00:00
ehouse
61959b394a
patch from Peter Rovnak. For Slovak support, need to specify the tray
...
font by name in order to get one that has all the necessary faces. Seems
to make no difference on US/English systems, but it works for him on a
localized device.
2006-08-16 01:29:21 +00:00