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