Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///scrFullWindow(Height, Scale)
- /*
- setHeight = Set the height for your game, the width is determined automatically based on
- monitor.
- setScale = How large you wish to scale the game. Set to 0 for auto scaling to fill monitor.
- Set SetScale to 0 for automatic scaling as high as possible while keeping it an even number
- MUST BE PUT IN THE ROOM START EVENT!
- */
- //Variables
- var setHeight = argument[0],
- setScale = argument[1],
- dispW = display_get_width(),
- dispH = display_get_height(),
- ratVal = dispW/dispH,
- H = floor(setHeight),
- W = floor( setHeight*ratVal );
- //View properties
- view_visible[0] = true;
- view_enabled = true;
- view_hview[0] = H;
- view_wview[0] = W;
- //Decide how we are going to scale this.
- if setScale = 0{
- var scaleTo = floor(dispH/H);
- view_wport[0] = W*scaleTo;
- view_hport[0] = H*scaleTo;
- window_set_size(view_wport[0], view_hport[0]);
- window_set_position((dispW-view_wport[0])/2,(dispH-view_hport[0])/2);
- }else{
- view_wport[0] = (H*setScale);
- view_hport[0] = (W*setScale);
- window_set_size(view_wport[0],view_hport[0]);
- window_set_position((dispW-view_wport[0])/2,(dispH-view_hport[0])/2);
- }
- surface_resize(application_surface, view_wport[0],view_hport[0]);
Advertisement
Add Comment
Please, Sign In to add comment