TempleOSCDV4.05.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:13 +02:00
1 parent d1856315e0
commit 6fe38d2d9d
118 files changed
+4559 -5069

No files matched your search

+7 -7
View File
@@ -9,7 +9,7 @@ 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;
}
@@ -102,7 +102,7 @@ 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;
}
@@ -669,7 +669,7 @@ 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;
}
@@ -961,7 +961,7 @@ 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;
}
@@ -1515,7 +1515,7 @@ 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;
}
@@ -1592,7 +1592,7 @@ 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;
}
@@ -1721,7 +1721,7 @@ 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;
}
+2 -1
View File
@@ -36,7 +36,8 @@ public class CGrGlbls
I64 screen_zoom,sx,sy;
//When zoomed, this keeps the mouse centered.
Bool continuous_scroll;
Bool continuous_scroll,
hide_row,hide_col;
} gr;
//See $LK,"RLf_VGA",A="FF:::/Kernel/KStart.CPP,RLf_VGA"$
+1 -1
View File
@@ -384,7 +384,7 @@ public Bool GrPlot3(CDC *dc=gr.dc,I64 x,I64 y,I64 z)
}
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;
}
+4 -4
View File
@@ -172,7 +172,7 @@ U0 GrUpdateTextBG()
Bool blink_flag=Blink;
U8 *dst2=dst;
if (gr.pan_text_x) {
if (gr.pan_text_x||gr.hide_col) {
gr.pan_text_x=ClampI64(gr.pan_text_x,-7,7);
j=AbsI64(gr.pan_text_x)/FONT_WIDTH+1;
num_cols-=j;
@@ -197,7 +197,7 @@ U0 GrUpdateTextBG()
}
dst=dst2;
if (gr.pan_text_y) {
if (gr.pan_text_y||gr.hide_row) {
gr.pan_text_y=ClampI64(gr.pan_text_y,-7,7);
j=AbsI64(gr.pan_text_y)/FONT_HEIGHT+1;
num_rows-=j;
@@ -261,7 +261,7 @@ U0 GrUpdateTextFG()
U8 *dst_start=gr.dc2->body,*dst_end=dst_start+w1*gr.dc2->height-7*w1-8;
Bool blink_flag=Blink;
if (gr.pan_text_x) {
if (gr.pan_text_x||gr.hide_col) {
gr.pan_text_x=ClampI64(gr.pan_text_x,-7,7);
j=AbsI64(gr.pan_text_x)/FONT_WIDTH+1;
num_cols-=j;
@@ -273,7 +273,7 @@ U0 GrUpdateTextFG()
w2+=j*FONT_WIDTH;
}
if (gr.pan_text_y) {
if (gr.pan_text_y||gr.hide_row) {
gr.pan_text_y=ClampI64(gr.pan_text_y,-7,7);
j=AbsI64(gr.pan_text_y)/FONT_HEIGHT+1;
num_rows-=j;
+26 -26
View File
@@ -238,7 +238,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
g.type=type;
LexD2I32(cc,&g.pp.x1);
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
Lex(cc); //Skip ,
LexD2I32(cc,&g.pp.x2);
break;
@@ -247,7 +247,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
Lex(cc); //Skip {
LexD2I32(cc,&g.pp.x1);
if (cc->token!=':')
LexExcept(cc,"expecting ':' at ");
LexExcept(cc,"Expecting ':' at ");
Lex(cc); //Skip :
LexD2I32(cc,&g.pp.x2);
g.ppa.x2+=g.pp.x1;
@@ -289,7 +289,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
g.type=SPT_CIRCLE;
LexD2I32(cc,&g.pr.x1);
if (cc->token!=':')
LexExcept(cc,"expecting ':' at ");
LexExcept(cc,"Expecting ':' at ");
Lex(cc); //Skip :
g.pr.radius=LexExpressionI64(cc);
break;
@@ -297,17 +297,17 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
Lex(cc); //Skip {
g.pwhas.sides=LexExpressionI64(cc);
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
case SPT_ELLIPSE:
Lex(cc); //Skip {
g.type=type;
LexD2I32(cc,&g.pwha.x1);
if (cc->token!=':')
LexExcept(cc,"expecting ':' at ");
LexExcept(cc,"Expecting ':' at ");
Lex(cc); //Skip :
LexD2I32(cc,&g.pwha.width);
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
Lex(cc); //Skip ,
g.pwha.angle=ã/180*LexExpressionF64(cc);
break;
@@ -323,11 +323,11 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
g.type=type;
LexD2I32(cc,&g.ps.x1);
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
if (Lex(cc)==TK_STR) //Skip ,
st=LexExtStr(cc);
else
LexExcept(cc,"expecting string at ");
LexExcept(cc,"Expecting string at ");
size=SpriteElemQuedBaseSize(type);
i=StrLen(st)+1;
result=MAlloc(size+i);
@@ -348,7 +348,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
Lex(cc); //Skip ,
}
if (g.nu.num<2)
LexExcept(cc,"expecting point at ");
LexExcept(cc,"Expecting point at ");
size=SpriteElemQuedBaseSize(SPT_POLYLINE);
result=MAlloc(size+g.nu.num*sizeof(CD2I32));
MemCpy(result,&g,size);
@@ -377,7 +377,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
Lex(cc); //Skip ,
}
if (g.nu.num<2)
LexExcept(cc,"expecting point at ");
LexExcept(cc,"Expecting point at ");
size=SpriteElemQuedBaseSize(type);
result=MAlloc(size+g.nu.num*sizeof(CD3I32));
if (LexExpressionI64(cc)) {
@@ -406,11 +406,11 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
Lex(cc); //Skip {
LexD2I32(cc,&g.npu.x);
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
tempv=QueVectU8New;
while (TRUE) {
if (!(i=LexGetChar(cc)))
LexExcept(cc,"expecting '}' at ");
LexExcept(cc,"Expecting '}' at ");
if (i=='}')
break;
if ('0'<=i<='7')
@@ -431,16 +431,16 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
Lex(cc); //Skip {
LexD2I32(cc,&g.pwhu.x1);
if (cc->token!=':')
LexExcept(cc,"expecting ':' at ");
LexExcept(cc,"Expecting ':' at ");
Lex(cc); //Skip :
LexD2I32(cc,&g.pwhu.width);
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
tempv=QueVectU8New;
num1=0;
while (TRUE) {
if (!(i=ToUpper(LexGetChar(cc))))
LexExcept(cc,"expecting '}' at ");
LexExcept(cc,"Expecting '}' at ");
if (i=='}')
break;
if ('0'<=i<='9')
@@ -469,16 +469,16 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
if (LexExpressionI64(cc)) {
g.type=SPT_SHIFTABLE_MESH;
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
Lex(cc); //Skip ,
LexD3I32(cc,&g.pmu.x);
if (cc->token!=':')
LexExcept(cc,"expecting ':' at ");
LexExcept(cc,"Expecting ':' at ");
Lex(cc); //Skip :
} else {
g.type=SPT_MESH;
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
Lex(cc); //Skip ,
}
num1=0;
@@ -492,7 +492,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
Lex(cc); //Skip ,
}
if (cc->token!=':')
LexExcept(cc,"expecting ':' at ");
LexExcept(cc,"Expecting ':' at ");
Lex(cc); //Skip :
num2=0;
QueInit(&roott);
@@ -503,19 +503,19 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
Free(st);
Lex(cc); //Skip color
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
Lex(cc); //Skip ,
tempt->nums[0]=LexExpressionI64(cc);
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
Lex(cc); //Skip ,
tempt->nums[1]=LexExpressionI64(cc);
if (cc->token!=',')
LexExcept(cc,"expecting ',' at ");
LexExcept(cc,"Expecting ',' at ");
Lex(cc); //Skip ,
tempt->nums[2]=LexExpressionI64(cc);
if (cc->token!=')')
LexExcept(cc,"expecting ')' at ");
LexExcept(cc,"Expecting ')' at ");
Lex(cc); //Skip )
QueIns(tempt,roott.last);
num2++;
@@ -553,9 +553,9 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
break;
}
if (cc->token!='}')
LexExcept(cc,"expecting '}' at ");
LexExcept(cc,"Expecting '}' at ");
if (Lex(cc)!=';')
LexExcept(cc,"expecting ';' at ");
LexExcept(cc,"Expecting ';' at ");
return result;
}
@@ -580,7 +580,7 @@ public U8 *Code2Sprite(CDoc *doc,I64 *_size=NULL)
if (Lex(cc)=='{') //Skip ident
QueIns(Code2SpriteElem(cc,i),root.last);
} else if (cc->token)
LexExcept(cc,"expecting sprite element type name at ");
LexExcept(cc,"Expecting sprite element type name at ");
} while (cc->token);
okay=TRUE;
} catch {