334 protected RaycastHit2D[]
rays =
new RaycastHit2D[1];
516 for (
int i = 0; i < 256; i++)
557 subtleHighlightArea = EMono.scene.actionMode.AreaHihlight != 0 && (EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Build || EMono.scene.actionMode.AreaHihlight !=
AreaHighlightMode.Edit);
575 fogBounds = (EMono._map.config.forceHideOutbounds && (!EMono.debug.godBuild || !
buildMode)) || (EMono.core.config.game.dontRenderOutsideMap && !
buildMode);
603 Fov.nonGradientMod = profile.
global.fovModNonGradient;
685 noRoofMode = EMono.game.config.noRoof || screen.focusOption !=
null;
706 currentRoom.data.visited =
true;
710 room.data.visited =
true;
743 Vector3Int vector3Int =
screen.
grid.WorldToCell(mposWorld);
745 mz = vector3Int.x - 1;
750 TestPoint.x =
mx + num3;
751 TestPoint.z =
mz - num3;
755 Physics2D.SyncTransforms();
756 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
762 TestPoint.x =
mx + num3 - 1;
763 TestPoint.z =
mz - num3;
767 Physics2D.SyncTransforms();
768 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
774 TestPoint.x =
mx + num3;
775 TestPoint.z =
mz - num3 + 1;
779 Physics2D.SyncTransforms();
780 if (Physics2D.RaycastNonAlloc(mposWorld, Vector2.zero,
rays) > 0)
788 bool flag2 = EMono._zone.UseFog && !
EMono.
scene.
bg.wall;
793 cx = screen.scrollX - screen.scrollY +
x - (
z + 1) / 2;
794 cz = screen.scrollY + screen.scrollX +
x +
z / 2;
799 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)
z *
edgeBlockFix.z;
854 int valueOrDefault = (this.room?.
lot?.
idBGM).GetValueOrDefault();
855 if (valueOrDefault == 0)
861 BGMData data =
EMono.
Sound.plLot.list[0].data;
862 if ((
object)data !=
null && data.id == valueOrDefault)
874 SoundManager.bgmVolumeMod = ((!LayerDrama.maxBGMVolume && !EMono._map.IsIndoor && this.room !=
null && !this.room.data.atrium && this.room.
HasRoof) ? (-0.6f) : 0f);
907 this.room = this.cell.
room;
927 floorDir = this.cell.sourceObj.snowTile - 1;
947 light = (this.cell.pcSync ? this.cell.light : (this.cell.light / 3 * 2));
981 liquidLv = (param.liquidLv = ((!flag) ? (((this.cell.
liquidLv +
this.cell._bridge != 0) ?
this.cell.sourceBridge.tileType.LiquidLV :
sourceFloor.tileType.LiquidLV) * 10) : 0));
991 if (effect !=
null && effect.
IsFire)
1001 if (this.room !=
null)
1003 this.room.lot.sync =
true;
1014 if ((this.room !=
null && this.room.
lot ==
currentLot) || flag2)
1033 param.color = (
blockLight = (int)(
blockLight * 50f) * 262144 + ((this.cell.lightR >= 64) ? 63 : this.cell.
lightR) * 4096 + ((this.cell.lightG >= 64) ? 63 : this.cell.
lightG) * 64 + ((this.cell.lightB >= 64) ? 63 : this.cell.
lightB));
1051 bool num = this.room !=
null && sourceBlock.tileType.CastShadowSelf && !this.cell.
hasDoor;
1052 bool flag3 = this.room !=
null &&
showRoof && this.room.lot.idRoofStyle != 0 && !this.room.data.atrium && !
sourceBlock.tileType.Invisible;
1053 if (flag3 && this.cell.
hasDoor &&
this.cell.IsLotEdge)
1057 if (num || !
isSeen || flag3)
1071 param.y += 0.01f *
floatY;
1079 param.x += anime2.
v.x;
1080 param.y += anime2.
v.y;
1081 param.z += anime2.
v.z;
1098 param.dir = this.cell._roofBlockDir % 4;
1108 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1116 if (dir == 0 || dir == 2)
1133 if (dir == 1 || dir == 2)
1156 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref row2.
matColor,
_sourceBlock.sourceAutoFloor.colorMod));
1162 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1167 int shadow2 = shadowPref.
shadow;
1172 param.tile = row.
_tiles[param.dir % row.
_tiles.Length];
1192 param.matColor = 104025f;
1195 param.y = (float)(
cz -
cx) * screen.tileAlign.y + (float)(
int)this.cell.bridgeHeight * _heightMod.y +
ugFixBridgeBottom.x;
1196 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(
int)this.cell.bridgeHeight *
_heightMod.z;
1218 float num2 = (float)(
int)this.cell.TopHeight *
_heightMod.y;
1223 param.z += ugFix.z +
slopeFixZ * (float)i;
1269 freePos.x = (freePos.y = (freePos.z = 0f));
1273 param.x += rampFix.x;
1274 param.y += rampFix.y;
1275 param.z += rampFix.z;
1276 freePos.x += rampFix.x;
1277 freePos.y += rampFix.y;
1278 freePos.z += rampFix.z;
1280 param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight));
1288 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1316 if (!isInstalled && t.
category.tileDummy != 0)
1320 float num9 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.
height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.
height)));
1325 shadow = thingPos.y < 0.16f && num7 < 0.16f;
1335 _actorPos.z = param.z + num8;
1336 if (this.room !=
null)
1346 _actorPos.x =
orgX + num5;
1351 if (thing?.
id != t.
id)
1361 _actorPos.z -= 0.2f;
1364 _actorPos.y -= num4;
1366 _actorPos.z += renderSetting.thingZ + (float)j * -0.01f +
zSetting.mod1 *
thingPos.y;
1376 freePos.x += rampFix2.x;
1377 freePos.y += rampFix2.y;
1378 freePos.z += rampFix2.z;
1383 liquidLv -= (int)(rampFix2.y * 150f);
1398 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1399 _actorPos.z += pref.
z;
1400 thingPos.z += pref.
z;
1410 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1411 _actorPos.z += pref.
z;
1414 thingPos.z += pref.
z;
1425 _actorPos.x += pref.x * (float)((!t.
flipX) ? 1 : (-1));
1426 _actorPos.z += pref.
z;
1427 thingPos.z += pref.
z;
1432 float num10 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1435 _actorPos.y += 0.01f *
floatY - num10;
1438 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1499 _actorPos.x += t.
fx;
1500 _actorPos.y += t.
fy;
1520 _actorPos.z += -0.5f;
1561 param.tile += ((param.tile < 0f) ? (-64) : 64);
1570 _actorPos.y = EMono.pc.renderer.position.y - pref.
height;
1571 _actorPos.z = EMono.pc.renderer.position.z + 0.02f;
1582 num5 += pref.stackX * (float)((!t.
flipX) ? 1 : (-1));
1600 param.shadowFix = 0f - num7;
1601 param.color += 1310720f;
1618 if (restrainer !=
null)
1621 if (getRestrainPos !=
default(Vector3))
1625 float num12 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.
source.pref.height);
1626 _actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.
owner.
dir % 2 == 0) ? 1 : (-1));
1627 _actorPos.y = position.y + num12;
1628 _actorPos.z = position.z + getRestrainPos.z;
1633 param.shadowFix = 0f;
1642 float num13 = chara.renderer.data.size.y * 0.3f;
1647 float num14 = thingPos.y + num13;
1648 float num15 = (float)k * -0.01f;
1655 _actorPos.z += renderSetting.laydownZ + num15;
1656 param.liquidLv = ((thingPos.y == 0f &&
liquidLv > 0) ? 90 : 0);
1657 thingPos.y += num13 * 0.8f;
1669 float num16 = ((this.cell._bridge != 0) ?
sourceBridge.tileType.FloorHeight :
sourceFloor.tileType.FloorHeight);
1671 _actorPos.y += 0.01f *
floatY - num16;
1672 int num17 = TileType.FloorWaterShallow.LiquidLV * 10;
1673 num17 -= (int)(
floatY * 0.5f);
1674 param.liquidLv = num17;
1678 param.liquidLv -= 20;
1714 if (this.cell.
effect !=
null)
1722 param.mat = defaultMaterial;
1730 if (sourceEffect2.
anime.Length != 0)
1732 if (sourceEffect2.
anime.Length > 2)
1734 float num18 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[2];
1735 if (!(num18 >= (
float)sourceEffect2.
anime[0]))
1737 param.tile += num18;
1742 float num19 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.
anime[1] % (
float)sourceEffect2.
anime[0];
1743 param.tile += num19;
1757 if (this.cell.
critter !=
null)
1760 int snowTile = critter.
tile;
1790 param.x += anime4.
v.x;
1791 param.y += anime4.
v.y;
1792 param.z += anime4.
v.z;
1795 if (this.cell.
obj != 0 && !
this.cell.sourceObj.renderData.SkipOnMap)
1801 param.mat = this.cell.
matObj;
1807 param.y += 0.01f *
floatY;
1810 liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
1857 param.tile = sourceObj.
_tiles[this.cell.blockDir % sourceObj.
_tiles.Length];
1861 param.tile = sourceObj.
_tiles[this.cell.objDir % sourceObj.
_tiles.Length];
1865 param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
1869 param.y += sourceObj.
pref.
y;
1870 param.z += sourceObj.
pref.
z;
1929 param.matColor = 104025f;
1935 if (!
showRoof || !
roof || this.cell.
room ==
null ||
this.cell.Front.room ==
null ||
this.cell.Right.room ==
null)
1964 param.tile = defBlock.
_tiles[this.cell.blockDir % defBlock.
_tiles.Length];
1965 if (defBlock.
id != 1)
1971 param.matColor = 104025f;
1977 param.z += ugFix.z +
slopeFixZ * (float)l;
1991 if (!isWater && (this.cell.
Front.
sourceFloor.tileType.IsWater ||
this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
2004 num23 = row3.
_tiles[this.cell.blockDir % row3.
_tiles.Length];
2006 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)
2008 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;
2010 param.
tile = num23 + ((!
this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
2013 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)
2015 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;
2017 param.
tile = num23 + ((!
this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
2025 param.matColor = 104025f;
2049 param.tile = defBlock2.
_tiles[this.cell.blockDir % defBlock2.
_tiles.Length];
2050 if (defBlock2.
id != 1)
2056 param.matColor = 104025f;
2061 param.z += ugFix.z +
slopeFixZ * (float)m;
2078 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);
2087 if (isWater && flag)
2089 param.y -= 0.01f *
floatY;
2118 if (!this.cell.
Right.
IsSnowTile &&
this.cell.Right.topHeight ==
this.cell.topHeight)
2122 if (!this.cell.
Front.
IsSnowTile &&
this.cell.Front.topHeight ==
this.cell.topHeight)
2128 param.tile = 448 + num24 + 12;
2140 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2164 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
2181 if (
back.sourceBlock.transition[0] != -1 &&
back.isSeen && !
back.hasDoor)
2199 if (this.cell.
autotile != 0 &&
sourceFloor.autotile != 0 && (!
hasBridge ||
this.cell.bridgeHeight -
this.cell.height > 3) && !
this.cell.skipRender && num24 == 0)
2219 int num26 = this.cell.shore / num25;
2220 int num27 = this.cell.shore % num25;
2222 if (this.cell.
shore != 0)
2224 Cell cell = ((((uint)num26 & (
true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num26 & 2u) != 0) ? this.cell.
Right : ((((uint)num26 & 4u) != 0) ? this.cell.Front : this.cell.
Left)));
2227 cell = ((((uint)num26 & 8u) != 0) ? this.cell.
Left : ((((uint)num26 & 4u) != 0) ? this.cell.Front : ((((uint)num26 & 2u) != 0) ? this.cell.
Right :
this.cell.
Back)));
2253 param.tile = (24 + num27 / 2) * 32 + num27 % 2 * 16 + num26;
2257 if (this.cell.
Back.
isShoreSand && ((uint)(
this.cell.Back.shore / num25) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.
Left.
shore / num25) & (
true ? 1u : 0u)) != 0)
2264 if (this.cell.
Back.
isShoreSand && ((uint)(
this.cell.Back.shore / num25) & 2u) != 0 &&
this.cell.Right.isShoreSand && ((uint)(
this.cell.Right.shore / num25) & (
true ? 1u : 0u)) != 0)
2271 if (this.cell.
Front.
isShoreSand && ((uint)(
this.cell.Front.shore / num25) & 2u) != 0 &&
this.cell.Right.isShoreSand && ((uint)(
this.cell.Right.shore / num25) & 4u) != 0)
2278 if (this.cell.
Front.
isShoreSand && ((uint)(
this.cell.Front.shore / num25) & 8u) != 0 &&
this.cell.Left.isShoreSand && ((uint)(
this.cell.Left.shore / num25) & 4u) != 0)
2285 if (this.cell.
_bridge != 0 &&
this.cell.isBridgeEdge &&
this.cell.bridgePillar !=
byte.MaxValue)
2304 if (((uint)num26 & (
true ? 1u : 0u)) != 0)
2306 if (((uint)num26 & 8u) != 0)
2308 if ((num26 & 2) == 0 && (num26 & 4) == 0)
2314 if (((uint)num26 & 2u) != 0)
2316 if ((num26 & 8) == 0 && (num26 & 4) == 0)
2323 if (((uint)num26 & 4u) != 0)
2325 if (((uint)num26 & 8u) != 0)
2327 if ((num26 & 2) == 0 && (num26 & 1) == 0)
2333 if (((uint)num26 & 2u) != 0)
2335 if ((num26 & 8) == 0 && (num26 & 1) == 0)
2344 if (!this.cell.
Front.
sourceFloor.tileType.IsWater && !
this.cell.Front.isDeck)
2348 if (!this.cell.
Right.
sourceFloor.tileType.IsWater && !
this.cell.Right.isDeck)
2356 if (!this.cell.
Back.
sourceFloor.tileType.IsWater && !
this.cell.Back.isDeck)
2362 if (((uint)(this.cell.
shore / num25) & (
true ? 1u : 0u)) != 0)
2394 if (!this.cell.
Left.
sourceFloor.tileType.IsWater && !
this.cell.Left.isDeck)
2400 if (((uint)(this.cell.
shore / num25) & 8u) != 0)
2435 param.y += 0.01f *
floatY;
2454 param.y = (float)(
cz -
cx) * screen.tileAlign.y + (float)(
int)this.cell.bridgeHeight *
_heightMod.y;
2455 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(
int)this.cell.bridgeHeight *
_heightMod.z;
2458 param.y += 0.01f *
floatY;
2483 if (this.cell.
shadow != 0)
2487 param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
2508 if (this.cell.
isBridgeEdge &&
this.cell.bridgeHeight -
this.cell.height >= 3 &&
this.cell.bridgePillar !=
byte.MaxValue && !
noSlopMode)
2525 param.tile = row4.
_tiles[0] + ((num29 == 2) ? 32 : 0);
2532 param.tile = row4.
_tiles[0] + 32;
2537 for (
int n = 0; n < num29; n++)
2557 if (this.cell.
_block != 0 && !
this.cell.hasDoor)
2587 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2600 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)))
2607 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2631 if (this.room !=
null)
2644 int num30 = ((this.room.data.maxHeight == 0) ? 2 : this.room.
data.
maxHeight);
2645 roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.
lot.
height < num30) ? this.room.lot.height : num30) + 0.01f * (
float)this.room.
lot.
heightFix;
2664 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)
2669 else if (this.cell.
Back.
room !=
null &&
this.cell.Back.room.
lot == (
this.cell.Front.room ??
this.cell.Right.room)?.lot)
2680 this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.
FrontRight.
room;
2716 param.color = (int)(50f *
blockLight) * 262144;
2717 param.matColor = 104025f;
2759 if (this.cell.
Things.Count > 0)
2776 Room room2 = this.cell.Front.room ?? this.cell.
room;
2777 if (room2 ==
null && this.cell.
Right.
room !=
null)
2781 if (!invisible && room2 !=
null)
2783 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2805 room2 = this.cell.Right.room ?? this.cell.
room;
2806 if (room2 ==
null && this.cell.
Front.
room !=
null)
2810 if (!invisible && room2 !=
null)
2812 if (room2.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2846 bool flag10 = blockDir == 1 ||
_lowblock || flag9;
2847 bool flag11 = blockDir == 0 ||
_lowblock || flag9;
2854 if (!this.cell.
IsRoomEdge || (
this.cell.Front.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2868 if (!this.cell.
IsRoomEdge || (
this.cell.Right.room !=
this.cell.room &&
this.cell.FrontRight.room !=
this.cell.room))
2879 if (blockDir == 0 || blockDir == 2)
2882 Room room3 = this.cell.Front.room ?? this.cell.
room;
2883 if (room3 !=
null && this.tileType.
IsWall)
2885 if (room3.
lot.
idDeco != 0 && !
this.cell.hasDoor)
2905 if (blockDir == 2 &&
left.sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
2908 param.mat =
left.matBlock;
2943 param.tile =
_sourceBlock._tiles[0] + ((flag10 && flag11 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2956 param.tile =
_sourceBlock._tiles[0] + ((flag10 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2973 param.tile =
_sourceBlock._tiles[0] + ((flag10 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
2988 if (blockDir == 1 || blockDir == 2)
2993 Room room4 = this.cell.Right.room ?? this.cell.
room;
2994 if (room4 !=
null && this.tileType.
IsWall)
2996 if (room4.
lot.
idDeco != 0 && !
this.cell.hasDoor)
3015 if (blockDir == 2 && this.cell.
room ==
null &&
this.cell.Right.room !=
null)
3029 int num34 = ((room5.data.maxHeight == 0) ? 2 : room5.
data.
maxHeight);
3030 roomHeight = EMono.setting.render.roomHeightMod * (float)((room5.
lot.
height < num34) ? room5.lot.height : num34) + 0.01f * (
float)room5.
lot.
heightFix;
3034 if (blockDir == 2 && back2.
sourceBlock.tileType.IsWallOrFence && !
this.cell.crossWall)
3073 param.tile =
_sourceBlock._tiles[0] + ((flag11 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
3095 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 :
GetColorInt(ref
matBlock.matColor,
_sourceBlock.sourceAutoFloor.colorMod));
3103 int num35 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.
objDir : 0) + 1;
3114 int shadow4 = shadowPref2.
shadow;
3135 if (this.cell.
room !=
null || !
this.cell.IsRoomEdge || !
showRoof)
3139 if (this.cell.
_block == 0 || !
this.cell.sourceBlock.tileType.RepeatBlock)
3142 if (obj ==
null || !obj.
HasRoof)
3169 Vector3 zero = Vector3.zero;
3188 zero.x += rampFix.x;
3189 zero.y += rampFix.y;
3190 zero.z += rampFix.z;
3197 zero.x += tg.Pref.x * (float)((!tg.
flipX) ? 1 : (-1));
3198 zero.z += tg.
Pref.
z;
3230 float num4 = (tileType.UseMountHeight ? 0f : ((pref.height == 0f) ? 0.1f : pref.
height));
3238 zero.x += rampFix2.x;
3239 zero.y += rampFix2.y;
3240 zero.z += rampFix2.z;
3249 zero.x += pref.stackX * (float)((!thing.
flipX) ? 1 : (-1));
3254 num4 += altitudeFix.y * (float)thing.
altitude;
3261 zero.z += renderSetting.thingZ + num + (float)i * -0.01f +
zSetting.mod1 * zero.y;
3303 int num2 = (int)(num * 50f) * 262144;
3325 num = lot.z - roofStyle.
h;
3326 num2 = lot.x - roofStyle.
w;
3327 num3 = lot.mz + 1 + roofStyle.
h;
3328 num4 = lot.mx + 1 + roofStyle.
w;
3340 num = lot.x - roofStyle.
w;
3341 num2 = lot.z - roofStyle.
h;
3342 num3 = lot.mx + 1 + roofStyle.
w;
3343 num4 = lot.mz + 1 + roofStyle.
h;
3356 num5 = ((lot.height > 1) ? 1 : 0);
3367 int num6 = num4 + (reverse ? roofStyle.w : roofStyle.
h) * 2 - num2;
3373 num7 = EMono.sources.blocks.rows.Count - 1;
3377 num8 = EMono.sources.floors.rows.Count - 1;
3382 num9 = EMono.sources.blocks.rows.Count - 1;
3385 int num10 = num6 / 2 - roofStyle.
flatW;
3386 int num11 = num6 / 2 + roofStyle.flatW + ((num6 % 2 != 0) ? 1 : 0);
3389 int num13 = ((num5 != 0) ? (-1) : 0);
3391 Vector3 vector = (lot.fullblock ? roofStyle.posFixBlock : roofStyle.
posFix);
3392 switch (roofStyle.
type)
3395 flag = num6 % 2 == 1 && roofStyle.flatW == 0;
3399 num10 = roofStyle.
flatW;
3400 num11 = num6 - roofStyle.
flatW;
3418 for (
cz = num2;
cz < num4;
cz++)
3420 for (
cx = num;
cx < num3;
cx++)
3448 int num17 = num16 - num15;
3461 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));
3481 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));
3502 float num18 = (float)num17 *
screen.
tileAlign.y + (
float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y + vector.y;
3509 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)num13 *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3510 param.y = num18 + (float)num13 *
roofFix2.y;
3513 param.snow = idRoofTile == 0 && flag3;
3514 param.shadowFix = 0f;
3536 if (idRoofTile != 0)
3539 int num20 = (reverse ? 1 : 0) + ((!flag) ? 2 : 0);
3554 param.matColor = 104025f;
3557 param.z += roofStyle.
snowZ;
3569 param.matColor = 104025f;
3571 param.x += roofStyle.
snowFix.x;
3572 param.y += roofStyle.
snowFix.y;
3573 param.z += roofStyle.snowZ + roofStyle.
snowFix.z;
3579 if (idRoofTile != 0)
3581 int num21 = ((!reverse) ? ((num14 != 0) ? 2 : 0) : ((num14 != 0) ? 1 : 3));
3584 param.shadowFix = num21 + 1;
3591 param.matColor = 104025f;
3592 param.z += roofStyle.
snowZ;
3598 param.tile += (lot.altRoof ? 8 : 0);
3601 param.shadowFix = 0f;
3626 for (
int i = 0; i < num13; i++)
3628 param.x = (float)(
cx +
cz) * screen.tileAlign.x + roofFix.x + (float)i *
roofFix2.x + vector.x * (
float)(reverse ? 1 : (-1));
3629 param.y = num18 + (float)i *
roofFix2.y;
3655 num13 += num14
switch
3671 return p * 262144 + (int)(matColor.r * 50f) * 4096 + (int)(matColor.g * 50f) * 64 + (int)(matColor.b * 50f);
3677 if (
room ==
null && dirWall != -1)
3679 if (dirWall == 0 && _cell.
Front.
room !=
null)
3682 _cell = _cell.
Front;
3687 _cell = _cell.
Right;
3695 float num2 = 1000f +
param.
x *
screen.
tileWeight.x + (
float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + roofStyle.
posFix.z;
3701 _param.x = (float)(_cx + _cz) * screen.tileAlign.x + roofFix.x + (float)h *
roofFix2.x;
3705 if (!ignoreAltitudeY ||
room !=
null)
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
static AM_Inspect Inspect
virtual bool IsRoofEditMode(Card c=null)
static AM_ViewMap ViewMap
virtual BaseTileMap.CardIconMode cardIconMode
virtual bool ShowMaskedThings
static AM_FlagCell FlagCell
virtual byte GetTile(int index)
List< Action > actionsLateUpdate
BaseTileSelector tileSelector
virtual void RefreshWeather()
const int BlocklightToken
int GetRoofLight(Lot lot)
RenderData rendererInnerBlock
SourceFloor.Row sourceBridge
InnerMode defaultInnerMode
ScreenHighlight screenHighlight
SourceMaterial.Row matBridge
RenderData rendererFogRoomSolid
RenderData rendererWaterBlock
Vector3 waterEdgeFixShoreSand
int GetApproximateBlocklight(Cell cell)
Vector3 waterEdgeFixShore
static int GetColorInt(ref Color matColor, int p)
SceneLightProfile lightSetting
void OnActivate(BaseGameScreen _screen)
MeshPass passAutoTileWater
new BaseGameScreen screen
WallClipMode wallClipMode
float floorShadowStrength
RenderData rendererFloorMarker
GameSetting.RenderSetting renderSetting
Vector3 ugFixBridgeBottom
SourceMaterial.Row matBlock
RenderDataEffect rendererEffect
SourceBlock.Row _sourceBlock
RenderData renderFootmark
Vector3[] waterEdgeBlockFix
RenderData rendererBlockMarker
Vector3[] ambientShadowFix
RenderData rendererFogRoomBlockSolid
SourceMaterial.Row matFloor
RenderData rendererWallDeco
SourceBlock.Row sourceBlock
Vector3 waterEdgeBridgeFix
RenderData rendererFogRoomWallSolid
RenderData rendererFogFloorSolid
void SetRoofHeight(MeshPassParam _param, Cell _cell, int _cx, int _cz, int h=0, int altitude=0, int dirWall=-1, bool ignoreAltitudeY=false)
static bool forceShowHang
RenderDataObjDummy rendererObjDummy
BaseTileSelector selector
Vector3 heightModRoofBlock
NoiseLayer layerGroundLights
RenderData rendererFogBlockSolid
GameSetting.RenderSetting.ZSetting zSetting
SourceFloor.Row sourceFloor
Vector3 GetThingPosition(Card tg, Point p)
override void Draw(RenderParam p)
virtual void SetFirst(bool first, Vector3 pos)
TraitShackle GetRestrainer()
virtual CardRow sourceCard
SourceCategory.Row category
TaskDesignation designation
SourceCellEffect.Row source
static List< SourceBlock.Row > blockList
SourceBlock.Row sourceBlock
SourceMaterial.Row matBlock
SourceFloor.Row sourceFloor
SourceMaterial.Row matObj
SourceMaterial.Row matBridge
SourceFloor.Row sourceBridge
SourceMaterial.Row matFloor
SourceCellEffect.Row sourceEffect
static List< SourceMaterial.Row > matList
override bool IsAliveInCurrentZone
override bool IsDeadOrSleeping
override CardRow sourceCard
override void SetRenderParam(RenderParam p)
static GameSetting setting
static ColorProfile Colors
static SoundManager Sound
static SourceManager sources
static SourceFloor.Row sourceSnow
static SourceFloor.Row sourceSnow2
static SourceFloor.Row sourceIce
virtual void OnRenderTileMap(RenderParam p)
static Card alwaysVisible
static SourceMaterial.Row sourceSnow
static SourceMaterial.Row sourceGold
static HashSet< int > sunMap
void Add(Point point, float tile=0f, float color=0f)
void AddShadow(MeshPassParam p, ref Vector3 fix)
List< MeshBatch > batches
CinemaConfig cinemaConfig
ref Vector3 Position(int height)
Point Set(int _x, int _z)
Point Clamp(bool useBounds=false)
static void InitBytes(int a)
new void Draw(RenderParam p, int tile=0)
void Draw(RenderParam p, int tile)
void DrawRepeat(RenderParam p, int count, float size, bool skipFirst=false)
int ConvertTile(int tile)
void SetRenderParam(RenderParam p, SourceMaterial.Row mat, int dir)
SourceMaterial.Row DefaultMaterial
AnimationCurve baseBrightnessCurve
float dynamicBrightnessSpeed
AnimationCurve shadowCurveFloor
AnimationCurve dynamicBrightnessCurve2
float dynamicBrightnessLightBonus
AnimationCurve lightLimit
AnimationCurve fogBrightness
AnimationCurve dynamicBrightnessCurve
AnimationCurve shadowCurve
AnimationCurve nightRatioCurve
AnimationCurve lightModCurve
SceneGlobalProfile global
List< ISyncScreen > syncList
GameSetting.RenderSetting.MapBGSetting bg
void DrawWall(Point point, int color, bool useMarkerPass=false, float offsetZ=0f)
static ShadowData Instance
virtual bool IsSnowCovered
virtual void Draw(int x, int z, RenderParam p)
override void SetRenderParam(RenderParam p)
override CardRow sourceCard
override float FloorHeight
virtual bool IsUseBlockDir
virtual void GetMountHeight(ref Vector3 v, Point p, int d, Card target=null)
static TileTypeIllumination Illumination
static TileTypeWaterShallow FloorWaterShallow
virtual bool AlwaysShowShadow
virtual bool UseLowWallTiles
virtual bool ForceRpeatBlock
virtual bool IsSkipLowBlock
virtual bool UseMountHeight
virtual BlockRenderMode blockRenderMode
Vector3 GetRampFix(int dir, SourcePref pref=null)
virtual Vector3 GetRestrainPos
virtual bool IgnoreLastStackHeight
virtual bool AlwaysHideOnLowWall
virtual TileType tileType
virtual bool IsChangeFloorHeight
virtual bool AlwaysLowblock