Commit Graph

354 Commits

Author SHA1 Message Date
nick black
3f326ee0a8 fix up ncplane_set_{bf}g 2019-12-20 09:42:41 -05:00
nick black
6a9d6fa122
add ncplane_printf_yx() 2019-12-20 04:12:30 -05:00
nick black
5bec85746d
allow banners to be suppressed 2019-12-20 00:34:21 -05:00
nick black
32e9fd0a1d
notcurses_reset_stats() added + test #164 2019-12-20 00:05:03 -05:00
nick black
d6bcb3211f eagles level starts at lower-right 2019-12-19 22:20:18 -05:00
nick black
b257f40a35 sync input documentation for char32_t #172 2019-12-19 22:20:18 -05:00
nick black
3cfe88ee0c ncscale_e enumeration for ncvisuals #168 2019-12-19 22:20:18 -05:00
nick black
94722c0f28
Merge branch 'master' of github.com:dankamongmen/notcurses 2019-12-18 11:06:21 -05:00
nick black
ddfd5219ed
notcurses_getc() needs return wchar_t #161 2019-12-18 11:06:16 -05:00
nick black
97ecbdb0e5
sigh, probably gotta kill DMCA lure 2019-12-18 05:31:29 -05:00
nick black
fea5ada5f5
add FINAL CUT shout-out, use ≤ in markdown 2019-12-18 05:02:02 -05:00
Marek Habersack
ff3ed881c0 Improve chances of DirectColor terminal detection
While ncurses 6.1 adds the `RGB` capability to terminfo, the flag is not
commonly used in terminfo entries as of now. The `COLORTERM` environment
variable is, otoh, commonly present and set to either `truecolor` or
`24bit` value by terminal emulators which support direct color.

Add a check for this if `RGB` is false (or absent)

