@ -6,8 +6,8 @@
# include <thread>
# include <thread>
# include <stack>
# include <stack>
const int WINDOW_X = 10 00;
const int WINDOW_X = 3 00;
const int WINDOW_Y = 10 00;
const int WINDOW_Y = 3 00;
float elap_time ( ) {
float elap_time ( ) {
static __int64 start = 0 ;
static __int64 start = 0 ;
@ -43,7 +43,7 @@ int main() {
for ( int x = 0 ; x < Node : : x_bound ; x + + ) {
for ( int x = 0 ; x < Node : : x_bound ; x + + ) {
for ( int y = 0 ; y < Node : : y_bound ; y + + ) {
for ( int y = 0 ; y < Node : : y_bound ; y + + ) {
node_vec . push_back ( Node ( sf : : Vector2i ( x , y ) ) ) ;
node_vec . push_back ( Node ( sf : : Vector2i ( x , y ) ) ) ;
if ( ( x % 30 = = 0 ) ) {
if ( ( x % 5 = = 0 ) | | ( y % 8 = = 0 ) ) {
node_vec . at ( node_vec . size ( ) - 1 ) . Revive ( ) ;
node_vec . at ( node_vec . size ( ) - 1 ) . Revive ( ) ;
}
}
}
}
@ -63,6 +63,7 @@ int main() {
texture . create ( WINDOW_X , WINDOW_Y ) ;
texture . create ( WINDOW_X , WINDOW_Y ) ;
sf : : Sprite sprite ( texture ) ;
sf : : Sprite sprite ( texture ) ;
while ( window . isOpen ( ) ) {
while ( window . isOpen ( ) ) {
sf : : Event event ;
sf : : Event event ;
@ -107,13 +108,15 @@ int main() {
}
}
else {
else {
//pixel_array[i * 4] *= 0.999; // 49; // R?
pixel_array [ i * 4 ] * = 0.999 ; // 49; // R?
pixel_array [ i * 4 + 1 ] * = 0.999 ; //68; // G?
//pixel_array[i * 4 + 1] *= 0.999; //68; // G?
pixel_array [ i * 4 + 2 ] * = 0.999 ; //72; // B?
pixel_array [ i * 4 + 2 ] * = 0.999 ; //72; // B?
pixel_array [ i * 4 + 3 ] * = 0.999 ; //255; // A?
pixel_array [ i * 4 + 3 ] * = 0.999 ; //255; // A?
}
}
}
}
window . clear ( ) ;
texture . update ( pixel_array ) ;
texture . update ( pixel_array ) ;
window . draw ( sprite ) ;
window . draw ( sprite ) ;