Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Allegro port
#11
Cool. It's nice to Angelo returning... to... another scene. Wink
Reply
#12
Yeah, I wouldn't be surprised if Bobby would too. :*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#13
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
Reply
#14
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.
Reply
#15
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.)
Reply
#16
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..
Reply
#17
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
Reply
#18
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?
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#19
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.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#20
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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)