Qbasicnews.com
July 04, 2020, 08:48:48 AM *
Welcome, Guest. Please login or register.

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  
Pages: [1]
  Print  
Author Topic: Allegro font routines  (Read 2765 times)
subxero
Member
*
Posts: 78



WWW
« on: February 11, 2005, 09:13:55 AM »

I know DrV hasn't officially ported them/placed them in allegro.bi yet, so I attempted to write up a DECLARE statement for Allegro's load_font. Then I noticed the version of Allegro included with FB didn't have the load_font routine in it (it must've been a shortened version) so I got a new one and it compiled OK but crashed when ran.

I'm horrible with stuff like this. I'm guessing the DECLARE would be something like:

Code:
DECLARE FUNCTION Load_Font ALIAS "load_font" (FileName AS STRING, Pal AS RGB POINTER, Param AS ANY POINTER) AS FONT POINTER


I noticed RGB wasn't a struct yet, so I changed it to ANY POINTER for a while and gave it a shot, but it didn't quite work.

Fonts in Allegro are quite confusing. Any clues, anyone?
Logged

color=blue]subxero - admin at this place.[/color]
VonGodric
Ancient Guru
****
Posts: 674



WWW
« Reply #1 on: February 11, 2005, 10:27:06 AM »

Be sure you pass as BYVAL
Code:
DECLARE FUNCTION Load_Font ALIAS "load_font" (byval FileName AS STRING, byval Pal AS RGB POINTER, byval Param AS ANY POINTER) AS FONT POINTER
Logged

url]http://fbide.sourceforge.net/[/url]
subxero
Member
*
Posts: 78



WWW
« Reply #2 on: February 12, 2005, 04:15:45 PM »

Hmm... now FBC complains that it can't find load_font. Weird.
Logged

color=blue]subxero - admin at this place.[/color]
subxero
Member
*
Posts: 78



WWW
« Reply #3 on: February 13, 2005, 09:05:50 PM »

Not to pester, but does anyone have a clue on how to do this?
I've been a bit busy the last week or so - bunch o' homework, woman problems (but it's fine now) and I've been porting my old QB GUI (Accelera) to FreeBASIC for MS-DOS using Allegro, and it's turning out beautifully. So, I don't have a ton o' time to mess with it, leider.
Logged

color=blue]subxero - admin at this place.[/color]
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #4 on: February 15, 2005, 10:43:03 PM »

Allegro doesn't have a load_font routine...  you need to use the datafile  grabber or write your own font load routine (or just use a custom font routine).
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!