ncplayer: don't try to drive four/eight #1406

pull/1409/head
nick black 3 years ago
parent d9fe3f7c78
commit 04ad933a4b
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -2855,10 +2855,10 @@ typedef enum {
NCBLIT_2x1, // halves + 1x1 (space) ▄▀
NCBLIT_2x2, // quadrants + 2x1 ▗▐ ▖▀▟▌▙
NCBLIT_3x2, // sextants (*NOT* 2x2) 🬀🬁🬂🬃🬄🬅🬆🬇🬈🬉🬊🬋🬌🬍🬎🬏🬐🬑🬒🬓🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞
NCBLIT_4x1, // four vertical levels █▆▄▂
NCBLIT_BRAILLE, // 4 rows, 2 cols (braille) ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿
NCBLIT_8x1, // eight vertical levels █▇▆▅▄▃▂▁
NCBLIT_PIXEL, // pixel graphics
NCBLIT_4x1, // four vertical levels █▆▄▂ (plots only)
NCBLIT_8x1, // eight vertical levels █▇▆▅▄▃▂▁ (plots only)
} ncblitter_e;
// Lex a blitter.

@ -24,10 +24,10 @@ typedef enum {
NCBLIT_2x1, // halves + 1x1
NCBLIT_2x2, // quadrants + 2x1
NCBLIT_3x2, // sextants + 1x1
NCBLIT_4x1, // four vertical levels
NCBLIT_BRAILLE, // 4 rows, 2 cols (braille)
NCBLIT_8x1, // eight vertical levels
NCBLIT_PIXEL, // pixel graphics
NCBLIT_4x1, // four vertical levels, (plots)
NCBLIT_8x1, // eight vertical levels, (plots)
} ncblitter_e;
#define NCVISUAL_OPTION_NODEGRADE 0x0001
@ -155,11 +155,14 @@ The different **ncblitter_e** values select from among available glyph sets:
* **NCBLIT_2x1**: Adds the half blocks (▄▀) to **NCBLIT_1x1**.
* **NCBLIT_2x2**: Adds left and right half blocks (▌▐) and quadrants (▖▗▟▙) to **NCBLIT_2x1**.
* **NCBLIT_3x2**: Adds sextants to **NCBLIT_1x1**.
* **NCBLIT_4x1**: Adds ¼ and ¾ blocks (▂▆) to **NCBLIT_2x1**.
* **NCBLIT_BRAILLE**: 4 rows and 2 columns of braille (⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿).
* **NCBLIT_8x1**: Adds ⅛, ⅜, ⅝, and ⅞ blocks (▇▅▃▁) to **NCBLIT_4x1**.
* **NCBLIT_PIXEL**: Adds pixel graphics.
Two more blitters exist for plots, but are unsuitable for generic media:
* **NCBLIT_4x1**: Adds ¼ and ¾ blocks (▂▆) to **NCBLIT_2x1**.
* **NCBLIT_8x1**: Adds ⅛, ⅜, ⅝, and ⅞ blocks (▇▅▃▁) to **NCBLIT_4x1**.
**NCBLIT_4x1** and **NCBLIT_8x1** are intended for use with plots, and are
not really applicable for general visuals. **NCBLIT_BRAILLE** doesn't tend
to work out very well for images, but (depending on the font) can be very

@ -64,10 +64,11 @@ typedef enum {
NCBLIT_2x1, // halves + 1x1 (space) ▄▀
NCBLIT_2x2, // quadrants + 2x1 ▗▐ ▖▀▟▌▙
NCBLIT_3x2, // sextants (*NOT* 2x2) 🬀🬁🬂🬃🬄🬅🬆🬇🬈🬉🬊🬋🬌🬍🬎🬏🬐🬑🬒🬓🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞
NCBLIT_4x1, // four vertical levels █▆▄▂
NCBLIT_BRAILLE, // 4 rows, 2 cols (braille) ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿
NCBLIT_8x1, // eight vertical levels █▇▆▅▄▃▂▁
NCBLIT_PIXEL, // pixel graphics
// these blitters are suitable only for plots, not general media
NCBLIT_4x1, // four vertical levels █▆▄▂
NCBLIT_8x1, // eight vertical levels █▇▆▅▄▃▂▁
} ncblitter_e;
// Alignment within a plane or terminal. Left/right-justified, or centered.

@ -143,7 +143,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
}else if(keyp == 'L'){ // FIXME check for ctrl+l
nc.refresh(nullptr, nullptr);
continue;
}else if(keyp >= '0' && keyp <= '8'){ // FIXME eliminate ctrl/alt
}else if(keyp >= '0' && keyp <= '6'){ // FIXME eliminate ctrl/alt
marsh->blitter = static_cast<ncblitter_e>(keyp - '0');
vopts->blitter = marsh->blitter;
if(vopts->blitter == NCBLIT_PIXEL){
@ -393,7 +393,7 @@ auto main(int argc, char** argv) -> int {
}else if(ie == 'L'){
--i;
nc.refresh(nullptr, nullptr);
}else if(ie >= '0' && ie <= '8'){
}else if(ie >= '0' && ie <= '6'){
--i; // rerun same input with the new blitter
vopts.blitter = blitter = static_cast<ncblitter_e>(ie - '0');
}else if(ie == NCKey::Resize){

Loading…
Cancel
Save