summaryrefslogtreecommitdiff
path: root/ReiLua_API.lua
diff options
context:
space:
mode:
authorjussi2023-11-09 21:24:58 +0200
committerjussi2023-11-09 21:24:58 +0200
commite056446750bff6db15842aea662f18a322052d8c (patch)
treee63e0c19f45408c9366d617509f7208102e94884 /ReiLua_API.lua
parentef75e2530dd92c55ba6b2462fe71fa888e1883df (diff)
downloadreilua-enhanced-e056446750bff6db15842aea662f18a322052d8c.tar.gz
reilua-enhanced-e056446750bff6db15842aea662f18a322052d8c.tar.bz2
reilua-enhanced-e056446750bff6db15842aea662f18a322052d8c.zip
Organized core functions.
Diffstat (limited to 'ReiLua_API.lua')
-rw-r--r--ReiLua_API.lua600
1 files changed, 300 insertions, 300 deletions
diff --git a/ReiLua_API.lua b/ReiLua_API.lua
index 98df0a4..5ca1c59 100644
--- a/ReiLua_API.lua
+++ b/ReiLua_API.lua
@@ -1208,7 +1208,7 @@ RL.EVENT_MOUSE_CURSOR_POS=8
RL.EVENT_MOUSE_SCROLL=9
---GLFW event cursor enter/leave
RL.EVENT_CURSOR_ENTER=10
--- Core - Window
+-- Core - Window-related functions
---Check if window has been initialized successfully
---- Success return bool
@@ -1376,72 +1376,7 @@ function RL.SetClipboardText( text ) end
---@return any text
function RL.GetClipboardText() end
--- Core - Timing
-
----Set target FPS (maximum)
----@param fps integer
----@return any RL.SetTargetFPS
-function RL.SetTargetFPS( fps ) end
-
----Get current FPS
----- Success return int
----@return any FPS
-function RL.GetFPS() end
-
----Get time in seconds for last frame drawn (Delta time)
----- Success return float
----@return any delta
-function RL.GetFrameTime() end
-
----Get elapsed time in seconds since InitWindow()
----- Success return float
----@return any time
-function RL.GetTime() end
-
--- Core - Misc
-
----Takes a screenshot of current screen (filename extension defines format)
----@param fileName string
----@return any RL.TakeScreenshot
-function RL.TakeScreenshot( fileName ) end
-
----Setup init configuration flags (view FLAGS)
----@param flags integer
----@return any RL.SetConfigFlags
-function RL.SetConfigFlags( flags ) end
-
----Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
----@param logLevel integer
----@param text string
----@return any RL.TraceLog
-function RL.TraceLog( logLevel, text ) end
-
----Set the current threshold (minimum) log level
----@param logLevel integer
----@return any RL.SetTraceLogLevel
-function RL.SetTraceLogLevel( logLevel ) end
-
----Set the log level for bad function calls and invalid data formats.
----@param logLevel integer
----@return any RL.SetLogLevelInvalid
-function RL.SetLogLevelInvalid( logLevel ) end
-
----Get the log level for bad function calls and invalid data formats.
----- Success return int
----@return any logLevel
-function RL.GetLogLevelInvalid() end
-
----Open URL with default system browser (If available)
----@param url string
----@return any RL.OpenURL
-function RL.OpenURL( url ) end
-
----Check if Lua garbage collection is set to unload object data
----- Success return bool
----@return any enabled
-function RL.IsGCUnloadEnabled() end
-
--- Core - Cursor
+-- Core - Cursor-related functions
---Shows cursor
---@return any RL.ShowCursor
@@ -1469,7 +1404,7 @@ function RL.DisableCursor() end
---@return any onSreen
function RL.IsCursorOnScreen() end
--- Core - Drawing
+-- Core - Drawing-related functions
---Set background color (framebuffer clear color)
---@param color table
@@ -1484,6 +1419,42 @@ function RL.BeginDrawing() end
---@return any RL.EndDrawing
function RL.EndDrawing() end
+---Begin 2D mode with custom camera (2D)
+---@param camera any
+---@return any RL.BeginMode2D
+function RL.BeginMode2D( camera ) end
+
+---Ends 2D mode with custom camera
+---@return any RL.EndMode2D
+function RL.EndMode2D() end
+
+---Begin 3D mode with custom camera (3D)
+---@param camera any
+---@return any RL.BeginMode3D
+function RL.BeginMode3D( camera ) end
+
+---Ends 3D mode and returns to default 2D orthographic mode
+---@return any RL.EndMode3D
+function RL.EndMode3D() end
+
+---Begin drawing to render texture
+---@param target any
+---@return any RL.BeginTextureMode
+function RL.BeginTextureMode( target ) end
+
+---Ends drawing to render texture
+---@return any RL.EndTextureMode
+function RL.EndTextureMode() end
+
+---Begin custom shader drawing
+---@param shader any
+---@return any RL.BeginShaderMode
+function RL.BeginShaderMode( shader ) end
+
+---End custom shader drawing (use default shader)
+---@return any RL.EndShaderMode
+function RL.EndShaderMode() end
+
---Begin blending mode (BLEND_ALPHA, BLEND_ADDITIVE, BLEND_MULTIPLIED...)
---@param mode integer
---@return any RL.BeginBlendMode
@@ -1502,7 +1473,7 @@ function RL.BeginScissorMode( rectange ) end
---@return any RL.EndScissorMode
function RL.EndScissorMode() end
--- Core - Shader
+-- Core - Shader management functions
---Load shader from files and bind default locations.
---NOTE: Set nil if no shader
@@ -1528,15 +1499,6 @@ function RL.LoadShaderFromMemory( vsCode, fsCode ) end
---@return any isReady
function RL.IsShaderReady( shader ) end
----Begin custom shader drawing
----@param shader any
----@return any RL.BeginShaderMode
-function RL.BeginShaderMode( shader ) end
-
----End custom shader drawing (use default shader)
----@return any RL.EndShaderMode
-function RL.EndShaderMode() end
-
---Get shader uniform location
---- Success return int
---@param shader any
@@ -1603,7 +1565,259 @@ function RL.SetShaderValueV( shader, locIndex, values, uniformType, count ) end
---@return any RL.UnloadShader
function RL.UnloadShader( shader ) end
--- Core - Input-related Keyboard
+-- Core - Screen-space-related functions
+
+---Get a ray trace from mouse position
+---- Success return Ray
+---@param mousePosition table
+---@param camera any
+---@return any ray
+function RL.GetMouseRay( mousePosition, camera ) end
+
+---Get camera transform matrix (view matrix)
+---- Success return Matrix
+---@param camera any
+---@return any matrix
+function RL.GetCameraMatrix( camera ) end
+
+---Get camera 2d transform matrix
+---- Success return Matrix
+---@param camera any
+---@return any matrix
+function RL.GetCameraMatrix2D( camera ) end
+
+---Get the screen space position for a 3d world space position
+---- Success return Vector2
+---@param position table
+---@param camera any
+---@return any position
+function RL.GetWorldToScreen( position, camera ) end
+
+---Get size position for a 3d world space position
+---- Success return Vector2
+---@param position table
+---@param camera any
+---@param size table
+---@return any position
+function RL.GetWorldToScreenEx( position, camera, size ) end
+
+---Get the screen space position for a 2d camera world space position
+---- Success return Vector2
+---@param position table
+---@param camera any
+---@return any position
+function RL.GetWorldToScreen2D( position, camera ) end
+
+---Get the world space position for a 2d camera screen space position
+---- Success return Vector2
+---@param position table
+---@param camera any
+---@return any position
+function RL.GetScreenToWorld2D( position, camera ) end
+
+-- Core - Timing-related functions
+
+---Set target FPS (maximum)
+---@param fps integer
+---@return any RL.SetTargetFPS
+function RL.SetTargetFPS( fps ) end
+
+---Get current FPS
+---- Success return int
+---@return any FPS
+function RL.GetFPS() end
+
+---Get time in seconds for last frame drawn (Delta time)
+---- Success return float
+---@return any delta
+function RL.GetFrameTime() end
+
+---Get elapsed time in seconds since InitWindow()
+---- Success return float
+---@return any time
+function RL.GetTime() end
+
+-- Core - Misc
+
+---Takes a screenshot of current screen (filename extension defines format)
+---@param fileName string
+---@return any RL.TakeScreenshot
+function RL.TakeScreenshot( fileName ) end
+
+---Setup init configuration flags (view FLAGS)
+---@param flags integer
+---@return any RL.SetConfigFlags
+function RL.SetConfigFlags( flags ) end
+
+---Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
+---@param logLevel integer
+---@param text string
+---@return any RL.TraceLog
+function RL.TraceLog( logLevel, text ) end
+
+---Set the current threshold (minimum) log level
+---@param logLevel integer
+---@return any RL.SetTraceLogLevel
+function RL.SetTraceLogLevel( logLevel ) end
+
+---Set the log level for bad function calls and invalid data formats.
+---@param logLevel integer
+---@return any RL.SetLogLevelInvalid
+function RL.SetLogLevelInvalid( logLevel ) end
+
+---Get the log level for bad function calls and invalid data formats.
+---- Success return int
+---@return any logLevel
+function RL.GetLogLevelInvalid() end
+
+---Open URL with default system browser (If available)
+---@param url string
+---@return any RL.OpenURL
+function RL.OpenURL( url ) end
+
+---Check if Lua garbage collection is set to unload object data
+---- Success return bool
+---@return any enabled
+function RL.IsGCUnloadEnabled() end
+
+-- Core - Files management functions
+
+---Return game directory (where main.lua is located)
+---- Success return string
+---@return any path
+function RL.GetBasePath() end
+
+---Check if file exists
+---- Success return bool
+---@param fileName string
+---@return any fileExists
+function RL.FileExists( fileName ) end
+
+---Check if a directory path exists
+---- Success return bool
+---@param dirPath string
+---@return any dirExists
+function RL.DirectoryExists( dirPath ) end
+
+---Check file extension (Including point: .png, .wav)
+---- Success return bool
+---@param fileName string
+---@param ext string
+---@return any hasFileExtension
+function RL.IsFileExtension( fileName, ext ) end
+
+---Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
+---- Success return int
+---@param fileName string
+---@return any length
+function RL.GetFileLength( fileName ) end
+
+---Get pointer to extension for a filename string (Includes dot: '.png')
+---- Success return string
+---@param fileName string
+---@return any extension
+function RL.GetFileExtension( fileName ) end
+
+---Get pointer to filename for a path string
+---- Success return string
+---@param filePath string
+---@return any fileName
+function RL.GetFileName( filePath ) end
+
+---Get filename string without extension (Uses static string)
+---- Success return string
+---@param filePath string
+---@return any fileName
+function RL.GetFileNameWithoutExt( filePath ) end
+
+---Get full path for a given fileName with path (Uses static string)
+---- Success return string
+---@param filePath string
+---@return any filePath
+function RL.GetDirectoryPath( filePath ) end
+
+---Get previous directory path for a given path (Uses static string)
+---- Success return string
+---@param dirPath string
+---@return any directory
+function RL.GetPrevDirectoryPath( dirPath ) end
+
+---Get current working directory (Uses static string)
+---- Success return string
+---@return any directory
+function RL.GetWorkingDirectory() end
+
+---Load directory filepaths
+---- Success return string{}
+---@param dirPath string
+---@return any fileNames
+function RL.LoadDirectoryFiles( dirPath ) end
+
+---Load directory filepaths with extension filtering and recursive directory scan
+---- Success return string{}
+---@param basePath string
+---@param filter string
+---@param scanSubdirs boolean
+---@return any fileNames
+function RL.LoadDirectoryFilesEx( basePath, filter, scanSubdirs ) end
+
+---Change working directory, return true on success
+---- Success return bool
+---@param directory string
+---@return any success
+function RL.ChangeDirectory( directory ) end
+
+---Check if a given path is a file or a directory
+---- Success return bool
+---@param path string
+---@return any isFile
+function RL.IsPathFile( path ) end
+
+---Check if a file has been dropped into window
+---- Success return bool
+---@return any iSFileDropped
+function RL.IsFileDropped() end
+
+---Load dropped filepaths
+---- Success return string{}
+---@return any files
+function RL.LoadDroppedFiles() end
+
+---Get file modification time (Last write time)
+---- Success return int
+---@param fileName string
+---@return any time
+function RL.GetFileModTime( fileName ) end
+
+-- Core - Compression/Encoding functionality
+
+---Compress data (DEFLATE algorithm)
+---- Success return Buffer
+---@param buffer any
+---@return any compData
+function RL.CompressData( buffer ) end
+
+---Decompress data (DEFLATE algorithm).
+---- Success Buffer
+---@param compData any
+---@return any decompData
+function RL.DecompressData( compData ) end
+
+---Encode data to Base64 string
+---- Success return string, int
+---@param data string
+---@return any encodedData
+---@return any outputSize
+function RL.EncodeDataBase64( data ) end
+
+---Decode Base64 string data
+---- Success return string, int
+---@param data string
+---@return any decodedData
+---@return any outputSize
+function RL.DecodeDataBase64( data ) end
+
+-- Core - Input-related functions: keyboard
---Detect if a key has been pressed once
---- Success return bool
@@ -1667,7 +1881,7 @@ function RL.GetKeyName( key, scancode ) end
---@return any scancode
function RL.GetKeyScancode( key ) end
--- Core - Input-related Gamepad
+-- Core - Input-related functions: gamepads
---Detect if a gamepad is available
---- Success return bool
@@ -1715,7 +1929,7 @@ function RL.GetGamepadAxisMovement( gamepad, axis ) end
---@return any name
function RL.GetGamepadName( gamepad ) end
--- Core - Input-related Mouse
+-- Core - Input-related functions: mouse
---Detect if a mouse button has been pressed once
---- Success return bool
@@ -1776,7 +1990,7 @@ function RL.GetMouseWheelMove() end
---@return any RL.SetMouseCursor
function RL.SetMouseCursor( cursor ) end
--- Core - Input-related Touch
+-- Core - Input-related functions: touch
---Get touch position XY for a touch point index (relative to screen size)
---- Success return Vector2
@@ -1795,7 +2009,7 @@ function RL.GetTouchPointId( index ) end
---@return any count
function RL.GetTouchPointCount() end
--- Core - Input-related Gestures
+-- Core - Input-related functions: gestures
---Enable a set of gestures using flags
---@param int any
@@ -1838,159 +2052,13 @@ function RL.GetGesturePinchVector() end
---@return any angle
function RL.GetGesturePinchAngle() end
--- Core - File
-
----Return game directory (where main.lua is located)
----- Success return string
----@return any path
-function RL.GetBasePath() end
-
----Check if file exists
----- Success return bool
----@param fileName string
----@return any fileExists
-function RL.FileExists( fileName ) end
-
----Check if a directory path exists
----- Success return bool
----@param dirPath string
----@return any dirExists
-function RL.DirectoryExists( dirPath ) end
-
----Check file extension (Including point: .png, .wav)
----- Success return bool
----@param fileName string
----@param ext string
----@return any hasFileExtension
-function RL.IsFileExtension( fileName, ext ) end
-
----Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
----- Success return int
----@param fileName string
----@return any length
-function RL.GetFileLength( fileName ) end
-
----Get pointer to extension for a filename string (Includes dot: '.png')
----- Success return string
----@param fileName string
----@return any extension
-function RL.GetFileExtension( fileName ) end
-
----Get pointer to filename for a path string
----- Success return string
----@param filePath string
----@return any fileName
-function RL.GetFileName( filePath ) end
-
----Get filename string without extension (Uses static string)
----- Success return string
----@param filePath string
----@return any fileName
-function RL.GetFileNameWithoutExt( filePath ) end
-
----Get full path for a given fileName with path (Uses static string)
----- Success return string
----@param filePath string
----@return any filePath
-function RL.GetDirectoryPath( filePath ) end
-
----Get previous directory path for a given path (Uses static string)
----- Success return string
----@param dirPath string
----@return any directory
-function RL.GetPrevDirectoryPath( dirPath ) end
-
----Get current working directory (Uses static string)
----- Success return string
----@return any directory
-function RL.GetWorkingDirectory() end
-
----Load directory filepaths
----- Success return string{}
----@param dirPath string
----@return any fileNames
-function RL.LoadDirectoryFiles( dirPath ) end
-
----Load directory filepaths with extension filtering and recursive directory scan
----- Success return string{}
----@param basePath string
----@param filter string
----@param scanSubdirs boolean
----@return any fileNames
-function RL.LoadDirectoryFilesEx( basePath, filter, scanSubdirs ) end
-
----Change working directory, return true on success
----- Success return bool
----@param directory string
----@return any success
-function RL.ChangeDirectory( directory ) end
-
----Check if a given path is a file or a directory
----- Success return bool
----@param path string
----@return any isFile
-function RL.IsPathFile( path ) end
-
----Check if a file has been dropped into window
----- Success return bool
----@return any iSFileDropped
-function RL.IsFileDropped() end
-
----Load dropped filepaths
----- Success return string{}
----@return any files
-function RL.LoadDroppedFiles() end
-
----Get file modification time (Last write time)
----- Success return int
----@param fileName string
----@return any time
-function RL.GetFileModTime( fileName ) end
-
--- Core - Compression/Encoding functionality
-
----Compress data (DEFLATE algorithm)
----- Success return Buffer
----@param buffer any
----@return any compData
-function RL.CompressData( buffer ) end
-
----Decompress data (DEFLATE algorithm).
----- Success Buffer
----@param compData any
----@return any decompData
-function RL.DecompressData( compData ) end
-
----Encode data to Base64 string
----- Success return string, int
----@param data string
----@return any encodedData
----@return any outputSize
-function RL.EncodeDataBase64( data ) end
-
----Decode Base64 string data
----- Success return string, int
----@param data string
----@return any decodedData
----@return any outputSize
-function RL.DecodeDataBase64( data ) end
-
--- Core - Camera2D
+-- Core - Camera2D System functions
---Return camera2D set to default configuration
---- Success return Camera2D
---@return any camera2D
function RL.CreateCamera2D() end
----Begin 2D mode with custom camera (2D)
----@param camera any
----@return any RL.BeginMode2D
-function RL.BeginMode2D( camera ) end
-
----Ends 2D mode with custom camera
----@return any RL.EndMode2D
-function RL.EndMode2D() end
-
---Set camera target (rotation and zoom origin)
---@param camera any
---@param target table
@@ -2039,22 +2107,13 @@ function RL.GetCamera2DRotation( camera ) end
---@return any zoom
function RL.GetCamera2DZoom( camera ) end
--- Core - Camera3D
+-- Core - Camera3D System functions
---Return camera3D id set to default configuration
---- Success return int
---@return any camera
function RL.CreateCamera3D() end
----Begin 3D mode with custom camera (3D)
----@param camera any
----@return any RL.BeginMode3D
-function RL.BeginMode3D( camera ) end
-
----Ends 3D mode and returns to default 2D orthographic mode
----@return any RL.EndMode3D
-function RL.EndMode3D() end
-
---Set camera position (Remember to call "RL.UpdateCamera3D()" to apply changes)
---@param camera any
---@param position table
@@ -2218,57 +2277,7 @@ function RL.UpdateCamera3D( camera, mode ) end
---@return any RL.UpdateCamera3DPro
function RL.UpdateCamera3DPro( camera, movement, rotation, zoom ) end
--- Core - Screen-space
-
----Get a ray trace from mouse position
----- Success return Ray
----@param mousePosition table
----@param camera any
----@return any ray
-function RL.GetMouseRay( mousePosition, camera ) end
-
----Get camera transform matrix (view matrix)
----- Success return Matrix
----@param camera any
----@return any matrix
-function RL.GetCameraMatrix( camera ) end
-
----Get camera 2d transform matrix
----- Success return Matrix
----@param camera any
----@return any matrix
-function RL.GetCameraMatrix2D( camera ) end
-
----Get the screen space position for a 3d world space position
----- Success return Vector2
----@param position table
----@param camera any
----@return any position
-function RL.GetWorldToScreen( position, camera ) end
-
----Get size position for a 3d world space position
----- Success return Vector2
----@param position table
----@param camera any
----@param size table
----@return any position
-function RL.GetWorldToScreenEx( position, camera, size ) end
-
----Get the screen space position for a 2d camera world space position
----- Success return Vector2
----@param position table
----@param camera any
----@return any position
-function RL.GetWorldToScreen2D( position, camera ) end
-
----Get the world space position for a 2d camera screen space position
----- Success return Vector2
----@param position table
----@param camera any
----@return any position
-function RL.GetScreenToWorld2D( position, camera ) end
-
--- Core - Buffer
+-- Core - Buffer management functions
---Load Buffer. Type should be one of the Buffer types
---- Success return Buffer
@@ -3167,15 +3176,6 @@ function RL.DrawTexturePro( texture, source, dest, origin, rotation, tint ) end
---@return any RL.DrawTextureNPatch
function RL.DrawTextureNPatch( texture, nPatchInfo, dest, origin, rotation, tint ) end
----Begin drawing to render texture
----@param target any
----@return any RL.BeginTextureMode
-function RL.BeginTextureMode( target ) end
-
----Ends drawing to render texture
----@return any RL.EndTextureMode
-function RL.EndTextureMode() end
-
-- Textures - Texture Configuration
---Generate GPU mipmaps for a texture