Guest User

Untitled

a guest
Jun 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. ///Display Properties
  2. ideal_width = 0;
  3. ideal_height = 640;
  4.  
  5. aspect_ratio = display_get_width()/display_get_height();
  6. ideal_width = round(ideal_height/aspect_ratio);
  7.  
  8. //check for odd numbers
  9. if(ideal_width & 1) {
  10. ideal_width++;
  11. }
  12.  
  13. for (var i = 1; i <= room_last; i++) {
  14. if(room_exists(i)) {
  15. room_set_view(i,0,true,0,0,ideal_width,ideal_height,0,0,ideal_width,ideal_height,0,0,0,0,-1);
  16. room_set_view_enabled(i,true);
  17. }
  18. }
  19.  
  20. surface_resize(application_surface,ideal_width , ideal_height);
  21. window_set_size(ideal_width,ideal_height);
  22. room_goto(room_next(room));
  23.  
  24. ideal_width = round(ideal_height/aspect_ratio);
  25.  
  26. ideal_height = round(ideal_width/aspect_ratio);
Add Comment
Please, Sign In to add comment