-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,poh_menagerie_drawlist].cs2
49 lines (49 loc) · 1.5 KB
/
[proc,poh_menagerie_drawlist].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
// 641
[proc,poh_menagerie_drawlist](component $component0, component $component1, int $y2)
cc_deleteall($component0);
def_int $width3 = if_getwidth($component0);
def_int $height4 = if_getheight($component0);
def_int $int5 = calc(($width3 - 36 * 6) / 5 + 36);
def_int $int6 = 0;
def_int $height7 = 0;
def_enum $enum8 = null;
def_int $int9 = 0;
def_namedobj $namedobj10 = null;
while ($int9 <= 55) {
cc_create($component0, ^iftype_graphic, $int9);
if ($int9 < 32 & testbit(%var864, $int9) = ^true | $int9 >= 32 & testbit(%var1416, calc($int9 - 32)) = ^true) {
$namedobj10 = enum(int, namedobj, enum_985, $int9);
$enum8 = oc_param($namedobj10, param_446);
$height7 = ~poh_menagerie_drawpet($namedobj10, $enum8, $int5, $int6);
$int6 = calc($int6 + 1);
} else {
cc_sethide(true);
}
$int9 = calc($int9 + 1);
}
def_obj $obj11 = null;
def_int $size12 = 0;
def_int $size13 = inv_size(inv_517);
while ($size12 < $size13) {
cc_create($component0, ^iftype_graphic, $int9);
$obj11 = inv_getobj(inv_517, $size12);
if ($obj11 ! null) {
$height7 = ~poh_menagerie_drawpet($obj11, null, $int5, $int6);
$int6 = calc($int6 + 1);
} else {
cc_sethide(true);
}
$int9, $size12 = calc($int9 + 1), calc($size12 + 1);
}
if ($int6 > 0) {
$height7 = calc($height7 + 32);
}
if ($height7 > $height4) {
if_setscrollsize(0, $height7, $component0);
if_setscrollpos(0, $y2, $component0);
} else {
$height7 = 0;
if_setscrollsize(0, 0, $component0);
if_setscrollpos(0, 0, $component0);
}
~scrollbar_resize($component1, $component0, $height7);