public static SharpDX.Direct3D11.CpuAccessFlags CpuAccessFlags(Beholder.Resources.Usage bUsage) { switch (bUsage) { case Beholder.Resources.Usage.Immutable: case Beholder.Resources.Usage.Default: return SharpDX.Direct3D11.CpuAccessFlags.None; case Beholder.Resources.Usage.Dynamic: return SharpDX.Direct3D11.CpuAccessFlags.Write; case Beholder.Resources.Usage.Staging: return SharpDX.Direct3D11.CpuAccessFlags.Read; default: throw new ArgumentOutOfRangeException("bUsage"); } }
public static Monster[] CreateBeholder(Game game, int level) { Monster[] beholder = new Monster[9]; for (int i = 0; i < 6; i++) { beholder[i] = Beholder.Create(level, game); if (i == 0) { beholder[i].Behavior = new BeholderBrain(); } else { beholder[i].Behavior = new BeholderComponentBrain(); } beholder[i].Health = beholder[i].Health + (level - 1); beholder[i].Attack = beholder[i].Attack + (level - 1); } beholder[6] = BeholderLeft.Create(level, game); beholder[6].Behavior = new BeholderTentacleBrain(); beholder[6].Health = beholder[6].Health + (level - 1); beholder[6].Attack = beholder[6].Attack + (level - 1); beholder[7] = BeholderCenter.Create(level, game); beholder[7].Behavior = new BeholderTentacleBrain(); beholder[7].Health = beholder[7].Health + (level - 1); beholder[7].Attack = beholder[7].Attack + (level - 1); beholder[8] = BeholderRight.Create(level, game); beholder[8].Behavior = new BeholderTentacleBrain(); beholder[8].Health = beholder[8].Health + (level - 1); beholder[8].Attack = beholder[8].Attack + (level - 1); return(beholder); }
public IEnumerable<IFormatInfo> GetSupportedFormats(Beholder.Platform.FormatSupport requiredSupport) { var d3dSupport = CtSharpDX11.FormatSupport(requiredSupport); return formatInfos.Where(f => (formatsSupport[f.ID] & d3dSupport) == d3dSupport); }
public static ObjectGL.GL42.CompareFunc CompareFunc(Beholder.Core.Comparison bComparison) { switch (bComparison) { case Comparison.Never: return ObjectGL.GL42.CompareFunc.Never; case Comparison.Less: return ObjectGL.GL42.CompareFunc.Less; case Comparison.Equal: return ObjectGL.GL42.CompareFunc.Equal; case Comparison.LessEqual: return ObjectGL.GL42.CompareFunc.Lequal; case Comparison.Greater: return ObjectGL.GL42.CompareFunc.Greater; case Comparison.NotEqual: return ObjectGL.GL42.CompareFunc.Notequal; case Comparison.GreaterEqual: return ObjectGL.GL42.CompareFunc.Gequal; case Comparison.Always: return ObjectGL.GL42.CompareFunc.Always; default: throw new ArgumentOutOfRangeException("bComparison"); } }
public static SharpDX.Direct3D11.DepthStencilViewFlags DepthStencilViewFlags(Beholder.Resources.DepthStencilViewFlags bFlags) { return (SharpDX.Direct3D11.DepthStencilViewFlags)bFlags; }
public static SharpDX.Direct3D11.DepthStencilClearFlags DepthStencilClearFlags(Beholder.Core.ClearDepthStencilFlags bFlags) { return (SharpDX.Direct3D11.DepthStencilClearFlags)bFlags; }
public static SharpDX.Direct3D11.Comparison Comparison(Beholder.Core.Comparison bComparison) { return (SharpDX.Direct3D11.Comparison)bComparison; }
public static SharpDX.Direct3D11.BlendOption BlendOption(Beholder.Core.Blend bBlend) { return (SharpDX.Direct3D11.BlendOption)bBlend; }
public static SharpDX.DXGI.SampleDescription SampleDescription(Beholder.Platform.Sampling bSampling) { return new SharpDX.DXGI.SampleDescription { Count = bSampling.Count, Quality = bSampling.Quality }; }
public static SharpDX.Direct3D11.ResourceUsage ResourceUsage(Beholder.Resources.Usage bUsage) { switch (bUsage) { case Beholder.Resources.Usage.Immutable: return SharpDX.Direct3D11.ResourceUsage.Immutable; case Beholder.Resources.Usage.Default: return SharpDX.Direct3D11.ResourceUsage.Default; case Beholder.Resources.Usage.Dynamic: return SharpDX.Direct3D11.ResourceUsage.Dynamic; case Beholder.Resources.Usage.Staging: return SharpDX.Direct3D11.ResourceUsage.Staging; default: throw new ArgumentOutOfRangeException("bUsage"); } }
public static SharpDX.Direct3D11.ResourceRegion ResourceRegion(Beholder.Resources.Box bBox) { return new SharpDX.Direct3D11.ResourceRegion(bBox.Left, bBox.Top, bBox.Front, bBox.Right, bBox.Bottom, bBox.Back); }
public static SharpDX.Direct3D11.ResourceOptionFlags ResourceOptionFlags(Beholder.Resources.MiscFlags bFlags) { return (SharpDX.Direct3D11.ResourceOptionFlags)bFlags; }
public static SharpDX.Direct3D11.RenderTargetViewDimension RenderTargetViewDimension(Beholder.Resources.RenderTargetViewDimension bRTVDim) { return (SharpDX.Direct3D11.RenderTargetViewDimension)bRTVDim; }
public static SharpDX.Direct3D.PrimitiveTopology PrimitiveTopology(Beholder.Core.PrimitiveTopology bPrimitiveTopology) { return (SharpDX.Direct3D.PrimitiveTopology)bPrimitiveTopology; }
public void MakeVillain(QuestTome book) { book.VillainHue = 0; book.VillainBody = 0; bool color = false; int enemy = Utility.RandomMinMax(1, 10); if (enemy == 1) { switch (Utility.RandomMinMax(0, 3)) { case 0: book.VillainType = "ArchFiend"; book.VillainName = NameList.RandomName("daemon"); book.VillainBody = Utility.RandomList(9, 320); color = true; book.VillainCategory = "a daemon"; break; case 1: book.VillainType = "ArchFiend"; book.VillainName = NameList.RandomName("demonic"); book.VillainBody = Utility.RandomList(191, 427); color = true; switch (Utility.RandomMinMax(0, 2)) { case 0: book.VillainCategory = "a balron"; break; case 1: book.VillainCategory = "a balor"; break; case 2: book.VillainCategory = "a balrog"; break; } break; case 2: book.VillainType = "ArchFiend"; book.VillainName = NameList.RandomName("devil"); book.VillainBody = Utility.RandomList(765, 804, 436, 88, 138); book.VillainCategory = "a devil"; break; case 3: book.VillainType = "Succubus"; book.VillainName = NameList.RandomName("goddess"); book.VillainBody = 174; color = true; switch (Utility.RandomMinMax(0, 2)) { case 0: book.VillainCategory = "a succubus"; break; case 1: book.VillainCategory = "a demoness"; break; case 2: book.VillainCategory = "a daemoness"; break; } break; } } else if (enemy == 2) { book.VillainCategory = "a giant"; book.VillainName = NameList.RandomName("giant"); switch (Utility.RandomMinMax(0, 17)) { case 0: book.VillainType = "AbyssGiant"; break; case 1: book.VillainType = "CloudGiant"; break; case 2: book.VillainType = "FireGiant"; break; case 3: book.VillainType = "ForestGiant"; break; case 4: book.VillainType = "FrostGiant"; break; case 5: book.VillainType = "HillGiant"; break; case 6: book.VillainType = "HillGiantShaman"; break; case 7: book.VillainType = "IceGiant"; break; case 8: book.VillainType = "JungleGiant"; break; case 9: book.VillainType = "LavaGiant"; break; case 10: book.VillainType = "MountainGiant"; break; case 11: book.VillainType = "SandGiant"; break; case 12: book.VillainType = "StarGiant"; break; case 13: book.VillainType = "StoneGiant"; break; case 14: book.VillainType = "StormGiant"; break; case 15: book.VillainType = "AncientCyclops"; book.VillainName = NameList.RandomName("greek"); book.VillainCategory = "a cyclops"; break; case 16: book.VillainType = "AncientEttin"; book.VillainCategory = "an ettin"; break; case 17: book.VillainType = "OgreLord"; book.VillainCategory = "an ogre"; break; } } else if (enemy == 3) { book.VillainCategory = "a dragon"; book.VillainName = NameList.RandomName("dragon"); switch (Utility.RandomMinMax(0, 24)) { case 0: book.VillainType = "Dragon"; book.VillainBody = Utility.RandomList(12, 59); color = true; break; case 1: book.VillainType = "AncientWyrm"; break; case 2: book.VillainType = "ShadowWyrm"; break; case 3: book.VillainType = "VolcanicDragon"; break; case 4: book.VillainType = "VoidDragon"; break; case 5: book.VillainType = "AshDragon"; break; case 6: book.VillainType = "CrystalDragon"; break; case 7: book.VillainType = "ElderDragon"; break; case 8: book.VillainType = "PrimevalAmberDragon"; break; case 9: book.VillainType = "VolcanicDragon"; break; case 10: book.VillainType = "PrimevalBlackDragon"; break; case 11: book.VillainType = "PrimevalDragon"; break; case 12: book.VillainType = "PrimevalFireDragon"; break; case 13: book.VillainType = "PrimevalGreenDragon"; break; case 14: book.VillainType = "PrimevalNightDragon"; break; case 15: book.VillainType = "PrimevalRedDragon"; break; case 16: book.VillainType = "PrimevalRoyalDragon"; break; case 17: book.VillainType = "PrimevalRunicDragon"; break; case 18: book.VillainType = "PrimevalSilverDragon"; break; case 19: book.VillainType = "PrimevalStygianDragon"; break; case 20: book.VillainType = "PrimevalVolcanicDragon"; break; case 21: book.VillainType = "VampiricDragon"; break; case 22: book.VillainType = "PrimevalAbysmalDragon"; break; case 23: book.VillainType = "AncientDrake"; book.VillainCategory = "a drake"; break; case 24: book.VillainType = "AncientWyvern"; book.VillainCategory = "a wyvern"; break; } } else if (enemy == 4) { book.VillainCategory = "a beholder"; Mobile m = new Beholder(); book.VillainType = "Beholder"; book.VillainName = m.Name; book.VillainHue = m.Hue; m.Delete(); } else if (enemy == 5) { if (Utility.RandomBool()) { book.VillainCategory = "a gargoyle"; book.VillainType = "StygianGargoyleLord"; book.VillainName = NameList.RandomName("gargoyle name"); } else { book.VillainCategory = "a sphinx"; book.VillainType = "AncientSphinx"; book.VillainName = NameList.RandomName("drakkul"); } } else if (enemy == 6) { if (Utility.RandomBool()) { book.VillainCategory = "a reptilian humanoid"; Mobile m = new Sleestax(); book.VillainType = "Sleestax"; book.VillainName = m.Name; book.VillainHue = m.Hue; m.Delete(); } else { book.VillainCategory = "a serpentoid"; book.VillainType = "OphidianKnight"; book.VillainName = NameList.RandomName("lizardman"); book.VillainBody = 306; } } else if (enemy == 7) { if (Utility.RandomBool()) { book.VillainCategory = "an arachnid"; book.VillainType = "AbyssCrawler"; book.VillainName = NameList.RandomName("goblin"); book.VillainBody = 173; } else { book.VillainCategory = "an insectoid"; book.VillainType = "AntaurKing"; book.VillainName = NameList.RandomName("goblin"); book.VillainBody = 784; } } else if (enemy == 8) { if (Utility.RandomBool()) { book.VillainCategory = "a reaper"; Mobile m = new EvilEnt(); book.VillainType = "EvilEnt"; book.VillainName = m.Name; book.VillainHue = m.Hue; m.Delete(); } else { book.VillainCategory = "an elemental"; book.VillainType = "CrystalGoliath"; book.VillainName = NameList.RandomName("urk"); book.VillainBody = 753; } } else if (enemy == 9) { switch (Utility.RandomMinMax(0, 4)) { case 0: book.VillainType = "Dracolich"; book.VillainName = NameList.RandomName("dragon"); book.VillainBody = Utility.RandomList(104, 323); book.VillainCategory = "a dracolich"; break; case 1: book.VillainType = "AncientLich"; book.VillainName = NameList.RandomName("ancient lich"); book.VillainCategory = "a lich"; break; case 2: book.VillainType = "AncientFleshGolem"; book.VillainName = NameList.RandomName("greek"); book.VillainBody = 999; book.VillainCategory = "a flesh golem"; break; case 3: book.VillainType = "GrundulVarg"; book.VillainName = NameList.RandomName("ancient lich"); book.VillainBody = Utility.RandomList(768, 65, 107); book.VillainCategory = "a dread lord"; break; case 4: book.VillainType = "GrundulVarg"; book.VillainName = NameList.RandomName("greek"); book.VillainBody = Utility.RandomList(768, 65, 107); book.VillainCategory = "a death knight"; break; } } else { switch (Utility.RandomMinMax(0, 3)) { case 0: book.VillainType = "Watcher"; book.VillainName = NameList.RandomName("drakkul"); book.VillainCategory = "a watcher"; break; case 1: book.VillainType = "Cerberus"; book.VillainName = NameList.RandomName("greek"); book.VillainCategory = "a cerberus"; break; case 2: book.VillainType = "Styguana"; book.VillainName = NameList.RandomName("lizardman"); book.VillainCategory = "a styguana"; break; case 3: book.VillainType = "HellBeast"; book.VillainName = NameList.RandomName("imp"); book.VillainCategory = "a hell beast"; break; } } book.VillainHue = 0; if (color) { book.VillainHue = Utility.RandomColor(0); } book.VillainTitle = RandomThings.RandomEvilTitle(); }
public static SharpDX.Direct3D11.MapMode MapMode(Beholder.Resources.MapType bMapType) { return (SharpDX.Direct3D11.MapMode)bMapType; }
public static SharpDX.Direct3D.ShaderResourceViewDimension ShaderResourceViewDimension(Beholder.Resources.ShaderResourceViewDimension bSRVDim) { return (SharpDX.Direct3D.ShaderResourceViewDimension)bSRVDim; }
public static SharpDX.Direct3D11.ColorWriteMaskFlags ColorWriteMaskFlags(Beholder.Core.ColorMask bColorMask) { return (SharpDX.Direct3D11.ColorWriteMaskFlags)bColorMask; }
public static SharpDX.Direct3D11.ShaderResourceViewExtendedBufferFlags ShaderResourceViewExtendedBufferFlags(Beholder.Resources.ShaderResourceViewExtendedBufferFlags bFlags) { return (SharpDX.Direct3D11.ShaderResourceViewExtendedBufferFlags)bFlags; }
public static SharpDX.Direct3D11.CpuAccessFlags CpuAccessFlags(Beholder.Resources.CpuAccessFlags bFlags) { return (SharpDX.Direct3D11.CpuAccessFlags)bFlags; }
public static SharpDX.Direct3D11.StencilOperation StencilOperation(Beholder.Core.StencilOperation bStencilOp) { return (SharpDX.Direct3D11.StencilOperation)bStencilOp; }
public static SharpDX.Direct3D11.CullMode CullMode(Beholder.Core.Cull bCull) { return (SharpDX.Direct3D11.CullMode)bCull; }
public static SharpDX.Direct3D11.TextureAddressMode TextureAddressMode(Beholder.Core.TextureAddressMode bTextureAddressMode) { return (SharpDX.Direct3D11.TextureAddressMode)bTextureAddressMode; }
public static SharpDX.Direct3D11.DepthStencilViewDimension DepthStencilViewDimension(Beholder.Resources.DepthStencilViewDimension bDSVDim) { return (SharpDX.Direct3D11.DepthStencilViewDimension)bDSVDim; }
public static SharpDX.Direct3D11.BindFlags BindFlags(Beholder.Resources.BindFlags bFlags) { return (SharpDX.Direct3D11.BindFlags)bFlags; }
public static SharpDX.Direct3D11.DeviceCreationFlags DeviceCreationFlags(Beholder.Platform.DeviceInitializationFlags bFlags) { return (SharpDX.Direct3D11.DeviceCreationFlags)bFlags; }
public static SharpDX.Direct3D11.UnorderedAccessViewBufferFlags UnorderedAccessViewBufferFlags(Beholder.Resources.UnorderedAccessViewBufferFlags bFlags) { return (SharpDX.Direct3D11.UnorderedAccessViewBufferFlags)bFlags; }
public static TextureWrapMode TextureWrapMode(Beholder.Core.TextureAddressMode bMode) { switch (bMode) { case TextureAddressMode.Wrap: return OpenTK.Graphics.OpenGL.TextureWrapMode.Repeat; case TextureAddressMode.Mirror: return OpenTK.Graphics.OpenGL.TextureWrapMode.MirroredRepeat; case TextureAddressMode.Clamp: return OpenTK.Graphics.OpenGL.TextureWrapMode.ClampToEdge; case TextureAddressMode.Border: return OpenTK.Graphics.OpenGL.TextureWrapMode.ClampToBorder; case TextureAddressMode.MirrorOnce: throw new NotSupportedException("MirrorOnce teture address mode is not supported by OGL"); default: throw new ArgumentOutOfRangeException("bMode"); } }
public static SharpDX.Direct3D11.UnorderedAccessViewDimension UnorderedAccessViewDimension(Beholder.Resources.UnorderedAccessViewDimension bUAVDim) { return (SharpDX.Direct3D11.UnorderedAccessViewDimension)bUAVDim; }
public TriangleScene(IEye eye, DisplayMode desctopDisplayMode) : base(eye, desctopDisplayMode) { var vertexShader = Device.Create.VertexShader(ShaderParser.Parse(VertexShaderText)); var pixelShader = Device.Create.PixelShader(ShaderParser.Parse(PixelShaderText)); shaderCombination = Device.Create.ShaderCombination(vertexShader, null, null, null, pixelShader); var vertexData = new[] { new Vertex(-0.7f, -0.7f, Color4.Red), new Vertex(0.0f, 0.7f, Color4.Yellow), new Vertex(0.7f, -0.7f, Color4.Green) }; vertexBuffer = Device.Create.Buffer(new BufferDescription { SizeInBytes = vertexData.Length * Vertex.SizeInBytes, Usage = Usage.Immutable, BindFlags = BindFlags.VertexBuffer }, new SubresourceData(vertexData)); vertexLayout = Device.Create.VertexLayout(vertexShader, new[] { new VertexLayoutElement(ExplicitFormat.R32G32B32A32_FLOAT, 0, 0), new VertexLayoutElement(ExplicitFormat.R32G32B32A32_FLOAT, 0, 16) }); }
public static void Viewport(ref Beholder.Core.Viewport bViewport, out SharpDX.ViewportF d3dViewport) { d3dViewport = new SharpDX.ViewportF { X = bViewport.Left, Y = bViewport.Top, Width = bViewport.Width, Height = bViewport.Height, MinDepth = bViewport.MinDepth, MaxDepth = bViewport.MaxDepth }; }
public void AddBeholder(Beholder beh) { beholders.Add(beh); }
public static SharpDX.Direct3D11.BlendOperation BlendOperation(Beholder.Core.BlendOperation bBlendOp) { return (SharpDX.Direct3D11.BlendOperation)bBlendOp; }