delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/16/16:31:22

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Suggestion for Allegro...
Date: Thu, 16 Oct 1997 18:51:42 +0100
Organization: None
Distribution: world
Message-ID: <BQHDQGAuQlR0Ewxm@talula.demon.co.uk>
References: <3445339A DOT 7F98CE24 AT anest DOT azg DOT nl>
<1a5be7d947%mattbee AT soup-kitchen DOT demon DOT co DOT uk>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 26
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Matthew Bloch writes:
>Well... the thing that has confused me about the DAT files is that you 
>have a separate call in the API for pulling out BMPs, WAVs etc., 

What do you mean? There is the load_datafile() function for reading
entire files, and there is load_datafile_object() for loading an
individual object. Those don't look like separate calls to me!

>but they're all essentially *data*.

Yeah, but the data means totally different things, and is held in
different formats once it is in memory (look in allegro.h, and you wlil
see that things like the BITMAP structure aren't just a binary block of
memory). Plus sometimes there are things that need to be converted
during the load process (compiled sprites from pixel data to machine
code, or truecolor pixels from RGB format to whatever layout the video
card is using), so the loader has to know what type of data it is
reading. The API does give you a standard function for loading any type
of object, that returns a pointer to the data in the "dat" field, but
how the code works, and what structure this void pointer refers to,
obviously needs to be different from one object type to another...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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