Update to latest TOS distro

This commit is contained in:
minexew committed 2017-06-17 15:37:33 +02:00
1 parent 7e46072c81
commit 70ff1e2f75
142 files changed
+6403 -9909

No files matched your search

+54
View File
@@ -634,6 +634,60 @@ public CDC *DCExt(CDC *dc=gr.dc,I64 x1,I64 y1,I64 x2,I64 y2,
return res;
}
public CDC *DCDiff(CDC *base,CDC *update)
{//Trim to win of what has chged.
I64 i,x1=0,y1=0,x2=update->width-1,y2=update->height-1; //inclusive
U32 *ptr_base,*ptr_update;
CDC *res;
ptr_base =base->body;
ptr_update=update->body;
while (y1<=y2) {
i=update->width>>2;
while (i--)
if (*ptr_base++!=*ptr_update++)
goto df_y2;
i=update->width&3;
while (i--)
if (*ptr_base(U8 *)++!=*ptr_update(U8 *)++)
goto df_y2;
y1++;
}
return NULL;
df_y2:
ptr_base =base->body +base->width_internal *base->height;
ptr_update=update->body+update->width_internal*update->height;
while (y1<y2) {
i=update->width>>2;
while (i--)
if (*--ptr_base!=*--ptr_update)
goto df_x1;
i=update->width&3;
while (i--)
if (*--ptr_base(U8 *)!=*--ptr_update(U8 *))
goto df_x1;
y2--;
}
df_x1:
while (x1<x2) {
for (i=y1;i<=y2;i++)
if (GrPeek0(base,x1,i)!=GrPeek0(update,x1,i))
goto df_x2;
x1++;
}
df_x2:
while (x1<x2) {
for (i=y1;i<=y2;i++)
if (GrPeek0(base,x2,i)!=GrPeek0(update,x2,i))
goto df_done;
x2--;
}
df_done:
res=DCExt(update,x1,y1,x2,y2);
res->x0=x1;
res->y0=y1;
return res;
}
#help_index "Graphics/Char;Char/Graphics"
public I64 GrPutChar(CDC *dc=gr.dc,I64 x,I64 y,U8 ch)
+1 -1
View File
@@ -414,7 +414,7 @@ public CDC *DCScrnCapture(Bool include_zoom=TRUE,CTask *task=NULL)
{//Capture scrn to a device context.
CDC *dc;
U8 *dst;
Refresh(2,TRUE);
Refresh(0,FALSE);
if (include_zoom)
dc=DCCopy(gr.scrn_image,task);
else