Hi,
1.I'm looking for a possibility for polling the mouse without getting screen coordinates but just movement vectors (that means, possible infinite mouse movement). Furthermore, I'd like to get the mouse cursor hidden (in OpenGL mode).
2.Does anybody know how to compile an allegro program on Windows platforms without getting a dosbox opened with every program call?
I'm using Allegro 4.0.3, AllegroGL 0.2.2 and DevCpp 4.9.9.2
I'd be glad if anybody could help!
I don't use allegro for a while, but if you selected win32 gui app in Dev-Cpp I think you shouldn't see a console, if you still see one,"properties > compiler > linker > do not create console window = YES" will do the job I think...
I'm looking for a possibility for polling the mouse without getting screen coordinates but just movement vectors (that means, possible infinite mouse movement).
In Allegro, use get_mouse_mickeys. For pure Win32, check out the raw input API.
@cosku bas: Yeah, thanks! I didn't think it was that easy.
Compile with -mwindows
Go to Project->Project Options. In there, change your project type from Console to GUI, and then click OK. No more DOS prompt.
The problem with the dosbox is solved. Thank you all.
But how to remove the mouse cursor in OpenGL mode?
You should probably update Allegro and AllegroGL. IIRC, the mouse problem was a bug fixed in AllegroGL 0.2.4, and Allegro 4.0.3 is outdated. Get Allegro 4.2 and see if someone here has an AllegroGL CVS archive that's ready to compile (eg. the misc generation scripts have been pre-run).
EDIT: Attached a fresh CVS checkout, should be ready to compile on MinGW. Just extract it, go into the directory, and run make or mingw32-make.
To kill the mouse in a Windows window, there's some ShowMouse(0) or am I confusing it with allegro? I have a pretty good win32 help file from
ftp://ftp.cs.virginia.edu/pub/lcc-win32/win32hlp.exe
that has a lot of Direct X and OpenGL stuff in it as well as the usual Windows stuff.
Wow, thank you all for these friendly advices.
Now I'm going to try out all that stuff.