|
|
@ -183,31 +183,18 @@ int fallin_demo(struct notcurses* nc){
|
|
|
|
x += newx;
|
|
|
|
x += newx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
struct ncplane* n = NULL;
|
|
|
|
ncplane_erase(stdn);
|
|
|
|
#ifndef DFSG_BUILD
|
|
|
|
#ifndef DFSG_BUILD
|
|
|
|
if(notcurses_canopen_images(nc)){
|
|
|
|
if(notcurses_canopen_images(nc)){
|
|
|
|
char* path = find_data("lamepatents.jpg");
|
|
|
|
char* path = find_data("lamepatents.jpg");
|
|
|
|
if(path == NULL){
|
|
|
|
|
|
|
|
goto err;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
struct ncvisual* ncv = ncvisual_from_file(path);
|
|
|
|
struct ncvisual* ncv = ncvisual_from_file(path);
|
|
|
|
free(path);
|
|
|
|
free(path);
|
|
|
|
if(ncv == NULL){
|
|
|
|
if(ncv == NULL){
|
|
|
|
goto err;
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
struct ncplane_options nopts = {
|
|
|
|
|
|
|
|
.rows = dimy - 2,
|
|
|
|
|
|
|
|
.cols = dimx,
|
|
|
|
|
|
|
|
.y = 1,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
n = ncplane_create(stdn, &nopts);
|
|
|
|
|
|
|
|
if(n == NULL){
|
|
|
|
|
|
|
|
goto err;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
struct ncvisual_options vopts = {
|
|
|
|
struct ncvisual_options vopts = {
|
|
|
|
|
|
|
|
.n = stdn,
|
|
|
|
.scaling = NCSCALE_STRETCH,
|
|
|
|
.scaling = NCSCALE_STRETCH,
|
|
|
|
//.blitter = NCBLIT_PIXEL,
|
|
|
|
|
|
|
|
.n = n,
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if(ncvisual_render(nc, ncv, &vopts) == NULL){
|
|
|
|
if(ncvisual_render(nc, ncv, &vopts) == NULL){
|
|
|
|
ncvisual_destroy(ncv);
|
|
|
|
ncvisual_destroy(ncv);
|
|
|
@ -220,7 +207,6 @@ int fallin_demo(struct notcurses* nc){
|
|
|
|
int ret = drop_bricks(nc, arr, arrcount);
|
|
|
|
int ret = drop_bricks(nc, arr, arrcount);
|
|
|
|
free(arr);
|
|
|
|
free(arr);
|
|
|
|
free(usemap);
|
|
|
|
free(usemap);
|
|
|
|
ncplane_destroy(n);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
|
|
|
|
err:
|
|
|
|
err:
|
|
|
|