diff window/picture.cc @ 43:01aa5ddf7dc8

A lot of very minor improvements (deleted some unused variables, and other things like that...)
author thib
date Tue, 24 Mar 2009 19:45:48 +0000
parents 97b752b43502
children ed6c21dde840
line wrap: on
line diff
--- a/window/picture.cc
+++ b/window/picture.cc
@@ -42,7 +42,6 @@
 using namespace std;
 
 int print_blit=0;
-inline void dprintf(const char* fmt, ...) {}
 /* render.cc */
 void DSurfaceBlitAlpha(Surface* src_o, const Rect& srcrect_o, Surface* dst_o, const Rect& dstrect_o, const unsigned char* alpha, const Rect& alpharect);
 void DSurfaceBlitSaturate(Surface* src_o, const Rect& srcrect, Surface* dst_o, const Rect& dstrect, unsigned char alpha);
@@ -958,20 +957,19 @@ inline SDL_Rect SDLed(const Rect& rect) 
 void PicRoot::BlitSurface(Surface* src, const Rect& src_r, const unsigned char* alpha, const Rect& alpha_r, Surface* dest, const Rect& dest_r, int attribute) const {
 if (print_blit) fprintf(stderr," s %08x %d:%d:%d:%d;",src, dest_r.lx, dest_r.ty, dest_r.rx, dest_r.by);
 	SDL_Rect sr = SDLed(src_r); SDL_Rect dr = SDLed(dest_r);
-special_blit:
+
 	if (attribute & PicBase::BLIT_MULTIPLY) {
 if (print_blit) fprintf(stderr,"M");
 		DSurfaceBlitMultiply(src, src_r, dest, dest_r);
 		return;
-	} else if (attribute & PicBase::BLIT_SATURATE) {
-		if (src->format->Amask != 0) goto normal_blit;
+	} else if (attribute & PicBase::BLIT_SATURATE && src->format->Amask == 0) {
 if (print_blit) fprintf(stderr,"S");
 		unsigned char a = 255;
 		if (alpha && alpha_r.width() >= 1 && alpha_r.height() >= 1) a = *alpha;
 		DSurfaceBlitSaturate(src, src_r, dest, dest_r, a);
 		return;
 	}
-normal_blit:
+
 if (print_blit) fprintf(stderr,"N");
 	if (alpha == 0 || alpha_r.width() == 0) { // simple blit
 if (print_blit) fprintf(stderr,"X");