mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-06-30 19:03:42 -04:00
Fixed trailing whitespace
- Removed trailing whitespace from bindings and examples.
This commit is contained in:
@ -1,9 +1,4 @@
|
||||
/**********************************************************************************************
|
||||
*
|
||||
* Raylib easings bindings
|
||||
* Original - https://github.com/raysan5/raylib/blob/master/src/easings.h
|
||||
*
|
||||
**********************************************************************************************/
|
||||
// Easings - https://github.com/raysan5/raylib/blob/master/src/easings.h
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
@ -13,94 +8,94 @@ namespace Raylib
|
||||
public static partial class Raylib
|
||||
{
|
||||
#region Raylib-cs Functions
|
||||
|
||||
|
||||
// Linear Easing functions
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseLinearNone(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseLinearIn(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseLinearOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseLinearInOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
// Sine Easing functions
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseSineIn(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseSineOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseSineInOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
// Circular Easing functions
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseCircIn(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseCircOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseCircInOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
// Cubic Easing functions
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseCubicIn(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseCubicOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseCubicInOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
// Quadratic Easing functions
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseQuadIn(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseQuadOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseQuadInOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
// Exponential Easing functions
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseExpoIn(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseExpoOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseExpoInOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
// Back Easing functions
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseBackIn(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseBackOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseBackInOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
// Bounce Easing functions
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseBounceOut(float t, float b, float c, float d);
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseBounceIn(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseBounceInOut(float t, float b, float c, float d);
|
||||
|
||||
|
||||
// Elastic Easing functions
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseElasticIn(float t, float b, float c, float d);
|
||||
|
||||
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float EaseElasticOut(float t, float b, float c, float d);
|
||||
|
||||
@ -108,6 +103,5 @@ namespace Raylib
|
||||
public static extern float EaseElasticInOut(float t, float b, float c, float d);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,4 @@
|
||||
/**********************************************************************************************
|
||||
*
|
||||
* Physac
|
||||
* Original -https://github.com/raysan5/raylib/blob/master/src/physac.h
|
||||
*
|
||||
**********************************************************************************************/
|
||||
// Physac - https://github.com/raysan5/raylib/blob/master/src/physac.h
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
@ -37,11 +32,13 @@ namespace Raylib
|
||||
{
|
||||
public uint vertexCount; // Current used vertex and normals count
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = Raylib.PHYSAC_MAX_VERTICES)]
|
||||
public Vector2[] positions; // Polygon vertex positions vectors
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = Raylib.PHYSAC_MAX_VERTICES)]
|
||||
public Vector2[] normals; // Polygon vertex normals vectors
|
||||
//[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = Raylib.PHYSAC_MAX_VERTICES)]
|
||||
//public Vector2[] positions; // Polygon vertex positions vectors
|
||||
public unsafe Vector2* positions;
|
||||
|
||||
//[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = Raylib.PHYSAC_MAX_VERTICES)]
|
||||
//public Vector2[] normals; // Polygon vertex normals vectors
|
||||
public unsafe Vector2* normals;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
@ -79,17 +76,18 @@ namespace Raylib
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
public struct PhysicsManifoldData
|
||||
public unsafe struct PhysicsManifoldData
|
||||
{
|
||||
public uint id; // Reference unique identifier
|
||||
public PhysicsBodyData bodyA; // Manifold first physics body reference
|
||||
public PhysicsBodyData bodyB; // Manifold second physics body reference
|
||||
public float penetration; // Depth of penetration from collision
|
||||
public Vector2 normal; // Normal direction vector from 'a' to 'b'
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = 2)]
|
||||
public Vector2[] contacts; // Points of contact during collision
|
||||
|
||||
|
||||
//[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = 2)]
|
||||
// public fixed Vector2[] contacts; // Points of contact during collision
|
||||
public unsafe Vector2* contacts;
|
||||
|
||||
public uint contactsCount; // Current collision number of contacts
|
||||
public float restitution; // Mixed restitution during collision
|
||||
public float dynamicFriction; // Mixed dynamic friction during collision
|
||||
@ -120,19 +118,23 @@ namespace Raylib
|
||||
|
||||
#endregion
|
||||
|
||||
#region Raylib-cs Functions
|
||||
#region Raylib-cs Functions
|
||||
|
||||
// Initializes physics values, pointers and creates physics loop thread
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void InitPhysics();
|
||||
public static extern void InitPhysics();
|
||||
|
||||
// Run physics step, to be used if PHYSICS_NO_THREADS is set in your main loop
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void RunPhysicsStep();
|
||||
|
||||
// Returns true if physics thread is currently enabled
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern bool IsPhysicsEnabled();
|
||||
public static extern bool IsPhysicsEnabled();
|
||||
|
||||
// Sets physics global gravity force
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetPhysicsGravity(float x, float y);
|
||||
public static extern void SetPhysicsGravity(float x, float y);
|
||||
|
||||
// Creates a new circle physics body with generic parameters
|
||||
[DllImport(nativeLibName, EntryPoint = "CreatePhysicsBodyCircle")]
|
||||
@ -167,23 +169,23 @@ namespace Raylib
|
||||
|
||||
// Adds a force to a physics body
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void PhysicsAddForce(PhysicsBodyData body, Vector2 force);
|
||||
public static extern void PhysicsAddForce(PhysicsBodyData body, Vector2 force);
|
||||
|
||||
// Adds an angular force to a physics body
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void PhysicsAddTorque(PhysicsBodyData body, float amount);
|
||||
|
||||
public static extern void PhysicsAddTorque(PhysicsBodyData body, float amount);
|
||||
|
||||
// Shatters a polygon shape physics body to little physics bodies with explosion force
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void PhysicsShatter(PhysicsBodyData body, Vector2 position, float force);
|
||||
public static extern void PhysicsShatter(PhysicsBodyData body, Vector2 position, float force);
|
||||
|
||||
// Returns the current amount of created physics bodies
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int GetPhysicsBodiesCount();
|
||||
public static extern int GetPhysicsBodiesCount();
|
||||
|
||||
// Returns a physics body of the bodies pool at a specific index
|
||||
[DllImport(nativeLibName, EntryPoint = "GetPhysicsBody")]
|
||||
public static extern IntPtr GetPhysicsBodyImport(int index);
|
||||
public static extern IntPtr GetPhysicsBodyImport(int index);
|
||||
public static PhysicsBodyData GetPhysicsBody(int index)
|
||||
{
|
||||
var body = GetPhysicsBodyImport(index);
|
||||
@ -193,33 +195,32 @@ namespace Raylib
|
||||
|
||||
// Returns the physics body shape type (PHYSICS_CIRCLE or PHYSICS_POLYGON)
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int GetPhysicsShapeType(int index);
|
||||
public static extern int GetPhysicsShapeType(int index);
|
||||
|
||||
// Returns the amount of vertices of a physics body shape
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int GetPhysicsShapeVerticesCount(int index);
|
||||
public static extern int GetPhysicsShapeVerticesCount(int index);
|
||||
|
||||
// Returns transformed position of a body shape (body position + vertex transformed position)
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Vector2 GetPhysicsShapeVertex(PhysicsBodyData body, int vertex);
|
||||
public static extern Vector2 GetPhysicsShapeVertex(PhysicsBodyData body, int vertex);
|
||||
|
||||
// Sets physics body shape transform based on radians parameter
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetPhysicsBodyRotation(PhysicsBodyData body, float radians);
|
||||
public static extern void SetPhysicsBodyRotation(PhysicsBodyData body, float radians);
|
||||
|
||||
// Unitializes and destroy a physics body
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DestroyPhysicsBody(PhysicsBodyData body);
|
||||
public static extern void DestroyPhysicsBody(PhysicsBodyData body);
|
||||
|
||||
// Destroys created physics bodies and manifolds and resets global values
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ResetPhysics();
|
||||
public static extern void ResetPhysics();
|
||||
|
||||
// Unitializes physics pointers and closes physics loop thread
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void ClosePhysics();
|
||||
public static extern void ClosePhysics();
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,4 @@
|
||||
/**********************************************************************************************
|
||||
*
|
||||
* Raygui
|
||||
* Original - https://github.com/raysan5/raygui/blob/master/src/raygui.h
|
||||
*
|
||||
**********************************************************************************************/
|
||||
// Raygui - https://github.com/raysan5/raygui/blob/master/src/raygui.h
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@ -1,9 +1,5 @@
|
||||
/**********************************************************************************************
|
||||
*
|
||||
* Raylib - A simple and easy-to-use library to learn videogames programming (www.raylib.com)
|
||||
* Original - https://github.com/raysan5/raylib/blob/master/src/raylib.h
|
||||
*
|
||||
**********************************************************************************************/
|
||||
// Raylib - https://github.com/raysan5/raylib/blob/master/src/raylib.h
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
@ -186,7 +182,7 @@ namespace Raylib
|
||||
NPT_9PATCH = 0, // 3x3
|
||||
NPT_3PATCH_VERTICAL, // 1x3
|
||||
NPT_3PATCH_HORIZONTAL // 3x1
|
||||
}
|
||||
}
|
||||
|
||||
// enum extension for constants
|
||||
// Keyboard Function Keys
|
||||
@ -933,7 +929,7 @@ namespace Raylib
|
||||
|
||||
#endregion
|
||||
|
||||
#region Raylib-cs Functions
|
||||
#region Raylib-cs Functions
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Window and Graphics Device Functions (Module: core)
|
||||
@ -1354,7 +1350,7 @@ namespace Raylib
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int GetTouchPointsCount();
|
||||
|
||||
// Get gesture hold time in milliseconds
|
||||
// Get gesture hold time in milliseconds
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern float GetGestureHoldDuration();
|
||||
|
||||
@ -2396,7 +2392,7 @@ namespace Raylib
|
||||
// Set pitch for audio stream (1.0 is base level)
|
||||
[DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void SetAudioStreamPitch(AudioStream stream, float pitch);
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,4 @@
|
||||
/**********************************************************************************************
|
||||
*
|
||||
* Raymath v1.2 bindings - Math functions to work with Vector3, Matrix and Quaternions
|
||||
* Original - https://github.com/raysan5/raylib/blob/master/src/raymath.h
|
||||
*
|
||||
**********************************************************************************************/
|
||||
// Raymath - https://github.com/raysan5/raylib/blob/master/src/raymath.h
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@ -1,9 +1,4 @@
|
||||
/**********************************************************************************************
|
||||
*
|
||||
* Rlgl
|
||||
* Original - https://github.com/raysan5/raylib/blob/master/src/rlgl.h
|
||||
*
|
||||
**********************************************************************************************/
|
||||
// Rlgl - https://github.com/raysan5/raylib/blob/master/src/rlgl.h
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
@ -28,6 +23,5 @@ namespace Raylib
|
||||
#region Raylib-cs Functions
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user