TempleOSCDV5.00.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:48:09 +02:00
1 parent 122df6338e
commit f6eacf7744
374 files changed
+11078 -11204

No files matched your search

+12 -12
View File
@@ -1,6 +1,6 @@
#define GRID 5
U0 DrawMyInputPtr(CDC *dc,I64 x,I64 y)
U0 DrawMyMs(CDC *dc,I64 x,I64 y)
{
dc->pen_width=1;
dc->flags&=~(DCF_TRANSFORMATION|DCF_SYMMETRY);
@@ -10,21 +10,21 @@ U0 DrawMyInputPtr(CDC *dc,I64 x,I64 y)
U0 GridDemo()
{
CGridGlbls old_grid;
U0 (*old_draw_input_ptr)(CDC *dc,I64 x,I64 y); //Can't init this type of var.
MemCpy(&old_grid,&ip_grid,sizeof(CGridGlbls));
U0 (*old_draw_ms)(CDC *dc,I64 x,I64 y); //Can't init this type of var.
MemCpy(&old_grid,&ms_grid,sizeof(CGridGlbls));
GridInit;
ip_grid.snap=TRUE; //You can set other $LK,"stuff",A="MN:CGridGlbls"$.
ip_grid.x=GRID;
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.
GrPlot(,ip.pos.x,ip.pos.y);
ms_grid.snap=TRUE; //You can set other $LK,"stuff",A="MN:CGridGlbls"$.
ms_grid.x=GRID;
ms_grid.y=GRID;
old_draw_ms=gr.fp_draw_ms;
gr.fp_draw_ms=&DrawMyMs;
while (!ms.lb) {//Left bttn to exit.
GrPlot(,ms.pos.x,ms.pos.y);
Yield;
}
DCFill;
gr.fp_draw_input_ptr=old_draw_input_ptr;
MemCpy(&ip_grid,&old_grid,sizeof(CGridGlbls));
gr.fp_draw_ms=old_draw_ms;
MemCpy(&ms_grid,&old_grid,sizeof(CGridGlbls));
}
GridDemo;