Mercurial > hg > pub > prymula > com
comparison arkanoid/arkanoid.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 /* arkanoid.h */ | |
2 #include <stdio.h> // printf | |
3 #include <stdlib.h> // exit | |
4 #include <string.h> | |
5 #include <unistd.h> // sleep access | |
6 //#include <time.h> | |
7 //#include <errno.h> | |
8 #include <SDL2/SDL.h> | |
9 #include <SDL2/SDL_ttf.h> | |
10 //#include <SDL/SDL_image.h> | |
11 #if WINDOWS | |
12 #include <windows.h> | |
13 #include "resource.h" | |
14 #endif | |
15 #include "ball.h" | |
16 | |
17 #define WIELKOSCFONTU 30 | |
18 | |
19 #define XPILKI 30 | |
20 #define YPILKI 30 | |
21 #define XPALETKI 120 | |
22 #define YPALETKI YPILKI | |
23 #define XKAFLA 80 | |
24 #define YKAFLA YPILKI | |
25 #define PUNKTY 50 | |
26 | |
27 SDL_Surface * obraz; | |
28 TTF_Font* font_panel; | |
29 | |
30 typedef struct { | |
31 int px; // poprzednia pozycja x | |
32 int py; // poprzednia pozycja y | |
33 int ax; // aktualny x | |
34 int ay; // aktualny y | |
35 int kx; // kierunek x | |
36 int ky; // kierunek y | |
37 SDL_Surface * obraz; | |
38 SDL_Surface * gumka; | |
39 } RuchomyObiekt; | |
40 | |
41 typedef struct { | |
42 RuchomyObiekt * pilka; | |
43 RuchomyObiekt * paletka; | |
44 // int poprzedni_y; | |
45 } Teczka; | |
46 | |
47 //typedef struct { | |
48 // int * czas; | |
49 //} Teczka2; | |
50 | |
51 typedef struct { | |
52 int twardosc; | |
53 int x, y; | |
54 SDL_Surface * obraz; | |
55 } Kafel; | |
56 | |
57 typedef struct { | |
58 Uint8 r; | |
59 Uint8 g; | |
60 Uint8 b; | |
61 } Kolor; | |
62 /* | |
63 #if WINDOWS | |
64 char * FILE_NAME = "\\arkanoid.txt"; | |
65 char * HOME = "HOMEPATH"; | |
66 | |
67 #elif LINUX | |
68 char * FILE_NAME = "/.arkanoid.txt"; | |
69 char * HOME = "HOME"; | |
70 #endif | |
71 */ | |
72 /* prototypy poza plikowe */ | |
73 //SDL_Surface * utworz_pilke(); |