two Panels with different bitmaps :S

Posted By: hopfel

two Panels with different bitmaps :S - 12/16/10 21:55

Hey guys,
I want to create two panels, with the same bitmapfile as bitmap,
but not with the same bitmap-pointer,
so I can transform the bitmap from the first panel (with a pixelfunction)
without transforming the bitmap of the second one too.

Atm my code looks like:

Code:
PANEL* panel1 = {bmap = "picture.png";}
PANEL* panel2 = {bmap = "picture.png";}


Now panel1.bmap has the same pointer as panel2.bmap... :S

One solution is just to make a copy of the bitmapfile,
but then the filesize of the whole game is bigger,
and that's anyway not a "real" solution for me.

Hope, someone is so kind to help me. ^-^
Posted By: Widi

Re: two Panels with different bitmaps :S - 12/16/10 22:09

Then MAKE two different pointers to this Bitmap:
Code:
BMAP* picture1 = "picture.png";
BMAP* picture2 = "picture.png";
PANEL* panel1 = {bmap = picture1;}
PANEL* panel2 = {bmap = picture2;}



Maybee that is not what you need, maybee you can create a second bitmap with the same size with bmap_createblack() and copy your orginalbitmap in this one. So your folder is not bigger, contains only one bmap.
Posted By: hopfel

Re: two Panels with different bitmaps :S - 12/17/10 16:15

Oh boy!
I made so many 2D-Games and I was not able to find the solution for this... ARGH! o.-'
Thank you for your help, I should really stop programming that late in the evening. :S
© 2024 lite-C Forums