delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/09/17:36:25

From: "Zoma" <Zoma AT sprynet DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Another Allegro question...
Date: 8 Aug 1997 16:28:26 GMT
Organization: Sprynet News Service
Lines: 26
Message-ID: <01bca418$13a6cc40$31faaec7@windows95>
NNTP-Posting-Host: hd70-049.hil.compuserve.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am using Allegro to make a tile base RPG and I am wondering if you could
tell me something.  In order to draw the tiles, I am going to store them in
some sort of data structure, and call them using some sort of ID number
(probably and index to an array).  Using Allegro, would the FASTEST way to
do this be:

1) Store all of the images in a BITMAP, and go to the first pixel of the
individual tile as needed.

2).  Store each image as a BITMAP in an array of bitmaps.

3).  Store all of the tiles in a massive array of pixels (like the screen).

4).  Store the info in some other data structure, and have an array of
those.

Method one might work well, but I would need to perform a calculation in
order to compute the first pixel, and this would take time.  Method 3 would
also involve and offset equation (like 320*y +x, only a different
equation).  2 looks to be the best for now, all it needs is an
initialization function, and that would only need to be called at start up.
 One other question: blitting is the fastest way to draw unmasked BITMAPS
right?  I mean, should I make my own function using fmemset() or something.
 Thanks for all of your help,

Zoma AT sprynet DOT com

- Raw text -


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