Tetris: move generating of new blocks after restart to main thread
This commit is contained in:
@@ -121,10 +121,6 @@ void resetGame() {
|
||||
g_main_scene->setPrevTicks( SDL_GetTicks() );
|
||||
|
||||
// TODO maybe move to main thread
|
||||
g_next_object = g_tetrisFunctions[std::rand() / ( ( RAND_MAX + 1u ) / 7 )](
|
||||
g_main_scene->getRendererShared(), g_main_scene );
|
||||
g_next_object->setPos( 0.9, 0.5 );
|
||||
g_active_scenes.push_back( g_main_scene );
|
||||
g_active_scenes = {g_main_scene};
|
||||
g_input_functions = {mainSceneInput};
|
||||
for(int i = 0; i < 7; i++)
|
||||
|
||||
Reference in New Issue
Block a user