test/testdrawchessboard.c
changeset 9703 215d1dcd8e90
parent 9619 b94b6d0bff0f
child 9836 3d43bb56c5d6
equal deleted inserted replaced
9702:115bc7548a8d 9703:215d1dcd8e90
    37 	SDL_RenderGetViewport(renderer, &darea);
    37 	SDL_RenderGetViewport(renderer, &darea);
    38 
    38 
    39 	for( ; row < 8; row++)
    39 	for( ; row < 8; row++)
    40 	{
    40 	{
    41 		column = row%2;
    41 		column = row%2;
    42 		x = x + column;
    42 		x = column;
    43 		for( ; column < 4+(row%2); column++)
    43 		for( ; column < 4+(row%2); column++)
    44 		{
    44 		{
    45 			SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF);
    45 			SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF);
    46 
    46 
    47 			rect.w = darea.w/8;
    47 			rect.w = darea.w/8;
    49 			rect.x = x * rect.w;
    49 			rect.x = x * rect.w;
    50 			rect.y = row * rect.h;
    50 			rect.y = row * rect.h;
    51 			x = x + 2;
    51 			x = x + 2;
    52 			SDL_RenderFillRect(renderer, &rect);
    52 			SDL_RenderFillRect(renderer, &rect);
    53 		}
    53 		}
    54 		x=0;
       
    55 	}
    54 	}
    56 }
    55 }
    57 
    56 
    58 void
    57 void
    59 loop()
    58 loop()