diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03f3854..d41644b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,3 +138,6 @@ 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 + run: nuget push Raylib-cs/bin/Release/Raylib-cs.${{steps.get-nuget-version.outputs.info}}.nupkg -k $${{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 ``` [](https://www.nuget.org/packages/Raylib-cs/) diff --git a/Raylib-cs/Raylib-cs.csproj b/Raylib-cs/Raylib-cs.csproj index 1930488..22f0ed1 100644 --- a/Raylib-cs/Raylib-cs.csproj +++ b/Raylib-cs/Raylib-cs.csproj @@ -12,8 +12,8 @@ <PropertyGroup> <TargetRaylibTag>4.0.0</TargetRaylibTag> - <Version>4.0.0.1</Version> - <PackageVersion>4.0.0.1</PackageVersion> + <Version>4.0.0.2</Version> + <PackageVersion>4.0.0.2</PackageVersion> <Authors>Chris Dill, Raysan5</Authors> <PackProject>true</PackProject> <PackageLicenseExpression>Zlib</PackageLicenseExpression> diff --git a/Raylib-cs/interop/Raylib.cs b/Raylib-cs/interop/Raylib.cs index eeaec0d..9a0e6d3 100644 --- a/Raylib-cs/interop/Raylib.cs +++ b/Raylib-cs/interop/Raylib.cs @@ -82,7 +82,7 @@ namespace Raylib_cs [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void ClearWindowState(ConfigFlags flag); - /// <summary>Toggle fullscreen mode (only PLATFORM_DESKTOP)</summary> + /// <summary>Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void ToggleFullscreen(); @@ -146,19 +146,19 @@ namespace Raylib_cs [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Vector2 GetMonitorPosition(int monitor); - /// <summary>Get primary monitor width</summary> + /// <summary>Get specified monitor width</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern int GetMonitorWidth(int monitor); - /// <summary>Get primary monitor height</summary> + /// <summary>Get specified monitor height</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern int GetMonitorHeight(int monitor); - /// <summary>Get primary monitor physical width in millimetres</summary> + /// <summary>Get specified monitor physical width in millimetres</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern int GetMonitorPhysicalWidth(int monitor); - /// <summary>Get primary monitor physical height in millimetres</summary> + /// <summary>Get specified monitor physical height in millimetres</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern int GetMonitorPhysicalHeight(int monitor); @@ -174,7 +174,7 @@ namespace Raylib_cs [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Vector2 GetWindowScaleDPI(); - /// <summary>Get the human-readable, UTF-8 encoded name of the primary monitor</summary> + /// <summary>Get the human-readable, UTF-8 encoded name of the specified monitor</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern sbyte* GetMonitorName(int monitor); @@ -1049,11 +1049,11 @@ namespace Raylib_cs /// <summary>Export image data to file</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void ExportImage(Image image, sbyte* fileName); + public static extern CBool ExportImage(Image image, sbyte* fileName); /// <summary>Export image as code file defining an array of bytes</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void ExportImageAsCode(Image image, sbyte* fileName); + public static extern CBool ExportImageAsCode(Image image, sbyte* fileName); // Image generation functions @@ -1370,31 +1370,31 @@ namespace Raylib_cs // Color/pixel related functions - /// <summary>Returns hexadecimal value for a Color</summary> + /// <summary>Get hexadecimal value for a Color</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern int ColorToInt(Color color); - /// <summary>Returns color normalized as float [0..1]</summary> + /// <summary>Get color normalized as float [0..1]</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Vector4 ColorNormalize(Color color); - /// <summary>Returns color from normalized values [0..1]</summary> + /// <summary>Get color from normalized values [0..1]</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Color ColorFromNormalized(Vector4 normalized); - /// <summary>Returns HSV values for a Color, hue [0..360], saturation/value [0..1]</summary> + /// <summary>Get HSV values for a Color, hue [0..360], saturation/value [0..1]</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Vector3 ColorToHSV(Color color); - /// <summary>Returns a Color from HSV values, hue [0..360], saturation/value [0..1]</summary> + /// <summary>Get a Color from HSV values, hue [0..360], saturation/value [0..1]</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Color ColorFromHSV(float hue, float saturation, float value); - /// <summary>Returns color with alpha applied, alpha goes from 0.0f to 1.0f</summary> + /// <summary>Get color with alpha applied, alpha goes from 0.0f to 1.0f</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Color ColorAlpha(Color color, float alpha); - /// <summary>Returns src alpha-blended into dst color with tint</summary> + /// <summary>Get src alpha-blended into dst color with tint</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Color ColorAlphaBlend(Color dst, Color src, Color tint); @@ -1973,11 +1973,11 @@ namespace Raylib_cs /// <summary>Export wave data to file</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void ExportWave(Wave wave, sbyte* fileName); + public static extern CBool ExportWave(Wave wave, sbyte* fileName); /// <summary>Export wave sample data to code (.h)</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void ExportWaveAsCode(Wave wave, sbyte* fileName); + public static extern CBool ExportWaveAsCode(Wave wave, sbyte* fileName); // Wave/Sound management functions diff --git a/Raylib-cs/interop/Raymath.cs b/Raylib-cs/interop/Raymath.cs index 99a49c7..7ef3ece 100644 --- a/Raylib-cs/interop/Raymath.cs +++ b/Raylib-cs/interop/Raymath.cs @@ -108,9 +108,9 @@ namespace Raylib_cs [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount); - /// <summary>Calculate linear interpolation between two vectors</summary> + /// <summary>Rotate vector by angle</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Vector2 Vector2Rotate(Vector2 v, float degs); + public static extern Vector2 Vector2Rotate(Vector2 v, float angle); /// <summary>Vector with components value 0.0f</summary> diff --git a/Raylib-cs/interop/Rlgl.cs b/Raylib-cs/interop/Rlgl.cs index cdf0d5d..1a33317 100644 --- a/Raylib-cs/interop/Rlgl.cs +++ b/Raylib-cs/interop/Rlgl.cs @@ -659,7 +659,7 @@ namespace Raylib_cs /// <summary>Get internal accumulated transform matrix</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Matrix4x4 rlGetMatrixTramsform(); + public static extern Matrix4x4 rlGetMatrixTransform(); /// <summary>Get internal projection matrix for stereo render (selected eye)</summary> [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] diff --git a/Raylib-cs/types/Raylib.Utils.cs b/Raylib-cs/types/Raylib.Utils.cs index 45d8d9f..9334071 100644 --- a/Raylib-cs/types/Raylib.Utils.cs +++ b/Raylib-cs/types/Raylib.Utils.cs @@ -20,7 +20,7 @@ namespace Raylib_cs SetWindowTitle(str1.AsPointer()); } - /// <summary>Get the human-readable, UTF-8 encoded name of the primary monitor</summary> + /// <summary>Get the human-readable, UTF-8 encoded name of the specified monitor</summary> public static string GetMonitorName_(int monitor) { return Utf8StringUtils.GetUTF8String(GetMonitorName(monitor)); @@ -116,17 +116,17 @@ namespace Raylib_cs } /// <summary>Export image data to file</summary> - 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()); } /// <summary>Export image as code file defining an array of bytes</summary> - 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()); } /// <summary>Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)</summary> @@ -202,7 +202,7 @@ namespace Raylib_cs return files; } - /// <summary>Return gamepad internal name id</summary> + /// <summary>Get gamepad internal name id</summary> public static string GetGamepadName_(int gamepad) { return Utf8StringUtils.GetUTF8String(GetGamepadName(gamepad)); @@ -804,7 +804,7 @@ namespace Raylib_cs return GetCodepointCount(str1.AsPointer()); } - /// <summary>Returns next codepoint in a UTF8 encoded string; 0x3f('?') is returned on failure</summary> + /// <summary>Get next codepoint in a UTF8 encoded string; 0x3f('?') is returned on failure</summary> /// <returns>single codepoint / "char"</returns> public static int GetCodepoint(string text, ref int bytesProcessed) { @@ -884,17 +884,17 @@ namespace Raylib_cs } /// <summary>Export wave data to file</summary> - 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()); } /// <summary>Export wave sample data to code (.h)</summary> - 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()); } /// <summary>Load music stream from file</summary>