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

+2 -2
View File
@@ -132,7 +132,7 @@ Bool TakeTurn()
}
res=TRUE;
}
WinMgrSync;
Refresh;
Fs->song_task=NULL;
return res;
}
@@ -151,7 +151,7 @@ U0 TMsg(CDC *dc,U8 *msg)
dc->color=YELLOW;
GrPrint(dc,(GR_WIDTH-StrLen(msg)*FONT_WIDTH)/2,
GR_HEIGHT-5*FONT_HEIGHT/2,"%s",msg);
WinMgrSync;
Refresh;
if (ScanChar)
throw;
}
Binary file not shown.
+8 -8
View File
@@ -2,25 +2,25 @@ U0 ViewComics()
{
I64 i=0;
U8 *st;
CDirEntry *tempde=FilesFind("Comics/*.DD*"),*tempde1=tempde;
CDirEntry *tmpde=FilesFind("Comics/*.DD*"),*tmpde1=tmpde;
CDoc *doc=DocNew;
DocPrint(doc,"$$LTBLUE$$");
while (tempde) {
st=StrNew(tempde->name);
while (tmpde) {
st=StrNew(tmpde->name);
FileExtRem(st);
tempde->user_data=DocPrint(doc,"$$MU-UL,\"%-10ts\",LE=%d$$ ",st,tempde);
tmpde->user_data=DocPrint(doc,"$$MU-UL,\"%-10ts\",LE=%d$$ ",st,tmpde);
Free(st);
tempde=tempde->next;
tmpde=tmpde->next;
if ((i++&3)==3)
DocPrint(doc,"\n");
}
while (TRUE) {
if ((tempde=PopUpMenu(doc))>0)
Ed(tempde->full_name);
if ((tmpde=PopUpMenu(doc))>0)
Ed(tmpde->full_name);
else
break;
}
DocDel(doc);
DirTreeDel(tempde1);
DirTreeDel(tmpde1);
}
+23 -23
View File
@@ -7,47 +7,47 @@ U0 MPDrawHoreb(CDC *dc2)
CDC *dc=DCAlias(dc2,task);
I64 i,j,dx,dy,dz,w=task->pix_width,h=task->pix_height,r[16],cx=w>>1;
F64 s,m,a,x1,y1,x2,y2;
Obj *tempo;
Obj *tmpo;
Mat4x4IdentEqu(r);
Mat4x4RotY(r,-é);
Mat4x4RotX(r,77*ã/180);
for (i=Gs->num;i<O_NUM_OBJS+O_NUM_PEBBLES;i+=mp_cnt) {
tempo=&objs[i];
tempo->x1=tempo->x+vx; tempo->y1=tempo->y; tempo->z1=tempo->z+vz;
Mat4x4MulXYZ(r,&tempo->x1,&tempo->y1,&tempo->z1);
if (tempo->type==OT_SHEEP ||
tempo->type==OT_GOAT1 || tempo->type==OT_GOAT2) {
dx=100*tempo->dx; dy=100*tempo->dy; dz=100*tempo->dz;
tmpo=&objs[i];
tmpo->x1=tmpo->x+vx; tmpo->y1=tmpo->y; tmpo->z1=tmpo->z+vz;
Mat4x4MulXYZ(r,&tmpo->x1,&tmpo->y1,&tmpo->z1);
if (tmpo->type==OT_SHEEP ||
tmpo->type==OT_GOAT1 || tmpo->type==OT_GOAT2) {
dx=100*tmpo->dx; dy=100*tmpo->dy; dz=100*tmpo->dz;
Mat4x4MulXYZ(r,&dx,&dy,&dz);
if (dx<0)
tempo->sym=TRUE;
tmpo->sym=TRUE;
else
tempo->sym=FALSE;
tmpo->sym=FALSE;
}
if (tempo->z1>=0) {
s=100.0/(AbsI64(tempo->z1)+50);
if (tempo->type) {
if (tmpo->z1>=0) {
s=100.0/(AbsI64(tmpo->z1)+50);
if (tmpo->type) {
Mat4x4IdentEqu(dc->r);
Mat4x4Scale(dc->r,s*2);
DCMat4x4Set(dc,dc->r);
dc->flags|=DCF_TRANSFORMATION;
if (tempo->sym) {
if (tmpo->sym) {
dc->flags|=DCF_SYMMETRY|DCF_JUST_MIRROR;
DCSymmetrySet(dc,s*tempo->x1+cx,s*tempo->y1+h,
s*tempo->x1+cx,s*tempo->y1+h+10);
DCSymmetrySet(dc,s*tmpo->x1+cx,s*tmpo->y1+h,
s*tmpo->x1+cx,s*tmpo->y1+h+10);
}
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,tempo->z1,imgs[tempo->type]);
Sprite3B(dc,s*tmpo->x1+cx,s*tmpo->y1+h,tmpo->z1,imgs[tmpo->type]);
} else {
dc->flags&=~DCF_TRANSFORMATION;
dc->color=pebble_colors[tempo->num&3];
GrPlot3(dc,s*tempo->x1+cx,s*tempo->y1+h,tempo->z1);
dc->color=pebble_colors[tmpo->num&3];
GrPlot3(dc,s*tmpo->x1+cx,s*tmpo->y1+h,tmpo->z1);
}
dc->flags&=~(DCF_SYMMETRY|DCF_JUST_MIRROR);
if (tempo==&objs[O_BURNING_BUSH]) {//draw burning bush
dc->x=s*tempo->x1+cx;
dc->y=s*tempo->y1+h;
dc->z=tempo->z1;
if (tmpo==&objs[O_BURNING_BUSH]) {//draw burning bush
dc->x=s*tmpo->x1+cx;
dc->y=s*tmpo->y1+h;
dc->z=tmpo->z1;
dc->pen_width=1;
dc->color=winmgr.updates&15;
for (j=0;j<45;j++) {
@@ -57,7 +57,7 @@ U0 MPDrawHoreb(CDC *dc2)
P2R(&x2,&y2,m,a);
GrLine3(dc,20*x1,20*y1-25,0,20*x2,20*y2-25,0);
}
if (SqrI64(s*tempo->x1)+SqrI64(s*tempo->y1)<300*300)
if (SqrI64(s*tmpo->x1)+SqrI64(s*tmpo->y1)<300*300)
horeb_done=TRUE;
}
}
+23 -23
View File
@@ -12,7 +12,7 @@ U0 DrawHoreb(CTask *task,CDC *dc)
h=task->pix_height,r[16],
cx=w>>1,cy=h>>1;
F64 s,m,a,x1,y1,x2,y2;
Obj *o_sort[O_NUM_OBJS+O_NUM_PEBBLES],*tempo;
Obj *o_sort[O_NUM_OBJS+O_NUM_PEBBLES],*tmpo;
Mat4x4IdentEqu(r);
Mat4x4RotY(r,-é);
@@ -30,46 +30,46 @@ U0 DrawHoreb(CTask *task,CDC *dc)
}
for (i=0;i<O_NUM_OBJS+O_NUM_PEBBLES;i++) {
tempo=&objs[i];
o_sort[i]=tempo;
tempo->x1=tempo->x+vx; tempo->y1=tempo->y; tempo->z1=tempo->z+vz;
Mat4x4MulXYZ(r,&tempo->x1,&tempo->y1,&tempo->z1);
if (tempo->type==OT_SHEEP ||
tempo->type==OT_GOAT1 || tempo->type==OT_GOAT2) {
dx=100*tempo->dx; dy=100*tempo->dy; dz=100*tempo->dz;
tmpo=&objs[i];
o_sort[i]=tmpo;
tmpo->x1=tmpo->x+vx; tmpo->y1=tmpo->y; tmpo->z1=tmpo->z+vz;
Mat4x4MulXYZ(r,&tmpo->x1,&tmpo->y1,&tmpo->z1);
if (tmpo->type==OT_SHEEP ||
tmpo->type==OT_GOAT1 || tmpo->type==OT_GOAT2) {
dx=100*tmpo->dx; dy=100*tmpo->dy; dz=100*tmpo->dz;
Mat4x4MulXYZ(r,&dx,&dy,&dz);
if (dx<0)
tempo->sym=TRUE;
tmpo->sym=TRUE;
else
tempo->sym=FALSE;
tmpo->sym=FALSE;
}
}
QSortI64(o_sort,O_NUM_OBJS+O_NUM_PEBBLES,&ObjCompare);
for (i=0;i<O_NUM_OBJS+O_NUM_PEBBLES;i++) {
tempo=o_sort[i];
if (tempo->z1<0) break;
s=100.0/(AbsI64(tempo->z1)+50);
if (tempo->type) {
tmpo=o_sort[i];
if (tmpo->z1<0) break;
s=100.0/(AbsI64(tmpo->z1)+50);
if (tmpo->type) {
Mat4x4IdentEqu(dc->r);
Mat4x4Scale(dc->r,s*2);
DCMat4x4Set(dc,dc->r);
dc->flags|=DCF_TRANSFORMATION;
if (tempo->sym) {
if (tmpo->sym) {
dc->flags|=DCF_SYMMETRY|DCF_JUST_MIRROR;
DCSymmetrySet(dc,s*tempo->x1+cx,s*tempo->y1+h,
s*tempo->x1+cx,s*tempo->y1+h+10);
DCSymmetrySet(dc,s*tmpo->x1+cx,s*tmpo->y1+h,
s*tmpo->x1+cx,s*tmpo->y1+h+10);
}
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,0,imgs[tempo->type]);
Sprite3B(dc,s*tmpo->x1+cx,s*tmpo->y1+h,0,imgs[tmpo->type]);
} else {
dc->flags&=~DCF_TRANSFORMATION;
dc->color=pebble_colors[tempo->num&3];
GrPlot3(dc,s*tempo->x1+cx,s*tempo->y1+h,tempo->z1);
dc->color=pebble_colors[tmpo->num&3];
GrPlot3(dc,s*tmpo->x1+cx,s*tmpo->y1+h,tmpo->z1);
}
dc->flags&=~(DCF_SYMMETRY|DCF_JUST_MIRROR);
if (o_sort[i]==&objs[O_BURNING_BUSH]) {//draw burning bush
dc->x=s*tempo->x1+cx;
dc->y=s*tempo->y1+h;
dc->x=s*tmpo->x1+cx;
dc->y=s*tmpo->y1+h;
dc->z=0;
dc->pen_width=1;
@@ -82,7 +82,7 @@ U0 DrawHoreb(CTask *task,CDC *dc)
GrLine3(dc,20*x1,20*y1-25,0,20*x2,20*y2-25,0);
}
if (SqrI64(s*tempo->x1)+SqrI64(s*tempo->y1)<300*300)
if (SqrI64(s*tmpo->x1)+SqrI64(s*tmpo->y1)<300*300)
horeb_done=TRUE;
}
}
+19 -19
View File
@@ -2,18 +2,18 @@ U0 AnimateTask(I64)
{
I64 i;
F64 t;
Obj *tempo;
Obj *tmpo;
while (TRUE) {
t=tS;
for (i=0;i<O_NUM_OBJS+O_NUM_PEBBLES;i++) {
tempo=&objs[i];
if (tempo->type==OT_SHEEP ||
tempo->type==OT_GOAT1 || tempo->type==OT_GOAT2) {
tempo->x+=tempo->dx;
tempo->y+=tempo->dy;
tempo->z+=tempo->dz;
tempo->dx=5*Cos(0.5*t+tempo->é);
tempo->dz=5*Sin(0.5*t+tempo->é);
tmpo=&objs[i];
if (tmpo->type==OT_SHEEP ||
tmpo->type==OT_GOAT1 || tmpo->type==OT_GOAT2) {
tmpo->x+=tmpo->dx;
tmpo->y+=tmpo->dy;
tmpo->z+=tmpo->dz;
tmpo->dx=5*Cos(0.5*t+tmpo->é);
tmpo->dz=5*Sin(0.5*t+tmpo->é);
}
}
Sleep(20);
@@ -22,7 +22,7 @@ U0 AnimateTask(I64)
U0 Init()
{
Obj *tempo;
Obj *tmpo;
I64 i,j,k,total=0;
for (i=0;i<OT_NUM_TYPES;i++)
@@ -30,13 +30,13 @@ U0 Init()
MemSet(objs,0,sizeof(objs));
for (i=0;i<O_NUM_OBJS+O_NUM_PEBBLES;i++) {
tempo=&objs[i];
tempo->num=i;
tempo->x=RandU32&0x1FFF-0x1000;
tempo->y=0;
tempo->z=RandU32&0x1FFF-0x1000;
tempo->é=2*ã*Rand;
tempo->sym=RandU16&1;
tmpo=&objs[i];
tmpo->num=i;
tmpo->x=RandU32&0x1FFF-0x1000;
tmpo->y=0;
tmpo->z=RandU32&0x1FFF-0x1000;
tmpo->é=2*ã*Rand;
tmpo->sym=RandU16&1;
if (i<O_NUM_OBJS) {
k=0;
@@ -48,9 +48,9 @@ U0 Init()
else
k++;
}
tempo->type=k;
tmpo->type=k;
} else
tempo->type=OT_PEBBLE;
tmpo->type=OT_PEBBLE;
}
objs[O_BURNING_BUSH].type=OT_BUSH1;
Binary file not shown.
Binary file not shown.