Re: More Bitmap Questions

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Mon, 9 Dec 1996, Vic wrote:
> Hello,
> I have a question about putting a bitmap(1st) on another bitmap.  I have a
> background bitmap and then a smaller bitmap(2nd) on the bitmap.  The
> background color of the 2nd bitmap is black.  How can I stop the background
> of the second bitmap from appearing when I display the images on screen?
> I have looked at some demos I downloaded from the Official Euphoria Page but
> I don't understand.
> Please help,
> Vic

I do this all the time.  Sooner or later I'll be detailing this in the
crash course lessons, assuming I get around to writing more any time soon.
=)

I store the background in a sequence then index into that sequence to the
pixel location of the sprite I'm drawing into the screen, then go pixel by
pixel through my sprite and wherever the sprite pixel color value isn't 0,
(my default masking color) I replace the background pixel with the sprite
pixel. When I finish replacing pixels, I grab the rectangular region
containing the background and sprite and draw it to the screen on top of
what was there.  It's really simpler than it sounds.  If you go to my
euphoria page, I have lots of commented source code examples you can
download.

Someone else (name fell out of my head) has created a sprite library that
sets up virtual screens and handles the sprite draws for you.  If you hop
around all the Euphoria pages, you'll find it.

If you need more info e-mail me.

Michael Packard
Lord Generic Productions
lgp at exo.com http://exo.com/~lgp
A Crash Course in Game Design and Production
http://exo.com/~lgp/euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu