test/snake/snake.c

changeset 100
5231da78831e
parent 99
ac143db979dc
equal deleted inserted replaced
99:ac143db979dc 100:5231da78831e
148 asc_window_settings_init_defaults(&settings); 148 asc_window_settings_init_defaults(&settings);
149 settings.title = "Snake"; 149 settings.title = "Snake";
150 asc_window_initialize(0, &settings); 150 asc_window_initialize(0, &settings);
151 151
152 // initialize the main scene (a 500x500 game field) 152 // initialize the main scene (a 500x500 game field)
153 asc_scene_init(MAIN_SCENE); 153 asc_scene_init(MAIN_SCENE, (AscCameraParams) {
154 asc_camera_ortho(&MAIN_SCENE->camera, (asc_recti){0, 0, 500, 500}); 154 .type = ASC_CAMERA_ORTHO,
155 MAIN_SCENE->camera.viewport_update_func = update_viewport_for_window_resize; 155 .ortho.rect = (asc_recti){0, 0, 500, 500},
156 .viewport_update_func = update_viewport_for_window_resize
157 });
156 158
157 // load textures 159 // load textures
158 init_textures(); 160 init_textures();
159 161
160 // create UI elements 162 // create UI elements

mercurial