Commit graph

84 commits

Author SHA1 Message Date
ehouse
b53a1e8b4d Get rid of unused enum. 2008-01-07 01:19:24 +00:00
ehouse
93cb20214e log date on startup; don't always put up about dialog on first boot; remove excessive logging 2008-01-02 01:45:58 +00:00
ehouse
c8bbfc5432 Instead of warning user on failure to connect via BT, add preference
to allow user to confirm before every attempt.  Users will learn to
set this when T650s are in the mix.  Save a new preference, and up the
stream version.  Up beta version.  Add the preference both to the prefs
dialog and to the bluetooth connection (for guest) dialog, with both
impacting the same field in gamePrefs.
2007-12-14 03:38:55 +00:00
ehouse
63ccaed46e cleanup; replace a bunch of EvtAddEventToQueue calls with
postEmptyEvent; pass transport type with incoming packets so they can
be rejected if not on expected channel (to stop IR, which is always
on, from injecting into a BT game); do BT work and fire timers even
when menu is down; don't let robot run until after board is drawn for
the first time; on startup, don't let robot run until after board is
drawn once.  Up version to b3.
2007-12-09 01:59:15 +00:00
ehouse
693eeb6863 Remove unused code and constants; fix to compile with relay; don't
show connection type dialog unless more than IR is available and
supported, and then build the dropdown dynamically based on what's
compiled-in and available on the device.  This means you don't see the
BT option at all if you don't have BT.
2007-12-08 18:11:42 +00:00
ehouse
f70bdb54ae 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
d1054a52ff Use a single general-purpose callback passed into palm_bt_doWork where
it's needed, removing those passed into _init and _send.  When client
is unable to connect to host, raise alert to user and give choice to
continue trying.  Clear 'suspendBT' flag when user manually resends or
opens different game.  Currently this happens only on guest's failure
to find registered SDP; should also extend to remote device not
running at all and to host failure to send to guest.
2007-11-07 13:40:56 +00:00
ehouse
47c3b0f7bd add fnav resource for password dialog, and use it if device has fiveway.
Otherwise use FrmSetFocus.  This works around a bug where key event that
leaks through from parent dialog dismisses dialog (whereupon another comes
up, and eventually cursor is left flashing on parent.)
2007-06-18 13:21:36 +00:00
ehouse
a79d36a150 Use a timer to avoid trying to get an ACL connection too frequetly.
This seems to trigger crash Treo650s far less often than constantly
retrying.
2007-05-26 22:51:25 +00:00
ehouse
5878ea6018 type name change only 2007-05-26 14:14:01 +00:00
ehouse
019d701bf7 Call HsNavDrawFocusRing on Treo600, FrmNavDrawFocusRing on later
devices.  Fixes crasher on devices that don't have the former.  Up version.
2007-04-23 03:20:37 +00:00
ehouse
a0ec3417c2 add no-bt state so there can be no icon when bt's been left off; up
version and turn BT on by default for a8 release.
2007-04-16 05:22:49 +00:00
ehouse
9a86b69527 If BT is off, ask user to turn it on only once. If cancels, warn that
it must be turned on, and don't attempt to turn it on again.  This
prevents BTLib from repeatedly asking for permission to turn BT on.
2007-04-15 16:46:17 +00:00
ehouse
2f52acd5e6 cleanup (no change to generated code): remove old owner_hash code; replace empty formal lists with void. 2007-04-14 16:27:19 +00:00
ehouse
54e0ab64d1 Fix to compile with XWFEATURE_FIVEWAY undefined 2007-04-12 01:19:56 +00:00
ehouse
b965654db3 Closing BT lib from datahandler (since don't want to close on game
close in case next game will use); erase BT status icon when not BT
game; plug leak of dict name.
2007-03-18 23:57:30 +00:00
ehouse
233fb2ef40 Pad prefs struct so ARM and 68K versions are using same addresses
(fixes crash opening game in ARM version that was saved in 68K);
2007-03-17 17:29:32 +00:00
ehouse
b9068c10c1 Don't store procptr stubs in Ftrs across app boots! Fixes device-resetting crash. 2007-03-15 01:20:11 +00:00
ehouse
71693ea0f7 Add APIs needed to compile and use BT APIs. ARM version works now well enough to play games, but often crashes on app exit having done so. 2007-03-09 02:58:57 +00:00
ehouse
033df9c5af Save and restore focus owner across app restarts (includes working around
OS's insistence on sending focusTake event on formOpen); up version numbers; turn off BT prior to beta release.
2007-02-24 03:35:51 +00:00
ehouse
2b35dd68c7 Cleanup for a5 release: always use status icons when building for bluetooth. 2007-02-18 03:33:17 +00:00
ehouse
dc204c9aba code to use bitmaps instead of letters to show bt conn status. 2007-02-12 08:05:35 +00:00
ehouse
aac30fffea Drop keyUp events not preceeded by keyDowns to catch leaks from
dismissed dialogs; don't drop first keyDown on OS4 since the bug that
works around isn't there; turn BT back off by default.
2007-02-04 04:10:11 +00:00
ehouse
2fe75a19a2 add const to a bunch of char* decls in APIs and variables; no code change 2007-02-03 17:54:20 +00:00
ehouse
916ea4abc2 name change only: Connectedness becomes DeviceRole 2007-02-02 08:34:37 +00:00
ehouse
20ea6b3949 Work around what looks like a PalmOS bug that generates a spurious
keyDown event to a form put up while processing a keyUp event in the
main form: set a flag while handling key events, and drop the first
keyDown in child forms when it's set.
2007-01-27 15:10:10 +00:00
ehouse
acb7f0c261 Test and special-case for zodiac, which gets events in the same way
has Treo but doesn't have OS support for moving focus among objects.
And since zodiac doesn't support the std Palm hires APIs don't try to
use them.  Up version string to b4.
2007-01-21 23:27:46 +00:00
ehouse
e10f6d2163 add five-way support for Tungstens; don't move cursor when keys are
meant for menu; redraw after hiding miniwindow when OS brings up
dialog;
2007-01-18 05:49:54 +00:00
ehouse
a056dad08c keep track of last key down so can fake key up event when palm won't
be giving us one, e.g. when holding key results in a system window
coming up;
2007-01-12 03:34:43 +00:00
ehouse
c5fc1acb3a handle both keyUp and keyDown events, including dealing with devices
that don't generate the former.  Break key-handling code into separate
function.
2007-01-06 17:50:43 +00:00
ehouse
c645534b83 Fix so IR-only multi-device build works again. 2007-01-06 16:46:45 +00:00
ehouse
b551142f5f When palm button loses focus to board obj, post event to be handled
after focus event, and on handling it inval rect of focus ring on
button.  This fixes drawing glitch where palm remembers pixels behind
focus ring but they're not right.
2006-12-20 04:49:24 +00:00
ehouse
b23d51fba4 Draw focus differently in tray if whole thing has it, to include borders
between the tiles.
2006-11-17 13:46:06 +00:00
ehouse
005fd92fd4 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
b0102f8baa 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
648b986376 Many many changes improving newgame dialog by using a three-way rather
than two-way enabled state, but mostly about getting focus ring
working for five-way-equipped devices.  Add fnav resources to the two
dialogs with gadgets, and code so the gadgets are included in the
focus rotation.  The move to three-way means that disabled controls
can visible while excluded from the rotation.  There's cleanup and
polish to be done still, and five-way navigation doesn't work for the
main form yet. No changes to bluetooth at all.
2006-10-28 14:48:08 +00:00
ehouse
4a443563ca remove unused field 2006-10-15 14:20:14 +00:00
ehouse
ba4f91d9e0 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
7cbc781a07 Add quick hack to show BT connect state on main board, to be replace
by icons or something prettier later.  For new games dialog, replace
hard-coded list of controls to ignore with a runtime list.  This
allows checkboxes and fields to be enabled and disabled more easily.
Works around Palm's lack of a control state meaning "visible but
inactive" that works for all form elements.
2006-09-24 17:56:14 +00:00
ehouse
ed06a20881 New addr param to checkAndDeliver so address can be passed back to
comms; Add debug-only menus to toggle logging to file and memopad.
2006-09-14 01:46:41 +00:00
ehouse
7d48f2e430 Put up BT device browser while user is picking connection method
rather than when trying to send for first time, then pass address
through from conns dialog to bt code.
2006-08-26 21:12:10 +00:00
ehouse
3c6405d0d1 First shot at bluetooth support (turned off in Makefile by default).
A full robot vs. robot game now works between two Treos.  Added UI to
choose BT as transport mechanism, and added new send proc to establish
socket connection between host and guest.  Works only for two devices:
no piconet yet.  No error recovery, ability to quit game in middle,
start new game, etc.
2006-08-23 04:44:55 +00:00
ehouse
f561989644 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
8277d3736a Use new xplatform newgame logic to replace palm's in newgame.c, and make other
changes (shifting util functions around) that follow from that.  Back
version number down to 4.1.5 since that'll be the next shipped from this
branch.  Add juggle button to newgame -- the whole point of this.
2006-06-22 04:57:46 +00:00
ehouse
01d7f9b344 Get rid of TALL_FONT macro, since it's permanently on anyway. 2006-04-01 21:25:58 +00:00
ehouse
cc6251b595 Remove HIGHRES compile-time tests: all palm releases will have HIGHRES
support now; build in different directories.
2006-03-31 10:57:01 +00:00
ehouse
dcd31cd092 update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
df5c274c31 constant name changed 2005-08-21 14:18:56 +00:00
ehouse
1fd6afcaf9 Clean up and fix timer code. 2005-08-03 01:14:49 +00:00
ehouse
b015224188 Get rid of WinCopyRect-based method of drawing letters and values in
tray tiles, since it seems not to work on all versions of PalmOS.
Simply drawing seems fine where tested; will try close clipping if
erasure happens elsewhere.  Draw board-top stuff one pixel higher on
highres devices, and fix scoreboard being too narrow on high-res
devices.
2005-07-14 02:45:10 +00:00