openbsd-ports/games/ri-li/patches/patch-src_sprite_cc

36 lines
1.2 KiB
Plaintext

$OpenBSD: patch-src_sprite_cc,v 1.1 2017/05/24 18:37:43 espie Exp $
Index: src/sprite.cc
--- src/sprite.cc.orig
+++ src/sprite.cc
@@ -21,7 +21,10 @@
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#include <iostream.h>
+#include <iostream>
+using std::cerr;
+using std::endl;
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -351,7 +354,7 @@ bool Sprite::Load(unsigned char *Buf,long &P)
// Fabrique la surface
Image[i]=SDL_CreateRGBSurface((Dim[i].bpp-3)*SDL_SRCALPHA,Dim[i].L,Dim[i].H,Dim[i].bpp*8,
0xff,0xff00,0xff0000,0xff000000*(Dim[i].bpp-3));
- if(Image[i]<=NULL) {
+ if(Image[i]==NULL) {
cerr <<"Impossible de créer une Surface SDL!"<<endl;
return false;
}
@@ -485,7 +488,7 @@ bool Sprite::Nouveau(int Lx,int Ly)
// Fabrique la surface
Image[0]=SDL_CreateRGBSurface((Dim[0].bpp-3)*SDL_SRCALPHA,Dim[0].L,Dim[0].H,Dim[0].bpp*8,
0xff,0xff00,0xff0000,0xff000000*(Dim[0].bpp-3));
- if(Image[0]<=NULL) {
+ if(Image[0]==NULL) {
cerr <<"Impossible de créer une Surface SDL!"<<endl;
return false;
}