-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,script1754].cs2
86 lines (86 loc) · 3.1 KB
/
[proc,script1754].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
// 1754
[proc,script1754](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 $int11 = calc($int9 + 2);
def_int $int12 = 0;
def_int $int13 = 0;
$int12, $int13 = ~worldmap_elements_chooseposition($coord0, $boolean2, $component4, $int5, $int6, $int7, $int8);
def_int $int14 = 0;
def_int $int15 = 0;
$int14, $int15 = ~worldmap_elements_chooseposition($coord1, $boolean2, $component4, $int5, $int6, $int7, $int8);
def_int $x16 = calc($int12 + ($int14 - $int12) / 2);
def_int $y17 = calc($int13 + ($int15 - $int13) / 2);
def_int $int18 = calc($int14 - $int12);
def_int $int19 = calc($int15 - $int13);
def_boolean $boolean20 = false;
if ($int18 < 0) {
if ($int19 < 0) {
$int18, $int19 = calc(0 - $int18), calc(0 - $int19);
} else {
$int18, $boolean20 = calc(0 - $int18), true;
}
} else if ($int19 < 0) {
$int19, $boolean20 = calc(0 - $int19), true;
}
if (cc_find($component4, $int9) = ^true) {
if (testbit(%varbit5640, 1) = ^true) {
cc_sethide(true);
} else {
cc_sethide(false);
}
cc_setposition(calc($int12 + 1), calc($int13 + 1), ^setpos_abs_centre, ^setpos_abs_centre);
} else {
cc_create($component4, ^iftype_rectangle, $int9);
if (testbit(%varbit5640, 1) = ^true) {
cc_sethide(true);
} else {
cc_sethide(false);
}
cc_setposition(calc($int12 + 1), calc($int13 + 1), ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize($int3, $int3, ^setsize_abs, ^setsize_abs);
cc_setcolour(^black);
cc_setfill(true);
}
def_int $int21 = 0;
def_int $int22 = 0;
def_int $int23 = 0;
def_int $colour24 = ^black;
if (cc_find($component4, $comsubid10) = ^true) {
if (testbit(%varbit5640, 1) = ^true) {
cc_sethide(true);
} else {
cc_sethide(false);
}
cc_setposition($int12, $int13, ^setpos_abs_centre, ^setpos_abs_centre);
} else {
$int21, $int22, $int23 = ~hex_to_rgb(16776960);
$int21, $int22, $int23 = ~max(calc($int21 - 48), 0), ~max(calc($int22 - 48), 0), ~max(calc($int23 - 48), 0);
$colour24 = ~rgb_to_hex($int21, $int22, $int23);
cc_create($component4, ^iftype_rectangle, $comsubid10);
if (testbit(%varbit5640, 1) = ^true) {
cc_sethide(true);
} else {
cc_sethide(false);
}
cc_setposition($int12, $int13, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize($int3, $int3, ^setsize_abs, ^setsize_abs);
cc_setcolour($colour24);
cc_setfill(true);
cc_setonmouseover("script1755(true, $component4, $comsubid10, -1, $int11, ^yellow)");
cc_setonmouseleave("script1755(false, $component4, $comsubid10, -1, $int11, $colour24)");
cc_setop(1, "Scroll map");
cc_setonop("script1756(event_opindex, $coord1, $boolean2)");
}
if (cc_find($component4, $int11) = ^true) {
cc_setposition($x16, $y17, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize($int18, $int19, ^setsize_abs, ^setsize_abs);
} else {
cc_create($component4, ^iftype_line, $int11);
cc_setposition($x16, $y17, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize($int18, $int19, ^setsize_abs, ^setsize_abs);
cc_setlinedirection($boolean20);
cc_setlinewid(calc(1 + $int3 / 5));
cc_setcolour(^yellow);
cc_sethide(true);
}
return(calc($int11 + 1));