Review comments/fixes
This commit is contained in:
parent
92b89362b5
commit
ba282347fa
4 changed files with 35 additions and 22 deletions
|
|
@ -845,9 +845,11 @@ namespace Raylib_cs
|
||||||
// Basic Shapes Drawing Functions (Module: shapes)
|
// Basic Shapes Drawing Functions (Module: shapes)
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
||||||
/// <summary>Set texture and rectangle to be used on shapes drawing<br/>
|
/// <summary>
|
||||||
|
/// Set texture and rectangle to be used on shapes drawing<br/>
|
||||||
/// NOTE: It can be useful when using basic shapes and one single font.<br/>
|
/// NOTE: It can be useful when using basic shapes and one single font.<br/>
|
||||||
/// Defining a white rectangle would allow drawing everything in a single draw call.</summary>
|
/// Defining a white rectangle would allow drawing everything in a single draw call.
|
||||||
|
/// </summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void SetShapesTexture(Texture2D texture, Rectangle source);
|
public static extern void SetShapesTexture(Texture2D texture, Rectangle source);
|
||||||
|
|
||||||
|
|
@ -1469,8 +1471,7 @@ namespace Raylib_cs
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern Font LoadFontFromImage(Image image, Color key, int firstChar);
|
public static extern Font LoadFontFromImage(Image image, Color key, int firstChar);
|
||||||
|
|
||||||
/// <summary>Load font from memory buffer, fileType refers to extension: i.e. "ttf"<br/>
|
/// <summary>Load font from memory buffer, fileType refers to extension: i.e. "ttf"</summary>
|
||||||
/// fileData refers to const unsigned char *</summary>
|
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern Font LoadFontFromMemory(sbyte* fileType, byte* fileData, int dataSize, int fontSize, int* fontChars, int glyphCount);
|
public static extern Font LoadFontFromMemory(sbyte* fileType, byte* fileData, int dataSize, int fontSize, int* fontChars, int glyphCount);
|
||||||
|
|
||||||
|
|
@ -1976,8 +1977,7 @@ namespace Raylib_cs
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern Wave LoadWave(sbyte* fileName);
|
public static extern Wave LoadWave(sbyte* fileName);
|
||||||
|
|
||||||
/// <summary>Load wave from memory buffer, fileType refers to extension: i.e. "wav"<br/>
|
/// <summary>Load wave from memory buffer, fileType refers to extension: i.e. "wav"</summary>
|
||||||
/// fileData refers to a const unsigned char *</summary>
|
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern Wave LoadWaveFromMemory(sbyte* fileType, byte* fileData, int dataSize);
|
public static extern Wave LoadWaveFromMemory(sbyte* fileType, byte* fileData, int dataSize);
|
||||||
|
|
||||||
|
|
@ -2068,12 +2068,10 @@ namespace Raylib_cs
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void WaveFormat(Wave* wave, int sampleRate, int sampleSize, int channels);
|
public static extern void WaveFormat(Wave* wave, int sampleRate, int sampleSize, int channels);
|
||||||
|
|
||||||
//TODO: Span
|
|
||||||
/// <summary>Get samples data from wave as a floats array</summary>
|
/// <summary>Get samples data from wave as a floats array</summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern float* LoadWaveSamples(Wave wave);
|
public static extern float* LoadWaveSamples(Wave wave);
|
||||||
|
|
||||||
//TODO: Span
|
|
||||||
/// <summary>Unload samples data loaded with LoadWaveSamples()</summary>
|
/// <summary>Unload samples data loaded with LoadWaveSamples()</summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void UnloadWaveSamples(float* samples);
|
public static extern void UnloadWaveSamples(float* samples);
|
||||||
|
|
@ -2196,13 +2194,15 @@ namespace Raylib_cs
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void SetAudioStreamBufferSizeDefault(int size);
|
public static extern void SetAudioStreamBufferSizeDefault(int size);
|
||||||
|
|
||||||
// <summary>Audio thread callback to request new data</summary>
|
/// <summary>Audio thread callback to request new data</summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void SetAudioStreamCallback(AudioStream stream, delegate* unmanaged[Cdecl]<sbyte*, uint, void> callback);
|
public static extern void SetAudioStreamCallback(AudioStream stream, delegate* unmanaged[Cdecl]<sbyte*, uint, void> callback);
|
||||||
|
|
||||||
|
/// <summary>Attach audio stream processor to stream</summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void AttachAudioStreamProcessor(AudioStream stream, delegate* unmanaged[Cdecl]<sbyte*, uint, void> processor);
|
public static extern void AttachAudioStreamProcessor(AudioStream stream, delegate* unmanaged[Cdecl]<sbyte*, uint, void> processor);
|
||||||
|
|
||||||
|
/// <summary>Detach audio stream processor from stream</summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void DetachAudioStreamProcessor(AudioStream stream, delegate* unmanaged[Cdecl]<sbyte*, uint, void> processor);
|
public static extern void DetachAudioStreamProcessor(AudioStream stream, delegate* unmanaged[Cdecl]<sbyte*, uint, void> processor);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -512,6 +512,6 @@ namespace Raylib_cs
|
||||||
|
|
||||||
/// <summary>Check whether two given quaternions are almost equal</summary>
|
/// <summary>Check whether two given quaternions are almost equal</summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern Quaternion QuaternionEquals(Quaternion p, Quaternion q);
|
public static extern int QuaternionEquals(Quaternion p, Quaternion q);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ namespace Raylib_cs
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void rlMatrixMode(int mode);
|
public static extern void rlMatrixMode(int mode);
|
||||||
|
|
||||||
|
/// <inheritdoc cref="rlMatrixMode(int)"/>
|
||||||
public static void rlMatrixMode(MatrixMode mode)
|
public static void rlMatrixMode(MatrixMode mode)
|
||||||
{
|
{
|
||||||
rlMatrixMode((int)mode);
|
rlMatrixMode((int)mode);
|
||||||
|
|
@ -94,8 +95,7 @@ namespace Raylib_cs
|
||||||
public static extern void rlScalef(float x, float y, float z);
|
public static extern void rlScalef(float x, float y, float z);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Multiply the current matrix by another matrix
|
/// Multiply the current matrix by another matrix<br/>
|
||||||
/// <br/>
|
|
||||||
/// Current Matrix can be set via <see cref="rlMatrixMode(int)"/>
|
/// Current Matrix can be set via <see cref="rlMatrixMode(int)"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ namespace Raylib_cs
|
||||||
public enum GamepadButton
|
public enum GamepadButton
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is here just for error checking
|
/// Unknown button, just for error checking
|
||||||
/// </summary>
|
/// </summary>
|
||||||
GAMEPAD_BUTTON_UNKNOWN = 0,
|
GAMEPAD_BUTTON_UNKNOWN = 0,
|
||||||
|
|
||||||
|
|
@ -323,41 +323,54 @@ namespace Raylib_cs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
GAMEPAD_BUTTON_RIGHT_FACE_LEFT,
|
GAMEPAD_BUTTON_RIGHT_FACE_LEFT,
|
||||||
|
|
||||||
// Triggers
|
/// <summary>
|
||||||
|
/// Gamepad top/back trigger left (first), it could be a trailing button
|
||||||
|
/// </summary>
|
||||||
GAMEPAD_BUTTON_LEFT_TRIGGER_1,
|
GAMEPAD_BUTTON_LEFT_TRIGGER_1,
|
||||||
GAMEPAD_BUTTON_LEFT_TRIGGER_2,
|
|
||||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_1,
|
|
||||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_2,
|
|
||||||
|
|
||||||
// These are buttons in the center of the gamepad
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PS3 Select
|
/// Gamepad top/back trigger left (second), it could be a trailing button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_LEFT_TRIGGER_2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad top/back trigger right (first), it could be a trailing button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_RIGHT_TRIGGER_1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad top/back trigger right (second), it could be a trailing button
|
||||||
|
/// </summary>
|
||||||
|
GAMEPAD_BUTTON_RIGHT_TRIGGER_2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gamepad center buttons, left one (i.e. PS3: Select)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
GAMEPAD_BUTTON_MIDDLE_LEFT,
|
GAMEPAD_BUTTON_MIDDLE_LEFT,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PS Button/XBOX Button
|
/// Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
GAMEPAD_BUTTON_MIDDLE,
|
GAMEPAD_BUTTON_MIDDLE,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PS3 Start
|
/// Gamepad center buttons, right one (i.e. PS3: Start)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
GAMEPAD_BUTTON_MIDDLE_RIGHT,
|
GAMEPAD_BUTTON_MIDDLE_RIGHT,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Left joystick press button
|
/// Gamepad joystick pressed button left
|
||||||
/// </summary>
|
/// </summary>
|
||||||
GAMEPAD_BUTTON_LEFT_THUMB,
|
GAMEPAD_BUTTON_LEFT_THUMB,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Right joystick press button
|
/// Gamepad joystick pressed button right
|
||||||
/// </summary>
|
/// </summary>
|
||||||
GAMEPAD_BUTTON_RIGHT_THUMB
|
GAMEPAD_BUTTON_RIGHT_THUMB
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Gesture
|
/// <summary>
|
||||||
|
/// Gesture
|
||||||
/// NOTE: It could be used as flags to enable only some gestures
|
/// NOTE: It could be used as flags to enable only some gestures
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Flags]
|
[Flags]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue