This repository was archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path[proc,worldmap_elements_marker].cs2
79 lines (79 loc) · 3.07 KB
/
[proc,worldmap_elements_marker].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
// 1757
[proc,worldmap_elements_marker](coord $coord0, struct $struct1, component $component2, int $int3, int $int4, int $int5, int $int6, int $int7)(int)
def_int $int8 = struct_param($struct1, param_462);
$coord0 = ~worldmap_findcoordinmap(worldmap_getcurrentmap, $coord0);
if ($coord0 = null) {
if (cc_find($component2, $int7) = ^true) {
cc_sethide(true);
} else {
cc_create($component2, ^iftype_graphic, $int7);
cc_sethide(true);
cc_setsize($int8, $int8, ^setsize_abs, ^setsize_abs);
}
return(calc($int7 + 1));
}
def_int $x9 = 0;
def_int $y10 = 0;
$x9, $y10 = ~worldmap_elements_chooseposition($coord0, false, $component2, $int3, $int4, $int5, $int6);
def_graphic $graphic11 = struct_param($struct1, param_459);
def_int $int12 = calc($int8 / 2);
def_int $angle13 = 0;
def_int $int14 = 0;
def_int $x15 = calc(if_getwidth($component2) / 2);
def_int $y16 = calc(if_getheight($component2) / 2);
if ($x9 < calc(0 - $x15)) {
$x9 = calc($int12 - $x15);
if ($y10 < calc(0 - $y16)) {
$graphic11, $angle13, $y10 = struct_param($struct1, param_461), 16384, calc($int12 - $y16);
} else if ($y10 > $y16) {
$graphic11, $angle13, $y10 = struct_param($struct1, param_461), 32768, calc($y16 - $int12);
} else {
$graphic11, $angle13 = struct_param($struct1, param_460), 32768;
}
} else if ($x9 > $x15) {
$x9 = calc($x15 - $int12);
if ($y10 < calc(0 - $y16)) {
$graphic11, $angle13, $y10 = struct_param($struct1, param_461), 0, calc($int12 - $y16);
} else if ($y10 > $y16) {
$graphic11, $angle13, $y10 = struct_param($struct1, param_461), 49152, calc($y16 - $int12);
} else {
$graphic11, $angle13 = struct_param($struct1, param_460), 0;
}
} else if ($y10 < calc(0 - $y16)) {
$graphic11, $angle13, $y10 = struct_param($struct1, param_460), 16384, calc($int12 - $y16);
} else if ($y10 > $y16) {
$graphic11, $angle13, $y10 = struct_param($struct1, param_460), 49152, calc($y16 - $int12);
} else {
$angle13, $int14 = ~script1759($struct1), 1;
}
if (cc_find($component2, $int7) = ^true) {
cc_sethide(false);
cc_setop(1, "Focus on");
cc_setopbase("<col=ff9040><struct_param($struct1, param_985)></col>");
cc_setonop("script1756(event_op, $coord0, false)");
cc_setposition($x9, $y10, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setgraphic($graphic11);
cc_set2dangle($angle13);
if ($int14 = 1 & testbit(%varbit5640, 4) = ^false & struct_param($struct1, param_986) = true) {
cc_setontimer("script1758(event_com, event_comsubid, $struct1)");
} else {
cc_setontimer(null);
}
} else {
cc_create($component2, ^iftype_graphic, $int7);
cc_sethide(false);
cc_setop(1, "Focus on");
cc_setopbase("<col=ff9040><struct_param($struct1, param_985)></col>");
cc_setonop("script1756(event_op, $coord0, false)");
cc_setsize($int8, $int8, ^setsize_abs, ^setsize_abs);
cc_setposition($x9, $y10, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setgraphic($graphic11);
cc_set2dangle($angle13);
if ($int14 = 1 & testbit(%varbit5640, 4) = ^false & struct_param($struct1, param_986) = true) {
cc_setontimer("script1758(event_com, event_comsubid, $struct1)");
} else {
cc_setontimer(null);
}
}
$int7 = calc($int7 + 1);
return($int7);