Mercurial > hg > pub > prymula > com
diff lamertetris/sources/szlam.h @ 0:2787f5e749ae
INIT
author | prymula <prymula76@outlook.com> |
---|---|
date | Thu, 21 Sep 2023 22:33:57 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lamertetris/sources/szlam.h Thu Sep 21 22:33:57 2023 +0200 @@ -0,0 +1,34 @@ +#include <SDL2/SDL.h> +#include <stdio.h> +#include "shape.h" + +#define NFIGURE 7 +#define NELEMENT 4 +#define WHITE 0 + + +class Szlam : public Shape { + public: + Szlam(); + bool addBottom(SDL_Surface *s, int n_figure, int n_element, int color, int posX, int posY); + SDL_Surface * get(); + void draw(); + bool collisionBottom(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color); + bool collisionLeft(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color); + bool collisionRight(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color); + bool collisionRotate(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color); + int evenSurface(int *height); + void cutSurface(int n, int h); + bool highFull(); + void reset(); + + private: + SDL_Surface *field; + +}; + +SDL_Rect set_rect(int x, int y, int w, int h); +//SDL_Surface * bg(); +Uint32 getpixel(SDL_Surface *surface, int x, int y); + +