diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03f3854..e5df635 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,3 +138,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') with: files: Raylib-cs/bin/Release/Raylib-cs.${{steps.get-nuget-version.outputs.info}}.nupkg + + - name: Publish to NuGet + if: startsWith(github.ref, 'refs/tags/') + run: dotnet nuget push Raylib-cs/bin/Release/Raylib-cs.${{steps.get-nuget-version.outputs.info}}.nupkg --api-key ${{secrets.NUGET_API_KEY}} diff --git a/README.md b/README.md index 6d5bc99..bc56ba8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Raylib-cs targets net5.0 and net6.0. This is the prefered method to get started - The package is still new so please report any [issues](https://github.com/ChrisDill/Raylib-cs/issues). ``` -dotnet add package Raylib-cs --version 4.0.0.1 +dotnet add package Raylib-cs --version 4.0.0.2 ``` [![NuGet](https://img.shields.io/nuget/dt/raylib-cs)](https://www.nuget.org/packages/Raylib-cs/) diff --git a/Raylib-cs/Raylib-cs.csproj b/Raylib-cs/Raylib-cs.csproj index 7d662bb..12cacee 100644 --- a/Raylib-cs/Raylib-cs.csproj +++ b/Raylib-cs/Raylib-cs.csproj @@ -12,8 +12,8 @@ 4.2.0 - 4.0.0.1 - 4.0.0.1 + 4.2.0 + 4.2.0 Chris Dill, Raysan5 true Zlib diff --git a/Raylib-cs/interop/Raymath.cs b/Raylib-cs/interop/Raymath.cs index 2fdb234..e53dce6 100644 --- a/Raylib-cs/interop/Raymath.cs +++ b/Raylib-cs/interop/Raymath.cs @@ -112,9 +112,9 @@ namespace Raylib_cs [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount); - /// Calculate linear interpolation between two vectors + /// Rotate vector by angle [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Vector2 Vector2Rotate(Vector2 v, float degs); + public static extern Vector2 Vector2Rotate(Vector2 v, float angle); /// Vector with components value 0.0f diff --git a/Raylib-cs/types/Raylib.Utils.cs b/Raylib-cs/types/Raylib.Utils.cs index 8d85778..9cc9a14 100644 --- a/Raylib-cs/types/Raylib.Utils.cs +++ b/Raylib-cs/types/Raylib.Utils.cs @@ -106,27 +106,27 @@ namespace Raylib_cs } /// Load image sequence from file (frames appended to image.data) - public static Image LoadImageAnim(string fileName, int[] frames) + public static Image LoadImageAnim(string fileName, out int frames) { using var str1 = fileName.ToUTF8Buffer(); - fixed (int* p = frames) + fixed (int* p = &frames) { return LoadImageAnim(str1.AsPointer(), p); } } /// Export image data to file - public static void ExportImage(Image image, string fileName) + public static CBool ExportImage(Image image, string fileName) { using var str1 = fileName.ToUTF8Buffer(); - ExportImage(image, str1.AsPointer()); + return ExportImage(image, str1.AsPointer()); } /// Export image as code file defining an array of bytes - public static void ExportImageAsCode(Image image, string fileName) + public static CBool ExportImageAsCode(Image image, string fileName) { using var str1 = fileName.ToUTF8Buffer(); - ExportImageAsCode(image, str1.AsPointer()); + return ExportImageAsCode(image, str1.AsPointer()); } /// Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR) @@ -202,7 +202,7 @@ namespace Raylib_cs return files; } - /// Return gamepad internal name id + /// Get gamepad internal name id public static string GetGamepadName_(int gamepad) { return Utf8StringUtils.GetUTF8String(GetGamepadName(gamepad)); @@ -795,7 +795,7 @@ namespace Raylib_cs return GetCodepointCount(str1.AsPointer()); } - /// Returns next codepoint in a UTF8 encoded string; 0x3f('?') is returned on failure + /// Get next codepoint in a UTF8 encoded string; 0x3f('?') is returned on failure /// single codepoint / "char" public static int GetCodepoint(string text, ref int bytesProcessed) { @@ -875,17 +875,17 @@ namespace Raylib_cs } /// Export wave data to file - public static void ExportWave(Wave wave, string fileName) + public static CBool ExportWave(Wave wave, string fileName) { using var str1 = fileName.ToUTF8Buffer(); - ExportWave(wave, str1.AsPointer()); + return ExportWave(wave, str1.AsPointer()); } /// Export wave sample data to code (.h) - public static void ExportWaveAsCode(Wave wave, string fileName) + public static CBool ExportWaveAsCode(Wave wave, string fileName) { using var str1 = fileName.ToUTF8Buffer(); - ExportWaveAsCode(wave, str1.AsPointer()); + return ExportWaveAsCode(wave, str1.AsPointer()); } /// Load music stream from file