Andy2
2ee9031fdc
langcode belongs in connect, not reconnect, message
2010-09-10 01:56:58 -07:00
Andy2
20312144dd
tons of changes, still rough, snapshoted here: a gtk device vs device
...
game works to completion with both signing up as guests (no -s) with
one local and one remote player (identical commandlines.) Not yet
tested: if any signs up as a host, reconnecting rather than
connecting, etc. This is just a snapshot.
2010-09-10 01:30:40 -07:00
Andy2
01fe388f85
remove logging accidentally checked in
2010-09-03 06:40:17 -07:00
Andy2
b742c7dbb7
add new booleans to relay address record around public rooms
2010-09-03 06:38:46 -07:00
Andy2
0b91e9634e
save/restore new dictLang field; up stream version
2010-09-01 06:51:44 -07:00
eehouse@eehouse.org
ecd0280353
Merge branch 'android_branch' into relay_proxy
2010-08-26 18:36:55 -07:00
Andy2
d1f6057987
fix stupid typo that meant crosshairs started on top row was only
...
three cols wide at first.
2010-08-26 18:20:24 -07:00
Andy2
4208c33ecf
make lang code support non-conditional
2010-08-25 06:31:38 -07:00
Andy2
3dba8ba13b
Fix bug reported by user: if robot finishes a search but fails to find
...
a move it's still done with its turn and must trade or pass.
2010-08-24 18:38:12 -07:00
Andy2
a34ccb424f
device now passes list of "relayID"s, consisting of connName plus
...
device id, to relay, one for each stored game that's communicating via
the relay. Relay parses out each relayID. Next relay can use these
to look up whether messages are available and reply with that, and
device can put up a notification.
2010-08-22 12:16:57 -07:00
Andy2
09bc83429e
add and set new flags for crosshairs so platforms can do better than
...
fill cells as is done for focus.
2010-08-11 18:50:16 -07:00
Andy2
205723e03b
add missing event to logging
2010-07-30 17:44:20 -07:00
Andy2
d67e421541
get rid of excess logging
2010-07-27 21:36:14 -07:00
Andy2
5b3e41f4e9
fix bug: allow switch *to* player whose turn it is even if allowPeek
...
is off (typically because it was turned off after game was loaded and
while non-turn player's tiles are visible)
2010-07-17 07:11:46 -07:00
Andy2
639feb8965
nuke extra line -- change I forgot to save
2010-07-17 06:23:14 -07:00
Andy2
5b8cf716b3
add pref controlling whether can switch to look at tray of user whose
...
turn it isn't
2010-07-17 06:21:24 -07:00
Andy2
dbed23e240
change definition of movement during drag to include not just drag of
...
a tile but motion on the board which will include crosshairs. This
prevents miniwindow from coming up and stopping crosshairs movement
when it happened to start on a bonus square.
2010-07-16 18:57:08 -07:00
Andy2
a99e8142b0
Merge branch 'android_branch' into toolbar
...
Conflicts:
xwords4/android/XWords4/jni/Android.mk
xwords4/android/XWords4/jni/xwjni.c
xwords4/android/XWords4/res/values/strings.xml
xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java
xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/XwJNI.java
2010-07-16 06:32:32 -07:00
Andy2
a76cdac0c5
don't put up mini window when have penned-down on a draggable tile.
2010-07-13 06:26:55 -07:00
Andy2
21d705c6e7
make wrap code for popping tile up above cursor hotspot (or finger)
...
conditionally compiled. I probably want it off on Android now that I
have crosshairs.
2010-07-12 19:11:24 -07:00
Andy2
0957c95c8e
write and read dummy values to/from stream when KEYBOARD_NAV isn't
...
defined so that the versions are compatible. This will let existing
saved games be read if I turn this off on Android.
2010-07-12 18:49:36 -07:00
Andy2
de32e514ab
cherry-pick three revisions from toolbar branch ( d1c7d4097c
, f848473c1a
and 6484a2fb9b
) and manually fix conflicts.
2010-07-12 18:48:03 -07:00
Andy2
fd9464b909
first cut at crosshairs: drawing in focus color the entire column and
...
row that's currently being touched/dragged through. Meant to aid
users of capacitive touch screens in figuring out what cell they're
on.
2010-07-12 06:39:46 -07:00
Andy2
8172e38cef
write and read dummy values to/from stream when KEYBOARD_NAV isn't
...
defined so that the versions are compatible. This will let existing
saved games be read if I turn this off on Android.
2010-07-09 18:21:05 -07:00
Andy2
6b9b97231a
fix to compile with KEYBOARD_NAV undefined
2010-07-09 06:49:32 -07:00
Andy2
40323b03d2
board_canFlip -> board_visTileCount
2010-07-08 06:38:51 -07:00
Andy2
ac6dc400ce
add board_canHint
2010-07-07 18:47:02 -07:00
Andy2
c98451c62a
remove excess logging
2010-07-07 06:50:47 -07:00
Andy2
a7c77785f6
return false if no move found -- to really fix the crash
2010-07-07 06:40:34 -07:00
Andy2
5725f36db8
detect when no moves found that meet criteria to fix (I think) crash
...
when iterating from highest to lowest move using prevMove.
2010-07-07 06:33:01 -07:00
Andy2
992f45e1bf
new feature: previous move. Modify engine to traverse the set of all
...
possible moves in either order both within a cached subset and when
building cached subsets. Still a bit buggy (shows the same move twice
when moving backwards and reaches the top-scoring move) and not well
tested.
2010-07-07 05:27:57 -07:00
Andy2
5f92491ca3
add and implement board_canTogglePending
2010-07-03 11:38:37 -07:00
Andy2
d44b9907cf
save redoable pending tiles -- and up stream version since format's
...
changed
2010-07-03 11:25:01 -07:00
Andy2
57e246da3b
handle blanks as well in redo of undone pending tiles
2010-07-02 22:44:50 -07:00
Andy2
f77cf0e23d
add board_redoReplacedTiles and model_redoPendingTiles. The latter
...
works as long as no blanks are involved. And new state isn't being
saved so will be lost unless format changed.
2010-07-02 18:52:55 -07:00
Andy2
491cfe7616
add board_canShuffle and implement
2010-07-01 18:55:49 -07:00
Andy2
43c34aa466
add board_canFlip and model_canFlip -- which seem to work though
...
there's no test that when a single tile is on the board it's not in
the middle. Sue me.
2010-06-30 20:25:34 -07:00
Andy2
953b2bcc55
cleanup; allow setting NUM_SAVED_ENGINE_MOVES per-platform
2010-06-28 21:08:13 -07:00
Andy2
0c852981e7
make zoomBy param passed to board_zoom give distance rather than just
...
direction.
2010-06-27 13:12:30 -07:00
Andy2
80aa22b2d1
add common prefs field sortNewTiles and way to set on linux cmdline
2010-06-17 18:10:32 -07:00
Andy2
e0dd3701a0
Add model_sortTiles(); use it; fix some comments and const decls.
...
Sorting always happens now when tiles added; needs to be based on a
preference.
2010-06-17 06:43:16 -07:00
Eric House
34ecac303a
make optional and then turn off feature whereby tap in empty part of
...
tray undoes current move. It's too easy to hit this on a capacitive
display.
2010-06-06 13:32:12 -07:00
eehouse
f514717428
Change board_zoom to indicate direction only of zoom, not number of
...
cols. When figuring internal dimensions zoom out as needed to meet
maxSize value. This fixes problem where rotating a zoomed portrait
board to landscape leaves cells bigger than they can be made by
zooming, but then the desired zoom has been changed and stored and so
on return to portrait cells are smaller/less zoomed. Need to see if I
can live with that.
2010-06-05 03:40:23 +00:00
eehouse
ea6166f8c7
add comms_resetSame that resets relay with existing params.
2010-06-05 03:39:16 +00:00
eehouse
a80d874e9d
change api for board_zoom and change callers. No effect on java and
...
no behavior change.
2010-06-05 03:39:06 +00:00
eehouse
9af9df884b
use same logic to decide to zoom and to report whether can zoom next
...
time. Fixes bug preventing + button from greying out when fully
zoomed in.
2010-06-05 03:38:49 +00:00
eehouse
1f246d20a3
oops. Fix assertion by not stopping dragging unless it's been
...
started.
2010-06-04 03:47:56 +00:00
eehouse
57013a9267
stop dragging before putting up miniwindow. This allows to drag
...
finger off of bonus hint just displayed without scrolling the screen.
2010-06-04 03:47:46 +00:00
eehouse
628f8d9cf3
don't zoom in if doing so will make cells larger than the limit passed
...
in.
2010-06-03 04:57:11 +00:00
eehouse
4f16eee1b6
pass maxCellSize into board_setPos, and use it as limit in calculating
...
whether any further zooming is possible.
2010-06-02 04:58:32 +00:00
eehouse
f5ac51ae73
fix crash using older dict by using current stream version rather than
...
one from before gameSeconds was being preserved in the stream by
write_gi code. I fixed this on a branch a week ago as well, so look
for a merge glitch. Need now to confirm that I'm sending char lists
in initial connect message in the right (null-separated utf8) format.
2010-05-28 02:31:13 +00:00
eehouse
4ce0a30b2d
save gameSeconds even if timer not enabled. Means stream version change.
2010-05-14 12:42:53 +00:00
eehouse
c79b3e2395
make draw_scoreBegin return a boolean like the other two draw_*Begin
...
methods
2010-05-12 11:51:14 +00:00
ehouse
71110a195d
for some reason on wince coords are passed to coordToCell() that are
...
above/left of the board firing an assertion. return false to indicate
not on board but don't assert.
2010-04-24 03:51:39 +00:00
eehouse
166c1ac779
make coordToCell() more inclusive to match pointOnSomething(), otherwise
...
the latter says a point is on the board and the former can't assign it
a row.
2010-04-23 09:35:15 +00:00
eehouse
a07cdd8513
limit depth of zoom further
2010-04-17 04:16:17 +00:00
eehouse
da2cfa5934
changes (commited earlier but now somehow missing) putting
...
scroll-related fields into a struct so vertical and horizontal can be
handled by the same code; add to board_zoom out params indicating
whether further zooming is possible.
2010-04-15 02:15:50 +00:00
eehouse
339fc5a9e6
don't zoom down below two cells so we can still drag-scroll
2010-04-08 04:15:33 +00:00
eehouse
41b29c9ba3
distribute extra pixels evenly, with extras one each at the beginning
...
of the arrays.
2010-04-08 04:15:25 +00:00
eehouse
d01a30d1be
adjust yOffset same as x so we zoom in toward center; reduce xOffset
...
when zoom out makes it too big.
2010-04-08 04:15:16 +00:00
eehouse
a87ecf5638
pass vScale and hScale into draw_boardBegin so platform can use same
...
size font for all cells regardless of size; fix scrolling to pass
actual sum of the disappearing rows' heights.
2010-04-08 04:14:55 +00:00
eehouse
5922d8c96a
fix coordToCell to return false when cell off board -- to fix bug
...
where blank tiles were drawn on top of tray area when scrolled down
there.
2010-04-08 04:14:42 +00:00
eehouse
774d3f8a13
copyright change
2010-04-08 04:14:34 +00:00
eehouse
b1ed0200cc
stretch rows to fill space given by platform: they don't have to be square.
2010-04-08 04:14:22 +00:00
eehouse
d263b47a56
lots of changes, still rough, to allow zooming in and out on board.
...
Includes ability to scroll horizontally by dragging. Board init API
changes to specify board width and max height instead of cell
dimensions, so now board owns task of picking cell size. If the
number of cells does not evenly divide into a board dimension then the
extra pixels are distributed among some columns/rows in a way that
still allows bitblit-based scroll implementations (though horizontal
scrolling at this point always does an invalAll()). Not yet tested
with overlapping tray. And still need to allow rows to be taller than
cols are wide if platform code has given the space. Stream format
changes with this checkin.
2010-04-08 04:14:14 +00:00
eehouse
9b955ae770
resendAll on REconnect as well as connect since it doesn't otherwise
...
seem to get done.
2010-03-28 16:09:34 +00:00
eehouse
55abf1116b
get relay port from prefs and pass into jni
2010-03-25 04:50:19 +00:00
eehouse
786541e9ae
pass default hostname in from platform code rather than compiling it
...
into jni; in java pull it from preferences and pass into jni.
2010-03-21 03:12:58 +00:00
eehouse
05f7da8c33
ignore more
2010-03-14 16:25:27 +00:00
eehouse
ef15f50edf
add model_getNMoves
2010-03-13 23:09:53 +00:00
eehouse
47387990e9
represent mid-drag tiles on the board as pending -- usually drawn
...
inverted by platforms -- since that's how they'll look once they drop.
Inverted color is easier to follow too.
2010-03-08 06:12:01 +00:00
eehouse
3b94642e3d
don't consider specials that are blanks to be bitmap-backed tiles.
...
This prevents the board from passing an array of empty bitmaps into
draw code which in turn allows platform code to be less defensive.
2010-03-08 06:11:42 +00:00
eehouse
ec24df8546
include any mid-drag tile, if it's a blank, in the set of blank tiles
...
rendered in the second pass. Mid-drag tiles were not being rendered
if they happened to be blanks.
2010-03-08 06:10:37 +00:00
eehouse
b6a151a7e8
don't adjust y upward if divider's being dragged -- should be tiles
...
only. Fixes bug where divider can't be dragged unless grabbed low or
started quickly.
2010-02-27 18:04:40 +00:00
eehouse
6d1c09e756
fix compile errors introduced by addition of const
2010-02-27 18:03:22 +00:00
eehouse
b52c9f0d14
Fixes bug found by alpha tester by dragging third tile to left of
...
divider. Inval all tiles when a drag ends off any managed space. We
don't know what tiles have already been moved, and when it's returned
to its initial spot may appear a dup.
2010-02-27 18:03:15 +00:00
eehouse
eb3d0308e0
add const
2010-02-24 04:34:22 +00:00
eehouse
8b84bdf56e
Once user has rejected a bad word, don't ask about any later ones as
...
the whole turn's being rejected. Should be merged to trunk.
2010-02-24 04:29:00 +00:00
eehouse
ae63c16473
add some .gitignore files
2010-02-24 04:28:34 +00:00
eehouse
c6b28e9416
turned on -Wall and fixed errors/warnings it reported
2010-02-12 07:13:42 +00:00
eehouse
587159f5d7
fix to compile when XWFEATURE_SEARCHLIMIT off. Same as rev 3023 for
...
this file.
2010-02-12 07:12:30 +00:00
eehouse
fc2e87e0c4
drop client connection when in the wrong state rather than asserting.
2010-02-11 13:29:28 +00:00
eehouse
bd611bb6f4
implement dictChanged. And so that utf8 dicts could be opened without
...
their games being drawn (no BoardActivity around) break the two
android-only callbacks out of UtilCtxt and into a new JNIUtils
interface that then requires new handing in C.
2010-02-11 13:27:09 +00:00
eehouse
37646c20f3
accomodate null objects
2010-02-09 14:42:07 +00:00
eehouse
967ba62dff
Fix to compile on Palm (68K): remove parameters removed by r3013 and
...
move slot moved by r2982. Fix -- with gross ifdefs -- warning in
pool.c caused by Palm's random() being the only 16-bit one.
2010-02-01 03:17:46 +00:00
eehouse
9f250c99ef
get rid of gameID param. This change breaks all other platforms...
2010-01-31 21:35:07 +00:00
eehouse
41472c4984
assert have at least one remote player
2010-01-31 21:13:31 +00:00
ehouse
874ef7e571
use top 16 bits of random in picking tiles. Seems to give better
...
results on android; will need to test with other platforms before
merging.
2010-01-26 14:51:00 +00:00
ehouse
4425eaa99e
move showColors into CommonPrefs, removing separate storage in linux
...
and wince and removing setter from board and jni APIs. Palm change
pending.
2010-01-26 04:14:18 +00:00
ehouse
b3dba204c6
fix compile warning
2010-01-26 04:03:21 +00:00
ehouse
1073a98f9f
add dragDropSetAdd which causes mid-drag tiles to be treated as if
...
they're 2/3 their height higher. Meant to work better on touchscreens
where finger would otherwise prevent user from seeing where the drop
will land. Still not tested or tuned on device.
2010-01-25 00:19:54 +00:00
ehouse
08017179c5
fix bogus assertion
2010-01-20 05:52:13 +00:00
ehouse
a7d4d20998
Sanity check yOffset. Fixes problem where a scrolled board in
...
landscape mode is displayed in portrait with the top rows missing
though no scrolling should be needed.
2010-01-15 13:51:29 +00:00
ehouse
3beba51b6f
add jni methods, and modify common code, so a CurGameInfo struct alone
...
can be read from and stored to a game file.
2010-01-15 13:44:29 +00:00
ehouse
3db30a2995
increase bits stored for yOffset to 4 in case whole thing scrolled.
2010-01-07 14:47:01 +00:00
eehouse
c7729ca25c
add a calloc to mempool
2010-01-02 01:42:07 +00:00
eehouse
b5e1e3a2c6
add assert -- unset numPlayers trashed stack
2010-01-02 01:41:12 +00:00
eehouse
a6e6e2b05c
fix stubbed dict support
2010-01-02 01:40:25 +00:00
ehouse
8450c9da2b
New callback called on first connect to relay and on first ALLHERE
...
message so users can see progress. Handle new relay message ALLBACK
meaning "ALLHERE but not for the first time".
2009-12-14 04:03:17 +00:00
ehouse
14b060707f
Report relay connection denials due to misordering out to platform,
...
and refuse to connect again until comms has been reset. This goes
with platform code to put up the new game/conns dialogs on disconnect
errors.
2009-12-04 08:14:03 +00:00
ehouse
7fbd2bed45
Fix to compile when RELAY feature disabled
2009-11-22 18:00:20 +00:00
ehouse
5ab3425377
allow default relay port, like name, to be set at compile time
2009-11-22 16:30:20 +00:00
ehouse
3d6b43f032
fix palm and palm-arm compile problems including using changed APIs.
2009-11-19 02:22:32 +00:00
ehouse
3eadd93aa6
Pass scores and remaining tiles count to draw_scoreBegin so can
...
determine font size based on max length. API change.
2009-11-18 13:24:56 +00:00
ehouse
7966f20829
for REM rect too place innerRect centered in outerRect
2009-11-15 15:45:50 +00:00
ehouse
4025c37604
Make "Room 1" the default room name.
2009-11-09 00:03:43 +00:00
ehouse
f6fb019732
Send to relay if connected, even if not all hosts present. And detect
...
duplicate initial packets a bit better. This change goes with the
next checkin on the relay side: move to modified store-and-forward so
devices can connect at different times once the game is established.
2009-11-08 21:30:13 +00:00
ehouse
a61d01c5ff
add new global preference that allows turning off confirmation dialog
...
after each turn. Meant to fix ID: 2735517 feature request on sf.net.
2009-11-08 17:00:20 +00:00
ehouse
3bdfda6548
Make it possible for multiple games to connect using the same room
...
name. All new connections are stored together, and after each
connection an attempt is made to build one complete game with a host
and however many guests. All remaining devices are moved into a new
pending record in the same state, and the completed game is treated as
always. Seems to work, though nearly 20% of linux instances are
failing to connect the relay run from the new test script samename.sh.
Need to figure out why.
Also added logging of seed and connname to comms.c since games
launched together can no longer be certain to connect on the relay.
This allows the test script to identify joined games from their logs
and detect success or failure.
This checkin changes the relay protocol, so relay and clients will
both need to be upgraded.
2009-11-02 01:01:47 +00:00
ehouse
27c518dec4
When tray's hidden you can't see that you're in trade mode. So try
...
revealing the tray (and so showing the mode) before aborting trade
request due to being in trade mode.
2009-10-25 00:23:00 +00:00
ehouse
85da3d2082
add parens for clarity
2009-10-24 14:50:23 +00:00
ehouse
1fa8b2e48f
remove unused param (not even compiled on Palm); on wince, try to
...
duplicate for timer the vertical offset used for scores.
2009-10-16 03:20:39 +00:00
ehouse
e7f476c13e
format last player whose turn it is, and track remaining space, so
...
platform code can include the name as a turn indicator.
2009-10-15 12:38:47 +00:00
ehouse
dde7cfa9b1
add a const
2009-10-15 12:37:42 +00:00
ehouse
1fba7d7ef6
add a couple of consts
2009-10-01 04:09:46 +00:00
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
0e43675abf
Address problems matching [re]connections to games: first, go back to
...
setting connName when all in a game are present. Second, have every
host include in connections a random number. That number is made part
of the connName and in general used to test whether a host belongs in
a particular game. Add this "seed" to web interface. Means new
versions for relay protocol and game stream format. Latter is handled
correctly so older games can be opened.
2009-09-26 14:37:49 +00:00
ehouse
edde3e2fd5
cleanup
2009-09-26 14:33:52 +00:00
ehouse
881639c230
fix null ptr exception using null engine. Logic error was not exposed
...
earlier because except in multi-device game the UI would not allow you
to ask an engine-less robot player for a hint.
2009-09-25 10:17:35 +00:00
ehouse
ef8c85734e
don't send on disconnect unless connected
2009-09-22 03:50:37 +00:00
ehouse
a13e1d6488
add util_clearTimer, implement on all platforms, and call when closing
...
comms to fix crash on Wince when timer fired after comms had been
deleted. The closure stored and passed in was no longer a valid ptr.
2009-09-21 12:49:08 +00:00
ehouse
a91fd28773
fix some warnings when building linux client without debugging but
...
with warnings as errors.
2009-09-20 21:51:29 +00:00
ehouse
e8b372c274
fix more release build unused var warnings
2009-09-20 21:11:58 +00:00
ehouse
250e223a20
add bqRemoveAll
2009-09-19 21:28:07 +00:00
ehouse
18e9301e87
rename Cookie to Invite, a change that may change. Rename everywhere
...
in clients but not in relay where cookie is too pervasive. (There are
no code changes in this checkin.)
2009-09-14 03:11:11 +00:00
ehouse
6603949b0e
Fix bug where device quitting one game to start another with same
...
cookie winds up connecting to the old game -- by flagging a cref as
full and no longer accepting connections without connNames even when
in the MISSING state. Required a protocol changes so that devices get
their connNames as early as possible.
2009-09-14 01:55:03 +00:00
ehouse
535e97b855
replace array of indices with array of ptrs for faster & smaller code
2009-09-13 05:28:12 +00:00
ehouse
49ac5d10a2
fix lookup of "special" char strings: Spanish and Catalan apparently
...
displayed properly since I merged the unicode changes in.
2009-09-13 04:57:44 +00:00
ehouse
6c4b991566
Modify comms and games APIs so single struct of callbacks is passed
...
instead of multiple callbacks; add callback called when relay state
changes; adapt linux and palm clients to new API. (Wince changes
pending.)
2009-09-12 21:39:13 +00:00
ehouse
86b560c441
fix to compile on palm: accomodate old compiler and new dict struct
...
fields. Network play against relay works!
2009-09-12 15:35:03 +00:00
ehouse
e8825e119c
add comment re: stream format non-change for utf-8
2009-09-05 13:14:42 +00:00
ehouse
615603b66b
Add define set to number of conn types compiled in; use it to compile
...
out conn type choice where there's only one (none to be made). Refuse
to dismiss conns dialog when cookie not chosen.
2009-09-05 13:08:46 +00:00
ehouse
3a1c2572dd
Merge in unicode changes to read in utf-8 dictionary format
2009-09-04 12:30:10 +00:00
ehouse
188eea4646
Try again if fail to connect to relay.
2009-08-30 15:25:13 +00:00
ehouse
6a36c045b6
fix wince compile error
2009-08-29 13:06:48 +00:00
ehouse
dbf9daf71b
Fix problems reconnecting hosts where some but not all received the
...
ALLHERE message and connName: change relay protocol so cookie is
included in RECONNECT message, and hostIDs are not assigned until
ALLHERE, and change host-to-game matching to use connName first but
fall back to cookie. This fixes nearly all cases failing to reconnect
after relay goes down.
2009-08-21 12:00:09 +00:00
ehouse
e746e2bc5b
Fix assertion failures
2009-07-31 13:03:38 +00:00
ehouse
184a154c52
New feature, meant for testing relay, makes robot skip random number
...
of seconds within specified range before making a move. Working only
on gtk so far, and will probably never be used other than on linux
clients.
2009-07-09 12:43:51 +00:00
ehouse
76c0a518f1
change -j to -j3. No code change.
2009-04-14 03:27:32 +00:00
ehouse
9df574b6f6
Fix to compile (and so dicts are read into new internal format) on Palm.
2009-04-07 04:33:47 +00:00
ehouse
669e423ca8
Use new dict API to get rid of XP_UCHAR4 type, replacing with const XP_UCHAR*.
2009-04-07 04:23:56 +00:00
ehouse
7b5259a5c0
Use simpler API (no behavior change; not utf-8 related).
2009-04-05 20:19:29 +00:00
ehouse
641ae18864
Use new dict api to support utf8 faces.
2009-04-05 19:20:22 +00:00
ehouse
9f6114fb9e
don't cast.
2009-04-05 19:18:47 +00:00
ehouse
96cfd7c7dd
New stream version: dict sent over wire has faces as utf8 (unless dict is not.)
2009-04-05 19:16:52 +00:00
ehouse
38a23ba74f
Begin changes for utf8 support (mostly from unicode_branch). Dict now
...
provides tiles as null-terminated const strings ptrs to which can be
passed and stored. They're utf8 strings. Old dicts still work,
platform must convert to utf8 on load.
2009-04-05 19:02:21 +00:00
ehouse
926f5963a3
rename only: stream_putString to stream_catString.
2009-03-29 18:26:59 +00:00
ehouse
d7eaa8e574
Add functions names to log statements.
2009-03-08 19:54:50 +00:00
ehouse
4e1155583f
Add support for a config button as a cleaner alternative to launching
...
comms config dialogs on changes to host type (which often involved
platform-specific hackery to trigger the dialog when user doesn't want
to change role)
2009-03-08 19:54:14 +00:00
ehouse
4909ae0137
Close down relay connection when comms going away. Fixes crashes when
...
new game is standalone and prev used relay. Add logging code in comms.
2009-03-06 13:43:03 +00:00
ehouse
213c66b391
Reset all relay-related variable on new game. Fixes bug where devices
...
couldn't switch roles or join a new game.
2009-02-28 19:27:45 +00:00
ehouse
61c07ba1a3
Make all of a non-server's players local.
2009-02-28 19:25:46 +00:00
ehouse
acb37fda4f
fix checkServerRole which was incorrectly counting players in client
...
case.
2009-02-28 19:25:08 +00:00
ehouse
21d4203fe2
Empty out queue and use existing code to re-add elems we want to keep.
...
Candidate for 4.2.
2009-02-28 16:11:09 +00:00
ehouse
9abb637330
assert queue ok after deleting. Candidate for moving to 4.2 branch if
...
to be used for Palm.
2009-02-28 15:06:12 +00:00
ehouse
233bf5ffde
Fix crasher: removing ACK'd messages left list in inconsistent state.
...
Candidate for moving to 4.2 branch if to be used for Palm.
2009-02-28 14:40:50 +00:00
ehouse
8d1289d3b7
Create type to hold array rather than passing array whose lenght is assumed.
2009-02-23 04:01:15 +00:00
ehouse
fb3d4cf2ba
Draw arrow only if inval bit set and cell is otherwise unoccupied.
...
Fixes wince bug where tile dragged onto arrow disappears. Should be
merged to 4.2 branch.
2009-02-14 16:23:18 +00:00
ehouse
b2acdbae91
Add simple helper for keeping a queue of buffers in a single array.
2009-02-09 02:44:58 +00:00
ehouse
43982e1a07
validate initial message correctly when comms heartbeat not being
...
used; improve logging.
2009-02-07 18:14:28 +00:00
ehouse
42b314966b
If platform doesn't provide a game id, use current seconds.
2009-02-07 18:12:46 +00:00
ehouse
46f72de960
new files into svn:ignore
2009-02-01 16:03:31 +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
ac1a88f603
Add __func__ to what's tracked for allocation in debug builds
2009-01-18 16:37:44 +00:00
ehouse
c754726b0f
Don't pass valid bitmaps ptr when drawing blank tile.
2009-01-17 18:24:18 +00:00
ehouse
21f5f329a0
Get rid of bogus assert
2009-01-14 13:02:38 +00:00
ehouse
5505c435a2
Don't pass new bitmaps struct to draw code uninitialized
2009-01-14 12:51:55 +00:00
ehouse
6d7a81fce6
change draw api so all available bitmaps (only 2 in current format)
...
can be passed for tile and cell drawing
2009-01-13 12:57:56 +00:00
ehouse
abeb5376c0
Implement, with help from glib base64 source, routines to turn binary
...
into SMS-compatible strings and back. This should ensure that the
format is cross-platform.
2009-01-05 02:08:55 +00:00
ehouse
e570d692b5
cleanup. SMS, not BT, is the default conType for other than Palm.
2009-01-05 02:07:30 +00:00
ehouse
c731e0d231
Remove newlines from debug statements.
2009-01-05 01:59:04 +00:00
ehouse
e32e231dd5
New stream version makes standalone and multi-device build formats the
...
same so new Wince can open files saved by current version. Tweaks to
build with relay and heartbeat turned on.
2009-01-03 23:54:25 +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
7e2f2fd38e
invalCellsUnderRect didn't work for rects not intersecting board; fix.
2008-12-16 05:30:25 +00:00
ehouse
13001301ec
Indicate tiles whose values should be hidden with a new bit rather
...
than a negative value.
2008-12-13 07:32:53 +00:00
ehouse
37518415ea
fix occasional crash: null-out ptrs after deleting what they point to.
2008-12-11 13:42:21 +00:00
ehouse
af1ca9af84
Quash some compile-time warnings. snprintf instead of sprintf.
2008-12-06 15:59:30 +00:00
ehouse
d3d3dd561f
Pass string for tile even when it has a bitmap. Let platform decide which to use.
2008-12-04 06:13:59 +00:00
ehouse
7ae7b91e40
When hideTileValues changes, inval all tray tiles.
2008-12-03 13:38:54 +00:00
ehouse
f8870da48f
Don't draw hint rect, or start drag to change it, if hints are disallowed.
2008-12-01 13:06:37 +00:00
ehouse
438be9dd2a
When tray overlaps board yet is hidden, should not be on top except
...
when focussed. Remember state before gained focus, and restore it
when loses.
2008-12-01 13:04:14 +00:00
ehouse
b78a46e110
When tray overlaps board yet is hidden, should not be on top except
...
when focussed. Remember state before gained focus, and restore it
when loses.
2008-12-01 13:03:42 +00:00
ehouse
ce2420840d
a bit of cleanup
2008-11-22 19:43:47 +00:00
ehouse
6e9f5791d6
Fix bug: when using hint limits to restrict first move on empty board
...
limits were ignored for the vertical search. Fix is to make
special-case treatment of first move more integrated so special limits
code isn't needed.
2008-11-22 19:32:42 +00:00
ehouse
542e441b69
hide focus when pen used, but remember where it was (don't set to
...
OBJ_NONE) so can replace it when focus keys used again.
2008-11-22 16:37:29 +00:00
ehouse
46b574b4e7
fix inval of focussed tile to take divider into account.
2008-11-20 05:12:48 +00:00
ehouse
d4bc42b0a1
add getters
2008-11-10 16:01:46 +00:00
ehouse
30df2166ab
Don't assert when unknown key seen; just ignore.
2008-11-08 16:19:04 +00:00
ehouse
5cb97bf636
New Ubuntu has a stricter compiler...
2008-11-06 03:16:09 +00:00
ehouse
93e615b44c
Don't skip over occupied tiles when moving cursor unless alt key is
...
down. Smartphone doesn't have an alt key, and this
simplier-to-understand behavior should be the default.
2008-11-02 03:43:33 +00:00
ehouse
4ff04dac84
When tray's not revealed, cursor should travel over all tiles to be
...
consistent with display of 7 tiles even if some are really on board.
2008-10-31 04:30:58 +00:00
ehouse
77d14163b1
track focus on Rem: region of scoreboard in addition to players' score
...
areas, pass into draw whether to show it highlighted, and fire a util
method when it's clicked on. Intent is that platforms show the
remaining tiles dialog.
2008-10-24 08:56:20 +00:00
ehouse
944789b14c
use three bits for scoreboard cursor in anticipate of making Rem selectable.
2008-10-21 03:19:54 +00:00
ehouse
c48f836fe7
back out 2245: having scrollbar be focusable is a better way of allowing scrolling than overloading cursor movement; scroll cursor onscreen when diving and it is off
2008-10-20 02:23:17 +00:00
ehouse
ac5bbced8f
mark debug-only formals and wrap in #defines to fix compile-time
...
warnings of clean wince build.
2008-10-11 17:58:43 +00:00
ehouse
a26f6ad658
flag unusued param to fix compile error; move code used only in
...
multi-device games inside ifdefs.
2008-10-11 17:30:35 +00:00
ehouse
bbe8cceb6e
debug changes: change defines to remove gremlin-only code; add missing constants.
2008-10-11 16:46:08 +00:00
ehouse
018be047ad
fix bug: need to reset engine when divider moved via keys as well as
...
when dragged.
2008-10-10 08:38:23 +00:00