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;
1444 thingPos.y += num12;
1478 _actorPos.x += t.
fx;
1479 _actorPos.y += t.
fy;
1487 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1488 _actorPos.z += pref.
z;
1491 thingPos.z += pref.
z;
1501 thingPos.y += num12;
1502 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1503 _actorPos.z += pref.
z;
1504 thingPos.z += pref.
z;
1509 float num13 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1515 _actorPos.y += 0.01f *
floatY - num13;
1518 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1565 _actorPos.x += t.
fx;
1576 _actorPos.z += -0.5f;
1617 param.tile += ((param.tile < 0f) ? (-64) : 64);
1626 _actorPos.y = EMono.pc.renderer.position.y - pref.
height;
1627 _actorPos.z = EMono.pc.renderer.position.z + 0.02f;
1638 num8 += pref.stackX * (float)((!t.
flipX) ? 1 : (-1));
1656 param.shadowFix = 0f - num10;
1657 param.color += 1310720f;
1662 if (chara.
host !=
null)
1688 if (restrainer !=
null)
1691 if (getRestrainPos !=
default(Vector3))
1695 float num15 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.
source.pref.height);
1696 _actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.
owner.
dir % 2 == 0) ? 1 : (-1));
1697 _actorPos.y = position.y + num15;
1698 _actorPos.z = position.z + getRestrainPos.z;
1703 param.shadowFix = 0f;
1712 float num16 = chara.renderer.data.size.y * 0.3f;
1717 float num17 = thingPos.y + num16;
1718 float num18 = (float)k * -0.01f;
1725 _actorPos.z += renderSetting.laydownZ + num18;
1726 param.liquidLv = ((thingPos.y == 0f &&
liquidLv > 0) ? 90 : 0);
1727 thingPos.y += num16 * 0.8f;
1737 float num19 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1738 float num20 =
floatYs[chara.uid % 10] + 10f + (float)(chara.
uid % 30);
1739 orgY += 0.01f * num20 - num19;
1740 _actorPos.y += 0.01f * num20 - num19;
1741 param.shadowFix -= 0.01f * num20 - num19;
1750 float num21 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1752 _actorPos.y += 0.01f *
floatY - num21;
1753 int num22 = TileType.FloorWaterShallow.LiquidLV * 10;
1754 num22 -= (int)(
floatY * 0.5f);
1755 param.liquidLv = num22;
1759 param.liquidLv -= 20;
1795 if (this.cell.
effect !=
null)
1803 param.mat = defaultMaterial;
1811 if (sourceEffect2.
anime.Length != 0)
1813 if (sourceEffect2.
anime.Length > 2)
1815 float num23 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[2];
1816 if (!(num23 >= (
float)sourceEffect2.
anime[0]))
1818 param.tile += num23;
1823 float num24 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[0];
1824 param.tile += num24;
1838 if (this.cell.
critter !=
null)
1841 int snowTile = critter.
tile;
1871 param.x += anime4.
v.x;
1872 param.y += anime4.
v.y;
1873 param.z += anime4.
v.z;
1876 if (this.cell.
obj != 0 && !
this.cell.sourceObj.renderData.SkipOnMap)
1882 param.mat = this.cell.
matObj;
1888 param.y += 0.01f *
floatY;
1891 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1933 param.tile = sourceObj.
_tiles[this.cell.blockDir % sourceObj.
_tiles.Length];
1937 param.tile = sourceObj.
_tiles[this.cell.objDir % sourceObj.
_tiles.Length];
1941 param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
1945 param.y += sourceObj.
pref.
y;
1946 param.z += sourceObj.
pref.
z;
2005 param.matColor = 104025f;
2032 param.tile = defBlock.
_tiles[this.cell.blockDir % defBlock.
_tiles.Length];
2033 if (defBlock.
id != 1)
2039 param.matColor = 104025f;
2045 param.z += ugFix.z +
slopeFixZ * (float)l;
2059 if (!isWater && (this.cell.
Front.
sourceFloor.tileType.IsWater ||
this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
2072 num27 = row3.
_tiles[this.cell.blockDir % row3.
_tiles.Length];
2074 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 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.
tile = num27 + ((!
this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
2081 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 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.
tile = num27 + ((!
this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
2093 param.matColor = 104025f;
2117 param.tile = defBlock2.
_tiles[this.cell.blockDir % defBlock2.
_tiles.Length];
2118 if (defBlock2.
id != 1)
2124 param.matColor = 104025f;
2129 param.z += ugFix.z +
slopeFixZ * (float)m;
2146 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);
2155 if (isWater && flag)
2157 param.y -= 0.01f *
floatY;
2186 if (!this.cell.
Right.
IsSnowTile &&
this.cell.Right.topHeight ==
this.cell.topHeight)
2190 if (!this.cell.
Front.
IsSnowTile &&
this.cell.Front.topHeight ==
this.cell.topHeight)
2196 param.tile = 448 + num28 + 12;
2208 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2232 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
2249 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
2267 if (this.cell.
autotile != 0 &&
sourceFloor.autotile != 0 && (!
hasBridge ||
this.cell.bridgeHeight -
this.cell.height > 3) && !
this.cell.skipRender && num28 == 0)
2287 int num30 = this.cell.shore / num29;
2288 int num31 = this.cell.shore % num29;
2290 if (this.cell.
shore != 0)
2292 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)));
2295 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)));
2321 param.tile = (24 + num31 / 2) * 32 + num31 % 2 * 16 + num30;
2325 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)
2332 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)
2339 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)
2346 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)
2353 if (this.cell.
_bridge != 0 &&
this.cell.isBridgeEdge &&
this.cell.bridgePillar !=
byte.MaxValue)
2372 if (((uint)num30 & (
true ? 1u : 0u)) != 0)
2374 if (((uint)num30 & 8u) != 0)
2376 if ((num30 & 2) == 0 && (num30 & 4) == 0)
2382 if (((uint)num30 & 2u) != 0)
2384 if ((num30 & 8) == 0 && (num30 & 4) == 0)
2391 if (((uint)num30 & 4u) != 0)
2393 if (((uint)num30 & 8u) != 0)
2395 if ((num30 & 2) == 0 && (num30 & 1) == 0)
2401 if (((uint)num30 & 2u) != 0)
2403 if ((num30 & 8) == 0 && (num30 & 1) == 0)
2412 if (!this.cell.
Front.
sourceFloor.tileType.IsWater && !
this.cell.Front.isDeck)
2416 if (!this.cell.
Right.
sourceFloor.tileType.IsWater && !
this.cell.Right.isDeck)
2424 if (!this.cell.
Back.
sourceFloor.tileType.IsWater && !
this.cell.Back.isDeck)
2430 if (((uint)(this.cell.
shore / num29) & (
true ? 1u : 0u)) != 0)
2462 if (!this.cell.
Left.
sourceFloor.tileType.IsWater && !
this.cell.Left.isDeck)
2468 if (((uint)(this.cell.
shore / num29) & 8u) != 0)
2503 param.y += 0.01f *
floatY;
2522 param.y = (float)(
cz -
cx) * screen.tileAlign.y + (float)(
int)this.cell.bridgeHeight *
_heightMod.y;
2523 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(
int)this.cell.bridgeHeight *
_heightMod.z;
2526 param.y += 0.01f *
floatY;
2551 if (this.cell.
shadow != 0)
2555 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2576 if (this.cell.
isBridgeEdge &&
this.cell.bridgeHeight -
this.cell.height >= 3 &&
this.cell.bridgePillar !=
byte.MaxValue && !
noSlopMode)
2593 param.tile = row4.
_tiles[0] + ((num33 == 2) ? 32 : 0);
2600 param.tile = row4.
_tiles[0] + 32;
2605 for (
int n = 0; n < num33; n++)
2625 if (this.cell.
_block != 0 && !
this.cell.hasDoor)
2655 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2668 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)))
2675 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2699 if (this.room !=
null)
2712 int num34 = ((this.room.data.maxHeight == 0) ? 2 : this.room.
data.
maxHeight);
2713 roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.
lot.
height < num34) ? this.room.lot.height : num34) + 0.01f * (
float)this.room.
lot.
heightFix;
2732 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)
2737 else if (this.cell.
Back.
room !=
null &&
this.cell.Back.room.
lot == (
this.cell.Front.room ??
this.cell.Right.room)?.lot)
2748 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2784 param.color = (int)(50f *
blockLight) * 262144;
2785 param.matColor = 104025f;
2827 if (this.cell.
Things.Count > 0)
2844 Room room2 = this.cell.Front.room ?? this.cell.
room;
2845 if (room2 ==
null && this.cell.
Right.
room !=
null)
2849 if (!invisible && room2 !=
null)
2851 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2873 room2 = this.cell.Right.room ?? this.cell.
room;
2874 if (room2 ==
null && this.cell.
Front.
room !=
null)
2878 if (!invisible && room2 !=
null)
2880 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2914 bool flag10 = blockDir == 1 ||
_lowblock || flag9;
2915 bool flag11 = blockDir == 0 ||
_lowblock || flag9;
2922 if (!this.cell.
IsRoomEdge || (
this.cell.Front.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2936 if (!this.cell.
IsRoomEdge || (
this.cell.Right.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2947 if (blockDir == 0 || blockDir == 2)
2950 Room room3 = this.cell.Front.room ?? this.cell.
room;
2951 if (room3 !=
null && this.tileType.
IsWall)
2953 if (room3.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2973 if (blockDir == 2 &&
left.sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
2976 param.mat =
left.matBlock;
3011 param.tile =
_sourceBlock._tiles[0] + ((flag10 && flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3021 if (!flag10 && !
showRoof && this.cell.
Left.
HasWallOrFence &&
this.cell.Left.blockDir != 0 && !
this.cell.Left.isToggleWallPillar)
3024 param.tile =
_sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3041 param.tile =
_sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3056 if (blockDir == 1 || blockDir == 2)
3061 Room room4 = this.cell.Right.room ?? this.cell.
room;
3062 if (room4 !=
null && this.tileType.
IsWall)
3064 if (room4.
lot.
idDeco != 0 && !
this.cell.hasDoor)
3083 if (blockDir == 2 && this.cell.
room ==
null &&
this.cell.Right.room !=
null)
3097 int num38 = ((room5.data.maxHeight == 0) ? 2 : room5.
data.
maxHeight);
3098 roomHeight = EMono.setting.render.roomHeightMod * (float)((room5.
lot.
height < num38) ? room5.lot.height : num38) + 0.01f * (
float)room5.
lot.
heightFix;
3102 if (blockDir == 2 && back2.
sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
3141 param.tile =
_sourceBlock._tiles[0] + ((flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3163 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref
matBlock.matColor,
_sourceBlock.sourceAutoFloor.colorMod));
3171 int num39 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.
objDir : 0) + 1;
3182 int shadow4 = shadowPref2.
shadow;
3203 if (this.cell.
room !=
null || !
this.cell.IsRoomEdge || !
showRoof)
3207 if (this.cell.
_block == 0 || !
this.cell.sourceBlock.tileType.RepeatBlock)
3210 if (obj ==
null || !obj.
HasRoof)
3237 Vector3 zero = Vector3.zero;
3256 zero.x += rampFix.x;
3257 zero.y += rampFix.y;
3258 zero.z += rampFix.z;
3266 zero.x += pref.x * (float)((!tg.
flipX) ? 1 : (-1));
3299 float num4 = (tileType.UseMountHeight ? 0f : ((pref2.height == 0f) ? 0.1f : pref2.
height));
3307 zero.x += rampFix2.x;
3308 zero.y += rampFix2.y;
3309 zero.z += rampFix2.z;
3318 zero.x += pref2.stackX * (float)((!thing.
flipX) ? 1 : (-1));
3323 num4 += altitudeFix.y * (float)thing.
altitude;
3330 zero.z += renderSetting.thingZ + num + (float)i * -0.01f +
zSetting.mod1 * zero.y;
3350 zero.z += (float)(
detail?.things.Count ?? 0) * -0.01f;
3377 int num2 = (int)(num * 50f) * 262144;
3399 num = lot.z - roofStyle.
h;
3400 num2 = lot.x - roofStyle.
w;
3401 num3 = lot.mz + 1 + roofStyle.
h;
3402 num4 = lot.mx + 1 + roofStyle.
w;
3414 num = lot.x - roofStyle.
w;
3415 num2 = lot.z - roofStyle.
h;
3416 num3 = lot.mx + 1 + roofStyle.
w;
3417 num4 = lot.mz + 1 + roofStyle.
h;
3430 num5 = ((lot.height > 1) ? 1 : 0);
3441 int num6 = num4 + (reverse ? roofStyle.w : roofStyle.
h) * 2 - num2;
3447 num7 = EMono.sources.blocks.rows.Count - 1;
3451 num8 = EMono.sources.floors.rows.Count - 1;
3456 num9 = EMono.sources.blocks.rows.Count - 1;
3459 int num10 = num6 / 2 - roofStyle.
flatW;
3460 int num11 = num6 / 2 + roofStyle.flatW + ((num6 % 2 != 0) ? 1 : 0);
3463 int num13 = ((num5 != 0) ? (-1) : 0);
3465 Vector3 vector = (lot.fullblock ? roofStyle.posFixBlock : roofStyle.
posFix);
3466 switch (roofStyle.
type)
3469 flag = num6 % 2 == 1 && roofStyle.flatW == 0;
3473 num10 = roofStyle.
flatW;
3474 num11 = num6 - roofStyle.
flatW;
3492 for (
cz = num2;
cz < num4;
cz++)
3494 for (
cx = num;
cx < num3;
cx++)
3522 int num17 = num16 - num15;
3535 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));
3555 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));
3576 float num18 = (float)num17 *
screen.
tileAlign.y + (
float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y + vector.y;
3583 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)num13 *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3584 param.y = num18 + (float)num13 *
roofFix2.y;
3587 param.snow = idRoofTile == 0 && flag3;
3588 param.shadowFix = 0f;
3610 if (idRoofTile != 0)
3613 int num20 = (reverse ? 1 : 0) + ((!flag) ? 2 : 0);
3628 param.matColor = 104025f;
3631 param.z += roofStyle.
snowZ;
3643 param.matColor = 104025f;
3645 param.x += roofStyle.
snowFix.x;
3646 param.y += roofStyle.
snowFix.y;
3647 param.z += roofStyle.snowZ + roofStyle.
snowFix.z;
3653 if (idRoofTile != 0)
3655 int num21 = ((!reverse) ? ((num14 != 0) ? 2 : 0) : ((num14 != 0) ? 1 : 3));
3658 param.shadowFix = num21 + 1;
3665 param.matColor = 104025f;
3666 param.z += roofStyle.
snowZ;
3672 param.tile += (lot.altRoof ? 8 : 0);
3675 param.shadowFix = 0f;
3700 for (
int i = 0; i < num13; i++)
3702 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)i *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3703 param.y = num18 + (float)i *
roofFix2.y;
3729 num13 += num14
switch
3745 return p * 262144 + (int)(matColor.r * 50f) * 4096 + (int)(matColor.g * 50f) * 64 + (int)(matColor.b * 50f);
3751 if (
room ==
null && dirWall != -1)
3753 if (dirWall == 0 && _cell.
Front.
room !=
null)
3756 _cell = _cell.
Front;
3761 _cell = _cell.
Right;
3769 float num2 = 1000f +
param.
x *
screen.
tileWeight.x + (
float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + roofStyle.
posFix.z;
3775 _param.x = (float)(_cx + _cz) * screen.tileAlign.x + roofFix.x + (float)h *
roofFix2.x;
3779 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