Commit 359e3e82 authored by deuce's avatar deuce
Browse files

More alloc reductions for bitmap output modes.

More alloc reductions for cterm
Overhaul of ATASCII mode.  Works better with break animations now, but there
are still a couple glitches.

I think I need someone with real hardware and real terminal software to
answer a few questions (especially about edge effects)
parent 7fb6bf10
......@@ -44,6 +44,7 @@ pthread_mutex_t vstatlock;
pthread_mutex_t screenlock;
static struct bitmap_callbacks callbacks;
static unsigned char *font;
static unsigned char space=' ';
int force_redraws=0;
struct rectangle {
......@@ -254,7 +255,7 @@ int bitmap_movetext(int x, int y, int ex, int ey, int tox, int toy)
void bitmap_clreol(void)
{
int pos,x;
WORD fill=(cio_textinfo.attribute<<8)|' ';
WORD fill=(cio_textinfo.attribute<<8)|space;
pos=(cio_textinfo.cury+cio_textinfo.wintop-2)*cio_textinfo.screenwidth;
pthread_mutex_lock(&vstatlock);
......@@ -267,7 +268,7 @@ void bitmap_clreol(void)
void bitmap_clrscr(void)
{
int x,y;
WORD fill=(cio_textinfo.attribute<<8)|' ';
WORD fill=(cio_textinfo.attribute<<8)|space;
pthread_mutex_lock(&vstatlock);
for(y=cio_textinfo.wintop-1; y<cio_textinfo.winbottom; y++) {
......@@ -425,6 +426,10 @@ int bitmap_setfont(int font, int force)
if(changemode && newmode==-1)
goto error_return;
current_font=font;
if(font==36 /* ATARI */)
space=0;
else
space=' ';
pthread_mutex_unlock(&vstatlock);
if(changemode) {
......@@ -449,12 +454,12 @@ int bitmap_setfont(int font, int force)
*(new++)=*(old++);
}
else {
*(new++)=' ';
*(new++)=space;
*(new++)=attr;
}
}
else {
*(new++)=' ';
*(new++)=space;
*(new++)=attr;
}
}
......
......@@ -599,20 +599,8 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_gettextinfo(struct text_info *info)
return;
}
if(info!=&cio_textinfo) {
info->winleft=cio_textinfo.winleft; /* left window coordinate */
info->wintop=cio_textinfo.wintop; /* top window coordinate */
info->winright=cio_textinfo.winright; /* right window coordinate */
info->winbottom=cio_textinfo.winbottom; /* bottom window coordinate */
info->attribute=cio_textinfo.attribute; /* text attribute */
info->normattr=cio_textinfo.normattr; /* normal attribute */
info->currmode=cio_textinfo.currmode; /* current video mode:
BW40, BW80, C40, C80, or C4350 */
info->screenheight=cio_textinfo.screenheight; /* text screen's height */
info->screenwidth=cio_textinfo.screenwidth; /* text screen's width */
info->curx=cio_textinfo.curx; /* x-coordinate in current window */
info->cury=cio_textinfo.cury; /* y-coordinate in current window */
}
if(info!=&cio_textinfo)
*info=cio_textinfo;
}
/* Optional */
......@@ -752,7 +740,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_clreol(void)
int width,height;
CIOLIB_INIT();
if(cio_api.clreol) {
cio_api.clreol();
return;
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment