-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,script1753].cs2
115 lines (115 loc) · 4.38 KB
/
[proc,script1753].cs2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// 1753
[proc,script1753](coord $coord0, coord $coord1, boolean $boolean2, int $int3, component $component4, int $int5, int $int6, int $int7, int $int8, int $int9)(int)
def_int $comsubid10 = calc($int9 + 1);
def_int $comsubid11 = calc($int9 + 2);
def_int $comsubid12 = calc($int9 + 3);
def_int $int13 = calc($int9 + 4);
def_int $int14 = 0;
def_int $int15 = 0;
$int14, $int15 = ~worldmap_elements_chooseposition($coord0, $boolean2, $component4, $int5, $int6, $int7, $int8);
def_int $int16 = 0;
def_int $int17 = 0;
$int16, $int17 = ~worldmap_elements_chooseposition($coord1, $boolean2, $component4, $int5, $int6, $int7, $int8);
def_int $x18 = calc($int14 + ($int16 - $int14) / 2);
def_int $y19 = calc($int15 + ($int17 - $int15) / 2);
def_int $int20 = calc($int16 - $int14);
def_int $int21 = calc($int17 - $int15);
def_boolean $boolean22 = false;
if ($int20 < 0) {
if ($int21 < 0) {
$int20 = calc(0 - $int20);
$int21 = calc(0 - $int21);
} else {
$int20 = calc(0 - $int20);
$boolean22 = true;
}
} else if ($int21 < 0) {
$int21 = calc(0 - $int21);
$boolean22 = true;
}
if (cc_find($component4, $int9) = ^true & .cc_find($component4, $comsubid10) = ^true) {
if (testbit(%varbit5640, 1) = ^true) {
cc_sethide(true);
.cc_sethide(true);
} else {
cc_sethide(false);
.cc_sethide(false);
}
cc_setposition(calc($int14 + 1), calc($int15 + 1), ^setpos_abs_centre, ^setpos_abs_centre);
.cc_setposition(calc($int16 + 1), calc($int17 + 1), ^setpos_abs_centre, ^setpos_abs_centre);
} else {
cc_create($component4, ^iftype_rectangle, $int9);
.cc_create($component4, ^iftype_rectangle, $comsubid10);
if (testbit(%varbit5640, 1) = ^true) {
cc_sethide(true);
.cc_sethide(true);
} else {
cc_sethide(false);
.cc_sethide(false);
}
cc_setposition(calc($int14 + 1), calc($int15 + 1), ^setpos_abs_centre, ^setpos_abs_centre);
.cc_setposition(calc($int16 + 1), calc($int17 + 1), ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize($int3, $int3, ^setsize_abs, ^setsize_abs);
.cc_setsize($int3, $int3, ^setsize_abs, ^setsize_abs);
cc_setcolour(^black);
.cc_setcolour(^black);
cc_setfill(true);
.cc_setfill(true);
}
def_int $int23 = 0;
def_int $int24 = 0;
def_int $int25 = 0;
def_int $colour26 = ^black;
if (cc_find($component4, $comsubid11) = ^true & .cc_find($component4, $comsubid12) = ^true) {
if (testbit(%varbit5640, 1) = ^true) {
cc_sethide(true);
.cc_sethide(true);
} else {
cc_sethide(false);
.cc_sethide(false);
}
cc_setposition($int14, $int15, ^setpos_abs_centre, ^setpos_abs_centre);
.cc_setposition($int16, $int17, ^setpos_abs_centre, ^setpos_abs_centre);
} else {
$int23, $int24, $int25 = ~hex_to_rgb(16776960);
$int23, $int24, $int25 = ~max(calc($int23 - 48), 0), ~max(calc($int24 - 48), 0), ~max(calc($int25 - 48), 0);
$colour26 = ~rgb_to_hex($int23, $int24, $int25);
cc_create($component4, ^iftype_rectangle, $comsubid11);
.cc_create($component4, ^iftype_rectangle, $comsubid12);
if (testbit(%varbit5640, 1) = ^true) {
cc_sethide(true);
.cc_sethide(true);
} else {
cc_sethide(false);
.cc_sethide(false);
}
cc_setposition($int14, $int15, ^setpos_abs_centre, ^setpos_abs_centre);
.cc_setposition($int16, $int17, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize($int3, $int3, ^setsize_abs, ^setsize_abs);
.cc_setsize($int3, $int3, ^setsize_abs, ^setsize_abs);
cc_setcolour($colour26);
.cc_setcolour($colour26);
cc_setfill(true);
.cc_setfill(true);
cc_setonmouseover("script1755(true, $component4, $comsubid11, $comsubid12, $int13, ^yellow)");
.cc_setonmouseover("script1755(true, $component4, $comsubid11, $comsubid12, $int13, ^yellow)");
cc_setonmouseleave("script1755(false, $component4, $comsubid11, $comsubid12, $int13, $colour26)");
.cc_setonmouseleave("script1755(false, $component4, $comsubid11, $comsubid12, $int13, $colour26)");
cc_setop(1, "Scroll map");
.cc_setop(1, "Scroll map");
cc_setonop("script1756(event_opindex, $coord1, $boolean2)");
.cc_setonop("script1756(event_opindex, $coord0, $boolean2)");
}
if (cc_find($component4, $int13) = ^true) {
cc_setposition($x18, $y19, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize($int20, $int21, ^setsize_abs, ^setsize_abs);
} else {
cc_create($component4, ^iftype_line, $int13);
cc_setposition($x18, $y19, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize($int20, $int21, ^setsize_abs, ^setsize_abs);
cc_setlinedirection($boolean22);
cc_setlinewid(calc(1 + $int3 / 5));
cc_setcolour(^yellow);
cc_sethide(true);
}
return(calc($int13 + 1));