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