Initial (manual) import

This commit is contained in:
minexew committed 2017-01-22 20:26:44 +01:00
1 parent f39611c506
commit 895fe109de
661 files changed
+245862

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
#define GRID 5
U0 DrawMyMs(CDC *dc,I64 x,I64 y)
{
dc->pen_width=1;
dc->flags&=~(DCF_TRANSFORMATION|DCF_SYMMETRY);
GrRect(dc,x,y,GRID,GRID);
}
U0 GridDemo()
{
CGridGlbls old_grid;
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;
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_ms=old_draw_ms;
MemCpy(&ms_grid,&old_grid,sizeof(CGridGlbls));
}
GridDemo;