comparison lamertetris/sources/szlam.h @ 0:2787f5e749ae

INIT
author prymula <prymula76@outlook.com>
date Thu, 21 Sep 2023 22:33:57 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:2787f5e749ae
1 #include <SDL2/SDL.h>
2 #include <stdio.h>
3 #include "shape.h"
4
5 #define NFIGURE 7
6 #define NELEMENT 4
7 #define WHITE 0
8
9
10 class Szlam : public Shape {
11 public:
12 Szlam();
13 bool addBottom(SDL_Surface *s, int n_figure, int n_element, int color, int posX, int posY);
14 SDL_Surface * get();
15 void draw();
16 bool collisionBottom(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color);
17 bool collisionLeft(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color);
18 bool collisionRight(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color);
19 bool collisionRotate(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color);
20 int evenSurface(int *height);
21 void cutSurface(int n, int h);
22 bool highFull();
23 void reset();
24
25 private:
26 SDL_Surface *field;
27
28 };
29
30 SDL_Rect set_rect(int x, int y, int w, int h);
31 //SDL_Surface * bg();
32 Uint32 getpixel(SDL_Surface *surface, int x, int y);
33
34