-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,gravestone_generic_window_set].cs2
167 lines (167 loc) · 6.93 KB
/
[proc,gravestone_generic_window_set].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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// 3464
[proc,gravestone_generic_window_set](component $component0, component $component1, component $component2, int $int3, int $int4, int $int5, component $component6, int $int7, component $component8, int $int9, component $component10, component $component11, component $component12, component $component13)
def_int $width14 = if_getwidth($component0);
def_int $int15 = calc(if_getheight($component0) - $int3);
%varcint395 = ~max($int4, ~min(%varcint395, $width14));
%varcint396 = ~max($int5, ~min(%varcint396, $int15));
%varcint397 = ~max(0, ~min(%varcint397, calc($width14 - %varcint395)));
%varcint398 = ~max($int3, ~min(%varcint398, calc($int3 + $int15 - %varcint396)));
if_setsize(%varcint395, %varcint396, ^setsize_abs, ^setsize_abs, $component1);
if_setposition(%varcint397, %varcint398, ^setpos_abs_left, ^setpos_abs_top, $component1);
def_int $int16 = calc(%varcint396 - $int5);
def_int $int17 = calc($int16 / 2);
if_setsize(20, calc($int7 + $int17 + 1), ^setsize_minus, ^setsize_abs, $component6);
if_setsize(20, calc($int9 + ($int16 - $int17)), ^setsize_minus, ^setsize_abs, $component8);
def_int $width18 = if_getwidth($component10);
def_int $int19 = ~max(1, calc($width18 / (36 + 3)));
def_int $int20 = 0;
if ($int19 > 1) {
$int20 = calc(($width18 - $int19 * 36) / ($int19 - 1));
}
def_int $int21 = calc($width18 - ($int19 * 36 + ($int19 - 1) * $int20));
def_int $int22 = calc(($int21 + 1) / 2);
def_obj $obj23 = null;
def_int $int24 = 0;
def_int $int25 = -1;
def_int $int26 = 0;
def_int $int27 = -1;
def_int $int28 = calc(%varbit10472 - 1);
if ($int28 = -1) {
$int28 = ^max_32bit_int;
}
def_int $int29 = calc(%varbit10473 - 1);
if ($int29 = -1) {
$int29 = ^max_32bit_int;
}
def_int $int30 = calc(%varbit10474 - 1);
if ($int30 = -1) {
$int30 = ^max_32bit_int;
}
def_int $int31 = 0;
def_int $int32 = 500000;
if (%varbit1777 ! 0) {
$int32 = calc($int32 / 2);
}
def_int $int33 = 0;
while ($int33 < 120) {
if (cc_find($component10, $int33) = ^true) {
if ($int33 >= $int28) {
$obj23 = inv_getobj(inv_525, $int33);
if ($obj23 ! null) {
cc_sethide(false);
cc_setobject($obj23, inv_getnum(inv_525, $int33));
cc_setopbase("<col=ff9040><oc_name($obj23)></col>");
$int25 = calc($int24 / $int19 * (32 + 4));
cc_setposition(calc($int22 + $int24 % $int19 * (36 + $int20)), $int25, ^setpos_abs_left, ^setpos_abs_top);
$int24 = calc($int24 + 1);
} else {
cc_sethide(true);
}
} else {
cc_sethide(true);
}
}
if (cc_find($component12, $int33) = ^true & .cc_find($component12, calc($int33 + 120)) = ^true) {
if ($int33 < $int28) {
$obj23 = inv_getobj(inv_525, $int33);
if ($obj23 ! null) {
cc_sethide(false);
.cc_sethide(false);
cc_setobject($obj23, inv_getnum(inv_525, $int33));
cc_setopbase("<col=ff9040><oc_name($obj23)></col>");
if ($int33 >= $int29) {
if (calc(^max_32bit_int / 1000) < inv_getnum(inv_525, $int33)) {
$int31 = ^max_32bit_int;
} else {
$int31 = calc(1000 * inv_getnum(inv_525, $int33));
}
} else if ($int33 >= $int30) {
if (calc(^max_32bit_int / 10000) < inv_getnum(inv_525, $int33)) {
$int31 = ^max_32bit_int;
} else {
$int31 = calc(10000 * inv_getnum(inv_525, $int33));
}
} else if (calc(^max_32bit_int / 100000) < inv_getnum(inv_525, $int33)) {
$int31 = ^max_32bit_int;
} else {
$int31 = calc(100000 * inv_getnum(inv_525, $int33));
}
if (%varbit1777 ! 0) {
$int31 = calc($int31 / 2);
}
$int31 = ~min($int32, $int31);
if ($int31 >= 1000) {
.cc_settext("<tostring(calc($int31 / 1000))>k");
} else {
.cc_settext(tostring($int31));
}
$int27 = calc($int26 / $int19 * (32 + 16));
cc_setposition(calc($int22 + $int26 % $int19 * (36 + $int20)), $int27, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition(cc_getx, calc($int27 + 32), ^setpos_abs_left, ^setpos_abs_top);
$int26 = calc($int26 + 1);
} else {
cc_sethide(true);
.cc_sethide(true);
}
} else {
cc_sethide(true);
.cc_sethide(true);
}
}
$int33 = calc($int33 + 1);
}
if ($int25 >= 0) {
$int25 = calc($int25 + 32);
if_setscrollpos(0, ~min(if_getscrolly($component10), calc($int25 - if_getheight($component10))), $component10);
if_setscrollsize(0, $int25, $component10);
} else {
if_setscrollpos(0, 0, $component10);
if_setscrollsize(0, 0, $component10);
}
~scrollbar_vertical_rebuild($component11, $component10);
if ($int27 >= 0) {
$int27 = calc($int27 + 32 + 12);
if_setscrollpos(0, ~min(if_getscrolly($component12), calc($int27 - if_getheight($component12))), $component12);
if_setscrollsize(0, $int27, $component12);
} else {
if_setscrollpos(0, 0, $component12);
if_setscrollsize(0, 0, $component12);
}
~scrollbar_vertical_rebuild($component13, $component12);
if_sethide(false, $component1);
if_sethide(true, $component2);
def_int $width34 = calc(%varcint395 - 6 * 2);
def_int $height35 = calc(%varcint396 - 6 * 2);
def_int $x36 = calc(%varcint397 + %varcint395 - 6);
def_int $y37 = calc(%varcint398 + %varcint396 - 6);
def_int $int38 = 0;
if (cc_find($component0, 0) = ^true & .cc_find($component0, 1) = ^true) {
cc_setsize($width34, 29, ^setsize_abs, ^setsize_abs);
.cc_setsize($width34, 6, ^setsize_abs, ^setsize_abs);
$int38 = calc(%varcint397 + 6);
cc_setposition($int38, %varcint398, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition($int38, $y37, ^setpos_abs_left, ^setpos_abs_top);
~script3465($component0, $component1, $component2, $int3, $int4, $int5, $component6, $int7, $component8, $int9, $component10, $component11, $component12, $component13);
}
if (cc_find($component0, 2) = ^true & .cc_find($component0, 3) = ^true) {
cc_setsize(6, $height35, ^setsize_abs, ^setsize_abs);
.cc_setsize(6, $height35, ^setsize_abs, ^setsize_abs);
$int38 = calc(%varcint398 + 6);
cc_setposition(%varcint397, $int38, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition($x36, $int38, ^setpos_abs_left, ^setpos_abs_top);
~script3465($component0, $component1, $component2, $int3, $int4, $int5, $component6, $int7, $component8, $int9, $component10, $component11, $component12, $component13);
}
if (cc_find($component0, 4) = ^true & .cc_find($component0, 5) = ^true) {
cc_setsize(6, 6, ^setsize_abs, ^setsize_abs);
.cc_setsize(6, 6, ^setsize_abs, ^setsize_abs);
cc_setposition(%varcint397, %varcint398, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition($x36, %varcint398, ^setpos_abs_left, ^setpos_abs_top);
~script3465($component0, $component1, $component2, $int3, $int4, $int5, $component6, $int7, $component8, $int9, $component10, $component11, $component12, $component13);
}
if (cc_find($component0, 6) = ^true & .cc_find($component0, 7) = ^true) {
cc_setsize(6, 6, ^setsize_abs, ^setsize_abs);
.cc_setsize(6, 6, ^setsize_abs, ^setsize_abs);
cc_setposition(%varcint397, $y37, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition($x36, $y37, ^setpos_abs_left, ^setpos_abs_top);
~script3465($component0, $component1, $component2, $int3, $int4, $int5, $component6, $int7, $component8, $int9, $component10, $component11, $component12, $component13);
}