1
0
mirror of synced 2025-01-18 17:14:07 +01:00

Remove dependency on SlimDX (#140)

* Use the using directive for SlimDX namespace

* Remove dependency on SlimDX

* Remove dependency on SlimDX
This commit is contained in:
Mr-Ojii 2022-02-09 00:23:41 +09:00 committed by GitHub
parent f2fcf53a6f
commit c6d1b8f443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
88 changed files with 501 additions and 662 deletions

View File

@ -116,7 +116,6 @@
<Compile Include="コード\01.フレームワーク\Enumeration\Enumeration9.cs" />
<Compile Include="コード\01.フレームワーク\Properties\Resources.Designer.cs" />
<Compile Include="コード\01.フレームワーク\Rendering\DeviceCreationException.cs" />
<Compile Include="コード\01.フレームワーク\Rendering\DeviceCache.cs" />
<Compile Include="コード\01.フレームワーク\Rendering\Direct3D9Manager.cs" />
<Compile Include="コード\01.フレームワーク\Rendering\Enums.cs" />
<Compile Include="コード\01.フレームワーク\Rendering\GraphicsDeviceManager.cs" />
@ -208,8 +207,11 @@
<PackageReference Include="SharpDX.DirectSound">
<Version>4.2.0</Version>
</PackageReference>
<PackageReference Include="SlimDX">
<Version>4.0.13.44</Version>
<PackageReference Include="SharpDX.DXGI">
<Version>4.2.0</Version>
</PackageReference>
<PackageReference Include="SharpDX.Mathematics">
<Version>4.2.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using SharpDX;
namespace FDK
{
@ -230,13 +231,18 @@ namespace FDK
return (int)(100.0 / num);
}
public static SlimDX.Color4 n255ToColor4( int nR, int nG, int nB )
public static Color4 n255ToColor4( int nR, int nG, int nB )
{
float fR = n255ToParsent( nR );
float fG = n255ToParsent( nG );
float fB = n255ToParsent( nB );
return new SlimDX.Color4( fR, fG, fB );
return new Color4( fR, fG, fB, 1f );
}
public static Color4 ColorToColor4(System.Drawing.Color col)
{
return new Color4(col.ToArgb());
}
#region [ private ]

View File

@ -23,8 +23,8 @@ using System;
using System.ComponentModel;
using System.Threading;
using System.Windows.Forms;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
using System.Collections.ObjectModel;
namespace SampleFramework
@ -182,15 +182,15 @@ namespace SampleFramework
static Game()
{
// configure SlimDX
Configuration.ThrowOnError = true;
Configuration.AddResultWatch(ResultCode.DeviceLost, ResultWatchFlags.AlwaysIgnore);
Configuration.AddResultWatch(ResultCode.WasStillDrawing, ResultWatchFlags.AlwaysIgnore);
//Configuration.ThrowOnError = true;
//Configuration.AddResultWatch(ResultCode.DeviceLost, ResultWatchFlags.AlwaysIgnore);
//Configuration.AddResultWatch(ResultCode.WasStillDrawing, ResultWatchFlags.AlwaysIgnore);
#if DEBUG
Configuration.DetectDoubleDispose = true;
//Configuration.DetectDoubleDispose = true;
Configuration.EnableObjectTracking = true;
#else
Configuration.DetectDoubleDispose = false;
//Configuration.DetectDoubleDispose = false;
Configuration.EnableObjectTracking = false;
#endif

View File

@ -19,9 +19,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using SlimDX;
using SlimDX.Direct3D9;
using DXGI = SlimDX.DXGI;
using SharpDX;
using SharpDX.Direct3D9;
using DXGI = SharpDX.DXGI;
namespace SampleFramework
{
@ -111,39 +111,39 @@ namespace SampleFramework
{
switch (format)
{
case SlimDX.DXGI.Format.R32G32B32A32_Float:
case SlimDX.DXGI.Format.R32G32B32A32_SInt:
case SlimDX.DXGI.Format.R32G32B32A32_Typeless:
case SlimDX.DXGI.Format.R32G32B32A32_UInt:
case SlimDX.DXGI.Format.R32G32B32_Float:
case SlimDX.DXGI.Format.R32G32B32_SInt:
case SlimDX.DXGI.Format.R32G32B32_Typeless:
case SlimDX.DXGI.Format.R32G32B32_UInt:
case DXGI.Format.R32G32B32A32_Float:
case DXGI.Format.R32G32B32A32_SInt:
case DXGI.Format.R32G32B32A32_Typeless:
case DXGI.Format.R32G32B32A32_UInt:
case DXGI.Format.R32G32B32_Float:
case DXGI.Format.R32G32B32_SInt:
case DXGI.Format.R32G32B32_Typeless:
case DXGI.Format.R32G32B32_UInt:
return 32;
case SlimDX.DXGI.Format.R16G16B16A16_Float:
case SlimDX.DXGI.Format.R16G16B16A16_SInt:
case SlimDX.DXGI.Format.R16G16B16A16_SNorm:
case SlimDX.DXGI.Format.R16G16B16A16_Typeless:
case SlimDX.DXGI.Format.R16G16B16A16_UInt:
case SlimDX.DXGI.Format.R16G16B16A16_UNorm:
case DXGI.Format.R16G16B16A16_Float:
case DXGI.Format.R16G16B16A16_SInt:
case DXGI.Format.R16G16B16A16_SNorm:
case DXGI.Format.R16G16B16A16_Typeless:
case DXGI.Format.R16G16B16A16_UInt:
case DXGI.Format.R16G16B16A16_UNorm:
return 16;
case SlimDX.DXGI.Format.R10G10B10A2_Typeless:
case SlimDX.DXGI.Format.R10G10B10A2_UInt:
case SlimDX.DXGI.Format.R10G10B10A2_UNorm:
case DXGI.Format.R10G10B10A2_Typeless:
case DXGI.Format.R10G10B10A2_UInt:
case DXGI.Format.R10G10B10A2_UNorm:
return 10;
case SlimDX.DXGI.Format.R8G8B8A8_SInt:
case SlimDX.DXGI.Format.R8G8B8A8_SNorm:
case SlimDX.DXGI.Format.R8G8B8A8_Typeless:
case SlimDX.DXGI.Format.R8G8B8A8_UInt:
case SlimDX.DXGI.Format.R8G8B8A8_UNorm:
case SlimDX.DXGI.Format.R8G8B8A8_UNorm_SRGB:
case DXGI.Format.R8G8B8A8_SInt:
case DXGI.Format.R8G8B8A8_SNorm:
case DXGI.Format.R8G8B8A8_Typeless:
case DXGI.Format.R8G8B8A8_UInt:
case DXGI.Format.R8G8B8A8_UNorm:
case DXGI.Format.R8G8B8A8_UNorm_SRgb:
return 8;
case SlimDX.DXGI.Format.B5G5R5A1_UNorm:
case SlimDX.DXGI.Format.B5G6R5_UNorm:
case DXGI.Format.B5G5R5A1_UNorm:
case DXGI.Format.B5G6R5_UNorm:
return 5;
default:
@ -160,40 +160,40 @@ namespace SampleFramework
{
switch (format)
{
case SlimDX.DXGI.Format.R8G8B8A8_UNorm:
case DXGI.Format.R8G8B8A8_UNorm:
return Format.A8R8G8B8;
case SlimDX.DXGI.Format.B5G6R5_UNorm:
case DXGI.Format.B5G6R5_UNorm:
return Format.R5G6B5;
case SlimDX.DXGI.Format.B5G5R5A1_UNorm:
case DXGI.Format.B5G5R5A1_UNorm:
return Format.A1R5G5B5;
case SlimDX.DXGI.Format.A8_UNorm:
case DXGI.Format.A8_UNorm:
return Format.A8;
case SlimDX.DXGI.Format.R10G10B10A2_UNorm:
case DXGI.Format.R10G10B10A2_UNorm:
return Format.A2B10G10R10;
case SlimDX.DXGI.Format.B8G8R8A8_UNorm:
case DXGI.Format.B8G8R8A8_UNorm:
return Format.A8B8G8R8;
case SlimDX.DXGI.Format.R16G16_UNorm:
case DXGI.Format.R16G16_UNorm:
return Format.G16R16;
case SlimDX.DXGI.Format.R16G16B16A16_UNorm:
case DXGI.Format.R16G16B16A16_UNorm:
return Format.A16B16G16R16;
case SlimDX.DXGI.Format.R16_Float:
case DXGI.Format.R16_Float:
return Format.R16F;
case SlimDX.DXGI.Format.R16G16_Float:
case DXGI.Format.R16G16_Float:
return Format.G16R16F;
case SlimDX.DXGI.Format.R16G16B16A16_Float:
case DXGI.Format.R16G16B16A16_Float:
return Format.A16B16G16R16F;
case SlimDX.DXGI.Format.R32_Float:
case DXGI.Format.R32_Float:
return Format.R32F;
case SlimDX.DXGI.Format.R32G32_Float:
case DXGI.Format.R32G32_Float:
return Format.G32R32F;
case SlimDX.DXGI.Format.R32G32B32A32_Float:
case DXGI.Format.R32G32B32A32_Float:
return Format.A32B32G32R32F;
}
return Format.Unknown;
}
public static float ToFloat(Rational rational)
public static float ToFloat(DXGI.Rational rational)
{
float denom = 1;
if (rational.Denominator != 0)

View File

@ -20,7 +20,7 @@
* THE SOFTWARE.
*/
using System;
using SlimDX.Direct3D9;
using SharpDX.Direct3D9;
namespace SampleFramework
{
/// <summary>

View File

@ -21,7 +21,7 @@
*/
using System;
using System.Collections.Generic;
using SlimDX.Direct3D9;
using SharpDX.Direct3D9;
namespace SampleFramework
{
@ -54,24 +54,27 @@ namespace SampleFramework
public PresentParameters PresentParameters
{
get;
private set;
set;
}
public Direct3D9Settings()
{
PresentParameters = new PresentParameters();
DeviceType = DeviceType.Hardware;
PresentParameters.Windowed = true;
AdapterFormat = Format.Unknown;
CreationFlags = CreateFlags.HardwareVertexProcessing;
PresentParameters.BackBufferFormat = Format.Unknown;
PresentParameters.BackBufferCount = 1;
PresentParameters.Multisample = MultisampleType.None;
PresentParameters.SwapEffect = SwapEffect.Discard;
PresentParameters.EnableAutoDepthStencil = true;
PresentParameters.AutoDepthStencilFormat = Format.Unknown;
PresentParameters.PresentFlags = PresentFlags.DiscardDepthStencil;
PresentParameters.PresentationInterval = PresentInterval.Default;
var pp = new PresentParameters();
pp.Windowed = true;
pp.BackBufferFormat = Format.Unknown;
pp.BackBufferCount = 1;
pp.MultiSampleType = MultisampleType.None;
pp.SwapEffect = SwapEffect.Discard;
pp.EnableAutoDepthStencil = true;
pp.AutoDepthStencilFormat = Format.Unknown;
pp.PresentFlags = PresentFlags.DiscardDepthStencil;
pp.PresentationInterval = PresentInterval.Default;
this.PresentParameters = pp;
}
public Direct3D9Settings Clone()
@ -81,7 +84,7 @@ namespace SampleFramework
clone.AdapterOrdinal = AdapterOrdinal;
clone.CreationFlags = CreationFlags;
clone.DeviceType = DeviceType;
clone.PresentParameters = PresentParameters.Clone();
clone.PresentParameters = PresentParameters;
return clone;
}
@ -95,14 +98,15 @@ namespace SampleFramework
{
DisplayMode desktopMode = GraphicsDeviceManager.Direct3D9Object.GetAdapterDisplayMode(0);
Direct3D9Settings optimal = new Direct3D9Settings();
var pp = optimal.PresentParameters;
optimal.AdapterOrdinal = settings.AdapterOrdinal;
optimal.DeviceType = settings.DeviceType;
optimal.PresentParameters.Windowed = settings.Windowed;
optimal.PresentParameters.BackBufferCount = settings.BackBufferCount;
optimal.PresentParameters.Multisample = settings.MultisampleType;
optimal.PresentParameters.MultisampleQuality = settings.MultisampleQuality;
optimal.PresentParameters.FullScreenRefreshRateInHertz = settings.RefreshRate;
pp.Windowed = settings.Windowed;
pp.BackBufferCount = settings.BackBufferCount;
pp.MultiSampleType = settings.MultisampleType;
pp.MultiSampleQuality = settings.MultisampleQuality;
pp.FullScreenRefreshRateInHz = settings.RefreshRate;
if (settings.Multithreaded)
optimal.CreationFlags |= CreateFlags.Multithreaded;
@ -116,39 +120,40 @@ namespace SampleFramework
{
if(optimal.PresentParameters.Windowed)
{
optimal.PresentParameters.BackBufferWidth = 640;
optimal.PresentParameters.BackBufferHeight = 480;
pp.BackBufferWidth = 640;
pp.BackBufferHeight = 480;
}
else
{
optimal.PresentParameters.BackBufferWidth = desktopMode.Width;
optimal.PresentParameters.BackBufferHeight = desktopMode.Height;
pp.BackBufferWidth = desktopMode.Width;
pp.BackBufferHeight = desktopMode.Height;
}
}
else
{
optimal.PresentParameters.BackBufferWidth = settings.BackBufferWidth;
optimal.PresentParameters.BackBufferHeight = settings.BackBufferHeight;
pp.BackBufferWidth = settings.BackBufferWidth;
pp.BackBufferHeight = settings.BackBufferHeight;
}
if(settings.BackBufferFormat == Format.Unknown)
optimal.PresentParameters.BackBufferFormat = optimal.AdapterFormat;
pp.BackBufferFormat = optimal.AdapterFormat;
else
optimal.PresentParameters.BackBufferFormat = settings.BackBufferFormat;
pp.BackBufferFormat = settings.BackBufferFormat;
if(settings.DepthStencilFormat == Format.Unknown)
{
if(ConversionMethods.GetColorBits(optimal.PresentParameters.BackBufferFormat) >= 8)
optimal.PresentParameters.AutoDepthStencilFormat = Format.D32;
pp.AutoDepthStencilFormat = Format.D32;
else
optimal.PresentParameters.AutoDepthStencilFormat = Format.D16;
pp.AutoDepthStencilFormat = Format.D16;
}
else
optimal.PresentParameters.AutoDepthStencilFormat = settings.DepthStencilFormat;
pp.AutoDepthStencilFormat = settings.DepthStencilFormat;
if(!settings.EnableVSync)
optimal.PresentParameters.PresentationInterval = PresentInterval.Immediate;
pp.PresentationInterval = PresentInterval.Immediate;
optimal.PresentParameters = pp;
return optimal;
}
@ -229,7 +234,7 @@ namespace SampleFramework
MultisampleType type = combo.MultisampleTypes[i];
int quality = combo.MultisampleQualities[i];
if(type == optimal.PresentParameters.Multisample && quality == optimal.PresentParameters.MultisampleQuality)
if(type == optimal.PresentParameters.MultiSampleType && quality == optimal.PresentParameters.MultiSampleQuality)
{
ranking += 1.0f;
break;
@ -242,7 +247,7 @@ namespace SampleFramework
foreach(DisplayMode displayMode in combo.AdapterInfo.DisplayModes)
{
if(displayMode.Format == combo.AdapterFormat &&
displayMode.RefreshRate == optimal.PresentParameters.FullScreenRefreshRateInHertz)
displayMode.RefreshRate == optimal.PresentParameters.FullScreenRefreshRateInHz)
{
ranking += 1.0f;
break;
@ -258,14 +263,16 @@ namespace SampleFramework
public static Direct3D9Settings BuildValidSettings(SettingsCombo9 combo, Direct3D9Settings input)
{
Direct3D9Settings settings = new Direct3D9Settings();
var pp = settings.PresentParameters;
settings.AdapterOrdinal = combo.AdapterOrdinal;
settings.DeviceType = combo.DeviceType;
settings.PresentParameters.Windowed = combo.Windowed;
settings.AdapterFormat = combo.AdapterFormat;
settings.PresentParameters.BackBufferFormat = combo.BackBufferFormat;
settings.PresentParameters.SwapEffect = input.PresentParameters.SwapEffect;
settings.PresentParameters.PresentFlags = input.PresentParameters.PresentFlags | PresentFlags.DiscardDepthStencil;
pp.Windowed = combo.Windowed;
pp.BackBufferFormat = combo.BackBufferFormat;
pp.SwapEffect = input.PresentParameters.SwapEffect;
pp.PresentFlags = input.PresentParameters.PresentFlags | PresentFlags.DiscardDepthStencil;
settings.CreationFlags = input.CreationFlags;
if((combo.DeviceInfo.Capabilities.DeviceCaps & DeviceCaps.HWTransformAndLight) == 0 &&
@ -288,19 +295,19 @@ namespace SampleFramework
}
DisplayMode bestDisplayMode = FindValidResolution(combo, input);
settings.PresentParameters.BackBufferWidth = bestDisplayMode.Width;
settings.PresentParameters.BackBufferHeight = bestDisplayMode.Height;
pp.BackBufferWidth = bestDisplayMode.Width;
pp.BackBufferHeight = bestDisplayMode.Height;
settings.PresentParameters.BackBufferCount = input.PresentParameters.BackBufferCount;
if(settings.PresentParameters.BackBufferCount > 3)
settings.PresentParameters.BackBufferCount = 3;
if(settings.PresentParameters.BackBufferCount < 1)
settings.PresentParameters.BackBufferCount = 1;
pp.BackBufferCount = input.PresentParameters.BackBufferCount;
if(pp.BackBufferCount > 3)
pp.BackBufferCount = 3;
if(pp.BackBufferCount < 1)
pp.BackBufferCount = 1;
if(input.PresentParameters.SwapEffect != SwapEffect.Discard)
{
settings.PresentParameters.Multisample = MultisampleType.None;
settings.PresentParameters.MultisampleQuality = 0;
pp.MultiSampleType = MultisampleType.None;
pp.MultiSampleQuality = 0;
}
else
{
@ -310,18 +317,18 @@ namespace SampleFramework
for(int i = 0; i < combo.MultisampleTypes.Count; i++)
{
MultisampleType type = combo.MultisampleTypes[i];
int quality = combo.MultisampleQualities[0];
int quality = combo.MultisampleQualities[i];
if(Math.Abs(type - input.PresentParameters.Multisample) < Math.Abs(bestType -
input.PresentParameters.Multisample))
if(Math.Abs(type - input.PresentParameters.MultiSampleType) < Math.Abs(bestType -
input.PresentParameters.MultiSampleType))
{
bestType = type;
bestQuality = Math.Min(quality - 1, input.PresentParameters.MultisampleQuality);
bestQuality = Math.Min(quality - 1, input.PresentParameters.MultiSampleQuality);
}
}
settings.PresentParameters.Multisample = bestType;
settings.PresentParameters.MultisampleQuality = bestQuality;
pp.MultiSampleType = bestType;
pp.MultiSampleQuality = bestQuality;
}
List<int> rankings = new List<int>();
@ -348,20 +355,20 @@ namespace SampleFramework
if(bestIndex >= 0)
{
settings.PresentParameters.AutoDepthStencilFormat = combo.DepthStencilFormats[bestIndex];
settings.PresentParameters.EnableAutoDepthStencil = true;
pp.AutoDepthStencilFormat = combo.DepthStencilFormats[bestIndex];
pp.EnableAutoDepthStencil = true;
}
else
{
settings.PresentParameters.AutoDepthStencilFormat = Format.Unknown;
settings.PresentParameters.EnableAutoDepthStencil = false;
pp.AutoDepthStencilFormat = Format.Unknown;
pp.EnableAutoDepthStencil = false;
}
if(combo.Windowed)
settings.PresentParameters.FullScreenRefreshRateInHertz = 0;
pp.FullScreenRefreshRateInHz = 0;
else
{
int match = input.PresentParameters.FullScreenRefreshRateInHertz;
int match = input.PresentParameters.FullScreenRefreshRateInHz;
bestDisplayMode.RefreshRate = 0;
if(match != 0)
{
@ -386,14 +393,15 @@ namespace SampleFramework
}
}
settings.PresentParameters.FullScreenRefreshRateInHertz = bestDisplayMode.RefreshRate;
pp.FullScreenRefreshRateInHz = bestDisplayMode.RefreshRate;
}
if(combo.PresentIntervals.Contains(input.PresentParameters.PresentationInterval))
settings.PresentParameters.PresentationInterval = input.PresentParameters.PresentationInterval;
pp.PresentationInterval = input.PresentParameters.PresentationInterval;
else
settings.PresentParameters.PresentationInterval = PresentInterval.Default;
pp.PresentationInterval = PresentInterval.Default;
settings.PresentParameters = pp;
return settings;
}

View File

@ -21,7 +21,7 @@
*/
using System.Collections.Generic;
using System.Globalization;
using SlimDX.Direct3D9;
using SharpDX.Direct3D9;
namespace SampleFramework
{
@ -315,7 +315,7 @@ namespace SampleFramework
if (deviceInfo.DeviceSettings.Count > 0)
info.Devices.Add(deviceInfo);
}
catch (Direct3D9Exception)
catch
{
// #23681 2010.11.17 yyagi: GetDeviceCaps()で例外が発生するモニタに対しては、enumerateをスキップする。
}

View File

@ -1,200 +0,0 @@
using System;
using System.Drawing;
using SlimDX;
using SlimDX.Direct3D9;
namespace SampleFramework
{
public sealed class DeviceCache
{
private readonly Device _device;
public DeviceCache(Device device)
{
_device = device;
}
public Device UnderlyingDevice => _device;
public void Dispose()
{
_device.Dispose();
}
public object Tag
{
get => _device.Tag;
set => _device.Tag = value;
}
public Result TestCooperativeLevel()
{
return _device.TestCooperativeLevel();
}
public Result Reset(PresentParameters presentParameters)
{
return _device.Reset(presentParameters);
}
public Result Clear(ClearFlags clearFlags, in Color4 color, float zdepth, int stencil)
{
return _device.Clear(clearFlags, color, zdepth, stencil);
}
public Result BeginScene()
{
return _device.BeginScene();
}
public Result EndScene()
{
return _device.EndScene();
}
public Result Present()
{
return _device.Present();
}
public Surface GetBackBuffer(int swapChain, int backBuffer)
{
return _device.GetBackBuffer(swapChain, backBuffer);
}
public Surface GetRenderTarget(int index)
{
return _device.GetRenderTarget(index);
}
public Result SetRenderState<T>(RenderState state, T value) where T : Enum
{
return _device.SetRenderState(state, value);
}
private BlendOperation? _lastBlendOperation;
public void SetRenderState(RenderState state, BlendOperation value)
{
if (state == RenderState.BlendOperation)
{
if (_lastBlendOperation == value)
{
return;
}
_lastBlendOperation = value;
}
_device.SetRenderState(state, value);
}
private Blend? _lastSourceBlend;
private Blend? _lastDestinationBlend;
public void SetRenderState(RenderState state, Blend value)
{
if (state == RenderState.SourceBlend)
{
if (_lastSourceBlend == value)
{
return;
}
_lastSourceBlend = value;
}
else if (state == RenderState.DestinationBlend)
{
if (_lastDestinationBlend == value)
{
return;
}
_lastDestinationBlend = value;
}
_device.SetRenderState(state, value);
}
public Result SetRenderState(RenderState state, bool value)
{
return _device.SetRenderState(state, value);
}
public Result SetRenderState(RenderState state, int value)
{
return _device.SetRenderState(state, value);
}
public Result SetTextureStageState(int stage, TextureStage type, TextureOperation textureOperation)
{
return _device.SetTextureStageState(stage, type, textureOperation);
}
public Result SetTextureStageState(int stage, TextureStage type, int value)
{
return _device.SetTextureStageState(stage, type, value);
}
public Result SetSamplerState(int sampler, SamplerState type, TextureFilter textureFilter)
{
return _device.SetSamplerState(sampler, type, textureFilter);
}
public Result SetTransform(TransformState state, in Matrix value)
{
return _device.SetTransform(state, value);
}
private int? _lastSetTextureSampler;
private object _lastSetTextureTexture;
public void SetTexture(int sampler, BaseTexture texture)
{
if ( ReferenceEquals(_lastSetTextureTexture, texture) && _lastSetTextureSampler == sampler)
{
return;
}
_lastSetTextureSampler = sampler;
_lastSetTextureTexture = texture;
_device.SetTexture(sampler, texture);
}
public Result SetRenderTarget(int targetIndex, Surface target)
{
return _device.SetRenderTarget(targetIndex, target);
}
public Result DrawUserPrimitives<T>(PrimitiveType primitiveType, int startIndex, int primitiveCount, in T[] data) where T : struct//, new()
{
return _device.DrawUserPrimitives(primitiveType, startIndex, primitiveCount, data);
}
public Result DrawUserPrimitives<T>(PrimitiveType primitiveType, int primitiveCount, in T[] data) where T : struct//, new()
{
return _device.DrawUserPrimitives(primitiveType, primitiveCount, data);
}
public Result StretchRectangle(Surface source, Surface destination, TextureFilter filter)
{
return _device.StretchRectangle(source, destination, filter);
}
public Result UpdateSurface(Surface source, in Rectangle sourceRectangle, Surface destination, in Point destinationPoint)
{
return _device.UpdateSurface(source, sourceRectangle, destination, destinationPoint);
}
public Viewport Viewport
{
get => _device.Viewport;
set => _device.Viewport = value;
}
public VertexFormat VertexFormat
{
get => _device.VertexFormat;
set => _device.VertexFormat = value;
}
public Capabilities Capabilities => _device.Capabilities;
}
}

View File

@ -24,8 +24,8 @@ using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
namespace SampleFramework
{
@ -43,7 +43,7 @@ namespace SampleFramework
#if TEST_Direct3D9Ex
public DeviceEx Device //yyagi
#else
public DeviceCache Device
public Device Device
#endif
{
get;
@ -121,7 +121,7 @@ namespace SampleFramework
}
elements.Add(VertexElement.VertexDeclarationEnd);
return new VertexDeclaration(Device.UnderlyingDevice, elements.ToArray());
return new VertexDeclaration(Device, elements.ToArray());
}
/// <summary>
@ -132,7 +132,7 @@ namespace SampleFramework
/// <returns>The newly created render target surface.</returns>
public Texture CreateRenderTarget(int width, int height)
{
return new Texture(Device.UnderlyingDevice, width, height, 1, Usage.RenderTarget, manager.CurrentSettings.BackBufferFormat, Pool.Default);
return new Texture(Device, width, height, 1, Usage.RenderTarget, manager.CurrentSettings.BackBufferFormat, Pool.Default);
}
/// <summary>
@ -141,7 +141,7 @@ namespace SampleFramework
/// <returns>The newly created resolve target.</returns>
public Texture CreateResolveTarget()
{
return new Texture(Device.UnderlyingDevice, manager.ScreenWidth, manager.ScreenHeight, 1, Usage.RenderTarget, manager.CurrentSettings.BackBufferFormat, Pool.Default);
return new Texture(Device, manager.ScreenWidth, manager.ScreenHeight, 1, Usage.RenderTarget, manager.CurrentSettings.BackBufferFormat, Pool.Default);
}
/// <summary>
@ -163,30 +163,33 @@ namespace SampleFramework
public void ResolveBackBuffer(Texture target, int backBufferIndex)
{
// disable exceptions for this method
bool storedThrow = Configuration.ThrowOnError;
Configuration.ThrowOnError = false;
//bool storedThrow = Configuration.ThrowOnError;
//Configuration.ThrowOnError = false;
Surface destination = null;
try
{
// grab the current back buffer
Surface backBuffer = Device.GetBackBuffer(0, backBufferIndex);
if (backBuffer == null || Result.Last.IsFailure)
if (backBuffer == null || Result.GetResultFromWin32Error(Marshal.GetLastWin32Error()).Failure)
throw new InvalidOperationException("Could not obtain back buffer surface.");
// grab the destination surface
destination = target.GetSurfaceLevel(0);
if (destination == null || Result.Last.IsFailure)
if (destination == null || Result.GetResultFromWin32Error(Marshal.GetLastWin32Error()).Failure)
throw new InvalidOperationException("Could not obtain resolve target surface.");
// first try to copy using linear filtering
if (Device.StretchRectangle(backBuffer, destination, TextureFilter.Linear).IsFailure)
Device.StretchRectangle(backBuffer, destination, TextureFilter.Linear);
if (Result.GetResultFromWin32Error(Marshal.GetLastWin32Error()).Failure)
{
// that failed, so try with no filtering
if (Device.StretchRectangle(backBuffer, destination, TextureFilter.None).IsFailure)
Device.StretchRectangle(backBuffer, destination, TextureFilter.None);
if (Result.GetResultFromWin32Error(Marshal.GetLastWin32Error()).Failure)
{
// that failed as well, so the last thing we can try is a load surface call
if (Surface.FromSurface(destination, backBuffer, Filter.Default, 0).IsFailure)
Surface.FromSurface(destination, backBuffer, Filter.Default, 0);
if (Result.GetResultFromWin32Error(Marshal.GetLastWin32Error()).Failure)
throw new InvalidOperationException("Could not copy surfaces.");
}
}
@ -195,7 +198,7 @@ namespace SampleFramework
{
if (destination != null)
destination.Dispose();
Configuration.ThrowOnError = storedThrow;
//Configuration.ThrowOnError = storedThrow;
}
}

View File

@ -25,11 +25,12 @@ using System.Drawing;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using SlimDX;
using SlimDX.Direct3D9;
using SlimDX.DXGI;
using SharpDX;
using SharpDX.Direct3D9;
using System.Diagnostics;
using Rectangle = System.Drawing.Rectangle;
namespace SampleFramework
{
/// <summary>
@ -129,7 +130,9 @@ namespace SampleFramework
DeviceSettings validSettings = DeviceSettings.FindValidSettings( settings );
validSettings.Direct3D9.PresentParameters.DeviceWindowHandle = game.Window.Handle;
var pp = validSettings.Direct3D9.PresentParameters;
pp.DeviceWindowHandle = game.Window.Handle;
validSettings.Direct3D9.PresentParameters = pp;
CreateDevice( validSettings );
}
@ -252,14 +255,14 @@ namespace SampleFramework
}
// check if the device can be reset, or if we need to completely recreate it
Result result = SlimDX.Direct3D9.ResultCode.Success;
Result result = ResultCode.Success;
bool canReset = CanDeviceBeReset(oldSettings, settings);
if (canReset)
result = ResetDevice();
if (result == SlimDX.Direct3D9.ResultCode.DeviceLost)
if (result == ResultCode.DeviceLost)
deviceLost = true;
else if (!canReset || result.IsFailure)
else if (!canReset || result.Failure)
{
if (oldSettings != null)
ReleaseDevice();
@ -347,8 +350,10 @@ namespace SampleFramework
newSettings.BackBufferHeight = 0;
if (newSettings.Direct3D9 != null)
{
newSettings.Direct3D9.PresentParameters.BackBufferWidth = GameWindowSize.Width; // #23510 2010.10.31 add yyagi: to avoid setting BackBufferSize=ClientSize
newSettings.Direct3D9.PresentParameters.BackBufferHeight = GameWindowSize.Height; // #23510 2010.10.31 add yyagi: to avoid setting BackBufferSize=ClientSize
var pp = newSettings.Direct3D9.PresentParameters;
pp.BackBufferWidth = GameWindowSize.Width; // #23510 2010.10.31 add yyagi: to avoid setting BackBufferSize=ClientSize
pp.BackBufferHeight = GameWindowSize.Height; // #23510 2010.10.31 add yyagi: to avoid setting BackBufferSize=ClientSize
newSettings.Direct3D9.PresentParameters = pp;
}
CreateDevice(newSettings);
@ -381,8 +386,10 @@ namespace SampleFramework
{
newSettings.BackBufferWidth = 0;
newSettings.BackBufferHeight = 0;
newSettings.Direct3D9.PresentParameters.BackBufferWidth = GameWindowSize.Width; // #23510 2010.10.31 add yyagi: to avoid setting BackBufferSize=ClientSize
newSettings.Direct3D9.PresentParameters.BackBufferHeight = GameWindowSize.Height; //
var pp = newSettings.Direct3D9.PresentParameters;
pp.BackBufferWidth = GameWindowSize.Width; // #23510 2010.10.31 add yyagi: to avoid setting BackBufferSize=ClientSize
pp.BackBufferHeight = GameWindowSize.Height; // #23510 2010.10.31 add yyagi: to avoid setting BackBufferSize=ClientSize
newSettings.Direct3D9.PresentParameters = pp;
CreateDevice( newSettings );
}
}
@ -401,24 +408,26 @@ namespace SampleFramework
newSettings.BackBufferWidth = 0; // #23510 2010.11.1 add yyagi to avoid to reset to 640x480 for the first time in XP.
newSettings.BackBufferHeight = 0; //
newSettings.Direct3D9.PresentParameters.BackBufferWidth = GameWindowSize.Width; //
newSettings.Direct3D9.PresentParameters.BackBufferHeight = GameWindowSize.Height; //
var pp = newSettings.Direct3D9.PresentParameters;
pp.BackBufferWidth = GameWindowSize.Width; // #23510 2010.10.31 add yyagi: to avoid setting BackBufferSize=ClientSize
pp.BackBufferHeight = GameWindowSize.Height; // #23510 2010.10.31 add yyagi: to avoid setting BackBufferSize=ClientSize
newSettings.Direct3D9.PresentParameters = pp;
CreateDevice(newSettings);
}
void game_FrameEnd( object sender, EventArgs e )
{
Result result = SlimDX.Direct3D9.ResultCode.Success;
Result result = ResultCode.Success;
try
{
result = Direct3D9.Device.Present();
Direct3D9.Device.Present();
}
catch (Direct3D9Exception) // #23842 2011.1.6 yyagi: catch D3D9Exception to avoid unexpected termination by changing VSyncWait in fullscreen.
catch // #23842 2011.1.6 yyagi: catch D3D9Exception to avoid unexpected termination by changing VSyncWait in fullscreen.
{
deviceLost = true;
}
if( result == SlimDX.Direct3D9.ResultCode.DeviceLost )
if( result == ResultCode.DeviceLost )
deviceLost = true;
}
void game_FrameStart(object sender, CancelEventArgs e)
@ -438,7 +447,7 @@ namespace SampleFramework
if (deviceLost)
{
Result result = Direct3D9.Device.TestCooperativeLevel();
if (result == SlimDX.Direct3D9.ResultCode.DeviceLost)
if (result == ResultCode.DeviceLost)
{
e.Cancel = true;
return;
@ -459,7 +468,7 @@ namespace SampleFramework
}
result = ResetDevice();
if (result.IsFailure)
if (result.Failure)
{
e.Cancel = true;
return;
@ -515,11 +524,15 @@ namespace SampleFramework
}
Direct3D9.Device.MaximumFrameLatency = 1;
#else
Direct3D9.Device = new DeviceCache( new SlimDX.Direct3D9.Device( Direct3D9Object, CurrentSettings.Direct3D9.AdapterOrdinal,
CurrentSettings.Direct3D9.DeviceType, game.Window.Handle,
CurrentSettings.Direct3D9.CreationFlags, CurrentSettings.Direct3D9.PresentParameters ) );
Direct3D9.Device = new Device(
Direct3D9Object,
CurrentSettings.Direct3D9.AdapterOrdinal,
CurrentSettings.Direct3D9.DeviceType,
game.Window.Handle,
CurrentSettings.Direct3D9.CreationFlags,
CurrentSettings.Direct3D9.PresentParameters);
#endif
if ( Result.Last == SlimDX.Direct3D9.ResultCode.DeviceLost )
if ( Result.GetResultFromWin32Error(System.Runtime.InteropServices.Marshal.GetLastWin32Error()) == ResultCode.DeviceLost )
{
deviceLost = true;
return;
@ -545,15 +558,18 @@ namespace SampleFramework
{
game.UnloadContent();
Result result = Direct3D9.Device.Reset( CurrentSettings.Direct3D9.PresentParameters );
if( result == SlimDX.Direct3D9.ResultCode.DeviceLost )
Direct3D9.Device.Reset(CurrentSettings.Direct3D9.PresentParameters);
var result = Result.GetResultFromWin32Error(System.Runtime.InteropServices.Marshal.GetLastWin32Error());
if (result == ResultCode.DeviceLost)
return result;
PropogateSettings();
UpdateDeviceStats();
game.LoadContent();
return Result.Last;
return result;
}
void ReleaseDevice()
@ -594,9 +610,9 @@ namespace SampleFramework
CurrentSettings.BackBufferFormat = CurrentSettings.Direct3D9.PresentParameters.BackBufferFormat;
CurrentSettings.DepthStencilFormat = CurrentSettings.Direct3D9.PresentParameters.AutoDepthStencilFormat;
CurrentSettings.DeviceType = CurrentSettings.Direct3D9.DeviceType;
CurrentSettings.MultisampleQuality = CurrentSettings.Direct3D9.PresentParameters.MultisampleQuality;
CurrentSettings.MultisampleType = CurrentSettings.Direct3D9.PresentParameters.Multisample;
CurrentSettings.RefreshRate = CurrentSettings.Direct3D9.PresentParameters.FullScreenRefreshRateInHertz;
CurrentSettings.MultisampleQuality = CurrentSettings.Direct3D9.PresentParameters.MultiSampleQuality;
CurrentSettings.MultisampleType = CurrentSettings.Direct3D9.PresentParameters.MultiSampleType;
CurrentSettings.RefreshRate = CurrentSettings.Direct3D9.PresentParameters.FullScreenRefreshRateInHz;
CurrentSettings.Windowed = CurrentSettings.Direct3D9.PresentParameters.Windowed;
}
@ -654,18 +670,18 @@ namespace SampleFramework
builder.AppendFormat( " ({0}x{1}), ", CurrentSettings.Direct3D9.PresentParameters.BackBufferWidth, CurrentSettings.Direct3D9.PresentParameters.BackBufferHeight );
if( CurrentSettings.Direct3D9.AdapterFormat == CurrentSettings.Direct3D9.PresentParameters.BackBufferFormat )
builder.Append( Enum.GetName( typeof( SlimDX.Direct3D9.Format ), CurrentSettings.Direct3D9.AdapterFormat ) );
builder.Append( Enum.GetName( typeof( Format ), CurrentSettings.Direct3D9.AdapterFormat ) );
else
builder.AppendFormat( "backbuf {0}, adapter {1}",
Enum.GetName( typeof( SlimDX.Direct3D9.Format ), CurrentSettings.Direct3D9.AdapterFormat ),
Enum.GetName( typeof( SlimDX.Direct3D9.Format ), CurrentSettings.Direct3D9.PresentParameters.BackBufferFormat ) );
Enum.GetName( typeof( Format ), CurrentSettings.Direct3D9.AdapterFormat ),
Enum.GetName( typeof( Format ), CurrentSettings.Direct3D9.PresentParameters.BackBufferFormat ) );
builder.AppendFormat( " ({0})", Enum.GetName( typeof( SlimDX.Direct3D9.Format ), CurrentSettings.Direct3D9.PresentParameters.AutoDepthStencilFormat ) );
builder.AppendFormat( " ({0})", Enum.GetName( typeof( Format ), CurrentSettings.Direct3D9.PresentParameters.AutoDepthStencilFormat ) );
if( CurrentSettings.Direct3D9.PresentParameters.Multisample == MultisampleType.NonMaskable )
if( CurrentSettings.Direct3D9.PresentParameters.MultiSampleType == MultisampleType.NonMaskable )
builder.Append( " (Nonmaskable Multisample)" );
else if( CurrentSettings.Direct3D9.PresentParameters.Multisample != MultisampleType.None )
builder.AppendFormat( " ({0}x Multisample)", (int) CurrentSettings.Direct3D9.PresentParameters.Multisample );
else if( CurrentSettings.Direct3D9.PresentParameters.MultiSampleType != MultisampleType.None )
builder.AppendFormat( " ({0}x Multisample)", (int) CurrentSettings.Direct3D9.PresentParameters.MultiSampleType );
DeviceStatistics = builder.ToString();
}

View File

@ -20,7 +20,7 @@
* THE SOFTWARE.
*/
using System;
using SlimDX.Direct3D9;
using SharpDX.Direct3D9;
namespace SampleFramework
{

View File

@ -19,7 +19,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using SlimDX;
using SharpDX;
namespace SampleFramework
{

View File

@ -22,8 +22,8 @@
using System;
using System.Globalization;
using System.Runtime.InteropServices;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
namespace SampleFramework
{

View File

@ -22,8 +22,8 @@
using System;
using System.Globalization;
using System.Runtime.InteropServices;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
namespace SampleFramework
{

View File

@ -4,7 +4,6 @@ using System.Text;
using System.Diagnostics;
using System.IO;
using System.Threading;
using SlimDX;
using SharpDX.DirectSound;
namespace FDK

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using SlimDX;
namespace FDK
{

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using SlimDX;
using SharpDX;
namespace FDK
{

View File

@ -5,10 +5,13 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Diagnostics;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
using Device = SampleFramework.DeviceCache;
using Rectangle = System.Drawing.Rectangle;
using RectangleF = System.Drawing.RectangleF;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace FDK
{
@ -136,7 +139,7 @@ namespace FDK
bitmap.Save(stream, ImageFormat.Bmp);
stream.Seek(0L, SeekOrigin.Begin);
int colorKey = unchecked((int)0xFF000000);
this.texture = Texture.FromStream(device.UnderlyingDevice, stream, this.szテクスチャサイズ.Width, this.szテクスチャサイズ.Height, 1, Usage.None, format, poolvar, Filter.Point, Filter.None, colorKey);
this.texture = Texture.FromStream(device, stream, this.szテクスチャサイズ.Width, this.szテクスチャサイズ.Height, 1, Usage.None, format, poolvar, Filter.Point, Filter.None, colorKey);
}
}
catch (Exception e)
@ -229,7 +232,7 @@ namespace FDK
pool = poolvar;
#endif
// 中で更にメモリ読み込みし直していて無駄なので、Streamを使うのは止めたいところ
this.texture = Texture.FromStream(device.UnderlyingDevice, stream, n幅, n高さ, 1, usage, format, pool, Filter.Point, Filter.None, 0);
this.texture = Texture.FromStream(device, stream, n幅, n高さ, 1, usage, format, pool, Filter.Point, Filter.None, 0);
}
}
}
@ -288,7 +291,7 @@ namespace FDK
// lock ( lockobj )
// {
//Trace.TraceInformation( "CTexture() start: " );
this.texture = Texture.FromMemory(device.UnderlyingDevice, txData, this.sz画像サイズ.Width, this.sz画像サイズ.Height, 1, Usage.None, format, pool, Filter.Point, Filter.None, colorKey);
this.texture = Texture.FromMemory(device, txData, this.sz画像サイズ.Width, this.sz画像サイズ.Height, 1, Usage.None, format, pool, Filter.Point, Filter.None, colorKey);
//Trace.TraceInformation( "CTexture() end: " );
// }
}
@ -329,7 +332,7 @@ namespace FDK
#if TEST_Direct3D9Ex
this.texture = new Texture( device, tw, this.sz画像サイズ.Height, 1, Usage.Dynamic, format, Pool.Default );
#else
this.texture = new Texture(device.UnderlyingDevice, this.sz画像サイズ.Width, this.sz画像サイズ.Height, 1, Usage.None, format, pool);
this.texture = new Texture(device, this.sz画像サイズ.Width, this.sz画像サイズ.Height, 1, Usage.None, format, pool);
#endif
BitmapData srcBufData = bitmap.LockBits(new Rectangle(0, 0, this.sz画像サイズ.Width, this.sz画像サイズ.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
DataRectangle destDataRectangle = texture.LockRectangle(0, LockFlags.Discard); // None
@ -350,7 +353,8 @@ namespace FDK
}
#else
IntPtr src_scan0 = (IntPtr)((Int64)srcBufData.Scan0);
destDataRectangle.Data.WriteRange(src_scan0, this.sz画像サイズ.Width * 4 * this.sz画像サイズ.Height);
//destDataRectangle.Data.WriteRange(src_scan0, this.sz画像サイズ.Width * 4 * this.sz画像サイズ.Height);
Buffer.MemoryCopy(src_scan0.ToPointer(), destDataRectangle.DataPointer.ToPointer(), this.sz画像サイズ.Width * 4 * this.sz画像サイズ.Height, srcBufData.Width * 4 * srcBufData.Height);
#endif
texture.UnlockRectangle(0);
bitmap.UnlockBits(srcBufData);
@ -550,7 +554,7 @@ namespace FDK
float f上V値 = ((float)rc画像内の描画領域.Top) / ((float)this.szテクスチャサイズ.Height);
float f下V値 = ((float)rc画像内の描画領域.Bottom) / ((float)this.szテクスチャサイズ.Height);
this.color4.Alpha = ((float)this._opacity) / 255f;
int color = this.color4.ToArgb();
int color = ToArgb(this.color4);
if (this.cvTransformedColoredVertexies == null)
this.cvTransformedColoredVertexies = new TransformedColoredTexturedVertex[4];
@ -591,7 +595,7 @@ namespace FDK
device.SetTexture(0, this.texture);
device.VertexFormat = TransformedColoredTexturedVertex.Format;
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 0, 2, in this.cvTransformedColoredVertexies);
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 0, 2, this.cvTransformedColoredVertexies);
//-----------------
#endregion
}
@ -608,7 +612,7 @@ namespace FDK
float f上V値 = ((float)rc画像内の描画領域.Top) / ((float)this.szテクスチャサイズ.Height);
float f下V値 = ((float)rc画像内の描画領域.Bottom) / ((float)this.szテクスチャサイズ.Height);
this.color4.Alpha = ((float)this._opacity) / 255f;
int color = this.color4.ToArgb();
int color = ToArgb(this.color4);
if (this.cvPositionColoredVertexies == null)
this.cvPositionColoredVertexies = new PositionColoredTexturedVertex[4];
@ -654,7 +658,7 @@ namespace FDK
device.SetTexture(0, this.texture);
device.VertexFormat = PositionColoredTexturedVertex.Format;
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, in this.cvPositionColoredVertexies);
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, this.cvPositionColoredVertexies);
//-----------------
#endregion
}
@ -679,7 +683,7 @@ namespace FDK
float f上V値 = ((float)rc画像内の描画領域.Top) / ((float)this.szテクスチャサイズ.Height);
float f下V値 = ((float)rc画像内の描画領域.Bottom) / ((float)this.szテクスチャサイズ.Height);
this.color4.Alpha = ((float)this._opacity) / 255f;
int color = this.color4.ToArgb();
int color = ToArgb(this.color4);
if (this.cvTransformedColoredVertexies == null)
this.cvTransformedColoredVertexies = new TransformedColoredTexturedVertex[4];
@ -720,7 +724,7 @@ namespace FDK
device.SetTexture(0, this.texture);
device.VertexFormat = TransformedColoredTexturedVertex.Format;
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 0, 2, in this.cvTransformedColoredVertexies);
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 0, 2, this.cvTransformedColoredVertexies);
//-----------------
#endregion
}
@ -737,7 +741,7 @@ namespace FDK
float f上V値 = ((float)rc画像内の描画領域.Top) / ((float)this.szテクスチャサイズ.Height);
float f下V値 = ((float)rc画像内の描画領域.Bottom) / ((float)this.szテクスチャサイズ.Height);
this.color4.Alpha = ((float)this._opacity) / 255f;
int color = this.color4.ToArgb();
int color = ToArgb(this.color4);
if (this.cvPositionColoredVertexies == null)
this.cvPositionColoredVertexies = new PositionColoredTexturedVertex[4];
@ -783,7 +787,7 @@ namespace FDK
device.SetTexture(0, this.texture);
device.VertexFormat = PositionColoredTexturedVertex.Format;
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, in this.cvPositionColoredVertexies);
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, this.cvPositionColoredVertexies);
//-----------------
#endregion
}
@ -824,7 +828,7 @@ namespace FDK
float f上V値 = ((float)rc画像内の描画領域.Top) / ((float)this.szテクスチャサイズ.Height);
float f下V値 = ((float)rc画像内の描画領域.Bottom) / ((float)this.szテクスチャサイズ.Height);
this.color4.Alpha = ((float)this._opacity) / 255f;
int color = this.color4.ToArgb();
int color = ToArgb(this.color4);
if (this.cvTransformedColoredVertexies == null)
@ -884,7 +888,7 @@ namespace FDK
float f上V値 = ((float)rc画像内の描画領域.Top) / ((float)this.szテクスチャサイズ.Height);
float f下V値 = ((float)rc画像内の描画領域.Bottom) / ((float)this.szテクスチャサイズ.Height);
this.color4.Alpha = ((float)this._opacity) / 255f;
int color = this.color4.ToArgb();
int color = ToArgb(this.color4);
if (this.cvTransformedColoredVertexies == null)
this.cvTransformedColoredVertexies = new TransformedColoredTexturedVertex[4];
@ -925,7 +929,7 @@ namespace FDK
device.SetTexture(0, this.texture);
device.VertexFormat = TransformedColoredTexturedVertex.Format;
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, in this.cvTransformedColoredVertexies);
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, this.cvTransformedColoredVertexies);
}
public void t2D上下反転描画(Device device, Point pt)
{
@ -984,7 +988,7 @@ namespace FDK
float f上V値 = ((float)rc画像内の描画領域.Top) / ((float)this.szテクスチャサイズ.Height);
float f下V値 = ((float)rc画像内の描画領域.Bottom) / ((float)this.szテクスチャサイズ.Height);
this.color4.Alpha = ((float)this._opacity) / 255f;
int color = this.color4.ToArgb();
int color = ToArgb(this.color4);
if (this.cvPositionColoredVertexies == null)
this.cvPositionColoredVertexies = new PositionColoredTexturedVertex[4];
@ -1024,7 +1028,7 @@ namespace FDK
device.SetTransform(TransformState.World, mat);
device.SetTexture(0, this.texture);
device.VertexFormat = PositionColoredTexturedVertex.Format;
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, in this.cvPositionColoredVertexies);
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, this.cvPositionColoredVertexies);
}
public void t3D左上基準描画(Device device, Matrix mat)
@ -1051,7 +1055,7 @@ namespace FDK
float f上V値 = ((float)rc画像内の描画領域.Top) / ((float)this.szテクスチャサイズ.Height);
float f下V値 = ((float)rc画像内の描画領域.Bottom) / ((float)this.szテクスチャサイズ.Height);
this.color4.Alpha = ((float)this._opacity) / 255f;
int color = this.color4.ToArgb();
int color = ToArgb(this.color4);
if (this.cvPositionColoredVertexies == null)
this.cvPositionColoredVertexies = new PositionColoredTexturedVertex[4];
@ -1091,7 +1095,7 @@ namespace FDK
device.SetTransform(TransformState.World, mat);
device.SetTexture(0, this.texture);
device.VertexFormat = PositionColoredTexturedVertex.Format;
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, in this.cvPositionColoredVertexies);
device.DrawUserPrimitives(PrimitiveType.TriangleStrip, 2, this.cvPositionColoredVertexies);
}
#region [ IDisposable ]
@ -1145,34 +1149,34 @@ namespace FDK
{
if (this.b加算合成)
{
device.SetRenderState(RenderState.SourceBlend, SlimDX.Direct3D9.Blend.SourceAlpha); // 5
device.SetRenderState(RenderState.DestinationBlend, SlimDX.Direct3D9.Blend.One); // 2
device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha); // 5
device.SetRenderState(RenderState.DestinationBlend, Blend.One); // 2
}
else if (this.b乗算合成)
{
//参考:http://sylphylunar.seesaa.net/article/390331341.html
//C++から引っ張ってきたのでちょっと不安。
device.SetRenderState(RenderState.SourceBlend, SlimDX.Direct3D9.Blend.DestinationColor);
device.SetRenderState(RenderState.DestinationBlend, SlimDX.Direct3D9.Blend.Zero);
device.SetRenderState(RenderState.SourceBlend, Blend.DestinationColor);
device.SetRenderState(RenderState.DestinationBlend, Blend.Zero);
}
else if (this.b減算合成)
{
//参考:http://www3.pf-x.net/~chopper/home2/DirectX/MD20.html
device.SetRenderState(RenderState.BlendOperation, SlimDX.Direct3D9.BlendOperation.Subtract);
device.SetRenderState(RenderState.SourceBlend, SlimDX.Direct3D9.Blend.One);
device.SetRenderState(RenderState.DestinationBlend, SlimDX.Direct3D9.Blend.One);
device.SetRenderState(RenderState.BlendOperation, BlendOperation.Subtract);
device.SetRenderState(RenderState.SourceBlend, Blend.One);
device.SetRenderState(RenderState.DestinationBlend, Blend.One);
}
else if (this.bスクリーン合成)
{
//参考:http://sylphylunar.seesaa.net/article/390331341.html
//C++から引っ張ってきたのでちょっと不安。
device.SetRenderState(RenderState.SourceBlend, SlimDX.Direct3D9.Blend.InverseDestinationColor);
device.SetRenderState(RenderState.DestinationBlend, SlimDX.Direct3D9.Blend.One);
device.SetRenderState(RenderState.SourceBlend, Blend.InverseDestinationColor);
device.SetRenderState(RenderState.DestinationBlend, Blend.One);
}
else
{
device.SetRenderState(RenderState.SourceBlend, SlimDX.Direct3D9.Blend.SourceAlpha); // 5
device.SetRenderState(RenderState.DestinationBlend, SlimDX.Direct3D9.Blend.InverseSourceAlpha); // 6
device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha); // 5
device.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha); // 6
}
}
private Size t指定されたサイズを超えない最適なテクスチャサイズを返す(Device device, Size sz指定サイズ)
@ -1229,6 +1233,21 @@ namespace FDK
return szサイズ;
}
private int ToArgb(Color4 col4)
{
uint a = (uint)(col4.Alpha * 255.0f) & 255;
uint r = (uint)(col4.Red * 255.0f) & 255;
uint g = (uint)(col4.Green * 255.0f) & 255;
uint b = (uint)(col4.Blue * 255.0f) & 255;
uint value = b;
value |= g << 8;
value |= r << 16;
value |= a << 24;
return (int)value;
}
// 2012.3.21 さらなる new の省略作戦

View File

@ -5,10 +5,12 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Diagnostics;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
using Device = SampleFramework.DeviceCache;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace FDK
{

View File

@ -24,7 +24,7 @@ using System;
using System.Globalization;
using System.Runtime.InteropServices;
using SlimDX;
using SharpDX;
namespace FDK {
/// <summary>

View File

@ -3,8 +3,8 @@ using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Globalization;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
namespace FDK
{

View File

@ -24,7 +24,7 @@ using System;
using System.Globalization;
using System.Runtime.InteropServices;
using SlimDX;
using SharpDX;
namespace FDK {
/// <summary>

View File

@ -3,8 +3,8 @@ using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Globalization;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
namespace FDK
{

View File

@ -24,7 +24,7 @@ using System;
using System.Globalization;
using System.Runtime.InteropServices;
using SlimDX;
using SharpDX;
namespace FDK {
/// <summary>

View File

@ -6,8 +6,8 @@ using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Threading;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
using SharpDX.Multimedia;
using DirectShowLib;
@ -502,7 +502,7 @@ namespace FDK
{
#region [ (A) ]
//-----------------
hr = this.memoryRenderer.GetCurrentBuffer( dr.Data.DataPointer, this.nデータサイズbyte );
hr = this.memoryRenderer.GetCurrentBuffer( dr.DataPointer, this.nデータサイズbyte );
DsError.ThrowExceptionForHR( hr );
//-----------------
#endregion
@ -546,7 +546,7 @@ namespace FDK
this.ptrSnap = (byte*) this.ip.ToPointer();
var ptr = stackalloc UInt32*[ CDirectShow.n並列度 ]; // stackallocGC対象外、メソッド終了時に自動開放は、スタック変数相手にしか使えない。
ptr[ 0 ] = (UInt32*) dr.Data.DataPointer.ToPointer(); // ↓
ptr[ 0 ] = (UInt32*) dr.DataPointer.ToPointer(); // ↓
for( int i = 1; i < CDirectShow.n並列度; i++ ) // スタック変数で確保、初期化して…
ptr[ i ] = ptr[ i - 1 ] + this.n幅px; // ↓
this.ptrTexture = ptr; // スタック変数をクラスメンバに渡すこれならOK

View File

@ -122,13 +122,6 @@ Rename character config files to "CharaConfig.txt".
If you do not want characters, make "(Skin name)/Graphics/11_Characters/0" empty.
```
- OpenTaiko does not start.
```
Download SlimDX again from https://code.google.com/archive/p/slimdx/downloads\.
("Runtime for .NET 4.0 x86" or "Runtime for .NET 2.0 x86")
```
## Update history
<details>

View File

@ -125,13 +125,6 @@ v0.5.2から11_Charactersにキャラクターに関してファイルが読み
キャラクター使用が不希望なら「(スキン名)/Graphics/11_Characters/0」を空っぽでご生成ください。
```
- OpenTaikoが起動しません
```
SlimDXを改めてダウンロードしてくださいhttps://code.google.com/archive/p/slimdx/downloads
(「Runtime for .NET 4.0 x86」又は「Runtime for .NET 2.0 x86」)
```
## 更新記録
<details>

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using SlimDX.Direct3D9;
using SharpDX.Direct3D9;
using FDK;
namespace TJAPlayer3
@ -23,7 +23,7 @@ namespace TJAPlayer3
{
try // #xxxxx 2012.12.31 yyagi: to prepare flush, first of all, I create q queue to the GPU.
{
IDirect3DQuery9 = new Query(TJAPlayer3.app.Device.UnderlyingDevice, QueryType.Occlusion);
IDirect3DQuery9 = new Query(TJAPlayer3.app.Device, QueryType.Occlusion);
}
catch ( Exception e )
{
@ -45,7 +45,7 @@ namespace TJAPlayer3
{
IDirect3DQuery9.Issue( Issue.End );
DWM.Flush();
IDirect3DQuery9.GetData<int>( true ); // flush GPU queue
IDirect3DQuery9.GetData<int>( out int _, true ); // flush GPU queue
}
return 0;
}

View File

@ -6,7 +6,6 @@ using System.Runtime.InteropServices;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Diagnostics;
using SlimDX;
using FDK;
using System.Linq;

View File

@ -6,7 +6,6 @@ using System.Runtime.InteropServices;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Diagnostics;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -9,14 +9,18 @@ using System.IO;
using System.Threading;
using System.Net.NetworkInformation;
using System.Runtime.Serialization.Formatters.Binary;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
using FDK;
using SampleFramework;
using System.Reflection;
using System.Threading.Tasks;
using System.Linq;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
internal class TJAPlayer3 : Game
@ -364,7 +368,7 @@ namespace TJAPlayer3
get;
set;
}
public DeviceCache Device
public Device Device
{
get { return base.GraphicsDeviceManager.Direct3D9.Device; }
}
@ -702,7 +706,7 @@ namespace TJAPlayer3
#endregion
this.Device.BeginScene();
this.Device.Clear( ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 1f, 0 );
this.Device.Clear( ClearFlags.ZBuffer | ClearFlags.Target, SharpDX.Color.Black, 1f, 0 );
if( r現在のステージ != null )
{

View File

@ -3,8 +3,7 @@ using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Drawing;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX.Direct3D9;
using FDK;
namespace TJAPlayer3
@ -27,7 +26,7 @@ namespace TJAPlayer3
}
public Device D3D9Device
{
get { return (TJAPlayer3.app != null ) ? TJAPlayer3.app.Device.UnderlyingDevice : null; }
get { return (TJAPlayer3.app != null ) ? TJAPlayer3.app.Device : null; }
}
public Format TextureFormat
{

View File

@ -1,4 +1,6 @@
namespace TJAPlayer3
using SharpDX.Direct3D9;
namespace TJAPlayer3
{
/// <summary>
/// <para>プラグインホスト情報提供インターフェース。</para>
@ -16,7 +18,7 @@
/// <para>Direct3D9 デバイスオブジェクト。</para>
/// <para>ロストしたりリセットしたりすることがあるので、常に同じ値であるとは保証されません。</para>
/// </summary>
SlimDX.Direct3D9.Device D3D9Device { get; }
Device D3D9Device { get; }
/// <summary>
/// <para>DirectSound の管理クラス。</para>

View File

@ -8,8 +8,7 @@ using System.Drawing;
using System.Threading;
using System.Globalization;
using System.Runtime.Serialization.Formatters.Binary;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using FDK;
using SampleFramework;

View File

@ -6,10 +6,6 @@ using System.Runtime.InteropServices;
using System.IO;
using System.Threading;
using System.Runtime.Serialization.Formatters.Binary;
using SlimDX;
using SlimDX.Direct3D9;
using FDK;
using SampleFramework;
namespace TJAPlayer3
{

View File

@ -600,17 +600,17 @@ namespace TJAPlayer3
if (restricted1p[i] == true && TJAPlayer3.ConfigIni.nPlayerCount > 1)
{
TJAPlayer3.Tx.ModeSelect_Bar_Chara[i].color4 = Color.DarkGray;
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(idxToTex(i)).color4 = Color.DarkGray;
this.stModeBar[i].BarTexture.color4 = Color.DarkGray;
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(this.ttkBoxText[i]).color4 = Color.DarkGray;
TJAPlayer3.Tx.ModeSelect_Bar_Chara[i].color4 = C変換.ColorToColor4(Color.DarkGray);
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(idxToTex(i)).color4 = C変換.ColorToColor4(Color.DarkGray);
this.stModeBar[i].BarTexture.color4 = C変換.ColorToColor4(Color.DarkGray);
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(this.ttkBoxText[i]).color4 = C変換.ColorToColor4(Color.DarkGray);
}
else
{
TJAPlayer3.Tx.ModeSelect_Bar_Chara[i].color4 = Color.White;
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(idxToTex(i)).color4 = Color.White;
this.stModeBar[i].BarTexture.color4 = Color.White;
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(this.ttkBoxText[i]).color4 = Color.White;
TJAPlayer3.Tx.ModeSelect_Bar_Chara[i].color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(idxToTex(i)).color4 = C変換.ColorToColor4(Color.White);
this.stModeBar[i].BarTexture.color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(this.ttkBoxText[i]).color4 = C変換.ColorToColor4(Color.White);
}
#endregion
@ -688,15 +688,15 @@ namespace TJAPlayer3
if (restricted1p[i] == true && TJAPlayer3.ConfigIni.nPlayerCount > 1)
{
TJAPlayer3.Tx.ModeSelect_Bar_Chara[i].color4 = Color.DarkGray;
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(idxToTex(i)).color4 = Color.DarkGray;
this.stModeBar[i].BarTexture.color4 = Color.DarkGray;
TJAPlayer3.Tx.ModeSelect_Bar_Chara[i].color4 = C変換.ColorToColor4(Color.DarkGray);
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(idxToTex(i)).color4 = C変換.ColorToColor4(Color.DarkGray);
this.stModeBar[i].BarTexture.color4 = C変換.ColorToColor4(Color.DarkGray);
}
else
{
TJAPlayer3.Tx.ModeSelect_Bar_Chara[i].color4 = Color.White;
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(idxToTex(i)).color4 = Color.White;
this.stModeBar[i].BarTexture.color4 = Color.White;
TJAPlayer3.Tx.ModeSelect_Bar_Chara[i].color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(idxToTex(i)).color4 = C変換.ColorToColor4(Color.White);
this.stModeBar[i].BarTexture.color4 = C変換.ColorToColor4(Color.White);
}
#endregion

View File

@ -4,7 +4,6 @@ using System.Diagnostics;
using System.Text;
using System.Drawing;
using System.Threading;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -181,11 +181,11 @@ namespace TJAPlayer3
Color tickColor = stバー情報[currentSong].cDanTickColor;
TJAPlayer3.Tx.Dani_Plate.Opacity = 255;
TJAPlayer3.Tx.Dani_Plate.color4 = tickColor;
TJAPlayer3.Tx.Dani_Plate.color4 = C変換.ColorToColor4(tickColor);
TJAPlayer3.Tx.Dani_Plate.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, xPos, yPos, new Rectangle(tickWidth * tick, 0, tickWidth, tickHeight));
// Reset color for plate flash
TJAPlayer3.Tx.Dani_Plate.color4 = Color.White;
TJAPlayer3.Tx.Dani_Plate.color4 = C変換.ColorToColor4(Color.White);
#endregion
@ -303,7 +303,7 @@ namespace TJAPlayer3
if (TJAPlayer3.Tx.Dani_DanPlates != null)
{
TJAPlayer3.Tx.Dani_DanPlates.Opacity = 255;
TJAPlayer3.Tx.Dani_DanPlates.color4 = danTickColor;
TJAPlayer3.Tx.Dani_DanPlates.color4 = C変換.ColorToColor4(danTickColor);
}
TJAPlayer3.Tx.Dani_DanPlates?.t2D中心基準描画(TJAPlayer3.app.Device, x, y, new Rectangle(
unit * danTick,
@ -350,7 +350,7 @@ namespace TJAPlayer3
else
{
int unit = TJAPlayer3.Tx.Dani_DanSides.szテクスチャサイズ.Width / 6;
TJAPlayer3.Tx.Dani_DanSides.color4 = danTickColor;
TJAPlayer3.Tx.Dani_DanSides.color4 = C変換.ColorToColor4(danTickColor);
TJAPlayer3.Tx.Dani_Bar_Center.t2D描画(TJAPlayer3.app.Device, scroll + Anime, 0);

View File

@ -6,7 +6,6 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FDK;
using SlimDX.DirectInput;
namespace TJAPlayer3
{
@ -52,7 +51,7 @@ namespace TJAPlayer3
if (ctBarIn.b終了値に達した && !TJAPlayer3.stage段位選択.b選択した)
{
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)Key.RightArrow) ||
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.RightArrow) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RBlue))
{
if (n現在の選択行 - 1 >= 0)
@ -62,7 +61,7 @@ namespace TJAPlayer3
}
}
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)Key.LeftArrow) ||
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.LeftArrow) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LBlue))
{
if (n現在の選択行 + 1 <= 2)
@ -72,7 +71,7 @@ namespace TJAPlayer3
}
}
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)Key.Return) ||
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.Return) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LRed) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RRed))
{

View File

@ -5,7 +5,6 @@ using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using FDK;
using SlimDX.DirectInput;
using static TJAPlayer3.CActSelect曲リスト;
namespace TJAPlayer3
@ -147,19 +146,19 @@ namespace TJAPlayer3
if (!this..bスクロール中 && !b選択した && !bDifficultyIn)
{
if (TJAPlayer3.Input管理.Keyboard.bキーが押されている((int)Key.RightArrow) ||
if (TJAPlayer3.Input管理.Keyboard.bキーが押されている((int)SlimDXKeys.Key.RightArrow) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RBlue))
{
this..t右に移動();
}
if (TJAPlayer3.Input管理.Keyboard.bキーが押されている((int)Key.LeftArrow) ||
if (TJAPlayer3.Input管理.Keyboard.bキーが押されている((int)SlimDXKeys.Key.LeftArrow) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LBlue))
{
this..t左に移動();
}
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)Key.Return) ||
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.Return) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LRed) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RRed))
{
@ -169,7 +168,7 @@ namespace TJAPlayer3
this..ctBarIn.t開始(0, 255, 1, TJAPlayer3.Timer);
}
if(TJAPlayer3.Input管理.Keyboard.bキーが押された((int)Key.Escape))
if(TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.Escape))
{
TJAPlayer3.Skin.soundDanSelectBGM.t停止する();
TJAPlayer3.Skin.sound取消音.t再生する();

View File

@ -3,9 +3,11 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Diagnostics;
using SlimDX;
using SharpDX;
using FDK;
using Rectangle = System.Drawing.Rectangle;
namespace TJAPlayer3
{
internal class CActSelectArtistComment : CActivity

View File

@ -4,10 +4,13 @@ using System.Text;
using System.Drawing;
using System.IO;
using System.Diagnostics;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
using FDK;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
namespace TJAPlayer3
{
internal class CActSelectPreimageパネル : CActivity
@ -63,7 +66,7 @@ namespace TJAPlayer3
//this.txセンサ光 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_sensor light.png" ), false );
this.txプレビュー画像 = null;
this.txプレビュー画像がないときの画像 = TJAPlayer3.tテクスチャの生成( CSkin.Path( @"Graphics\5_preimage default.png" ), false );
this.sfAVI画像 = Surface.CreateOffscreenPlain( TJAPlayer3.app.Device.UnderlyingDevice, 0xcc, 0x10d, TJAPlayer3.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.SystemMemory );
this.sfAVI画像 = Surface.CreateOffscreenPlain( TJAPlayer3.app.Device, 0xcc, 0x10d, TJAPlayer3.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.SystemMemory );
this.nAVI再生開始時刻 = -1;
this.n前回描画したフレーム番号 = -1;
this.b動画フレームを作成した = false;
@ -183,7 +186,7 @@ namespace TJAPlayer3
private unsafe void tサーフェイスをクリアする( Surface sf )
{
DataRectangle rectangle = sf.LockRectangle( LockFlags.None );
DataStream data = rectangle.Data;
DataStream data = new DataStream(rectangle.DataPointer, sf.Description.Width * rectangle.Pitch, true, false);
switch ( ( rectangle.Pitch / sf.Description.Width ) )
{
case 4:
@ -524,7 +527,7 @@ namespace TJAPlayer3
if( this.b動画フレームを作成した && ( this.pAVIBmp != IntPtr.Zero ) )
{
DataRectangle rectangle = this.sfAVI画像.LockRectangle( LockFlags.None );
DataStream data = rectangle.Data;
DataStream data = new DataStream(rectangle.DataPointer, this.sfAVI画像.Description.Width * rectangle.Pitch, true, false); ;
int num5 = rectangle.Pitch / this.sfAVI画像.Description.Width;
BitmapUtil.BITMAPINFOHEADER* pBITMAPINFOHEADER = (BitmapUtil.BITMAPINFOHEADER*) this.pAVIBmp.ToPointer();
if( pBITMAPINFOHEADER->biBitCount == 0x18 )
@ -547,7 +550,7 @@ namespace TJAPlayer3
{
try
{
TJAPlayer3.app.Device.UpdateSurface( this.sfAVI画像, new Rectangle( 0, 0, this.sfAVI画像.Description.Width, this.sfAVI画像.Description.Height ), surface, new Point( x, y ) );
TJAPlayer3.app.Device.UpdateSurface( this.sfAVI画像, new SharpDX.Rectangle( 0, 0, this.sfAVI画像.Description.Width, this.sfAVI画像.Description.Height ), surface, new SharpDX.Point( x, y ) );
}
catch( Exception e ) // #32335 2013.10.26 yyagi: codecがないと、D3DERR_INVALIDCALLが発生する場合がある
{

View File

@ -4,7 +4,6 @@ using System.Diagnostics;
using System.Text;
using System.Drawing;
using System.IO;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -4,7 +4,6 @@ using System.Text;
using System.Drawing;
using System.Diagnostics;
using System.IO;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -8,10 +8,15 @@ using System.Drawing.Imaging;
using System.Diagnostics;
using System.Drawing.Text;
using System.Threading.Tasks;
using SlimDX;
using SharpDX;
using FDK;
using System.Linq;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
using RectangleF = System.Drawing.RectangleF;
namespace TJAPlayer3
{
internal class CActSelect曲リスト : CActivity
@ -1462,7 +1467,7 @@ namespace TJAPlayer3
if (!stバー情報[nパネル番号].BoxTypeChanged)
boxType = nStrジャンルtoNum(stバー情報[nパネル番号].strジャンル);
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType].color4 = stバー情報[nパネル番号].BoxColor;
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType].color4 = C変換.ColorToColor4(stバー情報[nパネル番号].BoxColor);
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType].vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay.vc拡大縮小倍率.X = 1.0f;
@ -1574,7 +1579,7 @@ namespace TJAPlayer3
if (!r現在選択中の曲.isChangedBoxType)
boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル);
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType].color4 = r現在選択中の曲.BoxColor;
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType].color4 = C変換.ColorToColor4(r現在選択中の曲.BoxColor);
if (ctBoxOpen.n現在の値 >= 1300 && ctBoxOpen.n現在の値 <= 1940)
{
@ -1680,7 +1685,7 @@ namespace TJAPlayer3
if (!r現在選択中の曲.isChangedBoxType)
boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル);
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType].color4 = r現在選択中の曲.BoxColor;
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType].color4 = C変換.ColorToColor4(r現在選択中の曲.BoxColor);
if (ctBoxOpen.n現在の値 >= 1300 && ctBoxOpen.n現在の値 <= 1940)
{
@ -1798,9 +1803,9 @@ namespace TJAPlayer3
bool avaliable = TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[i] >= 0;
if (avaliable)
TJAPlayer3.Tx.SongSelect_Frame_Score[0].color4 = new Color4(1f, 1f, 1f);
TJAPlayer3.Tx.SongSelect_Frame_Score[0].color4 = new Color4(1f, 1f, 1f, 1f);
else
TJAPlayer3.Tx.SongSelect_Frame_Score[0].color4 = new Color4(0.5f, 0.5f, 0.5f);
TJAPlayer3.Tx.SongSelect_Frame_Score[0].color4 = new Color4(0.5f, 0.5f, 0.5f, 1f);
#endregion
@ -1876,9 +1881,9 @@ namespace TJAPlayer3
bool avaliable = TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[diff] >= 0;
if (avaliable)
TJAPlayer3.Tx.SongSelect_Frame_Score[1].color4 = new Color4(1f, 1f, 1f);
TJAPlayer3.Tx.SongSelect_Frame_Score[1].color4 = new Color4(1f, 1f, 1f, 1f);
else
TJAPlayer3.Tx.SongSelect_Frame_Score[1].color4 = new Color4(0.5f, 0.5f, 0.5f);
TJAPlayer3.Tx.SongSelect_Frame_Score[1].color4 = new Color4(0.5f, 0.5f, 0.5f, 1f);
#endregion

View File

@ -4,9 +4,13 @@ using System.Text;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.InteropServices;
using SlimDX;
using SharpDX;
using FDK;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
internal class CActSelect演奏履歴パネル : CActivity

View File

@ -8,9 +8,13 @@ using System.Drawing.Imaging;
using System.Diagnostics;
using System.Drawing.Text;
using SlimDX;
using SharpDX;
using FDK;
using Rectangle = System.Drawing.Rectangle;
using RectangleF = System.Drawing.RectangleF;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
/// <summary>
@ -312,7 +316,7 @@ namespace TJAPlayer3
TJAPlayer3.Tx.SongSelect_ScoreRank.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.n現在の値 - 1255);
TJAPlayer3.Tx.Difficulty_Star.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.n現在の値 - 1255);
TJAPlayer3.Tx.Difficulty_Back[boxType].color4 = TJAPlayer3.stage選曲.r現在選択中の曲.BoxColor;
TJAPlayer3.Tx.Difficulty_Back[boxType].color4 = C変換.ColorToColor4(TJAPlayer3.stage選曲.r現在選択中の曲.BoxColor);
TJAPlayer3.Tx.Difficulty_Back[boxType].t2D中心基準描画(TJAPlayer3.app.Device, 640, 290);
@ -322,7 +326,7 @@ namespace TJAPlayer3
TJAPlayer3.Tx.Difficulty_Select_Bar[i].t2D描画(TJAPlayer3.app.Device, (float)this.BarX[n現在の選択行[i]], 242, new RectangleF(0, (n現在の選択行[i] >= 2 ? 114 : 387), 259, 275 - (n現在の選択行[i] >= 2 ? 0 : 164)));
}
TJAPlayer3.Tx.Difficulty_Bar.color4 = new Color4(1.0f, 1.0f, 1.0f);
TJAPlayer3.Tx.Difficulty_Bar.color4 = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
TJAPlayer3.Tx.Difficulty_Bar.t2D描画(TJAPlayer3.app.Device, 255, 270, new RectangleF(0, 0, 171, 236)); //閉じる、演奏オプション
@ -338,9 +342,9 @@ namespace TJAPlayer3
bool avaliable = TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[i] > 0;
if (avaliable)
TJAPlayer3.Tx.Difficulty_Bar.color4 = new Color4(1.0f, 1.0f, 1.0f);
TJAPlayer3.Tx.Difficulty_Bar.color4 = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
else
TJAPlayer3.Tx.Difficulty_Bar.color4 = new Color4(0.5f, 0.5f, 0.5f);
TJAPlayer3.Tx.Difficulty_Bar.color4 = new Color4(0.5f, 0.5f, 0.5f, 1.0f);
TJAPlayer3.Tx.Difficulty_Bar.t2D描画(TJAPlayer3.app.Device, 255 + 171 + 143 * screenPos, 270, new RectangleF(171 + 143 * i, 0, 138, 236));
@ -382,12 +386,12 @@ namespace TJAPlayer3
{
if (level > g + 10)
{
TJAPlayer3.Tx.Difficulty_Star.color4 = new Color4(1f, 0.2f, 0.2f);
TJAPlayer3.Tx.Difficulty_Star.color4 = new Color4(1f, 0.2f, 0.2f, 1.0f);
TJAPlayer3.Tx.Difficulty_Star?.t2D描画(TJAPlayer3.app.Device, 444 + screenPos * 143 + g * 10, 459);
}
else if (level > g)
{
TJAPlayer3.Tx.Difficulty_Star.color4 = new Color4(1f, 1f, 1f);
TJAPlayer3.Tx.Difficulty_Star.color4 = new Color4(1f, 1f, 1f, 1.0f);
TJAPlayer3.Tx.Difficulty_Star?.t2D描画(TJAPlayer3.app.Device, 444 + screenPos * 143 + g * 10, 459);
}

View File

@ -6,7 +6,6 @@ using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using SlimDX;
namespace TJAPlayer3
{
@ -395,13 +394,13 @@ namespace TJAPlayer3
{
if (TJAPlayer3.Tx.SongSelect_GenreBack[nGenreBack] != null)
{
TJAPlayer3.Tx.SongSelect_GenreBack[nGenreBack].color4 = this.NowBgColor;
TJAPlayer3.Tx.SongSelect_GenreBack[nGenreBack].color4 = C変換.ColorToColor4(this.NowBgColor);
TJAPlayer3.Tx.SongSelect_GenreBack[nGenreBack].Opacity = 255;
TJAPlayer3.Tx.SongSelect_GenreBack[nGenreBack].t2D描画(TJAPlayer3.app.Device, -(int)ct背景スクロール用タイマー.n現在の値 + TJAPlayer3.Tx.SongSelect_Background.szテクスチャサイズ.Width * i, 0);
}
if (TJAPlayer3.Tx.SongSelect_GenreBack[nOldGenreBack] != null)
{
TJAPlayer3.Tx.SongSelect_GenreBack[nOldGenreBack].color4 = this.OldBgColor;
TJAPlayer3.Tx.SongSelect_GenreBack[nOldGenreBack].color4 = C変換.ColorToColor4(this.OldBgColor);
TJAPlayer3.Tx.SongSelect_GenreBack[nOldGenreBack].Opacity = 600 - ctBackgroundFade.n現在の値;
TJAPlayer3.Tx.SongSelect_GenreBack[nOldGenreBack].t2D描画(TJAPlayer3.app.Device, -(int)ct背景スクロール用タイマー.n現在の値 + TJAPlayer3.Tx.SongSelect_Background.szテクスチャサイズ.Width * i, 0);
}
@ -935,7 +934,7 @@ namespace TJAPlayer3
int displayedScore = 0;
int table = 0;
TJAPlayer3.Tx.SongSelect_High_Score.t2D中心基準描画(TJAPlayer3.app.Device, posx, this.ptBoardNumber[11].Y);
TJAPlayer3.Tx.SongSelect_High_Score?.t2D中心基準描画(TJAPlayer3.app.Device, posx, this.ptBoardNumber[11].Y);
if (this.n現在選択中の曲の難易度 > (int)Difficulty.Edit)
table = 0;

View File

@ -4,10 +4,13 @@ using System.Text;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using SlimDX;
using SharpDX;
using System.Drawing.Text;
using FDK;
using RectangleF = System.Drawing.RectangleF;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
internal class CStage曲読み込み : CStage

View File

@ -2,11 +2,15 @@
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using SharpDX.Direct3D9;
using FDK;
using DirectShowLib;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
internal class CAct演奏AVI : CActivity
@ -399,7 +403,7 @@ namespace TJAPlayer3
if ( this.bフレームを作成した && ( this.pBmp != IntPtr.Zero ) )
{
DataRectangle rectangle3 = this.tx描画用.texture.LockRectangle( 0, LockFlags.None );
DataStream data = rectangle3.Data;
DataStream data = new DataStream(rectangle3.DataPointer, this.tx描画用.szテクスチャサイズ.Width * rectangle3.Pitch, true, false);
int num14 = rectangle3.Pitch / this.tx描画用.szテクスチャサイズ.Width;
BitmapUtil.BITMAPINFOHEADER* pBITMAPINFOHEADER = (BitmapUtil.BITMAPINFOHEADER*) this.pBmp.ToPointer();
if ( pBITMAPINFOHEADER->biBitCount == 0x18 )

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -4,7 +4,6 @@ using System.Diagnostics;
using System.Text;
using System.Drawing;
using System.IO;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -4,7 +4,6 @@ using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using System.Diagnostics;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Diagnostics;
using SlimDX;
using SharpDX;
using FDK;
using static TJAPlayer3.CActSelect曲リスト;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
@ -128,7 +130,7 @@ namespace TJAPlayer3
}
else
{
this.txGENRE.color4 = stageColor;
this.txGENRE.color4 = C変換.ColorToColor4(stageColor);
}
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))

View File

@ -4,6 +4,9 @@ using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using FDK;
using SharpDX;
using Rectangle = System.Drawing.Rectangle;
namespace TJAPlayer3
{
@ -184,9 +187,9 @@ namespace TJAPlayer3
fScale = 1.0f;
}
SlimDX.Matrix mat = SlimDX.Matrix.Identity;
mat *= SlimDX.Matrix.Scaling( fScale, fScale, 1.0f );
mat *= SlimDX.Matrix.Translation( -329, fY[ i ], 0 );
Matrix mat = Matrix.Identity;
mat *= Matrix.Scaling( fScale, fScale, 1.0f );
mat *= Matrix.Translation( -329, fY[ i ], 0 );
if( this.After[ i ] - this.Before[ i ] >= 0 )
{
//レベルアップ

View File

@ -4,7 +4,6 @@ using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using System.IO;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -4,7 +4,6 @@ using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using System.Diagnostics;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -5,6 +5,11 @@ using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using FDK;
using SharpDX;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
@ -477,15 +482,15 @@ namespace TJAPlayer3
if( this.st叩ききりまショー.b加算アニメ中 == true )
fRotate = C変換.DegreeToRadian( 360.0f * ( this.st叩ききりまショー.ct針アニメ.n現在の値 / (float)this.st叩ききりまショー.n延長アニメ速度 ) );
SlimDX.Matrix mat = SlimDX.Matrix.Identity;
Matrix mat = Matrix.Identity;
if( this.st叩ききりまショー.b最初のチップが叩かれた )
{
mat *= SlimDX.Matrix.RotationZ( fRotate );
mat *= SlimDX.Matrix.Translation( 280 - 640, -( 134 - 360 ), 0 );
mat *= Matrix.RotationZ( fRotate );
mat *= Matrix.Translation( 280 - 640, -( 134 - 360 ), 0 );
}
else
{
mat *= SlimDX.Matrix.Translation( 280 - 640, -( 134 - 360 ), 0 );
mat *= Matrix.Translation( 280 - 640, -( 134 - 360 ), 0 );
}
TJAPlayer3.Tx.GameMode_Timer_Tick.t3D描画( TJAPlayer3.app.Device, mat );

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -3,9 +3,11 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using SlimDX;
using SharpDX;
using FDK;
using Rectangle = System.Drawing.Rectangle;
namespace TJAPlayer3
{
internal class CAct演奏Drumsチップエフェクト : CActivity
@ -93,13 +95,13 @@ namespace TJAPlayer3
if (this.st[i].ctChipEffect.n現在の値 < 12)
{
TJAPlayer3.Tx.ChipEffect.color4 = new Color4(1.0f, 1.0f, 0.0f);
TJAPlayer3.Tx.ChipEffect.color4 = new Color4(1.0f, 1.0f, 0.0f, 1.0f);
TJAPlayer3.Tx.ChipEffect.Opacity = (int)(this.st[i].ctChipEffect.n現在の値 * (float)(225 / 11));
TJAPlayer3.Tx.ChipEffect.t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[st[i].nプレイヤー], TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[st[i].nプレイヤー], new Rectangle(st[i].Lane * 130, 0, 130, 130));
}
if (this.st[i].ctChipEffect.n現在の値 > 12 && this.st[i].ctChipEffect.n現在の値 < 24)
{
TJAPlayer3.Tx.ChipEffect.color4 = new Color4(1.0f, 1.0f, 1.0f);
TJAPlayer3.Tx.ChipEffect.color4 = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
TJAPlayer3.Tx.ChipEffect.Opacity = 255 - (int)((this.st[i].ctChipEffect.n現在の値 - 10) * (float)(255 / 14));
TJAPlayer3.Tx.ChipEffect.t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[st[i].nプレイヤー], TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[st[i].nプレイヤー], new Rectangle(st[i].Lane * 130, 0, 130, 130));
}

View File

@ -3,9 +3,13 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using SlimDX;
using SharpDX;
using FDK;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
internal class CAct演奏DrumsチップファイアD : CActivity

View File

@ -4,9 +4,13 @@ using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Diagnostics;
using SlimDX;
using SharpDX;
using FDK;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
internal class CAct演奏Drumsレーン太鼓 : CActivity

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Runtime.InteropServices;
using SlimDX;
using FDK;
using System.Drawing;

View File

@ -4,6 +4,11 @@ using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using FDK;
using SharpDX;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
@ -295,10 +300,10 @@ namespace TJAPlayer3
//2016.07.16 kairera0467 またも原始的...
float[] fRet = new float[] { 1.0f, 0.99f, 0.98f, 0.97f, 0.96f, 0.95f, 0.96f, 0.97f, 0.98f, 0.99f, 1.0f };
TJAPlayer3.Tx.End_Clear_L[0].t2D描画(TJAPlayer3.app.Device, 466, y[i] - 30);
TJAPlayer3.Tx.End_Clear_L[0].vc拡大縮小倍率 = new SlimDX.Vector3(fRet[this.ct進行メイン.n現在の値 - 36], 1.0f, 1.0f);
TJAPlayer3.Tx.End_Clear_L[0].vc拡大縮小倍率 = new Vector3(fRet[this.ct進行メイン.n現在の値 - 36], 1.0f, 1.0f);
//CDTXMania.Tx.End_Clear_R[ 0 ].t2D描画( CDTXMania.app.Device, 956 + (( this.ct進行メイン.n現在の値 - 36 ) / 2), 180 );
TJAPlayer3.Tx.End_Clear_R[0].t2D描画(TJAPlayer3.app.Device, 1136 - 180 * fRet[this.ct進行メイン.n現在の値 - 36], y[i] - 30);
TJAPlayer3.Tx.End_Clear_R[0].vc拡大縮小倍率 = new SlimDX.Vector3(fRet[this.ct進行メイン.n現在の値 - 36], 1.0f, 1.0f);
TJAPlayer3.Tx.End_Clear_R[0].vc拡大縮小倍率 = new Vector3(fRet[this.ct進行メイン.n現在の値 - 36], 1.0f, 1.0f);
}
}
else if (this.ct進行メイン.n現在の値 <= 49)

