tileSet::tileSet(char file[], int Rows, int Columns){ Uint32 color; this->m_image_tiles = IMG_Load(file); if (!this->m_image_tiles) { printf ("IMG_Load: %s\n", IMG_GetError ()); } color = SDL_MapRGB(this->m_image_tiles->format, 255, 0, 255); SDL_SetColorKey(this->m_image_tiles, SDL_SRCCOLORKEY, color); this->m_Rows = Rows; this->m_Cols = Columns;}
How can i make it with the same pixel format that the screen if i create the surface with IMG_Load???
Thanks, ;)
-------------------------------------------------------
Asi tengo implementado la creacion del TileSet:
tileSet::tileSet(char file[], int Rows, int Columns){ Uint32 color; this->m_image_tiles = IMG_Load(file); if (!this->m_image_tiles) { printf ("IMG_Load: %s\n", IMG_GetError ()); } color = SDL_MapRGB(this->m_image_tiles->format, 255, 0, 255); SDL_SetColorKey(this->m_image_tiles, SDL_SRCCOLORKEY, color); this->m_Rows = Rows; this->m_Cols = Columns;}
¿Como puedo hacer para que sea del mismo formato que el screen si creo la surface con IMG_Load?
Gracias ;)