-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,poh_viewer_sideupdate].cs2
182 lines (182 loc) · 7.3 KB
/
[proc,poh_viewer_sideupdate].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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// 1397
[proc,poh_viewer_sideupdate](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8, component $component9, component $component10, component $component11, component $component12, component $component13, component $component14)
def_int $int15 = calc(pow(7 + 2, 2) * 3);
def_int $int16 = $int15;
if (%varbit5330 > $int15) {
while ($int16 > 0) {
$int16 = calc($int16 - 1);
if (cc_find(interface_422:5, $int16) = ^true) {
cc_clearops;
cc_setop(1, "Select");
cc_setonop("opsound(event_opindex, 2)");
cc_setcolour(0x8f8f8f);
cc_setonmouserepeat("cc_colour_swapper(event_com, event_comsubid, ^white)");
cc_setonmouseleave("cc_colour_swapper(event_com, event_comsubid, 0x8f8f8f)");
}
}
} else if (%varbit5332 = 0 & %varbit5330 = 0) {
while ($int16 > 0) {
$int16 = calc($int16 - 1);
if (cc_find(interface_422:5, $int16) = ^true) {
cc_clearops;
cc_setop(6, "Add room");
cc_setonop("opsound(event_opindex, 64)");
cc_setcolour(0xafafaf);
cc_setonmouserepeat(null);
cc_setonmouseleave(null);
}
}
} else {
while ($int16 > 0) {
$int16 = calc($int16 - 1);
if (cc_find(interface_422:5, $int16) = ^true) {
cc_clearops;
cc_setonop(null);
cc_setcolour(0xafafaf);
cc_setonmouserepeat(null);
cc_setonmouseleave(null);
}
}
}
def_component $component17 = enum(int, component, enum_1424, -1);
if (%varbit5333 <= 0) {
if_settext("---", $component0);
if_setgraphic(null, $component1);
if_set2dangle(0, $component1);
if (cc_find($component17, 0) = ^true) {
cc_setgraphic(null);
cc_set2dangle(0);
}
if_settrans(255, $component2);
if_settrans(255, $component3);
if_settrans(255, $component4);
if_settrans(255, $component5);
if_settext("Select a room on the map.", $component6);
~poh_viewer_disablebutton($component7, "Move", 0);
~poh_viewer_disablebutton($component8, "Rotate", 0);
~poh_viewer_disablerotate($component9, "miscgraphics3,2");
~poh_viewer_disablerotate($component10, "miscgraphics3,3");
~poh_viewer_disablebutton($component11, "Delete", 0);
~poh_viewer_disablebutton($component12, "Cancel", 0);
~poh_viewer_disablebutton($component13, "Done", 0);
return;
}
def_obj $obj18 = enum(int, obj, enum_250, %varbit5333);
if_settext(oc_name($obj18), $component0);
def_graphic $graphic19 = enum(int, graphic, enum_1423, %varbit5333);
if_setgraphic($graphic19, $component1);
def_int $angle20 = calc(16384 * (4 - %varbit5331) % 65536);
if_set2dangle($angle20, $component1);
if (cc_find($component17, 0) = ^true) {
if (%varbit5330 ! 0) {
cc_setgraphic($graphic19);
cc_set2dangle($angle20);
} else {
cc_setgraphic(null);
cc_set2dangle(0);
}
}
def_int $trans21 = 255;
if (testbit(%varbit5335, 0) = ^true) {
$trans21 = 150;
if (%varbit5331 = 1) {
if (testbit(%varbit5334, 3) = ^true) {
$trans21 = 0;
}
} else if (%varbit5331 = 2) {
$trans21 = 0;
} else if (%varbit5331 = 3) {
if (testbit(%varbit5334, 1) = ^true) {
$trans21 = 0;
}
} else if (testbit(%varbit5334, 0) = ^true) {
$trans21 = 0;
}
}
if_settrans($trans21, $component2);
$trans21 = 255;
if (testbit(%varbit5335, 2) = ^true) {
$trans21 = 150;
if (%varbit5331 = 1) {
if (testbit(%varbit5334, 1) = ^true) {
$trans21 = 0;
}
} else if (%varbit5331 = 2) {
if (testbit(%varbit5334, 0) = ^true) {
$trans21 = 0;
}
} else if (%varbit5331 = 3) {
if (testbit(%varbit5334, 3) = ^true) {
$trans21 = 0;
}
} else {
$trans21 = 0;
}
}
if_settrans($trans21, $component3);
$trans21 = 255;
if (testbit(%varbit5335, 1) = ^true) {
$trans21 = 150;
if (%varbit5331 = 1) {
if (testbit(%varbit5334, 0) = ^true) {
$trans21 = 0;
}
} else if (%varbit5331 = 2) {
if (testbit(%varbit5334, 3) = ^true) {
$trans21 = 0;
}
} else if (%varbit5331 = 3) {
$trans21 = 0;
} else if (testbit(%varbit5334, 1) = ^true) {
$trans21 = 0;
}
}
if_settrans($trans21, $component4);
$trans21 = 255;
if (testbit(%varbit5335, 3) = ^true) {
$trans21 = 150;
if (%varbit5331 = 1) {
$trans21 = 0;
} else if (%varbit5331 = 2) {
if (testbit(%varbit5334, 1) = ^true) {
$trans21 = 0;
}
} else if (%varbit5331 = 3) {
if (testbit(%varbit5334, 0) = ^true) {
$trans21 = 0;
}
} else if (testbit(%varbit5334, 3) = ^true) {
$trans21 = 0;
}
}
if_settrans($trans21, $component5);
if (%varbit5330 > $int15) {
if_settext("Use the map to select a position for the room.", $component6);
~poh_viewer_disablebutton($component7, "Move", 1);
~poh_viewer_disablebutton($component8, "Rotate", 0);
~poh_viewer_disablerotate($component9, "miscgraphics3,2");
~poh_viewer_disablerotate($component10, "miscgraphics3,3");
~poh_viewer_disablebutton($component11, "Delete", 0);
~poh_viewer_enablebutton($component12, "Cancel", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14);
~poh_viewer_disablebutton($component13, "Done", 0);
return;
}
if (%varbit5332 = 1) {
if_settext("Choose an orientation for the room, then select 'Done'.", $component6);
~poh_viewer_disablebutton($component7, "Move", 0);
~poh_viewer_disablebutton($component8, "Rotate", 1);
~poh_viewer_enablerotate($component9, "Clockwise", "miscgraphics3,2", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14);
~poh_viewer_enablerotate($component10, "Counter-clockwise", "miscgraphics3,3", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14);
~poh_viewer_disablebutton($component11, "Delete", 0);
~poh_viewer_enablebutton($component12, "Cancel", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14);
~poh_viewer_enablebutton($component13, "Done", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14);
return;
}
if_settext("Use the options to edit the room.", $component6);
~poh_viewer_enablebutton($component7, "Move", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14);
~poh_viewer_enablebutton($component8, "Rotate", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14);
~poh_viewer_disablerotate($component9, "miscgraphics3,2");
~poh_viewer_disablerotate($component10, "miscgraphics3,3");
~poh_viewer_enablebutton($component11, "Delete", $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14);
~poh_viewer_disablebutton($component12, "Cancel", 0);
~poh_viewer_disablebutton($component13, "Done", 0);