-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,ge_pricechecker_redraw].cs2
117 lines (117 loc) · 3.69 KB
/
[proc,ge_pricechecker_redraw].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
// 787
[proc,ge_pricechecker_redraw]
def_int $width0 = if_getwidth(interface_464:2);
def_int $int1 = calc($width0 / 5);
def_int $int2 = calc(($width0 - 5 * $int1) / 4 + $int1);
def_int $int3 = calc(32 + 35);
def_int $int4 = calc(($int1 - 36) / 2);
cc_deleteall(interface_464:2);
def_int $int5 = -1;
def_int $int6 = 0;
def_int $int7 = 0;
def_obj $obj8 = null;
def_int $size9 = inv_size(inv_90);
def_int $intarray0($size9);
$intarray0(0) = %varcint81;
$intarray0(1) = %varcint82;
$intarray0(2) = %varcint83;
$intarray0(3) = %varcint84;
$intarray0(4) = %varcint85;
$intarray0(5) = %varcint86;
$intarray0(6) = %varcint87;
$intarray0(7) = %varcint88;
$intarray0(8) = %varcint89;
$intarray0(9) = %varcint90;
$intarray0(10) = %varcint91;
$intarray0(11) = %varcint92;
$intarray0(12) = %varcint93;
$intarray0(13) = %varcint94;
$intarray0(14) = %varcint95;
$intarray0(15) = %varcint96;
$intarray0(16) = %varcint97;
$intarray0(17) = %varcint98;
$intarray0(18) = %varcint99;
$intarray0(19) = %varcint100;
$intarray0(20) = %varcint101;
$intarray0(21) = %varcint102;
$intarray0(22) = %varcint104;
$intarray0(23) = %varcint105;
$intarray0(24) = %varcint106;
$intarray0(25) = %varcint107;
$intarray0(26) = %varcint108;
$intarray0(27) = %varcint109;
def_int $size10 = 0;
while ($size10 < $size9) {
cc_create(interface_464:2, ^iftype_graphic, $size10);
$obj8 = inv_getobj(inv_90, $size10);
if ($obj8 ! null) {
$int6, $int7 = calc($size10 % 5 * $int2), calc($size10 / 5 * $int3);
$int5 = $int7;
cc_sethide(false);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int6 + $int4), $int7, ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphicshadow(0x333333);
cc_setoutline(1);
cc_setobject($obj8, inv_getnum(inv_90, $size10));
cc_setop(1, "Remove");
cc_setop(2, "Remove-5");
cc_setop(3, "Remove-10");
cc_setop(4, "Remove-All");
cc_setop(5, "Remove-X");
cc_setop(10, "Examine");
cc_setopbase("<col=ff9040><oc_name($obj8)></col>");
cc_setonop("cc_settrans_temporarily(event_com, event_comsubid, 100, 0)");
} else {
cc_sethide(true);
}
$size10 = calc($size10 + 1);
}
def_int $int11 = 0;
def_int $int12 = 0;
def_string $string0 = ",";
def_int $int13 = $size10;
$size10 = 0;
while ($size10 < $size9) {
$obj8, $int11 = inv_getobj(inv_90, $size10), inv_getnum(inv_90, $size10);
if ($obj8 ! null & $int11 > 0) {
$int6, $int7 = calc($size10 % 5 * $int2), calc($size10 / 5 * $int3);
cc_create(interface_464:2, ^iftype_text, $int13);
$int13 = calc($int13 + 1);
cc_sethide(false);
cc_setsize($int1, 35, ^setsize_abs, ^setsize_abs);
cc_setposition($int6, calc($int7 + 32), ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_settextfont(p11_full);
cc_settextshadow(true);
cc_settextalign(^settextalign_centre, ^settextalign_top, 0);
if (calc(^max_32bit_int / $int11) < $intarray0($size10)) {
$int12 = ^max_32bit_int;
} else {
$int12 = calc($int11 * $intarray0($size10));
}
if ($int11 > 1) {
if ($int12 >= 0 & $int12 < ^max_32bit_int) {
cc_settext("<~tostring_spacer($int11, $string0)> x <~tostring_spacer($intarray0($size10), $string0)><br>= <~tostring_spacer($int12, $string0)>");
} else {
cc_settext("<~tostring_spacer($int11, $string0)> x <~tostring_spacer($intarray0($size10), $string0)>");
}
} else {
cc_settext(~tostring_spacer($intarray0($size10), $string0));
}
}
$size10 = calc($size10 + 1);
}
def_int $height14 = 0;
if ($int5 >= 0) {
$height14 = calc($int5 + $int3);
}
def_int $int15 = if_getscrolly(interface_464:2);
if ($int15 > $int5) {
$int15 = $int5;
}
if ($height14 > if_getheight(interface_464:2)) {
if_setscrollsize(0, $height14, interface_464:2);
} else {
if_setscrollsize(0, 0, interface_464:2);
}
~scrollbar_resize(interface_464:3, interface_464:2, $int15);