update mac to 2.6
This commit is contained in:
parent
92dcc91b82
commit
ba8b1760df
17 changed files with 3178 additions and 2338 deletions
|
@ -1,4 +1,4 @@
|
|||
// Raylib.h version 2.5-github modified by hand so it can be processed by CFFI
|
||||
// Raylib.h version 2.6-release modified by hand so it can be processed by CFFI
|
||||
/**********************************************************************************************
|
||||
*
|
||||
* raylib - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
|
@ -53,7 +53,7 @@
|
|||
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software:
|
||||
*
|
||||
* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2013-2020 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -74,8 +74,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Some basic Defines
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -86,9 +84,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Structures Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -207,7 +202,7 @@ typedef struct Font {
|
|||
CharInfo *chars; // Characters info data
|
||||
} Font;
|
||||
|
||||
typedef Font SpriteFont; // SpriteFont type fallback, defaults to Font
|
||||
|
||||
|
||||
// Camera type, defines a camera position/orientation in 3d space
|
||||
typedef struct Camera3D {
|
||||
|
@ -557,14 +552,16 @@ typedef enum {
|
|||
// This is here just for error checking
|
||||
GAMEPAD_BUTTON_UNKNOWN = 0,
|
||||
|
||||
// This is normally [A,B,X,Y]/[Circle,Triangle,Square,Cross]
|
||||
// No support for 6 button controllers though..
|
||||
// This is normally a DPAD
|
||||
GAMEPAD_BUTTON_LEFT_FACE_UP,
|
||||
GAMEPAD_BUTTON_LEFT_FACE_RIGHT,
|
||||
GAMEPAD_BUTTON_LEFT_FACE_DOWN,
|
||||
GAMEPAD_BUTTON_LEFT_FACE_LEFT,
|
||||
|
||||
// This is normally a DPAD
|
||||
// This normally corresponds with PlayStation and Xbox controllers
|
||||
// XBOX: [Y,X,A,B]
|
||||
// PS3: [Triangle,Square,Cross,Circle]
|
||||
// No support for 6 button controllers though..
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_UP,
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT,
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_DOWN,
|
||||
|
@ -774,8 +771,8 @@ typedef enum {
|
|||
NPT_3PATCH_HORIZONTAL // Npatch defined by 3x1 tiles
|
||||
} NPatchType;
|
||||
|
||||
// Callbacks to be implemented by users
|
||||
//typedef void (*TraceLogCallback)(int logType, const char *text, va_list args);
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
|
@ -842,6 +839,7 @@ RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a r
|
|||
RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix)
|
||||
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Returns camera 2d transform matrix
|
||||
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position
|
||||
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Returns size position for a 3d world space position
|
||||
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Returns the screen space position for a 2d camera world space position
|
||||
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Returns the world space position for a 2d camera screen space position
|
||||
|
||||
|
@ -864,7 +862,6 @@ RLAPI Color Fade(Color color, float alpha); // Color fade-
|
|||
RLAPI void SetConfigFlags(unsigned int flags); // Setup window configuration flags (view FLAGS)
|
||||
RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level
|
||||
RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level
|
||||
//RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging
|
||||
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
|
||||
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
|
||||
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
|
||||
|
@ -905,8 +902,8 @@ RLAPI bool IsKeyPressed(int key); // Detect if a key
|
|||
RLAPI bool IsKeyDown(int key); // Detect if a key is being pressed
|
||||
RLAPI bool IsKeyReleased(int key); // Detect if a key has been released once
|
||||
RLAPI bool IsKeyUp(int key); // Detect if a key is NOT being pressed
|
||||
RLAPI int GetKeyPressed(void); // Get latest key pressed
|
||||
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
|
||||
RLAPI int GetKeyPressed(void); // Get key pressed, call it multiple times for chars queued
|
||||
|
||||
// Input-related functions: gamepads
|
||||
RLAPI bool IsGamepadAvailable(int gamepad); // Detect if a gamepad is available
|
||||
|
@ -980,6 +977,8 @@ RLAPI void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, i
|
|||
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
|
||||
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
||||
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
||||
RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
|
||||
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
|
||||
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring
|
||||
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring outline
|
||||
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
||||
|
@ -998,6 +997,7 @@ RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color);
|
|||
RLAPI void DrawTriangleFan(Vector2 *points, int numPoints, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
RLAPI void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
||||
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
||||
|
||||
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Define default texture used to draw shapes
|
||||
|
||||
|
@ -1113,15 +1113,17 @@ RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color co
|
|||
RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
|
||||
RLAPI void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
|
||||
RLAPI void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint,
|
||||
int selectStart, int selectLength, Color selectText, Color selectBack); // Draw text using font inside rectangle limits with support for text selection
|
||||
int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection
|
||||
RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float scale, Color tint); // Draw one character (codepoint)
|
||||
|
||||
// Text misc. functions
|
||||
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
||||
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
|
||||
RLAPI int GetGlyphIndex(Font font, int character); // Get index position for a unicode character on font
|
||||
RLAPI int GetGlyphIndex(Font font, int codepoint); // Get index position for a unicode character on font
|
||||
|
||||
// Text strings management functions (no utf8 strings, only byte chars)
|
||||
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
||||
RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
|
||||
RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
|
||||
RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
|
||||
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf style)
|
||||
|
@ -1150,6 +1152,7 @@ RLAPI const char *CodepointToUtf8(int codepoint, int *byteLength); // Encode
|
|||
|
||||
// Basic geometric 3D shapes drawing functions
|
||||
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
||||
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
||||
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
||||
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
||||
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
||||
|
@ -1258,7 +1261,7 @@ RLAPI Matrix GetMatrixProjection(void); // Get
|
|||
|
||||
// Texture maps generation (PBR)
|
||||
// NOTE: Required shaders should be provided
|
||||
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D skyHDR, int size); // Generate cubemap texture from HDR texture
|
||||
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size); // Generate cubemap texture from 2D texture
|
||||
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
|
||||
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
|
||||
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture
|
||||
|
@ -1350,3 +1353,5 @@ RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pit
|
|||
// IN PROGRESS: Check rnet.h for reference
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Reference in a new issue