With this check in I was able to properly appreciate the awesomeness of
notcurses demos :)
2019-12-18 04:46:49 -05:00
Nick Black
957549105b
Wide character rigor (#117) (#157)
* unidamage PoC
* add cell_load_simple()
* clear CELL_WIDEASIAN_MASK in cell_load()
* split out render code
* add CELL_SIMPLE_INITIALIZER
* widecolor: fix message plane
* widecolor: simplify color increments
* document wide character handling
* unit tests for wide obliteration #117
* widechar obliteration hardening #117
* widecolor -> widechomper, update man page
2019-12-18 04:38:43 -05:00
nick black
040607c6f9
fix up linear interpolations 2019-12-18 00:07:11 -05:00
Nick Black
dfc7623119
Implement notcurses_refresh() #150 (#156)
* boxdemo: clean up colors
* Fix crash on certain resizes due to corruption of damage map #152
* Rewrite ncplane_move_yx(), throwing out ~25 line of code
* implement notcurses_refresh() #150
2019-12-17 23:07:21 -05:00
nick black
01ac18fb35
s/Open Source/free software/g 2019-12-16 21:41:07 -05:00
nick black
165170dd51 if the man prefers 'free software', use that term 2019-12-16 21:31:18 -05:00
nick black
dac4f78ee6 basic unit tests for z-axis #71 2019-12-16 21:31:18 -05:00
nick black
8c40f6076b
link to other tui libraries worth their druthers 2019-12-16 02:00:33 -05:00
nick black
f9ac7a7737
image in README 2019-12-15 17:17:20 -05:00
Nick Black
2de07f8a48
Per-line damage map, ~50% increase in FPS on notcurses-demo (#144)
Implement a fairly conservative, line-granularity, two-level damage map. One on the overall notcurses object is dirtied by planar moves, creations, deletions, and resizes. One on each ncplane is dirtied by glyph output, media rendering, fades, and erasure. #83 This has some definite false positives: a hidden plane which moves will damage a bunch of lines unnecessarily. For now, don't do things like that :D.

Extra byte per line per plane, shouldn't be a problem.

Two new stats for cell elisions and emissions

Allow keypress to interrupt view-demo

ncvisual_stream() now allows a callback per frame

Allow ncvisual_open() to create its own, perfectly-sized, ncplane #128

Typical performance prior to this PR:

4655 renders, 18.3s total (0.000305s min, 0.196s max, 0.0039s avg 253.9 fps)
401046.505KB total (9.688KB min, 139.697KB max, 86.15KB avg)
Emits/elides: def 1082115/116196 fg 10547624/7236460 bg 10602717/6208644
 Elide rates: 9.70% 40.69% 36.93%
4680 renders, 18.4s total (0.000285s min, 0.15s max, 0.0039s avg 255.0 fps)
403078.188KB total (9.688KB min, 139.697KB max, 86.13KB avg)
Emits/elides: def 1088994/116196 fg 10604983/7267750 bg 10655426/6237472
 Elide rates: 9.64% 40.66% 36.92%
4699 renders, 17.8s total (0.000227s min, 0.192s max, 0.0038s avg 263.8 fps)
403266.907KB total (9.688KB min, 139.697KB max, 85.82KB avg)
Emits/elides: def 1086511/116196 fg 10601709/7359116 bg 10661910/6326744
 Elide rates: 9.66% 40.97% 37.24%

After this PR:

5625 renders, 15s total (9.36e-05s min, 0.187s max, 0.0027s avg 375.2 fps)
168365.640KB total (0.930KB min, 139.600KB max, 29.93KB avg)
Emits/elides: def 310575/116196 fg 4486002/4473416 bg 4116835/4630666
 Elide rates: 27.23% 49.93% 52.94%
Cells emitted; 9928000 elided: 12572000 (55.88%)
5642 renders, 14.2s total (9.17e-05s min, 0.154s max, 0.0025s avg 397.0 fps)
168669.009KB total (0.605KB min, 139.600KB max, 29.90KB avg)
Emits/elides: def 310819/116196 fg 4499833/4482134 bg 4118562/4652470
 Elide rates: 27.21% 49.90% 53.04%
Cells emitted; 9962160 elided: 12605840 (55.86%)
5650 renders, 14.3s total (0.000118s min, 0.143s max, 0.0025s avg 395.7 fps)
169461.884KB total (0.860KB min, 139.600KB max, 29.99KB avg)
Emits/elides: def 305431/116196 fg 4515396/4456376 bg 4149967/4613668
 Elide rates: 27.56% 49.67% 52.65%
Cells emitted; 9945200 elided: 12654800 (55.99%)

on netcurses-demo, we're eliding about half of the total cells via this damage map. that's pretty fucking sweet! FPS increase of about 50% -- I'll take that any day of the fuckin' week, boyo. w00t!

https://www.youtube.com/watch?v=XbGs_qK2PQA
2019-12-15 13:46:47 -05:00
nick black
364db519bb
stop shifting style bits stupidly 2019-12-15 02:06:18 -05:00
nick black
bfda5a53d6
add CELL_SIMPLE_INITIALIZER to docs 2019-12-15 01:29:41 -05:00
nick black
4118500897
we lost mssr valéry 2019-12-14 18:44:04 -05:00
nick black
2dd2d84401
copy over panelreel documentation 2019-12-14 18:43:12 -05:00
nick black
26c575a262
spelling 2019-12-14 18:39:56 -05:00
Nick Black
8bd8055f72
Distinct fg/bg alpha channels #139 (#141)
* improved alpha macros
* demo: use new alpha macros
* add ncplane_set_*_alpha()
* explicitly set fg for uniblock
* outro: background is a space #139
* distinct alpha channels for fg/bg #139
* rename 'background' cell to 'default' #142
* doc palette fades
2019-12-14 17:34:10 -05:00
nick black
582017a16a
more docing 2019-12-14 07:23:49 -05:00
nick black
4ad1321dce
remove double-define from README 2019-12-14 07:11:26 -05:00
nick black
89b6af2166
docs docs docs, all day long 2019-12-14 07:04:43 -05:00
nick black
46544bec0c
merge paras 2019-12-14 06:40:01 -05:00
Nick Black
ff463d464e
Channels API sanity #119 (#138)
* orthogonalize channel/channels/cells APIs #119
* sync README.md with new ncplane channels api #119
2019-12-14 05:33:34 -05:00
nick black
e3dd36a1a4
link to release in history 2019-12-13 21:00:47 -05:00
nick black
3b987b4993
ncplane_box(): update documentation 2019-12-13 20:58:44 -05:00
nick black
12018f3096
document nl_langinfo() check 2019-12-13 20:53:18 -05:00
nick black
88163325fa
widecolor: proceed without keypress #135 2019-12-13 20:10:39 -05:00
nick black
7e24066816
note about bottommost, rightmost coordinate 2019-12-13 19:22:11 -05:00
nick black
e6d35978d4
add notcurses_refresh() declaration 2019-12-13 18:02:35 -05:00
nick black
18a33a0328
handle still more key sequences #134 2019-12-13 17:18:54 -05:00
nick black
c5acae4ef5
fbbytes stat 2019-12-13 17:14:15 -05:00
nick black
a9c21526a7
add history 2019-12-13 13:00:29 -05:00
nick black
340ddf9f76
use cell terminology throughout 2019-12-13 12:16:53 -05:00
nick black
b00099f1c6
README: remove API macro from documentation 2019-12-13 12:16:05 -05:00
nick black
cc6179ccab
spelling 2019-12-13 12:15:11 -05:00
nick black
e71fa57e54
add 'rgb' PoC, fix setlocale() mention 2019-12-12 08:13:14 -05:00
nick black
1821867e35
move outfp out of notcurses_options #130 2019-12-12 07:59:48 -05:00
nick black
8de3696268
add ncplane_putwstr_aligned(), update docs #102 2019-12-12 07:07:04 -05:00
nick black
5735e5966a
add _yx-suffixed output forms #102 2019-12-12 06:38:16 -05:00
nick black
194b76a9d3
input: update comment, no longer driven through cell 2019-12-11 00:47:46 -05:00
nick black
7eafdd6772
fix up unit testing sanity 2019-12-10 06:59:35 -05:00
nick black
8672ae3caa
update docs regarding input 2019-12-10 06:10:01 -05:00
Nick Black
0d2c43603b
Luigi in Mega Man world (#127)
* uniblock-demo: reset background to black
* warning about quantization
* some luigi love
* update cell documentation
* add unit test for move of stdplane
* MoveToLowerRight unit test
* ncplane_move_yx(): error to move stdscr
* better box permutations test
* luigi in megaman2 world
* stats: don't print 'em if we haven't got 'em
2019-12-10 06:02:49 -05:00
nick black
3a6551ab4d
uniblock-demo: scroll the blocks right-to-left #104 2019-12-08 16:48:58 -05:00
nick black
93231c26eb input: use SPUA-B for special keys #118 2019-12-08 15:32:57 -05:00
nick black
8afcd04446
sync cell/ncplane fg/bg API naming 2019-12-06 22:45:08 -05:00
nick black
80821ba0e5
readme: section on adapting NCURSES programs 2019-12-06 18:33:20 -05:00
nick black
0392aa34ea
notcurses: get el terminfo capability 2019-12-06 15:46:56 -05:00
nick black
774f8e5a23
summary: fix minima trackers 2019-12-05 02:01:49 -05:00
nick black
0d0eafa8cf
add multimedia/panelreels to README #21 2019-12-05 00:34:16 -05:00
nick black
f1ab657c39
update ncpanel documentation 2019-12-05 00:28:42 -05:00
nick black
93e586c58b
update input documentation 2019-12-05 00:26:33 -05:00
nick black
37b0e416c0 get everything prepped for reliable keyboard escapes #78 2019-12-04 23:46:24 -05:00
nick black
ae711b7e75 h/vline gradient unit tests #42 2019-12-04 04:50:26 -05:00
nick black
1b714e16d8 update docs for ncplane_box() #42 2019-12-04 04:50:26 -05:00
Nick Black
6f9b1e0379
Locking #82 (#106)
* remove unused simple_gcluster_p()
* detail statistics
* add byte statistics on rendering
* lock around notcurses_render() #82
* lock nc in notcurses_putc() #82
* lock ncplane_styles() and friends #82
2019-12-03 23:34:08 -05:00
nick black
f7437d2e68
avast, scurvy dog 2019-12-02 10:39:48 -05:00
nick black
52c309093a update cell API 2019-12-01 15:29:59 -05:00
nick black
c2f377d599 ncplane_background()/ncplane_set_background() #69 2019-12-01 02:22:13 -05:00
nick black
b993360f53 add ncplane API 2019-12-01 02:22:13 -05:00
nick black
28ac1e7498 environment/emulator notes 2019-11-29 05:55:41 -05:00
nick black
4cc0ce037d read terminfo entries for keypad #78 2019-11-29 05:55:41 -05:00
nick black
6a5c21cacd demo: accept -f, open argument for renderfp 2019-11-29 05:55:41 -05:00
nick black
e391bfbb81
input: add pass_through_esc option, otherwise run smkx #78 2019-11-29 03:26:37 -05:00
nick black
8fe19262f4
document notcurses_getc() #8 2019-11-29 01:58:45 -05:00
nick black
b3a0b2ed6b
list ffmpeg deps 2019-11-28 22:34:55 -05:00
nick black
5f3a12bc63
pre-0.2.0 2019-11-28 22:32:49 -05:00
Nick Black
7f9ac490b0
ncplane_resize(), slider demo (#64) (#74)
* sliding: bounding box around puzzle
* slider: make moves, deleting planes #61
* implement z-index move functions
* demo: allow demos to be chosen via command-line option
* allow default bg/fg to be explicitly chosen
* ncplane_resize() unit test #64
* useful links
* slider: use random colors
* use find_above() in ncplace_destroy()
* ncplane_resize() work #64
2019-11-28 22:08:26 -05:00
Nick Black
ba648dbd74
What a miserable evening tracking #57 (#60)
* widecolor-demo: don't emit spaces
* notcurses_init: newline before splash
* boxdemo: ncplane_erase() on entry #58
* uniblock-demo: print even wide chars #49
2019-11-27 10:43:03 -05:00
nick black
ee2e16736c
signal handlers for INT, QUIT, WINCH #27 2019-11-27 02:08:35 -05:00
nick black
e9256b1397 add libavformat-dev to debian deps #35 2019-11-26 20:23:40 -05:00
nick black
66b06e9d91 add libav 0.29+ to deps 2019-11-26 20:23:40 -05:00
nick black
e6a009ee3a
erase in griddemo #22 2019-11-25 02:22:15 -05:00
nick black
15b46fe1d3
add cell definition #21 2019-11-25 00:28:38 -05:00
nick black
08e9d86d07
ToC at top of README.md 2019-11-25 00:26:35 -05:00
nick black
0cf54ed100
document cell api #21 2019-11-25 00:24:55 -05:00
nick black
ec987c9c49
sync README to include 2019-11-24 21:43:44 -05:00
nick black
51d56195ce
stop claiming support for wide chars, utf-8 baybee 2019-11-23 16:09:37 -05:00
nick black
9b104de1ec
commit to unicode 12.1 extended grapheme clusters #14 2019-11-23 16:03:38 -05:00
nick black
3587663d5f
README.md: link syntax 2019-11-23 09:16:34 -05:00
nick black
162d377386
sound less jacked 2019-11-23 09:09:05 -05:00
nick black
6f2d9b627e
deambiguize pronoun 2019-11-23 09:06:54 -05:00
Nick Black
7e92c8bb82
documentation and declarations (#13)
ncplane: flesh out API
ncplane: line and erase APIs
README.md: document differences from ncurses
notcurses_init(): print long term name
CMake: link librt into notcurses
cell: move functionality out to header
2019-11-23 09:05:32 -05:00
nick black
826ddbc7c7
hrmm 2019-11-22 02:30:59 -05:00
nick black
c0444bfb3d
yes 2019-11-22 02:15:09 -05:00
nick black
42e386f1e7
readme: introduce planes 2019-11-21 11:11:36 -05:00
nick black
94c67af64d
notcurses_version: add to README 2019-11-21 11:03:02 -05:00
nick black
4fb5c9db71
readme touches 2019-11-21 11:00:40 -05:00
nick black
2dffc5ae1e
document basic use 2019-11-21 10:56:08 -05:00
nick black
ba9a113de2
missing conjunction 2019-11-19 06:53:50 -05:00
nick black
908e9e120c
Don't require smcup/rmcup, and emit them only if supported #3 2019-11-18 12:16:26 -05:00
nick black
f88a26f55f
introduce notcurses_render() 2019-11-18 00:05:32 -05:00
nick black
4e84859141
some README intro words 2019-11-17 23:09:06 -05:00
nick black
70df86ba17
version string, notcurses_version() 2019-11-17 05:04:41 -05:00
Nick Black
635d7039d7
Initial commit 2019-11-16 21:38:25 -05:00