Question about libwiisprite transparency August 01, 2008 02:38AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Question about libwiisprite transparency August 01, 2008 05:25AM | Registered: 16 years ago Posts: 211 |
Quote
libwiisprite
void wsp:: Sprite:: SetTransparency ( u8 alpha )
Sets the transparency of the sprite.
Parameters:
alpha Sets the transparency. Has a range from 0x00 (invisible) to 0xFF (fully visible)
Re: Question about libwiisprite transparency August 01, 2008 03:54PM | Registered: 16 years ago Posts: 109 |
Re: Question about libwiisprite transparency August 01, 2008 11:12PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Question about libwiisprite transparency August 02, 2008 03:24AM | Registered: 16 years ago Posts: 211 |
Re: Question about libwiisprite transparency August 02, 2008 04:50AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Question about libwiisprite transparency August 03, 2008 05:22AM | Registered: 16 years ago Posts: 211 |
Re: Question about libwiisprite transparency August 03, 2008 05:28AM | Admin Registered: 16 years ago Posts: 5,132 |
//Function Prototypes void MakeTransparent(Image* image, int r, int g, int b); bool CheckPixel(Image* image, int x, int y, int r, int g, int b); //Actual Functions (or most of them anyway) void MakeTransparent(Image* image, int r, int g, int b){ int width = image->GetWidth(); int height = image->GetHeight(); for(int y = 0; y <= height; y++){ for(int x = 0; x <= width; x++){ if(CheckPixel(image, x, y, r, g, b)) //Make that pixel on the image transparent for the rest of the program } } } bool CheckPixel(Image* image, int x, int y, int r, int g, int b){ //Find the coordinte on the image (determined by x and y) //Determine the numeric value of its Red, Blue, and Green hues //If they are same as r, g, and b return true; else return false; } //Example of calling the function MakeTransparent(hero, 255, 0, 255); //This would make all Pink pixels in the Image hero transparent
Re: Question about libwiisprite transparency August 03, 2008 06:01AM | Registered: 16 years ago Posts: 211 |
Re: Question about libwiisprite transparency August 03, 2008 03:53PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Question about libwiisprite transparency August 04, 2008 04:10AM | Registered: 16 years ago Posts: 211 |
Re: Question about libwiisprite transparency August 04, 2008 05:36AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Question about libwiisprite transparency August 04, 2008 05:42AM | Registered: 16 years ago Posts: 211 |
Re: Question about libwiisprite transparency August 04, 2008 05:45AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Question about libwiisprite transparency August 04, 2008 05:53AM | Registered: 16 years ago Posts: 211 |
Re: Question about libwiisprite transparency August 04, 2008 05:56AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Question about libwiisprite transparency August 04, 2008 05:58AM | Registered: 16 years ago Posts: 211 |
Re: Question about libwiisprite transparency August 04, 2008 06:14AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Question about libwiisprite transparency August 04, 2008 06:17AM | Registered: 16 years ago Posts: 211 |
Re: Question about libwiisprite transparency August 04, 2008 06:27AM | Admin Registered: 16 years ago Posts: 5,132 |