View File

@ -1,9 +1,12 @@
using System;
using FDK;
using System.Drawing;
using SlimDX;
using SharpDX;
using static TJAPlayer3.CActSelect曲リスト;
using Color = System.Drawing.Color;
using Rectangle = System.Drawing.Rectangle;
namespace TJAPlayer3
{
// Small static class which refers to the Tower mode important informations
@ -253,9 +256,9 @@ namespace TJAPlayer3
{
float colorTmp = 0.5f + (1f - currentFloorPositionMax140) * 0.5f;
TJAPlayer3.Tx.Background_Up_Tower[1].color4 = new Color4(colorTmp, colorTmp, colorTmp);
TJAPlayer3.Tx.Background_Up_Tower[2].color4 = new Color4(colorTmp, colorTmp, colorTmp);
TJAPlayer3.Tx.Background_Up_Tower[3].color4 = new Color4(colorTmp, colorTmp, colorTmp);
TJAPlayer3.Tx.Background_Up_Tower[1].color4 = new Color4(colorTmp, colorTmp, colorTmp, 1f);
TJAPlayer3.Tx.Background_Up_Tower[2].color4 = new Color4(colorTmp, colorTmp, colorTmp, 1f);
TJAPlayer3.Tx.Background_Up_Tower[3].color4 = new Color4(colorTmp, colorTmp, colorTmp, 1f);
TJAPlayer3.Tx.Background_Up_Tower[1].Opacity = (int)(255f * colorTmp);
TJAPlayer3.Tx.Background_Up_Tower[2].Opacity = (int)(255f * colorTmp);
@ -309,7 +312,7 @@ namespace TJAPlayer3
int digitLength = TJAPlayer3.Tx.Taiko_Combo[0].szテクスチャサイズ.Width / 10;
TJAPlayer3.Tx.Taiko_Combo[0].color4 = new Color4(1f, 0.6f, 0.2f);
TJAPlayer3.Tx.Taiko_Combo[0].color4 = new Color4(1f, 0.6f, 0.2f, 1f);
TJAPlayer3.Tx.Taiko_Combo[0].vc拡大縮小倍率.X = 1.4f;
TJAPlayer3.Tx.Taiko_Combo[0].vc拡大縮小倍率.Y = 1.4f;
@ -350,9 +353,9 @@ namespace TJAPlayer3
bool lifeSpecialCase = CFloorManagement.CurrentNumberOfLives == 1 && CFloorManagement.MaxNumberOfLives != 1;
float lifeRatio = CFloorManagement.CurrentNumberOfLives / (float)CFloorManagement.MaxNumberOfLives;
Color4 lifeColor = (lifeRatio > 0.5f && !lifeSpecialCase) ? new Color4(0.2f, 1f, 0.2f)
: ((lifeRatio >= 0.2f && !lifeSpecialCase) ? new Color4(1f, 1f, 0.2f)
: new Color4(1f, 0.2f, 0.2f));
Color4 lifeColor = (lifeRatio > 0.5f && !lifeSpecialCase) ? new Color4(0.2f, 1f, 0.2f, 1f)
: ((lifeRatio >= 0.2f && !lifeSpecialCase) ? new Color4(1f, 1f, 0.2f, 1f)
: new Color4(1f, 0.2f, 0.2f, 1f));
TJAPlayer3.Tx.Taiko_Combo[0].color4 = lifeColor;
TJAPlayer3.Tx.Taiko_Combo[0].vc拡大縮小倍率.X = 1.1f;
@ -368,7 +371,7 @@ namespace TJAPlayer3
digitLength, TJAPlayer3.Tx.Taiko_Combo[0].szテクスチャサイズ.Height));
}
TJAPlayer3.Tx.Taiko_Combo[0].color4 = new Color4(1f, 1f, 1f);
TJAPlayer3.Tx.Taiko_Combo[0].color4 = new Color4(1f, 1f, 1f, 1f);
#endregion

