Commit graph

1005 commits

Author SHA1 Message Date
Eric House
4d5278704e symlink changed! 2017-02-16 19:05:34 -08:00
Eric House
b96d44393a add and use boolToStr
Just to make log messages a bit more helpful. Should be no behavior
change, and no change in code generated in release builds.
2017-01-22 14:15:29 -08:00
Eric House
92029b2443 fix to build with CURSES_ONLY flag 2016-12-22 08:57:54 -08:00
Eric House
55d86d5ca2 don't try drawing snapshot in curses mode
Was crashing on game save. Add to main launchParams struct whether we're
in curses or gtk mode and only save snapshot in latter case.
2016-11-09 07:38:41 -08:00
Eric House
3174705d63 gtk: remove assertion failure creating new games
I think this was related to changing the order in which save operations
happen and that it's no longer valid to insist that there already be a
rowid at this point, but could be wrong....
2016-09-26 08:24:47 -07:00
Eric House
e07686491c gtk: summarize before saving
Fixes problem with list view always being a move behind, since it's
saving not summarizing that was triggering the refresh, but summarizing
that added the data from which refresh/list view drew.
2016-09-20 08:27:17 -07:00
Eric House
5742c5cb12 gtk: save game on every turn change
Idea is to have the games list stay in sync, but in fact it stays one
move behind, at least in a typical standalone human-vs-robot game. So
this is incomplete.
2016-09-19 09:12:23 -07:00
Eric House
7994c42691 allow board cells to be wider than tall
There are some screen dimensions, especially with dual-pane mode, where
the board is just bit narrower than the screen. Rather than have narrow
white borders, allow the cells to take up the slack. The API takes an
upper bound on the ratio of width to height so things shouldn't get too
odd looking.
2016-09-15 20:37:29 -07:00
Eric House
baf825e7db add gtk-3 to set of debs Makefile knows to install 2016-09-13 19:45:29 -07:00
Eric House
b1ce992d23 gtk: don't resize scrollbar
Mistaken option to gtk_box_pack_start() meant the scrollbar got
allocated space along with the board when the container expands, not
what you want with a scrollbar.
2016-09-04 20:46:25 -07:00
Eric House
c4efebad71 gtk: add localTurn column; format date 2016-08-26 07:26:33 -07:00
Eric House
1d1e971120 gtk: add initial size/position for window 2016-08-26 07:21:00 -07:00
Eric House
4c923ead08 add isLocal param to server_getCurrentTurn
I want to store this information separately in summaries tables so
e.g. games can be displayed sorted by whether it's the local player's
turn.
2016-08-26 06:58:55 -07:00
Eric House
457970b2d2 gtk: the tiniest bit of cleanup
Trying and failing to get just the content area of the tree view to
scroll, whether by putting it in its own container or hooking into the
scrollable interface tree view allegedly supports.
2016-08-10 14:53:44 -07:00
Eric House
bf7a38da08 copy more state into board being used for snapshot 2016-08-05 21:19:49 -07:00
Eric House
a275730824 gtk: fix crash when hit rematch button
Not all games have a draw context. Check!
2016-08-05 18:37:35 -07:00
Eric House
012b015f82 gtk: save games list window size and position 2016-08-05 18:31:17 -07:00
Eric House
25723bbb0f put main games window in a scrolling container 2016-08-05 12:02:05 -07:00
Eric House
7f513313b0 fix crash loading new game before snapshot exists 2016-08-05 10:37:42 -07:00
Eric House
0c6283ea63 add board_drawSnapshot
Toward something that should work with android: pass a potentially
unique draw context into new method that creates a new board just for
the draw and makes its scoreboard and tray disappear.
2016-08-05 10:23:39 -07:00
Eric House
3c0a128266 produce, store and display actual snapshot
Done in a way that won't work for Android just to try out the gtk
way. Tweaks and reuses the existing draw context and board, which is
precisely what the android version can't easily do.
2016-08-05 09:42:55 -07:00
Eric House
aeee2d801a toward snapshots in gtk version
Add new "snap" blob to db and pixbuf column to games display table, and
add code to store and retrieve from db. What's stored now is a
hard-coded file, so next up is generating an actual snapshot from the
game.
2016-08-05 08:29:25 -07:00
Eric House
b4393d5965 fix cursor-hiliting of player in scoreboard 2016-08-04 16:13:54 -07:00
Eric House
df6c1e0d3a make beginDraw return a boolean so can abort
When a gtk3 window's shutting down it appears we can't get a cairo_t*
for it. This change makes it possible to turn that fact into aborting
the whole draw operation.
2016-08-04 15:12:05 -07:00
Eric House
3c7af0023e fix curses drawtable fallback 2016-08-04 14:16:52 -07:00
Eric House
80f894b869 fix remaining gtk dialogs 2016-08-04 12:43:33 -07:00
Eric House
66e26c1489 hook up draw signal
Whenver we get the draw signal, invalidate the whole board and draw
it. This is resulting in a lot of wasted effort that might be mitigated
if I figured out how to get the invalid region out of the cairo_t*
that's passed in, but this is a test app and my machine's pleny fast. So
go with it for now.
2016-08-04 11:41:43 -07:00
Eric House
1892d24317 get all layouts from the same place 2016-08-03 17:56:38 -07:00
Eric House
9521b71be9 fix remtext rendering 2016-08-03 17:35:44 -07:00
Eric House
670f0034af fix a bunch of color setting 2016-08-03 16:54:45 -07:00
Eric House
eb6fb508bf fix crash dragging tiles
Add new begin() and end() methods around all drawing and get/destroy
cairo context there.
2016-08-03 15:50:17 -07:00
Eric House
b57e50a255 snapshot toward building with gtk3
Board renders, but only when touched. Tray and scoreboard skipped for
now. Lots of changed still to go, and some asserts added where I didn't
want to stop to solve a compile problem.
2016-08-03 15:19:12 -07:00
Eric House
2ade75158b gtk: update constants 2016-08-03 08:20:05 -07:00
Eric House
799e89fdc1 gtk: use accessors instead of peeking at structs 2016-08-03 08:09:47 -07:00
Eric House
bd8e829a06 replace deprecated gtk symbols (lightly tested) 2016-08-03 07:11:02 -07:00
Eric House
2ff7582688 enforce and follow new gtk header rules 2016-08-03 06:15:49 -07:00
Eric House
53e40be2e3 add lastMoveTime to summary table (gtk version) 2016-07-25 08:28:37 -07:00
Eric House
406eb77f54 post notification (rather than just play sound) when turn comes into
boarddelegate but it's not visible
2016-04-14 22:16:18 -07:00
Eric House
f288fe2860 use malloc to allocate storate for hci_inquiry instead of the
stack. That *seems* to fix it always returning 0, something that
changed with newer version of linux or libbluetooth or who knows
what. BT still doesn't work from linux, but this is a necessary start.
2016-04-09 15:49:11 -07:00
Eric House
9fb5f49595 when a game's opened from an Android db, there's no row data to delete 2016-03-04 19:28:38 -08:00
Eric House
50107949f2 merge local heads 2016-02-18 07:47:46 -08:00
Eric House
53f44af199 fix assertion failure by handling missing case 2016-02-18 07:45:41 -08:00
Eric House
4157169d91 add dict.xwd so I don't have to keep creating it 2016-02-16 20:48:28 -08:00
Eric House
19713a40ad add param to comms_resendAll to limit type of message sent
(e.g. BT). Meant to be used when a single type has become available.
2016-02-02 07:01:48 -08:00
Eric House
22dde029c8 Merge tag 'android_beta_100' into android_branch
ready for release
2016-01-03 11:36:37 -08:00
Eric House
a4a135b953 up CV version for testing 2016-01-01 19:30:35 -08:00
Eric House
dd242c3ff5 make undo ratio operate on 1/1000 scale -- and even with this it's
overwhelming when more than 40 clients are running.
2015-12-30 21:23:29 -08:00
Eric House
0a91f852cc add commented-out flag 2015-12-30 05:59:52 -08:00
Eric House
4ed843a529 start UDP at 100% by default since all clients will be that way now 2015-12-29 19:01:15 -08:00
Eric House
e3d6cb74fc for some reason log files are now considered binary by grep, so -a option's needed 2015-12-29 18:59:52 -08:00