annotate lamertetris/sources/szlam.h @ 17:e9c503d896a6

flappyufo-0.230919-1_add_pkgbuild
author Przemyslaw <prymula76@outlook.com>
date Sat, 24 Feb 2024 17:47:35 +0100
parents 2787f5e749ae
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
prymula <prymula76@outlook.com>
parents:
diff changeset
1 #include <SDL2/SDL.h>
prymula <prymula76@outlook.com>
parents:
diff changeset
2 #include <stdio.h>
prymula <prymula76@outlook.com>
parents:
diff changeset
3 #include "shape.h"
prymula <prymula76@outlook.com>
parents:
diff changeset
4
prymula <prymula76@outlook.com>
parents:
diff changeset
5 #define NFIGURE 7
prymula <prymula76@outlook.com>
parents:
diff changeset
6 #define NELEMENT 4
prymula <prymula76@outlook.com>
parents:
diff changeset
7 #define WHITE 0
prymula <prymula76@outlook.com>
parents:
diff changeset
8
prymula <prymula76@outlook.com>
parents:
diff changeset
9
prymula <prymula76@outlook.com>
parents:
diff changeset
10 class Szlam : public Shape {
prymula <prymula76@outlook.com>
parents:
diff changeset
11 public:
prymula <prymula76@outlook.com>
parents:
diff changeset
12 Szlam();
prymula <prymula76@outlook.com>
parents:
diff changeset
13 bool addBottom(SDL_Surface *s, int n_figure, int n_element, int color, int posX, int posY);
prymula <prymula76@outlook.com>
parents:
diff changeset
14 SDL_Surface * get();
prymula <prymula76@outlook.com>
parents:
diff changeset
15 void draw();
prymula <prymula76@outlook.com>
parents:
diff changeset
16 bool collisionBottom(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color);
prymula <prymula76@outlook.com>
parents:
diff changeset
17 bool collisionLeft(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color);
prymula <prymula76@outlook.com>
parents:
diff changeset
18 bool collisionRight(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color);
prymula <prymula76@outlook.com>
parents:
diff changeset
19 bool collisionRotate(SDL_Surface *s, int n_element, int figure, int x_s, int y_s, int color);
prymula <prymula76@outlook.com>
parents:
diff changeset
20 int evenSurface(int *height);
prymula <prymula76@outlook.com>
parents:
diff changeset
21 void cutSurface(int n, int h);
prymula <prymula76@outlook.com>
parents:
diff changeset
22 bool highFull();
prymula <prymula76@outlook.com>
parents:
diff changeset
23 void reset();
prymula <prymula76@outlook.com>
parents:
diff changeset
24
prymula <prymula76@outlook.com>
parents:
diff changeset
25 private:
prymula <prymula76@outlook.com>
parents:
diff changeset
26 SDL_Surface *field;
prymula <prymula76@outlook.com>
parents:
diff changeset
27
prymula <prymula76@outlook.com>
parents:
diff changeset
28 };
prymula <prymula76@outlook.com>
parents:
diff changeset
29
prymula <prymula76@outlook.com>
parents:
diff changeset
30 SDL_Rect set_rect(int x, int y, int w, int h);
prymula <prymula76@outlook.com>
parents:
diff changeset
31 //SDL_Surface * bg();
prymula <prymula76@outlook.com>
parents:
diff changeset
32 Uint32 getpixel(SDL_Surface *surface, int x, int y);
prymula <prymula76@outlook.com>
parents:
diff changeset
33
prymula <prymula76@outlook.com>
parents:
diff changeset
34