-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,poh_viewer_setlevel].cs2
120 lines (120 loc) · 4.62 KB
/
[proc,poh_viewer_setlevel].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
116
117
118
119
120
// 1389
[proc,poh_viewer_setlevel](int $int0, int $int1, int $int2)
if_setonvartransmit("poh_viewer_setlevel(false, $int0, $int1, $int2){var780}", interface_422:44);
if ($int0 < $int1) {
$int0 = $int1;
} else if ($int0 > $int2) {
$int0 = $int2;
}
def_int $int3 = calc(7 + 2);
def_int $int4 = pow($int3, 2);
def_int $int5 = 0;
def_boolean $boolean6 = true;
if ($int0 = 0) {
$boolean6 = false;
}
def_int $int7 = 0;
while ($int7 < $int4) {
if (cc_find(interface_422:5, $int5) = ^true) {
cc_sethide($boolean6);
}
$int7, $int5 = calc($int7 + 1), calc($int5 + 1);
}
if ($int0 = 1) {
$boolean6 = false;
} else {
$boolean6 = true;
}
$int7 = 0;
while ($int7 < $int4) {
if (cc_find(interface_422:5, $int5) = ^true) {
cc_sethide($boolean6);
}
$int7, $int5 = calc($int7 + 1), calc($int5 + 1);
}
$int7 = 0;
while ($int7 < $int4) {
if (cc_find(interface_422:5, $int5) = ^true) {
cc_sethide(true);
}
$int7, $int5 = calc($int7 + 1), calc($int5 + 1);
}
def_int $int8 = -1;
def_int $comsubid9 = calc(%varbit5330 - 1);
if ($comsubid9 >= 0 & $comsubid9 < $int4) {
$int8 = 0;
} else if ($comsubid9 >= $int4 & $comsubid9 < calc($int4 * 2)) {
$int8 = 1;
} else if ($comsubid9 >= calc($int4 * 2) & $comsubid9 < calc($int4 * 3)) {
$int8 = 2;
}
def_component $component10 = enum(int, component, enum_1424, -1);
if ($int0 = $int8) {
if_sethide(false, $component10);
if ((cc_find($component10, 1) = ^true | cc_find($component10, 2) = ^true | cc_find($component10, 3) = ^true) & cc_gettrans >= 255) {
if_setontimer("poh_viewer_preview_pulse(event_com, clientclock)", $component10);
~poh_viewer_preview_pulse($component10, clientclock);
}
} else {
if_sethide(true, $component10);
if (cc_find($component10, 1) = ^true) {
cc_settrans(255);
}
if (cc_find($component10, 2) = ^true) {
cc_settrans(255);
}
if (cc_find($component10, 3) = ^true) {
cc_settrans(255);
}
}
def_int $int11 = 0;
if ($int1 <= 0) {
$int11 = ~script1391(interface_422:45, 0, "Dungeon", $int0, $int1, $int2, $int8);
} else {
$int11 = ~script1392(interface_422:45, "Dungeon");
}
def_int $int12 = 0;
if ($int2 >= 2) {
$int12 = ~script1391(interface_422:47, 2, "Upstairs", $int0, $int1, $int2, $int8);
} else {
$int12 = ~script1392(interface_422:47, "Upstairs");
}
def_int $int13 = calc(if_getwidth(if_getlayer(interface_422:46)) - ($int11 + ~script1391(interface_422:46, 1, "Ground", $int0, $int1, $int2, $int8) + $int12));
if_setposition(calc($int11 + $int13 / 2), 0, ^setpos_abs_left, ^setpos_abs_centre, interface_422:46);
~poh_viewer_handlelevel(1, %varcint141, $int0, $int3, $int4);
~poh_viewer_handlelevel(2, %varcint142, $int0, $int3, $int4);
~poh_viewer_handlelevel(3, %varcint143, $int0, $int3, $int4);
~poh_viewer_handlelevel(4, %varcint144, $int0, $int3, $int4);
~poh_viewer_handlelevel(5, %varcint145, $int0, $int3, $int4);
~poh_viewer_handlelevel(6, %varcint146, $int0, $int3, $int4);
~poh_viewer_handlelevel(7, %varcint147, $int0, $int3, $int4);
~poh_viewer_handlelevel(8, %varcint148, $int0, $int3, $int4);
~poh_viewer_handlelevel(9, %varcint149, $int0, $int3, $int4);
~poh_viewer_handlelevel(10, %varcint150, $int0, $int3, $int4);
~poh_viewer_handlelevel(11, %varcint151, $int0, $int3, $int4);
~poh_viewer_handlelevel(12, %varcint152, $int0, $int3, $int4);
~poh_viewer_handlelevel(13, %varcint153, $int0, $int3, $int4);
~poh_viewer_handlelevel(14, %varcint154, $int0, $int3, $int4);
~poh_viewer_handlelevel(15, %varcint155, $int0, $int3, $int4);
~poh_viewer_handlelevel(16, %varcint156, $int0, $int3, $int4);
~poh_viewer_handlelevel(17, %varcint157, $int0, $int3, $int4);
~poh_viewer_handlelevel(18, %varcint158, $int0, $int3, $int4);
~poh_viewer_handlelevel(19, %varcint159, $int0, $int3, $int4);
~poh_viewer_handlelevel(20, %varcint160, $int0, $int3, $int4);
~poh_viewer_handlelevel(21, %varcint161, $int0, $int3, $int4);
~poh_viewer_handlelevel(22, %varcint162, $int0, $int3, $int4);
~poh_viewer_handlelevel(23, %varcint163, $int0, $int3, $int4);
~poh_viewer_handlelevel(24, %varcint164, $int0, $int3, $int4);
~poh_viewer_handlelevel(25, %varcint165, $int0, $int3, $int4);
~poh_viewer_handlelevel(26, %varcint166, $int0, $int3, $int4);
~poh_viewer_handlelevel(27, %varcint167, $int0, $int3, $int4);
~poh_viewer_handlelevel(28, %varcint168, $int0, $int3, $int4);
~poh_viewer_handlelevel(29, %varcint169, $int0, $int3, $int4);
~poh_viewer_handlelevel(30, %varcint170, $int0, $int3, $int4);
~poh_viewer_handlelevel(31, %varcint174, $int0, $int3, $int4);
~poh_viewer_handlelevel(32, %varcint176, $int0, $int3, $int4);
~poh_viewer_handlelevel(33, %varcint177, $int0, $int3, $int4);
~poh_viewer_handlelevel(34, %varcint419, $int0, $int3, $int4);
if ($comsubid9 ! -1 & cc_find(interface_422:5, $comsubid9) = ^true) {
cc_sethide(true);
}