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 != 0 && (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 shadow2 = shadowPref.
shadow;
1203 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
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;
1293 if (!
showRoof || !
roof || this.cell.
room ==
null ||
this.cell.Front.room ==
null ||
this.cell.Right.room ==
null)
1304 if (this.cell.
effect !=
null)
1312 param.mat = defaultMaterial;
1320 if (sourceEffect2.
anime.Length != 0)
1322 if (sourceEffect2.
anime.Length > 2)
1324 float num4 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[2];
1325 if (!(num4 >= (
float)sourceEffect2.
anime[0]))
1332 float num5 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[0];
1347 if (this.cell.
critter !=
null)
1350 int snowTile = critter.
tile;
1380 param.x += anime4.
v.x;
1381 param.y += anime4.
v.y;
1382 param.z += anime4.
v.z;
1385 if (this.cell.
obj != 0 && !
this.cell.sourceObj.renderData.SkipOnMap)
1391 param.mat = this.cell.
matObj;
1397 param.y += 0.01f *
floatY;
1400 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1442 param.tile = sourceObj.
_tiles[this.cell.blockDir % sourceObj.
_tiles.Length];
1446 param.tile = sourceObj.
_tiles[this.cell.objDir % sourceObj.
_tiles.Length];
1450 param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
1454 param.y += sourceObj.
pref.
y;
1455 param.z += sourceObj.
pref.
z;
1514 param.matColor = 104025f;
1541 param.tile = defBlock.
_tiles[this.cell.blockDir % defBlock.
_tiles.Length];
1542 if (defBlock.
id != 1)
1548 param.matColor = 104025f;
1554 param.z += ugFix.z +
slopeFixZ * (float)j;
1568 if (!isWater && (this.cell.
Front.
sourceFloor.tileType.IsWater ||
this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
1581 num8 = row3.
_tiles[this.cell.blockDir % row3.
_tiles.Length];
1583 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)
1585 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;
1587 param.
tile = num8 + ((!
this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
1590 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)
1592 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;
1594 param.
tile = num8 + ((!
this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
1602 param.matColor = 104025f;
1626 param.tile = defBlock2.
_tiles[this.cell.blockDir % defBlock2.
_tiles.Length];
1627 if (defBlock2.
id != 1)
1633 param.matColor = 104025f;
1638 param.z += ugFix.z +
slopeFixZ * (float)k;
1655 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);
1664 if (isWater && flag)
1666 param.y -= 0.01f *
floatY;
1676 int num9 = (int)(Time.realtimeSinceStartup * 1000f / (
float)
sourceFloor.anime[1] % (float)
sourceFloor.anime[0]);
1700 if (!this.cell.
Right.
IsSnowTile &&
this.cell.Right.topHeight ==
this.cell.topHeight)
1704 if (!this.cell.
Front.
IsSnowTile &&
this.cell.Front.topHeight ==
this.cell.topHeight)
1710 param.tile = 448 + num10 + 12;
1722 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
1746 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
1763 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
1781 if (this.cell.
autotile != 0 &&
sourceFloor.autotile != 0 && (!
hasBridge ||
this.cell.bridgeHeight -
this.cell.height > 3) && !
this.cell.skipRender && num10 == 0)
1801 int num12 = this.cell.shore / num11;
1802 int num13 = this.cell.shore % num11;
1804 if (this.cell.
shore != 0)
1806 Cell cell = ((((uint)num12 & (
true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num12 & 2u) != 0) ? this.cell.
Right : ((((uint)num12 & 4u) != 0) ? this.cell.Front : this.cell.
Left)));
1809 cell = ((((uint)num12 & 8u) != 0) ? this.cell.
Left : ((((uint)num12 & 4u) != 0) ? this.cell.Front : ((((uint)num12 & 2u) != 0) ? this.cell.
Right :
this.cell.
Back)));
1835 param.tile = (24 + num13 / 2) * 32 + num13 % 2 * 16 + num12;
1839 if (this.cell.
Back.
isShoreSand && ((uint)(
this.cell.Back.shore / num11) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.
Left.
shore / num11) & (
true ? 1u : 0u)) != 0)
1846 if (this.cell.
Back.
isShoreSand && ((uint)(
this.cell.Back.shore / num11) & 2u) != 0 &&
this.cell.Right.isShoreSand && ((uint)(
this.cell.Right.shore / num11) & (
true ? 1u : 0u)) != 0)
1853 if (this.cell.
Front.
isShoreSand && ((uint)(
this.cell.Front.shore / num11) & 2u) != 0 &&
this.cell.Right.isShoreSand && ((uint)(
this.cell.Right.shore / num11) & 4u) != 0)
1860 if (this.cell.
Front.
isShoreSand && ((uint)(
this.cell.Front.shore / num11) & 8u) != 0 &&
this.cell.Left.isShoreSand && ((uint)(
this.cell.Left.shore / num11) & 4u) != 0)
1867 if (this.cell.
_bridge != 0 &&
this.cell.isBridgeEdge &&
this.cell.bridgePillar !=
byte.MaxValue)
1886 if (((uint)num12 & (
true ? 1u : 0u)) != 0)
1888 if (((uint)num12 & 8u) != 0)
1890 if ((num12 & 2) == 0 && (num12 & 4) == 0)
1896 if (((uint)num12 & 2u) != 0)
1898 if ((num12 & 8) == 0 && (num12 & 4) == 0)
1905 if (((uint)num12 & 4u) != 0)
1907 if (((uint)num12 & 8u) != 0)
1909 if ((num12 & 2) == 0 && (num12 & 1) == 0)
1915 if (((uint)num12 & 2u) != 0)
1917 if ((num12 & 8) == 0 && (num12 & 1) == 0)
1926 if (!this.cell.
Front.
sourceFloor.tileType.IsWater && !
this.cell.Front.isDeck)
1930 if (!this.cell.
Right.
sourceFloor.tileType.IsWater && !
this.cell.Right.isDeck)
1938 if (!this.cell.
Back.
sourceFloor.tileType.IsWater && !
this.cell.Back.isDeck)
1944 if (((uint)(this.cell.
shore / num11) & (
true ? 1u : 0u)) != 0)
1976 if (!this.cell.
Left.
sourceFloor.tileType.IsWater && !
this.cell.Left.isDeck)
1982 if (((uint)(this.cell.
shore / num11) & 8u) != 0)
2017 param.y += 0.01f *
floatY;
2036 param.y = (float)(
cz -
cx) * screen.tileAlign.y + (float)(
int)this.cell.bridgeHeight *
_heightMod.y;
2037 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(
int)this.cell.bridgeHeight *
_heightMod.z;
2040 param.y += 0.01f *
floatY;
2065 if (this.cell.
shadow != 0)
2069 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2090 if (this.cell.
isBridgeEdge &&
this.cell.bridgeHeight -
this.cell.height >= 3 &&
this.cell.bridgePillar !=
byte.MaxValue && !
noSlopMode)
2107 param.tile = row4.
_tiles[0] + ((num15 == 2) ? 32 : 0);
2114 param.tile = row4.
_tiles[0] + 32;
2119 for (
int l = 0; l < num15; l++)
2137 if (this.cell.
_deco != 0)
2169 if (this.cell.
_block != 0 && !
this.cell.hasDoor)
2202 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2215 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)))
2222 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2246 if (this.room !=
null)
2259 int num17 = ((this.room.data.maxHeight == 0) ? 2 : this.room.
data.
maxHeight);
2260 roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.
lot.
height < num17) ? this.room.lot.height : num17) + 0.01f * (
float)this.room.
lot.
heightFix;
2279 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)
2284 else if (this.cell.
Back.
room !=
null &&
this.cell.Back.room.
lot == (
this.cell.Front.room ??
this.cell.Right.room)?.lot)
2295 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2332 param.color = (int)(50f *
blockLight) * 262144;
2333 param.matColor = 104025f;
2375 if (this.cell.
Things.Count > 0)
2397 if (!invisible &&
room !=
null)
2421 room = this.cell.Right.room ?? this.cell.
room;
2426 if (!invisible &&
room !=
null)
2462 bool flag8 = blockDir == 1 ||
_lowblock || flag7;
2463 bool flag9 = blockDir == 0 ||
_lowblock || flag7;
2470 if (!this.cell.
IsRoomEdge || (
this.cell.Front.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2484 if (!this.cell.
IsRoomEdge || (
this.cell.Right.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2495 if (blockDir == 0 || blockDir == 2)
2498 Room room2 = this.cell.Front.room ?? this.cell.
room;
2499 if (room2 !=
null && this.tileType.
IsWall)
2501 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2521 if (blockDir == 2 &&
left.sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
2524 param.mat =
left.matBlock;
2559 param.tile =
_sourceBlock._tiles[0] + ((flag8 && flag9 && this.tileType.UseLowBlock && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2569 if (!flag8 && !
showRoof && this.cell.
Left.
HasWallOrFence &&
this.cell.Left.blockDir != 0 && !
this.cell.Left.isToggleWallPillar)
2572 param.tile =
_sourceBlock._tiles[0] + ((flag8 && this.tileType.UseLowBlock && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2589 param.tile =
_sourceBlock._tiles[0] + ((flag8 && this.tileType.UseLowBlock && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2604 if (blockDir == 1 || blockDir == 2)
2609 Room room3 = this.cell.Right.room ?? this.cell.
room;
2610 if (room3 !=
null && this.tileType.
IsWall)
2612 if (room3.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2631 if (blockDir == 2 && this.cell.
room ==
null &&
this.cell.Right.room !=
null)
2645 int num22 = ((room4.data.maxHeight == 0) ? 2 : room4.
data.
maxHeight);
2646 roomHeight = EMono.setting.render.roomHeightMod * (float)((room4.
lot.
height < num22) ? room4.lot.height : num22) + 0.01f * (
float)room4.
lot.
heightFix;
2650 if (blockDir == 2 && back2.
sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
2689 param.tile =
_sourceBlock._tiles[0] + ((flag9 && this.tileType.UseLowBlock && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2711 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref
matBlock.matColor,
_sourceBlock.sourceAutoFloor.colorMod));
2719 int num18 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.
objDir : 0) + 1;
2730 int shadow4 = shadowPref2.
shadow;
2757 if (this.cell.
room !=
null || !
this.cell.IsRoomEdge || !
showRoof)
2761 if (this.cell.
_block == 0 || !
this.cell.sourceBlock.tileType.RepeatBlock)
2764 if (obj ==
null || !obj.
HasRoof)
2780 freePos.x = (freePos.y = (freePos.z = 0f));
2784 param.x += rampFix.x;
2785 param.y += rampFix.y;
2786 param.z += rampFix.z;
2787 freePos.x += rampFix.x;
2788 freePos.y += rampFix.y;
2789 freePos.z += rampFix.z;
2791 param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight));
2799 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
2811 bool flag10 =
false;
2813 bool flag11 =
false;
2829 if (!isInstalled && t.
category.tileDummy != 0)
2833 float num31 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.
height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.
height)));
2836 thingPos.y -= num24;
2839 shadow = thingPos.y < 0.16f && num29 < 0.16f;
2849 _actorPos.z = param.z + num30;
2850 if (this.room !=
null)
2860 _actorPos.x =
orgX + num27;
2865 if (thing?.
id != t.
id)
2872 thingPos.y -= num24;
2875 _actorPos.z -= 0.2f;
2878 _actorPos.y -= num24;
2880 _actorPos.z += renderSetting.thingZ + (float)m * -0.01f +
zSetting.mod1 *
thingPos.y;
2890 freePos.x += rampFix2.x;
2891 freePos.y += rampFix2.y;
2892 freePos.z += rampFix2.z;
2895 num29 += rampFix2.y;
2897 liquidLv -= (int)(rampFix2.y * 150f);
2912 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
2913 _actorPos.z += pref.
z;
2914 thingPos.z += pref.
z;
2923 thingPos.y += num31;
2934 Room room5 = ((t.dir == 0) ? this.cell.
Back.
room :
this.cell.Left.room);
2957 _actorPos.x += t.
fx;
2958 _actorPos.y += t.
fy;
2966 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
2967 _actorPos.z += pref.
z;
2970 thingPos.z += pref.
z;
2980 thingPos.y += num31;
2981 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
2982 _actorPos.z += pref.
z;
2983 thingPos.z += pref.
z;
2988 float num32 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
2994 _actorPos.y += 0.01f *
floatY - num32;
2997 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
3044 _actorPos.x += t.
fx;
3055 _actorPos.z += -0.5f;
3096 param.tile += ((param.tile < 0f) ? (-64) : 64);
3105 _actorPos.y = EMono.pc.renderer.position.y - pref.
height;
3106 _actorPos.z = EMono.pc.renderer.position.z + 0.02f;
3117 num27 += pref.stackX * (float)((!t.
flipX) ? 1 : (-1));
3135 param.shadowFix = 0f - num29;
3136 param.color += 1310720f;
3141 if (chara.
host !=
null)
3167 if (restrainer !=
null)
3170 if (getRestrainPos !=
default(Vector3))
3174 float num34 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.
source.pref.height);
3175 _actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.
owner.
dir % 2 == 0) ? 1 : (-1));
3176 _actorPos.y = position.y + num34;
3177 _actorPos.z = position.z + getRestrainPos.z;
3182 param.shadowFix = 0f;
3191 float num35 = chara.renderer.data.size.y * 0.3f;
3196 float num36 = thingPos.y + num35;
3197 float num37 = (float)n * -0.01f;
3204 _actorPos.z += renderSetting.laydownZ + num37;
3205 param.liquidLv = ((thingPos.y == 0f &&
liquidLv > 0) ? 90 : 0);
3206 thingPos.y += num35 * 0.8f;
3216 float num38 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
3217 float num39 =
floatYs[chara.uid % 10] + 10f + (float)(chara.
uid % 30);
3218 orgY += 0.01f * num39 - num38;
3219 _actorPos.y += 0.01f * num39 - num38;
3220 param.shadowFix -= 0.01f * num39 - num38;
3229 float num40 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
3231 _actorPos.y += 0.01f *
floatY - num40;
3232 int num41 = TileType.FloorWaterShallow.LiquidLV * 10;
3233 num41 -= (int)(
floatY * 0.5f);
3234 param.liquidLv = num41;
3238 param.liquidLv -= 20;
3288 Vector3 zero = Vector3.zero;
3307 zero.x += rampFix.x;
3308 zero.y += rampFix.y;
3309 zero.z += rampFix.z;
3317 zero.x += pref.x * (float)((!tg.
flipX) ? 1 : (-1));
3350 float num4 = (tileType.UseMountHeight ? 0f : ((pref2.height == 0f) ? 0.1f : pref2.
height));
3358 zero.x += rampFix2.x;
3359 zero.y += rampFix2.y;
3360 zero.z += rampFix2.z;
3369 zero.x += pref2.stackX * (float)((!thing.
flipX) ? 1 : (-1));
3374 num4 += altitudeFix.y * (float)thing.
altitude;
3381 zero.z += renderSetting.thingZ + num + (float)i * -0.01f +
zSetting.mod1 * zero.y;
3401 zero.z += (float)(
detail?.things.Count ?? 0) * -0.01f;
3428 int num2 = (int)(num * 50f) * 262144;
3450 num = lot.z - roofStyle.
h;
3451 num2 = lot.x - roofStyle.
w;
3452 num3 = lot.mz + 1 + roofStyle.
h;
3453 num4 = lot.mx + 1 + roofStyle.
w;
3465 num = lot.x - roofStyle.
w;
3466 num2 = lot.z - roofStyle.
h;
3467 num3 = lot.mx + 1 + roofStyle.
w;
3468 num4 = lot.mz + 1 + roofStyle.
h;
3481 num5 = ((lot.height > 1) ? 1 : 0);
3492 int num6 = num4 + (reverse ? roofStyle.w : roofStyle.
h) * 2 - num2;
3498 num7 = EMono.sources.blocks.rows.Count - 1;
3502 num8 = EMono.sources.floors.rows.Count - 1;
3507 num9 = EMono.sources.blocks.rows.Count - 1;
3510 int num10 = num6 / 2 - roofStyle.
flatW;
3511 int num11 = num6 / 2 + roofStyle.flatW + ((num6 % 2 != 0) ? 1 : 0);
3514 int num13 = ((num5 != 0) ? (-1) : 0);
3516 Vector3 vector = (lot.fullblock ? roofStyle.posFixBlock : roofStyle.
posFix);
3517 switch (roofStyle.
type)
3520 flag = num6 % 2 == 1 && roofStyle.flatW == 0;
3524 num10 = roofStyle.
flatW;
3525 num11 = num6 - roofStyle.
flatW;
3543 for (
cz = num2;
cz < num4;
cz++)
3545 for (
cx = num;
cx < num3;
cx++)
3573 int num17 = num16 - num15;
3586 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));
3606 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));
3627 float num18 = (float)num17 *
screen.
tileAlign.y + (
float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y + vector.y;
3634 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)num13 *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3635 param.y = num18 + (float)num13 *
roofFix2.y;
3638 param.snow = idRoofTile == 0 && flag3;
3639 param.shadowFix = 0f;
3661 if (idRoofTile != 0)
3664 int num20 = (reverse ? 1 : 0) + ((!flag) ? 2 : 0);
3679 param.matColor = 104025f;
3682 param.z += roofStyle.
snowZ;
3694 param.matColor = 104025f;
3696 param.x += roofStyle.
snowFix.x;
3697 param.y += roofStyle.
snowFix.y;
3698 param.z += roofStyle.snowZ + roofStyle.
snowFix.z;
3704 if (idRoofTile != 0)
3706 int num21 = ((!reverse) ? ((num14 != 0) ? 2 : 0) : ((num14 != 0) ? 1 : 3));
3709 param.shadowFix = num21 + 1;
3716 param.matColor = 104025f;
3717 param.z += roofStyle.
snowZ;
3723 param.tile += (lot.altRoof ? 8 : 0);
3726 param.shadowFix = 0f;
3751 for (
int i = 0; i < num13; i++)
3753 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)i *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3754 param.y = num18 + (float)i *
roofFix2.y;
3780 num13 += num14
switch
3796 return p * 262144 + (int)(matColor.r * 50f) * 4096 + (int)(matColor.g * 50f) * 64 + (int)(matColor.b * 50f);
3802 if (
room ==
null && dirWall != -1)
3804 if (dirWall == 0 && _cell.
Front.
room !=
null)
3807 _cell = _cell.
Front;
3812 _cell = _cell.
Right;
3820 float num2 = 1000f +
param.
x *
screen.
tileWeight.x + (
float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + roofStyle.
posFix.z;
3826 _param.x = (float)(_cx + _cz) * screen.tileAlign.x + roofFix.x + (float)h *
roofFix2.x;
3830 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
static List< SourceBlock.Row > blockList
SourceBlock.Row sourceBlock
SourceMaterial.Row matBlock
SourceFloor.Row sourceFloor
SourceMaterial.Row matDeco
SourceMaterial.Row matObj
SourceMaterial.Row matBridge
SourceFloor.Row sourceBridge
SourceMaterial.Row matFloor
SourceCellEffect.Row sourceEffect
static List< SourceMaterial.Row > matList
SourceDeco.Row sourceDeco
override bool IsAliveInCurrentZone
override bool IsDeadOrSleeping
override CardRow sourceCard
override void SetRenderParam(RenderParam p)
ConBaseTransmuteMimic mimicry
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