Qbasicnews.com
Allegro port - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html)
+--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html)
+---- Forum: FB Projects (http://qbasicnews.com/newforum/forum-16.html)
+---- Thread: Allegro port (/thread-5188.html)

Pages: 1 2 3


Allegro port - Jofers - 12-03-2004

Cool. It's nice to Angelo returning... to... another scene. Wink


Allegro port - relsoft - 12-03-2004

Yeah, I wouldn't be surprised if Bobby would too. :*)


Allegro port - Jofers - 12-03-2004

Heh... for some reason Bobby Krusty (that font guy from years ago) came to mind, just seconds before the Cosmox Bobby. :???: But now Jorden needs to launch a freebasic site and it'll be a trifecta Big Grin


Allegro port - v3cz0r - 12-03-2004

Any external procs need to be declared with an ALIAS "realnamehere", coz all symbols are case-insensitive in FB.

The alias name doesn't have to include the initial _ or @, they will be added (unless the C proc already has an initial underscore on its name, course).

There's no extern, GAS will turn any non-declared symbol as extern automagically.


As Rel said, Angelo told us that it will a bitch to port, mainly 'cause the Allegro's main function - i know nothing about Allegro for Windows, i can't help on that.


Allegro port - DrV - 12-04-2004

No, no... I mean 'extern' vars... as in 'extern BITMAP *screen;' -- which is utterly necessary... do I have to write a crappy go-between lib in C to get and set vars? :-?

EDIT: There is a gas thing for externs - the '.extern' directive (not extrn as I said before.... that's MASM/TASM.)


Allegro port - v3cz0r - 12-04-2004

Yeah i know, but: ".extern is accepted in the source program--for compatibility with other assemblers--but it is ignored. as treats all undefined symbols as external", that's from gas' manual.

Like in QB, there's no way to shared vars between modules, then using COMMON, but in C you would have to declare them the same way as in FB, that would be all names in uppercase - and if you declare them in QB using suffixes (%&), it's even more difficult to know the right name.

Why do you need to share that kind of var between C and basic? I don't think it would be too safe, anyone could do screen = garbage at fb and loads of craps would happen - why not doing the SDL way? The user has the control over the bitmaps/surfaces, i thought Allegro was that way too..


Allegro port - DrV - 12-04-2004

Allegro uses an external variable called 'screen' to represent the hardware screen bitmap, and one called 'key' to represent the keyboard keys, etc... I'm not sure how it all works under the hood, but it works in C... Smile


Allegro port - relsoft - 12-04-2004

Quote:Heh... for some reason Bobby Krusty (that font guy from years ago) came to mind, just seconds before the Cosmox Bobby. :???: But now Jorden needs to launch a freebasic site and it'll be a trifecta Big Grin

trifecta. The memories.... :*)

I thought it was you, wurka and chaoticmass?


Allegro port - na_th_an - 12-04-2004

screen is just a BITMAP structure that represents the screen. That way, you do a :

Code:
blit (myBuffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H);

to blit your buffer to the screen making it visible. That's why it is shared.


Allegro port - v3cz0r - 12-04-2004

And "screen" is a qb/fb keyword.. Allegro could have added at least dunno al_ to public procs and global variables, there are probably what, 50 different global vars with ordinary names.. backward compatibility, i guess..