Qbasicnews.com
First Allegro test.. - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: General (http://qbasicnews.com/newforum/forum-6.html)
+--- Forum: General/Misc (http://qbasicnews.com/newforum/forum-18.html)
+--- Thread: First Allegro test.. (/thread-5855.html)



First Allegro test.. - v3cz0r - 01-29-2005

I just ported an Allegro example to FB, the star fields one: http://fbc.sourceforge.net/allegrotest.zip

The Allegro DLL (http://prdownloads.sourceforge.net/alleg/all403_bin.zip?download) must be installed in the Windows system directory.

Using DrV's W.I.P. Allegro headers.


(you many noticed a bunch of weird []'s there, but unfortunately they are needed to use Allegro, as many important structs are actually global C arrays that can't be accessed as ordinary arrays (QB/FB have descriptors).


First Allegro test.. - Antoni Gual - 01-29-2005

Code:
if( *(@al_key+KEY_ESC) <> 0 )then
:o :o :o :o
One day you will have to write a tutorial for us poor mortals....


First Allegro test.. - Z!re - 01-29-2005

al_key is a variable, from which you get the adress

You then add the key value to the adress

And check if tha value on the new adress is <> 0


It's sort of having an array:
Code:
al_key = VARSEG(KeyArray(0))
If PEEK(al_key+27) <> 0 Then


Sort of Big Grin


Re: First Allegro test.. - theuserbl - 01-30-2005

Quote:Using DrV's W.I.P. Allegro headers.

Where can I find them?

I only know, that DrV have here showing the first allegro example, which I can compile and run on my computer.
And then there existing his GFX sample side. But the "Simple FreeBasic Allegro-Test" there comes also without an allegro.bi - but it is needed to compile the example.

So, where can I find it?


Greatings
theuserbl


First Allegro test.. - relsoft - 01-30-2005

Very cool!!!


First Allegro test.. - v3cz0r - 01-30-2005

The headers are in the CVS (search at the sourceforge site) but you can't use them without the lastest compiler version, that wasn't released yet.. maybe today, maybe tomorrow..


First Allegro test.. - Nathan1993 - 01-30-2005

Its out right now, when you posted this :bounce: