Commit graph

617 commits

Author SHA1 Message Date
ehouse
daefd456a3 Text tweaks from Francis; widget resizings from Eric. 2007-04-12 01:17:33 +00:00
ehouse
033318ee6d First pass at translation. 2007-04-10 13:23:39 +00:00
ehouse
5906443f63 Copy English files preparatory to French localization. 2007-04-10 13:19:04 +00:00
ehouse
4f15c634d3 Turn off BT, and up version for first RC release. 2007-04-05 04:19:44 +00:00
ehouse
500b0fe0e8 pass -D options to gen_pace.pl 2007-04-05 04:18:42 +00:00
ehouse
781add0b35 wrap BT APIs in ifdef 2007-04-05 04:18:05 +00:00
ehouse
5204fd4c23 merge changes 1895 and 1899 for allowing ifdefs in funcfile.txt 2007-04-05 04:17:43 +00:00
ehouse
704e60ef4c Make gadget and bitmap size match. 2007-03-18 23:58:32 +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
6f7db1a202 palm_dictionary_make makes copy of name if needed. Helps plug memory leak. 2007-03-18 23:49:15 +00:00
ehouse
2bb3c946d9 add consts; remove logging. 2007-03-18 23:48:00 +00:00
ehouse
6dc75914a6 turn stringFromStream into macro to aid logging for leak detection. Debug builds only effected. 2007-03-18 23:31:51 +00:00
ehouse
1ad222c409 Fix crash on ARM: don't compare dummy strings. 2007-03-18 14:45:51 +00:00
ehouse
968a58785d include ability to choose arm or 68K in combined-arch release builds too 2007-03-18 00:05:15 +00:00
ehouse
5334876568 comment out assert that doesn't seem to matter 2007-03-17 17:31:01 +00:00
ehouse
c72ef78f60 include ability to choose arm or 68K in combined-arch debug builds 2007-03-17 17:30: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
7997258163 Pad prefs struct so ARM and 68K versions are using same addresses
(fixes crash opening game in ARM version that was saved in 68K);
renumber resource IDs so can be logged via a switch.
2007-03-17 15:37:15 +00:00
ehouse
9e345c317f Remove excess logging. 2007-03-17 15:35:14 +00:00
ehouse
66d8a99bb1 Put back code to associate service record with listening socket, but
ifdef'd out as it doesn't seem to make any difference.
2007-03-17 15:34:24 +00:00
ehouse
3cf22d6302 compare only six bytes of struct ARM pads to 8. 2007-03-15 05:06:56 +00:00
ehouse
eddc046e79 Enable BT; up version number for a3. 2007-03-15 01:21:56 +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
c1c96ed807 Don't store procptr stubs in Ftrs across app boots! Fixes device-resetting crash. 2007-03-15 01:19:35 +00:00
ehouse
a66f290b5e Print param lists under 80 columns. 2007-03-15 01:14:15 +00:00
ehouse
ca849ea934 define constant so tests work on ARM too. 2007-03-09 03:00:44 +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
9963c9de2e update to die when func not found, and to handle BT APIs 2007-03-09 02:56:02 +00:00
ehouse
13a517d477 Add one-bit bluetooth status indicators 2007-02-28 02:32:49 +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
e53f483d27 Add bitmaps to replace letters as indicators of bluetooth connnect state. Still to go: lowres equivalents. 2007-02-12 07:54:23 +00:00
ehouse
2d696b1e6c Fix nav for tungsten: test for lack rather than presence of keyUp events. 2007-02-08 15:16:46 +00:00
ehouse
51f726ddcf Add a one-byte header to BT messages so one device can signal another
that a new game's begun without dropping the connection.  On Palm,
remove connection-drop on new game.  With this change starting a new
game takes imperciptible time, down from 30 seconds.
2007-02-08 02:53:10 +00:00
ehouse
cd397813c8 up version number for alpha 2007-02-06 05:55:21 +00:00
ehouse
129f551737 close and reopen bt module with every new game to fix, badly, client's
failure to connect if it's restarted before host; add event and use to
retry BtLibSocketListen when fails (since failure is usually
temporary).
2007-02-05 04:20:13 +00:00
ehouse
6af89b4182 Add assert; don't call comms if has been set to null (fixes device
reset); fix failure to install connCB (removes need to manually resend
messages when client starts up first.)
2007-02-04 17:13:01 +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
49d0d2b8f8 Turn on BT so 4.3a4 can have a non-M rev number; up version for 4.2. 2007-02-03 20:36:22 +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
3b80f718c9 eType_2str replaces logEvent. Only effects debug builds. 2007-02-03 17:41:46 +00:00
ehouse
b6284511b8 don't set INITIALOBJECTID for main form 2007-02-03 17:39:48 +00:00
ehouse
c57a6a976e Fix Zodiac-only bug: printing keys generate only keyDown event, so
must use different handler than for nav keys; fix treo bug where forms
brought up during key handling get spurious key events by adding
keySafeCustomAlert that consumes up to the first keyDown before
calling FrmCustomAlert.
2007-02-03 17:36:56 +00:00
ehouse
916ea4abc2 name change only: Connectedness becomes DeviceRole 2007-02-02 08:34:37 +00:00
ehouse
e8f5f4159f Don't make any btlib calls until the main form is up. This works
around an (OS?) bug where, apparently, the confirm-turn-on-bt dialog
eats pending events, including frmLoadEvent, so that the form never
loads or is very broken if that dialog is allowed to come up too
early.
2007-02-02 08:24:06 +00:00
ehouse
06b22752c1 debugging: add custom events to logEvent 2007-02-02 08:11:42 +00:00
ehouse
839cc6d5dc Remove excess logging 2007-01-27 15:12:13 +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
17993fea06 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
ddeac54995 Fix drawing highlighted cells on perimeter. 2007-01-20 04:30:02 +00:00
ehouse
e3f57647dd use new perimeter feature and conditionally replace manual board
framing with it.  Off for now.
2007-01-19 08:22:14 +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
d22f65b78b remove code to save bits behind miniwindow 2007-01-18 05:49:07 +00:00
ehouse
df2807e422 run svnversion on parent to catch changes in common or other shared dirs 2007-01-16 02:48:27 +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
f3feef27f7 fix problems created by key-nav changes: don't drop hardware scroll
keys, and redraw after key-repeat if either up or down handled.
2007-01-07 05:25:28 +00:00
ehouse
f8c772162b up version to b3 2007-01-07 05:23:06 +00:00
ehouse
0a4f1d3f7b 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
c423f04d0d Don't show about dialog (with its alpha message) except when BT enabled. 2007-01-06 18:31:16 +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
bb0c8fbf75 2007 copyright in about box 2007-01-06 16:45:39 +00:00
ehouse
ac14760070 beta 2; redraw focus ring after redrawing tray buttons; move board
focus border so it coincides with regular border.
2006-12-21 07:55:19 +00:00
ehouse
bfda12516f incorporate svn version number in .prc file name 2006-12-20 04:57:36 +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
bcf80fcdc9 place initial focus on scoreboard since OS insists on putting it somewhere. Need to fix that. 2006-12-20 04:16:22 +00:00
ehouse
4ac7cf2902 fix for non-BT compile 2006-12-20 04:15:40 +00:00
ehouse
c8259f8eeb prevent tray buttons overwriting tray by removing border and moving same distance to right 2006-12-20 04:14:41 +00:00
ehouse
f50807d0a9 add new file palmdbg.c 2006-12-20 04:13:30 +00:00
ehouse
e5f256867c BT work is now 4.3. Nav work moves into beta as 4.2. 2006-12-13 05:03:19 +00:00
ehouse
e25caaba1a add hand-coded implementation of HsNavDrawFocusRing. This works, but
should be replaced by generated code.
2006-11-29 04:11:24 +00:00
ehouse
3bd951aca5 back out unintended change 2006-11-27 04:52:27 +00:00
ehouse
152d674141 include Hs (nav) files for ARM build too 2006-11-27 04:50:53 +00:00
ehouse
a506708740 add type for ui color table; get a jump on Hs nav functions 2006-11-27 04:48:28 +00:00
ehouse
9bec10dee5 temporarily comment out for arm code that won't compile on arm 2006-11-27 04:40:18 +00:00
ehouse
2363077d7e swap focus-related event data, and include the UI color table call used to
determine the color of self-drawn focus elements.  I can't draw the nav
ring on ARM, but otherwise five-way nav works on arm with this checkin.
2006-11-27 04:39:36 +00:00
ehouse
d7ae7b73da get rid of initial focus object for main board 2006-11-27 01:07:22 +00:00
ehouse
c754d73770 When alt key pressed cursor can move onto occupied squares it normally skips. 2006-11-22 13:49:14 +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
74ccc0ed34 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
56f64f6f46 Remove old focus-change callback; use extended handleKey API to allow
Palm to own all top-level focus change decisions (in accord with fnav
resource)
2006-11-14 06:54:14 +00:00
ehouse
427c433e2a Draw all focus indications ourselves: no more broken Palm API. Draw a
thick blue rect around board, and color all tiles and score positions
within the draw routines.
2006-11-14 06:52:11 +00:00
ehouse
aaa6687ef8 tweak prefs checkbox text: covers remote as well as robot players. 2006-11-14 06:49:20 +00:00
ehouse
b8de004286 reorganize fnav resource for main board, using rows. Allows for
faster travel between the main elements.
2006-11-14 06:48:46 +00:00
ehouse
f9dcd1820a Add to draw APIs of individual elements (e.g. board cells) whether
they're focussed so that they can draw that during rather than after
everything else.  On palm, use this to draw focus using the system
selected color rather than with the blue nav rect.  Since a new param
was too much, add new enum type CellFlags and pass as bitvector to
draw APIs.
2006-11-12 14:36:15 +00:00
ehouse
09598e1290 fix compile error when FIVEWAY not on. 2006-11-12 14:29:35 +00:00
ehouse
c06df68133 fix crash when FIVEWAY not on. 2006-11-12 14:28:43 +00:00
ehouse
1d29511733 Force file logging on to report an assertion failure. 2006-11-11 22:53:30 +00:00
ehouse
4e7ed26704 Fix messages getting dropped when remote device isn't connected by, on
getting a new connection, making a callback that calls resend_all().
This means a lot of duplication, but duplication is free with
bluetooth.  The underlying problem is that packets are reported as
sent not when acked by the other side, but when passed to a lower
level that may not be connected at all.
2006-11-11 22:52:39 +00:00
ehouse
60611d9a2c Add missing question to phonies warning message. 2006-11-11 22:45:13 +00:00
ehouse
c91847f56f 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
211271d6be add palm_util_notifyFocusChange to handle focus transitions away from
xplat code
2006-11-08 05:06:51 +00:00
ehouse
25eb722682 function turning object id constants to strings for logging 2006-11-08 05:04:13 +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
7526768939 Simple fnav resource for main form: a start 2006-10-30 00:28:46 +00:00
ehouse
3b2a6b0c7f Use color rather than period to separate score from tiles left in
scoreboard.
2006-10-29 18:24:50 +00:00
ehouse
6b1fc7e5e4 Fix crash on pre-fiveway palmos where FrmGetFocus always returns -1;
add new preference for whether small value nums are drawn in tiles in
tray.
2006-10-29 17:41:14 +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
1aa6d81177 When bt init fails, put up alert; check for failure after and don't
crash; erase bt status area even when no comms in order to erase after
turning bt off; in connect dlg, use a trigger rather than field and
button for host name.
2006-10-15 16:14:42 +00:00
ehouse
be5e857600 Cleanup logging macros and get rid of p_ignore. 2006-10-15 14:33:55 +00:00
ehouse
27d01c55b4 Build with Bluetooth on; add alpha-only text to About dlg; show About
dlg on startup first time; fix null ptr deref bug.
2006-10-15 14:22:32 +00:00
ehouse
4a443563ca remove unused field 2006-10-15 14:20:14 +00:00
ehouse
e0c828a530 fix non-bt compile by ifdef-ing bt-only ui elements 2006-10-15 14:05:23 +00:00
ehouse
c16595a34c remove duplicate #definition 2006-10-15 13:54:31 +00:00
ehouse
ddecfad8d1 get rid of extra log statement 2006-10-11 02:02:53 +00:00
ehouse
06f8eedba8 better message when relay disabled 2006-10-11 02:02:09 +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
e63ad30e52 Add a bit more logging; do a better job of changing roles. Now can switch
roles with a new game and communication starts without a restart of the
app.
2006-10-07 03:40:29 +00:00
ehouse
4fda93c34d Raise status char a bit. 2006-10-07 03:38:36 +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
a7e58126ed Add more consts. 2006-09-24 15:28:15 +00:00
ehouse
a88d079029 Add debug menu and in response dump bt state to stream for display.
Track sends and receives.  Add listening state for master, and don't
reset its acl when slave goes away.
2006-09-23 22:58:33 +00:00
ehouse
aee519e453 Don't use service records; don't reset connection state as part of
reset for new game; handle case where callback happens inside of
BtLibLinkDisconnect call.
2006-09-23 15:24:30 +00:00
ehouse
9ec9acdc8e "IR" -> "Beaming" 2006-09-23 15:19:29 +00:00
ehouse
c20232085a Tweaks toward a dual ARM/68K binary where only 68K supports bluetooth.
Don't try to not show the BT option for connecting, but in the case
where it's not actually supported say so in the dialog.
2006-09-18 04:40:27 +00:00
ehouse
488a2b1bac Remove dependency on non-existant file: should not have been checked in. 2006-09-17 13:33:45 +00:00
ehouse
f0f89aa26e remove dead code using IR libs directly (no exchange mgr); rename
#define to be consistent with same for bluetooth.
2006-09-17 06:16:05 +00:00
ehouse
66def86757 remove dead code using IR libs directly (no exchange mgr); rename
#define to be consistent with same for bluetooth.
2006-09-17 06:15:37 +00:00
ehouse
9068ba441c What I mean to check in... 2006-09-17 05:04:32 +00:00
ehouse
9c23a2d1fe Punt on problem of svn version in about box changing: comment in
makefile, and make it the last string.
2006-09-17 05:03:59 +00:00
ehouse
a7d45aca6c Prune excessive logging 2006-09-17 04:45:19 +00:00
ehouse
00a45e0e77 fix ARM build so DEBUG setting is passed to compiler, and code so it
compiles that way.
2006-09-16 22:09:28 +00:00
ehouse
abd82e6e2f pass debug -D options to .rcp files to to include debug menus 2006-09-16 16:08:33 +00:00
ehouse
ea2e1c3f0f revert change 1593: FEATURE_HIGHRES is no longer defined. This brings
highres icons back.
2006-09-16 15:53:14 +00:00
ehouse
6c3ae78f81 strutils macro change 2006-09-15 07:43:21 +00:00
ehouse
e17a442964 strutils macro change; tweak so compiles non-DEBUG and without Bluetooth 2006-09-15 07:42:10 +00:00
ehouse
d06daad4f0 Names change only: it's actions, not events, that are postponed. 2006-09-14 01:57:40 +00:00
ehouse
2c0283ee31 Remove dead code 2006-09-14 01:48:22 +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
4f2468c61e New addr param to checkAndDeliver so address can be passed back to
comms.
2006-09-14 01:41:37 +00:00
ehouse
3b98337eec Better handling of disconnect and reconnect; esp. slave will keep
trying to connect after losing contact with server.  With this
checkin, a game between palm and linux can be interrupted by either or
both and restarted, with either in either role.  Haven't tested
palm-on-palm yet.  App stop speed is much better now too.
2006-09-14 01:38:09 +00:00
ehouse
66d900b1fa Add debug-only menus to toggle logging to file and memopad 2006-09-14 01:34:22 +00:00
ehouse
13aabdd2e7 Don't typedef array; make array field of struct. 2006-09-14 01:31:13 +00:00
ehouse
c068126c56 tweaks to re/connect logic; process incoming data from main event loop
and enqueue more than one at a time; wipe existing queue when reinited.
2006-09-10 18:34:57 +00:00
ehouse
f46ae953e8 Lots of changes aimed at allowing to quit and restart in the middle of
a BT game: track states so can shutdown cleanly; transition from
master to slave; mechanism to defer work from callbacks to the main
loop.  Can now quit and restart as guest against host on linux.  Have
not tested between two Treos.
2006-09-08 07:06:21 +00:00
ehouse
67b1c7c45a init address field with current bt_adddr 2006-09-08 07:02:16 +00:00
ehouse
e471250e1e cleanup: add missing consts. 2006-09-08 06:43:59 +00:00
ehouse
f73836a0ce add ability to log to non-Memo db (to be read off device). 2006-09-08 06:39:35 +00:00
ehouse
fbe6da0ecd add __FUNCTION__ to assert macro 2006-09-01 04:39:56 +00:00
ehouse
29c8b461b8 hardcode psm (for now), and remove spd lookup stuff. Was needed to
connect to linux server which doesn't add spd records yet.
2006-08-29 13:23:00 +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
62dd1091ca Fix compile errors due to missing UNUSED macros 2006-08-17 01:31:49 +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
fbd3716fc3 tweak button location 2006-07-28 08:04:00 +00:00
ehouse
eacc930c31 fix change between Local players/Total players when device role changes in newgame dlg 2006-07-28 08:03:33 +00:00
ehouse
3b11f5ac1f better compile-command in header 2006-07-28 07:53:18 +00:00