65 lines
2.1 KiB
C++
65 lines
2.1 KiB
C++
#ifndef TETRIS_GLOBAL_VARS_H
|
|
#define TETRIS_GLOBAL_VARS_H
|
|
|
|
#include "../sdlpp/sdlpp.hpp"
|
|
#include "custom_classes.hpp"
|
|
|
|
#include <functional>
|
|
|
|
extern int g_ticks_till_fall;
|
|
extern int g_ticks_till_descend;
|
|
extern int g_ticks_till_movement;
|
|
|
|
extern int g_menu_select;
|
|
extern int g_game_over_select;
|
|
extern int g_options_select;
|
|
extern std::vector< std::shared_ptr< SDLPP::RectangleRender > > g_menu_options;
|
|
extern std::vector< std::shared_ptr< SDLPP::RectangleRender > >
|
|
g_game_over_options;
|
|
extern std::vector< std::shared_ptr< SDLPP::RectangleRender > >
|
|
g_options_options;
|
|
extern std::shared_ptr< SDLPP::TextRenderer > g_score_texture;
|
|
extern std::shared_ptr< SDLPP::Renderer > g_active_renderer;
|
|
extern int g_score;
|
|
extern bool g_update_score;
|
|
extern bool g_update_colors;
|
|
extern bool g_update_3d;
|
|
extern bool g_checked_line;
|
|
extern bool g_wait_for_anim;
|
|
extern bool g_update_size;
|
|
|
|
extern std::vector< int > g_bag;
|
|
|
|
extern std::shared_ptr< SDLPP::Scene > g_main_scene;
|
|
extern std::shared_ptr< SDLPP::Scene > g_menu_scene;
|
|
extern std::shared_ptr< SDLPP::Scene > g_game_over_scene;
|
|
extern std::shared_ptr< SDLPP::Scene > g_options_scene;
|
|
|
|
extern std::shared_ptr< TetrisPiece > g_cur_object;
|
|
extern bool g_object_falling;
|
|
extern std::shared_ptr< TetrisPiece > g_next_object;
|
|
extern std::shared_ptr< TetrisPiece > g_cur_shadow;
|
|
extern std::shared_ptr< SDLPP::RectangleRender > g_shadow_colider;
|
|
|
|
extern std::mutex g_movement_mutex;
|
|
extern std::mutex g_render_mutex;
|
|
|
|
extern bool g_quit;
|
|
extern std::vector< std::function< void(
|
|
std::shared_ptr< SDLPP::Scene >, int,
|
|
std::vector< std::shared_ptr< SDLPP::RenderObject > > & ) > >
|
|
g_input_functions;
|
|
extern std::vector< std::shared_ptr< SDLPP::Scene > > g_active_scenes;
|
|
|
|
extern std::vector< std::shared_ptr< TetrisPiece > ( * )(
|
|
std::shared_ptr< SDLPP::Renderer >, std::shared_ptr< SDLPP::Scene > ) >
|
|
g_tetrisFunctions;
|
|
|
|
extern std::shared_ptr< SDLPP::Font > g_font;
|
|
extern std::shared_ptr< SDLPP::FontConfiguration > g_font_config;
|
|
|
|
extern std::vector< std::shared_ptr< SDLPP::Scene > > g_update_scenes;
|
|
extern std::vector< std::shared_ptr< SDLPP::RenderObject > > g_update_objects;
|
|
|
|
#endif
|