View File

@ -4,7 +4,6 @@ using System.Text;
using System.Drawing;
using System.Diagnostics;
using System.Runtime.InteropServices;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -4,7 +4,6 @@ using System.Text;
using System.Drawing;
using System.Diagnostics;
using System.Runtime.InteropServices;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -7,10 +7,12 @@ using System.Drawing.Imaging;
using System.IO;
using System.Diagnostics;
using System.Threading;
using SlimDX;
using SlimDX.Direct3D9;
using SharpDX;
using FDK;
using TJAPlayer3;
using Rectangle = System.Drawing.Rectangle;
using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
@ -1924,8 +1926,8 @@ namespace TJAPlayer3
}
float f減少するカラー = 1.0f - ((0.95f / 100) * pChip.RollEffectLevel);
var effectedColor = new Color4(1.0f, f減少するカラー, f減少するカラー);
var normalColor = new Color4(1.0f, 1.0f, 1.0f);
var effectedColor = new Color4(1.0f, f減少するカラー, f減少するカラー, 1f);
var normalColor = new Color4(1.0f, 1.0f, 1.0f, 1f);
float f末端ーツのテクスチャ位置調整 = 65f;
if (pChip.nチャンネル番号 == 0x15 && pChip.bShow) //連打(小)
@ -2207,7 +2209,7 @@ namespace TJAPlayer3
string strNull = "Found";
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.F1))
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.F1))
{
if (!this.actPauseMenu.bIsActivePopupMenu && this.bPAUSE == false)
{

View File

@ -4,11 +4,15 @@ using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using FDK;
using SharpDX;
using System.IO;
using TJAPlayer3;
using System.Linq;
using static TJAPlayer3.CActSelect曲リスト;
using Rectangle = System.Drawing.Rectangle;
using RectangleF = System.Drawing.RectangleF;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
static internal class CExamInfo
@ -991,13 +995,13 @@ namespace TJAPlayer3
if (value == 0)
{
TJAPlayer3.Tx.DanC_Number.color4 = Color.Gray;
TJAPlayer3.Tx.DanC_Small_Number.color4 = Color.Gray;
TJAPlayer3.Tx.DanC_Number.color4 = C変換.ColorToColor4(Color.Gray);
TJAPlayer3.Tx.DanC_Small_Number.color4 = C変換.ColorToColor4(Color.Gray);
}
else
{
TJAPlayer3.Tx.DanC_Number.color4 = Color.White;
TJAPlayer3.Tx.DanC_Small_Number.color4 = Color.White;
TJAPlayer3.Tx.DanC_Number.color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.Tx.DanC_Small_Number.color4 = C変換.ColorToColor4(Color.White);
}
if (bBig)
@ -1169,7 +1173,7 @@ namespace TJAPlayer3
[StructLayout(LayoutKind.Sequential)]
struct ChallengeStatus
{
public SlimDX.Color4 Color;
public Color4 Color;
public CCounter Timer_Gauge;
public CCounter Timer_Amount;
public CCounter Timer_Failed;

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -5,6 +5,9 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using SharpDX;
using Rectangle = System.Drawing.Rectangle;
namespace TJAPlayer3
{
@ -75,7 +78,7 @@ namespace TJAPlayer3
// TJAPlayer3.act文字コンソール.tPrint(700, 580, C文字コンソール.Eフォント種別.白, sineY.ToString());
TJAPlayer3.Tx.PuchiChara.vc拡大縮小倍率 = new SlimDX.Vector3((isBalloon ? TJAPlayer3.Skin.Game_PuchiChara_Scale[1] : TJAPlayer3.Skin.Game_PuchiChara_Scale[0]));
TJAPlayer3.Tx.PuchiChara.vc拡大縮小倍率 = new Vector3((isBalloon ? TJAPlayer3.Skin.Game_PuchiChara_Scale[1] : TJAPlayer3.Skin.Game_PuchiChara_Scale[0]));
TJAPlayer3.Tx.PuchiChara.Opacity = alpha;
// (isGrowing ? TJAPlayer3.Skin.Game_PuchiChara[1] : 0) => Height

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -4,8 +4,6 @@ using System.Text;
using System.Diagnostics;
using System.IO;
using System.Drawing;
using SlimDX;
using SlimDX.Direct3D9;
using FDK;
namespace TJAPlayer3

View File

@ -4,7 +4,6 @@ using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using System.IO;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Diagnostics;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -5,7 +5,6 @@ using FDK;
using System.Linq;
using System.Drawing;
using System.Collections.Generic;
using SlimDX.DirectInput;
using static TJAPlayer3.CActSelect曲リスト;
namespace TJAPlayer3
@ -1456,9 +1455,9 @@ namespace TJAPlayer3
#endregion
}
if (TJAPlayer3.Input管理.Keyboard.bキーが押されている((int)Key.LeftArrow) ||
if (TJAPlayer3.Input管理.Keyboard.bキーが押されている((int)SlimDXKeys.Key.LeftArrow) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LBlue) ||
TJAPlayer3.Input管理.Keyboard.bキーが押されている((int)Key.RightArrow) ||
TJAPlayer3.Input管理.Keyboard.bキーが押されている((int)SlimDXKeys.Key.RightArrow) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RBlue))
{
if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Dan)

View File

@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using DirectShowLib;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -5,9 +5,13 @@ using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using FDK;
using SlimDX.DirectInput;
using SharpDX;
using static TJAPlayer3.CActSelect曲リスト;
using Rectangle = System.Drawing.Rectangle;
using RectangleF = System.Drawing.RectangleF;
using Color = System.Drawing.Color;
namespace TJAPlayer3
{
class CStageHeya : CStage
@ -186,13 +190,13 @@ namespace TJAPlayer3
if (iCurrentMenu != -1 || iMainMenuCurrent != i)
{
tmpTex.color4 = Color.DarkGray;
TJAPlayer3.Tx.Heya_Side_Menu.color4 = Color.DarkGray;
tmpTex.color4 = C変換.ColorToColor4(Color.DarkGray);
TJAPlayer3.Tx.Heya_Side_Menu.color4 = C変換.ColorToColor4(Color.DarkGray);
}
else
{
tmpTex.color4 = Color.White;
TJAPlayer3.Tx.Heya_Side_Menu.color4 = Color.White;
tmpTex.color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.Tx.Heya_Side_Menu.color4 = C変換.ColorToColor4(Color.White);
}
TJAPlayer3.Tx.Heya_Side_Menu.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, 164, 26 + 80 * i);
@ -211,13 +215,13 @@ namespace TJAPlayer3
if (i != 0)
{
TJAPlayer3.Tx.PuchiChara.color4 = Color.DarkGray;
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.color4 = Color.DarkGray;
TJAPlayer3.Tx.PuchiChara.color4 = C変換.ColorToColor4(Color.DarkGray);
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.color4 = C変換.ColorToColor4(Color.DarkGray);
}
else
{
TJAPlayer3.Tx.PuchiChara.color4 = Color.White;
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.color4 = Color.White;
TJAPlayer3.Tx.PuchiChara.color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.color4 = C変換.ColorToColor4(Color.White);
}
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, 620 + 302 * i, 200);
@ -231,7 +235,7 @@ namespace TJAPlayer3
TJAPlayer3.Skin.Game_PuchiChara[0],
TJAPlayer3.Skin.Game_PuchiChara[1]));
TJAPlayer3.Tx.PuchiChara.color4 = Color.White;
TJAPlayer3.Tx.PuchiChara.color4 = C変換.ColorToColor4(Color.White);
if (ttkPuchiCharaNames[pos] != null)
{
@ -263,14 +267,14 @@ namespace TJAPlayer3
if (i != 0)
{
if (TJAPlayer3.Tx.Characters_Heya_Preview[pos] != null)
TJAPlayer3.Tx.Characters_Heya_Preview[pos].color4 = Color.DarkGray;
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.color4 = Color.DarkGray;
TJAPlayer3.Tx.Characters_Heya_Preview[pos].color4 = C変換.ColorToColor4(Color.DarkGray);
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.color4 = C変換.ColorToColor4(Color.DarkGray);
}
else
{
if (TJAPlayer3.Tx.Characters_Heya_Preview[pos] != null)
TJAPlayer3.Tx.Characters_Heya_Preview[pos].color4 = Color.White;
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.color4 = Color.White;
TJAPlayer3.Tx.Characters_Heya_Preview[pos].color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.color4 = C変換.ColorToColor4(Color.White);
}
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, 620 + 302 * i, 200);
@ -278,7 +282,7 @@ namespace TJAPlayer3
TJAPlayer3.Tx.Characters_Heya_Preview[pos]?.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 620 + 302 * i, 320);
if (TJAPlayer3.Tx.Characters_Heya_Preview[pos] != null)
TJAPlayer3.Tx.Characters_Heya_Preview[pos].color4 = Color.White;
TJAPlayer3.Tx.Characters_Heya_Preview[pos].color4 = C変換.ColorToColor4(Color.White);
}
}
@ -296,15 +300,15 @@ namespace TJAPlayer3
if (i != 0)
{
tmpTex.color4 = Color.DarkGray;
TJAPlayer3.Tx.Heya_Side_Menu.color4 = Color.DarkGray;
TJAPlayer3.Tx.NamePlateBase.color4 = Color.DarkGray;
tmpTex.color4 = C変換.ColorToColor4(Color.DarkGray);
TJAPlayer3.Tx.Heya_Side_Menu.color4 = C変換.ColorToColor4(Color.DarkGray);
TJAPlayer3.Tx.NamePlateBase.color4 = C変換.ColorToColor4(Color.DarkGray);
}
else
{
tmpTex.color4 = Color.White;
TJAPlayer3.Tx.Heya_Side_Menu.color4 = Color.White;
TJAPlayer3.Tx.NamePlateBase.color4 = Color.White;
tmpTex.color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.Tx.Heya_Side_Menu.color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.Tx.NamePlateBase.color4 = C変換.ColorToColor4(Color.White);
}
int danGrade = 0;
@ -319,7 +323,7 @@ namespace TJAPlayer3
718 + -10 * Math.Abs(i),
331 + 70 * i,
new RectangleF(0, (8 + danGrade) * 54, 220, 54));
TJAPlayer3.Tx.NamePlateBase.color4 = Color.White;
TJAPlayer3.Tx.NamePlateBase.color4 = C変換.ColorToColor4(Color.White);
tmpTex.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, 730 + -10 * Math.Abs(i), 354 + 70 * i);
@ -341,13 +345,13 @@ namespace TJAPlayer3
if (i != 0)
{
tmpTex.color4 = Color.DarkGray;
TJAPlayer3.Tx.Heya_Side_Menu.color4 = Color.DarkGray;
tmpTex.color4 = C変換.ColorToColor4(Color.DarkGray);
TJAPlayer3.Tx.Heya_Side_Menu.color4 = C変換.ColorToColor4(Color.DarkGray);
}
else
{
tmpTex.color4 = Color.White;
TJAPlayer3.Tx.Heya_Side_Menu.color4 = Color.White;
tmpTex.color4 = C変換.ColorToColor4(Color.White);
TJAPlayer3.Tx.Heya_Side_Menu.color4 = C変換.ColorToColor4(Color.White);
}
TJAPlayer3.Tx.Heya_Side_Menu.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, 730 + -10 * Math.Abs(i), 340 + 70 * i);
@ -412,7 +416,7 @@ namespace TJAPlayer3
#region [ ]
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)Key.RightArrow) ||
if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.RightArrow) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RBlue))
{
if (this.tMove(1))
@ -421,7 +425,7 @@ namespace TJAPlayer3
}
}
else if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)Key.LeftArrow) ||
else if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.LeftArrow) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LBlue))
{
if (this.tMove(-1))
@ -430,7 +434,7 @@ namespace TJAPlayer3
}
}
else if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)Key.Return) ||
else if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.Return) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LRed) ||
TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RRed))
{
@ -543,7 +547,7 @@ namespace TJAPlayer3
#endregion
}
else if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)Key.Escape))
else if (TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.Escape))
{
TJAPlayer3.Skin.sound取消音.t再生する();

View File

@ -3,9 +3,11 @@ using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using SlimDX;
using SharpDX;
using FDK;
using Rectangle = System.Drawing.Rectangle;
namespace TJAPlayer3
{
internal class CActDFPFont : CActivity

View File

@ -4,7 +4,6 @@ using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using System.Diagnostics;
using SlimDX;
using FDK;
namespace TJAPlayer3

View File

@ -2,10 +2,8 @@
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using SlimDX.Direct3D9;
using FDK;
using Device = SampleFramework.DeviceCache;
using SharpDX.Direct3D9;
namespace TJAPlayer3
{

View File

@ -367,6 +367,9 @@
<PackageReference Include="SharpDX.DirectSound">
<Version>4.2.0</Version>
</PackageReference>
<PackageReference Include="SharpDX.Mathematics">
<Version>4.2.0</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.5.0</Version>
</PackageReference>

View File

@ -1,19 +0,0 @@
Copyright (c) 2007-2010 SlimDX Group
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,20 +0,0 @@
All of the SlimDX media is covered by the Creative Commons Attribution-Share Alike 3.0 License:
http://creativecommons.org/licenses/by-sa/3.0/us/
You are free:
* To Share — to copy, distribute, display, and perform the work
* To Remix — to make derivative works
Under the following conditions:
* Attribution - You must attribute the work in the manner specified by the author or
licensor (but not in any way that suggests that they endorse you or your use of the work).
* Share Alike - If you alter, transform, or build upon this work, you may distribute
the resulting work only under the same, similar or a compatible license.
For any reuse or distribution, you must make clear to others the license terms of this work.
The best way to do this is with a link to the above web page.
Any of the above conditions can be waived if you get permission from the copyright holder.
Apart from the remix rights granted under this license, nothing in this license impairs or
restricts the author's moral rights.