Thoughts on Allegro on Mac OS X

Member
Posts: 749
Joined: 2003.01
Post: #46
Hey Lillo!! An italian programmer here! And a pretty cool one it looks... wow!
spacchiamo sti ameregani...
Quote this message in a reply
ClosetPacifist
Unregistered
 
Post: #47
Still had to put in the pthreads line, other than that it compiled without modification.

EDIT: Also, I've noticed that the mouse location detecting and the show_mouse function don't seem to be working.
Quote this message in a reply
lillo
Unregistered
 
Post: #48
ClosetPacifist: ok, pthread_sigmask() seems to be missing from libpthread under 10.1.x... Too bad. I've applied a last fix that will solve the issue once and for all (simply avoids to call the function if compiling under OSX). Replacing it with sigprocmask() isn't really the same, as you're going to mask signals for the whole process, not the single thread.

About the mouse issues, here's a wild guess: have you called install_mouse() before trying to handle the mouse? Do the library examples work?

Najdorf: si fa quel che si puÚ... Grin Comunque Ë bello sapere che ci sono altri programmatori mac italiani!
Quote this message in a reply
ClosetPacifist
Unregistered
 
Post: #49
Yup- I'm calling install_mouse in my program, and it dosen't work in mappy either (which, by the way, compiled perfectly the first time). Atleast I assume mappy uses the mouse... Haven't tried the library's samples, will look into it now.

EDIT: exmouse just printed: "No mouse detected, but you need one!". Hmm- using the standard apple pro optical.
Quote this message in a reply
lillo
Unregistered
 
Post: #50
The current mouse detection routines assume the mouse to be connected via the USB port (HID device detection); I assumed the Mac mice to always use this connection... am I wrong? I've never seen a desktop Mac close enough to verify this, but looking at the 5 USB ports of the iMac at the Apple website I thought I was right...
Does the Apple pro mouse use a dedicated port?
Quote this message in a reply
ClosetPacifist
Unregistered
 
Post: #51
It uses the usb port too, yup; think all the mice since the first iMac or before have, indeed, used usb. Going to try it with it plugged into the back instead of the keyboard.

EDIT: Same thing. Whew, that plug's hard to get out of the back ports.
Quote this message in a reply
lillo
Unregistered
 
Post: #52
looks like in a bug in the HID Manager Allegro module then... Can you get on IRC now? It seems we're posting at the same time, and I could debug the thing in realtime if we arrange an IRC meeting. Come now on #allegro, EFnet please, or just let me know an hour (I'm at GMT +1).
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #53
Mice and Keyboards aren't available through the HID manager until 10.2. On 10.1.x and less you have to use the normal Cocoa/Carbon event manager to access them.
Quote this message in a reply
lillo
Unregistered
 
Post: #54
humm, that explains why it fails to find valid devices for ClosetPacifist. Is there another way to detect attached mice under 10.1.x (better: the number of available mouse buttons). Otherwise, is there a way to detect the OS version at compile time (maybe via some #definition), rather than at runtime?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #55
I don't know of a way to find the number of mouse buttons without HID, but if you don't need that information up-front you can just wait for right and middle clicks... Otherwise, you can either assume the mouse only has one button and ignore clicks from other buttons, or you can assume it has three and not worry about whether the others are actually available.

How will detecting the OS version at compile time help? People will want to compile the framework once and distribute it to any number of people on any number of versions of the OS.
Quote this message in a reply
justinwalsh
Unregistered
 
Post: #56
I had a hell of a time installing allegro from source and i think i may have finally got it right, but just in case is the .pkw binary installer still available, or is there an official one in the works? The previous link posted is 404'N on me.

Also, is windowed alphablending any faster than it is in SDL, this will make me a believer.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #57
Feanor Wrote:Well, I'm building it now. I'll have a look at it when it's done and report back. I think I remember encountering Allegro in the bygone days of trying to learn djgpp on Dos around 1996. It was cool, but blew my mind. It was the first time I'd seen a real thing compiled on a computer after being downloaded as source. I imagine it is a different beast nowadays.
I used it too at that time, also with djgpp. I suppose it has evolved a lot since. Back then, it was a reasonable way to get QuickDraw running under DOS/Windows95, through a simple glue layer that I wrote. I actually used it to port Sprite Animation Toolkit to PC using Allegro, to make a cross-platform game. Well, it worked. Note that it did not replace SAT, only its blitter level. SAT is a lot more high-level than Allegro was. Allegro did the QuickDraw level.

What has happened since? Support for accelerated hardware? New neat features?
Quote this message in a reply
Post Reply