Mail Archives: djgpp/1997/06/26/18:34:14
From: | Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Allegro question about dat files and memory
|
Date: | Sun, 22 Jun 1997 14:03:27 +0100
|
Organization: | None
|
Distribution: | world
|
Message-ID: | <a3x15DAfKSrzEwNs@talula.demon.co.uk>
|
References: | <5oipt6$hb2$1 AT diana DOT ibernet DOT es>
|
NNTP-Posting-Host: | talula.demon.co.uk
|
MIME-Version: | 1.0
|
Lines: | 18
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Gregorio Hankiewicz writes:
>The question is : is it better to load the whole dat file into memory or
>create bitmaps and load the data from the dat file into them?
>The dat file is compressed, but when you load it, you store it
>uncompressed, right?
load_datafile() returns all the objects in a ready-to-use format, so
there is no need to do any conversions of your own or to make copies of
the data. The only reason why you might want to load only some parts of
a datafile (by calling load_datafile_object()) is to save memory, for
example if you had a game with multiple levels and wanted to store all
the graphics in one datafile but only load the images required for the
current stage...
--
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 -