Commit graph

225 commits

Author SHA1 Message Date
eehouse
24c1527232 fix yOffsetChanged to follow new API, but still leave commented out;
set game file name from resource, and make visible in board title and
as part of games list entries.
2010-05-12 11:56:01 +00:00
eehouse
4da3edabbb draw_scoreBegin now returns a boolean 2010-05-12 11:51:55 +00:00
eehouse
671461f4d4 extend getSummary() to include array of current scores; add util to set an object
field and remove dead code
2010-05-05 04:11:08 +00:00
eehouse
d143c47aa1 fill new GameSummary fields 2010-05-01 02:49:08 +00:00
eehouse
e9f1bbd37d param name change 2010-05-01 02:47:47 +00:00
eehouse
9d94f557e1 remove vertScrollBoard from java and stub it out in jni since
preformance is just as good without it.
2010-04-25 18:13:29 +00:00
eehouse
0ffc5c326f don't pass bitmaps into java draw code since they're no longer used. 2010-04-23 08:37:27 +00:00
eehouse
5d31c18658 copy dict name into dict struct so e.g. Counts and Values works 2010-04-23 08:36:20 +00:00
eehouse
8067e82332 pass dict name into jni along with its bytes 2010-04-23 08:35:38 +00:00
eehouse
c2c463171c fix dict_splitFaces to work for utf8 -- by calling into existing java
code.  Fixes multi-device play with Catalan dict.
2010-04-22 04:56:48 +00:00
eehouse
94d3f7483c Since we're not using bitmaps any more remove the code to parse and
convert them.
2010-04-22 04:56:14 +00:00
eehouse
fbe46c1284 pass boolean isUTF8 in from jni, and if false create InputStreamReader
to decode ISO8859_1 rather than utf-8.  Fixes problem with Ñ in old
Spanish dicts.  Should fix all pre-utf8-format dicts, actually.
2010-04-20 02:38:42 +00:00
eehouse
d1e8b95843 add assert that would have helped 2010-04-17 04:15:20 +00:00
eehouse
d66e74a301 turn off logging for release 2010-04-15 03:35:33 +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
477899e6aa add debug-only source file 2010-04-13 03:22:08 +00:00
eehouse
0d7b074b72 minimal changes to get zoomin/out working, which they do. But board
coords are off and probably other fixup is needed.
2010-04-08 04:16:16 +00:00
eehouse
6bd818a10f set drag threshold to 1; 3 is just wrong on android 2010-04-08 04:13:59 +00:00
eehouse
812262e41d add basic framework to collect metadata prior to saving open game
(e.g. number of moves) and display it in game list.  What to save and
how to display it still not finalized but it works.
2010-04-08 04:09:50 +00:00
eehouse
b07808e8db add copyright notice; turn logging back on for jni code 2010-03-28 23:38:53 +00:00
eehouse
4de143ca10 turn off logging for release 2010-03-28 16:09:55 +00:00
eehouse
f430a84d75 add comms_transportFailed, and call when relay goes down. This makes
icon change correctly and comms start trying to reconnect, but the
loop in CommsTransport can't be restarted yet.
2010-03-25 04:51:55 +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
a5c3fa5f59 don't pass empty stream to comms_send: this fixes a problem where
client code calls server_initClientConnection when the game's already
been started and empty messages get queued up.  Ideally the call
wouldn't happen but I'm not sure how to test if a game's begun.
server's doing the right thing not putting anything in the message.
2010-03-21 03:10:56 +00:00
eehouse
5806aa0aca get rid of excess logging 2010-03-21 03:10:47 +00:00
eehouse
b6aaf6c38c in debug builds track who sets env so we can log who has it on
conflict rather than just assert.
2010-03-21 03:10:10 +00:00
eehouse
5f6c8fd579 support passwords: save 'em when configuring player, and implement
askPassword in jni and java code.
2010-03-21 03:09:47 +00:00
eehouse
4633bc506b turn logging back on 2010-03-21 03:09:23 +00:00
eehouse
e2ad027740 ready for next release: remove Hex dict and turn off logging 2010-03-14 16:32:54 +00:00
eehouse
ef15f50edf add model_getNMoves 2010-03-13 23:09:53 +00:00
eehouse
e73c6d1234 pass relayStatus an enum rather than an int 2010-03-08 06:15:37 +00:00
eehouse
08d5139631 translate blank text from '_' to '?' 2010-03-08 06:11:30 +00:00
eehouse
0a34c2512c turn logging back on 2010-03-08 06:08:46 +00:00
eehouse
bc3f6c2c30 turn off debugging for release 2010-02-28 18:19:47 +00:00
eehouse
cb6b19f0aa implement board_getFocusOwner, board_focusChanged and board_handleKey,
and utils needed.
2010-02-27 18:05:39 +00:00
eehouse
397d0df573 turn on PERIMETER_FOCUS 2010-02-27 18:05:29 +00:00
eehouse
7d0bd9d50c implement mini window, jni and java rendering. Works on emulator, but
may not work as well under fat fingers....
2010-02-27 18:04:33 +00:00
eehouse
cf9c952fc2 handle final scores menuitem: add server_endGame to jni and new
dialog/mechanism to call back and forth between threads to query and
end game on positive response.
2010-02-27 18:03:07 +00:00
eehouse
210332ec93 implement and call comms_resendAll 2010-02-24 04:30:13 +00:00
eehouse
8de2665642 implement phonies: add jni->java for util_warnIllegalWord, jni changes
to preserve the field in CurGameInfo, and java changes to keep
correct text in reused dialogs.
2010-02-24 04:29:46 +00:00
eehouse
414ee944af turn logging back on 2010-02-24 04:28:44 +00:00
eehouse
071edd8121 turn logging off for release 2010-02-21 22:02:55 +00:00
eehouse
de58f33b4c add game time to board and jni; clean up hide/show on check events. 2010-02-18 04:44:30 +00:00
eehouse
74140ccaad remove duplicated code 2010-02-18 04:42:22 +00:00
eehouse
1e253c0210 turn logging back on 2010-02-17 14:38:11 +00:00
eehouse
cd0afbfae8 Create and pass enum into relayErrorProc 2010-02-17 14:37:53 +00:00
eehouse
135d936a7d Fix warnings that appear when logging off. 2010-02-15 02:54:10 +00:00
eehouse
928f65a266 turn off logging for release 2010-02-15 02:49:16 +00:00
eehouse
919c7be9d6 set gameID when saving CurGameInfo from java IFF it isn't already set. 2010-02-14 22:01:06 +00:00
eehouse
84ebc38882 copy gameID as part of CurGameInfo 2010-02-14 17:38:40 +00:00
eehouse
10cf2894b8 Don't assert comms type not NONE when copying 2010-02-14 17:37:56 +00:00
eehouse
885c9093fb Put up Toast messages on connecting to relay. 2010-02-14 17:23:07 +00:00
eehouse
32acc38100 default host should be eehouse.org for on-device use 2010-02-14 17:14:41 +00:00
eehouse
c6b28e9416 turned on -Wall and fixed errors/warnings it reported 2010-02-12 07:13:42 +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
cd63cf1424 Deal with SMS and BT-type address recs. 2010-02-09 14:26:43 +00:00
eehouse
1f7e6db585 guard against double-dispose; add unique-to-android game_hasComms() 2010-02-09 14:25:52 +00:00
eehouse
1ee94f23aa factor out and_dictionary_make_empty 2010-02-09 14:22:59 +00:00
eehouse
f7c8a2f384 Work when initialized with a null instance of DrawCtxt. (All calls
into java world come from java so no guard against that needed.)
2010-02-09 14:21:58 +00:00
eehouse
cd89ede3c5 Work (but don't call into java world) when initialized with a null
instance of CommsTransport.
2010-02-09 14:20:16 +00:00
eehouse
67cb2421c9 Work (but don't call into java world) when initialized with a null
instance of UtilCtxt; implement util_makeEmptyDict().
2010-02-09 14:19:20 +00:00
eehouse
338a39e8b4 turn asserts/logging back on; make with -j3 2010-02-06 19:30:59 +00:00
eehouse
fb65fecebb When CommonPrefs field is changed mid-game, reflect it immediately.
Means adding board_prefsChanged() to jni and having Utils class call
it via JNIThread when prefs change.
2010-02-01 15:06:12 +00:00
eehouse
87eae92006 turn off debugging for a release 2010-01-31 22:10:10 +00:00
eehouse
9f250c99ef get rid of gameID param. This change breaks all other platforms... 2010-01-31 21:35:07 +00:00
eehouse
b0e88eff83 implement util_makeStreamFromAddr() and (android-only)
game_receiveMessage(), the latter combining
comms_checkIncomingStream() and server_receiveMessage() which are
always used together and require a stream be passed between which
currently can't happen across jni.
2010-01-31 21:17:21 +00:00
eehouse
69cbff63f6 Hardcode ip address of emulator's host rather than eehouse.org for
easier debugging.  Needs to be in a preference....
2010-01-31 21:14:49 +00:00
eehouse
49402ed218 Get comms info (host name, etc.) from user and pass it through to the
send proc.  Along the way, write jni code to instantiate a new object
including setting enums.  *Now* I'm ready for networking....
2010-01-30 20:06:06 +00:00
eehouse
7b0f100f27 wire in enough comms that java's send proc gets called when device is
a guest.  Networking's next....
2010-01-30 14:38:44 +00:00
eehouse
4b9fa4d42a new "class" wraps TransportProcs 2010-01-30 14:33:28 +00:00
eehouse
333c5fc040 add makeByteArray() 2010-01-30 14:32:20 +00:00
eehouse
ee2fe9d193 get/set enums from C; preserve device role setting from ui to saved
game.
2010-01-30 13:44:12 +00:00
eehouse
c2e1e916b8 relay feature and logging on 2010-01-30 13:43:21 +00:00
eehouse
6dfac28b13 rearrange to work with newer version of ndk and sdk just installed 2010-01-30 03:18:01 +00:00