Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Allegro port
#1
Is anyone up for a freeBASIC port of Allegro? I'm willing to help with this, and na_th_an's put forth the idea a couple of times; I'm willing to wait for the initial release of the compiler before starting, though... unless v1c sends me a pre-release ver, which would be okay too... I'm kinda low on free time this week anyway. I think this would be a worthy cause for anyone with Allegro or C experience to contribute to this awesome project. I'm up for it. Smile
Reply
#2
I'm willing, though I dunno how much time I have.
url]http://fbide.sourceforge.net/[/url]
Reply
#3
I think that all you have to do is port the headers (all .h to .bi), and compile the lib in MinGW.
Reply
#4
Allegros headers are 20% macros. Trying to port it would be painfull since FB doesn't have macros, yet atleast. Besides that lib sucks imo.
oship me and i will give you lots of guurrls and beeea
Reply
#5
I will try to do my best as soon as FB is released. I'll try to convert the macros to functions. I'll count you both in the project, Vongodric and DRV Smile
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#6
I'm gearing up to get down... I'll try to do the core gfx stuff and then put it up somewhere so other people can work on the other stuff. Thanks for the support so fast. Smile
Reply
#7
somone here should contacted Angelo Mottola he did some work on the Mac Os port of allegro he be the closest to a expert that the QB community has for allegro.

http://www.ecplusplus.com/
Reply
#8
here's a working example (you need to have liballeg.a in the fb lib/ dir):

Code:
Declare Function install_allegro CDecl Lib "alleg" (ByVal system_id As Integer, ByRef errno_ptr As Integer, ByVal atexit_ptr As Function()) As Integer
Declare Sub allegro_message CDecl Lib "alleg" (ByVal s As String)
Declare Sub allegro_exit CDecl Lib "alleg" ()

Declare Sub atexit CDecl Lib "crtdll" ()

Const SYSTEM_AUTODETECT = 0

Option Explicit

Dim Shared errno As Integer

Function allegro_init() As Integer
    allegro_init = install_allegro(SYSTEM_AUTODETECT, errno, ProcPtr(atexit))
End Function

'''
Dim ret As Integer
ret = allegro_init()
Print "ret = "; ret
Print "after allegro_init()..."
Call allegro_message("Hello, world!" + chr$(13) + "Press ok to exit")
Print "before allegro_exit()..."
allegro_exit
Print "after allegro_exit()..."


doesn't do much yet... help! v1ctor or somebody - how do I get at C externs? If I was just writing straight gas asm, i could use 'extrn' - is there an fb keyword for that?
Reply
#9
ehm if you mean like

extern void bleh

nevermind that extern. it'S just some stuff for the c-compiler to not redeclare the function somewhere else, would bitch on you otherwise. ignore extern

edit: i just was reminded by someone of common shared. hm... i'm a little confused now, but when i was porting that sdl headers i didn't have to add something to the declaration, so i guess ignoring extern when porting headers is fine.
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply
#10
Quote:somone here should contacted Angelo Mottola he did some work on the Mac Os port of allegro he be the closest to a expert that the QB community has for allegro.

http://www.ecplusplus.com/

Angelo sez: "no"

But he(Angelo) will work on the MAC OS port of FB. :*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)