Newb question

Hello,

I am new to SDL and I need to know how to do something:

My surface is for example a spider, but it has white space that is not
part of the actual spider. How can I make the white become the
background instead so that I only see the spider part of the surface. Is
the the colokey thing?

Help is greatly appreciated.

Regards,
Rafik Rezzik

\ contact: rafik at hotpop.com
/ site: www.linuxworld.tk

I am new to SDL and I need to know how to do something:

My surface is for example a spider, but it has white space that is not
part of the actual spider. How can I make the white become the
background instead so that I only see the spider part of the surface. Is
the the colokey thing?

Hi,

You’re right is the colorkey thing :slight_smile:
http://sdldoc.csn.ul.ie/sdlsetcolorkey.php

ciao,
Ivan

----- Original Message -----
From: rafik@hotpop.com (Rafik Rezzik)

Ivan Montes wrote:> ----- Original Message -----

From: “Rafik Rezzik”

I am new to SDL and I need to know how to do something:

My surface is for example a spider, but it has white space that is not
part of the actual spider. How can I make the white become the
background instead so that I only see the spider part of the surface. Is
the the colokey thing?

Hi,

You’re right is the colorkey thing :slight_smile:
http://sdldoc.csn.ul.ie/sdlsetcolorkey.php

ciao,
Ivan


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Ok I got it know thanks :slight_smile:

This probably a simple question, but I also have a simple mind. I want
to set a colorkey that is used for all images when I blit them. Or do I
have to blit each image with that perticular colorkey?

Thanks,
Rafik

You should set it for each image…> ----- Original Message -----

From: rafik@hotpop.com (Rafik Rezzik)
To:
Sent: Saturday, March 22, 2003 7:19 PM
Subject: [SDL] Newb question

This probably a simple question, but I also have a simple mind. I want
to set a colorkey that is used for all images when I blit them. Or do I
have to blit each image with that perticular colorkey?

Thanks,
Rafik


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

See SDL_SetColorKey(). Once you’ve set a colorkey for a particular surface,
SDL remembers it.On Saturday 22 March 2003 12:19 pm, Rafik Rezzik wrote:

This probably a simple question, but I also have a simple mind. I want
to set a colorkey that is used for all images when I blit them. Or do I
have to blit each image with that perticular colorkey?

Thanks,
Rafik