|
|
@ -84,8 +84,14 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
|
|
|
|
if(!marsh->subtitle_plane){
|
|
|
|
if(!marsh->subtitle_plane){
|
|
|
|
int dimx, dimy;
|
|
|
|
int dimx, dimy;
|
|
|
|
ncplane_dim_yx(vopts->n, &dimy, &dimx);
|
|
|
|
ncplane_dim_yx(vopts->n, &dimy, &dimx);
|
|
|
|
marsh->subtitle_plane = ncplane_new(notcurses_stdplane(nc), 1, dimx,
|
|
|
|
struct ncplane_options nopts = {
|
|
|
|
dimy - 1, 0, nullptr, "subt");
|
|
|
|
.y = dimy - 1,
|
|
|
|
|
|
|
|
.horiz = { .x = 0, },
|
|
|
|
|
|
|
|
.rows = 1,
|
|
|
|
|
|
|
|
.cols = dimx,
|
|
|
|
|
|
|
|
nullptr, "subt", nullptr, 0,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
marsh->subtitle_plane = ncplane_create(notcurses_stdplane(nc), &nopts);
|
|
|
|
uint64_t channels = 0;
|
|
|
|
uint64_t channels = 0;
|
|
|
|
channels_set_fg_alpha(&channels, CELL_ALPHA_TRANSPARENT);
|
|
|
|
channels_set_fg_alpha(&channels, CELL_ALPHA_TRANSPARENT);
|
|
|
|
channels_set_bg_alpha(&channels, CELL_ALPHA_TRANSPARENT);
|
|
|
|
channels_set_bg_alpha(&channels, CELL_ALPHA_TRANSPARENT);
|
|
|
@ -256,14 +262,14 @@ auto main(int argc, char** argv) -> int {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
float timescale;
|
|
|
|
float timescale;
|
|
|
|
ncscale_e scalemode;
|
|
|
|
ncscale_e scalemode;
|
|
|
|
notcurses_options nopts{};
|
|
|
|
notcurses_options ncopts{};
|
|
|
|
ncblitter_e blitter = NCBLIT_DEFAULT;
|
|
|
|
ncblitter_e blitter = NCBLIT_DEFAULT;
|
|
|
|
bool quiet = false;
|
|
|
|
bool quiet = false;
|
|
|
|
bool loop = false;
|
|
|
|
bool loop = false;
|
|
|
|
auto nonopt = handle_opts(argc, argv, nopts, &quiet, ×cale, &scalemode,
|
|
|
|
auto nonopt = handle_opts(argc, argv, ncopts, &quiet, ×cale, &scalemode,
|
|
|
|
&blitter, &loop);
|
|
|
|
&blitter, &loop);
|
|
|
|
nopts.flags |= NCOPTION_INHIBIT_SETLOCALE;
|
|
|
|
ncopts.flags |= NCOPTION_INHIBIT_SETLOCALE;
|
|
|
|
NotCurses nc{nopts};
|
|
|
|
NotCurses nc{ncopts};
|
|
|
|
if(!nc.can_open_images()){
|
|
|
|
if(!nc.can_open_images()){
|
|
|
|
nc.stop();
|
|
|
|
nc.stop();
|
|
|
|
std::cerr << "Notcurses was compiled without multimedia support\n";
|
|
|
|
std::cerr << "Notcurses was compiled without multimedia support\n";
|
|
|
@ -283,7 +289,7 @@ auto main(int argc, char** argv) -> int {
|
|
|
|
failed = true;
|
|
|
|
failed = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!(nopts.flags & NCOPTION_NO_ALTERNATE_SCREEN)){
|
|
|
|
if(!(ncopts.flags & NCOPTION_NO_ALTERNATE_SCREEN)){
|
|
|
|
stdn->erase();
|
|
|
|
stdn->erase();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
struct ncvisual_options vopts{};
|
|
|
|
struct ncvisual_options vopts{};
|
|
|
|