#include <acknex.h>
#include <default.c>
BMAP* arrow = "arrow.pcx";
void main()
{
mouse_map = arrow;
mouse_mode = 2;
int snap_amount = 25;
double ux = 0.0;
double uy = 0.0;
wait(1);
while (1) // move it over the screen
{
ux = mouse_cursor.x / snap_amount;
uy = mouse_cursor.y / snap_amount;
mouse_pos.x = (integer(ux)*snap_amount);
mouse_pos.y = (integer(uy)*snap_amount);
//draw grid
var i=0; var j=0;
for(i=0; i<screen_size.x; i+=snap_amount)
{
draw_line(vector(i,0,0),vector(255,0,0),100);
draw_line(vector(i,screen_size.y,0),vector(255,0,0),100);
draw_line(vector(i,0,0),NULL,100);
}
for(j=0; j<screen_size.y; j+=snap_amount)
{
draw_line(vector(0,j,0),vector(255,0,0),100);
draw_line(vector(screen_size.x,j,0),vector(255,0,0),100);
draw_line(vector(0,j,0),NULL,100);
}
wait(1);
}
}