game/tetris/global_vars.hpp

65 lines
2.1 KiB
C++
Raw Normal View History

#ifndef TETRIS_GLOBAL_VARS_H
#define TETRIS_GLOBAL_VARS_H
2020-11-21 19:58:52 +00:00
#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;
2020-11-21 19:58:52 +00:00
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;
2021-01-30 20:35:25 +00:00
extern bool g_update_3d;
extern bool g_checked_line;
extern bool g_wait_for_anim;
2020-12-18 14:14:08 +00:00
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;
2021-03-14 16:02:41 +00:00
extern std::mutex g_render_mutex;
extern bool g_quit;
2020-11-21 19:58:52 +00:00
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;
2020-11-21 19:58:52 +00:00
extern std::shared_ptr< SDLPP::Font > g_font;
2021-01-30 20:35:25 +00:00
extern std::shared_ptr< SDLPP::FontConfiguration > g_font_config;
2021-03-13 17:37:23 +00:00
extern std::vector< std::shared_ptr< SDLPP::Scene > > g_update_scenes;
extern std::vector< std::shared_ptr< SDLPP::RenderObject > > g_update_objects;
#endif