allegro 4.2?

New to FreeBASIC? Post your questions here.
thebignic
Posts: 8
Joined: Sep 09, 2008 1:21

allegro 4.2?

Postby thebignic » Sep 16, 2008 14:59

I'm trying to compile a simple allegro demo with the default package included with FreeBASIC but its looking for alleg40.dll when I try to run it.

Is it possible to link the library in a way such that it doesnt need an external dll?

Also, Is there an updated package for FreeBASIC that uses Allegro 4.2 anywhere?
jofers
Posts: 1525
Joined: May 27, 2005 17:18
Contact:

Postby jofers » Sep 16, 2008 15:11

I suppose you could, but Allegro is designed to be loaded by DLL. For big libraries, it's a waste to do it otherwise.

That way, if you have 3 allegro copies running, only one set of code is in memory.

As for allegro 4.2, I think 4.3 is out. Either way, updating headers is a problem since they have to be translated. If you wanted to volunteer, that would be an awesome help.
thebignic
Posts: 8
Joined: Sep 09, 2008 1:21

Postby thebignic » Sep 16, 2008 15:13

In that case, is there an updated package of include files for Allegro 4.2, so I can compile this demo to run with the dll's that i DO have?

Did you just update that post or am I going crazy? hah

As for translating... If I was proficient enough in C to be able to do that, I'd probably just try to use DJGPP for all of my projects...
jofers
Posts: 1525
Joined: May 27, 2005 17:18
Contact:

Postby jofers » Sep 16, 2008 15:26

I usually edit my posts right after I post them, sorry. One of those situations where you can only think of something better to say after you say it.

As for the headers, I don't think so. Someone has to do it is the problem.

If you want to translate it yourself, check out SWIG:
http://www.freebasic.net/temp/swig_fb.zip

It translates most of it by machine, saves a ton of time. It trips up on macros and some type definitions though, and you have to do that part yourself.

Edit: oh, and if you do, share it with the community. If you do, they usually stick your name in the credits for the library.
thebignic
Posts: 8
Joined: Sep 09, 2008 1:21

Postby thebignic » Sep 16, 2008 15:36

I just wanted to *try* allegro to see if it'd be worthwhile (rather than using the built-in PUTs) because I'm not getting the framerates that I want.

Unfortunately I tried the allegro hardware blitting example (compiled in djgpp using alleg 4.2) and it says that my hardware doesn't even support hardware (vram to vram) blits, which I think is crazy and very unfortunate.

To spend (I dont know how many?) hours translating .bi files just to try some blit tests in FreeBASIC, only to find that its not going to be much faster than the built-in put's, would be very disappointing.


Does anyone use the builtin graphics library for anything serious, or is Allegro the way to go for fast 2D graphics?
jofers
Posts: 1525
Joined: May 27, 2005 17:18
Contact:

Postby jofers » Sep 16, 2008 15:47

Well, it's tough to find graphics card drivers for DOS.

The built in library isn't slow though, it's well coded and uses MMX instructions where available. I've never used it with DOS though, and have no idea how it and Allegro compare.
Mysoft
Posts: 778
Joined: Jul 28, 2005 13:56
Location: Brazil, Santa Catarina, Indaial (ouch!)
Contact:

Postby Mysoft » Sep 16, 2008 20:25

i basicly uses fbgfx and Windows API for my projects... even for all my projects... very suitable :)
Stinktier
Posts: 26
Joined: Sep 04, 2008 10:53
Location: Sweden; Gothenburg

Postby Stinktier » Sep 18, 2008 13:10

this is something i want to go further into aswell:

is the built-in lib fast enough for scaling, rotating, scrolling, and a couple of layers all at once in higher resolution?
roook_ph
Posts: 402
Joined: Apr 01, 2006 20:50
Location: philippines
Contact:

Postby roook_ph » Sep 20, 2008 3:43

there used to be a library called grx its been discontinued dont ask me why. There is also a tutorial before on how to do static allegro but its all on old version fb.15 below only i think ,

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 5 guests