Commit graph

85 commits

Author SHA1 Message Date
ehouse
b24cab9af3 Just enough changes to get compiling on Palm again: seems to work
against the relay!  Begin process of displaying relay status via icon
reusing BT's spot.
2009-09-27 16:33:36 +00:00
ehouse
c6a6ec1fb0 Get rid of unused enum. 2008-01-07 01:19:24 +00:00
ehouse
bad6415484 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
711bdf54f2 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
a07a5f2822 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
75a3c36ad6 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
33cb34abfe 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
bdb06cbdf8 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
ab6ed444bb 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
d58789c493 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
dd7a5c8104 type name change only 2007-05-26 14:14:01 +00:00
ehouse
a1a0f9934a 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
630d9e391b 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
0b0143fa92 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
2bba51f95a 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
0bc445f2ad Fix to compile with XWFEATURE_FIVEWAY undefined 2007-04-12 01:19:56 +00:00
ehouse
03433901fc 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
ecba9df348 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
b72aba3a9a Don't store procptr stubs in Ftrs across app boots! Fixes device-resetting crash. 2007-03-15 01:20:11 +00:00
ehouse
c00dad745d 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
971bfc280f 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
621e049962 Cleanup for a5 release: always use status icons when building for bluetooth. 2007-02-18 03:33:17 +00:00
ehouse
f273e93c86 code to use bitmaps instead of letters to show bt conn status. 2007-02-12 08:05:35 +00:00
ehouse
363cfdce04 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
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
9d74699181 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
0313a89553 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
68730379b4 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
5a87db48bd 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
31b6526917 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
02c225c413 Fix so IR-only multi-device build works again. 2007-01-06 16:46:45 +00:00
ehouse
1808fa804c 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
53765169be 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
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
b9cc093820 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
c695d8644c remove unused field 2006-10-15 14:20:14 +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
0b0aef0908 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
3645481a53 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
74c6b241d7 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
0c915e61b0 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
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
a08dc22023 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
08e8c4a858 Get rid of TALL_FONT macro, since it's permanently on anyway. 2006-04-01 21:25:58 +00:00
ehouse
3388fc9f7b 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
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
c0bdfb54c9 constant name changed 2005-08-21 14:18:56 +00:00
ehouse
ae91d38e45 Clean up and fix timer code. 2005-08-03 01:14:49 +00:00