From b0da3164415ec7ef17650dbb4f3b783f601519e5 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 16 Oct 2024 02:30:45 +0100 Subject: [PATCH] try --- raylib/build.py | 17 +++-- raylib/raylib.h.modified | 132 +++++++++++++++----------------------- raylib/raymath.h.modified | 44 +++---------- raylib/rlgl.h.modified | 81 +++++++++-------------- setup.py | 7 +- 5 files changed, 105 insertions(+), 176 deletions(-) diff --git a/raylib/build.py b/raylib/build.py index d92b41d..9124d6f 100644 --- a/raylib/build.py +++ b/raylib/build.py @@ -26,7 +26,6 @@ import time RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop") -USE_SDL2 = True if RAYLIB_PLATFORM == "SDL" else False def check_raylib_installed(): return subprocess.run(['pkg-config', '--exists', 'raylib'], text=True, stdout=subprocess.PIPE).returncode == 0 @@ -108,7 +107,7 @@ def build_unix(): if not check_raylib_installed(): raise Exception("ERROR: raylib not found by pkg-config. Please install pkg-config and Raylib.") - if USE_SDL2 and not check_SDL_installed(): + if RAYLIB_PLATFORM=="SDL" and not check_SDL_installed(): raise Exception("ERROR: SDL2 not found by pkg-config. Please install pkg-config and SDL2.") raylib_h = get_the_include_path() + "/raylib.h" @@ -131,7 +130,7 @@ def build_unix(): """ glfw3_h = get_the_include_path() + "/GLFW/glfw3.h" - if not USE_SDL2 and check_header_exists(glfw3_h): + if RAYLIB_PLATFORM=="Desktop" and check_header_exists(glfw3_h): ffi_includes += """ #include "GLFW/glfw3.h" """ @@ -159,7 +158,7 @@ def build_unix(): ffibuilder.cdef(pre_process_header(raygui_h)) if os.path.isfile(physac_h): ffibuilder.cdef(pre_process_header(physac_h)) - if not USE_SDL2 and os.path.isfile(glfw3_h): + if RAYLIB_PLATFORM=="Desktop" and os.path.isfile(glfw3_h): ffibuilder.cdef(pre_process_header(glfw3_h)) @@ -168,7 +167,7 @@ def build_unix(): extra_link_args = [get_the_lib_path() + '/libraylib.a', '-framework', 'OpenGL', '-framework', 'Cocoa', '-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework', 'CoreVideo'] - if USE_SDL2: + if RAYLIB_PLATFORM=="SDL": extra_link_args += ['/usr/local/lib/libSDL2.a', '-framework', 'CoreHaptics', '-framework', 'ForceFeedback', '-framework', 'GameController'] libraries = [] @@ -177,7 +176,7 @@ def build_unix(): print("BUILDING FOR LINUX") extra_link_args = get_lib_flags() + [ '-lm', '-lpthread', '-lGL', '-lrt', '-lm', '-ldl', '-lX11', '-lpthread', '-latomic'] - if USE_SDL2: + if RAYLIB_PLATFORM=="SDL": extra_link_args += ['-lSDL2'] extra_compile_args = ["-Wno-incompatible-pointer-types", "-D_CFFI_NO_LIMITED_API"] libraries = [] # Not sure why but we put them in extra_link_args instead so *shouldnt* be needed here @@ -198,7 +197,7 @@ def build_unix(): def build_windows(): print("BUILDING FOR WINDOWS") ffibuilder.cdef(open("raylib/raylib.h.modified").read()) - if not USE_SDL2: + if RAYLIB_PLATFORM=="Desktop": ffibuilder.cdef(open("raylib/glfw3.h.modified").read()) ffibuilder.cdef(open("raylib/rlgl.h.modified").read()) ffibuilder.cdef(open("raylib/raygui.h.modified").read()) @@ -211,7 +210,7 @@ def build_windows(): #include "raymath.h" """ - if not USE_SDL2: + if RAYLIB_PLATFORM=="Desktop": ffi_includes += """ #include "GLFW/glfw3.h" """ @@ -224,7 +223,7 @@ def build_windows(): #include "physac.h" """ libraries = ['raylib', 'gdi32', 'shell32', 'user32', 'OpenGL32', 'winmm'] - if USE_SDL2: + if RAYLIB_PLATFORM=="SDL": libraries += ['SDL2'] print("libraries: "+str(libraries)) diff --git a/raylib/raylib.h.modified b/raylib/raylib.h.modified index 832e0e3..158519a 100644 --- a/raylib/raylib.h.modified +++ b/raylib/raylib.h.modified @@ -1,6 +1,6 @@ /********************************************************************************************** * -* raylib v5.5-dev - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com) +* raylib v5.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com) * * FEATURES: * - NO external dependencies, all required libraries included with raylib @@ -57,7 +57,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-2024 Ramon Santamaria (@raysan5) +* Copyright (c) 2013-2023 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. @@ -75,9 +75,8 @@ * 3. This notice may not be removed or altered from any source distribution. * **********************************************************************************************/ -// Function specifiers in case library is build/used as a shared library +// Function specifiers in case library is build/used as a shared library (Windows) // NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll -// NOTE: visibility("default") attribute makes symbols "visible" when compiled with -fvisibility=hidden //---------------------------------------------------------------------------------- // Some basic Defines //---------------------------------------------------------------------------------- @@ -225,10 +224,8 @@ typedef struct Mesh { // Animation vertex data float *animVertices; // Animated vertex positions (after bones transformations) float *animNormals; // Animated normals (after bones transformations) - unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6) - float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7) - Matrix *boneMatrices; // Bones animated transformation matrices - int boneCount; // Number of bones + unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) + float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning) // OpenGL identifiers unsigned int vaoId; // OpenGL Vertex Array Object id unsigned int *vboId; // OpenGL Vertex Buffer Objects id (default vertex data) @@ -285,7 +282,7 @@ typedef struct ModelAnimation { // Ray, ray for raycasting typedef struct Ray { Vector3 position; // Ray position (origin) - Vector3 direction; // Ray direction (normalized) + Vector3 direction; // Ray direction } Ray; // RayCollision, ray hit information typedef struct RayCollision { @@ -338,6 +335,7 @@ typedef struct VrDeviceInfo { int vResolution; // Vertical resolution in pixels float hScreenSize; // Horizontal size in meters float vScreenSize; // Vertical size in meters + float vScreenCenter; // Screen center in meters float eyeToScreenDistance; // Distance between eye and display in meters float lensSeparationDistance; // Lens separation distance in meters float interpupillaryDistance; // IPD (distance between pupils) in meters @@ -524,7 +522,7 @@ typedef enum { KEY_KP_EQUAL = 336, // Key: Keypad = // Android key buttons KEY_BACK = 4, // Key: Android back button - KEY_MENU = 5, // Key: Android menu button + KEY_MENU = 82, // Key: Android menu button KEY_VOLUME_UP = 24, // Key: Android volume up button KEY_VOLUME_DOWN = 25 // Key: Android volume down button } KeyboardKey; @@ -561,12 +559,12 @@ typedef enum { GAMEPAD_BUTTON_LEFT_FACE_DOWN, // Gamepad left DPAD down button GAMEPAD_BUTTON_LEFT_FACE_LEFT, // Gamepad left DPAD left button GAMEPAD_BUTTON_RIGHT_FACE_UP, // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y) - GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Circle, Xbox: B) + GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Square, Xbox: X) GAMEPAD_BUTTON_RIGHT_FACE_DOWN, // Gamepad right button down (i.e. PS3: Cross, Xbox: A) - GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Square, Xbox: X) + GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Circle, Xbox: B) GAMEPAD_BUTTON_LEFT_TRIGGER_1, // Gamepad top/back trigger left (first), it could be a trailing button GAMEPAD_BUTTON_LEFT_TRIGGER_2, // Gamepad top/back trigger left (second), it could be a trailing button - GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (first), it could be a trailing button + GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (one), it could be a trailing button GAMEPAD_BUTTON_RIGHT_TRIGGER_2, // Gamepad top/back trigger right (second), it could be a trailing button GAMEPAD_BUTTON_MIDDLE_LEFT, // Gamepad center buttons, left one (i.e. PS3: Select) GAMEPAD_BUTTON_MIDDLE, // Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX) @@ -624,10 +622,7 @@ typedef enum { SHADER_LOC_MAP_CUBEMAP, // Shader location: samplerCube texture: cubemap SHADER_LOC_MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance SHADER_LOC_MAP_PREFILTER, // Shader location: samplerCube texture: prefilter - SHADER_LOC_MAP_BRDF, // Shader location: sampler2d texture: brdf - SHADER_LOC_VERTEX_BONEIDS, // Shader location: vertex attribute: boneIds - SHADER_LOC_VERTEX_BONEWEIGHTS, // Shader location: vertex attribute: boneWeights - SHADER_LOC_BONE_MATRICES // Shader location: array of matrices uniform: boneMatrices + SHADER_LOC_MAP_BRDF // Shader location: sampler2d texture: brdf } ShaderLocationIndex; // Shader uniform data type typedef enum { @@ -737,11 +732,11 @@ typedef enum { } Gesture; // Camera system modes typedef enum { - CAMERA_CUSTOM = 0, // Camera custom, controlled by user (UpdateCamera() does nothing) - CAMERA_FREE, // Camera free mode - CAMERA_ORBITAL, // Camera orbital, around target, zoom supported - CAMERA_FIRST_PERSON, // Camera first person - CAMERA_THIRD_PERSON // Camera third person + CAMERA_CUSTOM = 0, // Custom camera + CAMERA_FREE, // Free camera + CAMERA_ORBITAL, // Orbital camera + CAMERA_FIRST_PERSON, // First person camera + CAMERA_THIRD_PERSON // Third person camera } CameraMode; // Camera projection typedef enum { @@ -755,7 +750,7 @@ typedef enum { NPATCH_THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles } NPatchLayout; // Callbacks to hook some internal functions -// WARNING: These callbacks are intended for advanced users +// WARNING: These callbacks are intended for advance users typedef void (*TraceLogCallback)(int logLevel, const char *text, void * args); // Logging: Redirect trace log messages typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data @@ -782,8 +777,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP) void ClearWindowState(unsigned int flags); // Clear window configuration state flags - void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP) - void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP) + void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP) + void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed (only PLATFORM_DESKTOP) void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP) void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP) void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP) @@ -858,21 +853,20 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d) void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) // Screen-space-related functions - Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse) - Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport + Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Get a ray trace from mouse position + Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix) + Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position + Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position - Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position - Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix) - Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix // Timing-related functions void SetTargetFPS(int fps); // Set target FPS (maximum) float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time) double GetTime(void); // Get elapsed time in seconds since InitWindow() int GetFPS(void); // Get current FPS // Custom frame control functions -// NOTE: Those functions are intended for advanced users that want full control over the frame processing +// NOTE: Those functions are intended for advance users that want full control over the frame processing // By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents() // To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing) @@ -895,7 +889,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator void MemFree(void *ptr); // Internal memory free // Set custom callbacks -// WARNING: Callbacks setup is intended for advanced users +// WARNING: Callbacks setup is intended for advance users void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver @@ -924,9 +918,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string) bool ChangeDirectory(const char *dir); // Change working directory, return true on success bool IsPathFile(const char *path); // Check if a given path is a file or a directory - bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths - FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result + FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan void UnloadDirectoryFiles(FilePathList files); // Unload filepaths bool IsFileDropped(void); // Check if a file has been dropped into window FilePathList LoadDroppedFiles(void); // Load dropped filepaths @@ -939,7 +932,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree() // Automation events functionality AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS - void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file + void UnloadAutomationEventList(AutomationEventList *list); // Unload automation events list from file bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording @@ -969,7 +962,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB) - void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor); // Set gamepad vibration for both motors // Input-related functions: mouse bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed @@ -1014,20 +1006,18 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI // NOTE: It can be useful when using basic shapes and one single font, // defining a font char white rectangle would allow drawing everything in a single draw call void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing - Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing - Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing // Basic shapes drawing functions void DrawPixel(int posX, int posY, Color color); // Draw a pixel void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines) void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads) - void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines) + void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines) void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline - void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer); // Draw a gradient-filled circle + void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version) @@ -1039,27 +1029,26 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters - void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle - void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle - void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color topRight, Color bottomRight); // Draw a gradient-filled rectangle with custom vertex colors + void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle + void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle + void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges - void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges - void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline + void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!) void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!) - void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center) - void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points + void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center) + void DrawTriangleStrip(Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version) void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters // Splines drawing functions - void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points - void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points - void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points - void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...] - void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...] + void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points + void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points + void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points + void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...] + void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...] void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points @@ -1078,10 +1067,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle - bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices + bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] - bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2] Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision //------------------------------------------------------------------------------------ // Texture Loading and Drawing Functions (Module: textures) @@ -1092,7 +1080,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data Image LoadImageSvg(const char *fileNameOrString, int width, int height); // Load image from SVG file data or string with specified size Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data) - Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int *frames); // Load image sequence from memory buffer Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png' Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot) @@ -1114,7 +1101,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI // Image manipulation functions Image ImageCopy(Image image); // Create an image duplicate (useful for transformations) Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece - Image ImageFromChannel(Image image, int selectedChannel); // Create an image from a selected channel of another image (GRAYSCALE) Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font) Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font) void ImageFormat(Image *image, int newFormat); // Convert image data to desired format @@ -1125,7 +1111,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation - void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm) void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm) void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color @@ -1155,7 +1140,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version) void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version) - void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness within an image void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version) void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image @@ -1164,11 +1148,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version) void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image - void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image - void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image - void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image - void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center) - void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination) void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination) @@ -1196,9 +1175,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely // Color/pixel related functions - bool ColorIsEqual(Color col1, Color col2); // Check if two colors are equal Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f - int ColorToInt(Color color); // Get hexadecimal value for a Color (0xRRGGBBAA) + int ColorToInt(Color color); // Get hexadecimal value for a Color Vector4 ColorNormalize(Color color); // Get Color normalized as float [0..1] Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1] Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1] @@ -1208,7 +1186,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI Color ColorContrast(Color color, float contrast); // Get color with contrast correction, contrast values between -1.0f and 1.0f Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint - Color ColorLerp(Color color1, Color color2, float factor); // Get color lerp interpolation between two colors, factor [0.0f..1.0f] Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer @@ -1219,7 +1196,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI // Font loading/unloading functions Font GetFontDefault(void); // Get the default Font Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM) - Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height + Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style) Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf' bool IsFontReady(Font font); // Check if a font is ready @@ -1259,7 +1236,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style) const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string - char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!) + char *TextReplace(char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!) char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!) const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings @@ -1268,10 +1245,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI const char *TextToUpper(const char *text); // Get upper case version of provided string const char *TextToLower(const char *text); // Get lower case version of provided string const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string - const char *TextToSnake(const char *text); // Get Snake case notation version of provided string - const char *TextToCamel(const char *text); // Get Camel case notation version of provided string int TextToInteger(const char *text); // Get integer value from text (negative values not supported) - float TextToFloat(const char *text); // Get float value from text (negative values not supported) //------------------------------------------------------------------------------------ // Basic 3d Shapes Drawing Functions (Module: models) //------------------------------------------------------------------------------------ @@ -1280,7 +1254,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!) - void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points + void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version) void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires @@ -1311,10 +1285,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters - void DrawModelPoints(Model model, Vector3 position, float scale, Color tint); // Draw a model as points - void DrawModelPointsEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model as points with extended parameters void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) - void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture + void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation // Mesh management functions @@ -1323,10 +1295,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void UnloadMesh(Mesh mesh); // Unload mesh data from CPU and GPU void DrawMesh(Mesh mesh, Material material, Matrix transform); // Draw a 3d mesh with material and transform void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, int instances); // Draw multiple mesh instances with material and different transforms + bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits void GenMeshTangents(Mesh *mesh); // Compute mesh tangents - bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success - bool ExportMeshAsCode(Mesh mesh, const char *fileName); // Export mesh as code file (.h) defining multiple arrays of vertex attributes // Mesh generation functions Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh Mesh GenMeshPlane(float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions) @@ -1352,7 +1323,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match - void UpdateModelAnimationBoneMatrices(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices // Collision detection functions bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes @@ -1396,7 +1366,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames); void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level) void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center) Wave WaveCopy(Wave wave); // Copy a wave to a new wave - void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range + void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples() @@ -1433,7 +1403,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames); void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered) void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data - void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as 'float' + void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as s void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream - void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as 'float' + void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as s void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline \ No newline at end of file diff --git a/raylib/raymath.h.modified b/raylib/raymath.h.modified index dc0dabf..f13964b 100644 --- a/raylib/raymath.h.modified +++ b/raylib/raymath.h.modified @@ -29,7 +29,7 @@ * * LICENSE: zlib/libpng * -* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5) +* Copyright (c) 2015-2023 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. @@ -99,21 +99,14 @@ inline /* Functions may be inlined or external definition used*/ Vector2 Vector2 inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Normalize(Vector2 v);// Transforms a Vector2 by a given Matrix inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Transform(Vector2 v, Matrix mat);// Calculate linear interpolation between two vectors inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount);// Calculate reflected vector to normal -inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Reflect(Vector2 v, Vector2 normal);// Get min value for each pair of components -inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Min(Vector2 v1, Vector2 v2);// Get max value for each pair of components -inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Max(Vector2 v1, Vector2 v2);// Rotate vector by angle +inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Reflect(Vector2 v, Vector2 normal);// Rotate vector by angle inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Rotate(Vector2 v, float angle);// Move Vector towards target inline /* Functions may be inlined or external definition used*/ Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance);// Invert the given vector inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Invert(Vector2 v);// Clamp the components of the vector between // min and max values specified by the given vectors inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max);// Clamp the magnitude of the vector between two min and max values inline /* Functions may be inlined or external definition used*/ Vector2 Vector2ClampValue(Vector2 v, float min, float max);// Check whether two given vectors are almost equal -inline /* Functions may be inlined or external definition used*/ int Vector2Equals(Vector2 p, Vector2 q);// Compute the direction of a refracted ray -// v: normalized direction of the incoming ray -// n: normalized normal vector of the interface of two optical media -// r: ratio of the refractive index of the medium from where the ray comes -// to the refractive index of the medium on the other side of the surface -inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Refract(Vector2 v, Vector2 n, float r);//---------------------------------------------------------------------------------- +inline /* Functions may be inlined or external definition used*/ int Vector2Equals(Vector2 p, Vector2 q);//---------------------------------------------------------------------------------- // Module Functions Definition - Vector3 math //---------------------------------------------------------------------------------- // Vector with components value 0.0f @@ -143,11 +136,8 @@ inline /* Functions may be inlined or external definition used*/ Vector3 Vector3 inline /* Functions may be inlined or external definition used*/ void Vector3OrthoNormalize(Vector3 *v1, Vector3 *v2);// Transforms a Vector3 by a given Matrix inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Transform(Vector3 v, Matrix mat);// Transform a vector by quaternion rotation inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q);// Rotates a vector around an axis -inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);// Move Vector towards target -inline /* Functions may be inlined or external definition used*/ Vector3 Vector3MoveTowards(Vector3 v, Vector3 target, float maxDistance);// Calculate linear interpolation between two vectors -inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);// Calculate cubic hermite interpolation between two vectors and their tangents -// as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic -inline /* Functions may be inlined or external definition used*/ Vector3 Vector3CubicHermite(Vector3 v1, Vector3 tangent1, Vector3 v2, Vector3 tangent2, float amount);// Calculate reflected vector to normal +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle);// Calculate linear interpolation between two vectors +inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount);// Calculate reflected vector to normal inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Reflect(Vector3 v, Vector3 normal);// Get min value for each pair of components inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Min(Vector3 v1, Vector3 v2);// Get max value for each pair of components inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Max(Vector3 v1, Vector3 v2);// Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c) @@ -166,21 +156,6 @@ inline /* Functions may be inlined or external definition used*/ int Vector3Equa // r: ratio of the refractive index of the medium from where the ray comes // to the refractive index of the medium on the other side of the surface inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Refract(Vector3 v, Vector3 n, float r);//---------------------------------------------------------------------------------- -// Module Functions Definition - Vector4 math -//---------------------------------------------------------------------------------- -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Zero(void);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4One(void);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Add(Vector4 v1, Vector4 v2);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4AddValue(Vector4 v, float add);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Subtract(Vector4 v1, Vector4 v2);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4SubtractValue(Vector4 v, float add);inline /* Functions may be inlined or external definition used*/ float Vector4Length(Vector4 v);inline /* Functions may be inlined or external definition used*/ float Vector4LengthSqr(Vector4 v);inline /* Functions may be inlined or external definition used*/ float Vector4DotProduct(Vector4 v1, Vector4 v2);// Calculate distance between two vectors -inline /* Functions may be inlined or external definition used*/ float Vector4Distance(Vector4 v1, Vector4 v2);// Calculate square distance between two vectors -inline /* Functions may be inlined or external definition used*/ float Vector4DistanceSqr(Vector4 v1, Vector4 v2);inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Scale(Vector4 v, float scale);// Multiply vector by vector -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Multiply(Vector4 v1, Vector4 v2);// Negate vector -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Negate(Vector4 v);// Divide vector by vector -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Divide(Vector4 v1, Vector4 v2);// Normalize provided vector -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Normalize(Vector4 v);// Get min value for each pair of components -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Min(Vector4 v1, Vector4 v2);// Get max value for each pair of components -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Max(Vector4 v1, Vector4 v2);// Calculate linear interpolation between two vectors -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Lerp(Vector4 v1, Vector4 v2, float amount);// Move Vector towards target -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4MoveTowards(Vector4 v, Vector4 target, float maxDistance);// Invert the given vector -inline /* Functions may be inlined or external definition used*/ Vector4 Vector4Invert(Vector4 v);// Check whether two given vectors are almost equal -inline /* Functions may be inlined or external definition used*/ int Vector4Equals(Vector4 p, Vector4 q);//---------------------------------------------------------------------------------- // Module Functions Definition - Matrix math //---------------------------------------------------------------------------------- // Compute matrix determinant @@ -207,7 +182,7 @@ inline /* Functions may be inlined or external definition used*/ Matrix MatrixRo // NOTE: Angle must be provided in radians inline /* Functions may be inlined or external definition used*/ Matrix MatrixRotateZYX(Vector3 angle);// Get scaling matrix inline /* Functions may be inlined or external definition used*/ Matrix MatrixScale(float x, float y, float z);// Get perspective projection matrix -inline /* Functions may be inlined or external definition used*/ Matrix MatrixFrustum(double left, double right, double bottom, double top, double nearPlane, double farPlane);// Get perspective projection matrix +inline /* Functions may be inlined or external definition used*/ Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far);// Get perspective projection matrix // NOTE: Fovy angle must be provided in radians inline /* Functions may be inlined or external definition used*/ Matrix MatrixPerspective(double fovY, double aspect, double nearPlane, double farPlane);// Get orthographic projection matrix inline /* Functions may be inlined or external definition used*/ Matrix MatrixOrtho(double left, double right, double bottom, double top, double nearPlane, double farPlane);// Get camera look-at matrix (view matrix) @@ -229,9 +204,7 @@ inline /* Functions may be inlined or external definition used*/ Quaternion Quat inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionDivide(Quaternion q1, Quaternion q2);// Calculate linear interpolation between two quaternions inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount);// Calculate slerp-optimized interpolation between two quaternions inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount);// Calculates spherical linear interpolation between two quaternions -inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);// Calculate quaternion cubic spline interpolation using Cubic Hermite Spline algorithm -// as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic -inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionCubicHermiteSpline(Quaternion q1, Quaternion outTangent1, Quaternion q2, Quaternion inTangent2, float t);// Calculate quaternion based on the rotation from one vector to another +inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount);// Calculate quaternion based on the rotation from one vector to another inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to);// Get a quaternion for a given rotation matrix inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionFromMatrix(Matrix mat);// Get a matrix for a given quaternion inline /* Functions may be inlined or external definition used*/ Matrix QuaternionToMatrix(Quaternion q);// Get rotation quaternion for an angle and axis @@ -243,5 +216,4 @@ inline /* Functions may be inlined or external definition used*/ Quaternion Quat // NOTE: Angles are returned in a Vector3 struct in radians inline /* Functions may be inlined or external definition used*/ Vector3 QuaternionToEuler(Quaternion q);// Transform a quaternion given a transformation matrix inline /* Functions may be inlined or external definition used*/ Quaternion QuaternionTransform(Quaternion q, Matrix mat);// Check whether two given quaternions are almost equal -inline /* Functions may be inlined or external definition used*/ int QuaternionEquals(Quaternion p, Quaternion q);// Decompose a transformation matrix into its rotational, translational and scaling components -inline /* Functions may be inlined or external definition used*/ void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotation, Vector3 *scale); \ No newline at end of file +inline /* Functions may be inlined or external definition used*/ int QuaternionEquals(Quaternion p, Quaternion q); \ No newline at end of file diff --git a/raylib/rlgl.h.modified b/raylib/rlgl.h.modified index 2e34841..8af04cf 100644 --- a/raylib/rlgl.h.modified +++ b/raylib/rlgl.h.modified @@ -1,6 +1,6 @@ /********************************************************************************************** * -* rlgl v5.0 - A multi-OpenGL abstraction layer with an immediate-mode style API +* rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API * * DESCRIPTION: * An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0) @@ -62,21 +62,18 @@ * When loading a shader, the following vertex attributes and uniform * location names are tried to be set automatically: * -* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION -* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD -* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL -* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR -* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT -* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 -* #define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEIDS "vertexBoneIds" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS -* #define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS "vertexBoneWeights" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS +* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: 0 +* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: 1 +* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: 2 +* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: 3 +* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: 4 +* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: 5 * #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix * #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix * #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix * #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix -* #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView))) +* #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView)) * #define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color) -* #define RL_DEFAULT_SHADER_UNIFORM_NAME_BONE_MATRICES "boneMatrices" // bone matrices * #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0) * #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1) * #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2) @@ -88,7 +85,7 @@ * * LICENSE: zlib/libpng * -* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5) +* Copyright (c) 2014-2023 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. @@ -106,9 +103,8 @@ * 3. This notice may not be removed or altered from any source distribution. * **********************************************************************************************/ -// Function specifiers in case library is build/used as a shared library +// Function specifiers in case library is build/used as a shared library (Windows) // NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll -// NOTE: visibility(default) attribute makes symbols "visible" when compiled with -fvisibility=hidden // Function specifiers definition // Support TRACELOG macros // Allow custom memory allocators @@ -137,7 +133,6 @@ // GL Shader type // GL blending factors // GL blending functions/equations -// Default shader vertex attribute locations //---------------------------------------------------------------------------------- // Types and Structures Definition //---------------------------------------------------------------------------------- @@ -146,11 +141,10 @@ typedef struct rlVertexBuffer { int elementCount; // Number of elements in the buffer (QUADS) float *vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0) float *texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) - float *normals; // Vertex normal (XYZ - 3 components per vertex) (shader-location = 2) unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) unsigned int *indices; // Vertex indices (in case vertex data comes indexed) (6 indices per quad) unsigned int vaoId; // OpenGL Vertex Array Object id - unsigned int vboId[5]; // OpenGL Vertex Buffer Objects id (5 types of vertex data) + unsigned int vboId[4]; // OpenGL Vertex Buffer Objects id (4 types of vertex data) } rlVertexBuffer; // Draw call type // NOTE: Only texture changes register a new draw, other state-change-related elements are not @@ -285,10 +279,6 @@ typedef enum { RL_SHADER_UNIFORM_IVEC2, // Shader uniform type: ivec2 (2 int) RL_SHADER_UNIFORM_IVEC3, // Shader uniform type: ivec3 (3 int) RL_SHADER_UNIFORM_IVEC4, // Shader uniform type: ivec4 (4 int) - RL_SHADER_UNIFORM_UINT, // Shader uniform type: unsigned int - RL_SHADER_UNIFORM_UIVEC2, // Shader uniform type: uivec2 (2 unsigned int) - RL_SHADER_UNIFORM_UIVEC3, // Shader uniform type: uivec3 (3 unsigned int) - RL_SHADER_UNIFORM_UIVEC4, // Shader uniform type: uivec4 (4 unsigned int) RL_SHADER_UNIFORM_SAMPLER2D // Shader uniform type: sampler2d } rlShaderUniformDataType; // Shader attribute data types @@ -342,9 +332,6 @@ typedef enum { void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar); void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar); void rlViewport(int x, int y, int width, int height); // Set the viewport area - void rlSetClipPlanes(double nearPlane, double farPlane); // Set clip planes distances - double rlGetCullDistanceNear(void); // Get cull plane distance near - double rlGetCullDistanceFar(void); // Get cull plane distance far //------------------------------------------------------------------------------------ // Functions Declaration - Vertex level operations //------------------------------------------------------------------------------------ @@ -368,10 +355,10 @@ typedef enum { void rlDisableVertexArray(void); // Disable vertex array (VAO, if supported) void rlEnableVertexBuffer(unsigned int id); // Enable vertex buffer (VBO) void rlDisableVertexBuffer(void); // Disable vertex buffer (VBO) - void rlEnableVertexBufferElement(unsigned int id); // Enable vertex buffer element (VBO element) + void rlEnableVertexBufferElement(unsigned int id);// Enable vertex buffer element (VBO element) void rlDisableVertexBufferElement(void); // Disable vertex buffer element (VBO element) void rlEnableVertexAttribute(unsigned int index); // Enable vertex attribute index - void rlDisableVertexAttribute(unsigned int index); // Disable vertex attribute index + void rlDisableVertexAttribute(unsigned int index);// Disable vertex attribute index // Textures state void rlActiveTextureSlot(int slot); // Select and active a texture slot void rlEnableTexture(unsigned int id); // Enable texture @@ -386,10 +373,8 @@ typedef enum { // Framebuffer state void rlEnableFramebuffer(unsigned int id); // Enable render texture (fbo) void rlDisableFramebuffer(void); // Disable render texture (fbo), return to default framebuffer - unsigned int rlGetActiveFramebuffer(void); // Get the currently active render texture (fbo), 0 for default framebuffer void rlActiveDrawBuffers(int count); // Activate multiple draw color buffers void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask); // Blit active framebuffer to main framebuffer - void rlBindFramebuffer(unsigned int target, unsigned int framebuffer); // Bind framebuffer (FBO) // General render state void rlEnableColorBlend(void); // Enable color blending void rlDisableColorBlend(void); // Disable color blending @@ -399,14 +384,13 @@ typedef enum { void rlDisableDepthMask(void); // Disable depth write void rlEnableBackfaceCulling(void); // Enable backface culling void rlDisableBackfaceCulling(void); // Disable backface culling - void rlColorMask(bool r, bool g, bool b, bool a); // Color mask control void rlSetCullFace(int mode); // Set face culling mode void rlEnableScissorTest(void); // Enable scissor test void rlDisableScissorTest(void); // Disable scissor test void rlScissor(int x, int y, int width, int height); // Scissor test void rlEnableWireMode(void); // Enable wire mode - void rlEnablePointMode(void); // Enable point mode - void rlDisableWireMode(void); // Disable wire (and point) mode + void rlEnablePointMode(void); // Enable point mode + void rlDisableWireMode(void); // Disable wire mode ( and point ) maybe rename void rlSetLineWidth(float width); // Set the line drawing width float rlGetLineWidth(void); // Get the line drawing width void rlEnableSmoothLines(void); // Enable line aliasing @@ -448,24 +432,24 @@ typedef enum { //------------------------------------------------------------------------------------------------------------------------ // Vertex buffers management unsigned int rlLoadVertexArray(void); // Load vertex array (vao) if supported - unsigned int rlLoadVertexBuffer(const void *buffer, int size, bool dynamic); // Load a vertex buffer object - unsigned int rlLoadVertexBufferElement(const void *buffer, int size, bool dynamic); // Load vertex buffer elements object - void rlUpdateVertexBuffer(unsigned int bufferId, const void *data, int dataSize, int offset); // Update vertex buffer object data on GPU buffer - void rlUpdateVertexBufferElements(unsigned int id, const void *data, int dataSize, int offset); // Update vertex buffer elements data on GPU buffer - void rlUnloadVertexArray(unsigned int vaoId); // Unload vertex array (vao) - void rlUnloadVertexBuffer(unsigned int vboId); // Unload vertex buffer object - void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, int offset); // Set vertex attribute data configuration - void rlSetVertexAttributeDivisor(unsigned int index, int divisor); // Set vertex attribute data divisor - void rlSetVertexAttributeDefault(int locIndex, const void *value, int attribType, int count); // Set vertex attribute default value, when attribute to provided - void rlDrawVertexArray(int offset, int count); // Draw vertex array (currently active vao) - void rlDrawVertexArrayElements(int offset, int count, const void *buffer); // Draw vertex array elements - void rlDrawVertexArrayInstanced(int offset, int count, int instances); // Draw vertex array (currently active vao) with instancing - void rlDrawVertexArrayElementsInstanced(int offset, int count, const void *buffer, int instances); // Draw vertex array elements with instancing + unsigned int rlLoadVertexBuffer(const void *buffer, int size, bool dynamic); // Load a vertex buffer attribute + unsigned int rlLoadVertexBufferElement(const void *buffer, int size, bool dynamic); // Load a new attributes element buffer + void rlUpdateVertexBuffer(unsigned int bufferId, const void *data, int dataSize, int offset); // Update GPU buffer with new data + void rlUpdateVertexBufferElements(unsigned int id, const void *data, int dataSize, int offset); // Update vertex buffer elements with new data + void rlUnloadVertexArray(unsigned int vaoId); + void rlUnloadVertexBuffer(unsigned int vboId); + void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, const void *pointer); + void rlSetVertexAttributeDivisor(unsigned int index, int divisor); + void rlSetVertexAttributeDefault(int locIndex, const void *value, int attribType, int count); // Set vertex attribute default value + void rlDrawVertexArray(int offset, int count); + void rlDrawVertexArrayElements(int offset, int count, const void *buffer); + void rlDrawVertexArrayInstanced(int offset, int count, int instances); + void rlDrawVertexArrayElementsInstanced(int offset, int count, const void *buffer, int instances); // Textures management - unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount); // Load texture data + unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount); // Load texture in GPU unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer); // Load depth texture/renderbuffer (to be attached to fbo) - unsigned int rlLoadTextureCubemap(const void *data, int size, int format); // Load texture cubemap data - void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data); // Update texture with new data on GPU + unsigned int rlLoadTextureCubemap(const void *data, int size, int format); // Load texture cubemap + void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data); // Update GPU texture with new data void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType); // Get OpenGL internal formats const char *rlGetPixelFormatName(unsigned int format); // Get name string for pixel format void rlUnloadTexture(unsigned int id); // Unload texture from GPU memory @@ -473,7 +457,7 @@ typedef enum { void *rlReadTexturePixels(unsigned int id, int width, int height, int format); // Read texture pixel data unsigned char *rlReadScreenPixels(int width, int height); // Read screen pixel data (color buffer) // Framebuffer management (fbo) - unsigned int rlLoadFramebuffer(void); // Load an empty framebuffer + unsigned int rlLoadFramebuffer(int width, int height); // Load an empty framebuffer void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType, int texType, int mipLevel); // Attach texture/renderbuffer to a framebuffer bool rlFramebufferComplete(unsigned int id); // Verify framebuffer is complete void rlUnloadFramebuffer(unsigned int id); // Delete framebuffer from GPU @@ -486,7 +470,6 @@ typedef enum { int rlGetLocationAttrib(unsigned int shaderId, const char *attribName); // Get shader location attribute void rlSetUniform(int locIndex, const void *value, int uniformType, int count); // Set shader value uniform void rlSetUniformMatrix(int locIndex, Matrix mat); // Set shader value matrix - void rlSetUniformMatrices(int locIndex, const Matrix *mat, int count); // Set shader value matrices void rlSetUniformSampler(int locIndex, unsigned int textureId); // Set shader value sampler void rlSetShader(unsigned int id, int *locs); // Set shader currently active (id and locations) // Compute shader management diff --git a/setup.py b/setup.py index 250a9fb..7711c37 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,12 @@ VERSION = (HERE / "version.py").read_text().split()[-1].strip("\"'") RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop") -NAME = "raylib_sdl" if RAYLIB_PLATFORM == "SDL" else "raylib" +if RAYLIB_PLATFORM == "SDL": + NAME = "raylib_sdl" +elif RAYLIB_PLATFORM == "DRM": + NAME = "raylib_drm" +else: + NAME = "raylib" class BinaryDistribution(Distribution): """Distribution which always forces a binary package with platform name"""