Skip to content

Commit ba8b176

Browse files
update mac to 2.6
1 parent 92dcc91 commit ba8b176

17 files changed

+3184
-2344
lines changed

libraylib_mac.a

6.12 MB
Binary file not shown.

raylib/dynamic/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import platform
77

88
# Probably unnecessary, just covering all bases in case people add or remove dlls
9-
MAC_NAMES = ['libraylib.2.5.0.dylib', 'libraylib.2.dylib', 'libraylib.dylib']
10-
LINUX_NAMES = ['libraylib.so.2.5.0','libraylib.so.2', 'libraylib.so']
9+
MAC_NAMES = ['libraylib.2.6.0.dylib', 'libraylib.261.dylib', 'libraylib.dylib']
10+
LINUX_NAMES = ['libraylib.so.2.6.0','libraylib.so.2', 'libraylib.so']
1111
WINDOWS_NAMES = ['raylib.dll', 'libraylib.dll']
1212

1313

raylib/dynamic/libraylib.2.5.0.dylib

-3.36 MB
Binary file not shown.

raylib/dynamic/libraylib.2.6.0.dylib

3.79 MB
Binary file not shown.

raylib/dynamic/libraylib.2.dylib

Lines changed: 0 additions & 1 deletion
This file was deleted.

raylib/dynamic/libraylib.261.dylib

3.79 MB
Binary file not shown.

raylib/dynamic/libraylib.dylib

Lines changed: 0 additions & 1 deletion
This file was deleted.

raylib/dynamic/libraylib.dylib

3.79 MB
Binary file not shown.

raylib/raylib.h

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
5353
* BSD-like license that allows static linking with closed source software:
5454
*
55-
* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5)
55+
* Copyright (c) 2013-2020 Ramon Santamaria (@raysan5)
5656
*
5757
* This software is provided "as-is", without any express or implied warranty. In no event
5858
* will the authors be held liable for any damages arising from the use of this software.
@@ -74,14 +74,17 @@
7474
#ifndef RAYLIB_H
7575
#define RAYLIB_H
7676

77-
#include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback
77+
#include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback
7878

79-
#if defined(_WIN32) && defined(BUILD_LIBTYPE_SHARED)
80-
#define RLAPI __declspec(dllexport) // We are building raylib as a Win32 shared library (.dll)
81-
#elif defined(_WIN32) && defined(USE_LIBTYPE_SHARED)
82-
#define RLAPI __declspec(dllimport) // We are using raylib as a Win32 shared library (.dll)
83-
#else
84-
#define RLAPI // We are building or using raylib as a static library (or Linux shared library)
79+
#define RLAPI // We are building or using raylib as a static library (or Linux shared library)
80+
81+
#if defined(_WIN32)
82+
// Microsoft attibutes to tell compiler that symbols are imported/exported from a .dll
83+
#if defined(BUILD_LIBTYPE_SHARED)
84+
#define RLAPI __declspec(dllexport) // We are building raylib as a Win32 shared library (.dll)
85+
#elif defined(USE_LIBTYPE_SHARED)
86+
#define RLAPI __declspec(dllimport) // We are using raylib as a Win32 shared library (.dll)
87+
#endif
8588
#endif
8689

