Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Make sure you have a player reference.
- if (player == noone) player = instance_find(o_Player,0);
- //Set up camera
- view_enabled = true;
- //Make view 0 visible
- view_set_visible(0, true);
- //Set view bounds
- view_set_wport(0, 1280);
- view_set_hport(0, 720);
- //Resize and center
- window_set_rectangle((display_get_width() - (view_wport[0] * windowScale)) * 0.5, (display_get_height() - (view_hport[0] * windowScale)) * 0.5, view_wport[0] * windowScale, view_hport[0] * windowScale);
- surface_resize(application_surface,view_wport[0] * windowScale,view_hport[0] * windowScale);
- //Camera creation
- //Build a camera at (0,0), with size 640x480, 0 degrees of angle, no target instance, instant-jupming hspeed and vspeed, with a 32 pixel border
- camera = camera_create_view(0, 0, 1280, 720, 0, -1, -1, -1, 32, 32);
- //Set view0 to use the camera "camera"
- view_set_camera(0, camera);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement