]> git.sesse.net Git - pistorm/commitdiff
Update Pi4 raylib dependencies
authorbeeanyew <beeanyew@gmail.com>
Mon, 17 May 2021 20:39:04 +0000 (22:39 +0200)
committerbeeanyew <beeanyew@gmail.com>
Mon, 17 May 2021 20:39:04 +0000 (22:39 +0200)
raylib_pi4_test/config.h
raylib_pi4_test/core.c
raylib_pi4_test/libraylib.a
raylib_pi4_test/raylib.h
raylib_pi4_test/rlgl.h
raylib_pi4_test/text.c

index 54fadb2398581bdcb1183ca8380fe71b33b2a675..99cb1d48b89b5ee6abe3fc95caf6c391c2a600ba 100644 (file)
@@ -25,6 +25,8 @@
 *
 **********************************************************************************************/
 
+#define RAYLIB_VERSION  "3.7"
+
 //------------------------------------------------------------------------------------
 // Module: core - Configuration Flags
 //------------------------------------------------------------------------------------
index d33cc044085cf2209f82b8e8b87541c6ab1c2b7e..a6a8505c0c2e31077e21aad8d85473c67d68876d 100644 (file)
 // Check if config flags have been externally provided on compilation line
 #if !defined(EXTERNAL_CONFIG_FLAGS)
     #include "config.h"             // Defines module configuration flags
+#else
+    #define RAYLIB_VERSION  "3.7"
 #endif
 
 #include "utils.h"                  // Required for: TRACELOG macros
@@ -919,7 +921,6 @@ void CloseWindow(void)
     if (CORE.Input.Gamepad.threadId) pthread_join(CORE.Input.Gamepad.threadId, NULL);
 #endif
 
-    CORE.Window.ready = false;
     TRACELOG(LOG_INFO, "Window closed successfully");
 }
 
index fec350e680f727caabe220ed19c9859c5cc13ced..d8b3e9c3000ff0caf6b27fbd998ebd53251c5609 100644 (file)
Binary files a/raylib_pi4_test/libraylib.a and b/raylib_pi4_test/libraylib.a differ
index bb67c1265fbccf4060647433121f1dff35f35d3a..ead617c1d4f3d9901848b65af31bb99118d74902 100644 (file)
@@ -81,8 +81,6 @@
 
 #include <stdarg.h>     // Required for: va_list - Only used by TraceLogCallback
 
-#define RAYLIB_VERSION  "3.7.0"
-
 #if defined(_WIN32)
     // Microsoft attibutes to tell compiler that symbols are imported/exported from a .dll
     #if defined(BUILD_LIBTYPE_SHARED)
@@ -418,7 +416,7 @@ typedef struct BoundingBox {
 
 // Wave type, defines audio wave data
 typedef struct Wave {
-    unsigned int sampleCount;       // Total number of samples (considering channels!)
+    unsigned int sampleCount;       // Total number of samples
     unsigned int sampleRate;        // Frequency (samples per second)
     unsigned int sampleSize;        // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
     unsigned int channels;          // Number of channels (1-mono, 2-stereo)
@@ -780,6 +778,7 @@ typedef enum {
     PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,     // 8 bit per pixel (no alpha)
     PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA,        // 8*2 bpp (2 channels)
     PIXELFORMAT_UNCOMPRESSED_R5G6B5,            // 16 bpp
+    PIXELFORMAT_UNCOMPRESSED_RGB565_BE,                // 16 bpp (big endian)
     PIXELFORMAT_UNCOMPRESSED_R8G8B8,            // 24 bpp
     PIXELFORMAT_UNCOMPRESSED_R5G5B5A1,          // 16 bpp (1 bit alpha)
     PIXELFORMAT_UNCOMPRESSED_R4G4B4A4,          // 16 bpp (4 bit alpha)
index b3eddf0c53e1ca93f11cc48f687367f323fac78f..bb0bc23cfee7bc0c361c5bff2e3c45536d981254 100644 (file)
@@ -346,6 +346,7 @@ typedef enum {
         PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,     // 8 bit per pixel (no alpha)
         PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA,
         PIXELFORMAT_UNCOMPRESSED_R5G6B5,            // 16 bpp
+        PIXELFORMAT_UNCOMPRESSED_RGB565_BE,        // 16 bpp (big endian)
         PIXELFORMAT_UNCOMPRESSED_R8G8B8,            // 24 bpp
         PIXELFORMAT_UNCOMPRESSED_R5G5B5A1,          // 16 bpp (1 bit alpha)
         PIXELFORMAT_UNCOMPRESSED_R4G4B4A4,          // 16 bpp (4 bit alpha)
@@ -750,8 +751,10 @@ RLAPI void rlLoadDrawQuad(void);     // Load and draw a quad
     #define GL_TEXTURE_MAX_ANISOTROPY_EXT       0x84FE
 #endif
 
+#define GL_UNSIGNED_SHORT_5_6_5_REV               0x8364
 #if defined(GRAPHICS_API_OPENGL_11)
     #define GL_UNSIGNED_SHORT_5_6_5             0x8363
+    //#define GL_UNSIGNED_SHORT_5_6_5_REV              0x8364
     #define GL_UNSIGNED_SHORT_5_5_5_1           0x8034
     #define GL_UNSIGNED_SHORT_4_4_4_4           0x8033
 #endif
@@ -2662,6 +2665,7 @@ void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned
         case PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_UNSIGNED_BYTE; break;
         case PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: *glInternalFormat = GL_LUMINANCE_ALPHA; *glFormat = GL_LUMINANCE_ALPHA; *glType = GL_UNSIGNED_BYTE; break;
         case PIXELFORMAT_UNCOMPRESSED_R5G6B5: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_SHORT_5_6_5; break;
+        case PIXELFORMAT_UNCOMPRESSED_RGB565_BE: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_SHORT_5_6_5_REV; break;
         case PIXELFORMAT_UNCOMPRESSED_R8G8B8: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_BYTE; break;
         case PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_5_5_5_1; break;
         case PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_4_4_4_4; break;
index 3e821fe80291f30eb723ee117c36a28dc9b3deba..3a49963a74a5f28e988b839f88f325e3e03e9c47 100644 (file)
@@ -848,14 +848,12 @@ void DrawText(const char *text, int posX, int posY, int fontSize, Color color)
 // NOTE: chars spacing is NOT proportional to fontSize
 void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
 {
-    if (font.texture.id == 0) font = GetFontDefault();  // Security check in case of not valid font
-    
-    int length = TextLength(text);  // Total length in bytes of the text, scanned by codepoints in loop
+    int length = TextLength(text);      // Total length in bytes of the text, scanned by codepoints in loop
 
     int textOffsetY = 0;            // Offset between lines (on line break '\n')
     float textOffsetX = 0.0f;       // Offset X to next character to draw
 
-    float scaleFactor = fontSize/font.baseSize;         // Character quad scaling factor
+    float scaleFactor = fontSize/font.baseSize;     // Character quad scaling factor
 
     for (int i = 0; i < length;)
     {