game/tetris/functions.hpp

44 lines
1.5 KiB
C++

#ifndef TETRIS_FUNCTIONS_H
#define TETRIS_FUNCTIONS_H
#include "../sdlpp/sdlpp.hpp"
#include "custom_classes.hpp"
void moveThem( std::shared_ptr< SDLPP::Scene > scene, int ticks );
bool validPos( SDLPP::Scene &scene, std::shared_ptr< TetrisPiece > piece );
void updateShadow( SDLPP::Scene &scene );
void quitGame();
void resetGame();
bool checkRotation( std::shared_ptr< TetrisPiece > piece, SDLPP::Scene &scene );
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();
void updateBlocks();
void updateSize();
#ifdef FEATURE
void pauseBlocks();
void resumeBlocks();
#endif
#endif