152 {
153 _ = Main.PixelShaderRef;
155 {
156
157 ((Color)(
ref newColor)).R = (byte)((
float)player.statLife / (float)player.statLifeMax2 * 235
f + 20
f);
161 }));
163 {
164
165 ((Color)(
ref newColor)).R = (
byte)((1
f - (float)player.statMana / (
float)player.statManaMax2) * 200
f + 50
f);
167 ((Color)(
ref newColor)).G = (
byte)((1
f - (float)player.statMana / (
float)player.statManaMax2) * 180
f + 75
f);
169 }));
171 {
172
173
174
175
176
177
178
179
180
181
182
183 float num27 = (float)(Main.worldSurface * 0.45) * 16
f;
184 float num28 = (float)(Main.worldSurface + Main.rockLayer) * 8
f;
185 float num29 = (float)(Main.rockLayer + (
double)Main.maxTilesY) * 8
f;
186 float num30 = (float)(Main.maxTilesY - 150) * 16
f;
187 Vector2
center = player.Center;
189 {
195 }
197 {
204 }
206 {
213 }
215 {
222 }
223 else
224 {
228 }
230 }));
232 {
233
234
235
237 for (int i = 0; i < 54; i++)
238 {
239 if (player.inventory[i].type == 71)
240 {
241 num15 += player.inventory[i].stack;
242 }
243 if (player.inventory[i].type == 72)
244 {
245 num15 += (long)player.inventory[i].stack * 100
L;
246 }
247 if (player.inventory[i].type == 73)
248 {
249 num15 += (long)player.inventory[i].stack * 10000
L;
250 }
251 if (player.inventory[i].type == 74)
252 {
253 num15 += (long)player.inventory[i].stack * 1000000
L;
254 }
255 }
257 {
259 }
260 float num16 = Item.buyPrice(0, 5);
261 float num17 = Item.buyPrice(0, 50);
262 float num18 = Item.buyPrice(2);
263 Color
val7 =
default(Color);
265 Color
val8 =
default(Color);
267 Color
val9 =
default(Color);
269 Color
val10 =
default(Color);
272 {
278 }
280 {
287 }
289 {
296 }
297 else
298 {
300 }
302 }));
304 {
305
306 Color
val3 =
default(Color);
308 Color
val4 =
default(Color);
310 Color
val5 =
default(Color);
312 Color
val6 =
default(Color);
314 if (Main.dayTime)
315 {
316 if (Main.time < 27000.0)
317 {
318 float num5 = (float)(Main.time / 27000.0);
323 }
324 else
325 {
327 float num8 = (float)((Main.time - (
double)
num7) / (54000.0 - (
double)
num7));
332 }
333 }
334 else if (Main.time < 16200.0)
335 {
336 float num10 = (float)(Main.time / 16200.0);
341 }
342 else
343 {
345 float num13 = (float)((Main.time - (
double)
num12) / (32400.0 - (
double)
num12));
350 }
352 }));
354 {
355
356
357
358 if (player.team >= 0 && player.team < Main.teamColor.Length)
359 {
360 newColor = Main.teamColor[player.team];
361 }
363 }));
365 {
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389 Color
val =
default(Color);
390 if (!player.ZoneShimmer)
391 {
392 val = ((Main.waterStyle == 2) ?
new Color(124, 118, 242) : ((Main.waterStyle == 3) ?
new Color(143, 215, 29) : ((Main.waterStyle == 4) ?
new Color(78, 193, 227) : ((Main.waterStyle == 5) ?
new Color(189, 231, 255) : ((Main.waterStyle == 6) ?
new Color(230, 219, 100) : ((Main.waterStyle == 7) ?
new Color(151, 107, 75) : ((Main.waterStyle == 8) ?
new Color(128, 128, 128) : ((Main.waterStyle == 9) ?
new Color(200, 0, 0) : ((Main.waterStyle == 10) ?
new Color(208, 80, 80) : ((Main.waterStyle == 12) ?
new Color(230, 219, 100) : ((Main.waterStyle != 13) ?
new Color(28, 216, 94) :
new Color(28, 216, 94))))))))))));
393 if (Main.waterStyle >= 15)
394 {
396 }
397 }
398 else
399 {
402 }
403 Color
val2 = player.hairDyeColor;
404 if (((Color)(
ref val2)).A == 0)
405 {
407 }
409 {
411 ((Color)(
ref val2)).R = (
byte)(
r - 1);
412 }
414 {
416 ((Color)(
ref val2)).R = (
byte)(
r + 1);
417 }
419 {
421 ((Color)(
ref val2)).G = (
byte)(
r - 1);
422 }
424 {
426 ((Color)(
ref val2)).G = (
byte)(
r + 1);
427 }
429 {
431 ((Color)(
ref val2)).B = (
byte)(
r - 1);
432 }
434 {
436 ((Color)(
ref val2)).B = (
byte)(
r + 1);
437 }
440 }));
442 {
443
446 }));
448 {
449
452 }));
454 {
455
456 float num =
Math.Abs(player.velocity.X) +
Math.Abs(player.velocity.Y);
459 {
461 }
468 }));
470 {
471
472
473
475 int x = (int)((double)player.position.X + (double)player.width * 0.5) / 16;
476 int y = (int)(((double)player.position.Y + (double)player.height * 0.25) / 16.0);
477 Color color = Lighting.GetColor(x, y);
482 }));
483 }
LegacyHairShaderData UseLegacyMethod(ColorProcessingMethod colorProcessor)
static HairShaderDataSet Hair
static void TorchColor(int torchID, out float R, out float G, out float B)