forked from mirror/DotRecast
refactor: support net6.0
This commit is contained in:
parent
a8ae6b46b0
commit
26309e79f8
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
||||||
<PackageId>DotRecast.Core</PackageId>
|
<PackageId>DotRecast.Core</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<Authors>ikpil</Authors>
|
<Authors>ikpil</Authors>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
||||||
<PackageId>DotRecast.Detour.Crowd</PackageId>
|
<PackageId>DotRecast.Detour.Crowd</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<Authors>ikpil</Authors>
|
<Authors>ikpil</Authors>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
||||||
<PackageId>DotRecast.Detour.Dynamic</PackageId>
|
<PackageId>DotRecast.Detour.Dynamic</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<Authors>ikpil</Authors>
|
<Authors>ikpil</Authors>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
||||||
<PackageId>DotRecast.Detour.Extras</PackageId>
|
<PackageId>DotRecast.Detour.Extras</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<Authors>ikpil</Authors>
|
<Authors>ikpil</Authors>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
||||||
<PackageId>DotRecast.Detour.TileCache</PackageId>
|
<PackageId>DotRecast.Detour.TileCache</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<Authors>ikpil</Authors>
|
<Authors>ikpil</Authors>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
||||||
<PackageId>DotRecast.Detour</PackageId>
|
<PackageId>DotRecast.Detour</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<Authors>ikpil</Authors>
|
<Authors>ikpil</Authors>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<PackageId>DotRecast.Recast.Demo</PackageId>
|
<PackageId>DotRecast.Recast.Demo</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
|
|
|
@ -587,7 +587,8 @@ public class DebugDraw
|
||||||
|
|
||||||
public static int Bit(int a, int b)
|
public static int Bit(int a, int b)
|
||||||
{
|
{
|
||||||
return (a & (1 << b)) >>> b;
|
//return (a & (1 << b)) >>> b;
|
||||||
|
return (a >> b) & 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int DuIntToCol(int i, int a)
|
public static int DuIntToCol(int i, int a)
|
||||||
|
|
|
@ -129,9 +129,9 @@ public class ModernOpenGLDraw : IOpenGLDraw
|
||||||
// _gl.VertexAttribP3(attrib_pos, GLEnum.Float, false, 24);
|
// _gl.VertexAttribP3(attrib_pos, GLEnum.Float, false, 24);
|
||||||
// _gl.VertexAttribP2(attrib_uv, GLEnum.Float, false, 24);
|
// _gl.VertexAttribP2(attrib_uv, GLEnum.Float, false, 24);
|
||||||
// _gl.VertexAttribP4(attrib_col, GLEnum.UnsignedByte, true, 24);
|
// _gl.VertexAttribP4(attrib_col, GLEnum.UnsignedByte, true, 24);
|
||||||
IntPtr pointer1 = 0;
|
IntPtr pointer1 = (IntPtr)0;
|
||||||
IntPtr pointer2 = 12;
|
IntPtr pointer2 = (IntPtr)12;
|
||||||
IntPtr pointer3 = 20;
|
IntPtr pointer3 = (IntPtr)20;
|
||||||
_gl.VertexAttribPointer(attrib_pos, 3, VertexAttribPointerType.Float, false, 24, pointer1.ToPointer());
|
_gl.VertexAttribPointer(attrib_pos, 3, VertexAttribPointerType.Float, false, 24, pointer1.ToPointer());
|
||||||
_gl.VertexAttribPointer(attrib_uv, 2, VertexAttribPointerType.Float, false, 24, pointer2.ToPointer());
|
_gl.VertexAttribPointer(attrib_uv, 2, VertexAttribPointerType.Float, false, 24, pointer2.ToPointer());
|
||||||
_gl.VertexAttribPointer(attrib_col, 4, VertexAttribPointerType.UnsignedByte, true, 24, pointer3.ToPointer());
|
_gl.VertexAttribPointer(attrib_col, 4, VertexAttribPointerType.UnsignedByte, true, 24, pointer3.ToPointer());
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
public class GeomLoadBeganEvent : IRecastDemoMessage
|
public class GeomLoadBeganEvent : IRecastDemoMessage
|
||||||
{
|
{
|
||||||
public required string FilePath { get; init; }
|
public string FilePath { get; init; }
|
||||||
}
|
}
|
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
public class NavMeshLoadBeganEvent : IRecastDemoMessage
|
public class NavMeshLoadBeganEvent : IRecastDemoMessage
|
||||||
{
|
{
|
||||||
public required string FilePath { get; init; }
|
public string FilePath { get; init; }
|
||||||
}
|
}
|
|
@ -4,6 +4,6 @@ namespace DotRecast.Recast.Demo.Messages;
|
||||||
|
|
||||||
public class RaycastEvent : IRecastDemoMessage
|
public class RaycastEvent : IRecastDemoMessage
|
||||||
{
|
{
|
||||||
public required RcVec3f Start { get; init; }
|
public RcVec3f Start { get; init; }
|
||||||
public required RcVec3f End { get; init; }
|
public RcVec3f End { get; init; }
|
||||||
}
|
}
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
public class LogMessageItem
|
public class LogMessageItem
|
||||||
{
|
{
|
||||||
public required int Level { get; init; }
|
public int Level { get; init; }
|
||||||
public required string Message { get; init; }
|
public string Message { get; init; }
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
||||||
<PackageId>DotRecast.Recast.Toolset</PackageId>
|
<PackageId>DotRecast.Recast.Toolset</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<Authors>ikpil</Authors>
|
<Authors>ikpil</Authors>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
||||||
<PackageId>DotRecast.Recast</PackageId>
|
<PackageId>DotRecast.Recast</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<Authors>ikpil</Authors>
|
<Authors>ikpil</Authors>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
Loading…
Reference in New Issue