Fix saving of display mode from keys and fix persistent display
This commit is contained in:
parent
c6e2d17ffe
commit
1307af5c57
@ -46,6 +46,7 @@ extern unsigned char fire_b[YRES/CELL][XRES/CELL];
|
|||||||
|
|
||||||
extern unsigned int fire_alpha[CELL*3][CELL*3];
|
extern unsigned int fire_alpha[CELL*3][CELL*3];
|
||||||
extern pixel *fire_bg;
|
extern pixel *fire_bg;
|
||||||
|
extern pixel *pers_bg;
|
||||||
|
|
||||||
pixel *rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f);
|
pixel *rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f);
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ unsigned char fire_b[YRES/CELL][XRES/CELL];
|
|||||||
|
|
||||||
unsigned int fire_alpha[CELL*3][CELL*3];
|
unsigned int fire_alpha[CELL*3][CELL*3];
|
||||||
pixel *fire_bg;
|
pixel *fire_bg;
|
||||||
|
pixel *pers_bg;
|
||||||
|
|
||||||
pixel *rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f)
|
pixel *rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f)
|
||||||
{
|
{
|
||||||
|
@ -1892,6 +1892,7 @@ void set_cmode(int cm)
|
|||||||
else if (cmode==CM_PERS)
|
else if (cmode==CM_PERS)
|
||||||
{
|
{
|
||||||
memset(fire_bg, 0, XRES*YRES*PIXELSIZE);
|
memset(fire_bg, 0, XRES*YRES*PIXELSIZE);
|
||||||
|
memset(pers_bg, 0, (XRES+BARSIZE)*YRES*PIXELSIZE);
|
||||||
strcpy(itc_msg, "Persistent Display");
|
strcpy(itc_msg, "Persistent Display");
|
||||||
}
|
}
|
||||||
else if (cmode==CM_PRESS)
|
else if (cmode==CM_PRESS)
|
||||||
@ -1925,6 +1926,7 @@ void set_cmode(int cm)
|
|||||||
{
|
{
|
||||||
strcpy(itc_msg, "Velocity Display");
|
strcpy(itc_msg, "Velocity Display");
|
||||||
}
|
}
|
||||||
|
save_presets(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *download_ui(pixel *vid_buf, char *uri, int *len)
|
char *download_ui(pixel *vid_buf, char *uri, int *len)
|
||||||
|
@ -1188,7 +1188,6 @@ int main(int argc, char *argv[])
|
|||||||
int pastFPS = 0;
|
int pastFPS = 0;
|
||||||
int past = 0;
|
int past = 0;
|
||||||
pixel *vid_buf=calloc((XRES+BARSIZE)*(YRES+MENUSIZE), PIXELSIZE);
|
pixel *vid_buf=calloc((XRES+BARSIZE)*(YRES+MENUSIZE), PIXELSIZE);
|
||||||
pixel *pers_bg=calloc((XRES+BARSIZE)*YRES, PIXELSIZE);
|
|
||||||
void *http_ver_check;
|
void *http_ver_check;
|
||||||
void *http_session_check = NULL;
|
void *http_session_check = NULL;
|
||||||
char *ver_data=NULL, *check_data=NULL, *tmp;
|
char *ver_data=NULL, *check_data=NULL, *tmp;
|
||||||
@ -1248,6 +1247,7 @@ int main(int argc, char *argv[])
|
|||||||
parts[NPART-1].life = -1;
|
parts[NPART-1].life = -1;
|
||||||
pfree = 0;
|
pfree = 0;
|
||||||
fire_bg=calloc(XRES*YRES, PIXELSIZE);
|
fire_bg=calloc(XRES*YRES, PIXELSIZE);
|
||||||
|
pers_bg=calloc((XRES+BARSIZE)*YRES, PIXELSIZE);
|
||||||
memset(signs, 0, sizeof(signs));
|
memset(signs, 0, sizeof(signs));
|
||||||
|
|
||||||
//fbi_img = render_packed_rgb(fbi, FBI_W, FBI_H, FBI_CMP);
|
//fbi_img = render_packed_rgb(fbi, FBI_W, FBI_H, FBI_CMP);
|
||||||
@ -2291,6 +2291,7 @@ int main(int argc, char *argv[])
|
|||||||
ISSPAWN2 = 0;
|
ISSPAWN2 = 0;
|
||||||
|
|
||||||
memset(fire_bg, 0, XRES*YRES*PIXELSIZE);
|
memset(fire_bg, 0, XRES*YRES*PIXELSIZE);
|
||||||
|
memset(pers_bg, 0, (XRES+BARSIZE)*YRES*PIXELSIZE);
|
||||||
memset(fire_r, 0, sizeof(fire_r));
|
memset(fire_r, 0, sizeof(fire_r));
|
||||||
memset(fire_g, 0, sizeof(fire_g));
|
memset(fire_g, 0, sizeof(fire_g));
|
||||||
memset(fire_b, 0, sizeof(fire_b));
|
memset(fire_b, 0, sizeof(fire_b));
|
||||||
@ -2319,6 +2320,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
search_ui(vid_buf);
|
search_ui(vid_buf);
|
||||||
memset(fire_bg, 0, XRES*YRES*PIXELSIZE);
|
memset(fire_bg, 0, XRES*YRES*PIXELSIZE);
|
||||||
|
memset(pers_bg, 0, (XRES+BARSIZE)*YRES*PIXELSIZE);
|
||||||
memset(fire_r, 0, sizeof(fire_r));
|
memset(fire_r, 0, sizeof(fire_r));
|
||||||
memset(fire_g, 0, sizeof(fire_g));
|
memset(fire_g, 0, sizeof(fire_g));
|
||||||
memset(fire_b, 0, sizeof(fire_b));
|
memset(fire_b, 0, sizeof(fire_b));
|
||||||
@ -2340,7 +2342,6 @@ int main(int argc, char *argv[])
|
|||||||
set_cmode((cmode+(CM_COUNT-1)) % CM_COUNT);
|
set_cmode((cmode+(CM_COUNT-1)) % CM_COUNT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
save_presets(0);
|
|
||||||
}
|
}
|
||||||
if (x>=(XRES+BARSIZE-(510-494)) && x<=(XRES+BARSIZE-(510-509)) && !bq)
|
if (x>=(XRES+BARSIZE-(510-494)) && x<=(XRES+BARSIZE-(510-509)) && !bq)
|
||||||
sys_pause = !sys_pause;
|
sys_pause = !sys_pause;
|
||||||
|
Loading…
Reference in New Issue
Block a user