Mercurial > hg > pub > prymula > com
comparison lamertetris/sources/shape.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 | |
4 #ifndef SZLAM_H | |
5 #define SZLAM_H | |
6 | |
7 class Shape { | |
8 public: | |
9 Shape(); | |
10 SDL_Surface * createField(int w,int h, int r, int g, int b); | |
11 void setColor(int color, int *r, int *g, int*b); | |
12 char elements [7][16][4] = { | |
13 { | |
14 {1,0,0,0}, | |
15 {1,0,0,0}, | |
16 {1,0,0,0}, | |
17 {1,0,0,0}, | |
18 | |
19 {0,0,0,0}, | |
20 {0,0,0,0}, | |
21 {1,1,1,1}, | |
22 {0,0,0,0}, | |
23 | |
24 {1,0,0,0}, | |
25 {1,0,0,0}, | |
26 {1,0,0,0}, | |
27 {1,0,0,0}, | |
28 | |
29 {0,0,0,0}, | |
30 {0,0,0,0}, | |
31 {1,1,1,1}, | |
32 {0,0,0,0} | |
33 }, | |
34 { | |
35 {1,1,0,0}, | |
36 {1,0,0,0}, | |
37 {1,0,0,0}, | |
38 {1,0,0,0}, | |
39 | |
40 {0,0,0,0}, | |
41 {1,1,1,1}, | |
42 {0,0,0,1}, | |
43 {0,0,0,0}, | |
44 | |
45 {0,1,0,0}, | |
46 {0,1,0,0}, | |
47 {0,1,0,0}, | |
48 {1,1,0,0}, | |
49 | |
50 {0,0,0,0}, | |
51 {1,0,0,0}, | |
52 {1,1,1,1}, | |
53 {0,0,0,0} | |
54 }, | |
55 | |
56 { | |
57 {1,1,0,0}, | |
58 {0,1,0,0}, | |
59 {0,1,0,0}, | |
60 {0,1,0,0}, | |
61 | |
62 {0,0,0,0}, | |
63 {0,0,0,1}, | |
64 {1,1,1,1}, | |
65 {0,0,0,0}, | |
66 | |
67 {1,0,0,0}, | |
68 {1,0,0,0}, | |
69 {1,0,0,0}, | |
70 {1,1,0,0}, | |
71 | |
72 {0,0,0,0}, | |
73 {1,1,1,1}, | |
74 {1,0,0,0}, | |
75 {0,0,0,0} | |
76 }, | |
77 | |
78 { | |
79 {0,0,0,0}, | |
80 {1,0,0,0}, | |
81 {1,1,0,0}, | |
82 {1,0,0,0}, | |
83 | |
84 {0,0,0,0}, | |
85 {1,1,1,0}, | |
86 {0,1,0,0}, | |
87 {0,0,0,0}, | |
88 | |
89 {0,0,0,0}, | |
90 {0,1,0,0}, | |
91 {1,1,0,0}, | |
92 {0,1,0,0}, | |
93 | |
94 {0,0,0,0}, | |
95 {0,1,0,0}, | |
96 {1,1,1,0}, | |
97 {0,0,0,0} | |
98 }, | |
99 { | |
100 {0,0,0,0}, | |
101 {0,0,0,0}, | |
102 {1,1,0,0}, | |
103 {1,1,0,0}, | |
104 | |
105 {0,0,0,0}, | |
106 {0,0,0,0}, | |
107 {1,1,0,0}, | |
108 {1,1,0,0}, | |
109 | |
110 {0,0,0,0}, | |
111 {0,0,0,0}, | |
112 {1,1,0,0}, | |
113 {1,1,0,0}, | |
114 | |
115 {0,0,0,0}, | |
116 {0,0,0,0}, | |
117 {1,1,0,0}, | |
118 {1,1,0,0} | |
119 }, | |
120 { | |
121 {0,0,0,0}, | |
122 {0,1,1,1}, | |
123 {1,1,1,0}, | |
124 {0,0,0,0}, | |
125 | |
126 {1,0,0,0}, | |
127 {1,1,0,0}, | |
128 {1,1,0,0}, | |
129 {0,1,0,0}, | |
130 | |
131 {0,0,0,0}, | |
132 {0,1,1,1}, | |
133 {1,1,1,0}, | |
134 {0,0,0,0}, | |
135 | |
136 {1,0,0,0}, | |
137 {1,1,0,0}, | |
138 {1,1,0,0}, | |
139 {0,1,0,0} | |
140 | |
141 }, | |
142 { | |
143 {0,0,0,0}, | |
144 {1,1,1,0}, | |
145 {0,1,1,1}, | |
146 {0,0,0,0}, | |
147 | |
148 {0,1,0,0}, | |
149 {1,1,0,0}, | |
150 {1,1,0,0}, | |
151 {1,0,0,0}, | |
152 | |
153 {0,0,0,0}, | |
154 {1,1,1,0}, | |
155 {0,1,1,1}, | |
156 {0,0,0,0}, | |
157 | |
158 {0,1,0,0}, | |
159 {1,1,0,0}, | |
160 {1,1,0,0}, | |
161 {1,0,0,0} | |
162 | |
163 } | |
164 | |
165 }; | |
166 private: | |
167 SDL_Surface * createBoxMask(int width, int height); | |
168 | |
169 }; | |
170 | |
171 #endif // szlam |