334 protected RaycastHit2D[]
rays =
new RaycastHit2D[1];
516 for (
int i = 0; i < 256; i++)
557 subtleHighlightArea = EMono.scene.actionMode.AreaHihlight != 0 && (EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Build || EMono.scene.actionMode.AreaHihlight !=
AreaHighlightMode.Edit);
575 fogBounds = (EMono._map.config.forceHideOutbounds && (!EMono.debug.godBuild || !
buildMode)) || (EMono.core.config.game.dontRenderOutsideMap && !
buildMode);
603 Fov.nonGradientMod = profile.
global.fovModNonGradient;
685 noRoofMode = EMono.game.config.noRoof || screen.focusOption !=
null;
706 currentRoom.data.visited =
true;
710 room.data.visited =
true;
743 Vector3Int vector3Int =
screen.
grid.WorldToCell(mposWorld);
745 mz = vector3Int.x - 1;
750 TestPoint.x =
mx + num3;
751 TestPoint.z =
mz - num3;
755 Physics2D.SyncTransforms();
756 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
762 TestPoint.x =
mx + num3 - 1;
763 TestPoint.z =
mz - num3;
767 Physics2D.SyncTransforms();
768 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
774 TestPoint.x =
mx + num3;
775 TestPoint.z =
mz - num3 + 1;
779 Physics2D.SyncTransforms();
780 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
788 bool flag2 = EMono._zone.UseFog && !
EMono.
scene.
bg.wall;
793 cx = screen.scrollX - screen.scrollY +
x - (
z + 1) / 2;
794 cz = screen.scrollY + screen.scrollX +
x +
z / 2;
799 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)
z *
edgeBlockFix.z;
854 int valueOrDefault = (this.room?.
lot?.
idBGM).GetValueOrDefault();
855 if (valueOrDefault == 0)
861 BGMData data =
EMono.
Sound.plLot.list[0].data;
862 if ((
object)data !=
null && data.id == valueOrDefault)
874 SoundManager.bgmVolumeMod = ((!LayerDrama.maxBGMVolume && !EMono._map.IsIndoor && this.room !=
null && !this.room.data.atrium && this.room.
HasRoof) ? (-0.6f) : 0f);
907 this.room = this.cell.
room;
927 floorDir = this.cell.sourceObj.snowTile - 1;
947 light = (this.cell.pcSync ? this.cell.light : (this.cell.light / 3 * 2));
981 liquidLv = (param.liquidLv = ((!flag) ? (((this.cell.
liquidLv +
this.cell._bridge != 0) ?
this.cell.sourceBridge.tileType.LiquidLV :
sourceFloor.tileType.LiquidLV) * 10) : 0));
991 if (effect !=
null && effect.
IsFire)
1001 if (this.room !=
null)
1003 this.room.lot.sync =
true;
1014 if ((this.room !=
null && this.room.
lot ==
currentLot) || flag2)
1033 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));
1051 bool num = this.room !=
null && sourceBlock.tileType.CastShadowSelf && !this.cell.
hasDoor;
1052 bool flag3 = this.room !=
null &&
showRoof && this.room.lot.idRoofStyle != 0 && !this.room.data.atrium && !
sourceBlock.tileType.Invisible;
1053 if (flag3 && this.cell.
hasDoor &&
this.cell.IsLotEdge)
1057 if (num || !
isSeen || flag3)
1071 param.y += 0.01f *
floatY;
1079 param.x += anime2.
v.x;
1080 param.y += anime2.
v.y;
1081 param.z += anime2.
v.z;
1098 param.dir = this.cell._roofBlockDir % 4;
1108 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1116 if (dir == 0 || dir == 2)
1133 if (dir == 1 || dir == 2)
1156 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref row2.
matColor,
_sourceBlock.sourceAutoFloor.colorMod));
1162 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1167 int shadow2 = shadowPref.
shadow;
1172 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1192 param.matColor = 104025f;
1195 param.y = (float)(
cz -
cx) * screen.tileAlign.y + (float)(
int)this.cell.bridgeHeight * _heightMod.y +
ugFixBridgeBottom.x;
1196 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(
int)this.cell.bridgeHeight *
_heightMod.z;
1218 float num2 = (float)(
int)this.cell.TopHeight *
_heightMod.y;
1223 param.z += ugFix.z +
slopeFixZ * (float)i;
1265 if (this.cell.
effect !=
null)
1273 param.mat = defaultMaterial;
1281 if (sourceEffect2.
anime.Length != 0)
1283 if (sourceEffect2.
anime.Length > 2)
1285 float num3 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[2];
1286 if (!(num3 >= (
float)sourceEffect2.
anime[0]))
1293 float num4 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[0];
1308 if (this.cell.
critter !=
null)
1311 int snowTile = critter.
tile;
1341 param.x += anime4.
v.x;
1342 param.y += anime4.
v.y;
1343 param.z += anime4.
v.z;
1346 if (this.cell.
obj != 0 && !
this.cell.sourceObj.renderData.SkipOnMap)
1352 param.mat = this.cell.
matObj;
1358 param.y += 0.01f *
floatY;
1361 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1408 param.tile = sourceObj.
_tiles[this.cell.blockDir % sourceObj.
_tiles.Length];
1412 param.tile = sourceObj.
_tiles[this.cell.objDir % sourceObj.
_tiles.Length];
1416 param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
1420 param.y += sourceObj.
pref.
y;
1421 param.z += sourceObj.
pref.
z;
1480 param.matColor = 104025f;
1507 param.tile = defBlock.
_tiles[this.cell.blockDir % defBlock.
_tiles.Length];
1508 if (defBlock.
id != 1)
1514 param.matColor = 104025f;
1520 param.z += ugFix.z +
slopeFixZ * (float)j;
1534 if (!isWater && (this.cell.
Front.
sourceFloor.tileType.IsWater ||
this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
1547 num7 = row3.
_tiles[this.cell.blockDir % row3.
_tiles.Length];
1549 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)
1551 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;
1553 param.
tile = num7 + ((!
this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
1556 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)
1558 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;
1560 param.
tile = num7 + ((!
this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
1568 param.matColor = 104025f;
1592 param.tile = defBlock2.
_tiles[this.cell.blockDir % defBlock2.
_tiles.Length];
1593 if (defBlock2.
id != 1)
1599 param.matColor = 104025f;
1604 param.z += ugFix.z +
slopeFixZ * (float)k;
1621 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);
1630 if (isWater && flag)
1632 param.y -= 0.01f *
floatY;
1661 if (!this.cell.
Right.
IsSnowTile &&
this.cell.Right.topHeight ==
this.cell.topHeight)
1665 if (!this.cell.
Front.
IsSnowTile &&
this.cell.Front.topHeight ==
this.cell.topHeight)
1671 param.tile = 448 + num8 + 12;
1683 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
1707 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
1724 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
1742 if (this.cell.
autotile != 0 &&
sourceFloor.autotile != 0 && (!
hasBridge ||
this.cell.bridgeHeight -
this.cell.height > 3) && !
this.cell.skipRender && num8 == 0)
1762 int num10 = this.cell.shore / num9;
1763 int num11 = this.cell.shore % num9;
1765 if (this.cell.
shore != 0)
1767 Cell cell = ((((uint)num10 & (
true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num10 & 2u) != 0) ? this.cell.
Right : ((((uint)num10 & 4u) != 0) ? this.cell.Front : this.cell.
Left)));
1770 cell = ((((uint)num10 & 8u) != 0) ? this.cell.
Left : ((((uint)num10 & 4u) != 0) ? this.cell.Front : ((((uint)num10 & 2u) != 0) ? this.cell.
Right :
this.cell.
Back)));
1796 param.tile = (24 + num11 / 2) * 32 + num11 % 2 * 16 + num10;
1800 if (this.cell.
Back.
isShoreSand && ((uint)(
this.cell.Back.shore / num9) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.
Left.
shore / num9) & (
true ? 1u : 0u)) != 0)
1807 if (this.cell.
Back.
isShoreSand && ((uint)(
this.cell.Back.shore / num9) & 2u) != 0 &&
this.cell.Right.isShoreSand && ((uint)(
this.cell.Right.shore / num9) & (
true ? 1u : 0u)) != 0)
1814 if (this.cell.
Front.
isShoreSand && ((uint)(
this.cell.Front.shore / num9) & 2u) != 0 &&
this.cell.Right.isShoreSand && ((uint)(
this.cell.Right.shore / num9) & 4u) != 0)
1821 if (this.cell.
Front.
isShoreSand && ((uint)(
this.cell.Front.shore / num9) & 8u) != 0 &&
this.cell.Left.isShoreSand && ((uint)(
this.cell.Left.shore / num9) & 4u) != 0)
1828 if (this.cell.
_bridge != 0 &&
this.cell.isBridgeEdge &&
this.cell.bridgePillar !=
byte.MaxValue)
1847 if (((uint)num10 & (
true ? 1u : 0u)) != 0)
1849 if (((uint)num10 & 8u) != 0)
1851 if ((num10 & 2) == 0 && (num10 & 4) == 0)
1857 if (((uint)num10 & 2u) != 0)
1859 if ((num10 & 8) == 0 && (num10 & 4) == 0)
1866 if (((uint)num10 & 4u) != 0)
1868 if (((uint)num10 & 8u) != 0)
1870 if ((num10 & 2) == 0 && (num10 & 1) == 0)
1876 if (((uint)num10 & 2u) != 0)
1878 if ((num10 & 8) == 0 && (num10 & 1) == 0)
1887 if (!this.cell.
Front.
sourceFloor.tileType.IsWater && !
this.cell.Front.isDeck)
1891 if (!this.cell.
Right.
sourceFloor.tileType.IsWater && !
this.cell.Right.isDeck)
1899 if (!this.cell.
Back.
sourceFloor.tileType.IsWater && !
this.cell.Back.isDeck)
1905 if (((uint)(this.cell.
shore / num9) & (
true ? 1u : 0u)) != 0)
1937 if (!this.cell.
Left.
sourceFloor.tileType.IsWater && !
this.cell.Left.isDeck)
1943 if (((uint)(this.cell.
shore / num9) & 8u) != 0)
1978 param.y += 0.01f *
floatY;
1997 param.y = (float)(
cz -
cx) * screen.tileAlign.y + (float)(
int)this.cell.bridgeHeight *
_heightMod.y;
1998 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(
int)this.cell.bridgeHeight *
_heightMod.z;
2001 param.y += 0.01f *
floatY;
2026 if (this.cell.
shadow != 0)
2030 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2051 if (this.cell.
isBridgeEdge &&
this.cell.bridgeHeight -
this.cell.height >= 3 &&
this.cell.bridgePillar !=
byte.MaxValue && !
noSlopMode)
2068 param.tile = row4.
_tiles[0] + ((num13 == 2) ? 32 : 0);
2075 param.tile = row4.
_tiles[0] + 32;
2080 for (
int l = 0; l < num13; l++)
2100 if (this.cell.
_block != 0 && !
this.cell.hasDoor)
2130 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2143 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)))
2150 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2174 if (this.room !=
null)
2187 int num15 = ((this.room.data.maxHeight == 0) ? 2 : this.room.
data.
maxHeight);
2188 roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.
lot.
height < num15) ? this.room.lot.height : num15) + 0.01f * (
float)this.room.
lot.
heightFix;
2207 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)
2212 else if (this.cell.
Back.
room !=
null &&
this.cell.Back.room.
lot == (
this.cell.Front.room ??
this.cell.Right.room)?.lot)
2223 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2259 param.color = (int)(50f *
blockLight) * 262144;
2260 param.matColor = 104025f;
2302 if (this.cell.
Things.Count > 0)
2324 if (!invisible &&
room !=
null)
2348 room = this.cell.Right.room ?? this.cell.
room;
2353 if (!invisible &&
room !=
null)
2389 bool flag8 = blockDir == 1 ||
_lowblock || flag7;
2390 bool flag9 = blockDir == 0 ||
_lowblock || flag7;
2397 if (!this.cell.
IsRoomEdge || (
this.cell.Front.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2411 if (!this.cell.
IsRoomEdge || (
this.cell.Right.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2422 if (blockDir == 0 || blockDir == 2)
2425 Room room2 = this.cell.Front.room ?? this.cell.
room;
2426 if (room2 !=
null && this.tileType.
IsWall)
2428 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2448 if (blockDir == 2 &&
left.sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
2451 param.mat =
left.matBlock;
2486 param.tile =
_sourceBlock._tiles[0] + ((flag8 && flag9 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2499 param.tile =
_sourceBlock._tiles[0] + ((flag8 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2516 param.tile =
_sourceBlock._tiles[0] + ((flag8 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2531 if (blockDir == 1 || blockDir == 2)
2536 Room room3 = this.cell.Right.room ?? this.cell.
room;
2537 if (room3 !=
null && this.tileType.
IsWall)
2539 if (room3.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2558 if (blockDir == 2 && this.cell.
room ==
null &&
this.cell.Right.room !=
null)
2572 int num19 = ((room4.data.maxHeight == 0) ? 2 : room4.
data.
maxHeight);
2573 roomHeight = EMono.setting.render.roomHeightMod * (float)((room4.
lot.
height < num19) ? room4.lot.height : num19) + 0.01f * (
float)room4.
lot.
heightFix;
2577 if (blockDir == 2 && back2.
sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
2616 param.tile =
_sourceBlock._tiles[0] + ((flag9 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2638 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref
matBlock.matColor,
_sourceBlock.sourceAutoFloor.colorMod));
2646 int num20 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.
objDir : 0) + 1;
2657 int shadow4 = shadowPref2.
shadow;
2678 if (this.cell.
room !=
null || !
this.cell.IsRoomEdge || !
showRoof)
2682 if (this.cell.
_block == 0 || !
this.cell.sourceBlock.tileType.RepeatBlock)
2685 if (obj ==
null || !obj.
HasRoof)
2701 freePos.x = (freePos.y = (freePos.z = 0f));
2705 param.x += rampFix.x;
2706 param.y += rampFix.y;
2707 param.z += rampFix.z;
2708 freePos.x += rampFix.x;
2709 freePos.y += rampFix.y;
2710 freePos.z += rampFix.z;
2712 param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight));
2720 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
2730 bool flag10 =
false;
2732 bool flag11 =
false;
2748 if (!isInstalled && t.
category.tileDummy != 0)
2752 float num27 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.
height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.
height)));
2755 thingPos.y -= num22;
2757 shadow = thingPos.y < 0.16f && num25 < 0.16f;
2767 _actorPos.z = param.z + num26;
2768 if (this.room !=
null)
2778 _actorPos.x =
orgX + num23;
2783 if (thing?.
id != t.
id)
2790 thingPos.y -= num22;
2793 _actorPos.z -= 0.2f;
2796 _actorPos.y -= num22;
2798 _actorPos.z += renderSetting.thingZ + (float)m * -0.01f +
zSetting.mod1 *
thingPos.y;
2808 freePos.x += rampFix2.x;
2809 freePos.y += rampFix2.y;
2810 freePos.z += rampFix2.z;
2813 num25 += rampFix2.y;
2815 liquidLv -= (int)(rampFix2.y * 150f);
2830 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
2831 _actorPos.z += pref.
z;
2832 thingPos.z += pref.
z;
2841 thingPos.y += num27;
2842 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
2843 _actorPos.z += pref.
z;
2846 thingPos.z += pref.
z;
2856 thingPos.y += num27;
2857 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
2858 _actorPos.z += pref.
z;
2859 thingPos.z += pref.
z;
2864 float num28 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
2867 _actorPos.y += 0.01f *
floatY - num28;
2870 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
2908 Room room5 = ((t.dir == 0) ? this.cell.
Back.
room :
this.cell.Left.room);
2931 _actorPos.x += t.
fx;
2932 _actorPos.y += t.
fy;
2952 _actorPos.z += -0.5f;
2993 param.tile += ((param.tile < 0f) ? (-64) : 64);
3002 _actorPos.y = EMono.pc.renderer.position.y - pref.
height;
3003 _actorPos.z = EMono.pc.renderer.position.z + 0.02f;
3014 num23 += pref.stackX * (float)((!t.
flipX) ? 1 : (-1));
3032 param.shadowFix = 0f - num25;
3033 param.color += 1310720f;
3050 if (restrainer !=
null)
3053 if (getRestrainPos !=
default(Vector3))
3057 float num30 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.
source.pref.height);
3058 _actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.
owner.
dir % 2 == 0) ? 1 : (-1));
3059 _actorPos.y = position.y + num30;
3060 _actorPos.z = position.z + getRestrainPos.z;
3065 param.shadowFix = 0f;
3074 float num31 = chara.renderer.data.size.y * 0.3f;
3079 float num32 = thingPos.y + num31;
3080 float num33 = (float)n * -0.01f;
3087 _actorPos.z += renderSetting.laydownZ + num33;
3088 param.liquidLv = ((thingPos.y == 0f &&
liquidLv > 0) ? 90 : 0);
3089 thingPos.y += num31 * 0.8f;
3126 if (!
showRoof || !
roof || this.cell.
room ==
null ||
this.cell.Front.room ==
null ||
this.cell.Right.room ==
null)
3152 Vector3 zero = Vector3.zero;
3171 zero.x += rampFix.x;
3172 zero.y += rampFix.y;
3173 zero.z += rampFix.z;
3180 zero.x += tg.Pref.x * (float)((!tg.
flipX) ? 1 : (-1));
3181 zero.z += tg.
Pref.
z;
3213 float num4 = (tileType.UseMountHeight ? 0f : ((pref.height == 0f) ? 0.1f : pref.
height));
3221 zero.x += rampFix2.x;
3222 zero.y += rampFix2.y;
3223 zero.z += rampFix2.z;
3232 zero.x += pref.stackX * (float)((!thing.
flipX) ? 1 : (-1));
3237 num4 += altitudeFix.y * (float)thing.
altitude;
3244 zero.z += renderSetting.thingZ + num + (float)i * -0.01f +
zSetting.mod1 * zero.y;
3286 int num2 = (int)(num * 50f) * 262144;
3308 num = lot.z - roofStyle.
h;
3309 num2 = lot.x - roofStyle.
w;
3310 num3 = lot.mz + 1 + roofStyle.
h;
3311 num4 = lot.mx + 1 + roofStyle.
w;
3323 num = lot.x - roofStyle.
w;
3324 num2 = lot.z - roofStyle.
h;
3325 num3 = lot.mx + 1 + roofStyle.
w;
3326 num4 = lot.mz + 1 + roofStyle.
h;
3339 num5 = ((lot.height > 1) ? 1 : 0);
3350 int num6 = num4 + (reverse ? roofStyle.w : roofStyle.
h) * 2 - num2;
3356 num7 = EMono.sources.blocks.rows.Count - 1;
3360 num8 = EMono.sources.floors.rows.Count - 1;
3365 num9 = EMono.sources.blocks.rows.Count - 1;
3368 int num10 = num6 / 2 - roofStyle.
flatW;
3369 int num11 = num6 / 2 + roofStyle.flatW + ((num6 % 2 != 0) ? 1 : 0);
3372 int num13 = ((num5 != 0) ? (-1) : 0);
3374 Vector3 vector = (lot.fullblock ? roofStyle.posFixBlock : roofStyle.
posFix);
3375 switch (roofStyle.
type)
3378 flag = num6 % 2 == 1 && roofStyle.flatW == 0;
3382 num10 = roofStyle.
flatW;
3383 num11 = num6 - roofStyle.
flatW;
3401 for (
cz = num2;
cz < num4;
cz++)
3403 for (
cx = num;
cx < num3;
cx++)
3431 int num17 = num16 - num15;
3444 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));
3464 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));
3485 float num18 = (float)num17 *
screen.
tileAlign.y + (
float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y + vector.y;
3492 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)num13 *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3493 param.y = num18 + (float)num13 *
roofFix2.y;
3496 param.snow = idRoofTile == 0 && flag3;
3497 param.shadowFix = 0f;
3519 if (idRoofTile != 0)
3522 int num20 = (reverse ? 1 : 0) + ((!flag) ? 2 : 0);
3537 param.matColor = 104025f;
3540 param.z += roofStyle.
snowZ;
3552 param.matColor = 104025f;
3554 param.x += roofStyle.
snowFix.x;
3555 param.y += roofStyle.
snowFix.y;
3556 param.z += roofStyle.snowZ + roofStyle.
snowFix.z;
3562 if (idRoofTile != 0)
3564 int num21 = ((!reverse) ? ((num14 != 0) ? 2 : 0) : ((num14 != 0) ? 1 : 3));
3567 param.shadowFix = num21 + 1;
3574 param.matColor = 104025f;
3575 param.z += roofStyle.
snowZ;
3581 param.tile += (lot.altRoof ? 8 : 0);
3584 param.shadowFix = 0f;
3609 for (
int i = 0; i < num13; i++)
3611 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)i *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3612 param.y = num18 + (float)i *
roofFix2.y;
3638 num13 += num14
switch
3654 return p * 262144 + (int)(matColor.r * 50f) * 4096 + (int)(matColor.g * 50f) * 64 + (int)(matColor.b * 50f);
3660 if (
room ==
null && dirWall != -1)
3662 if (dirWall == 0 && _cell.
Front.
room !=
null)
3665 _cell = _cell.
Front;
3670 _cell = _cell.
Right;
3678 float num2 = 1000f +
param.
x *
screen.
tileWeight.x + (
float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + roofStyle.
posFix.z;
3684 _param.x = (float)(_cx + _cz) * screen.tileAlign.x + roofFix.x + (float)h *
roofFix2.x;
3688 if (!ignoreAltitudeY ||
room !=
null)
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
static AM_Inspect Inspect
virtual bool IsRoofEditMode(Card c=null)
static AM_ViewMap ViewMap
virtual BaseTileMap.CardIconMode cardIconMode
virtual bool ShowMaskedThings
static AM_FlagCell FlagCell
virtual byte GetTile(int index)
List< Action > actionsLateUpdate
BaseTileSelector tileSelector
virtual void RefreshWeather()
const int BlocklightToken
int GetRoofLight(Lot lot)
RenderData rendererInnerBlock
SourceFloor.Row sourceBridge
InnerMode defaultInnerMode
ScreenHighlight screenHighlight
SourceMaterial.Row matBridge
RenderData rendererFogRoomSolid
RenderData rendererWaterBlock
Vector3 waterEdgeFixShoreSand
int GetApproximateBlocklight(Cell cell)
Vector3 waterEdgeFixShore
static int GetColorInt(ref Color matColor, int p)
SceneLightProfile lightSetting
void OnActivate(BaseGameScreen _screen)
MeshPass passAutoTileWater
new BaseGameScreen screen
WallClipMode wallClipMode
float floorShadowStrength
RenderData rendererFloorMarker
GameSetting.RenderSetting renderSetting
Vector3 ugFixBridgeBottom
SourceMaterial.Row matBlock
RenderDataEffect rendererEffect
SourceBlock.Row _sourceBlock
RenderData renderFootmark
Vector3[] waterEdgeBlockFix
RenderData rendererBlockMarker
Vector3[] ambientShadowFix
RenderData rendererFogRoomBlockSolid
SourceMaterial.Row matFloor
RenderData rendererWallDeco
SourceBlock.Row sourceBlock
Vector3 waterEdgeBridgeFix
RenderData rendererFogRoomWallSolid
RenderData rendererFogFloorSolid
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
RenderDataObjDummy rendererObjDummy
BaseTileSelector selector
Vector3 heightModRoofBlock
NoiseLayer layerGroundLights
RenderData rendererFogBlockSolid
GameSetting.RenderSetting.ZSetting zSetting
SourceFloor.Row sourceFloor
Vector3 GetThingPosition(Card tg, Point p)
override void Draw(RenderParam p)
virtual void SetFirst(bool first, Vector3 pos)
TraitShackle GetRestrainer()
virtual CardRow sourceCard
SourceCategory.Row category
TaskDesignation designation
SourceCellEffect.Row source
static List< SourceBlock.Row > blockList
SourceBlock.Row sourceBlock
SourceMaterial.Row matBlock
SourceFloor.Row sourceFloor
SourceMaterial.Row matObj
SourceMaterial.Row matBridge
SourceFloor.Row sourceBridge
SourceMaterial.Row matFloor
SourceCellEffect.Row sourceEffect
static List< SourceMaterial.Row > matList
override bool IsAliveInCurrentZone
override bool IsDeadOrSleeping
override CardRow sourceCard
override void SetRenderParam(RenderParam p)
static GameSetting setting
static ColorProfile Colors
static SoundManager Sound
static SourceManager sources
static SourceFloor.Row sourceSnow
static SourceFloor.Row sourceSnow2
static SourceFloor.Row sourceIce
virtual void OnRenderTileMap(RenderParam p)
static Card alwaysVisible
static SourceMaterial.Row sourceSnow
static SourceMaterial.Row sourceGold
static HashSet< int > sunMap
void Add(Point point, float tile=0f, float color=0f)
void AddShadow(MeshPassParam p, ref Vector3 fix)
List< MeshBatch > batches
CinemaConfig cinemaConfig
ref Vector3 Position(int height)
Point Set(int _x, int _z)
Point Clamp(bool useBounds=false)
static void InitBytes(int a)
new void Draw(RenderParam p, int tile=0)
void Draw(RenderParam p, int tile)
void DrawRepeat(RenderParam p, int count, float size, bool skipFirst=false)
int ConvertTile(int tile)
void SetRenderParam(RenderParam p, SourceMaterial.Row mat, int dir)
SourceMaterial.Row DefaultMaterial
AnimationCurve baseBrightnessCurve
float dynamicBrightnessSpeed
AnimationCurve shadowCurveFloor
AnimationCurve dynamicBrightnessCurve2
float dynamicBrightnessLightBonus
AnimationCurve lightLimit
AnimationCurve fogBrightness
AnimationCurve dynamicBrightnessCurve
AnimationCurve shadowCurve
AnimationCurve nightRatioCurve
AnimationCurve lightModCurve
SceneGlobalProfile global
List< ISyncScreen > syncList
GameSetting.RenderSetting.MapBGSetting bg
void DrawWall(Point point, int color, bool useMarkerPass=false, float offsetZ=0f)
static ShadowData Instance
virtual bool IsSnowCovered
virtual void Draw(int x, int z, RenderParam p)
override void SetRenderParam(RenderParam p)
override CardRow sourceCard
override float FloorHeight
virtual bool IsUseBlockDir
virtual void GetMountHeight(ref Vector3 v, Point p, int d, Card target=null)
static TileTypeIllumination Illumination
static TileTypeWaterShallow FloorWaterShallow
virtual bool AlwaysShowShadow
virtual bool UseLowWallTiles
virtual bool ForceRpeatBlock
virtual bool IsSkipLowBlock
virtual bool UseMountHeight
virtual BlockRenderMode blockRenderMode
Vector3 GetRampFix(int dir, SourcePref pref=null)
virtual Vector3 GetRestrainPos
virtual bool IgnoreLastStackHeight
virtual bool AlwaysHideOnLowWall
virtual TileType tileType
virtual bool IsChangeFloorHeight
virtual bool AlwaysLowblock