1 |
function room_set_view(argument0, argument1, argument2, argument3, argument4, argument5, argument6, argument7, argument8, argument9, argument10, argument11, argument12, argument13, argument14, argument15) //gml_Script_room_set_view |
2 |
{ |
3 |
var __ind = argument0 |
4 |
var __vind = argument1 |
5 |
var __vis = argument2 |
6 |
var __xview = argument3 |
7 |
var __yview = argument4 |
8 |
var __wview = argument5 |
9 |
var __hview = argument6 |
10 |
var __xport = argument7 |
11 |
var __yport = argument8 |
12 |
var __wport = argument9 |
13 |
var __hport = argument10 |
14 |
var __hborder = argument11 |
15 |
var __vborder = argument12 |
16 |
var __hspeed = argument13 |
17 |
var __vspeed = argument14 |
18 |
var __obj = argument15 |
19 |
if (!room_exists(__ind)) |
20 |
{ |
21 |
show_debug_message("room_set_view: room " + string(__ind) + " does not exist") |
22 |
return -1; |
23 |
} |
24 |
if (__vind < 0 || __vind > 7) |
25 |
{ |
26 |
show_debug_message("room_set_view: view index out of range") |
27 |
return -1; |
28 |
} |
29 |
var __newcam = camera_create_view(__xview, __yview, __wview, __hview, 0, __obj, __hspeed, __vspeed, __hborder, __vborder) |
30 |
var __currcam = room_get_camera(__ind, __vind) |
31 |
if (__currcam != -1) |
32 |
camera_destroy(__currcam) |
33 |
room_set_camera(__ind, __vind, __newcam) |
34 |
room_set_viewport(__ind, __vind, __vis, __xport, __yport, __wport, __hport) |
35 |
return -1; |
36 |
} |