test/snake/snake.c

changeset 160
80700db530ff
parent 159
da7ebfcdd159
equal deleted inserted replaced
159:da7ebfcdd159 160:80700db530ff
194 create_score_counter(); 194 create_score_counter();
195 195
196 // create spaceship 196 // create spaceship
197 create_spaceship(); 197 create_spaceship();
198 198
199 // TODO: play around with the test rectangle 199 // TODO: play around with the test rectangles
200 asc_ink_rgb(255, 0, 0); 200 asc_ink_rgb(255, 0, 0);
201 asc_scene_add_node(MAIN_SCENE, 201 asc_scene_add_node(MAIN_SCENE,
202 asc_rectangle(.x = 200, .y = 250, .width = 100, .height = 75, 202 asc_rectangle(.x = 200, .y = 250, .width = 100, .height = 75,
203 .thickness = 4, .radius = 15, .filled = true, .border_color = asc_col4i_new(0, 255, 0, 255)) 203 .thickness = 4, .radius = 15, .filled = true, .border_color = asc_col4i_new(0, 255, 0, 255))
204 ); 204 );
205 asc_scene_add_node(MAIN_SCENE,
206 asc_rectangle(.x = 50, .y = 150, .width = 100, .height = 75,
207 .thickness = 4, .radius = 15, .filled = false, .border_color = asc_col4i_new(0, 255, 0, 255))
208 );
209 asc_scene_add_node(MAIN_SCENE,
210 asc_rectangle(.x = 50, .y = 25, .width = 100, .height = 75,
211 .thickness = 4, .filled = false, .border_color = asc_col4i_new(0, 255, 0, 255))
212 );
213 asc_scene_add_node(MAIN_SCENE,
214 asc_rectangle(.x = 250, .y = 25, .width = 100, .height = 75,
215 .thickness = 4, .filled = true, .border_color = asc_col4i_new(0, 255, 0, 255))
216 );
217 asc_scene_add_node(MAIN_SCENE,
218 asc_rectangle(.x = 350, .y = 250, .width = 100, .height = 75,
219 .radius = 15, .filled = true)
220 );
221 asc_scene_add_node(MAIN_SCENE,
222 asc_rectangle(.x = 350, .y = 50, .width = 100, .height = 75,
223 .filled = true)
224 );
225 asc_scene_add_node(MAIN_SCENE,
226 asc_rectangle(.x = 50, .y = 350, .width = 100, .height = 75,
227 .radius = 15)
228 );
229 asc_scene_add_node(MAIN_SCENE,
230 asc_rectangle(.x = 350, .y = 350, .width = 100, .height = 75)
231 );
232
205 233
206 // Main Loop 234 // Main Loop
207 do { 235 do {
208 // quit application on any error 236 // quit application on any error
209 if (asc_has_error()) { 237 if (asc_has_error()) {

mercurial