change demo order

This commit is contained in:
nick black 2019-12-08 14:05:48 -05:00
parent ea10d80eec
commit 065d44001c
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
4 changed files with 6 additions and 3 deletions

View File

@ -20,7 +20,7 @@ on your terminal after the program exits.
Print a usage message, and exit with success.
.TP
.IR demospec
Select which demos to run, and what order to run them in. The default is "isumbgwvpo". See below for a list of demos.
Select which demos to run, and what order to run them in. The default is "imbgsuwvpo". See below for a list of demos.
.SH DESCRIPTION
.B notcurses-demo
contains a set of text-based demonstrations of capabilities from the notcurses library. The demonstrations include:

View File

@ -9,6 +9,8 @@
#include <notcurses.h>
#include "demo.h"
static const char DEFAULT_DEMO[] = "imbgsuwvpo";
int timespec_subtract(struct timespec *result, const struct timespec *time0,
struct timespec *time1){
if(time0->tv_nsec < time1->tv_nsec){
@ -324,7 +326,7 @@ int main(int argc, char** argv){
if(argv[optind] != NULL){
usage(*argv, EXIT_FAILURE);
}
demos = "isumbgwvpo";
demos = DEFAULT_DEMO;
}
if((nc = notcurses_init(&nopts)) == NULL){
return EXIT_FAILURE;

View File

@ -172,6 +172,7 @@ int unicodeblocks_demo(struct notcurses* nc){
cell_release(n, &c);
}
ncplane_set_fg_rgb(n, 0x40, 0xc0, 0x40);
ncplane_set_bg_rgb(n, 0, 0, 0);
if(ncplane_cursor_move_yx(n, 6 + BLOCKSIZE / CHUNKSIZE, 0)){
return -1;
}

View File

@ -578,6 +578,7 @@ int widecolor_demo(struct notcurses* nc){
struct ncplane* n = notcurses_stdplane(nc);
size_t i;
const size_t screens = sizeof(steps) / sizeof(*steps);
ncplane_erase(n);
for(i = 0 ; i < screens ; ++i){
ncspecial_key special;
cell c;
@ -587,7 +588,6 @@ int widecolor_demo(struct notcurses* nc){
const int rollover = 256 / ((step & 0xff) | ((step & 0xff00) >> 8u)
| ((step & 0xff0000) >> 16u));
int rollcount = 0; // number of times we've added this step
//ncplane_erase(n);
int dimy, dimx;
notcurses_resize(nc, &dimy, &dimx);
cell_init(&c);