[SDL] Problem z załadowaniem pliku BMP do tablicy dwuwymiarowej
Ostatnio zmodyfikowano 2013-03-13 17:55
Gabes |
» 2013-03-13 17:55:50 Małe funkcje zerowania tablicy i strzelania. #include <ctime> int statki[ 10 ][ 10 ];
void zerowanie() { for( int y = 0; y < 10; y++ ) for( int x = 0; x < 10; x++ ) statki[ y ][ x ] = 0; };
void strzelanie() { srand( time( NULL ) ); int y = rand() %( 9 ); int x = rand() %( 9 ); if( statki[ y ][ x ] == 0 ) statki[ y ][ x ] = 1; }; |
|
1 « 2 » |