TempleOSCDV4.12.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:56 +02:00
1 parent 93ca216483
commit b84bbff6db
381 files changed
+18356 -18798

No files matched your search

+14 -14
View File
@@ -2,13 +2,13 @@
public Bool GrClamp(CDC *dc=gr.dc,I64 *left,I64 *top,I64 *right,I64 *bottom,
I64 width=0,I64 height=0)
{//Returns screen, not window coordinates.
{//Returns scrn, not window coordinates.
CTask *win_task;
*left=0;
*top=0;
*right=dc->width-1;
*bottom=dc->height-1;
if (dc->flags & DCF_SCREEN_BITMAP) {
if (dc->flags & DCF_SCRN_BITMAP) {
win_task=dc->win_task;
if (GR_WIDTH-1<*right)
*right=GR_WIDTH-1;
@@ -32,11 +32,11 @@ public Bool GrClamp(CDC *dc=gr.dc,I64 *left,I64 *top,I64 *right,I64 *bottom,
Bool DCClipLine(CDC *dc=gr.dc,I64 *x1,I64 *y1,I64 *x2,I64 *y2,
I64 width=0,I64 height=0)
{//Also converts window to screen coordinates
{//Also converts window to scrn coordinates
I64 left,top,right,bottom;
CTask *win_task;
if (GrClamp(dc,&left,&top,&right,&bottom,width,height)) {
if (dc->flags & DCF_SCREEN_BITMAP) {
if (dc->flags & DCF_SCRN_BITMAP) {
win_task=dc->win_task;
*x1+=win_task->pix_left+win_task->scroll_x;
*y1+=win_task->pix_top+win_task->scroll_y;
@@ -60,12 +60,12 @@ public Bool GrPlot(CDC *dc=gr.dc,I64 x,I64 y)
dc->color.c0.rop=ROPB_MONO;
GrBlot(dc,x,y,dc->brush);
dc->color=old_color;
} else if (dc->flags & DCF_SCREEN_BITMAP) {
} else if (dc->flags & DCF_SCRN_BITMAP) {
win_task=dc->win_task;
x+=win_task->pix_left+win_task->scroll_x;
y+=win_task->pix_top+win_task->scroll_y;
if (win_task->pix_left<=x<=win_task->pix_right &&
win_task->pix_top <=y<=win_task->pix_bottom &&
win_task->pix_top<=y<=win_task->pix_bottom &&
0<=x<dc->width && 0<=y<dc->height &&
(win_task->next_task==sys_winmgr_task ||
dc->flags&DCF_ON_TOP ||
@@ -91,7 +91,7 @@ Bool GrPlot1(CDC *dc=gr.dc,I64 x,I64 y)
else
GrBlot(dc,x,y,dc->brush);
dc->color=old_color;
} else if (dc->flags & DCF_SCREEN_BITMAP) {
} else if (dc->flags & DCF_SCRN_BITMAP) {
win_task=dc->win_task;
x+=win_task->pix_left+win_task->scroll_x;
y+=win_task->pix_top+win_task->scroll_y;
@@ -110,9 +110,9 @@ Bool GrPlot1(CDC *dc=gr.dc,I64 x,I64 y)
public I64 GrPeek(CDC *dc=gr.dc,I64 x,I64 y)
{//2D. Clipping but no transformation.
//Returns pix color or -1 if off-screen or covered.
//Returns pix color or -1 if off-scrn or covered.
CTask *win_task;
if (dc->flags & DCF_SCREEN_BITMAP) {
if (dc->flags & DCF_SCRN_BITMAP) {
win_task=dc->win_task;
x+=win_task->pix_left+win_task->scroll_x;
y+=win_task->pix_top+win_task->scroll_y;
@@ -512,7 +512,7 @@ public Bool GrPlot3(CDC *dc=gr.dc,I64 x,I64 y,I64 z)
}
}
if (record) {
if (dc->flags & DCF_SCREEN_BITMAP) {
if (dc->flags & DCF_SCRN_BITMAP) {
win_task=dc->win_task;
x+=win_task->pix_left+win_task->scroll_x;
y+=win_task->pix_top+win_task->scroll_y;
@@ -550,7 +550,7 @@ gr_done:
Bool GrLinePlot0(CDC *dc,I64 x,I64 y,I64 z)
{//This is a callback.
CTask *win_task=dc->win_task;
if (!(dc->flags & DCF_SCREEN_BITMAP) ||
if (!(dc->flags & DCF_SCRN_BITMAP) ||
win_task->next_task==sys_winmgr_task ||
dc->flags&DCF_ON_TOP ||
!IsPixCovered0(win_task,x,y)) {
@@ -1204,7 +1204,7 @@ normal_image:
x1+=dx1; y1+=dy1; z1+=dz1;
x+=dw;
}
res=1; //TODO: check off screen
res=1; //TODO: check off scrn
} else
res=GrBlot(dc,x1,y1,img);
gr_done:
@@ -1415,7 +1415,7 @@ public I64 GrFillTri0(CDC *dc=gr.dc,CD3I32 *p1,CD3I32 *p2,CD3I32 *p4)
min=0;
max=dc->height;
if (dc->flags & DCF_SCREEN_BITMAP) {
if (dc->flags & DCF_SCRN_BITMAP) {
win_task=dc->win_task;
min-=win_task->scroll_y+win_task->pix_top;
max-=win_task->scroll_y+win_task->pix_top;
@@ -1623,7 +1623,7 @@ public I64 GrFillTri0(CDC *dc=gr.dc,CD3I32 *p1,CD3I32 *p2,CD3I32 *p4)
min=0;
max=dc->width;
if (dc->flags & DCF_SCREEN_BITMAP) {
if (dc->flags & DCF_SCRN_BITMAP) {
win_task=dc->win_task;
min-=win_task->scroll_x+win_task->pix_left;
max-=win_task->scroll_x+win_task->pix_left;