1. More Bitmap Questions
- Posted by Vic <cybrgod at IBM.NET> Dec 09, 1996
- 1505 views
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 _________________________________________________________________ | http://www.geocities.com/SiliconValley/Heights/8858/home.htm | | It's so difficult to work in groups when you are omnipotent. -Q |
2. More Bitmap Questions
- Posted by Vojtech Jakes <slayer at BBS.INFIMA.CZ> Dec 10, 1996
- 1516 views
EU>Hello, EU>I have a question about putting a bitmap(1st) on another bitmap. I have a EU>background bitmap and then a smaller bitmap(2nd) on the bitmap. The EU>background color of the 2nd bitmap is black. How can I stop the background EU>of the second bitmap from appearing when I display the images on screen? EU>I have looked at some demos I downloaded from the Official Euphoria Page but EU>I don't understand. Well, I don't work in euphoria, I just like to see that other languages than C have some problems too. But I will tell you how I would solve this problem in C. I would set up a color that would be considered transparent. (It would probably be 0, concerning that we are in mode 0x13 or some other 256 color mode, on color less won't make any difference to the user if he is to recognize.) Then in the poloting routine for the bitmap I would make something like void DrawPixel (int x, int y, int color) { if (color !=0) // if color is not zero... putpixel(x, y, color); } void DrawBitMap(int BMHeight, int BMWidht, char *BMP) /* BMHeight specifies the height of a bitmap BMWidth specifies the width of a bitmap BMP is a pointer of chars (0-255 values) to the bitmap image */ { int i, j; for (j=0; j<BMHeight; j++) // for each line... for (i=0; i<BMWidth; i++) // draw a column... PutPixel(i, j, BMP[j*BMHeight+i]); } Well, maybe this will help you all. Just don't send me a hate mail for not writing this in euphoria please. Thanks. slayer at bbs.infima.cz
3. Re: More Bitmap Questions
- Posted by Michael Packard <lgp at EXO.COM> Dec 09, 1996
- 1505 views
- Last edited Dec 10, 1996
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
4. Re: More Bitmap Questions
- Posted by Michael Packard <lgp at EXO.COM> Dec 09, 1996
- 1528 views
- Last edited Dec 10, 1996
On Tue, 10 Dec 1996, Vojtech Jakes wrote: > > EU>Hello, > EU>I have a question about putting a bitmap(1st) on another bitmap. I have a > EU>background bitmap and then a smaller bitmap(2nd) on the bitmap. The > EU>background color of the 2nd bitmap is black. How can I stop the background > EU>of the second bitmap from appearing when I display the images on screen? > EU>I have looked at some demos I downloaded from the Official Euphoria Page bu t > EU>I don't understand. > > Well, I don't work in euphoria, I just like to see that other languages > than C have some problems too. But I will tell you how I would solve > this problem in C. I would set up a color that would be considered You should use Euphoria. Don't spout C code to us! =b bleah! > > Well, maybe this will help you all. Just don't send me a hate mail for > not writing this in euphoria please. Thanks. > slayer at bbs.infima.cz 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
5. Re: More Bitmap Questions
- Posted by Vic <cybrgod at IBM.NET> Dec 10, 1996
- 1503 views
Thanks for you help guys, I'm figuring out what I'll do. Since a majority of the background is black I might just paste the images over each another. I could put this in to a procedure and at the end I could have a completely black image I will use to clear the reactangle which I used for the sprite. Or I might use on of the methods as you told me. Thanks again, Vic _________________________________________________________________ | http://www.geocities.com/SiliconValley/Heights/8858/home.htm | | It's so difficult to work in groups when you are omnipotent. -Q |
6. Re: More Bitmap Questions
- Posted by Kirk Lang <kirklang at PRESYS.COM> Dec 10, 1996
- 1498 views
Vic wrote: > Thanks for you help guys, I'm figuring out what I'll do. Since a > majority of the background is black I might just paste the images over each > another. I could put this in to a procedure and at the end I could have a > completely black image I will use to clear the reactangle which I used for > the sprite. Or I might use on of the methods as you told me. > Thanks again, > Vic Anyone have a small assembler example in Euphoria for dumping a bit of graphics into the 640x480 256 color mode? It's a pain because that memory is greater than 64k..ARGG! SEGMENTS. I hate them. Anyone have any routines for turning on a standard VESA truecolor mode? Or technical reference for VESA interrupts? (I lost mine....) Kirk