#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
int main(int argc, char *argv[]) {
int done=0;
SDL_Surface *screen;
SDL_Surface *escenario01;
SDL_Surface *texto1;
SDL_Surface *fondo;
SDL_Surface *tu;
SDL_Surface *flecha1;
SDL_Surface *flecha2;
SDL_Rect dest;
SDL_Event event;
///////////////////////////////////////
if (SDL_Init(SDL_INIT_VIDEO)==-1) {
printf("No se pudo iniciar el juego Triox-Informer, ahorcado errores: %s\n", SDL_GetError());
SDL_Quit();
exit(-1);
}
///////////////////////////////////
screen=SDL_SetVideoMode(740,600,24, SDL_HWSURFACE);
//////////////////////////////////
SDL_ShowCursor(SDL_DISABLE);
///////////////////////////////////
escenario01=IMG_Load ("scenario/scenario01.png");
tu=IMG_Load("sprites/tu.png");
texto1=IMG_Load("textos/texto1.png");
fondo=IMG_Load("fondo.png");
flecha1=IMG_Load("flecha.png");
flecha2=IMG_Load("flecha.png");
///////////////////////////////////
dest.x=89;
dest.y=100;
SDL_BlitSurface(escenario01,NULL,screen,&dest);
SDL_Flip(screen);
dest.x=237;
dest.y=243;
SDL_SetColorKey(tu,SDL_SRCCOLORKEY,SDL_MapRGBA(tu->format,153,153,153,0));
SDL_BlitSurface(tu,NULL,screen,&dest);
SDL_Flip(screen);
como podran ver ha una imagen con transparencia, (es un gris un poco ams fuerte del que te trae paint)
en el cuentagotas de paint sale asi:
Matiz:160 Rojo:153
Sat:0 Verde:153
Llum:144 Azul:153
pero el caso es que la transparencia no funciona, se queda con el gris, no se que hacer