Commit Graph

1571 Commits (e6a80ab98dd479e56823f7f59c4975ce07eb4323)
 

Author SHA1 Message Date
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 6c81cb3b45
rust: use libnotcurses-sys, add test 5 years ago
nick black cbacf006e5
libnotcurses-sys: update tests for new notcurses_options 5 years ago
nick black ddf206462b
colloquy: branch on widget type 5 years ago
nick black a64119931a
colloquy: flesh out options parser 5 years ago
nick black a77774f4dc
notcurses_at_yx(): value-result u32+u64, not cell
Resolves #410. notcurses_at_yx() accepted a cell*, but the
gcluster of this cell was always set to 0. The EGC is instead
a heap-allocated copy, returned as the primary return value.
This is due to the absence of an egcpool to bind against.
Existing callers can be converted thus:

* instead of passing cell 'c', pass &(c)->attrword, &(c)->channels
* either initialize 'c' with CELL_TRIVIAL_INITIALIZER, or set its
   gcluster field to 0 following the call

I've updated all calls from tests/demos, updated the docs, and
updated the C++ and Python wrappers.
5 years ago
nick black 73b61f6a69 Add bound planes (#71) plus docs/tests
Add ncplane_bound(3). This allows a new plane N to be created in the
*bound* state relative to another ncplane B. If B moves, N moves the
same amount. If N is moved, the coordinates are taken relative to B
as opposed to the standard plane. If B is destroyed, N is destroyed.
Each plane can have many planes bound to it, but can only be bound to
a single plane. Add ncplane_reparent(3). This allows a plane to be
detached from any plane to which it is bound, and optionally rebound
to a new plane. The standard plane cannot be reparented.
Documentation and unit tests have been added for both.
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 ff71eda6a1
reels are a cylinder, not a torus 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
nick black 752c29e648
Tetris: fix line clearing of final column #421 5 years ago
nick black e500d0f8f4
tetris: print user name above score #421 5 years ago
nick black 4f6275b738
tetris: tighten LockPiece() still further 5 years ago
nick black e84b896835
tetris: tighten up LockPiece() 5 years ago
nick black 34e4a5dbb9
tetris: display score and level #421 5 years ago
nick black 4afa02a44f
Tetris: clear out lines #421 5 years ago
nick black 1cd9ec2b31
tetris: clear out lines #421 5 years ago
nick black ee754ed241
Tetris: simplify MoveDown(), don't be stupid 5 years ago
nick black fff9118e17
tetris: factor out LockPiece() 5 years ago
nick black d120e74580
Tetris: end game at the correct failpoint #421 5 years ago
nick black d491d532bb
Tetris: gradient stain on fixed pieces #421 5 years ago
nick black 5864b37d0a
Tetris: place new pieces on mults of 2 #421 5 years ago
nick black b7c9746cf0
Tetris: always move in chunks of two columns #421 5 years ago
nick black 642741f2c9
Tetris: take upper halves into account for PieceStuck() 5 years ago
nick black d5e0b24f01
Tetris: PieceStuck() learns of lower halves 5 years ago
nick black 25dd65a172
Tetris: render after creating a new piece 5 years ago
nick black 013e445209
add notcurses_multiselector(3) to notcurses(3) 5 years ago
Nick Black f9c54761f5
Basic mandelbrot for `n`ormal demo #145 (#424)
normal: working mandelbrot, very basic #145
5 years ago
Nick Black de9158bd7b
More tetris work for book #421 (#423)
* tetris: use NES gravities
* tetris: use NES grav multiplier of 50ms
* tetris: implement move down #421
* README: mention notcurses-tetris #421
* tetris: use double box for boundary #421
* tetris: extract background.h
* tetris: break up into chunks suitable for book
* tetris: do the rotations
5 years ago
nick black ae1421db15
ncvisual_render() API change/documentation #422
ncvisual_render() now returns the number of cells emitted
rather than just 0/-1. -1 is still returned on failure.
Rather than 0 for length meaning "all possible length", it
now means 0, and -1 means "all possible length". All demos,
tests, and PoCs have been updated. #422
5 years ago
Marek Habersack 73b13e0fd5 [C++] There can be only one stdplane
Fixes: https://github.com/dankamongmen/notcurses/issues/409

Standard planes can be duplicated but the copy must not be treated as a
standard plane. There can be only one :)

Make it so.
5 years ago
nick black c43006c2bf
update symbol files for 1.2.4 5 years ago
nick black 7c6b655483 v1.2.4 5 years ago
nick black 4e7d918732
Merge branch 'master' of github.com:dankamongmen/notcurses 5 years ago
nick black 0432a8a444
poc/zalgo: center output 5 years ago
nick black 8113ce72c1 fix dumb error in ncplane_below() description 5 years ago
nick black 84ef40143e
tetris: eliminate compiler warning 5 years ago
Nick Black 2b7b384e91
Most of notcurses-tetris, mergedown fixes (#420)
* ncplane_mergedown() fix for small planes #417
* tetris game needed for the book
5 years ago
nick black c3feca6ded ncplane_polyfill: reject null glyph + test #418 5 years ago
nick black 3fff41ffa2 Doxygen: update INPUT for include hierarchy 5 years ago
Marek Habersack ad93c03851 [C++] API sync
Added:

  * Plane: mergedown (`ncplane_mergedown`)
5 years ago
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
5 years ago