1 |
function __background_set_internal(argument0, argument1, argument2, argument3) //gml_Script___background_set_internal |
2 |
{ |
3 |
var __prop = argument0 |
4 |
var __bind = argument1 |
5 |
var __val = argument2 |
6 |
var __backinfo = argument3 |
7 |
if (__backinfo[0] == -1) |
8 |
return -1; |
9 |
var __backid = __backinfo[0] |
10 |
var __layerid = __backinfo[1] |
11 |
var __isfore = __backinfo[2] |
12 |
if (__prop == (1 << 0)) |
13 |
{ |
14 |
if (round(__val) != round(__isfore)) |
15 |
{ |
16 |
var __visible = layer_get_visible(__layerid) |
17 |
var __index = layer_background_get_sprite(__backid) |
18 |
var __htiled = layer_background_get_htiled(__backid) |
19 |
var __vtiled = layer_background_get_vtiled(__backid) |
20 |
var __stretch = layer_background_get_stretch(__backid) |
21 |
var __blend = layer_background_get_blend(__backid) |
22 |
var __alpha = layer_background_get_alpha(__backid) |
23 |
var __xscale = layer_background_get_xscale(__backid) |
24 |
var __yscale = layer_background_get_yscale(__backid) |
25 |
var __x = layer_get_x(__layerid) |
26 |
var __y = layer_get_y(__layerid) |
27 |
var __hspeed = layer_get_hspeed(__layerid) |
28 |
var __vspeed = layer_get_vspeed(__layerid) |
29 |
__background_set_element(__bind, __visible, __val, __index, __x, __y, __htiled, __vtiled, __xscale, __yscale, __stretch, __hspeed, __vspeed, __blend, __alpha) |
30 |
} |
31 |
} |
32 |
else |
33 |
{ |
34 |
switch __prop |
35 |
{ |
36 |
case (0 << 0): |
37 |
layer_set_visible(__layerid, __val) |
38 |
layer_background_visible(__backid, __val) |
39 |
break |
40 |
case (2 << 0): |
41 |
layer_background_change(__backid, __val) |
42 |
if sprite_exists(__val) |
43 |
{ |
44 |
layer_background_blend(__backid, c_white) |
45 |
layer_background_alpha(__backid, 1) |
46 |
} |
47 |
break |
48 |
case (3 << 0): |
49 |
layer_x(__layerid, __val) |
50 |
break |
51 |
case (4 << 0): |
52 |
layer_y(__layerid, __val) |
53 |
break |
54 |
case (7 << 0): |
55 |
layer_background_htiled(__backid, __val) |
56 |
break |
57 |
case (8 << 0): |
58 |
layer_background_vtiled(__backid, __val) |
59 |
break |
60 |
case (9 << 0): |
61 |
layer_background_xscale(__backid, __val) |
62 |
break |
63 |
case (10 << 0): |
64 |
layer_background_yscale(__backid, __val) |
65 |
break |
66 |
case (11 << 0): |
67 |
layer_hspeed(__layerid, __val) |
68 |
break |
69 |
case (12 << 0): |
70 |
layer_vspeed(__layerid, __val) |
71 |
break |
72 |
case (13 << 0): |
73 |
layer_background_blend(__backid, __val) |
74 |
break |
75 |
case (14 << 0): |
76 |
layer_background_alpha(__backid, __val) |
77 |
break |
78 |
default: |
79 |
break |
80 |
} |
81 |
|
82 |
} |
83 |
return -1; |
84 |
} |