2020-09-11 19:34:43 +00:00
|
|
|
#ifndef TETRIS_FUNCTIONS_H
|
|
|
|
#define TETRIS_FUNCTIONS_H
|
|
|
|
|
2020-11-21 19:58:52 +00:00
|
|
|
#include "../sdlpp/sdlpp.hpp"
|
2020-09-11 19:34:43 +00:00
|
|
|
#include "custom_classes.hpp"
|
|
|
|
|
|
|
|
void moveThem( std::shared_ptr< SDLPP::Scene > scene, int ticks );
|
2020-11-21 19:58:52 +00:00
|
|
|
bool validPos( SDLPP::Scene &scene, std::shared_ptr< TetrisPiece > piece );
|
|
|
|
void updateShadow( SDLPP::Scene &scene );
|
2020-09-11 19:34:43 +00:00
|
|
|
void quitGame();
|
|
|
|
void resetGame();
|
2020-11-21 19:58:52 +00:00
|
|
|
bool checkRotation( std::shared_ptr< TetrisPiece > piece, SDLPP::Scene &scene );
|
2020-09-11 19:34:43 +00:00
|
|
|
|
|
|
|
std::shared_ptr< TetrisPiece >
|
|
|
|
tetrisBrick( std::shared_ptr< SDLPP::Renderer > renderer,
|
|
|
|
std::shared_ptr< SDLPP::Scene > scene );
|
|
|
|
std::shared_ptr< TetrisPiece >
|
|
|
|
tetrisT( std::shared_ptr< SDLPP::Renderer > renderer,
|
|
|
|
std::shared_ptr< SDLPP::Scene > scene );
|
|
|
|
std::shared_ptr< TetrisPiece >
|
|
|
|
tetrisLRight( std::shared_ptr< SDLPP::Renderer > renderer,
|
|
|
|
std::shared_ptr< SDLPP::Scene > scene );
|
|
|
|
std::shared_ptr< TetrisPiece >
|
|
|
|
tetrisZRight( std::shared_ptr< SDLPP::Renderer > renderer,
|
|
|
|
std::shared_ptr< SDLPP::Scene > scene );
|
|
|
|
std::shared_ptr< TetrisPiece >
|
|
|
|
tetrisLine( std::shared_ptr< SDLPP::Renderer > renderer,
|
|
|
|
std::shared_ptr< SDLPP::Scene > scene );
|
|
|
|
std::shared_ptr< TetrisPiece >
|
|
|
|
tetrisLLeft( std::shared_ptr< SDLPP::Renderer > renderer,
|
|
|
|
std::shared_ptr< SDLPP::Scene > scene );
|
|
|
|
std::shared_ptr< TetrisPiece >
|
|
|
|
tetrisZLeft( std::shared_ptr< SDLPP::Renderer > renderer,
|
|
|
|
std::shared_ptr< SDLPP::Scene > scene );
|
|
|
|
void updateColors();
|
2021-01-30 20:35:25 +00:00
|
|
|
void updateBlocks();
|
2020-12-18 14:14:08 +00:00
|
|
|
void updateSize();
|
2021-03-09 08:27:15 +00:00
|
|
|
#ifdef FEATURE
|
|
|
|
void pauseBlocks();
|
|
|
|
void resumeBlocks();
|
|
|
|
#endif
|
2020-09-11 19:34:43 +00:00
|
|
|
|
|
|
|
#endif
|