269 } |
269 } |
270 |
270 |
271 // initialize globals |
271 // initialize globals |
272 init_globals(); |
272 init_globals(); |
273 |
273 |
274 // create window |
274 // create the window |
275 AscWindowSettings settings; |
275 AscWindowSettings settings; |
276 asc_window_settings_init_defaults(&settings); |
276 asc_window_settings_init_defaults(&settings); |
277 settings.title = "Snake"; |
|
278 settings.dimensions = ASC_VEC2U(900, 600); |
|
279 // TODO: resize window depending on ui scale factor |
|
280 asc_window_initialize(0, &settings); |
277 asc_window_initialize(0, &settings); |
281 asc_ui_scale_auto(); |
278 asc_window_set_title(0, "Snake"); |
|
279 float ui_scale = asc_ui_scale_auto(); |
|
280 asc_window_set_size(0, ASC_VEC2U(700+ui_scale*200, 700)); |
282 |
281 |
283 // load textures |
282 // load textures |
284 init_textures(); |
283 init_textures(); |
285 |
284 |
286 // initialize the scenes |
285 // initialize the scenes |