Fixed compiling with the latest API changes
authorSam Lantinga <slouken@libsdl.org>
Wed, 02 Feb 2011 14:34:24 -0800
changeset 51533e4086b3bcd2
parent 5152 3b85dfaf2893
child 5154 fb424691cfc7
Fixed compiling with the latest API changes
test/automated/Makefile
test/automated/render/render.c
test/automated/surface/surface.c
     1.1 --- a/test/automated/Makefile	Tue Feb 01 21:51:54 2011 -0800
     1.2 +++ b/test/automated/Makefile	Wed Feb 02 14:34:24 2011 -0800
     1.3 @@ -9,8 +9,6 @@
     1.4  
     1.5  SRC         	:= testsdl.c \
     1.6  						platform/platform.c \
     1.7 -						rwops/rwops.c \
     1.8 -						rwops/TestSupportRWops.c \
     1.9  						rect/rect.c \
    1.10  						surface/surface.c \
    1.11  						render/render.c \
    1.12 @@ -18,6 +16,8 @@
    1.13  COMMON_SRC     := SDL_at.c common/common.c
    1.14  COMMON_INCLUDE := SDL_at.h
    1.15  
    1.16 +RWOPS_SRC      := rwops/rwops.c rwops/TestSupportRWops_Generic.c
    1.17 +
    1.18  TESTS_ALL := testsdl \
    1.19  	platform/platform \
    1.20  	rwops/rwops \
    1.21 @@ -35,14 +35,14 @@
    1.22  test: all
    1.23  	@./testsdl
    1.24  
    1.25 -testsdl: $(SRC) $(COMMON_SRC)
    1.26 -	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(COMMON_SRC)
    1.27 +testsdl: $(SRC) $(RWOPS_SRC) $(COMMON_SRC)
    1.28 +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(RWOPS_SRC) $(COMMON_SRC)
    1.29  
    1.30  platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC)
    1.31  	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE
    1.32  
    1.33 -rwops/rwops: rwops/rwops.c $(COMMON_INCLUDE) $(COMMON_SRC)
    1.34 -	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ rwops/rwops.c $(COMMON_SRC) -DTEST_STANDALONE
    1.35 +rwops/rwops: $(RWOPS_SRC) $(COMMON_INCLUDE) $(COMMON_SRC)
    1.36 +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RWOPS_SRC) $(COMMON_SRC) -DTEST_STANDALONE
    1.37  
    1.38  rect/rect: rect/rect.c $(COMMON_INCLUDE) $(COMMON_SRC)
    1.39  	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ rect/rect.c $(COMMON_SRC) -DTEST_STANDALONE
     2.1 --- a/test/automated/render/render.c	Tue Feb 01 21:51:54 2011 -0800
     2.2 +++ b/test/automated/render/render.c	Wed Feb 02 14:34:24 2011 -0800
     2.3 @@ -25,6 +25,7 @@
     2.4  #define FACE_W       img_face.width
     2.5  #define FACE_H       img_face.height
     2.6  
     2.7 +static SDL_Renderer *renderer;
     2.8  
     2.9  /*
    2.10   * Prototypes.
    2.11 @@ -67,7 +68,7 @@
    2.12     rect.y = 0;
    2.13     rect.w = 80;
    2.14     rect.h = 60;
    2.15 -   ret = SDL_RenderReadPixels( &rect, FORMAT, pix, 80*4 );
    2.16 +   ret = SDL_RenderReadPixels(renderer, &rect, FORMAT, pix, 80*4 );
    2.17     if (SDL_ATassert( "SDL_RenderReadPixels", ret==0) )
    2.18        return 1;
    2.19  
    2.20 @@ -98,7 +99,7 @@
    2.21     SDL_RendererInfo info;
    2.22  
    2.23     /* Read pixels. */
    2.24 -   ret = SDL_RenderReadPixels( NULL, FORMAT, pix, 80*4 );
    2.25 +   ret = SDL_RenderReadPixels(renderer, NULL, FORMAT, pix, 80*4 );
    2.26     if (SDL_ATassert( "SDL_RenderReadPixels", ret==0) )
    2.27        return 1;
    2.28  
    2.29 @@ -109,7 +110,7 @@
    2.30        return 1;
    2.31  
    2.32     /* Dump surface. */
    2.33 -   SDL_GetRendererInfo(&info);
    2.34 +   SDL_GetRendererInfo(renderer,&info);
    2.35     sprintf(name, "%s-%s-%d.bmp", SDL_GetCurrentVideoDriver(), info.name, index);
    2.36     SDL_SaveBMP(testsur, name);
    2.37  
    2.38 @@ -140,14 +141,14 @@
    2.39     fail = 0;
    2.40  
    2.41     /* Set colour. */
    2.42 -   ret = SDL_SetRenderDrawColor( 100, 100, 100, 100 );
    2.43 +   ret = SDL_SetRenderDrawColor(renderer, 100, 100, 100, 100 );
    2.44     if (!render_isSupported(ret))
    2.45        fail = 1;
    2.46 -   ret = SDL_GetRenderDrawColor( &r, &g, &b, &a );
    2.47 +   ret = SDL_GetRenderDrawColor(renderer, &r, &g, &b, &a );
    2.48     if (!render_isSupported(ret))
    2.49        fail = 1;
    2.50     /* Restore natural. */
    2.51 -   ret = SDL_SetRenderDrawColor( 0, 0, 0, SDL_ALPHA_OPAQUE );
    2.52 +   ret = SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE );
    2.53     if (!render_isSupported(ret))
    2.54        fail = 1;
    2.55  
    2.56 @@ -172,28 +173,28 @@
    2.57  
    2.58     fail = 0;
    2.59  
    2.60 -   ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_BLEND );
    2.61 +   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND );
    2.62     if (!render_isSupported(ret))
    2.63        fail = 1;
    2.64 -   ret = SDL_GetRenderDrawBlendMode( &mode );
    2.65 +   ret = SDL_GetRenderDrawBlendMode(renderer, &mode );
    2.66     if (!render_isSupported(ret))
    2.67        fail = 1;
    2.68     ret = (mode != SDL_BLENDMODE_BLEND);
    2.69     if (!render_isSupported(ret))
    2.70        fail = 1;
    2.71 -   ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_ADD );
    2.72 +   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_ADD );
    2.73     if (!render_isSupported(ret))
    2.74        fail = 1;
    2.75 -   ret = SDL_GetRenderDrawBlendMode( &mode );
    2.76 +   ret = SDL_GetRenderDrawBlendMode(renderer, &mode );
    2.77     if (!render_isSupported(ret))
    2.78        fail = 1;
    2.79     ret = (mode != SDL_BLENDMODE_ADD);
    2.80     if (!render_isSupported(ret))
    2.81        fail = 1;
    2.82 -   ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_NONE );
    2.83 +   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );
    2.84     if (!render_isSupported(ret))
    2.85        fail = 1;
    2.86 -   ret = SDL_GetRenderDrawBlendMode( &mode );
    2.87 +   ret = SDL_GetRenderDrawBlendMode(renderer, &mode );
    2.88     if (!render_isSupported(ret))
    2.89        fail = 1;
    2.90     ret = (mode != SDL_BLENDMODE_NONE);
    2.91 @@ -229,7 +230,7 @@
    2.92           );
    2.93     if (face == NULL)
    2.94        return 0;
    2.95 -   tface = SDL_CreateTextureFromSurface( 0, face );
    2.96 +   tface = SDL_CreateTextureFromSurface(renderer, 0, face );
    2.97     SDL_FreeSurface(face);
    2.98  
    2.99     return tface;
   2.100 @@ -316,26 +317,26 @@
   2.101     int ret;
   2.102  
   2.103     /* Set colour. */
   2.104 -   ret = SDL_SetRenderDrawColor( 0, 0, 0, SDL_ALPHA_OPAQUE );
   2.105 +   ret = SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE );
   2.106     /*
   2.107     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.108        return -1;
   2.109     */
   2.110  
   2.111     /* Clear screen. */
   2.112 -   ret = SDL_RenderFillRect( NULL );
   2.113 +   ret = SDL_RenderFillRect(renderer, NULL );
   2.114     /*
   2.115     if (SDL_ATassert( "SDL_RenderFillRect", ret == 0))
   2.116        return -1;
   2.117     */
   2.118  
   2.119     /* Set defaults. */
   2.120 -   ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_NONE );
   2.121 +   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );
   2.122     /*
   2.123     if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0))
   2.124        return -1;
   2.125     */
   2.126 -   ret = SDL_SetRenderDrawColor( 255, 255, 255, SDL_ALPHA_OPAQUE );
   2.127 +   ret = SDL_SetRenderDrawColor(renderer, 255, 255, 255, SDL_ALPHA_OPAQUE );
   2.128     /*
   2.129     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.130        return -1;
   2.131 @@ -358,7 +359,7 @@
   2.132     rect.y = 0;
   2.133     rect.w = 80;
   2.134     rect.h = 60;
   2.135 -   ret = SDL_RenderWritePixels( &rect, SDL_PIXELFORMAT_RGB24, img_primitives.pixel_data, img_primitives.width*img_primitives.bytes_per_pixel );
   2.136 +   ret = SDL_RenderWritePixels(renderer, &rect, SDL_PIXELFORMAT_RGB24, img_primitives.pixel_data, img_primitives.width*img_primitives.bytes_per_pixel );
   2.137     if (SDL_ATassert( "SDL_RenderWritePixels", ret==0) )
   2.138        return 1;
   2.139  
   2.140 @@ -392,10 +393,10 @@
   2.141     rect.y = 0;
   2.142     rect.w = 40;
   2.143     rect.h = 80;
   2.144 -   ret = SDL_SetRenderDrawColor( 13, 73, 200, SDL_ALPHA_OPAQUE );
   2.145 +   ret = SDL_SetRenderDrawColor(renderer, 13, 73, 200, SDL_ALPHA_OPAQUE );
   2.146     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.147        return -1;
   2.148 -   ret = SDL_RenderFillRect( &rect );
   2.149 +   ret = SDL_RenderFillRect(renderer, &rect );
   2.150     if (SDL_ATassert( "SDL_RenderFillRect", ret == 0))
   2.151        return -1;
   2.152  
   2.153 @@ -404,10 +405,10 @@
   2.154     rect.y = 10;
   2.155     rect.w = 60;
   2.156     rect.h = 40;
   2.157 -   ret = SDL_SetRenderDrawColor( 200, 0, 100, SDL_ALPHA_OPAQUE );
   2.158 +   ret = SDL_SetRenderDrawColor(renderer, 200, 0, 100, SDL_ALPHA_OPAQUE );
   2.159     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.160        return -1;
   2.161 -   ret = SDL_RenderFillRect( &rect );
   2.162 +   ret = SDL_RenderFillRect(renderer, &rect );
   2.163     if (SDL_ATassert( "SDL_RenderFillRect", ret == 0))
   2.164        return -1;
   2.165  
   2.166 @@ -418,41 +419,41 @@
   2.167     for (y=0; y<3; y++) {
   2.168        x = y % 2;
   2.169        for (; x<80; x+=2) {
   2.170 -         ret = SDL_SetRenderDrawColor( x*y, x*y/2, x*y/3, SDL_ALPHA_OPAQUE );
   2.171 +         ret = SDL_SetRenderDrawColor(renderer, x*y, x*y/2, x*y/3, SDL_ALPHA_OPAQUE );
   2.172           if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.173              return -1;
   2.174 -         ret = SDL_RenderDrawPoint( x, y );
   2.175 +         ret = SDL_RenderDrawPoint(renderer, x, y );
   2.176           if (SDL_ATassert( "SDL_RenderDrawPoint", ret == 0))
   2.177              return -1;
   2.178        }
   2.179     }
   2.180  
   2.181     /* Draw some lines. */
   2.182 -   ret = SDL_SetRenderDrawColor( 0, 255, 0, SDL_ALPHA_OPAQUE );
   2.183 +   ret = SDL_SetRenderDrawColor(renderer, 0, 255, 0, SDL_ALPHA_OPAQUE );
   2.184     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.185        return -1;
   2.186 -   ret = SDL_RenderDrawLine( 0, 30, 80, 30 );
   2.187 +   ret = SDL_RenderDrawLine(renderer, 0, 30, 80, 30 );
   2.188     if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0))
   2.189        return -1;
   2.190 -   ret = SDL_SetRenderDrawColor( 55, 55, 5, SDL_ALPHA_OPAQUE );
   2.191 +   ret = SDL_SetRenderDrawColor(renderer, 55, 55, 5, SDL_ALPHA_OPAQUE );
   2.192     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.193        return -1;
   2.194 -   ret = SDL_RenderDrawLine( 40, 30, 40, 60 );
   2.195 +   ret = SDL_RenderDrawLine(renderer, 40, 30, 40, 60 );
   2.196     if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0))
   2.197        return -1;
   2.198 -   ret = SDL_SetRenderDrawColor( 5, 105, 105, SDL_ALPHA_OPAQUE );
   2.199 +   ret = SDL_SetRenderDrawColor(renderer, 5, 105, 105, SDL_ALPHA_OPAQUE );
   2.200     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.201        return -1;
   2.202 -   ret = SDL_RenderDrawLine( 0, 0, 29, 29 );
   2.203 +   ret = SDL_RenderDrawLine(renderer, 0, 0, 29, 29 );
   2.204     if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0))
   2.205        return -1;
   2.206 -   ret = SDL_RenderDrawLine( 29, 30, 0, 59 );
   2.207 +   ret = SDL_RenderDrawLine(renderer, 29, 30, 0, 59 );
   2.208     if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0))
   2.209        return -1;
   2.210 -   ret = SDL_RenderDrawLine( 79, 0, 50, 29 );
   2.211 +   ret = SDL_RenderDrawLine(renderer, 79, 0, 50, 29 );
   2.212     if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0))
   2.213        return -1;
   2.214 -   ret = SDL_RenderDrawLine( 79, 59, 50, 30 );
   2.215 +   ret = SDL_RenderDrawLine(renderer, 79, 59, 50, 30 );
   2.216     if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0))
   2.217        return -1;
   2.218  
   2.219 @@ -482,77 +483,77 @@
   2.220        return 0;
   2.221  
   2.222     /* Create some rectangles for each blend mode. */
   2.223 -   ret = SDL_SetRenderDrawColor( 255, 255, 255, 0 );
   2.224 +   ret = SDL_SetRenderDrawColor(renderer, 255, 255, 255, 0 );
   2.225     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.226        return -1;
   2.227 -   ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_NONE );
   2.228 +   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );
   2.229     if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0))
   2.230        return -1;
   2.231 -   ret = SDL_RenderFillRect( NULL );
   2.232 +   ret = SDL_RenderFillRect(renderer, NULL );
   2.233     if (SDL_ATassert( "SDL_RenderFillRect", ret == 0))
   2.234        return -1;
   2.235     rect.x = 10;
   2.236     rect.y = 25;
   2.237     rect.w = 40;
   2.238     rect.h = 25;
   2.239 -   ret = SDL_SetRenderDrawColor( 240, 10, 10, 75 );
   2.240 +   ret = SDL_SetRenderDrawColor(renderer, 240, 10, 10, 75 );
   2.241     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.242        return -1;
   2.243 -   ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_ADD );
   2.244 +   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_ADD );
   2.245     if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0))
   2.246        return -1;
   2.247 -   ret = SDL_RenderFillRect( &rect );
   2.248 +   ret = SDL_RenderFillRect(renderer, &rect );
   2.249     if (SDL_ATassert( "SDL_RenderFillRect", ret == 0))
   2.250        return -1;
   2.251     rect.x = 30;
   2.252     rect.y = 40;
   2.253     rect.w = 45;
   2.254     rect.h = 15;
   2.255 -   ret = SDL_SetRenderDrawColor( 10, 240, 10, 100 );
   2.256 +   ret = SDL_SetRenderDrawColor(renderer, 10, 240, 10, 100 );
   2.257     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.258        return -1;
   2.259 -   ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_BLEND );
   2.260 +   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND );
   2.261     if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0))
   2.262        return -1;
   2.263 -   ret = SDL_RenderFillRect( &rect );
   2.264 +   ret = SDL_RenderFillRect(renderer, &rect );
   2.265     if (SDL_ATassert( "SDL_RenderFillRect", ret == 0))
   2.266        return -1;
   2.267     rect.x = 25;
   2.268     rect.y = 25;
   2.269     rect.w = 25;
   2.270     rect.h = 25;
   2.271 -   ret = SDL_SetRenderDrawColor( 10, 10, 240, 125 );
   2.272 +   ret = SDL_SetRenderDrawColor(renderer, 10, 10, 240, 125 );
   2.273     if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.274        return -1;
   2.275 -   ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_MOD );
   2.276 +   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );
   2.277     if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0))
   2.278        return -1;
   2.279 -   ret = SDL_RenderFillRect( &rect );
   2.280 +   ret = SDL_RenderFillRect(renderer, &rect );
   2.281     if (SDL_ATassert( "SDL_RenderFillRect", ret == 0))
   2.282        return -1;
   2.283  
   2.284     /* Draw blended lines, lines for everyone. */
   2.285     for (i=0; i<SCREEN_W; i+=2)  {
   2.286 -      ret = SDL_SetRenderDrawColor( 60+2*i, 240-2*i, 50, 3*i );
   2.287 +      ret = SDL_SetRenderDrawColor(renderer, 60+2*i, 240-2*i, 50, 3*i );
   2.288        if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.289           return -1;
   2.290 -      ret = SDL_SetRenderDrawBlendMode((((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :
   2.291 -            (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD );
   2.292 +      ret = SDL_SetRenderDrawBlendMode(renderer,(((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :
   2.293 +            (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE );
   2.294        if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0))
   2.295           return -1;
   2.296 -      ret = SDL_RenderDrawLine( 0, 0, i, 59 );
   2.297 +      ret = SDL_RenderDrawLine(renderer, 0, 0, i, 59 );
   2.298        if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0))
   2.299           return -1;
   2.300     }
   2.301     for (i=0; i<SCREEN_H; i+=2)  {
   2.302 -      ret = SDL_SetRenderDrawColor( 60+2*i, 240-2*i, 50, 3*i );
   2.303 +      ret = SDL_SetRenderDrawColor(renderer, 60+2*i, 240-2*i, 50, 3*i );
   2.304        if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.305           return -1;
   2.306 -      ret = SDL_SetRenderDrawBlendMode((((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :
   2.307 -            (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD );
   2.308 +      ret = SDL_SetRenderDrawBlendMode(renderer,(((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :
   2.309 +            (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE );
   2.310        if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0))
   2.311           return -1;
   2.312 -      ret = SDL_RenderDrawLine( 0, 0, 79, i );
   2.313 +      ret = SDL_RenderDrawLine(renderer, 0, 0, 79, i );
   2.314        if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0))
   2.315           return -1;
   2.316     }
   2.317 @@ -560,14 +561,14 @@
   2.318     /* Draw points. */
   2.319     for (j=0; j<SCREEN_H; j+=3) {
   2.320        for (i=0; i<SCREEN_W; i+=3) {
   2.321 -         ret = SDL_SetRenderDrawColor( j*4, i*3, j*4, i*3 );
   2.322 +         ret = SDL_SetRenderDrawColor(renderer, j*4, i*3, j*4, i*3 );
   2.323           if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0))
   2.324              return -1;
   2.325 -         ret = SDL_SetRenderDrawBlendMode( ((((i+j)/3)%3)==0) ? SDL_BLENDMODE_BLEND :
   2.326 -               ((((i+j)/3)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD );
   2.327 +         ret = SDL_SetRenderDrawBlendMode(renderer, ((((i+j)/3)%3)==0) ? SDL_BLENDMODE_BLEND :
   2.328 +               ((((i+j)/3)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE );
   2.329           if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0))
   2.330              return -1;
   2.331 -         ret = SDL_RenderDrawPoint( i, j );
   2.332 +         ret = SDL_RenderDrawPoint(renderer, i, j );
   2.333           if (SDL_ATassert( "SDL_RenderDrawPoint", ret == 0))
   2.334              return -1;
   2.335        }
   2.336 @@ -616,7 +617,7 @@
   2.337           /* Blitting. */
   2.338           rect.x = i;
   2.339           rect.y = j;
   2.340 -         ret = SDL_RenderCopy( tface, NULL, &rect );
   2.341 +         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );
   2.342           if (SDL_ATassert( "SDL_RenderCopy", ret == 0))
   2.343              return -1;
   2.344        }
   2.345 @@ -673,7 +674,7 @@
   2.346           /* Blitting. */
   2.347           rect.x = i;
   2.348           rect.y = j;
   2.349 -         ret = SDL_RenderCopy( tface, NULL, &rect );
   2.350 +         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );
   2.351           if (SDL_ATassert( "SDL_RenderCopy", ret == 0))
   2.352              return -1;
   2.353        }
   2.354 @@ -735,7 +736,7 @@
   2.355           /* Blitting. */
   2.356           rect.x = i;
   2.357           rect.y = j;
   2.358 -         ret = SDL_RenderCopy( tface, NULL, &rect );
   2.359 +         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );
   2.360           if (SDL_ATassert( "SDL_RenderCopy", ret == 0))
   2.361              return -1;
   2.362        }
   2.363 @@ -785,7 +786,7 @@
   2.364           /* Blitting. */
   2.365           rect.x = i;
   2.366           rect.y = j;
   2.367 -         ret = SDL_RenderCopy( tface, NULL, &rect );
   2.368 +         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );
   2.369           if (SDL_ATassert( "SDL_RenderCopy", ret == 0))
   2.370              return -1;
   2.371        }
   2.372 @@ -885,7 +886,7 @@
   2.373           /* Blitting. */
   2.374           rect.x = i;
   2.375           rect.y = j;
   2.376 -         ret = SDL_RenderCopy( tface, NULL, &rect );
   2.377 +         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );
   2.378           if (SDL_ATassert( "SDL_RenderCopy", ret == 0))
   2.379              return -1;
   2.380        }
   2.381 @@ -973,7 +974,7 @@
   2.382     const char *driver, *str;
   2.383     char msg[256];
   2.384     SDL_Window *w;
   2.385 -   SDL_RendererInfo renderer;
   2.386 +   SDL_RendererInfo info;
   2.387  
   2.388     /* Initializes the SDL subsystems. */
   2.389     ret = SDL_Init(0);
   2.390 @@ -1014,7 +1015,7 @@
   2.391         */
   2.392        SDL_ATbegin( "Initializing video mode" );
   2.393        /* Initialize video mode. */
   2.394 -      ret = SDL_VideoInit( driver, 0 );
   2.395 +      ret = SDL_VideoInit( driver );
   2.396        if (SDL_ATvassert( ret==0, "SDL_VideoInit( %s, 0 )", driver ))
   2.397           goto err_cleanup;
   2.398        /* Check to see if it's the one we want. */
   2.399 @@ -1047,18 +1048,18 @@
   2.400              goto err_cleanup;
   2.401  
   2.402           /* Get renderer info. */
   2.403 -         ret = SDL_GetRenderDriverInfo( j, &renderer );
   2.404 +         ret = SDL_GetRenderDriverInfo( j, &info );
   2.405           if (ret != 0)
   2.406              goto err_cleanup;
   2.407  
   2.408           /* Set testcase name. */
   2.409 -         SDL_snprintf( msg, sizeof(msg), "Renderer %s", renderer.name );
   2.410 -         SDL_ATprintVerbose( 1, "    %d) %s\n", j+1, renderer.name );
   2.411 +         SDL_snprintf( msg, sizeof(msg), "Renderer %s", info.name );
   2.412 +         SDL_ATprintVerbose( 1, "    %d) %s\n", j+1, info.name );
   2.413           SDL_ATbegin( msg );
   2.414  
   2.415           /* Set renderer. */
   2.416 -         ret = SDL_CreateRenderer( w, j, 0 );
   2.417 -         if (SDL_ATassert( "SDL_CreateRenderer", ret==0 ))
   2.418 +         renderer = SDL_CreateRenderer( w, j, 0 );
   2.419 +         if (SDL_ATassert( "SDL_CreateRenderer", renderer!=0 ))
   2.420              goto err_cleanup;
   2.421  
   2.422           /*
     3.1 --- a/test/automated/surface/surface.c	Tue Feb 01 21:51:54 2011 -0800
     3.2 +++ b/test/automated/surface/surface.c	Wed Feb 02 14:34:24 2011 -0800
     3.3 @@ -205,19 +205,12 @@
     3.4     ret = SDL_BlendFillRect( testsur, &rect, SDL_BLENDMODE_BLEND, 10, 240, 10, 100 );
     3.5     if (SDL_ATassert( "SDL_BlendFillRect", ret == 0))
     3.6        return;
     3.7 -   rect.x = 25;
     3.8 -   rect.y = 25;
     3.9 -   rect.w = 25;
    3.10 -   rect.h = 25;
    3.11 -   ret = SDL_BlendFillRect( testsur, &rect, SDL_BLENDMODE_MOD, 10, 10, 240, 125 );
    3.12 -   if (SDL_ATassert( "SDL_BlendFillRect", ret == 0))
    3.13 -      return;
    3.14  
    3.15     /* Draw blended lines, lines for everyone. */
    3.16     for (i=0; i<testsur->w; i+=2)  {
    3.17        ret = SDL_BlendLine( testsur, 0, 0, i, 59,
    3.18              (((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :
    3.19 -               (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD,
    3.20 +               (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE,
    3.21              60+2*i, 240-2*i, 50, 3*i );
    3.22        if (SDL_ATassert( "SDL_BlendLine", ret == 0))
    3.23           return;
    3.24 @@ -225,7 +218,7 @@
    3.25     for (i=0; i<testsur->h; i+=2)  {
    3.26        ret = SDL_BlendLine( testsur, 0, 0, 79, i,
    3.27              (((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :
    3.28 -               (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD,
    3.29 +               (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE,
    3.30              60+2*i, 240-2*i, 50, 3*i );
    3.31        if (SDL_ATassert( "SDL_BlendLine", ret == 0))
    3.32           return;
    3.33 @@ -236,7 +229,7 @@
    3.34        for (i=0; i<testsur->w; i+=3) {
    3.35        ret = SDL_BlendPoint( testsur, i, j,
    3.36              ((((i+j)/3)%3)==0) ? SDL_BLENDMODE_BLEND :
    3.37 -               ((((i+j)/3)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD,
    3.38 +               ((((i+j)/3)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE,
    3.39              j*4, i*3, j*4, i*3 );
    3.40        if (SDL_ATassert( "SDL_BlendPoint", ret == 0))
    3.41           return;