Commit Graph

71 Commits (602531ff33c7ecbebe5cac958dd64c18e0eb2b83)

Author SHA1 Message Date
nick black da1b8d1d53
install version.h #1054 4 years ago
nick black b7a57eaab7 convert all channel rgb calls #985 4 years ago
nick black 5d9cc8a098 tetris: fix up staining #974 4 years ago
nick black 4dd1d6a4c8 Annihilate nc_err_e and all infrastructure #948 4 years ago
Nick Black 359ad1d36d
Generalized mergedown #779 (#932)
* Rename ncplane_mergedown -> ncplane_mergedown_simple()
* New ncplane_mergedown(), fully general projection of src to dst
4 years ago
nick black a2c95814b7 Remove cell_simple_p()
Get notcurses-tetris working again, since its collision
detection relied on simple vs non-simple EGCs, which are
no longer an operative concept. Closes #899.
4 years ago
nick black dab269f506
tetris: ensure continued color changes #825 4 years ago
nick black 6d2ba86acc
Clear screen if we want smcup but it's not available #817 4 years ago
nick black a76ee9a5af
tetris: refresh on startup in place of erase() 4 years ago
nick black 7a459abd56
tetris: clear screen in case background isn't available 4 years ago
Nick Black 50ce76bad8
Add kernel unicode-to-font mappings dynamically for line-drawing characters (#794)
Part 1 of a two-part revolution in Linux console graphics. Map all the line-drawing Unicode characters to similar glyphs. This means all our nice corners freely translate into rigid corners etc in the console, rather than hateful default characters (usually black diamonds). The demo and all widgets now look correct when drawing lines and boxes. Next, we'll add the actual glyphs for the block-drawing characters, and we'll have the finest graphics ever seen on a text-mode Linux console. #201
4 years ago
nick black 992eaea8d0
tetris: swap colors on level change 4 years ago
nick black 894c6d15f6
tetris: start on level 1 4 years ago
Nick Black ebcba82d4b
Fully general ncvisual layer (#647)
This represents an essentially complete rewrite of ncvisual and associated code. It had two major goals:

Improve the ncvisual API based off lessons learned, pursuant to the upcoming API freeze. In particular, I wanted to:

decouple ncvisuals from ncplanes. It should be possible to render a ncvisual to multiple planes, with different scaling each time. It should be possible to create an ncvisual without a plane, etc.
normalize the various ways of constructing an ncvisual -- file, memory, plane, etc.
Support multiple blitters, from 7-bit ASCII to Sixel. This required writing the blitters in several cases, and they're not yet in their final implementations (but the API is fine)
I have not yet unified Plots and Visuals, and might not, given that the Plot code works fine. We could at this point implement Plots in terms of Visuals, though -- the blitter backend range has been unified. Sixel is not yet implemented, though it is listed.

There is a new POC tool, blitter. It renders its arguments using all possible blitter+scaling combinations. Another new POC, resize, displays its argument, then resizes it to the screen size and displays that, explicitly making use of ncvisual_resize() rather than a scaling parameter to ncvisual_render().

This also eliminates some memory leaks and bugs we were seeing in trunk, and brings in Sixel scaffolding.

The C++ wrapper will also need patching back up; I cut most of it down while wrestling with this crap, urk.

Closes #638, #562, and #622.
4 years ago
nick black 8971bda0c2 ncpp: stop() resets _instance, add unit test #538 4 years ago
nick black 4ab0e67155
tetris: rely on c++ exceptions #621 4 years ago
nick black e5b1c2cdea
view/demo/tetris: NCOPTION_INHIBIT_SETLOCALE 4 years ago
nick black dd044c96c8
tetris: replace cuserid with getpwuid #577 4 years ago
nick black e2a94817e7 tests: lots of NULL->nullptr 4 years ago
nick black 384bdf88b2 tetris: use C++ refresh() 4 years ago
nick black 88d14f2f9e
tetris: #include <array>, needed on freebsd #573 4 years ago
nick black f63325db60 Lots of ncvisual work
Unify ffmpeg/oiio/null implementations, where possible. This effectively
required placing all three in the same file, which meant they're all now
C++. Update FFmpeg implemenation to be C++-usable. Implement
ncvisual_rotate_cw() and ncvisual_rotate_ccw() #515. Move most of tetris
over to Visual from Plane #558. Add bgra_to_rgba(), necessary for
creating ncvisual from BGRA memory. Implement ncvisual_from_rgba()
and ncvisual_from_bgra() #557. Add unit tests on ncvisual rotation.
4 years ago
nick black 803296fb80 tetris: curpiece is now a Visual, not a Plane #558 4 years ago
nick black 9f211c75f9
rename jpeg -> jpg 5 years ago
nick black 0b4ada19b1 Remove AVFrame from API #532 5 years ago
nick black 2037cdfacb move libav.c to nc_err_e #532 5 years ago
nick black 60e3e604a8
Handle fallout from reversion of Notcurses::render() semantic inversion (see #510) 5 years ago
Nick Black c6a9997554
Normalize ncplane_at_* / ncplane_set_base() (#479)
* ncplane_at_* and ncplane_at_cursor_*

We had notcurses_at_yx() expanding into three distinct parts of
the cell structure, and ncplane_at_yx() / ncplane_at_cursor()
writing directly to a cell. It was annoying to remember which
was which. The latter two now have a signature matching
notcurses_at_yx(), while the old functionality has been moved
to ncplane_at_yx_cell() and ncplane_at_cursor_yx(). #476
5 years ago
nick black ffdee735cb
Tetris: update to reflect ncpp render() return value inversion #484 5 years ago
nick black 33e4341a67 tetris: use background from installed path #466 5 years ago
nick black 78142bcddc Tetris: import version.h for USE_FFMPEG 5 years ago
Nick Black c2a645e9af
Rust wrapper work (#454)
* packaging: s/libtinfo/Terminfo/g
* rust: add stddim_yx()
* rust: check for valid init in unit tests
* rust: serialize up tests
* constify notcurses_term_dim_yx()
* rust: add dim wrappers
* remove notcurses_resize() from public API #367
* call notcurses_resize() from notcurses_refresh() #367
5 years ago
Nick Black d66549d362
Prep for Fedora packaging (#452)
* jungle demo should be available outside of DFSG builds
* libav: blitters don't need FFMpeg
* CMake: threads independent of ffmpeg
* CMake: add USE_TESTS option to disable tests #450
* tetris: work without ffmpeg
* fedora: flesh out specfile #328
* menu poc: don't use ffmpeg at all
* compile PoCs with binary/include
* multiselect PoC: work without ffmpeg
5 years ago
nick black 312d15d0f9
mathtext poc: enable scrolling 5 years ago
nick black 2852ff736c
tetris: factor out MoveLateral() 5 years ago
nick black d30858e60d tetris: factor out MAX_LEVEL 5 years ago
nick black d1724d6183
tetris: kill unnecessary return in MoveRight() 5 years ago
nick black a45d888601
All fill-type functions return cells changed
Fill-type functions used to return 0 for success, and -1
on failure. They now return the number of cells written
on success, similarly to ncvisual_render(). Resolves #427.
5 years ago
nick black a3323fb22c
Enforce UTF8 where necessary in unit tests #428
Certain unit tests required UTF8 encoding on the output
terminal to work (#428). This includes anything which does
any kind of fill. Add enforce_utf8() checks to all such
tests that were missing them. Unit tests once again pass in
a pure ASCII environment.
5 years ago
nick black bd7bf65c62
colloquy: spin up a rust notcurses instance 5 years ago
nick black 8651486ad7
Don't say DirectColor when TrueColor is meant 5 years ago
nick black 5bcd643a68
tetris: increase gravity with level #421 5 years ago
nick black 4a02d7ed80
tetris: rewrite moveleft()/moveright() with invalidmove() #421 5 years ago
nick black cb85e120e0
tetris: replace PieceStuck() with InvalidMove() #421 5 years ago
nick black 1665bbad8b
tetris: InvalidMove() for detecting bad rotations #421 5 years ago
nick black 5955125921
Tetris: remove dead code #421 5 years ago
nick black 925e416b8d
tetris: different colors for different levels 5 years ago
nick black 5b7e2f574c
tetris: fix up PieceStuck() #421 5 years ago
nick black 91f907a184
gradient_sized (C++): fix parameter name 5 years ago
nick black ae792bbd5c
tetris: ctrl+L for refresh 5 years ago