Hello everyone!
OK, here’s the code:
==================
bool Game::t_DrawVehicle()
{
SDL_Rect src, dest;
src.w = 96;
src.h = 96;
dest.w = 96;
dest.h = 96;
dest.x = 0;
dest.y = 0;
// Layer 1
src.x = 0;
src.y = 0;
SDL_BlitSurface(this->vehicles[0].layers, &src, this->vehicles[0].bmp,
&dest);
SDL_UpdateRect(this->vehicles[0].bmp, 0, 0, 96, 96);
return true;
}
=================
The blit isn’t working… Here’s the declaration of both surfaces
(they’re not on the same func):
==================
this->vehicles[0].layers = IMG_Load("./Graphics/Vehicles/AZX-2400.PNG");
//192x192
this->vehicles[0].bmp = IMG_Load("./Graphics/Transparent 96x96
Image.png"); //96x96
=================
The ‘layers’ one works, because I can display it to the screen, but
’bmp’ just displays the original image it had… (“Transparent 96x96
Image.png”, just a transparent box with a black pixel in the middle…)
Does anyone know why it’s happening? Thanks very much!–
~ Leo, M@$73r L3170, Sulfurik, Kixdemp, L-28C… Whatever you wanna call me.