TempleOSCD_150720.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:22 +02:00
1 parent 401601816c
commit f8c05f98f4
554 files changed
+26046 -24853

No files matched your search

+15 -11
View File
@@ -20,10 +20,13 @@ U0 HoldCourt()
DocDblBufStart;
'\n';
accused=RandU32%3;
"%s",LstSub(accused,"A man \0A woman \0A child \0");
"%s",LstSub(accused,
"A man \0A woman \0A child \0");
crime=RandU32&3;
"%s",LstSub(crime,"commits murder\0commits adultery\0commits blasphemy\0commits idolatry\0");
"%s",LstSub(crime,
"commits murder\0commits adultery\0"
"commits blasphemy\0commits idolatry\0");
if (crime<=1) {
'' CH_SPACE;
@@ -35,13 +38,13 @@ U0 HoldCourt()
else
'.';
"\n\n\n\n"
"$$LM,4$$"
"\n\n$$BT,\"Show Mercy\",LE=0$$\n\n"
"\n\n$$BT,\"Punish\",LE=1$$\n\n"
"\n\n$$BT,\"Really Punish\",LE=2$$\n\n"
"$$LM,0$$";
"$$LM,4$$"
"\n\n$$BT,\"Show Mercy\",LE=0$$\n\n"
"\n\n$$BT,\"Punish\",LE=1$$\n\n"
"\n\n$$BT,\"Really Punish\",LE=2$$\n\n"
"$$LM,0$$";
DocDblBufEnd;
DocMenuDo(DocPut);
DocMenu(DocPut);
LBEqu(&(DocPut)->flags,DOCf_FORM,old_form);
DocBottom;
@@ -73,7 +76,7 @@ Bool TakeTurn()
Kill(Fs->song_task);
DocDblBufStart;
"$$LM,4$$"
"$$LM,4$$"
"\n\n$$BT,\"Break Camp\",LE=T_BREAK_CAMP$$\n\n"
"\n\n$$BT,\"Talk with God\",LE=T_TALK_WITH_GOD$$\n\n"
"\n\n$$BT,\"View Clouds\",LE=T_VIEW_CLOUDS$$\n\n"
@@ -87,7 +90,7 @@ Bool TakeTurn()
"\n\n$$BT,\"Quit\",LE=T_QUIT$$\n\n"
"$$LM,0$$";
DocDblBufEnd;
i=DocMenuDo(DocPut,DOF_DONT_TEXT_ATTR);
i=DocMenu(DocPut,DOF_DONT_TEXT_ATTR);
LBEqu(&(DocPut)->flags,DOCf_FORM,old_form);
DocBottom;
@@ -146,7 +149,8 @@ U0 TMsg(CDC *dc,U8 *msg)
dc->color=BLACK;
GrRect(dc,2,GR_HEIGHT-FONT_HEIGHT*3+2,GR_WIDTH-4,FONT_HEIGHT*2-4);
dc->color=YELLOW;
GrPrint(dc,(GR_WIDTH-StrLen(msg)*FONT_WIDTH)/2,GR_HEIGHT-5*FONT_HEIGHT/2,"%s",msg);
GrPrint(dc,(GR_WIDTH-StrLen(msg)*FONT_WIDTH)/2,
GR_HEIGHT-5*FONT_HEIGHT/2,"%s",msg);
WinMgrSync;
if (ScanChar)
throw;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+18 -16
View File
@@ -9,16 +9,17 @@ U0 MPDrawHoreb(CDC *dc2)
F64 s,m,a,x1,y1,x2,y2;
Obj *tempo;
GrIdentEqu(r);
GrRotYEqu(r,-é);
GrRotXEqu(r,77*ã/180);
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;
GrRot(r,&tempo->x1,&tempo->y1,&tempo->z1);
if (tempo->type==OT_SHEEP || tempo->type==OT_GOAT1 || tempo->type==OT_GOAT2) {
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;
GrRot(r,&dx,&dy,&dz);
Mat4x4MulXYZ(r,&dx,&dy,&dz);
if (dx<0)
tempo->sym=TRUE;
else
@@ -27,13 +28,14 @@ U0 MPDrawHoreb(CDC *dc2)
if (tempo->z1>=0) {
s=100.0/(AbsI64(tempo->z1)+50);
if (tempo->type) {
GrIdentEqu(dc->r);
GrScaleEqu(dc->r,s*2);
GrSetRotMat(dc,dc->r);
Mat4x4IdentEqu(dc->r);
Mat4x4Scale(dc->r,s*2);
DCMat4x4Set(dc,dc->r);
dc->flags|=DCF_TRANSFORMATION;
if (tempo->sym) {
dc->flags|=DCF_SYMMETRY|DCF_JUST_MIRROR;
GrSetSymmetry(dc,s*tempo->x1+cx,s*tempo->y1+h,s*tempo->x1+cx,s*tempo->y1+h+10);
DCSymmetrySet(dc,s*tempo->x1+cx,s*tempo->y1+h,
s*tempo->x1+cx,s*tempo->y1+h+10);
}
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,tempo->z1,imgs[tempo->type]);
} else {
@@ -69,12 +71,12 @@ U0 DrawHoreb(CTask *task,CDC *dc)
{
I64 i,x,y,z,w=task->pix_width,h=task->pix_height,r[16],cx=w>>1,cy=h>>1;
F64 s;
GrIdentEqu(r);
GrRotYEqu(r,-é);
GrRotXEqu(r,77*ã/180);
//Sun
Mat4x4IdentEqu(r);
Mat4x4RotY(r,-é);
Mat4x4RotX(r,77*ã/180);
//Sun
x=vx; y=0; z=1000000+vz;
GrRot(r,&x,&y,&z);
Mat4x4MulXYZ(r,&x,&y,&z);
s=100.0/(AbsI64(z)+50);
if (y<0) {
dc->color=BROWN;
@@ -82,7 +84,7 @@ U0 DrawHoreb(CTask *task,CDC *dc)
dc->color=YELLOW;
GrFloodFill(dc,s*x+cx,15);
}
DCAllocDepthBuf(dc);
DCDepthBufAlloc(dc);
mp_not_done_flags=1<<mp_cnt-1;
for (i=0;i<mp_cnt;i++)
JobQue(&MPDrawHoreb,dc,i);
+16 -14
View File
@@ -8,19 +8,19 @@ I64 ObjCompare(Obj *o1,Obj *o2)
U0 DrawHoreb(CTask *task,CDC *dc)
{
I64 i,j,x,y,z,dx,dy,dz,
w=task->pix_width,
h=task->pix_height,r[16],
cx=w>>1,cy=h>>1;
w=task->pix_width,
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;
GrIdentEqu(r);
GrRotYEqu(r,-é);
GrRotXEqu(r,77*ã/180);
Mat4x4IdentEqu(r);
Mat4x4RotY(r,-é);
Mat4x4RotX(r,77*ã/180);
//Sun
x=vx; y=0; z=1000000+vz;
GrRot(r,&x,&y,&z);
Mat4x4MulXYZ(r,&x,&y,&z);
s=100.0/(AbsI64(z)+50);
if (y<0) {
dc->color=BROWN;
@@ -33,10 +33,11 @@ U0 DrawHoreb(CTask *task,CDC *dc)
tempo=&objs[i];
o_sort[i]=tempo;
tempo->x1=tempo->x+vx; tempo->y1=tempo->y; tempo->z1=tempo->z+vz;
GrRot(r,&tempo->x1,&tempo->y1,&tempo->z1);
if (tempo->type==OT_SHEEP || tempo->type==OT_GOAT1 || tempo->type==OT_GOAT2) {
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;
GrRot(r,&dx,&dy,&dz);
Mat4x4MulXYZ(r,&dx,&dy,&dz);
if (dx<0)
tempo->sym=TRUE;
else
@@ -50,13 +51,14 @@ U0 DrawHoreb(CTask *task,CDC *dc)
if (tempo->z1<0) break;
s=100.0/(AbsI64(tempo->z1)+50);
if (tempo->type) {
GrIdentEqu(dc->r);
GrScaleEqu(dc->r,s*2);
GrSetRotMat(dc,dc->r);
Mat4x4IdentEqu(dc->r);
Mat4x4Scale(dc->r,s*2);
DCMat4x4Set(dc,dc->r);
dc->flags|=DCF_TRANSFORMATION;
if (tempo->sym) {
dc->flags|=DCF_SYMMETRY|DCF_JUST_MIRROR;
GrSetSymmetry(dc,s*tempo->x1+cx,s*tempo->y1+h,s*tempo->x1+cx,s*tempo->y1+h+10);
DCSymmetrySet(dc,s*tempo->x1+cx,s*tempo->y1+h,
s*tempo->x1+cx,s*tempo->y1+h+10);
}
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,0,imgs[tempo->type]);
} else {
+5 -3
View File
@@ -7,7 +7,8 @@ U0 AnimateTask(I64)
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) {
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;
@@ -97,11 +98,12 @@ U0 Horeb()
SettingsPush(Fs,TSF_SAME_SONG); //See $LK,"SettingsPush",A="MN:SettingsPush"$
try {
Fs->text_attr=YELLOW<<4+BLUE;
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_GRAB_SCROLL-WIF_FOCUS_TASK_MENU;
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS
-WIF_SELF_GRAB_SCROLL-WIF_FOCUS_TASK_MENU;
AutoComplete;
WinMax;
WinBorder;
Preempt(OFF);
Preempt;
DocClear;
"$$BG,LTCYAN$$%h6c",'\n';
+10 -9
View File
@@ -24,14 +24,14 @@ U0 DrawMap(CTask *,CDC *dc)
U0 AEMap()
{
I64 i=0,
cx=Fs->pix_width>>1,
cy=Fs->pix_height>>1,
c_min=MinI64(cx,cy),
*r=NULL,
x1=0,y1=0,z1=0,
x_last=x1,y_last=y1;
cx=Fs->pix_width>>1,
cy=Fs->pix_height>>1,
c_min=MinI64(cx,cy),
*r=NULL,
x1=0,y1=0,z1=0,
x_last=x1,y_last=y1;
F64 a,a1=(AE1_MAX+AE1_MIN)/2,a2=(AE2_MAX+AE2_MIN)/2,a2_total=a2,
x_scale=ToF64(cx)/c_min,y_scale=ToF64(cy)/c_min;
x_scale=ToF64(cx)/c_min,y_scale=ToF64(cy)/c_min;
CDC *dc=DCAlias;
SettingsPush(Fs,TSF_SAME_SONG); //See $LK,"SettingsPush",A="MN:SettingsPush"$
@@ -48,8 +48,9 @@ U0 AEMap()
if ( 0.0<=a<=AE1_MIN) a=AE1_MIN;
if (-AE1_MIN<=a<=0.0) a=-AE1_MIN;
Free(r);
r=GrRotZNew(a);
GrRot(r,&x1,&y1,&z1);
r=Mat4x4IdentNew;
Mat4x4RotZ(r,a);
Mat4x4MulXYZ(r,&x1,&y1,&z1);
a2=Clamp(Wrap(a2+(AE2_MAX+AE2_MIN)/5.0*(Rand-0.5)),-AE2_MAX,AE2_MAX);
a=a2;
Binary file not shown.