Lines 351-357
bool Sprite::Load(unsigned char *Buf,long &P)
Link Here
|
351 |
// Fabrique la surface |
351 |
// Fabrique la surface |
352 |
Image[i]=SDL_CreateRGBSurface((Dim[i].bpp-3)*SDL_SRCALPHA,Dim[i].L,Dim[i].H,Dim[i].bpp*8, |
352 |
Image[i]=SDL_CreateRGBSurface((Dim[i].bpp-3)*SDL_SRCALPHA,Dim[i].L,Dim[i].H,Dim[i].bpp*8, |
353 |
0xff,0xff00,0xff0000,0xff000000*(Dim[i].bpp-3)); |
353 |
0xff,0xff00,0xff0000,0xff000000*(Dim[i].bpp-3)); |
354 |
if(Image[i]<=NULL) { |
354 |
if(!Image[i]) { |
355 |
std::cerr <<"Impossible de créer une Surface SDL!"<<std::endl; |
355 |
std::cerr <<"Impossible de créer une Surface SDL!"<<std::endl; |
356 |
return false; |
356 |
return false; |
357 |
} |
357 |
} |
Lines 485-491
bool Sprite::Nouveau(int Lx,int Ly)
Link Here
|
485 |
// Fabrique la surface |
485 |
// Fabrique la surface |
486 |
Image[0]=SDL_CreateRGBSurface((Dim[0].bpp-3)*SDL_SRCALPHA,Dim[0].L,Dim[0].H,Dim[0].bpp*8, |
486 |
Image[0]=SDL_CreateRGBSurface((Dim[0].bpp-3)*SDL_SRCALPHA,Dim[0].L,Dim[0].H,Dim[0].bpp*8, |
487 |
0xff,0xff00,0xff0000,0xff000000*(Dim[0].bpp-3)); |
487 |
0xff,0xff00,0xff0000,0xff000000*(Dim[0].bpp-3)); |
488 |
if(Image[0]<=NULL) { |
488 |
if(!Image[0]) { |
489 |
std::cerr <<"Impossible de créer une Surface SDL!"<<std::endl; |
489 |
std::cerr <<"Impossible de créer une Surface SDL!"<<std::endl; |
490 |
return false; |
490 |
return false; |
491 |
} |
491 |
} |