TempleOSTS_140317.ISO
This commit is contained in:
1 parent
2d2a65d572
commit
7ef616a20e
1416 files changed
+223873
-53917
No files matched your search
Binary file not shown.
@@ -0,0 +1,198 @@
|
||||
I64 num_people=100;
|
||||
|
||||
|
||||
U0 SongTask(I64)
|
||||
{ //Song by the Holy Spirit
|
||||
Fs->task_end_cb=&SndTaskEndCB;
|
||||
MusicSettingsRst;
|
||||
while (TRUE) {
|
||||
Play("3eGFqGetBEFeBEEFetBDCeCFqF");
|
||||
Play("eGFqGetBEFeBEEFetBDCeCFqF");
|
||||
Play("AetDAAqBDeBEqEetECDGBG");
|
||||
Play("qAetDAAqBDeBEqEetECDGBG");
|
||||
}
|
||||
}
|
||||
|
||||
U0 HoldCourt()
|
||||
{
|
||||
I64 accused,crime,victim;
|
||||
Bool old_form=LBts(&(DocPut)->flags,DOCf_FORM);
|
||||
|
||||
FlushMsgs;
|
||||
DocDblBufStart;
|
||||
|
||||
NewLine;
|
||||
accused=RandU32%3;
|
||||
"%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");
|
||||
|
||||
if (crime<=1) {
|
||||
'' CH_SPACE;
|
||||
victim=RandU32%3;
|
||||
"%s",LstSub(victim,"to a man\0to a woman\0to a child\0to an animal\0");
|
||||
}
|
||||
if (!(RandU32%5))
|
||||
", again!";
|
||||
else
|
||||
'.';
|
||||
NewLine(4);
|
||||
|
||||
"$$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);
|
||||
|
||||
LBEqu(&(DocPut)->flags,DOCf_FORM,old_form);
|
||||
DocBottom;
|
||||
}
|
||||
|
||||
#define T_BREAK_CAMP 0
|
||||
#define T_TALK_WITH_GOD 1
|
||||
#define T_VIEW_CLOUDS 2
|
||||
#define T_HOLD_COURT 3
|
||||
#define T_VIEW_MAP 4
|
||||
#define T_WATER_ROCK 5
|
||||
#define T_BATTLE 6
|
||||
#define T_QUAIL 7
|
||||
#define T_MOSES_COMICS 8
|
||||
#define T_HELP 9
|
||||
#define T_QUIT 10
|
||||
|
||||
|
||||
Bool TakeTurn()
|
||||
{
|
||||
I64 i;
|
||||
Bool result,old_form=LBts(&(DocPut)->flags,DOCf_FORM);
|
||||
num_people*=1.0+0.01*((RandU16%100)-30);
|
||||
if (num_people>MAX_PEOPLE)
|
||||
num_people=MAX_PEOPLE;
|
||||
|
||||
if (!Fs->song_task)
|
||||
Fs->song_task=Spawn(&SongTask,NULL,"Song",,Fs);
|
||||
Camp(num_people);
|
||||
Kill(Fs->song_task);
|
||||
|
||||
FlushMsgs;
|
||||
DocDblBufStart;
|
||||
"$$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"
|
||||
"\n\n$$BT,\"Hold Court\",LE=T_HOLD_COURT$$\n\n"
|
||||
"\n\n$$BT,\"View Map\",LE=T_VIEW_MAP$$\n\n"
|
||||
"\n\n$$BT,\"Make Water\",LE=T_WATER_ROCK$$\n\n"
|
||||
"\n\n$$BT,\"Battle\",LE=T_BATTLE$$\n\n"
|
||||
"\n\n$$BT,\"Beg for Meat\",LE=T_QUAIL$$\n\n"
|
||||
"\n\n$$BT,\"Moses Comics\",LE=T_MOSES_COMICS$$\n\n"
|
||||
"\n\n$$BT,\"Help\",LE=T_HELP$$\n\n"
|
||||
"\n\n$$BT,\"Quit\",LE=T_QUIT$$\n\n"
|
||||
"$$LM,0$$";
|
||||
DocDblBufEnd;
|
||||
i=DocMenuDo(DocPut,DOF_DONT_TEXT_ATTR);
|
||||
|
||||
LBEqu(&(DocPut)->flags,DOCf_FORM,old_form);
|
||||
DocBottom;
|
||||
|
||||
if (!(0<=i<T_QUIT))
|
||||
result=FALSE;
|
||||
else {
|
||||
switch (i) {
|
||||
case T_BREAK_CAMP:
|
||||
break;
|
||||
case T_TALK_WITH_GOD:
|
||||
UpTheMountain;
|
||||
break;
|
||||
case T_VIEW_CLOUDS:
|
||||
CloudScene;
|
||||
break;
|
||||
case T_HOLD_COURT:
|
||||
HoldCourt;
|
||||
break;
|
||||
case T_VIEW_MAP:
|
||||
AEMap;
|
||||
break;
|
||||
case T_WATER_ROCK:
|
||||
WaterRock;
|
||||
break;
|
||||
case T_BATTLE:
|
||||
Battle;
|
||||
break;
|
||||
case T_QUAIL:
|
||||
Quail;
|
||||
break;
|
||||
case T_MOSES_COMICS:
|
||||
ViewComics;
|
||||
break;
|
||||
case T_HELP:
|
||||
PopUp("Ed(\"::/Adam/God/HSNotes.TXT.Z\");",Fs);
|
||||
PopUpOk("Add your own story-line...\nLike old school toys.\n");
|
||||
break;
|
||||
}
|
||||
result=TRUE;
|
||||
}
|
||||
WinMgrSync;
|
||||
Fs->song_task=NULL;
|
||||
return result;
|
||||
}
|
||||
|
||||
U0 TMsg(CDC *dc,U8 *msg)
|
||||
{
|
||||
F64 t0=tS;
|
||||
while (tS-t0<1.5) {
|
||||
if (Blink(5))
|
||||
dc->color=BLACK;
|
||||
else
|
||||
dc->color=RED;
|
||||
GrRect(dc,0,GR_HEIGHT-FONT_HEIGHT*3,GR_WIDTH,FONT_HEIGHT*2);
|
||||
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);
|
||||
WinMgrSync;
|
||||
if (ScanChar)
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
U0 Trailer()
|
||||
{
|
||||
CDC *dc=DCAlias;
|
||||
WinMax;
|
||||
WinBorder;
|
||||
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.");
|
||||
TMsg(dc,"God! We're gonna die!");
|
||||
TMsg(dc,"\"Trust Me!\"");
|
||||
} catch
|
||||
Fs->catch_except=TRUE;
|
||||
DCFill;
|
||||
DCDel(dc);
|
||||
}
|
||||
|
||||
U0 AfterEgypt()
|
||||
{
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
Fs->song_task=Spawn(&SongTask,NULL,"Song",,Fs);
|
||||
WinBorder;
|
||||
WordStat;
|
||||
DocClear;
|
||||
WinMax;
|
||||
PopUp("Trailer;",Fs);
|
||||
WordStat;
|
||||
try //This is to catch <CTRL-ALT-C>.
|
||||
while (TakeTurn);
|
||||
catch
|
||||
PutExcept;
|
||||
DocClear;
|
||||
SettingsPop;
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
U0 ViewComics()
|
||||
{
|
||||
I64 i=0;
|
||||
U8 *st;
|
||||
CDirEntry *tempde=FilesFind("Comics/*.TXT*"),*tempde1=tempde;
|
||||
CDoc *doc=DocNew;
|
||||
DocPrint(doc,"$$LTBLUE$$");
|
||||
while (tempde) {
|
||||
st=StrNew(tempde->name);
|
||||
FileExtRem(st);
|
||||
tempde->user_data=DocPrint(doc,"$$MU-UL,\"%-10ts\",LE=%d$$ ",st,tempde);
|
||||
Free(st);
|
||||
tempde=tempde->next;
|
||||
if ((i++&3)==3)
|
||||
DocPrint(doc,"\n");
|
||||
}
|
||||
while (TRUE) {
|
||||
if ((tempde=PopUpMenu(doc))>0)
|
||||
Ed(tempde->full_name);
|
||||
else
|
||||
break;
|
||||
}
|
||||
DocDel(doc);
|
||||
DirLstDel(tempde1);
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,90 @@
|
||||
I64 type_weights[OT_NUM_TYPES]={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;
|
||||
F64 s,m,a,x1,y1,x2,y2;
|
||||
Obj *tempo;
|
||||
|
||||
GrIdentEqu(r);
|
||||
GrRotYEqu(r,-é);
|
||||
GrRotXEqu(r,77*ã/180);
|
||||
for (i=lo;i<hi;i++) {
|
||||
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) {
|
||||
dx=100*tempo->dx; dy=100*tempo->dy; dz=100*tempo->dz;
|
||||
GrRot(r,&dx,&dy,&dz);
|
||||
if (dx<0)
|
||||
tempo->sym=TRUE;
|
||||
else
|
||||
tempo->sym=FALSE;
|
||||
}
|
||||
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);
|
||||
}
|
||||
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;
|
||||
dc->y=s*tempo->y1+h;
|
||||
dc->z=tempo->z1;
|
||||
dc->pen_width=1;
|
||||
dc->color=win_updates&15;
|
||||
for (j=0;j<45;j++) {
|
||||
m=Sqr(Rand); a=2*ã*Rand;
|
||||
P2R(&x1,&y1,m,a);
|
||||
m=Sqr(Rand); a=2*ã*Rand;
|
||||
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)
|
||||
horeb_done=TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
dc->depth_buf=NULL;
|
||||
DCDel(dc);
|
||||
LBtr(&mp_not_done_flags,Gs->num);
|
||||
}
|
||||
|
||||
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
|
||||
x=vx; y=0; z=1000000+vz;
|
||||
GrRot(r,&x,&y,&z);
|
||||
s=100.0/(AbsI64(z)+50);
|
||||
if (y<0) {
|
||||
dc->color=BROWN;
|
||||
GrCircle(dc,s*x+cx,15,15);
|
||||
dc->color=YELLOW;
|
||||
GrFloodFill(dc,s*x+cx,15);
|
||||
}
|
||||
DCAllocDepthBuf(dc);
|
||||
mp_not_done_flags=1<<mp_cnt-1;
|
||||
for (i=0;i<mp_cnt;i++)
|
||||
JobQue(&MPDrawHoreb,dc,i);
|
||||
while (mp_not_done_flags)
|
||||
Yield;
|
||||
if (Blink) {
|
||||
dc->color=LTRED;
|
||||
GrPrint(dc,cx-21*FONT_WIDTH/2,cy-FONT_HEIGHT/2,"Find the Burning Bush.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
I64 type_weights[OT_NUM_TYPES]={30,30,15,30,3,1,1,1};
|
||||
|
||||
I64 ObjCompare(Obj *o1,Obj *o2)
|
||||
{
|
||||
return o2->z1-o1->z1;
|
||||
}
|
||||
|
||||
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;
|
||||
F64 s,m,a,x1,y1,x2,y2;
|
||||
Obj *o_sort[O_NUM_OBJS],*tempo;
|
||||
|
||||
GrIdentEqu(r);
|
||||
GrRotYEqu(r,-é);
|
||||
GrRotXEqu(r,77*ã/180);
|
||||
|
||||
//Sun
|
||||
x=vx; y=0; z=1000000+vz;
|
||||
GrRot(r,&x,&y,&z);
|
||||
s=100.0/(AbsI64(z)+50);
|
||||
if (y<0) {
|
||||
dc->color=BROWN;
|
||||
GrCircle(dc,s*x+cx,15,15);
|
||||
dc->color=YELLOW;
|
||||
GrFloodFill(dc,s*x+cx,15);
|
||||
}
|
||||
|
||||
for (i=0;i<O_NUM_OBJS;i++) {
|
||||
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) {
|
||||
dx=100*tempo->dx; dy=100*tempo->dy; dz=100*tempo->dz;
|
||||
GrRot(r,&dx,&dy,&dz);
|
||||
if (dx<0)
|
||||
tempo->sym=TRUE;
|
||||
else
|
||||
tempo->sym=FALSE;
|
||||
}
|
||||
}
|
||||
QSortI64(o_sort,O_NUM_OBJS,&ObjCompare);
|
||||
|
||||
for (i=0;i<O_NUM_OBJS;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);
|
||||
}
|
||||
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;
|
||||
dc->y=s*tempo->y1+h;
|
||||
dc->z=0;
|
||||
|
||||
dc->pen_width=1;
|
||||
dc->color=win_updates&15;
|
||||
for (j=0;j<45;j++) {
|
||||
m=Sqr(Rand); a=2*ã*Rand;
|
||||
P2R(&x1,&y1,m,a);
|
||||
m=Sqr(Rand); a=2*ã*Rand;
|
||||
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)
|
||||
horeb_done=TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (Blink) {
|
||||
dc->color=LTRED;
|
||||
GrPrint(dc,cx-21*FONT_WIDTH/2,cy-FONT_HEIGHT/2,"Find the Burning Bush.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
U0 AnimateTask(I64)
|
||||
{ //Preemption is off after Spawn
|
||||
I64 i;
|
||||
F64 t;
|
||||
Obj *tempo;
|
||||
while (TRUE) {
|
||||
t=tS;
|
||||
for (i=0;i<O_NUM_OBJS;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->é);
|
||||
}
|
||||
}
|
||||
Sleep(20);
|
||||
}
|
||||
}
|
||||
|
||||
U0 Init()
|
||||
{
|
||||
Obj *tempo;
|
||||
I64 i,j,k,total=0;
|
||||
|
||||
for (i=0;i<OT_NUM_TYPES;i++)
|
||||
total+=type_weights[i];
|
||||
|
||||
MemSet(objs,0,sizeof(objs));
|
||||
for (i=0;i<O_NUM_OBJS;i++) {
|
||||
tempo=&objs[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;
|
||||
}
|
||||
objs[O_BURNING_BUSH].type=OT_BUSH1;
|
||||
|
||||
vx=0; vz=0; é=0;
|
||||
horeb_done=FALSE;
|
||||
}
|
||||
|
||||
#define ANIMATE_STEPS 10
|
||||
|
||||
U0 AnimateéTask(F64 a)
|
||||
{
|
||||
I64 i;
|
||||
for (i=0;i<ANIMATE_STEPS;i++) {
|
||||
é+=a/ANIMATE_STEPS;
|
||||
Sleep(10);
|
||||
}
|
||||
}
|
||||
|
||||
U0 AnimateVTask(F64 v)
|
||||
{
|
||||
I64 i;
|
||||
for (i=0;i<ANIMATE_STEPS;i++) {
|
||||
vx+=v/ANIMATE_STEPS*Sin(é);
|
||||
vz+=v/ANIMATE_STEPS*Cos(é);
|
||||
Sleep(10);
|
||||
}
|
||||
}
|
||||
|
||||
U0 Horeb()
|
||||
{
|
||||
I64 ch,sc;
|
||||
MenuPush(
|
||||
"File {"
|
||||
" Abort(,CH_SHIFT_ESC);"
|
||||
" Exit(,CH_ESC);"
|
||||
"}"
|
||||
"Play {"
|
||||
" Restart(,'\n');"
|
||||
" Fwd(,,SC_CURSOR_UP);"
|
||||
" Backward(,,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_FOCUS-WIF_GRAB_SCROLL-WIF_MENU;
|
||||
WordStat;
|
||||
WinMax;
|
||||
WinBorder;
|
||||
Preempt(OFF);
|
||||
|
||||
DocClear;
|
||||
"$$BG,LTCYAN$$"; NewLine(6);
|
||||
"$$BG,YELLOW$$"; NewLine(30);
|
||||
BibleVerse(,"Exodus,3:1",21);
|
||||
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;
|
||||
}
|
||||
hr_done: //Don't goto out of try
|
||||
} catch
|
||||
Fs->catch_except=TRUE;
|
||||
DocClear;
|
||||
SettingsPop(Fs,TSF_SAME_SONG);
|
||||
MenuPop;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#help_index "Games"
|
||||
|
||||
Cd("/Apps/AfterEgypt");;
|
||||
#include "Comics"
|
||||
#include "/Demo/Graphics/Camp"
|
||||
#include "/Demo/MultiCore/Clouds"
|
||||
#include "/Demo/Graphics/Mountain"
|
||||
#include "Map"
|
||||
#include "Battle"
|
||||
#include "WaterRock"
|
||||
#include "Quail"
|
||||
#include "Horeb1"
|
||||
|
||||
#if mp_cnt>=4
|
||||
#include "Horeb2MP"
|
||||
#else
|
||||
#include "Horeb2SP"
|
||||
#endif
|
||||
|
||||
#include "Horeb3"
|
||||
#include "GodTalking"
|
||||
#include "AfterEgypt"
|
||||
|
||||
#help_index ""
|
||||
@@ -0,0 +1,76 @@
|
||||
I64 x=0,y=0;
|
||||
|
||||
U0 DrawMap(CTask *,CDC *dc)
|
||||
{
|
||||
static I64 last_x;
|
||||
static Bool last_left;
|
||||
if (x<last_x)
|
||||
last_left=TRUE;
|
||||
else if (x>last_x)
|
||||
last_left=FALSE;
|
||||
dc->pen_width=1;
|
||||
if (last_left)
|
||||
Sprite3(dc,x,y,0,left_imgs [ToI64(6.0*tS)&3]);
|
||||
else
|
||||
Sprite3(dc,x,y,0,right_imgs[ToI64(6.0*tS)&3]);
|
||||
last_x=x;
|
||||
}
|
||||
|
||||
#define A1_MIN 0.02
|
||||
#define A1_MAX 0.05
|
||||
#define A2_MIN 0.15
|
||||
#define A2_MAX 0.30
|
||||
|
||||
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;
|
||||
F64 a,a1=(A1_MAX+A1_MIN)/2,a2=(A2_MAX+A2_MIN)/2,a2_total=a2,
|
||||
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"$
|
||||
Fs->text_attr=YELLOW<<4+BLUE;
|
||||
DocClear;
|
||||
"$$BG,YELLOW$$"; NewLine(TEXT_ROWS);
|
||||
BibleVerse(,"Exodus,16:35",3);
|
||||
Fs->draw_it=&DrawMap;
|
||||
try {
|
||||
while (!ScanChar) {
|
||||
dc->color=BLACK;
|
||||
a1=Clamp(Wrap(a1+(A1_MAX+A1_MIN)/5.0*(Rand-0.5)),-A1_MAX,A1_MAX);
|
||||
a=a1;
|
||||
if ( 0.0<=a<=A1_MIN) a=A1_MIN;
|
||||
if (-A1_MIN<=a<=0.0) a=-A1_MIN;
|
||||
Free(r);
|
||||
r=GrRotZNew(a);
|
||||
GrRot(r,&x1,&y1,&z1);
|
||||
|
||||
a2=Clamp(Wrap(a2+(A2_MAX+A2_MIN)/5.0*(Rand-0.5)),-A2_MAX,A2_MAX);
|
||||
a=a2;
|
||||
if ( 0.0<=a<=A2_MIN) a=A2_MIN;
|
||||
if (-A2_MIN<=a<=0.0) a=-A2_MIN;
|
||||
a2_total+=a;
|
||||
|
||||
x1=ClampI64(x1+6.0*Cos(a2_total),-c_min+10,c_min-10);
|
||||
y1=ClampI64(y1+6.0*Sin(a2_total),-c_min+10,c_min-10);
|
||||
|
||||
x=x_scale*x1+cx; y=y_scale*y1+cy;
|
||||
if (i++&1)
|
||||
GrLine(dc,x_last,y_last,x,y);
|
||||
x_last=x; y_last=y;
|
||||
Sleep(15);
|
||||
}
|
||||
} catch
|
||||
Fs->catch_except=TRUE;
|
||||
DocClear;
|
||||
SettingsPop(Fs,TSF_SAME_SONG);
|
||||
Free(r);
|
||||
DCFill(dc);
|
||||
DCDel(dc);
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
Cd("/Apps/AfterEgypt");;
|
||||
#include "Load"
|
||||
AfterEgypt;
|
||||
Binary file not shown.
Reference in new issue
Block a user