void SetTile(int index, int order, int frameCount) { var(floorIndex, floor) = _logicalMap.GetFloor(index); var(ceilingIndex, ceiling) = _logicalMap.GetCeiling(index); var(wallIndex, wall) = _logicalMap.GetWall(index); EtmTileFlags flags = 0; if (floor != null) { if ((floor.Properties & FloorAndCeiling.FcFlags.BackAndForth) != 0) { flags |= EtmTileFlags.FloorBackAndForth; } if ((floor.Properties & FloorAndCeiling.FcFlags.SelfIlluminating) != 0) { flags |= EtmTileFlags.SelfIlluminating; } } if (ceiling != null) { if ((ceiling.Properties & FloorAndCeiling.FcFlags.BackAndForth) != 0) { flags |= EtmTileFlags.CeilingBackAndForth; } if ((ceiling.Properties & FloorAndCeiling.FcFlags.SelfIlluminating) != 0) { flags |= EtmTileFlags.SelfIlluminating; } } if (wall != null) { if ((wall.Properties & Wall.WallFlags.BackAndForth) != 0) { flags |= EtmTileFlags.WallBackAndForth; } if ((wall.Properties & Wall.WallFlags.AlphaTested) != 0) { flags |= EtmTileFlags.Translucent | (EtmTileFlags)((uint)wall.TransparentColour << 24); } if ((wall.Properties & Wall.WallFlags.SelfIlluminating) != 0) { flags |= EtmTileFlags.SelfIlluminating; } } _tilemap.SetTile(order, floorIndex, ceilingIndex, wallIndex, frameCount, flags); }
void SetTile(int index, int order, int frameCount) { byte floorIndex = _floors[index]; byte ceilingIndex = _ceilings[index]; int contents = _contents[index]; byte wallIndex = (byte)(contents < 100 || contents - 100 >= _wallCount ? contents : contents - 100); EtmTileFlags flags = 0; _tilemap.SetTile(order, floorIndex, ceilingIndex, wallIndex, frameCount, flags); }