Commit Graph

1672 Commits

Author SHA1 Message Date
Nick Black
52bdbc6724
ncplane_translate() accept NULL dest as standard plane #408 (#411)
* tetris man page
* tetris basic skeleton
* tetris: Ticker()
* README: fix up some obsolete terminology
* tetris: draw the game board
* tetris: add NewPiece()
* tetris: draw tetriminos
* tetris: check for stuck piece, move it down
* Accept NULL dst in ncplane_translate() #408
2020-03-22 17:33:08 -04:00
nick black
fbd222b04a notcurses_init(): mention setlocale in error
If notcurses_init() fails due to a bad encoding, it's
probably because someone didn't call setlocale(3).
Make a suggestion in the error message. Resolves #414.
2020-03-21 20:28:50 -04:00
nick black
060c0c2a47 README: WINDOW->plane in reel docs 2020-03-21 11:58:50 -04:00
nick black
7e71ad8e11 implement ncplane_mergedown() #361 2020-03-21 05:09:31 -04:00
nick black
38f4255dc0 Define ncplane_mergedown() #361
ncplane_mergedown() is similar to the "Merge down" operation
in the GIMP. It writes to the destination plane the result
of rendering the source and destination frames per se.
2020-03-21 05:09:31 -04:00
nick black
bb2c469168
Merge branch 'master' of github.com:dankamongmen/notcurses 2020-03-19 08:27:22 -04:00
nick black
12b601e02b
fallin': always push back NULLed out subwindows
I noticed while running benchmarks against ranges of widths that
we failed on certain widths. I traced this down to a repeatable
failure when run with the -c flag at the 104x52 resolution. At this
geometry and PRNG seed, we NULLed out the first subwindow of fallin',
but didn't recompress the window array. On the next loop we thus used
it again, and segfaulted out. This fixes that up. We now pass 100% of
the benchmarks, whereas we were failing about 3% before #407.
2020-03-19 08:25:08 -04:00
nick black
6f9fdc115a published next month! :D 2020-03-17 10:56:01 -04:00
nick black
bc3473da8a demo: print unnecessary comma in JSON 2020-03-15 23:33:20 -04:00
Marek Habersack
f4b90a3587
Merge pull request #406 from dankamongmen/dankamongmen/ncpp
ncpp: stop() propagate out return value, public linkage
2020-03-15 20:55:31 +00:00
nick black
8312b88e3c NotCurses::stop(): match original semantics 2020-03-15 01:21:55 -04:00
nick black
78fadafb8f notcurses++ needs PUBLIC notcurses linkage 2020-03-15 01:19:47 -04:00
nick black
66bb614ab3 NotCurses::stop(): propogate out notcurses_stop() return value 2020-03-15 01:19:04 -04:00
Marek Habersack
3e78dd7d1f [C++] API sync
New classes:

   * MultiSelector (`ncmultiselector_*`)

Added:

   * Direct: cursor_{enable,disable}
   * Plane: high_gradient (`ncplane_highgradient`)
   * Plane: high_gradient_sized (`ncplane_highgradient_sized`)
   * Plane: rotate_cw (`ncplane_rotate_cw`)
   * Plane: rotate_ccw (`ncplane_rotate_ccw`)

Updated:

   * NotCurses: added all the margin initializers to the default options
