delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/25/08:31:40

From: "Chris Bailey" <chris DOT bailey AT softhome DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: What is wrong with this code?
Date: Mon, 25 May 1998 13:10:59 +0100
Lines: 31
NNTP-Posting-Host: nas5-44.thefree.net
Message-ID: <3569605a.0@news.thefree.net>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am using Allegro 3.0 and just started experimenting with datafiles that
you can create with the grabber tool. I have used what looks like exactly
the same syntax as the example programs but it won't work.

#include <allegro.h>
#include "test.h"        // Created by Grabber, defines TITLE_FONT to be 0

int main()
{
DATAFILE* data;
data = load_datafile("D:\\DJGPP\\PROGRAMS\\TEST.DAT");
if (initialiseGraphics())
{
  exit(1);
}
clear(screen);
textout(screen,data[TITLE_FONT].dat,"This is a test",0,0,15);
return 0;
}

I get this error:

bad argument 2 for function `void textout(struct BITMAP *, struct FONT *,
unsigned char *, int, int, int)' (type was void *)

Any ideas on how to fix it?
Chris




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019