global.gameWidth = 1600;
global.gameHeight = 900;
window_set_fullscreen(true);
aspectRatio = display_get_width() / display_get_height();
if(aspectRatio > 1.7) //16:9
{
global.gameWidth = 1600;
global.gameHeight = 900;
}
else if(aspectRatio > 1.5) //16:10
{
global.gameWidth = 1600;
global.gameHeight = 1000;
}
else //4:3
{
global.gameWidth = 1600;
global.gameHeight = 1200;
}
global.camera = camera_create_view(0, 0, global.gameWidth, global.gameHeight, 0, -1, -1, -1, 32, 32);
for (var i = 1; i <= room_last; i++)
{
// enable view and setup viewport
room_set_view_enabled(i, true)
room_set_viewport(i, 0, true, 0, 0, global.gameWidth, global.gameHeight);
// set camera for room
room_set_camera(i, 0, global.camera);
}
surface_resize(application_surface, global.gameWidth, global.gameHeight);
window_set_position(display_get_width() / 2 - global.gameWidth / 2, display_get_height() / 2 - global.gameHeight / 2);
room_goto_next()