Elin Decompiled Documentation EA 23.289 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();
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_172c;
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_172c;
886 }
887 }
888 goto IL_174b;
889 IL_1755:
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_172c:
899 if (valueOrDefault == 0 && EMono.Sound.currentPlaylist == EMono.Sound.plLot)
900 {
901 goto IL_174b;
902 }
903 goto IL_1755;
904 IL_174b:
906 goto IL_1755;
907 }
908
909 public void RefreshHeight()
910 {
911 if (EMono.game != null)
912 {
913 float num = (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_7b1b;
1285 IL_6f8a:
1286 int num3;
1287 if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null)
1288 {
1289 param.tile = num3;
1291 }
1292 goto IL_6fea;
1293 IL_7b1b:
1294 if (detail.things.Count == 0 && detail.charas.Count == 0)
1295 {
1296 return;
1297 }
1298 int num4 = 0;
1299 thingPos.x = 0f;
1300 thingPos.y = 0f;
1301 thingPos.z = 0f;
1302 freePos.x = (freePos.y = (freePos.z = 0f));
1303 if (this.cell.HasRamp)
1304 {
1305 Vector3 rampFix = sourceBlock.tileType.GetRampFix(this.cell.blockDir);
1306 param.x += rampFix.x;
1307 param.y += rampFix.y;
1308 param.z += rampFix.z;
1309 freePos.x += rampFix.x;
1310 freePos.y += rampFix.y;
1311 freePos.z += rampFix.z;
1312 }
1313 param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight));
1314 orgPos.x = (orgX = param.x);
1315 orgPos.y = (orgY = param.y);
1316 orgPos.z = (orgZ = param.z);
1317 if (flag && liquidLv > 0)
1318 {
1319 if (liquidLv > 10)
1320 {
1321 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1322 }
1323 liquidLv -= (int)(floatY * 0.5f);
1324 param.liquidLv = liquidLv;
1326 }
1327 Thing thing = null;
1328 bool shadow = liquidLv == 0;
1329 float num5 = 0f;
1330 float num6 = 0f;
1331 float num7 = 0f;
1332 float num8 = 0f;
1333 bool flag6 = false;
1334 float num9 = 0f;
1335 bool flag7 = false;
1336 float num10 = 0f;
1337 if (detail.things.Count > 0 && isSeen)
1338 {
1339 _ = zSetting.max1;
1340 float num11 = 0f;
1341 for (int j = 0; j < detail.things.Count; j++)
1342 {
1343 Thing t = detail.things[j];
1344 if ((fogged && !t.isRoofItem) || ((t.isHidden || t.trait.HideInAdv || t.isMasked) && !EMono.scene.actionMode.ShowMaskedThings) || (t.isRoofItem && ((this.room == null && !sourceBlock.tileType.IsFullBlock && !EMono._zone.IsPCFaction && !buildMode) || (lowBlock && !showFullWall && this.room != null) || (noRoofMode && currentRoom == null))) || (flag3 && !t.isRoofItem))
1345 {
1346 continue;
1347 }
1349 bool isInstalled = t.IsInstalled;
1350 SourcePref pref = t.Pref;
1351 if (!isInstalled && t.category.tileDummy != 0)
1352 {
1354 }
1355 float num12 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height)));
1356 if (t.ignoreStackHeight)
1357 {
1358 thingPos.y -= num5;
1359 thingPos -= altitudeFix * num6;
1360 }
1361 shadow = thingPos.y < 0.16f && num10 < 0.16f;
1362 _ = pref.bypassShadow;
1363 param.shadowFix = 0f - thingPos.y;
1364 param.liquidLv = ((thingPos.y + (float)t.altitude < 0.1f) ? liquidLv : 0);
1365 if (t.isRoofItem)
1366 {
1367 param.snow = isSnowCovered && !this.cell.isClearSnow;
1368 SetRoofHeight(param, this.cell, cx, cz);
1369 _actorPos.x = param.x;
1370 _actorPos.y = param.y;
1371 _actorPos.z = param.z + num11;
1372 if (this.room != null)
1373 {
1374 param.color = GetRoofLight(this.room.lot);
1375 }
1376 shadow = false;
1377 param.liquidLv = 0;
1378 }
1379 else
1380 {
1381 param.snow = snowed;
1382 _actorPos.x = orgX + num8;
1383 _actorPos.y = orgY;
1384 _actorPos.z = orgZ + num11 + thingPos.z;
1385 if (tileType.CanStack || !isInstalled)
1386 {
1387 if (thing?.id != t.id)
1388 {
1389 _actorPos.x += thingPos.x;
1390 }
1391 _actorPos.y += thingPos.y;
1392 if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight))
1393 {
1394 thingPos.y -= num5;
1395 if (thing != null)
1396 {
1397 _actorPos.z -= 0.2f;
1398 thingPos.z -= 0.2f;
1399 }
1400 _actorPos.y -= num5;
1401 }
1402 _actorPos.z += renderSetting.thingZ + (float)j * -0.01f + zSetting.mod1 * thingPos.y;
1403 }
1404 if (isInstalled)
1405 {
1406 if (t.TileType.IsRamp)
1407 {
1408 Vector3 rampFix2 = t.TileType.GetRampFix(t.dir, pref);
1409 orgX += rampFix2.x;
1410 orgY += rampFix2.y;
1411 orgZ += rampFix2.z;
1412 freePos.x += rampFix2.x;
1413 freePos.y += rampFix2.y;
1414 freePos.z += rampFix2.z;
1415 if (!this.cell.IsTopWater || t.altitude > 0)
1416 {
1417 num10 += rampFix2.y;
1418 }
1419 liquidLv -= (int)(rampFix2.y * 150f);
1420 if (liquidLv < 0)
1421 {
1422 liquidLv = 0;
1423 }
1424 }
1425 else if (!flag7 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight)
1426 {
1427 orgY += num12 + (float)t.altitude * altitudeFix.y;
1428 orgZ += (float)t.altitude * altitudeFix.z;
1429 freePos.y += num12 + (float)t.altitude * altitudeFix.y;
1430 if (!this.cell.IsTopWater || t.altitude > 0)
1431 {
1432 num10 += num12 + (float)t.altitude * altitudeFix.y;
1433 }
1434 _actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
1435 _actorPos.z += pref.z;
1436 thingPos.z += pref.z;
1437 liquidLv -= (int)(num12 * 150f);
1438 if (liquidLv < 0)
1439 {
1440 liquidLv = 0;
1441 }
1442 }
1443 else
1444 {
1445 thingPos.y += num12;
1447 {
1448 if ((tileType != TileType.Illumination || !this.cell.HasObj) && !tileType.AlwaysShow)
1449 {
1451 {
1452 continue;
1453 }
1454 if (hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom)))
1455 {
1456 Room room = ((t.dir == 0) ? this.cell.Back.room : this.cell.Left.room);
1458 {
1459 if (room == null || !room.data.showWallItem)
1460 {
1461 continue;
1462 }
1463 }
1464 else if (t.altitude >= lowWallObjAltitude)
1465 {
1466 continue;
1467 }
1468 }
1469 }
1471 {
1472 flag6 = true;
1473 }
1475 shadow = false;
1476 param.liquidLv = 0;
1477 if (t.freePos)
1478 {
1479 _actorPos.x += t.fx;
1480 _actorPos.y += t.fy;
1481 }
1482 }
1483 else
1484 {
1485 thingPos.y += (float)t.altitude * altitudeFix.y;
1486 thingPos.z += (float)t.altitude * altitudeFix.z;
1487 }
1488 _actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
1489 _actorPos.z += pref.z;
1490 if (pref.height >= 0f)
1491 {
1492 thingPos.z += pref.z;
1493 }
1494 }
1495 if (!tileType.UseMountHeight && j > 10)
1496 {
1497 flag7 = true;
1498 }
1499 }
1500 else
1501 {
1502 thingPos.y += num12;
1503 _actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
1504 _actorPos.z += pref.z;
1505 thingPos.z += pref.z;
1506 }
1507 if (t.isFloating && isWater && !hasBridge && !flag)
1508 {
1509 flag = true;
1510 float num13 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
1511 orgY += 0.01f * floatY - num13;
1513 {
1514 num9 = num12;
1515 }
1516 _actorPos.y += 0.01f * floatY - num13;
1517 if (liquidLv > 10)
1518 {
1519 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1520 }
1521 liquidLv -= (int)(floatY * 0.5f);
1522 if (liquidLv < 0)
1523 {
1524 liquidLv = 0;
1525 }
1526 param.liquidLv = liquidLv;
1527 }
1528 num5 = num12;
1529 if (t.sourceCard.multisize && !t.trait.IsGround)
1530 {
1531 num11 += zSetting.multiZ;
1532 }
1533 orgZ += t.renderer.data.stackZ;
1534 if (param.liquidLv > 0)
1535 {
1536 param.liquidLv += pref.liquidMod;
1537 if (param.liquidLv < 1)
1538 {
1539 param.liquidLv = 1;
1540 }
1541 else if (param.liquidLv > 99 + pref.liquidModMax)
1542 {
1543 param.liquidLv = 99 + pref.liquidModMax;
1544 }
1545 }
1546 }
1547 if (!isInstalled || !tileType.UseMountHeight)
1548 {
1549 if (t.altitude != 0)
1550 {
1552 if (!t.isRoofItem)
1553 {
1554 num7 += (float)t.altitude;
1555 num6 = t.altitude;
1556 }
1557 }
1558 if (num7 >= 2f && ((this.cell.Back.room != null && this.cell.Back.IsRoomEdge) || (this.cell.Left.room != null && this.cell.Left.IsRoomEdge)) && hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom)))
1559 {
1560 continue;
1561 }
1562 if (t.freePos)
1563 {
1564 if (t.isRoofItem)
1565 {
1566 _actorPos.x += t.fx;
1567 _actorPos.y += t.fy - (float)t.altitude * altitudeFix.y;
1568 }
1569 else
1570 {
1571 _actorPos.x = orgX + t.fx - freePos.x;
1572 _actorPos.y = orgY + t.fy - freePos.y;
1573 }
1574 }
1575 if (t.trait is TraitDoor && (t.trait as TraitDoor).IsOpen())
1576 {
1577 _actorPos.z += -0.5f;
1578 }
1579 }
1580 if (!t.sourceCard.multisize || (t.pos.x == cx && t.pos.z == cz))
1581 {
1582 if (iconMode != 0)
1583 {
1584 int num14 = 0;
1585 switch (iconMode)
1586 {
1587 case CardIconMode.Visibility:
1588 if (t.isMasked)
1589 {
1590 num14 = 17;
1591 }
1592 break;
1593 case CardIconMode.State:
1594 if (t.placeState == PlaceState.installed)
1595 {
1596 num14 = 18;
1597 }
1598 break;
1599 case CardIconMode.Deconstruct:
1600 if (t.isDeconstructing)
1601 {
1602 num14 = 14;
1603 }
1604 break;
1605 }
1607 {
1608 num14 = 13;
1609 }
1610 if (num14 != 0)
1611 {
1612 passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num14);
1613 }
1614 }
1616 if (_lowblock && t.trait.UseLowblock && !this.cell.HasFullBlock)
1617 {
1618 param.tile += ((param.tile < 0f) ? (-64) : 64);
1619 }
1620 if (t.trait is TraitTrolley && EMono.pc.ai is AI_Trolley aI_Trolley && aI_Trolley.trolley.owner == t)
1621 {
1622 RenderParam _param = new RenderParam(param);
1623 EMono.core.actionsLateUpdate.Add(delegate
1624 {
1625 t.SetRenderParam(_param);
1626 _actorPos.x = EMono.pc.renderer.position.x;
1627 _actorPos.y = EMono.pc.renderer.position.y - pref.height;
1628 _actorPos.z = EMono.pc.renderer.position.z + 0.02f;
1629 t.renderer.Draw(_param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow));
1630 });
1631 }
1632 else
1633 {
1634 t.renderer.Draw(param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow));
1635 }
1636 }
1637 if (isInstalled)
1638 {
1639 num8 += pref.stackX * (float)((!t.flipX) ? 1 : (-1));
1640 }
1641 param.x = orgX;
1642 param.y = orgY;
1643 param.z = orgZ;
1644 param.color = floorLight;
1645 thing = t;
1646 if (pref.Float)
1647 {
1648 liquidLv = 0;
1649 }
1650 }
1651 }
1652 orgY += num9;
1653 if (detail.charas.Count <= 0)
1654 {
1655 return;
1656 }
1657 param.shadowFix = 0f - num10;
1658 param.color += 1310720f;
1659 float max = zSetting.max2;
1660 for (int k = 0; k < detail.charas.Count; k++)
1661 {
1662 Chara chara = detail.charas[k];
1663 if (chara.host != null)
1664 {
1665 continue;
1666 }
1667 if (chara != EMono.pc && chara != LayerDrama.alwaysVisible)
1668 {
1669 if (chara.mimicry != null)
1670 {
1671 if (flag3 || fogged || !this.cell.isSeen)
1672 {
1673 continue;
1674 }
1675 }
1676 else if (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara)))
1677 {
1678 continue;
1679 }
1680 }
1681 _actorPos.x = orgX;
1682 _actorPos.y = orgY;
1683 _actorPos.z = orgZ;
1684 chara.SetRenderParam(param);
1685 _ = chara.IsAliveInCurrentZone;
1686 if (chara.isRestrained)
1687 {
1688 TraitShackle restrainer = chara.GetRestrainer();
1689 if (restrainer != null)
1690 {
1691 Vector3 getRestrainPos = restrainer.GetRestrainPos;
1692 if (getRestrainPos != default(Vector3))
1693 {
1694 Vector3 position = restrainer.owner.renderer.position;
1695 float defCharaHeight = EMono.setting.render.defCharaHeight;
1696 float num15 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.source.pref.height);
1697 _actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.owner.dir % 2 == 0) ? 1 : (-1));
1698 _actorPos.y = position.y + num15;
1699 _actorPos.z = position.z + getRestrainPos.z;
1700 param.liquidLv = 0;
1701 param.shadowFix = orgY - _actorPos.y;
1702 chara.renderer.SetFirst(first: true);
1703 chara.renderer.Draw(param, ref _actorPos, drawShadow: true);
1704 param.shadowFix = 0f;
1705 continue;
1706 }
1707 }
1708 }
1709 if (!chara.sourceCard.multisize || (chara.pos.x == cx && chara.pos.z == cz))
1710 {
1711 if (chara.IsDeadOrSleeping && chara.IsPCC)
1712 {
1713 float num16 = chara.renderer.data.size.y * 0.3f;
1714 if (thingPos.y > max)
1715 {
1716 thingPos.y = max;
1717 }
1718 float num17 = thingPos.y + num16;
1719 float num18 = (float)k * -0.01f;
1720 if (num17 > zSetting.thresh1)
1721 {
1722 num18 = zSetting.mod1;
1723 }
1724 _actorPos.x += thingPos.x;
1725 _actorPos.y += thingPos.y;
1726 _actorPos.z += renderSetting.laydownZ + num18;
1727 param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0);
1728 thingPos.y += num16 * 0.8f;
1729 chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
1730 }
1731 else
1732 {
1733 param.liquidLv = liquidLv;
1734 if (isUnderwater)
1735 {
1736 if (chara.Pref.FloatUnderwater)
1737 {
1738 float num19 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
1739 float num20 = floatYs[chara.uid % 10] + 10f + (float)(chara.uid % 30);
1740 orgY += 0.01f * num20 - num19;
1741 _actorPos.y += 0.01f * num20 - num19;
1742 param.shadowFix -= 0.01f * num20 - num19;
1743 }
1744 }
1745 else if (liquidLv > 0)
1746 {
1747 if (chara.Pref.Float && !flag && !hasBridge)
1748 {
1749 if (liquidLv > 20)
1750 {
1751 float num21 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
1752 orgY += 0.01f * floatY - num21;
1753 _actorPos.y += 0.01f * floatY - num21;
1754 int num22 = TileType.FloorWaterShallow.LiquidLV * 10;
1755 num22 -= (int)(floatY * 0.5f);
1756 param.liquidLv = num22;
1757 }
1758 else
1759 {
1760 param.liquidLv -= 20;
1761 }
1762 }
1763 param.liquidLv += chara.Pref.liquidMod;
1764 if (param.liquidLv < 1)
1765 {
1766 param.liquidLv = 1;
1767 }
1768 else if (param.liquidLv > 99 + chara.Pref.liquidModMax)
1769 {
1770 param.liquidLv = 99 + chara.Pref.liquidModMax;
1771 }
1772 }
1773 if (!chara.IsPC && !chara.renderer.IsMoving && detail.charas.Count > 1 && (detail.charas.Count != 2 || !detail.charas[0].IsDeadOrSleeping || !detail.charas[0].IsPCC))
1774 {
1775 _actorPos += renderSetting.charaPos[1 + ((num4 < 4) ? num4 : 3)];
1776 }
1777 _actorPos.z += 0.01f * (float)k + renderSetting.charaZ;
1778 num4++;
1779 if (flag6)
1780 {
1781 _actorPos.z += chara.renderer.data.hangedFixZ;
1782 }
1783 chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
1784 }
1785 }
1786 param.x = orgX;
1787 param.y = orgY;
1788 param.z = orgZ;
1789 }
1790 return;
1791 IL_6fea:
1792 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)))
1793 {
1794 snowed = true;
1795 }
1796 if (this.cell.effect != null)
1797 {
1798 if (this.cell.effect.IsLiquid)
1799 {
1800 SourceCellEffect.Row sourceEffect = this.cell.sourceEffect;
1801 SourceMaterial.Row defaultMaterial = sourceEffect.DefaultMaterial;
1802 tile = 4 + Rand.bytes[index % Rand.MaxBytes] % 4;
1803 param.tile = tile + this.cell.sourceEffect._tiles[0];
1804 param.mat = defaultMaterial;
1805 param.matColor = ((this.cell.effect.color == 0) ? GetColorInt(ref defaultMaterial.matColor, sourceEffect.colorMod) : this.cell.effect.color);
1806 sourceEffect.renderData.Draw(param);
1807 }
1808 else
1809 {
1810 param.tile = this.cell.effect.source._tiles[0];
1811 SourceCellEffect.Row sourceEffect2 = this.cell.sourceEffect;
1812 if (sourceEffect2.anime.Length != 0)
1813 {
1814 if (sourceEffect2.anime.Length > 2)
1815 {
1816 float num23 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2];
1817 if (!(num23 >= (float)sourceEffect2.anime[0]))
1818 {
1819 param.tile += num23;
1820 }
1821 }
1822 else
1823 {
1824 float num24 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0];
1825 param.tile += num24;
1826 }
1827 }
1828 if (this.cell.effect.IsFire)
1829 {
1831 }
1832 else
1833 {
1834 this.cell.effect.source.renderData.Draw(param);
1835 }
1836 }
1837 }
1838 param.color = floorLight;
1839 if (this.cell.critter != null)
1840 {
1841 Critter critter = this.cell.critter;
1842 int snowTile = critter.tile;
1843 if (snowed && critter.SnowTile != 0)
1844 {
1845 critter.x = 0.06f;
1846 critter.y = -0.06f;
1847 snowTile = critter.SnowTile;
1848 }
1849 else
1850 {
1851 critter.Update();
1852 }
1853 pass = passObjSS;
1855 batch.matrices[pass.idx].m03 = param.x + (float)(int)(critter.x * 100f) * 0.01f;
1856 batch.matrices[pass.idx].m13 = param.y + (float)(int)(critter.y * 100f) * 0.01f;
1857 batch.matrices[pass.idx].m23 = param.z;
1858 batch.tiles[pass.idx] = snowTile * ((!critter.reverse) ? 1 : (-1));
1860 pass.idx++;
1861 if (pass.idx == pass.batchSize)
1862 {
1863 pass.NextBatch();
1864 }
1865 }
1866 if (detail != null)
1867 {
1868 TransAnime anime3 = detail.anime;
1869 if (anime3 != null && !anime3.animeBlock)
1870 {
1871 TransAnime anime4 = detail.anime;
1872 param.x += anime4.v.x;
1873 param.y += anime4.v.y;
1874 param.z += anime4.v.z;
1875 }
1876 }
1877 if (this.cell.obj != 0 && !this.cell.sourceObj.renderData.SkipOnMap)
1878 {
1879 SourceObj.Row sourceObj = this.cell.sourceObj;
1880 if (!snowed || sourceObj.snowTile <= 0)
1881 {
1882 param.snow = snowed;
1883 param.mat = this.cell.matObj;
1884 orgY = param.y;
1885 if (param.liquidLv > 0)
1886 {
1887 if (sourceObj.pref.Float)
1888 {
1889 param.y += 0.01f * floatY;
1890 if (liquidLv > 10)
1891 {
1892 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1893 }
1894 liquidLv -= (int)(floatY * 0.5f);
1895 param.liquidLv = liquidLv;
1896 }
1897 if (sourceObj.tileType.IsWaterTop)
1898 {
1899 param.liquidLv = 0;
1900 }
1901 else
1902 {
1903 param.liquidLv += sourceObj.pref.liquidMod;
1904 if (param.liquidLv < 1)
1905 {
1906 param.liquid = 1f;
1907 }
1908 else if (param.liquidLv > 99 + sourceObj.pref.liquidModMax)
1909 {
1910 param.liquidLv = 99 + sourceObj.pref.liquidModMax;
1911 }
1912 }
1913 }
1914 if (sourceObj.useAltColor)
1915 {
1916 param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, sourceObj.colorMod));
1917 }
1918 else
1919 {
1920 param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, sourceObj.colorMod));
1921 }
1922 if (sourceObj.HasGrowth)
1923 {
1924 this.cell.growth.OnRenderTileMap(param);
1925 }
1926 else
1927 {
1928 if (this.cell.autotileObj != 0)
1929 {
1930 param.tile = sourceObj._tiles[0] + this.cell.autotileObj;
1931 }
1932 else if (sourceObj.tileType.IsUseBlockDir)
1933 {
1934 param.tile = sourceObj._tiles[this.cell.blockDir % sourceObj._tiles.Length];
1935 }
1936 else
1937 {
1938 param.tile = sourceObj._tiles[this.cell.objDir % sourceObj._tiles.Length];
1939 }
1940 if (_lowblock && sourceObj.tileType.IsSkipLowBlock)
1941 {
1942 param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
1943 }
1944 orgY = param.y;
1945 orgZ = param.z;
1946 param.y += sourceObj.pref.y;
1947 param.z += sourceObj.pref.z;
1948 sourceObj.renderData.Draw(param);
1949 param.y = orgY;
1950 param.z = orgZ;
1951 int shadow3 = sourceObj.pref.shadow;
1952 if (shadow3 > 1 && !this.cell.ignoreObjShadow)
1953 {
1954 passShadow.AddShadow(param.x + sourceObj.renderData.offsetShadow.x, param.y + sourceObj.renderData.offsetShadow.y, param.z + sourceObj.renderData.offsetShadow.z, ShadowData.Instance.items[shadow3], sourceObj.pref, 0, param.snow);
1955 }
1956 param.y = orgY;
1957 }
1958 }
1959 }
1960 if (this.cell.decal != 0 && sourceFloor.tileType.AllowBlood)
1961 {
1962 passDecal.Add(param, (int)this.cell.decal, floorLight);
1963 }
1964 if (highlightCells)
1965 {
1966 switch (ActionMode.FlagCell.mode)
1967 {
1968 case AM_FlagCell.Mode.flagWallPillar:
1969 if (this.cell.isToggleWallPillar)
1970 {
1971 passArea.Add(param, 34f, 0f);
1972 }
1973 break;
1974 case AM_FlagCell.Mode.flagSnow:
1975 if (this.cell.isClearSnow)
1976 {
1977 passArea.Add(param, 34f, 0f);
1978 }
1979 break;
1980 case AM_FlagCell.Mode.flagFloat:
1981 if (this.cell.isForceFloat)
1982 {
1983 passArea.Add(param, 34f, 0f);
1984 }
1985 break;
1986 case AM_FlagCell.Mode.flagClear:
1987 if (this.cell.isClearArea)
1988 {
1989 passArea.Add(param, 34f, 0f);
1990 }
1991 break;
1992 }
1993 }
1994 if (detail == null)
1995 {
1996 return;
1997 }
1998 if (highlightArea && detail.area != null)
1999 {
2000 passArea.Add(param, (int)detail.area.GetTile(index) - ((!subtleHighlightArea) ? 1 : 0), 0f);
2001 }
2002 if (detail.footmark != null && sourceFloor.id != 0)
2003 {
2004 param.tile = detail.footmark.tile;
2005 param.mat = matFloor;
2006 param.matColor = 104025f;
2008 }
2009 goto IL_7b1b;
2010 IL_169b:
2011 if (this.cell.isSlopeEdge)
2012 {
2013 float num25 = (float)height * _heightMod.y;
2014 orgY = param.y;
2015 orgZ = param.z;
2016 param.dir = this.cell.blockDir;
2017 if (snowed)
2018 {
2019 param.color = floorLight;
2020 }
2021 SourceBlock.Row defBlock;
2022 if (sourceBlock.tileType.IsFullBlock)
2023 {
2024 defBlock = sourceBlock;
2025 param.mat = matBlock;
2026 param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
2027 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
2028 }
2029 else
2030 {
2031 defBlock = sourceFloor._defBlock;
2032 param.mat = matFloor;
2033 param.tile = defBlock._tiles[this.cell.blockDir % defBlock._tiles.Length];
2034 if (defBlock.id != 1)
2035 {
2036 param.matColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
2037 }
2038 else
2039 {
2040 param.matColor = 104025f;
2041 }
2042 }
2043 for (int l = 0; (float)l < num25 / heightBlockSize; l++)
2044 {
2045 param.y += ugFix.y;
2046 param.z += ugFix.z + slopeFixZ * (float)l;
2047 defBlock.renderData.Draw(param);
2048 if (this.cell.pcSync && EMono.player.lightPower > 0f)
2049 {
2050 float num26 = param.tile;
2051 param.tile = 0f;
2053 param.tile = num26;
2054 }
2055 }
2056 param.y = orgY;
2057 param.z = orgZ;
2058 }
2059 param.color = floorLight;
2060 if (!isWater && (this.cell.Front.sourceFloor.tileType.IsWater || this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
2061 {
2062 orgY = param.y;
2063 orgZ = param.z;
2064 int num27 = 0;
2065 if (sourceBlock.tileType.IsFullBlock)
2066 {
2068 num27 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
2069 }
2070 else
2071 {
2072 SourceBlock.Row row3 = sourceFloor._defBlock;
2073 num27 = row3._tiles[this.cell.blockDir % row3._tiles.Length];
2074 }
2075 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)
2076 {
2077 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;
2078 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z;
2079 param.tile = num27 + ((!this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
2081 }
2082 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)
2083 {
2084 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;
2085 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z;
2086 param.tile = num27 + ((!this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
2088 }
2089 param.y = orgY;
2090 param.z = orgZ;
2091 }
2092 if (showBorder && !this.cell.outOfBounds)
2093 {
2094 param.matColor = 104025f;
2095 if (cx == EMono._map.bounds.x)
2096 {
2097 renderBorder.Draw(param, 12 + (EMono.world.date.IsNight ? 4 : 0));
2098 }
2099 else if (cx == EMono._map.bounds.maxX)
2100 {
2101 renderBorder.Draw(param, 13 + (EMono.world.date.IsNight ? 4 : 0));
2102 }
2103 if (cz == EMono._map.bounds.z)
2104 {
2105 renderBorder.Draw(param, 14 + (EMono.world.date.IsNight ? 4 : 0));
2106 }
2107 else if (cz == EMono._map.bounds.maxZ)
2108 {
2109 renderBorder.Draw(param, 15 + (EMono.world.date.IsNight ? 4 : 0));
2110 }
2111 }
2112 if (this.cell.isSkyFloor || (detail != null && detail.anime != null && detail.anime.drawBlock))
2113 {
2114 orgY = param.y;
2115 orgZ = param.z;
2116 SourceBlock.Row defBlock2 = sourceFloor._defBlock;
2117 param.mat = matFloor;
2118 param.tile = defBlock2._tiles[this.cell.blockDir % defBlock2._tiles.Length];
2119 if (defBlock2.id != 1)
2120 {
2121 param.matColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
2122 }
2123 else
2124 {
2125 param.matColor = 104025f;
2126 }
2127 for (int m = 0; m < ((!this.cell.isSkyFloor) ? 1 : EMono._map.config.skyBlockHeight); m++)
2128 {
2129 param.y += ugFix.y;
2130 param.z += ugFix.z + slopeFixZ * (float)m;
2131 defBlock2.renderData.Draw(param);
2132 }
2133 param.y = orgY;
2134 param.z = orgZ;
2135 }
2136 if (!sourceFloor.tileType.IsSkipFloor)
2137 {
2138 if ((hasBridge && sourceBridge.tileType.CastShadowSelf) || this.cell.castFloorShadow)
2139 {
2140 floorLight2 = _lightMod * light * 0.2f + _baseBrightness + _shadowStrength * floorShadowStrength * (isWater ? 0.7f : (hasBridge ? 1f : (0.6f * (1f - nightRatio))));
2141 if (snowed)
2142 {
2143 floorLight2 = (int)((double)floorLight2 * 0.85 * 50.0) * 262144 + snowColorToken;
2144 }
2145 else
2146 {
2147 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);
2148 }
2149 param.color = floorLight2;
2150 if (this.cell.lotShade)
2151 {
2153 }
2154 }
2155 floorMatColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
2156 if (isWater && flag)
2157 {
2158 param.y -= 0.01f * floatY;
2159 }
2160 if (!sourceBlock.tileType.IsSkipFloor || sourceBlock.transparent || hasBridge || this.cell.hasDoor || this.cell.skipRender)
2161 {
2162 param.mat = matFloor;
2163 param.tile = sourceFloor._tiles[floorDir % sourceFloor._tiles.Length];
2164 param.matColor = floorMatColor;
2165 param.snow = snowed;
2166 if (this.cell.isDeck)
2167 {
2168 param.z += 1f;
2169 if ((bool)sourceFloor.renderData.subData)
2170 {
2171 sourceFloor.renderData.subData.Draw(param);
2172 }
2173 sourceFloor.renderData.Draw(param);
2174 param.z -= 1f;
2175 }
2176 else
2177 {
2178 if ((bool)sourceFloor.renderData.subData)
2179 {
2180 sourceFloor.renderData.subData.Draw(param);
2181 }
2182 sourceFloor.renderData.Draw(param);
2183 }
2184 int num28 = 0;
2185 if (isSnowCovered && sourceFloor == FLOOR.sourceSnow && !this.cell.hasDoor)
2186 {
2187 if (!this.cell.Right.IsSnowTile && this.cell.Right.topHeight == this.cell.topHeight)
2188 {
2189 num28++;
2190 }
2191 if (!this.cell.Front.IsSnowTile && this.cell.Front.topHeight == this.cell.topHeight)
2192 {
2193 num28 += 2;
2194 }
2195 if (num28 != 0)
2196 {
2197 param.tile = 448 + num28 + 12;
2198 param.z -= 0.1f;
2199 sourceFloor.renderData.Draw(param);
2200 param.z += 0.1f;
2201 }
2202 }
2203 if (this.cell.shadow != 0 && !hasBridge && !this.cell.skipRender)
2204 {
2205 if (snowed)
2206 {
2208 {
2209 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2210 param.z -= 0.01f;
2211 sourceFloor.renderData.Draw(param);
2212 }
2213 }
2214 else
2215 {
2216 pass = passEdge;
2218 batch.matrices[pass.idx].m03 = param.x + ambientShadowFix[this.cell.shadow].x;
2219 batch.matrices[pass.idx].m13 = param.y + ambientShadowFix[this.cell.shadow].y;
2220 batch.matrices[pass.idx].m23 = param.z + ambientShadowFix[this.cell.shadow].z;
2221 batch.tiles[pass.idx] = 448 + this.cell.shadow;
2223 batch.matColors[pass.idx] = 104025f;
2224 pass.idx++;
2225 if (pass.idx == pass.batchSize)
2226 {
2227 pass.NextBatch();
2228 }
2229 }
2230 if (!sourceFloor.ignoreTransition && !snowed)
2231 {
2232 Cell back = this.cell.Back;
2233 if (back.sourceBlock.transition[0] != -1 && back.isSeen && !back.hasDoor)
2234 {
2235 pass = passFloor;
2237 batch.matrices[pass.idx].m03 = param.x + transitionFix[0].x;
2238 batch.matrices[pass.idx].m13 = param.y + transitionFix[0].y;
2239 batch.matrices[pass.idx].m23 = param.z + transitionFix[0].z;
2240 batch.tiles[pass.idx] = 480 + back.sourceBlock.transition[0] + Rand.bytes[index % Rand.MaxBytes] % back.sourceBlock.transition[1];
2242 batch.matColors[pass.idx] = GetColorInt(ref back.matBlock.matColor, back.sourceBlock.colorMod);
2243 pass.idx++;
2244 if (pass.idx == pass.batchSize)
2245 {
2246 pass.NextBatch();
2247 }
2248 }
2249 back = this.cell.Left;
2250 if (back.sourceBlock.transition[0] != -1 && back.isSeen && !back.hasDoor)
2251 {
2252 pass = passFloor;
2254 batch.matrices[pass.idx].m03 = param.x + transitionFix[1].x;
2255 batch.matrices[pass.idx].m13 = param.y + transitionFix[1].y;
2256 batch.matrices[pass.idx].m23 = param.z + transitionFix[1].z;
2257 batch.tiles[pass.idx] = 512 + back.sourceBlock.transition[0] + Rand.bytes[index % Rand.MaxBytes] % back.sourceBlock.transition[1];
2259 batch.matColors[pass.idx] = GetColorInt(ref back.matBlock.matColor, back.sourceBlock.colorMod);
2260 pass.idx++;
2261 if (pass.idx == pass.batchSize)
2262 {
2263 pass.NextBatch();
2264 }
2265 }
2266 }
2267 }
2268 if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num28 == 0)
2269 {
2270 pass = (isWater ? passAutoTileWater : passAutoTile);
2272 batch.matrices[pass.idx].m03 = param.x;
2273 batch.matrices[pass.idx].m13 = param.y;
2274 batch.matrices[pass.idx].m23 = param.z + ((hasBridge || this.cell._block != 0) ? 0.8f : 0f);
2275 batch.tiles[pass.idx] = (26 + sourceFloor.autotile / 2) * 32 + sourceFloor.autotile % 2 * 16 + this.cell.autotile;
2276 batch.colors[pass.idx] = param.color + (float)((int)(sourceFloor.autotileBrightness * 100f) * 262144);
2278 pass.idx++;
2279 if (pass.idx == pass.batchSize)
2280 {
2281 pass.NextBatch();
2282 }
2283 }
2284 }
2285 if (isWater)
2286 {
2287 int num29 = 12;
2288 int num30 = this.cell.shore / num29;
2289 int num31 = this.cell.shore % num29;
2290 bool isShoreSand = this.cell.isShoreSand;
2291 if (this.cell.shore != 0)
2292 {
2293 Cell cell = ((((uint)num30 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num30 & 2u) != 0) ? this.cell.Right : ((((uint)num30 & 4u) != 0) ? this.cell.Front : this.cell.Left)));
2294 if (isShoreSand && !cell.sourceFloor.isBeach)
2295 {
2296 cell = ((((uint)num30 & 8u) != 0) ? this.cell.Left : ((((uint)num30 & 4u) != 0) ? this.cell.Front : ((((uint)num30 & 2u) != 0) ? this.cell.Right : this.cell.Back)));
2297 }
2298 if (!cell.IsSnowTile)
2299 {
2300 param.matColor = GetColorInt(ref cell.matFloor.matColor, cell.sourceFloor.colorMod);
2301 if (isShoreSand)
2302 {
2303 pass = passShore;
2305 batch.matrices[pass.idx].m03 = param.x;
2306 batch.matrices[pass.idx].m13 = param.y;
2307 batch.matrices[pass.idx].m23 = param.z;
2308 batch.tiles[pass.idx] = 768 + this.cell.shore / num29;
2311 pass.idx++;
2312 if (pass.idx == pass.batchSize)
2313 {
2314 pass.NextBatch();
2315 }
2316 num31 = 2;
2317 }
2318 else
2319 {
2320 num31 = cell.sourceFloor.edge;
2321 }
2322 param.tile = (24 + num31 / 2) * 32 + num31 % 2 * 16 + num30;
2324 }
2325 }
2326 if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num29) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num29) & (true ? 1u : 0u)) != 0)
2327 {
2328 param.tile = 785f;
2329 param.matColor = GetColorInt(ref this.cell.BackLeft.matFloor.matColor, this.cell.BackLeft.sourceFloor.colorMod);
2331 Draw(60);
2332 }
2333 if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num29) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num29) & (true ? 1u : 0u)) != 0)
2334 {
2335 param.tile = 786f;
2336 param.matColor = GetColorInt(ref this.cell.BackRight.matFloor.matColor, this.cell.BackRight.sourceFloor.colorMod);
2338 Draw(56);
2339 }
2340 if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num29) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num29) & 4u) != 0)
2341 {
2342 param.tile = 787f;
2343 param.matColor = GetColorInt(ref this.cell.FrontRight.matFloor.matColor, this.cell.FrontRight.sourceFloor.colorMod);
2345 Draw(48);
2346 }
2347 if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num29) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num29) & 4u) != 0)
2348 {
2349 param.tile = 788f;
2350 param.matColor = GetColorInt(ref this.cell.FrontLeft.matFloor.matColor, this.cell.FrontLeft.sourceFloor.colorMod);
2352 Draw(52);
2353 }
2354 if (this.cell._bridge != 0 && this.cell.isBridgeEdge && this.cell.bridgePillar != byte.MaxValue)
2355 {
2356 pass = passEdge;
2358 batch.matrices[pass.idx].m03 = param.x + waterEdgeBridgeFix.x;
2359 batch.matrices[pass.idx].m13 = param.y + waterEdgeBridgeFix.y;
2360 batch.matrices[pass.idx].m23 = param.z + waterEdgeBridgeFix.z;
2361 batch.tiles[pass.idx] = 616 + waterAnimeIndex % 4;
2363 batch.matColors[pass.idx] = 104025f;
2364 pass.idx++;
2365 if (pass.idx == pass.batchSize)
2366 {
2367 pass.NextBatch();
2368 }
2369 }
2370 bool flag8 = false;
2371 if (isShoreSand)
2372 {
2373 if (((uint)num30 & (true ? 1u : 0u)) != 0)
2374 {
2375 if (((uint)num30 & 8u) != 0)
2376 {
2377 if ((num30 & 2) == 0 && (num30 & 4) == 0)
2378 {
2379 Draw(16);
2380 }
2381 flag8 = true;
2382 }
2383 if (((uint)num30 & 2u) != 0)
2384 {
2385 if ((num30 & 8) == 0 && (num30 & 4) == 0)
2386 {
2387 Draw(20);
2388 }
2389 flag8 = true;
2390 }
2391 }
2392 if (((uint)num30 & 4u) != 0)
2393 {
2394 if (((uint)num30 & 8u) != 0)
2395 {
2396 if ((num30 & 2) == 0 && (num30 & 1) == 0)
2397 {
2398 Draw(24);
2399 }
2400 flag8 = true;
2401 }
2402 if (((uint)num30 & 2u) != 0)
2403 {
2404 if ((num30 & 8) == 0 && (num30 & 1) == 0)
2405 {
2406 Draw(28);
2407 }
2408 flag8 = true;
2409 }
2410 }
2411 if (!flag8)
2412 {
2413 if (!this.cell.Front.sourceFloor.tileType.IsWater && !this.cell.Front.isDeck)
2414 {
2415 Draw(8);
2416 }
2417 if (!this.cell.Right.sourceFloor.tileType.IsWater && !this.cell.Right.isDeck)
2418 {
2419 Draw(12);
2420 }
2421 }
2422 }
2423 if (!flag8)
2424 {
2425 if (!this.cell.Back.sourceFloor.tileType.IsWater && !this.cell.Back.isDeck)
2426 {
2427 pass = passEdge;
2429 batch.tiles[pass.idx] = 608 + waterAnimeIndex % 4;
2430 batch.matColors[pass.idx] = 104025f;
2431 if (((uint)(this.cell.shore / num29) & (true ? 1u : 0u)) != 0)
2432 {
2433 if (isShoreSand)
2434 {
2435 param.matColor = GetColorInt(ref this.cell.Back.matFloor.matColor, this.cell.Back.sourceFloor.colorMod);
2436 batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
2437 batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
2438 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
2441 }
2442 else
2443 {
2444 batch.matrices[pass.idx].m03 = param.x;
2445 batch.matrices[pass.idx].m13 = param.y;
2446 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShore.z;
2447 }
2448 }
2449 else
2450 {
2451 batch.matrices[pass.idx].m03 = param.x;
2452 batch.matrices[pass.idx].m13 = param.y;
2453 batch.matrices[pass.idx].m23 = param.z + waterEdgeFix.z;
2454 batch.tiles[pass.idx] += 12f;
2455 }
2457 pass.idx++;
2458 if (pass.idx == pass.batchSize)
2459 {
2460 pass.NextBatch();
2461 }
2462 }
2463 if (!this.cell.Left.sourceFloor.tileType.IsWater && !this.cell.Left.isDeck)
2464 {
2465 pass = passEdge;
2467 batch.tiles[pass.idx] = 612 + waterAnimeIndex % 4;
2468 batch.matColors[pass.idx] = 104025f;
2469 if (((uint)(this.cell.shore / num29) & 8u) != 0)
2470 {
2471 if (isShoreSand)
2472 {
2473 param.matColor = GetColorInt(ref this.cell.Left.matFloor.matColor, this.cell.Left.sourceFloor.colorMod);
2474 batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
2475 batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
2476 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
2479 }
2480 else
2481 {
2482 batch.matrices[pass.idx].m03 = param.x;
2483 batch.matrices[pass.idx].m13 = param.y;
2484 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShore.z;
2485 }
2486 }
2487 else
2488 {
2489 batch.matrices[pass.idx].m03 = param.x;
2490 batch.matrices[pass.idx].m13 = param.y;
2491 batch.matrices[pass.idx].m23 = param.z + waterEdgeFix.z;
2492 batch.tiles[pass.idx] += 12f;
2493 }
2495 pass.idx++;
2496 if (pass.idx == pass.batchSize)
2497 {
2498 pass.NextBatch();
2499 }
2500 }
2501 }
2502 if (flag)
2503 {
2504 param.y += 0.01f * floatY;
2505 }
2506 }
2507 if (flag)
2508 {
2509 param.z -= 1f;
2510 }
2511 }
2512 if (this.cell.skipRender)
2513 {
2514 if (this.cell.pcSync)
2515 {
2516 param.tile = 0f;
2518 }
2519 return;
2520 }
2521 if (hasBridge)
2522 {
2523 param.y = (float)(cz - cx) * screen.tileAlign.y + (float)(int)this.cell.bridgeHeight * _heightMod.y;
2524 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(int)this.cell.bridgeHeight * _heightMod.z;
2525 if (flag)
2526 {
2527 param.y += 0.01f * floatY;
2528 }
2529 param.color = floorLight;
2530 param.mat = matBridge;
2531 floorMatColor = ((sourceBridge.colorMod == 0) ? 104025 : GetColorInt(ref matBridge.matColor, sourceBridge.colorMod));
2532 param.dir = this.cell.floorDir;
2533 param.tile = sourceBridge._tiles[this.cell.floorDir % sourceBridge._tiles.Length];
2534 param.matColor = floorMatColor;
2535 sourceBridge.renderData.Draw(param);
2536 if (this.cell.autotileBridge != 0 && sourceBridge.autotile != 0)
2537 {
2540 batch.matrices[pass.idx].m03 = param.x;
2541 batch.matrices[pass.idx].m13 = param.y;
2542 batch.matrices[pass.idx].m23 = param.z + ((this.cell._block != 0) ? 0.8f : 0f);
2543 batch.tiles[pass.idx] = (26 + sourceBridge.autotile / 2) * 32 + sourceBridge.autotile % 2 * 16 + this.cell.autotileBridge;
2544 batch.colors[pass.idx] = param.color + (float)((int)(sourceBridge.autotileBrightness * 100f) * 262144);
2546 pass.idx++;
2547 if (pass.idx == pass.batchSize)
2548 {
2549 pass.NextBatch();
2550 }
2551 }
2552 if (this.cell.shadow != 0)
2553 {
2555 {
2556 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2557 param.z -= 0.01f;
2558 sourceBridge.renderData.Draw(param);
2559 }
2560 else
2561 {
2562 pass = passEdge;
2564 batch.matrices[pass.idx].m03 = param.x + ambientShadowFix[this.cell.shadow].x;
2565 batch.matrices[pass.idx].m13 = param.y + ambientShadowFix[this.cell.shadow].y;
2566 batch.matrices[pass.idx].m23 = param.z + ambientShadowFix[this.cell.shadow].z;
2567 batch.tiles[pass.idx] = 448 + this.cell.shadow;
2569 batch.matColors[pass.idx] = 104025f;
2570 pass.idx++;
2571 if (pass.idx == pass.batchSize)
2572 {
2573 pass.NextBatch();
2574 }
2575 }
2576 }
2577 if (this.cell.isBridgeEdge && this.cell.bridgeHeight - this.cell.height >= 3 && this.cell.bridgePillar != byte.MaxValue && !noSlopMode)
2578 {
2579 orgY = param.y;
2580 orgZ = param.z;
2581 param.y += bridgeFix.y;
2582 param.z += bridgeFix.z;
2583 param.dir = 0;
2584 SourceBlock.Row row4 = sourceBridge._bridgeBlock;
2585 float num32 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y;
2586 if (this.cell.sourceFloor.tileType == TileType.Sky)
2587 {
2588 num32 += (float)EMono._map.config.skyBlockHeight;
2589 }
2590 int num33 = (int)(num32 / heightBlockSize) + 2;
2591 if (this.cell.bridgePillar != 0)
2592 {
2593 row4 = EMono.sources.blocks.rows[this.cell.bridgePillar];
2594 param.tile = row4._tiles[0] + ((num33 == 2) ? 32 : 0);
2595 param.mat = ((sourceBridge.DefaultMaterial == row4.DefaultMaterial) ? sourceBridge.DefaultMaterial : row4.DefaultMaterial);
2596 param.matColor = ((row4.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, row4.colorMod));
2597 }
2598 else
2599 {
2600 param.mat = matBlock;
2601 param.tile = row4._tiles[0] + 32;
2602 param.matColor = ((row4.colorMod == 0) ? 104025 : GetColorInt(ref matBridge.matColor, row4.colorMod));
2603 }
2604 param.y += ugFixBridgeTop.y;
2605 param.z += ugFixBridgeTop.z;
2606 for (int n = 0; n < num33; n++)
2607 {
2608 if (n == num33 - 1)
2609 {
2610 param.y = (float)(cz - cx) * screen.tileAlign.y + (float)height * _heightMod.y + ugFixBridgeBottom.y;
2611 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)height * _heightMod.z + ugFixBridgeBottom.z;
2612 }
2613 else
2614 {
2615 param.y += ugFixBridge.y;
2616 param.z += ugFixBridge.z;
2617 }
2618 row4.renderData.Draw(param);
2619 }
2620 param.y = orgY;
2621 param.z = orgZ;
2622 }
2623 }
2624 if (!buildMode && this.cell.highlight != 0)
2625 {
2626 if (this.cell._block != 0 && !this.cell.hasDoor)
2627 {
2628 screen.guide.DrawWall(this.cell.GetPoint(), EMono.Colors.blockColors.MapHighlight, useMarkerPass: true);
2629 }
2630 else
2631 {
2632 passGuideFloor.Add(this.cell.GetPoint(), (int)this.cell.highlight);
2633 }
2634 }
2635 param.color = blockLight;
2636 if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor) && (snowed || this.cell.isClearSnow) && (this.cell.Front.HasRoof || this.cell.Right.HasRoof))
2637 {
2638 snowed = false;
2639 }
2640 num3 = 0;
2641 if (sourceBlock.id != 0)
2642 {
2643 this.tileType = sourceBlock.tileType;
2644 roomHeight = 0f;
2645 int blockDir = this.cell.blockDir;
2646 bool flag9 = false;
2647 switch (wallClipMode)
2648 {
2649 case WallClipMode.ByRoom:
2650 if (!this.tileType.RepeatBlock)
2651 {
2652 break;
2653 }
2654 if (currentRoom == null || showFullWall)
2655 {
2656 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
2658 }
2659 else if (this.room != this.cell.Front.room && (this.cell.Front.room == currentRoom || (this.room?.lot != currentLot && this.cell.Front.room?.lot == currentLot)))
2660 {
2661 this.room = this.cell.Front.room;
2662 _lowblock = !this.cell.Front.lotWall && !this.cell.Front.fullWall;
2663 }
2664 else if (this.room != this.cell.Right.room && (this.cell.Right.room == currentRoom || (this.room?.lot != currentLot && this.cell.Right.room?.lot == currentLot)))
2665 {
2666 this.room = this.cell.Right.room;
2667 _lowblock = !this.cell.Right.lotWall && !this.cell.Right.fullWall;
2668 }
2669 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)))
2670 {
2671 this.room = this.cell.FrontRight.room;
2672 _lowblock = !this.cell.FrontRight.lotWall && !this.cell.FrontRight.fullWall;
2673 }
2674 else
2675 {
2676 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
2677 _lowblock = true;
2678 if (!this.tileType.IsFullBlock)
2679 {
2680 if (this.cell.lotWall)
2681 {
2682 _lowblock = false;
2683 }
2684 else if (this.room == currentRoom)
2685 {
2686 _lowblock = !this.cell.fullWall;
2687 }
2688 }
2689 }
2690 flag9 = (this.room != null && this.room.data.atrium) || (this.cell.room != null && this.cell.room.data.atrium);
2691 if (flag9)
2692 {
2693 _lowblock = false;
2694 }
2695 if (this.room == null && alwaysLowblock)
2696 {
2697 _lowblock = true;
2698 roomHeight = 0f;
2699 }
2700 if (this.room != null)
2701 {
2702 maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)this.room.lot.mh * _heightMod.y;
2703 if (showRoof)
2704 {
2705 roomHeight = this.room.lot.realHeight;
2706 break;
2707 }
2708 if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock))
2709 {
2710 roomHeight = 0f;
2711 break;
2712 }
2713 int num34 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight);
2714 roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num34) ? this.room.lot.height : num34) + 0.01f * (float)this.room.lot.heightFix;
2715 }
2716 break;
2717 case WallClipMode.ByLot:
2718 if (defaultBlockHeight > 0f || isIndoor)
2719 {
2720 _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);
2721 if (!_lowblock)
2722 {
2724 maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)(int)this.cell.TopHeight * _heightMod.y;
2725 }
2726 break;
2727 }
2728 if (showFullWall)
2729 {
2730 _lowblock = this.room != null;
2731 if (_lowblock)
2732 {
2733 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)
2734 {
2735 _lowblock = false;
2736 }
2737 }
2738 else if (this.cell.Back.room != null && this.cell.Back.room.lot == (this.cell.Front.room ?? this.cell.Right.room)?.lot)
2739 {
2740 _lowblock = true;
2741 }
2742 }
2743 else
2744 {
2746 }
2747 if (this.tileType.RepeatBlock)
2748 {
2749 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
2750 if (this.room != null && (!noRoofMode || currentRoom != null) && (!showFullWall || currentRoom == null || this.room.lot == currentRoom.lot))
2751 {
2752 roomHeight = ((_lowblock && !this.tileType.ForceRpeatBlock) ? 0f : this.room.lot.realHeight);
2753 maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)this.room.lot.mh * _heightMod.y;
2754 }
2755 }
2756 break;
2757 }
2758 if (!_lowblock && (double)roomHeight > 1.2 && this.tileType.RepeatBlock)
2759 {
2760 num3 = 1;
2761 }
2762 else if (lowBlock)
2763 {
2764 num3 = 2;
2765 }
2766 param.mat = matBlock;
2767 param.dir = this.cell.blockDir;
2768 param.snow = snowed;
2769 switch (this.tileType.blockRenderMode)
2770 {
2771 case BlockRenderMode.FullBlock:
2772 {
2773 bool invisible = sourceBlock.tileType.Invisible;
2774 if (invisible && (!buildMode || ActionMode.Cinema.IsActive))
2775 {
2776 break;
2777 }
2778 if (this.cell.isSurrounded)
2779 {
2780 switch (innerMode)
2781 {
2782 case InnerMode.InnerBlock:
2783 case InnerMode.BuildMode:
2785 param.color = (int)(50f * blockLight) * 262144;
2786 param.matColor = 104025f;
2787 param.tile = (buildMode ? 1 : 2) + ((_lowblock || defaultBlockHeight > 0f) ? 3000000 : 0);
2789 return;
2790 case InnerMode.None:
2791 case InnerMode.Height:
2792 param.color = blockLight;
2793 break;
2794 }
2795 }
2796 if (snowed)
2797 {
2798 param.color = floorLight;
2799 }
2800 param.color -= (int)(_shadowStrength * 0.8f * 50f) * 262144;
2801 if (currentRoom != null && !showFullWall)
2802 {
2803 _lowblock = true;
2804 roomHeight = 0f;
2805 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))
2806 {
2807 _lowblock = false;
2808 }
2809 if (!_lowblock)
2810 {
2811 int num35 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight);
2812 roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num35) ? currentRoom.lot.height : num35) + 0.01f * (float)currentRoom.lot.heightFix;
2813 }
2814 }
2815 if (flag9)
2816 {
2817 _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);
2818 if (_lowblock)
2819 {
2820 roomHeight = 0f;
2821 }
2822 }
2823 if (invisible)
2824 {
2825 roomHeight = 0f;
2826 _lowblock = false;
2827 }
2828 if (this.cell.Things.Count > 0)
2829 {
2830 _lowblock = false;
2831 }
2832 param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + (_lowblock ? 3000000 : 0);
2833 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
2834 if (roomHeight == 0f)
2835 {
2836 if (!this.cell.hasDoor)
2837 {
2838 sourceBlock.renderData.Draw(param);
2839 }
2840 }
2841 else
2842 {
2843 sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0, isBlock: true);
2844 }
2845 Room room2 = this.cell.Front.room ?? this.cell.room;
2846 if (room2 == null && this.cell.Right.room != null)
2847 {
2848 room2 = this.cell.Right.room;
2849 }
2850 if (!invisible && room2 != null)
2851 {
2852 if (room2.lot.idDeco != 0 && !this.cell.hasDoor)
2853 {
2854 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco);
2855 param.matColor = room2.lot.colDeco;
2856 float y = param.y;
2857 param.y += (float)room2.lot.decoFix * 0.01f;
2859 param.y = y;
2860 }
2861 if (room2.lot.idDeco2 != 0 && roomHeight != 0f && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
2862 {
2863 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2);
2864 param.matColor = room2.lot.colDeco2;
2865 float y2 = param.y;
2866 float num36 = param.z;
2867 param.y += (float)room2.lot.decoFix2 * 0.01f;
2868 param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco;
2870 param.y = y2;
2871 param.z = num36;
2872 }
2873 }
2874 room2 = this.cell.Right.room ?? this.cell.room;
2875 if (room2 == null && this.cell.Front.room != null)
2876 {
2877 room2 = this.cell.Front.room;
2878 }
2879 if (!invisible && room2 != null)
2880 {
2881 if (room2.lot.idDeco != 0 && !this.cell.hasDoor)
2882 {
2883 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco) * -1;
2884 param.matColor = room2.lot.colDeco;
2885 float y3 = param.y;
2886 param.y += (float)room2.lot.decoFix * 0.01f;
2888 param.y = y3;
2889 }
2890 if (room2.lot.idDeco2 != 0 && roomHeight != 0f && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
2891 {
2892 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2) * -1;
2893 param.matColor = room2.lot.colDeco2;
2894 float y4 = param.y;
2895 float num37 = param.z;
2896 param.y += (float)room2.lot.decoFix2 * 0.01f;
2897 param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco;
2899 param.y = y4;
2900 param.z = num37;
2901 }
2902 }
2903 break;
2904 }
2905 case BlockRenderMode.WallOrFence:
2906 {
2908 {
2909 showFullWall = true;
2910 _lowblock = false;
2911 }
2912 orgY = param.y;
2913 orgZ = param.z;
2914 param.color = (this.tileType.IsFence ? (floorLight - (float)((int)(_shadowStrength * 0.8f * 50f) * 262144)) : blockLight);
2915 bool flag10 = blockDir == 1 || _lowblock || flag9;
2916 bool flag11 = blockDir == 0 || _lowblock || flag9;
2917 if (!showFullWall && currentRoom != null)
2918 {
2919 if (!flag10)
2920 {
2921 if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Front.room != currentRoom))
2922 {
2923 if (!this.cell.IsRoomEdge || (this.cell.Front.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
2924 {
2925 flag10 = true;
2926 }
2927 }
2928 else if ((!this.cell.Front.lotWall || this.cell.Front.room?.lot != currentLot) && this.cell.Front.room != currentRoom)
2929 {
2930 flag10 = true;
2931 }
2932 }
2933 if (!flag11)
2934 {
2935 if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Right.room != currentRoom))
2936 {
2937 if (!this.cell.IsRoomEdge || (this.cell.Right.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
2938 {
2939 flag11 = true;
2940 }
2941 }
2942 else if ((!this.cell.Right.lotWall || this.cell.Right.room?.lot != currentLot) && this.cell.Right.room != currentRoom)
2943 {
2944 flag11 = true;
2945 }
2946 }
2947 }
2948 if (blockDir == 0 || blockDir == 2)
2949 {
2950 param.dir = 0;
2951 Room room3 = this.cell.Front.room ?? this.cell.room;
2952 if (room3 != null && this.tileType.IsWall)
2953 {
2954 if (room3.lot.idDeco != 0 && !this.cell.hasDoor)
2955 {
2956 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco);
2957 param.matColor = room3.lot.colDeco;
2958 param.y += (float)room3.lot.decoFix * 0.01f;
2960 param.y = orgY;
2961 }
2962 if (room3.lot.idDeco2 != 0 && roomHeight != 0f && !flag10 && (float)room3.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
2963 {
2964 param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco2);
2965 param.matColor = room3.lot.colDeco2;
2966 param.y += (float)room3.lot.decoFix2 * 0.01f;
2967 param.z += (float)room3.lot.decoFix2 * 0.01f * heightModDeco;
2969 param.y = orgY;
2970 param.z = orgZ;
2971 }
2972 }
2973 Cell left = this.cell.Left;
2974 if (blockDir == 2 && left.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
2975 {
2976 _sourceBlock = left.sourceBlock;
2977 param.mat = left.matBlock;
2978 }
2979 else
2980 {
2982 param.mat = matBlock;
2983 }
2984 this.tileType = _sourceBlock.tileType;
2985 param.tile = (tile = _sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock) ? 32 : 0));
2986 if (_sourceBlock.useAltColor)
2987 {
2988 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
2989 }
2990 else
2991 {
2992 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
2993 }
2994 if (roomHeight == 0f || flag10 || !this.tileType.RepeatBlock)
2995 {
2996 if (!this.cell.hasDoor)
2997 {
2998 _sourceBlock.renderData.Draw(param);
2999 }
3000 }
3001 else
3002 {
3003 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0);
3004 }
3005 param.z += cornerWallFix2.z;
3006 if ((blockDir == 2 || (this.cell.Front.HasWallOrFence && this.cell.Front.blockDir != 0)) != this.cell.isToggleWallPillar)
3007 {
3008 if (this.cell.Back.IsSnowTile && this.cell.Right.IsSnowTile)
3009 {
3010 param.snow = true;
3011 }
3012 param.tile = _sourceBlock._tiles[0] + ((flag10 && flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3013 if (roomHeight == 0f || !this.tileType.RepeatBlock || (flag10 && flag11 && !flag9))
3014 {
3015 _sourceBlock.renderData.Draw(param);
3016 }
3017 else
3018 {
3019 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
3020 }
3021 }
3022 if (!flag10 && !showRoof && this.cell.Left.HasWallOrFence && this.cell.Left.blockDir != 0 && !this.cell.Left.isToggleWallPillar)
3023 {
3024 orgX = param.x;
3025 param.tile = _sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3026 param.x += cornerWallFix3.x;
3027 param.y += cornerWallFix3.y;
3028 param.z += cornerWallFix3.z;
3029 if (!flag9 && (roomHeight == 0f || flag10))
3030 {
3031 _sourceBlock.renderData.Draw(param);
3032 }
3033 else
3034 {
3035 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
3036 }
3037 param.x = orgX;
3038 }
3039 else if (this.cell.FrontLeft.HasWallOrFence && this.cell.FrontLeft.blockDir != 0 && (!flag10 || !this.cell.Left.HasWall) && !this.cell.isToggleWallPillar)
3040 {
3041 orgX = param.x;
3042 param.tile = _sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3043 param.x += cornerWallFix.x;
3044 param.y += cornerWallFix.y;
3045 param.z += cornerWallFix.z;
3046 if (!flag9 && (roomHeight == 0f || flag10))
3047 {
3048 _sourceBlock.renderData.Draw(param);
3049 }
3050 else
3051 {
3052 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
3053 }
3054 param.x = orgX;
3055 }
3056 }
3057 if (blockDir == 1 || blockDir == 2)
3058 {
3059 param.y = orgY;
3060 param.z = orgZ;
3061 param.dir = 1;
3062 Room room4 = this.cell.Right.room ?? this.cell.room;
3063 if (room4 != null && this.tileType.IsWall)
3064 {
3065 if (room4.lot.idDeco != 0 && !this.cell.hasDoor)
3066 {
3067 param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room4.lot.idDeco);
3068 param.matColor = room4.lot.colDeco;
3069 param.y += (float)room4.lot.decoFix * 0.01f;
3071 param.y = orgY;
3072 }
3073 if (room4.lot.idDeco2 != 0 && roomHeight != 0f && !flag11 && (float)room4.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
3074 {
3075 param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room4.lot.idDeco2);
3076 param.matColor = room4.lot.colDeco2;
3077 param.y += (float)room4.lot.decoFix2 * 0.01f;
3078 param.z += (float)room4.lot.decoFix2 * 0.01f * heightModDeco;
3080 param.y = orgY;
3081 param.z = orgZ;
3082 }
3083 }
3084 if (blockDir == 2 && this.cell.room == null && this.cell.Right.room != null)
3085 {
3086 Room room5 = this.cell.Right.room;
3087 maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)room5.lot.mh * _heightMod.y;
3088 if (showRoof)
3089 {
3090 roomHeight = room5.lot.realHeight;
3091 }
3092 else if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock))
3093 {
3094 roomHeight = 0f;
3095 }
3096 else
3097 {
3098 int num38 = ((room5.data.maxHeight == 0) ? 2 : room5.data.maxHeight);
3099 roomHeight = EMono.setting.render.roomHeightMod * (float)((room5.lot.height < num38) ? room5.lot.height : num38) + 0.01f * (float)room5.lot.heightFix;
3100 }
3101 }
3102 Cell back2 = this.cell.Back;
3103 if (blockDir == 2 && back2.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
3104 {
3105 _sourceBlock = back2.sourceBlock;
3106 param.mat = back2.matBlock;
3107 }
3108 else
3109 {
3111 param.mat = matBlock;
3112 }
3113 this.tileType = _sourceBlock.tileType;
3114 param.tile = (tile = -_sourceBlock._tiles[0] + ((flag11 && this.tileType.UseLowBlock) ? (-32) : 0));
3115 if (_sourceBlock.useAltColor)
3116 {
3117 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
3118 }
3119 else
3120 {
3121 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
3122 }
3123 param.color += _rightWallShade;
3124 if (roomHeight == 0f || flag11 || !this.tileType.RepeatBlock)
3125 {
3126 if (!this.cell.hasDoor)
3127 {
3128 _sourceBlock.renderData.Draw(param);
3129 }
3130 }
3131 else
3132 {
3133 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0);
3134 }
3135 if ((this.cell.Right.HasWallOrFence && this.cell.Right.blockDir != 1) != this.cell.isToggleWallPillar && (blockDir != 2 || !this.cell.isToggleWallPillar))
3136 {
3137 if (this.cell.Left.IsSnowTile && this.cell.Front.IsSnowTile)
3138 {
3139 param.snow = true;
3140 }
3141 orgX = param.x;
3142 param.tile = _sourceBlock._tiles[0] + ((flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3143 if (!flag9 && (roomHeight == 0f || !this.tileType.RepeatBlock || flag11))
3144 {
3145 _sourceBlock.renderData.Draw(param);
3146 }
3147 else
3148 {
3149 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
3150 }
3151 param.x = orgX;
3152 }
3153 }
3154 param.y = orgY;
3155 param.z = orgZ;
3156 break;
3157 }
3158 case BlockRenderMode.HalfBlock:
3159 param.color = floorLight;
3160 _sourceBlock = ((sourceBlock.id == 5) ? EMono.sources.blocks.rows[matBlock.defBlock] : sourceBlock);
3161 param.tile = _sourceBlock._tiles[0];
3162 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.colorMod));
3163 param.tile2 = _sourceBlock.sourceAutoFloor._tiles[0];
3164 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.sourceAutoFloor.colorMod));
3165 sourceBlock.renderData.Draw(param);
3166 break;
3167 case BlockRenderMode.Pillar:
3168 {
3169 RenderData renderData2 = sourceBlock.renderData;
3170 param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
3171 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
3172 int num39 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1;
3173 if (num39 == 0)
3174 {
3175 renderData2.Draw(param);
3176 }
3177 else
3178 {
3179 renderData2.DrawRepeat(param, num39, sourceBlock.tileType.RepeatSize);
3180 }
3181 param.tile = renderData2.idShadow;
3182 SourcePref shadowPref2 = renderData2.shadowPref;
3183 int shadow4 = shadowPref2.shadow;
3184 passShadow.AddShadow(param.x + renderData2.offsetShadow.x, param.y + renderData2.offsetShadow.y, param.z + renderData2.offsetShadow.z, ShadowData.Instance.items[shadow4], shadowPref2, 0, param.snow);
3185 break;
3186 }
3187 default:
3188 param.color = floorLight;
3189 param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + ((_lowblock && this.tileType.UseLowBlock) ? 3000000 : 0);
3190 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
3191 if (roomHeight == 0f)
3192 {
3193 sourceBlock.renderData.Draw(param);
3194 }
3195 else
3196 {
3197 sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock);
3198 }
3199 break;
3200 }
3201 }
3202 if (this.cell.pcSync && EMono.player.lightPower > 0f && !cinemaMode)
3203 {
3204 if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof)
3205 {
3206 goto IL_6f8a;
3207 }
3208 if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock)
3209 {
3210 Room obj = this.cell.FrontRight.room;
3211 if (obj == null || !obj.HasRoof)
3212 {
3213 goto IL_6f8a;
3214 }
3215 }
3216 }
3217 goto IL_6fea;
3218 void Draw(int tile)
3219 {
3220 pass = passEdge;
3223 batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
3224 batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
3225 batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
3228 pass.idx++;
3229 if (pass.idx == pass.batchSize)
3230 {
3231 pass.NextBatch();
3232 }
3233 }
3234 }
3235
3236 public Vector3 GetThingPosition(Card tg, Point p)
3237 {
3238 Vector3 zero = Vector3.zero;
3239 float num = 0f;
3240 cell = p.cell;
3242 if (!tg.TileType.UseMountHeight)
3243 {
3245 {
3246 zero.z -= 1f;
3247 }
3248 else if (!tg.sourceCard.multisize)
3249 {
3250 float num2 = ((cell._bridge != 0) ? cell.sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
3251 zero.y += num2;
3252 zero.z -= num2 * heightMod.z;
3253 }
3254 if (cell.HasRamp)
3255 {
3256 Vector3 rampFix = cell.sourceBlock.tileType.GetRampFix(cell.blockDir);
3257 zero.x += rampFix.x;
3258 zero.y += rampFix.y;
3259 zero.z += rampFix.z;
3260 }
3261 }
3262 if (tg.sourceCard.multisize)
3263 {
3264 zero.z -= 1f;
3265 }
3266 SourcePref pref = tg.Pref;
3267 zero.x += pref.x * (float)((!tg.flipX) ? 1 : (-1));
3268 zero.z += pref.z;
3269 detail = cell.detail;
3270 if (tg.isChara)
3271 {
3272 return zero;
3273 }
3274 bool flag = false;
3276 {
3277 flag = true;
3278 }
3280 {
3281 if (tg.altitude != 0)
3282 {
3283 zero += altitudeFix * tg.altitude;
3284 }
3285 flag = true;
3286 }
3288 {
3289 return zero;
3290 }
3291 float num3 = 0f;
3292 if (detail != null && detail.things.Count > 0)
3293 {
3294 Card card = null;
3295 for (int i = 0; i < detail.things.Count; i++)
3296 {
3297 Thing thing = detail.things[i];
3298 SourcePref pref2 = thing.Pref;
3300 float num4 = (tileType.UseMountHeight ? 0f : ((pref2.height == 0f) ? 0.1f : pref2.height));
3301 if (!thing.IsInstalled || thing == ActionMode.Inspect.target)
3302 {
3303 continue;
3304 }
3305 if (thing.TileType.IsRamp)
3306 {
3307 Vector3 rampFix2 = thing.TileType.GetRampFix(thing.dir, pref2);
3308 zero.x += rampFix2.x;
3309 zero.y += rampFix2.y;
3310 zero.z += rampFix2.z;
3311 }
3312 if (!flag && tileType.CanStack)
3313 {
3314 if (thing.ignoreStackHeight)
3315 {
3316 zero.y -= num3;
3317 }
3318 zero.y += num4;
3319 zero.x += pref2.stackX * (float)((!thing.flipX) ? 1 : (-1));
3320 zero.z += pref2.z + thing.renderer.data.stackZ;
3321 if (!tileType.UseMountHeight && thing.altitude != 0)
3322 {
3323 zero += altitudeFix * thing.altitude;
3324 num4 += altitudeFix.y * (float)thing.altitude;
3325 }
3326 if (thing.trait.IgnoreLastStackHeight && (card == null || !card.trait.IgnoreLastStackHeight))
3327 {
3328 zero.y -= num3;
3329 }
3330 num3 = num4;
3331 zero.z += renderSetting.thingZ + num + (float)i * -0.01f + zSetting.mod1 * zero.y;
3332 if (!thing.TileType.IsRamp && thing.trait.IsChangeFloorHeight)
3333 {
3334 _ = thing.ignoreStackHeight;
3335 }
3336 if (thing.sourceCard.multisize)
3337 {
3338 num += zSetting.multiZ;
3339 }
3340 card = thing;
3341 }
3342 }
3343 }
3344 if (flag)
3345 {
3346 return zero;
3347 }
3348 if (tg.ignoreStackHeight)
3349 {
3350 zero.y -= num3;
3351 zero.z += (float)(detail?.things.Count ?? 0) * -0.01f;
3352 }
3353 if (tg.altitude != 0)
3354 {
3355 zero += altitudeFix * tg.altitude;
3356 }
3357 return zero;
3358 }
3359
3361 {
3362 float num = _baseBrightness + 0.25f;
3363 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)));
3364 return (int)num;
3365 }
3366
3367 public int GetRoofLight(Lot lot)
3368 {
3369 float num = Mathf.Sqrt(lot.light) * roofLightMod;
3370 if (num > lightLimit * roofLightLimitMod)
3371 {
3373 }
3374 if (isSnowCovered)
3375 {
3376 num += roofLightSnow * (1f - nightRatio);
3377 }
3378 int num2 = (int)(num * 50f) * 262144;
3379 if (isSnowCovered)
3380 {
3381 num2 += snowColorToken;
3382 }
3383 return num2;
3384 }
3385
3386 public void DrawRoof(Lot lot)
3387 {
3388 RoofStyle roofStyle = roofStyles[lot.idRoofStyle];
3389 if (roofStyle.type == RoofStyle.Type.None)
3390 {
3391 return;
3392 }
3393 bool reverse = lot.reverse;
3394 int num;
3395 int num2;
3396 int num3;
3397 int num4;
3398 if (reverse)
3399 {
3400 num = lot.z - roofStyle.h;
3401 num2 = lot.x - roofStyle.w;
3402 num3 = lot.mz + 1 + roofStyle.h;
3403 num4 = lot.mx + 1 + roofStyle.w;
3404 if (num2 > 1 && num > 0 && map.cells[num2 - 1, num].HasFullBlock)
3405 {
3406 num2--;
3407 }
3408 if (num3 < Size && num4 < Size && map.cells[num4 - 1, num3].HasFullBlock)
3409 {
3410 num3++;
3411 }
3412 }
3413 else
3414 {
3415 num = lot.x - roofStyle.w;
3416 num2 = lot.z - roofStyle.h;
3417 num3 = lot.mx + 1 + roofStyle.w;
3418 num4 = lot.mz + 1 + roofStyle.h;
3419 if (num2 > 0 && num > 1 && map.cells[num - 1, num2].HasFullBlock)
3420 {
3421 num--;
3422 }
3423 if (num3 < Size && num4 < Size && map.cells[num3 - 1, num4].HasFullBlock)
3424 {
3425 num4++;
3426 }
3427 }
3428 int num5;
3429 if (roofStyle.wing)
3430 {
3431 num5 = ((lot.height > 1) ? 1 : 0);
3432 if (num5 != 0)
3433 {
3434 num2--;
3435 num4++;
3436 }
3437 }
3438 else
3439 {
3440 num5 = 0;
3441 }
3442 int num6 = num4 + (reverse ? roofStyle.w : roofStyle.h) * 2 - num2;
3443 int idRoofTile = lot.idRoofTile;
3444 int num7 = lot.idBlock;
3445 int num8 = num7;
3446 if (num7 >= EMono.sources.blocks.rows.Count)
3447 {
3448 num7 = EMono.sources.blocks.rows.Count - 1;
3449 }
3450 if (num8 >= EMono.sources.floors.rows.Count)
3451 {
3452 num8 = EMono.sources.floors.rows.Count - 1;
3453 }
3454 int num9 = lot.idRamp;
3455 if (num9 >= EMono.sources.blocks.rows.Count)
3456 {
3457 num9 = EMono.sources.blocks.rows.Count - 1;
3458 }
3459 bool flag = false;
3460 int num10 = num6 / 2 - roofStyle.flatW;
3461 int num11 = num6 / 2 + roofStyle.flatW + ((num6 % 2 != 0) ? 1 : 0);
3462 SourceBlock.Row row = (roofStyle.useDefBlock ? cell.sourceFloor._defBlock : EMono.sources.blocks.rows[num7]);
3463 int num12 = 0;
3464 int num13 = ((num5 != 0) ? (-1) : 0);
3465 int num14 = 0;
3466 Vector3 vector = (lot.fullblock ? roofStyle.posFixBlock : roofStyle.posFix);
3467 switch (roofStyle.type)
3468 {
3469 case RoofStyle.Type.Default:
3470 flag = num6 % 2 == 1 && roofStyle.flatW == 0;
3471 break;
3472 case RoofStyle.Type.Flat:
3473 case RoofStyle.Type.FlatFloor:
3474 num10 = roofStyle.flatW;
3475 num11 = num6 - roofStyle.flatW;
3476 if (num10 == 0)
3477 {
3478 num14 = 1;
3479 }
3480 if (roofStyle.type != RoofStyle.Type.FlatFloor)
3481 {
3482 num--;
3483 num3++;
3484 num2--;
3485 num4++;
3486 }
3487 break;
3488 case RoofStyle.Type.Triangle:
3489 num10 = 999;
3490 num11 = 999;
3491 break;
3492 }
3493 for (cz = num2; cz < num4; cz++)
3494 {
3495 for (cx = num; cx < num3; cx++)
3496 {
3497 if (cx < 0 || cz < 0 || cx >= Size || cz >= Size)
3498 {
3499 continue;
3500 }
3501 int num15;
3502 int num16;
3503 if (reverse)
3504 {
3505 num15 = cz;
3506 num16 = cx;
3507 cell = map.cells[num15, num16];
3508 if (roofStyle.wing && cz == num4 - 1 && cell.Right.Right.room != null && cell.Right.Right.room.lot != lot)
3509 {
3510 continue;
3511 }
3512 }
3513 else
3514 {
3515 num15 = cx;
3516 num16 = cz;
3517 cell = map.cells[num15, num16];
3518 if (roofStyle.wing && cz == 0 && cell.Front.Front.room != null && cell.Front.Front.room.lot != lot)
3519 {
3520 continue;
3521 }
3522 }
3523 int num17 = num16 - num15;
3524 room = cell.room;
3525 if (room != null && room.lot != lot)
3526 {
3527 continue;
3528 }
3529 bool flag2 = false;
3530 if (roofStyle.type == RoofStyle.Type.Flat)
3531 {
3532 if (reverse)
3533 {
3534 if (!cell.HasFullBlock || cell.room != null)
3535 {
3536 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));
3537 }
3538 else if (cell.Left.room?.lot == lot && cell.Right.room != null)
3539 {
3540 num14 = 1;
3541 flag2 = true;
3542 }
3543 else if (cell.Front.room?.lot == lot)
3544 {
3545 num14 = ((cell.FrontRight.room?.lot == lot) ? 1 : 2);
3546 flag2 = true;
3547 }
3548 else if (cell.Right.room?.lot == lot || cell.FrontRight.room?.lot == lot)
3549 {
3550 num14 = 0;
3551 flag2 = true;
3552 }
3553 }
3554 else if (!cell.HasFullBlock || cell.room != null)
3555 {
3556 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));
3557 }
3558 else if (cell.Right.room?.lot == lot)
3559 {
3560 num14 = ((cell.FrontRight.room?.lot == lot) ? 1 : 0);
3561 flag2 = true;
3562 }
3563 else if (cell.Front.room?.lot == lot || cell.FrontRight.room?.lot == lot)
3564 {
3565 num14 = 2;
3566 flag2 = true;
3567 }
3568 num13 = 0;
3569 }
3570 bool flag3 = isSnowCovered && !cell.isClearSnow;
3571 if (room == null && !roofStyle.coverLot && !flag2 && !(cell.HasFullBlock && cell.IsRoomEdge && flag3))
3572 {
3573 continue;
3574 }
3575 index = cx + cz * Size;
3577 float num18 = (float)num17 * screen.tileAlign.y + (float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y + vector.y;
3578 float num19 = 1000f + param.x * screen.tileWeight.x + (float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + vector.z;
3579 if (lot.height == 1 && lot.heightFix < 20)
3580 {
3581 num18 += roofStyle.lowRoofFix.y;
3582 num19 += roofStyle.lowRoofFix.z;
3583 }
3584 param.x = (float)(cx + cz) * screen.tileAlign.x + roofFix.x + (float)num13 * roofFix2.x + vector.x * (float)(reverse ? 1 : (-1));
3585 param.y = num18 + (float)num13 * roofFix2.y;
3586 param.z = num19 + param.y * screen.tileWeight.z + (float)num13 * roofFix2.z;
3587 param.color = GetRoofLight(lot);
3588 param.snow = idRoofTile == 0 && flag3;
3589 param.shadowFix = 0f;
3590 if (num14 == 1)
3591 {
3593 RenderRow renderRow;
3594 if (roofStyle.type == RoofStyle.Type.FlatFloor)
3595 {
3596 if (cell.HasFullBlock && cell.IsRoomEdge && !flag3)
3597 {
3598 continue;
3599 }
3600 renderRow = EMono.sources.floors.rows[num8];
3601 renderRow.SetRenderParam(param, mat, 0);
3602 param.matColor = lot.colRoof;
3603 }
3604 else
3605 {
3606 renderRow = row;
3607 renderRow.SetRenderParam(param, mat, 0);
3608 param.matColor = lot.colBlock;
3609 }
3610 renderRow.renderData.Draw(param);
3611 if (idRoofTile != 0)
3612 {
3613 renderRow = EMono.sources.blocks.rows[EMono.sources.objs.rows[idRoofTile].idRoof];
3614 int num20 = (reverse ? 1 : 0) + ((!flag) ? 2 : 0);
3615 renderRow.SetRenderParam(param, MATERIAL.sourceGold, num20);
3616 param.matColor = lot.colRoof;
3617 if (roofStyle.type == RoofStyle.Type.FlatFloor)
3618 {
3619 param.x += roofStyle.posFixBlock.x;
3620 param.y += roofStyle.posFixBlock.y;
3621 param.z += roofStyle.posFixBlock.z;
3622 }
3623 if (!flag)
3624 {
3625 param.z += 0.5f;
3626 }
3627 if (flag3)
3628 {
3629 param.matColor = 104025f;
3630 if (roofStyle.type != RoofStyle.Type.FlatFloor)
3631 {
3632 param.z += roofStyle.snowZ;
3633 }
3634 param.tile = renderRow.renderData.ConvertTile(renderRow.snowTile) + num20;
3635 renderRow.renderData.Draw(param);
3636 }
3637 else
3638 {
3639 renderRow.renderData.Draw(param);
3640 }
3641 }
3642 else if (flag3 && roofStyle.type == RoofStyle.Type.FlatFloor)
3643 {
3644 param.matColor = 104025f;
3645 param.tile = 10f;
3646 param.x += roofStyle.snowFix.x;
3647 param.y += roofStyle.snowFix.y;
3648 param.z += roofStyle.snowZ + roofStyle.snowFix.z;
3649 renderRow.renderData.Draw(param);
3650 }
3651 }
3652 else
3653 {
3654 if (idRoofTile != 0)
3655 {
3656 int num21 = ((!reverse) ? ((num14 != 0) ? 2 : 0) : ((num14 != 0) ? 1 : 3));
3657 if (lot.altRoof && !flag && (roofStyle.type == RoofStyle.Type.Default || roofStyle.type == RoofStyle.Type.DefaultNoTop))
3658 {
3659 param.shadowFix = num21 + 1;
3660 }
3661 RenderRow renderRow = EMono.sources.objs.rows[idRoofTile];
3662 renderRow.SetRenderParam(param, MATERIAL.sourceGold, num21);
3663 param.matColor = lot.colRoof;
3664 if (flag3)
3665 {
3666 param.matColor = 104025f;
3667 param.z += roofStyle.snowZ;
3668 param.tile = renderRow.renderData.ConvertTile(renderRow.snowTile) + num21 + (lot.altRoof ? 8 : 0);
3669 renderRow.renderData.Draw(param);
3670 }
3671 else
3672 {
3673 param.tile += (lot.altRoof ? 8 : 0);
3674 renderRow.renderData.Draw(param);
3675 }
3676 param.shadowFix = 0f;
3677 }
3678 if (num13 >= 0)
3679 {
3680 param.y += roofRampFix.y;
3681 param.z += roofRampFix.z;
3682 RenderRow renderRow = EMono.sources.blocks.rows[num9];
3683 renderRow.SetRenderParam(param, MATERIAL.sourceGold, (!reverse) ? ((num14 != 0) ? 2 : 0) : ((num14 != 0) ? 1 : 3));
3684 param.matColor = lot.colBlock;
3685 renderRow.renderData.Draw(param);
3686 }
3687 }
3688 CellEffect effect = cell.effect;
3689 if (effect != null && effect.FireAmount > 0)
3690 {
3692 }
3693 if (num13 < 1)
3694 {
3695 continue;
3696 }
3697 if (roofStyle.type != RoofStyle.Type.Flat)
3698 {
3699 param.snow = false;
3700 }
3701 for (int i = 0; i < num13; i++)
3702 {
3703 param.x = (float)(cx + cz) * screen.tileAlign.x + roofFix.x + (float)i * roofFix2.x + vector.x * (float)(reverse ? 1 : (-1));
3704 param.y = num18 + (float)i * roofFix2.y;
3705 param.z = num19 + param.y * screen.tileWeight.z + (float)i * roofFix2.z;
3706 RenderRow renderRow = row;
3707 renderRow.SetRenderParam(param, MATERIAL.sourceGold, 0);
3708 param.matColor = lot.colBlock;
3709 renderRow.renderData.Draw(param);
3710 index++;
3711 CellEffect effect2 = cell.effect;
3712 if (effect2 != null && effect2.FireAmount > 0 && Rand.bytes[index % Rand.MaxBytes] % 3 == 0)
3713 {
3715 }
3716 }
3717 }
3718 num12++;
3719 if (roofStyle.type != RoofStyle.Type.Flat)
3720 {
3721 if (num12 == num10)
3722 {
3723 num14 = 1;
3724 }
3725 if (num12 == num11)
3726 {
3727 num14 = 2;
3728 num13++;
3729 }
3730 num13 += num14 switch
3731 {
3732 1 => 0,
3733 0 => 1,
3734 _ => -1,
3735 };
3736 }
3737 }
3738 }
3739
3740 public static int GetColorInt(ref Color matColor, int p)
3741 {
3742 if (p == 0)
3743 {
3744 return 104025;
3745 }
3746 return p * 262144 + (int)(matColor.r * 50f) * 4096 + (int)(matColor.g * 50f) * 64 + (int)(matColor.b * 50f);
3747 }
3748
3749 public void SetRoofHeight(MeshPassParam _param, Cell _cell, int _cx, int _cz, int h = 0, int altitude = 0, int dirWall = -1, bool ignoreAltitudeY = false)
3750 {
3751 Room room = _cell.room;
3752 if (room == null && dirWall != -1)
3753 {
3754 if (dirWall == 0 && _cell.Front.room != null)
3755 {
3756 room = _cell.Front.room;
3757 _cell = _cell.Front;
3758 }
3759 else if (_cell.Right.room != null)
3760 {
3761 room = _cell.Right.room;
3762 _cell = _cell.Right;
3763 }
3764 }
3765 if (room != null)
3766 {
3767 Lot lot = room.lot;
3768 RoofStyle roofStyle = roofStyles[lot.idRoofStyle];
3769 float num = (float)(_cz - _cx) * screen.tileAlign.y + (float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y;
3770 float num2 = 1000f + param.x * screen.tileWeight.x + (float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + roofStyle.posFix.z;
3771 if (lot.height == 1)
3772 {
3773 num += roofStyle.lowRoofFix.y;
3774 num2 += roofStyle.lowRoofFix.z;
3775 }
3776 _param.x = (float)(_cx + _cz) * screen.tileAlign.x + roofFix.x + (float)h * roofFix2.x;
3777 _param.y = num + (float)h * roofFix2.y;
3778 _param.z = num2 + _param.y * screen.tileWeight.z + (float)h * roofFix2.z + heightModRoofBlock.y;
3779 }
3780 if (!ignoreAltitudeY || room != null)
3781 {
3782 _param.y += (float)altitude * _heightMod.y;
3783 }
3784 _param.z += (float)altitude * heightModRoofBlock.z;
3785 }
3786}
AreaHighlightMode
BlockRenderMode
PlaceState
Definition: PlaceState.cs:2
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
TraitTrolley trolley
Definition: AI_Trolley.cs:24
SceneProfile profile
Definition: AM_Cinema.cs:5
static AM_Inspect Inspect
Definition: ActionMode.cs:23
virtual bool IsRoofEditMode(Card c=null)
Definition: ActionMode.cs:311
static bool IsAdv
Definition: ActionMode.cs:117
static AM_ViewMap ViewMap
Definition: ActionMode.cs:63
virtual BaseTileMap.CardIconMode cardIconMode
Definition: ActionMode.cs:229
virtual bool ShowMaskedThings
Definition: ActionMode.cs:221
bool IsActive
Definition: ActionMode.cs:121
static AM_FlagCell FlagCell
Definition: ActionMode.cs:77
virtual bool IsBuildMode
Definition: ActionMode.cs:181
static AM_Cinema Cinema
Definition: ActionMode.cs:73
static AM_Bird Bird
Definition: ActionMode.cs:31
static AM_Mine Mine
Definition: ActionMode.cs:33
bool showWallItem
Definition: AreaData.cs:54
bool atrium
Definition: AreaData.cs:66
int maxHeight
Definition: AreaData.cs:30
virtual byte GetTile(int index)
Definition: Area.cs:75
AreaData data
Definition: BaseArea.cs:29
List< Action > actionsLateUpdate
Definition: BaseCore.cs:29
ScreenGuide guide
Vector3 tileWeight
BaseTileSelector tileSelector
virtual void RefreshWeather()
MeshPass passArea
Definition: BaseTileMap.cs:141
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:49
Vector3 position
Definition: CardRenderer.cs:21
virtual bool IsMoving
Definition: CardRenderer.cs:31
virtual void SetFirst(bool first, Vector3 pos)
Definition: Card.cs:11
bool isMasked
Definition: Card.cs:591
string id
Definition: Card.cs:36
bool isNPCProperty
Definition: Card.cs:555
bool isFloating
Definition: Card.cs:651
bool isRoofItem
Definition: Card.cs:579
bool isRestrained
Definition: Card.cs:567
float fy
Definition: Card.cs:267
float fx
Definition: Card.cs:255
PlaceState placeState
Definition: Card.cs:84
TileType TileType
Definition: Card.cs:2175
virtual SourcePref Pref
Definition: Card.cs:2145
Point pos
Definition: Card.cs:60
int uid
Definition: Card.cs:123
Trait trait
Definition: Card.cs:54
int altitude
Definition: Card.cs:231
bool isDeconstructing
Definition: Card.cs:447
bool IsInstalled
Definition: Card.cs:2421
virtual bool isChara
Definition: Card.cs:2121
TraitShackle GetRestrainer()
Definition: Card.cs:7368
int dir
Definition: Card.cs:147
virtual CardRow sourceCard
Definition: Card.cs:2169
bool noShadow
Definition: Card.cs:819
SourceCategory.Row category
Definition: Card.cs:2087
bool freePos
Definition: Card.cs:519
CardRenderer renderer
Definition: Card.cs:62
virtual bool flipX
Definition: Card.cs:2154
bool ignoreStackHeight
Definition: Card.cs:639
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:801
override bool IsAliveInCurrentZone
Definition: Chara.cs:563
AIAct ai
Definition: Chara.cs:204
override bool IsPC
Definition: Chara.cs:626
Chara host
Definition: Chara.cs:33
ConTransmuteMimic mimicry
Definition: Chara.cs:106
override bool IsDeadOrSleeping
Definition: Chara.cs:575
SourceChara.Row source
Definition: Chara.cs:160
override bool IsMoving
Definition: Chara.cs:622
override CardRow sourceCard
Definition: Chara.cs:452
bool IsInActiveZone
Definition: Chara.cs:852
override void SetRenderParam(RenderParam p)
Definition: Chara.cs:6877
override bool IsPCC
Definition: Chara.cs:696
bool hasTelepathy
Definition: Chara.cs:142
BlockColors blockColors
new GameConfig game
Definition: CoreConfig.cs:609
bool godBuild
Definition: CoreDebug.cs:304
Definition: Core.cs:14
static float delta
Definition: Core.cs:17
CoreConfig config
Definition: Core.cs:70
bool reverse
Definition: Critter.cs:23
void Update()
Definition: Critter.cs:102
virtual int SnowTile
Definition: Critter.cs:33
int tile
Definition: Critter.cs:7
bool IsNight
Definition: Date.cs:112
Definition: EInput.cs:8
static bool isAltDown
Definition: EInput.cs:276
static bool isShiftDown
Definition: EInput.cs:272
static ButtonState rightMouse
Definition: EInput.cs:362
static Vector3 mposWorld
Definition: EInput.cs:350
Definition: EMono.cs:4
static GameSetting setting
Definition: EMono.cs:31
static ColorProfile Colors
Definition: EMono.cs:35
static Core core
Definition: EMono.cs:5
static Chara pc
Definition: EMono.cs:13
static World world
Definition: EMono.cs:37
static Player player
Definition: EMono.cs:11
static Zone _zone
Definition: EMono.cs:19
static Game game
Definition: EMono.cs:7
static Scene scene
Definition: EMono.cs:27
static SoundManager Sound
Definition: EMono.cs:39
static Map _map
Definition: EMono.cs:17
static CoreDebug debug
Definition: EMono.cs:45
static SourceManager sources
Definition: EMono.cs:41
Definition: FLOOR.cs:2
static SourceFloor.Row sourceSnow
Definition: FLOOR.cs:31
static SourceFloor.Row sourceSnow2
Definition: FLOOR.cs:33
static SourceFloor.Row sourceIce
Definition: FLOOR.cs:35
int tile
Definition: Footmark.cs:7
EffectSetting effect
Definition: GameSetting.cs:299
RenderSetting render
Definition: GameSetting.cs:301
int slopeMod
Definition: Game.cs:61
bool buildLight
Definition: Game.cs:37
int animeSpeed
Definition: Game.cs:85
bool showRoof
Definition: Game.cs:13
bool showWall
Definition: Game.cs:16
int lowWallObjAltitude
Definition: Game.cs:88
bool reverseSnow
Definition: Game.cs:49
bool slope
Definition: Game.cs:25
Config config
Definition: Game.cs:219
virtual void OnRenderTileMap(RenderParam p, bool drawShadow=true)
Definition: GrowSystem.cs:207
static Card alwaysVisible
Definition: LayerDrama.cs:22
Definition: Lot.cs:5
int colDeco2
Definition: Lot.cs:36
bool altRoof
Definition: Lot.cs:46
int colBlock
Definition: Lot.cs:32
int decoFix
Definition: Lot.cs:38
int idRamp
Definition: Lot.cs:24
int decoFix2
Definition: Lot.cs:40
int colRoof
Definition: Lot.cs:30
int mh
Definition: Lot.cs:58
int colDeco
Definition: Lot.cs:34
int idRoofStyle
Definition: Lot.cs:14
int heightFix
Definition: Lot.cs:18
float realHeight
Definition: Lot.cs:64
float light
Definition: Lot.cs:66
int idBlock
Definition: Lot.cs:22
int height
Definition: Lot.cs:12
int idDeco2
Definition: Lot.cs:28
int idDeco
Definition: Lot.cs:26
int idRoofTile
Definition: Lot.cs:20
bool reverse
Definition: Lot.cs:42
int idBGM
Definition: Lot.cs:16
static SourceMaterial.Row sourceSnow
Definition: MATERIAL.cs:41
static SourceMaterial.Row sourceGold
Definition: MATERIAL.cs:45
int Size
Definition: MapBounds.cs:20
int maxZ
Definition: MapBounds.cs:17
int maxX
Definition: MapBounds.cs:14
int x
Definition: MapBounds.cs:8
float heightLightMod
Definition: MapConfig.cs:56
bool fullWallHeight
Definition: MapConfig.cs:32
int skyBlockHeight
Definition: MapConfig.cs:92
float blockHeight
Definition: MapConfig.cs:71
bool reverseRoof
Definition: MapConfig.cs:47
Definition: Map.cs:13
bool IsIndoor
Definition: Map.cs:131
int SizeXZ
Definition: Map.cs:133
RoomManager rooms
Definition: Map.cs:31
Cell[,] cells
Definition: Map.cs:85
MapConfig config
Definition: Map.cs:37
static HashSet< int > sunMap
Definition: Map.cs:14
MapBounds bounds
Definition: Map.cs:52
float[] matColors
Definition: MeshBatch.cs:11
Matrix4x4[] matrices
Definition: MeshBatch.cs:5
float[] tiles
Definition: MeshBatch.cs:7
float[] colors
Definition: MeshBatch.cs:9
int batchIdx
Definition: MeshPass.cs:60
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
void NextBatch()
Definition: MeshPass.cs:417
int batchSize
Definition: MeshPass.cs:63
void AddShadow(MeshPassParam p, ref Vector3 fix)
Definition: MeshPass.cs:195
List< MeshBatch > batches
Definition: MeshPass.cs:66
int idx
Definition: MeshPass.cs:57
bool CanSee(Chara c)
Definition: Player.cs:2530
CinemaConfig cinemaConfig
Definition: Player.cs:1167
float lightPower
Definition: Player.cs:1255
int lightRadius
Definition: Player.cs:1247
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:11
static void InitBytes(int a)
Definition: Rand.cs:13
new void Draw(RenderParam p, int tile=0)
void Draw(RenderParam p, int tile)
Definition: RenderData.cs: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:393
bool multisize
Definition: RenderRow.cs:64
RenderData renderData
Definition: RenderRow.cs:71
SourcePref pref
Definition: RenderRow.cs:68
bool useAltColor
Definition: RenderRow.cs:80
TileType tileType
Definition: RenderRow.cs:77
int[] _tiles
Definition: RenderRow.cs:12
SourceMaterial.Row DefaultMaterial
Definition: RenderRow.cs:86
int colorMod
Definition: RenderRow.cs:16
int snowTile
Definition: RenderRow.cs:28
Vector3 lowRoofFix
Definition: RoofStyle.cs:39
Vector3 posFix
Definition: RoofStyle.cs:35
int flatW
Definition: RoofStyle.cs:23
float snowZ
Definition: RoofStyle.cs:43
bool coverLot
Definition: RoofStyle.cs:33
Vector3 posFixBlock
Definition: RoofStyle.cs:37
bool wing
Definition: RoofStyle.cs:29
Vector3 snowFix
Definition: RoofStyle.cs:41
Type type
Definition: RoofStyle.cs:17
List< Lot > listLot
Definition: RoomManager.cs:20
void Refresh()
Definition: RoomManager.cs:52
Definition: Room.cs:4
bool HasRoof
Definition: Room.cs:29
Lot lot
Definition: Room.cs:21
AnimationCurve baseBrightnessCurve
AnimationCurve shadowCurveFloor
AnimationCurve dynamicBrightnessCurve2
float dynamicBrightnessLightBonus
AnimationCurve lightLimit
AnimationCurve fogBrightness
AnimationCurve dynamicBrightnessCurve
AnimationCurve shadowCurve
AnimationCurve nightRatioCurve
AnimationCurve lightModCurve
SceneGlobalProfile global
Definition: SceneProfile.cs:6
SceneLightProfile light
Definition: SceneProfile.cs:10
Definition: Scene.cs:8
List< ISyncScreen > syncList
Definition: Scene.cs:137
static Point HitPoint
Definition: Scene.cs:21
float timeRatio
Definition: Scene.cs:130
CameraSupport camSupport
Definition: Scene.cs:41
GameSetting.RenderSetting.MapBGSetting bg
Definition: Scene.cs:124
SoundSource sfxFire
Definition: Scene.cs:89
ActionMode actionMode
Definition: Scene.cs:79
SceneProfile profile
Definition: Scene.cs:75
void DrawWall(Point point, int color, bool useMarkerPass=false, float offsetZ=0f)
Definition: ScreenGuide.cs:42
MeshPass passGuideFloor
Definition: ScreenGuide.cs:7
List< Item > items
Definition: ShadowData.cs:101
static ShadowData Instance
Definition: ShadowData.cs:99
SourceObj objs
SourceBlock blocks
SourceFloor floors
bool HasGrowth
Definition: SourceObj.cs:26
bool bypassShadow
Definition: SourcePref.cs:315
int liquidModMax
Definition: SourcePref.cs:75
bool FloatUnderwater
Definition: SourcePref.cs:332
float height
Definition: SourcePref.cs:51
int liquidMod
Definition: SourcePref.cs:63
bool Float
Definition: SourcePref.cs:328
int shadow
Definition: SourcePref.cs:39
bool IsPlayerFaction
Definition: Spatial.cs:455
virtual bool IsRegion
Definition: Spatial.cs:515
virtual bool IsSnowCovered
Definition: Spatial.cs:545
virtual void Draw(int x, int z, RenderParam p)
Definition: Thing.cs:8
override void SetRenderParam(RenderParam p)
Definition: Thing.cs:1506
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:135
virtual bool UseHangZFix
Definition: TileType.cs:225
static TileTypeSky Sky
Definition: TileType.cs:71
virtual bool CanStack
Definition: TileType.cs:127
virtual void GetMountHeight(ref Vector3 v, Point p, int d, Card target=null)
Definition: TileType.cs:387
static TileTypeIllumination Illumination
Definition: TileType.cs:89
static TileTypeWaterShallow FloorWaterShallow
Definition: TileType.cs:61
static TileTypeObjFloat ObjFloat
Definition: TileType.cs:81
bool IsRamp
Definition: TileType.cs:149
virtual bool AlwaysShow
Definition: TileType.cs:257
virtual bool AlwaysShowShadow
Definition: TileType.cs:255
virtual bool UseLowBlock
Definition: TileType.cs:227
virtual bool IsFullBlock
Definition: TileType.cs:171
virtual bool IsWall
Definition: TileType.cs:139
virtual bool ForceRpeatBlock
Definition: TileType.cs:261
virtual bool IsSkipLowBlock
Definition: TileType.cs:131
virtual bool UseMountHeight
Definition: TileType.cs:223
virtual bool IsFence
Definition: TileType.cs:173
virtual BlockRenderMode blockRenderMode
Definition: TileType.cs:281
Vector3 GetRampFix(int dir, SourcePref pref=null)
Definition: TileType.cs:392
virtual bool IsWaterTop
Definition: TileType.cs:181
virtual bool RepeatBlock
Definition: TileType.cs:259
virtual bool IsOpen()
Definition: TraitDoor.cs:99
virtual Vector3 GetRestrainPos
Definition: TraitShackle.cs:5
virtual bool IgnoreLastStackHeight
Definition: Trait.cs:121
virtual bool AlwaysHideOnLowWall
Definition: Trait.cs:365
virtual bool UseLowblock
Definition: Trait.cs:453
virtual TileType tileType
Definition: Trait.cs:50
virtual bool IsChangeFloorHeight
Definition: Trait.cs:74
virtual bool IsGround
Definition: Trait.cs:68
Card owner
Definition: Trait.cs:28
Vector3 v
Definition: TransAnime.cs:5
bool animeBlock
Definition: TransAnime.cs:21
bool drawBlock
Definition: TransAnime.cs:25
GameDate date
Definition: World.cs:6
Definition: Zone.cs:12
virtual bool IsSkyLevel
Definition: Zone.cs:269
void RefreshBGM()
Definition: Zone.cs:3084
virtual bool UseFog
Definition: Zone.cs:393
virtual bool AlwaysLowblock
Definition: Zone.cs:397
virtual bool IsUnderwater
Definition: Zone.cs:271
Map map
Definition: Zone.cs:63