ehouse
46cb6c2955
fix assertion on exit: nuke mempool after everything it contains; call
...
gtk_main_quit rather than gtk_exit() so can exit from main()
2009-02-28 16:31:03 +00:00
ehouse
bac17d8c1e
start adding conns dialog
2009-02-24 04:34:37 +00:00
ehouse
80b3425b5b
log size of incoming packets
2009-02-07 18:15:17 +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
3a643c51a4
cleanup; set locale based on ENV
2009-01-25 20:31:13 +00:00
ehouse
09c879dccc
Add sms support, largely untested.
2009-01-13 13:33:56 +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
7158ef3802
Cleanup; add sms example to usage()
2009-01-05 02:11:13 +00:00
ehouse
dc82fc6bff
Use the new common/strutils binToSms routines. For now, use glib's
...
too and assert output is the same.
2009-01-05 02:10:27 +00:00
ehouse
c731e0d231
Remove newlines from debug statements.
2009-01-05 01:59:04 +00:00
ehouse
342674276a
Cleanup to build with relay enabled; don't enable any network features
...
if STANDALONE_ONLY is defined.
2009-01-03 23:56:20 +00:00
ehouse
863f79bfb9
Fix compile errors using latest gcc (fread etc must have return value checked)
2009-01-03 18:12:34 +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
1755267d55
Add support to gtk app for tranport over "sms", with files containing
...
base64-encoded data as the messages. Make necessary changes to comms.
This is the foundation for doing real SMS transport on handhelds.
Currently a full robot game works for two gtk clients provided the
server is launched first.
2008-12-29 01:35:29 +00:00
ehouse
b24f3d66a7
fix warning when DEBUG not defined
2008-11-22 17:14:08 +00:00
ehouse
5118e415c7
use a gharish color for focus so doesn't get lost
2008-11-22 16:37:58 +00:00
ehouse
46b574b4e7
fix inval of focussed tile to take divider into account.
2008-11-20 05:12:48 +00:00
ehouse
5cb97bf636
New Ubuntu has a stricter compiler...
2008-11-06 03:16:09 +00:00
ehouse
e30c72c829
make -q option take number of seconds to pause before quitting
2008-10-26 15:33:21 +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
86fb79d969
Fix to compile and run for IP-direct case, possibly breaking
...
heartbeats used over bluetooth.
2008-10-11 17:33:07 +00:00
ehouse
f021964213
fix ncurses version so it can save games and read them back in: make existing gtk code run on both.
2008-09-18 03:46:27 +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
797b859c8e
add pointer support to LIB_NO_UI case
2008-08-30 13:28:53 +00:00
ehouse
4d6aec67fe
error message when hit feature is off but you try to use it; clean up memory on way out.
2008-08-30 13:27:27 +00:00
ehouse
30fcb88e43
fix problems drawing focus so letters still visible on board.
2008-07-28 05:03: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
ad52e63ff0
separate UI-specific code so that a non-UI linux library can be compiled, e.g. for use with a toolkit not gtk or ncurses
2008-06-30 03:39:27 +00:00
ehouse
bbfdeb6bf8
Draw tiles hanging a bit below board when hidden to allow testing of
...
common case on wince devices.
2008-06-07 23:03:47 +00:00
ehouse
bd6aed4b5a
Fix so curses-only builds and curses build doesn't segfault.
2008-05-26 00:27:48 +00:00
ehouse
c6da605b56
add missing error message
2008-05-24 16:08:13 +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
ebad668227
add some consts.
2008-05-06 12:49:37 +00:00
ehouse
4730a23188
fix gtk_draw_vertScrollBoard to scroll bits rather than just letting
...
board inval everything.
2008-04-12 16:50:46 +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
75ab88565d
implement util_yOffsetChange; increase pen timer to half second.
2008-03-27 04:12:16 +00:00
ehouse
ae67a58a26
Attempt to find font that best fits string to encosing rect. Works
...
but only with a hack: need to understand pango better.
2008-03-25 12:47:05 +00:00
ehouse
d3ce87b057
Indicate empty cell with CELL_ISEMPTY rather than an empty string; fix
...
palm to not draw star on top of placed tile.
2008-03-14 09:36:42 +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
bc873169f1
Add __attribute__ ((format)) and fix problem it flags.
2008-03-10 12:02:53 +00:00
ehouse
f30dd17e00
rename constants to begin with GTK so they're unique.
2008-03-10 00:51:20 +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
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
f5ae6b9809
add -Werror
2008-02-16 19:05:30 +00:00
ehouse
c3555440fd
get rid of const-related warnings
2008-02-16 15:49:03 +00:00
ehouse
ea7949dd22
Make a couple of dialogs format for narrower screen and respect keypad buttons.
2008-02-02 20:58:44 +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
bae6890c35
fix to build without Bluetooth headers
2008-02-02 16:53:36 +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
6e9e5b5c99
Fix to compile and run standalone
2008-01-19 16:03:53 +00:00
ehouse
08da013d4d
Warn user, and refuse to continue, when new game is as host and has no remote players. API
...
changes, so other platforms won't compile until changed.
2008-01-04 14:47:52 +00:00
ehouse
b115cc6f0c
fix unused param warning
2008-01-02 01:43:45 +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
d5d29adc0c
Change util function to use signed type; other cleanup to compile with various features.
2007-12-05 06:28:51 +00:00
ehouse
5457ea1b59
replace all __FUNCTION__ with __func__
2007-12-02 19:13:25 +00:00
ehouse
a560c9f8a8
Add files forgotten with last checkin; add additional parameter to
...
addListener so listeners can be removed on reset.
2007-11-28 03:59:26 +00:00
ehouse
e1d5632a7b
Re-add direct-via-ip transport, and implement for linux in order to
...
better test heartbeats. Fix so can play against Palm over BT.
Assertions failing on Linux when reset, but it's otherwise done.
2007-11-26 02:58:25 +00:00
ehouse
ee726968b0
Don't draw negative number of tiles left.
2007-11-25 15:12:22 +00:00
ehouse
4c8cf98d24
Add and set a compile-time option so comms will set a periodic timer
...
and use it to send and check for heartbeats over any transport.
Caller must supply a reset proc which is called when heartbeat hasn't
been received in too long. No changes required to comms protocol, but
that means the heartbeat interval is fixed at compile time: can't be
negotiated, and the two ends had better agree. Currently tested with
linux host and PalmOS guest, where only the first heartbeat failure is
recovered from. So there's some debugging to be done still.
2007-11-18 23:43:27 +00:00
ehouse
cfb01d8f3d
Deal with incoming fragmented rfcomm packets; log packet contents.
2007-11-15 14:40:56 +00:00
ehouse
ac42b5e7d6
fix oversized font when scoreboard miniwindow has two lines.
2007-11-14 05:57:12 +00:00
ehouse
1094680ee7
quick hack at framing rfcomm packets
2007-11-14 05:53:28 +00:00
ehouse
6b834cce4a
Add ability via compile-time flag to connect via rfcom rather than
...
l2cap. Works with two caveats: assumes l2cap-style complete packets
(no framing), and has problems with linux sdp system's tendency to
retain records long after sessions are closed.
2007-11-13 15:20:33 +00:00
ehouse
383847e75c
Fix typo breaking compile.
2007-11-05 03:42:27 +00:00
ehouse
3060888264
Update BT code to advertise and search sdp records and use psm reported to work with new Palm
...
code. Log btaddr after converting from name.
2007-11-05 03:38:00 +00:00
ehouse
de640cda98
Update BT code to advertise and search sdp records and use psm reported to work with new Palm
...
code. Get rid of pthreads dependency which was for logging only.
2007-11-05 03:17:07 +00:00
ehouse
880254c17f
Fix tray hanging below main window; draw pending tiles white-on-black as on other platforms.
2007-10-24 12:46:15 +00:00
ehouse
e0f5fcf280
Instead of three fixed-sized fonts, choose fonts (lazily) based on the size of the rect into which it's to be drawn.
2007-10-23 03:08:47 +00:00
ehouse
2f925349a6
Fix so can without BT, and so compiler can be specified to Makefile.
2007-06-02 02:07:45 +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
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
0fd0692748
better logging: include function name
2007-03-17 15:38:44 +00:00
ehouse
5afdcc20db
include result of strerror in messages logging errno; turn relay on by default (linux)
2007-02-04 01:22:00 +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
7ed3ad89b7
Remove assert that's firing; don't inval_all from util_yOffsetChange:
...
that blocks testing common inval code.
2007-01-21 23:00:52 +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
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
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
098a2ec5c4
Use new keydown/up APIs from linux, and add key support and drawing
...
changes to implement keyboard navigation/focus in gtk port.
2007-01-06 17:46:02 +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
cac0fd94d7
Use new top-level focus drawing model, and new API indicating whether
...
key handled.
2006-11-14 06:47:50 +00:00
ehouse
4ccddbd93f
add a done button
2006-11-13 02:02:15 +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
2945a120f9
resend_all when a socket connects. This is the strategy needed with
...
Palm where apps quit and reopen connections many times during a game.
2006-11-11 22:44:31 +00:00
ehouse
9f0db2d9c5
add -lmcheck, which purports to catch memory errors
2006-11-11 22:42:40 +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
e8b74e1cc3
set focus to board if not held prior to passing keys
2006-11-08 05:05:11 +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
a735cfab03
use new XP_TriEnable type
2006-10-28 14:49:49 +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
d6ef943a5f
add linux_dict_getShortName
2006-09-24 15:35:33 +00:00