test/snake/snake.c

changeset 151
42960d0c879b
parent 149
560772519ff9
child 154
4dff9cc488fe
equal deleted inserted replaced
150:3045f61bc4eb 151:42960d0c879b
26 */ 26 */
27 27
28 #include <ascension/core.h> 28 #include <ascension/core.h>
29 #include <ascension/ui.h> 29 #include <ascension/ui.h>
30 #include <ascension/sprite.h> 30 #include <ascension/sprite.h>
31 #include <ascension/shader.h> 31 #include <ascension/2d.h>
32 32
33 #include <cx/printf.h> 33 #include <cx/printf.h>
34 34
35 enum Textures2d { 35 enum Textures2d {
36 TEX_SHIP = 0, 36 TEX_SHIP = 0,
193 create_score_counter(); 193 create_score_counter();
194 194
195 // create spaceship 195 // create spaceship
196 create_spaceship(); 196 create_spaceship();
197 197
198 // TODO: play around with the test rectangle
199 asc_ink_rgb(255, 0, 0);
200 asc_scene_add_node(MAIN_SCENE,
201 asc_rectangle(.x = 200, .y = 250, .width = 100, .height = 75)
202 );
203
198 // Main Loop 204 // Main Loop
199 do { 205 do {
200 // quit application on any error 206 // quit application on any error
201 if (asc_has_error()) { 207 if (asc_has_error()) {
202 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, 208 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,

mercurial