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