Added FEATURE flag, fixed rare segfault

This commit is contained in:
2021-03-09 09:27:15 +01:00
parent bb502b37f4
commit fbe122a5b9
6 changed files with 71 additions and 19 deletions
+16
View File
@@ -101,6 +101,9 @@ check_floor:
g_update_scenes.push_back(g_game_over_scene);
g_active_scenes.push_back( g_game_over_scene );
g_input_functions.push_back( gameOverSceneInput );
#ifdef FEATURE
pauseBlocks();
#endif
break;
}
}
@@ -419,6 +422,19 @@ void updateBlocks() {
x->specialAction( PIECE_ACTION_UPDATE_BLOCK );
}
}
#ifdef FEATURE
void pauseBlocks() {
for ( auto &x : g_main_scene->getObjects( { BRICK_ID, SHADOW_ID } ) ) {
x->pauseAnimation();
}
}
void resumeBlocks() {
for ( auto &x : g_main_scene->getObjects( { BRICK_ID, SHADOW_ID } ) ) {
x->resumeAnimation();
}
}
#endif
void updateColors() {
for ( auto &x : g_main_scene->getObjects( { BRICK_ID, SHADOW_ID } ) ) {