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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
/* */ package NET.worlds.scape;
/* */
/* */ import java.awt.Color;
/* */ import java.io.IOException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class RoomEnvironment
/* */ extends WObject
/* */ {
/* 51 */ static { nativeInit(); }
/* */
/* */ public static native void nativeInit();
/* */
/* 55 */ protected void addRwChildren(WObject parent) { createClump();
/* 56 */ Room r = (Room)getOwner();
/* 57 */ createScene(r);
/* */
/* 59 */ newRwChildHelper();
/* */
/* 61 */ addLight(r.getLightPosition(), r.getLightColor());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* 69 */ private int lightid = 0;
/* 70 */ private int lightid2 = 0;
/* */
/* */ protected void noteAddingTo(SuperRoot owner) {}
/* */
/* 74 */ private void addLight(Point3Temp pos, Color c) { assert (this.lightid == 0);
/* */
/* 76 */ float red = c.getRed() / 256.0F;
/* 77 */ float green = c.getGreen() / 256.0F;
/* 78 */ float blue = c.getBlue() / 256.0F;
/* */
/* 80 */ this.lightid = Room.addLight(this.sceneID, pos.x, pos.y, pos.z,
/* 81 */ red, green, blue);
/* */
/* 83 */ this.lightid2 = Room.addLight(this.sceneID, -pos.x, -pos.y, -pos.z,
/* 84 */ red * 0.5F, green * 0.5F, blue * 0.5F);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ void setLightPosition(float x, float y, float z)
/* */ {
/* 93 */ if (this.lightid != 0)
/* */ {
/* 95 */ Room.setLightPosition(this.lightid, x, y, z);
/* */ }
/* */
/* 98 */ if (this.lightid2 != 0)
/* */ {
/* 100 */ Room.setLightPosition(this.lightid2, -x, -y, -z);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ void setLightColor(float red, float green, float blue)
/* */ {
/* 111 */ if (this.lightid != 0)
/* */ {
/* 113 */ Room.setLightColor(this.lightid, red, green, blue);
/* */ }
/* */
/* 116 */ if (this.lightid2 != 0)
/* */ {
/* 118 */ Room.setLightColor(this.lightid2, red * 0.5F,
/* 119 */ green * 0.5F, blue * 0.5F);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */ public BoundBoxTemp getBoundBox()
/* */ {
/* 128 */ return BoundBoxTemp.make(Point3Temp.make(), Point3Temp.make());
/* */ }
/* */
/* */
/* */ protected void markVoid()
/* */ {
/* 134 */ super.markVoid();
/* */
/* 136 */ destroyScene();
/* 137 */ this.lightid = 0;
/* 138 */ this.lightid2 = 0;
/* */ }
/* */
/* */
/* */
/* 143 */ int nextVertex = 1;
/* */
/* */
/* */
/* 147 */ boolean wasEdited = false;
/* */
/* */ public void markClumpEdited()
/* */ {
/* 151 */ this.wasEdited = true;
/* */ }
/* */
/* */ public void prerender()
/* */ {
/* 156 */ if (this.wasEdited)
/* */ {
/* 158 */ this.wasEdited = false;
/* 159 */ doneWithEditing();
/* */ }
/* */ }
/* */
/* 163 */ private static Object classCookie = new Object();
/* */
/* */ private int sceneID;
/* */
/* */ public void saveState(Saver s)
/* */ throws IOException
/* */ {
/* 170 */ s.saveVersion(1, classCookie);
/* 171 */ super.saveState(s);
/* */ }
/* */
/* */
/* */
/* */ public void restoreState(Restorer r)
/* */ throws IOException, TooNewException
/* */ {
/* 179 */ switch (r.restoreVersion(classCookie)) {
/* */ case 1:
/* 181 */ super.restoreState(r);
/* 182 */ break;
/* */ case 0:
/* 184 */ r.setOldFlag();
/* 185 */ super.restoreState(r);
/* 186 */ r.restore();
/* 187 */ break;
/* */ default:
/* 189 */ throw new TooNewException();
/* */ }
/* */ }
/* */
/* */ native void createScene(Room paramRoom);
/* */
/* */ native void destroyScene();
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RoomEnvironment.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|