diff --git a/Examples/Examples.csproj b/Examples/Examples.csproj index 6fc42f2..54ac7af 100644 --- a/Examples/Examples.csproj +++ b/Examples/Examples.csproj @@ -1,23 +1,20 @@ Exe - net6.0 + net8.0 true Examples.Program $(MSBuildThisFileDirectory) 10 enable - - - + + - - diff --git a/Raylib-cs.Tests/Raylib-cs.Tests.csproj b/Raylib-cs.Tests/Raylib-cs.Tests.csproj index c6c27ee..3db3c6d 100644 --- a/Raylib-cs.Tests/Raylib-cs.Tests.csproj +++ b/Raylib-cs.Tests/Raylib-cs.Tests.csproj @@ -1,17 +1,15 @@ - net6.0 + net8.0 true - - - + \ No newline at end of file diff --git a/Raylib-cs.sln b/Raylib-cs.sln index 015e8d1..f12e87c 100644 --- a/Raylib-cs.sln +++ b/Raylib-cs.sln @@ -1,13 +1,13 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-cs", "Raylib-cs\Raylib-cs.csproj", "{236DB383-2FDC-4A77-8B33-22122D9B8950}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raylib-cs", "Raylib-cs\Raylib-cs.csproj", "{236DB383-2FDC-4A77-8B33-22122D9B8950}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-cs.Tests", "Raylib-cs.Tests\Raylib-cs.Tests.csproj", "{1341D222-7E10-42C6-BC6E-4A46C934A843}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raylib-cs.Tests", "Raylib-cs.Tests\Raylib-cs.Tests.csproj", "{1341D222-7E10-42C6-BC6E-4A46C934A843}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "Examples\Examples.csproj", "{1E2A5986-3F11-457F-AF97-D0C08D0060BA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples", "Examples\Examples.csproj", "{1E2A5986-3F11-457F-AF97-D0C08D0060BA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Raylib-cs/Raylib-cs.csproj b/Raylib-cs/Raylib-cs.csproj index 48c59a0..67c92dc 100644 --- a/Raylib-cs/Raylib-cs.csproj +++ b/Raylib-cs/Raylib-cs.csproj @@ -1,6 +1,6 @@ - net5.0;net6.0 + net8.0 false Raylib-cs Raylib_cs @@ -9,7 +9,6 @@ $(NoWarn);1591 10.0 - Chris Dill, Raysan5 true @@ -27,19 +26,14 @@ https://www.raylib.com/ true - - - - + - - runtimes/ @@ -47,7 +41,6 @@ PreserveNewest - @@ -56,4 +49,4 @@ - + \ No newline at end of file diff --git a/Raylib-cs/types/native/CBool.cs b/Raylib-cs/types/native/CBool.cs index 93e9408..1e66e4c 100644 --- a/Raylib-cs/types/native/CBool.cs +++ b/Raylib-cs/types/native/CBool.cs @@ -11,15 +11,16 @@ public readonly struct CBool * they only support a single bit, yes, but the minimum storage unit of a * computer is a sbyte, so that's what we'll be using when doing operations, * which can be later implicitely cast onto any type during usage. - * + * * It is wise to note that C booleans are any numeric value, but allocating an * Int64 for every CBool instance is.. well, wildly memory-inefficient. Yes, the * process is basically treated as a 0-cost instantiation, but it's better to rely * on explicit motivation than to blindly trust the runtime judgement on its memory - * management. - * + * management. + * * 'value' is visible and constructable (if necessary), but impossible to modify or access. */ + public sbyte Value { init; private get; @@ -30,13 +31,14 @@ public readonly struct CBool { this.Value = (sbyte)(value ? 1 : 0); } + public CBool(Int64 value) { this.Value = (sbyte)(value != 0 ? 1 : 0); } - // CBool -> Native - // Allows for arithmetic between CBools and for assignment to greater integer variables. + // CBool -> Native Allows for arithmetic between CBools and for assignment to greater integer + // variables. public static implicit operator sbyte(CBool x) { return x.Value; @@ -45,11 +47,11 @@ public readonly struct CBool // Allows for CBools to be implicitely assigned to a native boolean variable. public static implicit operator bool(CBool x) { - return x.Value != 0 ? true : false; + return x.Value != 0; } - // Native -> CBool - // Allows native booleans to be implicitely constructed into CBools while passing parameters. + // Native -> CBool Allows native booleans to be implicitely constructed into CBools while + // passing parameters. public static implicit operator CBool(bool x) { return new CBool { Value = (sbyte)(x ? 1 : 0) }; @@ -64,7 +66,7 @@ public readonly struct CBool /* Arithmetic overloads * Operations between CBools and integers are already covered by the implicit * sbyte cast. So no need to worry about those. - * + * * All casts return CBool, since there is no way to know if the assignment is * to a native boolean or integer, or a CBool. */