mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
Note copyright of Mark Ferrari for jungle demo
This commit is contained in:
parent
bee5be9d80
commit
004f5ca1ea
@ -2564,6 +2564,8 @@ up someday **FIXME**.
|
||||
* NES art was lifted from [The Spriters Resource](https://www.spriters-resource.com/nes/),
|
||||
the kind of site that makes the Internet great. It probably violates any
|
||||
number of copyrights. C'est la vie.
|
||||
* Mark Ferrari, master of the pixel, for no good reason allowed me to reproduce
|
||||
his incredible and groundbreaking color-cycling artwork. Thanks Mark!
|
||||
* Finally, the [demoscene](https://en.wikipedia.org/wiki/Demoscene) and general
|
||||
l33t scene of the 90s and early twenty-first century endlessly inspired a
|
||||
young hax0r. There is great joy in computing; no one will drive us from
|
||||
|
@ -21,7 +21,7 @@ static demoresult* results;
|
||||
static char datadir[PATH_MAX];
|
||||
static atomic_bool interrupted = ATOMIC_VAR_INIT(false);
|
||||
|
||||
static const char DEFAULT_DEMO[] = "ixetcgpwubvlfsjo";
|
||||
static const char DEFAULT_DEMO[] = "ixetbcgpwuvlfsjo";
|
||||
|
||||
void interrupt_demo(void){
|
||||
atomic_store(&interrupted, true);
|
||||
|
@ -26559,8 +26559,26 @@ cycle_palettes(struct notcurses* nc, palette256* p){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ncplane*
|
||||
show_copyright(struct notcurses* nc){
|
||||
int dimx, dimy;
|
||||
notcurses_term_dim_yx(nc, &dimy, &dimx);
|
||||
struct ncplane* n = ncplane_aligned(notcurses_stdplane(nc), 1, dimx,
|
||||
dimy - 1, NCALIGN_RIGHT, NULL);
|
||||
if(n){
|
||||
if(ncplane_set_fg(n, 0xffffff) < 0){
|
||||
return NULL;
|
||||
}
|
||||
if(ncplane_putstr_aligned(n, 0, NCALIGN_RIGHT, "Image copyright Mark Ferrari. Used with permission.") < 0){
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
int jungle_demo(struct notcurses* nc){
|
||||
size_t have = 0, out = 0;
|
||||
struct ncplane* copyplane;
|
||||
palette256* pal;
|
||||
if((pal = load_palette(nc, palette, sizeof(palette))) == NULL){
|
||||
return -1;
|
||||
@ -26597,6 +26615,11 @@ int jungle_demo(struct notcurses* nc){
|
||||
const int xoff = (dimx - ORIGWIDTH / xiter) / 2;
|
||||
const int yoff = (dimy - ORIGHEIGHT / yiter) / 4;
|
||||
ncplane_erase(n);
|
||||
if((copyplane = show_copyright(nc)) == NULL){
|
||||
palette256_free(pal);
|
||||
free(buf);
|
||||
return -1;
|
||||
}
|
||||
cell c = CELL_TRIVIAL_INITIALIZER;
|
||||
cell_load(n, &c, "\xe2\x96\x80"); // upper half block
|
||||
for(size_t y = 0 ; y < ORIGHEIGHT ; y += (yiter * 2)){
|
||||
@ -26640,5 +26663,6 @@ int jungle_demo(struct notcurses* nc){
|
||||
cycle_palettes(nc, pal);
|
||||
}while(nsrunning > 0 && (uint64_t)nsrunning < 5 * timespec_to_ns(&demodelay));
|
||||
palette256_free(pal);
|
||||
ncplane_destroy(copyplane);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user