2020-03-14 21:49:32 -04:00
nick black
ba90c70a47
ncplane_cursor_yx() takes const first argument 2020-03-14 21:15:37 -04:00
nick black
bdd7f9422a
python: add ncdirect_cursor_*() 2020-03-14 17:52:34 -04:00
nick black
db30bcf0d2
document new ncdirect functions for cursor #402 2020-03-13 09:56:46 -04:00
nick black
1b4333861a
add ncdirect_{en,dis}able_cursor() #402 2020-03-13 09:52:00 -04:00
nick black
d5d827f38e
adjust ncplane_yx() for margins 2020-03-13 06:53:52 -04:00
Nick Black
c056a0a026
Subregion renders #293 (#404)
Add four new fields to notcurses_options: margin_{tblr}, which requests margins to the top, right, bottom, and left. Render only within those margins, leaving the screen otherwise untouched (well, cleared if using the alternate screen). #293
2020-03-13 05:07:33 -04:00
nick black
982d729c69 switch to CLOCK_MONOTONIC from _RAW 2020-03-11 06:32:06 -04:00
nick black
d77aa78a0e s/CLOCK_MONOTONIC_RAW/CLOCK_MONOTONIC/g 2020-03-11 05:46:33 -04:00
nick black
de520f3aa0
python avoid double def 2020-03-10 03:58:10 -04:00
nick black
be089747a7 ncmultiselector_selected() #322 2020-03-09 15:31:16 -04:00
nick black
638be8feb7 multiselector options/items #322 2020-03-09 15:31:16 -04:00
nick black
2dd97de4e4 multiselector man page 2020-03-09 15:31:16 -04:00
nick black
a46393b035 ncmultiselect: get space rigged up #322 2020-03-09 15:31:16 -04:00
nick black
4abe078eae ncmultiselector #322 2020-03-09 15:31:16 -04:00
nick black
667ac14549 ncmultiselector: draw properly 2020-03-09 15:31:16 -04:00
nick black
a9c64a8c8b yummy covid-19 2020-03-09 15:31:16 -04:00
nick black
078feca8e6 ncmultiselector links up 2020-03-09 15:31:16 -04:00
nick black
635d6e5751 ncmultiselect demo 2020-03-09 15:31:16 -04:00
nick black
6060248968 ncmultiselector_options structure #322 2020-03-09 15:31:16 -04:00
nick black
583906368c
add internal safe home_cursor() 2020-03-08 23:32:51 -04:00
nick black
eead4c1414
notcurses_highgradient() added #398 2020-03-08 04:05:55 -04:00
nick black
d7ea87e129 notcurses_refresh(): properly initialize rvec #380 2020-03-08 00:53:29 -05:00
nick black
83b325de05 notcurses_refresh(): drop double write #380 2020-03-08 00:53:29 -05:00
nick black
e1b729c6a3
Kill warn_unused_result warning in reel demo 2020-03-07 20:44:27 -05:00
nick black
a5bdb88ca9
update libnotcurses symbols 2020-03-07 19:21:57 -05:00
nick black
d44759fd25
kill compiler warning on write(2) 2020-03-07 19:20:23 -05:00
nick black
ac683e21d2
v1.2.3 2020-03-07 18:53:36 -05:00
nick black
e2459ac1a4
purge old rotate implementation #351 2020-03-07 18:41:26 -05:00
Nick Black
4e58747709
ncplane_rotate_cw() and ncplane_rotate_ccw() (#396)
Introduce limited plane rotation capability. We currently support clockwise and counterclockwise rotation of planes. Square and rectangular geometries are both supported, but there must be an even number of columns. The atomic unit of rotation is a 2x1 "square" (this assumes .5 cell aspect ratio). We can only rotate those glyphs which have rotated equivalents, and not even all of those. We currently handle only:

* null glyph
* space
* upper half block
* lower half block
* full block

I've added unit tests as well. This functionality is used by our Tetris example in the book
2020-03-07 18:36:49 -05:00
nick black
333f7c1192
define ncplane_rotate_cw/ccw() 2020-03-05 18:07:20 -05:00
nick black
b8608c15c9
ncdirect_init(): reset style #393 2020-03-04 23:39:39 -05:00
nick black
c355e26d0f
add zalgo poc 2020-03-03 01:41:42 -05:00
nick black
696873894e
ncmenu_offer_input: return true on match 2020-03-03 01:16:58 -05:00
nick black
163565dddd
handle_mouse(): drop unused variables 2020-03-03 01:05:23 -05:00
nick black
afe724ee1d
docs: update for ncplane_translate_abs() 2020-03-03 01:04:28 -05:00
nick black
3498956370
ncplane_mouseevent_p()->ncplane_translate_abs()
ncplane_mouseevent_p() is retired--it was poorly named, and
ncplane_translate_abs() does what it does, plus more, plus
more generally (it works on any y, x, not necessarily an
ncinput). update c++ wrappers #394.
2020-03-03 00:59:44 -05:00