TempleOSCD_150216.ISO
This commit is contained in:
1 parent
64f679eeb9
commit
401601816c
531 files changed
+23341
-22071
No files matched your search
Binary file not shown.
@@ -17,9 +17,7 @@ U0 HoldCourt()
|
||||
I64 accused,crime,victim;
|
||||
Bool old_form=LBts(&(DocPut)->flags,DOCf_FORM);
|
||||
|
||||
FlushMsgs;
|
||||
DocDblBufStart;
|
||||
|
||||
'\n';
|
||||
accused=RandU32%3;
|
||||
"%s",LstSub(accused,"A man \0A woman \0A child \0");
|
||||
@@ -74,7 +72,6 @@ Bool TakeTurn()
|
||||
Camp(num_people);
|
||||
Kill(Fs->song_task);
|
||||
|
||||
FlushMsgs;
|
||||
DocDblBufStart;
|
||||
"$$LM,4$$"
|
||||
"\n\n$$BT,\"Break Camp\",LE=T_BREAK_CAMP$$\n\n"
|
||||
@@ -164,7 +161,6 @@ U0 Trailer()
|
||||
Cd(Fs->parent_task->cur_dir);
|
||||
Type("AESplash.TXT");
|
||||
Sleep(500);
|
||||
FlushMsgs;
|
||||
try {
|
||||
TMsg(dc,"Leaving all behind, they fled.");
|
||||
TMsg(dc,"Found themselves in a desert.");
|
||||
@@ -181,11 +177,11 @@ U0 AfterEgypt()
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
Fs->song_task=Spawn(&SongTask,NULL,"Song",,Fs);
|
||||
WinBorder;
|
||||
WordStat;
|
||||
AutoComplete;
|
||||
DocClear;
|
||||
WinMax;
|
||||
PopUp("Trailer;",Fs);
|
||||
WordStat;
|
||||
AutoComplete;
|
||||
try //Catch <CTRL-ALT-c>.
|
||||
while (TakeTurn);
|
||||
catch
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,19 +1,18 @@
|
||||
I64 type_weights[OT_NUM_TYPES]={30,30,15,30,30,1,1,1};
|
||||
I64 type_weights[OT_NUM_TYPES]={0,30,30,15,30,30,1,1,1};
|
||||
|
||||
I64 mp_not_done_flags;
|
||||
U0 MPDrawHoreb(CDC *dc2)
|
||||
{
|
||||
CTask *task=dc2->win_task;
|
||||
CDC *dc=DCAlias(dc2,task);
|
||||
I64 lo=Gs->num*O_NUM_OBJS/mp_cnt,hi=(Gs->num+1)*O_NUM_OBJS/mp_cnt,
|
||||
i,j,dx,dy,dz,w=task->pix_width,h=task->pix_height,r[16],cx=w>>1;
|
||||
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;
|
||||
|
||||
GrIdentEqu(r);
|
||||
GrRotYEqu(r,-é);
|
||||
GrRotXEqu(r,77*ã/180);
|
||||
for (i=lo;i<hi;i++) {
|
||||
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);
|
||||
@@ -27,15 +26,21 @@ U0 MPDrawHoreb(CDC *dc2)
|
||||
}
|
||||
if (tempo->z1>=0) {
|
||||
s=100.0/(AbsI64(tempo->z1)+50);
|
||||
GrIdentEqu(dc->r);
|
||||
GrScaleEqu(dc->r,s*2);
|
||||
GrSetRotMat(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);
|
||||
if (tempo->type) {
|
||||
GrIdentEqu(dc->r);
|
||||
GrScaleEqu(dc->r,s*2);
|
||||
GrSetRotMat(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);
|
||||
}
|
||||
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,tempo->z1,imgs[tempo->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);
|
||||
}
|
||||
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,tempo->z1,imgs[tempo->type]);
|
||||
dc->flags&=~(DCF_SYMMETRY|DCF_JUST_MIRROR);
|
||||
if (tempo==&objs[O_BURNING_BUSH]) {//draw burning bush
|
||||
dc->x=s*tempo->x1+cx;
|
||||
@@ -1,4 +1,4 @@
|
||||
I64 type_weights[OT_NUM_TYPES]={30,30,15,30,3,1,1,1};
|
||||
I64 type_weights[OT_NUM_TYPES]={0,30,30,15,30,3,1,1,1};
|
||||
|
||||
I64 ObjCompare(Obj *o1,Obj *o2)
|
||||
{
|
||||
@@ -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],*tempo;
|
||||
Obj *o_sort[O_NUM_OBJS+O_NUM_PEBBLES],*tempo;
|
||||
|
||||
GrIdentEqu(r);
|
||||
GrRotYEqu(r,-é);
|
||||
@@ -29,7 +29,7 @@ U0 DrawHoreb(CTask *task,CDC *dc)
|
||||
GrFloodFill(dc,s*x+cx,15);
|
||||
}
|
||||
|
||||
for (i=0;i<O_NUM_OBJS;i++) {
|
||||
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;
|
||||
@@ -43,21 +43,27 @@ U0 DrawHoreb(CTask *task,CDC *dc)
|
||||
tempo->sym=FALSE;
|
||||
}
|
||||
}
|
||||
QSortI64(o_sort,O_NUM_OBJS,&ObjCompare);
|
||||
QSortI64(o_sort,O_NUM_OBJS+O_NUM_PEBBLES,&ObjCompare);
|
||||
|
||||
for (i=0;i<O_NUM_OBJS;i++) {
|
||||
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);
|
||||
GrIdentEqu(dc->r);
|
||||
GrScaleEqu(dc->r,s*2);
|
||||
GrSetRotMat(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);
|
||||
if (tempo->type) {
|
||||
GrIdentEqu(dc->r);
|
||||
GrScaleEqu(dc->r,s*2);
|
||||
GrSetRotMat(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);
|
||||
}
|
||||
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,0,imgs[tempo->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);
|
||||
}
|
||||
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,0,imgs[tempo->type]);
|
||||
dc->flags&=~(DCF_SYMMETRY|DCF_JUST_MIRROR);
|
||||
if (o_sort[i]==&objs[O_BURNING_BUSH]) {//draw burning bush
|
||||
dc->x=s*tempo->x1+cx;
|
||||
@@ -5,7 +5,7 @@ U0 AnimateTask(I64)
|
||||
Obj *tempo;
|
||||
while (TRUE) {
|
||||
t=tS;
|
||||
for (i=0;i<O_NUM_OBJS;i++) {
|
||||
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;
|
||||
@@ -28,25 +28,28 @@ U0 Init()
|
||||
total+=type_weights[i];
|
||||
|
||||
MemSet(objs,0,sizeof(objs));
|
||||
for (i=0;i<O_NUM_OBJS;i++) {
|
||||
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;
|
||||
|
||||
k=0;
|
||||
j=RandU32%total;
|
||||
while (TRUE) {
|
||||
j-=type_weights[k];
|
||||
if (j<0)
|
||||
break;
|
||||
else
|
||||
k++;
|
||||
}
|
||||
|
||||
tempo->type=k;
|
||||
if (i<O_NUM_OBJS) {
|
||||
k=0;
|
||||
j=RandU32%total;
|
||||
while (TRUE) {
|
||||
j-=type_weights[k];
|
||||
if (j<0)
|
||||
break;
|
||||
else
|
||||
k++;
|
||||
}
|
||||
tempo->type=k;
|
||||
} else
|
||||
tempo->type=OT_PEBBLE;
|
||||
}
|
||||
objs[O_BURNING_BUSH].type=OT_BUSH1;
|
||||
|
||||
@@ -54,14 +57,14 @@ U0 Init()
|
||||
horeb_done=FALSE;
|
||||
}
|
||||
|
||||
#define ANIMATE_STEPS 10
|
||||
#define ANIMATE_STEPS 5
|
||||
|
||||
U0 AnimateéTask(F64 a)
|
||||
{
|
||||
I64 i;
|
||||
for (i=0;i<ANIMATE_STEPS;i++) {
|
||||
é+=a/ANIMATE_STEPS;
|
||||
Sleep(10);
|
||||
Sleep(20);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,31 +74,31 @@ U0 AnimateVTask(F64 v)
|
||||
for (i=0;i<ANIMATE_STEPS;i++) {
|
||||
vx+=v/ANIMATE_STEPS*Sin(é);
|
||||
vz+=v/ANIMATE_STEPS*Cos(é);
|
||||
Sleep(10);
|
||||
Sleep(20);
|
||||
}
|
||||
}
|
||||
|
||||
U0 Horeb()
|
||||
{
|
||||
I64 ch,sc;
|
||||
I64 sc;
|
||||
MenuPush(
|
||||
"File {"
|
||||
" Abort(,CH_SHIFT_ESC);"
|
||||
" Exit(,CH_ESC);"
|
||||
"}"
|
||||
"Play {"
|
||||
" Restart(,'\n');"
|
||||
" Fwd(,,SC_CURSOR_UP);"
|
||||
" Bwd(,,SC_CURSOR_DOWN);"
|
||||
" Left(,,SC_CURSOR_LEFT);"
|
||||
" Right(,,SC_CURSOR_RIGHT);"
|
||||
"}"
|
||||
);
|
||||
"File {"
|
||||
" Abort(,CH_SHIFT_ESC);"
|
||||
" Exit(,CH_ESC);"
|
||||
"}"
|
||||
"Play {"
|
||||
" Restart(,'\n');"
|
||||
" Fwd(,,SC_CURSOR_UP);"
|
||||
" Bwd(,,SC_CURSOR_DOWN);"
|
||||
" Left(,,SC_CURSOR_LEFT);"
|
||||
" Right(,,SC_CURSOR_RIGHT);"
|
||||
"}"
|
||||
);
|
||||
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;
|
||||
WordStat;
|
||||
AutoComplete;
|
||||
WinMax;
|
||||
WinBorder;
|
||||
Preempt(OFF);
|
||||
@@ -107,34 +110,31 @@ U0 Horeb()
|
||||
Init;
|
||||
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
|
||||
Fs->draw_it=&DrawHoreb;
|
||||
while (!horeb_done) {
|
||||
while (ScanKey(&ch,&sc))
|
||||
switch (ch) {
|
||||
case 0:
|
||||
switch (sc.u8[0]) {
|
||||
case SC_CURSOR_LEFT:
|
||||
Spawn(&AnimateéTask,(-ã/100)(I64),"Animate é",,Fs);
|
||||
break;
|
||||
case SC_CURSOR_RIGHT:
|
||||
Spawn(&AnimateéTask,( ã/100)(I64),"Animate é",,Fs);
|
||||
break;
|
||||
case SC_CURSOR_UP:
|
||||
Spawn(&AnimateVTask,(-40.0 )(I64),"Animate V",,Fs);
|
||||
break;
|
||||
case SC_CURSOR_DOWN:
|
||||
Spawn(&AnimateVTask,( 40.0 )(I64),"Animate V",,Fs);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case '\n':
|
||||
Init;
|
||||
break;
|
||||
case CH_SHIFT_ESC:
|
||||
case CH_ESC:
|
||||
goto hr_done;
|
||||
}
|
||||
WinMgrSync;
|
||||
}
|
||||
while (!horeb_done)
|
||||
switch (GetKey(&sc)) {
|
||||
case 0:
|
||||
switch (sc.u8[0]) {
|
||||
case SC_CURSOR_LEFT:
|
||||
Spawn(&AnimateéTask,(-ã/100)(I64),"Animate é",,Fs);
|
||||
break;
|
||||
case SC_CURSOR_RIGHT:
|
||||
Spawn(&AnimateéTask,( ã/100)(I64),"Animate é",,Fs);
|
||||
break;
|
||||
case SC_CURSOR_UP:
|
||||
Spawn(&AnimateVTask,(-40.0 )(I64),"Animate V",,Fs);
|
||||
break;
|
||||
case SC_CURSOR_DOWN:
|
||||
Spawn(&AnimateVTask,( 40.0 )(I64),"Animate V",,Fs);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case '\n':
|
||||
Init;
|
||||
break;
|
||||
case CH_SHIFT_ESC:
|
||||
case CH_ESC:
|
||||
goto hr_done;
|
||||
}
|
||||
hr_done: //Don't goto out of try
|
||||
} catch
|
||||
Fs->catch_except=TRUE;
|
||||
@@ -1,6 +1,6 @@
|
||||
#help_index "Games"
|
||||
|
||||
Cd("/Apps/AfterEgypt");;
|
||||
Cd(__DIR__);;
|
||||
#include "Comics"
|
||||
#include "/Demo/Graphics/Camp"
|
||||
#include "/Demo/MultiCore/Clouds"
|
||||
@@ -9,15 +9,15 @@ Cd("/Apps/AfterEgypt");;
|
||||
#include "Battle"
|
||||
#include "WaterRock"
|
||||
#include "Quail"
|
||||
#include "Horeb1"
|
||||
#include "HorebA"
|
||||
|
||||
#if mp_cnt>=4
|
||||
#include "Horeb2MP"
|
||||
#include "HorebBMP"
|
||||
#else
|
||||
#include "Horeb2SP"
|
||||
#include "HorebBSP"
|
||||
#endif
|
||||
|
||||
#include "Horeb3"
|
||||
#include "HorebC"
|
||||
#include "GodTalking"
|
||||
#include "AfterEgypt"
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Cd("/Apps/AfterEgypt");;
|
||||
Cd(__DIR__);;
|
||||
#include "Load"
|
||||
AfterEgypt;
|
||||
Binary file not shown.
Reference in new issue
Block a user