302 public int[]
floatVs =
new int[10] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
308 public float[]
floatYs =
new float[10] { 0f, 1f, 2f, 3f, 4f, 5f, 6f, 7f, 8f, 9f };
340 protected RaycastHit2D[]
rays =
new RaycastHit2D[1];
526 for (
int i = 0; i < 256; i++)
568 subtleHighlightArea = EMono.scene.actionMode.AreaHihlight != 0 && (EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Build || EMono.scene.actionMode.AreaHihlight !=
AreaHighlightMode.Edit);
586 fogBounds = (EMono._map.config.forceHideOutbounds && (!EMono.debug.godBuild || !
buildMode)) || (EMono.core.config.game.dontRenderOutsideMap && !
buildMode);
614 Fov.nonGradientMod = profile.
global.fovModNonGradient;
622 for (
int i = 0; i <
floatYs.Length; i++)
705 noRoofMode = EMono.game.config.noRoof || screen.focusOption !=
null;
726 currentRoom.data.visited =
true;
730 room.data.visited =
true;
764 Vector3Int vector3Int =
screen.
grid.WorldToCell(mposWorld);
766 mz = vector3Int.x - 1;
771 TestPoint.x =
mx + num3;
772 TestPoint.z =
mz - num3;
776 Physics2D.SyncTransforms();
777 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
783 TestPoint.x =
mx + num3 - 1;
784 TestPoint.z =
mz - num3;
788 Physics2D.SyncTransforms();
789 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
795 TestPoint.x =
mx + num3;
796 TestPoint.z =
mz - num3 + 1;
800 Physics2D.SyncTransforms();
801 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
809 bool flag2 = EMono._zone.UseFog && !
EMono.
scene.
bg.wall;
814 cx = screen.scrollX - screen.scrollY +
x - (
z + 1) / 2;
815 cz = screen.scrollY + screen.scrollX +
x +
z / 2;
820 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)
z *
edgeBlockFix.z;
875 int valueOrDefault = (this.room?.
lot?.
idBGM).GetValueOrDefault();
876 if (valueOrDefault == 0)
882 BGMData data =
EMono.
Sound.plLot.list[0].data;
883 if ((
object)data !=
null && data.id == valueOrDefault)
895 SoundManager.bgmVolumeMod = ((!LayerDrama.maxBGMVolume && !EMono._map.IsIndoor && this.room !=
null && !this.room.data.atrium && this.room.
HasRoof) ? (-0.6f) : 0f);
928 this.room = this.cell.
room;
948 floorDir = this.cell.sourceObj.snowTile - 1;
968 light = (this.cell.pcSync ? this.cell.light : (this.cell.light / 3 * 2));
1006 liquidLv = (param.liquidLv = ((!flag && !
isUnderwater) ? (((this.cell.
liquidLv +
this.cell._bridge != 0) ?
this.cell.sourceBridge.tileType.LiquidLV :
sourceFloor.tileType.LiquidLV) * 10) : 0));
1016 if (effect !=
null && effect.
IsFire)
1026 if (this.room !=
null)
1028 this.room.lot.sync =
true;
1039 if ((this.room !=
null && this.room.
lot ==
currentLot) || flag2)
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));
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)
1082 if (num || !
isSeen || flag3)
1096 param.y += 0.01f *
floatY;
1104 param.x += anime2.
v.x;
1105 param.y += anime2.
v.y;
1106 param.z += anime2.
v.z;
1123 param.dir = this.cell._roofBlockDir % 4;
1133 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1141 if (dir == 0 || dir == 2)
1158 if (dir == 1 || dir == 2)
1181 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref row2.
matColor,
_sourceBlock.sourceAutoFloor.colorMod));
1187 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1192 int shadow2 = shadowPref.
shadow;
1197 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1217 param.matColor = 104025f;
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;
1243 float num2 = (float)(
int)this.cell.TopHeight *
_heightMod.y;
1248 param.z += ugFix.z +
slopeFixZ * (float)i;
1287 if (!
showRoof || !
roof || this.cell.
room ==
null ||
this.cell.Front.room ==
null ||
this.cell.Right.room ==
null)
1302 freePos.x = (freePos.y = (freePos.z = 0f));
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;
1313 param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight));
1321 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1351 if (!isInstalled && t.
category.tileDummy != 0)
1355 float num12 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.
height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.
height)));
1361 shadow = thingPos.y < 0.16f && num10 < 0.16f;
1371 _actorPos.z = param.z + num11;
1372 if (this.room !=
null)
1382 _actorPos.x =
orgX + num8;
1387 if (thing?.
id != t.
id)
1397 _actorPos.z -= 0.2f;
1400 _actorPos.y -= num5;
1402 _actorPos.z += renderSetting.thingZ + (float)j * -0.01f +
zSetting.mod1 *
thingPos.y;
1412 freePos.x += rampFix2.x;
1413 freePos.y += rampFix2.y;
1414 freePos.z += rampFix2.z;
1417 num10 += rampFix2.y;
1419 liquidLv -= (int)(rampFix2.y * 150f);
1434 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1435 _actorPos.z += pref.
z;
1436 thingPos.z += pref.
z;
1445 thingPos.y += num12;
1479 _actorPos.x += t.
fx;
1480 _actorPos.y += t.
fy;
1488 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1489 _actorPos.z += pref.
z;
1492 thingPos.z += pref.
z;
1502 thingPos.y += num12;
1503 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1504 _actorPos.z += pref.
z;
1505 thingPos.z += pref.
z;
1510 float num13 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1516 _actorPos.y += 0.01f *
floatY - num13;
1519 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1566 _actorPos.x += t.
fx;
1577 _actorPos.z += -0.5f;
1618 param.tile += ((param.tile < 0f) ? (-64) : 64);
1627 _actorPos.y = EMono.pc.renderer.position.y - pref.
height;
1628 _actorPos.z = EMono.pc.renderer.position.z + 0.02f;
1639 num8 += pref.stackX * (float)((!t.
flipX) ? 1 : (-1));
1657 param.shadowFix = 0f - num10;
1658 param.color += 1310720f;
1663 if (chara.
host !=
null)
1689 if (restrainer !=
null)
1692 if (getRestrainPos !=
default(Vector3))
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;
1704 param.shadowFix = 0f;
1713 float num16 = chara.renderer.data.size.y * 0.3f;
1718 float num17 = thingPos.y + num16;
1719 float num18 = (float)k * -0.01f;
1726 _actorPos.z += renderSetting.laydownZ + num18;
1727 param.liquidLv = ((thingPos.y == 0f &&
liquidLv > 0) ? 90 : 0);
1728 thingPos.y += num16 * 0.8f;
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;
1751 float num21 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1753 _actorPos.y += 0.01f *
floatY - num21;
1754 int num22 = TileType.FloorWaterShallow.LiquidLV * 10;
1755 num22 -= (int)(
floatY * 0.5f);
1756 param.liquidLv = num22;
1760 param.liquidLv -= 20;
1796 if (this.cell.
effect !=
null)
1804 param.mat = defaultMaterial;
1812 if (sourceEffect2.
anime.Length != 0)
1814 if (sourceEffect2.
anime.Length > 2)
1816 float num23 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[2];
1817 if (!(num23 >= (
float)sourceEffect2.
anime[0]))
1819 param.tile += num23;
1824 float num24 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[0];
1825 param.tile += num24;
1839 if (this.cell.
critter !=
null)
1842 int snowTile = critter.
tile;
1872 param.x += anime4.
v.x;
1873 param.y += anime4.
v.y;
1874 param.z += anime4.
v.z;
1877 if (this.cell.
obj != 0 && !
this.cell.sourceObj.renderData.SkipOnMap)
1883 param.mat = this.cell.
matObj;
1889 param.y += 0.01f *
floatY;
1892 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1934 param.tile = sourceObj.
_tiles[this.cell.blockDir % sourceObj.
_tiles.Length];
1938 param.tile = sourceObj.
_tiles[this.cell.objDir % sourceObj.
_tiles.Length];
1942 param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
1946 param.y += sourceObj.
pref.
y;
1947 param.z += sourceObj.
pref.
z;
2006 param.matColor = 104025f;
2033 param.tile = defBlock.
_tiles[this.cell.blockDir % defBlock.
_tiles.Length];
2034 if (defBlock.
id != 1)
2040 param.matColor = 104025f;
2046 param.z += ugFix.z +
slopeFixZ * (float)l;
2060 if (!isWater && (this.cell.
Front.
sourceFloor.tileType.IsWater ||
this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
2073 num27 = row3.
_tiles[this.cell.blockDir % row3.
_tiles.Length];
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)
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;
2079 param.
tile = num27 + ((!
this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
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)
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;
2086 param.
tile = num27 + ((!
this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
2094 param.matColor = 104025f;
2118 param.tile = defBlock2.
_tiles[this.cell.blockDir % defBlock2.
_tiles.Length];
2119 if (defBlock2.
id != 1)
2125 param.matColor = 104025f;
2130 param.z += ugFix.z +
slopeFixZ * (float)m;
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);
2156 if (isWater && flag)
2158 param.y -= 0.01f *
floatY;
2187 if (!this.cell.
Right.
IsSnowTile &&
this.cell.Right.topHeight ==
this.cell.topHeight)
2191 if (!this.cell.
Front.
IsSnowTile &&
this.cell.Front.topHeight ==
this.cell.topHeight)
2197 param.tile = 448 + num28 + 12;
2209 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2233 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
2250 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
2268 if (this.cell.
autotile != 0 &&
sourceFloor.autotile != 0 && (!
hasBridge ||
this.cell.bridgeHeight -
this.cell.height > 3) && !
this.cell.skipRender && num28 == 0)
2288 int num30 = this.cell.shore / num29;
2289 int num31 = this.cell.shore % num29;
2291 if (this.cell.
shore != 0)
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)));
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)));
2322 param.tile = (24 + num31 / 2) * 32 + num31 % 2 * 16 + num30;
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)
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)
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)
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)
2354 if (this.cell.
_bridge != 0 &&
this.cell.isBridgeEdge &&
this.cell.bridgePillar !=
byte.MaxValue)
2373 if (((uint)num30 & (
true ? 1u : 0u)) != 0)
2375 if (((uint)num30 & 8u) != 0)
2377 if ((num30 & 2) == 0 && (num30 & 4) == 0)
2383 if (((uint)num30 & 2u) != 0)
2385 if ((num30 & 8) == 0 && (num30 & 4) == 0)
2392 if (((uint)num30 & 4u) != 0)
2394 if (((uint)num30 & 8u) != 0)
2396 if ((num30 & 2) == 0 && (num30 & 1) == 0)
2402 if (((uint)num30 & 2u) != 0)
2404 if ((num30 & 8) == 0 && (num30 & 1) == 0)
2413 if (!this.cell.
Front.
sourceFloor.tileType.IsWater && !
this.cell.Front.isDeck)
2417 if (!this.cell.
Right.
sourceFloor.tileType.IsWater && !
this.cell.Right.isDeck)
2425 if (!this.cell.
Back.
sourceFloor.tileType.IsWater && !
this.cell.Back.isDeck)
2431 if (((uint)(this.cell.
shore / num29) & (
true ? 1u : 0u)) != 0)
2463 if (!this.cell.
Left.
sourceFloor.tileType.IsWater && !
this.cell.Left.isDeck)
2469 if (((uint)(this.cell.
shore / num29) & 8u) != 0)
2504 param.y += 0.01f *
floatY;
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;
2527 param.y += 0.01f *
floatY;
2552 if (this.cell.
shadow != 0)
2556 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2577 if (this.cell.
isBridgeEdge &&
this.cell.bridgeHeight -
this.cell.height >= 3 &&
this.cell.bridgePillar !=
byte.MaxValue && !
noSlopMode)
2594 param.tile = row4.
_tiles[0] + ((num33 == 2) ? 32 : 0);
2601 param.tile = row4.
_tiles[0] + 32;
2606 for (
int n = 0; n < num33; n++)
2626 if (this.cell.
_block != 0 && !
this.cell.hasDoor)
2656 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
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)))
2676 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2700 if (this.room !=
null)
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;
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)
2738 else if (this.cell.
Back.
room !=
null &&
this.cell.Back.room.
lot == (
this.cell.Front.room ??
this.cell.Right.room)?.lot)
2749 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2785 param.color = (int)(50f *
blockLight) * 262144;
2786 param.matColor = 104025f;
2828 if (this.cell.
Things.Count > 0)
2845 Room room2 = this.cell.Front.room ?? this.cell.
room;
2846 if (room2 ==
null && this.cell.
Right.
room !=
null)
2850 if (!invisible && room2 !=
null)
2852 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2874 room2 = this.cell.Right.room ?? this.cell.
room;
2875 if (room2 ==
null && this.cell.
Front.
room !=
null)
2879 if (!invisible && room2 !=
null)
2881 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2915 bool flag10 = blockDir == 1 ||
_lowblock || flag9;
2916 bool flag11 = blockDir == 0 ||
_lowblock || flag9;
2923 if (!this.cell.
IsRoomEdge || (
this.cell.Front.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2937 if (!this.cell.
IsRoomEdge || (
this.cell.Right.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2948 if (blockDir == 0 || blockDir == 2)
2951 Room room3 = this.cell.Front.room ?? this.cell.
room;
2952 if (room3 !=
null && this.tileType.
IsWall)
2954 if (room3.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2974 if (blockDir == 2 &&
left.sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
2977 param.mat =
left.matBlock;
3012 param.tile =
_sourceBlock._tiles[0] + ((flag10 && flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3022 if (!flag10 && !
showRoof && this.cell.
Left.
HasWallOrFence &&
this.cell.Left.blockDir != 0 && !
this.cell.Left.isToggleWallPillar)
3025 param.tile =
_sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3042 param.tile =
_sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3057 if (blockDir == 1 || blockDir == 2)
3062 Room room4 = this.cell.Right.room ?? this.cell.
room;
3063 if (room4 !=
null && this.tileType.
IsWall)
3065 if (room4.
lot.
idDeco != 0 && !
this.cell.hasDoor)
3084 if (blockDir == 2 && this.cell.
room ==
null &&
this.cell.Right.room !=
null)
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;
3103 if (blockDir == 2 && back2.
sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
3142 param.tile =
_sourceBlock._tiles[0] + ((flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3164 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref
matBlock.matColor,
_sourceBlock.sourceAutoFloor.colorMod));
3172 int num39 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.
objDir : 0) + 1;
3183 int shadow4 = shadowPref2.
shadow;
3204 if (this.cell.
room !=
null || !
this.cell.IsRoomEdge || !
showRoof)
3208 if (this.cell.
_block == 0 || !
this.cell.sourceBlock.tileType.RepeatBlock)
3211 if (obj ==
null || !obj.
HasRoof)
3238 Vector3 zero = Vector3.zero;
3257 zero.x += rampFix.x;
3258 zero.y += rampFix.y;
3259 zero.z += rampFix.z;
3267 zero.x += pref.x * (float)((!tg.
flipX) ? 1 : (-1));
3300 float num4 = (tileType.UseMountHeight ? 0f : ((pref2.height == 0f) ? 0.1f : pref2.
height));
3308 zero.x += rampFix2.x;
3309 zero.y += rampFix2.y;
3310 zero.z += rampFix2.z;
3319 zero.x += pref2.stackX * (float)((!thing.
flipX) ? 1 : (-1));
3324 num4 += altitudeFix.y * (float)thing.
altitude;
3331 zero.z += renderSetting.thingZ + num + (float)i * -0.01f +
zSetting.mod1 * zero.y;
3351 zero.z += (float)(
detail?.things.Count ?? 0) * -0.01f;
3378 int num2 = (int)(num * 50f) * 262144;
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;
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;
3431 num5 = ((lot.height > 1) ? 1 : 0);
3442 int num6 = num4 + (reverse ? roofStyle.w : roofStyle.
h) * 2 - num2;
3448 num7 = EMono.sources.blocks.rows.Count - 1;
3452 num8 = EMono.sources.floors.rows.Count - 1;
3457 num9 = EMono.sources.blocks.rows.Count - 1;
3460 int num10 = num6 / 2 - roofStyle.
flatW;
3461 int num11 = num6 / 2 + roofStyle.flatW + ((num6 % 2 != 0) ? 1 : 0);
3464 int num13 = ((num5 != 0) ? (-1) : 0);
3466 Vector3 vector = (lot.fullblock ? roofStyle.posFixBlock : roofStyle.
posFix);
3467 switch (roofStyle.
type)
3470 flag = num6 % 2 == 1 && roofStyle.flatW == 0;
3474 num10 = roofStyle.
flatW;
3475 num11 = num6 - roofStyle.
flatW;
3493 for (
cz = num2;
cz < num4;
cz++)
3495 for (
cx = num;
cx < num3;
cx++)
3523 int num17 = num16 - num15;
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));
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));
3577 float num18 = (float)num17 *
screen.
tileAlign.y + (
float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y + vector.y;
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;
3588 param.snow = idRoofTile == 0 && flag3;
3589 param.shadowFix = 0f;
3611 if (idRoofTile != 0)
3614 int num20 = (reverse ? 1 : 0) + ((!flag) ? 2 : 0);
3629 param.matColor = 104025f;
3632 param.z += roofStyle.
snowZ;
3644 param.matColor = 104025f;
3646 param.x += roofStyle.
snowFix.x;
3647 param.y += roofStyle.
snowFix.y;
3648 param.z += roofStyle.snowZ + roofStyle.
snowFix.z;
3654 if (idRoofTile != 0)
3656 int num21 = ((!reverse) ? ((num14 != 0) ? 2 : 0) : ((num14 != 0) ? 1 : 3));
3659 param.shadowFix = num21 + 1;
3666 param.matColor = 104025f;
3667 param.z += roofStyle.
snowZ;
3673 param.tile += (lot.altRoof ? 8 : 0);
3676 param.shadowFix = 0f;
3701 for (
int i = 0; i < num13; i++)
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;
3730 num13 += num14
switch
3746 return p * 262144 + (int)(matColor.r * 50f) * 4096 + (int)(matColor.g * 50f) * 64 + (int)(matColor.b * 50f);
3752 if (
room ==
null && dirWall != -1)
3754 if (dirWall == 0 && _cell.
Front.
room !=
null)
3757 _cell = _cell.
Front;
3762 _cell = _cell.
Right;
3770 float num2 = 1000f +
param.
x *
screen.
tileWeight.x + (
float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + roofStyle.
posFix.z;
3776 _param.x = (float)(_cx + _cz) * screen.tileAlign.x + roofFix.x + (float)h *
roofFix2.x;
3780 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
ConTransmuteMimic mimicry
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, bool drawShadow=true)
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
static TileTypeObjFloat ObjFloat
virtual bool AlwaysShowShadow
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
virtual bool IsUnderwater