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