Qbasicnews.com
January 26, 2021, 03:05:08 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Back to Qbasicnews.com
|
QB Online Help
|
FAQ
|
Chat
|
All Basic Code
|
QB Knowledge Base
Home
Help
Search
Login
Register
Qbasicnews.com
>
Qbasic "like" compilers/interpreters
>
FB Discussion & Programming Help
>
FB Projects
>
Allegro port
Pages:
1
[
2
]
« previous
next »
Print
Author
Topic: Allegro port (Read 16013 times)
v3cz0r
I hold this place together
Posts: 924
Allegro port
«
Reply #15 on:
December 03, 2004, 06:53:46 PM »
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..
Logged
ew FreeBASIC forums:
http://www.freebasic.net/forum/index.php
DrV
Na_th_an
Posts: 1553
Allegro port
«
Reply #16 on:
December 03, 2004, 06:59:59 PM »
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...
Logged
relsoft
*/-\*
Posts: 3927
Allegro port
«
Reply #17 on:
December 04, 2004, 12:17:15 AM »
Quote from: "Jofers"
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
trifecta. The memories.... :*)
I thought it was you, wurka and chaoticmass?
Logged
y smiley is 24 bit.
Genso's Junkyard:
http://rel.betterwebber.com/
na_th_an
*/-\*
Posts: 8244
Allegro port
«
Reply #18 on:
December 04, 2004, 12:42:35 AM »
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.
Logged
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
v3cz0r
I hold this place together
Posts: 924
Allegro port
«
Reply #19 on:
December 04, 2004, 12:55:38 AM »
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..
Logged
ew FreeBASIC forums:
http://www.freebasic.net/forum/index.php
barok
Na_th_an
Posts: 1727
How about a tasty lead sandwich?
Allegro port
«
Reply #20 on:
December 04, 2004, 01:25:30 AM »
is there a different syntax for screen? Any program that i try to compile in fb i have to end up taking out any screen statements.
Logged
Jumping Jahoolipers!
relsoft
*/-\*
Posts: 3927
Allegro port
«
Reply #21 on:
December 04, 2004, 01:31:03 AM »
Something in the mode of:
Screen width, height, bpp, screenmode
I guess that would work.
Logged
y smiley is 24 bit.
Genso's Junkyard:
http://rel.betterwebber.com/
v3cz0r
I hold this place together
Posts: 924
Allegro port
«
Reply #22 on:
December 04, 2004, 01:39:27 AM »
Not yet, but when Sterling finishes his qb-like gfx lib.
Logged
ew FreeBASIC forums:
http://www.freebasic.net/forum/index.php
Jofers
Been there, done that
Posts: 1040
Allegro port
«
Reply #23 on:
December 04, 2004, 02:18:53 AM »
Yeah, something like that, rel. But I was actually using the word "trifecta", meaning "triple winner" alluding to horse racing.
Logged
DrV
Na_th_an
Posts: 1553
Allegro port
«
Reply #24 on:
December 05, 2004, 01:11:24 PM »
Okay, decided to use a little C lib for getting/setting externs since I needed it anyway for functions to convert string return values to FB strings... here's a quick demo:
Download fballeg-prerelease-preview.zip
* smiles at qh2 people *
EDIT: crap... forgot to upload bitmap in the zip - fixed now
Logged
Pages:
1
[
2
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Forum has moved
-----------------------------
=> Forum has moved
-----------------------------
QbasicNews.Com
-----------------------------
=> QB/FB News
=> Site/Forum Issues
=> Challenges
-----------------------------
QBasic
-----------------------------
=> QB Discussion & Programming Help
=> QB Projects
-----------------------------
Qbasic "like" compilers/interpreters
-----------------------------
=> General QB "like"
=> QB64
=> FB Discussion & Programming Help
===> FB Projects
===> FB Documentation
-----------------------------
General
-----------------------------
=> General/Misc
===> Art & Music
===> General Programming
Loading...