update raylib to 4.1-dev
This commit is contained in:
parent
10d945ed28
commit
f73c57c89c
9 changed files with 106 additions and 34 deletions
|
@ -68,7 +68,7 @@ for name, attr in getmembers(rl):
|
|||
" ", "")+"_"+str(i)
|
||||
if 'params' in json_object:
|
||||
p = json_object['params']
|
||||
param_name = list(p)[i]
|
||||
param_name = list(p)[i]['name']
|
||||
|
||||
param_type = ctype_to_python_type(arg.cname)
|
||||
sig += f"{param_name}: {param_type},"
|
||||
|
@ -101,7 +101,7 @@ for struct in ffi.list_types()[0]:
|
|||
# json_object = json_array[0]
|
||||
if ffi.typeof(struct).kind == "struct":
|
||||
if ffi.typeof(struct).fields is None:
|
||||
print("weird empty struct, skipping", file=sys.stderr)
|
||||
print("weird empty struct, skipping "+struct, file=sys.stderr)
|
||||
break
|
||||
print(f"class {struct}:")
|
||||
print(f' """ struct """')
|
||||
|
|
|
@ -69,7 +69,7 @@ for name, attr in getmembers(rl):
|
|||
if 'params' in json_object:
|
||||
p = json_object['params']
|
||||
#print("param_name: ", param_name, "i", i, "params: ",p,file=sys.stderr)
|
||||
param_name = list(p)[i]
|
||||
param_name = list(p)[i]['name']
|
||||
param_type = ctype_to_python_type(arg.cname)
|
||||
sig += f"{param_name}: {param_type},"
|
||||
|
||||
|
|
|
@ -341,6 +341,9 @@ def draw_text(text: str,posX: int,posY: int,fontSize: int,color: Color,) -> None
|
|||
def draw_text_codepoint(font: Font,codepoint: int,position: Vector2,fontSize: float,tint: Color,) -> None:
|
||||
"""Draw one character (codepoint)"""
|
||||
...
|
||||
def draw_text_codepoints(font: Font,codepoints: Any,count: int,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
|
||||
"""Draw multiple character (codepoint)"""
|
||||
...
|
||||
def draw_text_ex(font: Font,text: str,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
|
||||
"""Draw text using font and additional parameters"""
|
||||
...
|
||||
|
@ -422,6 +425,9 @@ def end_texture_mode() -> None:
|
|||
def end_vr_stereo_mode() -> None:
|
||||
"""End stereo rendering (requires VR simulator)"""
|
||||
...
|
||||
def export_font_as_code(font: Font,fileName: str,) -> bool:
|
||||
"""Export font as code file, returns true on success"""
|
||||
...
|
||||
def export_image(image: Image,fileName: str,) -> bool:
|
||||
"""Export image data to file, returns true on success"""
|
||||
...
|
||||
|
@ -509,6 +515,9 @@ def gen_mesh_torus(radius: float,size: float,radSeg: int,sides: int,) -> Mesh:
|
|||
def gen_texture_mipmaps(texture: Any,) -> None:
|
||||
"""Generate GPU mipmaps for a texture"""
|
||||
...
|
||||
def get_application_directory() -> str:
|
||||
"""Get the directory if the running application (uses static string)"""
|
||||
...
|
||||
def get_camera_matrix(camera: Camera3D,) -> Matrix:
|
||||
"""Get camera transform matrix (view matrix)"""
|
||||
...
|
||||
|
@ -551,6 +560,9 @@ def get_fps() -> int:
|
|||
def get_file_extension(fileName: str,) -> str:
|
||||
"""Get pointer to extension for a filename string (includes dot: '.png')"""
|
||||
...
|
||||
def get_file_length(fileName: str,) -> int:
|
||||
"""Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)"""
|
||||
...
|
||||
def get_file_mod_time(fileName: str,) -> int:
|
||||
"""Get file modification time (last write time)"""
|
||||
...
|
||||
|
@ -723,6 +735,12 @@ def get_ray_collision_sphere(ray: Ray,center: Vector3,radius: float,) -> RayColl
|
|||
def get_ray_collision_triangle(ray: Ray,p1: Vector3,p2: Vector3,p3: Vector3,) -> RayCollision:
|
||||
"""Get collision info between ray and triangle"""
|
||||
...
|
||||
def get_render_height() -> int:
|
||||
"""Get current render height (it considers HiDPI)"""
|
||||
...
|
||||
def get_render_width() -> int:
|
||||
"""Get current render width (it considers HiDPI)"""
|
||||
...
|
||||
def get_screen_height() -> int:
|
||||
"""Get current screen height"""
|
||||
...
|
||||
|
@ -1290,7 +1308,7 @@ def load_file_data(fileName: str,bytesRead: Any,) -> str:
|
|||
"""Load file data as byte array (read)"""
|
||||
...
|
||||
def load_file_text(fileName: str,) -> str:
|
||||
"""Load text data from file (read), returns a ' 0' terminated string"""
|
||||
"""Load text data from file (read), returns a '\0' terminated string"""
|
||||
...
|
||||
def load_font(fileName: str,) -> Font:
|
||||
"""Load font from file into GPU memory (VRAM)"""
|
||||
|
@ -1299,7 +1317,7 @@ def load_font_data(fileData: str,dataSize: int,fontSize: int,fontChars: Any,glyp
|
|||
"""Load font data for further use"""
|
||||
...
|
||||
def load_font_ex(fileName: str,fontSize: int,fontChars: Any,glyphCount: int,) -> Font:
|
||||
"""Load font from file with extended parameters"""
|
||||
"""Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set"""
|
||||
...
|
||||
def load_font_from_image(image: Image,key: Color,firstChar: int,) -> Font:
|
||||
"""Load font from Image (XNA style)"""
|
||||
|
@ -1389,7 +1407,7 @@ def load_wave_from_memory(fileType: str,fileData: str,dataSize: int,) -> Wave:
|
|||
"""Load wave from memory buffer, fileType refers to extension: i.e. '.wav'"""
|
||||
...
|
||||
def load_wave_samples(wave: Wave,) -> Any:
|
||||
"""Load samples data from wave as a floats array"""
|
||||
"""Load samples data from wave as a 32bit float data array"""
|
||||
...
|
||||
def maximize_window() -> None:
|
||||
"""Set window state: maximized, if resizable (only PLATFORM_DESKTOP)"""
|
||||
|
@ -1475,7 +1493,7 @@ def save_file_data(fileName: str,data: Any,bytesToWrite: int,) -> bool:
|
|||
"""Save data to file from byte array (write), returns true on success"""
|
||||
...
|
||||
def save_file_text(fileName: str,text: str,) -> bool:
|
||||
"""Save text data to file (write), string must be ' 0' terminated, returns true on success"""
|
||||
"""Save text data to file (write), string must be '\0' terminated, returns true on success"""
|
||||
...
|
||||
def save_storage_value(position: int,value: int,) -> bool:
|
||||
"""Save integer value to storage file (to defined position), returns true on success"""
|
||||
|
@ -1486,6 +1504,9 @@ def seek_music_stream(music: Music,position: float,) -> None:
|
|||
def set_audio_stream_buffer_size_default(size: int,) -> None:
|
||||
"""Default size for new audio streams"""
|
||||
...
|
||||
def set_audio_stream_pan(stream: AudioStream,pan: float,) -> None:
|
||||
"""Set pan for audio stream (0.5 is centered)"""
|
||||
...
|
||||
def set_audio_stream_pitch(stream: AudioStream,pitch: float,) -> None:
|
||||
"""Set pitch for audio stream (1.0 is base level)"""
|
||||
...
|
||||
|
@ -1549,6 +1570,9 @@ def set_mouse_position(x: int,y: int,) -> None:
|
|||
def set_mouse_scale(scaleX: float,scaleY: float,) -> None:
|
||||
"""Set mouse scaling"""
|
||||
...
|
||||
def set_music_pan(music: Music,pan: float,) -> None:
|
||||
"""Set pan for a music (0.5 is center)"""
|
||||
...
|
||||
def set_music_pitch(music: Music,pitch: float,) -> None:
|
||||
"""Set pitch for a music (1.0 is base level)"""
|
||||
...
|
||||
|
@ -1597,6 +1621,9 @@ def set_shader_value_v(shader: Shader,locIndex: int,value: Any,uniformType: int,
|
|||
def set_shapes_texture(texture: Texture,source: Rectangle,) -> None:
|
||||
"""Set texture and rectangle to be used on shapes drawing"""
|
||||
...
|
||||
def set_sound_pan(sound: Sound,pan: float,) -> None:
|
||||
"""Set pan for a sound (0.5 is center)"""
|
||||
...
|
||||
def set_sound_pitch(sound: Sound,pitch: float,) -> None:
|
||||
"""Set pitch for a sound (1.0 is base level)"""
|
||||
...
|
||||
|
@ -1627,6 +1654,9 @@ def set_window_min_size(width: int,height: int,) -> None:
|
|||
def set_window_monitor(monitor: int,) -> None:
|
||||
"""Set monitor for the current window (fullscreen mode)"""
|
||||
...
|
||||
def set_window_opacity(opacity: float,) -> None:
|
||||
"""Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def set_window_position(x: int,y: int,) -> None:
|
||||
"""Set window position on screen (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
|
@ -1634,7 +1664,7 @@ def set_window_size(width: int,height: int,) -> None:
|
|||
"""Set window dimensions"""
|
||||
...
|
||||
def set_window_state(flags: int,) -> None:
|
||||
"""Set window configuration state using flags"""
|
||||
"""Set window configuration state using flags (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def set_window_title(title: str,) -> None:
|
||||
"""Set title for window (only PLATFORM_DESKTOP)"""
|
||||
|
@ -1685,7 +1715,7 @@ def text_join(textList: str,count: int,delimiter: str,) -> str:
|
|||
"""Join text strings with delimiter"""
|
||||
...
|
||||
def text_length(text: str,) -> int:
|
||||
"""Get text length, checks for ' 0' ending"""
|
||||
"""Get text length, checks for '\0' ending"""
|
||||
...
|
||||
def text_replace(text: str,replace: str,by: str,) -> str:
|
||||
"""Replace text string (WARNING: memory must be freed!)"""
|
||||
|
@ -1727,7 +1757,7 @@ def unload_file_text(text: str,) -> None:
|
|||
"""Unload file text data allocated by LoadFileText()"""
|
||||
...
|
||||
def unload_font(font: Font,) -> None:
|
||||
"""Unload Font from GPU memory (VRAM)"""
|
||||
"""Unload font from GPU memory (VRAM)"""
|
||||
...
|
||||
def unload_font_data(chars: Any,glyphCount: int,) -> None:
|
||||
"""Unload font chars info data (RAM)"""
|
||||
|
|
2
raylib-c
2
raylib-c
|
@ -1 +1 @@
|
|||
Subproject commit a56b8cd2b7e48855ef01a7f60b8e9bd612fda4b8
|
||||
Subproject commit 1e436be51d4f8853c3494a0753eabe7628ac6d90
|
|
@ -385,6 +385,9 @@ def DrawText(text: str,posX: int,posY: int,fontSize: int,color: Color,) -> None:
|
|||
def DrawTextCodepoint(font: Font,codepoint: int,position: Vector2,fontSize: float,tint: Color,) -> None:
|
||||
"""Draw one character (codepoint)"""
|
||||
...
|
||||
def DrawTextCodepoints(font: Font,codepoints: Any,count: int,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
|
||||
"""Draw multiple character (codepoint)"""
|
||||
...
|
||||
def DrawTextEx(font: Font,text: str,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
|
||||
"""Draw text using font and additional parameters"""
|
||||
...
|
||||
|
@ -466,6 +469,9 @@ def EndTextureMode() -> None:
|
|||
def EndVrStereoMode() -> None:
|
||||
"""End stereo rendering (requires VR simulator)"""
|
||||
...
|
||||
def ExportFontAsCode(font: Font,fileName: str,) -> bool:
|
||||
"""Export font as code file, returns true on success"""
|
||||
...
|
||||
def ExportImage(image: Image,fileName: str,) -> bool:
|
||||
"""Export image data to file, returns true on success"""
|
||||
...
|
||||
|
@ -613,6 +619,9 @@ def GenMeshTorus(radius: float,size: float,radSeg: int,sides: int,) -> Mesh:
|
|||
def GenTextureMipmaps(texture: Any,) -> None:
|
||||
"""Generate GPU mipmaps for a texture"""
|
||||
...
|
||||
def GetApplicationDirectory() -> str:
|
||||
"""Get the directory if the running application (uses static string)"""
|
||||
...
|
||||
def GetCameraMatrix(camera: Camera3D,) -> Matrix:
|
||||
"""Get camera transform matrix (view matrix)"""
|
||||
...
|
||||
|
@ -655,6 +664,9 @@ def GetFPS() -> int:
|
|||
def GetFileExtension(fileName: str,) -> str:
|
||||
"""Get pointer to extension for a filename string (includes dot: '.png')"""
|
||||
...
|
||||
def GetFileLength(fileName: str,) -> int:
|
||||
"""Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)"""
|
||||
...
|
||||
def GetFileModTime(fileName: str,) -> int:
|
||||
"""Get file modification time (last write time)"""
|
||||
...
|
||||
|
@ -827,6 +839,12 @@ def GetRayCollisionSphere(ray: Ray,center: Vector3,radius: float,) -> RayCollisi
|
|||
def GetRayCollisionTriangle(ray: Ray,p1: Vector3,p2: Vector3,p3: Vector3,) -> RayCollision:
|
||||
"""Get collision info between ray and triangle"""
|
||||
...
|
||||
def GetRenderHeight() -> int:
|
||||
"""Get current render height (it considers HiDPI)"""
|
||||
...
|
||||
def GetRenderWidth() -> int:
|
||||
"""Get current render width (it considers HiDPI)"""
|
||||
...
|
||||
def GetScreenHeight() -> int:
|
||||
"""Get current screen height"""
|
||||
...
|
||||
|
@ -1521,7 +1539,7 @@ def LoadFileData(fileName: str,bytesRead: Any,) -> str:
|
|||
"""Load file data as byte array (read)"""
|
||||
...
|
||||
def LoadFileText(fileName: str,) -> str:
|
||||
"""Load text data from file (read), returns a ' 0' terminated string"""
|
||||
"""Load text data from file (read), returns a '\0' terminated string"""
|
||||
...
|
||||
def LoadFont(fileName: str,) -> Font:
|
||||
"""Load font from file into GPU memory (VRAM)"""
|
||||
|
@ -1530,7 +1548,7 @@ def LoadFontData(fileData: str,dataSize: int,fontSize: int,fontChars: Any,glyphC
|
|||
"""Load font data for further use"""
|
||||
...
|
||||
def LoadFontEx(fileName: str,fontSize: int,fontChars: Any,glyphCount: int,) -> Font:
|
||||
"""Load font from file with extended parameters"""
|
||||
"""Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set"""
|
||||
...
|
||||
def LoadFontFromImage(image: Image,key: Color,firstChar: int,) -> Font:
|
||||
"""Load font from Image (XNA style)"""
|
||||
|
@ -1620,7 +1638,7 @@ def LoadWaveFromMemory(fileType: str,fileData: str,dataSize: int,) -> Wave:
|
|||
"""Load wave from memory buffer, fileType refers to extension: i.e. '.wav'"""
|
||||
...
|
||||
def LoadWaveSamples(wave: Wave,) -> Any:
|
||||
"""Load samples data from wave as a floats array"""
|
||||
"""Load samples data from wave as a 32bit float data array"""
|
||||
...
|
||||
MATERIAL_MAP_ALBEDO: int
|
||||
MATERIAL_MAP_BRDF: int
|
||||
|
@ -1922,7 +1940,7 @@ def SaveFileData(fileName: str,data: Any,bytesToWrite: int,) -> bool:
|
|||
"""Save data to file from byte array (write), returns true on success"""
|
||||
...
|
||||
def SaveFileText(fileName: str,text: str,) -> bool:
|
||||
"""Save text data to file (write), string must be ' 0' terminated, returns true on success"""
|
||||
"""Save text data to file (write), string must be '\0' terminated, returns true on success"""
|
||||
...
|
||||
def SaveStorageValue(position: int,value: int,) -> bool:
|
||||
"""Save integer value to storage file (to defined position), returns true on success"""
|
||||
|
@ -1933,6 +1951,9 @@ def SeekMusicStream(music: Music,position: float,) -> None:
|
|||
def SetAudioStreamBufferSizeDefault(size: int,) -> None:
|
||||
"""Default size for new audio streams"""
|
||||
...
|
||||
def SetAudioStreamPan(stream: AudioStream,pan: float,) -> None:
|
||||
"""Set pan for audio stream (0.5 is centered)"""
|
||||
...
|
||||
def SetAudioStreamPitch(stream: AudioStream,pitch: float,) -> None:
|
||||
"""Set pitch for audio stream (1.0 is base level)"""
|
||||
...
|
||||
|
@ -1996,6 +2017,9 @@ def SetMousePosition(x: int,y: int,) -> None:
|
|||
def SetMouseScale(scaleX: float,scaleY: float,) -> None:
|
||||
"""Set mouse scaling"""
|
||||
...
|
||||
def SetMusicPan(music: Music,pan: float,) -> None:
|
||||
"""Set pan for a music (0.5 is center)"""
|
||||
...
|
||||
def SetMusicPitch(music: Music,pitch: float,) -> None:
|
||||
"""Set pitch for a music (1.0 is base level)"""
|
||||
...
|
||||
|
@ -2044,6 +2068,9 @@ def SetShaderValueV(shader: Shader,locIndex: int,value: Any,uniformType: int,cou
|
|||
def SetShapesTexture(texture: Texture,source: Rectangle,) -> None:
|
||||
"""Set texture and rectangle to be used on shapes drawing"""
|
||||
...
|
||||
def SetSoundPan(sound: Sound,pan: float,) -> None:
|
||||
"""Set pan for a sound (0.5 is center)"""
|
||||
...
|
||||
def SetSoundPitch(sound: Sound,pitch: float,) -> None:
|
||||
"""Set pitch for a sound (1.0 is base level)"""
|
||||
...
|
||||
|
@ -2074,6 +2101,9 @@ def SetWindowMinSize(width: int,height: int,) -> None:
|
|||
def SetWindowMonitor(monitor: int,) -> None:
|
||||
"""Set monitor for the current window (fullscreen mode)"""
|
||||
...
|
||||
def SetWindowOpacity(opacity: float,) -> None:
|
||||
"""Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def SetWindowPosition(x: int,y: int,) -> None:
|
||||
"""Set window position on screen (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
|
@ -2081,7 +2111,7 @@ def SetWindowSize(width: int,height: int,) -> None:
|
|||
"""Set window dimensions"""
|
||||
...
|
||||
def SetWindowState(flags: int,) -> None:
|
||||
"""Set window configuration state using flags"""
|
||||
"""Set window configuration state using flags (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def SetWindowTitle(title: str,) -> None:
|
||||
"""Set title for window (only PLATFORM_DESKTOP)"""
|
||||
|
@ -2154,7 +2184,7 @@ def TextJoin(textList: str,count: int,delimiter: str,) -> str:
|
|||
"""Join text strings with delimiter"""
|
||||
...
|
||||
def TextLength(text: str,) -> int:
|
||||
"""Get text length, checks for ' 0' ending"""
|
||||
"""Get text length, checks for '\0' ending"""
|
||||
...
|
||||
def TextReplace(text: str,replace: str,by: str,) -> str:
|
||||
"""Replace text string (WARNING: memory must be freed!)"""
|
||||
|
@ -2196,7 +2226,7 @@ def UnloadFileText(text: str,) -> None:
|
|||
"""Unload file text data allocated by LoadFileText()"""
|
||||
...
|
||||
def UnloadFont(font: Font,) -> None:
|
||||
"""Unload Font from GPU memory (VRAM)"""
|
||||
"""Unload font from GPU memory (VRAM)"""
|
||||
...
|
||||
def UnloadFontData(chars: Any,glyphCount: int,) -> None:
|
||||
"""Unload font chars info data (RAM)"""
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* DESCRIPTION:
|
||||
*
|
||||
* Physac is a small 2D physics engine written in pure C. The engine uses a fixed time-step thread loop
|
||||
* to simluate physics. A physics step contains the following phases: get collision information,
|
||||
* to simulate physics. A physics step contains the following phases: get collision information,
|
||||
* apply dynamics, collision solving and position correction. It uses a very simple struct for physic
|
||||
* bodies with a position vector to be used in any 3D rendering API.
|
||||
*
|
||||
|
@ -50,7 +50,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2016-2021 Victor Fisac (@victorfisac) and Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2016-2022 Victor Fisac (@victorfisac) and 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.
|
||||
|
@ -68,6 +68,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 (Windows)
|
||||
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
||||
// Allow custom memory allocators
|
||||
//----------------------------------------------------------------------------------
|
||||
// Defines and Macros
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* raylib v4.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
* raylib v4.1-dev - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
*
|
||||
* FEATURES:
|
||||
* - NO external dependencies, all required libraries included with raylib
|
||||
|
@ -56,7 +56,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-2021 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2013-2022 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.
|
||||
|
@ -641,7 +641,7 @@ typedef enum {
|
|||
// NOTE 1: Filtering considers mipmaps if available in the texture
|
||||
// NOTE 2: Filter is accordingly set for minification and magnification
|
||||
typedef enum {
|
||||
TEXTURE_FILTER_POINT = 0, // No filter, just pixel aproximation
|
||||
TEXTURE_FILTER_POINT = 0, // No filter, just pixel approximation
|
||||
TEXTURE_FILTER_BILINEAR, // Linear filtering
|
||||
TEXTURE_FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps)
|
||||
TEXTURE_FILTER_ANISOTROPIC_4X, // Anisotropic filtering 4x
|
||||
|
@ -677,7 +677,7 @@ typedef enum {
|
|||
BLEND_MULTIPLIED, // Blend textures multiplying colors
|
||||
BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
|
||||
BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
|
||||
BLEND_CUSTOM // Belnd textures using custom src/dst factors (use rlSetBlendMode())
|
||||
BLEND_CUSTOM // Blend textures using custom src/dst factors (use rlSetBlendMode())
|
||||
} BlendMode;
|
||||
// Gesture
|
||||
// NOTE: It could be used as flags to enable only some gestures
|
||||
|
@ -739,7 +739,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
bool IsWindowFocused(void); // Check if window is currently focused (only PLATFORM_DESKTOP)
|
||||
bool IsWindowResized(void); // Check if window has been resized last frame
|
||||
bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
|
||||
void SetWindowState(unsigned int flags); // Set window configuration state using flags
|
||||
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 (only PLATFORM_DESKTOP)
|
||||
void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
||||
|
@ -751,9 +751,12 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
||||
void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
|
||||
void SetWindowSize(int width, int height); // Set window dimensions
|
||||
void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
|
||||
void *GetWindowHandle(void); // Get native window handle
|
||||
int GetScreenWidth(void); // Get current screen width
|
||||
int GetScreenHeight(void); // Get current screen height
|
||||
int GetRenderWidth(void); // Get current render width (it considers HiDPI)
|
||||
int GetRenderHeight(void); // Get current render height (it considers HiDPI)
|
||||
int GetMonitorCount(void); // Get number of connected monitors
|
||||
int GetCurrentMonitor(void); // Get current connected monitor
|
||||
Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
|
||||
|
@ -852,13 +855,15 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
|
||||
bool FileExists(const char *fileName); // Check if file exists
|
||||
bool DirectoryExists(const char *dirPath); // Check if a directory path exists
|
||||
bool IsFileExtension(const char *fileName, const char *ext);// Check file extension (including point: .png, .wav)
|
||||
bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (including point: .png, .wav)
|
||||
int GetFileLength(const char *fileName); // Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
|
||||
const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (includes dot: '.png')
|
||||
const char *GetFileName(const char *filePath); // Get pointer to filename for a path string
|
||||
const char *GetFileNameWithoutExt(const char *filePath); // Get filename string without extension (uses static string)
|
||||
const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string)
|
||||
const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
|
||||
const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
|
||||
const char *GetApplicationDirectory(void); // Get the directory if the running application (uses static string)
|
||||
char **GetDirectoryFiles(const char *dirPath, int *count); // Get filenames in a directory path (memory should be freed)
|
||||
void ClearDirectoryFiles(void); // Clear directory files paths buffers (free memory)
|
||||
bool ChangeDirectory(const char *dir); // Change working directory, return true on success
|
||||
|
@ -1106,19 +1111,21 @@ 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 *fontChars, int glyphCount); // Load font from file with extended parameters
|
||||
Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount 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 *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use
|
||||
Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM)
|
||||
void UnloadFont(Font font); // Unload Font from GPU memory (VRAM)
|
||||
void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
|
||||
bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success
|
||||
// Text drawing functions
|
||||
void DrawFPS(int posX, int posY); // Draw current FPS
|
||||
void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font)
|
||||
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
|
||||
void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation)
|
||||
void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
|
||||
void DrawTextCodepoints(Font font, int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
|
||||
// Text font info functions
|
||||
int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
||||
Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
|
||||
|
@ -1265,10 +1272,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
||||
void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
||||
void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
||||
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
|
||||
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 initSample, int finalSample); // Crop a wave to defined samples range
|
||||
float *LoadWaveSamples(Wave wave); // Load samples data from wave as a floats array
|
||||
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()
|
||||
// Music management functions
|
||||
Music LoadMusicStream(const char *fileName); // Load music stream from file
|
||||
|
@ -1283,6 +1291,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds)
|
||||
void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
|
||||
void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
|
||||
void SetMusicPan(Music music, float pan); // Set pan for a music (0.5 is center)
|
||||
float GetMusicTimeLength(Music music); // Get music time length (in seconds)
|
||||
float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
|
||||
// AudioStream management functions
|
||||
|
@ -1297,4 +1306,5 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void StopAudioStream(AudioStream stream); // Stop audio stream
|
||||
void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
|
||||
void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
|
||||
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
|
|
@ -85,7 +85,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2014-2021 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2022 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.
|
||||
|
@ -235,7 +235,7 @@ typedef enum {
|
|||
// NOTE 1: Filtering considers mipmaps if available in the texture
|
||||
// NOTE 2: Filter is accordingly set for minification and magnification
|
||||
typedef enum {
|
||||
RL_TEXTURE_FILTER_POINT = 0, // No filter, just pixel aproximation
|
||||
RL_TEXTURE_FILTER_POINT = 0, // No filter, just pixel approximation
|
||||
RL_TEXTURE_FILTER_BILINEAR, // Linear filtering
|
||||
RL_TEXTURE_FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps)
|
||||
RL_TEXTURE_FILTER_ANISOTROPIC_4X, // Anisotropic filtering 4x
|
||||
|
@ -249,7 +249,7 @@ typedef enum {
|
|||
RL_BLEND_MULTIPLIED, // Blend textures multiplying colors
|
||||
RL_BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
|
||||
RL_BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
|
||||
RL_BLEND_CUSTOM // Belnd textures using custom src/dst factors (use SetBlendModeCustom())
|
||||
RL_BLEND_CUSTOM // Blend textures using custom src/dst factors (use rlSetBlendFactors())
|
||||
} rlBlendMode;
|
||||
// Shader location point type
|
||||
typedef enum {
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "4.0.0.5"
|
||||
__version__ = "4.0.1.0.dev0"
|
Reference in a new issue