8790
//----------------------------------------------------------------------------------
@@ -103,6 +106,9 @@
103106
#ifndef RL_CALLOC
104107
#define RL_CALLOC(n,sz) calloc(n,sz)
105108
#endif
109+
#ifndef RL_REALLOC
110+
#define RL_REALLOC(n,sz) realloc(n,sz)
111+
#endif
106112
#ifndef RL_FREE
107113
#define RL_FREE(p) free(p)
108114
#endif
@@ -624,14 +630,16 @@ typedef enum {
624630
// This is here just for error checking
625631
GAMEPAD_BUTTON_UNKNOWN = 0,
626632

627-
// This is normally [A,B,X,Y]/[Circle,Triangle,Square,Cross]
628-
// No support for 6 button controllers though..
633+
// This is normally a DPAD
629634
GAMEPAD_BUTTON_LEFT_FACE_UP,
630635
GAMEPAD_BUTTON_LEFT_FACE_RIGHT,
631636
GAMEPAD_BUTTON_LEFT_FACE_DOWN,
632637
GAMEPAD_BUTTON_LEFT_FACE_LEFT,
633638

634-
// This is normally a DPAD
639+
// This normally corresponds with PlayStation and Xbox controllers
640+
// XBOX: [Y,X,A,B]
641+
// PS3: [Triangle,Square,Cross,Circle]
642+
// No support for 6 button controllers though..
635643
GAMEPAD_BUTTON_RIGHT_FACE_UP,
636644
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT,
637645
GAMEPAD_BUTTON_RIGHT_FACE_DOWN,
@@ -912,6 +920,7 @@ RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a r
912920
RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix)
913921
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Returns camera 2d transform matrix
914922
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position
923+
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Returns size position for a 3d world space position
915924
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Returns the screen space position for a 2d camera world space position
916925
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Returns the world space position for a 2d camera screen space position
917926

@@ -975,8 +984,8 @@ RLAPI bool IsKeyPressed(int key); // Detect if a key
975984
RLAPI bool IsKeyDown(int key); // Detect if a key is being pressed
976985
RLAPI bool IsKeyReleased(int key); // Detect if a key has been released once
977986
RLAPI bool IsKeyUp(int key); // Detect if a key is NOT being pressed
978-
RLAPI int GetKeyPressed(void); // Get latest key pressed
979987
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
988+
RLAPI int GetKeyPressed(void); // Get key pressed, call it multiple times for chars queued
980989

981990
// Input-related functions: gamepads
982991
RLAPI bool IsGamepadAvailable(int gamepad); // Detect if a gamepad is available
@@ -1050,6 +1059,8 @@ RLAPI void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, i
10501059
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
10511060
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
10521061
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
1062+
RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
1063+
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
10531064
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring
10541065
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color); // Draw ring outline
10551066
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
@@ -1068,6 +1079,7 @@ RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color);
10681079
RLAPI void DrawTriangleFan(Vector2 *points, int numPoints, Color color); // Draw a triangle fan defined by points (first vertex is the center)
10691080
RLAPI void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color); // Draw a triangle strip defined by points
10701081
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
1082+
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
10711083

10721084
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Define default texture used to draw shapes
10731085

@@ -1183,15 +1195,17 @@ RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color co
11831195
RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
11841196
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
11851197
RLAPI void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint,
1186-
int selectStart, int selectLength, Color selectText, Color selectBack); // Draw text using font inside rectangle limits with support for text selection
1198+
int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection
1199+
RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float scale, Color tint); // Draw one character (codepoint)
11871200

11881201
// Text misc. functions
11891202
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
11901203
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
1191-
RLAPI int GetGlyphIndex(Font font, int character); // Get index position for a unicode character on font
1204+
RLAPI int GetGlyphIndex(Font font, int codepoint); // Get index position for a unicode character on font
11921205

11931206
// Text strings management functions (no utf8 strings, only byte chars)
11941207
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
1208+
RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
11951209
RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
11961210
RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
11971211
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf style)
@@ -1220,6 +1234,7 @@ RLAPI const char *CodepointToUtf8(int codepoint, int *byteLength); // Encode
12201234

12211235
// Basic geometric 3D shapes drawing functions
12221236
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
1237+
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
12231238
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
12241239
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
12251240
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
@@ -1328,7 +1343,7 @@ RLAPI Matrix GetMatrixProjection(void); // Get
13281343

13291344
// Texture maps generation (PBR)
13301345
// NOTE: Required shaders should be provided
1331-
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D skyHDR, int size); // Generate cubemap texture from HDR texture
1346+
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size); // Generate cubemap texture from 2D texture
13321347
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
13331348
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
13341349
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture

0 commit comments

Comments
 (0)