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];
530 for (
int i = 0; i < 256; i++)
572 subtleHighlightArea = EMono.scene.actionMode.AreaHihlight != AreaHighlightMode.None && (EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Build || EMono.scene.actionMode.AreaHihlight !=
AreaHighlightMode.Edit);
590 fogBounds = (EMono._map.config.forceHideOutbounds && (!EMono.debug.godBuild || !
buildMode)) || (EMono.core.config.game.dontRenderOutsideMap && !
buildMode);
618 Fov.nonGradientMod = profile.
global.fovModNonGradient;
626 for (
int i = 0; i <
floatYs.Length; i++)
709 noRoofMode = EMono.game.config.noRoof || screen.focusOption !=
null;
730 currentRoom.data.visited =
true;
734 room.data.visited =
true;
768 Vector3Int vector3Int =
screen.
grid.WorldToCell(mposWorld);
770 mz = vector3Int.x - 1;
775 TestPoint.x =
mx + num3;
776 TestPoint.z =
mz - num3;
780 Physics2D.SyncTransforms();
781 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
787 TestPoint.x =
mx + num3 - 1;
788 TestPoint.z =
mz - num3;
792 Physics2D.SyncTransforms();
793 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
799 TestPoint.x =
mx + num3;
800 TestPoint.z =
mz - num3 + 1;
804 Physics2D.SyncTransforms();
805 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
813 bool flag2 = EMono._zone.UseFog && !
EMono.
scene.
bg.wall;
818 cx = screen.scrollX - screen.scrollY +
x - (
z + 1) / 2;
819 cz = screen.scrollY + screen.scrollX +
x +
z / 2;
824 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)
z *
edgeBlockFix.z;
879 int valueOrDefault = (this.room?.
lot?.
idBGM).GetValueOrDefault();
880 if (valueOrDefault == 0)
886 BGMData data =
EMono.
Sound.plLot.list[0].data;
887 if ((
object)data !=
null && data.id == valueOrDefault)
899 SoundManager.bgmVolumeMod = ((!LayerDrama.maxBGMVolume && !EMono._map.IsIndoor && this.room !=
null && !this.room.data.atrium && this.room.
HasRoof) ? (-0.6f) : 0f);
932 this.room = this.cell.
room;
954 floorDir = this.cell.sourceObj.snowTile - 1;
974 light = (this.cell.pcSync ? this.cell.light : (this.cell.light / 3 * 2));
1012 liquidLv = (param.liquidLv = ((!flag && !
isUnderwater) ? (((this.cell.
liquidLv +
this.cell._bridge != 0) ?
this.cell.sourceBridge.tileType.LiquidLV :
sourceFloor.tileType.LiquidLV) * 10) : 0));
1022 if (effect !=
null && effect.
IsFire)
1032 if (this.room !=
null)
1034 this.room.lot.sync =
true;
1045 if ((this.room !=
null && this.room.
lot ==
currentLot) || flag2)
1064 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));
1082 bool num = this.room !=
null && sourceBlock.tileType.CastShadowSelf && !this.cell.
hasDoor;
1083 bool flag3 = this.room !=
null &&
showRoof && this.room.lot.idRoofStyle != 0 && !this.room.data.atrium && !
sourceBlock.tileType.Invisible;
1084 if (flag3 && this.cell.
hasDoor &&
this.cell.IsLotEdge)
1088 if (num || !
isSeen || flag3)
1102 param.y += 0.01f *
floatY;
1110 param.x += anime2.
v.x;
1111 param.y += anime2.
v.y;
1112 param.z += anime2.
v.z;
1129 param.dir = this.cell._roofBlockDir % 4;
1139 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1147 if (dir == 0 || dir == 2)
1164 if (dir == 1 || dir == 2)
1187 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref row2.
matColor,
_sourceBlock.sourceAutoFloor.colorMod));
1193 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1198 int shadow = shadowPref.
shadow;
1203 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1214 bool flag4 = this.cell.isSurrounded &&
innerMode != InnerMode.None &&
sourceBlock.tileType.IsFullBlock;
1223 param.matColor = 104025f;
1226 param.y = (float)(
cz -
cx) * screen.tileAlign.y + (float)(
int)this.cell.bridgeHeight * _heightMod.y +
ugFixBridgeBottom.x;
1227 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(
int)this.cell.bridgeHeight *
_heightMod.z;
1249 float num2 = (float)(
int)this.cell.TopHeight *
_heightMod.y;
1254 param.z += ugFix.z +
slopeFixZ * (float)i;
1300 freePos.x = (freePos.y = (freePos.z = 0f));
1304 param.x += rampFix.x;
1305 param.y += rampFix.y;
1306 param.z += rampFix.z;
1307 freePos.x += rampFix.x;
1308 freePos.y += rampFix.y;
1309 freePos.z += rampFix.z;
1311 param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight));
1319 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1349 if (!isInstalled && t.
category.tileDummy != 0)
1353 float num11 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.
height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.
height)));
1359 shadow2 = thingPos.y < 0.16f && num9 < 0.16f && t.altitude >= 0;
1373 _actorPos.z = param.z + num10;
1374 if (this.room !=
null)
1384 _actorPos.x =
orgX + num7;
1389 if (thing?.
id != t.
id)
1399 _actorPos.z -= 0.2f;
1402 _actorPos.y -= num4;
1404 _actorPos.z += renderSetting.thingZ + (float)j * -0.01f +
zSetting.mod1 *
thingPos.y;
1414 freePos.x += rampFix2.x;
1415 freePos.y += rampFix2.y;
1416 freePos.z += rampFix2.z;
1421 liquidLv -= (int)(rampFix2.y * 150f);
1436 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1437 _actorPos.z += pref.
z;
1438 thingPos.z += pref.
z;
1447 thingPos.y += num11;
1481 _actorPos.x += t.
fx;
1482 _actorPos.y += t.
fy;
1494 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1495 _actorPos.z += pref.
z;
1498 thingPos.z += pref.
z;
1508 thingPos.y += num11;
1509 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1510 _actorPos.z += pref.
z;
1511 thingPos.z += pref.
z;
1516 float num12 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1522 _actorPos.y += 0.01f *
floatY - num12;
1525 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1572 _actorPos.x += t.
fx;
1583 _actorPos.z += -0.5f;
1624 param.tile += ((param.tile < 0f) ? (-64) : 64);
1633 _actorPos.y = EMono.pc.renderer.position.y - pref.
height;
1634 _actorPos.z = EMono.pc.renderer.position.z + 0.02f;
1649 num7 += pref.stackX * (float)((!t.
flipX) ? 1 : (-1));
1667 param.shadowFix = 0f - num9;
1668 param.color += 1310720f;
1670 for (
int num14 = 0; num14 <
detail.
charas.Count; num14++)
1673 if (chara.
host !=
null)
1703 if (restrainer !=
null)
1706 if (getRestrainPos !=
default(Vector3))
1710 float num15 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.
source.pref.height);
1711 _actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.
owner.
dir % 2 == 0) ? 1 : (-1));
1712 _actorPos.y = position.y + num15;
1713 _actorPos.z = position.z + getRestrainPos.z;
1718 param.shadowFix = 0f;
1727 float num16 = chara.renderer.data.size.y * 0.3f;
1732 float num17 = thingPos.y + num16;
1733 float num18 = (float)num14 * -0.01f;
1740 _actorPos.z += renderSetting.laydownZ + num18;
1741 param.liquidLv = ((thingPos.y == 0f &&
liquidLv > 0) ? 90 : 0);
1742 thingPos.y += num16 * 0.8f;
1752 float num19 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1753 float num20 =
floatYs[chara.uid % 10] + 10f + (float)(chara.
uid % 30);
1754 orgY += 0.01f * num20 - num19;
1755 _actorPos.y += 0.01f * num20 - num19;
1756 param.shadowFix -= 0.01f * num20 - num19;
1765 float num21 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1767 _actorPos.y += 0.01f *
floatY - num21;
1768 int num22 = TileType.FloorWaterShallow.LiquidLV * 10;
1769 num22 -= (int)(
floatY * 0.5f);
1770 param.liquidLv = num22;
1774 param.liquidLv -= 20;
1810 if (this.cell.
effect !=
null)
1818 param.mat = defaultMaterial;
1826 if (sourceEffect2.
anime.Length != 0)
1828 if (sourceEffect2.
anime.Length > 2)
1830 float num23 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[2];
1831 if (!(num23 >= (
float)sourceEffect2.
anime[0]))
1833 param.tile += num23;
1838 float num24 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[0];
1839 param.tile += num24;
1853 if (this.cell.
critter !=
null)
1856 int snowTile = critter.
tile;
1886 param.x += anime4.
v.x;
1887 param.y += anime4.
v.y;
1888 param.z += anime4.
v.z;
1891 if (this.cell.
obj != 0 && !
this.cell.sourceObj.renderData.SkipOnMap)
1897 param.mat = this.cell.
matObj;
1903 param.y += 0.01f *
floatY;
1906 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1948 param.tile = sourceObj.
_tiles[this.cell.blockDir % sourceObj.
_tiles.Length];
1952 param.tile = sourceObj.
_tiles[this.cell.objDir % sourceObj.
_tiles.Length];
1956 param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
1960 param.y += sourceObj.
pref.
y;
1961 param.z += sourceObj.
pref.
z;
2026 param.matColor = 104025f;
2053 param.tile = defBlock.
_tiles[this.cell.blockDir % defBlock.
_tiles.Length];
2054 if (defBlock.
id != 1)
2060 param.matColor = 104025f;
2066 param.z += ugFix.z +
slopeFixZ * (float)num26;
2080 if (!isWater && (this.cell.
Front.
sourceFloor.tileType.IsWater ||
this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
2093 num28 = row3.
_tiles[this.cell.blockDir % row3.
_tiles.Length];
2095 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)
2097 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;
2099 param.
tile = num28 + ((!
this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
2102 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)
2104 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;
2106 param.
tile = num28 + ((!
this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
2114 param.matColor = 104025f;
2138 param.tile = defBlock2.
_tiles[this.cell.blockDir % defBlock2.
_tiles.Length];
2139 if (defBlock2.
id != 1)
2145 param.matColor = 104025f;
2150 param.z += ugFix.z +
slopeFixZ * (float)num29;
2167 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);
2176 if (isWater && flag)
2178 param.y -= 0.01f *
floatY;
2188 int num30 = (int)(Time.realtimeSinceStartup * 1000f / (
float)
sourceFloor.anime[1] % (float)
sourceFloor.anime[0]);
2189 param.tile += num30;
2212 if (!this.cell.
Right.
IsSnowTile &&
this.cell.Right.topHeight ==
this.cell.topHeight)
2216 if (!this.cell.
Front.
IsSnowTile &&
this.cell.Front.topHeight ==
this.cell.topHeight)
2222 param.tile = 448 + num31 + 12;
2234 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2258 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
2275 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
2293 if (this.cell.
autotile != 0 &&
sourceFloor.autotile != 0 && (!
hasBridge ||
this.cell.bridgeHeight -
this.cell.height > 3) && !
this.cell.skipRender && num31 == 0)
2313 int num33 = this.cell.shore / num32;
2314 int num34 = this.cell.shore % num32;
2316 if (this.cell.
shore != 0)
2318 Cell cell = (((num33 & 1) != 0) ? this.cell.Back : (((num33 & 2) != 0) ? this.cell.Right : (((num33 & 4) != 0) ? this.cell.Front : this.cell.
Left)));
2321 cell = (((num33 & 8) != 0) ? this.cell.Left : (((num33 & 4) != 0) ? this.cell.Front : (((num33 & 2) != 0) ? this.cell.Right : this.cell.
Back)));
2347 param.tile = (24 + num34 / 2) * 32 + num34 % 2 * 16 + num33;
2351 if (this.cell.
Back.
isShoreSand && ((
this.cell.Back.shore / num32) & 8) != 0 && this.cell.Left.isShoreSand && ((this.cell.Left.shore / num32) & 1) != 0)
2358 if (this.cell.
Back.
isShoreSand && ((
this.cell.Back.shore / num32) & 2) != 0 &&
this.cell.Right.isShoreSand && ((
this.cell.Right.shore / num32) & 1) != 0)
2365 if (this.cell.
Front.
isShoreSand && ((
this.cell.Front.shore / num32) & 2) != 0 &&
this.cell.Right.isShoreSand && ((
this.cell.Right.shore / num32) & 4) != 0)
2372 if (this.cell.
Front.
isShoreSand && ((
this.cell.Front.shore / num32) & 8) != 0 &&
this.cell.Left.isShoreSand && ((
this.cell.Left.shore / num32) & 4) != 0)
2379 if (this.cell.
_bridge != 0 &&
this.cell.isBridgeEdge && !
this.cell.hidePillar)
2398 if ((num33 & 1) != 0)
2400 if ((num33 & 8) != 0)
2402 if ((num33 & 2) == 0 && (num33 & 4) == 0)
2408 if ((num33 & 2) != 0)
2410 if ((num33 & 8) == 0 && (num33 & 4) == 0)
2417 if ((num33 & 4) != 0)
2419 if ((num33 & 8) != 0)
2421 if ((num33 & 2) == 0 && (num33 & 1) == 0)
2427 if ((num33 & 2) != 0)
2429 if ((num33 & 8) == 0 && (num33 & 1) == 0)
2438 if (!this.cell.
Front.
sourceFloor.tileType.IsWater && !
this.cell.Front.isDeck)
2442 if (!this.cell.
Right.
sourceFloor.tileType.IsWater && !
this.cell.Right.isDeck)
2450 if (!this.cell.
Back.
sourceFloor.tileType.IsWater && !
this.cell.Back.isDeck)
2456 if (((this.cell.
shore / num32) & 1) != 0)
2488 if (!this.cell.
Left.
sourceFloor.tileType.IsWater && !
this.cell.Left.isDeck)
2494 if (((this.cell.
shore / num32) & 8) != 0)
2529 param.y += 0.01f *
floatY;
2548 param.y = (float)(
cz -
cx) * screen.tileAlign.y + (float)(
int)this.cell.bridgeHeight *
_heightMod.y;
2549 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(
int)this.cell.bridgeHeight *
_heightMod.z;
2552 param.y += 0.01f *
floatY;
2577 if (this.cell.
shadow != 0)
2581 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2602 if (this.cell.
isBridgeEdge &&
this.cell.bridgeHeight -
this.cell.height >= 3 && !
this.cell.hidePillar && !
noSlopMode)
2619 param.tile = row4.
_tiles[0] + ((num36 == 2) ? 32 : 0);
2626 param.tile = row4.
_tiles[0] + 32;
2631 for (
int num37 = 0; num37 < num36; num37++)
2633 if (num37 == num36 - 1)
2649 if (this.cell.
_deco != 0)
2658 param.tile = (26 + sourceDeco.autotile / 2) * 32 +
sourceDeco.autotile % 2 * 16 +
this.cell.autotileDeco;
2697 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2710 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)))
2717 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2741 if (this.room !=
null)
2754 int num40 = ((this.room.data.maxHeight == 0) ? 2 : this.room.
data.
maxHeight);
2755 roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.
lot.
height < num40) ? this.room.lot.height : num40) + 0.01f * (
float)this.room.
lot.
heightFix;
2774 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)
2779 else if (this.cell.
Back.
room !=
null &&
this.cell.Back.room.
lot == (
this.cell.Front.room ??
this.cell.Right.room)?.lot)
2790 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2827 param.color = (int)(50f *
blockLight) * 262144;
2828 param.matColor = 104025f;
2870 if (this.cell.
Things.Count > 0)
2887 Room room2 = this.cell.Front.room ?? this.cell.
room;
2888 if (room2 ==
null && this.cell.
Right.
room !=
null)
2892 if (!invisible && room2 !=
null)
2894 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2916 room2 = this.cell.Right.room ?? this.cell.
room;
2917 if (room2 ==
null && this.cell.
Front.
room !=
null)
2921 if (!invisible && room2 !=
null)
2923 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2957 bool flag10 = blockDir == 1 ||
_lowblock || flag9;
2958 bool flag11 = blockDir == 0 ||
_lowblock || flag9;
2965 if (!this.cell.
IsRoomEdge || (
this.cell.Front.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2979 if (!this.cell.
IsRoomEdge || (
this.cell.Right.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2990 if (blockDir == 0 || blockDir == 2)
2993 Room room3 = this.cell.Front.room ?? this.cell.
room;
2994 if (room3 !=
null && this.tileType.
IsWall)
2996 if (room3.
lot.
idDeco != 0 && !
this.cell.hasDoor)
3016 if (blockDir == 2 &&
left.sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
3019 param.mat =
left.matBlock;
3054 param.tile =
_sourceBlock._tiles[0] + ((flag10 && flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3064 if (!flag10 && !
showRoof && this.cell.
Left.
HasWallOrFence &&
this.cell.Left.blockDir != 0 && !
this.cell.Left.isToggleWallPillar)
3067 param.tile =
_sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3084 param.tile =
_sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3099 if (blockDir == 1 || blockDir == 2)
3104 Room room4 = this.cell.Right.room ?? this.cell.
room;
3105 if (room4 !=
null && this.tileType.
IsWall)
3107 if (room4.
lot.
idDeco != 0 && !
this.cell.hasDoor)
3126 if (blockDir == 2 && this.cell.
room ==
null &&
this.cell.Right.room !=
null)
3140 int num45 = ((room5.data.maxHeight == 0) ? 2 : room5.
data.
maxHeight);
3141 roomHeight = EMono.setting.render.roomHeightMod * (float)((room5.
lot.
height < num45) ? room5.lot.height : num45) + 0.01f * (
float)room5.
lot.
heightFix;
3145 if (blockDir == 2 && back2.
sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
3184 param.tile =
_sourceBlock._tiles[0] + ((flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3206 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref
matBlock.matColor,
_sourceBlock.sourceAutoFloor.colorMod));
3214 int num41 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.
objDir : 0) + 1;
3225 int shadow4 = shadowPref2.
shadow;
3252 if (this.cell.
room !=
null || !
this.cell.IsRoomEdge || !
showRoof)
3256 if (this.cell.
_block == 0 || !
this.cell.sourceBlock.tileType.RepeatBlock)
3259 if (obj ==
null || !obj.
HasRoof)
3267 if (!
showRoof || !
roof || this.cell.
room ==
null ||
this.cell.Front.room ==
null ||
this.cell.Right.room ==
null)
3293 Vector3 zero = Vector3.zero;
3312 zero.x += rampFix.x;
3313 zero.y += rampFix.y;
3314 zero.z += rampFix.z;
3322 zero.x += pref.x * (float)((!tg.
flipX) ? 1 : (-1));
3355 float num4 = (tileType.UseMountHeight ? 0f : ((pref2.height == 0f) ? 0.1f : pref2.
height));
3363 zero.x += rampFix2.x;
3364 zero.y += rampFix2.y;
3365 zero.z += rampFix2.z;
3374 zero.x += pref2.stackX * (float)((!thing.
flipX) ? 1 : (-1));
3379 num4 += altitudeFix.y * (float)thing.
altitude;
3386 zero.z += renderSetting.thingZ + num + (float)i * -0.01f +
zSetting.mod1 * zero.y;
3406 zero.z += (float)(
detail?.things.Count ?? 0) * -0.01f;
3433 int num2 = (int)(num * 50f) * 262144;
3455 num = lot.z - roofStyle.
h;
3456 num2 = lot.x - roofStyle.
w;
3457 num3 = lot.mz + 1 + roofStyle.
h;
3458 num4 = lot.mx + 1 + roofStyle.
w;
3470 num = lot.x - roofStyle.
w;
3471 num2 = lot.z - roofStyle.
h;
3472 num3 = lot.mx + 1 + roofStyle.
w;
3473 num4 = lot.mz + 1 + roofStyle.
h;
3486 num5 = ((lot.height > 1) ? 1 : 0);
3497 int num6 = num4 + (reverse ? roofStyle.w : roofStyle.
h) * 2 - num2;
3502 int num7 = num6 / 2 - roofStyle.
flatW;
3503 int num8 = num6 / 2 + roofStyle.flatW + ((num6 % 2 != 0) ? 1 : 0);
3506 int num10 = ((num5 != 0) ? (-1) : 0);
3508 Vector3 vector = (lot.fullblock ? roofStyle.posFixBlock : roofStyle.
posFix);
3509 switch (roofStyle.
type)
3512 flag = num6 % 2 == 1 && roofStyle.flatW == 0;
3516 num7 = roofStyle.
flatW;
3517 num8 = num6 - roofStyle.
flatW;
3535 for (
cz = num2;
cz < num4;
cz++)
3537 for (
cx = num;
cx < num3;
cx++)
3565 int num14 = num13 - num12;
3578 num11 = ((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));
3598 num11 = ((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));
3619 float num15 = (float)num14 *
screen.
tileAlign.y + (
float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y + vector.y;
3626 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)num10 *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3627 param.y = num15 + (float)num10 *
roofFix2.y;
3630 param.snow = idRoofTile == 0 && flag3;
3631 param.shadowFix = 0f;
3653 if (idRoofTile != 0)
3656 int num17 = (reverse ? 1 : 0) + ((!flag) ? 2 : 0);
3671 param.matColor = 104025f;
3674 param.z += roofStyle.
snowZ;
3686 param.matColor = 104025f;
3688 param.x += roofStyle.
snowFix.x;
3689 param.y += roofStyle.
snowFix.y;
3690 param.z += roofStyle.snowZ + roofStyle.
snowFix.z;
3696 if (idRoofTile != 0)
3698 int num18 = ((!reverse) ? ((num11 != 0) ? 2 : 0) : ((num11 != 0) ? 1 : 3));
3701 param.shadowFix = num18 + 1;
3708 param.matColor = 104025f;
3709 param.z += roofStyle.
snowZ;
3715 param.tile += (lot.altRoof ? 8 : 0);
3718 param.shadowFix = 0f;
3743 for (
int i = 0; i < num10; i++)
3745 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)i *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3746 param.y = num15 + (float)i *
roofFix2.y;
3772 num10 += num11
switch
3788 return p * 262144 + (int)(matColor.r * 50f) * 4096 + (int)(matColor.g * 50f) * 64 + (int)(matColor.b * 50f);
3794 if (
room ==
null && dirWall != -1)
3796 if (dirWall == 0 && _cell.
Front.
room !=
null)
3799 _cell = _cell.
Front;
3804 _cell = _cell.
Right;
3812 float num2 = 1000f +
param.
x *
screen.
tileWeight.x + (
float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + roofStyle.
posFix.z;
3818 _param.x = (float)(_cx + _cz) * screen.tileAlign.x + roofFix.x + (float)h *
roofFix2.x;
3822 if (!ignoreAltitudeY ||
room !=
null)
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()
SourceDeco.Row sourceDeco
SourceMaterial.Row matDeco
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
SourceBlock.Row sourceBlock
SourceMaterial.Row matBlock
static SourceMaterial matSource
SourceFloor.Row sourceFloor
SourceMaterial.Row matDeco
SourceMaterial.Row matObj
SourceMaterial.Row matBridge
SourceFloor.Row sourceBridge
static SourceBlock blockSource
SourceMaterial.Row matFloor
SourceCellEffect.Row sourceEffect
SourceDeco.Row sourceDeco
override bool IsAliveInCurrentZone
override bool IsDeadOrSleeping
override CardRow sourceCard
override void SetRenderParam(RenderParam p)
ConBaseTransmuteMimic mimicry
static GameSetting setting
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
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 void PositionFix(ref Vector3 v)
virtual bool AlwaysHideOnLowWall
virtual TileType tileType
virtual bool UsePositionFix
virtual bool IsChangeFloorHeight
virtual bool AlwaysLowblock
virtual bool IsUnderwater