Skip to content
Snippets Groups Projects
Commit 3131a499 authored by deuce's avatar deuce
Browse files

Update for new cterm_init() prototype.

parent 6e1f8a09
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,8 @@ int main(int argc, char **argv)
int len;
int speed=0;
unsigned char *scrollbuf;
uint32_t *scrollbuff;
uint32_t *scrollbufb;
char *infile=NULL;
char title[MAX_PATH+1];
int expand=0;
......@@ -138,7 +140,22 @@ int main(int argc, char **argv)
return(-1);
}
cterm=cterm_init(ti.screenheight, ti.screenwidth, 1, 1, SCROLL_LINES, scrollbuf, CTERM_EMULATION_ANSI_BBS);
if((scrollbuff=malloc(SCROLL_LINES*ti.screenwidth*sizeof(scrollbuff[0])))==NULL) {
cprintf("Cannot allocate memory\n\n\rPress any key to exit.");
free(scrollbuf);
getch();
return(-1);
}
if((scrollbufb=malloc(SCROLL_LINES*ti.screenwidth*sizeof(scrollbufb[0])))==NULL) {
cprintf("Cannot allocate memory\n\n\rPress any key to exit.");
free(scrollbuf);
free(scrollbuff);
getch();
return(-1);
}
cterm=cterm_init(ti.screenheight, ti.screenwidth, 1, 1, SCROLL_LINES, scrollbuf, scrollbuff, scrollbufb, CTERM_EMULATION_ANSI_BBS);
if(!cterm) {
fputs("ERROR Initializing CTerm!\n", stderr);
return 1;
......@@ -164,11 +181,11 @@ int main(int argc, char **argv)
if(ansi) {
puts("");
puts("END OF ANSI");
gettext(1,1,ti.screenwidth,ti.screenheight,scrollbuf);
pgettext(1,1,ti.screenwidth,ti.screenheight,scrollbuf,scrollbuff,scrollbufb);
puttext_can_move=1;
puts("START OF SCREEN DUMP...");
clrscr();
puttext(1,1,ti.screenwidth,ti.screenheight,scrollbuf);
pputtext(1,1,ti.screenwidth,ti.screenheight,scrollbuf,scrollbuff,scrollbufb);
}
else
viewscroll();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment