TempleOSCDV4.08.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:25 +02:00
1 parent b632ab9a4f
commit 2d56cda5f3
258 files changed
+6973 -5476

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@ extern U0 BgtRegen();
Bool BgtPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
{//ch=ASCII; sc=scan_code
nounusedwarn sc;
no_warn sc;
CBgtEntry *tempb,*tempb1;
CBgtTemplate *tempt,*tempt1;
CDocEntry *doc_ce;
@@ -51,7 +51,7 @@ Bool BgtPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
case 'a':
PopUpOk( "Set the name and color of your accounts.\n"
"To delete accounts, manually edit\n"
"$$GREEN$$/Home/Budget/Accts.TXT.Z$$FG$$.");
"$$GREEN$$~/Budget/Accts.TXT.Z$$FG$$.");
if (PopUpEd(BGT_ACCTS_FILE,Fs)) {
BgtAcctsRead;
BgtRegen;
+3 -3
View File
@@ -1,6 +1,6 @@
#define BGT_STRINGS_FILE "::/Home/Budget/Strs.TXT.Z"
#define BGT_ACCTS_FILE "::/Home/Budget/Accts.TXT.Z"
#define BGT_DATA_FILE "::/Home/Budget/Bgt.DAT.Z"
#define BGT_STRINGS_FILE "~/Budget/Strs.TXT.Z"
#define BGT_ACCTS_FILE "~/Budget/Accts.TXT.Z"
#define BGT_DATA_FILE "~/Budget/Bgt.DAT.Z"
#define BE_NORMAL 0
#define BE_GAS 1
+3 -3
View File
@@ -1,5 +1,5 @@
Cd(__DIR__);;
if (!FileFind("::/Home/Budget",,FUF_JUST_DIRS)) {
MkDir("::/Home/Budget");
Copy("Accts.TXT.Z","::/Home/Budget");
if (!FileFind("~/Budget",,FUF_JUST_DIRS)) {
MkDir("~/Budget");
Copy("Accts.TXT.Z","~/Budget");
}
+73 -44
View File
@@ -240,16 +240,17 @@ I64 score0,score1;
#define NUM_PER_SIDE 3
#define NUM_OBJS (NUM_PER_SIDE*2+1)
Bool someone_shooting;
Bool someone_shooting,someone_has_ball;
F64 shot_land_t;
class Obj
{
I64 team; //-1 is ball
F64 x,y,z,DxDt,DyDt,DzDt,ay,radius,stolen_t0;
F64 last_t0,next_t0,foul_t0;
F64 x,y,z,DxDt,DyDt,DzDt,é,radius,stolen_t0;
F64 get_ball_dt,get_ball_é,nearest_man_dd,last_t0,next_t0,foul_t0;
I64 last_img,next_img;
Bool stopped,shooting,has_ball,pad[5];
} objs[NUM_OBJS],*ball,*human;
Bool stopped,shooting,has_ball,nearest_ball,pad[4];
} objs[NUM_OBJS],*ball,*human,*last_owner;
/*Just to be different, I didn't use the built-in
DCF_TRANSFORMATION flag in this game.
@@ -282,7 +283,7 @@ U0 DrawObj(CDC *dc,Obj *o,F64 tt)
temps=SpriteInterpolate((tt-o->last_t0)/(o->next_t0-o->last_t0),
imgs[o->last_img].img[o->team],
imgs[o->next_img].img[o->team]);
SpriteY3B(dc,o->x,(o->y-o->z)/2,GR_Z_ALL-o->y,temps,o->ay);
SpriteY3B(dc,o->x,(o->y-o->z)/2,GR_Z_ALL-o->y,temps,o->é);
Free(temps);
}
}
@@ -316,9 +317,9 @@ U0 DrawIt(CTask *task,CDC *dc)
o=o_sort[i]=&objs[i];
if (o!=ball) {
if (o->has_ball) {
ball->x=o->x+HAND_X_OFFSET*Cos(o->ay-ã/2)+HAND_Y_OFFSET*Cos(o->ay);
ball->x=o->x+HAND_X_OFFSET*Cos(o->é-ã/2)+HAND_Y_OFFSET*Cos(o->é);
//The factor 2 is because the man is not transformed.
ball->y=o->y+HAND_X_OFFSET*Sin(o->ay-ã/2)/2+HAND_Y_OFFSET*Sin(o->ay)/2;
ball->y=o->y+HAND_X_OFFSET*Sin(o->é-ã/2)/2+HAND_Y_OFFSET*Sin(o->é)/2;
if (ball->z+ball->radius*2>o->z+HAND_Z_OFFSET)
ball->z=o->z+HAND_Z_OFFSET-ball->radius*2;
} else if (o->shooting) {
@@ -355,10 +356,12 @@ U0 DrawIt(CTask *task,CDC *dc)
o->next_img=FIRST_SHOOTING;
if (o->next_img>LAST_SHOOTING) {
o->next_img=FIRST_STANDING;
someone_shooting=o->has_ball=o->shooting=FALSE;
ball->DxDt=o->DxDt+SHOT_VELOCITY/sqrt2*Cos(o->ay-ã/2);
ball->DyDt=o->DyDt+SHOT_VELOCITY/sqrt2*Sin(o->ay-ã/2);
someone_has_ball=someone_shooting=o->has_ball=o->shooting=FALSE;
ball->DxDt=o->DxDt+SHOT_VELOCITY/sqrt2*Cos(o->é-ã/2);
ball->DyDt=o->DyDt+SHOT_VELOCITY/sqrt2*Sin(o->é-ã/2);
ball->DzDt=o->DzDt+SHOT_VELOCITY/sqrt2;
shot_land_t=tt+(ball->DzDt+Sqrt(Sqr(ball->DzDt)+
2*GRAVITY_ACCELERATION*ball->z))/GRAVITY_ACCELERATION;
} else {
ball->DxDt=0;
ball->DyDt=0;
@@ -426,9 +429,9 @@ U0 Shoot(Obj *o)
U0 AnimateTask(CTask *parent_task)
{
F64 d,dx,dy,dt,dx2,dy2,t0=tS;
I64 i,j,team;
Bool gets_ball,ball_stolen;
Obj *o;
I64 i,j;
Bool gets_ball;
Obj *o,*nearest_ball[2];
while (TRUE) {
dt=tS-t0;
t0=tS;
@@ -444,10 +447,29 @@ U0 AnimateTask(CTask *parent_task)
}
}
if (game_t_end)
if (game_t_end) {
MemSet(&nearest_ball,0,sizeof(nearest_ball));
for (i=0;i<NUM_OBJS;i++) {
o=&objs[i];
o->nearest_ball=FALSE;
if (o!=ball) {
d=0;
for (j=0;j<5;j++) //Iterative estimate of how long to get ball.
d=Sqrt(Sqr(ball->DxDt*d+ball->x-o->x)+
Sqr(ball->DyDt*d+ball->y-o->y))/MAN_VELOCITY;
o->get_ball_dt=d;
o->get_ball_é=Arg(ball->DxDt*d+ball->x-o->x,
ball->DyDt*d+ball->y-o->y);
if (o!=last_owner && !nearest_ball[o->team] ||
o->get_ball_dt<nearest_ball[o->team]->get_ball_dt)
nearest_ball[o->team]=o;
}
}
nearest_ball[0]->nearest_ball=TRUE;
nearest_ball[1]->nearest_ball=TRUE;
for (i=0;i<NUM_OBJS;i++) {
o=&objs[i];
if (o==ball) {
o->x+=dt*o->DxDt;
o->y+=dt*o->DyDt;
@@ -460,32 +482,31 @@ U0 AnimateTask(CTask *parent_task)
dy=ball->y-o->y;
if (dx*dx+dy*dy<HAND_SQR_OFFSET && ball->z<o->z+HAND_Z_OFFSET) {
gets_ball=TRUE;
ball_stolen=FALSE;
for (j=0;j<NUM_PER_SIDE*2;j++)
if (j!=i && objs[j].has_ball) {
if (Rand<2.0*dt) {
objs[j].stolen_t0=t0;
objs[j].has_ball=FALSE;
ball_stolen=TRUE;
team=objs[j].team;
} else
gets_ball=FALSE;
}
if (gets_ball) {
o->has_ball=TRUE;
if (o==human) {
if (ball_stolen && team) {
Noise(250,2000,2000);
score0+=2;
}
} else {
someone_has_ball=o->has_ball=TRUE;
if (o!=last_owner) {
if (o->team) {
if (t0<shot_land_t+0.1)
score1+=6;
else
score1+=2;
Noise(250,1000,1000);
score1+=2;
} else {
if (t0<shot_land_t+0.1)
score0+=6;
else
score0+=2;
Noise(250,2000,2000);
score0+=2;
}
last_owner=o;
}
}
}
@@ -497,19 +518,29 @@ U0 AnimateTask(CTask *parent_task)
dx=(ip.pos.x-parent_task->pix_left-parent_task->scroll_x)-o->x;
dy=(ip.pos.y-parent_task->pix_top-parent_task->scroll_y)*2-o->y;
} else {
dx=o->DxDt+=RANDOM_MAN_ACCELERATION/sqrt2*RandI16/MAX_I16*dt;
dy=o->DyDt+=RANDOM_MAN_ACCELERATION/sqrt2*RandI16/MAX_I16*dt;
if (!someone_has_ball && o->nearest_man_dd>4*MAN_SQR_RADIUS &&
o->nearest_ball) {
dx=o->DxDt=MAN_VELOCITY*Cos(o->get_ball_é);
dy=o->DyDt=MAN_VELOCITY*Sin(o->get_ball_é);
} else {
dx=o->DxDt+=RANDOM_MAN_ACCELERATION/sqrt2*RandI16/MAX_I16*dt;
dy=o->DyDt+=RANDOM_MAN_ACCELERATION/sqrt2*RandI16/MAX_I16*dt;
}
}
d=Sqrt(dx*dx+dy*dy);
if (d>=1.0) {
o->ay=Arg(dx,dy)+ã/2;
o->é=Arg(dx,dy)+ã/2;
dx*=MAN_VELOCITY/sqrt2*dt/d;
dy*=MAN_VELOCITY/sqrt2*dt/d;
o->nearest_man_dd=MAX_F64;
for (j=0;j<NUM_PER_SIDE*2;j++)
if (j!=i) {
dx2=objs[j].x-o->x;
dy2=objs[j].y-o->y;
if ((d=Sqr(dx2)+Sqr(dy2))<MAN_SQR_RADIUS) {
d=Sqr(dx2)+Sqr(dy2);
if (d<o->nearest_man_dd)
o->nearest_man_dd=d;
if (d<MAN_SQR_RADIUS) {
if (d) {
d=Sqrt(d);
dx2/=d;
@@ -584,7 +615,7 @@ U0 AnimateTask(CTask *parent_task)
o->DzDt*=d;
}
}
}
WinMgrSync;
}
}
@@ -593,6 +624,7 @@ U0 Init()
{
I64 i;
someone_shooting=FALSE;
shot_land_t=0;
MemSet(&objs,0,sizeof(objs));
for (i=0;i<NUM_PER_SIDE*2;i++) {
objs[i].team=i&1;
@@ -600,6 +632,7 @@ U0 Init()
objs[i].y=2*Fs->pix_height/2;
objs[i].next_img=objs[i].last_img=FIRST_RUNNING;
}
last_owner=NULL;
human=&objs[0];
ball =&objs[i];
ball->team=-1;
@@ -612,28 +645,26 @@ U0 Init()
foul_t_end=0;
}
U0 CleanUp()
{
}
U0 KeepAway()
{
I64 msg_code,a1,a2;
PopUpOk(
"$$RED$$Pass or hand-off to score points.$$FG$$\n\n"
"Left-Click to pass.\n"
"Right-Click to jump.\n");
"Pass or hand-off to your team to score points.$$FG$$\n\n"
"\t2 points for successful hand-off.\n"
"\t6 points for successful pass.\n"
"\t1 point penalty for foul.\n\n"
"Left-Click\tto pass.\n\n"
"Right-Click\tto jump.\n");
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
Fs->text_attr=BLACK+YELLOW<<4;
Fs->win_inhibit|=WIG_DBL_CLICK;
AutoComplete;
WinBorder;
WinMax;
DocCursor;
DocClear;
Fs->win_inhibit|=WIG_DBL_CLICK;
MenuPush(
"File {"
" Abort(,CH_SHIFT_ESC);"
@@ -666,7 +697,6 @@ ka_jump:
case MSG_KEY_DOWN:
switch (a1) {
case '\n':
CleanUp;
Init;
break;
case 'j':
@@ -687,7 +717,6 @@ ka_done: //Don't goto out of try
SettingsPop;
RegWriteBranch("TempleOS/KeepAway","I64 best_score0=%d,best_score1=%d;\n",
best_score0,best_score1);
CleanUp;
MenuPop;
}
Êp¨­ÿÿÿûÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ·ÿÿÿûÿÿÿûÿÿÿ·ÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ­ÿÿÿ·ÿÿÿûÿÿÿ·ÿÿÿ
+10 -10
View File
@@ -63,18 +63,18 @@ U8 *gate_type_lst="NULL\0OUTPUT\0INPUT\0"
#define GT_XOR 8
#define GT_AND3 9
#define GT_OR3 10
#define GT_NAND3 11
#define GT_NAND3 11
#define GT_NOR3 12
#define GT_NUM_ENTRIES 13
#define MAX_SELECTED_GATES 128
#define MAX_SEL_GATES 128
CSprite *imgs[GT_NUM_ENTRIES]={NULL,NULL,NULL,
$IB,"<NOT>",BI=1$,$IB,"<AND>",BI=2$,$IB,"<OR>",BI=3$,$IB,"<NAND>",BI=4$,$IB,"<NOR>",BI=5$,$IB,"<XOR>",BI=6$,$IB,"<AND3>",BI=7$,$IB,"<OR3>",BI=8$,$IB,"<NAND3>",BI=9$,$IB,"<NOR3>",BI=10$};
I64 num_inputs_entered,num_outputs_entered;
I64 num_selected_gates,
selected_gates[MAX_SELECTED_GATES];
I64 num_sel_gates,
sel_gates[MAX_SEL_GATES];
U0 GetGates()
{
@@ -87,9 +87,9 @@ U0 GetGates()
"%z ",i,gate_type_lst;
'\n';
num_selected_gates=0;
while (num_selected_gates<GT_NUM_ENTRIES) {
"%d",num_selected_gates;
num_sel_gates=0;
while (num_sel_gates<GT_NUM_ENTRIES) {
"%d",num_sel_gates;
st=GetStr(" Gate: ");
if (!*st) {
Free(st);
@@ -100,7 +100,7 @@ U0 GetGates()
if (i<GT_FIRST_REAL_GATE)
"Invalid response\n";
else
selected_gates[num_selected_gates++]=i;
sel_gates[num_sel_gates++]=i;
}
}
@@ -527,9 +527,9 @@ I64 FillGateTable()
"Pass : %d\n",passes++;
chged=FALSE;
MemSet(added_this_pass,0,(table_size+7)/8);
for (current_gate=0;current_gate<num_selected_gates &&
for (current_gate=0;current_gate<num_sel_gates &&
num_outputs_found<num_outputs_entered;current_gate++) {
switch (selected_gates[current_gate]) {
switch (sel_gates[current_gate]) {
case GT_NOT: FillNot (&chged,&num_outputs_found); break;
case GT_AND: FillAnd (&chged,&num_outputs_found); break;
case GT_OR: FillOr (&chged,&num_outputs_found); break;
+3 -3
View File
@@ -10,9 +10,9 @@ $WW,1$$FG,5$$TX+CX,"Psalmody Help"$$FG$
* You can take the $LK,"Play",A="MN:Play"$() stmts out of a song file and place them in your programs. You can also add a song to a document with $FG,2$<CTRL-l>$FG$, but you should do it after pressing $FG,2$<CTRL-t>$FG$ because the clipboard-insert in $FG,2$<CTRL-l>$FG$ is screwy. See this $SO,"<Song>",A="2qG3ECB2eGG3qCeFDsBGBG2qG3ECB2eGG3qCeFDsBGBGqEeEFqEB2eG3FetCAGqFCEeEFqEB2eG3FetCAGqFC"$ after pressing $FG,2$<CTRL-t>$FG$, now.
* You can call $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CPP,JukeBox"$("::/Home/Psalmody"); to play your songs.
* You can call $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CPP,JukeBox"$("~/Psalmody"); to play your songs.
* To create a $FG,2$.SND$FG$ file which can be exported and played under Windows, set the $FG,2$Bool$FG$ $LK,"snd.record",A="MN:CSndGlbls"$ to $FG,2$TRUE$FG$, play music, and set it to $FG,2$FALSE$FG$. Then, call $LK,"SndFileCreate",A="MN:SndFileCreate"$(). You might wish to make a $FG,2$<CTRL-ALT-key>$FG$ to toggle this system level recording feat. See $LK,"Snd",A="MN:Snd"$(). Add this code to your $LK,"::/Home/HomeKeyPlugIns.CPP"$ file.
* To create a $FG,2$.SND$FG$ file which can be exported and played under Windows, set the $FG,2$Bool$FG$ $LK,"snd.record",A="MN:CSndGlbls"$ to $FG,2$TRUE$FG$, play music, and set it to $FG,2$FALSE$FG$. Then, call $LK,"SndFileCreate",A="MN:SndFileCreate"$(). You might wish to make a $FG,2$<CTRL-ALT-key>$FG$ to toggle this system level recording feat. See $LK,"Snd",A="MN:Snd"$(). Add this code to your $LK,"~/HomeKeyPlugIns.CPP"$ file.
$FG,5$U0 CtrlAltR(I64)
{
@@ -20,5 +20,5 @@ $FG,5$U0 CtrlAltR(I64)
}
CtrlAltCBSet('R',&CtrlAltR,"Cmd /Toggle snd.record");$FG$
* When calling $LK,"SndFileCreate",A="MN:SndFileCreate"$() you can set a waveform. The PC speaker is $LK,"WF_SQUARE",A="MN:WF_SQUARE"$. You can select reverb and averaging, also.
* When calling $LK,"SndFileCreate",A="MN:SndFileCreate"$() you can set a waveform. The PC speaker is $LK,"WF_SQUARE",A="MN:WF_SQUARE"$. You can sel reverb and averaging, also.
+2 -2
View File
@@ -1,2 +1,2 @@
if (!FileFind("::/Home/Psalmody",,FUF_JUST_DIRS))
MkDir("::/Home/Psalmody");
if (!FileFind("~/Psalmody",,FUF_JUST_DIRS))
MkDir("~/Psalmody");
+1 -1
View File
@@ -49,7 +49,7 @@ Bool JBPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
return FALSE;
}
public U0 JukeBox(U8 *dirname="::/Home/Psalmody",U8 **_filename=NULL)
public U0 JukeBox(U8 *dirname="~/Psalmody",U8 **_filename=NULL)
{//_filename is for using this as a song-chooser program.
I64 i=0,rating;
U8 *st,*st2;
+1 -1
View File
@@ -72,7 +72,7 @@ U0 JukeSongPuppet(CTask *juke_task,I64 passes,I64 song_num,U8 *name)
Kill(task);
}
public U0 JukeSongsPuppet(U8 *dirname="::/Home/Psalmody",I64 passes=2,
public U0 JukeSongsPuppet(U8 *dirname="~/Psalmody",I64 passes=2,
I64 start_song=0,I64 end_song=MAX_I64)
{//Help make music video by puppeting JukeBox task.
I64 i;
+2 -2
View File
@@ -29,8 +29,8 @@ $WW,1$$WW,0$*/
#define PSMT_NOTE 1
#define PSMT_METER 2
#define PSMf_SELECTED 0
#define PSMF_SELECTED 1
#define PSMf_SEL 0
#define PSMF_SEL 1
#define PSMf_SHARP 1
#define PSMf_FLAT 2
#define PSMf_TIE 3
+5 -5
View File
@@ -86,15 +86,15 @@ Bool PsmIsDotted(I64 duration)
return FALSE;
}
U0 PsmMarkSelected(I64 x1,I64 x2,Bool sel)
U0 PsmMarkSel(I64 x1,I64 x2,Bool sel)
{
PsmNote *tempo=oc.root.next;
while (tempo!=&oc.root) {
if (sel) {
if (x1<=tempo->x<=x2)
tempo->flags|=PSMF_SELECTED;
tempo->flags|=PSMF_SEL;
} else
tempo->flags&=~PSMF_SELECTED;
tempo->flags&=~PSMF_SEL;
tempo=tempo->next;
}
}
@@ -236,7 +236,7 @@ U0 DrawIt(CTask *task,CDC *dc)
if (tempo==oc.cur_note && PsmBlink) {
dc->color=BROWN;
GrPrint(dc,x+8,y,"%s",tempo->word);
} else if (tempo->flags&PSMF_SELECTED)
} else if (tempo->flags&PSMF_SEL)
dc->color=RED;
else {
if (tempo->note!=NOTE_REST)
@@ -331,7 +331,7 @@ Bool PsmGetPickToolBox(I64 xx,I64 yy)
{
if (PSM_TOOLS_X<=xx<PSM_TOOLS_X+27 &&
PSM_TOOLS_Y<=yy<PSM_TOOLS_Y+15) {
PsmMarkSelected(0,0,FALSE);
PsmMarkSel(0,0,FALSE);
if (xx<PSM_TOOLS_X+13)
oc.tool=PSMTT_BOX_TOOL;
else
+4 -4
View File
@@ -33,11 +33,11 @@ U0 PsmCutToClipboard()
tempo=oc.root.next;
while (tempo!=&oc.root) {
tempo1=tempo->next;
if (tempo->flags&PSMF_SELECTED) {
if (tempo->flags&PSMF_SEL) {
if (oc.cur_note==tempo)
oc.cur_note=tempo->next;
QueRem(tempo);
tempo->flags&=~PSMF_SELECTED;
tempo->flags&=~PSMF_SEL;
QueIns(tempo,oc.clipboard.last);
}
tempo=tempo1;
@@ -61,8 +61,8 @@ U0 PsmCopyToClipboard()
PsmSongDel(&oc.clipboard);
tempo=oc.root.next;
while (tempo!=&oc.root) {
if (tempo->flags&PSMF_SELECTED) {
tempo->flags&=~PSMF_SELECTED;
if (tempo->flags&PSMF_SEL) {
tempo->flags&=~PSMF_SEL;
tempo1=PsmNoteCopy(tempo);
QueIns(tempo1,oc.clipboard.last);
}
+9 -9
View File
@@ -241,7 +241,7 @@ U0 PsmLeftClickStaffBox(I64 x,I64 y)
GrBorder(oc.dc2,x,y,a1,a2);
if (msg_code==MSG_IP_L_UP) {
if (x>a1) SwapI64(&x,&a1);
PsmMarkSelected(x,a1,TRUE);
PsmMarkSel(x,a1,TRUE);
}
} while (msg_code!=MSG_IP_L_UP);
DrawDC2;
@@ -396,7 +396,7 @@ U0 PsmPopMode()
#define PSMF_CD 1
#define PSMF_INCOMPLETE 2
U0 Psalmody(U8 *dirname="::/Home/Psalmody")
U0 Psalmody(U8 *dirname="~/Psalmody")
{
Bool was_playing;
I64 a1,a2,msg_code=0,col,
@@ -536,7 +536,7 @@ mo_got_msg:
col=0;
} else {
switch (a1) {
sub_switch_start:
start:
case 'a': note=7; octave--; break;
case 's': note=8; octave--; break;
case 'e': note=9; octave--; break;
@@ -556,7 +556,7 @@ mo_got_msg:
case '[': note=11; break;
case '\'': note=0; octave++; break;
case ']': note=1; octave++; break;
sub_switch_end:
end:
f=Note2Freq(note,octave);
break;
case CH_SPACE:
@@ -572,13 +572,13 @@ mo_got_msg:
while (oc.cur_note->last!=&oc.root) {
oc.cur_note=oc.cur_note->last;
if (oc.cur_note!=&oc.root)
LBEqu(&oc.cur_note->flags,PSMf_SELECTED,a2&SCF_SHIFT);
LBEqu(&oc.cur_note->flags,PSMf_SEL,a2&SCF_SHIFT);
}
} else {
if (oc.cur_note->last!=&oc.root) {
oc.cur_note=oc.cur_note->last;
if (oc.cur_note!=&oc.root)
LBEqu(&oc.cur_note->flags,PSMf_SELECTED,a2&SCF_SHIFT);
LBEqu(&oc.cur_note->flags,PSMf_SEL,a2&SCF_SHIFT);
}
}
break;
@@ -586,13 +586,13 @@ mo_got_msg:
if (a2&SCF_CTRL) {
while (oc.cur_note!=&oc.root) {
if (oc.cur_note!=&oc.root)
LBEqu(&oc.cur_note->flags,PSMf_SELECTED,a2&SCF_SHIFT);
LBEqu(&oc.cur_note->flags,PSMf_SEL,a2&SCF_SHIFT);
oc.cur_note=oc.cur_note->next;
}
} else {
if (oc.cur_note!=&oc.root) {
if (oc.cur_note!=&oc.root)
LBEqu(&oc.cur_note->flags,PSMf_SELECTED,a2&SCF_SHIFT);
LBEqu(&oc.cur_note->flags,PSMf_SEL,a2&SCF_SHIFT);
oc.cur_note=oc.cur_note->next;
}
}
@@ -638,7 +638,7 @@ mo_got_msg:
case CH_CTRLO:
PsmPopMode;
RegOneTimePopUp(ARf_PSALMODY_JUKEBOX,
"Select a song and preview it.\n"
"Sel a song and preview it.\n"
"$$GREEN$$<SHIFT-ESC>$$FG$$ to load it into Psalmody.\n\n"
ST_WARN_ST " Graphics and other embelishments\n"
"will be lost because Psalmody can't\n"
+1 -1
View File
@@ -1 +1 @@
MkDir("::/Home/Span");
MkDir("~/Span");
+1 -1
View File
@@ -319,7 +319,7 @@ U0 Span()
"\t$$GREEN$$'c'$$FG$$oncrete\n"
"\t$$GREEN$$'s'$$FG$$teel\n"
"\t$$GREEN$$'w'$$FG$$ire\n"
"\nto select materials.\n");
"\nto sel materials.\n");
try {
while (TRUE) {
+4 -4
View File
@@ -69,9 +69,9 @@ Bool SpanWrite(CMathODE *ode)
U8 *name,*buf;
I64 size;
Bool res=FALSE,old_silent=Silent;
MkDir("::/Home/Span");
MkDir("~/Span");
Silent(old_silent);
if (name=PopUpFileName("::/Home/Span/Game.DAT")) {
if (name=PopUpFileName("~/Span/Game.DAT")) {
if (buf=SpanSave(ode,&size)) {
FileWrite(name,buf,size);
Free(buf);
@@ -115,9 +115,9 @@ U8 *SpanRead()
{
U8 *src=NULL,*name;
Bool old_silent=Silent;
MkDir("::/Home/Span");
MkDir("~/Span");
Silent(old_silent);
if (name=PopUpPickFile("::/Home/Span")) {
if (name=PopUpPickFile("~/Span")) {
src=FileRead(name);
Free(name);
}
+4 -4
View File
@@ -603,10 +603,10 @@ U0 Strut()
DocCursor;
DocClear;
"\n$$WW,1$$$$PURPLE$$$$TX+CX,\"Build a ship.\"$$$$FG$$\n\n"
"Select mass mode.\tLeft-click to place masses.\n"
"Select spring mode.\tLeft-drag to make members.\n"
"Select thruster mode.\tPress a digit, 0-9. Drag to make thruster.\n"
"Select connector mode.\tPress a digit, 0-9. "
"Sel mass mode.\tLeft-click to place masses.\n"
"Sel spring mode.\tLeft-drag to make members.\n"
"Sel thruster mode.\tPress a digit, 0-9. Drag to make thruster.\n"
"Sel connector mode.\tPress a digit, 0-9. "
"Drag to make breakable connector.\n\n"
"Press $$GREEN$$<SPACE>$$FG$$ to run the game. Press digits to operate "
"thrusters and break connectors.\n\n"
+2 -2
View File
@@ -1,5 +1,5 @@
if (!FileFind("::/Home/TimeClock",,FUF_JUST_DIRS)) {
MkDir("::/Home/TimeClock");
if (!FileFind("~/TimeClock",,FUF_JUST_DIRS)) {
MkDir("~/TimeClock");
DocClear;
"After Loading, type $$GREEN$$PunchIn;$$FG$$, "
"$$GREEN$$PunchOut;$$FG$$ or $$GREEN$$TimeRep;$$FG$$\n"
+1 -1
View File
@@ -1,4 +1,4 @@
#define TIME_FILENAME "::/Home/TimeClock/TimeFile.DAT.Z"
#define TIME_FILENAME "~/TimeClock/TimeFile.DAT.Z"
#define TET_EOF 0
#define TET_PUNCH_IN 1
+8 -7
View File
@@ -521,20 +521,21 @@ U0 TimeOut()
WinMax;
DocCursor;
DocClear;
"\n\nYou're sent back through time to help fight some bad guys. "
"($$LTPURPLE$$Purple$$FG$$)\n"
"Perhaps, you are an angel helping the Jews in the Bible?\n\n"
"Scoring:\n"
" Enemy Killed\t\t+5\n"
" Enemy by Friendly\t+10\n"
" Friendly Fire\t\t-200\n"
" Bullets Fired\t\t-1\n"
" Game Time\t\t-10 per second\n"
" Surviving Friendlies\t+500\n\n"
"\tEnemy Killed\t\t+5\n"
"\tEnemy by Friendly\t+10\n"
"\tFriendly Fire\t\t-200\n"
"\tBullets Fired\t\t-1\n"
"\tGame Time\t\t-10 per second\n"
"\tSurviving Friendlies\t+500\n\n"
"Sweep side-to-side while shooting, "
"holding down $$GREEN$$<SPACE>$$FG$$.\n\n";
PressAKey;
Fs->text_attr=YELLOW<<4+CYAN;
Init;
DocClear;
+1 -1
View File
@@ -1,2 +1,2 @@
MkDir("::/Home/ToTheFront");
MkDir("~/ToTheFront");
+2 -2
View File
@@ -1371,7 +1371,7 @@ U0 PickAI(U8 *dirname,I64 player)
st=MStrPrint("%s/*.CPP*",dirname);
tempde=FilesFind(st);
Free(st);
tempde2=FilesFind("::/Home/ToTheFront/*.CPP*");
tempde2=FilesFind("~/ToTheFront/*.CPP*");
tempde1=tempde;
Silent(old_silent);
@@ -1395,7 +1395,7 @@ U0 PickAI(U8 *dirname,I64 player)
Free(st);
tempde1=tempde1->next;
}
DocPrint(doc,"\n\n\n$$FG$$Create your own AI in /Home/ToTheFront.");
DocPrint(doc,"\n\n\n$$FG$$Create your own AI in ~/ToTheFront.");
while ((tempde1=PopUpMenu(doc))<=0);
ExeFile(tempde1->full_name);
DocDel(doc);
+6 -8
View File
@@ -1263,8 +1263,8 @@ U0 XCaliber()
" StopSpin(,,SC_CURSOR_DOWN);"
" Left(,,SC_CURSOR_LEFT);"
" Right(,,SC_CURSOR_RIGHT);"
" LeftMissile(,'l');"
" RightMissile(,'r');"
" LeftMissile(,,SC_CURSOR_LEFT|SCF_CTRL);"
" RightMissile(,,SC_CURSOR_RIGHT|SCF_CTRL);"
" Spackwalk(,'w');"
" LongerFuse(,,SC_CURSOR_RIGHT|SCF_SHIFT);"
" ShorterFuse(,,SC_CURSOR_LEFT|SCF_SHIFT);"
@@ -1298,12 +1298,16 @@ U0 XCaliber()
case 0:
switch (sc.u8[0]) {
case SC_CURSOR_RIGHT:
if (sc&SCF_CTRL)
HumanFireMissileBegin(0);
if (sc&SCF_SHIFT)
ctrl_panel.fuse_time+=2;
else
human_t_right=MAX_THRUST;
break;
case SC_CURSOR_LEFT:
if (sc&SCF_CTRL)
HumanFireMissileBegin(1);
if (sc&SCF_SHIFT)
ctrl_panel.fuse_time-=2;
else
@@ -1331,12 +1335,6 @@ U0 XCaliber()
else
HumanFireLaserBegin;
break;
case 'l':
HumanFireMissileBegin(1);
break;
case 'r':
HumanFireMissileBegin(0);
break;
case 'w':
ctrl_panel.spacewalk=TRUE;
break;