Commit graph

1562 commits

Author SHA1 Message Date
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
84a0409103 Attempt to listen for connections on a separate thread so connected
game could disconnect and reconnect, but still need work on adding a
socket to the main thread's io queue from a different thread.
2006-09-08 07:23:19 +00:00
ehouse
975226cc4e remove param from util_addrChange; add comms_getIsServer; save bt_addr
as part of comms.
2006-09-08 07:14:24 +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
41a36b2352 make formal params const where possible 2006-09-02 05:30:51 +00:00
ehouse
4322fd2820 when logging state transitions, don't unless there's a change 2006-09-02 05:29:59 +00:00
ehouse
4cfe07923d fix bug checking crosschecks with more than 32 tiles. 2006-09-02 05:29:13 +00:00
ehouse
fbe6da0ecd add __FUNCTION__ to assert macro 2006-09-01 04:39:56 +00:00
ehouse
9c06582029 bug fix: reset stack data stream before getting length and writing. Assert
so easier to catch similar problems.
2006-09-01 04:32:57 +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
334ea9a546 Make linux client work as host. Currently accepts only one connection
and blocks in accept.  Need threads and a piconet.
2006-08-29 13:20:09 +00:00
ehouse
af7767389c use stream_getSize to detect corrupt (truncated) messages. 2006-08-29 13:18:12 +00:00
ehouse
9d541a7d91 make getSize return diff between what's been written and what's already
been read.
2006-08-29 13:13:43 +00:00
ehouse
a605fd4d49 Start adding bt support to linux port. Required removing assumptions
that all connectivity was with relay and over streaming sockets (since
BT is using l2cap's datagram-style sockets.)  With this checkin, a full
robot-vs-robot game is possible with palm as host and linux as client.
Linux as host isn't started yet.
2006-08-26 21:15:20 +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
9d8e5a4f3e add LOG_HEX 2006-08-26 20:28:48 +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
b99f993760 Fix assert: implicit cast to boolean doesn't work when bit being
tested is outside the low-order byte.
2006-08-22 04:20:40 +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
9c1b48d0e4 include svn version in name of generated .exe file. 2006-08-16 01:30:31 +00:00
ehouse
f8e4579116 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
ehouse
584e016083 script for averaging results of running 'time' multiple times. 2006-08-12 02:01:57 +00:00
ehouse
c298ecb1f1 optimize for the case where tiles are < 32. Previous imlementation of
64-tiles support increases engine times by ~5%.  This removes that effect.
I can't measure any slowdown vs. pre-change engines.
2006-08-12 01:59:03 +00:00
ehouse
b6de222fb5 Change LANG to XWLANG to avoid conflict with ENV variable. 2006-08-11 01:44:08 +00:00
ehouse
cfb5e57d07 fix broken ce build: remove ifdefs. 2006-08-11 01:33:19 +00:00
ehouse
cbddf0c194 Base the number of bytes used to store tiles on the number in the
current dictionary.  This allows us to continue to open games saved
with older code using older dictionaries while still supporting the
new format for up to 64 tiles.  Old versions may crash when opening
games created by new versions, but that's probably ok.
2006-08-10 01:21:31 +00:00
ehouse
e84cb5b8eb increase possible number of unique tiles from 32 to 64 in order to
support Slovak which has 40.  This change is preliminary: it seems to
work for both existing and dicts with >32 chars, but it breaks backwards
compatibility: existing saved games will crash this code.  I think the
fix is to deduce the number of bits per tile from the number in the
dictionary being used, but that's not in yet.
2006-08-09 04:56:34 +00:00
ehouse
7850b9e064 add another const 2006-08-09 04:52:43 +00:00
ehouse
897e50bf42 was being just a bit too cute 2006-08-09 04:49:17 +00:00
ehouse
7c61b21365 make some ptrs const 2006-08-09 04:48:34 +00:00
ehouse
3025df4646 ignore the usual files 2006-07-29 21:45:43 +00:00
ehouse
bb5bf58297 hide the rest of the files 2006-07-29 21:39:46 +00:00
ehouse
b1e50662ec hide dict files -- playing with svn:ignore 2006-07-29 21:36:24 +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
ehouse
b07854961e turn on flip menu for PPC build too 2006-07-28 07:52:40 +00:00
ehouse
468a8626bf cleanup: remove overly verbose logging 2006-07-28 07:51:49 +00:00
ehouse
0d57c2c8b2 Cleanup prior to adding Swedish to BYOD. 2006-07-22 16:05:45 +00:00
ehouse
24a124dd94 get symbian compiling. Untested. 2006-07-22 16:04:39 +00:00
ehouse
c0a5ce4401 check for remaining memory being < 0, not just <=, since we allocate exactly as much as we need. Fixes failure due to being out of memory at same time as having finished parsing stdin. 2006-07-22 16:03:14 +00:00
ehouse
d35f5100ab Compensate for OS' failure to deliver penup events by checking for
pendownness at critical points when an up event should have been
processed: when another pen down happens, when about to scroll, and
when events (menus and buttons) occur.  This seems to catch all the
lingering miniwindow problems. Add flip menuitem (win32 only for now).
2006-07-07 08:39:31 +00:00
ehouse
49a709f3db Replace a bunch of doMirror parameters with a single function, called
after a flip, that invalidates y,x for every x,y that's invalid.
2006-07-07 08:27:13 +00:00
ehouse
74e97d0bb9 remove rc3 from version: ready to ship 2006-07-05 00:16:18 +00:00
ehouse
8e1291a4e6 round up when determining top coord of letter in cell. Fixes "Q"
getting drawn higher than other ascii chars, and does not break even
taller chars in Danish or Portuguese.
2006-07-04 00:16:08 +00:00
ehouse
83d8d8b9e8 Exclude high-res bitmaps from lowres build 2006-07-03 23:45:18 +00:00