Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Two version of Allegro for one program

Credits go to Evert, Tobias Dammers, and X-G for helping out!
This thread is locked; no one can reply to it. rss feed Print
Two version of Allegro for one program
Karadoc ~~
Member #2,749
September 2002
avatar

I've got some stuff that I made using Allegro 4 which I now want to convert to Allegro 5. .. It's a bit of a daunting task to go through everything looking for what needs to be changed, and then changing it all and hoping that there are no mistakes... So I would prefer to do it just bit by bit.

So, my question is this: is it ok to use two version of Allegro at once? can I initialise both of them and use them side by side without them interfering with one another? .. For example I might using allegro 4 for drawing bitmaps and allegro 5 for timing and events.

(actually, it's particularly difficult for me to completely drop Allegro 4 on the project that I'm thinking of, because Allegro 5 doesn't have a GUI addon.)

-----------

Tobias Dammers
Member #2,604
August 2002
avatar

I don't think using the two alongside each other is a good idea. It might work, I'm not sure. How far into the project are you? If it's early alpha, just switch to A5 and write your own GUI code (or use an add-on); if it's almost done, then keep A4 and save A5 for the next one.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

X-G
Member #856
December 2000
avatar

99% sure they will interfere with each other to the point of nothing working.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Evert
Member #794
November 2000
avatar

Allegro 5 doesn't have a GUI addon

It'll take you about one afternoon to port Allegro 4's GUI to Allegro 5. The reason is that most of the GUI code is fairly self-contained and doesn't actually depend very much on the rest of Allegro. You'll probably be spending most time on re-doing the widgets, but if you're like everyone else you probably already have custom widgets anyway.
Alternatively, people have worked on making a GUI addon for A5, you might be able to pick up one of those.

Karadoc ~~
Member #2,749
September 2002
avatar

Ok, so the general advice seems to be that using both Allegros at the same time is a bad idea. I suppose I'll just sit on it for awhile until I build up enough motivation to convert the whole thing in one sitting. As for porting the A4 GUI stuff, I'll consider it, but I probably won't actually do it...

Thanks for the advice.

-----------

Neil Black
Member #7,867
October 2006
avatar

Speaking of A5 GUIs, it looks like Trent Gamblin has done one: http://www.allegro.cc/forums/thread/604516

Not being a user of A5, I can't really comment on the quality. But you might find it useful, Karadoc

Go to: