TempleOSCDV4.13.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:48:03 +02:00
1 parent b84bbff6db
commit 122df6338e
78 files changed
+3570 -2729

No files matched your search

+8 -24
View File
@@ -10,10 +10,8 @@ public Bool GrPlot0(CDC *dc=gr.dc,I64 x,I64 y)
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x,y,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_RECORD_EXTENTS) {
if (x<dc->min_x) dc->min_x=x;
@@ -104,10 +102,8 @@ public I64 GrBlot(CDC *dc=gr.dc,I64 x,I64 y,CDC *img)
}
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x+img->width>>1,y+img->height>>1,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_SCRN_BITMAP) {
if (x+w1<0) w1=-x;
@@ -671,10 +667,8 @@ public I64 GrPutChar(CDC *dc=gr.dc,I64 x,I64 y,U8 ch)
}
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x+w2>>1,y+h2>>1,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_SCRN_BITMAP) {
if (x+w1<0) w1=-x;
@@ -963,10 +957,8 @@ public I64 GrRect(CDC *dc=gr.dc,I64 x,I64 y,I64 w,I64 h)
dist=0;
else
dist=DistSqrI64(x+w>>1,y+h>>1,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_SCRN_BITMAP) {
if (x+w1<0) w1=-x;
@@ -1517,10 +1509,8 @@ I64 GrRayLen(CDC *dc,I64 *x1,I64 y,I64 z=0,I32 *db=NULL)
!not_color && c==dc->color2) && plot) {
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x3,y3,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_RECORD_EXTENTS) {
if (x3<dc->min_x) dc->min_x=x3;
@@ -1594,10 +1584,8 @@ I64 GrRayLen(CDC *dc,I64 *x1,I64 y,I64 z=0,I32 *db=NULL)
!not_color && c==dc->color2) && plot) {
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x3,y3,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_RECORD_EXTENTS) {
if (x3<dc->min_x) dc->min_x=x3;
@@ -1723,10 +1711,8 @@ public I64 GrHLine(CDC *dc=gr.dc,I64 x1,I64 x2,I64 y,I64 z1=0,I64 z2=0)
else
dist=SqrI64(dc->cur_x-x2);
dist+=SqrI64(y-dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_DONT_DRAW)
goto gr_done;
@@ -1894,10 +1880,8 @@ public I64 GrVLine(CDC *dc=gr.dc,I64 x,I64 y1,I64 y2,I64 z1=0,I64 z2=0)
else
dist=SqrI64(dc->cur_y-y2);
dist+=SqrI64(x-dc->cur_x);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_DONT_DRAW)
goto gr_done;