Elin Decompiled Documentation EA 23.310 Nightly Patch 1
Loading...
Searching...
No Matches
BaseTileMap.cs
Go to the documentation of this file.
1using System;
2using NoiseSystem;
3using UnityEngine;
4
5public class BaseTileMap : EMono
6{
7 public enum WallClipMode
8 {
9 ByRoom,
10 ByLot
11 }
12
13 public enum InnerMode
14 {
15 None,
17 Height,
19 }
20
21 public enum CardIconMode
22 {
23 None,
24 Inspect,
26 State,
28 }
29
30 public enum ScreenHighlight
31 {
32 None,
33 SunMap
34 }
35
36 public static bool forceShowHang;
37
38 public int count;
39
40 [Header("Mouse Hit")]
41 public Collider2D mouseCollider;
42
43 public Vector3 colliderFix;
44
45 public int maxColliderCheck;
46
47 [Header("Height")]
48 public float heightBlockSize;
49
50 public float slopeFixZ;
51
52 public float heightModDeco;
53
54 public float heightLimitDeco;
55
56 public Vector3 heightMod;
57
58 public Vector3 ugFix;
59
60 public Vector3 ugFixBridge;
61
62 public Vector3 ugFixBridgeBottom;
63
64 public Vector3 ugFixBridgeTop;
65
66 public Vector3 heightModRoofBlock;
67
68 [Header("Room")]
69 public float rightWallShade;
70
71 public Vector3 roofRampFix;
72
73 public Vector3 roofFix;
74
75 public Vector3 roofFix2;
76
77 public Vector3 roofFix3;
78
79 public float roofLightMod;
80
81 public float lotLight;
82
83 public float lotLight2;
84
85 public float roofLightSnow;
86
87 [Header("Other")]
89
91
92 public Vector3 edgeBlockFix;
93
94 public Vector3 bridgeFix;
95
96 public Vector3 cornerWallFix;
97
98 public Vector3 cornerWallFix2;
99
100 public Vector3 cornerWallFix3;
101
102 public Vector3 altitudeFix;
103
104 public Vector3 waterEdgeFix;
105
106 public Vector3 waterEdgeBridgeFix;
107
108 public Vector3 waterEdgeFixShore;
109
110 public Vector3 waterEdgeFixShoreSand;
111
112 public Vector3[] ambientShadowFix;
113
114 public Vector3[] transitionFix;
115
116 public Vector3[] wallHangFix;
117
118 public Vector3[] waterEdgeBlockFix;
119
120 public int fogTile;
121
122 public float floatSpeed;
123
124 public float shadowModStrength;
125
126 public int maxFloat;
127
128 public int[] seaAnimeIndexes;
129
130 [Header("References")]
131 public NoiseLayer layerGroundLights;
132
134
136
138
140
142
144
146
148
150
152
154
156
158
160
162
164
166
168
170
172
174
176
178
180
182
184
186
188
190
192
194
196
198
200
202
204
206
208
210
212
214
216
218
220
222
224
226
228
230
231 public Point TestPoint = new Point();
232
234
235 [NonSerialized]
236 public int Size;
237
238 [NonSerialized]
239 public int SizeXZ;
240
241 [NonSerialized]
242 public int mx;
243
244 [NonSerialized]
245 public int mz;
246
247 [NonSerialized]
248 public int x;
249
250 [NonSerialized]
251 public int z;
252
253 [NonSerialized]
254 public int cx;
255
256 [NonSerialized]
257 public int cz;
258
259 [NonSerialized]
260 public int activeCount;
261
262 [NonSerialized]
263 public int floatV = 1;
264
265 [NonSerialized]
266 public byte[] groundLights;
267
268 [NonSerialized]
269 public bool lowBlock;
270
271 [NonSerialized]
272 public bool lowObj;
273
274 [NonSerialized]
275 public bool highlightArea;
276
277 [NonSerialized]
279
280 [NonSerialized]
281 public bool hideRoomFog;
282
283 [NonSerialized]
284 public bool showRoof;
285
286 [NonSerialized]
287 public bool showFullWall;
288
289 [NonSerialized]
290 public bool hideHang;
291
292 [NonSerialized]
293 public bool usingHouseBoard;
294
295 [NonSerialized]
296 public bool noRoofMode;
297
298 [NonSerialized]
299 public bool fogged;
300
301 [NonSerialized]
302 public int[] floatVs = new int[10] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
303
304 [NonSerialized]
305 public float[] lightLookUp;
306
307 [NonSerialized]
308 public float[] floatYs = new float[10] { 0f, 1f, 2f, 3f, 4f, 5f, 6f, 7f, 8f, 9f };
309
310 [NonSerialized]
311 public float _lightMod;
312
313 [NonSerialized]
314 public float _baseBrightness;
315
316 [NonSerialized]
317 public float lowblockTimer;
318
319 [NonSerialized]
320 public float heightLightMod;
321
322 [NonSerialized]
323 public float _rightWallShade;
324
325 [NonSerialized]
326 public float roofLightLimitMod;
327
328 [NonSerialized]
329 public float floatY;
330
331 [NonSerialized]
333
334 [NonSerialized]
335 public Vector3 _heightMod;
336
337 [NonSerialized]
339
340 protected RaycastHit2D[] rays = new RaycastHit2D[1];
341
343
344 protected bool isMining;
345
346 protected bool buildMode;
347
348 protected bool hasBridge;
349
350 protected bool _lowblock;
351
352 protected bool isIndoor;
353
355
356 protected Map map;
357
358 protected MeshPass pass;
359
361
363
365
366 protected int liquidLv;
367
368 protected int index;
369
370 protected int totalFire;
371
372 protected int snowColorToken;
373
374 protected int waterAnimeIndex;
375
376 protected int lowWallObjAltitude;
377
379
381
383
385
386 protected float blockLight;
387
388 protected float floorLight;
389
390 protected float floorLight2;
391
392 protected float light;
393
394 protected float pcMaxLight;
395
396 protected float orgX;
397
398 protected float orgY;
399
400 protected float orgZ;
401
402 protected float roomHeight;
403
404 protected float maxHeight;
405
406 protected float snowLight;
407
408 protected float waterAnimeTimer;
409
410 protected float floatTimer;
411
412 protected float destBrightness;
413
414 protected float lightLimit;
415
416 protected float modSublight1;
417
418 protected float modSublight2;
419
420 protected float shadowStrength;
421
422 protected float _shadowStrength;
423
424 protected float fogBrightness;
425
426 protected float defaultBlockHeight;
427
428 protected float snowLimit;
429
430 protected float snowColor;
431
432 protected float snowColor2;
433
434 protected float nightRatio;
435
436 protected RenderParam param = new RenderParam();
437
438 protected MeshBatch batch;
439
440 protected Vector3 _actorPos;
441
442 protected Vector3 freePos;
443
444 protected int tile;
445
446 protected int floorMatColor;
447
448 protected int height;
449
450 protected int currentHeight;
451
452 protected int pcX;
453
454 protected int pcZ;
455
456 protected int floorDir;
457
458 protected bool roof;
459
460 protected bool isSeen;
461
462 protected bool showAllCards;
463
464 protected bool fogBounds;
465
466 protected bool snowed;
467
468 protected bool isSnowCovered;
469
470 protected bool highlightCells;
471
472 protected bool cinemaMode;
473
474 protected bool alwaysLowblock;
475
476 protected bool showBorder;
477
478 protected bool isUnderwater;
479
480 protected bool darkenOuter;
481
482 protected Vector3 thingPos;
483
484 protected Vector3 orgPos;
485
486 protected Cell cell;
487
489
491
493
495
497
498 protected Room currentRoom;
499
500 protected Room lastRoom;
501
502 protected Room room;
503
504 protected Lot currentLot;
505
507
509
511
512 private bool noSlopMode;
513
515
516 public const int DefColor = 104025;
517
518 public const int BlocklightToken = 262144;
519
520 public const int BlocklightMTP = 50;
521
523
524 public void OnActivate(BaseGameScreen _screen)
525 {
526 screen = _screen;
527 if (lightLookUp == null)
528 {
529 lightLookUp = new float[256];
530 for (int i = 0; i < 256; i++)
531 {
532 lightLookUp[i] = EMono.scene.profile.global.lightLookupCurve.Evaluate((float)i / 255f);
533 }
534 }
537 zSetting = renderSetting.zSetting;
538 RenderObject.syncList = EMono.scene.syncList;
539 RenderObject.altitudeFix = altitudeFix.y;
540 if (Rand.bytes == null)
541 {
542 Rand.InitBytes(1);
543 }
545 }
546
547 public virtual void Draw()
548 {
549 Zone zone = EMono._zone;
550 map = zone.map;
551 Size = map.Size;
552 SizeXZ = map.SizeXZ;
554 count = 0;
555 totalFire = 0;
556 pcX = EMono.pc.pos.x;
557 pcZ = EMono.pc.pos.z;
560 lightSetting = profile.light;
563 {
564 buildMode = false;
565 }
567 isMining = EMono.scene.actionMode == ActionMode.Mine;
572 subtleHighlightArea = EMono.scene.actionMode.AreaHihlight != 0 && (EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Build || EMono.scene.actionMode.AreaHihlight != AreaHighlightMode.Edit);
573 highlightArea = EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Edit || subtleHighlightArea;
575 _rightWallShade = (int)(50f * rightWallShade) * 262144;
578 showBorder = (EMono.core.config.game.showBorder == 1 && EMono._zone is Zone_Field && !EMono._zone.IsPlayerFaction) || (EMono.core.config.game.showBorder == 2 && !EMono._zone.map.IsIndoor && !EMono._zone.IsSkyLevel && !EMono._zone.IsRegion);
579 snowLimit = profile.global.snowLimit.Evaluate(EMono.scene.timeRatio);
580 snowLight = profile.global.snowLight;
581 snowColor = profile.global.snowColor;
582 snowColor2 = profile.global.snowColor2;
583 snowColorToken = (int)((float)profile.global.snowRGB.x * nightRatio) * 4096 + (int)((float)profile.global.snowRGB.y * nightRatio) * 64 + (int)((float)profile.global.snowRGB.z * nightRatio);
586 {
588 }
589 roofLightLimitMod = profile.global.roofLightLimitMod.Evaluate(EMono.scene.timeRatio);
590 fogBounds = (EMono._map.config.forceHideOutbounds && (!EMono.debug.godBuild || !buildMode)) || (EMono.core.config.game.dontRenderOutsideMap && !buildMode);
591 heightLightMod = ((EMono._map.config.heightLightMod == 0f) ? 0.005f : EMono._map.config.heightLightMod);
592 modSublight1 = profile.global.modSublight1;
593 modSublight2 = profile.global.modSublight2 * nightRatio;
594 pcMaxLight = EMono.player.lightPower * 2f * (float)(EMono.player.lightRadius - 2);
597 _lightMod = lightSetting.lightMod * lightSetting.lightModCurve.Evaluate(EMono.scene.timeRatio);
598 destBrightness = lightSetting.baseBrightness * lightSetting.baseBrightnessCurve.Evaluate(EMono.scene.timeRatio);
599 float num = destBrightness;
600 destBrightness = destBrightness * lightSetting.dynamicBrightnessCurve2.Evaluate(EMono.scene.timeRatio) + lightSetting.dynamicBrightnessCurve.Evaluate(EMono.scene.timeRatio) * (float)(int)EMono.pc.pos.cell.light + ((EMono.pc.pos.cell.light == 0) ? 0f : lightSetting.dynamicBrightnessLightBonus);
601 if (destBrightness > num)
602 {
603 destBrightness = num;
604 }
605 if (!Mathf.Approximately(_baseBrightness, destBrightness))
606 {
608 }
609 if (activeCount == 0)
610 {
612 }
613 activeCount++;
615 {
616 _baseBrightness = 0.7f;
617 }
618 Fov.nonGradientMod = profile.global.fovModNonGradient;
621 float num2 = Core.delta * (float)EMono.game.config.animeSpeed * 0.01f;
622 floatTimer += num2;
624 {
626 for (int i = 0; i < floatYs.Length; i++)
627 {
628 floatYs[i] += floatVs[i];
629 if (floatYs[i] >= (float)maxFloat)
630 {
631 floatVs[i] = -1;
632 }
633 if (floatYs[i] < 0f)
634 {
635 floatVs[i] = 1;
636 }
637 }
638 }
639 floatY = floatYs[0];
640 floatV = floatVs[0];
641 waterAnimeTimer += num2;
642 if (waterAnimeTimer > 0.5f)
643 {
644 waterAnimeTimer = 0f;
646 }
647 if (cinemaMode)
648 {
649 CinemaConfig cinemaConfig = EMono.player.cinemaConfig;
650 profile = ActionMode.Cinema.profile;
651 lightSetting = profile.light;
653 _lightMod += lightSetting.lightMod * lightSetting.lightModCurve.Evaluate(EMono.scene.timeRatio) * (0.01f * (float)cinemaConfig.light);
654 destBrightness += 0.01f * (float)cinemaConfig.brightness;
655 EMono.scene.camSupport.grading.cinemaBrightness = 0.01f * (float)cinemaConfig.brightness;
656 EMono.scene.camSupport.grading.SetGrading();
657 heightLightMod = 0f;
658 }
659 map.rooms.Refresh();
664 {
667 }
668 else
669 {
670 currentHeight = 0;
671 currentRoom = null;
672 }
673 lowObj = false;
675 noRoofMode = false;
676 bool flag = !isIndoor || EMono._zone is Zone_Tent;
678 {
679 flag = !flag;
680 }
682 {
683 lowBlock = (hideRoomFog = (hideHang = false));
684 showRoof = (showFullWall = flag);
686 {
687 fogBounds = false;
688 }
689 }
690 else if (buildMode)
691 {
693 if (HitPoint.IsValid)
694 {
696 }
697 hideRoomFog = true;
702 if (cinemaMode)
703 {
705 }
706 }
707 else if (ActionMode.IsAdv)
708 {
709 noRoofMode = EMono.game.config.noRoof || screen.focusOption != null;
711 {
712 if (!EMono.pc.IsMoving)
713 {
714 lowblockTimer = 0.1f;
715 }
716 }
717 else if (!EInput.rightMouse.pressing)
718 {
719 lowblockTimer = 0f;
720 }
721 x = EMono.pc.pos.x;
722 z = EMono.pc.pos.z;
723 Room room = null;
724 if (room != null)
725 {
727 }
728 if (currentRoom != null)
729 {
730 currentRoom.data.visited = true;
731 }
732 if (room != null)
733 {
734 room.data.visited = true;
735 }
736 lowBlock = lowblockTimer > 0f;
737 hideRoomFog = currentRoom != null && (currentRoom.HasRoof || isIndoor);
738 if (hideRoomFog)
739 {
740 lowBlock = true;
741 }
742 if (noRoofMode && (currentRoom == null || currentRoom.lot.idRoofStyle == 0))
743 {
744 hideRoomFog = true;
745 showRoof = (showFullWall = false);
746 }
747 else
748 {
749 showRoof = (showFullWall = flag && !lowBlock && !hideRoomFog);
750 }
752 EMono.game.config.showRoof = !hideRoomFog;
753 if (forceShowHang)
754 {
755 hideHang = false;
756 forceShowHang = false;
757 }
758 }
759 else
760 {
761 lowBlock = (hideRoomFog = (hideHang = false));
762 showRoof = (showFullWall = true);
763 }
764 darkenOuter = !cinemaMode && !ActionMode.Bird.IsActive && !ActionMode.ViewMap.IsActive;
765 currentLot = currentRoom?.lot ?? null;
766 Vector3 mposWorld = EInput.mposWorld;
767 mposWorld.z = 0f;
768 Vector3Int vector3Int = screen.grid.WorldToCell(mposWorld);
769 mx = -vector3Int.y;
770 mz = vector3Int.x - 1;
771 HitPoint.Set(mx, mz);
772 bool isAltDown = EInput.isAltDown;
773 for (int num3 = maxColliderCheck + EMono.core.config.test.screenExtraHeight; num3 >= 0; num3--)
774 {
775 TestPoint.x = mx + num3;
776 TestPoint.z = mz - num3;
777 if (TestPoint.x >= 0 && TestPoint.x < Size && TestPoint.z >= 0 && TestPoint.z < Size)
778 {
779 mouseCollider.transform.position = (isAltDown ? TestPoint.Position(TestPoint.cell.height) : TestPoint.Position()) + colliderFix;
780 Physics2D.SyncTransforms();
781 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero, rays) > 0)
782 {
784 break;
785 }
786 }
787 TestPoint.x = mx + num3 - 1;
788 TestPoint.z = mz - num3;
789 if (TestPoint.x >= 0 && TestPoint.x < Size && TestPoint.z >= 0 && TestPoint.z < Size)
790 {
791 mouseCollider.transform.position = (isAltDown ? TestPoint.Position(TestPoint.cell.height) : TestPoint.Position()) + colliderFix;
792 Physics2D.SyncTransforms();
793 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero, rays) > 0)
794 {
796 break;
797 }
798 }
799 TestPoint.x = mx + num3;
800 TestPoint.z = mz - num3 + 1;
801 if (TestPoint.x >= 0 && TestPoint.x < Size && TestPoint.z >= 0 && TestPoint.z < Size)
802 {
803 mouseCollider.transform.position = (isAltDown ? TestPoint.Position(TestPoint.cell.height) : TestPoint.Position()) + colliderFix;
804 Physics2D.SyncTransforms();
805 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero, rays) > 0)
806 {
808 break;
809 }
810 }
811 }
812 HitPoint.Clamp();
813 bool flag2 = EMono._zone.UseFog && !EMono.scene.bg.wall;
814 for (z = 0; z < screen.height; z++)
815 {
816 for (x = 0; x < screen.width; x++)
817 {
818 cx = screen.scrollX - screen.scrollY + x - (z + 1) / 2;
819 cz = screen.scrollY + screen.scrollX + x + z / 2;
820 if (((cz < 0 && cx >= -cz && cx > 0 && cx < Size - cz) || (cx >= Size && cx < Size * 2 - cz - 1 && cz >= -cx && cz < Size - 1)) && EMono.scene.bg.wall)
821 {
822 param.x = (float)(cx + cz) * screen.tileAlign.x + edgeBlockFix.x;
823 param.y = (float)(cz - cx) * screen.tileAlign.y + edgeBlockFix.y;
824 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)z * edgeBlockFix.z;
825 blockLight = 10485760f;
826 pass = passInner;
828 batch.matrices[pass.idx].m03 = param.x;
829 batch.matrices[pass.idx].m13 = param.y;
830 batch.matrices[pass.idx].m23 = param.z;
831 batch.tiles[pass.idx] = 4 + ((cx >= Size) ? 1 : 0);
833 batch.matColors[pass.idx] = 104025f;
834 pass.idx++;
835 if (pass.idx == pass.batchSize)
836 {
837 pass.NextBatch();
838 }
839 }
840 else if (cx < 0 || cz < 0 || cx >= Size || cz >= Size)
841 {
842 if (flag2)
843 {
844 param.x = (float)(cx + cz) * screen.tileAlign.x;
845 param.y = (float)(cz - cx) * screen.tileAlign.y + (float)height * _heightMod.y;
846 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)height * _heightMod.z;
847 param.tile = 0f;
849 }
850 }
851 else
852 {
853 DrawTile();
854 }
855 }
856 }
857 if (showRoof)
858 {
859 foreach (Lot item in map.rooms.listLot)
860 {
861 if (item.sync)
862 {
863 DrawRoof(item);
864 item.sync = false;
865 item.light = 0f;
866 }
867 }
868 }
869 else
870 {
871 foreach (Lot item2 in map.rooms.listLot)
872 {
873 item2.sync = false;
874 item2.light = 0f;
875 }
876 }
877 EMono.scene.sfxFire.SetVolume(Mathf.Clamp(0.1f * (float)totalFire + ((totalFire != 0) ? 0.2f : 0f), 0f, 1f));
878 this.room = EMono.pc.pos.cell.room;
879 int valueOrDefault = (this.room?.lot?.idBGM).GetValueOrDefault();
880 if (valueOrDefault == 0)
881 {
882 goto IL_172c;
883 }
884 if (!(EMono.Sound.currentPlaylist != EMono.Sound.plLot))
885 {
886 BGMData data = EMono.Sound.plLot.list[0].data;
887 if ((object)data != null && data.id == valueOrDefault)
888 {
889 goto IL_172c;
890 }
891 }
892 goto IL_174b;
893 IL_1755:
894 if (this.room != lastRoom)
895 {
897 lastRoom = this.room;
898 }
899 SoundManager.bgmVolumeMod = ((!LayerDrama.maxBGMVolume && !EMono._map.IsIndoor && this.room != null && !this.room.data.atrium && this.room.HasRoof) ? (-0.6f) : 0f);
901 return;
902 IL_172c:
903 if (valueOrDefault == 0 && EMono.Sound.currentPlaylist == EMono.Sound.plLot)
904 {
905 goto IL_174b;
906 }
907 goto IL_1755;
908 IL_174b:
910 goto IL_1755;
911 }
912
913 public void RefreshHeight()
914 {
915 if (EMono.game != null)
916 {
917 float num = (noSlopMode ? 0f : ((float)EMono.game.config.slopeMod * 0.01f));
919 _heightMod.x = num;
920 _heightMod.y *= num;
921 _heightMod.z *= num;
922 }
923 }
924
925 public virtual void DrawTile()
926 {
927 count++;
928 index = cx + cz * Size;
929 this.cell = (param.cell = map.cells[cx, cz]);
930 detail = this.cell.detail;
931 isSeen = this.cell.isSeen;
932 this.room = this.cell.room;
933 roof = this.cell.HasRoof;
934 matBlock = this.cell.matBlock;
935 matDeco = this.cell.matDeco;
936 sourceBlock = this.cell.sourceBlock;
937 sourceDeco = this.cell.sourceDeco;
938 bool flag = this.cell.isFloating;
939 snowed = isSnowCovered && !roof && !this.cell.isClearSnow && !this.cell.isDeck && !flag;
941 floorDir = this.cell.floorDir;
942 if (snowed && !this.cell.sourceFloor.ignoreSnow)
943 {
944 if (this.cell.IsFloorWater)
945 {
947 matFloor = this.cell.matFloor;
948 }
949 else
950 {
951 if (this.cell.sourceObj.snowTile > 0)
952 {
954 floorDir = this.cell.sourceObj.snowTile - 1;
955 }
956 else if (index % 3 == 0 && Rand.bytes[index % Rand.MaxBytes] < 8 && !this.cell.HasObj && this.cell.FirstThing == null)
957 {
960 }
961 else
962 {
964 }
966 }
967 }
968 else
969 {
970 sourceFloor = this.cell.sourceFloor;
971 matFloor = this.cell.matFloor;
972 }
973 bool isWater = sourceFloor.tileType.IsWater;
974 light = (this.cell.pcSync ? this.cell.light : (this.cell.light / 3 * 2));
976 height = this.cell.height;
977 hasBridge = this.cell._bridge != 0;
979 if (hasBridge)
980 {
981 if (this.cell.bridgeHeight < currentHeight)
982 {
983 blockLight -= heightLightMod * (float)(currentHeight - this.cell.bridgeHeight);
984 }
985 if (snowed && !this.cell.sourceBridge.ignoreSnow)
986 {
987 if (this.cell.IsBridgeWater)
988 {
990 matBridge = this.cell.matBridge;
991 }
992 else
993 {
996 }
997 }
998 else
999 {
1000 sourceBridge = this.cell.sourceBridge;
1001 matBridge = this.cell.matBridge;
1002 }
1003 }
1004 else if (height < currentHeight)
1005 {
1007 }
1008 if (blockLight < 0f)
1009 {
1010 blockLight = 0f;
1011 }
1012 liquidLv = (param.liquidLv = ((!flag && !isUnderwater) ? (((this.cell.liquidLv + this.cell._bridge != 0) ? this.cell.sourceBridge.tileType.LiquidLV : sourceFloor.tileType.LiquidLV) * 10) : 0));
1013 if (this.cell.shore != 0 && liquidLv > 20)
1014 {
1015 liquidLv = (param.liquidLv = 20);
1016 }
1017 if (liquidLv > 99)
1018 {
1019 liquidLv = (param.liquidLv = 99);
1020 }
1021 CellEffect effect = this.cell.effect;
1022 if (effect != null && effect.IsFire)
1023 {
1024 blockLight += 0.2f;
1025 totalFire++;
1026 }
1027 if (blockLight > lightLimit)
1028 {
1030 }
1031 blockLight += shadowModStrength * (float)(int)this.cell.shadowMod * _heightMod.x * _shadowStrength;
1032 if (this.room != null)
1033 {
1034 this.room.lot.sync = true;
1035 if (this.room.lot.light < blockLight)
1036 {
1037 this.room.lot.light = blockLight;
1038 }
1039 }
1040 if (currentLot != null && currentLot.idRoofStyle != 0)
1041 {
1042 bool flag2 = this.cell.IsRoomEdge && (this.cell.Front.room?.lot == currentLot || this.cell.Right.room?.lot == currentLot || this.cell.FrontRight.room?.lot == currentLot);
1043 if (!buildMode)
1044 {
1045 if ((this.room != null && this.room.lot == currentLot) || flag2)
1046 {
1048 }
1049 else
1050 {
1051 blockLight += (isSnowCovered ? (-0.02f) : lotLight2);
1052 }
1053 }
1054 }
1055 if (this.cell.outOfBounds && darkenOuter)
1056 {
1057 blockLight -= 0.1f;
1058 if (fogBounds)
1059 {
1060 isSeen = false;
1061 }
1062 }
1064 param.color = (blockLight = (int)(blockLight * 50f) * 262144 + ((this.cell.lightR >= 64) ? 63 : this.cell.lightR) * 4096 + ((this.cell.lightG >= 64) ? 63 : this.cell.lightG) * 64 + ((this.cell.lightB >= 64) ? 63 : this.cell.lightB));
1065 if (snowed)
1066 {
1069 {
1071 }
1072 floorLight = (int)(floorLight * 50f) * 262144 + (int)((float)((this.cell.lightR >= 50) ? 50 : this.cell.lightR) * snowColor) * 4096 + (int)((float)((this.cell.lightG >= 50) ? 50 : this.cell.lightG) * snowColor) * 64 + (int)((float)((this.cell.lightB >= 50) ? 50 : this.cell.lightB) * snowColor) + snowColorToken;
1073 }
1074 else if (isSnowCovered && !roof)
1075 {
1076 floorLight = (int)(floorLight * 50f) * 262144 + (int)((float)((this.cell.lightR >= 50) ? 50 : this.cell.lightR) * snowColor2) * 4096 + (int)((float)((this.cell.lightG >= 50) ? 50 : this.cell.lightG) * snowColor2) * 64 + (int)((float)((this.cell.lightB >= 50) ? 50 : this.cell.lightB) * snowColor2) + snowColorToken;
1077 }
1078 else
1079 {
1081 }
1082 bool num = this.room != null && sourceBlock.tileType.CastShadowSelf && !this.cell.hasDoor;
1083 bool flag3 = this.room != null && showRoof && this.room.lot.idRoofStyle != 0 && !this.room.data.atrium && !sourceBlock.tileType.Invisible;
1084 if (flag3 && this.cell.hasDoor && this.cell.IsLotEdge)
1085 {
1086 flag3 = false;
1087 }
1088 if (num || !isSeen || flag3)
1089 {
1090 floorLight += -3145728f;
1091 }
1092 if (this.cell.isWatered && !snowed)
1093 {
1094 floorLight += -2359296f;
1095 }
1096 param.snow = false;
1097 param.x = (float)(cx + cz) * screen.tileAlign.x;
1098 param.y = (float)(cz - cx) * screen.tileAlign.y + (float)height * _heightMod.y;
1099 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)height * _heightMod.z;
1100 if (flag)
1101 {
1102 param.y += 0.01f * floatY;
1103 }
1104 if (detail != null)
1105 {
1106 TransAnime anime = detail.anime;
1107 if (anime != null && anime.animeBlock)
1108 {
1109 TransAnime anime2 = detail.anime;
1110 param.x += anime2.v.x;
1111 param.y += anime2.v.y;
1112 param.z += anime2.v.z;
1113 }
1114 if (detail.designation != null)
1115 {
1117 }
1118 }
1119 if (screenHighlight != 0 && screenHighlight == ScreenHighlight.SunMap && Map.sunMap.Contains(index))
1120 {
1122 }
1123 if (this.cell._roofBlock != 0 && (isSeen || !EMono._zone.UseFog) && showRoof && !lowBlock)
1124 {
1125 SourceBlock.Row row = Cell.blockList[this.cell._roofBlock];
1126 SourceMaterial.Row row2 = Cell.matList[this.cell._roofBlockMat];
1127 this.tileType = row.tileType;
1128 param.mat = row2;
1129 param.dir = this.cell._roofBlockDir % 4;
1130 param.snow = isSnowCovered && !this.cell.isClearSnow;
1131 orgX = param.x;
1132 orgY = param.y;
1133 orgZ = param.z;
1134 SetRoofHeight(param, this.cell, cx, cz, 0, this.cell._roofBlockDir / 4, this.tileType.IsWallOrFence ? param.dir : (-1));
1135 switch (this.tileType.blockRenderMode)
1136 {
1137 case BlockRenderMode.FullBlock:
1138 param.color -= (int)(_shadowStrength * 50f) * 262144;
1139 param.tile = row._tiles[param.dir % row._tiles.Length];
1140 param.matColor = ((row.colorMod == 0) ? 104025 : GetColorInt(ref row2.matColor, row.colorMod));
1141 row.renderData.Draw(param);
1142 break;
1143 case BlockRenderMode.WallOrFence:
1144 {
1145 _lowblock = true;
1146 int dir = param.dir;
1147 if (dir == 0 || dir == 2)
1148 {
1149 param.dir = 0;
1150 _sourceBlock = row;
1151 this.tileType = _sourceBlock.tileType;
1152 if (_sourceBlock.useAltColor)
1153 {
1154 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
1155 }
1156 else
1157 {
1158 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
1159 }
1160 param.tile = (tile = _sourceBlock._tiles[0] + ((_lowblock && !this.tileType.IsFence) ? 32 : 0));
1161 _sourceBlock.renderData.Draw(param);
1162 param.z -= 0.01f;
1163 }
1164 if (dir == 1 || dir == 2)
1165 {
1166 param.dir = 1;
1167 _sourceBlock = row;
1168 this.tileType = _sourceBlock.tileType;
1169 if (_sourceBlock.useAltColor)
1170 {
1171 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
1172 }
1173 else
1174 {
1175 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
1176 }
1177 param.tile = (tile = -_sourceBlock._tiles[0] + ((_lowblock && !this.tileType.IsFence) ? (-32) : 0));
1178 _sourceBlock.renderData.Draw(param);
1179 }
1180 break;
1181 }
1182 case BlockRenderMode.HalfBlock:
1183 _sourceBlock = ((row.id == 5) ? EMono.sources.blocks.rows[row2.defBlock] : row);
1184 param.tile = _sourceBlock._tiles[0];
1185 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref row2.matColor, _sourceBlock.colorMod));
1186 param.tile2 = _sourceBlock.sourceAutoFloor._tiles[0];
1187 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 : GetColorInt(ref row2.matColor, _sourceBlock.sourceAutoFloor.colorMod));
1188 row.renderData.Draw(param);
1189 break;
1190 case BlockRenderMode.Pillar:
1191 {
1192 RenderData renderData = row.renderData;
1193 param.tile = row._tiles[param.dir % row._tiles.Length];
1194 param.matColor = ((row.colorMod == 0) ? 104025 : GetColorInt(ref row2.matColor, row.colorMod));
1195 renderData.Draw(param);
1196 param.tile = renderData.idShadow;
1197 SourcePref shadowPref = renderData.shadowPref;
1198 int shadow2 = shadowPref.shadow;
1199 passShadow.AddShadow(param.x + renderData.offsetShadow.x, param.y + renderData.offsetShadow.y, param.z + renderData.offsetShadow.z, ShadowData.Instance.items[shadow2], shadowPref, 0, param.snow);
1200 break;
1201 }
1202 default:
1203 param.tile = row._tiles[param.dir % row._tiles.Length];
1204 param.matColor = ((row.colorMod == 0) ? 104025 : GetColorInt(ref row2.matColor, row.colorMod));
1205 row.renderData.Draw(param);
1206 break;
1207 }
1208 param.x = orgX;
1209 param.y = orgY;
1210 param.z = orgZ;
1211 param.color = blockLight;
1212 }
1213 fogged = false;
1214 bool flag4 = this.cell.isSurrounded && innerMode != 0 && sourceBlock.tileType.IsFullBlock;
1215 if (!(!isSeen || flag4))
1216 {
1217 goto IL_16c3;
1218 }
1219 bool isRoomEdge = this.cell.IsRoomEdge;
1220 orgY = param.y;
1221 orgZ = param.z;
1222 param.color = (int)(50f * (_baseBrightness + fogBrightness)) * 262144;
1223 param.matColor = 104025f;
1224 if (hasBridge)
1225 {
1226 param.y = (float)(cz - cx) * screen.tileAlign.y + (float)(int)this.cell.bridgeHeight * _heightMod.y + ugFixBridgeBottom.x;
1227 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(int)this.cell.bridgeHeight * _heightMod.z;
1228 }
1229 bool flag5 = (!isSeen && EMono._zone.UseFog) || flag4;
1230 if (flag5)
1231 {
1232 param.tile = 7f;
1234 param.tile = 0f;
1236 }
1237 else if (this.cell.HasFloodBlock && isRoomEdge)
1238 {
1239 param.tile = 9f;
1241 }
1242 else
1243 {
1244 param.tile = 8f;
1246 }
1247 if ((this.cell.isSlopeEdge || hasBridge) && (flag5 || !isRoomEdge))
1248 {
1249 float num2 = (float)(int)this.cell.TopHeight * _heightMod.y;
1250 param.tile = 0f;
1251 for (int i = 0; (float)i < num2 / heightBlockSize; i++)
1252 {
1253 param.y += ugFix.y;
1254 param.z += ugFix.z + slopeFixZ * (float)i;
1255 if (flag5)
1256 {
1258 }
1259 else
1260 {
1262 }
1263 }
1264 }
1265 param.y = orgY;
1266 param.z = orgZ;
1267 param.color = blockLight;
1268 if (flag5)
1269 {
1270 if (detail == null || !(EMono.pc.hasTelepathy || flag4))
1271 {
1272 return;
1273 }
1274 }
1275 else
1276 {
1277 if (isRoomEdge)
1278 {
1279 goto IL_16c3;
1280 }
1281 if (detail == null || !(EMono.pc.hasTelepathy || flag4))
1282 {
1283 if (noRoofMode || detail == null)
1284 {
1285 return;
1286 }
1287 fogged = true;
1288 }
1289 }
1290 goto IL_7dad;
1291 IL_7dad:
1292 if (detail.things.Count == 0 && detail.charas.Count == 0)
1293 {
1294 return;
1295 }
1296 int num3 = 0;
1297 thingPos.x = 0f;
1298 thingPos.y = 0f;
1299 thingPos.z = 0f;
1300 freePos.x = (freePos.y = (freePos.z = 0f));
1301 if (this.cell.HasRamp)
1302 {
1303 Vector3 rampFix = sourceBlock.tileType.GetRampFix(this.cell.blockDir);
1304 param.x += rampFix.x;
1305 param.y += rampFix.y;
1306 param.z += rampFix.z;
1307 freePos.x += rampFix.x;
1308 freePos.y += rampFix.y;
1309 freePos.z += rampFix.z;
1310 }
1311 param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight));
1312 orgPos.x = (orgX = param.x);
1313 orgPos.y = (orgY = param.y);
1314 orgPos.z = (orgZ = param.z);
1315 if (flag && liquidLv > 0)
1316 {
1317 if (liquidLv > 10)
1318 {
1319 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1320 }
1321 liquidLv -= (int)(floatY * 0.5f);
1322 param.liquidLv = liquidLv;
1324 }
1325 Thing thing = null;
1326 bool shadow = liquidLv == 0;
1327 float num4 = 0f;
1328 float num5 = 0f;
1329 float num6 = 0f;
1330 float num7 = 0f;
1331 bool flag6 = false;
1332 float num8 = 0f;
1333 bool flag7 = false;
1334 float num9 = 0f;
1335 if (detail.things.Count > 0 && isSeen)
1336 {
1337 _ = zSetting.max1;
1338 float num10 = 0f;
1339 for (int j = 0; j < detail.things.Count; j++)
1340 {
1341 Thing t = detail.things[j];
1342 if ((fogged && !t.isRoofItem) || ((t.isHidden || t.trait.HideInAdv || t.isMasked) && !EMono.scene.actionMode.ShowMaskedThings) || (t.isRoofItem && ((this.room == null && !sourceBlock.tileType.IsFullBlock && !EMono._zone.IsPCFaction && !buildMode) || (lowBlock && !showFullWall && this.room != null) || (noRoofMode && currentRoom == null))) || (flag3 && !t.isRoofItem))
1343 {
1344 continue;
1345 }
1347 bool isInstalled = t.IsInstalled;
1348 SourcePref pref = t.Pref;
1349 if (!isInstalled && t.category.tileDummy != 0)
1350 {
1352 }
1353 float num11 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height)));
1354 if (t.ignoreStackHeight)
1355 {
1356 thingPos.y -= num4;
1357 thingPos -= altitudeFix * num5;
1358 }
1359 shadow = thingPos.y < 0.16f && num9 < 0.16f;
1360 _ = pref.bypassShadow;
1361 param.shadowFix = 0f - thingPos.y;
1362 param.liquidLv = ((thingPos.y + (float)t.altitude < 0.1f) ? liquidLv : 0);
1363 if (t.isRoofItem)
1364 {
1365 param.snow = isSnowCovered && !this.cell.isClearSnow;
1366 SetRoofHeight(param, this.cell, cx, cz);
1367 _actorPos.x = param.x;
1368 _actorPos.y = param.y;
1369 _actorPos.z = param.z + num10;
1370 if (this.room != null)
1371 {
1372 param.color = GetRoofLight(this.room.lot);
1373 }
1374 shadow = false;
1375 param.liquidLv = 0;
1376 }
1377 else
1378 {
1379 param.snow = snowed;
1380 _actorPos.x = orgX + num7;
1381 _actorPos.y = orgY;
1382 _actorPos.z = orgZ + num10 + thingPos.z;
1383 if (tileType.CanStack || !isInstalled)
1384 {
1385 if (thing?.id != t.id)
1386 {
1387 _actorPos.x += thingPos.x;
1388 }
1389 _actorPos.y += thingPos.y;
1390 if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight))
1391 {
1392 thingPos.y -= num4;
1393 if (thing != null)
1394 {
1395 _actorPos.z -= 0.2f;
1396 thingPos.z -= 0.2f;
1397 }
1398 _actorPos.y -= num4;
1399 }
1400 _actorPos.z += renderSetting.thingZ + (float)j * -0.01f + zSetting.mod1 * thingPos.y;
1401 }
1402 if (isInstalled)
1403 {
1404 if (t.TileType.IsRamp)
1405 {
1406 Vector3 rampFix2 = t.TileType.GetRampFix(t.dir, pref);
1407 orgX += rampFix2.x;
1408 orgY += rampFix2.y;
1409 orgZ += rampFix2.z;
1410 freePos.x += rampFix2.x;
1411 freePos.y += rampFix2.y;
1412 freePos.z += rampFix2.z;
1413 if (!this.cell.IsTopWater || t.altitude > 0)
1414 {
1415 num9 += rampFix2.y;
1416 }
1417 liquidLv -= (int)(rampFix2.y * 150f);
1418 if (liquidLv < 0)
1419 {
1420 liquidLv = 0;
1421 }
1422 }
1423 else if (!flag7 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight)
1424 {
1425 orgY += num11 + (float)t.altitude * altitudeFix.y;
1426 orgZ += (float)t.altitude * altitudeFix.z;
1427 freePos.y += num11 + (float)t.altitude * altitudeFix.y;
1428 if (!this.cell.IsTopWater || t.altitude > 0)
1429 {
1430 num9 += num11 + (float)t.altitude * altitudeFix.y;
1431 }
1432 _actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
1433 _actorPos.z += pref.z;
1434 thingPos.z += pref.z;
1435 liquidLv -= (int)(num11 * 150f);
1436 if (liquidLv < 0)
1437 {
1438 liquidLv = 0;
1439 }
1440 }
1441 else
1442 {
1443 thingPos.y += num11;
1445 {
1446 if ((tileType != TileType.Illumination || !this.cell.HasObj) && !tileType.AlwaysShow)
1447 {
1449 {
1450 continue;
1451 }
1452 if (hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom)))
1453 {
1454 Room room = ((t.dir == 0) ? this.cell.Back.room : this.cell.Left.room);
1456 {
1457 if (room == null || !room.data.showWallItem)
1458 {
1459 continue;
1460 }
1461 }
1462 else if (t.altitude >= lowWallObjAltitude)
1463 {
1464 continue;
1465 }
1466 }
1467 }
1469 {
1470 flag6 = true;
1471 }
1473 shadow = false;
1474 param.liquidLv = 0;
1475 if (t.freePos)
1476 {
1477 _actorPos.x += t.fx;
1478 _actorPos.y += t.fy;
1479 }
1480 }
1481 else
1482 {
1483 thingPos.y += (float)t.altitude * altitudeFix.y;
1484 thingPos.z += (float)t.altitude * altitudeFix.z;
1485 }
1486 _actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
1487 _actorPos.z += pref.z;
1488 if (pref.height >= 0f)
1489 {
1490 thingPos.z += pref.z;
1491 }
1492 }
1493 if (!tileType.UseMountHeight && j > 10)
1494 {
1495 flag7 = true;
1496 }
1497 }
1498 else
1499 {
1500 thingPos.y += num11;
1501 _actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
1502 _actorPos.z += pref.z;
1503 thingPos.z += pref.z;
1504 }
1505 if (t.isFloating && isWater && !hasBridge && !flag)
1506 {
1507 flag = true;
1508 float num12 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
1509 orgY += 0.01f * floatY - num12;
1511 {
1512 num8 = num11;
1513 }
1514 _actorPos.y += 0.01f * floatY - num12;
1515 if (liquidLv > 10)
1516 {
1517 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1518 }
1519 liquidLv -= (int)(floatY * 0.5f);
1520 if (liquidLv < 0)
1521 {
1522 liquidLv = 0;
1523 }
1524 param.liquidLv = liquidLv;
1525 }
1526 num4 = num11;
1527 if (t.sourceCard.multisize && !t.trait.IsGround)
1528 {
1529 num10 += zSetting.multiZ;
1530 }
1531 orgZ += t.renderer.data.stackZ;
1532 if (param.liquidLv > 0)
1533 {
1534 param.liquidLv += pref.liquidMod;
1535 if (param.liquidLv < 1)
1536 {
1537 param.liquidLv = 1;
1538 }
1539 else if (param.liquidLv > 99 + pref.liquidModMax)
1540 {
1541 param.liquidLv = 99 + pref.liquidModMax;
1542 }
1543 }
1544 }
1545 if (!isInstalled || !tileType.UseMountHeight)
1546 {
1547 if (t.altitude != 0)
1548 {
1550 if (!t.isRoofItem)
1551 {
1552 num6 += (float)t.altitude;
1553 num5 = t.altitude;
1554 }
1555 }
1556 if (num6 >= 2f && ((this.cell.Back.room != null && this.cell.Back.IsRoomEdge) || (this.cell.Left.room != null && this.cell.Left.IsRoomEdge)) && hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom)))
1557 {
1558 continue;
1559 }
1560 if (t.freePos)
1561 {
1562 if (t.isRoofItem)
1563 {
1564 _actorPos.x += t.fx;
1565 _actorPos.y += t.fy - (float)t.altitude * altitudeFix.y;
1566 }
1567 else
1568 {
1569 _actorPos.x = orgX + t.fx - freePos.x;
1570 _actorPos.y = orgY + t.fy - freePos.y;
1571 }
1572 }
1573 if (t.trait is TraitDoor && (t.trait as TraitDoor).IsOpen())
1574 {
1575 _actorPos.z += -0.5f;
1576 }
1577 }
1578 if (!t.sourceCard.multisize || (t.pos.x == cx && t.pos.z == cz))
1579 {
1580 if (iconMode != 0)
1581 {
1582 int num13 = 0;
1583 switch (iconMode)
1584 {
1585 case CardIconMode.Visibility:
1586 if (t.isMasked)
1587 {
1588 num13 = 17;
1589 }
1590 break;
1591 case CardIconMode.State:
1592 if (t.placeState == PlaceState.installed)
1593 {
1594 num13 = 18;
1595 }
1596 break;
1597 case CardIconMode.Deconstruct:
1598 if (t.isDeconstructing)
1599 {
1600 num13 = 14;
1601 }
1602 break;
1603 }
1605 {
1606 num13 = 13;
1607 }
1608 if (num13 != 0)
1609 {
1610 passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num13);
1611 }
1612 }
1614 if (_lowblock && t.trait.UseLowblock && !this.cell.HasFullBlock)
1615 {
1616 param.tile += ((param.tile < 0f) ? (-64) : 64);
1617 }
1618 if (t.trait is TraitTrolley && EMono.pc.ai is AI_Trolley aI_Trolley && aI_Trolley.trolley.owner == t)
1619 {
1620 RenderParam _param = new RenderParam(param);
1621 EMono.core.actionsLateUpdate.Add(delegate
1622 {
1623 t.SetRenderParam(_param);
1624 _actorPos.x = EMono.pc.renderer.position.x;
1625 _actorPos.y = EMono.pc.renderer.position.y - pref.height;
1626 _actorPos.z = EMono.pc.renderer.position.z + 0.02f;
1627 t.renderer.Draw(_param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow));
1628 });
1629 }
1630 else
1631 {
1632 t.renderer.Draw(param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow));
1633 }
1634 }
1635 if (isInstalled)
1636 {
1637 num7 += pref.stackX * (float)((!t.flipX) ? 1 : (-1));
1638 }
1639 param.x = orgX;
1640 param.y = orgY;
1641 param.z = orgZ;
1642 param.color = floorLight;
1643 thing = t;
1644 if (pref.Float)
1645 {
1646 liquidLv = 0;
1647 }
1648 }
1649 }
1650 orgY += num8;
1651 if (detail.charas.Count <= 0)
1652 {
1653 return;
1654 }
1655 param.shadowFix = 0f - num9;
1656 param.color += 1310720f;
1657 float max = zSetting.max2;
1658 for (int k = 0; k < detail.charas.Count; k++)
1659 {
1660 Chara chara = detail.charas[k];
1661 if (chara.host != null)
1662 {
1663 continue;
1664 }
1665 if (chara != EMono.pc && chara != LayerDrama.alwaysVisible)
1666 {
1667 if (chara.mimicry != null && chara.mimicry.IsThing)
1668 {
1669 if (flag3 || fogged || !this.cell.isSeen)
1670 {
1671 continue;
1672 }
1673 }
1674 else if (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara)))
1675 {
1676 continue;
1677 }
1678 }
1679 _actorPos.x = orgX;
1680 _actorPos.y = orgY;
1681 _actorPos.z = orgZ;
1682 if (this.cell.IsBlocked && chara.IsAstralBody)
1683 {
1684 _actorPos.z += EMono.setting.render.astralBodyFixZ;
1685 }
1686 chara.SetRenderParam(param);
1687 _ = chara.IsAliveInCurrentZone;
1688 if (chara.isRestrained)
1689 {
1690 TraitShackle restrainer = chara.GetRestrainer();
1691 if (restrainer != null)
1692 {
1693 Vector3 getRestrainPos = restrainer.GetRestrainPos;
1694 if (getRestrainPos != default(Vector3))
1695 {
1696 Vector3 position = restrainer.owner.renderer.position;
1697 float defCharaHeight = EMono.setting.render.defCharaHeight;
1698 float num14 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.source.pref.height);
1699 _actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.owner.dir % 2 == 0) ? 1 : (-1));
1700 _actorPos.y = position.y + num14;
1701 _actorPos.z = position.z + getRestrainPos.z;
1702 param.liquidLv = 0;
1703 param.shadowFix = orgY - _actorPos.y;
1704 chara.renderer.SetFirst(first: true);
1705 chara.renderer.Draw(param, ref _actorPos, drawShadow: true);
1706 param.shadowFix = 0f;
1707 continue;
1708 }
1709 }
1710 }
1711 if (!chara.sourceCard.multisize || (chara.pos.x == cx && chara.pos.z == cz))
1712 {
1713 if (chara.IsDeadOrSleeping && chara.IsPCC)
1714 {
1715 float num15 = chara.renderer.data.size.y * 0.3f;
1716 if (thingPos.y > max)
1717 {
1718 thingPos.y = max;
1719 }
1720 float num16 = thingPos.y + num15;
1721 float num17 = (float)k * -0.01f;
1722 if (num16 > zSetting.thresh1)
1723 {
1724 num17 = zSetting.mod1;
1725 }
1726 _actorPos.x += thingPos.x;
1727 _actorPos.y += thingPos.y;
1728 _actorPos.z += renderSetting.laydownZ + num17;
1729 param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0);
1730 thingPos.y += num15 * 0.8f;
1731 chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
1732 }
1733 else
1734 {
1735 param.liquidLv = liquidLv;
1736 if (isUnderwater)
1737 {
1738 if (chara.Pref.FloatUnderwater)
1739 {
1740 float num18 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
1741 float num19 = floatYs[chara.uid % 10] + 10f + (float)(chara.uid % 30);
1742 orgY += 0.01f * num19 - num18;
1743 _actorPos.y += 0.01f * num19 - num18;
1744 param.shadowFix -= 0.01f * num19 - num18;
1745 }
1746 }
1747 else if (liquidLv > 0)
1748 {
1749 if (chara.Pref.Float && !flag && !hasBridge)
1750 {
1751 if (liquidLv > 20)
1752 {
1753 float num20 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
1754 orgY += 0.01f * floatY - num20;
1755 _actorPos.y += 0.01f * floatY - num20;
1756 int num21 = TileType.FloorWaterShallow.LiquidLV * 10;
1757 num21 -= (int)(floatY * 0.5f);
1758 param.liquidLv = num21;
1759 }
1760 else
1761 {
1762 param.liquidLv -= 20;
1763 }
1764 }
1765 param.liquidLv += chara.Pref.liquidMod;
1766 if (param.liquidLv < 1)
1767 {
1768 param.liquidLv = 1;
1769 }
1770 else if (param.liquidLv > 99 + chara.Pref.liquidModMax)
1771 {
1772 param.liquidLv = 99 + chara.Pref.liquidModMax;
1773 }
1774 }
1775 if (!chara.IsPC && EMono.pc.host != chara && !chara.renderer.IsMoving && detail.charas.Count > 1 && (detail.charas.Count != 2 || !detail.charas[0].IsDeadOrSleeping || !detail.charas[0].IsPCC))
1776 {
1777 _actorPos += renderSetting.charaPos[1 + ((num3 < 4) ? num3 : 3)];
1778 }
1779 _actorPos.z += 0.01f * (float)k + renderSetting.charaZ;
1780 num3++;
1781 if (flag6)
1782 {
1783 _actorPos.z += chara.renderer.data.hangedFixZ;
1784 }
1785 chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
1786 }
1787 }
1788 param.x = orgX;
1789 param.y = orgY;
1790 param.z = orgZ;
1791 }
1792 return;
1793 IL_16c3:
1794 if (this.cell.isSlopeEdge)
1795 {
1796 float num22 = (float)height * _heightMod.y;
1797 orgY = param.y;
1798 orgZ = param.z;
1799 param.dir = this.cell.blockDir;
1800 if (snowed)
1801 {
1802 param.color = floorLight;
1803 }
1804 SourceBlock.Row defBlock;
1805 if (sourceBlock.tileType.IsFullBlock)
1806 {
1807 defBlock = sourceBlock;
1808 param.mat = matBlock;
1809 param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
1810 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
1811 }
1812 else
1813 {
1814 defBlock = sourceFloor._defBlock;
1815 param.mat = matFloor;
1816 param.tile = defBlock._tiles[this.cell.blockDir % defBlock._tiles.Length];
1817 if (defBlock.id != 1)
1818 {
1819 param.matColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
1820 }
1821 else
1822 {
1823 param.matColor = 104025f;
1824 }
1825 }
1826 for (int l = 0; (float)l < num22 / heightBlockSize; l++)
1827 {
1828 param.y += ugFix.y;
1829 param.z += ugFix.z + slopeFixZ * (float)l;
1830 defBlock.renderData.Draw(param);
1831 if (this.cell.pcSync && EMono.player.lightPower > 0f)
1832 {
1833 float num23 = param.tile;
1834 param.tile = 0f;
1836 param.tile = num23;
1837 }
1838 }
1839 param.y = orgY;
1840 param.z = orgZ;
1841 }
1842 param.color = floorLight;
1843 if (!isWater && (this.cell.Front.sourceFloor.tileType.IsWater || this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
1844 {
1845 orgY = param.y;
1846 orgZ = param.z;
1847 int num24 = 0;
1848 if (sourceBlock.tileType.IsFullBlock)
1849 {
1851 num24 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
1852 }
1853 else
1854 {
1855 SourceBlock.Row row3 = sourceFloor._defBlock;
1856 num24 = row3._tiles[this.cell.blockDir % row3._tiles.Length];
1857 }
1858 if (((this.cell.Front.shore / 12) & 1) == 0 && this.cell.Front.sourceFloor.tileType.IsWater && this.cell.Front.height <= height && this.cell.Front.sourceBlock.tileType.RenderWaterBlock)
1859 {
1860 param.y = (float)(cz - cx) * screen.tileAlign.y - (this.cell.Front.sourceFloor.tileType.IsDeepWater ? 0.6f : 0.4f) + (float)(int)this.cell.Front.height * _heightMod.y;
1861 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z;
1862 param.tile = num24 + ((!this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
1864 }
1865 if (((this.cell.Right.shore / 12) & 8) == 0 && this.cell.Right.sourceFloor.tileType.IsWater && this.cell.Right.height <= height && this.cell.Right.sourceBlock.tileType.RenderWaterBlock)
1866 {
1867 param.y = (float)(cz - cx) * screen.tileAlign.y - (this.cell.Right.sourceFloor.tileType.IsDeepWater ? 0.6f : 0.4f) + (float)(int)this.cell.Right.height * _heightMod.y;
1868 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z;
1869 param.tile = num24 + ((!this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
1871 }
1872 param.y = orgY;
1873 param.z = orgZ;
1874 }
1875 if (showBorder && !this.cell.outOfBounds)
1876 {
1877 param.matColor = 104025f;
1878 if (cx == EMono._map.bounds.x)
1879 {
1880 renderBorder.Draw(param, 12 + (EMono.world.date.IsNight ? 4 : 0));
1881 }
1882 else if (cx == EMono._map.bounds.maxX)
1883 {
1884 renderBorder.Draw(param, 13 + (EMono.world.date.IsNight ? 4 : 0));
1885 }
1886 if (cz == EMono._map.bounds.z)
1887 {
1888 renderBorder.Draw(param, 14 + (EMono.world.date.IsNight ? 4 : 0));
1889 }
1890 else if (cz == EMono._map.bounds.maxZ)
1891 {
1892 renderBorder.Draw(param, 15 + (EMono.world.date.IsNight ? 4 : 0));
1893 }
1894 }
1895 if (this.cell.isSkyFloor || (detail != null && detail.anime != null && detail.anime.drawBlock))
1896 {
1897 orgY = param.y;
1898 orgZ = param.z;
1899 SourceBlock.Row defBlock2 = sourceFloor._defBlock;
1900 param.mat = matFloor;
1901 param.tile = defBlock2._tiles[this.cell.blockDir % defBlock2._tiles.Length];
1902 if (defBlock2.id != 1)
1903 {
1904 param.matColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
1905 }
1906 else
1907 {
1908 param.matColor = 104025f;
1909 }
1910 for (int m = 0; m < ((!this.cell.isSkyFloor) ? 1 : EMono._map.config.skyBlockHeight); m++)
1911 {
1912 param.y += ugFix.y;
1913 param.z += ugFix.z + slopeFixZ * (float)m;
1914 defBlock2.renderData.Draw(param);
1915 }
1916 param.y = orgY;
1917 param.z = orgZ;
1918 }
1919 if (!sourceFloor.tileType.IsSkipFloor)
1920 {
1921 if ((hasBridge && sourceBridge.tileType.CastShadowSelf) || this.cell.castFloorShadow)
1922 {
1923 floorLight2 = _lightMod * light * 0.2f + _baseBrightness + _shadowStrength * floorShadowStrength * (isWater ? 0.7f : (hasBridge ? 1f : (0.6f * (1f - nightRatio))));
1924 if (snowed)
1925 {
1926 floorLight2 = (int)((double)floorLight2 * 0.85 * 50.0) * 262144 + snowColorToken;
1927 }
1928 else
1929 {
1930 floorLight2 = (int)(floorLight2 * 50f) * 262144 + ((this.cell.lightR >= 64) ? 63 : this.cell.lightR) * 4096 + ((this.cell.lightG >= 64) ? 63 : this.cell.lightG) * 64 + ((this.cell.lightB >= 64) ? 63 : this.cell.lightB);
1931 }
1932 param.color = floorLight2;
1933 if (this.cell.lotShade)
1934 {
1936 }
1937 }
1938 floorMatColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
1939 if (isWater && flag)
1940 {
1941 param.y -= 0.01f * floatY;
1942 }
1943 if (!sourceBlock.tileType.IsSkipFloor || sourceBlock.transparent || hasBridge || this.cell.hasDoor || this.cell.skipRender)
1944 {
1945 param.mat = matFloor;
1946 param.tile = sourceFloor._tiles[floorDir % sourceFloor._tiles.Length];
1947 param.matColor = floorMatColor;
1948 param.snow = snowed;
1949 if (sourceFloor.anime.Length != 0)
1950 {
1951 int num25 = (int)(Time.realtimeSinceStartup * 1000f / (float)sourceFloor.anime[1] % (float)sourceFloor.anime[0]);
1952 param.tile += num25;
1953 }
1954 if (this.cell.isDeck)
1955 {
1956 param.z += 1f;
1957 if ((bool)sourceFloor.renderData.subData)
1958 {
1959 sourceFloor.renderData.subData.Draw(param);
1960 }
1961 sourceFloor.renderData.Draw(param);
1962 param.z -= 1f;
1963 }
1964 else
1965 {
1966 if ((bool)sourceFloor.renderData.subData)
1967 {
1968 sourceFloor.renderData.subData.Draw(param);
1969 }
1970 sourceFloor.renderData.Draw(param);
1971 }
1972 int num26 = 0;
1973 if (isSnowCovered && sourceFloor == FLOOR.sourceSnow && !this.cell.hasDoor)
1974 {
1975 if (!this.cell.Right.IsSnowTile && this.cell.Right.topHeight == this.cell.topHeight)
1976 {
1977 num26++;
1978 }
1979 if (!this.cell.Front.IsSnowTile && this.cell.Front.topHeight == this.cell.topHeight)
1980 {
1981 num26 += 2;
1982 }
1983 if (num26 != 0)
1984 {
1985 param.tile = 448 + num26 + 12;
1986 param.z -= 0.1f;
1987 sourceFloor.renderData.Draw(param);
1988 param.z += 0.1f;
1989 }
1990 }
1991 if (this.cell.shadow != 0 && !hasBridge && !this.cell.skipRender)
1992 {
1993 if (snowed)
1994 {
1996 {
1997 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
1998 param.z -= 0.01f;
1999 sourceFloor.renderData.Draw(param);
2000 }
2001 }
2002 else
2003 {
2004 pass = passEdge;
2006 batch.matrices[pass.idx].m03 = param.x + ambientShadowFix[this.cell.shadow].x;
2007 batch.matrices[pass.idx].m13 = param.y + ambientShadowFix[this.cell.shadow].y;
2008 batch.matrices[pass.idx].m23 = param.z + ambientShadowFix[this.cell.shadow].z;
2009 batch.tiles[pass.idx] = 448 + this.cell.shadow;
2011 batch.matColors[pass.idx] = 104025f;
2012 pass.idx++;
2013 if (pass.idx == pass.batchSize)
2014 {
2015 pass.NextBatch();
2016 }
2017 }
2018 if (!sourceFloor.ignoreTransition && !snowed)
2019 {
2020 Cell back = this.cell.Back;
2021 if (back.sourceBlock.transition[0] != -1 && back.isSeen && !back.hasDoor)
2022 {
2023 pass = passFloor;
2025 batch.matrices[pass.idx].m03 = param.x + transitionFix[0].x;
2026 batch.matrices[pass.idx].m13 = param.y + transitionFix[0].y;
2027 batch.matrices[pass.idx].m23 = param.z + transitionFix[0].z;
2028 batch.tiles[pass.idx] = 480 + back.sourceBlock.transition[0] + Rand.bytes[index % Rand.MaxBytes] % back.sourceBlock.transition[1];
2030 batch.matColors[pass.idx] = GetColorInt(ref back.matBlock.matColor, back.sourceBlock.colorMod);
2031 pass.idx++;
2032 if (pass.idx == pass.batchSize)
2033 {
2034 pass.NextBatch();
2035 }
2036 }
2037 back = this.cell.Left;
2038 if (back.sourceBlock.transition[0] != -1 && back.isSeen && !back.hasDoor)
2039 {
2040 pass = passFloor;
2042 batch.matrices[pass.idx].m03 = param.x + transitionFix[1].x;
2043 batch.matrices[pass.idx].m13 = param.y + transitionFix[1].y;
2044 batch.matrices[pass.idx].m23 = param.z + transitionFix[1].z;
2045 batch.tiles[pass.idx] = 512 + back.sourceBlock.transition[0] + Rand.bytes[index % Rand.MaxBytes] % back.sourceBlock.transition[1];
2047 batch.matColors[pass.idx] = GetColorInt(ref back.matBlock.matColor, back.sourceBlock.colorMod);
2048 pass.idx++;
2049 if (pass.idx == pass.batchSize)
2050 {
2051 pass.NextBatch();
2052 }
2053 }
2054 }
2055 }
2056 if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num26 == 0)
2057 {
2058 pass = (isWater ? passAutoTileWater : passAutoTile);
2060 batch.matrices[pass.idx].m03 = param.x;
2061 batch.matrices[pass.idx].m13 = param.y;
2062 batch.matrices[pass.idx].m23 = param.z + ((hasBridge || this.cell._block != 0) ? 0.8f : 0f);
2063 batch.tiles[pass.idx] = (26 + sourceFloor.autotile / 2) * 32 + sourceFloor.autotile % 2 * 16 + this.cell.autotile;
2064 batch.colors[pass.idx] = param.color + (float)((int)(sourceFloor.autotileBrightness * 100f) * 262144);
2066 pass.idx++;
2067 if (pass.idx == pass.batchSize)
2068 {
2069 pass.NextBatch();
2070 }
2071 }
2072 }
2073 if (isWater)
2074 {
2075 int num27 = 12;
2076 int num28 = this.cell.shore / num27;
2077 int num29 = this.cell.shore % num27;
2078 bool isShoreSand = this.cell.isShoreSand;
2079 if (this.cell.shore != 0)
2080 {
2081 Cell cell = ((((uint)num28 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num28 & 2u) != 0) ? this.cell.Right : ((((uint)num28 & 4u) != 0) ? this.cell.Front : this.cell.Left)));
2082 if (isShoreSand && !cell.sourceFloor.isBeach)
2083 {
2084 cell = ((((uint)num28 & 8u) != 0) ? this.cell.Left : ((((uint)num28 & 4u) != 0) ? this.cell.Front : ((((uint)num28 & 2u) != 0) ? this.cell.Right : this.cell.Back)));
2085 }
2086 if (!cell.IsSnowTile)
2087 {
2088 param.matColor = GetColorInt(ref cell.matFloor.matColor, cell.sourceFloor.colorMod);
2089 if (isShoreSand)
2090 {
2091 pass = passShore;
2093 batch.matrices[pass.idx].m03 = param.x;
2094 batch.matrices[pass.idx].m13 = param.y;
2095 batch.matrices[pass.idx].m23 = param.z;
2096 batch.tiles[pass.idx] = 768 + this.cell.shore / num27;
2099 pass.idx++;
2100 if (pass.idx == pass.batchSize)
2101 {
2102 pass.NextBatch();
2103 }
2104 num29 = 2;
2105 }
2106 else
2107 {
2108 num29 = cell.sourceFloor.edge;
2109 }
2110 param.tile = (24 + num29 / 2) * 32 + num29 % 2 * 16 + num28;
2112 }
2113 }
2114 if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num27) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num27) & (true ? 1u : 0u)) != 0)
2115 {
2116 param.tile = 785f;
2117 param.matColor = GetColorInt(ref this.cell.BackLeft.matFloor.matColor, this.cell.BackLeft.sourceFloor.colorMod);
2119 Draw(60);
2120 }
2121 if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num27) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num27) & (true ? 1u : 0u)) != 0)
2122 {
2123 param.tile = 786f;
2124 param.matColor = GetColorInt(ref this.cell.BackRight.matFloor.matColor, this.cell.BackRight.sourceFloor.colorMod);
2126 Draw(56);
2127 }
2128 if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num27) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num27) & 4u) != 0)
2129 {
2130 param.tile = 787f;
2131 param.matColor = GetColorInt(ref this.cell.FrontRight.matFloor.matColor, this.cell.FrontRight.sourceFloor.colorMod);
2133 Draw(48);
2134 }
2135 if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num27) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num27) & 4u) != 0)
2136 {
2137 param.tile = 788f;
2138 param.matColor = GetColorInt(ref this.cell.FrontLeft.matFloor.matColor, this.cell.FrontLeft.sourceFloor.colorMod);
2140 Draw(52);
2141 }
2142 if (this.cell._bridge != 0 && this.cell.isBridgeEdge && this.cell.bridgePillar != byte.MaxValue)
2143 {
2144 pass = passEdge;
2146 batch.matrices[pass.idx].m03 = param.x + waterEdgeBridgeFix.x;
2147 batch.matrices[pass.idx].m13 = param.y + waterEdgeBridgeFix.y;
2148 batch.matrices[pass.idx].m23 = param.z + waterEdgeBridgeFix.z;
2149 batch.tiles[pass.idx] = 616 + waterAnimeIndex % 4;
2151 batch.matColors[pass.idx] = 104025f;
2152 pass.idx++;
2153 if (pass.idx == pass.batchSize)
2154 {
2155 pass.NextBatch();
2156 }
2157 }
2158 bool flag8 = false;
2159 if (isShoreSand)
2160 {
2161 if (((uint)num28 & (true ? 1u : 0u)) != 0)
2162 {
2163 if (((uint)num28 & 8u) != 0)
2164 {
2165 if ((num28 & 2) == 0 && (num28 & 4) == 0)
2166 {
2167 Draw(16);
2168 }
2169 flag8 = true;
2170 }
2171 if (((uint)num28 & 2u) != 0)
2172 {
2173 if ((num28 & 8) == 0 && (num28 & 4) == 0)
2174 {
2175 Draw(20);
2176 }
2177 flag8 = true;
2178 }
2179 }
2180 if (((uint)num28 & 4u) != 0)
2181 {
2182 if (((uint)num28 & 8u) != 0)
2183 {
2184 if ((num28 & 2) == 0 && (num28 & 1) == 0)
2185 {
2186 Draw(24);
2187 }
2188 flag8 = true;
2189 }
2190 if (((uint)num28 & 2u) != 0)
2191 {
2192 if ((num28 & 8) == 0 && (num28 & 1) == 0)
2193 {
2194 Draw(28);
2195 }
2196 flag8 = true;
2197 }
2198 }
2199 if (!flag8)
2200 {
2201 if (!this.cell.Front.sourceFloor.tileType.IsWater && !this.cell.Front.isDeck)
2202 {
2203 Draw(8);
2204 }
2205 if (!this.cell.Right.sourceFloor.tileType.IsWater && !this.cell.Right.isDeck)
2206 {
2207 Draw(12);
2208 }
2209 }
2210 }
2211 if (!flag8)
2212 {
2213 if (!this.cell.Back.sourceFloor.tileType.IsWater && !this.cell.Back.isDeck)
2214 {
2215 pass = passEdge;
2217 batch.tiles[pass.idx] = 608 + waterAnimeIndex % 4;
2218 batch.matColors[pass.idx] = 104025f;
2219 if (((uint)(this.cell.shore / num27) & (true ? 1u : 0u)) != 0)
2220 {
2221 if (isShoreSand)
2222 {
2223 param.matColor = GetColorInt(ref this.cell.Back.matFloor.matColor, this.cell.Back.sourceFloor.colorMod);
2224 batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
2225 batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
2226 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
2229 }
2230 else
2231 {
2232 batch.matrices[pass.idx].m03 = param.x;
2233 batch.matrices[pass.idx].m13 = param.y;
2234 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShore.z;
2235 }
2236 }
2237 else
2238 {
2239 batch.matrices[pass.idx].m03 = param.x;
2240 batch.matrices[pass.idx].m13 = param.y;
2241 batch.matrices[pass.idx].m23 = param.z + waterEdgeFix.z;
2242 batch.tiles[pass.idx] += 12f;
2243 }
2245 pass.idx++;
2246 if (pass.idx == pass.batchSize)
2247 {
2248 pass.NextBatch();
2249 }
2250 }
2251 if (!this.cell.Left.sourceFloor.tileType.IsWater && !this.cell.Left.isDeck)
2252 {
2253 pass = passEdge;
2255 batch.tiles[pass.idx] = 612 + waterAnimeIndex % 4;
2256 batch.matColors[pass.idx] = 104025f;
2257 if (((uint)(this.cell.shore / num27) & 8u) != 0)
2258 {
2259 if (isShoreSand)
2260 {
2261 param.matColor = GetColorInt(ref this.cell.Left.matFloor.matColor, this.cell.Left.sourceFloor.colorMod);
2262 batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
2263 batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
2264 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
2267 }
2268 else
2269 {
2270 batch.matrices[pass.idx].m03 = param.x;
2271 batch.matrices[pass.idx].m13 = param.y;
2272 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShore.z;
2273 }
2274 }
2275 else
2276 {
2277 batch.matrices[pass.idx].m03 = param.x;
2278 batch.matrices[pass.idx].m13 = param.y;
2279 batch.matrices[pass.idx].m23 = param.z + waterEdgeFix.z;
2280 batch.tiles[pass.idx] += 12f;
2281 }
2283 pass.idx++;
2284 if (pass.idx == pass.batchSize)
2285 {
2286 pass.NextBatch();
2287 }
2288 }
2289 }
2290 if (flag)
2291 {
2292 param.y += 0.01f * floatY;
2293 }
2294 }
2295 if (flag)
2296 {
2297 param.z -= 1f;
2298 }
2299 }
2300 if (this.cell.skipRender)
2301 {
2302 if (this.cell.pcSync)
2303 {
2304 param.tile = 0f;
2306 }
2307 return;
2308 }
2309 if (hasBridge)
2310 {
2311 param.y = (float)(cz - cx) * screen.tileAlign.y + (float)(int)this.cell.bridgeHeight * _heightMod.y;
2312 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(int)this.cell.bridgeHeight * _heightMod.z;
2313 if (flag)
2314 {
2315 param.y += 0.01f * floatY;
2316 }
2317 param.color = floorLight;
2318 param.mat = matBridge;
2319 floorMatColor = ((sourceBridge.colorMod == 0) ? 104025 : GetColorInt(ref matBridge.matColor, sourceBridge.colorMod));
2320 param.dir = this.cell.floorDir;
2321 param.tile = sourceBridge._tiles[this.cell.floorDir % sourceBridge._tiles.Length];
2322 param.matColor = floorMatColor;
2323 sourceBridge.renderData.Draw(param);
2324 if (this.cell.autotileBridge != 0 && sourceBridge.autotile != 0)
2325 {
2328 batch.matrices[pass.idx].m03 = param.x;
2329 batch.matrices[pass.idx].m13 = param.y;
2330 batch.matrices[pass.idx].m23 = param.z + ((this.cell._block != 0) ? 0.8f : 0f);
2331 batch.tiles[pass.idx] = (26 + sourceBridge.autotile / 2) * 32 + sourceBridge.autotile % 2 * 16 + this.cell.autotileBridge;
2332 batch.colors[pass.idx] = param.color + (float)((int)(sourceBridge.autotileBrightness * 100f) * 262144);
2334 pass.idx++;
2335 if (pass.idx == pass.batchSize)
2336 {
2337 pass.NextBatch();
2338 }
2339 }
2340 if (this.cell.shadow != 0)
2341 {
2343 {
2344 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2345 param.z -= 0.01f;
2346 sourceBridge.renderData.Draw(param);
2347 }
2348 else
2349 {
2350 pass = passEdge;
2352 batch.matrices[pass.idx].m03 = param.x + ambientShadowFix[this.cell.shadow].x;
2353 batch.matrices[pass.idx].m13 = param.y + ambientShadowFix[this.cell.shadow].y;
2354 batch.matrices[pass.idx].m23 = param.z + ambientShadowFix[this.cell.shadow].z;
2355 batch.tiles[pass.idx] = 448 + this.cell.shadow;
2357 batch.matColors[pass.idx] = 104025f;
2358 pass.idx++;
2359 if (pass.idx == pass.batchSize)
2360 {
2361 pass.NextBatch();
2362 }
2363 }
2364 }
2365 if (this.cell.isBridgeEdge && this.cell.bridgeHeight - this.cell.height >= 3 && this.cell.bridgePillar != byte.MaxValue && !noSlopMode)
2366 {
2367 orgY = param.y;
2368 orgZ = param.z;
2369 param.y += bridgeFix.y;
2370 param.z += bridgeFix.z;
2371 param.dir = 0;
2372 SourceBlock.Row row4 = sourceBridge._bridgeBlock;
2373 float num30 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y;
2374 if (this.cell.sourceFloor.tileType == TileType.Sky)
2375 {
2376 num30 += (float)EMono._map.config.skyBlockHeight;
2377 }
2378 int num31 = (int)(num30 / heightBlockSize) + 2;
2379 if (this.cell.bridgePillar != 0)
2380 {
2381 row4 = EMono.sources.blocks.rows[this.cell.bridgePillar];
2382 param.tile = row4._tiles[0] + ((num31 == 2) ? 32 : 0);
2383 param.mat = ((sourceBridge.DefaultMaterial == row4.DefaultMaterial) ? sourceBridge.DefaultMaterial : row4.DefaultMaterial);
2384 param.matColor = ((row4.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, row4.colorMod));
2385 }
2386 else
2387 {
2388 param.mat = matBlock;
2389 param.tile = row4._tiles[0] + 32;
2390 param.matColor = ((row4.colorMod == 0) ? 104025 : GetColorInt(ref matBridge.matColor, row4.colorMod));
2391 }
2392 param.y += ugFixBridgeTop.y;
2393 param.z += ugFixBridgeTop.z;
2394 for (int n = 0; n < num31; n++)
2395 {
2396 if (n == num31 - 1)
2397 {
2398 param.y = (float)(cz - cx) * screen.tileAlign.y + (float)height * _heightMod.y + ugFixBridgeBottom.y;
2399 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)height * _heightMod.z + ugFixBridgeBottom.z;
2400 }
2401 else
2402 {
2403 param.y += ugFixBridge.y;
2404 param.z += ugFixBridge.z;
2405 }
2406 row4.renderData.Draw(param);
2407 }
2408 param.y = orgY;
2409 param.z = orgZ;
2410 }
2411 }
2412 if (this.cell._deco != 0)
2413 {
2414 param.mat = matFloor;
2415 param.matColor = ((sourceDeco.colorMod == 0) ? 104025 : GetColorInt(ref matDeco.matColor, sourceDeco.colorMod));
2416 param.snow = snowed;
2417 if (sourceDeco.autotile != 0)
2418 {
2419 if (this.cell.autotileDeco != 0)
2420 {
2421 param.tile = (26 + sourceDeco.autotile / 2) * 32 + sourceDeco.autotile % 2 * 16 + this.cell.autotileDeco;
2422 param.z += ((hasBridge || this.cell._block != 0) ? 0.8f : 0f);
2423 sourceDeco.renderData.Draw(param);
2424 param.z = orgZ;
2425 }
2426 }
2427 else
2428 {
2429 param.tile = sourceDeco._tiles[floorDir % sourceDeco._tiles.Length];
2430 sourceDeco.renderData.Draw(param);
2431 }
2432 }
2433 if (!buildMode && this.cell.highlight != 0)
2434 {
2435 if (this.cell._block != 0 && !this.cell.hasDoor)
2436 {
2437 screen.guide.DrawWall(this.cell.GetPoint(), EMono.Colors.blockColors.MapHighlight, useMarkerPass: true);
2438 }
2439 else
2440 {
2441 passGuideFloor.Add(this.cell.GetPoint(), (int)this.cell.highlight);
2442 }
2443 }
2444 param.color = blockLight;
2445 if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor) && (snowed || this.cell.isClearSnow) && (this.cell.Front.HasRoof || this.cell.Right.HasRoof))
2446 {
2447 snowed = false;
2448 }
2449 int num32 = 0;
2450 if (sourceBlock.id != 0)
2451 {
2452 this.tileType = sourceBlock.tileType;
2453 roomHeight = 0f;
2454 int blockDir = this.cell.blockDir;
2455 bool num33 = this.tileType.blockRenderMode == BlockRenderMode.Floor;
2456 bool flag9 = false;
2457 if (!num33)
2458 {
2459 switch (wallClipMode)
2460 {
2461 case WallClipMode.ByRoom:
2462 if (!this.tileType.RepeatBlock)
2463 {
2464 break;
2465 }
2466 if (currentRoom == null || showFullWall)
2467 {
2468 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
2470 }
2471 else if (this.room != this.cell.Front.room && (this.cell.Front.room == currentRoom || (this.room?.lot != currentLot && this.cell.Front.room?.lot == currentLot)))
2472 {
2473 this.room = this.cell.Front.room;
2474 _lowblock = !this.cell.Front.lotWall && !this.cell.Front.fullWall;
2475 }
2476 else if (this.room != this.cell.Right.room && (this.cell.Right.room == currentRoom || (this.room?.lot != currentLot && this.cell.Right.room?.lot == currentLot)))
2477 {
2478 this.room = this.cell.Right.room;
2479 _lowblock = !this.cell.Right.lotWall && !this.cell.Right.fullWall;
2480 }
2481 else if (this.tileType.IsFullBlock && this.room != this.cell.FrontRight.room && (this.cell.FrontRight.room == currentRoom || (this.room?.lot != currentLot && this.cell.FrontRight.room?.lot == currentLot)))
2482 {
2483 this.room = this.cell.FrontRight.room;
2484 _lowblock = !this.cell.FrontRight.lotWall && !this.cell.FrontRight.fullWall;
2485 }
2486 else
2487 {
2488 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
2489 _lowblock = true;
2490 if (!this.tileType.IsFullBlock)
2491 {
2492 if (this.cell.lotWall)
2493 {
2494 _lowblock = false;
2495 }
2496 else if (this.room == currentRoom)
2497 {
2498 _lowblock = !this.cell.fullWall;
2499 }
2500 }
2501 }
2502 flag9 = (this.room != null && this.room.data.atrium) || (this.cell.room != null && this.cell.room.data.atrium);
2503 if (flag9)
2504 {
2505 _lowblock = false;
2506 }
2507 if (this.room == null && alwaysLowblock)
2508 {
2509 _lowblock = true;
2510 roomHeight = 0f;
2511 }
2512 if (this.room != null)
2513 {
2514 maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)this.room.lot.mh * _heightMod.y;
2515 if (showRoof)
2516 {
2517 roomHeight = this.room.lot.realHeight;
2518 break;
2519 }
2520 if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock))
2521 {
2522 roomHeight = 0f;
2523 break;
2524 }
2525 int num34 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight);
2526 roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num34) ? this.room.lot.height : num34) + 0.01f * (float)this.room.lot.heightFix;
2527 }
2528 break;
2529 case WallClipMode.ByLot:
2530 if (defaultBlockHeight > 0f || isIndoor)
2531 {
2532 _lowblock = cx != 0 && cz != Size - 1 && ((!this.cell.Back.HasBlock && !this.cell.Back.isWallEdge) || (!this.cell.Left.HasBlock && !this.cell.Left.isWallEdge) || !this.cell.Back.Left.HasBlock);
2533 if (!_lowblock)
2534 {
2536 maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)(int)this.cell.TopHeight * _heightMod.y;
2537 }
2538 break;
2539 }
2540 if (showFullWall)
2541 {
2542 _lowblock = this.room != null;
2543 if (_lowblock)
2544 {
2545 if (this.cell.Back.IsRoomEdge && this.cell.Right.IsRoomEdge && this.cell.Back.room == null && this.cell.Right.room == null && this.cell.Right.Front.room?.lot == this.room?.lot)
2546 {
2547 _lowblock = false;
2548 }
2549 }
2550 else if (this.cell.Back.room != null && this.cell.Back.room.lot == (this.cell.Front.room ?? this.cell.Right.room)?.lot)
2551 {
2552 _lowblock = true;
2553 }
2554 }
2555 else
2556 {
2558 }
2559 if (this.tileType.RepeatBlock)
2560 {
2561 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
2562 if (this.room != null && (!noRoofMode || currentRoom != null) && (!showFullWall || currentRoom == null || this.room.lot == currentRoom.lot))
2563 {
2564 roomHeight = ((_lowblock && !this.tileType.ForceRpeatBlock) ? 0f : this.room.lot.realHeight);
2565 maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)this.room.lot.mh * _heightMod.y;
2566 }
2567 }
2568 break;
2569 }
2570 }
2571 if (!_lowblock && (double)roomHeight > 1.2 && this.tileType.RepeatBlock)
2572 {
2573 num32 = 1;
2574 }
2575 else if (lowBlock)
2576 {
2577 num32 = 2;
2578 }
2579 param.mat = matBlock;
2580 param.dir = this.cell.blockDir;
2581 param.snow = snowed;
2582 switch (this.tileType.blockRenderMode)
2583 {
2584 case BlockRenderMode.FullBlock:
2585 {
2586 bool invisible = sourceBlock.tileType.Invisible;
2587 if (invisible && (!buildMode || ActionMode.Cinema.IsActive))
2588 {
2589 break;
2590 }
2591 if (this.cell.isSurrounded)
2592 {
2593 switch (innerMode)
2594 {
2595 case InnerMode.InnerBlock:
2596 case InnerMode.BuildMode:
2598 param.color = (int)(50f * blockLight) * 262144;
2599 param.matColor = 104025f;
2600 param.tile = (buildMode ? 1 : 2) + ((_lowblock || defaultBlockHeight > 0f) ? 3000000 : 0);
2602 return;
2603 case InnerMode.None:
2604 case InnerMode.Height:
2605 param.color = blockLight;
2606 break;
2607 }
2608 }
2609 if (snowed)
2610 {
2611 param.color = floorLight;
2612 }
2613 param.color -= (int)(_shadowStrength * 0.8f * 50f) * 262144;
2614 if (currentRoom != null && !showFullWall)
2615 {
2616 _lowblock = true;
2617 roomHeight = 0f;
2618 if (this.cell.room != currentRoom && (this.cell.Front.room == currentRoom || this.cell.Right.room == currentRoom || this.cell.FrontRight.room == currentRoom) && (this.cell.Back.room != currentRoom || this.cell.Right.room != currentRoom) && (this.cell.Front.room != currentRoom || this.cell.Left.room != currentRoom))
2619 {
2620 _lowblock = false;
2621 }
2622 if (!_lowblock)
2623 {
2624 int num36 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight);
2625 roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num36) ? currentRoom.lot.height : num36) + 0.01f * (float)currentRoom.lot.heightFix;
2626 }
2627 }
2628 if (flag9)
2629 {
2630 _lowblock = (!this.cell.Front.HasFullBlock || !this.cell.Right.HasFullBlock) && (!this.cell.Front.HasFullBlock || !this.cell.Left.HasFullBlock) && (!this.cell.Back.HasFullBlock || !this.cell.Right.HasFullBlock) && (!this.cell.Back.HasFullBlock || !this.cell.Left.HasFullBlock);
2631 if (_lowblock)
2632 {
2633 roomHeight = 0f;
2634 }
2635 }
2636 if (invisible)
2637 {
2638 roomHeight = 0f;
2639 _lowblock = false;
2640 }
2641 if (this.cell.Things.Count > 0)
2642 {
2643 _lowblock = false;
2644 }
2645 param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + (_lowblock ? 3000000 : 0);
2646 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
2647 if (roomHeight == 0f)
2648 {
2649 if (!this.cell.hasDoor)
2650 {
2651 sourceBlock.renderData.Draw(param);
2652 }
2653 }
2654 else
2655 {
2656 sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0, isBlock: true);
2657 }
2658 Room room2 = this.cell.Front.room ?? this.cell.room;
2659 if (room2 == null && this.cell.Right.room != null)
2660 {
2661 room2 = this.cell.Right.room;
2662 }
2663 if (!invisible && room2 != null)
2664 {
2665 if (room2.lot.idDeco != 0 && !this.cell.hasDoor)
2666 {
2667 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco);
2668 param.matColor = room2.lot.colDeco;
2669 float y = param.y;
2670 param.y += (float)room2.lot.decoFix * 0.01f;
2672 param.y = y;
2673 }
2674 if (room2.lot.idDeco2 != 0 && roomHeight != 0f && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
2675 {
2676 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2);
2677 param.matColor = room2.lot.colDeco2;
2678 float y2 = param.y;
2679 float num37 = param.z;
2680 param.y += (float)room2.lot.decoFix2 * 0.01f;
2681 param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco;
2683 param.y = y2;
2684 param.z = num37;
2685 }
2686 }
2687 room2 = this.cell.Right.room ?? this.cell.room;
2688 if (room2 == null && this.cell.Front.room != null)
2689 {
2690 room2 = this.cell.Front.room;
2691 }
2692 if (!invisible && room2 != null)
2693 {
2694 if (room2.lot.idDeco != 0 && !this.cell.hasDoor)
2695 {
2696 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco) * -1;
2697 param.matColor = room2.lot.colDeco;
2698 float y3 = param.y;
2699 param.y += (float)room2.lot.decoFix * 0.01f;
2701 param.y = y3;
2702 }
2703 if (room2.lot.idDeco2 != 0 && roomHeight != 0f && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
2704 {
2705 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2) * -1;
2706 param.matColor = room2.lot.colDeco2;
2707 float y4 = param.y;
2708 float num38 = param.z;
2709 param.y += (float)room2.lot.decoFix2 * 0.01f;
2710 param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco;
2712 param.y = y4;
2713 param.z = num38;
2714 }
2715 }
2716 break;
2717 }
2718 case BlockRenderMode.WallOrFence:
2719 {
2721 {
2722 showFullWall = true;
2723 _lowblock = false;
2724 }
2725 orgY = param.y;
2726 orgZ = param.z;
2727 param.color = (this.tileType.IsFence ? (floorLight - (float)((int)(_shadowStrength * 0.8f * 50f) * 262144)) : blockLight);
2728 bool flag10 = blockDir == 1 || _lowblock || flag9;
2729 bool flag11 = blockDir == 0 || _lowblock || flag9;
2730 if (!showFullWall && currentRoom != null)
2731 {
2732 if (!flag10)
2733 {
2734 if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Front.room != currentRoom))
2735 {
2736 if (!this.cell.IsRoomEdge || (this.cell.Front.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
2737 {
2738 flag10 = true;
2739 }
2740 }
2741 else if ((!this.cell.Front.lotWall || this.cell.Front.room?.lot != currentLot) && this.cell.Front.room != currentRoom)
2742 {
2743 flag10 = true;
2744 }
2745 }
2746 if (!flag11)
2747 {
2748 if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Right.room != currentRoom))
2749 {
2750 if (!this.cell.IsRoomEdge || (this.cell.Right.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
2751 {
2752 flag11 = true;
2753 }
2754 }
2755 else if ((!this.cell.Right.lotWall || this.cell.Right.room?.lot != currentLot) && this.cell.Right.room != currentRoom)
2756 {
2757 flag11 = true;
2758 }
2759 }
2760 }
2761 if (blockDir == 0 || blockDir == 2)
2762 {
2763 param.dir = 0;
2764 Room room3 = this.cell.Front.room ?? this.cell.room;
2765 if (room3 != null && this.tileType.IsWall)
2766 {
2767 if (room3.lot.idDeco != 0 && !this.cell.hasDoor)
2768 {
2769 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco);
2770 param.matColor = room3.lot.colDeco;
2771 param.y += (float)room3.lot.decoFix * 0.01f;
2773 param.y = orgY;
2774 }
2775 if (room3.lot.idDeco2 != 0 && roomHeight != 0f && !flag10 && (float)room3.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
2776 {
2777 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco2);
2778 param.matColor = room3.lot.colDeco2;
2779 param.y += (float)room3.lot.decoFix2 * 0.01f;
2780 param.z += (float)room3.lot.decoFix2 * 0.01f * heightModDeco;
2782 param.y = orgY;
2783 param.z = orgZ;
2784 }
2785 }
2786 Cell left = this.cell.Left;
2787 if (blockDir == 2 && left.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
2788 {
2789 _sourceBlock = left.sourceBlock;
2790 param.mat = left.matBlock;
2791 }
2792 else
2793 {
2795 param.mat = matBlock;
2796 }
2797 this.tileType = _sourceBlock.tileType;
2798 param.tile = (tile = _sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock) ? 32 : 0));
2799 if (_sourceBlock.useAltColor)
2800 {
2801 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
2802 }
2803 else
2804 {
2805 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
2806 }
2807 if (roomHeight == 0f || flag10 || !this.tileType.RepeatBlock)
2808 {
2809 if (!this.cell.hasDoor)
2810 {
2811 _sourceBlock.renderData.Draw(param);
2812 }
2813 }
2814 else
2815 {
2816 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0);
2817 }
2818 param.z += cornerWallFix2.z;
2819 if ((blockDir == 2 || (this.cell.Front.HasWallOrFence && this.cell.Front.blockDir != 0)) != this.cell.isToggleWallPillar)
2820 {
2821 if (this.cell.Back.IsSnowTile && this.cell.Right.IsSnowTile)
2822 {
2823 param.snow = true;
2824 }
2825 param.tile = _sourceBlock._tiles[0] + ((flag10 && flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2826 if (roomHeight == 0f || !this.tileType.RepeatBlock || (flag10 && flag11 && !flag9))
2827 {
2828 _sourceBlock.renderData.Draw(param);
2829 }
2830 else
2831 {
2832 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
2833 }
2834 }
2835 if (!flag10 && !showRoof && this.cell.Left.HasWallOrFence && this.cell.Left.blockDir != 0 && !this.cell.Left.isToggleWallPillar)
2836 {
2837 orgX = param.x;
2838 param.tile = _sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2839 param.x += cornerWallFix3.x;
2840 param.y += cornerWallFix3.y;
2841 param.z += cornerWallFix3.z;
2842 if (!flag9 && (roomHeight == 0f || flag10))
2843 {
2844 _sourceBlock.renderData.Draw(param);
2845 }
2846 else
2847 {
2848 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
2849 }
2850 param.x = orgX;
2851 }
2852 else if (this.cell.FrontLeft.HasWallOrFence && this.cell.FrontLeft.blockDir != 0 && (!flag10 || !this.cell.Left.HasWall) && !this.cell.isToggleWallPillar)
2853 {
2854 orgX = param.x;
2855 param.tile = _sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2856 param.x += cornerWallFix.x;
2857 param.y += cornerWallFix.y;
2858 param.z += cornerWallFix.z;
2859 if (!flag9 && (roomHeight == 0f || flag10))
2860 {
2861 _sourceBlock.renderData.Draw(param);
2862 }
2863 else
2864 {
2865 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
2866 }
2867 param.x = orgX;
2868 }
2869 }
2870 if (blockDir == 1 || blockDir == 2)
2871 {
2872 param.y = orgY;
2873 param.z = orgZ;
2874 param.dir = 1;
2875 Room room4 = this.cell.Right.room ?? this.cell.room;
2876 if (room4 != null && this.tileType.IsWall)
2877 {
2878 if (room4.lot.idDeco != 0 && !this.cell.hasDoor)
2879 {
2880 param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room4.lot.idDeco);
2881 param.matColor = room4.lot.colDeco;
2882 param.y += (float)room4.lot.decoFix * 0.01f;
2884 param.y = orgY;
2885 }
2886 if (room4.lot.idDeco2 != 0 && roomHeight != 0f && !flag11 && (float)room4.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
2887 {
2888 param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room4.lot.idDeco2);
2889 param.matColor = room4.lot.colDeco2;
2890 param.y += (float)room4.lot.decoFix2 * 0.01f;
2891 param.z += (float)room4.lot.decoFix2 * 0.01f * heightModDeco;
2893 param.y = orgY;
2894 param.z = orgZ;
2895 }
2896 }
2897 if (blockDir == 2 && this.cell.room == null && this.cell.Right.room != null)
2898 {
2899 Room room5 = this.cell.Right.room;
2900 maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)room5.lot.mh * _heightMod.y;
2901 if (showRoof)
2902 {
2903 roomHeight = room5.lot.realHeight;
2904 }
2905 else if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock))
2906 {
2907 roomHeight = 0f;
2908 }
2909 else
2910 {
2911 int num39 = ((room5.data.maxHeight == 0) ? 2 : room5.data.maxHeight);
2912 roomHeight = EMono.setting.render.roomHeightMod * (float)((room5.lot.height < num39) ? room5.lot.height : num39) + 0.01f * (float)room5.lot.heightFix;
2913 }
2914 }
2915 Cell back2 = this.cell.Back;
2916 if (blockDir == 2 && back2.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
2917 {
2918 _sourceBlock = back2.sourceBlock;
2919 param.mat = back2.matBlock;
2920 }
2921 else
2922 {
2924 param.mat = matBlock;
2925 }
2926 this.tileType = _sourceBlock.tileType;
2927 param.tile = (tile = -_sourceBlock._tiles[0] + ((flag11 && this.tileType.UseLowBlock) ? (-32) : 0));
2928 if (_sourceBlock.useAltColor)
2929 {
2930 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
2931 }
2932 else
2933 {
2934 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
2935 }
2936 param.color += _rightWallShade;
2937 if (roomHeight == 0f || flag11 || !this.tileType.RepeatBlock)
2938 {
2939 if (!this.cell.hasDoor)
2940 {
2941 _sourceBlock.renderData.Draw(param);
2942 }
2943 }
2944 else
2945 {
2946 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0);
2947 }
2948 if ((this.cell.Right.HasWallOrFence && this.cell.Right.blockDir != 1) != this.cell.isToggleWallPillar && (blockDir != 2 || !this.cell.isToggleWallPillar))
2949 {
2950 if (this.cell.Left.IsSnowTile && this.cell.Front.IsSnowTile)
2951 {
2952 param.snow = true;
2953 }
2954 orgX = param.x;
2955 param.tile = _sourceBlock._tiles[0] + ((flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2956 if (!flag9 && (roomHeight == 0f || !this.tileType.RepeatBlock || flag11))
2957 {
2958 _sourceBlock.renderData.Draw(param);
2959 }
2960 else
2961 {
2962 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
2963 }
2964 param.x = orgX;
2965 }
2966 }
2967 param.y = orgY;
2968 param.z = orgZ;
2969 break;
2970 }
2971 case BlockRenderMode.HalfBlock:
2972 param.color = floorLight;
2973 _sourceBlock = ((sourceBlock.id == 5) ? EMono.sources.blocks.rows[matBlock.defBlock] : sourceBlock);
2974 param.tile = _sourceBlock._tiles[0];
2975 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.colorMod));
2976 param.tile2 = _sourceBlock.sourceAutoFloor._tiles[0];
2977 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.sourceAutoFloor.colorMod));
2978 sourceBlock.renderData.Draw(param);
2979 break;
2980 case BlockRenderMode.Pillar:
2981 {
2982 RenderData renderData2 = sourceBlock.renderData;
2983 param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
2984 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
2985 int num35 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1;
2986 if (num35 == 0)
2987 {
2988 renderData2.Draw(param);
2989 }
2990 else
2991 {
2992 renderData2.DrawRepeat(param, num35, sourceBlock.tileType.RepeatSize);
2993 }
2994 param.tile = renderData2.idShadow;
2995 SourcePref shadowPref2 = renderData2.shadowPref;
2996 int shadow3 = shadowPref2.shadow;
2997 passShadow.AddShadow(param.x + renderData2.offsetShadow.x, param.y + renderData2.offsetShadow.y, param.z + renderData2.offsetShadow.z, ShadowData.Instance.items[shadow3], shadowPref2, 0, param.snow);
2998 break;
2999 }
3000 case BlockRenderMode.Floor:
3001 param.color = floorLight;
3002 param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
3003 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
3004 sourceBlock.renderData.Draw(param);
3005 break;
3006 default:
3007 param.color = floorLight;
3008 param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + ((_lowblock && this.tileType.UseLowBlock) ? 3000000 : 0);
3009 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
3010 if (roomHeight == 0f)
3011 {
3012 sourceBlock.renderData.Draw(param);
3013 }
3014 else
3015 {
3016 sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock);
3017 }
3018 break;
3019 }
3020 }
3021 if (this.cell.pcSync && EMono.player.lightPower > 0f && !cinemaMode)
3022 {
3023 if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof)
3024 {
3025 goto IL_721c;
3026 }
3027 if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock)
3028 {
3029 Room obj = this.cell.FrontRight.room;
3030 if (obj == null || !obj.HasRoof)
3031 {
3032 goto IL_721c;
3033 }
3034 }
3035 }
3036 goto IL_727c;
3037 IL_721c:
3038 if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null)
3039 {
3040 param.tile = num32;
3042 }
3043 goto IL_727c;
3044 IL_727c:
3045 if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor) && !snowed && !this.cell.isClearSnow && ((!this.cell.Front.HasRoof && !this.cell.Front.HasBlock) || (!this.cell.Right.HasRoof && !this.cell.Right.HasBlock)))
3046 {
3047 snowed = true;
3048 }
3049 if (this.cell.effect != null)
3050 {
3051 if (this.cell.effect.IsLiquid)
3052 {
3053 SourceCellEffect.Row sourceEffect = this.cell.sourceEffect;
3054 SourceMaterial.Row defaultMaterial = sourceEffect.DefaultMaterial;
3055 tile = 4 + Rand.bytes[index % Rand.MaxBytes] % 4;
3056 param.tile = tile + this.cell.sourceEffect._tiles[0];
3057 param.mat = defaultMaterial;
3058 param.matColor = ((this.cell.effect.color == 0) ? GetColorInt(ref defaultMaterial.matColor, sourceEffect.colorMod) : this.cell.effect.color);
3059 sourceEffect.renderData.Draw(param);
3060 }
3061 else
3062 {
3063 param.tile = this.cell.effect.source._tiles[0];
3064 SourceCellEffect.Row sourceEffect2 = this.cell.sourceEffect;
3065 if (sourceEffect2.anime.Length != 0)
3066 {
3067 if (sourceEffect2.anime.Length > 2)
3068 {
3069 float num40 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2];
3070 if (!(num40 >= (float)sourceEffect2.anime[0]))
3071 {
3072 param.tile += num40;
3073 }
3074 }
3075 else
3076 {
3077 float num41 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0];
3078 param.tile += num41;
3079 }
3080 }
3081 if (this.cell.effect.IsFire)
3082 {
3084 }
3085 else
3086 {
3087 this.cell.effect.source.renderData.Draw(param);
3088 }
3089 }
3090 }
3091 param.color = floorLight;
3092 if (this.cell.critter != null)
3093 {
3094 Critter critter = this.cell.critter;
3095 int snowTile = critter.tile;
3096 if (snowed && critter.SnowTile != 0)
3097 {
3098 critter.x = 0.06f;
3099 critter.y = -0.06f;
3100 snowTile = critter.SnowTile;
3101 }
3102 else
3103 {
3104 critter.Update();
3105 }
3106 pass = passObjSS;
3108 batch.matrices[pass.idx].m03 = param.x + (float)(int)(critter.x * 100f) * 0.01f;
3109 batch.matrices[pass.idx].m13 = param.y + (float)(int)(critter.y * 100f) * 0.01f;
3110 batch.matrices[pass.idx].m23 = param.z;
3111 batch.tiles[pass.idx] = snowTile * ((!critter.reverse) ? 1 : (-1));
3113 pass.idx++;
3114 if (pass.idx == pass.batchSize)
3115 {
3116 pass.NextBatch();
3117 }
3118 }
3119 if (detail != null)
3120 {
3121 TransAnime anime3 = detail.anime;
3122 if (anime3 != null && !anime3.animeBlock)
3123 {
3124 TransAnime anime4 = detail.anime;
3125 param.x += anime4.v.x;
3126 param.y += anime4.v.y;
3127 param.z += anime4.v.z;
3128 }
3129 }
3130 if (this.cell.obj != 0 && !this.cell.sourceObj.renderData.SkipOnMap)
3131 {
3132 SourceObj.Row sourceObj = this.cell.sourceObj;
3133 if (!snowed || sourceObj.snowTile <= 0)
3134 {
3135 param.snow = snowed;
3136 param.mat = this.cell.matObj;
3137 orgY = param.y;
3138 if (param.liquidLv > 0)
3139 {
3140 if (sourceObj.pref.Float)
3141 {
3142 param.y += 0.01f * floatY;
3143 if (liquidLv > 10)
3144 {
3145 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
3146 }
3147 liquidLv -= (int)(floatY * 0.5f);
3148 param.liquidLv = liquidLv;
3149 }
3150 if (sourceObj.tileType.IsWaterTop)
3151 {
3152 param.liquidLv = 0;
3153 }
3154 else
3155 {
3156 param.liquidLv += sourceObj.pref.liquidMod;
3157 if (param.liquidLv < 1)
3158 {
3159 param.liquid = 1f;
3160 }
3161 else if (param.liquidLv > 99 + sourceObj.pref.liquidModMax)
3162 {
3163 param.liquidLv = 99 + sourceObj.pref.liquidModMax;
3164 }
3165 }
3166 }
3167 if (sourceObj.useAltColor)
3168 {
3169 param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, sourceObj.colorMod));
3170 }
3171 else
3172 {
3173 param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, sourceObj.colorMod));
3174 }
3175 if (sourceObj.HasGrowth)
3176 {
3177 this.cell.growth.OnRenderTileMap(param);
3178 }
3179 else
3180 {
3181 if (this.cell.autotileObj != 0)
3182 {
3183 param.tile = sourceObj._tiles[0] + this.cell.autotileObj;
3184 }
3185 else if (sourceObj.tileType.IsUseBlockDir)
3186 {
3187 param.tile = sourceObj._tiles[this.cell.blockDir % sourceObj._tiles.Length];
3188 }
3189 else
3190 {
3191 param.tile = sourceObj._tiles[this.cell.objDir % sourceObj._tiles.Length];
3192 }
3193 if (_lowblock && sourceObj.tileType.IsSkipLowBlock)
3194 {
3195 param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
3196 }
3197 orgY = param.y;
3198 orgZ = param.z;
3199 param.y += sourceObj.pref.y;
3200 param.z += sourceObj.pref.z;
3201 sourceObj.renderData.Draw(param);
3202 param.y = orgY;
3203 param.z = orgZ;
3204 int shadow4 = sourceObj.pref.shadow;
3205 if (shadow4 > 1 && !this.cell.ignoreObjShadow)
3206 {
3207 passShadow.AddShadow(param.x + sourceObj.renderData.offsetShadow.x, param.y + sourceObj.renderData.offsetShadow.y, param.z + sourceObj.renderData.offsetShadow.z, ShadowData.Instance.items[shadow4], sourceObj.pref, 0, param.snow);
3208 }
3209 param.y = orgY;
3210 }
3211 }
3212 }
3213 if (this.cell.decal != 0 && sourceFloor.tileType.AllowBlood)
3214 {
3215 passDecal.Add(param, (int)this.cell.decal, floorLight);
3216 }
3217 if (highlightCells)
3218 {
3219 switch (ActionMode.FlagCell.mode)
3220 {
3221 case AM_FlagCell.Mode.flagWallPillar:
3222 if (this.cell.isToggleWallPillar)
3223 {
3224 passArea.Add(param, 34f, 0f);
3225 }
3226 break;
3227 case AM_FlagCell.Mode.flagSnow:
3228 if (this.cell.isClearSnow)
3229 {
3230 passArea.Add(param, 34f, 0f);
3231 }
3232 break;
3233 case AM_FlagCell.Mode.flagFloat:
3234 if (this.cell.isForceFloat)
3235 {
3236 passArea.Add(param, 34f, 0f);
3237 }
3238 break;
3239 case AM_FlagCell.Mode.flagClear:
3240 if (this.cell.isClearArea)
3241 {
3242 passArea.Add(param, 34f, 0f);
3243 }
3244 break;
3245 }
3246 }
3247 if (detail == null)
3248 {
3249 return;
3250 }
3251 if (highlightArea && detail.area != null)
3252 {
3253 passArea.Add(param, (int)detail.area.GetTile(index) - ((!subtleHighlightArea) ? 1 : 0), 0f);
3254 }
3255 if (detail.footmark != null && sourceFloor.id != 0)
3256 {
3257 param.tile = detail.footmark.tile;
3258 param.mat = matFloor;
3259 param.matColor = 104025f;
3261 }
3262 goto IL_7dad;
3263 void Draw(int tile)
3264 {
3265 pass = passEdge;
3268 batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
3269 batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
3270 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
3273 pass.idx++;
3274 if (pass.idx == pass.batchSize)
3275 {
3276 pass.NextBatch();
3277 }
3278 }
3279 }
3280
3281 public Vector3 GetThingPosition(Card tg, Point p)
3282 {
3283 Vector3 zero = Vector3.zero;
3284 float num = 0f;
3285 cell = p.cell;
3287 if (!tg.TileType.UseMountHeight)
3288 {
3290 {
3291 zero.z -= 1f;
3292 }
3293 else if (!tg.sourceCard.multisize)
3294 {
3295 float num2 = ((cell._bridge != 0) ? cell.sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
3296 zero.y += num2;
3297 zero.z -= num2 * heightMod.z;
3298 }
3299 if (cell.HasRamp)
3300 {
3301 Vector3 rampFix = cell.sourceBlock.tileType.GetRampFix(cell.blockDir);
3302 zero.x += rampFix.x;
3303 zero.y += rampFix.y;
3304 zero.z += rampFix.z;
3305 }
3306 }
3307 if (tg.sourceCard.multisize)
3308 {
3309 zero.z -= 1f;
3310 }
3311 SourcePref pref = tg.Pref;
3312 zero.x += pref.x * (float)((!tg.flipX) ? 1 : (-1));
3313 zero.z += pref.z;
3314 detail = cell.detail;
3315 if (tg.isChara)
3316 {
3317 return zero;
3318 }
3319 bool flag = false;
3321 {
3322 flag = true;
3323 }
3325 {
3326 if (tg.altitude != 0)
3327 {
3328 zero += altitudeFix * tg.altitude;
3329 }
3330 flag = true;
3331 }
3333 {
3334 return zero;
3335 }
3336 float num3 = 0f;
3337 if (detail != null && detail.things.Count > 0)
3338 {
3339 Card card = null;
3340 for (int i = 0; i < detail.things.Count; i++)
3341 {
3342 Thing thing = detail.things[i];
3343 SourcePref pref2 = thing.Pref;
3345 float num4 = (tileType.UseMountHeight ? 0f : ((pref2.height == 0f) ? 0.1f : pref2.height));
3346 if (!thing.IsInstalled || thing == ActionMode.Inspect.target)
3347 {
3348 continue;
3349 }
3350 if (thing.TileType.IsRamp)
3351 {
3352 Vector3 rampFix2 = thing.TileType.GetRampFix(thing.dir, pref2);
3353 zero.x += rampFix2.x;
3354 zero.y += rampFix2.y;
3355 zero.z += rampFix2.z;
3356 }
3357 if (!flag && tileType.CanStack)
3358 {
3359 if (thing.ignoreStackHeight)
3360 {
3361 zero.y -= num3;
3362 }
3363 zero.y += num4;
3364 zero.x += pref2.stackX * (float)((!thing.flipX) ? 1 : (-1));
3365 zero.z += pref2.z + thing.renderer.data.stackZ;
3366 if (!tileType.UseMountHeight && thing.altitude != 0)
3367 {
3368 zero += altitudeFix * thing.altitude;
3369 num4 += altitudeFix.y * (float)thing.altitude;
3370 }
3371 if (thing.trait.IgnoreLastStackHeight && (card == null || !card.trait.IgnoreLastStackHeight))
3372 {
3373 zero.y -= num3;
3374 }
3375 num3 = num4;
3376 zero.z += renderSetting.thingZ + num + (float)i * -0.01f + zSetting.mod1 * zero.y;
3377 if (!thing.TileType.IsRamp && thing.trait.IsChangeFloorHeight)
3378 {
3379 _ = thing.ignoreStackHeight;
3380 }
3381 if (thing.sourceCard.multisize)
3382 {
3383 num += zSetting.multiZ;
3384 }
3385 card = thing;
3386 }
3387 }
3388 }
3389 if (flag)
3390 {
3391 return zero;
3392 }
3393 if (tg.ignoreStackHeight)
3394 {
3395 zero.y -= num3;
3396 zero.z += (float)(detail?.things.Count ?? 0) * -0.01f;
3397 }
3398 if (tg.altitude != 0)
3399 {
3400 zero += altitudeFix * tg.altitude;
3401 }
3402 return zero;
3403 }
3404
3406 {
3407 float num = _baseBrightness + 0.25f;
3408 num = ((!cell.IsSnowTile) ? ((float)((int)(num * 50f) * 262144 + ((cell.lightR >= 64) ? 63 : cell.lightR) * 4096 + ((cell.lightG >= 64) ? 63 : cell.lightG) * 64 + ((cell.lightB >= 64) ? 63 : cell.lightB))) : ((float)((int)(num * 50f) * 262144 + (int)((float)((cell.lightR >= 50) ? 50 : cell.lightR) * snowColor) * 4096 + (int)((float)((cell.lightG >= 50) ? 50 : cell.lightG) * snowColor) * 64 + (int)((float)((cell.lightB >= 50) ? 50 : cell.lightB) * snowColor) + snowColorToken)));
3409 return (int)num;
3410 }
3411
3412 public int GetRoofLight(Lot lot)
3413 {
3414 float num = Mathf.Sqrt(lot.light) * roofLightMod;
3415 if (num > lightLimit * roofLightLimitMod)
3416 {
3418 }
3419 if (isSnowCovered)
3420 {
3421 num += roofLightSnow * (1f - nightRatio);
3422 }
3423 int num2 = (int)(num * 50f) * 262144;
3424 if (isSnowCovered)
3425 {
3426 num2 += snowColorToken;
3427 }
3428 return num2;
3429 }
3430
3431 public void DrawRoof(Lot lot)
3432 {
3433 RoofStyle roofStyle = roofStyles[lot.idRoofStyle];
3434 if (roofStyle.type == RoofStyle.Type.None)
3435 {
3436 return;
3437 }
3438 bool reverse = lot.reverse;
3439 int num;
3440 int num2;
3441 int num3;
3442 int num4;
3443 if (reverse)
3444 {
3445 num = lot.z - roofStyle.h;
3446 num2 = lot.x - roofStyle.w;
3447 num3 = lot.mz + 1 + roofStyle.h;
3448 num4 = lot.mx + 1 + roofStyle.w;
3449 if (num2 > 1 && num > 0 && map.cells[num2 - 1, num].HasFullBlock)
3450 {
3451 num2--;
3452 }
3453 if (num3 < Size && num4 < Size && map.cells[num4 - 1, num3].HasFullBlock)
3454 {
3455 num3++;
3456 }
3457 }
3458 else
3459 {
3460 num = lot.x - roofStyle.w;
3461 num2 = lot.z - roofStyle.h;
3462 num3 = lot.mx + 1 + roofStyle.w;
3463 num4 = lot.mz + 1 + roofStyle.h;
3464 if (num2 > 0 && num > 1 && map.cells[num - 1, num2].HasFullBlock)
3465 {
3466 num--;
3467 }
3468 if (num3 < Size && num4 < Size && map.cells[num3 - 1, num4].HasFullBlock)
3469 {
3470 num4++;
3471 }
3472 }
3473 int num5;
3474 if (roofStyle.wing)
3475 {
3476 num5 = ((lot.height > 1) ? 1 : 0);
3477 if (num5 != 0)
3478 {
3479 num2--;
3480 num4++;
3481 }
3482 }
3483 else
3484 {
3485 num5 = 0;
3486 }
3487 int num6 = num4 + (reverse ? roofStyle.w : roofStyle.h) * 2 - num2;
3488 int idRoofTile = lot.idRoofTile;
3489 int num7 = lot.idBlock;
3490 int num8 = num7;
3491 if (num7 >= EMono.sources.blocks.rows.Count)
3492 {
3493 num7 = EMono.sources.blocks.rows.Count - 1;
3494 }
3495 if (num8 >= EMono.sources.floors.rows.Count)
3496 {
3497 num8 = EMono.sources.floors.rows.Count - 1;
3498 }
3499 int num9 = lot.idRamp;
3500 if (num9 >= EMono.sources.blocks.rows.Count)
3501 {
3502 num9 = EMono.sources.blocks.rows.Count - 1;
3503 }
3504 bool flag = false;
3505 int num10 = num6 / 2 - roofStyle.flatW;
3506 int num11 = num6 / 2 + roofStyle.flatW + ((num6 % 2 != 0) ? 1 : 0);
3507 SourceBlock.Row row = (roofStyle.useDefBlock ? cell.sourceFloor._defBlock : EMono.sources.blocks.rows[num7]);
3508 int num12 = 0;
3509 int num13 = ((num5 != 0) ? (-1) : 0);
3510 int num14 = 0;
3511 Vector3 vector = (lot.fullblock ? roofStyle.posFixBlock : roofStyle.posFix);
3512 switch (roofStyle.type)
3513 {
3514 case RoofStyle.Type.Default:
3515 flag = num6 % 2 == 1 && roofStyle.flatW == 0;
3516 break;
3517 case RoofStyle.Type.Flat:
3518 case RoofStyle.Type.FlatFloor:
3519 num10 = roofStyle.flatW;
3520 num11 = num6 - roofStyle.flatW;
3521 if (num10 == 0)
3522 {
3523 num14 = 1;
3524 }
3525 if (roofStyle.type != RoofStyle.Type.FlatFloor)
3526 {
3527 num--;
3528 num3++;
3529 num2--;
3530 num4++;
3531 }
3532 break;
3533 case RoofStyle.Type.Triangle:
3534 num10 = 999;
3535 num11 = 999;
3536 break;
3537 }
3538 for (cz = num2; cz < num4; cz++)
3539 {
3540 for (cx = num; cx < num3; cx++)
3541 {
3542 if (cx < 0 || cz < 0 || cx >= Size || cz >= Size)
3543 {
3544 continue;
3545 }
3546 int num15;
3547 int num16;
3548 if (reverse)
3549 {
3550 num15 = cz;
3551 num16 = cx;
3552 cell = map.cells[num15, num16];
3553 if (roofStyle.wing && cz == num4 - 1 && cell.Right.Right.room != null && cell.Right.Right.room.lot != lot)
3554 {
3555 continue;
3556 }
3557 }
3558 else
3559 {
3560 num15 = cx;
3561 num16 = cz;
3562 cell = map.cells[num15, num16];
3563 if (roofStyle.wing && cz == 0 && cell.Front.Front.room != null && cell.Front.Front.room.lot != lot)
3564 {
3565 continue;
3566 }
3567 }
3568 int num17 = num16 - num15;
3569 room = cell.room;
3570 if (room != null && room.lot != lot)
3571 {
3572 continue;
3573 }
3574 bool flag2 = false;
3575 if (roofStyle.type == RoofStyle.Type.Flat)
3576 {
3577 if (reverse)
3578 {
3579 if (!cell.HasFullBlock || cell.room != null)
3580 {
3581 num14 = ((cell.Left.room != null && cell.Left.room.lot == lot) ? ((cell.Right.room != null && cell.Right.room.lot == lot) ? 1 : ((cell.HasFullBlock && cell.Right.HasFullBlock && cell.Right.room != null) ? 1 : 2)) : (cell.Left.HasFullBlock ? 1 : 0));
3582 }
3583 else if (cell.Left.room?.lot == lot && cell.Right.room != null)
3584 {
3585 num14 = 1;
3586 flag2 = true;
3587 }
3588 else if (cell.Front.room?.lot == lot)
3589 {
3590 num14 = ((cell.FrontRight.room?.lot == lot) ? 1 : 2);
3591 flag2 = true;
3592 }
3593 else if (cell.Right.room?.lot == lot || cell.FrontRight.room?.lot == lot)
3594 {
3595 num14 = 0;
3596 flag2 = true;
3597 }
3598 }
3599 else if (!cell.HasFullBlock || cell.room != null)
3600 {
3601 num14 = ((cell.Front.room != null && cell.Front.room.lot == lot) ? ((cell.Back.room != null && cell.Back.room.lot == lot) ? 1 : (cell.Back.HasFullBlock ? 1 : 2)) : ((cell.HasFullBlock && cell.Front.HasFullBlock && cell.Front.room != null) ? 1 : 0));
3602 }
3603 else if (cell.Right.room?.lot == lot)
3604 {
3605 num14 = ((cell.FrontRight.room?.lot == lot) ? 1 : 0);
3606 flag2 = true;
3607 }
3608 else if (cell.Front.room?.lot == lot || cell.FrontRight.room?.lot == lot)
3609 {
3610 num14 = 2;
3611 flag2 = true;
3612 }
3613 num13 = 0;
3614 }
3615 bool flag3 = isSnowCovered && !cell.isClearSnow;
3616 if (room == null && !roofStyle.coverLot && !flag2 && !(cell.HasFullBlock && cell.IsRoomEdge && flag3))
3617 {
3618 continue;
3619 }
3620 index = cx + cz * Size;
3622 float num18 = (float)num17 * screen.tileAlign.y + (float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y + vector.y;
3623 float num19 = 1000f + param.x * screen.tileWeight.x + (float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + vector.z;
3624 if (lot.height == 1 && lot.heightFix < 20)
3625 {
3626 num18 += roofStyle.lowRoofFix.y;
3627 num19 += roofStyle.lowRoofFix.z;
3628 }
3629 param.x = (float)(cx + cz) * screen.tileAlign.x + roofFix.x + (float)num13 * roofFix2.x + vector.x * (float)(reverse ? 1 : (-1));
3630 param.y = num18 + (float)num13 * roofFix2.y;
3631 param.z = num19 + param.y * screen.tileWeight.z + (float)num13 * roofFix2.z;
3632 param.color = GetRoofLight(lot);
3633 param.snow = idRoofTile == 0 && flag3;
3634 param.shadowFix = 0f;
3635 if (num14 == 1)
3636 {
3638 RenderRow renderRow;
3639 if (roofStyle.type == RoofStyle.Type.FlatFloor)
3640 {
3641 if (cell.HasFullBlock && cell.IsRoomEdge && !flag3)
3642 {
3643 continue;
3644 }
3645 renderRow = EMono.sources.floors.rows[num8];
3646 renderRow.SetRenderParam(param, mat, 0);
3647 param.matColor = lot.colRoof;
3648 }
3649 else
3650 {
3651 renderRow = row;
3652 renderRow.SetRenderParam(param, mat, 0);
3653 param.matColor = lot.colBlock;
3654 }
3655 renderRow.renderData.Draw(param);
3656 if (idRoofTile != 0)
3657 {
3658 renderRow = EMono.sources.blocks.rows[EMono.sources.objs.rows[idRoofTile].idRoof];
3659 int num20 = (reverse ? 1 : 0) + ((!flag) ? 2 : 0);
3660 renderRow.SetRenderParam(param, MATERIAL.sourceGold, num20);
3661 param.matColor = lot.colRoof;
3662 if (roofStyle.type == RoofStyle.Type.FlatFloor)
3663 {
3664 param.x += roofStyle.posFixBlock.x;
3665 param.y += roofStyle.posFixBlock.y;
3666 param.z += roofStyle.posFixBlock.z;
3667 }
3668 if (!flag)
3669 {
3670 param.z += 0.5f;
3671 }
3672 if (flag3)
3673 {
3674 param.matColor = 104025f;
3675 if (roofStyle.type != RoofStyle.Type.FlatFloor)
3676 {
3677 param.z += roofStyle.snowZ;
3678 }
3679 param.tile = renderRow.renderData.ConvertTile(renderRow.snowTile) + num20;
3680 renderRow.renderData.Draw(param);
3681 }
3682 else
3683 {
3684 renderRow.renderData.Draw(param);
3685 }
3686 }
3687 else if (flag3 && roofStyle.type == RoofStyle.Type.FlatFloor)
3688 {
3689 param.matColor = 104025f;
3690 param.tile = 10f;
3691 param.x += roofStyle.snowFix.x;
3692 param.y += roofStyle.snowFix.y;
3693 param.z += roofStyle.snowZ + roofStyle.snowFix.z;
3694 renderRow.renderData.Draw(param);
3695 }
3696 }
3697 else
3698 {
3699 if (idRoofTile != 0)
3700 {
3701 int num21 = ((!reverse) ? ((num14 != 0) ? 2 : 0) : ((num14 != 0) ? 1 : 3));
3702 if (lot.altRoof && !flag && (roofStyle.type == RoofStyle.Type.Default || roofStyle.type == RoofStyle.Type.DefaultNoTop))
3703 {
3704 param.shadowFix = num21 + 1;
3705 }
3706 RenderRow renderRow = EMono.sources.objs.rows[idRoofTile];
3707 renderRow.SetRenderParam(param, MATERIAL.sourceGold, num21);
3708 param.matColor = lot.colRoof;
3709 if (flag3)
3710 {
3711 param.matColor = 104025f;
3712 param.z += roofStyle.snowZ;
3713 param.tile = renderRow.renderData.ConvertTile(renderRow.snowTile) + num21 + (lot.altRoof ? 8 : 0);
3714 renderRow.renderData.Draw(param);
3715 }
3716 else
3717 {
3718 param.tile += (lot.altRoof ? 8 : 0);
3719 renderRow.renderData.Draw(param);
3720 }
3721 param.shadowFix = 0f;
3722 }
3723 if (num13 >= 0)
3724 {
3725 param.y += roofRampFix.y;
3726 param.z += roofRampFix.z;
3727 RenderRow renderRow = EMono.sources.blocks.rows[num9];
3728 renderRow.SetRenderParam(param, MATERIAL.sourceGold, (!reverse) ? ((num14 != 0) ? 2 : 0) : ((num14 != 0) ? 1 : 3));
3729 param.matColor = lot.colBlock;
3730 renderRow.renderData.Draw(param);
3731 }
3732 }
3733 CellEffect effect = cell.effect;
3734 if (effect != null && effect.FireAmount > 0)
3735 {
3737 }
3738 if (num13 < 1)
3739 {
3740 continue;
3741 }
3742 if (roofStyle.type != RoofStyle.Type.Flat)
3743 {
3744 param.snow = false;
3745 }
3746 for (int i = 0; i < num13; i++)
3747 {
3748 param.x = (float)(cx + cz) * screen.tileAlign.x + roofFix.x + (float)i * roofFix2.x + vector.x * (float)(reverse ? 1 : (-1));
3749 param.y = num18 + (float)i * roofFix2.y;
3750 param.z = num19 + param.y * screen.tileWeight.z + (float)i * roofFix2.z;
3751 RenderRow renderRow = row;
3752 renderRow.SetRenderParam(param, MATERIAL.sourceGold, 0);
3753 param.matColor = lot.colBlock;
3754 renderRow.renderData.Draw(param);
3755 index++;
3756 CellEffect effect2 = cell.effect;
3757 if (effect2 != null && effect2.FireAmount > 0 && Rand.bytes[index % Rand.MaxBytes] % 3 == 0)
3758 {
3760 }
3761 }
3762 }
3763 num12++;
3764 if (roofStyle.type != RoofStyle.Type.Flat)
3765 {
3766 if (num12 == num10)
3767 {
3768 num14 = 1;
3769 }
3770 if (num12 == num11)
3771 {
3772 num14 = 2;
3773 num13++;
3774 }
3775 num13 += num14 switch
3776 {
3777 1 => 0,
3778 0 => 1,
3779 _ => -1,
3780 };
3781 }
3782 }
3783 }
3784
3785 public static int GetColorInt(ref Color matColor, int p)
3786 {
3787 if (p == 0)
3788 {
3789 return 104025;
3790 }
3791 return p * 262144 + (int)(matColor.r * 50f) * 4096 + (int)(matColor.g * 50f) * 64 + (int)(matColor.b * 50f);
3792 }
3793
3794 public void SetRoofHeight(MeshPassParam _param, Cell _cell, int _cx, int _cz, int h = 0, int altitude = 0, int dirWall = -1, bool ignoreAltitudeY = false)
3795 {
3796 Room room = _cell.room;
3797 if (room == null && dirWall != -1)
3798 {
3799 if (dirWall == 0 && _cell.Front.room != null)
3800 {
3801 room = _cell.Front.room;
3802 _cell = _cell.Front;
3803 }
3804 else if (_cell.Right.room != null)
3805 {
3806 room = _cell.Right.room;
3807 _cell = _cell.Right;
3808 }
3809 }
3810 if (room != null)
3811 {
3812 Lot lot = room.lot;
3813 RoofStyle roofStyle = roofStyles[lot.idRoofStyle];
3814 float num = (float)(_cz - _cx) * screen.tileAlign.y + (float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y;
3815 float num2 = 1000f + param.x * screen.tileWeight.x + (float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + roofStyle.posFix.z;
3816 if (lot.height == 1)
3817 {
3818 num += roofStyle.lowRoofFix.y;
3819 num2 += roofStyle.lowRoofFix.z;
3820 }
3821 _param.x = (float)(_cx + _cz) * screen.tileAlign.x + roofFix.x + (float)h * roofFix2.x;
3822 _param.y = num + (float)h * roofFix2.y;
3823 _param.z = num2 + _param.y * screen.tileWeight.z + (float)h * roofFix2.z + heightModRoofBlock.y;
3824 }
3825 if (!ignoreAltitudeY || room != null)
3826 {
3827 _param.y += (float)altitude * _heightMod.y;
3828 }
3829 _param.z += (float)altitude * heightModRoofBlock.z;
3830 }
3831}
AreaHighlightMode
BlockRenderMode
PlaceState
Definition: PlaceState.cs:2
TraitTrolley trolley
Definition: AI_Trolley.cs:24
SceneProfile profile
Definition: AM_Cinema.cs:5
static AM_Inspect Inspect
Definition: ActionMode.cs:23
virtual bool IsRoofEditMode(Card c=null)
Definition: ActionMode.cs:311
static bool IsAdv
Definition: ActionMode.cs:117
static AM_ViewMap ViewMap
Definition: ActionMode.cs:63
virtual BaseTileMap.CardIconMode cardIconMode
Definition: ActionMode.cs:229
virtual bool ShowMaskedThings
Definition: ActionMode.cs:221
bool IsActive
Definition: ActionMode.cs:121
static AM_FlagCell FlagCell
Definition: ActionMode.cs:77
virtual bool IsBuildMode
Definition: ActionMode.cs:181
static AM_Cinema Cinema
Definition: ActionMode.cs:73
static AM_Bird Bird
Definition: ActionMode.cs:31
static AM_Mine Mine
Definition: ActionMode.cs:33
bool showWallItem
Definition: AreaData.cs:54
bool atrium
Definition: AreaData.cs:66
int maxHeight
Definition: AreaData.cs:30
virtual byte GetTile(int index)
Definition: Area.cs:75
AreaData data
Definition: BaseArea.cs:29
List< Action > actionsLateUpdate
Definition: BaseCore.cs:29
ScreenGuide guide
Vector3 tileWeight
BaseTileSelector tileSelector
virtual void RefreshWeather()
MeshPass passArea
Definition: BaseTileMap.cs:141
SourceDeco.Row sourceDeco
Definition: BaseTileMap.cs:496
SourceMaterial.Row matDeco
Definition: BaseTileMap.cs:384
Vector3 roofFix2
Definition: BaseTileMap.cs:75
MeshPass passFog
Definition: BaseTileMap.cs:169
Vector3 cornerWallFix
Definition: BaseTileMap.cs:96
const int BlocklightToken
Definition: BaseTileMap.cs:518
float maxHeight
Definition: BaseTileMap.cs:404
MeshPass passFloor
Definition: BaseTileMap.cs:145
virtual void Draw()
Definition: BaseTileMap.cs:547
int GetRoofLight(Lot lot)
float[] floatYs
Definition: BaseTileMap.cs:308
MeshPass passIcon
Definition: BaseTileMap.cs:185
int floorMatColor
Definition: BaseTileMap.cs:446
RenderData rendererInnerBlock
Definition: BaseTileMap.cs:203
Vector3[] wallHangFix
Definition: BaseTileMap.cs:116
float heightModDeco
Definition: BaseTileMap.cs:52
SourceFloor.Row sourceBridge
Definition: BaseTileMap.cs:494
Collider2D mouseCollider
Definition: BaseTileMap.cs:41
MeshPass passFloorEx
Definition: BaseTileMap.cs:163
float blockLight
Definition: BaseTileMap.cs:386
MeshPass passObj
Definition: BaseTileMap.cs:153
bool showAllCards
Definition: BaseTileMap.cs:462
Vector3 roofFix3
Definition: BaseTileMap.cs:77
bool highlightArea
Definition: BaseTileMap.cs:275
int maxColliderCheck
Definition: BaseTileMap.cs:45
float slopeFixZ
Definition: BaseTileMap.cs:50
InnerMode defaultInnerMode
Definition: BaseTileMap.cs:90
Point HitPoint
Definition: BaseTileMap.cs:522
Vector3 cornerWallFix2
Definition: BaseTileMap.cs:98
ScreenHighlight screenHighlight
Definition: BaseTileMap.cs:338
SourceMaterial.Row matBridge
Definition: BaseTileMap.cs:382
MeshPass passFloorMarker
Definition: BaseTileMap.cs:181
byte[] groundLights
Definition: BaseTileMap.cs:266
RenderData rendererFogRoomSolid
Definition: BaseTileMap.cs:217
float snowLight
Definition: BaseTileMap.cs:406
const int BlocklightMTP
Definition: BaseTileMap.cs:520
InnerMode innerMode
Definition: BaseTileMap.cs:233
int[] floatVs
Definition: BaseTileMap.cs:302
MeshPass passChara
Definition: BaseTileMap.cs:187
float modSublight2
Definition: BaseTileMap.cs:418
MeshPass passRamp
Definition: BaseTileMap.cs:143
RenderData rendererWaterBlock
Definition: BaseTileMap.cs:225
Vector3 waterEdgeFixShoreSand
Definition: BaseTileMap.cs:110
int GetApproximateBlocklight(Cell cell)
MeshPass passGuideBlock
Definition: BaseTileMap.cs:137
float waterAnimeTimer
Definition: BaseTileMap.cs:408
MeshPass passShadow
Definition: BaseTileMap.cs:133
bool showBorder
Definition: BaseTileMap.cs:476
bool isSnowCovered
Definition: BaseTileMap.cs:468
float floatY
Definition: BaseTileMap.cs:329
int lowWallObjAltitude
Definition: BaseTileMap.cs:376
RenderData renderBorder
Definition: BaseTileMap.cs:211
bool cinemaMode
Definition: BaseTileMap.cs:472
bool alwaysLowblock
Definition: BaseTileMap.cs:474
Vector3 waterEdgeFixShore
Definition: BaseTileMap.cs:108
bool hideRoomFog
Definition: BaseTileMap.cs:281
static int GetColorInt(ref Color matColor, int p)
float _lightMod
Definition: BaseTileMap.cs:311
Vector3 roofRampFix
Definition: BaseTileMap.cs:71
float[] lightLookUp
Definition: BaseTileMap.cs:305
TileType tileType
Definition: BaseTileMap.cs:508
float lightLimit
Definition: BaseTileMap.cs:414
int snowColorToken
Definition: BaseTileMap.cs:372
float modSublight1
Definition: BaseTileMap.cs:416
bool showFullWall
Definition: BaseTileMap.cs:287
SceneLightProfile lightSetting
Definition: BaseTileMap.cs:510
bool isUnderwater
Definition: BaseTileMap.cs:478
const int DefColor
Definition: BaseTileMap.cs:516
void OnActivate(BaseGameScreen _screen)
Definition: BaseTileMap.cs:524
bool fogBounds
Definition: BaseTileMap.cs:464
RenderParam param
Definition: BaseTileMap.cs:436
Vector3 ugFix
Definition: BaseTileMap.cs:58
float floorLight
Definition: BaseTileMap.cs:388
MeshPass passWaterBlock
Definition: BaseTileMap.cs:183
float lotLight2
Definition: BaseTileMap.cs:83
bool noRoofMode
Definition: BaseTileMap.cs:296
MeshPass passAutoTileWater
Definition: BaseTileMap.cs:177
new BaseGameScreen screen
Definition: BaseTileMap.cs:354
RenderData rendererFov
Definition: BaseTileMap.cs:205
WallClipMode wallClipMode
Definition: BaseTileMap.cs:88
Vector3 edgeBlockFix
Definition: BaseTileMap.cs:92
MeshPass passFov
Definition: BaseTileMap.cs:171
Vector3 heightMod
Definition: BaseTileMap.cs:56
bool usingHouseBoard
Definition: BaseTileMap.cs:293
Vector3 altitudeFix
Definition: BaseTileMap.cs:102
Vector3 thingPos
Definition: BaseTileMap.cs:482
MeshPass passDecal
Definition: BaseTileMap.cs:157
float floorShadowStrength
Definition: BaseTileMap.cs:332
RenderData rendererFov2
Definition: BaseTileMap.cs:207
Vector3[] transitionFix
Definition: BaseTileMap.cs:114
float _baseBrightness
Definition: BaseTileMap.cs:314
Vector3 waterEdgeFix
Definition: BaseTileMap.cs:104
virtual void DrawTile()
Definition: BaseTileMap.cs:925
void RefreshHeight()
Definition: BaseTileMap.cs:913
Room currentRoom
Definition: BaseTileMap.cs:498
bool noSlopMode
Definition: BaseTileMap.cs:512
MeshPass passFloorWater
Definition: BaseTileMap.cs:165
float rightWallShade
Definition: BaseTileMap.cs:69
RenderData rendererFloorMarker
Definition: BaseTileMap.cs:201
float lotLight
Definition: BaseTileMap.cs:81
Vector3 _actorPos
Definition: BaseTileMap.cs:440
bool darkenOuter
Definition: BaseTileMap.cs:480
GameSetting.RenderSetting renderSetting
Definition: BaseTileMap.cs:362
MeshPass passAutoTile
Definition: BaseTileMap.cs:175
Vector3 _heightMod
Definition: BaseTileMap.cs:335
float _shadowStrength
Definition: BaseTileMap.cs:422
float floatTimer
Definition: BaseTileMap.cs:410
float pcMaxLight
Definition: BaseTileMap.cs:394
float lowblockTimer
Definition: BaseTileMap.cs:317
RenderData rendererShore
Definition: BaseTileMap.cs:209
Vector3 bridgeFix
Definition: BaseTileMap.cs:94
Vector3 orgPos
Definition: BaseTileMap.cs:484
void DrawRoof(Lot lot)
float _rightWallShade
Definition: BaseTileMap.cs:323
float snowLimit
Definition: BaseTileMap.cs:428
float fogBrightness
Definition: BaseTileMap.cs:424
float floatSpeed
Definition: BaseTileMap.cs:122
Vector3 ugFixBridgeBottom
Definition: BaseTileMap.cs:62
SourceMaterial.Row matBlock
Definition: BaseTileMap.cs:378
RenderDataEffect rendererEffect
Definition: BaseTileMap.cs:229
bool hasBridge
Definition: BaseTileMap.cs:348
float nightRatio
Definition: BaseTileMap.cs:434
SourceBlock.Row _sourceBlock
Definition: BaseTileMap.cs:506
float heightBlockSize
Definition: BaseTileMap.cs:48
float destBrightness
Definition: BaseTileMap.cs:412
bool buildMode
Definition: BaseTileMap.cs:346
RenderData renderFootmark
Definition: BaseTileMap.cs:197
Vector3[] waterEdgeBlockFix
Definition: BaseTileMap.cs:118
Vector3 roofFix
Definition: BaseTileMap.cs:73
Vector3 freePos
Definition: BaseTileMap.cs:442
float defaultBlockHeight
Definition: BaseTileMap.cs:426
bool subtleHighlightArea
Definition: BaseTileMap.cs:278
MeshPass passGuideFloor
Definition: BaseTileMap.cs:139
MeshBatch batch
Definition: BaseTileMap.cs:438
MeshPass passEdge
Definition: BaseTileMap.cs:173
Vector3 ugFixBridgeTop
Definition: BaseTileMap.cs:64
RenderData rendererBlockMarker
Definition: BaseTileMap.cs:199
Point TestPoint
Definition: BaseTileMap.cs:231
MeshPass passCharaL
Definition: BaseTileMap.cs:189
MeshPass passLiquid
Definition: BaseTileMap.cs:135
float snowColor2
Definition: BaseTileMap.cs:432
Vector3[] ambientShadowFix
Definition: BaseTileMap.cs:112
float heightLimitDeco
Definition: BaseTileMap.cs:54
float heightLightMod
Definition: BaseTileMap.cs:320
MeshPass passObjSS
Definition: BaseTileMap.cs:151
float shadowModStrength
Definition: BaseTileMap.cs:124
RenderData rendererFogRoomBlockSolid
Definition: BaseTileMap.cs:219
MeshPass passShore
Definition: BaseTileMap.cs:195
float snowColor
Definition: BaseTileMap.cs:430
SourceMaterial.Row matFloor
Definition: BaseTileMap.cs:380
bool highlightCells
Definition: BaseTileMap.cs:470
float roofLightSnow
Definition: BaseTileMap.cs:85
Vector3 ugFixBridge
Definition: BaseTileMap.cs:60
Vector3 cornerWallFix3
Definition: BaseTileMap.cs:100
RenderData rendererWallDeco
Definition: BaseTileMap.cs:223
MeshPass passRoof
Definition: BaseTileMap.cs:159
CellDetail detail
Definition: BaseTileMap.cs:488
RaycastHit2D[] rays
Definition: BaseTileMap.cs:340
MeshPass passCharaLL
Definition: BaseTileMap.cs:193
SourceBlock.Row sourceBlock
Definition: BaseTileMap.cs:490
int[] seaAnimeIndexes
Definition: BaseTileMap.cs:128
MeshPass passCharaLW
Definition: BaseTileMap.cs:191
Vector3 waterEdgeBridgeFix
Definition: BaseTileMap.cs:106
float roofLightMod
Definition: BaseTileMap.cs:79
RenderData rendererFogRoomWallSolid
Definition: BaseTileMap.cs:221
RoofStyle[] roofStyles
Definition: BaseTileMap.cs:514
MeshPass passObjL
Definition: BaseTileMap.cs:155
RenderData rendererFogFloorSolid
Definition: BaseTileMap.cs:215
int waterAnimeIndex
Definition: BaseTileMap.cs:374
float roomHeight
Definition: BaseTileMap.cs:402
MeshPass passBlockMarker
Definition: BaseTileMap.cs:179
Vector3 colliderFix
Definition: BaseTileMap.cs:43
void SetRoofHeight(MeshPassParam _param, Cell _cell, int _cx, int _cz, int h=0, int altitude=0, int dirWall=-1, bool ignoreAltitudeY=false)
static bool forceShowHang
Definition: BaseTileMap.cs:36
RenderDataObjDummy rendererObjDummy
Definition: BaseTileMap.cs:227
BaseTileSelector selector
Definition: BaseTileMap.cs:360
MeshPass passObjS
Definition: BaseTileMap.cs:149
Vector3 heightModRoofBlock
Definition: BaseTileMap.cs:66
NoiseLayer layerGroundLights
Definition: BaseTileMap.cs:131
RenderData rendererFogBlockSolid
Definition: BaseTileMap.cs:213
float roofLightLimitMod
Definition: BaseTileMap.cs:326
GameSetting.RenderSetting.ZSetting zSetting
Definition: BaseTileMap.cs:364
MeshPass pass
Definition: BaseTileMap.cs:358
float shadowStrength
Definition: BaseTileMap.cs:420
bool _lowblock
Definition: BaseTileMap.cs:350
MeshPass passInner
Definition: BaseTileMap.cs:167
MeshPass passBlockEx
Definition: BaseTileMap.cs:161
SourceFloor.Row sourceFloor
Definition: BaseTileMap.cs:492
MeshPass passBlock
Definition: BaseTileMap.cs:147
CardIconMode iconMode
Definition: BaseTileMap.cs:342
float floorLight2
Definition: BaseTileMap.cs:390
Vector3 GetThingPosition(Card tg, Point p)
int currentHeight
Definition: BaseTileMap.cs:450
bool pressing
Definition: ButtonState.cs:35
ScreenGrading grading
override void Draw(RenderParam p)
Definition: CardRenderer.cs:49
Vector3 position
Definition: CardRenderer.cs:21
virtual bool IsMoving
Definition: CardRenderer.cs:31
virtual void SetFirst(bool first, Vector3 pos)
Definition: Card.cs:11
bool isMasked
Definition: Card.cs:593
string id
Definition: Card.cs:36
bool isNPCProperty
Definition: Card.cs:557
bool isFloating
Definition: Card.cs:653
bool isRoofItem
Definition: Card.cs:581
bool isRestrained
Definition: Card.cs:569
float fy
Definition: Card.cs:269
float fx
Definition: Card.cs:257
PlaceState placeState
Definition: Card.cs:86
TileType TileType
Definition: Card.cs:2189
virtual SourcePref Pref
Definition: Card.cs:2159
Point pos
Definition: Card.cs:60
int uid
Definition: Card.cs:125
Trait trait
Definition: Card.cs:54
int altitude
Definition: Card.cs:233
bool isDeconstructing
Definition: Card.cs:449
bool IsInstalled
Definition: Card.cs:2435
virtual bool isChara
Definition: Card.cs:2135
TraitShackle GetRestrainer()
Definition: Card.cs:7476
int dir
Definition: Card.cs:149
virtual CardRow sourceCard
Definition: Card.cs:2183
bool noShadow
Definition: Card.cs:821
SourceCategory.Row category
Definition: Card.cs:2101
bool freePos
Definition: Card.cs:521
CardRenderer renderer
Definition: Card.cs:64
virtual bool flipX
Definition: Card.cs:2168
bool ignoreStackHeight
Definition: Card.cs:641
TaskDesignation designation
Definition: CellDetail.cs:19
List< Thing > things
Definition: CellDetail.cs:11
TransAnime anime
Definition: CellDetail.cs:21
List< Chara > charas
Definition: CellDetail.cs:13
Area area
Definition: CellDetail.cs:15
Footmark footmark
Definition: CellDetail.cs:17
int FireAmount
Definition: CellEffect.cs:162
bool IsFire
Definition: CellEffect.cs:147
bool IsLiquid
Definition: CellEffect.cs:150
SourceCellEffect.Row source
Definition: CellEffect.cs:145
Definition: Cell.cs:7
byte _block
Definition: Cell.cs:32
byte autotileDeco
Definition: Cell.cs:70
Room room
Definition: Cell.cs:110
byte TopHeight
Definition: Cell.cs:125
bool IsBlocked
Definition: Cell.cs:903
bool HasWallOrFence
Definition: Cell.cs:839
static List< SourceBlock.Row > blockList
Definition: Cell.cs:14
SourceBlock.Row sourceBlock
Definition: Cell.cs:1062
Cell BackRight
Definition: Cell.cs:209
bool lotShade
Definition: Cell.cs:542
bool IsSnowTile
Definition: Cell.cs:790
bool castFloorShadow
Definition: Cell.cs:530
SourceMaterial.Row matBlock
Definition: Cell.cs:1038
byte autotile
Definition: Cell.cs:68
bool HasBlock
Definition: Cell.cs:651
byte shadow
Definition: Cell.cs:78
SourceFloor.Row sourceFloor
Definition: Cell.cs:1064
CellEffect effect
Definition: Cell.cs:102
byte _bridge
Definition: Cell.cs:48
bool isDeck
Definition: Cell.cs:518
SourceMaterial.Row matDeco
Definition: Cell.cs:1042
Cell Back
Definition: Cell.cs:161
bool lotWall
Definition: Cell.cs:494
bool IsBridgeWater
Definition: Cell.cs:778
byte decal
Definition: Cell.cs:46
Critter critter
Definition: Cell.cs:104
bool isClearSnow
Definition: Cell.cs:458
bool isFloating
Definition: Cell.cs:482
Cell Front
Definition: Cell.cs:137
SourceMaterial.Row matObj
Definition: Cell.cs:1046
byte _deco
Definition: Cell.cs:58
List< Thing > Things
Definition: Cell.cs:994
SourceMaterial.Row matBridge
Definition: Cell.cs:1044
bool IsFloorWater
Definition: Cell.cs:735
bool pcSync
Definition: Cell.cs:112
bool UseLowBlock
Definition: Cell.cs:869
byte shore
Definition: Cell.cs:76
bool skipRender
Definition: Cell.cs:278
ushort lightG
Definition: Cell.cs:96
byte _roofBlock
Definition: Cell.cs:52
bool IsTopWater
Definition: Cell.cs:708
byte height
Definition: Cell.cs:80
byte autotileObj
Definition: Cell.cs:74
GrowSystem growth
Definition: Cell.cs:233
ushort lightB
Definition: Cell.cs:98
bool isWatered
Definition: Cell.cs:350
SourceFloor.Row sourceBridge
Definition: Cell.cs:1066
bool isClearArea
Definition: Cell.cs:614
CellDetail detail
Definition: Cell.cs:100
bool isShadowed
Definition: Cell.cs:254
byte _roofBlockDir
Definition: Cell.cs:56
bool HasFloodBlock
Definition: Cell.cs:1025
byte autotileBridge
Definition: Cell.cs:72
bool isToggleWallPillar
Definition: Cell.cs:566
bool HasRoof
Definition: Cell.cs:656
Cell Left
Definition: Cell.cs:173
bool isSkyFloor
Definition: Cell.cs:602
SourceMaterial.Row matFloor
Definition: Cell.cs:1040
int floorDir
Definition: Cell.cs:930
byte _roofBlockMat
Definition: Cell.cs:54
bool isSeen
Definition: Cell.cs:290
byte obj
Definition: Cell.cs:40
bool isSlopeEdge
Definition: Cell.cs:362
bool isShoreSand
Definition: Cell.cs:554
SourceObj.Row sourceObj
Definition: Cell.cs:1084
byte highlight
Definition: Cell.cs:92
int objDir
Definition: Cell.cs:918
Cell BackLeft
Definition: Cell.cs:221
bool isForceFloat
Definition: Cell.cs:314
SourceCellEffect.Row sourceEffect
Definition: Cell.cs:1082
bool isSurrounded
Definition: Cell.cs:242
bool isWallEdge
Definition: Cell.cs:434
bool outOfBounds
Definition: Cell.cs:422
Point GetPoint()
Definition: Cell.cs:1113
Cell Right
Definition: Cell.cs:149
Cell FrontLeft
Definition: Cell.cs:197
bool HasRamp
Definition: Cell.cs:845
bool ignoreObjShadow
Definition: Cell.cs:386
byte bridgeHeight
Definition: Cell.cs:82
bool fullWall
Definition: Cell.cs:470
int liquidLv
Definition: Cell.cs:954
bool isBridgeEdge
Definition: Cell.cs:374
bool hasDoor
Definition: Cell.cs:266
int blockDir
Definition: Cell.cs:906
static List< SourceMaterial.Row > matList
Definition: Cell.cs:12
bool IsRoomEdge
Definition: Cell.cs:876
bool HasFullBlock
Definition: Cell.cs:825
SourceDeco.Row sourceDeco
Definition: Cell.cs:1080
Cell FrontRight
Definition: Cell.cs:185
ushort lightR
Definition: Cell.cs:94
byte bridgePillar
Definition: Cell.cs:90
Definition: Chara.cs:10
override SourcePref Pref
Definition: Chara.cs:805
override bool IsAliveInCurrentZone
Definition: Chara.cs:567
AIAct ai
Definition: Chara.cs:206
override bool IsPC
Definition: Chara.cs:630
Chara host
Definition: Chara.cs:33
bool IsAstralBody
Definition: Chara.cs:506
override bool IsDeadOrSleeping
Definition: Chara.cs:579
SourceChara.Row source
Definition: Chara.cs:162
override bool IsMoving
Definition: Chara.cs:626
override CardRow sourceCard
Definition: Chara.cs:454
bool IsInActiveZone
Definition: Chara.cs:861
override void SetRenderParam(RenderParam p)
Definition: Chara.cs:6929
ConBaseTransmuteMimic mimicry
Definition: Chara.cs:106
override bool IsPCC
Definition: Chara.cs:700
bool hasTelepathy
Definition: Chara.cs:142
BlockColors blockColors
new GameConfig game
Definition: CoreConfig.cs:615
bool godBuild
Definition: CoreDebug.cs:319
Definition: Core.cs:14
static float delta
Definition: Core.cs:17
CoreConfig config
Definition: Core.cs:70
bool reverse
Definition: Critter.cs:23
void Update()
Definition: Critter.cs:102
virtual int SnowTile
Definition: Critter.cs:33
int tile
Definition: Critter.cs:7
bool IsNight
Definition: Date.cs:112
Definition: EInput.cs:8
static bool isAltDown
Definition: EInput.cs:276
static bool isShiftDown
Definition: EInput.cs:272
static ButtonState rightMouse
Definition: EInput.cs:362
static Vector3 mposWorld
Definition: EInput.cs:350
Definition: EMono.cs:4
static GameSetting setting
Definition: EMono.cs:31
static ColorProfile Colors
Definition: EMono.cs:35
static Core core
Definition: EMono.cs:5
static Chara pc
Definition: EMono.cs:13
static World world
Definition: EMono.cs:37
static Player player
Definition: EMono.cs:11
static Zone _zone
Definition: EMono.cs:19
static Game game
Definition: EMono.cs:7
static Scene scene
Definition: EMono.cs:27
static SoundManager Sound
Definition: EMono.cs:39
static Map _map
Definition: EMono.cs:17
static CoreDebug debug
Definition: EMono.cs:45
static SourceManager sources
Definition: EMono.cs:41
Definition: FLOOR.cs:2
static SourceFloor.Row sourceSnow
Definition: FLOOR.cs:31
static SourceFloor.Row sourceSnow2
Definition: FLOOR.cs:33
static SourceFloor.Row sourceIce
Definition: FLOOR.cs:35
int tile
Definition: Footmark.cs:7
EffectSetting effect
Definition: GameSetting.cs:301
RenderSetting render
Definition: GameSetting.cs:303
int slopeMod
Definition: Game.cs:61
bool buildLight
Definition: Game.cs:37
int animeSpeed
Definition: Game.cs:85
bool showRoof
Definition: Game.cs:13
bool showWall
Definition: Game.cs:16
int lowWallObjAltitude
Definition: Game.cs:88
bool reverseSnow
Definition: Game.cs:49
bool slope
Definition: Game.cs:25
Config config
Definition: Game.cs:219
virtual void OnRenderTileMap(RenderParam p, bool drawShadow=true)
Definition: GrowSystem.cs:207
static Card alwaysVisible
Definition: LayerDrama.cs:22
Definition: Lot.cs:5
int colDeco2
Definition: Lot.cs:36
bool altRoof
Definition: Lot.cs:46
int colBlock
Definition: Lot.cs:32
int decoFix
Definition: Lot.cs:38
int idRamp
Definition: Lot.cs:24
int decoFix2
Definition: Lot.cs:40
int colRoof
Definition: Lot.cs:30
int mh
Definition: Lot.cs:58
int colDeco
Definition: Lot.cs:34
int idRoofStyle
Definition: Lot.cs:14
int heightFix
Definition: Lot.cs:18
float realHeight
Definition: Lot.cs:64
float light
Definition: Lot.cs:66
int idBlock
Definition: Lot.cs:22
int height
Definition: Lot.cs:12
int idDeco2
Definition: Lot.cs:28
int idDeco
Definition: Lot.cs:26
int idRoofTile
Definition: Lot.cs:20
bool reverse
Definition: Lot.cs:42
int idBGM
Definition: Lot.cs:16
static SourceMaterial.Row sourceSnow
Definition: MATERIAL.cs:41
static SourceMaterial.Row sourceGold
Definition: MATERIAL.cs:45
int Size
Definition: MapBounds.cs:20
int maxZ
Definition: MapBounds.cs:17
int maxX
Definition: MapBounds.cs:14
int x
Definition: MapBounds.cs:8
float heightLightMod
Definition: MapConfig.cs:56
bool fullWallHeight
Definition: MapConfig.cs:32
int skyBlockHeight
Definition: MapConfig.cs:92
float blockHeight
Definition: MapConfig.cs:71
bool reverseRoof
Definition: MapConfig.cs:47
Definition: Map.cs:13
bool IsIndoor
Definition: Map.cs:131
int SizeXZ
Definition: Map.cs:133
RoomManager rooms
Definition: Map.cs:31
Cell[,] cells
Definition: Map.cs:85
MapConfig config
Definition: Map.cs:37
static HashSet< int > sunMap
Definition: Map.cs:14
MapBounds bounds
Definition: Map.cs:52
float[] matColors
Definition: MeshBatch.cs:11
Matrix4x4[] matrices
Definition: MeshBatch.cs:5
float[] tiles
Definition: MeshBatch.cs:7
float[] colors
Definition: MeshBatch.cs:9
int batchIdx
Definition: MeshPass.cs:60
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
void NextBatch()
Definition: MeshPass.cs:417
int batchSize
Definition: MeshPass.cs:63
void AddShadow(MeshPassParam p, ref Vector3 fix)
Definition: MeshPass.cs:195
List< MeshBatch > batches
Definition: MeshPass.cs:66
int idx
Definition: MeshPass.cs:57
bool CanSee(Chara c)
Definition: Player.cs:2542
CinemaConfig cinemaConfig
Definition: Player.cs:1179
float lightPower
Definition: Player.cs:1267
int lightRadius
Definition: Player.cs:1259
Definition: Point.cs:9
static Point shared
Definition: Point.cs:20
ref Vector3 Position(int height)
Definition: Point.cs:548
Point Set(int _x, int _z)
Definition: Point.cs:503
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
bool IsValid
Definition: Point.cs:88
Point Clamp(bool useBounds=false)
Definition: Point.cs:1009
Cell cell
Definition: Point.cs:51
Definition: Rand.cs:4
static int MaxBytes
Definition: Rand.cs:5
static byte[] bytes
Definition: Rand.cs:11
static void InitBytes(int a)
Definition: Rand.cs:13
new void Draw(RenderParam p, int tile=0)
void Draw(RenderParam p, int tile)
Definition: RenderData.cs:129
Vector3 offsetShadow
Definition: RenderData.cs:23
void DrawRepeat(RenderParam p, int count, float size, bool skipFirst=false)
Definition: RenderData.cs:215
float stackZ
Definition: RenderData.cs:45
int ConvertTile(int tile)
Definition: RenderData.cs:111
SourcePref shadowPref
Definition: RenderData.cs:49
int idShadow
Definition: RenderData.cs:15
float hangedFixZ
Definition: RenderData.cs:43
RenderData data
Definition: RenderObject.cs:34
SourceMaterial.Row mat
Definition: RenderParam.cs:17
int liquidLv
Definition: RenderParam.cs:7
void SetRenderParam(RenderParam p, SourceMaterial.Row mat, int dir)
Definition: RenderRow.cs:398
bool multisize
Definition: RenderRow.cs:64
RenderData renderData
Definition: RenderRow.cs:71
SourcePref pref
Definition: RenderRow.cs:68
bool useAltColor
Definition: RenderRow.cs:80
TileType tileType
Definition: RenderRow.cs:77
int[] _tiles
Definition: RenderRow.cs:12
SourceMaterial.Row DefaultMaterial
Definition: RenderRow.cs:86
int colorMod
Definition: RenderRow.cs:16
int snowTile
Definition: RenderRow.cs:28
Vector3 lowRoofFix
Definition: RoofStyle.cs:39
Vector3 posFix
Definition: RoofStyle.cs:35
int flatW
Definition: RoofStyle.cs:23
float snowZ
Definition: RoofStyle.cs:43
bool coverLot
Definition: RoofStyle.cs:33
Vector3 posFixBlock
Definition: RoofStyle.cs:37
bool wing
Definition: RoofStyle.cs:29
Vector3 snowFix
Definition: RoofStyle.cs:41
Type type
Definition: RoofStyle.cs:17
List< Lot > listLot
Definition: RoomManager.cs:20
void Refresh()
Definition: RoomManager.cs:52
Definition: Room.cs:4
bool HasRoof
Definition: Room.cs:29
Lot lot
Definition: Room.cs:21
AnimationCurve baseBrightnessCurve
AnimationCurve shadowCurveFloor
AnimationCurve dynamicBrightnessCurve2
float dynamicBrightnessLightBonus
AnimationCurve lightLimit
AnimationCurve fogBrightness
AnimationCurve dynamicBrightnessCurve
AnimationCurve shadowCurve
AnimationCurve nightRatioCurve
AnimationCurve lightModCurve
SceneGlobalProfile global
Definition: SceneProfile.cs:6
SceneLightProfile light
Definition: SceneProfile.cs:10
Definition: Scene.cs:8
List< ISyncScreen > syncList
Definition: Scene.cs:137
static Point HitPoint
Definition: Scene.cs:21
float timeRatio
Definition: Scene.cs:130
CameraSupport camSupport
Definition: Scene.cs:41
GameSetting.RenderSetting.MapBGSetting bg
Definition: Scene.cs:124
SoundSource sfxFire
Definition: Scene.cs:89
ActionMode actionMode
Definition: Scene.cs:79
SceneProfile profile
Definition: Scene.cs:75
void DrawWall(Point point, int color, bool useMarkerPass=false, float offsetZ=0f)
Definition: ScreenGuide.cs:42
MeshPass passGuideFloor
Definition: ScreenGuide.cs:7
List< Item > items
Definition: ShadowData.cs:101
static ShadowData Instance
Definition: ShadowData.cs:99
SourceObj objs
SourceBlock blocks
SourceFloor floors
bool HasGrowth
Definition: SourceObj.cs:28
bool bypassShadow
Definition: SourcePref.cs:315
int liquidModMax
Definition: SourcePref.cs:75
bool FloatUnderwater
Definition: SourcePref.cs:332
float height
Definition: SourcePref.cs:51
int liquidMod
Definition: SourcePref.cs:63
bool Float
Definition: SourcePref.cs:328
int shadow
Definition: SourcePref.cs:39
bool IsPlayerFaction
Definition: Spatial.cs:455
virtual bool IsRegion
Definition: Spatial.cs:515
virtual bool IsSnowCovered
Definition: Spatial.cs:545
virtual void Draw(int x, int z, RenderParam p)
Definition: Thing.cs:8
override void SetRenderParam(RenderParam p)
Definition: Thing.cs:1512
override SourcePref Pref
Definition: Thing.cs:50
override CardRow sourceCard
Definition: Thing.cs:47
int id
Definition: TileRow.cs:8
virtual bool IsUseBlockDir
Definition: TileType.cs:139
virtual bool UseHangZFix
Definition: TileType.cs:229
static TileTypeSky Sky
Definition: TileType.cs:75
virtual bool CanStack
Definition: TileType.cs:131
virtual void GetMountHeight(ref Vector3 v, Point p, int d, Card target=null)
Definition: TileType.cs:391
static TileTypeIllumination Illumination
Definition: TileType.cs:93
static TileTypeWaterShallow FloorWaterShallow
Definition: TileType.cs:65
static TileTypeObjFloat ObjFloat
Definition: TileType.cs:85
bool IsRamp
Definition: TileType.cs:153
virtual bool AlwaysShow
Definition: TileType.cs:261
virtual bool AlwaysShowShadow
Definition: TileType.cs:259
virtual bool UseLowBlock
Definition: TileType.cs:231
virtual bool IsFullBlock
Definition: TileType.cs:175
virtual bool IsWall
Definition: TileType.cs:143
virtual bool ForceRpeatBlock
Definition: TileType.cs:265
virtual bool IsSkipLowBlock
Definition: TileType.cs:135
virtual bool UseMountHeight
Definition: TileType.cs:227
virtual bool IsFence
Definition: TileType.cs:177
virtual BlockRenderMode blockRenderMode
Definition: TileType.cs:285
Vector3 GetRampFix(int dir, SourcePref pref=null)
Definition: TileType.cs:396
virtual bool IsWaterTop
Definition: TileType.cs:185
virtual bool RepeatBlock
Definition: TileType.cs:263
virtual bool IsOpen()
Definition: TraitDoor.cs:99
virtual Vector3 GetRestrainPos
Definition: TraitShackle.cs:5
virtual bool IgnoreLastStackHeight
Definition: Trait.cs:121
virtual bool AlwaysHideOnLowWall
Definition: Trait.cs:365
virtual bool UseLowblock
Definition: Trait.cs:453
virtual TileType tileType
Definition: Trait.cs:50
virtual bool IsChangeFloorHeight
Definition: Trait.cs:74
virtual bool IsGround
Definition: Trait.cs:68
Card owner
Definition: Trait.cs:28
Vector3 v
Definition: TransAnime.cs:5
bool animeBlock
Definition: TransAnime.cs:21
bool drawBlock
Definition: TransAnime.cs:25
GameDate date
Definition: World.cs:6
Definition: Zone.cs:12
virtual bool IsSkyLevel
Definition: Zone.cs:269
void RefreshBGM()
Definition: Zone.cs:3103
virtual bool UseFog
Definition: Zone.cs:393
virtual bool AlwaysLowblock
Definition: Zone.cs:397
virtual bool IsUnderwater
Definition: Zone.cs:271
Map map
Definition: Zone.cs:63