//////////// used to sync the mouse properly
function on_maximize_event() // adapt the engine resolution to the window size
{ RECT r; GetClientRect(hWnd,&r); video_set(r.right,r.bottom,0,0); }
function on_resize_event() // adapt the engine resolution to the window size
{ RECT r; GetClientRect(hWnd,&r); video_set(r.right,r.bottom,0,0); }