Cube  Diff

Differences From Artifact [a8feb3f63c]:

To Artifact [555501440d]:


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
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







-
+
-










-
+
-







								// crap hack,
								// needed for
								// rendering
								// large mips
								// next to hfs
								fh -=
								    o[i]->vdelta /
								        4 +
								    4 + 2;
								    2;
							if (o[i]->type == CHF)
								// FIXME: needs
								// to somehow
								// take into
								// account
								// middle
								// vertices on
								// higher mips
								ch +=
								    o[i]->vdelta /
								        4 +
								    4 + 2;
								    2;
						}
						if (fh < floor)
							// take lowest floor and
							// highest ceil, so we
							// never have to see
							// missing lower/upper
							// from the side
210
211
212
213
214
215
216
217

218
219

220
221

222
223
224
225
226
227
228
229
230
231
232


233
234
235
236


237
238
239
240


241
242
243
244


245
246
247
248


249
250
251
252
253
254
255
256
208
209
210
211
212
213
214

215
216

217
218

219
220
221
222
223
224
225
226
227
228


229
230

231


232
233

234


235
236

237


238
239

240


241
242

243
244
245
246
247
248
249







-
+

-
+

-
+









-
-
+
+
-

-
-
+
+
-

-
-
+
+
-

-
-
+
+
-

-
-
+
+
-







					// exactly equal
					if (o[i]->type != o[3]->type ||
					    o[i]->floor != o[3]->floor ||
					    o[i]->ceil != o[3]->ceil ||
					    o[i]->ftex != o[3]->ftex ||
					    o[i]->ctex != o[3]->ctex ||
					    abs(o[i + 1]->r - o[0]->r) >
					        lighterr ||
					    lighterr ||
					    abs(o[i + 1]->g - o[0]->g) >
					        lighterr ||
					    lighterr ||
					    abs(o[i + 1]->b - o[0]->b) >
					        lighterr ||
					    lighterr ||
					    o[i]->utex != o[3]->utex ||
					    o[i]->wtex != o[3]->wtex)
						goto c;
				}

				// can make a perfect mip out of a hf if slopes
				// lie on one line
				if (r->type == CHF || r->type == FHF) {
					if (o[0]->vdelta - o[1]->vdelta !=
					        o[1]->vdelta -
					            SWS(w, x + 2, y, ws)
					    o[1]->vdelta -
					    SWS(w, x + 2, y, ws)->vdelta ||
					                ->vdelta ||
					    o[0]->vdelta - o[2]->vdelta !=
					        o[2]->vdelta -
					            SWS(w, x + 2, y + 2, ws)
					    o[2]->vdelta -
					    SWS(w, x + 2, y + 2, ws)->vdelta ||
					                ->vdelta ||
					    o[0]->vdelta - o[3]->vdelta !=
					        o[3]->vdelta -
					            SWS(w, x, y + 2, ws)
					    o[3]->vdelta -
					    SWS(w, x, y + 2, ws)->vdelta ||
					                ->vdelta ||
					    o[3]->vdelta - o[2]->vdelta !=
					        o[2]->vdelta -
					            SWS(w, x + 2, y + 1, ws)
					    o[2]->vdelta -
					    SWS(w, x + 2, y + 1, ws)->vdelta ||
					                ->vdelta ||
					    o[1]->vdelta - o[2]->vdelta !=
					        o[2]->vdelta -
					            SWS(w, x + 1, y + 2, ws)
					    o[2]->vdelta -
					    SWS(w, x + 1, y + 2, ws)->vdelta)
					                ->vdelta)
						goto c;
				}
			}
			{
				// if any of the constituents is not perfect,
				// then this one isn't either
				for (int i = 0; i < 4; i++)