TempleOSCDV3.11.ISO
This commit is contained in:
1 parent
f8c05f98f4
commit
ed64d7e3b8
549 files changed
+10643
-12855
No files matched your search
+15
-16
@@ -18,26 +18,25 @@ U0 Init()
|
||||
U0 Bounce()
|
||||
{
|
||||
CDC *dc=DCAlias;
|
||||
I64 i,ch,update;
|
||||
I64 i,ch;
|
||||
Init;
|
||||
try {//Catch <CTRL-ALT-c>
|
||||
do {
|
||||
update=winmgr.updates;
|
||||
do for (i=0;i<16;i++) {
|
||||
dc->color=i;
|
||||
GrPlot(dc,x[i].i32[1],y[i].i32[1]);
|
||||
x[i]+=dx[i];
|
||||
y[i]+=dy[i];
|
||||
if (!(0<=x[i]<Fs->pix_width<<32)) {
|
||||
x[i]-=dx[i];
|
||||
dx[i]=-dx[i];
|
||||
}
|
||||
if (!(0<=y[i]<Fs->pix_height<<32)) {
|
||||
y[i]-=dy[i];
|
||||
dy[i]=-dy[i];
|
||||
}
|
||||
for (i=0;i<16;i++) {
|
||||
dc->color=i;
|
||||
GrPlot(dc,x[i].i32[1],y[i].i32[1]);
|
||||
x[i]+=dx[i];
|
||||
y[i]+=dy[i];
|
||||
if (!(0<=x[i]<Fs->pix_width<<32)) {
|
||||
x[i]-=dx[i];
|
||||
dx[i]=-dx[i];
|
||||
}
|
||||
while (update==winmgr.updates);
|
||||
if (!(0<=y[i]<Fs->pix_height<<32)) {
|
||||
y[i]-=dy[i];
|
||||
dy[i]=-dy[i];
|
||||
}
|
||||
}
|
||||
Yield;
|
||||
} while (!(ch=ScanChar) || (ch!=CH_SHIFT_ESC && ch!=CH_ESC));
|
||||
} catch
|
||||
PutExcept;
|
||||
|
||||
@@ -27,7 +27,6 @@ U0 Box()
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
DocClear;
|
||||
Fs->draw_it=&DrawIt;
|
||||
Preempt; //We don't want matrix used while we're changing it.
|
||||
|
||||
dc->x=200;
|
||||
dc->y=200;
|
||||
|
||||
Binary file not shown.
@@ -8,11 +8,11 @@ U0 Doodle()
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_BORDER;
|
||||
|
||||
WinMax;
|
||||
AutoComplete;
|
||||
|
||||
DCFill;
|
||||
WinBorder;
|
||||
WinMax;
|
||||
DocClear;
|
||||
DCFill;
|
||||
do {
|
||||
msg_code=GetMsg(&a1,&a2,
|
||||
1<<MSG_KEY_DOWN+1<<MSG_IP_L_DOWN+
|
||||
|
||||
Binary file not shown.
@@ -79,8 +79,8 @@ U0 FontEd()
|
||||
" Exit(,CH_ESC);"
|
||||
"}");
|
||||
AutoComplete;
|
||||
DocClear;
|
||||
DocCursor;
|
||||
DocClear;
|
||||
Fs->win_inhibit|=WIG_DBL_CLICK;
|
||||
cur_ch=0;
|
||||
try {
|
||||
|
||||
@@ -18,8 +18,10 @@ U0 GridDemo()
|
||||
ip_grid.y=GRID;
|
||||
old_draw_input_ptr=gr.fp_draw_input_ptr;
|
||||
gr.fp_draw_input_ptr=&DrawMyInputPtr;
|
||||
while (!ip.lb) //Left button to exit.
|
||||
while (!ip.lb) {//Left button to exit.
|
||||
GrPlot(,ip.pos.x,ip.pos.y);
|
||||
Yield;
|
||||
}
|
||||
DCFill;
|
||||
gr.fp_draw_input_ptr=old_draw_input_ptr;
|
||||
MemCpy(&ip_grid,&old_grid,sizeof(CGridGlbls));
|
||||
|
||||
@@ -169,12 +169,11 @@ U0 Lattice()
|
||||
"}"
|
||||
);
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
Preempt;
|
||||
WinMax;
|
||||
AutoComplete;
|
||||
WinBorder;
|
||||
DocClear;
|
||||
WinMax;
|
||||
DocCursor;
|
||||
DocClear;
|
||||
TurtleInit(&tt);
|
||||
SetMenu;
|
||||
Fs->win_inhibit=WIG_TASK_DFT-WIF_FOCUS_TASK_MENU
|
||||
|
||||
@@ -56,12 +56,13 @@ public U0 Life()
|
||||
restart=FALSE;
|
||||
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
AutoComplete;
|
||||
WinBorder;
|
||||
WinMax;
|
||||
DCFill;
|
||||
DocClear;
|
||||
DCFill;
|
||||
|
||||
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
|
||||
AutoComplete;
|
||||
Fs->draw_it=&DrawIt;
|
||||
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_BORDER;
|
||||
do {
|
||||
|
||||
@@ -5,6 +5,7 @@ U0 LowPassFilterDemo()
|
||||
F64 y,y1,t,dt;
|
||||
CDC *dc=DCAlias;
|
||||
|
||||
WinBorder;
|
||||
WinMax;
|
||||
DocClear;
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -108,12 +108,11 @@ U0 PoleZeros()
|
||||
GrPaletteSet(gr_palette_gray);
|
||||
GrPaletteColorSet(15,0xFFFF00000000); //White is red
|
||||
|
||||
WinMax;
|
||||
AutoComplete;
|
||||
WinBorder;
|
||||
|
||||
DCFill;
|
||||
WinMax;
|
||||
DocClear;
|
||||
DCFill;
|
||||
scale=1.0;
|
||||
|
||||
try {
|
||||
|
||||
@@ -55,11 +55,11 @@ U0 PredatorPrey()
|
||||
"with different, random, initial populations.\n");
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
try {
|
||||
DocClear;
|
||||
WinMax;
|
||||
WinBorder;
|
||||
WinMgrSync;
|
||||
AutoComplete;
|
||||
WinBorder;
|
||||
WinMax;
|
||||
DocClear;
|
||||
WinMgrSync;
|
||||
|
||||
dc->color=BLACK;
|
||||
GrLine(dc,OX,0,OX,GR_HEIGHT-FONT_HEIGHT-1);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -159,10 +159,10 @@ U0 Main()
|
||||
s->sz=6*VIEWANGLES_SNAP;
|
||||
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
DocClear;
|
||||
WinMax;
|
||||
WinBorder;
|
||||
AutoComplete;
|
||||
WinBorder;
|
||||
WinMax;
|
||||
DocClear;
|
||||
Fs->draw_it=&DrawIt;
|
||||
try {
|
||||
"\n\nMove mouse to change light source.\n\n";
|
||||
|
||||
Binary file not shown.
@@ -73,7 +73,6 @@ U0 LeftClickSlider(CCtrl *c,I64 x,I64 y,Bool)
|
||||
|
||||
CCtrl *SliderNew()
|
||||
{
|
||||
Bool old_preempt;
|
||||
CCtrl *c=CAlloc(sizeof(CCtrl));
|
||||
c->win_task=Fs;
|
||||
c->flags=CTRLF_SHOW|CTRLF_CAPTURE_LEFT_IP;
|
||||
@@ -83,18 +82,14 @@ CCtrl *SliderNew()
|
||||
c->draw_it=&DrawCtrlSlider;
|
||||
c->left_click=&LeftClickSlider;
|
||||
c->update_derived_vals=&UpdateDerivedCtrlSlider;
|
||||
old_preempt=Preempt;
|
||||
QueIns(c,Fs->last_ctrl);
|
||||
TaskDerivedValsUpdate;
|
||||
Preempt(old_preempt);
|
||||
return c;
|
||||
}
|
||||
|
||||
U0 SliderDel(CCtrl *c)
|
||||
{
|
||||
Bool old_preempt=Preempt;
|
||||
QueRem(c);
|
||||
Preempt(old_preempt);
|
||||
Free(c);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ public U0 SpeedLineDemo()
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_BORDER;
|
||||
|
||||
WinMax;
|
||||
WinBorder;
|
||||
AutoComplete;
|
||||
DCFill;
|
||||
WinBorder;
|
||||
WinMax;
|
||||
DocClear;
|
||||
DCFill;
|
||||
do {
|
||||
msg_code=GetMsg(&a1,&a2,
|
||||
1<<MSG_KEY_DOWN+1<<MSG_IP_L_DOWN+
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -7,10 +7,10 @@ U0 SunMoon()
|
||||
{
|
||||
I64 i,x,y,radius;
|
||||
|
||||
AutoComplete; //AutoComplete Off
|
||||
WinBorder; //No Border
|
||||
WinMax; //Maximize window
|
||||
DocClear; //Clear command-line text
|
||||
WinBorder; //No Border
|
||||
AutoComplete; //AutoComplete Off
|
||||
Fs->text_attr=BLACK<<4+WHITE; //Current $LK,"CTask",A="MN:CTask"$ is Fs segment register.
|
||||
|
||||
for (i=0;i<0x8000;i+=0x200) {
|
||||
|
||||
@@ -11,9 +11,10 @@ U0 SymmetryDemo()
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_BORDER;
|
||||
|
||||
WinBorder;
|
||||
WinMax;
|
||||
DCFill;
|
||||
DocClear;
|
||||
DCFill;
|
||||
dc->flags|=DCF_SYMMETRY;
|
||||
DCSymmetrySet(dc,Fs->pix_width/2,0,Fs->pix_width/2,1);
|
||||
do {
|
||||
@@ -50,10 +51,8 @@ U0 SymmetryDemo()
|
||||
}
|
||||
GrLine3(dc,x1,y1,0,x2,y2,0);
|
||||
break;
|
||||
case MSG_KEY_DOWN:
|
||||
break;
|
||||
}
|
||||
} while (msg_code!=MSG_KEY_DOWN || !a1);
|
||||
} while (msg_code!=MSG_KEY_DOWN || (a1!=CH_ESC && a1!=CH_SHIFT_ESC));
|
||||
GetMsg(,,1<<MSG_KEY_UP);
|
||||
DCFill;
|
||||
DCDel(dc);
|
||||
|
||||
Binary file not shown.
@@ -79,7 +79,6 @@ U0 LeftClickSlider(CCtrl *c,I64 x,I64 y,Bool)
|
||||
|
||||
CCtrl *SliderNew()
|
||||
{
|
||||
Bool old_preempt;
|
||||
CCtrl *c;
|
||||
if (Fs!=adam_task) {
|
||||
"Must be Adam Included with SHIFT-F5.\n"
|
||||
@@ -94,18 +93,14 @@ CCtrl *SliderNew()
|
||||
c->draw_it=&DrawCtrlSlider;
|
||||
c->left_click=&LeftClickSlider;
|
||||
c->update_derived_vals=&UpdateDerivedCtrlSlider;
|
||||
old_preempt=Preempt;
|
||||
QueIns(c,sys_winmgr_task->last_ctrl);
|
||||
TaskDerivedValsUpdate;
|
||||
Preempt(old_preempt);
|
||||
return c;
|
||||
}
|
||||
|
||||
U0 SliderDel(CCtrl *c)
|
||||
{
|
||||
Bool old_preempt=Preempt;
|
||||
QueRem(c);
|
||||
Preempt(old_preempt);
|
||||
Free(c->state);
|
||||
Free(c);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user