From 2526c9732e7ea35bc9ed3e43a4db77b7e6364c5a Mon Sep 17 00:00:00 2001 From: jussi Date: Thu, 6 Apr 2023 12:31:37 +0300 Subject: All global variables and functions are not in global RL table. doc_parser creates also ReiLua_API.lua. --- API.md | 1198 +++--- README.md | 35 +- ReiLua_API.lua | 5385 +++++++++++++++++++++++++ changelog | 45 +- devnotes | 1 + doc_parser.lua | 144 +- examples/2D_camera/main.lua | 58 +- examples/ReiLuaGui_examples/calculator.lua | 34 +- examples/ReiLuaGui_examples/file_explorer.lua | 56 +- examples/ReiLuaGui_examples/main.lua | 80 +- examples/ReiLuaGui_test/main.lua | 71 +- examples/bunnymark/main.lua | 32 +- examples/dungeon_crawler/main.lua | 85 +- examples/gui/main.lua | 76 +- examples/heightmap/main.lua | 74 +- examples/image_draw/main.lua | 56 +- examples/instancing/main.lua | 96 +- examples/iqm_test/main.lua | 75 +- examples/lightmap/main.lua | 76 +- examples/n-patches/main.lua | 20 +- examples/pixelated/main.lua | 61 +- examples/platformer/main.lua | 74 +- examples/point_triangle_collision/main.lua | 85 +- examples/pong/main.lua | 46 +- examples/pong_vec/main.lua | 46 +- examples/ray/main.lua | 52 +- examples/resources/lib/gui.lua | 124 +- examples/resources/lib/utillib.lua | 6 +- examples/resources/lib/vector2.lua | 40 +- examples/resources/lib/vector3.lua | 52 +- examples/shaders/main.lua | 70 +- examples/snake/main.lua | 74 +- examples/waving_cubes/main.lua | 50 +- examples/window/main.lua | 28 +- include/main.h | 4 +- src/audio.c | 118 +- src/core.c | 542 +-- src/easings.c | 100 +- src/lights.c | 8 +- src/lua_core.c | 1222 +++--- src/models.c | 273 +- src/rgui.c | 190 +- src/rlgl.c | 6 +- src/rmath.c | 424 +- src/shapes.c | 164 +- src/text.c | 44 +- src/textures.c | 346 +- 47 files changed, 8740 insertions(+), 3206 deletions(-) create mode 100644 ReiLua_API.lua diff --git a/API.md b/API.md index 23f2d36..5b92402 100644 --- a/API.md +++ b/API.md @@ -2,36 +2,34 @@ ## Usage -Application needs 'main.lua' or 'main' file as entry point. ReiLua executable will first look it from same directory. Alternatively, path to the folder where "main.lua" is located can be given as argument. There are three global Lua functions that the engine will call, 'init', 'process' and 'draw'. +Application needs 'main.lua' or 'main' file as entry point. ReiLua executable will first look it from same directory. Alternatively, path to the folder where "main.lua" is located can be given as argument. There are five Lua functions that the framework will call, 'RL.init', 'RL.process', 'RL.draw', 'RL.log' and 'RL.exit'. --- -> function init() +> function RL.init() This function will be called first when 'main.lua' is found --- -> function process( delta ) +> function RL.process( delta ) This function will be called every frame during execution. It will get time duration from last frame on argument 'delta' --- -> function draw() +> function RL.draw() -This function will be called every frame after process and it should have all rendering related functions. -Note: Engine will call Raylib functions 'BeginDrawing()' before this function call and 'EndDrawing()' after it. -You can still use RL_BeginDrawing() and RL_EndDrawing() manually from anywhere. +This function will be called every frame after process and it should have all rendering related functions. Note: Engine will call Raylib functions 'BeginDrawing()' before this function call and 'EndDrawing()' after it. You can still use RL.BeginDrawing() and RL.EndDrawing() manually from anywhere. --- -> function log( logLevel, message ) +> function RL.log( logLevel, message ) This function can be used for custom log message handling. --- -> function exit() +> function RL.exit() This function will be called on program close. Cleanup could be done here. @@ -1088,7 +1086,7 @@ int id. ModelAnimations --- -> state = RL_IsWindowReady() +> state = RL.IsWindowReady() Check if window has been initialized successfully @@ -1096,7 +1094,7 @@ Check if window has been initialized successfully --- -> state = RL_IsWindowFullscreen() +> state = RL.IsWindowFullscreen() Check if window is currently fullscreen @@ -1104,7 +1102,7 @@ Check if window is currently fullscreen --- -> state = RL_IsWindowHidden() +> state = RL.IsWindowHidden() Check if window is currently hidden ( only PLATFORM_DESKTOP ) @@ -1112,7 +1110,7 @@ Check if window is currently hidden ( only PLATFORM_DESKTOP ) --- -> state = RL_IsWindowMinimized() +> state = RL.IsWindowMinimized() Check if window is currently minimized ( only PLATFORM_DESKTOP ) @@ -1120,7 +1118,7 @@ Check if window is currently minimized ( only PLATFORM_DESKTOP ) --- -> state = RL_IsWindowMaximized() +> state = RL.IsWindowMaximized() Check if window is currently maximized ( only PLATFORM_DESKTOP ) @@ -1128,7 +1126,7 @@ Check if window is currently maximized ( only PLATFORM_DESKTOP ) --- -> state = RL_IsWindowFocused() +> state = RL.IsWindowFocused() Check if window is currently focused ( only PLATFORM_DESKTOP ) @@ -1136,7 +1134,7 @@ Check if window is currently focused ( only PLATFORM_DESKTOP ) --- -> success = RL_SetWindowMonitor( int monitor ) +> success = RL.SetWindowMonitor( int monitor ) Set monitor for the current window (fullscreen mode) @@ -1145,7 +1143,7 @@ Set monitor for the current window (fullscreen mode) --- -> success = RL_SetWindowPosition( Vector2 pos ) +> success = RL.SetWindowPosition( Vector2 pos ) Set window position on screen @@ -1154,7 +1152,7 @@ Set window position on screen --- -> success = RL_SetWindowSize( Vector2 size ) +> success = RL.SetWindowSize( Vector2 size ) Set window dimensions @@ -1163,7 +1161,7 @@ Set window dimensions --- -> success = RL_SetWindowMinSize( Vector2 size ) +> success = RL.SetWindowMinSize( Vector2 size ) Set window minimum dimensions ( for FLAG_WINDOW_RESIZABLE ) @@ -1172,7 +1170,7 @@ Set window minimum dimensions ( for FLAG_WINDOW_RESIZABLE ) --- -> position = RL_GetMonitorPosition( int monitor ) +> position = RL.GetMonitorPosition( int monitor ) Get specified monitor position @@ -1181,7 +1179,7 @@ Get specified monitor position --- -> size = RL_GetMonitorSize( int monitor ) +> size = RL.GetMonitorSize( int monitor ) Get specified monitor size @@ -1190,7 +1188,7 @@ Get specified monitor size --- -> position = RL_GetWindowPosition() +> position = RL.GetWindowPosition() Get window position on monitor @@ -1198,7 +1196,7 @@ Get window position on monitor --- -> size = RL_GetScreenSize() +> size = RL.GetScreenSize() Get screen size @@ -1206,7 +1204,7 @@ Get screen size --- -> success = RL_SetWindowState( int flag ) +> success = RL.SetWindowState( int flag ) Set window configuration state using flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE... ) @@ -1215,7 +1213,7 @@ Set window configuration state using flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_R --- -> state = RL_IsWindowState( int flag ) +> state = RL.IsWindowState( int flag ) Check if one specific window flag is enabled ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE... ) @@ -1224,7 +1222,7 @@ Check if one specific window flag is enabled ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW --- -> resized = RL_ClearWindowState( int flag ) +> resized = RL.ClearWindowState( int flag ) Clear window configuration state flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE... ) @@ -1232,7 +1230,7 @@ Clear window configuration state flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZ --- -> resized = RL_IsWindowResized() +> resized = RL.IsWindowResized() Check if window has been resized from last frame @@ -1240,7 +1238,7 @@ Check if window has been resized from last frame --- -> success = RL_SetWindowIcon( Image image ) +> success = RL.SetWindowIcon( Image image ) Set icon for window ( Only PLATFORM_DESKTOP ) @@ -1249,7 +1247,7 @@ Set icon for window ( Only PLATFORM_DESKTOP ) --- -> success = RL_SetWindowTitle( string title ) +> success = RL.SetWindowTitle( string title ) Set title for window ( Only PLATFORM_DESKTOP ) @@ -1258,7 +1256,7 @@ Set title for window ( Only PLATFORM_DESKTOP ) --- -> count = RL_GetMonitorCount() +> count = RL.GetMonitorCount() Get number of connected monitors @@ -1266,7 +1264,7 @@ Get number of connected monitors --- -> monitor = RL_GetCurrentMonitor() +> monitor = RL.GetCurrentMonitor() Get current connected monitor @@ -1274,7 +1272,7 @@ Get current connected monitor --- -> size = RL_GetMonitorPhysicalSize( int monitor ) +> size = RL.GetMonitorPhysicalSize( int monitor ) Get specified monitor physical size in millimetres @@ -1283,7 +1281,7 @@ Get specified monitor physical size in millimetres --- -> size = RL_GetMonitorRefreshRate( int monitor ) +> size = RL.GetMonitorRefreshRate( int monitor ) Get specified monitor refresh rate @@ -1292,7 +1290,7 @@ Get specified monitor refresh rate --- -> scale = RL_GetWindowScaleDPI() +> scale = RL.GetWindowScaleDPI() Get window scale DPI factor @@ -1300,7 +1298,7 @@ Get window scale DPI factor --- -> name = RL_GetMonitorName( int monitor ) +> name = RL.GetMonitorName( int monitor ) Get the human-readable, UTF-8 encoded name of the monitor @@ -1309,13 +1307,13 @@ Get the human-readable, UTF-8 encoded name of the monitor --- -> RL_CloseWindow() +> RL.CloseWindow() Close window and unload OpenGL context and free all resources --- -> success = RL_SetClipboardText( string text ) +> success = RL.SetClipboardText( string text ) Set clipboard text content @@ -1324,7 +1322,7 @@ Set clipboard text content --- -> text = RL_GetClipboardText() +> text = RL.GetClipboardText() Get clipboard text content @@ -1336,7 +1334,7 @@ Get clipboard text content --- -> success = RL_SetTargetFPS( int fps ) +> success = RL.SetTargetFPS( int fps ) Set target FPS ( maximum ) @@ -1345,7 +1343,7 @@ Set target FPS ( maximum ) --- -> FPS = RL_GetFPS() +> FPS = RL.GetFPS() Get current FPS @@ -1353,7 +1351,7 @@ Get current FPS --- -> delta = RL_GetFrameTime() +> delta = RL.GetFrameTime() Get time in seconds for last frame drawn ( Delta time ) @@ -1361,7 +1359,7 @@ Get time in seconds for last frame drawn ( Delta time ) --- -> time = RL_GetTime() +> time = RL.GetTime() Get elapsed time in seconds since InitWindow() @@ -1373,7 +1371,7 @@ Get elapsed time in seconds since InitWindow() --- -> success = RL_TakeScreenshot( string fileName ) +> success = RL.TakeScreenshot( string fileName ) Takes a screenshot of current screen ( filename extension defines format ) @@ -1382,7 +1380,7 @@ Takes a screenshot of current screen ( filename extension defines format ) --- -> success = RL_SetConfigFlags( int flags ) +> success = RL.SetConfigFlags( int flags ) Setup init configuration flags ( view FLAGS ) @@ -1391,7 +1389,7 @@ Setup init configuration flags ( view FLAGS ) --- -> success = RL_TraceLog( int logLevel, string text ) +> success = RL.TraceLog( int logLevel, string text ) Show trace log messages ( LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR... ) @@ -1400,7 +1398,7 @@ Show trace log messages ( LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR... ) --- -> success = RL_SetTraceLogLevel( int logLevel ) +> success = RL.SetTraceLogLevel( int logLevel ) Set the current threshold ( minimum ) log level @@ -1409,7 +1407,7 @@ Set the current threshold ( minimum ) log level --- -> success = RL_OpenURL( string url ) +> success = RL.OpenURL( string url ) Open URL with default system browser ( If available ) @@ -1422,19 +1420,19 @@ Open URL with default system browser ( If available ) --- -> RL_ShowCursor() +> RL.ShowCursor() Shows cursor --- -> RL_HideCursor() +> RL.HideCursor() Hides cursor --- -> hidden = RL_IsCursorHidden() +> hidden = RL.IsCursorHidden() Check if cursor is not visible @@ -1442,19 +1440,19 @@ Check if cursor is not visible --- -> RL_EnableCursor() +> RL.EnableCursor() Enables cursor (unlock cursor) --- -> RL_DisableCursor() +> RL.DisableCursor() Disables cursor (lock cursor) --- -> onSreen = RL_IsCursorOnScreen() +> onSreen = RL.IsCursorOnScreen() Check if cursor is on the screen @@ -1466,7 +1464,7 @@ Check if cursor is on the screen --- -> success = RL_ClearBackground( Color color ) +> success = RL.ClearBackground( Color color ) Set background color ( framebuffer clear color ) @@ -1475,19 +1473,19 @@ Set background color ( framebuffer clear color ) --- -> RL_BeginDrawing() +> RL.BeginDrawing() Setup canvas ( framebuffer ) to start drawing --- -> RL_EndDrawing() +> RL.EndDrawing() End canvas drawing and swap buffers ( double buffering ) --- -> success = RL_BeginBlendMode( int mode ) +> success = RL.BeginBlendMode( int mode ) Begin blending mode ( BLEND_ALPHA, BLEND_ADDITIVE, BLEND_MULTIPLIED... ) @@ -1496,13 +1494,13 @@ Begin blending mode ( BLEND_ALPHA, BLEND_ADDITIVE, BLEND_MULTIPLIED... ) --- -> RL_EndBlendMode() +> RL.EndBlendMode() End blending mode ( reset to default: BLEND_ALPHA ) --- -> success = RL_BeginScissorMode( Rectangle rectange ) +> success = RL.BeginScissorMode( Rectangle rectange ) Begin scissor mode ( define screen area for following drawing ) @@ -1511,7 +1509,7 @@ Begin scissor mode ( define screen area for following drawing ) --- -> RL_EndScissorMode() +> RL.EndScissorMode() End scissor mode @@ -1521,7 +1519,7 @@ End scissor mode --- -> shader = RL_LoadShader( string vsFileName, string fsFileName ) +> shader = RL.LoadShader( string vsFileName, string fsFileName ) Load shader from files and bind default locations. NOTE: Set nil if no shader @@ -1531,7 +1529,7 @@ NOTE: Set nil if no shader --- -> shader = RL_LoadShaderFromMemory( string vsCode, string fsCode ) +> shader = RL.LoadShaderFromMemory( string vsCode, string fsCode ) Load shader from code strings and bind default locations NOTE: Set nil if no shader @@ -1541,7 +1539,7 @@ NOTE: Set nil if no shader --- -> success = RL_BeginShaderMode( Shader shader ) +> success = RL.BeginShaderMode( Shader shader ) Begin custom shader drawing @@ -1550,13 +1548,13 @@ Begin custom shader drawing --- -> EndShaderMode() +> RL.EndShaderMode() End custom shader drawing ( use default shader ) --- -> location = RL_GetShaderLocation( Shader shader, string uniformName ) +> location = RL.GetShaderLocation( Shader shader, string uniformName ) Get shader uniform location @@ -1565,7 +1563,7 @@ Get shader uniform location --- -> location = RL_GetShaderLocationAttrib( Shader shader, string attribName ) +> location = RL.GetShaderLocationAttrib( Shader shader, string attribName ) Get shader attribute location @@ -1574,7 +1572,7 @@ Get shader attribute location --- -> success = RL_SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location ) +> success = RL.SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location ) Set shader location index @@ -1583,7 +1581,7 @@ Set shader location index --- -> location = RL_GetShaderLocationIndex( Shader shader, int shaderLocationIndex ) +> location = RL.GetShaderLocationIndex( Shader shader, int shaderLocationIndex ) Get shader location index @@ -1592,7 +1590,7 @@ Get shader location index --- -> success = RL_SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat ) +> success = RL.SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat ) Set shader uniform value ( matrix 4x4 ) @@ -1601,7 +1599,7 @@ Set shader uniform value ( matrix 4x4 ) --- -> success = RL_SetShaderValueTexture( Shader shader, int locIndex, Texture2D texture ) +> success = RL.SetShaderValueTexture( Shader shader, int locIndex, Texture2D texture ) Set shader uniform value for texture ( sampler2d ) @@ -1610,7 +1608,7 @@ Set shader uniform value for texture ( sampler2d ) --- -> success = RL_SetShaderValue( Shader shader, int locIndex, number{} values, int uniformType ) +> success = RL.SetShaderValue( Shader shader, int locIndex, number{} values, int uniformType ) Set shader uniform value NOTE: Even one value should be in table @@ -1620,7 +1618,7 @@ NOTE: Even one value should be in table --- -> success = RL_SetShaderValueV( Shader shader, int locIndex, number{} values, int uniformType, int count ) +> success = RL.SetShaderValueV( Shader shader, int locIndex, number{} values, int uniformType, int count ) Set shader uniform value vector NOTE: Even one value should be in table @@ -1630,7 +1628,7 @@ NOTE: Even one value should be in table --- -> success = RL_UnloadShader( Shader shader ) +> success = RL.UnloadShader( Shader shader ) Unload shader from GPU memory ( VRAM ) @@ -1643,7 +1641,7 @@ Unload shader from GPU memory ( VRAM ) --- -> pressed = RL_IsKeyPressed( int key ) +> pressed = RL.IsKeyPressed( int key ) Detect if a key has been pressed once @@ -1652,7 +1650,7 @@ Detect if a key has been pressed once --- -> pressed = RL_IsKeyDown( int key ) +> pressed = RL.IsKeyDown( int key ) Detect if a key is being pressed @@ -1661,7 +1659,7 @@ Detect if a key is being pressed --- -> released = RL_IsKeyReleased( int key ) +> released = RL.IsKeyReleased( int key ) Detect if a key has been released once @@ -1670,7 +1668,7 @@ Detect if a key has been released once --- -> released = RL_IsKeyUp( int key ) +> released = RL.IsKeyUp( int key ) Check if a key is NOT being pressed @@ -1679,7 +1677,7 @@ Check if a key is NOT being pressed --- -> keycode = RL_GetKeyPressed() +> keycode = RL.GetKeyPressed() Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty @@ -1687,7 +1685,7 @@ Get key pressed (keycode), call it multiple times for keys queued, returns 0 whe --- -> unicode = RL_GetCharPressed() +> unicode = RL.GetCharPressed() Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty @@ -1695,13 +1693,13 @@ Get char pressed (unicode), call it multiple times for chars queued, returns 0 w --- -> RL_SetExitKey( int key ) +> RL.SetExitKey( int key ) Set a custom key to exit program ( default is ESC ) --- -> keyName = RL_GetKeyName( int key, int scancode ) +> keyName = RL.GetKeyName( int key, int scancode ) This function returns the name of the specified printable key, encoded as UTF-8. This is typically the character that key would produce without any modifier keys, @@ -1721,7 +1719,7 @@ this function returns nil but does not emit an error. --- -> scancode = RL_GetKeyScancode( int key ) +> scancode = RL.GetKeyScancode( int key ) This function returns the platform-specific scancode of the specified key. If the key is KEY_UNKNOWN or does not exist on the keyboard this method will return -1. @@ -1735,7 +1733,7 @@ If the key is KEY_UNKNOWN or does not exist on the keyboard this method will ret --- -> available = RL_IsGamepadAvailable( int gamepad ) +> available = RL.IsGamepadAvailable( int gamepad ) Detect if a gamepad is available @@ -1744,7 +1742,7 @@ Detect if a gamepad is available --- -> pressed = RL_IsGamepadButtonPressed( int gamepad, int button ) +> pressed = RL.IsGamepadButtonPressed( int gamepad, int button ) Detect if a gamepad button has been pressed once @@ -1753,7 +1751,7 @@ Detect if a gamepad button has been pressed once --- -> pressed = RL_IsGamepadButtonDown( int gamepad, int button ) +> pressed = RL.IsGamepadButtonDown( int gamepad, int button ) Detect if a gamepad button is being pressed @@ -1762,7 +1760,7 @@ Detect if a gamepad button is being pressed --- -> released = RL_IsGamepadButtonReleased( int gamepad, int button ) +> released = RL.IsGamepadButtonReleased( int gamepad, int button ) Detect if a gamepad button has been released once @@ -1771,7 +1769,7 @@ Detect if a gamepad button has been released once --- -> count = RL_GetGamepadAxisCount( int gamepad ) +> count = RL.GetGamepadAxisCount( int gamepad ) Return gamepad axis count for a gamepad @@ -1780,7 +1778,7 @@ Return gamepad axis count for a gamepad --- -> value = RL_GetGamepadAxisMovement( int gamepad, int axis ) +> value = RL.GetGamepadAxisMovement( int gamepad, int axis ) Return axis movement value for a gamepad axis @@ -1789,7 +1787,7 @@ Return axis movement value for a gamepad axis --- -> name = RL_GetGamepadName( int gamepad ) +> name = RL.GetGamepadName( int gamepad ) Return gamepad internal name id @@ -1802,7 +1800,7 @@ Return gamepad internal name id --- -> pressed = RL_IsMouseButtonPressed( int button ) +> pressed = RL.IsMouseButtonPressed( int button ) Detect if a mouse button has been pressed once @@ -1811,7 +1809,7 @@ Detect if a mouse button has been pressed once --- -> pressed = RL_IsMouseButtonDown( int button ) +> pressed = RL.IsMouseButtonDown( int button ) Detect if a mouse button is being pressed @@ -1820,7 +1818,7 @@ Detect if a mouse button is being pressed --- -> released = RL_IsMouseButtonReleased( int button ) +> released = RL.IsMouseButtonReleased( int button ) Detect if a mouse button has been released once @@ -1829,7 +1827,7 @@ Detect if a mouse button has been released once --- -> released = RL_IsMouseButtonUp( int button ) +> released = RL.IsMouseButtonUp( int button ) Check if a mouse button is NOT being pressed @@ -1838,7 +1836,7 @@ Check if a mouse button is NOT being pressed --- -> position = RL_GetMousePosition() +> position = RL.GetMousePosition() Returns mouse position @@ -1846,7 +1844,7 @@ Returns mouse position --- -> position = RL_GetMouseDelta() +> position = RL.GetMouseDelta() Get mouse delta between frames @@ -1854,7 +1852,7 @@ Get mouse delta between frames --- -> success = RL_SetMousePosition( Vector2 position ) +> success = RL.SetMousePosition( Vector2 position ) Set mouse position XY @@ -1863,7 +1861,7 @@ Set mouse position XY --- -> success = RL_SetMouseOffset( Vector2 offset ) +> success = RL.SetMouseOffset( Vector2 offset ) Set mouse offset @@ -1872,7 +1870,7 @@ Set mouse offset --- -> success = RL_SetMouseScale( Vector2 scale ) +> success = RL.SetMouseScale( Vector2 scale ) Set mouse scaling @@ -1881,7 +1879,7 @@ Set mouse scaling --- -> movement = RL_GetMouseWheelMove() +> movement = RL.GetMouseWheelMove() Returns mouse wheel movement Y @@ -1889,7 +1887,7 @@ Returns mouse wheel movement Y --- -> success = RL_SetMouseCursor( int cursor ) +> success = RL.SetMouseCursor( int cursor ) Set mouse cursor @@ -1902,7 +1900,7 @@ Set mouse cursor --- -> position = RL_GetTouchPosition( int index ) +> position = RL.GetTouchPosition( int index ) Get touch position XY for a touch point index ( relative to screen size ) @@ -1911,7 +1909,7 @@ Get touch position XY for a touch point index ( relative to screen size ) --- -> id = RL_GetTouchPointId( int index ) +> id = RL.GetTouchPointId( int index ) Get touch point identifier for given index @@ -1920,7 +1918,7 @@ Get touch point identifier for given index --- -> count = RL_GetTouchPointCount() +> count = RL.GetTouchPointCount() Get touch point identifier for given index @@ -1932,7 +1930,7 @@ Get touch point identifier for given index --- -> success = RL_SetGesturesEnabled( unsigned int flags ) +> success = RL.SetGesturesEnabled( unsigned int flags ) Enable a set of gestures using flags @@ -1941,7 +1939,7 @@ Enable a set of gestures using flags --- -> detected = RL_IsGestureDetected( int gesture ) +> detected = RL.IsGestureDetected( int gesture ) Check if a gesture have been detected @@ -1950,7 +1948,7 @@ Check if a gesture have been detected --- -> gesture = RL_GetGestureDetected() +> gesture = RL.GetGestureDetected() Get latest detected gesture @@ -1958,7 +1956,7 @@ Get latest detected gesture --- -> time = RL_GetGestureHoldDuration() +> time = RL.GetGestureHoldDuration() Get gesture hold time in milliseconds @@ -1966,7 +1964,7 @@ Get gesture hold time in milliseconds --- -> vector = RL_GetGestureDragVector() +> vector = RL.GetGestureDragVector() Get gesture drag vector @@ -1974,7 +1972,7 @@ Get gesture drag vector --- -> angle = RL_GetGestureDragAngle() +> angle = RL.GetGestureDragAngle() Get gesture drag angle @@ -1982,7 +1980,7 @@ Get gesture drag angle --- -> vector = RL_GetGesturePinchVector() +> vector = RL.GetGesturePinchVector() Get gesture pinch delta @@ -1990,7 +1988,7 @@ Get gesture pinch delta --- -> angle = RL_GetGesturePinchAngle() +> angle = RL.GetGesturePinchAngle() Get gesture pinch angle @@ -2002,7 +2000,7 @@ Get gesture pinch angle --- -> path = RL_GetBasePath() +> path = RL.GetBasePath() Return game directory ( where main.lua is located ) @@ -2010,7 +2008,7 @@ Return game directory ( where main.lua is located ) --- -> fileExists = RL_FileExists( string fileName ) +> fileExists = RL.FileExists( string fileName ) Check if file exists @@ -2019,7 +2017,7 @@ Check if file exists --- -> dirExists = RL_DirectoryExists( string dirPath ) +> dirExists = RL.DirectoryExists( string dirPath ) Check if a directory path exists @@ -2028,7 +2026,7 @@ Check if a directory path exists --- -> hasFileExtension = RL_IsFileExtension( string fileName, string ext ) +> hasFileExtension = RL.IsFileExtension( string fileName, string ext ) Check file extension ( Including point: .png, .wav ) @@ -2037,7 +2035,7 @@ Check file extension ( Including point: .png, .wav ) --- -> length = RL_GetFileLength( string fileName ) +> length = RL.GetFileLength( string fileName ) Get file length in bytes ( NOTE: GetFileSize() conflicts with windows.h ) @@ -2046,7 +2044,7 @@ Get file length in bytes ( NOTE: GetFileSize() conflicts with windows.h ) --- -> extension = RL_GetFileExtension( string fileName ) +> extension = RL.GetFileExtension( string fileName ) Get pointer to extension for a filename string ( Includes dot: '.png' ) @@ -2055,7 +2053,7 @@ Get pointer to extension for a filename string ( Includes dot: '.png' ) --- -> filePath = RL_GetFileName( string filePath ) +> filePath = RL.GetFileName( string filePath ) Get pointer to filename for a path string @@ -2064,7 +2062,7 @@ Get pointer to filename for a path string --- -> filePath = RL_GetFileNameWithoutExt( string filePath ) +> filePath = RL.GetFileNameWithoutExt( string filePath ) Get filename string without extension ( Uses static string ) @@ -2073,7 +2071,7 @@ Get filename string without extension ( Uses static string ) --- -> filePath = RL_GetDirectoryPath( string filePath ) +> filePath = RL.GetDirectoryPath( string filePath ) Get full path for a given fileName with path ( Uses static string ) @@ -2082,7 +2080,7 @@ Get full path for a given fileName with path ( Uses static string ) --- -> directory = RL_GetPrevDirectoryPath( string dirPath ) +> directory = RL.GetPrevDirectoryPath( string dirPath ) Get previous directory path for a given path ( Uses static string ) @@ -2091,7 +2089,7 @@ Get previous directory path for a given path ( Uses static string ) --- -> directory = RL_GetWorkingDirectory() +> directory = RL.GetWorkingDirectory() Get current working directory ( Uses static string ) @@ -2099,7 +2097,7 @@ Get current working directory ( Uses static string ) --- -> fileNames = RL_LoadDirectoryFiles( string dirPath ) +> fileNames = RL.LoadDirectoryFiles( string dirPath ) Load directory filepaths @@ -2108,7 +2106,7 @@ Load directory filepaths --- -> fileNames = RL_LoadDirectoryFilesEx( string basePath, string filter, bool scanSubdirs ) +> fileNames = RL.LoadDirectoryFilesEx( string basePath, string filter, bool scanSubdirs ) Load directory filepaths with extension filtering and recursive directory scan @@ -2117,7 +2115,7 @@ Load directory filepaths with extension filtering and recursive directory scan --- -> success = RL_ChangeDirectory( string directory ) +> success = RL.ChangeDirectory( string directory ) Change working directory, return true on success @@ -2126,7 +2124,7 @@ Change working directory, return true on success --- -> isFile = RL_IsPathFile( string path ) +> isFile = RL.IsPathFile( string path ) Check if a given path is a file or a directory @@ -2135,7 +2133,7 @@ Check if a given path is a file or a directory --- -> fileDropped = RL_IsFileDropped() +> fileDropped = RL.IsFileDropped() Check if a file has been dropped into window @@ -2143,7 +2141,7 @@ Check if a file has been dropped into window --- -> files = RL_LoadDroppedFiles() +> files = RL.LoadDroppedFiles() Load dropped filepaths @@ -2151,7 +2149,7 @@ Load dropped filepaths --- -> time = RL_GetFileModTime( string fileName ) +> time = RL.GetFileModTime( string fileName ) Get file modification time ( Last write time ) @@ -2164,7 +2162,7 @@ Get file modification time ( Last write time ) --- -> camera2D = RL_CreateCamera2D() +> camera2D = RL.CreateCamera2D() Return camera2D id set to default configuration @@ -2172,7 +2170,7 @@ Return camera2D id set to default configuration --- -> success = RL_UnloadCamera2D( int Camera2D ) +> success = RL.UnloadCamera2D( int Camera2D ) Unload Camera2D @@ -2181,7 +2179,7 @@ Unload Camera2D --- -> success = RL_BeginMode2D( camera2D camera ) +> success = RL.BeginMode2D( camera2D camera ) Begin 2D mode with custom camera ( 2D ) @@ -2190,13 +2188,13 @@ Begin 2D mode with custom camera ( 2D ) --- -> RL_EndMode2D() +> RL.EndMode2D() Ends 2D mode with custom camera --- -> success = RL_SetCamera2DTarget( camera2D camera, Vector2 target ) +> success = RL.SetCamera2DTarget( camera2D camera, Vector2 target ) Set camera target ( rotation and zoom origin ) @@ -2205,7 +2203,7 @@ Set camera target ( rotation and zoom origin ) --- -> success = RL_SetCamera2DOffset( camera2D camera, Vector2 offset ) +> success = RL.SetCamera2DOffset( camera2D camera, Vector2 offset ) Set camera offset ( displacement from target ) @@ -2214,7 +2212,7 @@ Set camera offset ( displacement from target ) --- -> success = RL_SetCamera2DRotation( camera3D camera, float rotation ) +> success = RL.SetCamera2DRotation( camera3D camera, float rotation ) Set camera rotation in degrees @@ -2223,7 +2221,7 @@ Set camera rotation in degrees --- -> success = RL_SetCamera2DZoom( camera3D camera, float zoom ) +> success = RL.SetCamera2DZoom( camera3D camera, float zoom ) Set camera zoom ( scaling ), should be 1.0f by default @@ -2232,7 +2230,7 @@ Set camera zoom ( scaling ), should be 1.0f by default --- -> target = RL_GetCamera2DTarget( camera2D camera ) +> target = RL.GetCamera2DTarget( camera2D camera ) Get camera2D target @@ -2241,7 +2239,7 @@ Get camera2D target --- -> offset = RL_GetCamera2DOffset( camera2D camera ) +> offset = RL.GetCamera2DOffset( camera2D camera ) Get camera2D offset @@ -2250,7 +2248,7 @@ Get camera2D offset --- -> rotation = RL_GetCamera2DRotation( camera2D camera ) +> rotation = RL.GetCamera2DRotation( camera2D camera ) Get camera2D rotation @@ -2259,7 +2257,7 @@ Get camera2D rotation --- -> zoom = RL_GetCamera2DZoom( camera2D camera ) +> zoom = RL.GetCamera2DZoom( camera2D camera ) Get camera2D zoom @@ -2272,7 +2270,7 @@ Get camera2D zoom --- -> camera = RL_CreateCamera3D() +> camera = RL.CreateCamera3D() Return camera3D id set to default configuration @@ -2280,7 +2278,7 @@ Return camera3D id set to default configuration --- -> success = RL_UnloadCamera3D( int Camera3D ) +> success = RL.UnloadCamera3D( int Camera3D ) Unload Camera3D @@ -2289,7 +2287,7 @@ Unload Camera3D --- -> success = RL_BeginMode3D( camera3D camera ) +> success = RL.BeginMode3D( camera3D camera ) Begin 3D mode with custom camera ( 3D ) @@ -2298,22 +2296,22 @@ Begin 3D mode with custom camera ( 3D ) --- -> RL_EndMode3D() +> RL.EndMode3D() Ends 3D mode and returns to default 2D orthographic mode --- -> success = RL_SetCamera3DPosition( camera3D camera, Vector3 position ) +> success = RL.SetCamera3DPosition( camera3D camera, Vector3 position ) -Set camera position ( Remember to call "RL_UpdateCamera3D()" to apply changes ) +Set camera position ( Remember to call "RL.UpdateCamera3D()" to apply changes ) - Failure return false - Success return true --- -> success = RL_SetCamera3DTarget( camera3D camera, Vector3 target ) +> success = RL.SetCamera3DTarget( camera3D camera, Vector3 target ) Set camera target it looks-at @@ -2322,7 +2320,7 @@ Set camera target it looks-at --- -> success = RL_SetCamera3DUp( camera3D camera, Vector3 up ) +> success = RL.SetCamera3DUp( camera3D camera, Vector3 up ) Set camera up vector ( Rotation over it's axis ) @@ -2331,7 +2329,7 @@ Set camera up vector ( Rotation over it's axis ) --- -> success = RL_SetCamera3DFovy( camera3D camera, float fovy ) +> success = RL.SetCamera3DFovy( camera3D camera, float fovy ) Set camera field-of-view apperture in Y ( degrees ) in perspective, used as near plane width in orthographic @@ -2340,7 +2338,7 @@ Set camera field-of-view apperture in Y ( degrees ) in perspective, used as near --- -> success = RL_SetCamera3DProjection( camera3D camera, int projection ) +> success = RL.SetCamera3DProjection( camera3D camera, int projection ) Set camera projection mode ( CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC ) @@ -2349,7 +2347,7 @@ Set camera projection mode ( CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC ) --- -> success = RL_SetCameraMode( camera3D camera, int mode ) +> success = RL.SetCameraMode( camera3D camera, int mode ) Set camera mode ( CAMERA_CUSTOM, CAMERA_FREE, CAMERA_ORBITAL... ) @@ -2358,7 +2356,7 @@ Set camera mode ( CAMERA_CUSTOM, CAMERA_FREE, CAMERA_ORBITAL... ) --- -> position = RL_GetCamera3DPosition( camera3D camera ) +> position = RL.GetCamera3DPosition( camera3D camera ) Get camera position @@ -2367,7 +2365,7 @@ Get camera position --- -> target = RL_GetCamera3DTarget( camera3D camera ) +> target = RL.GetCamera3DTarget( camera3D camera ) Get camera target it looks-at @@ -2376,7 +2374,7 @@ Get camera target it looks-at --- -> up = RL_GetCamera3DUp( camera3D camera ) +> up = RL.GetCamera3DUp( camera3D camera ) Get camera up vector ( Rotation over it's axis ) @@ -2385,7 +2383,7 @@ Get camera up vector ( Rotation over it's axis ) --- -> fovy = RL_GetCamera3DFovy( camera3D camera ) +> fovy = RL.GetCamera3DFovy( camera3D camera ) Get camera field-of-view apperture in Y ( degrees ) in perspective, used as near plane width in orthographic @@ -2394,7 +2392,7 @@ Get camera field-of-view apperture in Y ( degrees ) in perspective, used as near --- -> projection = RL_GetCamera3DProjection( camera3D camera ) +> projection = RL.GetCamera3DProjection( camera3D camera ) Get camera projection mode @@ -2403,7 +2401,7 @@ Get camera projection mode --- -> success = RL_UpdateCamera3D( camera3D camera ) +> success = RL.UpdateCamera3D( camera3D camera ) Update camera position for selected mode @@ -2412,7 +2410,7 @@ Update camera position for selected mode --- -> success = RL_SetCameraPanControl( int keyPan ) +> success = RL.SetCameraPanControl( int keyPan ) Set camera pan key to combine with mouse movement ( free camera ) @@ -2421,7 +2419,7 @@ Set camera pan key to combine with mouse movement ( free camera ) --- -> success = RL_SetCameraAltControl( int keyAlt ) +> success = RL.SetCameraAltControl( int keyAlt ) Set camera alt key to combine with mouse movement ( free camera ) @@ -2430,7 +2428,7 @@ Set camera alt key to combine with mouse movement ( free camera ) --- -> success = RL_SetCameraSmoothZoomControl( int keySmoothZoom ) +> success = RL.SetCameraSmoothZoomControl( int keySmoothZoom ) Set camera smooth zoom key to combine with mouse ( free camera ) @@ -2439,7 +2437,7 @@ Set camera smooth zoom key to combine with mouse ( free camera ) --- -> success = RL_SetCameraMoveControls( int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown ) +> success = RL.SetCameraMoveControls( int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown ) Set camera move controls ( 1st person and 3rd person cameras ) @@ -2452,7 +2450,7 @@ Set camera move controls ( 1st person and 3rd person cameras ) --- -> ray = RL_GetMouseRay( Vector2 mousePosition, Camera3D camera ) +> ray = RL.GetMouseRay( Vector2 mousePosition, Camera3D camera ) Get a ray trace from mouse position @@ -2461,7 +2459,7 @@ Get a ray trace from mouse position --- -> matrix = RL_GetCameraMatrix( Camera3D camera ) +> matrix = RL.GetCameraMatrix( Camera3D camera ) Get camera transform matrix ( view matrix ) @@ -2470,7 +2468,7 @@ Get camera transform matrix ( view matrix ) --- -> matrix = RL_GetCameraMatrix2D( Camera2D camera ) +> matrix = RL.GetCameraMatrix2D( Camera2D camera ) Get camera 2d transform matrix @@ -2479,7 +2477,7 @@ Get camera 2d transform matrix --- -> position = RL_GetWorldToScreen( Vector3 position, Camera3D camera ) +> position = RL.GetWorldToScreen( Vector3 position, Camera3D camera ) Get the screen space position for a 3d world space position @@ -2488,7 +2486,7 @@ Get the screen space position for a 3d world space position --- -> position = RL_GetWorldToScreenEx( Vector3 position, Camera3D camera, Vector2 size ) +> position = RL.GetWorldToScreenEx( Vector3 position, Camera3D camera, Vector2 size ) Get size position for a 3d world space position @@ -2497,7 +2495,7 @@ Get size position for a 3d world space position --- -> position = RL_GetWorldToScreen2D( Vector2 position, Camera2D camera ) +> position = RL.GetWorldToScreen2D( Vector2 position, Camera2D camera ) Get the screen space position for a 2d camera world space position @@ -2506,7 +2504,7 @@ Get the screen space position for a 2d camera world space position --- -> position = RL_GetScreenToWorld2D( Vector2 position, Camera2D camera ) +> position = RL.GetScreenToWorld2D( Vector2 position, Camera2D camera ) Get the world space position for a 2d camera screen space position @@ -2519,7 +2517,7 @@ Get the world space position for a 2d camera screen space position --- -> success = RL_SetShapesTexture( Texture2D texture, Rectangle source ) +> success = RL.SetShapesTexture( Texture2D texture, Rectangle source ) Set texture and rectangle to be used on shapes drawing NOTE: It can be useful when using basic shapes and one single font, @@ -2530,7 +2528,7 @@ defining a font char white rectangle would allow drawing everything in a single --- -> success = RL_DrawPixel( Vector2 pos, Color color ) +> success = RL.DrawPixel( Vector2 pos, Color color ) Draw a pixel @@ -2539,7 +2537,7 @@ Draw a pixel --- -> success = RL_DrawLine( Vector2 startPos, Vector2 endPos, float thickness, Color color ) +> success = RL.DrawLine( Vector2 startPos, Vector2 endPos, float thickness, Color color ) Draw a line defining thickness @@ -2548,7 +2546,7 @@ Draw a line defining thickness --- -> success = RL_DrawLineBezier( Vector2 startPos, Vector2 endPos, float thickness, Color color ) +> success = RL.DrawLineBezier( Vector2 startPos, Vector2 endPos, float thickness, Color color ) Draw a line using cubic-bezier curves in-out @@ -2557,7 +2555,7 @@ Draw a line using cubic-bezier curves in-out --- -> success = RL_DrawLineBezierQuad( Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thickness, Color color ) +> success = RL.DrawLineBezierQuad( Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thickness, Color color ) Draw line using quadratic bezier curves with a control point @@ -2566,7 +2564,7 @@ Draw line using quadratic bezier curves with a control point --- -> success = RL_DrawLineBezierCubic( Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thickness, Color color ) +> success = RL.DrawLineBezierCubic( Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thickness, Color color ) Draw line using quadratic bezier curves with a control point @@ -2575,7 +2573,7 @@ Draw line using quadratic bezier curves with a control point --- -> success = RL_DrawLineStrip( Vector2 points{}, int pointsCount, Color color ) +> success = RL.DrawLineStrip( Vector2{} points, int pointsCount, Color color ) Draw lines sequence @@ -2584,7 +2582,7 @@ Draw lines sequence --- -> success = RL_DrawCircle( Vector2 center, float radius, Color color ) +> success = RL.DrawCircle( Vector2 center, float radius, Color color ) Draw a color-filled circle @@ -2593,7 +2591,7 @@ Draw a color-filled circle --- -> success = RL_DrawCircleSector( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color ) +> success = RL.DrawCircleSector( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color ) Draw a piece of a circle @@ -2602,7 +2600,7 @@ Draw a piece of a circle --- -> success = RL_DrawCircleSectorLines( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color ) +> success = RL.DrawCircleSectorLines( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color ) Draw circle sector outline @@ -2611,7 +2609,7 @@ Draw circle sector outline --- -> success = RL_DrawCircleGradient( Vector2 center, float radius, Color color1, Color color2 ) +> success = RL.DrawCircleGradient( Vector2 center, float radius, Color color1, Color color2 ) Draw a gradient-filled circle @@ -2620,7 +2618,7 @@ Draw a gradient-filled circle --- -> success = RL_DrawCircleLines( Vector2 center, float radius, Color color ) +> success = RL.DrawCircleLines( Vector2 center, float radius, Color color ) Draw circle outline @@ -2629,7 +2627,7 @@ Draw circle outline --- -> success = RL_DrawEllipse( Vector2 center, float radiusH, float radiusV, Color color ) +> success = RL.DrawEllipse( Vector2 center, float radiusH, float radiusV, Color color ) Draw ellipse @@ -2638,7 +2636,7 @@ Draw ellipse --- -> success = RL_DrawEllipseLines( Vector2 center, float radiusH, float radiusV, Color color ) +> success = RL.DrawEllipseLines( Vector2 center, float radiusH, float radiusV, Color color ) Draw ellipse outline @@ -2647,7 +2645,7 @@ Draw ellipse outline --- -> success = RL_DrawRing( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color ) +> success = RL.DrawRing( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color ) Draw ring @@ -2656,7 +2654,7 @@ Draw ring --- -> success = RL_DrawRingLines( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color ) +> success = RL.DrawRingLines( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color ) Draw ring outline @@ -2665,7 +2663,7 @@ Draw ring outline --- -> success = RL_DrawRectangle( Rectangle rec, Color color ) +> success = RL.DrawRectangle( Rectangle rec, Color color ) Draw a color-filled rectangle @@ -2674,7 +2672,7 @@ Draw a color-filled rectangle --- -> success = RL_DrawRectanglePro( Rectangle rec, Vector2 origin, float rotation, Color color ) +> success = RL.DrawRectanglePro( Rectangle rec, Vector2 origin, float rotation, Color color ) Draw a color-filled rectangle with pro parameters @@ -2683,7 +2681,7 @@ Draw a color-filled rectangle with pro parameters --- -> success = RL_DrawRectangleGradientV( Rectangle rectangle, Color color1, Color color2 ) +> success = RL.DrawRectangleGradientV( Rectangle rectangle, Color color1, Color color2 ) Draw a vertical-gradient-filled rectangle @@ -2692,7 +2690,7 @@ Draw a vertical-gradient-filled rectangle --- -> success = RL_DrawRectangleGradientH( Rectangle rectangle, Color color1, Color color2 ) +> success = RL.DrawRectangleGradientH( Rectangle rectangle, Color color1, Color color2 ) Draw a horizontal-gradient-filled rectangle @@ -2701,7 +2699,7 @@ Draw a horizontal-gradient-filled rectangle --- -> success = RL_DrawRectangleGradientEx( Rectangle rectangle, Color col1, Color col2, Color col3, Color col4 ) +> success = RL.DrawRectangleGradientEx( Rectangle rectangle, Color col1, Color col2, Color col3, Color col4 ) Draw a gradient-filled rectangle with custom vertex colors @@ -2710,7 +2708,7 @@ Draw a gradient-filled rectangle with custom vertex colors --- -> success = RL_DrawRectangleLines( Rectangle rec, Color color ) +> success = RL.DrawRectangleLines( Rectangle rec, Color color ) Draw rectangle outline @@ -2719,7 +2717,7 @@ Draw rectangle outline --- -> success = RL_DrawRectangleLinesEx( Rectangle rec, int lineThick, Color color ) +> success = RL.DrawRectangleLinesEx( Rectangle rec, int lineThick, Color color ) Draw rectangle outline with extended parameters @@ -2728,7 +2726,7 @@ Draw rectangle outline with extended parameters --- -> success = RL_DrawRectangleRounded( Rectangle rec, float roundness, int segments, Color color ) +> success = RL.DrawRectangleRounded( Rectangle rec, float roundness, int segments, Color color ) Draw rectangle with rounded edges @@ -2737,7 +2735,7 @@ Draw rectangle with rounded edges --- -> success = RL_DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, int lineThick, Color color ) +> success = RL.DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, int lineThick, Color color ) Draw rectangle with rounded edges outline @@ -2746,7 +2744,7 @@ Draw rectangle with rounded edges outline --- -> success = RL_DrawTriangle( Vector2 v1, Vector2 v2, Vector2 v3, Color color ) +> success = RL.DrawTriangle( Vector2 v1, Vector2 v2, Vector2 v3, Color color ) Draw a color-filled triangle ( Vertex in counter-clockwise order! ) @@ -2755,7 +2753,7 @@ Draw a color-filled triangle ( Vertex in counter-clockwise order! ) --- -> success = RL_DrawTriangleLines( Vector2 v1, Vector2 v2, Vector2 v3, Color color ) +> success = RL.DrawTriangleLines( Vector2 v1, Vector2 v2, Vector2 v3, Color color ) Draw triangle outline ( Vertex in counter-clockwise order! ) @@ -2764,7 +2762,7 @@ Draw triangle outline ( Vertex in counter-clockwise order! ) --- -> success = RL_DrawTriangleFan( Vector2 points{}, int pointsCount, Color color ) +> success = RL.DrawTriangleFan( Vector2{} points, int pointsCount, Color color ) Draw a triangle fan defined by points ( first vertex is the center ) @@ -2773,7 +2771,7 @@ Draw a triangle fan defined by points ( first vertex is the center ) --- -> success = RL_DrawTriangleStrip( Vector2 points{}, int pointsCount, Color color ) +> success = RL.DrawTriangleStrip( Vector2{} points, int pointsCount, Color color ) Draw a triangle strip defined by points @@ -2782,7 +2780,7 @@ Draw a triangle strip defined by points --- -> success = RL_DrawPoly( Vector2 center, int sides, float radius, float rotation, Color color ) +> success = RL.DrawPoly( Vector2 center, int sides, float radius, float rotation, Color color ) Draw a regular polygon ( Vector version ) @@ -2791,7 +2789,7 @@ Draw a regular polygon ( Vector version ) --- -> success = RL_DrawPolyLines( Vector2 center, int sides, float radius, float rotation, Color color ) +> success = RL.DrawPolyLines( Vector2 center, int sides, float radius, float rotation, Color color ) Draw a polygon outline of n sides @@ -2800,7 +2798,7 @@ Draw a polygon outline of n sides --- -> success = RL_DrawPolyLinesEx( Vector2 center, int sides, float radius, float rotation, float lineThick, Color color ) +> success = RL.DrawPolyLinesEx( Vector2 center, int sides, float radius, float rotation, float lineThick, Color color ) Draw a polygon outline of n sides with extended parameters @@ -2813,7 +2811,7 @@ Draw a polygon outline of n sides with extended parameters --- -> collision = RL_CheckCollisionRecs( Rectangle rec1, Rectangle rec2 ) +> collision = RL.CheckCollisionRecs( Rectangle rec1, Rectangle rec2 ) Check collision between two rectangles @@ -2822,7 +2820,7 @@ Check collision between two rectangles --- -> collision = RL_CheckCollisionCircles( Vector2 center1, float radius1, Vector2 center2, float radius2 ) +> collision = RL.CheckCollisionCircles( Vector2 center1, float radius1, Vector2 center2, float radius2 ) Check collision between two circles @@ -2831,7 +2829,7 @@ Check collision between two circles --- -> collision = RL_CheckCollisionCircleRec( Vector2 center, float radius, Rectangle rec ) +> collision = RL.CheckCollisionCircleRec( Vector2 center, float radius, Rectangle rec ) Check collision between circle and rectangle @@ -2840,7 +2838,7 @@ Check collision between circle and rectangle --- -> collision = RL_CheckCollisionPointRec( Vector2 point, Rectangle rec ) +> collision = RL.CheckCollisionPointRec( Vector2 point, Rectangle rec ) Check if point is inside rectangle @@ -2849,7 +2847,7 @@ Check if point is inside rectangle --- -> collision = RL_CheckCollisionPointCircle( Vector2 point, Vector2 center, float radius ) +> collision = RL.CheckCollisionPointCircle( Vector2 point, Vector2 center, float radius ) Check if point is inside circle @@ -2858,7 +2856,7 @@ Check if point is inside circle --- -> collision = RL_CheckCollisionPointTriangle( Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3 ) +> collision = RL.CheckCollisionPointTriangle( Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3 ) Check if point is inside a triangle @@ -2867,7 +2865,7 @@ Check if point is inside a triangle --- -> collision, position = RL_CheckCollisionLines( Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2 ) +> collision, position = RL.CheckCollisionLines( Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2 ) Check the collision between two lines defined by two points each, returns collision point by reference @@ -2876,7 +2874,7 @@ Check the collision between two lines defined by two points each, returns collis --- -> collision = RL_CheckCollisionPointLine( Vector2 point, Vector2 p1, Vector2 p2, int threshold ) +> collision = RL.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] @@ -2885,7 +2883,7 @@ Check if point belongs to line created between two points [p1] and [p2] with def --- -> rectangle = RL_GetCollisionRec( Rectangle rec1, Rectangle rec2 ) +> rectangle = RL.GetCollisionRec( Rectangle rec1, Rectangle rec2 ) Get collision rectangle for two rectangles collision @@ -2898,7 +2896,7 @@ Get collision rectangle for two rectangles collision --- -> image = RL_LoadImage( string fileName ) +> image = RL.LoadImage( string fileName ) Load image from file into CPU memory ( RAM ) @@ -2907,7 +2905,7 @@ Load image from file into CPU memory ( RAM ) --- -> image = RL_LoadImageFromTexture( Texture2D texture ) +> image = RL.LoadImageFromTexture( Texture2D texture ) Load image from GPU texture data @@ -2916,7 +2914,7 @@ Load image from GPU texture data --- -> image = RL_LoadImageFromScreen() +> image = RL.LoadImageFromScreen() Load image from screen buffer and ( screenshot ) @@ -2924,7 +2922,7 @@ Load image from screen buffer and ( screenshot ) --- -> success = RL_UnloadImage( Image image ) +> success = RL.UnloadImage( Image image ) Unload image from CPU memory ( RAM ) @@ -2933,7 +2931,7 @@ Unload image from CPU memory ( RAM ) --- -> success = RL_ExportImage( Image image, string fileName ) +> success = RL.ExportImage( Image image, string fileName ) Export image data to file, returns true on success @@ -2942,7 +2940,7 @@ Export image data to file, returns true on success --- -> success = RL_ExportImageAsCode( Image image, string fileName ) +> success = RL.ExportImageAsCode( Image image, string fileName ) Export image as code file defining an array of bytes, returns true on success @@ -2955,7 +2953,7 @@ Export image as code file defining an array of bytes, returns true on success --- -> image = RL_GenImageColor( int width, int height, Color color ) +> image = RL.GenImageColor( int width, int height, Color color ) Generate image: plain color @@ -2964,7 +2962,7 @@ Generate image: plain color --- -> image = RL_GenImageGradientV( Vector2 size, Color top, Color bottom ) +> image = RL.GenImageGradientV( Vector2 size, Color top, Color bottom ) Generate image: vertical gradient @@ -2973,7 +2971,7 @@ Generate image: vertical gradient --- -> image = RL_GenImageGradientH( Vector2 size, Color left, Color right ) +> image = RL.GenImageGradientH( Vector2 size, Color left, Color right ) Generate image: horizontal gradient @@ -2982,7 +2980,7 @@ Generate image: horizontal gradient --- -> image = RL_GenImageGradientRadial( Vector2 size, float density, Color inner, Color outer ) +> image = RL.GenImageGradientRadial( Vector2 size, float density, Color inner, Color outer ) Generate image: radial gradient @@ -2991,7 +2989,7 @@ Generate image: radial gradient --- -> image = RL_GenImageChecked( Vector2 size, Vector2 checks, Color col1, Color col2 ) +> image = RL.GenImageChecked( Vector2 size, Vector2 checks, Color col1, Color col2 ) Generate image: checked @@ -3000,7 +2998,7 @@ Generate image: checked --- -> image = RL_GenImageWhiteNoise( Vector2 size, float factor ) +> image = RL.GenImageWhiteNoise( Vector2 size, float factor ) Generate image: white noise @@ -3009,7 +3007,7 @@ Generate image: white noise --- -> image = RL_GenImageCellular( Vector2 size, int tileSize ) +> image = RL.GenImageCellular( Vector2 size, int tileSize ) Generate image: cellular algorithm. Bigger tileSize means bigger cells @@ -3022,7 +3020,7 @@ Generate image: cellular algorithm. Bigger tileSize means bigger cells --- -> image = RL_ImageCopy( Image image ) +> image = RL.ImageCopy( Image image ) Create an image duplicate ( useful for transformations ) @@ -3031,7 +3029,7 @@ Create an image duplicate ( useful for transformations ) --- -> image = RL_ImageFromImage( Image image, Rectangle rec ) +> image = RL.ImageFromImage( Image image, Rectangle rec ) Create an image from another image piece @@ -3040,7 +3038,7 @@ Create an image from another image piece --- -> image = RL_ImageText( Font font, string text, float fontSize, float spacing, Color tint ) +> image = RL.ImageText( Font font, string text, float fontSize, float spacing, Color tint ) Create an image from text ( custom sprite font ) @@ -3049,7 +3047,7 @@ Create an image from text ( custom sprite font ) --- -> success = RL_ImageFormat( Image image, int newFormat ) +> success = RL.ImageFormat( Image image, int newFormat ) Convert image data to desired format @@ -3058,7 +3056,7 @@ Convert image data to desired format --- -> success = RL_ImageToPOT( Image image, Color fill ) +> success = RL.ImageToPOT( Image image, Color fill ) Convert image to POT ( power-of-two ) @@ -3067,7 +3065,7 @@ Convert image to POT ( power-of-two ) --- -> success = RL_ImageCrop( Image image, Rectangle crop ) +> success = RL.ImageCrop( Image image, Rectangle crop ) Crop an image to a defined rectangle @@ -3076,7 +3074,7 @@ Crop an image to a defined rectangle --- -> success = RL_ImageAlphaCrop( Image image, float threshold ) +> success = RL.ImageAlphaCrop( Image image, float threshold ) Crop image depending on alpha value @@ -3085,7 +3083,7 @@ Crop image depending on alpha value --- -> success = RL_ImageAlphaClear( Image image, Color color, float threshold ) +> success = RL.ImageAlphaClear( Image image, Color color, float threshold ) Clear alpha channel to desired color @@ -3094,7 +3092,7 @@ Clear alpha channel to desired color --- -> success = RL_ImageAlphaMask( Image image, Image alphaMask ) +> success = RL.ImageAlphaMask( Image image, Image alphaMask ) Apply alpha mask to image @@ -3103,7 +3101,7 @@ Apply alpha mask to image --- -> success = RL_ImageAlphaPremultiply( Image image ) +> success = RL.ImageAlphaPremultiply( Image image ) Premultiply alpha channel @@ -3112,7 +3110,7 @@ Premultiply alpha channel --- -> success = RL_ImageResize( Image image, Vector2 size ) +> success = RL.ImageResize( Image image, Vector2 size ) Resize image ( Bicubic scaling algorithm ) @@ -3121,7 +3119,7 @@ Resize image ( Bicubic scaling algorithm ) --- -> success = RL_ImageResizeNN( Image image, Vector2 size ) +> success = RL.ImageResizeNN( Image image, Vector2 size ) Resize image ( Nearest-Neighbor scaling algorithm ) @@ -3130,7 +3128,7 @@ Resize image ( Nearest-Neighbor scaling algorithm ) --- -> success = RL_ImageResizeCanvas( Image image, Vector2 size, Vector2 offset, Color fill ) +> success = RL.ImageResizeCanvas( Image image, Vector2 size, Vector2 offset, Color fill ) Resize canvas and fill with color @@ -3139,7 +3137,7 @@ Resize canvas and fill with color --- -> success = RL_ImageMipmaps( Image image ) +> success = RL.ImageMipmaps( Image image ) Generate all mipmap levels for a provided image @@ -3148,7 +3146,7 @@ Generate all mipmap levels for a provided image --- -> success = RL_ImageDither( Image image, Color bpp ) +> success = RL.ImageDither( Image image, Color bpp ) Dither image data to 16bpp or lower ( Floyd-Steinberg dithering ) @@ -3157,7 +3155,7 @@ Dither image data to 16bpp or lower ( Floyd-Steinberg dithering ) --- -> success = RL_ImageFlipVertical( Image image ) +> success = RL.ImageFlipVertical( Image image ) Flip image vertically @@ -3166,7 +3164,7 @@ Flip image vertically --- -> success = RL_ImageFlipHorizontal( Image image ) +> success = RL.ImageFlipHorizontal( Image image ) Flip image horizontally @@ -3175,7 +3173,7 @@ Flip image horizontally --- -> success = RL_ImageRotateCW( Image image ) +> success = RL.ImageRotateCW( Image image ) Rotate image clockwise 90deg @@ -3184,7 +3182,7 @@ Rotate image clockwise 90deg --- -> success = RL_ImageRotateCCW( Image image ) +> success = RL.ImageRotateCCW( Image image ) Rotate image counter-clockwise 90deg @@ -3193,7 +3191,7 @@ Rotate image counter-clockwise 90deg --- -> success = RL_ImageColorTint( Image image, Color color ) +> success = RL.ImageColorTint( Image image, Color color ) Modify image color: tint @@ -3202,7 +3200,7 @@ Modify image color: tint --- -> success = RL_ImageColorInvert( Image image ) +> success = RL.ImageColorInvert( Image image ) Modify image color: invert @@ -3211,7 +3209,7 @@ Modify image color: invert --- -> success = RL_ImageColorGrayscale( Image image ) +> success = RL.ImageColorGrayscale( Image image ) Modify image color: grayscale @@ -3220,7 +3218,7 @@ Modify image color: grayscale --- -> success = RL_ImageColorContrast( Image image, float contrast ) +> success = RL.ImageColorContrast( Image image, float contrast ) Modify image color: contrast ( -100 to 100 ) @@ -3229,7 +3227,7 @@ Modify image color: contrast ( -100 to 100 ) --- -> success = RL_ImageColorBrightness( Image image, int brightness ) +> success = RL.ImageColorBrightness( Image image, int brightness ) Modify image color: brightness ( -255 to 255 ) @@ -3238,7 +3236,7 @@ Modify image color: brightness ( -255 to 255 ) --- -> success = RL_ImageColorReplace( Image image, Color color, Color replace ) +> success = RL.ImageColorReplace( Image image, Color color, Color replace ) Modify image color: replace color @@ -3247,7 +3245,7 @@ Modify image color: replace color --- -> colors = RL_LoadImageColors( Image image ) +> colors = RL.LoadImageColors( Image image ) Load color data from image as a Color array ( RGBA - 32bit ) @@ -3256,7 +3254,7 @@ Load color data from image as a Color array ( RGBA - 32bit ) --- -> colors = RL_LoadImagePalette( Image image, int maxPaletteSize ) +> colors = RL.LoadImagePalette( Image image, int maxPaletteSize ) Load colors palette from image as a Color array ( RGBA - 32bit ) @@ -3265,7 +3263,7 @@ Load colors palette from image as a Color array ( RGBA - 32bit ) --- -> rectangle = RL_GetImageAlphaBorder( Image image, float threshold ) +> rectangle = RL.GetImageAlphaBorder( Image image, float threshold ) Get image alpha border rectangle @@ -3274,7 +3272,7 @@ Get image alpha border rectangle --- -> color = RL_GetImageColor( Image image, Vector2 pixelPos ) +> color = RL.GetImageColor( Image image, Vector2 pixelPos ) Get image pixel color at ( x, y ) position @@ -3287,7 +3285,7 @@ Get image pixel color at ( x, y ) position --- -> success = RL_ImageClearBackground( Image dst, Color color ) +> success = RL.ImageClearBackground( Image dst, Color color ) Clear image background with given color @@ -3296,7 +3294,7 @@ Clear image background with given color --- -> success = RL_ImageDrawPixel( Image dst, Vector2 position, Color color ) +> success = RL.ImageDrawPixel( Image dst, Vector2 position, Color color ) Draw pixel within an image @@ -3305,7 +3303,7 @@ Draw pixel within an image --- -> success = RL_ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color ) +> success = RL.ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color ) Draw line within an image @@ -3314,7 +3312,7 @@ Draw line within an image --- -> success = RL_ImageDrawCircle( Image dst, Vector2 center, int radius, Color color ) +> success = RL.ImageDrawCircle( Image dst, Vector2 center, int radius, Color color ) Draw circle within an image @@ -3323,7 +3321,7 @@ Draw circle within an image --- -> success = RL_ImageDrawRectangle( Image dst, Rectangle rec, Color color ) +> success = RL.ImageDrawRectangle( Image dst, Rectangle rec, Color color ) Draw rectangle within an image @@ -3332,7 +3330,7 @@ Draw rectangle within an image --- -> success = RL_DrawRectangleLines( Image dst, Rectangle rec, int thick, Color color ) +> success = RL.ImageDrawRectangleLines( Image dst, Rectangle rec, int thick, Color color ) Draw rectangle lines within an image @@ -3341,7 +3339,7 @@ Draw rectangle lines within an image --- -> success = RL_ImageDraw( Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint ) +> success = RL.ImageDraw( Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint ) Draw a source image within a destination image ( Tint applied to source ) @@ -3350,7 +3348,7 @@ Draw a source image within a destination image ( Tint applied to source ) --- -> success = RL_ImageDrawTextEx( Image dst, Font font, string text, Vector2 position, float fontSize, float spacing, Color tint ) +> success = RL.ImageDrawTextEx( Image dst, Font font, string text, Vector2 position, float fontSize, float spacing, Color tint ) Draw text ( Custom sprite font ) within an image ( Destination ) @@ -3363,7 +3361,7 @@ Draw text ( Custom sprite font ) within an image ( Destination ) --- -> size = RL_GetImageSize( Image image ) +> size = RL.GetImageSize( Image image ) Get image size @@ -3372,7 +3370,7 @@ Get image size --- -> mipmaps = RL_GetImageMipmaps( Image image ) +> mipmaps = RL.GetImageMipmaps( Image image ) Get image mipmaps. Mipmap levels, 1 by default @@ -3381,7 +3379,7 @@ Get image mipmaps. Mipmap levels, 1 by default --- -> format = RL_GetImageFormat( Image image ) +> format = RL.GetImageFormat( Image image ) Get image data format ( PixelFormat type ) @@ -3394,7 +3392,7 @@ Get image data format ( PixelFormat type ) --- -> texture = RL_LoadTexture( string fileName ) +> texture = RL.LoadTexture( string fileName ) Load texture from file into GPU memory ( VRAM ) @@ -3403,7 +3401,7 @@ Load texture from file into GPU memory ( VRAM ) --- -> texture = RL_LoadTextureFromImage( Image image ) +> texture = RL.LoadTextureFromImage( Image image ) Load texture from image data @@ -3412,7 +3410,7 @@ Load texture from image data --- -> texture = RL_LoadTextureCubemap( Image image, int layout ) +> texture = RL.LoadTextureCubemap( Image image, int layout ) Load cubemap from image, multiple image cubemap layouts supported @@ -3421,7 +3419,7 @@ Load cubemap from image, multiple image cubemap layouts supported --- -> renderTexture = RL_LoadRenderTexture( Vector2 size ) +> renderTexture = RL.LoadRenderTexture( Vector2 size ) Load texture for rendering ( framebuffer ) @@ -3430,7 +3428,7 @@ Load texture for rendering ( framebuffer ) --- -> success = RL_UnloadTexture( Texture2D texture ) +> success = RL.UnloadTexture( Texture2D texture ) Unload texture from GPU memory ( VRAM ) @@ -3439,7 +3437,7 @@ Unload texture from GPU memory ( VRAM ) --- -> success = RL_UnloadRenderTexture( RenderTexture2D target ) +> success = RL.UnloadRenderTexture( RenderTexture2D target ) Unload render texture from GPU memory ( VRAM ) @@ -3448,7 +3446,7 @@ Unload render texture from GPU memory ( VRAM ) --- -> success = RL_UpdateTexture( Texture2D texture, int pixels{ {} } ) +> success = RL.UpdateTexture( Texture2D texture, int{} pixels ) Update GPU texture with new data NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format @@ -3458,7 +3456,7 @@ NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, --- -> success = RL_UpdateTextureRec( Texture2D texture, Rectangle rec, int pixels{ {} } ) +> success = RL.UpdateTextureRec( Texture2D texture, Rectangle rec, int{} pixels ) Update GPU texture rectangle with new data NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format @@ -3472,7 +3470,7 @@ NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, --- -> success = RL_DrawTexture( Texture2D texture, Vector2 position, Color tint ) +> success = RL.DrawTexture( Texture2D texture, Vector2 position, Color tint ) Draw a Texture2D @@ -3481,7 +3479,7 @@ Draw a Texture2D --- -> success = RL_DrawTextureRec( Texture2D texture, Rectangle source, Vector2 position, Color tint ) +> success = RL.DrawTextureRec( Texture2D texture, Rectangle source, Vector2 position, Color tint ) Draw a part of a texture defined by a rectangle @@ -3490,7 +3488,7 @@ Draw a part of a texture defined by a rectangle --- -> success = RL_DrawTextureTiled( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint ) +> success = RL.DrawTextureTiled( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint ) Draw part of a texture ( defined by a rectangle ) with rotation and scale tiled into dest @@ -3499,7 +3497,7 @@ Draw part of a texture ( defined by a rectangle ) with rotation and scale tiled --- -> success = RL_DrawTexturePro( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint ) +> success = RL.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 @@ -3508,7 +3506,7 @@ Draw a part of a texture defined by a rectangle with "pro" parameters --- -> success = RL_DrawTextureNPatch( Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint ) +> success = RL.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 @@ -3517,7 +3515,7 @@ Draws a texture ( or part of it ) that stretches or shrinks nicely --- -> success = RL_DrawTexturePoly( Texture2D texture, Vector2 center, Vector2{} points, Vector2{} texcoords, int pointsCount, Color tint ) +> success = RL.DrawTexturePoly( Texture2D texture, Vector2 center, Vector2{} points, Vector2{} texcoords, int pointsCount, Color tint ) Draw a textured polygon ( Convex ) @@ -3526,7 +3524,7 @@ Draw a textured polygon ( Convex ) --- -> success = RL_BeginTextureMode( RenderTexture2D target ) +> success = RL.BeginTextureMode( RenderTexture2D target ) Begin drawing to render texture @@ -3535,13 +3533,13 @@ Begin drawing to render texture --- -> RL_EndTextureMode() +> RL.EndTextureMode() Ends drawing to render texture --- -> success = RL_SetTextureSource( int textureSource ) +> success = RL.SetTextureSource( int textureSource ) Set what texture source to use ( TEXTURE_SOURCE_TEXTURE or TEXTURE_SOURCE_RENDER_TEXTURE ) @@ -3550,7 +3548,7 @@ Set what texture source to use ( TEXTURE_SOURCE_TEXTURE or TEXTURE_SOURCE_RENDER --- -> textureSource = RL_GetTextureSource() +> textureSource = RL.GetTextureSource() Get current texture source type ( TEXTURE_SOURCE_TEXTURE or TEXTURE_SOURCE_RENDER_TEXTURE ) @@ -3562,7 +3560,7 @@ Get current texture source type ( TEXTURE_SOURCE_TEXTURE or TEXTURE_SOURCE_RENDE --- -> success = RL_GenTextureMipmaps( Texture2D texture ) +> success = RL.GenTextureMipmaps( Texture2D texture ) Generate GPU mipmaps for a texture @@ -3571,7 +3569,7 @@ Generate GPU mipmaps for a texture --- -> success = RL_SetTextureFilter( Texture2D texture, int filter ) +> success = RL.SetTextureFilter( Texture2D texture, int filter ) Set texture scaling filter mode ( TEXTURE_FILTER_POINT, TEXTURE_FILTER_BILINEAR... ) @@ -3580,7 +3578,7 @@ Set texture scaling filter mode ( TEXTURE_FILTER_POINT, TEXTURE_FILTER_BILINEAR. --- -> success = RL_SetTextureWrap( Texture2D texture, int wrap ) +> success = RL.SetTextureWrap( Texture2D texture, int wrap ) Set texture wrapping mode ( TEXTURE_WRAP_REPEAT, TEXTURE_WRAP_CLAMP... ) @@ -3589,7 +3587,7 @@ Set texture wrapping mode ( TEXTURE_WRAP_REPEAT, TEXTURE_WRAP_CLAMP... ) --- -> size = RL_GetTextureSize( Texture2D texture ) +> size = RL.GetTextureSize( Texture2D texture ) Get texture size @@ -3598,7 +3596,7 @@ Get texture size --- -> mipmaps = RL_GetTextureMipmaps( Texture2D texture ) +> mipmaps = RL.GetTextureMipmaps( Texture2D texture ) Get texture mipmaps. Mipmap levels, 1 by default @@ -3607,7 +3605,7 @@ Get texture mipmaps. Mipmap levels, 1 by default --- -> format = RL_GetTextureFormat( Texture2D texture ) +> format = RL.GetTextureFormat( Texture2D texture ) Get texture mipmaps. Mipmap levels, 1 by default @@ -3620,7 +3618,7 @@ Get texture mipmaps. Mipmap levels, 1 by default --- -> color = RL_Fade( Color color, float alpha ) +> color = RL.Fade( Color color, float alpha ) Returns color with alpha applied, alpha goes from 0.0f to 1.0f @@ -3629,7 +3627,7 @@ Returns color with alpha applied, alpha goes from 0.0f to 1.0f --- -> value = RL_ColorToInt( Color color ) +> value = RL.ColorToInt( Color color ) Returns hexadecimal value for a Color @@ -3638,7 +3636,7 @@ Returns hexadecimal value for a Color --- -> color = RL_ColorNormalize( Color color ) +> color = RL.ColorNormalize( Color color ) Returns Color normalized as float [0..1] @@ -3647,7 +3645,7 @@ Returns Color normalized as float [0..1] --- -> color = RL_ColorFromNormalized( Vector4 normalized ) +> color = RL.ColorFromNormalized( Vector4 normalized ) Color from normalized values [0..1] @@ -3656,7 +3654,7 @@ Color from normalized values [0..1] --- -> HSV = RL_ColorToHSV( Color color ) +> HSV = RL.ColorToHSV( Color color ) Returns HSV values for a Color, hue [0..360], saturation/value [0..1] @@ -3665,7 +3663,7 @@ Returns HSV values for a Color, hue [0..360], saturation/value [0..1] --- -> color = RL_ColorFromHSV( float hue, float saturation, float value ) +> color = RL.ColorFromHSV( float hue, float saturation, float value ) Returns a Color from HSV values, hue [0..360], saturation/value [0..1] @@ -3674,7 +3672,7 @@ Returns a Color from HSV values, hue [0..360], saturation/value [0..1] --- -> color = RL_ColorAlpha( Color color, float alpha ) +> color = RL.ColorAlpha( Color color, float alpha ) Returns color with alpha applied, alpha goes from 0.0f to 1.0f @@ -3683,7 +3681,7 @@ Returns color with alpha applied, alpha goes from 0.0f to 1.0f --- -> color = RL_ColorAlphaBlend( Color dst, Color src, Color tint ) +> color = RL.ColorAlphaBlend( Color dst, Color src, Color tint ) Returns src alpha-blended into dst color with tint @@ -3692,7 +3690,7 @@ Returns src alpha-blended into dst color with tint --- -> Color = RL_GetColor( unsigned int hexValue ) +> Color = RL.GetColor( unsigned int hexValue ) Get Color structure from hexadecimal value @@ -3701,7 +3699,7 @@ Get Color structure from hexadecimal value --- -> Color = RL_GetPixelColor( Texture2D texture, Vector2 position ) +> Color = RL.GetPixelColor( Texture2D texture, Vector2 position ) Get pixel color from source texture @@ -3710,7 +3708,7 @@ Get pixel color from source texture --- -> size = RL_GetPixelDataSize( int width, int height, int format ) +> size = RL.GetPixelDataSize( int width, int height, int format ) Get pixel data size in bytes for certain format @@ -3723,7 +3721,7 @@ Get pixel data size in bytes for certain format --- -> font = RL_LoadFont( string fileName ) +> font = RL.LoadFont( string fileName ) Load font from file into GPU memory ( VRAM ) @@ -3732,7 +3730,7 @@ Load font from file into GPU memory ( VRAM ) --- -> font = RL_LoadFontEx( string fileName, int fontSize ) +> font = RL.LoadFontEx( string fileName, int fontSize ) Load font from file with extended parameters. Loading the default character set @@ -3741,7 +3739,7 @@ Load font from file with extended parameters. Loading the default character set --- -> font = RL_LoadFontFromImage( Image image, Color key, int firstChar ) +> font = RL.LoadFontFromImage( Image image, Color key, int firstChar ) Load font from Image ( XNA style ) @@ -3750,7 +3748,7 @@ Load font from Image ( XNA style ) --- -> success = RL_UnloadFont( Font font ) +> success = RL.UnloadFont( Font font ) Unload Font from GPU memory ( VRAM ) @@ -3763,7 +3761,7 @@ Unload Font from GPU memory ( VRAM ) --- -> success = RL_DrawFPS( Vector2 pos ) +> success = RL.DrawFPS( Vector2 pos ) Draw current FPS @@ -3772,7 +3770,7 @@ Draw current FPS --- -> success = RL_DrawText( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint ) +> success = RL.DrawText( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint ) Draw text using font and additional parameters @@ -3781,7 +3779,7 @@ Draw text using font and additional parameters --- -> success = RL_DrawTextPro( Font font, string text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint ) +> success = RL.DrawTextPro( Font font, string text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint ) Draw text using Font and pro parameters ( rotation ) @@ -3794,7 +3792,7 @@ Draw text using Font and pro parameters ( rotation ) --- -> size = RL_MeasureText( Font font, string text, float fontSize, float spacing ) +> size = RL.MeasureText( Font font, string text, float fontSize, float spacing ) Measure string size for Font @@ -3803,7 +3801,7 @@ Measure string size for Font --- -> baseSize = RL_GetFontBaseSize( Font font ) +> baseSize = RL.GetFontBaseSize( Font font ) Get font baseSize @@ -3812,7 +3810,7 @@ Get font baseSize --- -> glyphCount = RL_GetFontGlyphCount( Font font ) +> glyphCount = RL.GetFontGlyphCount( Font font ) Get font glyphCount @@ -3821,7 +3819,7 @@ Get font glyphCount --- -> glyphPadding = RL_GetFontGlyphPadding( Font font ) +> glyphPadding = RL.GetFontGlyphPadding( Font font ) Get font glyphPadding @@ -3834,7 +3832,7 @@ Get font glyphPadding --- -> success = RL_DrawLine3D( Vector3 startPos, Vector3 endPos, Color color ) +> success = RL.DrawLine3D( Vector3 startPos, Vector3 endPos, Color color ) Draw a line in 3D world space @@ -3843,7 +3841,7 @@ Draw a line in 3D world space --- -> success = RL_DrawPoint3D( Vector3 position, Color color ) +> success = RL.DrawPoint3D( Vector3 position, Color color ) Draw a point in 3D space, actually a small line @@ -3852,7 +3850,7 @@ Draw a point in 3D space, actually a small line --- -> success = RL_DrawCircle3D( Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color ) +> success = RL.DrawCircle3D( Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color ) Draw a circle in 3D world space @@ -3861,7 +3859,7 @@ Draw a circle in 3D world space --- -> success = RL_DrawTriangle3D( Vector3 v1, Vector3 v2, Vector3 v3, Color color ) +> success = RL.DrawTriangle3D( Vector3 v1, Vector3 v2, Vector3 v3, Color color ) Draw a color-filled triangle ( Vertex in counter-clockwise order! ) @@ -3870,7 +3868,7 @@ Draw a color-filled triangle ( Vertex in counter-clockwise order! ) --- -> success = RL_DrawCube( Vector3 position, Vector3 size, Color color ) +> success = RL.DrawCube( Vector3 position, Vector3 size, Color color ) Draw cube @@ -3879,7 +3877,7 @@ Draw cube --- -> success = RL_DrawCubeWires( Vector3 position, Vector3 size, Color color ) +> success = RL.DrawCubeWires( Vector3 position, Vector3 size, Color color ) Draw cube wires @@ -3888,7 +3886,7 @@ Draw cube wires --- -> success = RL_DrawCubeTexture( Texture2D texture, Vector3 position, Vector3 size, Color color ) +> success = RL.DrawCubeTexture( Texture2D texture, Vector3 position, Vector3 size, Color color ) Draw cube textured @@ -3897,7 +3895,7 @@ Draw cube textured --- -> success = RL_DrawSphere( Vector3 centerPos, float radius, Color color ) +> success = RL.DrawSphere( Vector3 centerPos, float radius, Color color ) Draw sphere @@ -3906,7 +3904,7 @@ Draw sphere --- -> success = RL_DrawSphereEx( Vector3 centerPos, float radius, int rings, int slices, Color color ) +> success = RL.DrawSphereEx( Vector3 centerPos, float radius, int rings, int slices, Color color ) Draw sphere with extended parameters @@ -3915,7 +3913,7 @@ Draw sphere with extended parameters --- -> success = RL_DrawSphereWires( Vector3 centerPos, float radius, int rings, int slices, Color color ) +> success = RL.DrawSphereWires( Vector3 centerPos, float radius, int rings, int slices, Color color ) Draw sphere wires @@ -3924,7 +3922,7 @@ Draw sphere wires --- -> success = RL_DrawCylinder( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color ) +> success = RL.DrawCylinder( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color ) Draw a cylinder/cone @@ -3933,7 +3931,7 @@ Draw a cylinder/cone --- -> success = RL_DrawCylinderEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color ) +> success = RL.DrawCylinderEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color ) Draw a cylinder with base at startPos and top at endPos @@ -3942,7 +3940,7 @@ Draw a cylinder with base at startPos and top at endPos --- -> success = RL_DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color ) +> success = RL.DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color ) Draw a cylinder/cone wires @@ -3951,7 +3949,7 @@ Draw a cylinder/cone wires --- -> success = RL_DrawCylinderWiresEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color ) +> success = RL.DrawCylinderWiresEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color ) Draw a cylinder wires with base at startPos and top at endPos @@ -3960,7 +3958,7 @@ Draw a cylinder wires with base at startPos and top at endPos --- -> success = RL_DrawPlane( Vector3 centerPos, Vector2 size, Color color ) +> success = RL.DrawPlane( Vector3 centerPos, Vector2 size, Color color ) Draw a plane XZ @@ -3969,7 +3967,7 @@ Draw a plane XZ --- -> success = RL_DrawQuad3DTexture( texture, Vector3{} vertices, Vector2{} texCoords, Color{} colors ) +> success = RL.DrawQuad3DTexture( Texture2D texture, Vector3{} vertices, Vector2{} texCoords, Color{} colors ) Draw 3D textured quad. ( Texture coordinates opengl style 0.0 - 1.0 ). @@ -3978,7 +3976,7 @@ Draw 3D textured quad. ( Texture coordinates opengl style 0.0 - 1.0 ). --- -> success = RL_DrawRay( Ray ray, Color color ) +> success = RL.DrawRay( Ray ray, Color color ) Draw a ray line @@ -3987,7 +3985,7 @@ Draw a ray line --- -> success = RL_DrawGrid( int slices, float spacing ) +> success = RL.DrawGrid( int slices, float spacing ) Draw a grid ( Centered at ( 0, 0, 0 ) ) @@ -4000,7 +3998,7 @@ Draw a grid ( Centered at ( 0, 0, 0 ) ) --- -> mesh = RL_GenMeshPoly( int sides, float radius ) +> mesh = RL.GenMeshPoly( int sides, float radius ) Generate polygonal mesh @@ -4009,7 +4007,7 @@ Generate polygonal mesh --- -> mesh = RL_GenMeshPlane( float width, float length, int resX, int resZ ) +> mesh = RL.GenMeshPlane( float width, float length, int resX, int resZ ) Generate plane mesh ( With subdivisions ) @@ -4018,7 +4016,7 @@ Generate plane mesh ( With subdivisions ) --- -> mesh = RL_GenMeshCube( Vector3 size ) +> mesh = RL.GenMeshCube( Vector3 size ) Generate cuboid mesh @@ -4027,7 +4025,7 @@ Generate cuboid mesh --- -> mesh = RL_GenMeshSphere( float radius, int rings, int slices ) +> mesh = RL.GenMeshSphere( float radius, int rings, int slices ) Generate sphere mesh ( Standard sphere ) @@ -4036,7 +4034,7 @@ Generate sphere mesh ( Standard sphere ) --- -> mesh = RL_GenMeshCylinder( float radius, float height, int slices ) +> mesh = RL.GenMeshCylinder( float radius, float height, int slices ) Generate cylinder mesh @@ -4045,7 +4043,7 @@ Generate cylinder mesh --- -> mesh = RL_GenMeshCone( float radius, float height, int slices ) +> mesh = RL.GenMeshCone( float radius, float height, int slices ) Generate cone/pyramid mesh @@ -4054,7 +4052,7 @@ Generate cone/pyramid mesh --- -> mesh = RL_GenMeshTorus( float radius, float size, int radSeg, int sides ) +> mesh = RL.GenMeshTorus( float radius, float size, int radSeg, int sides ) Generate torus mesh @@ -4063,7 +4061,7 @@ Generate torus mesh --- -> mesh = RL_GenMeshKnot( float radius, float size, int radSeg, int sides ) +> mesh = RL.GenMeshKnot( float radius, float size, int radSeg, int sides ) Generate torus mesh @@ -4072,7 +4070,7 @@ Generate torus mesh --- -> mesh = RL_GenMeshHeightmap( Image heightmap, Vector3 size ) +> mesh = RL.GenMeshHeightmap( Image heightmap, Vector3 size ) Generate heightmap mesh from image data @@ -4081,7 +4079,7 @@ Generate heightmap mesh from image data --- -> mesh = RL_GenMeshCustom( Mesh{}, bool dynamic ) +> mesh = RL.GenMeshCustom( Mesh{} mesh, bool dynamic ) Generate custom mesh from vertex attribute data and uploads it into a VAO ( if supported ) and VBO @@ -4090,7 +4088,7 @@ Generate custom mesh from vertex attribute data and uploads it into a VAO ( if s --- -> success = RL_UpdateMesh( Mesh{} ) +> success = RL.UpdateMesh( Mesh{} mesh ) Update mesh vertex data in GPU. Note! Mainly intented to be used with custom meshes. @@ -4100,7 +4098,7 @@ Note! Mainly intented to be used with custom meshes. --- -> success = RL_UnloadMesh( Mesh mesh ) +> success = RL.UnloadMesh( Mesh mesh ) Unload mesh data from CPU and GPU @@ -4109,7 +4107,7 @@ Unload mesh data from CPU and GPU --- -> success = RL_DrawMesh( Mesh mesh, Material material, Matrix transform ) +> success = RL.DrawMesh( Mesh mesh, Material material, Matrix transform ) Draw a 3d mesh with material and transform @@ -4118,7 +4116,7 @@ Draw a 3d mesh with material and transform --- -> success = RL_DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances ) +> success = RL.DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances ) Draw multiple mesh instances with material and different transforms @@ -4127,7 +4125,7 @@ Draw multiple mesh instances with material and different transforms --- -> success = RL_SetMeshColor( Mesh mesh, Color color ) +> success = RL.SetMeshColor( Mesh mesh, Color color ) Updades mesh color vertex attribute buffer NOTE: Currently only works on custom mesh @@ -4137,7 +4135,7 @@ NOTE: Currently only works on custom mesh --- -> success = RL_ExportMesh( Mesh mesh, string fileName ) +> success = RL.ExportMesh( Mesh mesh, string fileName ) Export mesh data to file, returns true on success @@ -4146,7 +4144,7 @@ Export mesh data to file, returns true on success --- -> boundingBox = RL_GetMeshBoundingBox( Mesh mesh ) +> boundingBox = RL.GetMeshBoundingBox( Mesh mesh ) Compute mesh bounding box limits @@ -4155,7 +4153,7 @@ Compute mesh bounding box limits --- -> success = RL_GenMeshTangents( Mesh mesh ) +> success = RL.GenMeshTangents( Mesh mesh ) Compute mesh tangents @@ -4168,7 +4166,7 @@ Compute mesh tangents --- -> material = RL_LoadMaterialDefault() +> material = RL.LoadMaterialDefault() Load default material @@ -4176,7 +4174,7 @@ Load default material --- -> material = RL_CreateMaterial( material{} ) +> material = RL.CreateMaterial( Material{} material ) Load material from table. See material table definition @@ -4185,7 +4183,7 @@ Load material from table. See material table definition --- -> success = RL_UnloadMaterial( Material material ) +> success = RL.UnloadMaterial( Material material ) Unload material from GPU memory ( VRAM ) @@ -4194,7 +4192,7 @@ Unload material from GPU memory ( VRAM ) --- -> success = RL_SetMaterialTexture( Material material, int mapType, Texture2D texture ) +> success = RL.SetMaterialTexture( Material material, int mapType, Texture2D texture ) Set texture for a material map type ( MATERIAL_MAP_ALBEDO, MATERIAL_MAP_METALNESS... ) @@ -4203,7 +4201,7 @@ Set texture for a material map type ( MATERIAL_MAP_ALBEDO, MATERIAL_MAP_METALNES --- -> success = RL_SetMaterialColor( Material material, int mapType, Color color ) +> success = RL.SetMaterialColor( Material material, int mapType, Color color ) Set color for a material map type @@ -4212,7 +4210,7 @@ Set color for a material map type --- -> success = RL_SetMaterialValue( Material material, int mapType, float value ) +> success = RL.SetMaterialValue( Material material, int mapType, float value ) Set value for a material map type @@ -4221,7 +4219,7 @@ Set value for a material map type --- -> success = RL_SetMaterialShader( Material material, Shader shader ) +> success = RL.SetMaterialShader( Material material, Shader shader ) Set shader for material @@ -4234,7 +4232,7 @@ Set shader for material --- -> model = RL_LoadModel( string fileName ) +> model = RL.LoadModel( string fileName ) Load model from files ( Meshes and materials ) @@ -4243,7 +4241,7 @@ Load model from files ( Meshes and materials ) --- -> model = RL_LoadModelFromMesh( Mesh mesh ) +> model = RL.LoadModelFromMesh( Mesh mesh ) Load model from generated mesh ( Default material ) @@ -4252,7 +4250,7 @@ Load model from generated mesh ( Default material ) --- -> success = RL_UnloadModel( Model model ) +> success = RL.UnloadModel( Model model ) Unload model ( Including meshes ) from memory ( RAM and/or VRAM ) @@ -4261,7 +4259,7 @@ Unload model ( Including meshes ) from memory ( RAM and/or VRAM ) --- -> success = RL_DrawModel( Model model, Vector3 position, float scale, Color tint ) +> success = RL.DrawModel( Model model, Vector3 position, float scale, Color tint ) Draw a model ( With texture if set ) @@ -4270,7 +4268,7 @@ Draw a model ( With texture if set ) --- -> success = RL_DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint ) +> success = RL.DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint ) Draw a model with extended parameters @@ -4279,7 +4277,7 @@ Draw a model with extended parameters --- -> success = RL_SetModelMaterial( Model model, Material modelMaterial, Material material ) +> success = RL.SetModelMaterial( Model model, Material modelMaterial, Material material ) Copies material to model material. ( Model material is the material id in models. Material can be deleted if not used elsewhere ) @@ -4288,7 +4286,7 @@ Copies material to model material. ( Model material is the material id in models --- -> success = RL_SetModelMeshMaterial( Model model, int meshId, int materialId ) +> success = RL.SetModelMeshMaterial( Model model, int meshId, int materialId ) Set material for a mesh ( Mesh and material on this model ) @@ -4297,7 +4295,7 @@ Set material for a mesh ( Mesh and material on this model ) --- -> success = RL_DrawBillboard( Camera camera, Texture2D texture, Vector3 position, float size, Color tint ) +> success = RL.DrawBillboard( Camera camera, Texture2D texture, Vector3 position, float size, Color tint ) Draw a billboard texture @@ -4306,7 +4304,7 @@ Draw a billboard texture --- -> success = RL_DrawBillboardRec( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint ) +> success = RL.DrawBillboardRec( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint ) Draw a billboard texture defined by source @@ -4315,7 +4313,7 @@ Draw a billboard texture defined by source --- -> success = RL_SetModelTransform( Model model, Matrix transform ) +> success = RL.SetModelTransform( Model model, Matrix transform ) Set model transform matrix @@ -4324,7 +4322,7 @@ Set model transform matrix --- -> transform = RL_GetModelTransform( Model model ) +> transform = RL.GetModelTransform( Model model ) Get model transform matrix @@ -4337,7 +4335,7 @@ Get model transform matrix --- -> animations, animationCount = RL_LoadModelAnimations( string fileName ) +> animations, animationCount = RL.LoadModelAnimations( string fileName ) Load model animations from file @@ -4346,7 +4344,7 @@ Load model animations from file --- -> success = RL_UpdateModelAnimation( Model model, ModelAnimations animations, int animation, int frame ) +> success = RL.UpdateModelAnimation( Model model, ModelAnimations animations, int animation, int frame ) Update model animation pose @@ -4355,7 +4353,7 @@ Update model animation pose --- -> success = RL_UnloadModelAnimations( ModelAnimations animations ) +> success = RL.UnloadModelAnimations( ModelAnimations animations ) Unload animation data @@ -4364,7 +4362,7 @@ Unload animation data --- -> valid = RL_IsModelAnimationValid( Model model, ModelAnimations animations ) +> valid = RL.IsModelAnimationValid( Model model, ModelAnimations animations ) Check model animation skeleton match @@ -4373,7 +4371,7 @@ Check model animation skeleton match --- -> boneCount = RL_GetModelAnimationBoneCount( ModelAnimations animations, int animation ) +> boneCount = RL.GetModelAnimationBoneCount( ModelAnimations animations, int animation ) Return modelAnimation bone count @@ -4382,7 +4380,7 @@ Return modelAnimation bone count --- -> frameCount = RL_GetModelAnimationFrameCount( ModelAnimations animations, int animation ) +> frameCount = RL.GetModelAnimationFrameCount( ModelAnimations animations, int animation ) Return modelAnimation frame count @@ -4395,7 +4393,7 @@ Return modelAnimation frame count --- -> collision = RL_CheckCollisionSpheres( Vector3 center1, float radius1, Vector3 center2, float radius2 ) +> collision = RL.CheckCollisionSpheres( Vector3 center1, float radius1, Vector3 center2, float radius2 ) Check collision between two spheres @@ -4404,7 +4402,7 @@ Check collision between two spheres --- -> collision = RL_CheckCollisionBoxes( BoundingBox box1, BoundingBox box2 ) +> collision = RL.CheckCollisionBoxes( BoundingBox box1, BoundingBox box2 ) Check collision between two bounding boxes @@ -4413,7 +4411,7 @@ Check collision between two bounding boxes --- -> collision = RL_CheckCollisionBoxSphere( BoundingBox box, Vector3 center, float radius ) +> collision = RL.CheckCollisionBoxSphere( BoundingBox box, Vector3 center, float radius ) Check collision between box and sphere @@ -4422,7 +4420,7 @@ Check collision between box and sphere --- -> rayCollision = RL_GetRayCollisionSphere( Ray ray, Vector3 center, float radius ) +> rayCollision = RL.GetRayCollisionSphere( Ray ray, Vector3 center, float radius ) Get collision info between ray and sphere. ( RayCollision is Lua table of { hit, distance, point, normal } ) @@ -4431,7 +4429,7 @@ Get collision info between ray and sphere. ( RayCollision is Lua table of { hit, --- -> rayCollision = RL_GetRayCollisionBox( Ray ray, BoundingBox box ) +> rayCollision = RL.GetRayCollisionBox( Ray ray, BoundingBox box ) Get collision info between ray and box @@ -4440,7 +4438,7 @@ Get collision info between ray and box --- -> rayCollision = RL_GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform ) +> rayCollision = RL.GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform ) Get collision info between ray and mesh @@ -4449,7 +4447,7 @@ Get collision info between ray and mesh --- -> rayCollision = RL_GetRayCollisionTriangle( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3 ) +> rayCollision = RL.GetRayCollisionTriangle( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3 ) Get collision info between ray and triangle @@ -4458,7 +4456,7 @@ Get collision info between ray and triangle --- -> rayCollision = RL_GetRayCollisionQuad( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4 ) +> rayCollision = RL.GetRayCollisionQuad( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4 ) Get collision info between ray and quad @@ -4471,7 +4469,7 @@ Get collision info between ray and quad --- -> success = RL_SetMasterVolume( float volume ) +> success = RL.SetMasterVolume( float volume ) Set master volume ( listener ) @@ -4484,7 +4482,7 @@ Set master volume ( listener ) --- -> sound = RL_LoadSound( string fileName ) +> sound = RL.LoadSound( string fileName ) Load sound from file @@ -4493,7 +4491,7 @@ Load sound from file --- -> wave = RL_LoadWave( string fileName ) +> wave = RL.LoadWave( string fileName ) Load wave data from file @@ -4502,7 +4500,7 @@ Load wave data from file --- -> sound = RL_LoadSoundFromWave( Wave wave ) +> sound = RL.LoadSoundFromWave( Wave wave ) Load sound from wave data @@ -4511,7 +4509,7 @@ Load sound from wave data --- -> success = RL_UnloadSound( Sound sound ) +> success = RL.UnloadSound( Sound sound ) Unload sound @@ -4520,7 +4518,7 @@ Unload sound --- -> success = RL_UnloadWave( Wave wave ) +> success = RL.UnloadWave( Wave wave ) Unload wave data @@ -4529,7 +4527,7 @@ Unload wave data --- -> success = RL_ExportWave( Wave wave, string fileName ) +> success = RL.ExportWave( Wave wave, string fileName ) Export wave data to file, returns true on success @@ -4538,7 +4536,7 @@ Export wave data to file, returns true on success --- -> success = RL_ExportWaveAsCode( Wave wave, string fileName ) +> success = RL.ExportWaveAsCode( Wave wave, string fileName ) Export wave sample data to code (.h), returns true on success @@ -4551,7 +4549,7 @@ Export wave sample data to code (.h), returns true on success --- -> success = RL_PlaySound( Sound sound ) +> success = RL.PlaySound( Sound sound ) Play a sound @@ -4560,7 +4558,7 @@ Play a sound --- -> success = RL_StopSound( Sound sound ) +> success = RL.StopSound( Sound sound ) Stop playing a sound @@ -4569,7 +4567,7 @@ Stop playing a sound --- -> success = RL_PauseSound( Sound sound ) +> success = RL.PauseSound( Sound sound ) Pause a sound @@ -4578,7 +4576,7 @@ Pause a sound --- -> success = RL_ResumeSound( Sound sound ) +> success = RL.ResumeSound( Sound sound ) Resume a paused sound @@ -4587,7 +4585,7 @@ Resume a paused sound --- -> success = RL_PlaySoundMulti( Sound sound ) +> success = RL.PlaySoundMulti( Sound sound ) Play a sound ( Using multichannel buffer pool ) @@ -4596,13 +4594,13 @@ Play a sound ( Using multichannel buffer pool ) --- -> RL_StopSoundMulti() +> RL.StopSoundMulti() Stop any sound playing ( using multichannel buffer pool ) --- -> count = RL_GetSoundsPlaying() +> count = RL.GetSoundsPlaying() Get number of sounds playing in the multichannel @@ -4610,7 +4608,7 @@ Get number of sounds playing in the multichannel --- -> playing = RL_IsSoundPlaying( Sound sound ) +> playing = RL.IsSoundPlaying( Sound sound ) Check if a sound is currently playing @@ -4619,7 +4617,7 @@ Check if a sound is currently playing --- -> success = RL_SetSoundVolume( Sound sound, float volume ) +> success = RL.SetSoundVolume( Sound sound, float volume ) Set volume for a sound ( 1.0 is max level ) @@ -4628,7 +4626,7 @@ Set volume for a sound ( 1.0 is max level ) --- -> success = RL_SetSoundPitch( Sound sound, float pitch ) +> success = RL.SetSoundPitch( Sound sound, float pitch ) Set pitch for a sound ( 1.0 is base level ) @@ -4637,7 +4635,7 @@ Set pitch for a sound ( 1.0 is base level ) --- -> success = RL_SetSoundPan( Sound sound, float pan ) +> success = RL.SetSoundPan( Sound sound, float pan ) Set pan for a sound ( 0.5 is center ) @@ -4646,7 +4644,7 @@ Set pan for a sound ( 0.5 is center ) --- -> success = RL_WaveFormat( Wave wave, int sampleRate, int sampleSize, int channels ) +> success = RL.WaveFormat( Wave wave, int sampleRate, int sampleSize, int channels ) Convert wave data to desired format @@ -4655,7 +4653,7 @@ Convert wave data to desired format --- -> wave = RL_WaveCopy( Wave wave ) +> wave = RL.WaveCopy( Wave wave ) Copy a wave to a new wave @@ -4664,7 +4662,7 @@ Copy a wave to a new wave --- -> success = RL_WaveCrop( Wave wave, int initSample, int finalSample ) +> success = RL.WaveCrop( Wave wave, int initSample, int finalSample ) Crop a wave to defined samples range @@ -4677,7 +4675,7 @@ Crop a wave to defined samples range --- -> success = RL_LoadMusicStream( string fileName ) +> success = RL.LoadMusicStream( string fileName ) Load music stream from file @@ -4686,13 +4684,13 @@ Load music stream from file --- -> RL_PlayMusicStream() +> RL.PlayMusicStream() Start music playing --- -> playing = RL_PlayMusicStream() +> playing = RL.IsMusicStreamPlaying() Check if music is playing @@ -4700,25 +4698,25 @@ Check if music is playing --- -> RL_StopMusicStream() +> RL.StopMusicStream() Stop music playing --- -> RL_PauseMusicStream() +> RL.PauseMusicStream() Pause music playing --- -> RL_ResumeMusicStream() +> RL.ResumeMusicStream() Resume playing paused music --- -> success = RL_SeekMusicStream( float position ) +> success = RL.SeekMusicStream( float position ) Seek music to a position ( in seconds ) @@ -4727,7 +4725,7 @@ Seek music to a position ( in seconds ) --- -> success = RL_SetMusicVolume( float volume ) +> success = RL.SetMusicVolume( float volume ) Set volume for music ( 1.0 is max level ) @@ -4736,7 +4734,7 @@ Set volume for music ( 1.0 is max level ) --- -> success = RL_SetMusicPitch( float pitch ) +> success = RL.SetMusicPitch( float pitch ) Set pitch for a music ( 1.0 is base level ) @@ -4745,7 +4743,7 @@ Set pitch for a music ( 1.0 is base level ) --- -> success = RL_SetMusicPan( float pan ) +> success = RL.SetMusicPan( float pan ) Set pan for a music ( 0.5 is center ) @@ -4754,7 +4752,7 @@ Set pan for a music ( 0.5 is center ) --- -> length = RL_GetMusicTimeLength() +> length = RL.GetMusicTimeLength() Get music time length ( in seconds ) @@ -4762,7 +4760,7 @@ Get music time length ( in seconds ) --- -> played = RL_GetMusicTimePlayed() +> played = RL.GetMusicTimePlayed() Get current music time played ( in seconds ) @@ -4774,7 +4772,7 @@ Get current music time played ( in seconds ) --- -> result = RL_Clamp( float value, float min, float max ) +> result = RL.Clamp( float value, float min, float max ) Clamp float value @@ -4783,7 +4781,7 @@ Clamp float value --- -> result = RL_Lerp( float start, float end, float amount ) +> result = RL.Lerp( float start, float end, float amount ) Calculate linear interpolation between two floats @@ -4792,7 +4790,7 @@ Calculate linear interpolation between two floats --- -> result = RL_Normalize( float value, float start, float end ) +> result = RL.Normalize( float value, float start, float end ) Normalize input value within input range @@ -4801,7 +4799,7 @@ Normalize input value within input range --- -> result = RL_Remap( float value, float inputStart, float inputEnd, float outputStart, float outputEnd ) +> result = RL.Remap( float value, float inputStart, float inputEnd, float outputStart, float outputEnd ) Remap input value within input range to output range @@ -4810,7 +4808,7 @@ Remap input value within input range to output range --- -> result = RL_Wrap( float value, float min, float max ) +> result = RL.Wrap( float value, float min, float max ) Wrap input value from min to max @@ -4819,7 +4817,7 @@ Wrap input value from min to max --- -> result = RL_FloatEquals( float x, float y ) +> result = RL.FloatEquals( float x, float y ) Check whether two given floats are almost equal @@ -4832,7 +4830,7 @@ Check whether two given floats are almost equal --- -> result = RL_Vector2Zero() +> result = RL.Vector2Zero() Vector with components value 0.0f @@ -4840,7 +4838,7 @@ Vector with components value 0.0f --- -> result = RL_Vector2One() +> result = RL.Vector2One() Vector with components value 1.0f @@ -4848,7 +4846,7 @@ Vector with components value 1.0f --- -> result = RL_Vector2Add( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Add( Vector2 v1, Vector2 v2 ) Add two vectors (v1 + v2) @@ -4857,7 +4855,7 @@ Add two vectors (v1 + v2) --- -> result = RL_Vector2AddValue( Vector2 v, float add ) +> result = RL.Vector2AddValue( Vector2 v, float add ) Add vector and float value @@ -4866,7 +4864,7 @@ Add vector and float value --- -> result = RL_Vector2Subtract( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Subtract( Vector2 v1, Vector2 v2 ) Subtract two vectors (v1 - v2) @@ -4875,7 +4873,7 @@ Subtract two vectors (v1 - v2) --- -> result = RL_Vector2SubtractValue( Vector2 v, float sub ) +> result = RL.Vector2SubtractValue( Vector2 v, float sub ) Subtract vector by float value @@ -4884,7 +4882,7 @@ Subtract vector by float value --- -> result = RL_Vector2Length( vector2 v ) +> result = RL.Vector2Length( vector2 v ) Calculate vector length @@ -4893,7 +4891,7 @@ Calculate vector length --- -> result = RL_Vector2LengthSqr( vector2 v ) +> result = RL.Vector2LengthSqr( vector2 v ) Calculate vector square length @@ -4902,7 +4900,7 @@ Calculate vector square length --- -> result = RL_Vector2DotProduct( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2DotProduct( Vector2 v1, Vector2 v2 ) Calculate two vectors dot product @@ -4911,7 +4909,7 @@ Calculate two vectors dot product --- -> result = RL_Vector2Distance( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Distance( Vector2 v1, Vector2 v2 ) Calculate distance between two vectors @@ -4920,7 +4918,7 @@ Calculate distance between two vectors --- -> result = RL_Vector2DistanceSqr( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2DistanceSqr( Vector2 v1, Vector2 v2 ) Calculate square distance between two vectors @@ -4929,7 +4927,7 @@ Calculate square distance between two vectors --- -> result = RL_Vector2Angle( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Angle( Vector2 v1, Vector2 v2 ) Calculate angle from two vectors @@ -4938,7 +4936,7 @@ Calculate angle from two vectors --- -> result = RL_Vector2Scale( Vector2 v, float scale ) +> result = RL.Vector2Scale( Vector2 v, float scale ) Scale vector ( multiply by value ) @@ -4947,7 +4945,7 @@ Scale vector ( multiply by value ) --- -> result = RL_Vector2Multiply( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Multiply( Vector2 v1, Vector2 v2 ) Multiply vector by vector @@ -4956,7 +4954,7 @@ Multiply vector by vector --- -> result = RL_Vector2Negate( Vector2 v ) +> result = RL.Vector2Negate( Vector2 v ) Negate vector @@ -4965,7 +4963,7 @@ Negate vector --- -> result = RL_Vector2Divide( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Divide( Vector2 v1, Vector2 v2 ) Divide vector by vector @@ -4974,7 +4972,7 @@ Divide vector by vector --- -> result = RL_Vector2Normalize( Vector2 v ) +> result = RL.Vector2Normalize( Vector2 v ) Normalize provided vector @@ -4983,7 +4981,7 @@ Normalize provided vector --- -> result = RL_Vector2Transform( Vector2 v, Matrix mat ) +> result = RL.Vector2Transform( Vector2 v, Matrix mat ) Transforms a Vector2 by a given Matrix @@ -4992,7 +4990,7 @@ Transforms a Vector2 by a given Matrix --- -> result = RL_Vector2Lerp( Vector2 v1, Vector2 v2, float amount ) +> result = RL.Vector2Lerp( Vector2 v1, Vector2 v2, float amount ) Calculate linear interpolation between two vectors @@ -5001,7 +4999,7 @@ Calculate linear interpolation between two vectors --- -> result = RL_Vector2Reflect( Vector2 v, Vector2 normal ) +> result = RL.Vector2Reflect( Vector2 v, Vector2 normal ) Calculate reflected vector to normal @@ -5010,7 +5008,7 @@ Calculate reflected vector to normal --- -> result = RL_Vector2Rotate( Vector2 v, float angle ) +> result = RL.Vector2Rotate( Vector2 v, float angle ) Rotate vector by angle @@ -5019,7 +5017,7 @@ Rotate vector by angle --- -> result = RL_Vector2MoveTowards( Vector2 v, Vector2 target, float maxDistance ) +> result = RL.Vector2MoveTowards( Vector2 v, Vector2 target, float maxDistance ) Move Vector towards target @@ -5028,7 +5026,7 @@ Move Vector towards target --- -> result = RL_Vector2Invert( Vector2 v ) +> result = RL.Vector2Invert( Vector2 v ) Invert the given vector @@ -5037,7 +5035,7 @@ Invert the given vector --- -> result = RL_Vector2Clamp( Vector2 v, Vector2 min, Vector2 max ) +> result = RL.Vector2Clamp( Vector2 v, Vector2 min, Vector2 max ) Clamp the components of the vector between min and max values specified by the given vectors @@ -5047,7 +5045,7 @@ min and max values specified by the given vectors --- -> result = RL_Vector2ClampValue( Vector2 v, float min, float max ) +> result = RL.Vector2ClampValue( Vector2 v, float min, float max ) Clamp the magnitude of the vector between two min and max values @@ -5056,7 +5054,7 @@ Clamp the magnitude of the vector between two min and max values --- -> result = RL_Vector2Equals( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Equals( Vector2 v1, Vector2 v2 ) Check whether two given vectors are almost equal @@ -5069,7 +5067,7 @@ Check whether two given vectors are almost equal --- -> result = RL_Vector3Zero() +> result = RL.Vector3Zero() Vector with components value 0.0f @@ -5077,7 +5075,7 @@ Vector with components value 0.0f --- -> result = RL_Vector3One() +> result = RL.Vector3One() Vector with components value 1.0f @@ -5085,7 +5083,7 @@ Vector with components value 1.0f --- -> result = RL_Vector3Add( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Add( Vector3 v1, Vector3 v2 ) Add two vectors @@ -5094,7 +5092,7 @@ Add two vectors --- -> result = RL_Vector3AddValue( Vector3 v, float add ) +> result = RL.Vector3AddValue( Vector3 v, float add ) Add vector and float value @@ -5103,7 +5101,7 @@ Add vector and float value --- -> result = RL_Vector3Subtract( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Subtract( Vector3 v1, Vector3 v2 ) Subtract two vectors @@ -5112,7 +5110,7 @@ Subtract two vectors --- -> result = RL_Vector3SubtractValue( Vector3 v, float sub ) +> result = RL.Vector3SubtractValue( Vector3 v, float sub ) Subtract vector by float value @@ -5121,7 +5119,7 @@ Subtract vector by float value --- -> result = RL_Vector3Scale( Vector3 v, float scalar ) +> result = RL.Vector3Scale( Vector3 v, float scalar ) Multiply vector by scalar @@ -5130,7 +5128,7 @@ Multiply vector by scalar --- -> result = RL_Vector3Multiply( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Multiply( Vector3 v1, Vector3 v2 ) Multiply vector by vector @@ -5139,7 +5137,7 @@ Multiply vector by vector --- -> result = RL_Vector3CrossProduct( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3CrossProduct( Vector3 v1, Vector3 v2 ) Calculate two vectors cross product @@ -5148,7 +5146,7 @@ Calculate two vectors cross product --- -> result = RL_Vector3Perpendicular( Vector3 v ) +> result = RL.Vector3Perpendicular( Vector3 v ) Calculate one vector perpendicular vector @@ -5157,7 +5155,7 @@ Calculate one vector perpendicular vector --- -> result = RL_Vector3Length( Vector3 v ) +> result = RL.Vector3Length( Vector3 v ) Calculate vector length @@ -5166,7 +5164,7 @@ Calculate vector length --- -> result = RL_Vector3LengthSqr( Vector3 v ) +> result = RL.Vector3LengthSqr( Vector3 v ) Calculate vector square length @@ -5175,7 +5173,7 @@ Calculate vector square length --- -> result = RL_Vector3DotProduct( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3DotProduct( Vector3 v1, Vector3 v2 ) Calculate two vectors dot product @@ -5184,7 +5182,7 @@ Calculate two vectors dot product --- -> result = RL_Vector3Distance( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Distance( Vector3 v1, Vector3 v2 ) Calculate distance between two vectors @@ -5193,7 +5191,7 @@ Calculate distance between two vectors --- -> result = RL_Vector3DistanceSqr( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3DistanceSqr( Vector3 v1, Vector3 v2 ) Calculate square distance between two vectors @@ -5202,7 +5200,7 @@ Calculate square distance between two vectors --- -> result = RL_Vector3Angle( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Angle( Vector3 v1, Vector3 v2 ) Calculate angle between two vectors @@ -5211,7 +5209,7 @@ Calculate angle between two vectors --- -> result = RL_Vector3Negate( Vector3 v ) +> result = RL.Vector3Negate( Vector3 v ) Negate provided vector ( invert direction ) @@ -5220,7 +5218,7 @@ Negate provided vector ( invert direction ) --- -> result = RL_Vector3Divide( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Divide( Vector3 v1, Vector3 v2 ) Divide vector by vector @@ -5229,7 +5227,7 @@ Divide vector by vector --- -> result = RL_Vector3Normalize( Vector3 v ) +> result = RL.Vector3Normalize( Vector3 v ) Normalize provided vector @@ -5238,7 +5236,7 @@ Normalize provided vector --- -> v1, v2 = RL_Vector3OrthoNormalize( Vector3 v1, Vector3 v2 ) +> v1, v2 = RL.Vector3OrthoNormalize( Vector3 v1, Vector3 v2 ) Orthonormalize provided vectors. Makes vectors normalized and orthogonal to each other. Gram-Schmidt function implementation @@ -5248,7 +5246,7 @@ Gram-Schmidt function implementation --- -> result = RL_Vector3Transform( Vector3 v, Matrix mat ) +> result = RL.Vector3Transform( Vector3 v, Matrix mat ) Transforms a Vector3 by a given Matrix @@ -5257,7 +5255,7 @@ Transforms a Vector3 by a given Matrix --- -> result = RL_Vector3RotateByQuaternion( Vector3 v, Quaternion q ) +> result = RL.Vector3RotateByQuaternion( Vector3 v, Quaternion q ) Transform a vector by quaternion rotation @@ -5266,7 +5264,7 @@ Transform a vector by quaternion rotation --- -> result = RL_Vector3RotateByAxisAngle( Vector3 v, Vector3 axis, float angle ) +> result = RL.Vector3RotateByAxisAngle( Vector3 v, Vector3 axis, float angle ) Rotates a vector around an axis @@ -5275,7 +5273,7 @@ Rotates a vector around an axis --- -> result = RL_Vector3Lerp( Vector3 v1, Vector3 v2, float amount ) +> result = RL.Vector3Lerp( Vector3 v1, Vector3 v2, float amount ) Calculate linear interpolation between two vectors @@ -5284,7 +5282,7 @@ Calculate linear interpolation between two vectors --- -> result = RL_Vector3Reflect( Vector3 v, Vector3 normal ) +> result = RL.Vector3Reflect( Vector3 v, Vector3 normal ) Calculate reflected vector to normal @@ -5293,7 +5291,7 @@ Calculate reflected vector to normal --- -> result = RL_Vector3Min( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Min( Vector3 v1, Vector3 v2 ) Get min value for each pair of components @@ -5302,7 +5300,7 @@ Get min value for each pair of components --- -> result = RL_Vector3Max( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Max( Vector3 v1, Vector3 v2 ) Get max value for each pair of components @@ -5311,7 +5309,7 @@ Get max value for each pair of components --- -> result = RL_Vector3Barycenter( Vector3 p, Vector3 a, Vector3 b, Vector3 c ) +> result = RL.Vector3Barycenter( Vector3 p, Vector3 a, Vector3 b, Vector3 c ) Compute barycenter coordinates ( u, v, w ) for point p with respect to triangle ( a, b, c ) NOTE: Assumes P is on the plane of the triangle @@ -5321,7 +5319,7 @@ NOTE: Assumes P is on the plane of the triangle --- -> result = RL_Vector3Unproject( Vector3 source, Matrix projection, Matrix view ) +> result = RL.Vector3Unproject( Vector3 source, Matrix projection, Matrix view ) Projects a Vector3 from screen space into object space NOTE: We are avoiding calling other raymath functions despite available @@ -5331,7 +5329,7 @@ NOTE: We are avoiding calling other raymath functions despite available --- -> result = RL_Vector3Invert( Vector3 v ) +> result = RL.Vector3Invert( Vector3 v ) Invert the given vector @@ -5340,7 +5338,7 @@ Invert the given vector --- -> result = RL_Vector3Clamp( Vector3 v, Vector3 min, Vector3 max ) +> result = RL.Vector3Clamp( Vector3 v, Vector3 min, Vector3 max ) Clamp the components of the vector between min and max values specified by the given vectors @@ -5350,7 +5348,7 @@ min and max values specified by the given vectors --- -> result = RL_Vector3ClampValue( Vector3 v, float min, float max ) +> result = RL.Vector3ClampValue( Vector3 v, float min, float max ) Clamp the magnitude of the vector between two values @@ -5359,7 +5357,7 @@ Clamp the magnitude of the vector between two values --- -> result = RL_Vector3Equals( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Equals( Vector3 v1, Vector3 v2 ) Check whether two given vectors are almost equal @@ -5368,7 +5366,7 @@ Check whether two given vectors are almost equal --- -> result = RL_Vector3Refract( Vector3 v, Vector3 n, float r ) +> result = RL.Vector3Refract( Vector3 v, Vector3 n, float r ) Compute the direction of a refracted ray where v specifies the normalized direction of the incoming ray, n specifies the @@ -5386,7 +5384,7 @@ on the other side of the surface --- -> result = RL_MatrixDeterminant( Matrix mat ) +> result = RL.MatrixDeterminant( Matrix mat ) Compute matrix determinant @@ -5395,7 +5393,7 @@ Compute matrix determinant --- -> result = RL_MatrixTrace( Matrix mat ) +> result = RL.MatrixTrace( Matrix mat ) Get the trace of the matrix ( sum of the values along the diagonal ) @@ -5404,7 +5402,7 @@ Get the trace of the matrix ( sum of the values along the diagonal ) --- -> result = RL_MatrixTranspose( Matrix mat ) +> result = RL.MatrixTranspose( Matrix mat ) Transposes provided matrix @@ -5413,7 +5411,7 @@ Transposes provided matrix --- -> result = RL_MatrixInvert( Matrix mat ) +> result = RL.MatrixInvert( Matrix mat ) Invert provided matrix @@ -5422,7 +5420,7 @@ Invert provided matrix --- -> result = RL_MatrixIdentity() +> result = RL.MatrixIdentity() Get identity matrix @@ -5430,7 +5428,7 @@ Get identity matrix --- -> result = RL_MatrixAdd( Matrix left, Matrix right ) +> result = RL.MatrixAdd( Matrix left, Matrix right ) Add two matrices @@ -5439,7 +5437,7 @@ Add two matrices --- -> result = RL_MatrixSubtract( Matrix left, Matrix right ) +> result = RL.MatrixSubtract( Matrix left, Matrix right ) Subtract two matrices (left - right) @@ -5448,7 +5446,7 @@ Subtract two matrices (left - right) --- -> result = RL_MatrixMultiply( Matrix left, Matrix right ) +> result = RL.MatrixMultiply( Matrix left, Matrix right ) Get two matrix multiplication @@ -5457,7 +5455,7 @@ Get two matrix multiplication --- -> result = RL_MatrixTranslate( Vector3 translate ) +> result = RL.MatrixTranslate( Vector3 translate ) Get translation matrix @@ -5466,7 +5464,7 @@ Get translation matrix --- -> result = RL_MatrixRotate( Vector3 axis, float angle ) +> result = RL.MatrixRotate( Vector3 axis, float angle ) Create rotation matrix from axis and angle. NOTE: Angle should be provided in radians @@ -5475,7 +5473,7 @@ Create rotation matrix from axis and angle. NOTE: Angle should be provided in ra --- -> result = RL_MatrixRotateX( float angle ) +> result = RL.MatrixRotateX( float angle ) Get x-rotation matrix ( angle in radians ) @@ -5484,7 +5482,7 @@ Get x-rotation matrix ( angle in radians ) --- -> result = RL_MatrixRotateY( float angle ) +> result = RL.MatrixRotateY( float angle ) Get y-rotation matrix ( angle in radians ) @@ -5493,7 +5491,7 @@ Get y-rotation matrix ( angle in radians ) --- -> result = RL_MatrixRotateZ( float angle ) +> result = RL.MatrixRotateZ( float angle ) Get z-rotation matrix ( angle in radians ) @@ -5502,7 +5500,7 @@ Get z-rotation matrix ( angle in radians ) --- -> result = RL_MatrixRotateXYZ( Vector3 angle ) +> result = RL.MatrixRotateXYZ( Vector3 angle ) Get xyz-rotation matrix ( angles in radians ) @@ -5511,7 +5509,7 @@ Get xyz-rotation matrix ( angles in radians ) --- -> result = RL_MatrixRotateZYX( Vector3 angle ) +> result = RL.MatrixRotateZYX( Vector3 angle ) Get zyx-rotation matrix ( angles in radians ) @@ -5520,7 +5518,7 @@ Get zyx-rotation matrix ( angles in radians ) --- -> result = RL_MatrixScale( Vector3 scale ) +> result = RL.MatrixScale( Vector3 scale ) Get scaling matrix @@ -5529,7 +5527,7 @@ Get scaling matrix --- -> result = RL_MatrixFrustum( double left, double right, double bottom, double top, double near, double far ) +> result = RL.MatrixFrustum( double left, double right, double bottom, double top, double near, double far ) Get perspective projection matrix @@ -5538,7 +5536,7 @@ Get perspective projection matrix --- -> result = RL_MatrixPerspective( double fovy, double aspect, double near, double far ) +> result = RL.MatrixPerspective( double fovy, double aspect, double near, double far ) Get perspective projection matrix @@ -5547,7 +5545,7 @@ Get perspective projection matrix --- -> result = RL_MatrixOrtho( double left, double right, double bottom, double top, double near, double far ) +> result = RL.MatrixOrtho( double left, double right, double bottom, double top, double near, double far ) Get orthographic projection matrix @@ -5556,7 +5554,7 @@ Get orthographic projection matrix --- -> result = RL_MatrixLookAt( Vector3 eye, Vector3 target, Vector3 up ) +> result = RL.MatrixLookAt( Vector3 eye, Vector3 target, Vector3 up ) Get camera look-at matrix ( View matrix ) @@ -5569,7 +5567,7 @@ Get camera look-at matrix ( View matrix ) --- -> result = RL_QuaternionAdd( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionAdd( Quaternion q1, Quaternion q2 ) Add two quaternions @@ -5578,7 +5576,7 @@ Add two quaternions --- -> result = RL_QuaternionAddValue( Quaternion q, float add ) +> result = RL.QuaternionAddValue( Quaternion q, float add ) Add quaternion and float value @@ -5587,7 +5585,7 @@ Add quaternion and float value --- -> result = RL_QuaternionSubtract( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionSubtract( Quaternion q1, Quaternion q2 ) Subtract two quaternions @@ -5596,7 +5594,7 @@ Subtract two quaternions --- -> result = RL_QuaternionSubtractValue( Quaternion q, float sub ) +> result = RL.QuaternionSubtractValue( Quaternion q, float sub ) Subtract quaternion and float value @@ -5605,7 +5603,7 @@ Subtract quaternion and float value --- -> result = RL_QuaternionIdentity() +> result = RL.QuaternionIdentity() Get identity quaternion @@ -5613,7 +5611,7 @@ Get identity quaternion --- -> result = RL_QuaternionLength( Quaternion q ) +> result = RL.QuaternionLength( Quaternion q ) Computes the length of a quaternion @@ -5622,7 +5620,7 @@ Computes the length of a quaternion --- -> result = RL_QuaternionNormalize( Quaternion q ) +> result = RL.QuaternionNormalize( Quaternion q ) Normalize provided quaternion @@ -5631,7 +5629,7 @@ Normalize provided quaternion --- -> result = RL_QuaternionInvert( Quaternion q ) +> result = RL.QuaternionInvert( Quaternion q ) Invert provided quaternion @@ -5640,7 +5638,7 @@ Invert provided quaternion --- -> result = RL_QuaternionMultiply( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionMultiply( Quaternion q1, Quaternion q2 ) Calculate two quaternion multiplication @@ -5649,7 +5647,7 @@ Calculate two quaternion multiplication --- -> result = RL_QuaternionScale( Quaternion q, float mul ) +> result = RL.QuaternionScale( Quaternion q, float mul ) Scale quaternion by float value @@ -5658,7 +5656,7 @@ Scale quaternion by float value --- -> result = RL_QuaternionDivide( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionDivide( Quaternion q1, Quaternion q2 ) Divide two quaternions @@ -5667,7 +5665,7 @@ Divide two quaternions --- -> result = RL_QuaternionLerp( Quaternion q1, Quaternion q2, float amount ) +> result = RL.QuaternionLerp( Quaternion q1, Quaternion q2, float amount ) Calculate linear interpolation between two quaternions @@ -5676,7 +5674,7 @@ Calculate linear interpolation between two quaternions --- -> result = RL_QuaternionNlerp( Quaternion q1, Quaternion q2, float amount ) +> result = RL.QuaternionNlerp( Quaternion q1, Quaternion q2, float amount ) Calculate slerp-optimized interpolation between two quaternions @@ -5685,7 +5683,7 @@ Calculate slerp-optimized interpolation between two quaternions --- -> result = RL_QuaternionSlerp( Quaternion q1, Quaternion q2, float amount ) +> result = RL.QuaternionSlerp( Quaternion q1, Quaternion q2, float amount ) Calculates spherical linear interpolation between two quaternions @@ -5694,7 +5692,7 @@ Calculates spherical linear interpolation between two quaternions --- -> result = RL_QuaternionFromVector3ToVector3( Vector3 from, Vector3 to ) +> result = RL.QuaternionFromVector3ToVector3( Vector3 from, Vector3 to ) Calculate quaternion based on the rotation from one vector to another @@ -5703,7 +5701,7 @@ Calculate quaternion based on the rotation from one vector to another --- -> result = RL_QuaternionFromMatrix( Matrix mat ) +> result = RL.QuaternionFromMatrix( Matrix mat ) Get a quaternion for a given rotation matrix @@ -5712,7 +5710,7 @@ Get a quaternion for a given rotation matrix --- -> result = RL_QuaternionToMatrix( Quaternion q ) +> result = RL.QuaternionToMatrix( Quaternion q ) Get a quaternion for a given rotation matrix @@ -5721,7 +5719,7 @@ Get a quaternion for a given rotation matrix --- -> result = RL_QuaternionFromAxisAngle( Vector3 axis, float angle ) +> result = RL.QuaternionFromAxisAngle( Vector3 axis, float angle ) Get rotation quaternion for an angle and axis NOTE: angle must be provided in radians @@ -5731,7 +5729,7 @@ NOTE: angle must be provided in radians --- -> axis, angle = RL_QuaternionToAxisAngle( Quaternion q ) +> axis, angle = RL.QuaternionToAxisAngle( Quaternion q ) Get the rotation angle and axis for a given quaternion @@ -5740,7 +5738,7 @@ Get the rotation angle and axis for a given quaternion --- -> result = RL_QuaternionFromEuler( float pitch, float yaw, float roll ) +> result = RL.QuaternionFromEuler( float pitch, float yaw, float roll ) Get the quaternion equivalent to Euler angles NOTE: Rotation order is ZYX @@ -5750,7 +5748,7 @@ NOTE: Rotation order is ZYX --- -> result = RL_QuaternionToEuler( Quaternion q ) +> result = RL.QuaternionToEuler( Quaternion q ) Get the Euler angles equivalent to quaternion (roll, pitch, yaw) NOTE: Angles are returned in a Vector3 struct in radians @@ -5760,7 +5758,7 @@ NOTE: Angles are returned in a Vector3 struct in radians --- -> result = RL_QuaternionTransform( Quaternion q, Matrix mat ) +> result = RL.QuaternionTransform( Quaternion q, Matrix mat ) Transform a quaternion given a transformation matrix @@ -5769,7 +5767,7 @@ Transform a quaternion given a transformation matrix --- -> result = RL_QuaternionEquals( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionEquals( Quaternion q1, Quaternion q2 ) Check whether two given quaternions are almost equal @@ -5782,31 +5780,31 @@ Check whether two given quaternions are almost equal --- -> RL_GuiEnable() +> RL.GuiEnable() Enable gui controls ( global state ) --- -> RL_GuiDisable() +> RL.GuiDisable() Disable gui controls ( global state ) --- -> RL_GuiLock() +> RL.GuiLock() Lock gui controls ( global state ) --- -> RL_GuiUnlock() +> RL.GuiUnlock() Unlock gui controls ( global state ) --- -> locked = RL_GuiIsLocked() +> locked = RL.GuiIsLocked() Check if gui is locked ( global state ) @@ -5814,7 +5812,7 @@ Check if gui is locked ( global state ) --- -> success = RL_GuiFade( float alpha ) +> success = RL.GuiFade( float alpha ) Set gui controls alpha ( global state ), alpha goes from 0.0f to 1.0f @@ -5823,7 +5821,7 @@ Set gui controls alpha ( global state ), alpha goes from 0.0f to 1.0f --- -> success = RL_GuiSetState( int state ) +> success = RL.GuiSetState( int state ) Set gui state ( global state ) @@ -5832,7 +5830,7 @@ Set gui state ( global state ) --- -> state = RL_GuiGetState() +> state = RL.GuiGetState() Get gui state ( global state ) @@ -5844,7 +5842,7 @@ Get gui state ( global state ) --- -> success = RL_GuiSetFont( Font font ) +> success = RL.GuiSetFont( Font font ) Set gui custom font ( Global state ) @@ -5857,7 +5855,7 @@ Set gui custom font ( Global state ) --- -> success = RL_GuiSetStyle( int control, int property, int value ) +> success = RL.GuiSetStyle( int control, int property, int value ) Set one style property @@ -5866,7 +5864,7 @@ Set one style property --- -> value = RL_GuiGetStyle( int control, int property ) +> value = RL.GuiGetStyle( int control, int property ) Get one style property @@ -5875,7 +5873,7 @@ Get one style property --- -> success = RL_GuiLoadStyle( int control, int property ) +> success = RL.GuiLoadStyle( int control, int property ) Load style file over global style variable ( .rgs ) @@ -5884,7 +5882,7 @@ Load style file over global style variable ( .rgs ) --- -> RL_GuiLoadStyleDefault() +> RL.GuiLoadStyleDefault() Load style default over global style @@ -5894,7 +5892,7 @@ Load style default over global style --- -> state = RL_GuiWindowBox( Rectangle bounds, string title ) +> state = RL.GuiWindowBox( Rectangle bounds, string title ) Window Box control, shows a window that can be closed @@ -5903,7 +5901,7 @@ Window Box control, shows a window that can be closed --- -> success = RL_GuiGroupBox( Rectangle bounds, string text ) +> success = RL.GuiGroupBox( Rectangle bounds, string text ) Group Box control with text name @@ -5912,7 +5910,7 @@ Group Box control with text name --- -> success = RL_GuiLine( Rectangle bounds, string text ) +> success = RL.GuiLine( Rectangle bounds, string text ) Line separator control, could contain text @@ -5921,7 +5919,7 @@ Line separator control, could contain text --- -> success = RL_GuiPanel( Rectangle bounds, string text ) +> success = RL.GuiPanel( Rectangle bounds, string text ) Panel control, useful to group controls @@ -5930,7 +5928,7 @@ Panel control, useful to group controls --- -> view, scroll = RL_GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll ) +> view, scroll = RL.GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll ) Scroll Panel control @@ -5943,7 +5941,7 @@ Scroll Panel control --- -> success = RL_GuiLabel( Rectangle bounds, string text ) +> success = RL.GuiLabel( Rectangle bounds, string text ) Label control, shows text @@ -5952,7 +5950,7 @@ Label control, shows text --- -> clicked = RL_GuiButton( Rectangle bounds, string text ) +> clicked = RL.GuiButton( Rectangle bounds, string text ) Button control, returns true when clicked @@ -5961,7 +5959,7 @@ Button control, returns true when clicked --- -> clicked = RL_GuiLabelButton( Rectangle bounds, string text ) +> clicked = RL.GuiLabelButton( Rectangle bounds, string text ) Label button control, show true when clicked @@ -5970,7 +5968,7 @@ Label button control, show true when clicked --- -> active = RL_GuiToggle( Rectangle bounds, string text, bool active ) +> active = RL.GuiToggle( Rectangle bounds, string text, bool active ) Toggle Button control, returns true when active @@ -5979,7 +5977,7 @@ Toggle Button control, returns true when active --- -> index = RL_GuiToggleGroup( Rectangle bounds, string text, int active ) +> index = RL.GuiToggleGroup( Rectangle bounds, string text, int active ) Toggle Group control, returns active toggle index @@ -5988,7 +5986,7 @@ Toggle Group control, returns active toggle index --- -> active = RL_GuiCheckBox( Rectangle bounds, string text, bool checked ) +> active = RL.GuiCheckBox( Rectangle bounds, string text, bool checked ) Check Box control, returns true when active @@ -5997,7 +5995,7 @@ Check Box control, returns true when active --- -> active = RL_GuiComboBox( Rectangle bounds, string text, int active ) +> active = RL.GuiComboBox( Rectangle bounds, string text, int active ) Combo Box control, returns selected item index @@ -6006,7 +6004,7 @@ Combo Box control, returns selected item index --- -> pressed, text = RL_GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode ) +> pressed, text = RL.GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode ) Text Box control, updates input text @@ -6015,7 +6013,7 @@ Text Box control, updates input text --- -> pressed, text = RL_GuiTextBoxMulti( Rectangle bounds, string text, int textSize, bool editMode ) +> pressed, text = RL.GuiTextBoxMulti( Rectangle bounds, string text, int textSize, bool editMode ) Text Box control with multiple lines @@ -6024,7 +6022,7 @@ Text Box control with multiple lines --- -> pressed, value = RL_GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode ) +> pressed, value = RL.GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode ) Spinner control, returns selected value @@ -6033,7 +6031,7 @@ Spinner control, returns selected value --- -> pressed, value = RL_GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode ) +> pressed, value = RL.GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode ) Value Box control, updates input text with numbers @@ -6042,7 +6040,7 @@ Value Box control, updates input text with numbers --- -> value = RL_GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) +> value = RL.GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) Slider control, returns selected value @@ -6051,7 +6049,7 @@ Slider control, returns selected value --- -> value = RL_GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) +> value = RL.GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) Slider Bar control, returns selected value @@ -6060,7 +6058,7 @@ Slider Bar control, returns selected value --- -> value = RL_GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) +> value = RL.GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) Progress Bar control, shows current progress value @@ -6069,7 +6067,7 @@ Progress Bar control, shows current progress value --- -> value = RL_GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue ) +> value = RL.GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue ) Scroll Bar control @@ -6078,7 +6076,7 @@ Scroll Bar control --- -> pressed, item = RL_GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode ) +> pressed, item = RL.GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode ) Dropdown Box control, returns selected item @@ -6087,7 +6085,7 @@ Dropdown Box control, returns selected item --- -> success = RL_GuiStatusBar( Rectangle bounds, string text ) +> success = RL.GuiStatusBar( Rectangle bounds, string text ) Status Bar control, shows info text @@ -6096,7 +6094,7 @@ Status Bar control, shows info text --- -> success = RL_GuiDummyRec( Rectangle bounds, string text ) +> success = RL.GuiDummyRec( Rectangle bounds, string text ) Dummy control for placeholders @@ -6105,7 +6103,7 @@ Dummy control for placeholders --- -> cell = RL_GuiGrid( Rectangle bounds, string text, float spacing, int subdivs ) +> cell = RL.GuiGrid( Rectangle bounds, string text, float spacing, int subdivs ) Grid control, returns mouse cell position @@ -6118,7 +6116,7 @@ Grid control, returns mouse cell position --- -> itemIndex, scrollIndex = RL_GuiListView( Rectangle bounds, string text, int scrollIndex, int active ) +> itemIndex, scrollIndex = RL.GuiListView( Rectangle bounds, string text, int scrollIndex, int active ) List View control, returns selected list item index and scroll index @@ -6127,7 +6125,7 @@ List View control, returns selected list item index and scroll index --- -> itemIndex, scrollIndex, focus = RL_GuiListViewEx( Rectangle bounds, string text, int focus, int scrollIndex, int active ) +> itemIndex, scrollIndex, focus = RL.GuiListViewEx( Rectangle bounds, string text, int focus, int scrollIndex, int active ) List View with extended parameters, returns selected list item index, scroll index and focus @@ -6136,7 +6134,7 @@ List View with extended parameters, returns selected list item index, scroll ind --- -> buttonIndex = RL_GuiMessageBox( Rectangle bounds, string title, string message, string buttons ) +> buttonIndex = RL.GuiMessageBox( Rectangle bounds, string title, string message, string buttons ) Message Box control, displays a message, returns button index ( 0 is x button ) @@ -6145,7 +6143,7 @@ Message Box control, displays a message, returns button index ( 0 is x button ) --- -> buttonIndex, text, secretViewActive = RL_GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, int secretViewActive ) +> buttonIndex, text, secretViewActive = RL.GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, int secretViewActive ) Text Input Box control, ask for text, supports secret @@ -6154,7 +6152,7 @@ Text Input Box control, ask for text, supports secret --- -> color = RL_GuiColorPicker( Rectangle bounds, string text, Color color ) +> color = RL.GuiColorPicker( Rectangle bounds, string text, Color color ) Color Picker control ( multiple color controls ) @@ -6163,7 +6161,7 @@ Color Picker control ( multiple color controls ) --- -> color = RL_GuiColorPanel( Rectangle bounds, string text, Color color ) +> color = RL.GuiColorPanel( Rectangle bounds, string text, Color color ) Color Panel control @@ -6172,7 +6170,7 @@ Color Panel control --- -> alpha = RL_GuiColorBarAlpha( Rectangle bounds, string text, float alpha ) +> alpha = RL.GuiColorBarAlpha( Rectangle bounds, string text, float alpha ) Color Bar Alpha control @@ -6181,7 +6179,7 @@ Color Bar Alpha control --- -> hue = RL_GuiColorBarHue( Rectangle bounds, string text, float value ) +> hue = RL.GuiColorBarHue( Rectangle bounds, string text, float value ) Color Bar Hue control @@ -6194,7 +6192,7 @@ Color Bar Hue control --- -> text = RL_GuiIconText( int iconId, string text ) +> text = RL.GuiIconText( int iconId, string text ) Get text with icon id prepended ( if supported ) @@ -6203,7 +6201,7 @@ Get text with icon id prepended ( if supported ) --- -> success = RL_GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color ) +> success = RL.GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color ) Draw icon @@ -6212,7 +6210,7 @@ Draw icon --- -> success = RL_GuiSetIconScale( int scale ) +> success = RL.GuiSetIconScale( int scale ) Set icon scale ( 1 by default ) @@ -6221,7 +6219,7 @@ Set icon scale ( 1 by default ) --- -> success = RL_GuiSetIconPixel( int iconId, Vector2 pos ) +> success = RL.GuiSetIconPixel( int iconId, Vector2 pos ) Set icon pixel value @@ -6230,7 +6228,7 @@ Set icon pixel value --- -> success = RL_GuiClearIconPixel( int iconId, Vector2 pos ) +> success = RL.GuiClearIconPixel( int iconId, Vector2 pos ) Clear icon pixel value @@ -6239,7 +6237,7 @@ Clear icon pixel value --- -> value = RL_GuiCheckIconPixel( int iconId, Vector2 pos ) +> value = RL.GuiCheckIconPixel( int iconId, Vector2 pos ) Check icon pixel value @@ -6252,7 +6250,7 @@ Check icon pixel value --- -> light = RL_CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader ) +> light = RL.CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader ) Create a light and get shader locations @@ -6261,7 +6259,7 @@ Create a light and get shader locations --- -> success = RL_UpdateLightValues( Shader shader, Light light ) +> success = RL.UpdateLightValues( Shader shader, Light light ) Send light properties to shader @@ -6274,7 +6272,7 @@ Send light properties to shader --- -> success = RL_rlSetLineWidth( float width ) +> success = RL.rlSetLineWidth( float width ) Set the line drawing width @@ -6283,7 +6281,7 @@ Set the line drawing width --- -> width = RL_rlGetLineWidth() +> width = RL.rlGetLineWidth() Get the line drawing width @@ -6295,7 +6293,7 @@ Get the line drawing width --- -> value = RL_EaseLinear( float t, float b, float c, float d ) +> value = RL.EaseLinear( float t, float b, float c, float d ) Ease linear @@ -6308,7 +6306,7 @@ Ease linear --- -> value = RL_EaseSineIn( float t, float b, float c, float d ) +> value = RL.EaseSineIn( float t, float b, float c, float d ) Ease sine in @@ -6317,7 +6315,7 @@ Ease sine in --- -> value = RL_EaseSineOut( float t, float b, float c, float d ) +> value = RL.EaseSineOut( float t, float b, float c, float d ) Ease sine out @@ -6326,7 +6324,7 @@ Ease sine out --- -> value = RL_EaseSineInOut( float t, float b, float c, float d ) +> value = RL.EaseSineInOut( float t, float b, float c, float d ) Ease sine in out @@ -6339,7 +6337,7 @@ Ease sine in out --- -> value = RL_EaseCircIn( float t, float b, float c, float d ) +> value = RL.EaseCircIn( float t, float b, float c, float d ) Ease circle in @@ -6348,7 +6346,7 @@ Ease circle in --- -> value = RL_EaseCircOut( float t, float b, float c, float d ) +> value = RL.EaseCircOut( float t, float b, float c, float d ) Ease circle out @@ -6357,7 +6355,7 @@ Ease circle out --- -> value = RL_EaseCircInOut( float t, float b, float c, float d ) +> value = RL.EaseCircInOut( float t, float b, float c, float d ) Ease circle in out @@ -6370,7 +6368,7 @@ Ease circle in out --- -> value = RL_EaseCubicIn( float t, float b, float c, float d ) +> value = RL.EaseCubicIn( float t, float b, float c, float d ) Ease cubic in @@ -6379,7 +6377,7 @@ Ease cubic in --- -> value = RL_EaseCubicOut( float t, float b, float c, float d ) +> value = RL.EaseCubicOut( float t, float b, float c, float d ) Ease cubic out @@ -6388,7 +6386,7 @@ Ease cubic out --- -> value = RL_EaseCubicInOut( float t, float b, float c, float d ) +> value = RL.EaseCubicInOut( float t, float b, float c, float d ) Ease cubic in out @@ -6401,7 +6399,7 @@ Ease cubic in out --- -> value = RL_EaseQuadIn( float t, float b, float c, float d ) +> value = RL.EaseQuadIn( float t, float b, float c, float d ) Ease quadratic in @@ -6410,7 +6408,7 @@ Ease quadratic in --- -> value = RL_EaseQuadOut( float t, float b, float c, float d ) +> value = RL.EaseQuadOut( float t, float b, float c, float d ) Ease quadratic out @@ -6419,7 +6417,7 @@ Ease quadratic out --- -> value = RL_EaseQuadInOut( float t, float b, float c, float d ) +> value = RL.EaseQuadInOut( float t, float b, float c, float d ) Ease quadratic in out @@ -6432,7 +6430,7 @@ Ease quadratic in out --- -> value = RL_EaseExpoIn( float t, float b, float c, float d ) +> value = RL.EaseExpoIn( float t, float b, float c, float d ) Ease exponential in @@ -6441,7 +6439,7 @@ Ease exponential in --- -> value = RL_EaseExpoOut( float t, float b, float c, float d ) +> value = RL.EaseExpoOut( float t, float b, float c, float d ) Ease exponential out @@ -6450,7 +6448,7 @@ Ease exponential out --- -> value = RL_EaseExpoInOut( float t, float b, float c, float d ) +> value = RL.EaseExpoInOut( float t, float b, float c, float d ) Ease exponential in out @@ -6463,7 +6461,7 @@ Ease exponential in out --- -> value = RL_EaseBackIn( float t, float b, float c, float d ) +> value = RL.EaseBackIn( float t, float b, float c, float d ) Ease back in @@ -6472,7 +6470,7 @@ Ease back in --- -> value = RL_EaseBackOut( float t, float b, float c, float d ) +> value = RL.EaseBackOut( float t, float b, float c, float d ) Ease back out @@ -6481,7 +6479,7 @@ Ease back out --- -> value = RL_EaseBackInOut( float t, float b, float c, float d ) +> value = RL.EaseBackInOut( float t, float b, float c, float d ) Ease back in out @@ -6494,7 +6492,7 @@ Ease back in out --- -> value = RL_EaseBounceIn( float t, float b, float c, float d ) +> value = RL.EaseBounceIn( float t, float b, float c, float d ) Ease bounce in @@ -6503,7 +6501,7 @@ Ease bounce in --- -> value = RL_EaseBounceOut( float t, float b, float c, float d ) +> value = RL.EaseBounceOut( float t, float b, float c, float d ) Ease bounce out @@ -6512,7 +6510,7 @@ Ease bounce out --- -> value = RL_EaseBounceInOut( float t, float b, float c, float d ) +> value = RL.EaseBounceInOut( float t, float b, float c, float d ) Ease bounce in out @@ -6525,7 +6523,7 @@ Ease bounce in out --- -> value = RL_EaseElasticIn( float t, float b, float c, float d ) +> value = RL.EaseElasticIn( float t, float b, float c, float d ) Ease elastic in @@ -6534,7 +6532,7 @@ Ease elastic in --- -> value = RL_EaseElasticOut( float t, float b, float c, float d ) +> value = RL.EaseElasticOut( float t, float b, float c, float d ) Ease elastic out @@ -6543,7 +6541,7 @@ Ease elastic out --- -> value = RL_EaseElasticInOut( float t, float b, float c, float d ) +> value = RL.EaseElasticInOut( float t, float b, float c, float d ) Ease elastic in out diff --git a/README.md b/README.md index 14e0ef7..00aafe2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ## About -Idea of this project was to bring the power and simplicity of raylib to easy beginner friendly language like Lua in a very straight forward manner. It is loose binding to Raylib, some functions will not be included and some are added. The idea of pointing "main.lua" file and access functions "init", "process" and "draw" are borrowed from Löve game engine. +Idea of this project was to bring the power and simplicity of raylib to easy beginner friendly language like Lua in a very straight forward manner. It is loose binding to Raylib, some functions will not be included and some are added. The idea of pointing "main.lua" file and access functions "init", "process" and "draw" are borrowed from Löve game framework. -Need for boilerplate code is minimal and in true Lua fashion (in better and worse) you don't need to worry about strict type rules since all Raylib types are lua tables or object id's. Also what Lua cannot handle, the engine is simple enough to be fairly easily extended with new functionality or by using Lua C-libraries. +Need for boilerplate code is minimal and in true Lua fashion (in better and worse) you don't need to worry about strict type rules since all Raylib types are lua tables or object id's. Also what Lua cannot handle, the framework is simple enough to be fairly easily extended with new functionality or by using Lua C-libraries. ReiLua is not planned to be a one-to-one binding to raylib. If you want more direct bindings, there are other projects like https://github.com/TSnake41/raylib-lua. @@ -35,33 +35,33 @@ List of some MISSING features that are planned to be included. For specific func ## Usage -Application needs 'main.lua' or 'main' file as entry point. ReiLua executable will first look it from same directory. Alternatively, path to the folder where "main.lua" is located can be given as argument. There are three global Lua functions that the engine will call, 'init', 'process' and 'draw'. +Application needs 'main.lua' or 'main' file as entry point. ReiLua executable will first look it from same directory. Alternatively, path to the folder where "main.lua" is located can be given as argument. There are five Lua functions that the framework will call, 'RL.init', 'RL.process', 'RL.draw', 'RL.log' and 'RL.exit'. Example of basic "main.lua" file that will show basic windows with text. ``` -local textColor = BLACK +local textColor = RL.BLACK local textPos = { 192, 200 } -function init() - RL_SetWindowTitle( "First window" ) +function RL.init() + RL.SetWindowTitle( "First window" ) end -function process( delta ) - if RL_IsKeyPressed( KEY_ENTER ) then +function RL.process( delta ) + if RL.IsKeyPressed( RL.KEY_ENTER ) then textColor = BLUE textPos = { 230, 230 } end - if RL_IsKeyPressed( KEY_SPACE ) then - textColor = BLACK + if RL.IsKeyPressed( RL.KEY_SPACE ) then + textColor = RL.BLACK textPos = { 192, 200 } end end -function draw() - RL_ClearBackground( RAYWHITE ) - RL_DrawText( 0, "Congrats! You created your first window!", textPos, 20, 2, textColor ) +function RL.draw() + RL.ClearBackground( RL.RAYWHITE ) + RL.DrawText( 0, "Congrats! You created your first window!", textPos, 20, 2, textColor ) end ``` @@ -74,6 +74,7 @@ GameFolder ``` Application should now start successfully from executable. All functionality can be found in "API". +ReiLua_API.lua can be put into project folder to provide annotations when using Lua Language Server. ## Interpreter Mode @@ -83,6 +84,14 @@ ReiLua can also be used to run single lua file using interpreter mode with argum ./Reilua -i hello.lua ``` +## Generate API + +Generate API.md and ReiLua_API.lua from build folder with command. + +``` +./Reilua -i ../doc_parser.lua +``` + ## Building I think the simplest way would be to statically link Raylib and Lua to the same executable. Specially on Linux this would simplify distribution of games since different distros tend to use different versions of librarys. Of course if you plan to only experiment with it, this isn't so important. Current Raylib version 4.2.0. diff --git a/ReiLua_API.lua b/ReiLua_API.lua new file mode 100644 index 0000000..3623336 --- /dev/null +++ b/ReiLua_API.lua @@ -0,0 +1,5385 @@ +-- Put this file into your project folder to provide annotations when using Lua language server. + +RL={} + +-- Functions. + +---This function will be called first when 'main.lua' is found +function RL.init() end +---This function will be called every frame during execution. It will get time duration from last frame on argument 'delta' +---@param delta number +function RL.process( delta ) end +---This function will be called every frame after process and it should have all rendering related functions. Note: Engine will call Raylib functions 'BeginDrawing()' before this function call and 'EndDrawing()' after it. You can still use RL.BeginDrawing() and RL.EndDrawing() manually from anywhere. +function RL.draw() end +---This function can be used for custom log message handling. +---@param logLevel integer +---@param message string +function RL.log( logLevel, message ) end +---This function will be called on program close. Cleanup could be done here. +function RL.exit() end + +-- Globals - ConfigFlags + +RL.FLAG_VSYNC_HINT=64 +RL.FLAG_FULLSCREEN_MODE=2 +RL.FLAG_WINDOW_RESIZABLE=4 +RL.FLAG_WINDOW_UNDECORATED=8 +RL.FLAG_WINDOW_HIDDEN=128 +RL.FLAG_WINDOW_MINIMIZED=512 +RL.FLAG_WINDOW_MAXIMIZED=1024 +RL.FLAG_WINDOW_UNFOCUSED=2048 +RL.FLAG_WINDOW_TOPMOST=4096 +RL.FLAG_WINDOW_ALWAYS_RUN=256 +RL.FLAG_WINDOW_TRANSPARENT=16 +RL.FLAG_WINDOW_HIGHDPI=8192 +RL.FLAG_MSAA_4X_HINT=32 +RL.FLAG_INTERLACED_HINT=65536 + +-- Globals - TraceLogLevel + +RL.LOG_ALL=0 +RL.LOG_TRACE=1 +RL.LOG_DEBUG=2 +RL.LOG_INFO=3 +RL.LOG_WARNING=4 +RL.LOG_ERROR=5 +RL.LOG_FATAL=6 +RL.LOG_NONE=7 + +-- Globals - KeyboardKey + +RL.GLFW_KEY_UNKNOWN=nil +RL.KEY_NULL=0 +RL.KEY_APOSTROPHE=39 +RL.KEY_COMMA=44 +RL.KEY_MINUS=45 +RL.KEY_PERIOD=46 +RL.KEY_SLASH=47 +RL.KEY_ZERO=48 +RL.KEY_ONE=49 +RL.KEY_TWO=50 +RL.KEY_THREE=51 +RL.KEY_FOUR=52 +RL.KEY_FIVE=53 +RL.KEY_SIX=54 +RL.KEY_SEVEN=55 +RL.KEY_EIGHT=56 +RL.KEY_NINE=57 +RL.KEY_SEMICOLON=59 +RL.KEY_EQUAL=61 +RL.KEY_A=65 +RL.KEY_B=66 +RL.KEY_C=67 +RL.KEY_D=68 +RL.KEY_E=69 +RL.KEY_F=70 +RL.KEY_G=71 +RL.KEY_H=72 +RL.KEY_I=73 +RL.KEY_J=74 +RL.KEY_K=75 +RL.KEY_L=76 +RL.KEY_M=77 +RL.KEY_N=78 +RL.KEY_O=79 +RL.KEY_P=80 +RL.KEY_Q=81 +RL.KEY_R=82 +RL.KEY_S=83 +RL.KEY_T=84 +RL.KEY_U=85 +RL.KEY_V=86 +RL.KEY_W=87 +RL.KEY_X=88 +RL.KEY_Y=89 +RL.KEY_Z=90 +RL.KEY_LEFT_BRACKET=91 +RL.KEY_BACKSLASH=92 +RL.KEY_RIGHT_BRACKET=93 +RL.KEY_GRAVE=96 +RL.KEY_SPACE=32 +RL.KEY_ESCAPE=256 +RL.KEY_ENTER=257 +RL.KEY_TAB=258 +RL.KEY_BACKSPACE=259 +RL.KEY_INSERT=260 +RL.KEY_DELETE=261 +RL.KEY_RIGHT=262 +RL.KEY_LEFT=263 +RL.KEY_DOWN=264 +RL.KEY_UP=265 +RL.KEY_PAGE_UP=266 +RL.KEY_PAGE_DOWN=267 +RL.KEY_HOME=268 +RL.KEY_END=269 +RL.KEY_CAPS_LOCK=280 +RL.KEY_SCROLL_LOCK=281 +RL.KEY_NUM_LOCK=282 +RL.KEY_PRINT_SCREEN=283 +RL.KEY_PAUSE=284 +RL.KEY_F1=290 +RL.KEY_F2=291 +RL.KEY_F3=292 +RL.KEY_F4=293 +RL.KEY_F5=294 +RL.KEY_F6=295 +RL.KEY_F7=296 +RL.KEY_F8=297 +RL.KEY_F9=298 +RL.KEY_F10=299 +RL.KEY_F11=300 +RL.KEY_F12=301 +RL.KEY_LEFT_SHIFT=340 +RL.KEY_LEFT_CONTROL=341 +RL.KEY_LEFT_ALT=342 +RL.KEY_LEFT_SUPER=343 +RL.KEY_RIGHT_SHIFT=344 +RL.KEY_RIGHT_CONTROL=345 +RL.KEY_RIGHT_ALT=346 +RL.KEY_RIGHT_SUPER=347 +RL.KEY_KB_MENU=348 +RL.KEY_KP_0=320 +RL.KEY_KP_1=321 +RL.KEY_KP_2=322 +RL.KEY_KP_3=323 +RL.KEY_KP_4=324 +RL.KEY_KP_5=325 +RL.KEY_KP_6=326 +RL.KEY_KP_7=327 +RL.KEY_KP_8=328 +RL.KEY_KP_9=329 +RL.KEY_KP_DECIMAL=330 +RL.KEY_KP_DIVIDE=331 +RL.KEY_KP_MULTIPLY=332 +RL.KEY_KP_SUBTRACT=333 +RL.KEY_KP_ADD=334 +RL.KEY_KP_ENTER=335 +RL.KEY_KP_EQUAL=336 +RL.KEY_BACK=4 +RL.KEY_MENU=82 +RL.KEY_VOLUME_UP=24 +RL.KEY_VOLUME_DOWN=25 + +-- Globals - MouseButtons + +RL.MOUSE_BUTTON_LEFT=0 +RL.MOUSE_BUTTON_RIGHT=1 +RL.MOUSE_BUTTON_MIDDLE=2 +RL.MOUSE_BUTTON_SIDE=3 +RL.MOUSE_BUTTON_EXTRA=4 +RL.MOUSE_BUTTON_FORWARD=5 +RL.MOUSE_BUTTON_BACK=6 + +-- Globals - MouseCursor + +RL.MOUSE_CURSOR_DEFAULT=0 +RL.MOUSE_CURSOR_ARROW=1 +RL.MOUSE_CURSOR_IBEAM=2 +RL.MOUSE_CURSOR_CROSSHAIR=3 +RL.MOUSE_CURSOR_POINTING_HAND=4 +RL.MOUSE_CURSOR_RESIZE_EW=5 +RL.MOUSE_CURSOR_RESIZE_NS=6 +RL.MOUSE_CURSOR_RESIZE_NWSE=7 +RL.MOUSE_CURSOR_RESIZE_NESW=8 +RL.MOUSE_CURSOR_RESIZE_ALL=9 +RL.MOUSE_CURSOR_NOT_ALLOWED=10 + +-- Globals - GamepadButtons + +RL.GAMEPAD_BUTTON_UNKNOWN=0 +RL.GAMEPAD_BUTTON_LEFT_FACE_UP=1 +RL.GAMEPAD_BUTTON_LEFT_FACE_RIGHT=2 +RL.GAMEPAD_BUTTON_LEFT_FACE_DOWN=3 +RL.GAMEPAD_BUTTON_LEFT_FACE_LEFT=4 +RL.GAMEPAD_BUTTON_RIGHT_FACE_UP=5 +RL.GAMEPAD_BUTTON_RIGHT_FACE_RIGHT=6 +RL.GAMEPAD_BUTTON_RIGHT_FACE_DOWN=7 +RL.GAMEPAD_BUTTON_RIGHT_FACE_LEFT=8 +RL.GAMEPAD_BUTTON_LEFT_TRIGGER_1=9 +RL.GAMEPAD_BUTTON_LEFT_TRIGGER_2=10 +RL.GAMEPAD_BUTTON_RIGHT_TRIGGER_1=11 +RL.GAMEPAD_BUTTON_RIGHT_TRIGGER_2=12 +RL.GAMEPAD_BUTTON_MIDDLE_LEFT=13 +RL.GAMEPAD_BUTTON_MIDDLE=14 +RL.GAMEPAD_BUTTON_MIDDLE_RIGHT=15 +RL.GAMEPAD_BUTTON_LEFT_THUMB=16 +RL.GAMEPAD_BUTTON_RIGHT_THUMB=17 + +-- Globals - GamepadAxis + +RL.GAMEPAD_AXIS_LEFT_X=0 +RL.GAMEPAD_AXIS_LEFT_Y=1 +RL.GAMEPAD_AXIS_RIGHT_X=2 +RL.GAMEPAD_AXIS_RIGHT_Y=3 +RL.GAMEPAD_AXIS_LEFT_TRIGGER=4 +RL.GAMEPAD_AXIS_RIGHT_TRIGGER=5 + +-- Globals - MapTypes + +RL.MATERIAL_MAP_ALBEDO=0 +RL.MATERIAL_MAP_METALNESS=1 +RL.MATERIAL_MAP_NORMAL=2 +RL.MATERIAL_MAP_ROUGHNESS=3 +RL.MATERIAL_MAP_OCCLUSION=4 +RL.MATERIAL_MAP_EMISSION=5 +RL.MATERIAL_MAP_HEIGHT=6 +RL.MATERIAL_MAP_CUBEMAP=7 +RL.MATERIAL_MAP_IRRADIANCE=8 +RL.MATERIAL_MAP_PREFILTER=9 +RL.MATERIAL_MAP_BRDF=10 +RL.MATERIAL_MAP_DIFFUSE=0 +RL.MATERIAL_MAP_SPECULAR=1 + +-- Globals - ShaderLocationIndex + +RL.SHADER_LOC_VERTEX_POSITION=0 +RL.SHADER_LOC_VERTEX_TEXCOORD01=1 +RL.SHADER_LOC_VERTEX_TEXCOORD02=2 +RL.SHADER_LOC_VERTEX_NORMAL=3 +RL.SHADER_LOC_VERTEX_TANGENT=4 +RL.SHADER_LOC_VERTEX_COLOR=5 +RL.SHADER_LOC_MATRIX_MVP=6 +RL.SHADER_LOC_MATRIX_VIEW=7 +RL.SHADER_LOC_MATRIX_PROJECTION=8 +RL.SHADER_LOC_MATRIX_MODEL=9 +RL.SHADER_LOC_MATRIX_NORMAL=10 +RL.SHADER_LOC_VECTOR_VIEW=11 +RL.SHADER_LOC_COLOR_DIFFUSE=12 +RL.SHADER_LOC_COLOR_SPECULAR=13 +RL.SHADER_LOC_COLOR_AMBIENT=14 +RL.SHADER_LOC_MAP_ALBEDO=15 +RL.SHADER_LOC_MAP_METALNESS=16 +RL.SHADER_LOC_MAP_NORMAL=17 +RL.SHADER_LOC_MAP_ROUGHNESS=18 +RL.SHADER_LOC_MAP_OCCLUSION=19 +RL.SHADER_LOC_MAP_EMISSION=20 +RL.SHADER_LOC_MAP_HEIGHT=21 +RL.SHADER_LOC_MAP_CUBEMAP=22 +RL.SHADER_LOC_MAP_IRRADIANCE=23 +RL.SHADER_LOC_MAP_PREFILTER=24 +RL.SHADER_LOC_MAP_BRDF=25 +RL.SHADER_LOC_MAP_DIFFUSE=15 +RL.SHADER_LOC_MAP_SPECULAR=16 + +-- Globals - ShaderUniformDataType + +RL.SHADER_UNIFORM_FLOAT=0 +RL.SHADER_UNIFORM_VEC2=1 +RL.SHADER_UNIFORM_VEC3=2 +RL.SHADER_UNIFORM_VEC4=3 +RL.SHADER_UNIFORM_INT=4 +RL.SHADER_UNIFORM_IVEC2=5 +RL.SHADER_UNIFORM_IVEC3=6 +RL.SHADER_UNIFORM_IVEC4=7 +RL.SHADER_UNIFORM_SAMPLER2D=8 + +-- Globals - ShaderAttributeDataTypes + +RL.SHADER_ATTRIB_FLOAT=0 +RL.SHADER_ATTRIB_VEC2=1 +RL.SHADER_ATTRIB_VEC3=2 +RL.SHADER_ATTRIB_VEC4=3 + +-- Globals - PixelFormats + +RL.PIXELFORMAT_UNCOMPRESSED_GRAYSCALE=1 +RL.PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA=2 +RL.PIXELFORMAT_UNCOMPRESSED_R5G6B5=3 +RL.PIXELFORMAT_UNCOMPRESSED_R8G8B8=4 +RL.PIXELFORMAT_UNCOMPRESSED_R5G5B5A1=5 +RL.PIXELFORMAT_UNCOMPRESSED_R4G4B4A4=6 +RL.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8=7 +RL.PIXELFORMAT_UNCOMPRESSED_R32=8 +RL.PIXELFORMAT_UNCOMPRESSED_R32G32B32=9 +RL.PIXELFORMAT_UNCOMPRESSED_R32G32B32A32=10 +RL.PIXELFORMAT_COMPRESSED_DXT1_RGB=11 +RL.PIXELFORMAT_COMPRESSED_DXT1_RGBA=12 +RL.PIXELFORMAT_COMPRESSED_DXT3_RGBA=13 +RL.PIXELFORMAT_COMPRESSED_DXT5_RGBA=14 +RL.PIXELFORMAT_COMPRESSED_ETC1_RGB=15 +RL.PIXELFORMAT_COMPRESSED_ETC2_RGB=16 +RL.PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA=17 +RL.PIXELFORMAT_COMPRESSED_PVRT_RGB=18 +RL.PIXELFORMAT_COMPRESSED_PVRT_RGBA=19 +RL.PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA=20 +RL.PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA=21 + +-- Globals - TextureFilters + +RL.TEXTURE_FILTER_POINT=0 +RL.TEXTURE_FILTER_BILINEAR=1 +RL.TEXTURE_FILTER_TRILINEAR=2 +RL.TEXTURE_FILTER_ANISOTROPIC_4X=3 +RL.TEXTURE_FILTER_ANISOTROPIC_8X=4 +RL.TEXTURE_FILTER_ANISOTROPIC_16X=5 + +-- Globals - TextureWrap + +RL.TEXTURE_WRAP_REPEAT=0 +RL.TEXTURE_WRAP_CLAMP=1 +RL.TEXTURE_WRAP_MIRROR_REPEAT=2 +RL.TEXTURE_WRAP_MIRROR_CLAMP=3 + +-- Globals - CubemapLayout + +RL.CUBEMAP_LAYOUT_AUTO_DETECT=0 +RL.CUBEMAP_LAYOUT_LINE_VERTICAL=1 +RL.CUBEMAP_LAYOUT_LINE_HORIZONTAL=2 +RL.CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR=3 +RL.CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE=4 +RL.CUBEMAP_LAYOUT_PANORAMA=5 + +-- Globals - FontType + +RL.FONT_DEFAULT=0 +RL.FONT_BITMAP=1 +RL.FONT_SDF=2 + +-- Globals - BlendModes + +RL.BLEND_ALPHA=0 +RL.BLEND_ADDITIVE=1 +RL.BLEND_MULTIPLIED=2 +RL.BLEND_ADD_COLORS=3 +RL.BLEND_SUBTRACT_COLORS=4 +RL.BLEND_ALPHA_PREMULTIPLY=5 +RL.BLEND_CUSTOM=6 + +-- Globals - Gesture + +RL.GESTURE_NONE=0 +RL.GESTURE_TAP=1 +RL.GESTURE_DOUBLETAP=2 +RL.GESTURE_HOLD=4 +RL.GESTURE_DRAG=8 +RL.GESTURE_SWIPE_RIGHT=16 +RL.GESTURE_SWIPE_LEFT=32 +RL.GESTURE_SWIPE_UP=64 +RL.GESTURE_SWIPE_DOWN=128 +RL.GESTURE_PINCH_IN=256 +RL.GESTURE_PINCH_OUT=512 + +-- Globals - CameraMode + +RL.CAMERA_CUSTOM=0 +RL.CAMERA_FREE=1 +RL.CAMERA_ORBITAL=2 +RL.CAMERA_FIRST_PERSON=3 +RL.CAMERA_THIRD_PERSON=4 + +-- Globals - CameraProjections + +RL.CAMERA_PERSPECTIVE=0 +RL.CAMERA_ORTHOGRAPHIC=1 + +-- Globals - N-patchLayout + +RL.NPATCH_NINE_PATCH=0 +RL.NPATCH_THREE_PATCH_VERTICAL=1 +RL.NPATCH_THREE_PATCH_HORIZONTAL=2 + +-- Globals - TextureModes + +RL.TEXTURE_SOURCE_TEXTURE=0 +RL.TEXTURE_SOURCE_RENDER_TEXTURE=1 + +-- Globals - Colors + +RL.LIGHTGRAY={200,200,200,255} +RL.GRAY={130,130,130,255} +RL.DARKGRAY={80,80,80,255} +RL.YELLOW={253,249,0,255} +RL.GOLD={255,203,0,255} +RL.ORANGE={255,161,0,255} +RL.PINK={255,109,194,255} +RL.RED={230,41,55,255} +RL.MAROON={190,33,55,255} +RL.GREEN={0,228,48,255} +RL.LIME={0,158,47,255} +RL.DARKGREEN={0,117,44,255} +RL.SKYBLUE={102,191,255,255} +RL.BLUE={0,121,241,255} +RL.DARKBLUE={0,82,172,255} +RL.PURPLE={200,122,255,255} +RL.VIOLET={135,60,190,255} +RL.DARKPURPLE={112,31,126,255} +RL.BEIGE={211,176,131,255} +RL.BROWN={127,106,79,255} +RL.DARKBROWN={76,63,47,255} +RL.WHITE={255,255,255,255} +RL.BLACK={0,0,0,255} +RL.BLANK={0,0,0,0} +RL.MAGENTA={255,0,255,255} +RL.RAYWHITE={245,245,245,255} + +-- Globals - Math + +RL.PI=3.1415927410126 +RL.DEG2RAD=0.017453292384744 +RL.RAD2DEG=57.295776367188 + +-- Globals - GuiControlState + +RL.STATE_NORMAL=0 +RL.STATE_FOCUSED=1 +RL.STATE_PRESSED=2 +RL.STATE_DISABLED=3 + +-- Globals - GuiTextAlignment + +RL.TEXT_ALIGN_LEFT=0 +RL.TEXT_ALIGN_CENTER=1 +RL.TEXT_ALIGN_RIGHT=2 + +-- Globals - GuiControl + +RL.DEFAULT=0 +RL.LABEL=1 +RL.BUTTON=2 +RL.TOGGLE=3 +RL.SLIDER=4 +RL.PROGRESSBAR=5 +RL.CHECKBOX=6 +RL.COMBOBOX=7 +RL.DROPDOWNBOX=8 +RL.TEXTBOX=9 +RL.VALUEBOX=10 +RL.SPINNER=11 +RL.LISTVIEW=12 +RL.COLORPICKER=13 +RL.SCROLLBAR=14 +RL.STATUSBAR=15 + +-- Globals - GuiControlProperty + +RL.BORDER_COLOR_NORMAL=0 +RL.BASE_COLOR_NORMAL=1 +RL.TEXT_COLOR_NORMAL=2 +RL.BORDER_COLOR_FOCUSED=3 +RL.BASE_COLOR_FOCUSED=4 +RL.TEXT_COLOR_FOCUSED=5 +RL.BORDER_COLOR_PRESSED=6 +RL.BASE_COLOR_PRESSED=7 +RL.TEXT_COLOR_PRESSED=8 +RL.BORDER_COLOR_DISABLED=9 +RL.BASE_COLOR_DISABLED=10 +RL.TEXT_COLOR_DISABLED=11 +RL.BORDER_WIDTH=12 +RL.TEXT_PADDING=13 +RL.TEXT_ALIGNMENT=14 +RL.RESERVED=15 + +-- Globals - GuiDefaultProperty + +RL.TEXT_SIZE=16 +RL.TEXT_SPACING=17 +RL.LINE_COLOR=18 +RL.BACKGROUND_COLOR=19 + +-- Globals - GuiToggleProperty + +RL.GROUP_PADDING=16 + +-- Globals - GuiSliderProperty + +RL.SLIDER_WIDTH=16 +RL.SLIDER_PADDING=17 + +-- Globals - GuiProgressBarProperty + +RL.PROGRESS_PADDING=16 + +-- Globals - GuiScrollBarProperty + +RL.ARROWS_SIZE=16 +RL.ARROWS_VISIBLE=17 +RL.SCROLL_SLIDER_PADDING=18 +RL.SCROLL_SLIDER_SIZE=19 +RL.SCROLL_PADDING=20 +RL.SCROLL_SPEED=21 + +-- Globals - GuiCheckBoxProperty + +RL.CHECK_PADDING=16 + +-- Globals - GuiComboBoxProperty + +RL.COMBO_BUTTON_WIDTH=16 +RL.COMBO_BUTTON_SPACING=17 + +-- Globals - GuiDropdownBoxProperty + +RL.ARROW_PADDING=16 +RL.DROPDOWN_ITEMS_SPACING=17 + +-- Globals - GuiTextBoxProperty + +RL.TEXT_INNER_PADDING=16 +RL.TEXT_LINES_SPACING=17 + +-- Globals - GuiSpinnerProperty + +RL.SPIN_BUTTON_WIDTH=16 +RL.SPIN_BUTTON_SPACING=17 + +-- Globals - GuiListViewProperty + +RL.LIST_ITEMS_HEIGHT=16 +RL.LIST_ITEMS_SPACING=17 +RL.SCROLLBAR_WIDTH=18 +RL.SCROLLBAR_SIDE=19 + +-- Globals - GuiColorPickerProperty + +RL.COLOR_SELECTOR_SIZE=16 +RL.HUEBAR_WIDTH=17 +RL.HUEBAR_PADDING=18 +RL.HUEBAR_SELECTOR_HEIGHT=19 +RL.HUEBAR_SELECTOR_OVERFLOW=20 + +-- Globals - LightType + +RL.LIGHT_DIRECTIONAL=0 +RL.LIGHT_POINT=1 +-- Core - Window + +---Check if window has been initialized successfully +---- Success return bool +---@return any state +function RL.IsWindowReady() end + +---Check if window is currently fullscreen +---- Success return bool +---@return any state +function RL.IsWindowFullscreen() end + +---Check if window is currently hidden ( only PLATFORM_DESKTOP ) +---- Success return bool +---@return any state +function RL.IsWindowHidden() end + +---Check if window is currently minimized ( only PLATFORM_DESKTOP ) +---- Success return bool +---@return any state +function RL.IsWindowMinimized() end + +---Check if window is currently maximized ( only PLATFORM_DESKTOP ) +---- Success return bool +---@return any state +function RL.IsWindowMaximized() end + +---Check if window is currently focused ( only PLATFORM_DESKTOP ) +---- Success return bool +---@return any state +function RL.IsWindowFocused() end + +---Set monitor for the current window (fullscreen mode) +---- Failure return false +---- Success return true +---@param monitor integer +---@return any success +function RL.SetWindowMonitor( monitor ) end + +---Set window position on screen +---- Failure return false +---- Success return true +---@param pos table +---@return any success +function RL.SetWindowPosition( pos ) end + +---Set window dimensions +---- Failure return false +---- Success return true +---@param size table +---@return any success +function RL.SetWindowSize( size ) end + +---Set window minimum dimensions ( for FLAG_WINDOW_RESIZABLE ) +---- Failure return false +---- Success return true +---@param size table +---@return any success +function RL.SetWindowMinSize( size ) end + +---Get specified monitor position +---- Failure return nil +---- Success return Vector2 +---@param monitor integer +---@return any position +function RL.GetMonitorPosition( monitor ) end + +---Get specified monitor size +---- Failure return nil +---- Success return Vector2 +---@param monitor integer +---@return any size +function RL.GetMonitorSize( monitor ) end + +---Get window position on monitor +---- Success return Vector2 +---@return any position +function RL.GetWindowPosition() end + +---Get screen size +---- Success return Vector2 +---@return any size +function RL.GetScreenSize() end + +---Set window configuration state using flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE... ) +---- Failure return false +---- Success return true +---@param flag integer +---@return any success +function RL.SetWindowState( flag ) end + +---Check if one specific window flag is enabled ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE... ) +---- Failure return nil +---- Success return bool +---@param flag integer +---@return any state +function RL.IsWindowState( flag ) end + +---Clear window configuration state flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE... ) +---- Success return bool +---@param flag integer +---@return any resized +function RL.ClearWindowState( flag ) end + +---Check if window has been resized from last frame +---- Success return bool +---@return any resized +function RL.IsWindowResized() end + +---Set icon for window ( Only PLATFORM_DESKTOP ) +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.SetWindowIcon( image ) end + +---Set title for window ( Only PLATFORM_DESKTOP ) +---- Failure return false +---- Success return true +---@param title string +---@return any success +function RL.SetWindowTitle( title ) end + +---Get number of connected monitors +---- Success return int +---@return any count +function RL.GetMonitorCount() end + +---Get current connected monitor +---- Success return int +---@return any monitor +function RL.GetCurrentMonitor() end + +---Get specified monitor physical size in millimetres +---- Failure return false +---- Success return Vector2 +---@param monitor integer +---@return any size +function RL.GetMonitorPhysicalSize( monitor ) end + +---Get specified monitor refresh rate +---- Failure return false +---- Success return int +---@param monitor integer +---@return any size +function RL.GetMonitorRefreshRate( monitor ) end + +---Get window scale DPI factor +---- Success return Vector2 +---@return any scale +function RL.GetWindowScaleDPI() end + +---Get the human-readable, UTF-8 encoded name of the monitor +---- Failure return false +---- Success return string +---@param monitor integer +---@return any name +function RL.GetMonitorName( monitor ) end + +---Close window and unload OpenGL context and free all resources +---@return any RL.CloseWindow +function RL.CloseWindow() end + +---Set clipboard text content +---- Failure return false +---- Success return true +---@param text string +---@return any success +function RL.SetClipboardText( text ) end + +---Get clipboard text content +---- Success return string +---@return any text +function RL.GetClipboardText() end + +-- Core - Timing + +---Set target FPS ( maximum ) +---- Failure return false +---- Success return true +---@param fps integer +---@return any success +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 ) +---- Failure return false +---- Success return true +---@param fileName string +---@return any success +function RL.TakeScreenshot( fileName ) end + +---Setup init configuration flags ( view FLAGS ) +---- Failure return false +---- Success return true +---@param flags integer +---@return any success +function RL.SetConfigFlags( flags ) end + +---Show trace log messages ( LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR... ) +---- Failure return false +---- Success return true +---@param logLevel integer +---@param text string +---@return any success +function RL.TraceLog( logLevel, text ) end + +---Set the current threshold ( minimum ) log level +---- Failure return false +---- Success return true +---@param logLevel integer +---@return any success +function RL.SetTraceLogLevel( logLevel ) end + +---Open URL with default system browser ( If available ) +---- Failure return false +---- Success return true +---@param url string +---@return any success +function RL.OpenURL( url ) end + +-- Core - Cursor + +---Shows cursor +---@return any RL.ShowCursor +function RL.ShowCursor() end + +---Hides cursor +---@return any RL.HideCursor +function RL.HideCursor() end + +---Check if cursor is not visible +---- Success return bool +---@return any hidden +function RL.IsCursorHidden() end + +---Enables cursor (unlock cursor) +---@return any RL.EnableCursor +function RL.EnableCursor() end + +---Disables cursor (lock cursor) +---@return any RL.DisableCursor +function RL.DisableCursor() end + +---Check if cursor is on the screen +---- Success return bool +---@return any onSreen +function RL.IsCursorOnScreen() end + +-- Core - Drawing + +---Set background color ( framebuffer clear color ) +---- Failure return false +---- Success return true +---@param color table +---@return any success +function RL.ClearBackground( color ) end + +---Setup canvas ( framebuffer ) to start drawing +---@return any RL.BeginDrawing +function RL.BeginDrawing() end + +---End canvas drawing and swap buffers ( double buffering ) +---@return any RL.EndDrawing +function RL.EndDrawing() end + +---Begin blending mode ( BLEND_ALPHA, BLEND_ADDITIVE, BLEND_MULTIPLIED... ) +---- Failure return false +---- Success return true +---@param mode integer +---@return any success +function RL.BeginBlendMode( mode ) end + +---End blending mode ( reset to default: BLEND_ALPHA ) +---@return any RL.EndBlendMode +function RL.EndBlendMode() end + +---Begin scissor mode ( define screen area for following drawing ) +---- Failure return false +---- Success return true +---@param rectange table +---@return any success +function RL.BeginScissorMode( rectange ) end + +---End scissor mode +---@return any RL.EndScissorMode +function RL.EndScissorMode() end + +-- Core - Shader + +---Load shader from files and bind default locations. +---NOTE: Set nil if no shader +---- Failure return -1 +---- Success return int +---@param vsFileName string +---@param fsFileName string +---@return any shader +function RL.LoadShader( vsFileName, fsFileName ) end + +---Load shader from code strings and bind default locations +---NOTE: Set nil if no shader +---- Failure return -1 +---- Success return int +---@param vsCode string +---@param fsCode string +---@return any shader +function RL.LoadShaderFromMemory( vsCode, fsCode ) end + +---Begin custom shader drawing +---- Failure return false +---- Success return true +---@param shader any +---@return any success +function RL.BeginShaderMode( shader ) end + +---End custom shader drawing ( use default shader ) +---@return any RL.EndShaderMode +function RL.EndShaderMode() end + +---Get shader uniform location +---- Failure return -1 +---- Success return int +---@param shader any +---@param uniformName string +---@return any location +function RL.GetShaderLocation( shader, uniformName ) end + +---Get shader attribute location +---- Failure return -1 +---- Success return int +---@param shader any +---@param attribName string +---@return any location +function RL.GetShaderLocationAttrib( shader, attribName ) end + +---Set shader location index +---- Failure return false +---- Success return true +---@param shader any +---@param shaderLocationIndex integer +---@param location integer +---@return any success +function RL.SetShaderLocationIndex( shader, shaderLocationIndex, location ) end + +---Get shader location index +---- Failure return false +---- Success return int +---@param shader any +---@param shaderLocationIndex integer +---@return any location +function RL.GetShaderLocationIndex( shader, shaderLocationIndex ) end + +---Set shader uniform value ( matrix 4x4 ) +---- Failure return false +---- Success return true +---@param shader any +---@param locIndex integer +---@param mat table +---@return any success +function RL.SetShaderValueMatrix( shader, locIndex, mat ) end + +---Set shader uniform value for texture ( sampler2d ) +---- Failure return false +---- Success return true +---@param shader any +---@param locIndex integer +---@param texture any +---@return any success +function RL.SetShaderValueTexture( shader, locIndex, texture ) end + +---Set shader uniform value +---NOTE: Even one value should be in table +---- Failure return false +---- Success return true +---@param shader any +---@param locIndex integer +---@param values any +---@param uniformType integer +---@return any success +function RL.SetShaderValue( shader, locIndex, values, uniformType ) end + +---Set shader uniform value vector +---NOTE: Even one value should be in table +---- Failure return false +---- Success return true +---@param shader any +---@param locIndex integer +---@param values any +---@param uniformType integer +---@param count integer +---@return any success +function RL.SetShaderValueV( shader, locIndex, values, uniformType, count ) end + +---Unload shader from GPU memory ( VRAM ) +---- Failure return false +---- Success return true +---@param shader any +---@return any success +function RL.UnloadShader( shader ) end + +-- Core - Input-related Keyboard + +---Detect if a key has been pressed once +---- Failure return nil +---- Success return bool +---@param key integer +---@return any pressed +function RL.IsKeyPressed( key ) end + +---Detect if a key is being pressed +---- Failure return nil +---- Success return bool +---@param key integer +---@return any pressed +function RL.IsKeyDown( key ) end + +---Detect if a key has been released once +---- Failure return nil +---- Success return bool +---@param key integer +---@return any released +function RL.IsKeyReleased( key ) end + +---Check if a key is NOT being pressed +---- Failure return nil +---- Success return bool +---@param key integer +---@return any released +function RL.IsKeyUp( key ) end + +---Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty +---- Success return int +---@return any keycode +function RL.GetKeyPressed() end + +---Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty +---- Success return int +---@return any unicode +function RL.GetCharPressed() end + +---Set a custom key to exit program ( default is ESC ) +---@param key integer +---@return any RL.SetExitKey +function RL.SetExitKey( key ) end + +---This function returns the name of the specified printable key, encoded as UTF-8. +---This is typically the character that key would produce without any modifier keys, +---intended for displaying key bindings to the user. For dead keys, it is typically +---the diacritic it would add to a character. +---Do not use this function for text input. You will break text input for many +---languages even if it happens to work for yours. +---If the key is KEY_UNKNOWN, the scancode is used to identify the key, +---otherwise the scancode is ignored. If you specify a non-printable key, +---or KEY_UNKNOWN and a scancode that maps to a non-printable key, +---this function returns nil but does not emit an error. +---- Failure return -1 +---- Success return string or nil +---@param key integer +---@param scancode integer +---@return any keyName +function RL.GetKeyName( key, scancode ) end + +---This function returns the platform-specific scancode of the specified key. +---If the key is KEY_UNKNOWN or does not exist on the keyboard this method will return -1. +---- Failure return nil +---- Success return int +---@param key integer +---@return any scancode +function RL.GetKeyScancode( key ) end + +-- Core - Input-related Gamepad + +---Detect if a gamepad is available +---- Failure return nil +---- Success return bool +---@param gamepad integer +---@return any available +function RL.IsGamepadAvailable( gamepad ) end + +---Detect if a gamepad button has been pressed once +---- Failure return nil +---- Success return bool +---@param gamepad integer +---@param button integer +---@return any pressed +function RL.IsGamepadButtonPressed( gamepad, button ) end + +---Detect if a gamepad button is being pressed +---- Failure return nil +---- Success return bool +---@param gamepad integer +---@param button integer +---@return any pressed +function RL.IsGamepadButtonDown( gamepad, button ) end + +---Detect if a gamepad button has been released once +---- Failure return nil +---- Success return bool +---@param gamepad integer +---@param button integer +---@return any released +function RL.IsGamepadButtonReleased( gamepad, button ) end + +---Return gamepad axis count for a gamepad +---- Failure return false +---- Success return int +---@param gamepad integer +---@return any count +function RL.GetGamepadAxisCount( gamepad ) end + +---Return axis movement value for a gamepad axis +---- Failure return false +---- Success return float +---@param gamepad integer +---@param axis integer +---@return any value +function RL.GetGamepadAxisMovement( gamepad, axis ) end + +---Return gamepad internal name id +---- Failure return false +---- Success return string +---@param gamepad integer +---@return any name +function RL.GetGamepadName( gamepad ) end + +-- Core - Input-related Mouse + +---Detect if a mouse button has been pressed once +---- Failure return nil +---- Success return bool +---@param button integer +---@return any pressed +function RL.IsMouseButtonPressed( button ) end + +---Detect if a mouse button is being pressed +---- Failure return nil +---- Success return bool +---@param button integer +---@return any pressed +function RL.IsMouseButtonDown( button ) end + +---Detect if a mouse button has been released once +---- Failure return nil +---- Success return bool +---@param button integer +---@return any released +function RL.IsMouseButtonReleased( button ) end + +---Check if a mouse button is NOT being pressed +---- Failure return nil +---- Success return bool +---@param button integer +---@return any released +function RL.IsMouseButtonUp( button ) end + +---Returns mouse position +---- Success return Vector2 +---@return any position +function RL.GetMousePosition() end + +---Get mouse delta between frames +---- Success return Vector2 +---@return any position +function RL.GetMouseDelta() end + +---Set mouse position XY +---- Failure return false +---- Success return true +---@param position table +---@return any success +function RL.SetMousePosition( position ) end + +---Set mouse offset +---- Failure return false +---- Success return true +---@param offset table +---@return any success +function RL.SetMouseOffset( offset ) end + +---Set mouse scaling +---- Failure return false +---- Success return true +---@param scale table +---@return any success +function RL.SetMouseScale( scale ) end + +---Returns mouse wheel movement Y +---- Success return float +---@return any movement +function RL.GetMouseWheelMove() end + +---Set mouse cursor +---- Failure return false +---- Success return true +---@param cursor integer +---@return any success +function RL.SetMouseCursor( cursor ) end + +-- Core - Input-related Touch + +---Get touch position XY for a touch point index ( relative to screen size ) +---- Failure return false +---- Success return Vector2 +---@param index integer +---@return any position +function RL.GetTouchPosition( index ) end + +---Get touch point identifier for given index +---- Failure return false +---- Success return int +---@param index integer +---@return any id +function RL.GetTouchPointId( index ) end + +---Get touch point identifier for given index +---- Success return int +---@return any count +function RL.GetTouchPointCount() end + +-- Core - Input-related Gestures + +---Enable a set of gestures using flags +---- Failure return false +---- Success return true +---@param int any +---@return any success +function RL.SetGesturesEnabled( int ) end + +---Check if a gesture have been detected +---- Failure return nil +---- Success return bool +---@param gesture integer +---@return any detected +function RL.IsGestureDetected( gesture ) end + +---Get latest detected gesture +---- Success return int +---@return any gesture +function RL.GetGestureDetected() end + +---Get gesture hold time in milliseconds +---- Success return float +---@return any time +function RL.GetGestureHoldDuration() end + +---Get gesture drag vector +---- Success return Vector2 +---@return any vector +function RL.GetGestureDragVector() end + +---Get gesture drag angle +---- Success return float +---@return any angle +function RL.GetGestureDragAngle() end + +---Get gesture pinch delta +---- Success return Vector2 +---@return any vector +function RL.GetGesturePinchVector() end + +---Get gesture pinch angle +---- Success return float +---@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 +---- Failure return nil +---- Success return bool +---@param fileName string +---@return any fileExists +function RL.FileExists( fileName ) end + +---Check if a directory path exists +---- Failure return nil +---- Success return bool +---@param dirPath string +---@return any dirExists +function RL.DirectoryExists( dirPath ) end + +---Check file extension ( Including point: .png, .wav ) +---- Failure return nil +---- 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 ) +---- Failure return false +---- 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' ) +---- Failure return false +---- Success return string +---@param fileName string +---@return any extension +function RL.GetFileExtension( fileName ) end + +---Get pointer to filename for a path string +---- Failure return false +---- Success return string +---@param filePath string +---@return any filePath +function RL.GetFileName( filePath ) end + +---Get filename string without extension ( Uses static string ) +---- Failure return false +---- Success return string +---@param filePath string +---@return any filePath +function RL.GetFileNameWithoutExt( filePath ) end + +---Get full path for a given fileName with path ( Uses static string ) +---- Failure return false +---- 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 ) +---- Failure return false +---- 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 +---- Failure return false +---- Success return string{} +---@param dirPath string +---@return any fileNames +function RL.LoadDirectoryFiles( dirPath ) end + +---Load directory filepaths with extension filtering and recursive directory scan +---- Failure return false +---- 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 +---- Failure return false +---- Success return true +---@param directory string +---@return any success +function RL.ChangeDirectory( directory ) end + +---Check if a given path is a file or a directory +---- Failure return nil +---- 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 fileDropped +function RL.IsFileDropped() end + +---Load dropped filepaths +---- Success return string{} +---@return any files +function RL.LoadDroppedFiles() end + +---Get file modification time ( Last write time ) +---- Failure return false +---- Success return int +---@param fileName string +---@return any time +function RL.GetFileModTime( fileName ) end + +-- Core - Camera2D + +---Return camera2D id set to default configuration +---- Success return int +---@return any camera2D +function RL.CreateCamera2D() end + +---Unload Camera2D +---- Failure return false +---- Success return true +---@param Camera2D integer +---@return any success +function RL.UnloadCamera2D( Camera2D ) end + +---Begin 2D mode with custom camera ( 2D ) +---- Failure return false +---- Success return true +---@param camera any +---@return any success +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 ) +---- Failure return false +---- Success return true +---@param camera any +---@param target table +---@return any success +function RL.SetCamera2DTarget( camera, target ) end + +---Set camera offset ( displacement from target ) +---- Failure return false +---- Success return true +---@param camera any +---@param offset table +---@return any success +function RL.SetCamera2DOffset( camera, offset ) end + +---Set camera rotation in degrees +---- Failure return false +---- Success return true +---@param camera any +---@param rotation number +---@return any success +function RL.SetCamera2DRotation( camera, rotation ) end + +---Set camera zoom ( scaling ), should be 1.0f by default +---- Failure return false +---- Success return true +---@param camera any +---@param zoom number +---@return any success +function RL.SetCamera2DZoom( camera, zoom ) end + +---Get camera2D target +---- Failure return nil +---- Success return Vector2 +---@param camera any +---@return any target +function RL.GetCamera2DTarget( camera ) end + +---Get camera2D offset +---- Failure return nil +---- Success return Vector2 +---@param camera any +---@return any offset +function RL.GetCamera2DOffset( camera ) end + +---Get camera2D rotation +---- Failure return nil +---- Success return float +---@param camera any +---@return any rotation +function RL.GetCamera2DRotation( camera ) end + +---Get camera2D zoom +---- Failure return nil +---- Success return float +---@param camera any +---@return any zoom +function RL.GetCamera2DZoom( camera ) end + +-- Core - Camera3D + +---Return camera3D id set to default configuration +---- Success return int +---@return any camera +function RL.CreateCamera3D() end + +---Unload Camera3D +---- Failure return false +---- Success return true +---@param Camera3D integer +---@return any success +function RL.UnloadCamera3D( Camera3D ) end + +---Begin 3D mode with custom camera ( 3D ) +---- Failure return false +---- Success return true +---@param camera any +---@return any success +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 ) +---- Failure return false +---- Success return true +---@param camera any +---@param position table +---@return any success +function RL.SetCamera3DPosition( camera, position ) end + +---Set camera target it looks-at +---- Failure return false +---- Success return true +---@param camera any +---@param target table +---@return any success +function RL.SetCamera3DTarget( camera, target ) end + +---Set camera up vector ( Rotation over it's axis ) +---- Failure return false +---- Success return true +---@param camera any +---@param up table +---@return any success +function RL.SetCamera3DUp( camera, up ) end + +---Set camera field-of-view apperture in Y ( degrees ) in perspective, used as near plane width in orthographic +---- Failure return false +---- Success return true +---@param camera any +---@param fovy number +---@return any success +function RL.SetCamera3DFovy( camera, fovy ) end + +---Set camera projection mode ( CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC ) +---- Failure return false +---- Success return true +---@param camera any +---@param projection integer +---@return any success +function RL.SetCamera3DProjection( camera, projection ) end + +---Set camera mode ( CAMERA_CUSTOM, CAMERA_FREE, CAMERA_ORBITAL... ) +---- Failure return false +---- Success return true +---@param camera any +---@param mode integer +---@return any success +function RL.SetCameraMode( camera, mode ) end + +---Get camera position +---- Failure return nil +---- Success return Vector3 +---@param camera any +---@return any position +function RL.GetCamera3DPosition( camera ) end + +---Get camera target it looks-at +---- Failure return nil +---- Success return Vector3 +---@param camera any +---@return any target +function RL.GetCamera3DTarget( camera ) end + +---Get camera up vector ( Rotation over it's axis ) +---- Failure return nil +---- Success return Vector3 +---@param camera any +---@return any up +function RL.GetCamera3DUp( camera ) end + +---Get camera field-of-view apperture in Y ( degrees ) in perspective, used as near plane width in orthographic +---- Failure return nil +---- Success return float +---@param camera any +---@return any fovy +function RL.GetCamera3DFovy( camera ) end + +---Get camera projection mode +---- Failure return nil +---- Success return int +---@param camera any +---@return any projection +function RL.GetCamera3DProjection( camera ) end + +---Update camera position for selected mode +---- Failure return false +---- Success return true +---@param camera any +---@return any success +function RL.UpdateCamera3D( camera ) end + +---Set camera pan key to combine with mouse movement ( free camera ) +---- Failure return false +---- Success return true +---@param keyPan integer +---@return any success +function RL.SetCameraPanControl( keyPan ) end + +---Set camera alt key to combine with mouse movement ( free camera ) +---- Failure return false +---- Success return true +---@param keyAlt integer +---@return any success +function RL.SetCameraAltControl( keyAlt ) end + +---Set camera smooth zoom key to combine with mouse ( free camera ) +---- Failure return false +---- Success return true +---@param keySmoothZoom integer +---@return any success +function RL.SetCameraSmoothZoomControl( keySmoothZoom ) end + +---Set camera move controls ( 1st person and 3rd person cameras ) +---- Failure return false +---- Success return true +---@param keyFront integer +---@param keyBack integer +---@param keyRight integer +---@param keyLeft integer +---@param keyUp integer +---@param keyDown integer +---@return any success +function RL.SetCameraMoveControls( keyFront, keyBack, keyRight, keyLeft, keyUp, keyDown ) end + +-- Core - Screen-space + +---Get a ray trace from mouse position +---- Failure return false +---- Success return Ray +---@param mousePosition table +---@param camera any +---@return any ray +function RL.GetMouseRay( mousePosition, camera ) end + +---Get camera transform matrix ( view matrix ) +---- Failure return false +---- Success return Matrix +---@param camera any +---@return any matrix +function RL.GetCameraMatrix( camera ) end + +---Get camera 2d transform matrix +---- Failure return false +---- 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 +---- Failure return false +---- 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 +---- Failure return false +---- 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 +---- Failure return false +---- 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 +---- Failure return false +---- Success return Vector2 +---@param position table +---@param camera any +---@return any position +function RL.GetScreenToWorld2D( position, camera ) end + +-- Shapes - Drawing + +---Set texture and rectangle to be used on shapes drawing +---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 +---- Failure return false +---- Success return true +---@param texture any +---@param source table +---@return any success +function RL.SetShapesTexture( texture, source ) end + +---Draw a pixel +---- Failure return false +---- Success return true +---@param pos table +---@param color table +---@return any success +function RL.DrawPixel( pos, color ) end + +---Draw a line defining thickness +---- Failure return false +---- Success return true +---@param startPos table +---@param endPos table +---@param thickness number +---@param color table +---@return any success +function RL.DrawLine( startPos, endPos, thickness, color ) end + +---Draw a line using cubic-bezier curves in-out +---- Failure return false +---- Success return true +---@param startPos table +---@param endPos table +---@param thickness number +---@param color table +---@return any success +function RL.DrawLineBezier( startPos, endPos, thickness, color ) end + +---Draw line using quadratic bezier curves with a control point +---- Failure return false +---- Success return true +---@param startPos table +---@param endPos table +---@param controlPos table +---@param thickness number +---@param color table +---@return any success +function RL.DrawLineBezierQuad( startPos, endPos, controlPos, thickness, color ) end + +---Draw line using quadratic bezier curves with a control point +---- Failure return false +---- Success return true +---@param startPos table +---@param endPos table +---@param startControlPos table +---@param endControlPos table +---@param thickness number +---@param color table +---@return any success +function RL.DrawLineBezierCubic( startPos, endPos, startControlPos, endControlPos, thickness, color ) end + +---Draw lines sequence +---- Failure return false +---- Success return true +---@param points any +---@param pointsCount integer +---@param color table +---@return any success +function RL.DrawLineStrip( points, pointsCount, color ) end + +---Draw a color-filled circle +---- Failure return false +---- Success return true +---@param center table +---@param radius number +---@param color table +---@return any success +function RL.DrawCircle( center, radius, color ) end + +---Draw a piece of a circle +---- Failure return false +---- Success return true +---@param center table +---@param radius number +---@param startAngle number +---@param endAngle number +---@param segments integer +---@param color table +---@return any success +function RL.DrawCircleSector( center, radius, startAngle, endAngle, segments, color ) end + +---Draw circle sector outline +---- Failure return false +---- Success return true +---@param center table +---@param radius number +---@param startAngle number +---@param endAngle number +---@param segments integer +---@param color table +---@return any success +function RL.DrawCircleSectorLines( center, radius, startAngle, endAngle, segments, color ) end + +---Draw a gradient-filled circle +---- Failure return false +---- Success return true +---@param center table +---@param radius number +---@param color1 table +---@param color2 table +---@return any success +function RL.DrawCircleGradient( center, radius, color1, color2 ) end + +---Draw circle outline +---- Failure return false +---- Success return true +---@param center table +---@param radius number +---@param color table +---@return any success +function RL.DrawCircleLines( center, radius, color ) end + +---Draw ellipse +---- Failure return false +---- Success return true +---@param center table +---@param radiusH number +---@param radiusV number +---@param color table +---@return any success +function RL.DrawEllipse( center, radiusH, radiusV, color ) end + +---Draw ellipse outline +---- Failure return false +---- Success return true +---@param center table +---@param radiusH number +---@param radiusV number +---@param color table +---@return any success +function RL.DrawEllipseLines( center, radiusH, radiusV, color ) end + +---Draw ring +---- Failure return false +---- Success return true +---@param center table +---@param innerRadius number +---@param outerRadius number +---@param startAngle number +---@param endAngle number +---@param segments integer +---@param color table +---@return any success +function RL.DrawRing( center, innerRadius, outerRadius, startAngle, endAngle, segments, color ) end + +---Draw ring outline +---- Failure return false +---- Success return true +---@param center table +---@param innerRadius number +---@param outerRadius number +---@param startAngle number +---@param endAngle number +---@param segments integer +---@param color table +---@return any success +function RL.DrawRingLines( center, innerRadius, outerRadius, startAngle, endAngle, segments, color ) end + +---Draw a color-filled rectangle +---- Failure return false +---- Success return true +---@param rec table +---@param color table +---@return any success +function RL.DrawRectangle( rec, color ) end + +---Draw a color-filled rectangle with pro parameters +---- Failure return false +---- Success return true +---@param rec table +---@param origin table +---@param rotation number +---@param color table +---@return any success +function RL.DrawRectanglePro( rec, origin, rotation, color ) end + +---Draw a vertical-gradient-filled rectangle +---- Failure return false +---- Success return true +---@param rectangle table +---@param color1 table +---@param color2 table +---@return any success +function RL.DrawRectangleGradientV( rectangle, color1, color2 ) end + +---Draw a horizontal-gradient-filled rectangle +---- Failure return false +---- Success return true +---@param rectangle table +---@param color1 table +---@param color2 table +---@return any success +function RL.DrawRectangleGradientH( rectangle, color1, color2 ) end + +---Draw a gradient-filled rectangle with custom vertex colors +---- Failure return false +---- Success return true +---@param rectangle table +---@param col1 table +---@param col2 table +---@param col3 table +---@param col4 table +---@return any success +function RL.DrawRectangleGradientEx( rectangle, col1, col2, col3, col4 ) end + +---Draw rectangle outline +---- Failure return false +---- Success return true +---@param rec table +---@param color table +---@return any success +function RL.DrawRectangleLines( rec, color ) end + +---Draw rectangle outline with extended parameters +---- Failure return false +---- Success return true +---@param rec table +---@param lineThick integer +---@param color table +---@return any success +function RL.DrawRectangleLinesEx( rec, lineThick, color ) end + +---Draw rectangle with rounded edges +---- Failure return false +---- Success return true +---@param rec table +---@param roundness number +---@param segments integer +---@param color table +---@return any success +function RL.DrawRectangleRounded( rec, roundness, segments, color ) end + +---Draw rectangle with rounded edges outline +---- Failure return false +---- Success return true +---@param rec table +---@param roundness number +---@param segments integer +---@param lineThick integer +---@param color table +---@return any success +function RL.DrawRectangleRoundedLines( rec, roundness, segments, lineThick, color ) end + +---Draw a color-filled triangle ( Vertex in counter-clockwise order! ) +---- Failure return false +---- Success return true +---@param v1 table +---@param v2 table +---@param v3 table +---@param color table +---@return any success +function RL.DrawTriangle( v1, v2, v3, color ) end + +---Draw triangle outline ( Vertex in counter-clockwise order! ) +---- Failure return false +---- Success return true +---@param v1 table +---@param v2 table +---@param v3 table +---@param color table +---@return any success +function RL.DrawTriangleLines( v1, v2, v3, color ) end + +---Draw a triangle fan defined by points ( first vertex is the center ) +---- Failure return false +---- Success return true +---@param points any +---@param pointsCount integer +---@param color table +---@return any success +function RL.DrawTriangleFan( points, pointsCount, color ) end + +---Draw a triangle strip defined by points +---- Failure return false +---- Success return true +---@param points any +---@param pointsCount integer +---@param color table +---@return any success +function RL.DrawTriangleStrip( points, pointsCount, color ) end + +---Draw a regular polygon ( Vector version ) +---- Failure return false +---- Success return true +---@param center table +---@param sides integer +---@param radius number +---@param rotation number +---@param color table +---@return any success +function RL.DrawPoly( center, sides, radius, rotation, color ) end + +---Draw a polygon outline of n sides +---- Failure return false +---- Success return true +---@param center table +---@param sides integer +---@param radius number +---@param rotation number +---@param color table +---@return any success +function RL.DrawPolyLines( center, sides, radius, rotation, color ) end + +---Draw a polygon outline of n sides with extended parameters +---- Failure return false +---- Success return true +---@param center table +---@param sides integer +---@param radius number +---@param rotation number +---@param lineThick number +---@param color table +---@return any success +function RL.DrawPolyLinesEx( center, sides, radius, rotation, lineThick, color ) end + +-- Shapes - Collision + +---Check collision between two rectangles +---- Failure return nil +---- Success return bool +---@param rec1 table +---@param rec2 table +---@return any collision +function RL.CheckCollisionRecs( rec1, rec2 ) end + +---Check collision between two circles +---- Failure return nil +---- Success return bool +---@param center1 table +---@param radius1 number +---@param center2 table +---@param radius2 number +---@return any collision +function RL.CheckCollisionCircles( center1, radius1, center2, radius2 ) end + +---Check collision between circle and rectangle +---- Failure return nil +---- Success return bool +---@param center table +---@param radius number +---@param rec table +---@return any collision +function RL.CheckCollisionCircleRec( center, radius, rec ) end + +---Check if point is inside rectangle +---- Failure return nil +---- Success return bool +---@param point table +---@param rec table +---@return any collision +function RL.CheckCollisionPointRec( point, rec ) end + +---Check if point is inside circle +---- Failure return nil +---- Success return bool +---@param point table +---@param center table +---@param radius number +---@return any collision +function RL.CheckCollisionPointCircle( point, center, radius ) end + +---Check if point is inside a triangle +---- Failure return nil +---- Success return bool +---@param point table +---@param p1 table +---@param p2 table +---@param p3 table +---@return any collision +function RL.CheckCollisionPointTriangle( point, p1, p2, p3 ) end + +---Check the collision between two lines defined by two points each, returns collision point by reference +---- Failure return nil +---- Success return bool, Vector2 +---@param startPos1 table +---@param endPos1 table +---@param startPos2 table +---@param endPos2 table +---@return any collision +---@return any position +function RL.CheckCollisionLines( startPos1, endPos1, startPos2, endPos2 ) end + +---Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] +---- Failure return nil +---- Success return bool +---@param point table +---@param p1 table +---@param p2 table +---@param threshold integer +---@return any collision +function RL.CheckCollisionPointLine( point, p1, p2, threshold ) end + +---Get collision rectangle for two rectangles collision +---- Failure return nil +---- Success return Rectangle +---@param rec1 table +---@param rec2 table +---@return any rectangle +function RL.GetCollisionRec( rec1, rec2 ) end + +-- Textures - Image Loading + +---Load image from file into CPU memory ( RAM ) +---- Failure return -1 +---- Success return int +---@param fileName string +---@return any image +function RL.LoadImage( fileName ) end + +---Load image from GPU texture data +---- Failure return -1 +---- Success return int +---@param texture any +---@return any image +function RL.LoadImageFromTexture( texture ) end + +---Load image from screen buffer and ( screenshot ) +---- Success return int +---@return any image +function RL.LoadImageFromScreen() end + +---Unload image from CPU memory ( RAM ) +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.UnloadImage( image ) end + +---Export image data to file, returns true on success +---- Failure return nil +---- Success return bool +---@param image any +---@param fileName string +---@return any success +function RL.ExportImage( image, fileName ) end + +---Export image as code file defining an array of bytes, returns true on success +---- Failure return nil +---- Success return bool +---@param image any +---@param fileName string +---@return any success +function RL.ExportImageAsCode( image, fileName ) end + +-- Textures - Image Generation + +---Generate image: plain color +---- Failure return -1 +---- Success return int +---@param width integer +---@param height integer +---@param color table +---@return any image +function RL.GenImageColor( width, height, color ) end + +---Generate image: vertical gradient +---- Failure return -1 +---- Success return int +---@param size table +---@param top table +---@param bottom table +---@return any image +function RL.GenImageGradientV( size, top, bottom ) end + +---Generate image: horizontal gradient +---- Failure return -1 +---- Success return int +---@param size table +---@param left table +---@param right table +---@return any image +function RL.GenImageGradientH( size, left, right ) end + +---Generate image: radial gradient +---- Failure return -1 +---- Success return int +---@param size table +---@param density number +---@param inner table +---@param outer table +---@return any image +function RL.GenImageGradientRadial( size, density, inner, outer ) end + +---Generate image: checked +---- Failure return -1 +---- Success return int +---@param size table +---@param checks table +---@param col1 table +---@param col2 table +---@return any image +function RL.GenImageChecked( size, checks, col1, col2 ) end + +---Generate image: white noise +---- Failure return -1 +---- Success return int +---@param size table +---@param factor number +---@return any image +function RL.GenImageWhiteNoise( size, factor ) end + +---Generate image: cellular algorithm. Bigger tileSize means bigger cells +---- Failure return -1 +---- Success return int +---@param size table +---@param tileSize integer +---@return any image +function RL.GenImageCellular( size, tileSize ) end + +-- Textures - Image Manipulation Functions + +---Create an image duplicate ( useful for transformations ) +---- Failure return -1 +---- Success return int +---@param image any +---@return any image +function RL.ImageCopy( image ) end + +---Create an image from another image piece +---- Failure return -1 +---- Success return int +---@param image any +---@param rec table +---@return any image +function RL.ImageFromImage( image, rec ) end + +---Create an image from text ( custom sprite font ) +---- Failure return -1 +---- Success return int +---@param font any +---@param text string +---@param fontSize number +---@param spacing number +---@param tint table +---@return any image +function RL.ImageText( font, text, fontSize, spacing, tint ) end + +---Convert image data to desired format +---- Failure return false +---- Success return true +---@param image any +---@param newFormat integer +---@return any success +function RL.ImageFormat( image, newFormat ) end + +---Convert image to POT ( power-of-two ) +---- Failure return false +---- Success return true +---@param image any +---@param fill table +---@return any success +function RL.ImageToPOT( image, fill ) end + +---Crop an image to a defined rectangle +---- Failure return false +---- Success return true +---@param image any +---@param crop table +---@return any success +function RL.ImageCrop( image, crop ) end + +---Crop image depending on alpha value +---- Failure return false +---- Success return true +---@param image any +---@param threshold number +---@return any success +function RL.ImageAlphaCrop( image, threshold ) end + +---Clear alpha channel to desired color +---- Failure return false +---- Success return true +---@param image any +---@param color table +---@param threshold number +---@return any success +function RL.ImageAlphaClear( image, color, threshold ) end + +---Apply alpha mask to image +---- Failure return false +---- Success return true +---@param image any +---@param alphaMask any +---@return any success +function RL.ImageAlphaMask( image, alphaMask ) end + +---Premultiply alpha channel +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.ImageAlphaPremultiply( image ) end + +---Resize image ( Bicubic scaling algorithm ) +---- Failure return false +---- Success return true +---@param image any +---@param size table +---@return any success +function RL.ImageResize( image, size ) end + +---Resize image ( Nearest-Neighbor scaling algorithm ) +---- Failure return false +---- Success return true +---@param image any +---@param size table +---@return any success +function RL.ImageResizeNN( image, size ) end + +---Resize canvas and fill with color +---- Failure return false +---- Success return true +---@param image any +---@param size table +---@param offset table +---@param fill table +---@return any success +function RL.ImageResizeCanvas( image, size, offset, fill ) end + +---Generate all mipmap levels for a provided image +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.ImageMipmaps( image ) end + +---Dither image data to 16bpp or lower ( Floyd-Steinberg dithering ) +---- Failure return false +---- Success return true +---@param image any +---@param bpp table +---@return any success +function RL.ImageDither( image, bpp ) end + +---Flip image vertically +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.ImageFlipVertical( image ) end + +---Flip image horizontally +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.ImageFlipHorizontal( image ) end + +---Rotate image clockwise 90deg +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.ImageRotateCW( image ) end + +---Rotate image counter-clockwise 90deg +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.ImageRotateCCW( image ) end + +---Modify image color: tint +---- Failure return false +---- Success return true +---@param image any +---@param color table +---@return any success +function RL.ImageColorTint( image, color ) end + +---Modify image color: invert +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.ImageColorInvert( image ) end + +---Modify image color: grayscale +---- Failure return false +---- Success return true +---@param image any +---@return any success +function RL.ImageColorGrayscale( image ) end + +---Modify image color: contrast ( -100 to 100 ) +---- Failure return false +---- Success return true +---@param image any +---@param contrast number +---@return any success +function RL.ImageColorContrast( image, contrast ) end + +---Modify image color: brightness ( -255 to 255 ) +---- Failure return false +---- Success return true +---@param image any +---@param brightness integer +---@return any success +function RL.ImageColorBrightness( image, brightness ) end + +---Modify image color: replace color +---- Failure return false +---- Success return true +---@param image any +---@param color table +---@param replace table +---@return any success +function RL.ImageColorReplace( image, color, replace ) end + +---Load color data from image as a Color array ( RGBA - 32bit ) +---- Failure return false +---- Success return Color{} +---@param image any +---@return any colors +function RL.LoadImageColors( image ) end + +---Load colors palette from image as a Color array ( RGBA - 32bit ) +---- Failure return false +---- Success return Color{} +---@param image any +---@param maxPaletteSize integer +---@return any colors +function RL.LoadImagePalette( image, maxPaletteSize ) end + +---Get image alpha border rectangle +---- Failure return false +---- Success return Rectangle +---@param image any +---@param threshold number +---@return any rectangle +function RL.GetImageAlphaBorder( image, threshold ) end + +---Get image pixel color at ( x, y ) position +---- Failure return false +---- Success return Color +---@param image any +---@param pixelPos table +---@return any color +function RL.GetImageColor( image, pixelPos ) end + +-- Textures - Image Drawing + +---Clear image background with given color +---- Failure return false +---- Success return true +---@param dst any +---@param color table +---@return any success +function RL.ImageClearBackground( dst, color ) end + +---Draw pixel within an image +---- Failure return false +---- Success return true +---@param dst any +---@param position table +---@param color table +---@return any success +function RL.ImageDrawPixel( dst, position, color ) end + +---Draw line within an image +---- Failure return false +---- Success return true +---@param dst any +---@param start table +---@param end table +---@param color table +---@return any success +function RL.ImageDrawLine( dst, start, end, color ) end + +---Draw circle within an image +---- Failure return false +---- Success return true +---@param dst any +---@param center table +---@param radius integer +---@param color table +---@return any success +function RL.ImageDrawCircle( dst, center, radius, color ) end + +---Draw rectangle within an image +---- Failure return false +---- Success return true +---@param dst any +---@param rec table +---@param color table +---@return any success +function RL.ImageDrawRectangle( dst, rec, color ) end + +---Draw rectangle lines within an image +---- Failure return false +---- Success return true +---@param dst any +---@param rec table +---@param thick integer +---@param color table +---@return any success +function RL.ImageDrawRectangleLines( dst, rec, thick, color ) end + +---Draw a source image within a destination image ( Tint applied to source ) +---- Failure return false +---- Success return true +---@param dst any +---@param src any +---@param srcRec table +---@param dstRec table +---@param tint table +---@return any success +function RL.ImageDraw( dst, src, srcRec, dstRec, tint ) end + +---Draw text ( Custom sprite font ) within an image ( Destination ) +---- Failure return false +---- Success return true +---@param dst any +---@param font any +---@param text string +---@param position table +---@param fontSize number +---@param spacing number +---@param tint table +---@return any success +function RL.ImageDrawTextEx( dst, font, text, position, fontSize, spacing, tint ) end + +-- Textures - Image Configuration + +---Get image size +---- Failure return nil +---- Success return Vector2 +---@param image any +---@return any size +function RL.GetImageSize( image ) end + +---Get image mipmaps. Mipmap levels, 1 by default +---- Failure return false +---- Success return int +---@param image any +---@return any mipmaps +function RL.GetImageMipmaps( image ) end + +---Get image data format ( PixelFormat type ) +---- Failure return false +---- Success return int +---@param image any +---@return any format +function RL.GetImageFormat( image ) end + +-- Textures - Texture Loading + +---Load texture from file into GPU memory ( VRAM ) +---- Failure return -1 +---- Success return int +---@param fileName string +---@return any texture +function RL.LoadTexture( fileName ) end + +---Load texture from image data +---- Failure return -1 +---- Success return int +---@param image any +---@return any texture +function RL.LoadTextureFromImage( image ) end + +---Load cubemap from image, multiple image cubemap layouts supported +---- Failure return -1 +---- Success return int +---@param image any +---@param layout integer +---@return any texture +function RL.LoadTextureCubemap( image, layout ) end + +---Load texture for rendering ( framebuffer ) +---- Failure return -1 +---- Success return int +---@param size table +---@return any renderTexture +function RL.LoadRenderTexture( size ) end + +---Unload texture from GPU memory ( VRAM ) +---- Failure return false +---- Success return true +---@param texture any +---@return any success +function RL.UnloadTexture( texture ) end + +---Unload render texture from GPU memory ( VRAM ) +---- Failure return false +---- Success return true +---@param target any +---@return any success +function RL.UnloadRenderTexture( target ) end + +---Update GPU texture with new data +---NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format +---- Failure return false +---- Success return true +---@param texture any +---@param pixels any +---@return any success +function RL.UpdateTexture( texture, pixels ) end + +---Update GPU texture rectangle with new data +---NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format +---- Failure return false +---- Success return true +---@param texture any +---@param rec table +---@param pixels any +---@return any success +function RL.UpdateTextureRec( texture, rec, pixels ) end + +-- Textures - Texture Drawing + +---Draw a Texture2D +---- Failure return false +---- Success return true +---@param texture any +---@param position table +---@param tint table +---@return any success +function RL.DrawTexture( texture, position, tint ) end + +---Draw a part of a texture defined by a rectangle +---- Failure return false +---- Success return true +---@param texture any +---@param source table +---@param position table +---@param tint table +---@return any success +function RL.DrawTextureRec( texture, source, position, tint ) end + +---Draw part of a texture ( defined by a rectangle ) with rotation and scale tiled into dest +---- Failure return false +---- Success return true +---@param texture any +---@param source table +---@param dest table +---@param origin table +---@param rotation number +---@param scale number +---@param tint table +---@return any success +function RL.DrawTextureTiled( texture, source, dest, origin, rotation, scale, tint ) end + +---Draw a part of a texture defined by a rectangle with "pro" parameters +---- Failure return false +---- Success return true +---@param texture any +---@param source table +---@param dest table +---@param origin table +---@param rotation number +---@param tint table +---@return any success +function RL.DrawTexturePro( texture, source, dest, origin, rotation, tint ) end + +---Draws a texture ( or part of it ) that stretches or shrinks nicely +---- Failure return false +---- Success return true +---@param texture any +---@param nPatchInfo any +---@param dest table +---@param origin table +---@param rotation number +---@param tint table +---@return any success +function RL.DrawTextureNPatch( texture, nPatchInfo, dest, origin, rotation, tint ) end + +---Draw a textured polygon ( Convex ) +---- Failure return false +---- Success return true +---@param texture any +---@param center table +---@param points any +---@param texcoords any +---@param pointsCount integer +---@param tint table +---@return any success +function RL.DrawTexturePoly( texture, center, points, texcoords, pointsCount, tint ) end + +---Begin drawing to render texture +---- Failure return false +---- Success return true +---@param target any +---@return any success +function RL.BeginTextureMode( target ) end + +---Ends drawing to render texture +---@return any RL.EndTextureMode +function RL.EndTextureMode() end + +---Set what texture source to use ( TEXTURE_SOURCE_TEXTURE or TEXTURE_SOURCE_RENDER_TEXTURE ) +---- Failure return false +---- Success return true +---@param textureSource integer +---@return any success +function RL.SetTextureSource( textureSource ) end + +---Get current texture source type ( TEXTURE_SOURCE_TEXTURE or TEXTURE_SOURCE_RENDER_TEXTURE ) +---- Success return int +---@return any textureSource +function RL.GetTextureSource() end + +-- Textures - Texture Configuration + +---Generate GPU mipmaps for a texture +---- Failure return false +---- Success return true +---@param texture any +---@return any success +function RL.GenTextureMipmaps( texture ) end + +---Set texture scaling filter mode ( TEXTURE_FILTER_POINT, TEXTURE_FILTER_BILINEAR... ) +---- Failure return false +---- Success return true +---@param texture any +---@param filter integer +---@return any success +function RL.SetTextureFilter( texture, filter ) end + +---Set texture wrapping mode ( TEXTURE_WRAP_REPEAT, TEXTURE_WRAP_CLAMP... ) +---- Failure return false +---- Success return true +---@param texture any +---@param wrap integer +---@return any success +function RL.SetTextureWrap( texture, wrap ) end + +---Get texture size +---- Failure return nil +---- Success return Vector2 +---@param texture any +---@return any size +function RL.GetTextureSize( texture ) end + +---Get texture mipmaps. Mipmap levels, 1 by default +---- Failure return false +---- Success return int +---@param texture any +---@return any mipmaps +function RL.GetTextureMipmaps( texture ) end + +---Get texture mipmaps. Mipmap levels, 1 by default +---- Failure return false +---- Success return int +---@param texture any +---@return any format +function RL.GetTextureFormat( texture ) end + +-- Textures - Color/pixel + +---Returns color with alpha applied, alpha goes from 0.0f to 1.0f +---- Failure return false +---- Success return Color +---@param color table +---@param alpha number +---@return any color +function RL.Fade( color, alpha ) end + +---Returns hexadecimal value for a Color +---- Failure return false +---- Success return int +---@param color table +---@return any value +function RL.ColorToInt( color ) end + +---Returns Color normalized as float [0..1] +---- Failure return false +---- Success return Vector4 +---@param color table +---@return any color +function RL.ColorNormalize( color ) end + +---Color from normalized values [0..1] +---- Failure return false +---- Success return Color +---@param normalized table +---@return any color +function RL.ColorFromNormalized( normalized ) end + +---Returns HSV values for a Color, hue [0..360], saturation/value [0..1] +---- Failure return false +---- Success return Vector3 +---@param color table +---@return any HSV +function RL.ColorToHSV( color ) end + +---Returns a Color from HSV values, hue [0..360], saturation/value [0..1] +---- Failure return false +---- Success return Color +---@param hue number +---@param saturation number +---@param value number +---@return any color +function RL.ColorFromHSV( hue, saturation, value ) end + +---Returns color with alpha applied, alpha goes from 0.0f to 1.0f +---- Failure return false +---- Success return Color +---@param color table +---@param alpha number +---@return any color +function RL.ColorAlpha( color, alpha ) end + +---Returns src alpha-blended into dst color with tint +---- Failure return false +---- Success return Color +---@param dst table +---@param src table +---@param tint table +---@return any color +function RL.ColorAlphaBlend( dst, src, tint ) end + +---Get Color structure from hexadecimal value +---- Failure return false +---- Success return Color +---@param int any +---@return any Color +function RL.GetColor( int ) end + +---Get pixel color from source texture +---- Failure return false +---- Success return Color +---@param texture any +---@param position table +---@return any Color +function RL.GetPixelColor( texture, position ) end + +---Get pixel data size in bytes for certain format +---- Failure return false +---- Success return int +---@param width integer +---@param height integer +---@param format integer +---@return any size +function RL.GetPixelDataSize( width, height, format ) end + +-- Text - Loading + +---Load font from file into GPU memory ( VRAM ) +---- Failure return -1 +---- Success return int +---@param fileName string +---@return any font +function RL.LoadFont( fileName ) end + +---Load font from file with extended parameters. Loading the default character set +---- Failure return -1 +---- Success return int +---@param fileName string +---@param fontSize integer +---@return any font +function RL.LoadFontEx( fileName, fontSize ) end + +---Load font from Image ( XNA style ) +---- Failure return -1 +---- Success return int +---@param image any +---@param key table +---@param firstChar integer +---@return any font +function RL.LoadFontFromImage( image, key, firstChar ) end + +---Unload Font from GPU memory ( VRAM ) +---- Failure return false +---- Success return true +---@param font any +---@return any success +function RL.UnloadFont( font ) end + +-- Text - Draw + +---Draw current FPS +---- Failure return false +---- Success return true +---@param pos table +---@return any success +function RL.DrawFPS( pos ) end + +---Draw text using font and additional parameters +---- Failure return false +---- Success return true +---@param font any +---@param text string +---@param position table +---@param fontSize number +---@param spacing number +---@param tint table +---@return any success +function RL.DrawText( font, text, position, fontSize, spacing, tint ) end + +---Draw text using Font and pro parameters ( rotation ) +---- Failure return false +---- Success return true +---@param font any +---@param text string +---@param position table +---@param origin table +---@param rotation number +---@param fontSize number +---@param spacing number +---@param tint table +---@return any success +function RL.DrawTextPro( font, text, position, origin, rotation, fontSize, spacing, tint ) end + +-- Text - Misc + +---Measure string size for Font +---- Failure return false +---- Success return Vector2 +---@param font any +---@param text string +---@param fontSize number +---@param spacing number +---@return any size +function RL.MeasureText( font, text, fontSize, spacing ) end + +---Get font baseSize +---- Failure return false +---- Success return int +---@param font any +---@return any baseSize +function RL.GetFontBaseSize( font ) end + +---Get font glyphCount +---- Failure return false +---- Success return int +---@param font any +---@return any glyphCount +function RL.GetFontGlyphCount( font ) end + +---Get font glyphPadding +---- Failure return false +---- Success return int +---@param font any +---@return any glyphPadding +function RL.GetFontGlyphPadding( font ) end + +-- Models - Basic + +---Draw a line in 3D world space +---- Failure return false +---- Success return true +---@param startPos table +---@param endPos table +---@param color table +---@return any success +function RL.DrawLine3D( startPos, endPos, color ) end + +---Draw a point in 3D space, actually a small line +---- Failure return false +---- Success return true +---@param position table +---@param color table +---@return any success +function RL.DrawPoint3D( position, color ) end + +---Draw a circle in 3D world space +---- Failure return false +---- Success return true +---@param center table +---@param radius number +---@param rotationAxis table +---@param rotationAngle number +---@param color table +---@return any success +function RL.DrawCircle3D( center, radius, rotationAxis, rotationAngle, color ) end + +---Draw a color-filled triangle ( Vertex in counter-clockwise order! ) +---- Failure return false +---- Success return true +---@param v1 table +---@param v2 table +---@param v3 table +---@param color table +---@return any success +function RL.DrawTriangle3D( v1, v2, v3, color ) end + +---Draw cube +---- Failure return false +---- Success return true +---@param position table +---@param size table +---@param color table +---@return any success +function RL.DrawCube( position, size, color ) end + +---Draw cube wires +---- Failure return false +---- Success return true +---@param position table +---@param size table +---@param color table +---@return any success +function RL.DrawCubeWires( position, size, color ) end + +---Draw cube textured +---- Failure return false +---- Success return true +---@param texture any +---@param position table +---@param size table +---@param color table +---@return any success +function RL.DrawCubeTexture( texture, position, size, color ) end + +---Draw sphere +---- Failure return false +---- Success return true +---@param centerPos table +---@param radius number +---@param color table +---@return any success +function RL.DrawSphere( centerPos, radius, color ) end + +---Draw sphere with extended parameters +---- Failure return false +---- Success return true +---@param centerPos table +---@param radius number +---@param rings integer +---@param slices integer +---@param color table +---@return any success +function RL.DrawSphereEx( centerPos, radius, rings, slices, color ) end + +---Draw sphere wires +---- Failure return false +---- Success return true +---@param centerPos table +---@param radius number +---@param rings integer +---@param slices integer +---@param color table +---@return any success +function RL.DrawSphereWires( centerPos, radius, rings, slices, color ) end + +---Draw a cylinder/cone +---- Failure return false +---- Success return true +---@param position table +---@param radiusTop number +---@param radiusBottom number +---@param height number +---@param slices integer +---@param color table +---@return any success +function RL.DrawCylinder( position, radiusTop, radiusBottom, height, slices, color ) end + +---Draw a cylinder with base at startPos and top at endPos +---- Failure return false +---- Success return true +---@param startPos table +---@param endPos table +---@param startRadius number +---@param endRadius number +---@param sides integer +---@param color table +---@return any success +function RL.DrawCylinderEx( startPos, endPos, startRadius, endRadius, sides, color ) end + +---Draw a cylinder/cone wires +---- Failure return false +---- Success return true +---@param position table +---@param radiusTop number +---@param radiusBottom number +---@param height number +---@param slices integer +---@param color table +---@return any success +function RL.DrawCylinderWires( position, radiusTop, radiusBottom, height, slices, color ) end + +---Draw a cylinder wires with base at startPos and top at endPos +---- Failure return false +---- Success return true +---@param startPos table +---@param endPos table +---@param startRadius number +---@param endRadius number +---@param sides integer +---@param color table +---@return any success +function RL.DrawCylinderWiresEx( startPos, endPos, startRadius, endRadius, sides, color ) end + +---Draw a plane XZ +---- Failure return false +---- Success return true +---@param centerPos table +---@param size table +---@param color table +---@return any success +function RL.DrawPlane( centerPos, size, color ) end + +---Draw 3D textured quad. ( Texture coordinates opengl style 0.0 - 1.0 ). +---- Failure return false +---- Success return true +---@param texture any +---@param vertices any +---@param texCoords any +---@param colors any +---@return any success +function RL.DrawQuad3DTexture( texture, vertices, texCoords, colors ) end + +---Draw a ray line +---- Failure return false +---- Success return true +---@param ray any +---@param color table +---@return any success +function RL.DrawRay( ray, color ) end + +---Draw a grid ( Centered at ( 0, 0, 0 ) ) +---- Failure return false +---- Success return true +---@param slices integer +---@param spacing number +---@return any success +function RL.DrawGrid( slices, spacing ) end + +-- Models - Mesh + +---Generate polygonal mesh +---- Failure return -1 +---- Success return int +---@param sides integer +---@param radius number +---@return any mesh +function RL.GenMeshPoly( sides, radius ) end + +---Generate plane mesh ( With subdivisions ) +---- Failure return -1 +---- Success return int +---@param width number +---@param length number +---@param resX integer +---@param resZ integer +---@return any mesh +function RL.GenMeshPlane( width, length, resX, resZ ) end + +---Generate cuboid mesh +---- Failure return -1 +---- Success return int +---@param size table +---@return any mesh +function RL.GenMeshCube( size ) end + +---Generate sphere mesh ( Standard sphere ) +---- Failure return -1 +---- Success return int +---@param radius number +---@param rings integer +---@param slices integer +---@return any mesh +function RL.GenMeshSphere( radius, rings, slices ) end + +---Generate cylinder mesh +---- Failure return -1 +---- Success return int +---@param radius number +---@param height number +---@param slices integer +---@return any mesh +function RL.GenMeshCylinder( radius, height, slices ) end + +---Generate cone/pyramid mesh +---- Failure return -1 +---- Success return int +---@param radius number +---@param height number +---@param slices integer +---@return any mesh +function RL.GenMeshCone( radius, height, slices ) end + +---Generate torus mesh +---- Failure return -1 +---- Success return int +---@param radius number +---@param size number +---@param radSeg integer +---@param sides integer +---@return any mesh +function RL.GenMeshTorus( radius, size, radSeg, sides ) end + +---Generate torus mesh +---- Failure return -1 +---- Success return int +---@param radius number +---@param size number +---@param radSeg integer +---@param sides integer +---@return any mesh +function RL.GenMeshKnot( radius, size, radSeg, sides ) end + +---Generate heightmap mesh from image data +---- Failure return -1 +---- Success return int +---@param heightmap any +---@param size table +---@return any mesh +function RL.GenMeshHeightmap( heightmap, size ) end + +---Generate custom mesh from vertex attribute data and uploads it into a VAO ( if supported ) and VBO +---- Failure return -1 +---- Success return int +---@param mesh any +---@param dynamic boolean +---@return any mesh +function RL.GenMeshCustom( mesh, dynamic ) end + +---Update mesh vertex data in GPU. +---Note! Mainly intented to be used with custom meshes. +---- Failure return false +---- Success return true +---@param mesh any +---@return any success +function RL.UpdateMesh( mesh ) end + +---Unload mesh data from CPU and GPU +---- Failure return false +---- Success return true +---@param mesh any +---@return any success +function RL.UnloadMesh( mesh ) end + +---Draw a 3d mesh with material and transform +---- Failure return false +---- Success return true +---@param mesh any +---@param material any +---@param transform table +---@return any success +function RL.DrawMesh( mesh, material, transform ) end + +---Draw multiple mesh instances with material and different transforms +---- Failure return false +---- Success return true +---@param mesh any +---@param material any +---@param transforms any +---@param instances integer +---@return any success +function RL.DrawMeshInstanced( mesh, material, transforms, instances ) end + +---Updades mesh color vertex attribute buffer +---NOTE: Currently only works on custom mesh +---- Failure return false +---- Success return true +---@param mesh any +---@param color table +---@return any success +function RL.SetMeshColor( mesh, color ) end + +---Export mesh data to file, returns true on success +---- Failure return false +---- Success return true +---@param mesh any +---@param fileName string +---@return any success +function RL.ExportMesh( mesh, fileName ) end + +---Compute mesh bounding box limits +---- Failure return false +---- Success return BoundingBox +---@param mesh any +---@return any boundingBox +function RL.GetMeshBoundingBox( mesh ) end + +---Compute mesh tangents +---- Failure return false +---- Success return true +---@param mesh any +---@return any success +function RL.GenMeshTangents( mesh ) end + +-- Models - Material + +---Load default material +---- Success return int +---@return any material +function RL.LoadMaterialDefault() end + +---Load material from table. See material table definition +---- Failure return false +---- Success return int +---@param material any +---@return any material +function RL.CreateMaterial( material ) end + +---Unload material from GPU memory ( VRAM ) +---- Failure return false +---- Success return true +---@param material any +---@return any success +function RL.UnloadMaterial( material ) end + +---Set texture for a material map type ( MATERIAL_MAP_ALBEDO, MATERIAL_MAP_METALNESS... ) +---- Failure return false +---- Success return true +---@param material any +---@param mapType integer +---@param texture any +---@return any success +function RL.SetMaterialTexture( material, mapType, texture ) end + +---Set color for a material map type +---- Failure return false +---- Success return true +---@param material any +---@param mapType integer +---@param color table +---@return any success +function RL.SetMaterialColor( material, mapType, color ) end + +---Set value for a material map type +---- Failure return false +---- Success return true +---@param material any +---@param mapType integer +---@param value number +---@return any success +function RL.SetMaterialValue( material, mapType, value ) end + +---Set shader for material +---- Failure return false +---- Success return true +---@param material any +---@param shader any +---@return any success +function RL.SetMaterialShader( material, shader ) end + +-- Models - Model + +---Load model from files ( Meshes and materials ) +---- Failure return -1 +---- Success return int +---@param fileName string +---@return any model +function RL.LoadModel( fileName ) end + +---Load model from generated mesh ( Default material ) +---- Failure return -1 +---- Success return int +---@param mesh any +---@return any model +function RL.LoadModelFromMesh( mesh ) end + +---Unload model ( Including meshes ) from memory ( RAM and/or VRAM ) +---- Failure return false +---- Success return true +---@param model any +---@return any success +function RL.UnloadModel( model ) end + +---Draw a model ( With texture if set ) +---- Failure return false +---- Success return true +---@param model any +---@param position table +---@param scale number +---@param tint table +---@return any success +function RL.DrawModel( model, position, scale, tint ) end + +---Draw a model with extended parameters +---- Failure return false +---- Success return true +---@param model any +---@param position table +---@param rotationAxis table +---@param rotationAngle number +---@param scale table +---@param tint table +---@return any success +function RL.DrawModelEx( model, position, rotationAxis, rotationAngle, scale, tint ) end + +---Copies material to model material. ( Model material is the material id in models. Material can be deleted if not used elsewhere ) +---- Failure return false +---- Success return true +---@param model any +---@param modelMaterial any +---@param material any +---@return any success +function RL.SetModelMaterial( model, modelMaterial, material ) end + +---Set material for a mesh ( Mesh and material on this model ) +---- Failure return false +---- Success return true +---@param model any +---@param meshId integer +---@param materialId integer +---@return any success +function RL.SetModelMeshMaterial( model, meshId, materialId ) end + +---Draw a billboard texture +---- Failure return false +---- Success return true +---@param camera any +---@param texture any +---@param position table +---@param size number +---@param tint table +---@return any success +function RL.DrawBillboard( camera, texture, position, size, tint ) end + +---Draw a billboard texture defined by source +---- Failure return false +---- Success return true +---@param camera any +---@param texture any +---@param source table +---@param position table +---@param size table +---@param tint table +---@return any success +function RL.DrawBillboardRec( camera, texture, source, position, size, tint ) end + +---Set model transform matrix +---- Failure return false +---- Success return true +---@param model any +---@param transform table +---@return any success +function RL.SetModelTransform( model, transform ) end + +---Get model transform matrix +---- Failure return false +---- Success return Matrix +---@param model any +---@return any transform +function RL.GetModelTransform( model ) end + +-- Model - Animations + +---Load model animations from file +---- Failure return -1 +---- Success return int, int +---@param fileName string +---@return any animations +---@return any animationCount +function RL.LoadModelAnimations( fileName ) end + +---Update model animation pose +---- Failure return false +---- Success return true +---@param model any +---@param animations any +---@param animation integer +---@param frame integer +---@return any success +function RL.UpdateModelAnimation( model, animations, animation, frame ) end + +---Unload animation data +---- Failure return false +---- Success return true +---@param animations any +---@return any success +function RL.UnloadModelAnimations( animations ) end + +---Check model animation skeleton match +---- Failure return nil +---- Success return bool +---@param model any +---@param animations any +---@return any valid +function RL.IsModelAnimationValid( model, animations ) end + +---Return modelAnimation bone count +---- Failure return false +---- Success return int +---@param animations any +---@param animation integer +---@return any boneCount +function RL.GetModelAnimationBoneCount( animations, animation ) end + +---Return modelAnimation frame count +---- Failure return false +---- Success return int +---@param animations any +---@param animation integer +---@return any frameCount +function RL.GetModelAnimationFrameCount( animations, animation ) end + +-- Model - Collision + +---Check collision between two spheres +---- Failure return nil +---- Success return bool +---@param center1 table +---@param radius1 number +---@param center2 table +---@param radius2 number +---@return any collision +function RL.CheckCollisionSpheres( center1, radius1, center2, radius2 ) end + +---Check collision between two bounding boxes +---- Failure return nil +---- Success return bool +---@param box1 any +---@param box2 any +---@return any collision +function RL.CheckCollisionBoxes( box1, box2 ) end + +---Check collision between box and sphere +---- Failure return nil +---- Success return bool +---@param box any +---@param center table +---@param radius number +---@return any collision +function RL.CheckCollisionBoxSphere( box, center, radius ) end + +---Get collision info between ray and sphere. ( RayCollision is Lua table of { hit, distance, point, normal } ) +---- Failure return nil +---- Success return RayCollision +---@param ray any +---@param center table +---@param radius number +---@return any rayCollision +function RL.GetRayCollisionSphere( ray, center, radius ) end + +---Get collision info between ray and box +---- Failure return nil +---- Success return RayCollision +---@param ray any +---@param box any +---@return any rayCollision +function RL.GetRayCollisionBox( ray, box ) end + +---Get collision info between ray and mesh +---- Failure return nil +---- Success return RayCollision +---@param ray any +---@param mesh any +---@param transform table +---@return any rayCollision +function RL.GetRayCollisionMesh( ray, mesh, transform ) end + +---Get collision info between ray and triangle +---- Failure return nil +---- Success return RayCollision +---@param ray any +---@param p1 table +---@param p2 table +---@param p3 table +---@return any rayCollision +function RL.GetRayCollisionTriangle( ray, p1, p2, p3 ) end + +---Get collision info between ray and quad +---- Failure return nil +---- Success return RayCollision +---@param ray any +---@param p1 table +---@param p2 table +---@param p3 table +---@param p4 table +---@return any rayCollision +function RL.GetRayCollisionQuad( ray, p1, p2, p3, p4 ) end + +-- Audio - Audio device management + +---Set master volume ( listener ) +---- Failure return false +---- Success return true +---@param volume number +---@return any success +function RL.SetMasterVolume( volume ) end + +-- Audio - Wave/Sound Loading + +---Load sound from file +---- Failure return -1 +---- Success return int +---@param fileName string +---@return any sound +function RL.LoadSound( fileName ) end + +---Load wave data from file +---- Failure return -1 +---- Success return int +---@param fileName string +---@return any wave +function RL.LoadWave( fileName ) end + +---Load sound from wave data +---- Failure return -1 +---- Success return int +---@param wave any +---@return any sound +function RL.LoadSoundFromWave( wave ) end + +---Unload sound +---- Failure return false +---- Success return true +---@param sound any +---@return any success +function RL.UnloadSound( sound ) end + +---Unload wave data +---- Failure return false +---- Success return true +---@param wave any +---@return any success +function RL.UnloadWave( wave ) end + +---Export wave data to file, returns true on success +---- Failure return false +---- Success return true +---@param wave any +---@param fileName string +---@return any success +function RL.ExportWave( wave, fileName ) end + +---Export wave sample data to code (.h), returns true on success +---- Failure return false +---- Success return true +---@param wave any +---@param fileName string +---@return any success +function RL.ExportWaveAsCode( wave, fileName ) end + +-- Audio - Wave/Sound management + +---Play a sound +---- Failure return false +---- Success return true +---@param sound any +---@return any success +function RL.PlaySound( sound ) end + +---Stop playing a sound +---- Failure return false +---- Success return true +---@param sound any +---@return any success +function RL.StopSound( sound ) end + +---Pause a sound +---- Failure return false +---- Success return true +---@param sound any +---@return any success +function RL.PauseSound( sound ) end + +---Resume a paused sound +---- Failure return false +---- Success return true +---@param sound any +---@return any success +function RL.ResumeSound( sound ) end + +---Play a sound ( Using multichannel buffer pool ) +---- Failure return false +---- Success return true +---@param sound any +---@return any success +function RL.PlaySoundMulti( sound ) end + +---Stop any sound playing ( using multichannel buffer pool ) +---@return any RL.StopSoundMulti +function RL.StopSoundMulti() end + +---Get number of sounds playing in the multichannel +---- Success return int +---@return any count +function RL.GetSoundsPlaying() end + +---Check if a sound is currently playing +---- Failure return nil +---- Success return bool +---@param sound any +---@return any playing +function RL.IsSoundPlaying( sound ) end + +---Set volume for a sound ( 1.0 is max level ) +---- Failure return false +---- Success return true +---@param sound any +---@param volume number +---@return any success +function RL.SetSoundVolume( sound, volume ) end + +---Set pitch for a sound ( 1.0 is base level ) +---- Failure return false +---- Success return true +---@param sound any +---@param pitch number +---@return any success +function RL.SetSoundPitch( sound, pitch ) end + +---Set pan for a sound ( 0.5 is center ) +---- Failure return false +---- Success return true +---@param sound any +---@param pan number +---@return any success +function RL.SetSoundPan( sound, pan ) end + +---Convert wave data to desired format +---- Failure return false +---- Success return true +---@param wave any +---@param sampleRate integer +---@param sampleSize integer +---@param channels integer +---@return any success +function RL.WaveFormat( wave, sampleRate, sampleSize, channels ) end + +---Copy a wave to a new wave +---- Failure return -1 +---- Success return int +---@param wave any +---@return any wave +function RL.WaveCopy( wave ) end + +---Crop a wave to defined samples range +---- Failure return false +---- Success return true +---@param wave any +---@param initSample integer +---@param finalSample integer +---@return any success +function RL.WaveCrop( wave, initSample, finalSample ) end + +-- Audio - Music management + +---Load music stream from file +---- Failure return false +---- Success return true +---@param fileName string +---@return any success +function RL.LoadMusicStream( fileName ) end + +---Start music playing +---@return any RL.PlayMusicStream +function RL.PlayMusicStream() end + +---Check if music is playing +---- Success return bool +---@return any playing +function RL.IsMusicStreamPlaying() end + +---Stop music playing +---@return any RL.StopMusicStream +function RL.StopMusicStream() end + +---Pause music playing +---@return any RL.PauseMusicStream +function RL.PauseMusicStream() end + +---Resume playing paused music +---@return any RL.ResumeMusicStream +function RL.ResumeMusicStream() end + +---Seek music to a position ( in seconds ) +---- Failure return false +---- Success return true +---@param position number +---@return any success +function RL.SeekMusicStream( position ) end + +---Set volume for music ( 1.0 is max level ) +---- Failure return false +---- Success return true +---@param volume number +---@return any success +function RL.SetMusicVolume( volume ) end + +---Set pitch for a music ( 1.0 is base level ) +---- Failure return false +---- Success return true +---@param pitch number +---@return any success +function RL.SetMusicPitch( pitch ) end + +---Set pan for a music ( 0.5 is center ) +---- Failure return false +---- Success return true +---@param pan number +---@return any success +function RL.SetMusicPan( pan ) end + +---Get music time length ( in seconds ) +---- Success return float +---@return any length +function RL.GetMusicTimeLength() end + +---Get current music time played ( in seconds ) +---- Success return float +---@return any played +function RL.GetMusicTimePlayed() end + +-- Math - Utils + +---Clamp float value +---- Failure return false +---- Success return float +---@param value number +---@param min number +---@param max number +---@return any result +function RL.Clamp( value, min, max ) end + +---Calculate linear interpolation between two floats +---- Failure return false +---- Success return float +---@param start number +---@param end number +---@param amount number +---@return any result +function RL.Lerp( start, end, amount ) end + +---Normalize input value within input range +---- Failure return false +---- Success return float +---@param value number +---@param start number +---@param end number +---@return any result +function RL.Normalize( value, start, end ) end + +---Remap input value within input range to output range +---- Failure return false +---- Success return float +---@param value number +---@param inputStart number +---@param inputEnd number +---@param outputStart number +---@param outputEnd number +---@return any result +function RL.Remap( value, inputStart, inputEnd, outputStart, outputEnd ) end + +---Wrap input value from min to max +---- Failure return false +---- Success return float +---@param value number +---@param min number +---@param max number +---@return any result +function RL.Wrap( value, min, max ) end + +---Check whether two given floats are almost equal +---- Failure return false +---- Success return int +---@param x number +---@param y number +---@return any result +function RL.FloatEquals( x, y ) end + +-- Math - Vector2 + +---Vector with components value 0.0f +---- Success return Vector2 +---@return any result +function RL.Vector2Zero() end + +---Vector with components value 1.0f +---- Success return Vector2 +---@return any result +function RL.Vector2One() end + +---Add two vectors (v1 + v2) +---- Failure return false +---- Success return Vector2 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector2Add( v1, v2 ) end + +---Add vector and float value +---- Failure return false +---- Success return Vector2 +---@param v table +---@param add number +---@return any result +function RL.Vector2AddValue( v, add ) end + +---Subtract two vectors (v1 - v2) +---- Failure return false +---- Success return Vector2 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector2Subtract( v1, v2 ) end + +---Subtract vector by float value +---- Failure return false +---- Success return Vector2 +---@param v table +---@param sub number +---@return any result +function RL.Vector2SubtractValue( v, sub ) end + +---Calculate vector length +---- Failure return false +---- Success return float +---@param v any +---@return any result +function RL.Vector2Length( v ) end + +---Calculate vector square length +---- Failure return false +---- Success return float +---@param v any +---@return any result +function RL.Vector2LengthSqr( v ) end + +---Calculate two vectors dot product +---- Failure return false +---- Success return float +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector2DotProduct( v1, v2 ) end + +---Calculate distance between two vectors +---- Failure return false +---- Success return float +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector2Distance( v1, v2 ) end + +---Calculate square distance between two vectors +---- Failure return false +---- Success return float +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector2DistanceSqr( v1, v2 ) end + +---Calculate angle from two vectors +---- Failure return false +---- Success return float +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector2Angle( v1, v2 ) end + +---Scale vector ( multiply by value ) +---- Failure return false +---- Success return Vector2 +---@param v table +---@param scale number +---@return any result +function RL.Vector2Scale( v, scale ) end + +---Multiply vector by vector +---- Failure return false +---- Success return Vector2 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector2Multiply( v1, v2 ) end + +---Negate vector +---- Failure return false +---- Success return Vector2 +---@param v table +---@return any result +function RL.Vector2Negate( v ) end + +---Divide vector by vector +---- Failure return false +---- Success return Vector2 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector2Divide( v1, v2 ) end + +---Normalize provided vector +---- Failure return false +---- Success return Vector2 +---@param v table +---@return any result +function RL.Vector2Normalize( v ) end + +---Transforms a Vector2 by a given Matrix +---- Failure return false +---- Success return Vector2 +---@param v table +---@param mat table +---@return any result +function RL.Vector2Transform( v, mat ) end + +---Calculate linear interpolation between two vectors +---- Failure return false +---- Success return Vector2 +---@param v1 table +---@param v2 table +---@param amount number +---@return any result +function RL.Vector2Lerp( v1, v2, amount ) end + +---Calculate reflected vector to normal +---- Failure return false +---- Success return Vector2 +---@param v table +---@param normal table +---@return any result +function RL.Vector2Reflect( v, normal ) end + +---Rotate vector by angle +---- Failure return false +---- Success return Vector2 +---@param v table +---@param angle number +---@return any result +function RL.Vector2Rotate( v, angle ) end + +---Move Vector towards target +---- Failure return false +---- Success return Vector2 +---@param v table +---@param target table +---@param maxDistance number +---@return any result +function RL.Vector2MoveTowards( v, target, maxDistance ) end + +---Invert the given vector +---- Failure return false +---- Success return Vector2 +---@param v table +---@return any result +function RL.Vector2Invert( v ) end + +---Clamp the components of the vector between +---min and max values specified by the given vectors +---- Failure return false +---- Success return Vector2 +---@param v table +---@param min table +---@param max table +---@return any result +function RL.Vector2Clamp( v, min, max ) end + +---Clamp the magnitude of the vector between two min and max values +---- Failure return false +---- Success return Vector2 +---@param v table +---@param min number +---@param max number +---@return any result +function RL.Vector2ClampValue( v, min, max ) end + +---Check whether two given vectors are almost equal +---- Failure return false +---- Success return int +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector2Equals( v1, v2 ) end + +-- Math - Vector 3 + +---Vector with components value 0.0f +---- Success return Vector3 +---@return any result +function RL.Vector3Zero() end + +---Vector with components value 1.0f +---- Success return Vector3 +---@return any result +function RL.Vector3One() end + +---Add two vectors +---- Failure return false +---- Success return Vector3 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3Add( v1, v2 ) end + +---Add vector and float value +---- Failure return false +---- Success return Vector3 +---@param v table +---@param add number +---@return any result +function RL.Vector3AddValue( v, add ) end + +---Subtract two vectors +---- Failure return false +---- Success return Vector3 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3Subtract( v1, v2 ) end + +---Subtract vector by float value +---- Failure return false +---- Success return Vector3 +---@param v table +---@param sub number +---@return any result +function RL.Vector3SubtractValue( v, sub ) end + +---Multiply vector by scalar +---- Failure return false +---- Success return Vector3 +---@param v table +---@param scalar number +---@return any result +function RL.Vector3Scale( v, scalar ) end + +---Multiply vector by vector +---- Failure return false +---- Success return Vector3 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3Multiply( v1, v2 ) end + +---Calculate two vectors cross product +---- Failure return false +---- Success return Vector3 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3CrossProduct( v1, v2 ) end + +---Calculate one vector perpendicular vector +---- Failure return false +---- Success return Vector3 +---@param v table +---@return any result +function RL.Vector3Perpendicular( v ) end + +---Calculate vector length +---- Failure return false +---- Success return float +---@param v table +---@return any result +function RL.Vector3Length( v ) end + +---Calculate vector square length +---- Failure return false +---- Success return float +---@param v table +---@return any result +function RL.Vector3LengthSqr( v ) end + +---Calculate two vectors dot product +---- Failure return false +---- Success return float +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3DotProduct( v1, v2 ) end + +---Calculate distance between two vectors +---- Failure return false +---- Success return float +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3Distance( v1, v2 ) end + +---Calculate square distance between two vectors +---- Failure return false +---- Success return float +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3DistanceSqr( v1, v2 ) end + +---Calculate angle between two vectors +---- Failure return false +---- Success return float +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3Angle( v1, v2 ) end + +---Negate provided vector ( invert direction ) +---- Failure return false +---- Success return Vector3 +---@param v table +---@return any result +function RL.Vector3Negate( v ) end + +---Divide vector by vector +---- Failure return false +---- Success return Vector3 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3Divide( v1, v2 ) end + +---Normalize provided vector +---- Failure return false +---- Success return Vector3 +---@param v table +---@return any result +function RL.Vector3Normalize( v ) end + +---Orthonormalize provided vectors. Makes vectors normalized and orthogonal to each other. +---Gram-Schmidt function implementation +---- Failure return false +---- Success return Vector3, Vector3 +---@param v1 table +---@param v2 table +---@return any v1 +---@return any v2 +function RL.Vector3OrthoNormalize( v1, v2 ) end + +---Transforms a Vector3 by a given Matrix +---- Failure return false +---- Success return Vector3 +---@param v table +---@param mat table +---@return any result +function RL.Vector3Transform( v, mat ) end + +---Transform a vector by quaternion rotation +---- Failure return false +---- Success return Vector3 +---@param v table +---@param q table +---@return any result +function RL.Vector3RotateByQuaternion( v, q ) end + +---Rotates a vector around an axis +---- Failure return false +---- Success return Vector3 +---@param v table +---@param axis table +---@param angle number +---@return any result +function RL.Vector3RotateByAxisAngle( v, axis, angle ) end + +---Calculate linear interpolation between two vectors +---- Failure return false +---- Success return Vector3 +---@param v1 table +---@param v2 table +---@param amount number +---@return any result +function RL.Vector3Lerp( v1, v2, amount ) end + +---Calculate reflected vector to normal +---- Failure return false +---- Success return Vector3 +---@param v table +---@param normal table +---@return any result +function RL.Vector3Reflect( v, normal ) end + +---Get min value for each pair of components +---- Failure return false +---- Success return Vector3 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3Min( v1, v2 ) end + +---Get max value for each pair of components +---- Failure return false +---- Success return Vector3 +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3Max( v1, v2 ) end + +---Compute barycenter coordinates ( u, v, w ) for point p with respect to triangle ( a, b, c ) +---NOTE: Assumes P is on the plane of the triangle +---- Failure return false +---- Success return Vector3 +---@param p table +---@param a table +---@param b table +---@param c table +---@return any result +function RL.Vector3Barycenter( p, a, b, c ) end + +---Projects a Vector3 from screen space into object space +---NOTE: We are avoiding calling other raymath functions despite available +---- Failure return false +---- Success return Vector3 +---@param source table +---@param projection table +---@param view table +---@return any result +function RL.Vector3Unproject( source, projection, view ) end + +---Invert the given vector +---- Failure return false +---- Success return Vector3 +---@param v table +---@return any result +function RL.Vector3Invert( v ) end + +---Clamp the components of the vector between +---min and max values specified by the given vectors +---- Failure return false +---- Success return Vector3 +---@param v table +---@param min table +---@param max table +---@return any result +function RL.Vector3Clamp( v, min, max ) end + +---Clamp the magnitude of the vector between two values +---- Failure return false +---- Success return Vector3 +---@param v table +---@param min number +---@param max number +---@return any result +function RL.Vector3ClampValue( v, min, max ) end + +---Check whether two given vectors are almost equal +---- Failure return false +---- Success return int +---@param v1 table +---@param v2 table +---@return any result +function RL.Vector3Equals( v1, v2 ) end + +---Compute the direction of a refracted ray where v specifies the +---normalized direction of the incoming ray, n specifies the +---normalized normal vector of the interface of two optical media, +---and r specifies the 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 +---- Failure return false +---- Success return Vector3 +---@param v table +---@param n table +---@param r number +---@return any result +function RL.Vector3Refract( v, n, r ) end + +-- Math - Matrix + +---Compute matrix determinant +---- Failure return false +---- Success return float +---@param mat table +---@return any result +function RL.MatrixDeterminant( mat ) end + +---Get the trace of the matrix ( sum of the values along the diagonal ) +---- Failure return false +---- Success return float +---@param mat table +---@return any result +function RL.MatrixTrace( mat ) end + +---Transposes provided matrix +---- Failure return false +---- Success return Matrix +---@param mat table +---@return any result +function RL.MatrixTranspose( mat ) end + +---Invert provided matrix +---- Failure return false +---- Success return Matrix +---@param mat table +---@return any result +function RL.MatrixInvert( mat ) end + +---Get identity matrix +---- Success return Matrix +---@return any result +function RL.MatrixIdentity() end + +---Add two matrices +---- Failure return false +---- Success return Matrix +---@param left table +---@param right table +---@return any result +function RL.MatrixAdd( left, right ) end + +---Subtract two matrices (left - right) +---- Failure return false +---- Success return Matrix +---@param left table +---@param right table +---@return any result +function RL.MatrixSubtract( left, right ) end + +---Get two matrix multiplication +---- Failure return false +---- Success return Matrix +---@param left table +---@param right table +---@return any result +function RL.MatrixMultiply( left, right ) end + +---Get translation matrix +---- Failure return false +---- Success return Matrix +---@param translate table +---@return any result +function RL.MatrixTranslate( translate ) end + +---Create rotation matrix from axis and angle. NOTE: Angle should be provided in radians +---- Failure return false +---- Success return Matrix +---@param axis table +---@param angle number +---@return any result +function RL.MatrixRotate( axis, angle ) end + +---Get x-rotation matrix ( angle in radians ) +---- Failure return false +---- Success return Matrix +---@param angle number +---@return any result +function RL.MatrixRotateX( angle ) end + +---Get y-rotation matrix ( angle in radians ) +---- Failure return false +---- Success return Matrix +---@param angle number +---@return any result +function RL.MatrixRotateY( angle ) end + +---Get z-rotation matrix ( angle in radians ) +---- Failure return false +---- Success return Matrix +---@param angle number +---@return any result +function RL.MatrixRotateZ( angle ) end + +---Get xyz-rotation matrix ( angles in radians ) +---- Failure return false +---- Success return Matrix +---@param angle table +---@return any result +function RL.MatrixRotateXYZ( angle ) end + +---Get zyx-rotation matrix ( angles in radians ) +---- Failure return false +---- Success return Matrix +---@param angle table +---@return any result +function RL.MatrixRotateZYX( angle ) end + +---Get scaling matrix +---- Failure return false +---- Success return Matrix +---@param scale table +---@return any result +function RL.MatrixScale( scale ) end + +---Get perspective projection matrix +---- Failure return false +---- Success return Matrix +---@param left any +---@param right any +---@param bottom any +---@param top any +---@param near any +---@param far any +---@return any result +function RL.MatrixFrustum( left, right, bottom, top, near, far ) end + +---Get perspective projection matrix +---- Failure return false +---- Success return Matrix +---@param fovy any +---@param aspect any +---@param near any +---@param far any +---@return any result +function RL.MatrixPerspective( fovy, aspect, near, far ) end + +---Get orthographic projection matrix +---- Failure return false +---- Success return Matrix +---@param left any +---@param right any +---@param bottom any +---@param top any +---@param near any +---@param far any +---@return any result +function RL.MatrixOrtho( left, right, bottom, top, near, far ) end + +---Get camera look-at matrix ( View matrix ) +---- Failure return false +---- Success return Matrix +---@param eye table +---@param target table +---@param up table +---@return any result +function RL.MatrixLookAt( eye, target, up ) end + +-- Math - Quaternion + +---Add two quaternions +---- Failure return false +---- Success return Quaternion +---@param q1 table +---@param q2 table +---@return any result +function RL.QuaternionAdd( q1, q2 ) end + +---Add quaternion and float value +---- Failure return false +---- Success return Quaternion +---@param q table +---@param add number +---@return any result +function RL.QuaternionAddValue( q, add ) end + +---Subtract two quaternions +---- Failure return false +---- Success return Quaternion +---@param q1 table +---@param q2 table +---@return any result +function RL.QuaternionSubtract( q1, q2 ) end + +---Subtract quaternion and float value +---- Failure return false +---- Success return Quaternion +---@param q table +---@param sub number +---@return any result +function RL.QuaternionSubtractValue( q, sub ) end + +---Get identity quaternion +---- Success return Quaternion +---@return any result +function RL.QuaternionIdentity() end + +---Computes the length of a quaternion +---- Failure return false +---- Success return float +---@param q table +---@return any result +function RL.QuaternionLength( q ) end + +---Normalize provided quaternion +---- Failure return false +---- Success return Quaternion +---@param q table +---@return any result +function RL.QuaternionNormalize( q ) end + +---Invert provided quaternion +---- Failure return false +---- Success return Quaternion +---@param q table +---@return any result +function RL.QuaternionInvert( q ) end + +---Calculate two quaternion multiplication +---- Failure return false +---- Success return Quaternion +---@param q1 table +---@param q2 table +---@return any result +function RL.QuaternionMultiply( q1, q2 ) end + +---Scale quaternion by float value +---- Failure return false +---- Success return Quaternion +---@param q table +---@param mul number +---@return any result +function RL.QuaternionScale( q, mul ) end + +---Divide two quaternions +---- Failure return false +---- Success return Quaternion +---@param q1 table +---@param q2 table +---@return any result +function RL.QuaternionDivide( q1, q2 ) end + +---Calculate linear interpolation between two quaternions +---- Failure return false +---- Success return Quaternion +---@param q1 table +---@param q2 table +---@param amount number +---@return any result +function RL.QuaternionLerp( q1, q2, amount ) end + +---Calculate slerp-optimized interpolation between two quaternions +---- Failure return false +---- Success return Quaternion +---@param q1 table +---@param q2 table +---@param amount number +---@return any result +function RL.QuaternionNlerp( q1, q2, amount ) end + +---Calculates spherical linear interpolation between two quaternions +---- Failure return false +---- Success return Quaternion +---@param q1 table +---@param q2 table +---@param amount number +---@return any result +function RL.QuaternionSlerp( q1, q2, amount ) end + +---Calculate quaternion based on the rotation from one vector to another +---- Failure return false +---- Success return Quaternion +---@param from table +---@param to table +---@return any result +function RL.QuaternionFromVector3ToVector3( from, to ) end + +---Get a quaternion for a given rotation matrix +---- Failure return false +---- Success return Quaternion +---@param mat table +---@return any result +function RL.QuaternionFromMatrix( mat ) end + +---Get a quaternion for a given rotation matrix +---- Failure return false +---- Success return Matrix +---@param q table +---@return any result +function RL.QuaternionToMatrix( q ) end + +---Get rotation quaternion for an angle and axis +---NOTE: angle must be provided in radians +---- Failure return false +---- Success return Quaternion +---@param axis table +---@param angle number +---@return any result +function RL.QuaternionFromAxisAngle( axis, angle ) end + +---Get the rotation angle and axis for a given quaternion +---- Failure return false +---- Success return Vector3, float +---@param q table +---@return any axis +---@return any angle +function RL.QuaternionToAxisAngle( q ) end + +---Get the quaternion equivalent to Euler angles +---NOTE: Rotation order is ZYX +---- Failure return false +---- Success return Quaternion +---@param pitch number +---@param yaw number +---@param roll number +---@return any result +function RL.QuaternionFromEuler( pitch, yaw, roll ) end + +---Get the Euler angles equivalent to quaternion (roll, pitch, yaw) +---NOTE: Angles are returned in a Vector3 struct in radians +---- Failure return false +---- Success return Vector3 +---@param q table +---@return any result +function RL.QuaternionToEuler( q ) end + +---Transform a quaternion given a transformation matrix +---- Failure return false +---- Success return Quaternion +---@param q table +---@param mat table +---@return any result +function RL.QuaternionTransform( q, mat ) end + +---Check whether two given quaternions are almost equal +---- Failure return false +---- Success return int +---@param q1 table +---@param q2 table +---@return any result +function RL.QuaternionEquals( q1, q2 ) end + +-- Gui - Global + +---Enable gui controls ( global state ) +---@return any RL.GuiEnable +function RL.GuiEnable() end + +---Disable gui controls ( global state ) +---@return any RL.GuiDisable +function RL.GuiDisable() end + +---Lock gui controls ( global state ) +---@return any RL.GuiLock +function RL.GuiLock() end + +---Unlock gui controls ( global state ) +---@return any RL.GuiUnlock +function RL.GuiUnlock() end + +---Check if gui is locked ( global state ) +---- Success return bool +---@return any locked +function RL.GuiIsLocked() end + +---Set gui controls alpha ( global state ), alpha goes from 0.0f to 1.0f +---- Failure return false +---- Success return true +---@param alpha number +---@return any success +function RL.GuiFade( alpha ) end + +---Set gui state ( global state ) +---- Failure return false +---- Success return true +---@param state integer +---@return any success +function RL.GuiSetState( state ) end + +---Get gui state ( global state ) +---- Success return int +---@return any state +function RL.GuiGetState() end + +-- Gui - Font + +---Set gui custom font ( Global state ) +---- Failure return false +---- Success return true +---@param font any +---@return any success +function RL.GuiSetFont( font ) end + +-- Gui - Style + +---Set one style property +---- Failure return false +---- Success return true +---@param control integer +---@param property integer +---@param value integer +---@return any success +function RL.GuiSetStyle( control, property, value ) end + +---Get one style property +---- Failure return false +---- Success return int +---@param control integer +---@param property integer +---@return any value +function RL.GuiGetStyle( control, property ) end + +---Load style file over global style variable ( .rgs ) +---- Failure return false +---- Success return true +---@param control integer +---@param property integer +---@return any success +function RL.GuiLoadStyle( control, property ) end + +---Load style default over global style +---@return any RL.GuiLoadStyleDefault +function RL.GuiLoadStyleDefault() end + +-- Gui - Container + +---Window Box control, shows a window that can be closed +---- Failure return nil +---- Success return bool +---@param bounds table +---@param title string +---@return any state +function RL.GuiWindowBox( bounds, title ) end + +---Group Box control with text name +---- Failure return false +---- Success return true +---@param bounds table +---@param text string +---@return any success +function RL.GuiGroupBox( bounds, text ) end + +---Line separator control, could contain text +---- Failure return false +---- Success return true +---@param bounds table +---@param text string +---@return any success +function RL.GuiLine( bounds, text ) end + +---Panel control, useful to group controls +---- Failure return false +---- Success return true +---@param bounds table +---@param text string +---@return any success +function RL.GuiPanel( bounds, text ) end + +---Scroll Panel control +---- Failure return false +---- Success return Rectangle, Vector2 +---@param bounds table +---@param text string +---@param content table +---@param scroll table +---@return any view +---@return any scroll +function RL.GuiScrollPanel( bounds, text, content, scroll ) end + +-- Gui - Basic + +---Label control, shows text +---- Failure return false +---- Success return true +---@param bounds table +---@param text string +---@return any success +function RL.GuiLabel( bounds, text ) end + +---Button control, returns true when clicked +---- Failure return nil +---- Success return boolean +---@param bounds table +---@param text string +---@return any clicked +function RL.GuiButton( bounds, text ) end + +---Label button control, show true when clicked +---- Failure return nil +---- Success return boolean +---@param bounds table +---@param text string +---@return any clicked +function RL.GuiLabelButton( bounds, text ) end + +---Toggle Button control, returns true when active +---- Failure return nil +---- Success return boolean +---@param bounds table +---@param text string +---@param active boolean +---@return any active +function RL.GuiToggle( bounds, text, active ) end + +---Toggle Group control, returns active toggle index +---- Failure return false +---- Success return int +---@param bounds table +---@param text string +---@param active integer +---@return any index +function RL.GuiToggleGroup( bounds, text, active ) end + +---Check Box control, returns true when active +---- Failure return nil +---- Success return boolean +---@param bounds table +---@param text string +---@param checked boolean +---@return any active +function RL.GuiCheckBox( bounds, text, checked ) end + +---Combo Box control, returns selected item index +---- Failure return nil +---- Success return int +---@param bounds table +---@param text string +---@param active integer +---@return any active +function RL.GuiComboBox( bounds, text, active ) end + +---Text Box control, updates input text +---- Failure return nil +---- Success return boolean, string +---@param bounds table +---@param text string +---@param textSize integer +---@param editMode boolean +---@return any pressed +---@return any text +function RL.GuiTextBox( bounds, text, textSize, editMode ) end + +---Text Box control with multiple lines +---- Failure return nil +---- Success return boolean, string +---@param bounds table +---@param text string +---@param textSize integer +---@param editMode boolean +---@return any pressed +---@return any text +function RL.GuiTextBoxMulti( bounds, text, textSize, editMode ) end + +---Spinner control, returns selected value +---- Failure return nil +---- Success return boolean, int +---@param bounds table +---@param text string +---@param value integer +---@param minValue integer +---@param maxValue integer +---@param editMode boolean +---@return any pressed +---@return any value +function RL.GuiSpinner( bounds, text, value, minValue, maxValue, editMode ) end + +---Value Box control, updates input text with numbers +---- Failure return nil +---- Success return boolean, int +---@param bounds table +---@param text string +---@param value integer +---@param minValue integer +---@param maxValue integer +---@param editMode boolean +---@return any pressed +---@return any value +function RL.GuiValueBox( bounds, text, value, minValue, maxValue, editMode ) end + +---Slider control, returns selected value +---- Failure return nil +---- Success return float +---@param bounds table +---@param textLeft string +---@param textRight string +---@param value number +---@param minValue number +---@param maxValue number +---@return any value +function RL.GuiSlider( bounds, textLeft, textRight, value, minValue, maxValue ) end + +---Slider Bar control, returns selected value +---- Failure return nil +---- Success return float +---@param bounds table +---@param textLeft string +---@param textRight string +---@param value number +---@param minValue number +---@param maxValue number +---@return any value +function RL.GuiSliderBar( bounds, textLeft, textRight, value, minValue, maxValue ) end + +---Progress Bar control, shows current progress value +---- Failure return nil +---- Success return float +---@param bounds table +---@param textLeft string +---@param textRight string +---@param value number +---@param minValue number +---@param maxValue number +---@return any value +function RL.GuiProgressBar( bounds, textLeft, textRight, value, minValue, maxValue ) end + +---Scroll Bar control +---- Failure return nil +---- Success return int +---@param bounds table +---@param value integer +---@param minValue integer +---@param maxValue integer +---@return any value +function RL.GuiScrollBar( bounds, value, minValue, maxValue ) end + +---Dropdown Box control, returns selected item +---- Failure return nil +---- Success return bool, int +---@param bounds table +---@param text string +---@param active integer +---@param editMode boolean +---@return any pressed +---@return any item +function RL.GuiDropdownBox( bounds, text, active, editMode ) end + +---Status Bar control, shows info text +---- Failure return false +---- Success return true +---@param bounds table +---@param text string +---@return any success +function RL.GuiStatusBar( bounds, text ) end + +---Dummy control for placeholders +---- Failure return false +---- Success return true +---@param bounds table +---@param text string +---@return any success +function RL.GuiDummyRec( bounds, text ) end + +---Grid control, returns mouse cell position +---- Failure return false +---- Success return Vector2 +---@param bounds table +---@param text string +---@param spacing number +---@param subdivs integer +---@return any cell +function RL.GuiGrid( bounds, text, spacing, subdivs ) end + +-- Gui - Advanced + +---List View control, returns selected list item index and scroll index +---- Failure return nil +---- Success return int, int +---@param bounds table +---@param text string +---@param scrollIndex integer +---@param active integer +---@return any itemIndex +---@return any scrollIndex +function RL.GuiListView( bounds, text, scrollIndex, active ) end + +---List View with extended parameters, returns selected list item index, scroll index and focus +---- Failure return nil +---- Success return int, int, int +---@param bounds table +---@param text string +---@param focus integer +---@param scrollIndex integer +---@param active integer +---@return any itemIndex +---@return any scrollIndex +---@return any focus +function RL.GuiListViewEx( bounds, text, focus, scrollIndex, active ) end + +---Message Box control, displays a message, returns button index ( 0 is x button ) +---- Failure return false +---- Success return int +---@param bounds table +---@param title string +---@param message string +---@param buttons string +---@return any buttonIndex +function RL.GuiMessageBox( bounds, title, message, buttons ) end + +---Text Input Box control, ask for text, supports secret +---- Failure return false +---- Success return int, string, int +---@param bounds table +---@param title string +---@param message string +---@param buttons string +---@param text string +---@param textMaxSize integer +---@param secretViewActive integer +---@return any buttonIndex +---@return any text +---@return any secretViewActive +function RL.GuiTextInputBox( bounds, title, message, buttons, text, textMaxSize, secretViewActive ) end + +---Color Picker control ( multiple color controls ) +---- Failure return false +---- Success return Color +---@param bounds table +---@param text string +---@param color table +---@return any color +function RL.GuiColorPicker( bounds, text, color ) end + +---Color Panel control +---- Failure return false +---- Success return Color +---@param bounds table +---@param text string +---@param color table +---@return any color +function RL.GuiColorPanel( bounds, text, color ) end + +---Color Bar Alpha control +---- Failure return false +---- Success return float +---@param bounds table +---@param text string +---@param alpha number +---@return any alpha +function RL.GuiColorBarAlpha( bounds, text, alpha ) end + +---Color Bar Hue control +---- Failure return false +---- Success return float +---@param bounds table +---@param text string +---@param value number +---@return any hue +function RL.GuiColorBarHue( bounds, text, value ) end + +-- Gui - Icons + +---Get text with icon id prepended ( if supported ) +---- Failure return false +---- Success return string +---@param iconId integer +---@param text string +---@return any text +function RL.GuiIconText( iconId, text ) end + +---Draw icon +---- Failure return false +---- Success return true +---@param iconId integer +---@param pos table +---@param pixelSize integer +---@param color table +---@return any success +function RL.GuiDrawIcon( iconId, pos, pixelSize, color ) end + +---Set icon scale ( 1 by default ) +---- Failure return false +---- Success return true +---@param scale integer +---@return any success +function RL.GuiSetIconScale( scale ) end + +---Set icon pixel value +---- Failure return false +---- Success return true +---@param iconId integer +---@param pos table +---@return any success +function RL.GuiSetIconPixel( iconId, pos ) end + +---Clear icon pixel value +---- Failure return false +---- Success return true +---@param iconId integer +---@param pos table +---@return any success +function RL.GuiClearIconPixel( iconId, pos ) end + +---Check icon pixel value +---- Failure return nil +---- Success return bool +---@param iconId integer +---@param pos table +---@return any value +function RL.GuiCheckIconPixel( iconId, pos ) end + +-- Lights - Basics + +---Create a light and get shader locations +---- Failure return -1 +---- Success return int +---@param type integer +---@param position table +---@param target table +---@param color table +---@param shader any +---@return any light +function RL.CreateLight( type, position, target, color, shader ) end + +---Send light properties to shader +---- Failure return false +---- Success return true +---@param shader any +---@param light any +---@return any success +function RL.UpdateLightValues( shader, light ) end + +-- RLGL - General render state + +---Set the line drawing width +---- Failure return false +---- Success return true +---@param width number +---@return any success +function RL.rlSetLineWidth( width ) end + +---Get the line drawing width +---- Success return float +---@return any width +function RL.rlGetLineWidth() end + +-- Easings - Linear Easing functions + +---Ease linear +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseLinear( t, b, c, d ) end + +-- Easings - Sine Easing functions + +---Ease sine in +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseSineIn( t, b, c, d ) end + +---Ease sine out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseSineOut( t, b, c, d ) end + +---Ease sine in out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseSineInOut( t, b, c, d ) end + +-- Easings - Circular Easing functions + +---Ease circle in +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseCircIn( t, b, c, d ) end + +---Ease circle out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseCircOut( t, b, c, d ) end + +---Ease circle in out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseCircInOut( t, b, c, d ) end + +-- Easings - Cubic Easing functions + +---Ease cubic in +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseCubicIn( t, b, c, d ) end + +---Ease cubic out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseCubicOut( t, b, c, d ) end + +---Ease cubic in out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseCubicInOut( t, b, c, d ) end + +-- Easings - Quadratic Easing functions + +---Ease quadratic in +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseQuadIn( t, b, c, d ) end + +---Ease quadratic out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseQuadOut( t, b, c, d ) end + +---Ease quadratic in out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseQuadInOut( t, b, c, d ) end + +-- Easings - Exponential Easing functions + +---Ease exponential in +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseExpoIn( t, b, c, d ) end + +---Ease exponential out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseExpoOut( t, b, c, d ) end + +---Ease exponential in out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseExpoInOut( t, b, c, d ) end + +-- Easings - Back Easing functions + +---Ease back in +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseBackIn( t, b, c, d ) end + +---Ease back out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseBackOut( t, b, c, d ) end + +---Ease back in out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseBackInOut( t, b, c, d ) end + +-- Easings - Bounce Easing functions + +---Ease bounce in +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseBounceIn( t, b, c, d ) end + +---Ease bounce out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseBounceOut( t, b, c, d ) end + +---Ease bounce in out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseBounceInOut( t, b, c, d ) end + +-- Easings - Elastic Easing functions + +---Ease elastic in +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseElasticIn( t, b, c, d ) end + +---Ease elastic out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseElasticOut( t, b, c, d ) end + +---Ease elastic in out +---- Failure return false +---- Success return float +---@param t number +---@param b number +---@param c number +---@param d number +---@return any value +function RL.EaseElasticInOut( t, b, c, d ) end + diff --git a/changelog b/changelog index 297a640..95929d5 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,14 @@ +------------------------------------------------------------------------ +Release: ReiLua version 0.5.0 Using Raylib 4.2 +------------------------------------------------------------------------ +KEY CHANGES: + - CHANGED: All ReiLua global variables and functions are now stored in global RL table. + - CHANGED: All examples are now changed to use new RL table method. + - ADDED: doc_parser creates also ReiLua_API.lua that can be used in projects with Lua Language Server. + +Detailed changes: + - FIXED: uluaGetRay was looking for integers instead of tables. + ------------------------------------------------------------------------ Release: ReiLua version 0.4.0 Using Raylib 4.2 ------------------------------------------------------------------------ @@ -14,20 +25,20 @@ KEY CHANGES: - CHANGED: RL_DrawQuad3DTexture now takes vertex colors instead of just single color. Detailed changes: -ADDED: Help argument. -CHANGED: RL_rlSetLineWidth renamed to RL_rlglSetLineWidth. -CHANGED: RL_rlGetLineWidth renamed to RL_rlglGetLineWidth. -FIXED: DrawRectangleGradient V and H expecting wrong arguments. -ADDED: RL_LoadDirectoryFilesEx. -FIXED: RL_DrawLineBezierQuad was called RL_DrawLineBezier in API. -ADDED: Color lib. -FIXED: RL_DrawEllipse and RL_DrawEllipseLines expecting wrong arguments. -ADDED: RL_IsPathFile. -ADDED: RL_SetMaterialShader. -ADDED: RL_GetFileLength. -ADDED: RL_LoadFontEx. -FIXED: RL_ImageAlphaClear expecting wrong arguments. -ADDED: BLEND_ALPHA_PREMULTIPLY. -CHANGED: RL_GetWindowSize renamed to RL_GetScreenSize. -ADDED: RL_GetKeyName and RL_GetKeyScancode. GLFW Functions. -ADDED: KEY_UNKNOWN. + - ADDED: Help argument. + - CHANGED: RL_rlSetLineWidth renamed to RL_rlglSetLineWidth. + - CHANGED: RL_rlGetLineWidth renamed to RL_rlglGetLineWidth. + - FIXED: DrawRectangleGradient V and H expecting wrong arguments. + - ADDED: RL_LoadDirectoryFilesEx. + - FIXED: RL_DrawLineBezierQuad was called RL_DrawLineBezier in API. + - ADDED: Color lib. + - FIXED: RL_DrawEllipse and RL_DrawEllipseLines expecting wrong arguments. + - ADDED: RL_IsPathFile. + - ADDED: RL_SetMaterialShader. + - ADDED: RL_GetFileLength. + - ADDED: RL_LoadFontEx. + - FIXED: RL_ImageAlphaClear expecting wrong arguments. + - ADDED: BLEND_ALPHA_PREMULTIPLY. + - CHANGED: RL_GetWindowSize renamed to RL_GetScreenSize. + - ADDED: RL_GetKeyName and RL_GetKeyScancode. GLFW Functions. + - ADDED: KEY_UNKNOWN. diff --git a/devnotes b/devnotes index 27edbae..7812079 100644 --- a/devnotes +++ b/devnotes @@ -1,4 +1,5 @@ Current { + * Set RL. for the rest of the examples. } Backlog { diff --git a/doc_parser.lua b/doc_parser.lua index b7e2914..cdacb2c 100644 --- a/doc_parser.lua +++ b/doc_parser.lua @@ -1,4 +1,4 @@ ---Create api.md file from c sources. +--Create api.md and ReiLua_API.lua files from c sources. -- Export each module as separate .md file. local separate = false @@ -21,7 +21,65 @@ local function split( str, sep ) return t end -local apiFile = io.open( "API.md", "w" ) +local function getParamType( param ) + if param == "Color" or param == "Vector2" or param == "Vector3" or param == "Vector4" + or param == "Quaternion" or param == "Matrix" or param == "Rectangle" then + return "table" + elseif param == "float" then + return "number" + elseif param == "int" then + return "integer" + elseif param == "string" then + return "string" + elseif param == "bool" then + return "boolean" + else + return "any" + end +end + +local function parseFunction( line ) + local splitted = split( line, "(" ) + local parString = splitted[2]:sub(2) + parString = parString:sub( 1, #parString - 2 ) + local parameters = split( parString, "," ) + local str = "" + local parStr = "" + + for i, par in ipairs( parameters ) do + local sepPar = split( par, " " ) + parStr = parStr..sepPar[2] + str = str.."---@param "..sepPar[2].." " + str = str..getParamType( sepPar[1] ).."\n" + + if i < #parameters then + parStr = parStr..", " + end + end + + local returnsAndFuncName = split( splitted[1], "=" ) + + for i, ret in ipairs( split( returnsAndFuncName[1]:sub(3), "," ) ) do + if ret:sub( 1, 1 ) == " " then + ret = ret:sub(2) + end + + str = str.."---@return any "..ret.."\n" + end + + str = str.."function "..returnsAndFuncName[ #returnsAndFuncName ]:sub(2) + + if parStr ~= "" then + str = str.."( "..parStr.." )" + else + str = str.."()" + end + + return str.." end\n" +end + +local apiFile = io.open( "../API.md", "w" ) +local luaApiFile = io.open( "../ReiLua_API.lua", "w" ) -- Header apiFile:write( "# ReiLua API\n" ) @@ -29,24 +87,40 @@ apiFile:write( "# ReiLua API\n" ) -- Usage. apiFile:write( "\n## Usage\n" ) -apiFile:write( "\nApplication needs 'main.lua' or 'main' file as entry point. ReiLua executable will first look it from same directory. Alternatively, path to the folder where \"main.lua\" is located can be given as argument. There are three global Lua functions that the engine will call, 'init', 'process' and 'draw'.\n" ) - -apiFile:write( "\n---\n> function init()\n\ -This function will be called first when 'main.lua' is found\n\n---\n" ) -apiFile:write( "\n> function process( delta )\n\ -This function will be called every frame during execution. It will get time duration from last frame on argument 'delta'\n\n---\n" ) -apiFile:write( "\n> function draw()\n\ -This function will be called every frame after process and it should have all rendering related functions.\ -Note: Engine will call Raylib functions 'BeginDrawing()' before this function call and 'EndDrawing()' after it.\ -You can still use RL_BeginDrawing() and RL_EndDrawing() manually from anywhere.\n\n---\n" ) -apiFile:write( "\n> function log( logLevel, message )\n\ -This function can be used for custom log message handling.\n\n---\n" ) -apiFile:write( "\n> function exit()\n\ -This function will be called on program close. Cleanup could be done here.\n\n---\n" ) +apiFile:write( "\nApplication needs 'main.lua' or 'main' file as entry point. ReiLua executable will first look it from same directory. Alternatively, path to the folder where \"main.lua\" is located can be given as argument. There are five Lua functions that the framework will call, 'RL.init', 'RL.process', 'RL.draw', 'RL.log' and 'RL.exit'.\n" ) + +local FUNC_DESC = { + init = "This function will be called first when 'main.lua' is found", + process = "This function will be called every frame during execution. It will get time duration from last frame on argument 'delta'", + draw = "This function will be called every frame after process and it should have all rendering related functions. Note: Engine will call Raylib functions 'BeginDrawing()' before this function call and 'EndDrawing()' after it. You can still use RL.BeginDrawing() and RL.EndDrawing() manually from anywhere.", + log = "This function can be used for custom log message handling.", + exit = "This function will be called on program close. Cleanup could be done here.", +} + +apiFile:write( "\n---\n> function RL.init()\n\n"..FUNC_DESC.init.."\n\n---\n" ) +apiFile:write( "\n> function RL.process( delta )\n\n"..FUNC_DESC.process.."\n\n---\n" ) +apiFile:write( "\n> function RL.draw()\n\n"..FUNC_DESC.draw.."\n\n---\n" ) +apiFile:write( "\n> function RL.log( logLevel, message )\n\n"..FUNC_DESC.log.."\n\n---\n" ) +apiFile:write( "\n> function RL.exit()\n\n"..FUNC_DESC.exit.."\n\n---\n" ) + +luaApiFile:write( "-- Put this file into your project folder to provide annotations when using Lua language server.\n\n" ) +luaApiFile:write( "RL={}\n\n" ) +luaApiFile:write( "-- Functions.\n\n" ) + +luaApiFile:write( +"---"..FUNC_DESC.init.."\nfunction RL.init() end\n" ) +luaApiFile:write( +"---"..FUNC_DESC.process.."\n---@param delta number\nfunction RL.process( delta ) end\n" ) +luaApiFile:write( +"---"..FUNC_DESC.draw.."\nfunction RL.draw() end\n" ) +luaApiFile:write( +"---"..FUNC_DESC.log.."\n---@param logLevel integer\n---@param message string\nfunction RL.log( logLevel, message ) end\n" ) +luaApiFile:write( +"---"..FUNC_DESC.exit.."\nfunction RL.exit() end\n" ) -- Globals. -local srcFile = io.open( "src/lua_core.c", "r" ) +local srcFile = io.open( "../src/lua_core.c", "r" ) local writing = false repeat @@ -61,9 +135,26 @@ repeat if writing then if lineSplit[1] == "\t/*" then apiFile:write( "\n## Globals - "..lineSplit[2].."\n" ) + luaApiFile:write( "\n-- Globals - "..lineSplit[2].."\n\n" ) else -- Remove comma from the end. - apiFile:write( "\n"..lineSplit[2]:sub( 1, -2 ).."\n" ) + local globalName = lineSplit[2]:sub( 1, -2 ) + + apiFile:write( "\n"..globalName.."\n" ) + local value = RL[ globalName ] + + globalName = "RL."..globalName + + if value == nil then + luaApiFile:write( globalName.."=nil\n" ) + elseif type( value ) == "table" then + -- All tables are colors. + luaApiFile:write( globalName.."={" + ..math.tointeger( value[1] )..","..math.tointeger( value[2] ).."," + ..math.tointeger( value[3] )..","..math.tointeger( value[4] ).."}\n" ) + else + luaApiFile:write( globalName.."="..value.."\n" ) + end end end @@ -172,8 +263,9 @@ local sourceFiles = { } for _, src in ipairs( sourceFiles ) do - srcFile = io.open( "src/"..src..".c", "r" ) + srcFile = io.open( "../src/"..src..".c", "r" ) local line = "" + local funcStr = "" local p = false if separate then @@ -186,12 +278,22 @@ for _, src in ipairs( sourceFiles ) do if line == "*/" then p = false apiFile:write( "\n---\n" ) + luaApiFile:write( funcStr.."\n" ) + funcStr = "" end - + if p then apiFile:write( line.."\n" ) + + if line:sub( 1, 2 ) == "##" then + luaApiFile:write( "-- "..line:sub( 4 ).."\n" ) + elseif line:sub( 1, 1 ) == ">" then + funcStr = parseFunction( line ) + elseif line:sub( 1, 1 ) ~= "" then + luaApiFile:write( "---"..line.."\n" ) + end end - + if line == "/*" then p = true apiFile:write( "\n" ) diff --git a/examples/2D_camera/main.lua b/examples/2D_camera/main.lua index b23d606..c47ba18 100644 --- a/examples/2D_camera/main.lua +++ b/examples/2D_camera/main.lua @@ -7,62 +7,62 @@ local cameraSpeed = 100.0 local cameraRotSpeed = 100.0 local cameraZoomSpeed = 10.0 -function init() +function RL.init() local monitor = 0 - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - local winSize = RL_GetScreenSize() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + local winSize = RL.GetScreenSize() - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - RL_SetWindowTitle( "Camera 2D" ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowTitle( "Camera 2D" ) - tileTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/tiles.png" ) - camera = RL_CreateCamera2D() - RL_SetCamera2DOffset( camera, { winSize[1] / 2, winSize[2] / 2 } ) + tileTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/tiles.png" ) + camera = RL.CreateCamera2D() + RL.SetCamera2DOffset( camera, { winSize[1] / 2, winSize[2] / 2 } ) end -function process( delta ) +function RL.process( delta ) -- Move. - if RL_IsKeyDown( KEY_RIGHT ) then + if RL.IsKeyDown( RL.KEY_RIGHT ) then cameraPos[1] = cameraPos[1] + cameraSpeed * delta - elseif RL_IsKeyDown( KEY_LEFT ) then + elseif RL.IsKeyDown( RL.KEY_LEFT ) then cameraPos[1] = cameraPos[1] - cameraSpeed * delta end - if RL_IsKeyDown( KEY_DOWN ) then + if RL.IsKeyDown( RL.KEY_DOWN ) then cameraPos[2] = cameraPos[2] + cameraSpeed * delta - elseif RL_IsKeyDown( KEY_UP ) then + elseif RL.IsKeyDown( RL.KEY_UP ) then cameraPos[2] = cameraPos[2] - cameraSpeed * delta end -- Rotate. - if RL_IsKeyDown( string.byte( "E" ) ) then -- Or RL_IsKeyDown( KEY_E ) + if RL.IsKeyDown( string.byte( "E" ) ) then -- Or RL.IsKeyDown( KEY_E ) cameraRot = cameraRot + cameraRotSpeed * delta - elseif RL_IsKeyDown( string.byte( "Q" ) ) then + elseif RL.IsKeyDown( string.byte( "Q" ) ) then cameraRot = cameraRot - cameraRotSpeed * delta end -- Zoom. - if RL_IsKeyDown( string.byte( "R" ) ) then + if RL.IsKeyDown( string.byte( "R" ) ) then cameraZoom = cameraZoom + cameraZoomSpeed * delta - elseif RL_IsKeyDown( string.byte( "F" ) ) then + elseif RL.IsKeyDown( string.byte( "F" ) ) then cameraZoom = cameraZoom - cameraZoomSpeed * delta end end -function draw() - RL_ClearBackground( RAYWHITE ) - RL_SetCamera2DTarget( camera, cameraPos ) - RL_SetCamera2DRotation( camera, cameraRot ) - RL_SetCamera2DZoom( camera, cameraZoom ) +function RL.draw() + RL.ClearBackground( RL.RAYWHITE ) + RL.SetCamera2DTarget( camera, cameraPos ) + RL.SetCamera2DRotation( camera, cameraRot ) + RL.SetCamera2DZoom( camera, cameraZoom ) - RL_BeginMode2D( camera ) + RL.BeginMode2D( camera ) -- Draw wall. for y = 0, 4 do for x = 0, 6 do - RL_DrawTextureRec( tileTexture, { 0, 0, 32, 32 }, { x * 32, y * 32 }, WHITE ) + RL.DrawTextureRec( tileTexture, { 0, 0, 32, 32 }, { x * 32, y * 32 }, RL.WHITE ) end end -- Draw hero. - RL_DrawTextureRec( tileTexture, { 3 * 32, 0, 32, 32 }, { cameraPos[1] - 16, cameraPos[2] - 16 }, WHITE ) - RL_EndMode2D() + RL.DrawTextureRec( tileTexture, { 3 * 32, 0, 32, 32 }, { cameraPos[1] - 16, cameraPos[2] - 16 }, RL.WHITE ) + RL.EndMode2D() end diff --git a/examples/ReiLuaGui_examples/calculator.lua b/examples/ReiLuaGui_examples/calculator.lua index 6f2023b..964763e 100644 --- a/examples/ReiLuaGui_examples/calculator.lua +++ b/examples/ReiLuaGui_examples/calculator.lua @@ -20,7 +20,7 @@ function Calculator:new( pos ) padding = 10, onClicked = function() object:set2Top() - object.dragPos = Vec2:new( RL_GetMousePosition() ) - Vec2:new( object.handle.bounds.x, object.handle.bounds.y ) + object.dragPos = Vec2:new( RL.GetMousePosition() ) - Vec2:new( object.handle.bounds.x, object.handle.bounds.y ) Gui.heldCallback = function() object:drag() end end, } ) @@ -30,7 +30,7 @@ function Calculator:new( pos ) texture = bgrTexture, HAling = Gui.ALING.CENTER, VAling = Gui.ALING.CENTER, - color = Color:new( LIGHTGRAY ), + color = Color:new( RL.LIGHTGRAY ), } ) ) object.handle:add( Gui.texture:new( { @@ -38,8 +38,8 @@ function Calculator:new( pos ) texture = borderTexture, HAling = Gui.ALING.CENTER, VAling = Gui.ALING.CENTER, - color = Color:new( LIGHTGRAY ), - nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = NPATCH_NINE_PATCH }, + color = Color:new( RL.LIGHTGRAY ), + nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = RL.NPATCH_NINE_PATCH }, } ) ) object.handle:add( Gui.text:new( { text = "Calculator", fontSize = 20, VAling = Gui.ALING.CENTER } ) ) @@ -51,8 +51,8 @@ function Calculator:new( pos ) onClicked = function() object:setVisible( false ) end, - onMouseOver = function( self ) self.items[1].color = Color:new( WHITE ) end, - notMouseOver = function( self ) self.items[1].color = Color:new( BLACK ) end, + onMouseOver = function( self ) self.items[1].color = Color:new( RL.WHITE ) end, + notMouseOver = function( self ) self.items[1].color = Color:new( RL.BLACK ) end, } ) object.closeButton:add( Gui.texture:new( { @@ -73,7 +73,7 @@ function Calculator:new( pos ) texture = bgrTexture, HAling = Gui.ALING.CENTER, VAling = Gui.ALING.CENTER, - color = Color:new( GRAY ), + color = Color:new( RL.GRAY ), } ) ) object.panel:add( Gui.texture:new( { @@ -81,8 +81,8 @@ function Calculator:new( pos ) texture = borderTexture, HAling = Gui.ALING.CENTER, VAling = Gui.ALING.CENTER, - color = Color:new( LIGHTGRAY ), - nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = NPATCH_NINE_PATCH }, + color = Color:new( RL.LIGHTGRAY ), + nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = RL.NPATCH_NINE_PATCH }, } ) ) -- Display. @@ -91,13 +91,13 @@ function Calculator:new( pos ) bounds = Rect:new( 0, 0, object.windowRect.width - 16, object.DISPLAY_HIGHT ), padding = 10, drawBounds = true, - color = Color:new( WHITE ) + color = Color:new( RL.WHITE ) } ) object.display:add( Gui.text:new( { text = "", fontSize = 30, VAling = Gui.ALING.CENTER, maxTextLen = 8 } ) ) -- Buttons. - + local buttonStrings = { "7", "8", "9", "/", "4", "5", "6", "*", "1", "2", "3", "-", "0", "C", "=", "+" } object.buttons = {} @@ -108,8 +108,8 @@ function Calculator:new( pos ) table.insert( object.buttons, Gui.element:new( { bounds = Rect:new( 0, 0, 40, 32 ), drawBounds = true, - onMouseOver = function( self ) self.color = Color:new( WHITE ) end, - notMouseOver = function( self ) self.color = Color:new( LIGHTGRAY ) end, + onMouseOver = function( self ) self.color = Color:new( RL.WHITE ) end, + notMouseOver = function( self ) self.color = Color:new( RL.LIGHTGRAY ) end, } ) ) object.buttons[ #object.buttons ].pos = Vec2:new( 8 + x * 46, object.HANDLE_HIGHT + object.DISPLAY_HIGHT + 16 + y * 38 ) @@ -161,7 +161,7 @@ function Calculator:setPosition( pos ) end function Calculator:drag() - local mousePos = Vec2:new( RL_GetMousePosition() ) + local mousePos = Vec2:new( RL.GetMousePosition() ) local winPos = Vec2:new( self.handle.bounds.x, self.handle.bounds.y ) self:setPosition( mousePos - self.dragPos ) @@ -173,13 +173,13 @@ function Calculator:setVisible( visible ) self.closeButton.visible = visible self.closeButton.disabled = not visible - + self.panel.visible = visible self.panel.disabled = not visible self.display.visible = visible self.display.disabled = not visible - + for _, button in ipairs( self.buttons ) do button.visible = visible button.disabled = not visible @@ -188,7 +188,7 @@ end function Calculator:set2Top() self.panel:set2Top() - + for _, button in ipairs( self.buttons ) do button:set2Top() end diff --git a/examples/ReiLuaGui_examples/file_explorer.lua b/examples/ReiLuaGui_examples/file_explorer.lua index 7ead361..72f6117 100644 --- a/examples/ReiLuaGui_examples/file_explorer.lua +++ b/examples/ReiLuaGui_examples/file_explorer.lua @@ -20,7 +20,7 @@ function FileExplorer:new( pos ) padding = 10, onClicked = function() object:set2Top() - object.dragPos = Vec2:new( RL_GetMousePosition() ) - Vec2:new( object.handle.bounds.x, object.handle.bounds.y ) + object.dragPos = Vec2:new( RL.GetMousePosition() ) - Vec2:new( object.handle.bounds.x, object.handle.bounds.y ) Gui.heldCallback = function() object:drag() end end, } ) @@ -30,16 +30,16 @@ function FileExplorer:new( pos ) texture = bgrTexture, HAling = Gui.ALING.CENTER, VAling = Gui.ALING.CENTER, - color = Color:new( LIGHTGRAY ), + color = Color:new( RL.LIGHTGRAY ), } ) ) - + object.handle:add( Gui.texture:new( { bounds = object.handle.bounds:clone(), texture = borderTexture, HAling = Gui.ALING.CENTER, VAling = Gui.ALING.CENTER, - color = Color:new( LIGHTGRAY ), - nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = NPATCH_NINE_PATCH }, + color = Color:new( RL.LIGHTGRAY ), + nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = RL.NPATCH_NINE_PATCH }, } ) ) object.handle:add( Gui.text:new( { text = "File Explorer", fontSize = 20, VAling = Gui.ALING.CENTER } ) ) @@ -51,8 +51,8 @@ function FileExplorer:new( pos ) onClicked = function() object:setVisible( false ) end, - onMouseOver = function( self ) self.items[1].color = Color:new( WHITE ) end, - notMouseOver = function( self ) self.items[1].color = Color:new( BLACK ) end, + onMouseOver = function( self ) self.items[1].color = Color:new( RL.WHITE ) end, + notMouseOver = function( self ) self.items[1].color = Color:new( RL.BLACK ) end, } ) object.closeButton:add( Gui.texture:new( { @@ -73,7 +73,7 @@ function FileExplorer:new( pos ) texture = bgrTexture, HAling = Gui.ALING.CENTER, VAling = Gui.ALING.CENTER, - color = Color:new( GRAY ), + color = Color:new( RL.GRAY ), } ) ) object.panel:add( Gui.texture:new( { @@ -81,8 +81,8 @@ function FileExplorer:new( pos ) texture = borderTexture, HAling = Gui.ALING.CENTER, VAling = Gui.ALING.CENTER, - color = Color:new( LIGHTGRAY ), - nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = NPATCH_NINE_PATCH }, + color = Color:new( RL.LIGHTGRAY ), + nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = RL.NPATCH_NINE_PATCH }, } ) ) -- Path. @@ -90,7 +90,7 @@ function FileExplorer:new( pos ) object.pathBox = Gui.element:new( { bounds = Rect:new( 0, 0, object.windowRect.width - 16 - 64, object.HANDLE_HIGHT ), drawBounds = true, - color = Color:new( WHITE ), + color = Color:new( RL.WHITE ), -- onClicked = function() Gui.setInputFocus( object.pathBox ) end, -- inputFocus = function() object.pathBox.color = Color:new( BLUE ) end, -- inputUnfocus = function() object.pathBox.color = Color:new( WHITE ) end, @@ -103,8 +103,8 @@ function FileExplorer:new( pos ) object.backButton = Gui.element:new( { bounds = Rect:new( 0, 0, 56, object.HANDLE_HIGHT ), drawBounds = true, - onMouseOver = function( self ) self.color = Color:new( WHITE ) end, - notMouseOver = function( self ) self.color = Color:new( LIGHTGRAY ) end, + onMouseOver = function( self ) self.color = Color:new( RL.WHITE ) end, + notMouseOver = function( self ) self.color = Color:new( RL.LIGHTGRAY ) end, onClicked = function() object:backDir() end, } ) @@ -112,7 +112,7 @@ function FileExplorer:new( pos ) bounds = Rect:new( 0, 0, object.HANDLE_HIGHT, object.HANDLE_HIGHT ), texture = backTexture, HAling = Gui.ALING.CENTER, - color = Color:new( BLACK ) + color = Color:new( RL.BLACK ) } ) ) -- Files. @@ -130,7 +130,7 @@ function FileExplorer:new( pos ) object.fileName = Gui.element:new( { bounds = Rect:new( 0, 0, object.windowRect.width - 16 - 70, object.HANDLE_HIGHT ), drawBounds = true, - color = Color:new( WHITE ), + color = Color:new( RL.WHITE ), } ) object.fileName:add( Gui.text:new( { text = "", maxTextLen = 32, allowLineBreak = false, VAling = Gui.ALING.CENTER } ) ) @@ -140,18 +140,18 @@ function FileExplorer:new( pos ) object.openButton = Gui.element:new( { bounds = Rect:new( 0, 0, 64, object.HANDLE_HIGHT ), drawBounds = true, - color = Color:new( WHITE ), + color = Color:new( RL.WHITE ), onClicked = function() object:openFile() end, - onMouseOver = function( self ) self.color = Color:new( WHITE ) end, - notMouseOver = function( self ) self.color = Color:new( LIGHTGRAY ) end, + onMouseOver = function( self ) self.color = Color:new( RL.WHITE ) end, + notMouseOver = function( self ) self.color = Color:new( RL.LIGHTGRAY ) end, } ) object.openButton:add( Gui.text:new( { text = "Open", VAling = Gui.ALING.CENTER, HAling = Gui.ALING.CENTER } ) ) -- Variables. - object.path = RL_GetBasePath() - + object.path = RL.GetBasePath() + -- Take last '/' away. if util.utf8Sub( object.path, utf8.len( object.path ), utf8.len( object.path ) ) == "/" then object.path = util.utf8Sub( object.path, 1, utf8.len( object.path ) - 1 ) @@ -189,7 +189,7 @@ function FileExplorer:changeDir( path ) end function FileExplorer:backDir() - self.path = RL_GetPrevDirectoryPath( self.path ) + self.path = RL.GetPrevDirectoryPath( self.path ) self:updatePath() end @@ -197,11 +197,11 @@ end function FileExplorer:fileSelect( file ) self.file = file - self.fileName.items[1]:set( RL_GetFileName( file ) ) + self.fileName.items[1]:set( RL.GetFileName( file ) ) end function FileExplorer:openFile() - print( self.file, RL_GetFileLength( self.file ) ) + print( self.file, RL.GetFileLength( self.file ) ) end function FileExplorer:updateFiles() @@ -216,8 +216,8 @@ function FileExplorer:updateFiles() local files = {} local folders = {} - for _, file in ipairs( RL_LoadDirectoryFiles( self.path ) ) do - if RL_IsPathFile( file ) then + for _, file in ipairs( RL.LoadDirectoryFiles( self.path ) ) do + if RL.IsPathFile( file ) then table.insert( files, file ) else table.insert( folders, file ) @@ -232,7 +232,7 @@ function FileExplorer:updateFiles() end for _, file in ipairs( files ) do - self:addFileToList( file, filesTexture, WHITE, function() self:fileSelect( file ) end ) + self:addFileToList( file, filesTexture, RL.WHITE, function() self:fileSelect( file ) end ) end end @@ -247,7 +247,7 @@ function FileExplorer:addFileToList( file, texture, color, func ) element:add( Gui.text:new( { bounds = Rect:new( 28, 0, 20, 20 ), - text = RL_GetFileName( file ), + text = RL.GetFileName( file ), fontSize = 20, HAling = Gui.ALING.NONE, VAling = Gui.ALING.CENTER, @@ -264,7 +264,7 @@ function FileExplorer:addFileToList( file, texture, color, func ) end function FileExplorer:drag() - local mousePos = Vec2:new( RL_GetMousePosition() ) + local mousePos = Vec2:new( RL.GetMousePosition() ) local winPos = Vec2:new( self.handle.bounds.x, self.handle.bounds.y ) self:setPosition( mousePos - self.dragPos ) diff --git a/examples/ReiLuaGui_examples/main.lua b/examples/ReiLuaGui_examples/main.lua index f67e27f..29dace8 100644 --- a/examples/ReiLuaGui_examples/main.lua +++ b/examples/ReiLuaGui_examples/main.lua @@ -1,5 +1,5 @@ -package.path = package.path..";"..RL_GetBasePath().."?.lua" -package.path = package.path..";"..RL_GetBasePath().."../resources/lib/?.lua" +package.path = package.path..";"..RL.GetBasePath().."?.lua" +package.path = package.path..";"..RL.GetBasePath().."../resources/lib/?.lua" util = require( "utillib" ) Vec2 = require( "vector2" ) @@ -13,29 +13,29 @@ FileExplorer = require( "file_explorer" ) -- Textures. -- Note that textures are global. -cancelTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/cancel.png" ) -backTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/previous-button.png" ) -folderTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/open-folder.png" ) -filesTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/files.png" ) -borderTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/ui_border.png" ) -bgrTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/ui_bgr.png" ) - -RL_GenTextureMipmaps( cancelTexture ) -RL_GenTextureMipmaps( backTexture ) -RL_GenTextureMipmaps( folderTexture ) -RL_GenTextureMipmaps( filesTexture ) -RL_GenTextureMipmaps( borderTexture ) -RL_GenTextureMipmaps( bgrTexture ) - -RL_SetTextureFilter( cancelTexture, TEXTURE_FILTER_TRILINEAR ) -RL_SetTextureFilter( backTexture, TEXTURE_FILTER_TRILINEAR ) -RL_SetTextureFilter( folderTexture, TEXTURE_FILTER_TRILINEAR ) -RL_SetTextureFilter( filesTexture, TEXTURE_FILTER_TRILINEAR ) -RL_SetTextureFilter( borderTexture, TEXTURE_FILTER_TRILINEAR ) -RL_SetTextureFilter( bgrTexture, TEXTURE_FILTER_TRILINEAR ) - -RL_SetTextureWrap( borderTexture, TEXTURE_WRAP_REPEAT ) -RL_SetTextureWrap( bgrTexture, TEXTURE_WRAP_REPEAT ) +cancelTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/cancel.png" ) +backTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/previous-button.png" ) +folderTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/open-folder.png" ) +filesTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/files.png" ) +borderTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/ui_border.png" ) +bgrTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/ui_bgr.png" ) + +RL.GenTextureMipmaps( cancelTexture ) +RL.GenTextureMipmaps( backTexture ) +RL.GenTextureMipmaps( folderTexture ) +RL.GenTextureMipmaps( filesTexture ) +RL.GenTextureMipmaps( borderTexture ) +RL.GenTextureMipmaps( bgrTexture ) + +RL.SetTextureFilter( cancelTexture, RL.TEXTURE_FILTER_TRILINEAR ) +RL.SetTextureFilter( backTexture, RL.TEXTURE_FILTER_TRILINEAR ) +RL.SetTextureFilter( folderTexture, RL.TEXTURE_FILTER_TRILINEAR ) +RL.SetTextureFilter( filesTexture, RL.TEXTURE_FILTER_TRILINEAR ) +RL.SetTextureFilter( borderTexture, RL.TEXTURE_FILTER_TRILINEAR ) +RL.SetTextureFilter( bgrTexture, RL.TEXTURE_FILTER_TRILINEAR ) + +RL.SetTextureWrap( borderTexture, RL.TEXTURE_WRAP_REPEAT ) +RL.SetTextureWrap( bgrTexture, RL.TEXTURE_WRAP_REPEAT ) -- End of calculator definition. @@ -51,8 +51,8 @@ function initGui() calculator:setVisible( true ) fileExplorer:setVisible( true ) end, - onMouseOver = function( self ) self.color = Color:new( LIGHTGRAY ) end, - notMouseOver = function( self ) self.color = Color:new( GRAY ) end, + onMouseOver = function( self ) self.color = Color:new( RL.LIGHTGRAY ) end, + notMouseOver = function( self ) self.color = Color:new( RL.GRAY ) end, } ) showButton:add( Gui.text:new( { text = "Show", VAling = Gui.ALING.CENTER, HAling = Gui.ALING.CENTER } ) ) @@ -61,27 +61,27 @@ function initGui() fileExplorer = FileExplorer:new( Vec2:new( 280, 96 ) ) end -function init() +function RL.init() local monitor = 0 - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - winSize = RL_GetScreenSize() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + winSize = RL.GetScreenSize() - RL_SetWindowTitle( "ReiLuaGui examples" ) - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowSize( winSize ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowTitle( "ReiLuaGui examples" ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowSize( winSize ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) initGui() end -function process( delta ) - Gui.process( Vec2:new( RL_GetMousePosition() ) ) +function RL.process( delta ) + Gui.process( Vec2:new( RL.GetMousePosition() ) ) end -function draw() - RL_ClearBackground( RAYWHITE ) +function RL.draw() + RL.ClearBackground( RL.RAYWHITE ) Gui.draw() end diff --git a/examples/ReiLuaGui_test/main.lua b/examples/ReiLuaGui_test/main.lua index b36a7da..8ea6563 100644 --- a/examples/ReiLuaGui_test/main.lua +++ b/examples/ReiLuaGui_test/main.lua @@ -1,4 +1,4 @@ -package.path = package.path..";"..RL_GetBasePath().."../resources/lib/?.lua" +package.path = package.path..";"..RL.GetBasePath().."../resources/lib/?.lua" util = require( "utillib" ) Vec2 = require( "vector2" ) @@ -7,16 +7,16 @@ Color = require( "color" ) Gui = require( "gui" ) local container = {} --- local circleTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/circle.png" ) -local circleTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/plain-circle.png" ) -local checkTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/check-mark.png" ) -local borderTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/ui_border.png" ) +-- local circleTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/circle.png" ) +local circleTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/plain-circle.png" ) +local checkTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/check-mark.png" ) +local borderTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/ui_border.png" ) local textInput -RL_GenTextureMipmaps( circleTexture ) -RL_GenTextureMipmaps( checkTexture ) -RL_SetTextureFilter( circleTexture, TEXTURE_FILTER_TRILINEAR ) -RL_SetTextureFilter( checkTexture, TEXTURE_FILTER_TRILINEAR ) +RL.GenTextureMipmaps( circleTexture ) +RL.GenTextureMipmaps( checkTexture ) +RL.SetTextureFilter( circleTexture, RL.TEXTURE_FILTER_TRILINEAR ) +RL.SetTextureFilter( checkTexture, RL.TEXTURE_FILTER_TRILINEAR ) function initGui() -- local label = Gui.label:new( { text = "Dog", bounds = { 32, 32, 96, 96 }, drawBounds = true, Haling = Gui.ALING.CENTER, Valing = Gui.ALING.TOP } ) @@ -45,8 +45,8 @@ function initGui() local dog = Gui.element:new( { bounds = Rect:new( 0, 0, 128, 36 ), onClicked = function() panel:setPosition( Vec2:new( 290, 120 ) ) end, - onMouseOver = function( self ) self.items[1].color = RED end, - notMouseOver = function( self ) self.items[1].color = BLACK end, + onMouseOver = function( self ) self.items[1].color = RL.RED end, + notMouseOver = function( self ) self.items[1].color = RL.BLACK end, drawBounds = true, } ) @@ -58,7 +58,7 @@ function initGui() HAling = Gui.ALING.CENTER, VAling = Gui.ALING.CENTER, visible = true, - nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = NPATCH_NINE_PATCH }, + nPatchInfo = { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = RL.NPATCH_NINE_PATCH }, } ) ) dog:add( Gui.texture:new( { bounds = Rect:new( 0, 0, 24, 24 ), texture = circleTexture, HAling = Gui.ALING.RIGHT, color = Color:new( 150, 150, 255 ) } ) ) @@ -81,8 +81,8 @@ function initGui() local element = Gui.element:new( { bounds = Rect:new( 0, 0, 120, 30 ), onClicked = function() panel:setPosition( Vec2:new( 340, 380 ) ) end, - onMouseOver = function( self ) self.color = Color:new( DARKBLUE ) end, - notMouseOver = function( self ) self.color = Color:new( LIGHTGRAY ) end, + onMouseOver = function( self ) self.color = Color:new( RL.DARKBLUE ) end, + notMouseOver = function( self ) self.color = Color:new( RL.LIGHTGRAY ) end, drawBounds = true, } ) @@ -97,18 +97,18 @@ function initGui() local element = Gui.element:new( { bounds = itemBounds:clone(), - onMouseOver = function( self ) self.color = Color:new( DARKBLUE ) end, - notMouseOver = function( self ) self.color = Color:new( LIGHTGRAY ) end, + onMouseOver = function( self ) self.color = Color:new( RL.DARKBLUE ) end, + notMouseOver = function( self ) self.color = Color:new( RL.LIGHTGRAY ) end, drawBounds = true, } ) element:add( Gui.text:new( { text = "Dog" } ) ) container2:add( element ) - + element = Gui.element:new( { bounds = Rect:new( 0, 0, 78, 24 ), -- bounds = Rect:new( 0, 0, 78, 64 ), - onMouseOver = function( self ) self.color = Color:new( DARKBLUE ) end, - notMouseOver = function( self ) self.color = Color:new( LIGHTGRAY ) end, + onMouseOver = function( self ) self.color = Color:new( RL.DARKBLUE ) end, + notMouseOver = function( self ) self.color = Color:new( RL.LIGHTGRAY ) end, drawBounds = true, } ) element:add( Gui.text:new( { text = "Cat" } ) ) @@ -123,39 +123,38 @@ function initGui() textInput = Gui.element:new( { bounds = Rect:new( 64, 360, 300, 32 ), drawBounds = true, - color = Color:new( LIGHTGRAY ), + color = Color:new( RL.LIGHTGRAY ), onClicked = function() Gui.setInputFocus( textInput ) end, - inputFocus = function() textInput.color = Color:new( BLUE ) end, + inputFocus = function() textInput.color = Color:new( RL.BLUE ) end, -- inputFocus = function() container:delete() end, -- inputFocus = function() panel:set2Back() end, - inputUnfocus = function() textInput.color = Color:new( LIGHTGRAY ) end, + inputUnfocus = function() textInput.color = Color:new( RL.LIGHTGRAY ) end, } ) textInput:add( Gui.text:new( { text = "", maxTextLen = 16, allowLineBreak = false } ) ) end -function init() +function RL.init() local monitor = 0 - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - winSize = RL_GetScreenSize() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + winSize = RL.GetScreenSize() - RL_SetWindowTitle( "ReiLuaGui Test" ) - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowSize( winSize ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowTitle( "ReiLuaGui Test" ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowSize( winSize ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) initGui() end -function process( delta ) - Gui.process( Vec2:new( RL_GetMousePosition() ) ) +function RL.process( delta ) + Gui.process( Vec2:new( RL.GetMousePosition() ) ) end -function draw() - RL_ClearBackground( RAYWHITE ) +function RL.draw() + RL.ClearBackground( RL.RAYWHITE ) Gui.draw() - RL_DrawText( 0, "Work in progress GuiLib test.", { 10, 10 }, 30, 4, BLACK ) end diff --git a/examples/bunnymark/main.lua b/examples/bunnymark/main.lua index 52f8393..06ab5d6 100644 --- a/examples/bunnymark/main.lua +++ b/examples/bunnymark/main.lua @@ -42,23 +42,23 @@ function Bunny:update() end end -function init() - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowSize( { screenWidth, screenHeight } ) - RL_SetWindowTitle( "raylib [textures] example - bunnymark" ) +function RL.init() + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowSize( { screenWidth, screenHeight } ) + RL.SetWindowTitle( "raylib [textures] example - bunnymark" ) -- Load bunny texture - texBunny = RL_LoadTexture( RL_GetBasePath().."../resources/images/wabbit_alpha.png" ) - texSize = RL_GetTextureSize( texBunny ) + texBunny = RL.LoadTexture( RL.GetBasePath().."../resources/images/wabbit_alpha.png" ) + texSize = RL.GetTextureSize( texBunny ) end -function process( delta ) - if RL_IsMouseButtonDown( 0 ) then +function RL.process( delta ) + if RL.IsMouseButtonDown( 0 ) then -- Create more bunnies for i = 1, 100 do if #bunnies < MAX_BUNNIES then local speed = { math.random( -250, 250 ) / 60, math.random( -250, 250 ) / 60 } local color = { math.random( 50, 240 ), math.random( 80, 240 ), math.random( 100, 240 ), 255 } - table.insert( bunnies, Bunny:new( RL_GetMousePosition(), speed, color ) ) + table.insert( bunnies, Bunny:new( RL.GetMousePosition(), speed, color ) ) end end end @@ -68,8 +68,8 @@ function process( delta ) end end -function draw() - RL_ClearBackground( RAYWHITE ) +function RL.draw() + RL.ClearBackground( RL.RAYWHITE ) for _, bunny in ipairs( bunnies ) do -- NOTE: When internal batch buffer limit is reached (MAX_BATCH_ELEMENTS), @@ -78,11 +78,11 @@ function draw() -- Process of sending data is costly and it could happen that GPU data has not been completely -- processed for drawing while new data is tried to be sent (updating current in-use buffers) -- it could generates a stall and consequently a frame drop, limiting the number of drawn bunnies - RL_DrawTexture( texBunny, { bunny.position[1], bunny.position[2] }, bunny.color ) + RL.DrawTexture( texBunny, { bunny.position[1], bunny.position[2] }, bunny.color ) end - RL_DrawRectangle( { 0, 0, screenWidth, 40 }, BLACK) - RL_DrawText( 0, "bunnies: " .. #bunnies, { 120, 10 }, 20, 2, GREEN ) - RL_DrawText( 0, "batched draw calls: " .. math.ceil( 1 + #bunnies / MAX_BATCH_ELEMENTS ), { 320, 10 }, 20, 2, RED ) - RL_DrawFPS( { 10, 10 } ) + RL.DrawRectangle( { 0, 0, screenWidth, 40 }, RL.BLACK) + RL.DrawText( 0, "bunnies: " .. #bunnies, { 120, 10 }, 20, 2, RL.GREEN ) + RL.DrawText( 0, "batched draw calls: " .. math.ceil( 1 + #bunnies / MAX_BATCH_ELEMENTS ), { 320, 10 }, 20, 2, RL.RED ) + RL.DrawFPS( { 10, 10 } ) end diff --git a/examples/dungeon_crawler/main.lua b/examples/dungeon_crawler/main.lua index e1342ec..8732b0d 100644 --- a/examples/dungeon_crawler/main.lua +++ b/examples/dungeon_crawler/main.lua @@ -4,12 +4,12 @@ local camera = -1 local texture = -1 local textureSize = { 256, 96 } local res = { 384, 216 } -local winSize = RL_GetScreenSize() +local winSize = RL.GetScreenSize() local winScale = 4 local framebuffer = -1 local TILE_SIZE = 32 -local TILE_VERTEX_COLORS = { WHITE, WHITE, WHITE, WHITE } +local TILE_VERTEX_COLORS = { RL.WHITE, RL.WHITE, RL.WHITE, RL.WHITE } local FLOOR = 1 local CEILING = 2 @@ -51,38 +51,37 @@ local function getTileVer( x, y, type ) return verts end -function drawSprites() +local function drawSprites() for _, sprite in ipairs( sprites ) do - sprite.dis = RL_Vector2Distance( { pos[1], pos[3] }, { sprite.pos[1], sprite.pos[2] } ) + sprite.dis = RL.Vector2Distance( { pos[1], pos[3] }, { sprite.pos[1], sprite.pos[2] } ) end - + table.sort( sprites, function( a, b ) return a.dis > b.dis end ) for _, sprite in ipairs( sprites ) do - RL_DrawBillboardRec( camera, texture, { sprite.tile[1] * TILE_SIZE, sprite.tile[2] * TILE_SIZE, TILE_SIZE, TILE_SIZE }, - { sprite.pos[1], 0.5 * sprite.size, sprite.pos[2] }, { sprite.size, sprite.size }, WHITE ) + RL.DrawBillboardRec( camera, texture, { sprite.tile[1] * TILE_SIZE, sprite.tile[2] * TILE_SIZE, TILE_SIZE, TILE_SIZE }, + { sprite.pos[1], 0.5 * sprite.size, sprite.pos[2] }, { sprite.size, sprite.size }, RL.WHITE ) end end -function init() +function RL.init() local monitor = 0 - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) winSize = { res[1] * winScale, res[2] * winScale } - RL_SetWindowSize( winSize ) - RL_SetExitKey( KEY_ESCAPE ) - -- framebuffer = RL_LoadRenderTexture( res ) - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - - texture = RL_LoadTexture( RL_GetBasePath().."../resources/images/tiles.png" ) - camera = RL_CreateCamera3D() - RL_SetCamera3DPosition( camera, pos ) - RL_SetCamera3DTarget( camera, { 0, 0, 0 } ) - RL_SetCamera3DUp( camera, { 0, 1, 0 } ) - RL_SetCameraMode( camera, CAMERA_FIRST_PERSON ) + RL.SetWindowSize( winSize ) + RL.SetExitKey( RL.KEY_ESCAPE ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + + texture = RL.LoadTexture( RL.GetBasePath().."../resources/images/tiles.png" ) + camera = RL.CreateCamera3D() + RL.SetCamera3DPosition( camera, pos ) + RL.SetCamera3DTarget( camera, { 0, 0, 0 } ) + RL.SetCamera3DUp( camera, { 0, 1, 0 } ) + RL.SetCameraMode( camera, RL.CAMERA_FIRST_PERSON ) -- for x = 0, 3 do -- for y = 0, 9 do @@ -94,41 +93,41 @@ function init() table.insert( sprites, { pos = { 0.5, 3.5 }, tile = { 3, 0 }, dis = 0, size = 0.7 } ) end -function draw() - RL_UpdateCamera3D( camera ) - pos = RL_GetCamera3DPosition( camera ) +function RL.draw() + RL.UpdateCamera3D( camera ) + pos = RL.GetCamera3DPosition( camera ) - -- RL_BeginTextureMode( framebuffer ) - RL_ClearBackground( { 100, 150, 150 } ) + -- RL.BeginTextureMode( framebuffer ) + RL.ClearBackground( { 100, 150, 150 } ) - RL_BeginMode3D( camera ) + RL.BeginMode3D( camera ) -- Floor and ceiling. for x = 0, 3 do for y = 0, 10 do - RL_DrawQuad3DTexture( texture, getTileVer( x, y, FLOOR ), getTexCoords( 1, 0 ), TILE_VERTEX_COLORS ) - RL_DrawQuad3DTexture( texture, getTileVer( x, y, CEILING ), getTexCoords( 2, 0 ), TILE_VERTEX_COLORS ) + RL.DrawQuad3DTexture( texture, getTileVer( x, y, FLOOR ), getTexCoords( 1, 0 ), TILE_VERTEX_COLORS ) + RL.DrawQuad3DTexture( texture, getTileVer( x, y, CEILING ), getTexCoords( 2, 0 ), TILE_VERTEX_COLORS ) end end -- Walls. - RL_DrawQuad3DTexture( texture, getTileVer( 0, 0, WALL_N ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) - RL_DrawQuad3DTexture( texture, getTileVer( 1, 0, WALL_N ), getTexCoords( 0, 2 ), TILE_VERTEX_COLORS ) - RL_DrawQuad3DTexture( texture, getTileVer( 2, 0, WALL_N ), getTexCoords( 2, 2 ), TILE_VERTEX_COLORS ) - RL_DrawQuad3DTexture( texture, getTileVer( 3, 0, WALL_N ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) + RL.DrawQuad3DTexture( texture, getTileVer( 0, 0, WALL_N ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) + RL.DrawQuad3DTexture( texture, getTileVer( 1, 0, WALL_N ), getTexCoords( 0, 2 ), TILE_VERTEX_COLORS ) + RL.DrawQuad3DTexture( texture, getTileVer( 2, 0, WALL_N ), getTexCoords( 2, 2 ), TILE_VERTEX_COLORS ) + RL.DrawQuad3DTexture( texture, getTileVer( 3, 0, WALL_N ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) for x = 0, 3 do - RL_DrawQuad3DTexture( texture, getTileVer( x, 10, WALL_S ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) + RL.DrawQuad3DTexture( texture, getTileVer( x, 10, WALL_S ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) end for y = 0, 10 do - RL_DrawQuad3DTexture( texture, getTileVer( 0, y, WALL_W ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) - RL_DrawQuad3DTexture( texture, getTileVer( 3, y, WALL_E ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) + RL.DrawQuad3DTexture( texture, getTileVer( 0, y, WALL_W ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) + RL.DrawQuad3DTexture( texture, getTileVer( 3, y, WALL_E ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS ) end drawSprites() - RL_EndMode3D() - -- RL_EndTextureMode() + RL.EndMode3D() + -- RL.EndTextureMode() - -- RL_SetTextureSource( TEXTURE_SOURCE_RENDER_TEXTURE ) - -- RL_DrawTexturePro( framebuffer, { 0, 0, res[1], -res[2] }, { 0, 0, winSize[1], winSize[2] }, { 0, 0 }, 0.0, WHITE ) - -- RL_SetTextureSource( TEXTURE_SOURCE_TEXTURE ) + -- RL.SetTextureSource( TEXTURE_SOURCE_RENDER_TEXTURE ) + -- RL.DrawTexturePro( framebuffer, { 0, 0, res[1], -res[2] }, { 0, 0, winSize[1], winSize[2] }, { 0, 0 }, 0.0, WHITE ) + -- RL.SetTextureSource( TEXTURE_SOURCE_TEXTURE ) end diff --git a/examples/gui/main.lua b/examples/gui/main.lua index e569b0a..97c18ad 100644 --- a/examples/gui/main.lua +++ b/examples/gui/main.lua @@ -20,94 +20,92 @@ local colorPicker = { color = { 255, 255, 255 } } local colorPanel = { color = { 255, 255, 255 }, alpha = 1.0, hue = 1.0, oldHue = 1.0 } local comboBoxActive = 0 -function init() +function RL.init() local monitor = 0 - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) local winSize = { 1920, 1080 } - RL_GuiSetFont( 0 ) - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowSize( winSize ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.GuiSetFont( 0 ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowSize( winSize ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) end -function process( delta ) +function RL.process( delta ) end -function draw() - RL_ClearBackground( { 50, 20, 75 } ) +function RL.draw() + RL.ClearBackground( { 50, 20, 75 } ) - -- if RL_GuiButton( { 112, 16, 96, 32 }, "Exit" ) then - if RL_GuiButton( { 112, 16, 96, 32 }, RL_GuiIconText( 113, "Exit" ) ) then - RL_CloseWindow() + if RL.GuiButton( { 112, 16, 96, 32 }, RL.GuiIconText( 113, "Exit" ) ) then + RL.CloseWindow() end - if windowOpen and RL_GuiWindowBox( { 300, 16, 200, 320 }, "Window" ) then + if windowOpen and RL.GuiWindowBox( { 300, 16, 200, 320 }, "Window" ) then windowOpen = false end - RL_GuiPanel( { 60, 260, 100, 100 }, "Panel" ) + RL.GuiPanel( { 60, 260, 100, 100 }, "Panel" ) - toggled = RL_GuiToggle( { 200, 260, 64, 32 }, "Toggle", toggled ) - index = RL_GuiToggleGroup( { 520, 30, 64, 32 }, "Cat\nDog\nMonkey", index ) - checkbox = RL_GuiCheckBox( { 200, 300, 16, 16 }, "CheckBox", checkbox ) + toggled = RL.GuiToggle( { 200, 260, 64, 32 }, "Toggle", toggled ) + index = RL.GuiToggleGroup( { 520, 30, 64, 32 }, "Cat\nDog\nMonkey", index ) + checkbox = RL.GuiCheckBox( { 200, 300, 16, 16 }, "CheckBox", checkbox ) local textBoxToggle = false - textBoxToggle, textBoxText = RL_GuiTextBox( { 32, 400, 120, 32 }, textBoxText, 32, textBoxActive ) - -- textBoxToggle, textBoxText = RL_GuiTextBoxMulti( { 32, 400, 120, 64 }, textBoxText, 120, textBoxActive ) - + textBoxToggle, textBoxText = RL.GuiTextBox( { 32, 400, 120, 32 }, textBoxText, 32, textBoxActive ) + -- textBoxToggle, textBoxText = RL.GuiTextBoxMulti( { 32, 400, 120, 64 }, textBoxText, 120, textBoxActive ) + if textBoxToggle then textBoxActive = not textBoxActive end local spinnerToggle = false - spinnerToggle, spinnerValue = RL_GuiSpinner( { 64, 450, 96, 32 }, "Value", spinnerValue, spinnerValueRange[1], spinnerValueRange[2], spinnerActive ) - -- spinnerToggle, spinnerValue = RL_GuiValueBox( { 64, 450, 96, 32 }, "Value", spinnerValue, spinnerValueRange[1], spinnerValueRange[2], spinnerActive ) + spinnerToggle, spinnerValue = RL.GuiSpinner( { 64, 450, 96, 32 }, "Value", spinnerValue, spinnerValueRange[1], spinnerValueRange[2], spinnerActive ) + -- spinnerToggle, spinnerValue = RL.GuiValueBox( { 64, 450, 96, 32 }, "Value", spinnerValue, spinnerValueRange[1], spinnerValueRange[2], spinnerActive ) if spinnerToggle then spinnerActive = not spinnerActive end - sliderValue = RL_GuiSliderBar( { 64, 510, 96, 32 }, "min", "max", sliderValue, sliderValueRange[1], sliderValueRange[2] ) - scrollbarValue = RL_GuiScrollBar( { 64, 550, 130, 32 }, scrollbarValue, 0, 10 ) + sliderValue = RL.GuiSliderBar( { 64, 510, 96, 32 }, "min", "max", sliderValue, sliderValueRange[1], sliderValueRange[2] ) + scrollbarValue = RL.GuiScrollBar( { 64, 550, 130, 32 }, scrollbarValue, 0, 10 ) local dropdownToggle = false - dropdownToggle, dropdownValue = RL_GuiDropdownBox( { 2, 2, 96, 16 }, "Cat\nDog\nMonkey", dropdownValue, dropdownActive ) + dropdownToggle, dropdownValue = RL.GuiDropdownBox( { 2, 2, 96, 16 }, "Cat\nDog\nMonkey", dropdownValue, dropdownActive ) if dropdownToggle then dropdownActive = not dropdownActive end - listView.item, listView.scroll = RL_GuiListView( { 200, 400, 200, 200 }, "Cat\nElefant\nSquirrel", listView.scroll, listView.item ) - -- listViewEx.item, listViewEx.scroll, listViewEx.focus = RL_GuiListViewEx( { 200, 400, 200, 200 }, "Cat\nElefant\nSquirrel", listViewEx.focus, listViewEx.scroll, listViewEx.item ) - messageBox.buttonIndex = RL_GuiMessageBox( { 420, 400, 200, 100 }, "Message", "Are you sure about this?", "Yes\nNo" ) + listView.item, listView.scroll = RL.GuiListView( { 200, 400, 200, 200 }, "Cat\nElefant\nSquirrel", listView.scroll, listView.item ) + messageBox.buttonIndex = RL.GuiMessageBox( { 420, 400, 200, 100 }, "Message", "Are you sure about this?", "Yes\nNo" ) if 0 <= messageBox.buttonIndex then print( "messageBox.buttonIndex", messageBox.buttonIndex ) end textInputBox.buttonIndex, textInputBox.text, textInputBox.secretViewActive - = RL_GuiTextInputBox( { 420, 510, 300, 150 }, "Input Box", "Put text here", "Button",textInputBox.text, 200, textInputBox.secretViewActive ) + = RL.GuiTextInputBox( { 420, 510, 300, 150 }, "Input Box", "Put text here", "Button",textInputBox.text, 200, textInputBox.secretViewActive ) if 0 <= textInputBox.buttonIndex then print( "textInputBox.buttonIndex", textInputBox.buttonIndex ) end - colorPicker.color = RL_GuiColorPicker( { 620, 20, 150, 150 }, "Color Picker", colorPicker.color ) + colorPicker.color = RL.GuiColorPicker( { 620, 20, 150, 150 }, "Color Picker", colorPicker.color ) - colorPanel.color = RL_GuiColorPanel( { 820, 20, 150, 150 }, "Color Panel", colorPanel.color ) - colorPanel.alpha = RL_GuiColorBarAlpha( { 820, 180, 150, 20 }, "Color alpha", colorPanel.alpha ) - colorPanel.hue = RL_GuiColorBarHue( { 980, 20, 20, 150 }, "Color hue", colorPanel.hue ) + colorPanel.color = RL.GuiColorPanel( { 820, 20, 150, 150 }, "Color Panel", colorPanel.color ) + colorPanel.alpha = RL.GuiColorBarAlpha( { 820, 180, 150, 20 }, "Color alpha", colorPanel.alpha ) + colorPanel.hue = RL.GuiColorBarHue( { 980, 20, 20, 150 }, "Color hue", colorPanel.hue ) if colorPanel.hue ~= colorPanel.oldHue then colorPanel.oldHue = colorPanel.hue - colorPanel.color = RL_ColorFromHSV( colorPanel.hue, 1.0, 1.0 ) + colorPanel.color = RL.ColorFromHSV( colorPanel.hue, 1.0, 1.0 ) end - - RL_GuiDrawIcon( 121, { 6, 20 }, 2, WHITE ) - comboBoxActive = RL_GuiComboBox( { 5, 50, 80, 20 }, "One\nTwo\nThree", comboBoxActive ) + RL.GuiDrawIcon( 121, { 6, 20 }, 2, RL.WHITE ) + + comboBoxActive = RL.GuiComboBox( { 5, 50, 80, 20 }, "One\nTwo\nThree", comboBoxActive ) end diff --git a/examples/heightmap/main.lua b/examples/heightmap/main.lua index e8cc4ea..4c66dd6 100644 --- a/examples/heightmap/main.lua +++ b/examples/heightmap/main.lua @@ -18,67 +18,67 @@ local dirtBottomRec = { 7 * TILE_SIZE, 0 * TILE_SIZE, TILE_SIZE, TILE_SIZE } local matrix = {} -function init() - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - local winSize = RL_GetScreenSize() +function RL.init() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + local winSize = RL.GetScreenSize() - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - camera = RL_CreateCamera3D() - RL_SetCamera3DPosition( camera, { 0, 8, 16 } ) - RL_SetCamera3DTarget( camera, { 0, 0, 0 } ) - RL_SetCamera3DUp( camera, { 0, 1, 0 } ) - RL_SetCameraMode( camera, CAMERA_FREE ) + camera = RL.CreateCamera3D() + RL.SetCamera3DPosition( camera, { 0, 8, 16 } ) + RL.SetCamera3DTarget( camera, { 0, 0, 0 } ) + RL.SetCamera3DUp( camera, { 0, 1, 0 } ) + RL.SetCameraMode( camera, RL.CAMERA_FREE ) - heigthImage = RL_LoadImage( RL_GetBasePath().."../resources/images/heightmap.png" ) + heigthImage = RL.LoadImage( RL.GetBasePath().."../resources/images/heightmap.png" ) - mesh = RL_GenMeshHeightmap( heigthImage, { 16, 4, 16 } ) - tilesetTex = RL_LoadTexture( RL_GetBasePath().."../resources/images/tiles.png" ) - groundTexture = RL_LoadRenderTexture( { TILE_SIZE * 16, TILE_SIZE * 16 } ) + mesh = RL.GenMeshHeightmap( heigthImage, { 16, 4, 16 } ) + tilesetTex = RL.LoadTexture( RL.GetBasePath().."../resources/images/tiles.png" ) + groundTexture = RL.LoadRenderTexture( { TILE_SIZE * 16, TILE_SIZE * 16 } ) -- Draw to ground texture. - RL_BeginTextureMode( groundTexture ) + RL.BeginTextureMode( groundTexture ) for x = 1, 16 do for y = 1, 16 do local pos = { x - 1, y - 1 } if 4 < x and x < 14 and 4 < y and y < 8 then - RL_DrawTextureRec( tilesetTex, dirtRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, WHITE ) + RL.DrawTextureRec( tilesetTex, dirtRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, RL.WHITE ) elseif 4 == x and 4 < y and y < 8 then - RL_DrawTextureRec( tilesetTex, dirtRightRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, WHITE ) + RL.DrawTextureRec( tilesetTex, dirtRightRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, RL.WHITE ) elseif 14 == x and 4 < y and y < 8 then - RL_DrawTextureRec( tilesetTex, dirtLeftRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, WHITE ) + RL.DrawTextureRec( tilesetTex, dirtLeftRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, RL.WHITE ) elseif 4 < x and x < 14 and 4 == y then - RL_DrawTextureRec( tilesetTex, dirtTopRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, WHITE ) + RL.DrawTextureRec( tilesetTex, dirtTopRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, RL.WHITE ) elseif 4 < x and x < 14 and 8 == y then - RL_DrawTextureRec( tilesetTex, dirtBottomRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, WHITE ) + RL.DrawTextureRec( tilesetTex, dirtBottomRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, RL.WHITE ) else - RL_DrawTextureRec( tilesetTex, grassRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, WHITE ) + RL.DrawTextureRec( tilesetTex, grassRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, RL.WHITE ) end end end - RL_EndTextureMode() + RL.EndTextureMode() - material = RL_LoadMaterialDefault() - RL_SetTextureSource( TEXTURE_SOURCE_RENDER_TEXTURE ) - -- RL_GenTextureMipmaps( groundTexture ) - -- RL_SetTextureFilter( groundTexture, TEXTURE_FILTER_TRILINEAR ) - RL_SetMaterialTexture( material, MATERIAL_MAP_ALBEDO, groundTexture ) - RL_SetTextureSource( TEXTURE_SOURCE_TEXTURE ) + material = RL.LoadMaterialDefault() + RL.SetTextureSource( RL.TEXTURE_SOURCE_RENDER_TEXTURE ) + -- RL.GenTextureMipmaps( groundTexture ) + -- RL.SetTextureFilter( groundTexture, TEXTURE_FILTER_TRILINEAR ) + RL.SetMaterialTexture( material, RL.MATERIAL_MAP_ALBEDO, groundTexture ) + RL.SetTextureSource( RL.TEXTURE_SOURCE_TEXTURE ) - matrix = RL_MatrixMultiply( RL_MatrixIdentity(), RL_MatrixTranslate( { -4, 0, -4 } ) ) + matrix = RL.MatrixMultiply( RL.MatrixIdentity(), RL.MatrixTranslate( { -4, 0, -4 } ) ) end -function draw() - RL_ClearBackground( { 100, 150, 100 } ) - RL_UpdateCamera3D( camera ) +function RL.draw() + RL.ClearBackground( { 100, 150, 100 } ) + RL.UpdateCamera3D( camera ) - RL_BeginMode3D( camera ) - RL_DrawMesh( mesh, material, matrix ) - RL_EndMode3D() + RL.BeginMode3D( camera ) + RL.DrawMesh( mesh, material, matrix ) + RL.EndMode3D() end diff --git a/examples/image_draw/main.lua b/examples/image_draw/main.lua index 2a78a13..8c1ea82 100644 --- a/examples/image_draw/main.lua +++ b/examples/image_draw/main.lua @@ -5,40 +5,40 @@ local catImage = -1 local catCopy = -1 local textImage = -1 -function init() - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - local winSize = RL_GetScreenSize() +function RL.init() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + local winSize = RL.GetScreenSize() - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - image = RL_GenImageColor( winSize[1], winSize[2], WHITE ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + image = RL.GenImageColor( winSize[1], winSize[2], RL.WHITE ) -- Test changing working directory. - RL_ChangeDirectory( RL_GetBasePath().."../resources" ) - catImage = RL_LoadImage( RL_GetWorkingDirectory().."/images/cat.png" ) - RL_ImageClearBackground( image, { 150, 60, 100 } ) - RL_ImageDrawPixel( image, { 32, 32 }, WHITE ) - RL_ImageDrawLine( image, { 32, 45 }, { 100, 60 }, GREEN ) - RL_ImageDrawCircle( image, { 64, 32 }, 16, BLUE ) - RL_ImageDrawRectangle( image, { 120, 64, 32, 64 }, BLUE ) - RL_ImageDrawRectangleLines( image, { 160, 64, 32, 64 }, 2.0, BLUE ) - RL_ImageDraw( image, catImage, { 143, 25, 230, 250 }, { 200, 200, 230, 250 }, WHITE ) - RL_ImageDrawTextEx( image, 0, "Hello", { 300, 32 }, 48.0, 1.0, WHITE ) + RL.ChangeDirectory( RL.GetBasePath().."../resources" ) + catImage = RL.LoadImage( RL.GetWorkingDirectory().."/images/cat.png" ) + RL.ImageClearBackground( image, { 150, 60, 100 } ) + RL.ImageDrawPixel( image, { 32, 32 }, RL.WHITE ) + RL.ImageDrawLine( image, { 32, 45 }, { 100, 60 }, RL.GREEN ) + RL.ImageDrawCircle( image, { 64, 32 }, 16, RL.BLUE ) + RL.ImageDrawRectangle( image, { 120, 64, 32, 64 }, RL.BLUE ) + RL.ImageDrawRectangleLines( image, { 160, 64, 32, 64 }, 2.0, RL.BLUE ) + RL.ImageDraw( image, catImage, { 143, 25, 230, 250 }, { 200, 200, 230, 250 }, RL.WHITE ) + RL.ImageDrawTextEx( image, 0, "Hello", { 300, 32 }, 48.0, 1.0, RL.WHITE ) local src = { 80, 70, 96, 96 } - catCopy = RL_ImageFromImage( catImage, src ) + catCopy = RL.ImageFromImage( catImage, src ) - RL_ImageDraw( image, catCopy, src, { 600, 200, src[3], src[4] }, WHITE ) + RL.ImageDraw( image, catCopy, src, { 600, 200, src[3], src[4] }, RL.WHITE ) - textImage = RL_ImageText( 0, "Cat", 10, 4, WHITE ) - local imageSize = RL_GetImageSize( textImage ) - RL_ImageDraw( image, textImage, { 0, 0, imageSize[1], imageSize[2] }, { 250, 40, imageSize[1], imageSize[2] }, WHITE ) - - texture = RL_LoadTextureFromImage( image ) + textImage = RL.ImageText( 0, "Cat", 10, 4, RL.WHITE ) + local imageSize = RL.GetImageSize( textImage ) + RL.ImageDraw( image, textImage, { 0, 0, imageSize[1], imageSize[2] }, { 250, 40, imageSize[1], imageSize[2] }, RL.WHITE ) + + texture = RL.LoadTextureFromImage( image ) end -function draw() - RL_ClearBackground( { 100, 150, 100 } ) - RL_DrawTexture( texture, { 0, 0 }, WHITE ) +function RL.draw() + RL.ClearBackground( { 100, 150, 100 } ) + RL.DrawTexture( texture, { 0, 0 }, RL.WHITE ) end diff --git a/examples/instancing/main.lua b/examples/instancing/main.lua index d0760ec..b7e4024 100644 --- a/examples/instancing/main.lua +++ b/examples/instancing/main.lua @@ -18,94 +18,94 @@ local shader local matInstances local matDefault -function init() +function RL.init() local monitor = 0 - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - local winSize = RL_GetScreenSize() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + local winSize = RL.GetScreenSize() - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowSize( winSize ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - RL_SetWindowTitle( "Instancing" ) - RL_SetWindowState( FLAG_VSYNC_HINT ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowSize( winSize ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowTitle( "Instancing" ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) -- Define the camera to look into our 3d world - camera = RL_CreateCamera3D() - RL_SetCamera3DPosition( camera, { -125.0, 125.0, -125.0 } ) - RL_SetCamera3DTarget( camera, { 0, 0, 0 } ) - RL_SetCamera3DUp( camera, { 0, 1, 0 } ) - RL_SetCamera3DFovy( camera, 45 ) - RL_SetCameraMode( camera, CAMERA_ORBITAL ) + camera = RL.CreateCamera3D() + RL.SetCamera3DPosition( camera, { -125.0, 125.0, -125.0 } ) + RL.SetCamera3DTarget( camera, { 0, 0, 0 } ) + RL.SetCamera3DUp( camera, { 0, 1, 0 } ) + RL.SetCamera3DFovy( camera, 45 ) + RL.SetCameraMode( camera, RL.CAMERA_ORBITAL ) -- Define mesh to be instanced - cube = RL_GenMeshCube( { 1, 1, 1 } ) + cube = RL.GenMeshCube( { 1, 1, 1 } ) -- Translate and rotate cubes randomly for i = 1, MAX_INSTANCES do - local translation = RL_MatrixTranslate( { math.random( -50, 50 ), math.random( -50, 50 ), math.random( -50, 50 ) } ) - local axis = RL_Vector3Normalize( { math.random( 0, 360 ), math.random( 0, 360 ), math.random( 0, 360 ) } ) + local translation = RL.MatrixTranslate( { math.random( -50, 50 ), math.random( -50, 50 ), math.random( -50, 50 ) } ) + local axis = RL.Vector3Normalize( { math.random( 0, 360 ), math.random( 0, 360 ), math.random( 0, 360 ) } ) local angle = math.rad( math.random( 0, 10 ) ) - local rotation = RL_MatrixRotate( axis, angle ) + local rotation = RL.MatrixRotate( axis, angle ) - table.insert( transforms, RL_MatrixMultiply( rotation, translation ) ) + table.insert( transforms, RL.MatrixMultiply( rotation, translation ) ) end -- Load lighting shader - shader = RL_LoadShader( RL_GetBasePath().."../resources/shaders/glsl330/lighting_instancing.vs", - RL_GetBasePath().."../resources/shaders/glsl330/lighting.fs" ) + shader = RL.LoadShader( RL.GetBasePath().."../resources/shaders/glsl330/lighting_instancing.vs", + RL.GetBasePath().."../resources/shaders/glsl330/lighting.fs" ) -- Get shader locations - local mvpLoc = RL_GetShaderLocation( shader, "mvp" ) - local viewPosLoc = RL_GetShaderLocation( shader, "viewPos" ) - local instanceTransformLoc = RL_GetShaderLocationAttrib( shader, "instanceTransform" ) - RL_SetShaderLocationIndex( shader, SHADER_LOC_MATRIX_MVP, mvpLoc ) - RL_SetShaderLocationIndex( shader, SHADER_LOC_VECTOR_VIEW, viewPosLoc ) - RL_SetShaderLocationIndex( shader, SHADER_LOC_MATRIX_MODEL, instanceTransformLoc ) + local mvpLoc = RL.GetShaderLocation( shader, "mvp" ) + local viewPosLoc = RL.GetShaderLocation( shader, "viewPos" ) + local instanceTransformLoc = RL.GetShaderLocationAttrib( shader, "instanceTransform" ) + RL.SetShaderLocationIndex( shader, RL.SHADER_LOC_MATRIX_MVP, mvpLoc ) + RL.SetShaderLocationIndex( shader, RL.SHADER_LOC_VECTOR_VIEW, viewPosLoc ) + RL.SetShaderLocationIndex( shader, RL.SHADER_LOC_MATRIX_MODEL, instanceTransformLoc ) -- Set shader value: ambient light level - local ambientLoc = RL_GetShaderLocation( shader, "ambient" ) - RL_SetShaderValue( shader, ambientLoc, { 0.2, 0.2, 0.2, 0.1 }, SHADER_UNIFORM_VEC4 ) + local ambientLoc = RL.GetShaderLocation( shader, "ambient" ) + RL.SetShaderValue( shader, ambientLoc, { 0.2, 0.2, 0.2, 0.1 }, RL.SHADER_UNIFORM_VEC4 ) -- Create one light - RL_CreateLight( LIGHT_DIRECTIONAL, { 50.0, 50.0, 0.0 }, RL_Vector3Zero(), WHITE, shader ) + RL.CreateLight( RL.LIGHT_DIRECTIONAL, { 50.0, 50.0, 0.0 }, RL.Vector3Zero(), RL.WHITE, shader ) -- NOTE: We are assigning the intancing shader to material.shader -- to be used on mesh drawing with DrawMeshInstanced() - matInstances = RL_LoadMaterialDefault() - RL_SetMaterialShader( matInstances, shader ) - RL_SetMaterialColor( matInstances, MATERIAL_MAP_DIFFUSE, RED ) + matInstances = RL.LoadMaterialDefault() + RL.SetMaterialShader( matInstances, shader ) + RL.SetMaterialColor( matInstances, RL.MATERIAL_MAP_DIFFUSE, RL.RED ) -- Load default material (using raylib intenral default shader) for non-instanced mesh drawing -- WARNING: Default shader enables vertex color attribute BUT GenMeshCube() does not generate vertex colors, so, -- when drawing the color attribute is disabled and a default color value is provided as input for thevertex attribute - matDefault = RL_LoadMaterialDefault() - RL_SetMaterialColor( matDefault, MATERIAL_MAP_DIFFUSE, BLUE ) + matDefault = RL.LoadMaterialDefault() + RL.SetMaterialColor( matDefault, RL.MATERIAL_MAP_DIFFUSE, RL.BLUE ) end -function process( delta ) - RL_UpdateCamera3D( camera ) +function RL.process( delta ) + RL.UpdateCamera3D( camera ) -- Update the light shader with the camera view position - local loc = RL_GetShaderLocationIndex( shader, SHADER_LOC_VECTOR_VIEW ) - RL_SetShaderValue( shader, loc, RL_GetCamera3DPosition( camera ), SHADER_UNIFORM_VEC3 ) + local loc = RL.GetShaderLocationIndex( shader, RL.SHADER_LOC_VECTOR_VIEW ) + RL.SetShaderValue( shader, loc, RL.GetCamera3DPosition( camera ), RL.SHADER_UNIFORM_VEC3 ) end -function draw() - RL_ClearBackground( DARKBLUE ) +function RL.draw() + RL.ClearBackground( RL.DARKBLUE ) - RL_BeginMode3D( camera ) + RL.BeginMode3D( camera ) -- Draw cube mesh with default material (BLUE) - RL_DrawMesh( cube, matDefault, RL_MatrixTranslate( { -10.0, 0.0, 0.0 } ) ) + RL.DrawMesh( cube, matDefault, RL.MatrixTranslate( { -10.0, 0.0, 0.0 } ) ) -- Draw meshes instanced using material containing instancing shader (RED + lighting), -- transforms[] for the instances should be provided, they are dynamically -- updated in GPU every frame, so we can animate the different mesh instances - RL_DrawMeshInstanced( cube, matInstances, transforms, MAX_INSTANCES ) + RL.DrawMeshInstanced( cube, matInstances, transforms, MAX_INSTANCES ) -- Draw cube mesh with default material (BLUE) - RL_DrawMesh( cube, matDefault, RL_MatrixTranslate( { 10.0, 0.0, 0.0 } ) ) - RL_EndMode3D() + RL.DrawMesh( cube, matDefault, RL.MatrixTranslate( { 10.0, 0.0, 0.0 } ) ) + RL.EndMode3D() - RL_DrawFPS( { 10, 10 } ) + RL.DrawFPS( { 10, 10 } ) end diff --git a/examples/iqm_test/main.lua b/examples/iqm_test/main.lua index 8471c86..486b110 100644 --- a/examples/iqm_test/main.lua +++ b/examples/iqm_test/main.lua @@ -2,7 +2,6 @@ local monitor = 0 local camera = -1 -local texture = -1 local material = -1 local model = -1 local animations = -1 @@ -12,41 +11,41 @@ local curAnim = 0 local frameCount = 0 local animSpeed = 60 -function init() - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - local winSize = RL_GetScreenSize() +function RL.init() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + local winSize = RL.GetScreenSize() - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - camera = RL_CreateCamera3D() - RL_SetCamera3DPosition( camera, { 0, 2, 4 } ) - RL_SetCamera3DTarget( camera, { 0, 0, 0 } ) - RL_SetCamera3DUp( camera, { 0, 1, 0 } ) - RL_SetCameraMode( camera, CAMERA_FREE ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + camera = RL.CreateCamera3D() + RL.SetCamera3DPosition( camera, { 0, 2, 4 } ) + RL.SetCamera3DTarget( camera, { 0, 0, 0 } ) + RL.SetCamera3DUp( camera, { 0, 1, 0 } ) + RL.SetCameraMode( camera, RL.CAMERA_FREE ) - material = RL_CreateMaterial( { + material = RL.CreateMaterial( { maps = { { - MATERIAL_MAP_ALBEDO, + RL.MATERIAL_MAP_ALBEDO, { - texture = RL_LoadTexture( RL_GetBasePath().."../resources/images/monkey_tex.png" ), - color = WHITE, + texture = RL.LoadTexture( RL.GetBasePath().."../resources/images/monkey_tex.png" ), + color = RL.WHITE, }, }, }, } ) - - model = RL_LoadModel( RL_GetBasePath().."../resources/iqm/monkey.iqm" ) - RL_SetModelMaterial( model, 0, material ) - animations, animationCount = RL_LoadModelAnimations( RL_GetBasePath().."../resources/iqm/monkey.iqm" ) + + model = RL.LoadModel( RL.GetBasePath().."../resources/iqm/monkey.iqm" ) + RL.SetModelMaterial( model, 0, material ) + animations, animationCount = RL.LoadModelAnimations( RL.GetBasePath().."../resources/iqm/monkey.iqm" ) print( "animationCount", animationCount ) end -function process( delta ) - if RL_IsKeyPressed( KEY_ENTER ) then +function RL.process( delta ) + if RL.IsKeyPressed( RL.KEY_ENTER ) then curAnim = curAnim + 1 if animationCount <= curAnim then @@ -54,15 +53,15 @@ function process( delta ) end frame = 0.0 - frameCount = RL_GetModelAnimationFrameCount( animations, curAnim ) - elseif RL_IsKeyPressed( KEY_UP ) then + frameCount = RL.GetModelAnimationFrameCount( animations, curAnim ) + elseif RL.IsKeyPressed( RL.KEY_UP ) then animSpeed = animSpeed + 5 - elseif RL_IsKeyPressed( KEY_DOWN ) then + elseif RL.IsKeyPressed( RL.KEY_DOWN ) then animSpeed = animSpeed - 5 end - if RL_IsKeyDown( KEY_SPACE ) then - RL_UpdateModelAnimation( model, animations, curAnim, math.floor( frame ) ) + if RL.IsKeyDown( RL.KEY_SPACE ) then + RL.UpdateModelAnimation( model, animations, curAnim, math.floor( frame ) ) frame = frame + animSpeed * delta if frameCount < frame then @@ -73,19 +72,19 @@ function process( delta ) end end -function draw() - RL_ClearBackground( { 100, 150, 100 } ) - RL_UpdateCamera3D( camera ) - - RL_BeginMode3D( camera ) - RL_DrawGrid( 8, 1 ) - RL_DrawModelEx( model, { 0, 0, 0 }, { 1.0, 0.0, 0.0 }, -90.0, { 1.0, 1.0, 1.0 }, WHITE ) - RL_EndMode3D() +function RL.draw() + RL.ClearBackground( { 100, 150, 100 } ) + RL.UpdateCamera3D( camera ) + + RL.BeginMode3D( camera ) + RL.DrawGrid( 8, 1 ) + RL.DrawModelEx( model, { 0, 0, 0 }, { 1.0, 0.0, 0.0 }, -90.0, { 1.0, 1.0, 1.0 }, RL.WHITE ) + RL.EndMode3D() - RL_DrawText( 0, + RL.DrawText( 0, "Enter: Change animation\ Space: Play animation\ Up arrow: Inreace animation speed\ Down arrow: Decreace animation speed", - { 10, 10 }, 30, 5, WHITE ) + { 10, 10 }, 30, 5, RL.WHITE ) end diff --git a/examples/lightmap/main.lua b/examples/lightmap/main.lua index e0b5da0..ae81345 100644 --- a/examples/lightmap/main.lua +++ b/examples/lightmap/main.lua @@ -10,20 +10,20 @@ local shader = -1 local matrix = {} -function init() - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - local winSize = RL_GetScreenSize() +function RL.init() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + local winSize = RL.GetScreenSize() - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - camera = RL_CreateCamera3D() - RL_SetCamera3DPosition( camera, { 0, 8, 16 } ) - RL_SetCamera3DTarget( camera, { 0, 0, 0 } ) - RL_SetCamera3DUp( camera, { 0, 1, 0 } ) - RL_SetCameraMode( camera, CAMERA_FREE ) + camera = RL.CreateCamera3D() + RL.SetCamera3DPosition( camera, { 0, 8, 16 } ) + RL.SetCamera3DTarget( camera, { 0, 0, 0 } ) + RL.SetCamera3DUp( camera, { 0, 1, 0 } ) + RL.SetCameraMode( camera, RL.CAMERA_FREE ) local ts = PLANE_SIZE local meshData = { @@ -33,61 +33,61 @@ function init() { 0, 0 }, { ts, ts }, { ts, 0 } }, texcoords2 = { { 0, 0 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, { 1, 0 } }, - colors = { WHITE, WHITE, WHITE, - WHITE, WHITE, WHITE }, + colors = { RL.WHITE, RL.WHITE, RL.WHITE, + RL.WHITE, RL.WHITE, RL.WHITE }, normals = { { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }, } - mesh = RL_GenMeshCustom( meshData, true ) + mesh = RL.GenMeshCustom( meshData, true ) -- local meshEdit = { -- vertices = { { 0, 1, 0 }, { 0, 0, PLANE_SIZE }, { PLANE_SIZE, 0, PLANE_SIZE }, -- { 0, 1, 0 }, { PLANE_SIZE, 0, PLANE_SIZE }, { PLANE_SIZE, 0, 0 } }, -- } - -- RL_UpdateMesh( mesh, meshEdit ) - - tileTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/tile.png" ) - RL_GenTextureMipmaps( tileTexture ) - RL_SetTextureFilter( tileTexture, TEXTURE_FILTER_TRILINEAR ) - lightmap = RL_LoadTexture( RL_GetBasePath().."../resources/images/lightmap.png" ) - RL_GenTextureMipmaps( lightmap ) - RL_SetTextureFilter( lightmap, TEXTURE_FILTER_TRILINEAR ) - RL_SetTextureWrap( lightmap, TEXTURE_WRAP_CLAMP ) + -- RL.UpdateMesh( mesh, meshEdit ) + + tileTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/tile.png" ) + RL.GenTextureMipmaps( tileTexture ) + RL.SetTextureFilter( tileTexture, RL.TEXTURE_FILTER_TRILINEAR ) + lightmap = RL.LoadTexture( RL.GetBasePath().."../resources/images/lightmap.png" ) + RL.GenTextureMipmaps( lightmap ) + RL.SetTextureFilter( lightmap, RL.TEXTURE_FILTER_TRILINEAR ) + RL.SetTextureWrap( lightmap, RL.TEXTURE_WRAP_CLAMP ) - shader = RL_LoadShader( RL_GetBasePath().."../resources/shaders/glsl330/lightmap.vs", - RL_GetBasePath().."../resources/shaders/glsl330/lightmap.fs" ) + shader = RL.LoadShader( RL.GetBasePath().."../resources/shaders/glsl330/lightmap.vs", + RL.GetBasePath().."../resources/shaders/glsl330/lightmap.fs" ) local materialData = { shader = shader, maps = { { - MATERIAL_MAP_ALBEDO, + RL.MATERIAL_MAP_ALBEDO, { texture = tileTexture, - color = WHITE, + color = RL.WHITE, value = 1.0, }, }, { - MATERIAL_MAP_METALNESS, + RL.MATERIAL_MAP_METALNESS, { texture = lightmap, - color = WHITE, + color = RL.WHITE, value = 1.0, }, }, }, } - material = RL_CreateMaterial( materialData ) + material = RL.CreateMaterial( materialData ) - matrix = RL_MatrixMultiply( RL_MatrixIdentity(), RL_MatrixTranslate( { -4, 0, -4 } ) ) + matrix = RL.MatrixMultiply( RL.MatrixIdentity(), RL.MatrixTranslate( { -4, 0, -4 } ) ) end -function draw() - RL_ClearBackground( { 25, 50, 50 } ) - RL_UpdateCamera3D( camera ) +function RL.draw() + RL.ClearBackground( { 25, 50, 50 } ) + RL.UpdateCamera3D( camera ) - RL_BeginMode3D( camera ) - RL_DrawMesh( mesh, material, matrix ) - RL_EndMode3D() + RL.BeginMode3D( camera ) + RL.DrawMesh( mesh, material, matrix ) + RL.EndMode3D() end diff --git a/examples/n-patches/main.lua b/examples/n-patches/main.lua index 91ea409..a4491bc 100644 --- a/examples/n-patches/main.lua +++ b/examples/n-patches/main.lua @@ -2,24 +2,24 @@ local dstRec = { 160.0, 160.0, 8.0, 8.0 }; local origin = { 0.0, 0.0 } -- local ninePatchInfo = { { 0.0, 0.0, 24.0, 24.0 }, 8, 8, 8, 8, NPATCH_NINE_PATCH } -local ninePatchInfo = { source = { 0, 0, 24.0, 24.0 }, left = 8, top = 8, right = 8, bottom = 8, layout = NPATCH_NINE_PATCH } +local ninePatchInfo = { source = { 0, 0, 24.0, 24.0 }, left = 8, top = 8, right = 8, bottom = 8, layout = RL.NPATCH_NINE_PATCH } -local nPatchTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/ui_border.png" ) +local nPatchTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/ui_border.png" ) -function init() - RL_SetWindowTitle( "N-Patches" ) - RL_SetWindowState( FLAG_VSYNC_HINT ) +function RL.init() + RL.SetWindowTitle( "N-Patches" ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) end -function process( delta ) - local mousePosition = RL_GetMousePosition(); +function RL.process( delta ) + local mousePosition = RL.GetMousePosition(); -- Resize the n-patch based on mouse position dstRec[3] = mousePosition[1] - dstRec[1]; dstRec[4] = mousePosition[2] - dstRec[2]; end -function draw() - RL_ClearBackground( RAYWHITE ) - RL_DrawTextureNPatch( nPatchTexture, ninePatchInfo, dstRec, origin, 0.0, WHITE ) +function RL.draw() + RL.ClearBackground( RL.RAYWHITE ) + RL.DrawTextureNPatch( nPatchTexture, ninePatchInfo, dstRec, origin, 0.0, RL.WHITE ) end diff --git a/examples/pixelated/main.lua b/examples/pixelated/main.lua index f5239ac..49f5c42 100644 --- a/examples/pixelated/main.lua +++ b/examples/pixelated/main.lua @@ -1,57 +1,56 @@ local tex = -1 local pos = { 32, 32 } local speed = 60.0 -local sound = -1 local monitor = 0 -local mPos = RL_GetMonitorPosition( monitor ) -local mSize = RL_GetMonitorSize( monitor ) +local mPos = RL.GetMonitorPosition( monitor ) +local mSize = RL.GetMonitorSize( monitor ) local framebuffer = -1 local res = { 320, 180 } local scale = 5 local winSize = { res[1] * scale, res[2] * scale } -function init() - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - RL_SetWindowSize( winSize ) - tex = RL_LoadTexture( RL_GetBasePath().."../resources/images/cat.png" ) +function RL.init() + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowSize( winSize ) + tex = RL.LoadTexture( RL.GetBasePath().."../resources/images/cat.png" ) -- Create framebuffer. - framebuffer = RL_LoadRenderTexture( res ) + framebuffer = RL.LoadRenderTexture( res ) end -function process( delta ) - if RL_IsKeyDown( KEY_RIGHT ) then +function RL.process( delta ) + if RL.IsKeyDown( RL.KEY_RIGHT ) then pos[1] = pos[1] + delta * speed - elseif RL_IsKeyDown( KEY_LEFT ) then + elseif RL.IsKeyDown( RL.KEY_LEFT ) then pos[1] = pos[1] - delta * speed end - if RL_IsKeyDown( KEY_UP ) then + if RL.IsKeyDown( RL.KEY_UP ) then pos[2] = pos[2] - delta * speed - elseif RL_IsKeyDown( KEY_DOWN ) then + elseif RL.IsKeyDown( RL.KEY_DOWN ) then pos[2] = pos[2] + delta * speed end - if RL_IsWindowResized() then - winSize = RL_GetScreenSize() + if RL.IsWindowResized() then + winSize = RL.GetScreenSize() end end -function draw() - RL_ClearBackground( { 0, 0, 0 } ) +function RL.draw() + RL.ClearBackground( { 0, 0, 0 } ) - RL_BeginTextureMode( framebuffer ) - RL_ClearBackground( { 100, 150, 100 } ) - RL_DrawPixel( { 100, 100 }, { 255, 50, 100 } ) - RL_DrawLine( { 120, 100 }, { 140, 150 }, 2.4, { 255, 150, 255 } ) - RL_DrawRectangle( { 200, 120, 40, 50 }, { 100, 170, 255 } ) - RL_DrawTexturePro( tex, { 166, 138, 128, 128 }, { pos[1], pos[2], 128, 128 }, { 16, 16 }, 0.0, WHITE ) - RL_DrawText( 0, "Cat MIAU!!", { 16, 32 }, 10, 1, { 255, 180, 155 } ) - RL_DrawTriangle( { 0, 32 }, { 32, 16 }, { 0, 0 }, RED ) - RL_EndTextureMode() + RL.BeginTextureMode( framebuffer ) + RL.ClearBackground( { 100, 150, 100 } ) + RL.DrawPixel( { 100, 100 }, { 255, 50, 100 } ) + RL.DrawLine( { 120, 100 }, { 140, 150 }, 2.4, { 255, 150, 255 } ) + RL.DrawRectangle( { 200, 120, 40, 50 }, { 100, 170, 255 } ) + RL.DrawTexturePro( tex, { 166, 138, 128, 128 }, { pos[1], pos[2], 128, 128 }, { 16, 16 }, 0.0, RL.WHITE ) + RL.DrawText( 0, "Cat MIAU!!", { 16, 32 }, 10, 1, { 255, 180, 155 } ) + RL.DrawTriangle( { 0, 32 }, { 32, 16 }, { 0, 0 }, RL.RED ) + RL.EndTextureMode() - RL_SetTextureSource( TEXTURE_SOURCE_RENDER_TEXTURE ) - RL_DrawTexturePro( framebuffer, { 0, 0, res[1], -res[2] }, { 0, 0, winSize[1], winSize[2] }, { 0, 0 }, 0.0, { 255, 255, 255 } ) - RL_SetTextureSource( TEXTURE_SOURCE_TEXTURE ) + RL.SetTextureSource( RL.TEXTURE_SOURCE_RENDER_TEXTURE ) + RL.DrawTexturePro( framebuffer, { 0, 0, res[1], -res[2] }, { 0, 0, winSize[1], winSize[2] }, { 0, 0 }, 0.0, { 255, 255, 255 } ) + RL.SetTextureSource( RL.TEXTURE_SOURCE_TEXTURE ) end diff --git a/examples/platformer/main.lua b/examples/platformer/main.lua index dde3c1e..7f5486f 100644 --- a/examples/platformer/main.lua +++ b/examples/platformer/main.lua @@ -1,8 +1,14 @@ -package.path = package.path..";"..RL_GetBasePath().."../resources/lib/?.lua" +package.path = package.path..";"..RL.GetBasePath().."../resources/lib/?.lua" -util = require( "utillib" ) +Util = require( "utillib" ) Vec2 = require( "vector2" ) +-- print( "RL", RL, #RL ) + +-- for i, v in pairs( RL ) do +-- print( i, v ) +-- end + local TILE_SIZE = 16 local PLAYER_MAXSPEED = 1.5 local PLAYER_ACCELL = 5 @@ -11,11 +17,11 @@ local GRAVITY = 6 local JUMP_STR = 3 local WALK_ANIM_SPEED = 12 -local tex = RL_LoadTexture( RL_GetBasePath().."../resources/images/arcade_platformerV2.png" ) +local tex = RL.LoadTexture( RL.GetBasePath().."../resources/images/arcade_platformerV2.png" ) local res = Vec2:new( 160, 144 ) local winScale = 5 local winSize = res:scale( winScale ) -local framebuffer = RL_LoadRenderTexture( res ) +local framebuffer = RL.LoadRenderTexture( res ) local monitor = 0 local tilemap = { size = Vec2:new( res.x / TILE_SIZE, res.y / TILE_SIZE ), @@ -80,21 +86,21 @@ local function createMap() tilemap.tiles[1][8] = 6 end -function init() - local monitorPos = Vec2:new( RL_GetMonitorPosition( monitor ) ) - local monitorSize = Vec2:new( RL_GetMonitorSize( monitor ) ) +function RL.init() + local monitorPos = Vec2:new( RL.GetMonitorPosition( monitor ) ) + local monitorSize = Vec2:new( RL.GetMonitorSize( monitor ) ) - RL_SetWindowTitle( "Platformer" ) - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowSize( winSize ) - RL_SetWindowPosition( { monitorPos.x + monitorSize.x / 2 - winSize.x / 2, monitorPos.y + monitorSize.y / 2 - winSize.y / 2 } ) + RL.SetWindowTitle( "Platformer" ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowSize( winSize ) + RL.SetWindowPosition( { monitorPos.x + monitorSize.x / 2 - winSize.x / 2, monitorPos.y + monitorSize.y / 2 - winSize.y / 2 } ) createMap() end local function isTileWall( pos ) - if RL_CheckCollisionPointRec( { pos.x, pos.y }, { 0, 0, tilemap.size.x - 1, tilemap.size.y - 1 } ) then + if RL.CheckCollisionPointRec( { pos.x, pos.y }, { 0, 0, tilemap.size.x - 1, tilemap.size.y - 1 } ) then return 0 < tilemap.tiles[ pos.x + 1 ][ pos.y + 1 ] else return false @@ -103,7 +109,7 @@ end local function tileCollision( entity ) local vPos = entity.pos + entity.vel -- Future pos with current vel. - local vRect = util.tableClone( entity.colRect ) + local vRect = Util.tableClone( entity.colRect ) local tinyGap = 0.001 -- Tiny gap between collisionRect and tile to prevent getting stuck on all seams. -- Move test rect to predicted position. @@ -172,14 +178,14 @@ end local function playerMovement( delta ) local moving = { false, false } - if RL_IsKeyDown( KEY_RIGHT ) then + if RL.IsKeyDown( RL.KEY_RIGHT ) then player.vel.x = player.vel.x + PLAYER_ACCELL * delta moving[1] = true if 0 < player.vel.x then player.facing = 1 end - elseif RL_IsKeyDown( KEY_LEFT ) then + elseif RL.IsKeyDown( RL.KEY_LEFT ) then player.vel.x = player.vel.x - PLAYER_ACCELL * delta moving[1] = true @@ -188,7 +194,7 @@ local function playerMovement( delta ) end end - if RL_IsKeyPressed( KEY_SPACE ) and player.onFloor then + if RL.IsKeyPressed( RL.KEY_SPACE ) and player.onFloor then player.vel.y = -JUMP_STR player.onFloor = false end @@ -205,7 +211,7 @@ local function playerMovement( delta ) end end - player.vel.x = util.clamp( player.vel.x, -PLAYER_MAXSPEED, PLAYER_MAXSPEED ) + player.vel.x = Util.clamp( player.vel.x, -PLAYER_MAXSPEED, PLAYER_MAXSPEED ) player.vel.y = player.vel.y + GRAVITY * delta @@ -220,16 +226,16 @@ local function playerMovement( delta ) player.colRect[2] = player.pos.y - player.colRect[4] end -function process( delta ) - if RL_IsWindowResized() then - winSize:set( RL_GetScreenSize() ) +function RL.process( delta ) + if RL.IsWindowResized() then + winSize:set( RL.GetScreenSize() ) end playerMovement( delta ) end local function drawMap() - RL_DrawTextureRec( tex, { 0, 160, res.x, res.y }, { 0, 0 }, WHITE ) + RL.DrawTextureRec( tex, { 0, 160, res.x, res.y }, { 0, 0 }, RL.WHITE ) for x = 1, tilemap.size.x do for y = 1, tilemap.size.y do @@ -237,7 +243,7 @@ local function drawMap() local pos = Vec2:new( x - 1, y - 1 ) if 0 < tile then - RL_DrawTextureRec( tex, tilemap.tileRects[ tile ], { pos.x * TILE_SIZE, pos.y * TILE_SIZE }, WHITE ) + RL.DrawTextureRec( tex, tilemap.tileRects[ tile ], { pos.x * TILE_SIZE, pos.y * TILE_SIZE }, RL.WHITE ) end end end @@ -250,7 +256,7 @@ local function drawPlayer() if math.abs( player.vel.x ) < 0.1 then player.curFrame = 1 else - player.animPos = player.animPos + WALK_ANIM_SPEED * ( math.abs( player.vel.x ) / PLAYER_MAXSPEED ) * RL_GetFrameTime() + player.animPos = player.animPos + WALK_ANIM_SPEED * ( math.abs( player.vel.x ) / PLAYER_MAXSPEED ) * RL.GetFrameTime() local frame = math.ceil( player.animPos ) if #player.walkAnimFrames < frame then @@ -270,7 +276,7 @@ local function drawPlayer() -- Draw rect. - local src = util.tableClone( player.frames[ player.curFrame ] ) + local src = Util.tableClone( player.frames[ player.curFrame ] ) local dst = { player.pos.x - src[3] / 2, player.pos.y - src[4], @@ -282,19 +288,19 @@ local function drawPlayer() src[3] = -src[3] end - RL_DrawTexturePro( tex, src, dst, { 0, 0 }, 0.0, WHITE ) + RL.DrawTexturePro( tex, src, dst, { 0, 0 }, 0.0, RL.WHITE ) end -function draw() - RL_ClearBackground( RED ) +function RL.draw() + RL.ClearBackground( RL.RED ) - RL_SetTextureSource( TEXTURE_SOURCE_TEXTURE ) - RL_BeginTextureMode( framebuffer ) + RL.SetTextureSource( RL.TEXTURE_SOURCE_TEXTURE ) + RL.BeginTextureMode( framebuffer ) drawMap() drawPlayer() - RL_EndTextureMode() + RL.EndTextureMode() - RL_SetTextureSource( TEXTURE_SOURCE_RENDER_TEXTURE ) - RL_DrawTexturePro( framebuffer, { 0, 0, res.x, -res.y }, { 0, 0, winSize.x, winSize.y }, { 0, 0 }, 0.0, WHITE ) - RL_SetTextureSource( TEXTURE_SOURCE_TEXTURE ) + RL.SetTextureSource( RL.TEXTURE_SOURCE_RENDER_TEXTURE ) + RL.DrawTexturePro( framebuffer, { 0, 0, res.x, -res.y }, { 0, 0, winSize.x, winSize.y }, { 0, 0 }, 0.0, RL.WHITE ) + RL.SetTextureSource( RL.TEXTURE_SOURCE_TEXTURE ) end diff --git a/examples/point_triangle_collision/main.lua b/examples/point_triangle_collision/main.lua index 3c16e5e..a855dd8 100644 --- a/examples/point_triangle_collision/main.lua +++ b/examples/point_triangle_collision/main.lua @@ -1,4 +1,4 @@ -package.path = package.path..";"..RL_GetBasePath().."../resources/lib/?.lua" +package.path = package.path..";"..RL.GetBasePath().."../resources/lib/?.lua" util = require "utillib" Vec2 = require "vector2" @@ -8,7 +8,6 @@ local MOVE_SPEED = 0.5 local monitor = 0 local camera = -1 -local texture = -1 local tri = { a = Vec3:new( 0, 0, 0 ), -- a = Vec3:new( 0, 1, 0 ), @@ -26,27 +25,25 @@ local point = { local debugText = "" local function calcNormal( tri ) - tri.normal = Vec3:new( RL_Vector3Normalize( RL_Vector3CrossProduct( tri.b - tri.a, tri.c - tri.a ) ) ) + tri.normal = Vec3:new( RL.Vector3Normalize( RL.Vector3CrossProduct( tri.b - tri.a, tri.c - tri.a ) ) ) end -function init() - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) +function RL.init() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) local winSize = { 1920, 1080 } - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - RL_SetWindowSize( winSize ) - camera = RL_CreateCamera3D() - RL_SetCamera3DPosition( camera, { 0, 1, 2 } ) - RL_SetCamera3DTarget( camera, { 0, 0, 0 } ) - RL_SetCamera3DUp( camera, { 0, 1, 0 } ) - RL_SetCameraMode( camera, CAMERA_FREE ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowSize( winSize ) + camera = RL.CreateCamera3D() + RL.SetCamera3DPosition( camera, { 0, 1, 2 } ) + RL.SetCamera3DTarget( camera, { 0, 0, 0 } ) + RL.SetCamera3DUp( camera, { 0, 1, 0 } ) + RL.SetCameraMode( camera, RL.CAMERA_FREE ) calcNormal( tri ) - - texture = RL_LoadTexture( RL_GetBasePath().."../resources/images/tile.png" ) end local function checkCollisionPointTriangle( p, a, b, c, n ) @@ -78,48 +75,48 @@ local function checkCollisionPointTriangle( p, a, b, c, n ) return 0.0 < result.x and 0.0 < result.y and 0.0 < result.z and distance < 0.0, distance end -function process( delta ) +function RL.process( delta ) debugText = "" - if RL_IsKeyDown( string.byte( "D" ) ) then + if RL.IsKeyDown( string.byte( "D" ) ) then point.pos.x = point.pos.x + MOVE_SPEED * delta - elseif RL_IsKeyDown( string.byte( "A" ) ) then + elseif RL.IsKeyDown( string.byte( "A" ) ) then point.pos.x = point.pos.x - MOVE_SPEED * delta end - if RL_IsKeyDown( string.byte( "S" ) ) then + if RL.IsKeyDown( string.byte( "S" ) ) then point.pos.z = point.pos.z + MOVE_SPEED * delta - elseif RL_IsKeyDown( string.byte( "W" ) ) then + elseif RL.IsKeyDown( string.byte( "W" ) ) then point.pos.z = point.pos.z - MOVE_SPEED * delta end - if RL_IsKeyDown( string.byte( "R" ) ) then + if RL.IsKeyDown( string.byte( "R" ) ) then point.pos.y = point.pos.y + MOVE_SPEED * delta - elseif RL_IsKeyDown( string.byte( "F" ) ) then + elseif RL.IsKeyDown( string.byte( "F" ) ) then point.pos.y = point.pos.y - MOVE_SPEED * delta end if checkCollisionPointTriangle( point.pos, tri.a, tri.b, tri.c, tri.normal ) then - point.color = RED + point.color = RL.RED else - point.color = GREEN + point.color = RL.GREEN end end -function draw() - RL_ClearBackground( { 100, 150, 100 } ) - RL_UpdateCamera3D( camera ) - - RL_BeginMode3D( camera ) - RL_DrawGrid( 8, 1 ) - RL_DrawTriangle3D( tri.a, tri.b, tri.c, { 200, 100, 100 } ) - - RL_DrawLine3D( { point.pos.x - point.lineLen, point.pos.y, point.pos.z }, - { point.pos.x + point.lineLen, point.pos.y, point.pos.z }, BLUE ) - RL_DrawLine3D( { point.pos.x, point.pos.y - point.lineLen, point.pos.z }, - { point.pos.x, point.pos.y + point.lineLen, point.pos.z }, BLUE ) - RL_DrawLine3D( { point.pos.x, point.pos.y, point.pos.z - point.lineLen }, - { point.pos.x, point.pos.y, point.pos.z + point.lineLen }, BLUE ) - RL_DrawSphereWires( point.pos, point.radius, 3, 8, point.color ) - RL_EndMode3D() - - RL_DrawText( 0, debugText, { 10, 10 }, 30, 4, WHITE ) +function RL.draw() + RL.ClearBackground( { 100, 150, 100 } ) + RL.UpdateCamera3D( camera ) + + RL.BeginMode3D( camera ) + RL.DrawGrid( 8, 1 ) + RL.DrawTriangle3D( tri.a, tri.b, tri.c, { 200, 100, 100 } ) + + RL.DrawLine3D( { point.pos.x - point.lineLen, point.pos.y, point.pos.z }, + { point.pos.x + point.lineLen, point.pos.y, point.pos.z }, RL.BLUE ) + RL.DrawLine3D( { point.pos.x, point.pos.y - point.lineLen, point.pos.z }, + { point.pos.x, point.pos.y + point.lineLen, point.pos.z }, RL.BLUE ) + RL.DrawLine3D( { point.pos.x, point.pos.y, point.pos.z - point.lineLen }, + { point.pos.x, point.pos.y, point.pos.z + point.lineLen }, RL.BLUE ) + RL.DrawSphereWires( point.pos, point.radius, 3, 8, point.color ) + RL.EndMode3D() + + RL.DrawText( 0, debugText, { 10, 10 }, 30, 4, RL.WHITE ) end diff --git a/examples/pong/main.lua b/examples/pong/main.lua index 7de5517..cc980ea 100644 --- a/examples/pong/main.lua +++ b/examples/pong/main.lua @@ -27,7 +27,7 @@ local function reset() -- Initialize player positions. playerLeft.pos[1] = playerLeft.size[1] playerLeft.pos[2] = winSize[2] / 2 - playerLeft.size[2] / 2 - + playerRight.pos[1] = winSize[1] - playerRight.size[1] * 2 playerRight.pos[2] = winSize[2] / 2 - playerRight.size[2] / 2 @@ -48,33 +48,33 @@ local function ballHit( padPos, padSize ) ball.vel[2] = BALL_SPEED * relHitPos / padSize[2] * 2 end -function init() +function RL.init() -- Set window to center of monitor. - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowSize( winSize ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - RL_SetWindowTitle( "Pong" ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowSize( winSize ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowTitle( "Pong" ) -- Initialize ball pos. math.randomseed( os.time() ) reset() end -function process( delta ) +function RL.process( delta ) -- Left player controls. - if RL_IsKeyDown( string.byte( "W" ) ) and 0 < playerLeft.pos[2] then + if RL.IsKeyDown( string.byte( "W" ) ) and 0 < playerLeft.pos[2] then playerLeft.pos[2] = playerLeft.pos[2] - PLAYER_SPEED * delta - elseif RL_IsKeyDown( string.byte( "S" ) ) and playerLeft.pos[2] + playerLeft.size[2] < winSize[2] then + elseif RL.IsKeyDown( string.byte( "S" ) ) and playerLeft.pos[2] + playerLeft.size[2] < winSize[2] then playerLeft.pos[2] = playerLeft.pos[2] + PLAYER_SPEED * delta end -- Right player controls. - if RL_IsKeyDown( KEY_UP ) and 0 < playerRight.pos[2] then + if RL.IsKeyDown( RL.KEY_UP ) and 0 < playerRight.pos[2] then playerRight.pos[2] = playerRight.pos[2] - PLAYER_SPEED * delta - elseif RL_IsKeyDown( KEY_DOWN ) and playerRight.pos[2] + playerRight.size[2] < winSize[2] then + elseif RL.IsKeyDown( RL.KEY_DOWN ) and playerRight.pos[2] + playerRight.size[2] < winSize[2] then playerRight.pos[2] = playerRight.pos[2] + PLAYER_SPEED * delta end @@ -94,9 +94,9 @@ function process( delta ) local playerRightRect = { playerRight.pos[1], playerRight.pos[2], playerRight.size[1], playerRight.size[2] } - if RL_CheckCollisionCircleRec( ball.pos, ball.radius, playerLeftRect ) and ball.vel[1] < 0 then + if RL.CheckCollisionCircleRec( ball.pos, ball.radius, playerLeftRect ) and ball.vel[1] < 0 then ballHit( playerLeft.pos, playerLeft.size ) - elseif RL_CheckCollisionCircleRec( ball.pos, ball.radius, playerRightRect ) and 0 < ball.vel[1] then + elseif RL.CheckCollisionCircleRec( ball.pos, ball.radius, playerRightRect ) and 0 < ball.vel[1] then ballHit( playerRight.pos, playerRight.size ) end @@ -110,18 +110,18 @@ function process( delta ) end end -function draw() - RL_ClearBackground( BLACK ) +function RL.draw() + RL.ClearBackground( RL.BLACK ) -- Draw players. - RL_DrawRectangle( { playerLeft.pos[1], playerLeft.pos[2], playerLeft.size[1], playerLeft.size[2] }, WHITE ) - RL_DrawRectangle( { playerRight.pos[1], playerRight.pos[2], playerRight.size[1], playerRight.size[2] }, WHITE ) + RL.DrawRectangle( { playerLeft.pos[1], playerLeft.pos[2], playerLeft.size[1], playerLeft.size[2] }, RL.WHITE ) + RL.DrawRectangle( { playerRight.pos[1], playerRight.pos[2], playerRight.size[1], playerRight.size[2] }, RL.WHITE ) -- Draw ball. Ball position will be the center in drawCircle. - RL_DrawCircle( ball.pos, ball.radius, WHITE ) + RL.DrawCircle( ball.pos, ball.radius, RL.WHITE ) -- Draw scire - RL_DrawText( 0, playerLeft.score, { 50, 10 }, 40, 2, WHITE ) - local rightTextSize = RL_MeasureText( 0, playerRight.score, 40, 2 ) - RL_DrawText( 0, playerRight.score, { winSize[1] - 50 - rightTextSize[1], 10 }, 40, 2, WHITE ) + RL.DrawText( 0, playerLeft.score, { 50, 10 }, 40, 2, RL.WHITE ) + local rightTextSize = RL.MeasureText( 0, playerRight.score, 40, 2 ) + RL.DrawText( 0, playerRight.score, { winSize[1] - 50 - rightTextSize[1], 10 }, 40, 2, RL.WHITE ) end diff --git a/examples/pong_vec/main.lua b/examples/pong_vec/main.lua index 4bf3d35..2b81452 100644 --- a/examples/pong_vec/main.lua +++ b/examples/pong_vec/main.lua @@ -1,6 +1,6 @@ -- Pong example using Vector2 library. -package.path = package.path..";"..RL_GetBasePath().."../resources/lib/?.lua" +package.path = package.path..";"..RL.GetBasePath().."../resources/lib/?.lua" Vec2 = require "vector2" @@ -54,33 +54,33 @@ local function ballHit( padPos, padSize ) ball.vel.y = BALL_SPEED * relHitPos / padSize.y * 2 end -function init() +function RL.init() -- Set window to center of monitor. - local mPos = Vec2:new( RL_GetMonitorPosition( monitor ) ) - local mSize = Vec2:new( RL_GetMonitorSize( monitor ) ) + local mPos = Vec2:new( RL.GetMonitorPosition( monitor ) ) + local mSize = Vec2:new( RL.GetMonitorSize( monitor ) ) - RL_SetConfigFlags( FLAG_VSYNC_HINT ) - RL_SetWindowSize( winSize ) - RL_SetWindowPosition( { mPos.x + mSize.x / 2 - winSize.x / 2, mPos.y + mSize.y / 2 - winSize.y / 2 } ) - RL_SetWindowTitle( "Pong" ) + RL.SetConfigFlags( RL.FLAG_VSYNC_HINT ) + RL.SetWindowSize( winSize ) + RL.SetWindowPosition( { mPos.x + mSize.x / 2 - winSize.x / 2, mPos.y + mSize.y / 2 - winSize.y / 2 } ) + RL.SetWindowTitle( "Pong" ) -- Initialize ball pos. math.randomseed( os.time() ) reset() end -function process( delta ) +function RL.process( delta ) -- Left player controls. - if RL_IsKeyDown( KEY_W ) and 0 < playerLeft.pos.y then + if RL.IsKeyDown( RL.KEY_W ) and 0 < playerLeft.pos.y then playerLeft.pos.y = playerLeft.pos.y - PLAYER_SPEED * delta - elseif RL_IsKeyDown( KEY_S ) and playerLeft.pos.y + playerLeft.size.y < winSize.y then + elseif RL.IsKeyDown( RL.KEY_S ) and playerLeft.pos.y + playerLeft.size.y < winSize.y then playerLeft.pos.y = playerLeft.pos.y + PLAYER_SPEED * delta end -- Right player controls. - if RL_IsKeyDown( KEY_UP ) and 0 < playerRight.pos.y then + if RL.IsKeyDown( RL.KEY_UP ) and 0 < playerRight.pos.y then playerRight.pos.y = playerRight.pos.y - PLAYER_SPEED * delta - elseif RL_IsKeyDown( KEY_DOWN ) and playerRight.pos.y + playerRight.size.y < winSize.y then + elseif RL.IsKeyDown( RL.KEY_DOWN ) and playerRight.pos.y + playerRight.size.y < winSize.y then playerRight.pos.y = playerRight.pos.y + PLAYER_SPEED * delta end @@ -99,9 +99,9 @@ function process( delta ) local playerRightRect = { playerRight.pos.x, playerRight.pos.y, playerRight.size.x, playerRight.size.y } - if RL_CheckCollisionCircleRec( ball.pos, ball.radius, playerLeftRect ) and ball.vel.x < 0 then + if RL.CheckCollisionCircleRec( ball.pos, ball.radius, playerLeftRect ) and ball.vel.x < 0 then ballHit( playerLeft.pos, playerLeft.size ) - elseif RL_CheckCollisionCircleRec( ball.pos, ball.radius, playerRightRect ) and 0 < ball.vel.x then + elseif RL.CheckCollisionCircleRec( ball.pos, ball.radius, playerRightRect ) and 0 < ball.vel.x then ballHit( playerRight.pos, playerRight.size ) end @@ -115,18 +115,18 @@ function process( delta ) end end -function draw() - RL_ClearBackground( BLACK ) +function RL.draw() + RL.ClearBackground( RL.BLACK ) -- Draw players. - RL_DrawRectangle( { playerLeft.pos.x, playerLeft.pos.y, playerLeft.size.x, playerLeft.size.y }, WHITE ) - RL_DrawRectangle( { playerRight.pos.x, playerRight.pos.y, playerRight.size.x, playerRight.size.y }, WHITE ) + RL.DrawRectangle( { playerLeft.pos.x, playerLeft.pos.y, playerLeft.size.x, playerLeft.size.y }, RL.WHITE ) + RL.DrawRectangle( { playerRight.pos.x, playerRight.pos.y, playerRight.size.x, playerRight.size.y }, RL.WHITE ) -- Draw ball. Ball position will be the center in drawCircle. - RL_DrawCircle( ball.pos, ball.radius, WHITE ) + RL.DrawCircle( ball.pos, ball.radius, RL.WHITE ) -- Draw score. - RL_DrawText( 0, playerLeft.score, { 50, 10 }, 40, 2, WHITE ) - local rightTextSize = Vec2:new( RL_MeasureText( 0, playerRight.score, 40, 2 ) ) - RL_DrawText( 0, playerRight.score, { winSize.x - 50 - rightTextSize.x, 10 }, 40, 2, WHITE ) + RL.DrawText( 0, playerLeft.score, { 50, 10 }, 40, 2, RL.WHITE ) + local rightTextSize = Vec2:new( RL.MeasureText( 0, playerRight.score, 40, 2 ) ) + RL.DrawText( 0, playerRight.score, { winSize.x - 50 - rightTextSize.x, 10 }, 40, 2, RL.WHITE ) end diff --git a/examples/ray/main.lua b/examples/ray/main.lua index 0c594d0..18b7394 100644 --- a/examples/ray/main.lua +++ b/examples/ray/main.lua @@ -4,17 +4,17 @@ local ray = { { 0.5, 0, 4 }, { 0.1, 0, -1 } } local function setupWindow() local monitor = 0 - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - local winSize = RL_GetScreenSize() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + local winSize = RL.GetScreenSize() - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) end function ray_collision() - local rayCol = RL_GetRayCollisionMesh( ray, sphereMesh, RL_MatrixIdentity() ) + local rayCol = RL.GetRayCollisionMesh( ray, sphereMesh, RL.MatrixIdentity() ) if rayCol ~= nil and rayCol.hit then print( "hit", rayCol.hit ) @@ -24,35 +24,35 @@ function ray_collision() end end -function init() +function RL.init() setupWindow() - camera = RL_CreateCamera3D() - RL_SetCamera3DPosition( camera, { 0, 2, 4 } ) - RL_SetCamera3DTarget( camera, { 0, 0, 0 } ) - RL_SetCamera3DUp( camera, { 0, 1, 0 } ) - RL_SetCameraMode( camera, CAMERA_FREE ) + camera = RL.CreateCamera3D() + RL.SetCamera3DPosition( camera, { 0, 2, 4 } ) + RL.SetCamera3DTarget( camera, { 0, 0, 0 } ) + RL.SetCamera3DUp( camera, { 0, 1, 0 } ) + RL.SetCameraMode( camera, RL.CAMERA_FREE ) - sphereMesh = RL_GenMeshSphere( 1.0, 8, 10 ) + sphereMesh = RL.GenMeshSphere( 1.0, 8, 10 ) ray_collision() end -function process( delta ) - if RL_IsMouseButtonPressed( 0 ) then - ray = RL_GetMouseRay( RL_GetMousePosition(), camera ) +function RL.process( delta ) + if RL.IsMouseButtonPressed( 0 ) then + ray = RL.GetMouseRay( RL.GetMousePosition(), camera ) ray_collision() end end -function draw() - RL_ClearBackground( { 100, 150, 100 } ) - RL_UpdateCamera3D( camera ) - - RL_BeginMode3D( camera ) - RL_DrawGrid( 8, 1 ) - RL_DrawRay( ray, { 255, 100, 100 } ) +function RL.draw() + RL.ClearBackground( { 100, 150, 100 } ) + RL.UpdateCamera3D( camera ) - RL_DrawMesh( sphereMesh, 0, RL_MatrixIdentity() ) - RL_EndMode3D() + RL.BeginMode3D( camera ) + RL.DrawGrid( 8, 1 ) + RL.DrawRay( ray, { 255, 100, 100 } ) + + RL.DrawMesh( sphereMesh, 0, RL.MatrixIdentity() ) + RL.EndMode3D() end diff --git a/examples/resources/lib/gui.lua b/examples/resources/lib/gui.lua index 305fb47..8335247 100644 --- a/examples/resources/lib/gui.lua +++ b/examples/resources/lib/gui.lua @@ -10,7 +10,7 @@ Color = require( "color" ) To if ((CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE) && (action == GLFW_PRESS || action == GLFW_REPEAT)) - Now GLFW_REPEAT can be read by "RL_GetKeyPressed". + Now GLFW_REPEAT can be read by "RL.GetKeyPressed". ]] Gui = { @@ -39,7 +39,7 @@ Gui = { RECTANGLE_ROUNDED_LINES = 8, }, - mouseButton = MOUSE_BUTTON_LEFT, + mouseButton = RL.MOUSE_BUTTON_LEFT, font = 0, fontSize = 20, padding = 2, @@ -114,12 +114,12 @@ function Gui.set2Back( cell ) end function Gui.process( mousePosition ) - local mouseWheel = RL_GetMouseWheelMove() + local mouseWheel = RL.GetMouseWheelMove() Gui._mousePos = mousePosition if Gui.heldCallback ~= nil then - if RL_IsMouseButtonDown( Gui.mouseButton ) then + if RL.IsMouseButtonDown( Gui.mouseButton ) then Gui.heldCallback() else Gui.heldCallback = nil @@ -129,7 +129,7 @@ function Gui.process( mousePosition ) end local foundFirst = false - + -- Go backwards on process check so we trigger the top most ui first and stop there. for i = #Gui._cells, 1, -1 do local cell = Gui._cells[i] @@ -137,11 +137,11 @@ function Gui.process( mousePosition ) if cell ~= nil then if not foundFirst and cell.isMouseOver ~= nil and cell:isMouseOver( mousePosition ) and not cell.disabled then -- On clicked. - if RL_IsMouseButtonPressed( Gui.mouseButton ) and cell.onClicked ~= nil then + if RL.IsMouseButtonPressed( Gui.mouseButton ) and cell.onClicked ~= nil then cell:onClicked() end -- On held. - if RL_IsMouseButtonDown( Gui.mouseButton ) and cell.onHeld ~= nil then + if RL.IsMouseButtonDown( Gui.mouseButton ) and cell.onHeld ~= nil then cell:onHeld() end -- Mouse wheel scrolling. @@ -149,19 +149,19 @@ function Gui.process( mousePosition ) if cell._parent ~= nil and cell._parent.scrollable then cell = cell._parent end - + if cell.scrollable then local pos = Vec2:new( cell._scrollRect.x, cell._scrollRect.y ) local scrollVec = Vec2:new( 0, cell.scrollAmount * mouseWheel ) - - if RL_IsKeyDown( KEY_LEFT_SHIFT ) then + + if RL.IsKeyDown( RL.KEY_LEFT_SHIFT ) then scrollVec = Vec2:new( cell.scrollAmount * mouseWheel, 0 ) end - + cell:scroll( pos - scrollVec ) end end - + foundFirst = true elseif cell.notMouseOver ~= nil then cell:notMouseOver() @@ -172,7 +172,7 @@ function Gui.process( mousePosition ) -- Text input. if Gui._inputItem ~= nil then repeat - local char = RL_GetCharPressed() + local char = RL.GetCharPressed() if 0 < char then if utf8.len( Gui._inputItem.text ) < Gui._inputItem.maxTextLen then @@ -183,24 +183,24 @@ function Gui.process( mousePosition ) until char == 0 repeat - local key = RL_GetKeyPressed() + local key = RL.GetKeyPressed() if 0 < key then - if key == KEY_BACKSPACE then + if key == RL.KEY_BACKSPACE then Gui._inputItem.text = util.utf8Sub( Gui._inputItem.text, 0, utf8.len( Gui._inputItem.text ) - 1 ) - elseif key == KEY_ENTER or key == KEY_KP_ENTER then + elseif key == RL.KEY_ENTER or key == RL.KEY_KP_ENTER then if Gui._inputItem.allowLineBreak then Gui._inputItem.text = Gui._inputItem.text.."\n" else Gui.inputUnfocus() end - elseif key == KEY_ESCAPE then + elseif key == RL.KEY_ESCAPE then Gui.inputUnfocus() end end until key == 0 - if readyToUnfocusInput and RL_IsMouseButtonPressed( Gui.mouseButton ) then + if readyToUnfocusInput and RL.IsMouseButtonPressed( Gui.mouseButton ) then Gui.inputUnfocus() end @@ -234,7 +234,7 @@ function Text:new( set ) object.text = setProperty( set, "text", "" ) object.fontSize = setProperty( set, "fontSize", Gui.fontSize ) object.spacing = setProperty( set, "spacing", Gui.spacing ) - object.color = setProperty( set, "color", Color:new( BLACK ) ) + object.color = setProperty( set, "color", Color:new( RL.BLACK ) ) object.maxTextLen = setProperty( set, "maxTextLen", nil ) object.allowLineBreak = setProperty( set, "allowLineBreak", false ) @@ -253,7 +253,7 @@ function Text:set( text ) self.text = text end - local textSize = Vec2:new( RL_MeasureText( self.font, self.text, self.fontSize, self.spacing ) ) + local textSize = Vec2:new( RL.MeasureText( self.font, self.text, self.fontSize, self.spacing ) ) self.bounds.width = textSize.x self.bounds.height = textSize.y @@ -264,7 +264,7 @@ function Text:draw() return end - RL_DrawText( self.font, self.text, { self._parent.bounds.x + self.bounds.x, self._parent.bounds.y + self.bounds.y }, self.fontSize, self.spacing, self.color ) + RL.DrawText( self.font, self.text, { self._parent.bounds.x + self.bounds.x, self._parent.bounds.y + self.bounds.y }, self.fontSize, self.spacing, self.color ) end -- Texture. @@ -283,7 +283,7 @@ function Texture:new( set ) object.source = setProperty( set, "source", Rect:new( 0, 0, 0, 0 ) ) object.origin = setProperty( set, "origin", Vec2:new( 0, 0 ) ) object.rotation = setProperty( set, "rotation", 0 ) - object.color = setProperty( set, "color", Color:new( WHITE ) ) + object.color = setProperty( set, "color", Color:new( RL.WHITE ) ) object.nPatchInfo = setProperty( set, "nPatchInfo", nil ) object.visible = setProperty( set, "visible", true ) @@ -299,7 +299,7 @@ function Texture:set( texture ) return end - local texSize = Vec2:new( RL_GetTextureSize( texture ) ) + local texSize = Vec2:new( RL.GetTextureSize( texture ) ) if self.bounds.width == 0 or self.bounds.height == 0 then self.bounds.width = texSize.x @@ -326,9 +326,9 @@ function Texture:draw() } if self.nPatchInfo ~= nil then - RL_DrawTextureNPatch( self.texture, self.nPatchInfo, dst, self.origin, self.rotation, self.color ) + RL.DrawTextureNPatch( self.texture, self.nPatchInfo, dst, self.origin, self.rotation, self.color ) else - RL_DrawTexturePro( self.texture, self.source, dst, self.origin, self.rotation, self.color ) + RL.DrawTexturePro( self.texture, self.source, dst, self.origin, self.rotation, self.color ) end end @@ -359,7 +359,7 @@ function Shape:new( set ) object.roundness = setProperty( set, "roundness", 1 ) object.segments = setProperty( set, "segments", 4 ) - object.color = setProperty( set, "color", Color:new( WHITE ) ) + object.color = setProperty( set, "color", Color:new( RL.WHITE ) ) object.visible = setProperty( set, "visible", true ) object._parent = nil @@ -392,23 +392,23 @@ function Shape:draw() local pos = Vec2:new( self._parent.bounds.x, self._parent.bounds.y ) if self.shape == Gui.SHAPE.LINE then - RL_DrawLine( self.startPos + pos, self.endPos + pos, self.thickness, self.color ) + RL.DrawLine( self.startPos + pos, self.endPos + pos, self.thickness, self.color ) elseif self.shape == Gui.SHAPE.CIRCLE then - RL_DrawCircle( self.center + pos, self.radius, self.color ) + RL.DrawCircle( self.center + pos, self.radius, self.color ) elseif self.shape == Gui.SHAPE.CIRCLE_LINES then - RL_DrawCircleLines( self.center + pos, self.radius, self.color ) + RL.DrawCircleLines( self.center + pos, self.radius, self.color ) elseif self.shape == Gui.SHAPE.ELLIPSE then - RL_DrawEllipse( self.center + pos, self.radiusH, self.radiusV, self.color ) + RL.DrawEllipse( self.center + pos, self.radiusH, self.radiusV, self.color ) elseif self.shape == Gui.SHAPE.ELLIPSE_LINES then - RL_DrawEllipseLines( self.center + pos, self.radiusH, self.radiusV, self.color ) + RL.DrawEllipseLines( self.center + pos, self.radiusH, self.radiusV, self.color ) elseif self.shape == Gui.SHAPE.RECTANGLE then - RL_DrawRectangle( { self.bounds.x + pos.x, self.bounds.y + pos.y, self.bounds.width, self.bounds.height }, self.color ) + RL.DrawRectangle( { self.bounds.x + pos.x, self.bounds.y + pos.y, self.bounds.width, self.bounds.height }, self.color ) elseif self.shape == Gui.SHAPE.RECTANGLE_LINES then - RL_DrawRectangleLines( { self.bounds.x + pos.x, self.bounds.y + pos.y, self.bounds.width, self.bounds.height }, self.color ) + RL.DrawRectangleLines( { self.bounds.x + pos.x, self.bounds.y + pos.y, self.bounds.width, self.bounds.height }, self.color ) elseif self.shape == Gui.SHAPE.RECTANGLE_ROUNDED then - RL_DrawRectangleRounded( { self.bounds.x + pos.x, self.bounds.y + pos.y, self.bounds.width, self.bounds.height }, self.roundness, self.segments, self.color ) + RL.DrawRectangleRounded( { self.bounds.x + pos.x, self.bounds.y + pos.y, self.bounds.width, self.bounds.height }, self.roundness, self.segments, self.color ) elseif self.shape == Gui.SHAPE.RECTANGLE_ROUNDED_LINES then - RL_DrawRectangleRoundedLines( { self.bounds.x + pos.x, self.bounds.y + pos.y, self.bounds.width, self.bounds.height }, self.roundness, self.segments, self.thickness, self.color ) + RL.DrawRectangleRoundedLines( { self.bounds.x + pos.x, self.bounds.y + pos.y, self.bounds.width, self.bounds.height }, self.roundness, self.segments, self.thickness, self.color ) end end @@ -428,10 +428,10 @@ function Element:new( set ) object.visible = setProperty( set, "visible", true ) object.disabled = setProperty( set, "disabled", false ) object.drawBounds = setProperty( set, "drawBounds", false ) - object.color = setProperty( set, "color", Color:new( GRAY ) ) + object.color = setProperty( set, "color", Color:new( RL.GRAY ) ) object.items = {} - + object._visibilityBounds = nil -- Callbacks. object.onMouseOver = setProperty( set, "onMouseOver", nil ) @@ -481,10 +481,10 @@ function Element:add( item ) end function Element:isMouseOver( mousePosition ) - local over = RL_CheckCollisionPointRec( mousePosition, self.bounds ) + local over = RL.CheckCollisionPointRec( mousePosition, self.bounds ) if over and self._visibilityBounds ~= nil then - over = RL_CheckCollisionPointRec( mousePosition, self._visibilityBounds ) + over = RL.CheckCollisionPointRec( mousePosition, self._visibilityBounds ) end if over and self.onMouseOver ~= nil then @@ -498,7 +498,7 @@ function Element:draw() local usedScissor = false if self._visibilityBounds ~= nil then - local rect = Rect:new( RL_GetCollisionRec( self.bounds, self._visibilityBounds ) ) + local rect = Rect:new( RL.GetCollisionRec( self.bounds, self._visibilityBounds ) ) -- Use scissor mode only on partyally visible. if rect.width == 0 and rect.height == 0 then @@ -506,12 +506,12 @@ function Element:draw() elseif math.floor( rect.width ) ~= math.floor( self.bounds.width ) or math.floor( rect.height ) ~= math.floor( self.bounds.height ) then usedScissor = true - RL_BeginScissorMode( self._visibilityBounds ) + RL.BeginScissorMode( self._visibilityBounds ) end end - + if self.drawBounds then - RL_DrawRectangle( self.bounds, self.color ) + RL.DrawRectangle( self.bounds, self.color ) end for _, item in ipairs( self.items ) do @@ -519,7 +519,7 @@ function Element:draw() end if usedScissor then - RL_EndScissorMode() + RL.EndScissorMode() end end @@ -557,15 +557,15 @@ function Container:new( set ) object.showScrollbar = setProperty( set, "showScrollbar", false ) object.scrollbarWidth = setProperty( set, "scrollbarWidth", Gui.scrollbarWidth ) object.scrollAmount = setProperty( set, "scrollAmount", Gui.scrollAmount ) -- When using mouse scroll. - object.color = setProperty( set, "color", Color:new( WHITE ) ) + object.color = setProperty( set, "color", Color:new( RL.WHITE ) ) object.drawBounds = setProperty( set, "drawBounds", false ) object.drawScrollRect = setProperty( set, "drawScrollRect", false ) -- For grid container. Do not set both. object.columns = setProperty( set, "columns", nil ) object.rows = setProperty( set, "rows", nil ) - + object.cells = {} - + object._visibilityBounds = nil -- Will give this to it's children. object._scrollRect = Rect:new( 0, 0, 0, 0 ) object._VScrollbarRect = Rect:new( 0, 0, 0, 0 ) @@ -638,10 +638,10 @@ function Container:mouseScroll( v ) end function Container:isMouseOver( mousePosition ) - local over = RL_CheckCollisionPointRec( mousePosition, self.bounds ) + local over = RL.CheckCollisionPointRec( mousePosition, self.bounds ) if over and self._visibilityBounds ~= nil then - over = RL_CheckCollisionPointRec( mousePosition, self._visibilityBounds ) + over = RL.CheckCollisionPointRec( mousePosition, self._visibilityBounds ) end if over and self.onMouseOver ~= nil then @@ -668,7 +668,7 @@ function Container:updateScrollbar() self._VScrollbar.visible = false self._VScrollbar.disabled = true end - + if self.bounds.width < self._scrollRect.width then self._HScrollbar.bounds.width = self.bounds.width self._HScrollbar.bounds.height = self.scrollbarWidth @@ -701,7 +701,7 @@ function Container:update() self._VScrollbar = Element:new( { padding = 0, drawBounds = true, - color = Color:new( GRAY ), + color = Color:new( RL.GRAY ), onClicked = function() Gui.heldCallback = function() self:mouseScroll( Vec2:new( 0, 1 ) ) end end, } ) @@ -710,7 +710,7 @@ function Container:update() VAling = Gui.ALING.NONE, bounds = Rect:new( 0, 0, 0, 0 ), shape = Gui.SHAPE.RECTANGLE_ROUNDED, - color = Color:new( LIGHTGRAY ), + color = Color:new( RL.LIGHTGRAY ), } ) ) end @@ -718,7 +718,7 @@ function Container:update() self._HScrollbar = Element:new( { padding = 0, drawBounds = true, - color = Color:new( GRAY ), + color = Color:new( RL.GRAY ), onClicked = function() Gui.heldCallback = function() self:mouseScroll( Vec2:new( 1, 0 ) ) end end, } ) @@ -727,7 +727,7 @@ function Container:update() VAling = Gui.ALING.CENTER, bounds = Rect:new( 0, 0, 0, 0 ), shape = Gui.SHAPE.RECTANGLE_ROUNDED, - color = Color:new( LIGHTGRAY ), + color = Color:new( RL.LIGHTGRAY ), } ) ) end end @@ -748,7 +748,7 @@ function Container:update() elseif self.HAling == Gui.ALING.RIGHT then pos.x = self.bounds.x + self.bounds.width - cell.bounds.width - self.spacing end - + cell.bounds.x = pos.x - self._scrollRect.x cell.bounds.y = pos.y - self._scrollRect.y @@ -811,7 +811,7 @@ function Container:delete() for _, cell in ipairs( self.cells ) do cell:delete() end - + if self._VScrollbar ~= nil then Gui.delete( self._VScrollbar ) end @@ -828,7 +828,7 @@ function Container:set2Top() for _, cell in ipairs( self.cells ) do cell:set2Top() end - + if self._VScrollbar ~= nil then Gui.set2Top( self._VScrollbar ) end @@ -844,27 +844,27 @@ function Container:set2Back() if self._HScrollbar ~= nil then Gui.set2Back( self._HScrollbar ) end - + for _, cell in ipairs( self.cells ) do cell:set2Back() end - + Gui.set2Back( self ) end function Container:draw() if self.drawBounds then - RL_DrawRectangle( self.bounds, self.color ) + RL.DrawRectangle( self.bounds, self.color ) end if self.drawScrollRect then - RL_DrawRectangleLines( { + RL.DrawRectangleLines( { self.bounds.x - self._scrollRect.x, self.bounds.y - self._scrollRect.y, self._scrollRect.width, self._scrollRect.height, }, - RED ) + RL.RED ) end end diff --git a/examples/resources/lib/utillib.lua b/examples/resources/lib/utillib.lua index 7fb7405..3021465 100644 --- a/examples/resources/lib/utillib.lua +++ b/examples/resources/lib/utillib.lua @@ -15,7 +15,7 @@ function utillib.deepCopy( orig ) for origKey, origValue in next, orig, nil do -- If object has clone method, use that. if type( origValue ) == "table" and type( origValue.clone ) == "function" then - copy[ utillib.deepCopy( origKey ) ] = orig_value:clone() + copy[ utillib.deepCopy( origKey ) ] = origValue:clone() else copy[ utillib.deepCopy( origKey ) ] = utillib.deepCopy( origValue ) end @@ -128,9 +128,9 @@ end function utillib.wrapAngleRad( angle ) if angle < 0 then - return math.fmod( angle, PI * 2 ) + PI * 2 + return math.fmod( angle, RL.PI * 2 ) + RL.PI * 2 else - return math.fmod( angle, PI * 2 ) + return math.fmod( angle, RL.PI * 2 ) end end diff --git a/examples/resources/lib/vector2.lua b/examples/resources/lib/vector2.lua index 70a2a35..65452cf 100644 --- a/examples/resources/lib/vector2.lua +++ b/examples/resources/lib/vector2.lua @@ -38,7 +38,7 @@ Vector2.meta = { return len end, __eq = function( v1, v2 ) - return RL_Vector2Equals( v1, v2 ) == 1 + return RL.Vector2Equals( v1, v2 ) == 1 end, } @@ -91,79 +91,79 @@ function Vector2:max( v2 ) end function Vector2:addValue( value ) - return Vector2:new( RL_Vector2AddValue( self, value ) ) + return Vector2:new( RL.Vector2AddValue( self, value ) ) end function Vector2:subValue( value ) - return Vector2:new( RL_Vector2SubtractValue( self, value ) ) + return Vector2:new( RL.Vector2SubtractValue( self, value ) ) end function Vector2:length() - return RL_Vector2Length( self ) + return RL.Vector2Length( self ) end function Vector2:lengthSqr() - return RL_Vector2LengthSqr( self ) + return RL.Vector2LengthSqr( self ) end function Vector2:dot( v2 ) - return RL_Vector2DotProduct( self, v2 ) + return RL.Vector2DotProduct( self, v2 ) end function Vector2:distance( v2 ) - return RL_Vector2Distance( self, v2 ) + return RL.Vector2Distance( self, v2 ) end function Vector2:distanceSqr( v2 ) - return RL_Vector2DistanceSqr( self, v2 ) + return RL.Vector2DistanceSqr( self, v2 ) end function Vector2:angle( v2 ) - return RL_Vector2Angle( self, v2 ) + return RL.Vector2Angle( self, v2 ) end function Vector2:scale( scale ) - return Vector2:new( RL_Vector2Scale( self, scale ) ) + return Vector2:new( RL.Vector2Scale( self, scale ) ) end function Vector2:normalize() - return Vector2:new( RL_Vector2Normalize( self ) ) + return Vector2:new( RL.Vector2Normalize( self ) ) end function Vector2:transform( mat ) - return Vector2:new( RL_Vector2Transform( self, mat ) ) + return Vector2:new( RL.Vector2Transform( self, mat ) ) end function Vector2:lerp( v2, value ) - return Vector2:new( RL_Vector2Lerp( self, v2, value ) ) + return Vector2:new( RL.Vector2Lerp( self, v2, value ) ) end function Vector2:reflect( normal ) - return Vector2:new( RL_Vector2Reflect( self, normal ) ) + return Vector2:new( RL.Vector2Reflect( self, normal ) ) end function Vector2:rotate( angle ) - return Vector2:new( RL_Vector2Rotate( self, angle ) ) + return Vector2:new( RL.Vector2Rotate( self, angle ) ) end function Vector2:moveTowards( target, maxDistance ) - return Vector2:new( RL_Vector2MoveTowards( self, target, maxDistance ) ) + return Vector2:new( RL.Vector2MoveTowards( self, target, maxDistance ) ) end function Vector2:invert() - return Vector2:new( RL_Vector2Invert( self ) ) + return Vector2:new( RL.Vector2Invert( self ) ) end function Vector2:clamp( min, max ) - return Vector2:new( RL_Vector2Clamp( self, min, max ) ) + return Vector2:new( RL.Vector2Clamp( self, min, max ) ) end function Vector2:clampValue( min, max ) - return Vector2:new( RL_Vector2ClampValue( self, min, max ) ) + return Vector2:new( RL.Vector2ClampValue( self, min, max ) ) end function Vector2:equals( v2 ) - return RL_Vector2Equals( self, v2 ) + return RL.Vector2Equals( self, v2 ) end return Vector2 diff --git a/examples/resources/lib/vector3.lua b/examples/resources/lib/vector3.lua index b93601e..2a25a5f 100644 --- a/examples/resources/lib/vector3.lua +++ b/examples/resources/lib/vector3.lua @@ -38,7 +38,7 @@ Vector3.meta = { return len end, __eq = function( v1, v2 ) - return RL_Vector3Equals( v1, v2 ) == 1 + return RL.Vector3Equals( v1, v2 ) == 1 end, } @@ -85,104 +85,104 @@ function Vector3:abs() end function Vector3:min( v2 ) - return Vector3:new( RL_Vector3Min( self, v2 ) ) + return Vector3:new( RL.Vector3Min( self, v2 ) ) end function Vector3:max( v2 ) - return Vector3:new( RL_Vector3Max( self, v2 ) ) + return Vector3:new( RL.Vector3Max( self, v2 ) ) end function Vector3:addValue( value ) - return Vector3:new( RL_Vector3AddValue( self, value ) ) + return Vector3:new( RL.Vector3AddValue( self, value ) ) end function Vector3:subValue( value ) - return Vector3:new( RL_Vector3SubtractValue( self, value ) ) + return Vector3:new( RL.Vector3SubtractValue( self, value ) ) end function Vector3:scale( scalar ) - return Vector3:new( RL_Vector3Scale( self, scalar ) ) + return Vector3:new( RL.Vector3Scale( self, scalar ) ) end function Vector3:cross( v2 ) - return Vector3:new( RL_Vector3CrossProduct( self, v2 ) ) + return Vector3:new( RL.Vector3CrossProduct( self, v2 ) ) end function Vector3:perpendicular() - return Vector3:new( RL_Vector3Perpendicular( self ) ) + return Vector3:new( RL.Vector3Perpendicular( self ) ) end function Vector3:length() - return RL_Vector3Length( self ) + return RL.Vector3Length( self ) end function Vector3:lengthSqr() - return RL_Vector3LengthSqr( self ) + return RL.Vector3LengthSqr( self ) end function Vector3:dot( v2 ) - return RL_Vector3DotProduct( self, v2 ) + return RL.Vector3DotProduct( self, v2 ) end function Vector3:distance( v2 ) - return RL_Vector3Distance( self, v2 ) + return RL.Vector3Distance( self, v2 ) end function Vector3:distanceSqr( v2 ) - return RL_Vector3DistanceSqr( self, v2 ) + return RL.Vector3DistanceSqr( self, v2 ) end function Vector3:angle( v2 ) - return RL_Vector3Angle( self, v2 ) + return RL.Vector3Angle( self, v2 ) end function Vector3:negate() - return Vector3:new( RL_Vector3Negate( self ) ) + return Vector3:new( RL.Vector3Negate( self ) ) end function Vector3:normalize() - return Vector3:new( RL_Vector3Normalize( self ) ) + return Vector3:new( RL.Vector3Normalize( self ) ) end function Vector3:orthoNormalize( v2 ) - local r1, r2 = RL_Vector3OrthoNormalize( self, v2 ) + local r1, r2 = RL.Vector3OrthoNormalize( self, v2 ) return Vector3:new( r1[1], r1[2], r1[3] ), Vector3:new( r2[1], r2[2], r2[3] ) end function Vector3:transform( mat ) - return Vector3:new( RL_Vector3Transform( self, mat ) ) + return Vector3:new( RL.Vector3Transform( self, mat ) ) end function Vector3:rotateByQuaternion( q ) - return Vector3:new( RL_Vector3RotateByQuaternion( self, q ) ) + return Vector3:new( RL.Vector3RotateByQuaternion( self, q ) ) end function Vector3:rotateByAxisAngle( axis, angle ) - return Vector3:new( RL_Vector3RotateByAxisAngle( self, axis, angle ) ) + return Vector3:new( RL.Vector3RotateByAxisAngle( self, axis, angle ) ) end function Vector3:lerp( v2, value ) - return Vector3:new( RL_Vector3Lerp( self, v2, value ) ) + return Vector3:new( RL.Vector3Lerp( self, v2, value ) ) end function Vector3:reflect( normal ) - return Vector3:new( RL_Vector3Reflect( self, normal ) ) + return Vector3:new( RL.Vector3Reflect( self, normal ) ) end function Vector3:invert() - return Vector3:new( RL_Vector3Invert( self ) ) + return Vector3:new( RL.Vector3Invert( self ) ) end function Vector3:clamp( min, max ) - return Vector3:new( RL_Vector3Clamp( self, min, max ) ) + return Vector3:new( RL.Vector3Clamp( self, min, max ) ) end function Vector3:clampValue( min, max ) - return Vector3:new( RL_Vector3ClampValue( self, min, max ) ) + return Vector3:new( RL.Vector3ClampValue( self, min, max ) ) end function Vector3:equals( v2 ) - return RL_Vector3Equals( self, v2 ) + return RL.Vector3Equals( self, v2 ) end return Vector3 diff --git a/examples/shaders/main.lua b/examples/shaders/main.lua index a91f1ee..e5f59ed 100644 --- a/examples/shaders/main.lua +++ b/examples/shaders/main.lua @@ -8,27 +8,27 @@ local GLSL_VERSION = "330" -- PLATFORM_DESKTOP local secondsLoc -function init() - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - local winSize = RL_GetScreenSize() - - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) - - texture = RL_LoadTexture( RL_GetBasePath().."../resources/images/cat.png" ) - textureSize = RL_GetTextureSize( texture ) - shader = RL_LoadShader( nil, RL_GetBasePath().."../resources/shaders/glsl"..GLSL_VERSION.."/wave.fs" ) - - secondsLoc = RL_GetShaderLocation( shader, "secondes" ) - local sizeLoc = RL_GetShaderLocation( shader, "size" ) - local freqXLoc = RL_GetShaderLocation( shader, "freqX" ) - local freqYLoc = RL_GetShaderLocation( shader, "freqY" ) - local ampXLoc = RL_GetShaderLocation( shader, "ampX" ) - local ampYLoc = RL_GetShaderLocation( shader, "ampY" ) - local speedXLoc = RL_GetShaderLocation( shader, "speedX" ) - local speedYLoc = RL_GetShaderLocation( shader, "speedY" ) +function RL.init() + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + local winSize = RL.GetScreenSize() + + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + + texture = RL.LoadTexture( RL.GetBasePath().."../resources/images/cat.png" ) + textureSize = RL.GetTextureSize( texture ) + shader = RL.LoadShader( nil, RL.GetBasePath().."../resources/shaders/glsl"..GLSL_VERSION.."/wave.fs" ) + + secondsLoc = RL.GetShaderLocation( shader, "secondes" ) + local sizeLoc = RL.GetShaderLocation( shader, "size" ) + local freqXLoc = RL.GetShaderLocation( shader, "freqX" ) + local freqYLoc = RL.GetShaderLocation( shader, "freqY" ) + local ampXLoc = RL.GetShaderLocation( shader, "ampX" ) + local ampYLoc = RL.GetShaderLocation( shader, "ampY" ) + local speedXLoc = RL.GetShaderLocation( shader, "speedX" ) + local speedYLoc = RL.GetShaderLocation( shader, "speedY" ) local freqX = 25.0 local freqY = 25.0 @@ -37,25 +37,25 @@ function init() local speedX = 8.0 local speedY = 8.0 - RL_SetShaderValue( shader, sizeLoc, textureSize, SHADER_UNIFORM_VEC2 ) - RL_SetShaderValue( shader, freqXLoc, { freqX }, SHADER_UNIFORM_FLOAT ) - RL_SetShaderValue( shader, freqYLoc, { freqY }, SHADER_UNIFORM_FLOAT ) - RL_SetShaderValue( shader, ampXLoc, { ampX }, SHADER_UNIFORM_FLOAT ) - RL_SetShaderValue( shader, ampYLoc, { ampY }, SHADER_UNIFORM_FLOAT ) - RL_SetShaderValue( shader, speedXLoc, { speedX }, SHADER_UNIFORM_FLOAT ) - RL_SetShaderValue( shader, speedYLoc, { speedY }, SHADER_UNIFORM_FLOAT ) + RL.SetShaderValue( shader, sizeLoc, textureSize, RL.SHADER_UNIFORM_VEC2 ) + RL.SetShaderValue( shader, freqXLoc, { freqX }, RL.SHADER_UNIFORM_FLOAT ) + RL.SetShaderValue( shader, freqYLoc, { freqY }, RL.SHADER_UNIFORM_FLOAT ) + RL.SetShaderValue( shader, ampXLoc, { ampX }, RL.SHADER_UNIFORM_FLOAT ) + RL.SetShaderValue( shader, ampYLoc, { ampY }, RL.SHADER_UNIFORM_FLOAT ) + RL.SetShaderValue( shader, speedXLoc, { speedX }, RL.SHADER_UNIFORM_FLOAT ) + RL.SetShaderValue( shader, speedYLoc, { speedY }, RL.SHADER_UNIFORM_FLOAT ) end local seconds = 0.0 -function draw() - seconds = seconds + RL_GetFrameTime(); +function RL.draw() + seconds = seconds + RL.GetFrameTime(); - RL_SetShaderValue( shader, secondsLoc, { seconds }, SHADER_UNIFORM_FLOAT ); + RL.SetShaderValue( shader, secondsLoc, { seconds }, RL.SHADER_UNIFORM_FLOAT ); - RL_ClearBackground( { 100, 150, 100 } ) + RL.ClearBackground( { 100, 150, 100 } ) - RL_BeginShaderMode( shader ) - RL_DrawTexture( texture, { 0, 0 }, WHITE ); - RL_EndShaderMode() + RL.BeginShaderMode( shader ) + RL.DrawTexture( texture, { 0, 0 }, RL.WHITE ); + RL.EndShaderMode() end diff --git a/examples/snake/main.lua b/examples/snake/main.lua index dd752e4..0f07317 100644 --- a/examples/snake/main.lua +++ b/examples/snake/main.lua @@ -7,8 +7,8 @@ local STATE = { TITLE = 0, GAME = 1, OVER = 2 } -- Enum wannabe. -- Resources local framebuffer = -1 local monitor = 0 -local monitorPos = RL_GetMonitorPosition( monitor ) -local monitorSize = RL_GetMonitorSize( monitor ) +local monitorPos = RL.GetMonitorPosition( monitor ) +local monitorSize = RL.GetMonitorSize( monitor ) local winScale = 6 local winSize = { RESOLUTION[1] * winScale, RESOLUTION[2] * winScale } local gameState = STATE.GAME @@ -64,18 +64,18 @@ end -- Init. -function init() - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowSize( winSize ) - RL_SetWindowPosition( { monitorPos[1] + monitorSize[1] / 2 - winSize[1] / 2, monitorPos[2] + monitorSize[2] / 2 - winSize[2] / 2 } ) - RL_SetWindowTitle( "Snake" ) - RL_SetWindowIcon( RL_LoadImage( RL_GetBasePath().."../resources/images/apple.png" ) ) +function RL.init() + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowSize( winSize ) + RL.SetWindowPosition( { monitorPos[1] + monitorSize[1] / 2 - winSize[1] / 2, monitorPos[2] + monitorSize[2] / 2 - winSize[2] / 2 } ) + RL.SetWindowTitle( "Snake" ) + RL.SetWindowIcon( RL.LoadImage( RL.GetBasePath().."../resources/images/apple.png" ) ) - framebuffer = RL_LoadRenderTexture( RESOLUTION ) - grassTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/grass.png" ) - snakeTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/snake.png" ) - appleTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/apple.png" ) + framebuffer = RL.LoadRenderTexture( RESOLUTION ) + grassTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/grass.png" ) + snakeTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/snake.png" ) + appleTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/apple.png" ) setSnake() setApplePos() @@ -122,25 +122,25 @@ local function moveSnake() moveTimer = moveTimer + 1.0 end -function process( delta ) +function RL.process( delta ) if gameState == STATE.GAME then -- Run game. -- Controls. - if RL_IsKeyPressed( KEY_RIGHT ) and 0 <= snake.heading[1] then + if RL.IsKeyPressed( RL.KEY_RIGHT ) and 0 <= snake.heading[1] then snake.control = { 1, 0 } - elseif RL_IsKeyPressed( KEY_LEFT ) and snake.heading[1] <= 0 then + elseif RL.IsKeyPressed( RL.KEY_LEFT ) and snake.heading[1] <= 0 then snake.control = { -1, 0 } - elseif RL_IsKeyPressed( KEY_DOWN ) and 0 <= snake.heading[2] then + elseif RL.IsKeyPressed( RL.KEY_DOWN ) and 0 <= snake.heading[2] then snake.control = { 0, 1 } - elseif RL_IsKeyPressed( KEY_UP ) and snake.heading[2] <= 0 then + elseif RL.IsKeyPressed( RL.KEY_UP ) and snake.heading[2] <= 0 then snake.control = { 0, -1 } end - + moveTimer = moveTimer - gameSpeed * delta - + if moveTimer <= 0.0 then moveSnake() end - elseif gameState == STATE.OVER and RL_IsKeyPressed( KEY_ENTER ) then -- Reset game. + elseif gameState == STATE.OVER and RL.IsKeyPressed( RL.KEY_ENTER ) then -- Reset game. setSnake() setApplePos() gameState = STATE.GAME @@ -152,7 +152,7 @@ end local function drawGrass() for y = 0, LEVEL_SIZE - 1 do for x = 0, LEVEL_SIZE - 1 do - RL_DrawTexture( grassTexture, { x * TILE_SIZE, y * TILE_SIZE }, WHITE ) + RL.DrawTexture( grassTexture, { x * TILE_SIZE, y * TILE_SIZE }, RL.WHITE ) end end end @@ -168,14 +168,14 @@ end local function drawSnake() for i, seg in ipairs( snake.segments ) do - local angle = math.deg( RL_Vector2Angle( { 0, 0 }, seg.heading ) ) + local angle = math.deg( RL.Vector2Angle( { 0, 0 }, seg.heading ) ) local source = { 16, 0, 8, 8 } if i == 1 then -- Tail segment. Yes tail is actually the 'first' segment. source[1] = 8 if 1 < #snake.segments then - angle = math.deg( RL_Vector2Angle( { 0, 0 }, snake.segments[ 2 ].heading ) ) + angle = math.deg( RL.Vector2Angle( { 0, 0 }, snake.segments[ 2 ].heading ) ) end elseif i < #snake.segments and not vector2IsEqual( seg.heading, snake.segments[ i+1 ].heading ) then -- Turned middle segments. source[1] = 0 @@ -191,34 +191,34 @@ local function drawSnake() end end -- Notice that we set the origin to center { 4, 4 } that acts as pivot point. We also have to adjust our dest position by 4. - RL_DrawTexturePro( snakeTexture, source, { seg.pos[1] * TILE_SIZE + 4, seg.pos[2] * TILE_SIZE + 4, 8, 8 }, { 4, 4 }, angle, WHITE ) + RL.DrawTexturePro( snakeTexture, source, { seg.pos[1] * TILE_SIZE + 4, seg.pos[2] * TILE_SIZE + 4, 8, 8 }, { 4, 4 }, angle, RL.WHITE ) end -- Let's draw the head last to keep it on top. - local angle = math.deg( RL_Vector2Angle( { 0, 0 }, snake.heading ) ) - RL_DrawTexturePro( snakeTexture, { 24, 0, 8, 8 }, { snake.headPos[1] * TILE_SIZE + 4, snake.headPos[2] * TILE_SIZE + 4, 8, 8 }, { 4, 4 }, angle, WHITE ) + local angle = math.deg( RL.Vector2Angle( { 0, 0 }, snake.heading ) ) + RL.DrawTexturePro( snakeTexture, { 24, 0, 8, 8 }, { snake.headPos[1] * TILE_SIZE + 4, snake.headPos[2] * TILE_SIZE + 4, 8, 8 }, { 4, 4 }, angle, RL.WHITE ) end local function drawApple() - RL_DrawTexture( appleTexture, { applePos[1] * TILE_SIZE, applePos[2] * TILE_SIZE }, WHITE ) + RL.DrawTexture( appleTexture, { applePos[1] * TILE_SIZE, applePos[2] * TILE_SIZE }, RL.WHITE ) end -function draw() +function RL.draw() -- Clear the window to black. - RL_ClearBackground( BLACK ) + RL.ClearBackground( RL.BLACK ) -- Draw to framebuffer. - RL_BeginTextureMode( framebuffer ) - RL_ClearBackground( BLACK ) + RL.BeginTextureMode( framebuffer ) + RL.ClearBackground( RL.BLACK ) drawGrass() drawSnake() drawApple() if gameState == STATE.OVER then - RL_DrawText( 0, "Press Enter to\nrestart", { 10, 10 }, 10, 2, WHITE ) + RL.DrawText( 0, "Press Enter to\nrestart", { 10, 10 }, 10, 2, RL.WHITE ) end - RL_EndTextureMode() + RL.EndTextureMode() -- Draw framebuffer to window. - RL_SetTextureSource( TEXTURE_SOURCE_RENDER_TEXTURE ) - RL_DrawTexturePro( framebuffer, { 0, 0, RESOLUTION[1], -RESOLUTION[2] }, { 0, 0, winSize[1], winSize[2] }, { 0, 0 }, 0.0, WHITE ) - RL_SetTextureSource( TEXTURE_SOURCE_TEXTURE ) + RL.SetTextureSource( RL.TEXTURE_SOURCE_RENDER_TEXTURE ) + RL.DrawTexturePro( framebuffer, { 0, 0, RESOLUTION[1], -RESOLUTION[2] }, { 0, 0, winSize[1], winSize[2] }, { 0, 0 }, 0.0, RL.WHITE ) + RL.SetTextureSource( RL.TEXTURE_SOURCE_TEXTURE ) end diff --git a/examples/waving_cubes/main.lua b/examples/waving_cubes/main.lua index eab9758..d8cd143 100644 --- a/examples/waving_cubes/main.lua +++ b/examples/waving_cubes/main.lua @@ -9,40 +9,40 @@ local camera = -1 local num_blocks = 15 -function init() +function RL.init() local monitor = 0 - local mPos = RL_GetMonitorPosition( monitor ) - local mSize = RL_GetMonitorSize( monitor ) - local winSize = RL_GetScreenSize() - - RL_SetWindowTitle( "Waving cubes" ) - RL_SetWindowState( FLAG_WINDOW_RESIZABLE ) - RL_SetWindowState( FLAG_VSYNC_HINT ) - RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + local mPos = RL.GetMonitorPosition( monitor ) + local mSize = RL.GetMonitorSize( monitor ) + local winSize = RL.GetScreenSize() - camera = RL_CreateCamera3D() - RL_SetCamera3DPosition( camera, { 30, 20, 30 } ) - RL_SetCamera3DTarget( camera, { 0, 0, 0 } ) - RL_SetCamera3DUp( camera, { 0, 1, 0 } ) + RL.SetWindowTitle( "Waving cubes" ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) + RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + + camera = RL.CreateCamera3D() + RL.SetCamera3DPosition( camera, { 30, 20, 30 } ) + RL.SetCamera3DTarget( camera, { 0, 0, 0 } ) + RL.SetCamera3DUp( camera, { 0, 1, 0 } ) end -function draw() - local t = RL_GetTime() +function RL.draw() + local t = RL.GetTime() local cos = math.cos local sin = math.sin local scale = (2.0 + sin(t)) * 0.7 local camera_time = t * 0.3 - local camera_pos = RL_GetCamera3DPosition( camera ) + local camera_pos = RL.GetCamera3DPosition( camera ) camera_pos[1] = cos(camera_time) * 40.0 camera_pos[3] = sin(camera_time) * 40.0 - - RL_SetCamera3DPosition( camera, camera_pos ) - RL_ClearBackground( RAYWHITE ) - RL_BeginMode3D( camera ) - RL_DrawGrid( 10, 5.0 ) + RL.SetCamera3DPosition( camera, camera_pos ) + RL.ClearBackground( RL.RAYWHITE ) + + RL.BeginMode3D( camera ) + RL.DrawGrid( 10, 5.0 ) for x = 0,num_blocks - 1 do for y = 0,num_blocks - 1 do @@ -55,14 +55,14 @@ function draw() (y - num_blocks / 2) * (scale * 2.0) + scatter, (z - num_blocks / 2) * (scale * 3.0) + scatter } - local cube_color = RL_ColorFromHSV( (((x + y + z) * 18) % 360), 0.75, 0.9 ) + local cube_color = RL.ColorFromHSV( (((x + y + z) * 18) % 360), 0.75, 0.9 ) local cube_size = (2.4 - scale) * block_scale - RL_DrawCube( cube_pos, { cube_size, cube_size, cube_size }, cube_color ) + RL.DrawCube( cube_pos, { cube_size, cube_size, cube_size }, cube_color ) end end end - RL_EndMode3D() + RL.EndMode3D() - RL_DrawFPS( { 10, 10 } ) + RL.DrawFPS( { 10, 10 } ) end diff --git a/examples/window/main.lua b/examples/window/main.lua index 1fa5744..9816188 100644 --- a/examples/window/main.lua +++ b/examples/window/main.lua @@ -1,29 +1,29 @@ -local textColor = BLACK +local textColor = RL.BLACK local textPos = { 192, 200 } local imageFont = -1 local text = "Congrats! You created your first window!" -function init() - RL_SetWindowTitle( "First window" ) - RL_SetWindowState( FLAG_VSYNC_HINT ) +function RL.init() + RL.SetWindowTitle( "First window" ) + RL.SetWindowState( RL.FLAG_VSYNC_HINT ) end -function process( delta ) - if RL_IsKeyPressed( KEY_ENTER ) then - local textSize = RL_MeasureText( 0, text, 20, 2 ) - local winSize = RL_GetScreenSize() +function RL.process( delta ) + if RL.IsKeyPressed( RL.KEY_ENTER ) then + local textSize = RL.MeasureText( 0, text, 20, 2 ) + local winSize = RL.GetScreenSize() - textColor = BLUE + textColor = RL.BLUE textPos = { winSize[1] / 2 - textSize[1] / 2, winSize[2] / 2 - textSize[2] / 2 } end - if RL_IsKeyPressed( KEY_SPACE ) then - textColor = BLACK + if RL.IsKeyPressed( RL.KEY_SPACE ) then + textColor = RL.BLACK textPos = { 192, 200 } end end -function draw() - RL_ClearBackground( RAYWHITE ) - RL_DrawText( 0, text, textPos, 20, 2, textColor ) +function RL.draw() + RL.ClearBackground( RL.RAYWHITE ) + RL.DrawText( 0, text, textPos, 20, 2, textColor ) end diff --git a/include/main.h b/include/main.h index c709b07..9a33572 100644 --- a/include/main.h +++ b/include/main.h @@ -3,9 +3,9 @@ #define STRING_LEN 1024 #define VERSION_MAJOR 0 -#define VERSION_MINOR 4 +#define VERSION_MINOR 5 #define VERSION_PATCH 0 -#define VERSION_DEV 0 +#define VERSION_DEV 1 #include #include diff --git a/src/audio.c b/src/audio.c index 6a8c33a..70c38e7 100644 --- a/src/audio.c +++ b/src/audio.c @@ -58,7 +58,7 @@ static void checkWaveRealloc( int i ) { */ /* -> success = RL_SetMasterVolume( float volume ) +> success = RL.SetMasterVolume( float volume ) Set master volume ( listener ) @@ -67,7 +67,7 @@ Set master volume ( listener ) */ int laudioSetMasterVolume( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMasterVolume( float volume )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMasterVolume( float volume )" ); lua_pushboolean( L, false ); return 1; } @@ -82,7 +82,7 @@ int laudioSetMasterVolume( lua_State *L ) { */ /* -> sound = RL_LoadSound( string fileName ) +> sound = RL.LoadSound( string fileName ) Load sound from file @@ -91,7 +91,7 @@ Load sound from file */ int laudioLoadSound( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadSound( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadSound( string fileName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -117,7 +117,7 @@ int laudioLoadSound( lua_State *L ) { } /* -> wave = RL_LoadWave( string fileName ) +> wave = RL.LoadWave( string fileName ) Load wave data from file @@ -126,7 +126,7 @@ Load wave data from file */ int laudioLoadWave( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadWave( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadWave( string fileName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -151,7 +151,7 @@ int laudioLoadWave( lua_State *L ) { } /* -> sound = RL_LoadSoundFromWave( Wave wave ) +> sound = RL.LoadSoundFromWave( Wave wave ) Load sound from wave data @@ -160,7 +160,7 @@ Load sound from wave data */ int laudioLoadSoundFromWave( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadSoundFromWave( Wave wave )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadSoundFromWave( Wave wave )" ); lua_pushinteger( L, -1 ); return 1; } @@ -186,7 +186,7 @@ int laudioLoadSoundFromWave( lua_State *L ) { } /* -> success = RL_UnloadSound( Sound sound ) +> success = RL.UnloadSound( Sound sound ) Unload sound @@ -195,7 +195,7 @@ Unload sound */ int laudioUnloadSound( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadSound( Sound sound )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadSound( Sound sound )" ); lua_pushboolean( L, false ); return 1; } @@ -213,7 +213,7 @@ int laudioUnloadSound( lua_State *L ) { } /* -> success = RL_UnloadWave( Wave wave ) +> success = RL.UnloadWave( Wave wave ) Unload wave data @@ -222,7 +222,7 @@ Unload wave data */ int laudioUnloadWave( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadWave( Wave wave )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadWave( Wave wave )" ); lua_pushboolean( L, false ); return 1; } @@ -240,7 +240,7 @@ int laudioUnloadWave( lua_State *L ) { } /* -> success = RL_ExportWave( Wave wave, string fileName ) +> success = RL.ExportWave( Wave wave, string fileName ) Export wave data to file, returns true on success @@ -249,7 +249,7 @@ Export wave data to file, returns true on success */ int laudioExportWave( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ExportWave( Wave wave, string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportWave( Wave wave, string fileName )" ); lua_pushboolean( L, false ); return 1; } @@ -265,7 +265,7 @@ int laudioExportWave( lua_State *L ) { } /* -> success = RL_ExportWaveAsCode( Wave wave, string fileName ) +> success = RL.ExportWaveAsCode( Wave wave, string fileName ) Export wave sample data to code (.h), returns true on success @@ -274,7 +274,7 @@ Export wave sample data to code (.h), returns true on success */ int laudioExportWaveAsCode( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ExportWaveAsCode( Wave wave, string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportWaveAsCode( Wave wave, string fileName )" ); lua_pushboolean( L, false ); return 1; } @@ -294,7 +294,7 @@ int laudioExportWaveAsCode( lua_State *L ) { */ /* -> success = RL_PlaySound( Sound sound ) +> success = RL.PlaySound( Sound sound ) Play a sound @@ -303,7 +303,7 @@ Play a sound */ int laudioPlaySound( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_PlaySound( Sound sound )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.PlaySound( Sound sound )" ); lua_pushboolean( L, false ); return 1; } @@ -320,7 +320,7 @@ int laudioPlaySound( lua_State *L ) { } /* -> success = RL_StopSound( Sound sound ) +> success = RL.StopSound( Sound sound ) Stop playing a sound @@ -329,7 +329,7 @@ Stop playing a sound */ int laudioStopSound( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_StopSound( Sound sound )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.StopSound( Sound sound )" ); lua_pushboolean( L, false ); return 1; } @@ -346,7 +346,7 @@ int laudioStopSound( lua_State *L ) { } /* -> success = RL_PauseSound( Sound sound ) +> success = RL.PauseSound( Sound sound ) Pause a sound @@ -355,7 +355,7 @@ Pause a sound */ int laudioPauseSound( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_PauseSound( Sound sound )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.PauseSound( Sound sound )" ); lua_pushboolean( L, false ); return 1; } @@ -372,7 +372,7 @@ int laudioPauseSound( lua_State *L ) { } /* -> success = RL_ResumeSound( Sound sound ) +> success = RL.ResumeSound( Sound sound ) Resume a paused sound @@ -381,7 +381,7 @@ Resume a paused sound */ int laudioResumeSound( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ResumeSound( Sound sound )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ResumeSound( Sound sound )" ); lua_pushboolean( L, false ); return 1; } @@ -398,7 +398,7 @@ int laudioResumeSound( lua_State *L ) { } /* -> success = RL_PlaySoundMulti( Sound sound ) +> success = RL.PlaySoundMulti( Sound sound ) Play a sound ( Using multichannel buffer pool ) @@ -407,7 +407,7 @@ Play a sound ( Using multichannel buffer pool ) */ int laudioPlaySoundMulti( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_PlaySoundMulti( Sound sound )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.PlaySoundMulti( Sound sound )" ); lua_pushboolean( L, false ); return 1; } @@ -424,7 +424,7 @@ int laudioPlaySoundMulti( lua_State *L ) { } /* -> RL_StopSoundMulti() +> RL.StopSoundMulti() Stop any sound playing ( using multichannel buffer pool ) */ @@ -435,7 +435,7 @@ int laudioStopSoundMulti( lua_State *L ) { } /* -> count = RL_GetSoundsPlaying() +> count = RL.GetSoundsPlaying() Get number of sounds playing in the multichannel @@ -448,7 +448,7 @@ int laudioGetSoundsPlaying( lua_State *L ) { } /* -> playing = RL_IsSoundPlaying( Sound sound ) +> playing = RL.IsSoundPlaying( Sound sound ) Check if a sound is currently playing @@ -457,7 +457,7 @@ Check if a sound is currently playing */ int laudioIsSoundPlaying( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsSoundPlaying( Sound sound )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsSoundPlaying( Sound sound )" ); lua_pushnil( L ); return 1; } @@ -473,7 +473,7 @@ int laudioIsSoundPlaying( lua_State *L ) { } /* -> success = RL_SetSoundVolume( Sound sound, float volume ) +> success = RL.SetSoundVolume( Sound sound, float volume ) Set volume for a sound ( 1.0 is max level ) @@ -482,7 +482,7 @@ Set volume for a sound ( 1.0 is max level ) */ int laudioSetSoundVolume( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetSoundVolume( Sound sound, float volume )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetSoundVolume( Sound sound, float volume )" ); lua_pushboolean( L, false ); return 1; } @@ -497,7 +497,7 @@ int laudioSetSoundVolume( lua_State *L ) { } /* -> success = RL_SetSoundPitch( Sound sound, float pitch ) +> success = RL.SetSoundPitch( Sound sound, float pitch ) Set pitch for a sound ( 1.0 is base level ) @@ -506,7 +506,7 @@ Set pitch for a sound ( 1.0 is base level ) */ int laudioSetSoundPitch( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetSoundPitch( Sound sound, float pitch )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetSoundPitch( Sound sound, float pitch )" ); lua_pushboolean( L, false ); return 1; } @@ -521,7 +521,7 @@ int laudioSetSoundPitch( lua_State *L ) { } /* -> success = RL_SetSoundPan( Sound sound, float pan ) +> success = RL.SetSoundPan( Sound sound, float pan ) Set pan for a sound ( 0.5 is center ) @@ -530,7 +530,7 @@ Set pan for a sound ( 0.5 is center ) */ int laudioSetSoundPan( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetSoundPan( Sound sound, float pitch )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetSoundPan( Sound sound, float pitch )" ); lua_pushboolean( L, false ); return 1; } @@ -545,7 +545,7 @@ int laudioSetSoundPan( lua_State *L ) { } /* -> success = RL_WaveFormat( Wave wave, int sampleRate, int sampleSize, int channels ) +> success = RL.WaveFormat( Wave wave, int sampleRate, int sampleSize, int channels ) Convert wave data to desired format @@ -554,7 +554,7 @@ Convert wave data to desired format */ int laudioWaveFormat( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_WaveFormat( Wave wave, int sampleRate, int sampleSize, int channels )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.WaveFormat( Wave wave, int sampleRate, int sampleSize, int channels )" ); lua_pushboolean( L, false ); return 1; } @@ -574,7 +574,7 @@ int laudioWaveFormat( lua_State *L ) { } /* -> wave = RL_WaveCopy( Wave wave ) +> wave = RL.WaveCopy( Wave wave ) Copy a wave to a new wave @@ -583,7 +583,7 @@ Copy a wave to a new wave */ int laudioWaveCopy( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_WaveCopy( Wave wave )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.WaveCopy( Wave wave )" ); lua_pushinteger( L, -1 ); return 1; } @@ -609,7 +609,7 @@ int laudioWaveCopy( lua_State *L ) { } /* -> success = RL_WaveCrop( Wave wave, int initSample, int finalSample ) +> success = RL.WaveCrop( Wave wave, int initSample, int finalSample ) Crop a wave to defined samples range @@ -618,7 +618,7 @@ Crop a wave to defined samples range */ int laudioWaveCrop( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_WaveCrop( Wave wave, int initSample, int finalSample )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.WaveCrop( Wave wave, int initSample, int finalSample )" ); lua_pushboolean( L, false ); return 1; } @@ -641,7 +641,7 @@ int laudioWaveCrop( lua_State *L ) { */ /* -> success = RL_LoadMusicStream( string fileName ) +> success = RL.LoadMusicStream( string fileName ) Load music stream from file @@ -650,7 +650,7 @@ Load music stream from file */ int laudioLoadMusicStream( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadMusicStream( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadMusicStream( string fileName )" ); lua_pushboolean( L, false ); return 1; } @@ -668,7 +668,7 @@ int laudioLoadMusicStream( lua_State *L ) { } /* -> RL_PlayMusicStream() +> RL.PlayMusicStream() Start music playing */ @@ -679,7 +679,7 @@ int laudioPlayMusicStream( lua_State *L ) { } /* -> playing = RL_PlayMusicStream() +> playing = RL.IsMusicStreamPlaying() Check if music is playing @@ -692,7 +692,7 @@ int laudioIsMusicStreamPlaying( lua_State *L ) { } /* -> RL_StopMusicStream() +> RL.StopMusicStream() Stop music playing */ @@ -703,7 +703,7 @@ int laudioStopMusicStream( lua_State *L ) { } /* -> RL_PauseMusicStream() +> RL.PauseMusicStream() Pause music playing */ @@ -714,7 +714,7 @@ int laudioPauseMusicStream( lua_State *L ) { } /* -> RL_ResumeMusicStream() +> RL.ResumeMusicStream() Resume playing paused music */ @@ -725,7 +725,7 @@ int laudioResumeMusicStream( lua_State *L ) { } /* -> success = RL_SeekMusicStream( float position ) +> success = RL.SeekMusicStream( float position ) Seek music to a position ( in seconds ) @@ -734,7 +734,7 @@ Seek music to a position ( in seconds ) */ int laudioSeekMusicStream( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SeekMusicStream( float position )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SeekMusicStream( float position )" ); lua_pushboolean( L, false ); return 1; } @@ -745,7 +745,7 @@ int laudioSeekMusicStream( lua_State *L ) { } /* -> success = RL_SetMusicVolume( float volume ) +> success = RL.SetMusicVolume( float volume ) Set volume for music ( 1.0 is max level ) @@ -754,7 +754,7 @@ Set volume for music ( 1.0 is max level ) */ int laudioSetMusicVolume( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMusicVolume( float volume )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMusicVolume( float volume )" ); lua_pushboolean( L, false ); return 1; } @@ -765,7 +765,7 @@ int laudioSetMusicVolume( lua_State *L ) { } /* -> success = RL_SetMusicPitch( float pitch ) +> success = RL.SetMusicPitch( float pitch ) Set pitch for a music ( 1.0 is base level ) @@ -774,7 +774,7 @@ Set pitch for a music ( 1.0 is base level ) */ int laudioSetMusicPitch( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMusicPitch( float pitch )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMusicPitch( float pitch )" ); lua_pushboolean( L, false ); return 1; } @@ -785,7 +785,7 @@ int laudioSetMusicPitch( lua_State *L ) { } /* -> success = RL_SetMusicPan( float pan ) +> success = RL.SetMusicPan( float pan ) Set pan for a music ( 0.5 is center ) @@ -794,7 +794,7 @@ Set pan for a music ( 0.5 is center ) */ int laudioSetMusicPan( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMusicPan( float pan )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMusicPan( float pan )" ); lua_pushboolean( L, false ); return 1; } @@ -805,7 +805,7 @@ int laudioSetMusicPan( lua_State *L ) { } /* -> length = RL_GetMusicTimeLength() +> length = RL.GetMusicTimeLength() Get music time length ( in seconds ) @@ -818,7 +818,7 @@ int laudioGetMusicTimeLength( lua_State *L ) { } /* -> played = RL_GetMusicTimePlayed() +> played = RL.GetMusicTimePlayed() Get current music time played ( in seconds ) diff --git a/src/core.c b/src/core.c index c3f24cf..71d1505 100644 --- a/src/core.c +++ b/src/core.c @@ -84,7 +84,7 @@ bool validShader( size_t id ) { */ /* -> state = RL_IsWindowReady() +> state = RL.IsWindowReady() Check if window has been initialized successfully @@ -97,7 +97,7 @@ int lcoreIsWindowReady( lua_State *L ) { } /* -> state = RL_IsWindowFullscreen() +> state = RL.IsWindowFullscreen() Check if window is currently fullscreen @@ -110,7 +110,7 @@ int lcoreIsWindowFullscreen( lua_State *L ) { } /* -> state = RL_IsWindowHidden() +> state = RL.IsWindowHidden() Check if window is currently hidden ( only PLATFORM_DESKTOP ) @@ -123,7 +123,7 @@ int lcoreIsWindowHidden( lua_State *L ) { } /* -> state = RL_IsWindowMinimized() +> state = RL.IsWindowMinimized() Check if window is currently minimized ( only PLATFORM_DESKTOP ) @@ -136,7 +136,7 @@ int lcoreIsWindowMinimized( lua_State *L ) { } /* -> state = RL_IsWindowMaximized() +> state = RL.IsWindowMaximized() Check if window is currently maximized ( only PLATFORM_DESKTOP ) @@ -149,7 +149,7 @@ int lcoreIsWindowMaximized( lua_State *L ) { } /* -> state = RL_IsWindowFocused() +> state = RL.IsWindowFocused() Check if window is currently focused ( only PLATFORM_DESKTOP ) @@ -162,7 +162,7 @@ int lcoreIsWindowFocused( lua_State *L ) { } /* -> success = RL_SetWindowMonitor( int monitor ) +> success = RL.SetWindowMonitor( int monitor ) Set monitor for the current window (fullscreen mode) @@ -171,7 +171,7 @@ Set monitor for the current window (fullscreen mode) */ int lcoreSetWindowMonitor( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetWindowMonitor( int monitor )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowMonitor( int monitor )" ); lua_pushboolean( L, false ); return 1; } @@ -181,7 +181,7 @@ int lcoreSetWindowMonitor( lua_State *L ) { } /* -> success = RL_SetWindowPosition( Vector2 pos ) +> success = RL.SetWindowPosition( Vector2 pos ) Set window position on screen @@ -190,7 +190,7 @@ Set window position on screen */ int lcoreSetWindowPosition( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetWindowPosition( Vector2 pos )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowPosition( Vector2 pos )" ); lua_pushboolean( L, false ); return 1; } @@ -202,7 +202,7 @@ int lcoreSetWindowPosition( lua_State *L ) { } /* -> success = RL_SetWindowSize( Vector2 size ) +> success = RL.SetWindowSize( Vector2 size ) Set window dimensions @@ -211,7 +211,7 @@ Set window dimensions */ int lcoreSetWindowSize( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetWindowSize( Vector2 size )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowSize( Vector2 size )" ); lua_pushboolean( L, false ); return 1; } @@ -223,7 +223,7 @@ int lcoreSetWindowSize( lua_State *L ) { } /* -> success = RL_SetWindowMinSize( Vector2 size ) +> success = RL.SetWindowMinSize( Vector2 size ) Set window minimum dimensions ( for FLAG_WINDOW_RESIZABLE ) @@ -232,7 +232,7 @@ Set window minimum dimensions ( for FLAG_WINDOW_RESIZABLE ) */ int lcoreSetWindowMinSize( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetWindowMinSize( Vector2 size )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowMinSize( Vector2 size )" ); lua_pushboolean( L, false ); return 1; } @@ -244,7 +244,7 @@ int lcoreSetWindowMinSize( lua_State *L ) { } /* -> position = RL_GetMonitorPosition( int monitor ) +> position = RL.GetMonitorPosition( int monitor ) Get specified monitor position @@ -253,7 +253,7 @@ Get specified monitor position */ int lcoreGetMonitorPosition( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetMonitorPosition( int monitor )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorPosition( int monitor )" ); lua_pushnil( L ); return 1; } @@ -264,7 +264,7 @@ int lcoreGetMonitorPosition( lua_State *L ) { } /* -> size = RL_GetMonitorSize( int monitor ) +> size = RL.GetMonitorSize( int monitor ) Get specified monitor size @@ -273,7 +273,7 @@ Get specified monitor size */ int lcoreGetMonitorSize( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetMonitorSize( int monitor )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorSize( int monitor )" ); lua_pushnil( L ); return 1; } @@ -284,7 +284,7 @@ int lcoreGetMonitorSize( lua_State *L ) { } /* -> position = RL_GetWindowPosition() +> position = RL.GetWindowPosition() Get window position on monitor @@ -298,7 +298,7 @@ int lcoreGetWindowPosition( lua_State *L ) { } /* -> size = RL_GetScreenSize() +> size = RL.GetScreenSize() Get screen size @@ -312,7 +312,7 @@ int lcoreGetScreenSize( lua_State *L ) { } /* -> success = RL_SetWindowState( int flag ) +> success = RL.SetWindowState( int flag ) Set window configuration state using flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE... ) @@ -321,7 +321,7 @@ Set window configuration state using flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_R */ int lcoreSetWindowState( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetWindowState( int flags )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowState( int flags )" ); lua_pushboolean( L, false ); return 1; } @@ -331,7 +331,7 @@ int lcoreSetWindowState( lua_State *L ) { } /* -> state = RL_IsWindowState( int flag ) +> state = RL.IsWindowState( int flag ) Check if one specific window flag is enabled ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE... ) @@ -340,7 +340,7 @@ Check if one specific window flag is enabled ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW */ int lcoreIsWindowState( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsWindowState( int flags )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsWindowState( int flags )" ); lua_pushnil( L ); return 1; } @@ -350,7 +350,7 @@ int lcoreIsWindowState( lua_State *L ) { } /* -> resized = RL_ClearWindowState( int flag ) +> resized = RL.ClearWindowState( int flag ) Clear window configuration state flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE... ) @@ -358,7 +358,7 @@ Clear window configuration state flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZ */ int lcoreClearWindowState( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ClearWindowState( int flag )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ClearWindowState( int flag )" ); lua_pushnil( L ); return 1; } @@ -368,7 +368,7 @@ int lcoreClearWindowState( lua_State *L ) { } /* -> resized = RL_IsWindowResized() +> resized = RL.IsWindowResized() Check if window has been resized from last frame @@ -381,7 +381,7 @@ int lcoreIsWindowResized( lua_State *L ) { } /* -> success = RL_SetWindowIcon( Image image ) +> success = RL.SetWindowIcon( Image image ) Set icon for window ( Only PLATFORM_DESKTOP ) @@ -390,7 +390,7 @@ Set icon for window ( Only PLATFORM_DESKTOP ) */ int lcoreSetWindowIcon( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetWindowIcon( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowIcon( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -407,7 +407,7 @@ int lcoreSetWindowIcon( lua_State *L ) { } /* -> success = RL_SetWindowTitle( string title ) +> success = RL.SetWindowTitle( string title ) Set title for window ( Only PLATFORM_DESKTOP ) @@ -416,7 +416,7 @@ Set title for window ( Only PLATFORM_DESKTOP ) */ int lcoreSetWindowTitle( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetWindowTitle( string title )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowTitle( string title )" ); lua_pushboolean( L, false ); return 1; } @@ -426,7 +426,7 @@ int lcoreSetWindowTitle( lua_State *L ) { } /* -> count = RL_GetMonitorCount() +> count = RL.GetMonitorCount() Get number of connected monitors @@ -438,7 +438,7 @@ int lcoreGetMonitorCount( lua_State *L ) { } /* -> monitor = RL_GetCurrentMonitor() +> monitor = RL.GetCurrentMonitor() Get current connected monitor @@ -450,7 +450,7 @@ int lcoreGetCurrentMonitor( lua_State *L ) { } /* -> size = RL_GetMonitorPhysicalSize( int monitor ) +> size = RL.GetMonitorPhysicalSize( int monitor ) Get specified monitor physical size in millimetres @@ -459,7 +459,7 @@ Get specified monitor physical size in millimetres */ int lcoreGetMonitorPhysicalSize( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetMonitorPhysicalSize( int monitor )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorPhysicalSize( int monitor )" ); lua_pushboolean( L, false ); return 1; } @@ -471,7 +471,7 @@ int lcoreGetMonitorPhysicalSize( lua_State *L ) { } /* -> size = RL_GetMonitorRefreshRate( int monitor ) +> size = RL.GetMonitorRefreshRate( int monitor ) Get specified monitor refresh rate @@ -480,7 +480,7 @@ Get specified monitor refresh rate */ int lcoreGetMonitorRefreshRate( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetMonitorRefreshRate( int monitor )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorRefreshRate( int monitor )" ); lua_pushboolean( L, false ); return 1; } @@ -490,7 +490,7 @@ int lcoreGetMonitorRefreshRate( lua_State *L ) { } /* -> scale = RL_GetWindowScaleDPI() +> scale = RL.GetWindowScaleDPI() Get window scale DPI factor @@ -503,7 +503,7 @@ int lcoreGetWindowScaleDPI( lua_State *L ) { } /* -> name = RL_GetMonitorName( int monitor ) +> name = RL.GetMonitorName( int monitor ) Get the human-readable, UTF-8 encoded name of the monitor @@ -512,7 +512,7 @@ Get the human-readable, UTF-8 encoded name of the monitor */ int lcoreGetMonitorName( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetMonitorName( int monitor )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorName( int monitor )" ); lua_pushboolean( L, false ); return 1; } @@ -522,7 +522,7 @@ int lcoreGetMonitorName( lua_State *L ) { } /* -> RL_CloseWindow() +> RL.CloseWindow() Close window and unload OpenGL context and free all resources */ @@ -533,7 +533,7 @@ int lcoreCloseWindow( lua_State *L ) { } /* -> success = RL_SetClipboardText( string text ) +> success = RL.SetClipboardText( string text ) Set clipboard text content @@ -542,7 +542,7 @@ Set clipboard text content */ int lcoreSetClipboardText( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetClipboardText( string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetClipboardText( string text )" ); lua_pushboolean( L, false ); return 1; } @@ -552,7 +552,7 @@ int lcoreSetClipboardText( lua_State *L ) { } /* -> text = RL_GetClipboardText() +> text = RL.GetClipboardText() Get clipboard text content @@ -568,7 +568,7 @@ int lcoreGetClipboardText( lua_State *L ) { */ /* -> success = RL_SetTargetFPS( int fps ) +> success = RL.SetTargetFPS( int fps ) Set target FPS ( maximum ) @@ -577,7 +577,7 @@ Set target FPS ( maximum ) */ int lcoreSetTargetFPS( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetTargetFPS( int fps )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetTargetFPS( int fps )" ); lua_pushboolean( L, false ); return 1; } @@ -588,7 +588,7 @@ int lcoreSetTargetFPS( lua_State *L ) { } /* -> FPS = RL_GetFPS() +> FPS = RL.GetFPS() Get current FPS @@ -601,7 +601,7 @@ int lcoreGetFPS( lua_State *L ) { } /* -> delta = RL_GetFrameTime() +> delta = RL.GetFrameTime() Get time in seconds for last frame drawn ( Delta time ) @@ -614,7 +614,7 @@ int lcoreGetFrameTime( lua_State *L ) { } /* -> time = RL_GetTime() +> time = RL.GetTime() Get elapsed time in seconds since InitWindow() @@ -631,7 +631,7 @@ int lcoreGetTime( lua_State *L ) { */ /* -> success = RL_TakeScreenshot( string fileName ) +> success = RL.TakeScreenshot( string fileName ) Takes a screenshot of current screen ( filename extension defines format ) @@ -640,7 +640,7 @@ Takes a screenshot of current screen ( filename extension defines format ) */ int lcoreTakeScreenshot( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_TakeScreenshot( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.TakeScreenshot( string fileName )" ); lua_pushboolean( L, false ); return 1; } @@ -651,7 +651,7 @@ int lcoreTakeScreenshot( lua_State *L ) { } /* -> success = RL_SetConfigFlags( int flags ) +> success = RL.SetConfigFlags( int flags ) Setup init configuration flags ( view FLAGS ) @@ -660,7 +660,7 @@ Setup init configuration flags ( view FLAGS ) */ int lcoreSetConfigFlags( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetConfigFlags( int flags )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetConfigFlags( int flags )" ); lua_pushboolean( L, false ); return 1; } @@ -671,7 +671,7 @@ int lcoreSetConfigFlags( lua_State *L ) { } /* -> success = RL_TraceLog( int logLevel, string text ) +> success = RL.TraceLog( int logLevel, string text ) Show trace log messages ( LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR... ) @@ -680,7 +680,7 @@ Show trace log messages ( LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR... ) */ int lcoreTraceLog( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_TraceLog( int logLevel, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.TraceLog( int logLevel, string text )" ); lua_pushboolean( L, false ); return 1; } @@ -691,7 +691,7 @@ int lcoreTraceLog( lua_State *L ) { } /* -> success = RL_SetTraceLogLevel( int logLevel ) +> success = RL.SetTraceLogLevel( int logLevel ) Set the current threshold ( minimum ) log level @@ -700,7 +700,7 @@ Set the current threshold ( minimum ) log level */ int lcoreSetTraceLogLevel( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetTraceLogLevel( int logLevel )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetTraceLogLevel( int logLevel )" ); lua_pushboolean( L, false ); return 1; } @@ -711,7 +711,7 @@ int lcoreSetTraceLogLevel( lua_State *L ) { } /* -> success = RL_OpenURL( string url ) +> success = RL.OpenURL( string url ) Open URL with default system browser ( If available ) @@ -720,7 +720,7 @@ Open URL with default system browser ( If available ) */ int lcoreOpenURL( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_OpenURL( string url )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.OpenURL( string url )" ); lua_pushboolean( L, false ); return 1; } @@ -735,7 +735,7 @@ int lcoreOpenURL( lua_State *L ) { */ /* -> RL_ShowCursor() +> RL.ShowCursor() Shows cursor */ @@ -746,7 +746,7 @@ int lcoreShowCursor( lua_State *L ) { } /* -> RL_HideCursor() +> RL.HideCursor() Hides cursor */ @@ -757,7 +757,7 @@ int lcoreHideCursor( lua_State *L ) { } /* -> hidden = RL_IsCursorHidden() +> hidden = RL.IsCursorHidden() Check if cursor is not visible @@ -770,7 +770,7 @@ int lcoreIsCursorHidden( lua_State *L ) { } /* -> RL_EnableCursor() +> RL.EnableCursor() Enables cursor (unlock cursor) */ @@ -781,7 +781,7 @@ int lcoreEnableCursor( lua_State *L ) { } /* -> RL_DisableCursor() +> RL.DisableCursor() Disables cursor (lock cursor) */ @@ -792,7 +792,7 @@ int lcoreDisableCursor( lua_State *L ) { } /* -> onSreen = RL_IsCursorOnScreen() +> onSreen = RL.IsCursorOnScreen() Check if cursor is on the screen @@ -809,7 +809,7 @@ int lcoreIsCursorOnScreen( lua_State *L ) { */ /* -> success = RL_ClearBackground( Color color ) +> success = RL.ClearBackground( Color color ) Set background color ( framebuffer clear color ) @@ -818,7 +818,7 @@ Set background color ( framebuffer clear color ) */ int lcoreClearBackground( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ClearBackground( Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ClearBackground( Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -830,7 +830,7 @@ int lcoreClearBackground( lua_State *L ) { } /* -> RL_BeginDrawing() +> RL.BeginDrawing() Setup canvas ( framebuffer ) to start drawing */ @@ -841,7 +841,7 @@ int lcoreBeginDrawing( lua_State *L ) { } /* -> RL_EndDrawing() +> RL.EndDrawing() End canvas drawing and swap buffers ( double buffering ) */ @@ -852,7 +852,7 @@ int lcoreEndDrawing( lua_State *L ) { } /* -> success = RL_BeginBlendMode( int mode ) +> success = RL.BeginBlendMode( int mode ) Begin blending mode ( BLEND_ALPHA, BLEND_ADDITIVE, BLEND_MULTIPLIED... ) @@ -861,7 +861,7 @@ Begin blending mode ( BLEND_ALPHA, BLEND_ADDITIVE, BLEND_MULTIPLIED... ) */ int lcoreBeginBlendMode( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_BeginBlendMode( int mode )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginBlendMode( int mode )" ); lua_pushboolean( L, false ); return 1; } @@ -872,7 +872,7 @@ int lcoreBeginBlendMode( lua_State *L ) { } /* -> RL_EndBlendMode() +> RL.EndBlendMode() End blending mode ( reset to default: BLEND_ALPHA ) */ @@ -883,7 +883,7 @@ int lcoreEndBlendMode( lua_State *L ) { } /* -> success = RL_BeginScissorMode( Rectangle rectange ) +> success = RL.BeginScissorMode( Rectangle rectange ) Begin scissor mode ( define screen area for following drawing ) @@ -892,7 +892,7 @@ Begin scissor mode ( define screen area for following drawing ) */ int lcoreBeginScissorMode( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_BeginScissorMode( Rectangle rectange )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginScissorMode( Rectangle rectange )" ); lua_pushboolean( L, false ); return 1; } @@ -905,7 +905,7 @@ int lcoreBeginScissorMode( lua_State *L ) { } /* -> RL_EndScissorMode() +> RL.EndScissorMode() End scissor mode */ @@ -920,7 +920,7 @@ int lcoreEndScissorMode( lua_State *L ) { */ /* -> shader = RL_LoadShader( string vsFileName, string fsFileName ) +> shader = RL.LoadShader( string vsFileName, string fsFileName ) Load shader from files and bind default locations. NOTE: Set nil if no shader @@ -930,7 +930,7 @@ NOTE: Set nil if no shader */ int lcoreLoadShader( lua_State *L ) { if ( !( lua_isstring( L, -2 ) || lua_isnil( L, -2 ) ) || !( lua_isstring( L, -1 ) || lua_isnil( L, -1 ) ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadShader( string vsFileName, string fsFileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadShader( string vsFileName, string fsFileName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -974,7 +974,7 @@ int lcoreLoadShader( lua_State *L ) { } /* -> shader = RL_LoadShaderFromMemory( string vsCode, string fsCode ) +> shader = RL.LoadShaderFromMemory( string vsCode, string fsCode ) Load shader from code strings and bind default locations NOTE: Set nil if no shader @@ -985,7 +985,7 @@ NOTE: Set nil if no shader int lcoreLoadShaderFromMemory( lua_State *L ) { if ( !( lua_isstring( L, -2 ) || lua_isnil( L, -2 ) ) || !( lua_isstring( L, -1 ) || lua_isnil( L, -1 ) ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadShaderFromMemory( string vsCode, string fsCode )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadShaderFromMemory( string vsCode, string fsCode )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1029,7 +1029,7 @@ int lcoreLoadShaderFromMemory( lua_State *L ) { } /* -> success = RL_BeginShaderMode( Shader shader ) +> success = RL.BeginShaderMode( Shader shader ) Begin custom shader drawing @@ -1038,7 +1038,7 @@ Begin custom shader drawing */ int lcoreBeginShaderMode( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_BeginShaderMode( Shader shader )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginShaderMode( Shader shader )" ); lua_pushboolean( L, false ); return 1; } @@ -1055,7 +1055,7 @@ int lcoreBeginShaderMode( lua_State *L ) { } /* -> EndShaderMode() +> RL.EndShaderMode() End custom shader drawing ( use default shader ) */ @@ -1066,7 +1066,7 @@ int lcoreEndShaderMode( lua_State *L ) { } /* -> location = RL_GetShaderLocation( Shader shader, string uniformName ) +> location = RL.GetShaderLocation( Shader shader, string uniformName ) Get shader uniform location @@ -1075,7 +1075,7 @@ Get shader uniform location */ int lcoreGetShaderLocation( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetShaderLocation( Shader shader, string uniformName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetShaderLocation( Shader shader, string uniformName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1091,7 +1091,7 @@ int lcoreGetShaderLocation( lua_State *L ) { } /* -> location = RL_GetShaderLocationAttrib( Shader shader, string attribName ) +> location = RL.GetShaderLocationAttrib( Shader shader, string attribName ) Get shader attribute location @@ -1100,7 +1100,7 @@ Get shader attribute location */ int lcoreGetShaderLocationAttrib( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetShaderLocationAttrib( Shader shader, string attribName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetShaderLocationAttrib( Shader shader, string attribName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1116,7 +1116,7 @@ int lcoreGetShaderLocationAttrib( lua_State *L ) { } /* -> success = RL_SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location ) +> success = RL.SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location ) Set shader location index @@ -1125,7 +1125,7 @@ Set shader location index */ int lcoreSetShaderLocationIndex( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location )" ); lua_pushboolean( L, false ); return 1; } @@ -1146,7 +1146,7 @@ int lcoreSetShaderLocationIndex( lua_State *L ) { } /* -> location = RL_GetShaderLocationIndex( Shader shader, int shaderLocationIndex ) +> location = RL.GetShaderLocationIndex( Shader shader, int shaderLocationIndex ) Get shader location index @@ -1155,7 +1155,7 @@ Get shader location index */ int lcoreGetShaderLocationIndex( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetShaderLocationIndex( Shader shader, int shaderLocationIndex )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetShaderLocationIndex( Shader shader, int shaderLocationIndex )" ); lua_pushboolean( L, false ); return 1; } @@ -1173,7 +1173,7 @@ int lcoreGetShaderLocationIndex( lua_State *L ) { } /* -> success = RL_SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat ) +> success = RL.SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat ) Set shader uniform value ( matrix 4x4 ) @@ -1182,7 +1182,7 @@ Set shader uniform value ( matrix 4x4 ) */ int lcoreSetShaderValueMatrix( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat )" ); lua_pushboolean( L, false ); return 1; } @@ -1203,7 +1203,7 @@ int lcoreSetShaderValueMatrix( lua_State *L ) { } /* -> success = RL_SetShaderValueTexture( Shader shader, int locIndex, Texture2D texture ) +> success = RL.SetShaderValueTexture( Shader shader, int locIndex, Texture2D texture ) Set shader uniform value for texture ( sampler2d ) @@ -1212,7 +1212,7 @@ Set shader uniform value for texture ( sampler2d ) */ int lcoreSetShaderValueTexture( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetShaderValueTexture( Shader shader, int locIndex, Texture2D texture )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderValueTexture( Shader shader, int locIndex, Texture2D texture )" ); lua_pushboolean( L, false ); return 1; } @@ -1231,7 +1231,7 @@ int lcoreSetShaderValueTexture( lua_State *L ) { } /* -> success = RL_SetShaderValue( Shader shader, int locIndex, number{} values, int uniformType ) +> success = RL.SetShaderValue( Shader shader, int locIndex, number{} values, int uniformType ) Set shader uniform value NOTE: Even one value should be in table @@ -1241,7 +1241,7 @@ NOTE: Even one value should be in table */ int lcoreSetShaderValue( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetShaderValue( Shader shader, int locIndex, number{} values, int uniformType )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderValue( Shader shader, int locIndex, number{} values, int uniformType )" ); lua_pushboolean( L, false ); return 1; } @@ -1290,7 +1290,7 @@ int lcoreSetShaderValue( lua_State *L ) { } /* -> success = RL_SetShaderValueV( Shader shader, int locIndex, number{} values, int uniformType, int count ) +> success = RL.SetShaderValueV( Shader shader, int locIndex, number{} values, int uniformType, int count ) Set shader uniform value vector NOTE: Even one value should be in table @@ -1300,7 +1300,7 @@ NOTE: Even one value should be in table */ int lcoreSetShaderValueV( lua_State *L ) { if ( !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetShaderValueV( Shader shader, int locIndex, number{} values, int uniformType, int count )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderValueV( Shader shader, int locIndex, number{} values, int uniformType, int count )" ); lua_pushboolean( L, false ); return 1; } @@ -1350,7 +1350,7 @@ int lcoreSetShaderValueV( lua_State *L ) { } /* -> success = RL_UnloadShader( Shader shader ) +> success = RL.UnloadShader( Shader shader ) Unload shader from GPU memory ( VRAM ) @@ -1359,7 +1359,7 @@ Unload shader from GPU memory ( VRAM ) */ int lcoreUnloadShader( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadShader( Shader shader )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadShader( Shader shader )" ); lua_pushboolean( L, false ); return 1; } @@ -1381,7 +1381,7 @@ int lcoreUnloadShader( lua_State *L ) { */ /* -> pressed = RL_IsKeyPressed( int key ) +> pressed = RL.IsKeyPressed( int key ) Detect if a key has been pressed once @@ -1390,7 +1390,7 @@ Detect if a key has been pressed once */ int lcoreIsKeyPressed( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsKeyPressed( int key )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsKeyPressed( int key )" ); lua_pushnil( L ); return 1; } @@ -1399,7 +1399,7 @@ int lcoreIsKeyPressed( lua_State *L ) { } /* -> pressed = RL_IsKeyDown( int key ) +> pressed = RL.IsKeyDown( int key ) Detect if a key is being pressed @@ -1408,7 +1408,7 @@ Detect if a key is being pressed */ int lcoreIsKeyDown( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsKeyDown( int key )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsKeyDown( int key )" ); lua_pushnil( L ); return 1; } @@ -1417,7 +1417,7 @@ int lcoreIsKeyDown( lua_State *L ) { } /* -> released = RL_IsKeyReleased( int key ) +> released = RL.IsKeyReleased( int key ) Detect if a key has been released once @@ -1426,7 +1426,7 @@ Detect if a key has been released once */ int lcoreIsKeyReleased( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsKeyReleased( int key )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsKeyReleased( int key )" ); lua_pushnil( L ); return 1; } @@ -1435,7 +1435,7 @@ int lcoreIsKeyReleased( lua_State *L ) { } /* -> released = RL_IsKeyUp( int key ) +> released = RL.IsKeyUp( int key ) Check if a key is NOT being pressed @@ -1444,7 +1444,7 @@ Check if a key is NOT being pressed */ int lcoreIsKeyUp( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsKeyUp( int key )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsKeyUp( int key )" ); lua_pushnil( L ); return 1; } @@ -1453,7 +1453,7 @@ int lcoreIsKeyUp( lua_State *L ) { } /* -> keycode = RL_GetKeyPressed() +> keycode = RL.GetKeyPressed() Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty @@ -1466,7 +1466,7 @@ int lcoreGetKeyPressed( lua_State *L ) { } /* -> unicode = RL_GetCharPressed() +> unicode = RL.GetCharPressed() Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty @@ -1479,13 +1479,13 @@ int lcoreGetCharPressed( lua_State *L ) { } /* -> RL_SetExitKey( int key ) +> RL.SetExitKey( int key ) Set a custom key to exit program ( default is ESC ) */ int lcoreSetExitKey( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetExitKey( int key )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetExitKey( int key )" ); lua_pushnil( L ); return 1; } @@ -1495,7 +1495,7 @@ int lcoreSetExitKey( lua_State *L ) { } /* -> keyName = RL_GetKeyName( int key, int scancode ) +> keyName = RL.GetKeyName( int key, int scancode ) This function returns the name of the specified printable key, encoded as UTF-8. This is typically the character that key would produce without any modifier keys, @@ -1515,7 +1515,7 @@ this function returns nil but does not emit an error. */ int lcoreGetKeyName( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetKeyName( int key, int scancode )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetKeyName( int key, int scancode )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1536,7 +1536,7 @@ int lcoreGetKeyName( lua_State *L ) { } /* -> scancode = RL_GetKeyScancode( int key ) +> scancode = RL.GetKeyScancode( int key ) This function returns the platform-specific scancode of the specified key. If the key is KEY_UNKNOWN or does not exist on the keyboard this method will return -1. @@ -1546,7 +1546,7 @@ If the key is KEY_UNKNOWN or does not exist on the keyboard this method will ret */ int lcoreGetKeyScancode( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetKeyScancode( int key )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetKeyScancode( int key )" ); lua_pushnil( L ); return 1; } @@ -1562,7 +1562,7 @@ int lcoreGetKeyScancode( lua_State *L ) { */ /* -> available = RL_IsGamepadAvailable( int gamepad ) +> available = RL.IsGamepadAvailable( int gamepad ) Detect if a gamepad is available @@ -1571,7 +1571,7 @@ Detect if a gamepad is available */ int lcoreIsGamepadAvailable( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsGamepadAvailable( int gamepad )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGamepadAvailable( int gamepad )" ); lua_pushnil( L ); return 1; } @@ -1580,7 +1580,7 @@ int lcoreIsGamepadAvailable( lua_State *L ) { } /* -> pressed = RL_IsGamepadButtonPressed( int gamepad, int button ) +> pressed = RL.IsGamepadButtonPressed( int gamepad, int button ) Detect if a gamepad button has been pressed once @@ -1589,7 +1589,7 @@ Detect if a gamepad button has been pressed once */ int lcoreIsGamepadButtonPressed( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsGamepadButtonPressed( int gamepad, int button )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGamepadButtonPressed( int gamepad, int button )" ); lua_pushnil( L ); return 1; } @@ -1598,7 +1598,7 @@ int lcoreIsGamepadButtonPressed( lua_State *L ) { } /* -> pressed = RL_IsGamepadButtonDown( int gamepad, int button ) +> pressed = RL.IsGamepadButtonDown( int gamepad, int button ) Detect if a gamepad button is being pressed @@ -1607,7 +1607,7 @@ Detect if a gamepad button is being pressed */ int lcoreIsGamepadButtonDown( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsGamepadButtonDown( int gamepad, int button )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGamepadButtonDown( int gamepad, int button )" ); lua_pushnil( L ); return 1; } @@ -1616,7 +1616,7 @@ int lcoreIsGamepadButtonDown( lua_State *L ) { } /* -> released = RL_IsGamepadButtonReleased( int gamepad, int button ) +> released = RL.IsGamepadButtonReleased( int gamepad, int button ) Detect if a gamepad button has been released once @@ -1625,7 +1625,7 @@ Detect if a gamepad button has been released once */ int lcoreIsGamepadButtonReleased( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsGamepadButtonReleased( int gamepad, int button )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGamepadButtonReleased( int gamepad, int button )" ); lua_pushnil( L ); return 1; } @@ -1634,7 +1634,7 @@ int lcoreIsGamepadButtonReleased( lua_State *L ) { } /* -> count = RL_GetGamepadAxisCount( int gamepad ) +> count = RL.GetGamepadAxisCount( int gamepad ) Return gamepad axis count for a gamepad @@ -1643,7 +1643,7 @@ Return gamepad axis count for a gamepad */ int lcoreGetGamepadAxisCount( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetGamepadAxisCount( int gamepad )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetGamepadAxisCount( int gamepad )" ); lua_pushboolean( L, false ); return 1; } @@ -1652,7 +1652,7 @@ int lcoreGetGamepadAxisCount( lua_State *L ) { } /* -> value = RL_GetGamepadAxisMovement( int gamepad, int axis ) +> value = RL.GetGamepadAxisMovement( int gamepad, int axis ) Return axis movement value for a gamepad axis @@ -1661,7 +1661,7 @@ Return axis movement value for a gamepad axis */ int lcoreGetGamepadAxisMovement( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetGamepadAxisMovement( int gamepad, int axis )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetGamepadAxisMovement( int gamepad, int axis )" ); lua_pushboolean( L, false ); return 1; } @@ -1670,7 +1670,7 @@ int lcoreGetGamepadAxisMovement( lua_State *L ) { } /* -> name = RL_GetGamepadName( int gamepad ) +> name = RL.GetGamepadName( int gamepad ) Return gamepad internal name id @@ -1679,7 +1679,7 @@ Return gamepad internal name id */ int lcoreGetGamepadName( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetGamepadName( int gamepad )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetGamepadName( int gamepad )" ); lua_pushboolean( L, false ); return 1; } @@ -1692,7 +1692,7 @@ int lcoreGetGamepadName( lua_State *L ) { */ /* -> pressed = RL_IsMouseButtonPressed( int button ) +> pressed = RL.IsMouseButtonPressed( int button ) Detect if a mouse button has been pressed once @@ -1701,7 +1701,7 @@ Detect if a mouse button has been pressed once */ int lcoreIsMouseButtonPressed( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsMouseButtonPressed( int button )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsMouseButtonPressed( int button )" ); lua_pushnil( L ); return 1; } @@ -1710,7 +1710,7 @@ int lcoreIsMouseButtonPressed( lua_State *L ) { } /* -> pressed = RL_IsMouseButtonDown( int button ) +> pressed = RL.IsMouseButtonDown( int button ) Detect if a mouse button is being pressed @@ -1719,7 +1719,7 @@ Detect if a mouse button is being pressed */ int lcoreIsMouseButtonDown( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsMouseButtonDown( int button )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsMouseButtonDown( int button )" ); lua_pushnil( L ); return 1; } @@ -1728,7 +1728,7 @@ int lcoreIsMouseButtonDown( lua_State *L ) { } /* -> released = RL_IsMouseButtonReleased( int button ) +> released = RL.IsMouseButtonReleased( int button ) Detect if a mouse button has been released once @@ -1737,7 +1737,7 @@ Detect if a mouse button has been released once */ int lcoreIsMouseButtonReleased( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsMouseButtonReleased( int button )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsMouseButtonReleased( int button )" ); lua_pushnil( L ); return 1; } @@ -1746,7 +1746,7 @@ int lcoreIsMouseButtonReleased( lua_State *L ) { } /* -> released = RL_IsMouseButtonUp( int button ) +> released = RL.IsMouseButtonUp( int button ) Check if a mouse button is NOT being pressed @@ -1755,7 +1755,7 @@ Check if a mouse button is NOT being pressed */ int lcoreIsMouseButtonUp( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsMouseButtonUp( int button )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsMouseButtonUp( int button )" ); lua_pushnil( L ); return 1; } @@ -1764,7 +1764,7 @@ int lcoreIsMouseButtonUp( lua_State *L ) { } /* -> position = RL_GetMousePosition() +> position = RL.GetMousePosition() Returns mouse position @@ -1776,7 +1776,7 @@ int lcoreGetMousePosition( lua_State *L ) { } /* -> position = RL_GetMouseDelta() +> position = RL.GetMouseDelta() Get mouse delta between frames @@ -1788,7 +1788,7 @@ int lcoreGetMouseDelta( lua_State *L ) { } /* -> success = RL_SetMousePosition( Vector2 position ) +> success = RL.SetMousePosition( Vector2 position ) Set mouse position XY @@ -1797,7 +1797,7 @@ Set mouse position XY */ int lcoreSetMousePosition( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMousePosition( Vector2 position )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMousePosition( Vector2 position )" ); lua_pushboolean( L, false ); return 1; } @@ -1810,7 +1810,7 @@ int lcoreSetMousePosition( lua_State *L ) { } /* -> success = RL_SetMouseOffset( Vector2 offset ) +> success = RL.SetMouseOffset( Vector2 offset ) Set mouse offset @@ -1819,7 +1819,7 @@ Set mouse offset */ int lcoreSetMouseOffset( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMouseOffset( Vector2 offset )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMouseOffset( Vector2 offset )" ); lua_pushboolean( L, false ); return 1; } @@ -1832,7 +1832,7 @@ int lcoreSetMouseOffset( lua_State *L ) { } /* -> success = RL_SetMouseScale( Vector2 scale ) +> success = RL.SetMouseScale( Vector2 scale ) Set mouse scaling @@ -1841,7 +1841,7 @@ Set mouse scaling */ int lcoreSetMouseScale( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMouseScale( Vector2 scale )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMouseScale( Vector2 scale )" ); lua_pushboolean( L, false ); return 1; } @@ -1854,7 +1854,7 @@ int lcoreSetMouseScale( lua_State *L ) { } /* -> movement = RL_GetMouseWheelMove() +> movement = RL.GetMouseWheelMove() Returns mouse wheel movement Y @@ -1866,7 +1866,7 @@ int lcoreGetMouseWheelMove( lua_State *L ) { } /* -> success = RL_SetMouseCursor( int cursor ) +> success = RL.SetMouseCursor( int cursor ) Set mouse cursor @@ -1875,7 +1875,7 @@ Set mouse cursor */ int lcoreSetMouseCursor( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMouseCursor( int cursor )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMouseCursor( int cursor )" ); lua_pushboolean( L, false ); return 1; } @@ -1890,7 +1890,7 @@ int lcoreSetMouseCursor( lua_State *L ) { */ /* -> position = RL_GetTouchPosition( int index ) +> position = RL.GetTouchPosition( int index ) Get touch position XY for a touch point index ( relative to screen size ) @@ -1899,7 +1899,7 @@ Get touch position XY for a touch point index ( relative to screen size ) */ int lcoreGetTouchPosition( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetTouchPosition( int index )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTouchPosition( int index )" ); lua_pushboolean( L, false ); return 1; } @@ -1909,7 +1909,7 @@ int lcoreGetTouchPosition( lua_State *L ) { } /* -> id = RL_GetTouchPointId( int index ) +> id = RL.GetTouchPointId( int index ) Get touch point identifier for given index @@ -1918,7 +1918,7 @@ Get touch point identifier for given index */ int lcoreGetTouchPointId( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetTouchPointId( int index )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTouchPointId( int index )" ); lua_pushboolean( L, false ); return 1; } @@ -1928,7 +1928,7 @@ int lcoreGetTouchPointId( lua_State *L ) { } /* -> count = RL_GetTouchPointCount() +> count = RL.GetTouchPointCount() Get touch point identifier for given index @@ -1945,7 +1945,7 @@ int lcoreGetTouchPointCount( lua_State *L ) { */ /* -> success = RL_SetGesturesEnabled( unsigned int flags ) +> success = RL.SetGesturesEnabled( unsigned int flags ) Enable a set of gestures using flags @@ -1954,7 +1954,7 @@ Enable a set of gestures using flags */ int lcoreSetGesturesEnabled( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetGesturesEnabled( unsigned int flags )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetGesturesEnabled( unsigned int flags )" ); lua_pushboolean( L, false ); return 1; } @@ -1965,7 +1965,7 @@ int lcoreSetGesturesEnabled( lua_State *L ) { } /* -> detected = RL_IsGestureDetected( int gesture ) +> detected = RL.IsGestureDetected( int gesture ) Check if a gesture have been detected @@ -1974,7 +1974,7 @@ Check if a gesture have been detected */ int lcoreIsGestureDetected( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsGestureDetected( int gesture )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGestureDetected( int gesture )" ); lua_pushnil( L ); return 1; } @@ -1984,7 +1984,7 @@ int lcoreIsGestureDetected( lua_State *L ) { } /* -> gesture = RL_GetGestureDetected() +> gesture = RL.GetGestureDetected() Get latest detected gesture @@ -1997,7 +1997,7 @@ int lcoreGetGestureDetected( lua_State *L ) { } /* -> time = RL_GetGestureHoldDuration() +> time = RL.GetGestureHoldDuration() Get gesture hold time in milliseconds @@ -2010,7 +2010,7 @@ int lcoreGetGestureHoldDuration( lua_State *L ) { } /* -> vector = RL_GetGestureDragVector() +> vector = RL.GetGestureDragVector() Get gesture drag vector @@ -2023,7 +2023,7 @@ int lcoreGetGestureDragVector( lua_State *L ) { } /* -> angle = RL_GetGestureDragAngle() +> angle = RL.GetGestureDragAngle() Get gesture drag angle @@ -2036,7 +2036,7 @@ int lcoreGetGestureDragAngle( lua_State *L ) { } /* -> vector = RL_GetGesturePinchVector() +> vector = RL.GetGesturePinchVector() Get gesture pinch delta @@ -2049,7 +2049,7 @@ int lcoreGetGesturePinchVector( lua_State *L ) { } /* -> angle = RL_GetGesturePinchAngle() +> angle = RL.GetGesturePinchAngle() Get gesture pinch angle @@ -2066,7 +2066,7 @@ int lcoreGetGesturePinchAngle( lua_State *L ) { */ /* -> path = RL_GetBasePath() +> path = RL.GetBasePath() Return game directory ( where main.lua is located ) @@ -2079,7 +2079,7 @@ int lcoreGetBasePath( lua_State *L ) { } /* -> fileExists = RL_FileExists( string fileName ) +> fileExists = RL.FileExists( string fileName ) Check if file exists @@ -2088,7 +2088,7 @@ Check if file exists */ int lcoreFileExists( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_FileExists( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.FileExists( string fileName )" ); lua_pushnil( L ); return 1; } @@ -2097,7 +2097,7 @@ int lcoreFileExists( lua_State *L ) { } /* -> dirExists = RL_DirectoryExists( string dirPath ) +> dirExists = RL.DirectoryExists( string dirPath ) Check if a directory path exists @@ -2106,7 +2106,7 @@ Check if a directory path exists */ int lcoreDirectoryExists( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DirectoryExists( string dirPath )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DirectoryExists( string dirPath )" ); lua_pushnil( L ); return 1; } @@ -2115,7 +2115,7 @@ int lcoreDirectoryExists( lua_State *L ) { } /* -> hasFileExtension = RL_IsFileExtension( string fileName, string ext ) +> hasFileExtension = RL.IsFileExtension( string fileName, string ext ) Check file extension ( Including point: .png, .wav ) @@ -2124,7 +2124,7 @@ Check file extension ( Including point: .png, .wav ) */ int lcoreIsFileExtension( lua_State *L ) { if ( !lua_isstring( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsFileExtension( string fileName, string ext )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsFileExtension( string fileName, string ext )" ); lua_pushnil( L ); return 1; } @@ -2133,7 +2133,7 @@ int lcoreIsFileExtension( lua_State *L ) { } /* -> length = RL_GetFileLength( string fileName ) +> length = RL.GetFileLength( string fileName ) Get file length in bytes ( NOTE: GetFileSize() conflicts with windows.h ) @@ -2142,7 +2142,7 @@ Get file length in bytes ( NOTE: GetFileSize() conflicts with windows.h ) */ int lcoreGetFileLength( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetFileLength( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileLength( string fileName )" ); lua_pushboolean( L, false ); return 1; } @@ -2151,7 +2151,7 @@ int lcoreGetFileLength( lua_State *L ) { } /* -> extension = RL_GetFileExtension( string fileName ) +> extension = RL.GetFileExtension( string fileName ) Get pointer to extension for a filename string ( Includes dot: '.png' ) @@ -2160,7 +2160,7 @@ Get pointer to extension for a filename string ( Includes dot: '.png' ) */ int lcoreGetFileExtension( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetFileExtension( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileExtension( string fileName )" ); lua_pushboolean( L, false ); return 1; } @@ -2169,7 +2169,7 @@ int lcoreGetFileExtension( lua_State *L ) { } /* -> filePath = RL_GetFileName( string filePath ) +> filePath = RL.GetFileName( string filePath ) Get pointer to filename for a path string @@ -2178,7 +2178,7 @@ Get pointer to filename for a path string */ int lcoreGetFileName( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetFileName( string filePath )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileName( string filePath )" ); lua_pushboolean( L, false ); return 1; } @@ -2187,7 +2187,7 @@ int lcoreGetFileName( lua_State *L ) { } /* -> filePath = RL_GetFileNameWithoutExt( string filePath ) +> filePath = RL.GetFileNameWithoutExt( string filePath ) Get filename string without extension ( Uses static string ) @@ -2196,7 +2196,7 @@ Get filename string without extension ( Uses static string ) */ int lcoreGetFileNameWithoutExt( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetFileNameWithoutExt( string filePath )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileNameWithoutExt( string filePath )" ); lua_pushboolean( L, false ); return 1; } @@ -2205,7 +2205,7 @@ int lcoreGetFileNameWithoutExt( lua_State *L ) { } /* -> filePath = RL_GetDirectoryPath( string filePath ) +> filePath = RL.GetDirectoryPath( string filePath ) Get full path for a given fileName with path ( Uses static string ) @@ -2214,7 +2214,7 @@ Get full path for a given fileName with path ( Uses static string ) */ int lcoreGetDirectoryPath( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetDirectoryPath( string filePath )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetDirectoryPath( string filePath )" ); lua_pushboolean( L, false ); return 1; } @@ -2223,7 +2223,7 @@ int lcoreGetDirectoryPath( lua_State *L ) { } /* -> directory = RL_GetPrevDirectoryPath( string dirPath ) +> directory = RL.GetPrevDirectoryPath( string dirPath ) Get previous directory path for a given path ( Uses static string ) @@ -2232,7 +2232,7 @@ Get previous directory path for a given path ( Uses static string ) */ int lcoreGetPrevDirectoryPath( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetPrevDirectoryPath( string dirPath )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetPrevDirectoryPath( string dirPath )" ); lua_pushboolean( L, false ); return 1; } @@ -2241,7 +2241,7 @@ int lcoreGetPrevDirectoryPath( lua_State *L ) { } /* -> directory = RL_GetWorkingDirectory() +> directory = RL.GetWorkingDirectory() Get current working directory ( Uses static string ) @@ -2253,7 +2253,7 @@ int lcoreGetWorkingDirectory( lua_State *L ) { } /* -> fileNames = RL_LoadDirectoryFiles( string dirPath ) +> fileNames = RL.LoadDirectoryFiles( string dirPath ) Load directory filepaths @@ -2262,7 +2262,7 @@ Load directory filepaths */ int lcoreLoadDirectoryFiles( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadDirectoryFiles( string dirPath )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadDirectoryFiles( string dirPath )" ); lua_pushboolean( L, false ); return 1; } @@ -2280,7 +2280,7 @@ int lcoreLoadDirectoryFiles( lua_State *L ) { } /* -> fileNames = RL_LoadDirectoryFilesEx( string basePath, string filter, bool scanSubdirs ) +> fileNames = RL.LoadDirectoryFilesEx( string basePath, string filter, bool scanSubdirs ) Load directory filepaths with extension filtering and recursive directory scan @@ -2289,7 +2289,7 @@ Load directory filepaths with extension filtering and recursive directory scan */ int lcoreLoadDirectoryFilesEx( lua_State *L ) { if ( !lua_isstring( L, -3 ) || !lua_isstring( L, -2 ) || !lua_isboolean( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadDirectoryFilesEx( string dirPath )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadDirectoryFilesEx( string dirPath )" ); lua_pushboolean( L, false ); return 1; } @@ -2307,7 +2307,7 @@ int lcoreLoadDirectoryFilesEx( lua_State *L ) { } /* -> success = RL_ChangeDirectory( string directory ) +> success = RL.ChangeDirectory( string directory ) Change working directory, return true on success @@ -2316,7 +2316,7 @@ Change working directory, return true on success */ int lcoreChangeDirectory( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ChangeDirectory( string directory )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ChangeDirectory( string directory )" ); lua_pushboolean( L, false ); return 1; } @@ -2325,7 +2325,7 @@ int lcoreChangeDirectory( lua_State *L ) { } /* -> isFile = RL_IsPathFile( string path ) +> isFile = RL.IsPathFile( string path ) Check if a given path is a file or a directory @@ -2334,7 +2334,7 @@ Check if a given path is a file or a directory */ int lcoreIsPathFile( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsPathFile( string path )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsPathFile( string path )" ); lua_pushnil( L ); return 1; } @@ -2343,7 +2343,7 @@ int lcoreIsPathFile( lua_State *L ) { } /* -> fileDropped = RL_IsFileDropped() +> fileDropped = RL.IsFileDropped() Check if a file has been dropped into window @@ -2355,7 +2355,7 @@ int lcoreIsFileDropped( lua_State *L ) { } /* -> files = RL_LoadDroppedFiles() +> files = RL.LoadDroppedFiles() Load dropped filepaths @@ -2376,7 +2376,7 @@ int lcoreLoadDroppedFiles( lua_State *L ) { } /* -> time = RL_GetFileModTime( string fileName ) +> time = RL.GetFileModTime( string fileName ) Get file modification time ( Last write time ) @@ -2385,7 +2385,7 @@ Get file modification time ( Last write time ) */ int lcoreGetFileModTime( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetFileModTime( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileModTime( string fileName )" ); lua_pushboolean( L, false ); return 1; } @@ -2398,7 +2398,7 @@ int lcoreGetFileModTime( lua_State *L ) { */ /* -> camera2D = RL_CreateCamera2D() +> camera2D = RL.CreateCamera2D() Return camera2D id set to default configuration @@ -2425,7 +2425,7 @@ int lcoreCreateCamera2D( lua_State *L ) { } /* -> success = RL_UnloadCamera2D( int Camera2D ) +> success = RL.UnloadCamera2D( int Camera2D ) Unload Camera2D @@ -2434,7 +2434,7 @@ Unload Camera2D */ int lcoreUnloadCamera2D( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadCamera2D( int Camera2D )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadCamera2D( int Camera2D )" ); lua_pushboolean( L, false ); return 1; } @@ -2453,7 +2453,7 @@ int lcoreUnloadCamera2D( lua_State *L ) { } /* -> success = RL_BeginMode2D( camera2D camera ) +> success = RL.BeginMode2D( camera2D camera ) Begin 2D mode with custom camera ( 2D ) @@ -2462,7 +2462,7 @@ Begin 2D mode with custom camera ( 2D ) */ int lcoreBeginMode2D( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_BeginMode2D( camera2D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginMode2D( camera2D camera )" ); lua_pushboolean( L, false ); return 1; } @@ -2480,7 +2480,7 @@ int lcoreBeginMode2D( lua_State *L ) { } /* -> RL_EndMode2D() +> RL.EndMode2D() Ends 2D mode with custom camera */ @@ -2491,7 +2491,7 @@ int lcoreEndMode2D( lua_State *L ) { } /* -> success = RL_SetCamera2DTarget( camera2D camera, Vector2 target ) +> success = RL.SetCamera2DTarget( camera2D camera, Vector2 target ) Set camera target ( rotation and zoom origin ) @@ -2500,7 +2500,7 @@ Set camera target ( rotation and zoom origin ) */ int lcoreSetCamera2DTarget( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCamera2DTarget( camera2D camera, Vector2 target )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera2DTarget( camera2D camera, Vector2 target )" ); lua_pushboolean( L, false ); return 1; } @@ -2519,7 +2519,7 @@ int lcoreSetCamera2DTarget( lua_State *L ) { } /* -> success = RL_SetCamera2DOffset( camera2D camera, Vector2 offset ) +> success = RL.SetCamera2DOffset( camera2D camera, Vector2 offset ) Set camera offset ( displacement from target ) @@ -2528,7 +2528,7 @@ Set camera offset ( displacement from target ) */ int lcoreSetCamera2DOffset( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCamera2DOffset( camera2D camera, Vector2 offset )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera2DOffset( camera2D camera, Vector2 offset )" ); lua_pushboolean( L, false ); return 1; } @@ -2547,7 +2547,7 @@ int lcoreSetCamera2DOffset( lua_State *L ) { } /* -> success = RL_SetCamera2DRotation( camera3D camera, float rotation ) +> success = RL.SetCamera2DRotation( camera3D camera, float rotation ) Set camera rotation in degrees @@ -2556,7 +2556,7 @@ Set camera rotation in degrees */ int lcoreSetCamera2DRotation( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCamera2DRotation( camera3D camera, float rotation )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera2DRotation( camera3D camera, float rotation )" ); lua_pushboolean( L, false ); return 1; } @@ -2574,7 +2574,7 @@ int lcoreSetCamera2DRotation( lua_State *L ) { } /* -> success = RL_SetCamera2DZoom( camera3D camera, float zoom ) +> success = RL.SetCamera2DZoom( camera3D camera, float zoom ) Set camera zoom ( scaling ), should be 1.0f by default @@ -2583,7 +2583,7 @@ Set camera zoom ( scaling ), should be 1.0f by default */ int lcoreSetCamera2DZoom( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCamera2DZoom( camera3D camera, float zoom )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera2DZoom( camera3D camera, float zoom )" ); lua_pushboolean( L, false ); return 1; } @@ -2601,7 +2601,7 @@ int lcoreSetCamera2DZoom( lua_State *L ) { } /* -> target = RL_GetCamera2DTarget( camera2D camera ) +> target = RL.GetCamera2DTarget( camera2D camera ) Get camera2D target @@ -2610,7 +2610,7 @@ Get camera2D target */ int lcoreGetCamera2DTarget( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCamera2DTarget( camera2D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera2DTarget( camera2D camera )" ); lua_pushnil( L ); return 1; } @@ -2627,7 +2627,7 @@ int lcoreGetCamera2DTarget( lua_State *L ) { } /* -> offset = RL_GetCamera2DOffset( camera2D camera ) +> offset = RL.GetCamera2DOffset( camera2D camera ) Get camera2D offset @@ -2636,7 +2636,7 @@ Get camera2D offset */ int lcoreGetCamera2DOffset( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCamera2DOffset( camera2D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera2DOffset( camera2D camera )" ); lua_pushnil( L ); return 1; } @@ -2653,7 +2653,7 @@ int lcoreGetCamera2DOffset( lua_State *L ) { } /* -> rotation = RL_GetCamera2DRotation( camera2D camera ) +> rotation = RL.GetCamera2DRotation( camera2D camera ) Get camera2D rotation @@ -2662,7 +2662,7 @@ Get camera2D rotation */ int lcoreGetCamera2DRotation( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCamera2DRotation( camera2D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera2DRotation( camera2D camera )" ); lua_pushnil( L ); return 1; } @@ -2678,7 +2678,7 @@ int lcoreGetCamera2DRotation( lua_State *L ) { } /* -> zoom = RL_GetCamera2DZoom( camera2D camera ) +> zoom = RL.GetCamera2DZoom( camera2D camera ) Get camera2D zoom @@ -2687,7 +2687,7 @@ Get camera2D zoom */ int lcoreGetCamera2DZoom( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCamera2DZoom( camera2D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera2DZoom( camera2D camera )" ); lua_pushnil( L ); return 1; } @@ -2707,7 +2707,7 @@ int lcoreGetCamera2DZoom( lua_State *L ) { */ /* -> camera = RL_CreateCamera3D() +> camera = RL.CreateCamera3D() Return camera3D id set to default configuration @@ -2736,7 +2736,7 @@ int lcoreCreateCamera3D( lua_State *L ) { } /* -> success = RL_UnloadCamera3D( int Camera3D ) +> success = RL.UnloadCamera3D( int Camera3D ) Unload Camera3D @@ -2745,7 +2745,7 @@ Unload Camera3D */ int lcoreUnloadCamera3D( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadCamera3D( int Camera3D )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadCamera3D( int Camera3D )" ); lua_pushboolean( L, false ); return 1; } @@ -2764,7 +2764,7 @@ int lcoreUnloadCamera3D( lua_State *L ) { } /* -> success = RL_BeginMode3D( camera3D camera ) +> success = RL.BeginMode3D( camera3D camera ) Begin 3D mode with custom camera ( 3D ) @@ -2773,7 +2773,7 @@ Begin 3D mode with custom camera ( 3D ) */ int lcoreBeginMode3D( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_BeginMode3D( camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginMode3D( camera3D camera )" ); lua_pushboolean( L, false ); return 1; } @@ -2791,7 +2791,7 @@ int lcoreBeginMode3D( lua_State *L ) { } /* -> RL_EndMode3D() +> RL.EndMode3D() Ends 3D mode and returns to default 2D orthographic mode */ @@ -2802,16 +2802,16 @@ int lcoreEndMode3D( lua_State *L ) { } /* -> success = RL_SetCamera3DPosition( camera3D camera, Vector3 position ) +> success = RL.SetCamera3DPosition( camera3D camera, Vector3 position ) -Set camera position ( Remember to call "RL_UpdateCamera3D()" to apply changes ) +Set camera position ( Remember to call "RL.UpdateCamera3D()" to apply changes ) - Failure return false - Success return true */ int lcoreSetCamera3DPosition( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCamera3DPosition( camera3D camera, Vector3 position )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DPosition( camera3D camera, Vector3 position )" ); lua_pushboolean( L, false ); return 1; } @@ -2830,7 +2830,7 @@ int lcoreSetCamera3DPosition( lua_State *L ) { } /* -> success = RL_SetCamera3DTarget( camera3D camera, Vector3 target ) +> success = RL.SetCamera3DTarget( camera3D camera, Vector3 target ) Set camera target it looks-at @@ -2839,7 +2839,7 @@ Set camera target it looks-at */ int lcoreSetCamera3DTarget( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCamera3DTarget( camera3D camera, Vector3 target )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DTarget( camera3D camera, Vector3 target )" ); lua_pushboolean( L, false ); return 1; } @@ -2858,7 +2858,7 @@ int lcoreSetCamera3DTarget( lua_State *L ) { } /* -> success = RL_SetCamera3DUp( camera3D camera, Vector3 up ) +> success = RL.SetCamera3DUp( camera3D camera, Vector3 up ) Set camera up vector ( Rotation over it's axis ) @@ -2867,7 +2867,7 @@ Set camera up vector ( Rotation over it's axis ) */ int lcoreSetCamera3DUp( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCamera3DUp( camera3D camera, Vector3 up )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DUp( camera3D camera, Vector3 up )" ); lua_pushboolean( L, false ); return 1; } @@ -2886,7 +2886,7 @@ int lcoreSetCamera3DUp( lua_State *L ) { } /* -> success = RL_SetCamera3DFovy( camera3D camera, float fovy ) +> success = RL.SetCamera3DFovy( camera3D camera, float fovy ) Set camera field-of-view apperture in Y ( degrees ) in perspective, used as near plane width in orthographic @@ -2895,7 +2895,7 @@ Set camera field-of-view apperture in Y ( degrees ) in perspective, used as near */ int lcoreSetCamera3DFovy( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCamera3DFovy( camera3D camera, float fovy )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DFovy( camera3D camera, float fovy )" ); lua_pushboolean( L, false ); return 1; } @@ -2913,7 +2913,7 @@ int lcoreSetCamera3DFovy( lua_State *L ) { } /* -> success = RL_SetCamera3DProjection( camera3D camera, int projection ) +> success = RL.SetCamera3DProjection( camera3D camera, int projection ) Set camera projection mode ( CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC ) @@ -2922,7 +2922,7 @@ Set camera projection mode ( CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC ) */ int lcoreSetCamera3DProjection( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCamera3DProjection( camera3D camera, int projection )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DProjection( camera3D camera, int projection )" ); lua_pushboolean( L, false ); return 1; } @@ -2940,7 +2940,7 @@ int lcoreSetCamera3DProjection( lua_State *L ) { } /* -> success = RL_SetCameraMode( camera3D camera, int mode ) +> success = RL.SetCameraMode( camera3D camera, int mode ) Set camera mode ( CAMERA_CUSTOM, CAMERA_FREE, CAMERA_ORBITAL... ) @@ -2949,7 +2949,7 @@ Set camera mode ( CAMERA_CUSTOM, CAMERA_FREE, CAMERA_ORBITAL... ) */ int lcoreSetCameraMode( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCameraMode( camera3D camera, int mode )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCameraMode( camera3D camera, int mode )" ); lua_pushboolean( L, false ); return 1; } @@ -2967,7 +2967,7 @@ int lcoreSetCameraMode( lua_State *L ) { } /* -> position = RL_GetCamera3DPosition( camera3D camera ) +> position = RL.GetCamera3DPosition( camera3D camera ) Get camera position @@ -2976,7 +2976,7 @@ Get camera position */ int lcoreGetCamera3DPosition( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCamera3DPosition( camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DPosition( camera3D camera )" ); lua_pushnil( L ); return 1; } @@ -2993,7 +2993,7 @@ int lcoreGetCamera3DPosition( lua_State *L ) { } /* -> target = RL_GetCamera3DTarget( camera3D camera ) +> target = RL.GetCamera3DTarget( camera3D camera ) Get camera target it looks-at @@ -3002,7 +3002,7 @@ Get camera target it looks-at */ int lcoreGetCamera3DTarget( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCamera3DTarget( camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DTarget( camera3D camera )" ); lua_pushnil( L ); return 1; } @@ -3019,7 +3019,7 @@ int lcoreGetCamera3DTarget( lua_State *L ) { } /* -> up = RL_GetCamera3DUp( camera3D camera ) +> up = RL.GetCamera3DUp( camera3D camera ) Get camera up vector ( Rotation over it's axis ) @@ -3028,7 +3028,7 @@ Get camera up vector ( Rotation over it's axis ) */ int lcoreGetCamera3DUp( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCamera3DUp( camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DUp( camera3D camera )" ); lua_pushnil( L ); return 1; } @@ -3045,7 +3045,7 @@ int lcoreGetCamera3DUp( lua_State *L ) { } /* -> fovy = RL_GetCamera3DFovy( camera3D camera ) +> fovy = RL.GetCamera3DFovy( camera3D camera ) Get camera field-of-view apperture in Y ( degrees ) in perspective, used as near plane width in orthographic @@ -3054,7 +3054,7 @@ Get camera field-of-view apperture in Y ( degrees ) in perspective, used as near */ int lcoreGetCamera3DFovy( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCamera3DFovy( camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DFovy( camera3D camera )" ); lua_pushnil( L ); return 1; } @@ -3071,7 +3071,7 @@ int lcoreGetCamera3DFovy( lua_State *L ) { } /* -> projection = RL_GetCamera3DProjection( camera3D camera ) +> projection = RL.GetCamera3DProjection( camera3D camera ) Get camera projection mode @@ -3080,7 +3080,7 @@ Get camera projection mode */ int lcoreGetCamera3DProjection( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCamera3DProjection( camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DProjection( camera3D camera )" ); lua_pushnil( L ); return 1; } @@ -3097,7 +3097,7 @@ int lcoreGetCamera3DProjection( lua_State *L ) { } /* -> success = RL_UpdateCamera3D( camera3D camera ) +> success = RL.UpdateCamera3D( camera3D camera ) Update camera position for selected mode @@ -3106,7 +3106,7 @@ Update camera position for selected mode */ int lcoreUpdateCamera3D( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UpdateCamera3D( camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateCamera3D( camera3D camera )" ); lua_pushboolean( L, false ); return 1; } @@ -3124,7 +3124,7 @@ int lcoreUpdateCamera3D( lua_State *L ) { } /* -> success = RL_SetCameraPanControl( int keyPan ) +> success = RL.SetCameraPanControl( int keyPan ) Set camera pan key to combine with mouse movement ( free camera ) @@ -3133,7 +3133,7 @@ Set camera pan key to combine with mouse movement ( free camera ) */ int lcoreSetCameraPanControl( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCameraPanControl( int keyPan )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCameraPanControl( int keyPan )" ); lua_pushboolean( L, false ); return 1; } @@ -3144,7 +3144,7 @@ int lcoreSetCameraPanControl( lua_State *L ) { } /* -> success = RL_SetCameraAltControl( int keyAlt ) +> success = RL.SetCameraAltControl( int keyAlt ) Set camera alt key to combine with mouse movement ( free camera ) @@ -3153,7 +3153,7 @@ Set camera alt key to combine with mouse movement ( free camera ) */ int lcoreSetCameraAltControl( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCameraAltControl( int keyAlt )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCameraAltControl( int keyAlt )" ); lua_pushboolean( L, false ); return 1; } @@ -3164,7 +3164,7 @@ int lcoreSetCameraAltControl( lua_State *L ) { } /* -> success = RL_SetCameraSmoothZoomControl( int keySmoothZoom ) +> success = RL.SetCameraSmoothZoomControl( int keySmoothZoom ) Set camera smooth zoom key to combine with mouse ( free camera ) @@ -3173,7 +3173,7 @@ Set camera smooth zoom key to combine with mouse ( free camera ) */ int lcoreSetCameraSmoothZoomControl( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCameraSmoothZoomControl( int keySmoothZoom )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCameraSmoothZoomControl( int keySmoothZoom )" ); lua_pushboolean( L, false ); return 1; } @@ -3184,7 +3184,7 @@ int lcoreSetCameraSmoothZoomControl( lua_State *L ) { } /* -> success = RL_SetCameraMoveControls( int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown ) +> success = RL.SetCameraMoveControls( int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown ) Set camera move controls ( 1st person and 3rd person cameras ) @@ -3194,7 +3194,7 @@ Set camera move controls ( 1st person and 3rd person cameras ) int lcoreSetCameraMoveControls( lua_State *L ) { if ( !lua_isnumber( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetCameraMoveControls( int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCameraMoveControls( int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown )" ); lua_pushboolean( L, false ); return 1; } @@ -3216,7 +3216,7 @@ int lcoreSetCameraMoveControls( lua_State *L ) { */ /* -> ray = RL_GetMouseRay( Vector2 mousePosition, Camera3D camera ) +> ray = RL.GetMouseRay( Vector2 mousePosition, Camera3D camera ) Get a ray trace from mouse position @@ -3225,7 +3225,7 @@ Get a ray trace from mouse position */ int lcoreGetMouseRay( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetMouseRay( Vector2 mousePosition, Camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMouseRay( Vector2 mousePosition, Camera3D camera )" ); lua_pushboolean( L, false ); return 1; } @@ -3243,7 +3243,7 @@ int lcoreGetMouseRay( lua_State *L ) { } /* -> matrix = RL_GetCameraMatrix( Camera3D camera ) +> matrix = RL.GetCameraMatrix( Camera3D camera ) Get camera transform matrix ( view matrix ) @@ -3252,7 +3252,7 @@ Get camera transform matrix ( view matrix ) */ int lcoreGetCameraMatrix( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCameraMatrix( Camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCameraMatrix( Camera3D camera )" ); lua_pushboolean( L, false ); return 1; } @@ -3268,7 +3268,7 @@ int lcoreGetCameraMatrix( lua_State *L ) { } /* -> matrix = RL_GetCameraMatrix2D( Camera2D camera ) +> matrix = RL.GetCameraMatrix2D( Camera2D camera ) Get camera 2d transform matrix @@ -3277,7 +3277,7 @@ Get camera 2d transform matrix */ int lcoreGetCameraMatrix2D( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCameraMatrix2D( Camera2D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCameraMatrix2D( Camera2D camera )" ); lua_pushboolean( L, false ); return 1; } @@ -3293,7 +3293,7 @@ int lcoreGetCameraMatrix2D( lua_State *L ) { } /* -> position = RL_GetWorldToScreen( Vector3 position, Camera3D camera ) +> position = RL.GetWorldToScreen( Vector3 position, Camera3D camera ) Get the screen space position for a 3d world space position @@ -3302,7 +3302,7 @@ Get the screen space position for a 3d world space position */ int lcoreGetWorldToScreen( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetWorldToScreen( Vector3 position, Camera3D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetWorldToScreen( Vector3 position, Camera3D camera )" ); lua_pushboolean( L, false ); return 1; } @@ -3320,7 +3320,7 @@ int lcoreGetWorldToScreen( lua_State *L ) { } /* -> position = RL_GetWorldToScreenEx( Vector3 position, Camera3D camera, Vector2 size ) +> position = RL.GetWorldToScreenEx( Vector3 position, Camera3D camera, Vector2 size ) Get size position for a 3d world space position @@ -3329,7 +3329,7 @@ Get size position for a 3d world space position */ int lcoreGetWorldToScreenEx( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetWorldToScreenEx( Vector3 position, Camera3D camera, Vector2 size )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetWorldToScreenEx( Vector3 position, Camera3D camera, Vector2 size )" ); lua_pushboolean( L, false ); return 1; } @@ -3349,7 +3349,7 @@ int lcoreGetWorldToScreenEx( lua_State *L ) { } /* -> position = RL_GetWorldToScreen2D( Vector2 position, Camera2D camera ) +> position = RL.GetWorldToScreen2D( Vector2 position, Camera2D camera ) Get the screen space position for a 2d camera world space position @@ -3358,7 +3358,7 @@ Get the screen space position for a 2d camera world space position */ int lcoreGetWorldToScreen2D( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetWorldToScreen2D( Vector2 position, Camera2D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetWorldToScreen2D( Vector2 position, Camera2D camera )" ); lua_pushboolean( L, false ); return 1; } @@ -3376,7 +3376,7 @@ int lcoreGetWorldToScreen2D( lua_State *L ) { } /* -> position = RL_GetScreenToWorld2D( Vector2 position, Camera2D camera ) +> position = RL.GetScreenToWorld2D( Vector2 position, Camera2D camera ) Get the world space position for a 2d camera screen space position @@ -3385,7 +3385,7 @@ Get the world space position for a 2d camera screen space position */ int lcoreGetScreenToWorld2D( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetScreenToWorld2D( Vector2 position, Camera2D camera )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetScreenToWorld2D( Vector2 position, Camera2D camera )" ); lua_pushboolean( L, false ); return 1; } diff --git a/src/easings.c b/src/easings.c index b864cdb..1179492 100644 --- a/src/easings.c +++ b/src/easings.c @@ -9,7 +9,7 @@ */ /* -> value = RL_EaseLinear( float t, float b, float c, float d ) +> value = RL.EaseLinear( float t, float b, float c, float d ) Ease linear @@ -18,7 +18,7 @@ Ease linear */ int leasingsEaseLinear( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseLinear( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseLinear( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -32,7 +32,7 @@ int leasingsEaseLinear( lua_State *L ) { */ /* -> value = RL_EaseSineIn( float t, float b, float c, float d ) +> value = RL.EaseSineIn( float t, float b, float c, float d ) Ease sine in @@ -41,7 +41,7 @@ Ease sine in */ int leasingsEaseSineIn( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseSineIn( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseSineIn( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -51,7 +51,7 @@ int leasingsEaseSineIn( lua_State *L ) { } /* -> value = RL_EaseSineOut( float t, float b, float c, float d ) +> value = RL.EaseSineOut( float t, float b, float c, float d ) Ease sine out @@ -60,7 +60,7 @@ Ease sine out */ int leasingsEaseSineOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseSineOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseSineOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -70,7 +70,7 @@ int leasingsEaseSineOut( lua_State *L ) { } /* -> value = RL_EaseSineInOut( float t, float b, float c, float d ) +> value = RL.EaseSineInOut( float t, float b, float c, float d ) Ease sine in out @@ -79,7 +79,7 @@ Ease sine in out */ int leasingsEaseSineInOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseSineInOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseSineInOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -93,7 +93,7 @@ int leasingsEaseSineInOut( lua_State *L ) { */ /* -> value = RL_EaseCircIn( float t, float b, float c, float d ) +> value = RL.EaseCircIn( float t, float b, float c, float d ) Ease circle in @@ -102,7 +102,7 @@ Ease circle in */ int leasingsEaseCircIn( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseCircIn( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCircIn( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -112,7 +112,7 @@ int leasingsEaseCircIn( lua_State *L ) { } /* -> value = RL_EaseCircOut( float t, float b, float c, float d ) +> value = RL.EaseCircOut( float t, float b, float c, float d ) Ease circle out @@ -121,7 +121,7 @@ Ease circle out */ int leasingsEaseCircOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseCircOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCircOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -131,7 +131,7 @@ int leasingsEaseCircOut( lua_State *L ) { } /* -> value = RL_EaseCircInOut( float t, float b, float c, float d ) +> value = RL.EaseCircInOut( float t, float b, float c, float d ) Ease circle in out @@ -140,7 +140,7 @@ Ease circle in out */ int leasingsEaseCircInOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseCircInOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCircInOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -154,7 +154,7 @@ int leasingsEaseCircInOut( lua_State *L ) { */ /* -> value = RL_EaseCubicIn( float t, float b, float c, float d ) +> value = RL.EaseCubicIn( float t, float b, float c, float d ) Ease cubic in @@ -163,7 +163,7 @@ Ease cubic in */ int leasingsEaseCubicIn( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseCubicIn( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCubicIn( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -173,7 +173,7 @@ int leasingsEaseCubicIn( lua_State *L ) { } /* -> value = RL_EaseCubicOut( float t, float b, float c, float d ) +> value = RL.EaseCubicOut( float t, float b, float c, float d ) Ease cubic out @@ -182,7 +182,7 @@ Ease cubic out */ int leasingsEaseCubicOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseCubicOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCubicOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -192,7 +192,7 @@ int leasingsEaseCubicOut( lua_State *L ) { } /* -> value = RL_EaseCubicInOut( float t, float b, float c, float d ) +> value = RL.EaseCubicInOut( float t, float b, float c, float d ) Ease cubic in out @@ -201,7 +201,7 @@ Ease cubic in out */ int leasingsEaseCubicInOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseCubicInOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCubicInOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -215,7 +215,7 @@ int leasingsEaseCubicInOut( lua_State *L ) { */ /* -> value = RL_EaseQuadIn( float t, float b, float c, float d ) +> value = RL.EaseQuadIn( float t, float b, float c, float d ) Ease quadratic in @@ -224,7 +224,7 @@ Ease quadratic in */ int leasingsEaseQuadIn( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseQuadIn( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseQuadIn( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -234,7 +234,7 @@ int leasingsEaseQuadIn( lua_State *L ) { } /* -> value = RL_EaseQuadOut( float t, float b, float c, float d ) +> value = RL.EaseQuadOut( float t, float b, float c, float d ) Ease quadratic out @@ -243,7 +243,7 @@ Ease quadratic out */ int leasingsEaseQuadOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseQuadOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseQuadOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -253,7 +253,7 @@ int leasingsEaseQuadOut( lua_State *L ) { } /* -> value = RL_EaseQuadInOut( float t, float b, float c, float d ) +> value = RL.EaseQuadInOut( float t, float b, float c, float d ) Ease quadratic in out @@ -262,7 +262,7 @@ Ease quadratic in out */ int leasingsEaseQuadInOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseQuadInOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseQuadInOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -276,7 +276,7 @@ int leasingsEaseQuadInOut( lua_State *L ) { */ /* -> value = RL_EaseExpoIn( float t, float b, float c, float d ) +> value = RL.EaseExpoIn( float t, float b, float c, float d ) Ease exponential in @@ -285,7 +285,7 @@ Ease exponential in */ int leasingsEaseExpoIn( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseExpoIn( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseExpoIn( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -295,7 +295,7 @@ int leasingsEaseExpoIn( lua_State *L ) { } /* -> value = RL_EaseExpoOut( float t, float b, float c, float d ) +> value = RL.EaseExpoOut( float t, float b, float c, float d ) Ease exponential out @@ -304,7 +304,7 @@ Ease exponential out */ int leasingsEaseExpoOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseExpoOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseExpoOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -314,7 +314,7 @@ int leasingsEaseExpoOut( lua_State *L ) { } /* -> value = RL_EaseExpoInOut( float t, float b, float c, float d ) +> value = RL.EaseExpoInOut( float t, float b, float c, float d ) Ease exponential in out @@ -323,7 +323,7 @@ Ease exponential in out */ int leasingsEaseExpoInOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseExpoInOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseExpoInOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -337,7 +337,7 @@ int leasingsEaseExpoInOut( lua_State *L ) { */ /* -> value = RL_EaseBackIn( float t, float b, float c, float d ) +> value = RL.EaseBackIn( float t, float b, float c, float d ) Ease back in @@ -346,7 +346,7 @@ Ease back in */ int leasingsEaseBackIn( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseBackIn( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBackIn( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -356,7 +356,7 @@ int leasingsEaseBackIn( lua_State *L ) { } /* -> value = RL_EaseBackOut( float t, float b, float c, float d ) +> value = RL.EaseBackOut( float t, float b, float c, float d ) Ease back out @@ -365,7 +365,7 @@ Ease back out */ int leasingsEaseBackOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseBackOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBackOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -375,7 +375,7 @@ int leasingsEaseBackOut( lua_State *L ) { } /* -> value = RL_EaseBackInOut( float t, float b, float c, float d ) +> value = RL.EaseBackInOut( float t, float b, float c, float d ) Ease back in out @@ -384,7 +384,7 @@ Ease back in out */ int leasingsEaseBackInOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseBackInOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBackInOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -398,7 +398,7 @@ int leasingsEaseBackInOut( lua_State *L ) { */ /* -> value = RL_EaseBounceIn( float t, float b, float c, float d ) +> value = RL.EaseBounceIn( float t, float b, float c, float d ) Ease bounce in @@ -407,7 +407,7 @@ Ease bounce in */ int leasingsEaseBounceIn( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseBounceIn( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBounceIn( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -417,7 +417,7 @@ int leasingsEaseBounceIn( lua_State *L ) { } /* -> value = RL_EaseBounceOut( float t, float b, float c, float d ) +> value = RL.EaseBounceOut( float t, float b, float c, float d ) Ease bounce out @@ -426,7 +426,7 @@ Ease bounce out */ int leasingsEaseBounceOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseBounceOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBounceOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -436,7 +436,7 @@ int leasingsEaseBounceOut( lua_State *L ) { } /* -> value = RL_EaseBounceInOut( float t, float b, float c, float d ) +> value = RL.EaseBounceInOut( float t, float b, float c, float d ) Ease bounce in out @@ -445,7 +445,7 @@ Ease bounce in out */ int leasingsEaseBounceInOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseBounceInOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBounceInOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -459,7 +459,7 @@ int leasingsEaseBounceInOut( lua_State *L ) { */ /* -> value = RL_EaseElasticIn( float t, float b, float c, float d ) +> value = RL.EaseElasticIn( float t, float b, float c, float d ) Ease elastic in @@ -468,7 +468,7 @@ Ease elastic in */ int leasingsEaseElasticIn( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseElasticIn( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseElasticIn( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -478,7 +478,7 @@ int leasingsEaseElasticIn( lua_State *L ) { } /* -> value = RL_EaseElasticOut( float t, float b, float c, float d ) +> value = RL.EaseElasticOut( float t, float b, float c, float d ) Ease elastic out @@ -487,7 +487,7 @@ Ease elastic out */ int leasingsEaseElasticOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseElasticOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseElasticOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } @@ -497,7 +497,7 @@ int leasingsEaseElasticOut( lua_State *L ) { } /* -> value = RL_EaseElasticInOut( float t, float b, float c, float d ) +> value = RL.EaseElasticInOut( float t, float b, float c, float d ) Ease elastic in out @@ -506,7 +506,7 @@ Ease elastic in out */ int leasingsEaseElasticInOut( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_EaseElasticInOut( float t, float b, float c, float d )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseElasticInOut( float t, float b, float c, float d )" ); lua_pushboolean( L, false ); return 1; } diff --git a/src/lights.c b/src/lights.c index 381361e..b82ba8d 100644 --- a/src/lights.c +++ b/src/lights.c @@ -37,7 +37,7 @@ bool validLight( size_t id ) { */ /* -> light = RL_CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader ) +> light = RL.CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader ) Create a light and get shader locations @@ -46,7 +46,7 @@ Create a light and get shader locations */ int llightsCreateLight( lua_State *L ) { if ( !lua_isnumber( L, -5 ) || !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader )" ); lua_pushinteger( L, -1 ); return 1; } @@ -76,7 +76,7 @@ int llightsCreateLight( lua_State *L ) { } /* -> success = RL_UpdateLightValues( Shader shader, Light light ) +> success = RL.UpdateLightValues( Shader shader, Light light ) Send light properties to shader @@ -85,7 +85,7 @@ Send light properties to shader */ int llightsUpdateLightValues( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UpdateLightValues( Shader shader, Light light )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateLightValues( Shader shader, Light light )" ); lua_pushboolean( L, false ); return 1; } diff --git a/src/lua_core.c b/src/lua_core.c index da09eee..caea688 100644 --- a/src/lua_core.c +++ b/src/lua_core.c @@ -16,22 +16,37 @@ static void assignGlobalInt( int value, const char *name ) { lua_State *L = state->luaState; lua_pushinteger( L, value ); - lua_setglobal( L, name ); + // lua_setglobal( L, name ); + lua_setfield( L, -2, name ); } static void assignGlobalFloat( float value, const char *name ) { lua_State *L = state->luaState; lua_pushnumber( L, value ); - lua_setglobal( L, name ); + // lua_setglobal( L, name ); + lua_setfield( L, -2, name ); } static void assignGlobalColor( Color color, const char *name ) { lua_State *L = state->luaState; uluaPushColor( L, color ); - lua_setglobal( L, name ); + // lua_setglobal( L, name ); + lua_setfield( L, -2, name ); +} + +static void assingGlobalFunction( const char *name, int ( *functionPtr )( lua_State* ) ) { + lua_State *L = state->luaState; + lua_pushcfunction( L, functionPtr ); + lua_setfield( L, -2, name ); } void defineGlobals() { + lua_State *L = state->luaState; + + lua_newtable( state->luaState ); + lua_setglobal( L, "RL" ); + lua_getglobal( L, "RL" ); + /*DOC_START*/ /* ConfigFlags */ assignGlobalInt( FLAG_VSYNC_HINT, "FLAG_VSYNC_HINT" ); @@ -476,6 +491,8 @@ void defineGlobals() { assignGlobalInt( LIGHT_DIRECTIONAL, "LIGHT_DIRECTIONAL" ); assignGlobalInt( LIGHT_POINT, "LIGHT_POINT" ); /*DOC_END*/ + + lua_pop( L, -1 ); } // Custom logging funtion @@ -586,7 +603,9 @@ bool luaCallMain() { lua_pushcfunction( L, luaTraceback ); int tracebackidx = lua_gettop( L ); - lua_getglobal( L, "init" ); + // lua_getglobal( L, "init" ); + lua_getglobal( L, "RL" ); + lua_getfield ( L, -1, "init" ); if ( lua_isfunction( L, -1 ) ) { if ( lua_pcall( L, 0, 0, tracebackidx ) != 0 ) { @@ -599,6 +618,7 @@ bool luaCallMain() { TraceLog( LOG_ERROR, "%s", "No Lua init found!" ); return false; } + lua_pop( L, -1 ); /* Apply custom callback here. */ SetTraceLogCallback( LogCustom ); @@ -611,7 +631,9 @@ void luaCallProcess() { lua_pushcfunction( L, luaTraceback ); int tracebackidx = lua_gettop(L); - lua_getglobal( L, "process" ); + // lua_getglobal( L, "process" ); + lua_getglobal( L, "RL" ); + lua_getfield ( L, -1, "process" ); if ( lua_isfunction( L, -1 ) ) { lua_pushnumber( L, GetFrameTime() ); @@ -631,7 +653,9 @@ void luaCallDraw() { lua_pushcfunction( L, luaTraceback ); int tracebackidx = lua_gettop(L); - lua_getglobal( L, "draw" ); + // lua_getglobal( L, "draw" ); + lua_getglobal( L, "RL" ); + lua_getfield ( L, -1, "draw" ); if ( lua_isfunction( L, -1 ) ) { BeginDrawing(); @@ -652,7 +676,9 @@ void luaCallExit() { lua_pushcfunction( L, luaTraceback ); int tracebackidx = lua_gettop(L); - lua_getglobal( L, "exit" ); + // lua_getglobal( L, "exit" ); + lua_getglobal( L, "RL" ); + lua_getfield ( L, -1, "exit" ); if ( lua_isfunction( L, -1 ) ) { if ( lua_pcall( L, 0, 0, tracebackidx ) != 0 ) { @@ -666,678 +692,682 @@ void luaCallExit() { void luaRegister() { lua_State *L = state->luaState; + lua_getglobal( L, "RL" ); /* Core. */ /* Window. */ - lua_register( L, "RL_IsWindowReady", lcoreIsWindowReady ); - lua_register( L, "RL_IsWindowFullscreen", lcoreIsWindowFullscreen ); - lua_register( L, "RL_IsWindowHidden", lcoreIsWindowHidden ); - lua_register( L, "RL_IsWindowMinimized", lcoreIsWindowMinimized ); - lua_register( L, "RL_IsWindowMaximized", lcoreIsWindowMaximized ); - lua_register( L, "RL_IsWindowFocused", lcoreIsWindowFocused ); - lua_register( L, "RL_SetWindowMonitor", lcoreSetWindowMonitor ); - lua_register( L, "RL_SetWindowPosition", lcoreSetWindowPosition ); - lua_register( L, "RL_SetWindowSize", lcoreSetWindowSize ); - lua_register( L, "RL_SetWindowMinSize", lcoreSetWindowMinSize ); - lua_register( L, "RL_GetMonitorPosition", lcoreGetMonitorPosition ); - lua_register( L, "RL_GetMonitorSize", lcoreGetMonitorSize ); - lua_register( L, "RL_GetWindowPosition", lcoreGetWindowPosition ); - lua_register( L, "RL_GetScreenSize", lcoreGetScreenSize ); - lua_register( L, "RL_SetWindowState", lcoreSetWindowState ); - lua_register( L, "RL_IsWindowState", lcoreIsWindowState ); - lua_register( L, "RL_ClearWindowState", lcoreClearWindowState ); - lua_register( L, "RL_IsWindowResized", lcoreIsWindowResized ); - lua_register( L, "RL_SetWindowIcon", lcoreSetWindowIcon ); - lua_register( L, "RL_SetWindowTitle", lcoreSetWindowTitle ); - lua_register( L, "RL_GetMonitorCount", lcoreGetMonitorCount ); - lua_register( L, "RL_GetCurrentMonitor", lcoreGetCurrentMonitor ); - lua_register( L, "RL_GetMonitorPhysicalSize", lcoreGetMonitorPhysicalSize ); - lua_register( L, "RL_GetMonitorRefreshRate", lcoreGetMonitorRefreshRate ); - lua_register( L, "RL_GetWindowScaleDPI", lcoreGetWindowScaleDPI ); - lua_register( L, "RL_GetMonitorName", lcoreGetMonitorName ); - lua_register( L, "RL_CloseWindow", lcoreCloseWindow ); - lua_register( L, "RL_SetClipboardText", lcoreSetClipboardText ); - lua_register( L, "RL_GetClipboardText", lcoreGetClipboardText ); + + assingGlobalFunction( "IsWindowReady", lcoreIsWindowReady ); + assingGlobalFunction( "IsWindowFullscreen", lcoreIsWindowFullscreen ); + assingGlobalFunction( "IsWindowHidden", lcoreIsWindowHidden ); + assingGlobalFunction( "IsWindowMinimized", lcoreIsWindowMinimized ); + assingGlobalFunction( "IsWindowMaximized", lcoreIsWindowMaximized ); + assingGlobalFunction( "IsWindowFocused", lcoreIsWindowFocused ); + assingGlobalFunction( "SetWindowMonitor", lcoreSetWindowMonitor ); + assingGlobalFunction( "SetWindowPosition", lcoreSetWindowPosition ); + assingGlobalFunction( "SetWindowSize", lcoreSetWindowSize ); + assingGlobalFunction( "SetWindowMinSize", lcoreSetWindowMinSize ); + assingGlobalFunction( "GetMonitorPosition", lcoreGetMonitorPosition ); + assingGlobalFunction( "GetMonitorSize", lcoreGetMonitorSize ); + assingGlobalFunction( "GetWindowPosition", lcoreGetWindowPosition ); + assingGlobalFunction( "GetScreenSize", lcoreGetScreenSize ); + assingGlobalFunction( "SetWindowState", lcoreSetWindowState ); + assingGlobalFunction( "IsWindowState", lcoreIsWindowState ); + assingGlobalFunction( "ClearWindowState", lcoreClearWindowState ); + assingGlobalFunction( "IsWindowResized", lcoreIsWindowResized ); + assingGlobalFunction( "SetWindowIcon", lcoreSetWindowIcon ); + assingGlobalFunction( "SetWindowTitle", lcoreSetWindowTitle ); + assingGlobalFunction( "GetMonitorCount", lcoreGetMonitorCount ); + assingGlobalFunction( "GetCurrentMonitor", lcoreGetCurrentMonitor ); + assingGlobalFunction( "GetMonitorPhysicalSize", lcoreGetMonitorPhysicalSize ); + assingGlobalFunction( "GetMonitorRefreshRate", lcoreGetMonitorRefreshRate ); + assingGlobalFunction( "GetWindowScaleDPI", lcoreGetWindowScaleDPI ); + assingGlobalFunction( "GetMonitorName", lcoreGetMonitorName ); + assingGlobalFunction( "CloseWindow", lcoreCloseWindow ); + assingGlobalFunction( "SetClipboardText", lcoreSetClipboardText ); + assingGlobalFunction( "GetClipboardText", lcoreGetClipboardText ); /* Timing. */ - lua_register( L, "RL_SetTargetFPS", lcoreSetTargetFPS ); - lua_register( L, "RL_GetFPS", lcoreGetFPS ); - lua_register( L, "RL_GetFrameTime", lcoreGetFrameTime ); - lua_register( L, "RL_GetTime", lcoreGetTime ); + assingGlobalFunction( "SetTargetFPS", lcoreSetTargetFPS ); + assingGlobalFunction( "GetFPS", lcoreGetFPS ); + assingGlobalFunction( "GetFrameTime", lcoreGetFrameTime ); + assingGlobalFunction( "GetTime", lcoreGetTime ); /* Misc. */ - lua_register( L, "RL_TakeScreenshot", lcoreTakeScreenshot ); - lua_register( L, "RL_SetConfigFlags", lcoreSetConfigFlags ); - lua_register( L, "RL_TraceLog", lcoreTraceLog ); - lua_register( L, "RL_SetTraceLogLevel", lcoreSetTraceLogLevel ); - lua_register( L, "RL_OpenURL", lcoreOpenURL ); + assingGlobalFunction( "TakeScreenshot", lcoreTakeScreenshot ); + assingGlobalFunction( "SetConfigFlags", lcoreSetConfigFlags ); + assingGlobalFunction( "TraceLog", lcoreTraceLog ); + assingGlobalFunction( "SetTraceLogLevel", lcoreSetTraceLogLevel ); + assingGlobalFunction( "OpenURL", lcoreOpenURL ); /* Cursor. */ - lua_register( L, "RL_ShowCursor", lcoreShowCursor ); - lua_register( L, "RL_HideCursor", lcoreHideCursor ); - lua_register( L, "RL_IsCursorHidden", lcoreIsCursorHidden ); - lua_register( L, "RL_EnableCursor", lcoreEnableCursor ); - lua_register( L, "RL_DisableCursor", lcoreDisableCursor ); - lua_register( L, "RL_IsCursorOnScreen", lcoreIsCursorOnScreen ); + assingGlobalFunction( "ShowCursor", lcoreShowCursor ); + assingGlobalFunction( "HideCursor", lcoreHideCursor ); + assingGlobalFunction( "IsCursorHidden", lcoreIsCursorHidden ); + assingGlobalFunction( "EnableCursor", lcoreEnableCursor ); + assingGlobalFunction( "DisableCursor", lcoreDisableCursor ); + assingGlobalFunction( "IsCursorOnScreen", lcoreIsCursorOnScreen ); /* Drawing. */ - lua_register( L, "RL_ClearBackground", lcoreClearBackground ); - lua_register( L, "RL_BeginDrawing", lcoreBeginDrawing ); - lua_register( L, "RL_EndDrawing", lcoreEndDrawing ); - lua_register( L, "RL_BeginBlendMode", lcoreBeginBlendMode ); - lua_register( L, "RL_EndBlendMode", lcoreEndBlendMode ); - lua_register( L, "RL_BeginScissorMode", lcoreBeginScissorMode ); - lua_register( L, "RL_EndScissorMode", lcoreEndScissorMode ); + assingGlobalFunction( "ClearBackground", lcoreClearBackground ); + assingGlobalFunction( "BeginDrawing", lcoreBeginDrawing ); + assingGlobalFunction( "EndDrawing", lcoreEndDrawing ); + assingGlobalFunction( "BeginBlendMode", lcoreBeginBlendMode ); + assingGlobalFunction( "EndBlendMode", lcoreEndBlendMode ); + assingGlobalFunction( "BeginScissorMode", lcoreBeginScissorMode ); + assingGlobalFunction( "EndScissorMode", lcoreEndScissorMode ); /* Shader. */ - lua_register( L, "RL_LoadShader", lcoreLoadShader ); - lua_register( L, "RL_LoadShaderFromMemory", lcoreLoadShaderFromMemory ); - lua_register( L, "RL_BeginShaderMode", lcoreBeginShaderMode ); - lua_register( L, "RL_EndShaderMode", lcoreEndShaderMode ); - lua_register( L, "RL_GetShaderLocation", lcoreGetShaderLocation ); - lua_register( L, "RL_GetShaderLocationAttrib", lcoreGetShaderLocationAttrib ); - lua_register( L, "RL_SetShaderLocationIndex", lcoreSetShaderLocationIndex ); - lua_register( L, "RL_GetShaderLocationIndex", lcoreGetShaderLocationIndex ); - lua_register( L, "RL_SetShaderValueMatrix", lcoreSetShaderValueMatrix ); - lua_register( L, "RL_SetShaderValueTexture", lcoreSetShaderValueTexture ); - lua_register( L, "RL_SetShaderValue", lcoreSetShaderValue ); - lua_register( L, "RL_SetShaderValueV", lcoreSetShaderValueV ); - lua_register( L, "RL_UnloadShader", lcoreUnloadShader ); + assingGlobalFunction( "LoadShader", lcoreLoadShader ); + assingGlobalFunction( "LoadShaderFromMemory", lcoreLoadShaderFromMemory ); + assingGlobalFunction( "BeginShaderMode", lcoreBeginShaderMode ); + assingGlobalFunction( "EndShaderMode", lcoreEndShaderMode ); + assingGlobalFunction( "GetShaderLocation", lcoreGetShaderLocation ); + assingGlobalFunction( "GetShaderLocationAttrib", lcoreGetShaderLocationAttrib ); + assingGlobalFunction( "SetShaderLocationIndex", lcoreSetShaderLocationIndex ); + assingGlobalFunction( "GetShaderLocationIndex", lcoreGetShaderLocationIndex ); + assingGlobalFunction( "SetShaderValueMatrix", lcoreSetShaderValueMatrix ); + assingGlobalFunction( "SetShaderValueTexture", lcoreSetShaderValueTexture ); + assingGlobalFunction( "SetShaderValue", lcoreSetShaderValue ); + assingGlobalFunction( "SetShaderValueV", lcoreSetShaderValueV ); + assingGlobalFunction( "UnloadShader", lcoreUnloadShader ); /* File. */ - lua_register( L, "RL_GetBasePath", lcoreGetBasePath ); - lua_register( L, "RL_FileExists", lcoreFileExists ); - lua_register( L, "RL_DirectoryExists", lcoreDirectoryExists ); - lua_register( L, "RL_IsFileExtension", lcoreIsFileExtension ); - lua_register( L, "RL_GetFileLength", lcoreGetFileLength ); - lua_register( L, "RL_GetFileExtension", lcoreGetFileExtension ); - lua_register( L, "RL_GetFileName", lcoreGetFileName ); - lua_register( L, "RL_GetFileNameWithoutExt", lcoreGetFileNameWithoutExt ); - lua_register( L, "RL_GetDirectoryPath", lcoreGetDirectoryPath ); - lua_register( L, "RL_GetPrevDirectoryPath", lcoreGetPrevDirectoryPath ); - lua_register( L, "RL_GetWorkingDirectory", lcoreGetWorkingDirectory ); - lua_register( L, "RL_LoadDirectoryFiles", lcoreLoadDirectoryFiles ); - lua_register( L, "RL_LoadDirectoryFilesEx", lcoreLoadDirectoryFilesEx ); - lua_register( L, "RL_ChangeDirectory", lcoreChangeDirectory ); - lua_register( L, "RL_IsPathFile", lcoreIsPathFile ); - lua_register( L, "RL_IsFileDropped", lcoreIsFileDropped ); - lua_register( L, "RL_LoadDroppedFiles", lcoreLoadDroppedFiles ); - lua_register( L, "RL_GetFileModTime", lcoreGetFileModTime ); + assingGlobalFunction( "GetBasePath", lcoreGetBasePath ); + assingGlobalFunction( "FileExists", lcoreFileExists ); + assingGlobalFunction( "DirectoryExists", lcoreDirectoryExists ); + assingGlobalFunction( "IsFileExtension", lcoreIsFileExtension ); + assingGlobalFunction( "GetFileLength", lcoreGetFileLength ); + assingGlobalFunction( "GetFileExtension", lcoreGetFileExtension ); + assingGlobalFunction( "GetFileName", lcoreGetFileName ); + assingGlobalFunction( "GetFileNameWithoutExt", lcoreGetFileNameWithoutExt ); + assingGlobalFunction( "GetDirectoryPath", lcoreGetDirectoryPath ); + assingGlobalFunction( "GetPrevDirectoryPath", lcoreGetPrevDirectoryPath ); + assingGlobalFunction( "GetWorkingDirectory", lcoreGetWorkingDirectory ); + assingGlobalFunction( "LoadDirectoryFiles", lcoreLoadDirectoryFiles ); + assingGlobalFunction( "LoadDirectoryFilesEx", lcoreLoadDirectoryFilesEx ); + assingGlobalFunction( "ChangeDirectory", lcoreChangeDirectory ); + assingGlobalFunction( "IsPathFile", lcoreIsPathFile ); + assingGlobalFunction( "IsFileDropped", lcoreIsFileDropped ); + assingGlobalFunction( "LoadDroppedFiles", lcoreLoadDroppedFiles ); + assingGlobalFunction( "GetFileModTime", lcoreGetFileModTime ); /* Camera2D. */ - lua_register( L, "RL_CreateCamera2D", lcoreCreateCamera2D ); - lua_register( L, "RL_UnloadCamera2D", lcoreUnloadCamera2D ); - lua_register( L, "RL_BeginMode2D", lcoreBeginMode2D ); - lua_register( L, "RL_EndMode2D", lcoreEndMode2D ); - lua_register( L, "RL_SetCamera2DTarget", lcoreSetCamera2DTarget ); - lua_register( L, "RL_SetCamera2DOffset", lcoreSetCamera2DOffset ); - lua_register( L, "RL_SetCamera2DRotation", lcoreSetCamera2DRotation ); - lua_register( L, "RL_SetCamera2DZoom", lcoreSetCamera2DZoom ); - lua_register( L, "RL_GetCamera2DTarget", lcoreGetCamera2DTarget ); - lua_register( L, "RL_GetCamera2DOffset", lcoreGetCamera2DOffset ); - lua_register( L, "RL_GetCamera2DRotation", lcoreGetCamera2DRotation ); - lua_register( L, "RL_GetCamera2DZoom", lcoreGetCamera2DZoom ); + assingGlobalFunction( "CreateCamera2D", lcoreCreateCamera2D ); + assingGlobalFunction( "UnloadCamera2D", lcoreUnloadCamera2D ); + assingGlobalFunction( "BeginMode2D", lcoreBeginMode2D ); + assingGlobalFunction( "EndMode2D", lcoreEndMode2D ); + assingGlobalFunction( "SetCamera2DTarget", lcoreSetCamera2DTarget ); + assingGlobalFunction( "SetCamera2DOffset", lcoreSetCamera2DOffset ); + assingGlobalFunction( "SetCamera2DRotation", lcoreSetCamera2DRotation ); + assingGlobalFunction( "SetCamera2DZoom", lcoreSetCamera2DZoom ); + assingGlobalFunction( "GetCamera2DTarget", lcoreGetCamera2DTarget ); + assingGlobalFunction( "GetCamera2DOffset", lcoreGetCamera2DOffset ); + assingGlobalFunction( "GetCamera2DRotation", lcoreGetCamera2DRotation ); + assingGlobalFunction( "GetCamera2DZoom", lcoreGetCamera2DZoom ); /* Camera3D. */ - lua_register( L, "RL_CreateCamera3D", lcoreCreateCamera3D ); - lua_register( L, "RL_UnloadCamera3D", lcoreUnloadCamera3D ); - lua_register( L, "RL_BeginMode3D", lcoreBeginMode3D ); - lua_register( L, "RL_EndMode3D", lcoreEndMode3D ); - lua_register( L, "RL_SetCamera3DPosition", lcoreSetCamera3DPosition ); - lua_register( L, "RL_SetCamera3DTarget", lcoreSetCamera3DTarget ); - lua_register( L, "RL_SetCamera3DUp", lcoreSetCamera3DUp ); - lua_register( L, "RL_SetCamera3DFovy", lcoreSetCamera3DFovy ); - lua_register( L, "RL_SetCamera3DProjection", lcoreSetCamera3DProjection ); - lua_register( L, "RL_GetCamera3DPosition", lcoreGetCamera3DPosition ); - lua_register( L, "RL_GetCamera3DTarget", lcoreGetCamera3DTarget ); - lua_register( L, "RL_GetCamera3DUp", lcoreGetCamera3DUp ); - lua_register( L, "RL_GetCamera3DFovy", lcoreGetCamera3DFovy ); - lua_register( L, "RL_GetCamera3DProjection", lcoreGetCamera3DProjection ); - lua_register( L, "RL_UpdateCamera3D", lcoreUpdateCamera3D ); - lua_register( L, "RL_SetCameraMode", lcoreSetCameraMode ); - lua_register( L, "RL_SetCameraPanControl", lcoreSetCameraPanControl ); - lua_register( L, "RL_SetCameraAltControl", lcoreSetCameraAltControl ); - lua_register( L, "RL_SetCameraSmoothZoomControl", lcoreSetCameraSmoothZoomControl ); - lua_register( L, "RL_SetCameraMoveControls", lcoreSetCameraMoveControls ); + assingGlobalFunction( "CreateCamera3D", lcoreCreateCamera3D ); + assingGlobalFunction( "UnloadCamera3D", lcoreUnloadCamera3D ); + assingGlobalFunction( "BeginMode3D", lcoreBeginMode3D ); + assingGlobalFunction( "EndMode3D", lcoreEndMode3D ); + assingGlobalFunction( "SetCamera3DPosition", lcoreSetCamera3DPosition ); + assingGlobalFunction( "SetCamera3DTarget", lcoreSetCamera3DTarget ); + assingGlobalFunction( "SetCamera3DUp", lcoreSetCamera3DUp ); + assingGlobalFunction( "SetCamera3DFovy", lcoreSetCamera3DFovy ); + assingGlobalFunction( "SetCamera3DProjection", lcoreSetCamera3DProjection ); + assingGlobalFunction( "GetCamera3DPosition", lcoreGetCamera3DPosition ); + assingGlobalFunction( "GetCamera3DTarget", lcoreGetCamera3DTarget ); + assingGlobalFunction( "GetCamera3DUp", lcoreGetCamera3DUp ); + assingGlobalFunction( "GetCamera3DFovy", lcoreGetCamera3DFovy ); + assingGlobalFunction( "GetCamera3DProjection", lcoreGetCamera3DProjection ); + assingGlobalFunction( "UpdateCamera3D", lcoreUpdateCamera3D ); + assingGlobalFunction( "SetCameraMode", lcoreSetCameraMode ); + assingGlobalFunction( "SetCameraPanControl", lcoreSetCameraPanControl ); + assingGlobalFunction( "SetCameraAltControl", lcoreSetCameraAltControl ); + assingGlobalFunction( "SetCameraSmoothZoomControl", lcoreSetCameraSmoothZoomControl ); + assingGlobalFunction( "SetCameraMoveControls", lcoreSetCameraMoveControls ); /* Input-related Keyboard. */ - lua_register( L, "RL_IsKeyPressed", lcoreIsKeyPressed ); - lua_register( L, "RL_IsKeyDown", lcoreIsKeyDown ); - lua_register( L, "RL_IsKeyReleased", lcoreIsKeyReleased ); - lua_register( L, "RL_IsKeyUp", lcoreIsKeyUp ); - lua_register( L, "RL_GetKeyPressed", lcoreGetKeyPressed ); - lua_register( L, "RL_GetCharPressed", lcoreGetCharPressed ); - lua_register( L, "RL_SetExitKey", lcoreSetExitKey ); - lua_register( L, "RL_GetKeyName", lcoreGetKeyName ); - lua_register( L, "RL_GetKeyScancode", lcoreGetKeyScancode ); + assingGlobalFunction( "IsKeyPressed", lcoreIsKeyPressed ); + assingGlobalFunction( "IsKeyDown", lcoreIsKeyDown ); + assingGlobalFunction( "IsKeyReleased", lcoreIsKeyReleased ); + assingGlobalFunction( "IsKeyUp", lcoreIsKeyUp ); + assingGlobalFunction( "GetKeyPressed", lcoreGetKeyPressed ); + assingGlobalFunction( "GetCharPressed", lcoreGetCharPressed ); + assingGlobalFunction( "SetExitKey", lcoreSetExitKey ); + assingGlobalFunction( "GetKeyName", lcoreGetKeyName ); + assingGlobalFunction( "GetKeyScancode", lcoreGetKeyScancode ); /* Input-related Gamepad. */ - lua_register( L, "RL_IsGamepadAvailable", lcoreIsGamepadAvailable ); - lua_register( L, "RL_IsGamepadButtonPressed", lcoreIsGamepadButtonPressed ); - lua_register( L, "RL_IsGamepadButtonDown", lcoreIsGamepadButtonDown ); - lua_register( L, "RL_IsGamepadButtonReleased", lcoreIsGamepadButtonReleased ); - lua_register( L, "RL_GetGamepadAxisCount", lcoreGetGamepadAxisCount ); - lua_register( L, "RL_GetGamepadAxisMovement", lcoreGetGamepadAxisMovement ); - lua_register( L, "RL_GetGamepadName", lcoreGetGamepadName ); + assingGlobalFunction( "IsGamepadAvailable", lcoreIsGamepadAvailable ); + assingGlobalFunction( "IsGamepadButtonPressed", lcoreIsGamepadButtonPressed ); + assingGlobalFunction( "IsGamepadButtonDown", lcoreIsGamepadButtonDown ); + assingGlobalFunction( "IsGamepadButtonReleased", lcoreIsGamepadButtonReleased ); + assingGlobalFunction( "GetGamepadAxisCount", lcoreGetGamepadAxisCount ); + assingGlobalFunction( "GetGamepadAxisMovement", lcoreGetGamepadAxisMovement ); + assingGlobalFunction( "GetGamepadName", lcoreGetGamepadName ); /* Input-related Mouse. */ - lua_register( L, "RL_IsMouseButtonPressed", lcoreIsMouseButtonPressed ); - lua_register( L, "RL_IsMouseButtonDown", lcoreIsMouseButtonDown ); - lua_register( L, "RL_IsMouseButtonReleased", lcoreIsMouseButtonReleased ); - lua_register( L, "RL_IsMouseButtonUp", lcoreIsMouseButtonUp ); - lua_register( L, "RL_GetMousePosition", lcoreGetMousePosition ); - lua_register( L, "RL_GetMouseDelta", lcoreGetMouseDelta ); - lua_register( L, "RL_SetMousePosition", lcoreSetMousePosition ); - lua_register( L, "RL_SetMouseOffset", lcoreSetMouseOffset ); - lua_register( L, "RL_SetMouseScale", lcoreSetMouseScale ); - lua_register( L, "RL_GetMouseWheelMove", lcoreGetMouseWheelMove ); - lua_register( L, "RL_SetMouseCursor", lcoreSetMouseCursor ); + assingGlobalFunction( "IsMouseButtonPressed", lcoreIsMouseButtonPressed ); + assingGlobalFunction( "IsMouseButtonDown", lcoreIsMouseButtonDown ); + assingGlobalFunction( "IsMouseButtonReleased", lcoreIsMouseButtonReleased ); + assingGlobalFunction( "IsMouseButtonUp", lcoreIsMouseButtonUp ); + assingGlobalFunction( "GetMousePosition", lcoreGetMousePosition ); + assingGlobalFunction( "GetMouseDelta", lcoreGetMouseDelta ); + assingGlobalFunction( "SetMousePosition", lcoreSetMousePosition ); + assingGlobalFunction( "SetMouseOffset", lcoreSetMouseOffset ); + assingGlobalFunction( "SetMouseScale", lcoreSetMouseScale ); + assingGlobalFunction( "GetMouseWheelMove", lcoreGetMouseWheelMove ); + assingGlobalFunction( "SetMouseCursor", lcoreSetMouseCursor ); /* Input-related Touch */ - lua_register( L, "RL_GetTouchPosition", lcoreGetTouchPosition ); - lua_register( L, "RL_GetTouchPointId", lcoreGetTouchPointId ); - lua_register( L, "RL_GetTouchPointCount", lcoreGetTouchPointCount ); + assingGlobalFunction( "GetTouchPosition", lcoreGetTouchPosition ); + assingGlobalFunction( "GetTouchPointId", lcoreGetTouchPointId ); + assingGlobalFunction( "GetTouchPointCount", lcoreGetTouchPointCount ); /* Input-related Gestures. */ - lua_register( L, "RL_SetGesturesEnabled", lcoreSetGesturesEnabled ); - lua_register( L, "RL_IsGestureDetected", lcoreIsGestureDetected ); - lua_register( L, "RL_GetGestureDetected", lcoreGetGestureDetected ); - lua_register( L, "RL_GetGestureHoldDuration", lcoreGetGestureHoldDuration ); - lua_register( L, "RL_GetGestureDragVector", lcoreGetGestureDragVector ); - lua_register( L, "RL_GetGestureDragAngle", lcoreGetGestureDragAngle ); - lua_register( L, "RL_GetGesturePinchVector", lcoreGetGesturePinchVector ); - lua_register( L, "RL_GetGesturePinchAngle", lcoreGetGesturePinchAngle ); + assingGlobalFunction( "SetGesturesEnabled", lcoreSetGesturesEnabled ); + assingGlobalFunction( "IsGestureDetected", lcoreIsGestureDetected ); + assingGlobalFunction( "GetGestureDetected", lcoreGetGestureDetected ); + assingGlobalFunction( "GetGestureHoldDuration", lcoreGetGestureHoldDuration ); + assingGlobalFunction( "GetGestureDragVector", lcoreGetGestureDragVector ); + assingGlobalFunction( "GetGestureDragAngle", lcoreGetGestureDragAngle ); + assingGlobalFunction( "GetGesturePinchVector", lcoreGetGesturePinchVector ); + assingGlobalFunction( "GetGesturePinchAngle", lcoreGetGesturePinchAngle ); /* Screen-space. */ - lua_register( L, "RL_GetMouseRay", lcoreGetMouseRay ); - lua_register( L, "RL_GetCameraMatrix", lcoreGetCameraMatrix ); - lua_register( L, "RL_GetCameraMatrix2D", lcoreGetCameraMatrix2D ); - lua_register( L, "RL_GetWorldToScreen", lcoreGetWorldToScreen ); - lua_register( L, "RL_GetWorldToScreenEx", lcoreGetWorldToScreenEx ); - lua_register( L, "RL_GetWorldToScreen2D", lcoreGetWorldToScreen2D ); - lua_register( L, "RL_GetScreenToWorld2D", lcoreGetScreenToWorld2D ); + assingGlobalFunction( "GetMouseRay", lcoreGetMouseRay ); + assingGlobalFunction( "GetCameraMatrix", lcoreGetCameraMatrix ); + assingGlobalFunction( "GetCameraMatrix2D", lcoreGetCameraMatrix2D ); + assingGlobalFunction( "GetWorldToScreen", lcoreGetWorldToScreen ); + assingGlobalFunction( "GetWorldToScreenEx", lcoreGetWorldToScreenEx ); + assingGlobalFunction( "GetWorldToScreen2D", lcoreGetWorldToScreen2D ); + assingGlobalFunction( "GetScreenToWorld2D", lcoreGetScreenToWorld2D ); /* Shapes. */ /* Drawing. */ - lua_register( L, "RL_SetShapesTexture", lshapesSetShapesTexture ); - lua_register( L, "RL_DrawPixel", lshapesDrawPixel ); - lua_register( L, "RL_DrawLine", lshapesDrawLine ); - lua_register( L, "RL_DrawLineBezier", lshapesDrawLineBezier ); - lua_register( L, "RL_DrawLineBezierQuad", lshapesDrawLineBezierQuad ); - lua_register( L, "RL_DrawLineBezierCubic", lshapesDrawLineBezierCubic ); - lua_register( L, "RL_DrawLineStrip", lshapesDrawLineStrip ); - lua_register( L, "RL_DrawCircle", lshapesDrawCircle ); - lua_register( L, "RL_DrawCircleSector", lshapesDrawCircleSector ); - lua_register( L, "RL_DrawCircleSectorLines", lshapesDrawCircleSectorLines ); - lua_register( L, "RL_DrawCircleGradient", lshapesDrawCircleGradient ); - lua_register( L, "RL_DrawCircleLines", lshapesDrawCircleLines ); - lua_register( L, "RL_DrawEllipse", lshapesDrawEllipse ); - lua_register( L, "RL_DrawEllipseLines", lshapesDrawEllipseLines ); - lua_register( L, "RL_DrawRing", lshapesDrawRing ); - lua_register( L, "RL_DrawRingLines", lshapesDrawRingLines ); - lua_register( L, "RL_DrawRectangle", lshapesDrawRectangle ); - lua_register( L, "RL_DrawRectanglePro", lshapesDrawRectanglePro ); - lua_register( L, "RL_DrawRectangleGradientV", lshapesDrawRectangleGradientV ); - lua_register( L, "RL_DrawRectangleGradientH", lshapesDrawRectangleGradientH ); - lua_register( L, "RL_DrawRectangleGradientEx", lshapesDrawRectangleGradientEx ); - lua_register( L, "RL_DrawRectangleLines", lshapesDrawRectangleLines ); - lua_register( L, "RL_DrawRectangleLinesEx", lshapesDrawRectangleLinesEx ); - lua_register( L, "RL_DrawRectangleRounded", lshapesDrawRectangleRounded ); - lua_register( L, "RL_DrawRectangleRoundedLines", lshapesDrawRectangleRoundedLines ); - lua_register( L, "RL_DrawTriangle", lshapesDrawTriangle ); - lua_register( L, "RL_DrawTriangleLines", lshapesDrawTriangleLines ); - lua_register( L, "RL_DrawTriangleFan", lshapesDrawTriangleFan ); - lua_register( L, "RL_DrawTriangleStrip", lshapesDrawTriangleStrip ); - lua_register( L, "RL_DrawPoly", lshapesDrawPoly ); - lua_register( L, "RL_DrawPolyLines", lshapesDrawPolyLines ); - lua_register( L, "RL_DrawPolyLinesEx", lshapesDrawPolyLinesEx ); + assingGlobalFunction( "SetShapesTexture", lshapesSetShapesTexture ); + assingGlobalFunction( "DrawPixel", lshapesDrawPixel ); + assingGlobalFunction( "DrawLine", lshapesDrawLine ); + assingGlobalFunction( "DrawLineBezier", lshapesDrawLineBezier ); + assingGlobalFunction( "DrawLineBezierQuad", lshapesDrawLineBezierQuad ); + assingGlobalFunction( "DrawLineBezierCubic", lshapesDrawLineBezierCubic ); + assingGlobalFunction( "DrawLineStrip", lshapesDrawLineStrip ); + assingGlobalFunction( "DrawCircle", lshapesDrawCircle ); + assingGlobalFunction( "DrawCircleSector", lshapesDrawCircleSector ); + assingGlobalFunction( "DrawCircleSectorLines", lshapesDrawCircleSectorLines ); + assingGlobalFunction( "DrawCircleGradient", lshapesDrawCircleGradient ); + assingGlobalFunction( "DrawCircleLines", lshapesDrawCircleLines ); + assingGlobalFunction( "DrawEllipse", lshapesDrawEllipse ); + assingGlobalFunction( "DrawEllipseLines", lshapesDrawEllipseLines ); + assingGlobalFunction( "DrawRing", lshapesDrawRing ); + assingGlobalFunction( "DrawRingLines", lshapesDrawRingLines ); + assingGlobalFunction( "DrawRectangle", lshapesDrawRectangle ); + assingGlobalFunction( "DrawRectanglePro", lshapesDrawRectanglePro ); + assingGlobalFunction( "DrawRectangleGradientV", lshapesDrawRectangleGradientV ); + assingGlobalFunction( "DrawRectangleGradientH", lshapesDrawRectangleGradientH ); + assingGlobalFunction( "DrawRectangleGradientEx", lshapesDrawRectangleGradientEx ); + assingGlobalFunction( "DrawRectangleLines", lshapesDrawRectangleLines ); + assingGlobalFunction( "DrawRectangleLinesEx", lshapesDrawRectangleLinesEx ); + assingGlobalFunction( "DrawRectangleRounded", lshapesDrawRectangleRounded ); + assingGlobalFunction( "DrawRectangleRoundedLines", lshapesDrawRectangleRoundedLines ); + assingGlobalFunction( "DrawTriangle", lshapesDrawTriangle ); + assingGlobalFunction( "DrawTriangleLines", lshapesDrawTriangleLines ); + assingGlobalFunction( "DrawTriangleFan", lshapesDrawTriangleFan ); + assingGlobalFunction( "DrawTriangleStrip", lshapesDrawTriangleStrip ); + assingGlobalFunction( "DrawPoly", lshapesDrawPoly ); + assingGlobalFunction( "DrawPolyLines", lshapesDrawPolyLines ); + assingGlobalFunction( "DrawPolyLinesEx", lshapesDrawPolyLinesEx ); /* Collision. */ - lua_register( L, "RL_CheckCollisionRecs", lshapesCheckCollisionRecs ); - lua_register( L, "RL_CheckCollisionCircles", lshapesCheckCollisionCircles ); - lua_register( L, "RL_CheckCollisionCircleRec", lshapesCheckCollisionCircleRec ); - lua_register( L, "RL_CheckCollisionPointRec", lshapesCheckCollisionPointRec ); - lua_register( L, "RL_CheckCollisionPointCircle", lshapesCheckCollisionPointCircle ); - lua_register( L, "RL_CheckCollisionPointTriangle", lshapesCheckCollisionPointTriangle ); - lua_register( L, "RL_CheckCollisionLines", lshapesCheckCollisionLines ); - lua_register( L, "RL_CheckCollisionPointLine", lshapesCheckCollisionPointLine ); - lua_register( L, "RL_GetCollisionRec", lshapesGetCollisionRec ); + assingGlobalFunction( "CheckCollisionRecs", lshapesCheckCollisionRecs ); + assingGlobalFunction( "CheckCollisionCircles", lshapesCheckCollisionCircles ); + assingGlobalFunction( "CheckCollisionCircleRec", lshapesCheckCollisionCircleRec ); + assingGlobalFunction( "CheckCollisionPointRec", lshapesCheckCollisionPointRec ); + assingGlobalFunction( "CheckCollisionPointCircle", lshapesCheckCollisionPointCircle ); + assingGlobalFunction( "CheckCollisionPointTriangle", lshapesCheckCollisionPointTriangle ); + assingGlobalFunction( "CheckCollisionLines", lshapesCheckCollisionLines ); + assingGlobalFunction( "CheckCollisionPointLine", lshapesCheckCollisionPointLine ); + assingGlobalFunction( "GetCollisionRec", lshapesGetCollisionRec ); /* Textures. */ /* Image Loading. */ - lua_register( L, "RL_LoadImage", ltexturesLoadImage ); - lua_register( L, "RL_LoadImageFromTexture", ltexturesLoadImageFromTexture ); - lua_register( L, "RL_LoadImageFromScreen", ltexturesLoadImageFromScreen ); - lua_register( L, "RL_UnloadImage", ltexturesUnloadImage ); - lua_register( L, "RL_ExportImage", ltexturesExportImage ); - lua_register( L, "RL_ExportImageAsCode", ltexturesExportImageAsCode ); + assingGlobalFunction( "LoadImage", ltexturesLoadImage ); + assingGlobalFunction( "LoadImageFromTexture", ltexturesLoadImageFromTexture ); + assingGlobalFunction( "LoadImageFromScreen", ltexturesLoadImageFromScreen ); + assingGlobalFunction( "UnloadImage", ltexturesUnloadImage ); + assingGlobalFunction( "ExportImage", ltexturesExportImage ); + assingGlobalFunction( "ExportImageAsCode", ltexturesExportImageAsCode ); /* Image Generation. */ - lua_register( L, "RL_GenImageColor", ltexturesGenImageColor ); - lua_register( L, "RL_GenImageGradientV", ltexturesGenImageGradientV ); - lua_register( L, "RL_GenImageGradientH", ltexturesGenImageGradientH ); - lua_register( L, "RL_GenImageGradientRadial", ltexturesGenImageGradientRadial ); - lua_register( L, "RL_GenImageChecked", ltexturesGenImageChecked ); - lua_register( L, "RL_GenImageWhiteNoise", ltexturesGenImageWhiteNoise ); - lua_register( L, "RL_GenImageCellular", ltexturesGenImageCellular ); + assingGlobalFunction( "GenImageColor", ltexturesGenImageColor ); + assingGlobalFunction( "GenImageGradientV", ltexturesGenImageGradientV ); + assingGlobalFunction( "GenImageGradientH", ltexturesGenImageGradientH ); + assingGlobalFunction( "GenImageGradientRadial", ltexturesGenImageGradientRadial ); + assingGlobalFunction( "GenImageChecked", ltexturesGenImageChecked ); + assingGlobalFunction( "GenImageWhiteNoise", ltexturesGenImageWhiteNoise ); + assingGlobalFunction( "GenImageCellular", ltexturesGenImageCellular ); /* Image Manipulation Functions. */ - lua_register( L, "RL_ImageCopy", ltexturesImageCopy ); - lua_register( L, "RL_ImageFromImage", ltexturesImageFromImage ); - lua_register( L, "RL_ImageText", ltexturesImageText ); - lua_register( L, "RL_ImageFormat", ltexturesImageFormat ); - lua_register( L, "RL_ImageToPOT", ltexturesImageToPOT ); - lua_register( L, "RL_ImageCrop", ltexturesImageCrop ); - lua_register( L, "RL_ImageAlphaCrop", ltexturesImageAlphaCrop ); - lua_register( L, "RL_ImageAlphaClear", ltexturesImageAlphaClear ); - lua_register( L, "RL_ImageAlphaMask", ltexturesImageAlphaMask ); - lua_register( L, "RL_ImageAlphaPremultiply", ltexturesImageAlphaPremultiply ); - lua_register( L, "RL_ImageResize", ltexturesImageResize ); - lua_register( L, "RL_ImageResizeNN", ltexturesImageResizeNN ); - lua_register( L, "RL_ImageResizeCanvas", ltexturesImageResizeCanvas ); - lua_register( L, "RL_ImageMipmaps", ltexturesImageMipmaps ); - lua_register( L, "RL_ImageDither", ltexturesImageDither ); - lua_register( L, "RL_ImageFlipVertical", ltexturesImageFlipVertical ); - lua_register( L, "RL_ImageFlipHorizontal", ltexturesImageFlipHorizontal ); - lua_register( L, "RL_ImageRotateCW", ltexturesImageRotateCW ); - lua_register( L, "RL_ImageRotateCCW", ltexturesImageRotateCCW ); - lua_register( L, "RL_ImageColorTint", ltexturesImageColorTint ); - lua_register( L, "RL_ImageColorInvert", ltexturesImageColorInvert ); - lua_register( L, "RL_ImageColorGrayscale", ltexturesImageColorGrayscale ); - lua_register( L, "RL_ImageColorContrast", ltexturesImageColorContrast ); - lua_register( L, "RL_ImageColorBrightness", ltexturesImageColorBrightness ); - lua_register( L, "RL_ImageColorReplace", ltexturesImageColorReplace ); - lua_register( L, "RL_LoadImageColors", ltexturesLoadImageColors ); - lua_register( L, "RL_LoadImagePalette", ltexturesLoadImagePalette ); - lua_register( L, "RL_GetImageAlphaBorder", ltexturesGetImageAlphaBorder ); - lua_register( L, "RL_GetImageColor", ltexturesGetImageColor ); + assingGlobalFunction( "ImageCopy", ltexturesImageCopy ); + assingGlobalFunction( "ImageFromImage", ltexturesImageFromImage ); + assingGlobalFunction( "ImageText", ltexturesImageText ); + assingGlobalFunction( "ImageFormat", ltexturesImageFormat ); + assingGlobalFunction( "ImageToPOT", ltexturesImageToPOT ); + assingGlobalFunction( "ImageCrop", ltexturesImageCrop ); + assingGlobalFunction( "ImageAlphaCrop", ltexturesImageAlphaCrop ); + assingGlobalFunction( "ImageAlphaClear", ltexturesImageAlphaClear ); + assingGlobalFunction( "ImageAlphaMask", ltexturesImageAlphaMask ); + assingGlobalFunction( "ImageAlphaPremultiply", ltexturesImageAlphaPremultiply ); + assingGlobalFunction( "ImageResize", ltexturesImageResize ); + assingGlobalFunction( "ImageResizeNN", ltexturesImageResizeNN ); + assingGlobalFunction( "ImageResizeCanvas", ltexturesImageResizeCanvas ); + assingGlobalFunction( "ImageMipmaps", ltexturesImageMipmaps ); + assingGlobalFunction( "ImageDither", ltexturesImageDither ); + assingGlobalFunction( "ImageFlipVertical", ltexturesImageFlipVertical ); + assingGlobalFunction( "ImageFlipHorizontal", ltexturesImageFlipHorizontal ); + assingGlobalFunction( "ImageRotateCW", ltexturesImageRotateCW ); + assingGlobalFunction( "ImageRotateCCW", ltexturesImageRotateCCW ); + assingGlobalFunction( "ImageColorTint", ltexturesImageColorTint ); + assingGlobalFunction( "ImageColorInvert", ltexturesImageColorInvert ); + assingGlobalFunction( "ImageColorGrayscale", ltexturesImageColorGrayscale ); + assingGlobalFunction( "ImageColorContrast", ltexturesImageColorContrast ); + assingGlobalFunction( "ImageColorBrightness", ltexturesImageColorBrightness ); + assingGlobalFunction( "ImageColorReplace", ltexturesImageColorReplace ); + assingGlobalFunction( "LoadImageColors", ltexturesLoadImageColors ); + assingGlobalFunction( "LoadImagePalette", ltexturesLoadImagePalette ); + assingGlobalFunction( "GetImageAlphaBorder", ltexturesGetImageAlphaBorder ); + assingGlobalFunction( "GetImageColor", ltexturesGetImageColor ); /* Image Drawing. */ - lua_register( L, "RL_ImageClearBackground", ltexturesImageClearBackground ); - lua_register( L, "RL_ImageDrawPixel", ltexturesImageDrawPixel ); - lua_register( L, "RL_ImageDrawLine", ltexturesImageDrawLine ); - lua_register( L, "RL_ImageDrawCircle", ltexturesImageDrawCircle ); - lua_register( L, "RL_ImageDrawRectangle", ltexturesImageDrawRectangle ); - lua_register( L, "RL_ImageDrawRectangleLines", ltexturesImageDrawRectangleLines ); - lua_register( L, "RL_ImageDraw", ltexturesImageDraw ); - lua_register( L, "RL_ImageDrawTextEx", ltexturesImageDrawTextEx ); + assingGlobalFunction( "ImageClearBackground", ltexturesImageClearBackground ); + assingGlobalFunction( "ImageDrawPixel", ltexturesImageDrawPixel ); + assingGlobalFunction( "ImageDrawLine", ltexturesImageDrawLine ); + assingGlobalFunction( "ImageDrawCircle", ltexturesImageDrawCircle ); + assingGlobalFunction( "ImageDrawRectangle", ltexturesImageDrawRectangle ); + assingGlobalFunction( "ImageDrawRectangleLines", ltexturesImageDrawRectangleLines ); + assingGlobalFunction( "ImageDraw", ltexturesImageDraw ); + assingGlobalFunction( "ImageDrawTextEx", ltexturesImageDrawTextEx ); /* Image Configuration. */ - lua_register( L, "RL_GetImageSize", ltexturesGetImageSize ); - lua_register( L, "RL_GetImageMipmaps", ltexturesGetImageMipmaps ); - lua_register( L, "RL_GetImageFormat", ltexturesGetImageFormat ); + assingGlobalFunction( "GetImageSize", ltexturesGetImageSize ); + assingGlobalFunction( "GetImageMipmaps", ltexturesGetImageMipmaps ); + assingGlobalFunction( "GetImageFormat", ltexturesGetImageFormat ); /* Texture Loading. */ - lua_register( L, "RL_LoadTexture", ltexturesLoadTexture ); - lua_register( L, "RL_LoadTextureFromImage", ltexturesLoadTextureFromImage ); - lua_register( L, "RL_LoadTextureCubemap", ltexturesLoadTextureCubemap ); - lua_register( L, "RL_LoadRenderTexture", ltexturesLoadRenderTexture ); - lua_register( L, "RL_UnloadTexture", ltexturesUnloadTexture ); - lua_register( L, "RL_UnloadRenderTexture", ltexturesUnloadRenderTexture ); - lua_register( L, "RL_UpdateTexture", ltexturesUpdateTexture ); - lua_register( L, "RL_UpdateTextureRec", ltexturesUpdateTextureRec ); + assingGlobalFunction( "LoadTexture", ltexturesLoadTexture ); + assingGlobalFunction( "LoadTextureFromImage", ltexturesLoadTextureFromImage ); + assingGlobalFunction( "LoadTextureCubemap", ltexturesLoadTextureCubemap ); + assingGlobalFunction( "LoadRenderTexture", ltexturesLoadRenderTexture ); + assingGlobalFunction( "UnloadTexture", ltexturesUnloadTexture ); + assingGlobalFunction( "UnloadRenderTexture", ltexturesUnloadRenderTexture ); + assingGlobalFunction( "UpdateTexture", ltexturesUpdateTexture ); + assingGlobalFunction( "UpdateTextureRec", ltexturesUpdateTextureRec ); /* Texture Drawing. */ - lua_register( L, "RL_DrawTexture", ltexturesDrawTexture ); - lua_register( L, "RL_DrawTextureRec", ltexturesDrawTextureRec ); - lua_register( L, "RL_DrawTextureTiled", ltexturesDrawTextureTiled ); - lua_register( L, "RL_DrawTexturePro", ltexturesDrawTexturePro ); - lua_register( L, "RL_DrawTextureNPatch", ltexturesDrawTextureNPatch ); - lua_register( L, "RL_DrawTexturePoly", ltexturesDrawTexturePoly ); - lua_register( L, "RL_BeginTextureMode", ltexturesBeginTextureMode ); - lua_register( L, "RL_EndTextureMode", ltexturesEndTextureMode ); - lua_register( L, "RL_SetTextureSource", ltexturesSetTextureSource ); - lua_register( L, "RL_GetTextureSource", ltexturesGetTextureSource ); + assingGlobalFunction( "DrawTexture", ltexturesDrawTexture ); + assingGlobalFunction( "DrawTextureRec", ltexturesDrawTextureRec ); + assingGlobalFunction( "DrawTextureTiled", ltexturesDrawTextureTiled ); + assingGlobalFunction( "DrawTexturePro", ltexturesDrawTexturePro ); + assingGlobalFunction( "DrawTextureNPatch", ltexturesDrawTextureNPatch ); + assingGlobalFunction( "DrawTexturePoly", ltexturesDrawTexturePoly ); + assingGlobalFunction( "BeginTextureMode", ltexturesBeginTextureMode ); + assingGlobalFunction( "EndTextureMode", ltexturesEndTextureMode ); + assingGlobalFunction( "SetTextureSource", ltexturesSetTextureSource ); + assingGlobalFunction( "GetTextureSource", ltexturesGetTextureSource ); /* Texture Configuration. */ - lua_register( L, "RL_GenTextureMipmaps", ltexturesGenTextureMipmaps ); - lua_register( L, "RL_SetTextureFilter", ltexturesSetTextureFilter ); - lua_register( L, "RL_SetTextureWrap", ltexturesSetTextureWrap ); - lua_register( L, "RL_GetTextureSize", ltexturesGetTextureSize ); - lua_register( L, "RL_GetTextureMipmaps", ltexturesGetTextureMipmaps ); - lua_register( L, "RL_GetTextureFormat", ltexturesGetTextureFormat ); + assingGlobalFunction( "GenTextureMipmaps", ltexturesGenTextureMipmaps ); + assingGlobalFunction( "SetTextureFilter", ltexturesSetTextureFilter ); + assingGlobalFunction( "SetTextureWrap", ltexturesSetTextureWrap ); + assingGlobalFunction( "GetTextureSize", ltexturesGetTextureSize ); + assingGlobalFunction( "GetTextureMipmaps", ltexturesGetTextureMipmaps ); + assingGlobalFunction( "GetTextureFormat", ltexturesGetTextureFormat ); /* Color/pixel */ - lua_register( L, "RL_Fade", ltexturesFade ); - lua_register( L, "RL_ColorToInt", ltexturesColorToInt ); - lua_register( L, "RL_ColorNormalize", ltexturesColorNormalize ); - lua_register( L, "RL_ColorFromNormalized", ltexturesColorFromNormalized ); - lua_register( L, "RL_ColorToHSV", ltexturesColorToHSV ); - lua_register( L, "RL_ColorFromHSV", ltexturesColorFromHSV ); - lua_register( L, "RL_ColorAlpha", ltexturesColorAlpha ); - lua_register( L, "RL_ColorAlphaBlend", ltexturesColorAlphaBlend ); - lua_register( L, "RL_GetColor", ltexturesGetColor ); - lua_register( L, "RL_GetPixelColor", ltexturesGetPixelColor ); - lua_register( L, "RL_GetPixelDataSize", ltexturesGetPixelDataSize ); + assingGlobalFunction( "Fade", ltexturesFade ); + assingGlobalFunction( "ColorToInt", ltexturesColorToInt ); + assingGlobalFunction( "ColorNormalize", ltexturesColorNormalize ); + assingGlobalFunction( "ColorFromNormalized", ltexturesColorFromNormalized ); + assingGlobalFunction( "ColorToHSV", ltexturesColorToHSV ); + assingGlobalFunction( "ColorFromHSV", ltexturesColorFromHSV ); + assingGlobalFunction( "ColorAlpha", ltexturesColorAlpha ); + assingGlobalFunction( "ColorAlphaBlend", ltexturesColorAlphaBlend ); + assingGlobalFunction( "GetColor", ltexturesGetColor ); + assingGlobalFunction( "GetPixelColor", ltexturesGetPixelColor ); + assingGlobalFunction( "GetPixelDataSize", ltexturesGetPixelDataSize ); /* Models. */ /* Basic. */ - lua_register( L, "RL_DrawLine3D", lmodelsDrawLine3D ); - lua_register( L, "RL_DrawPoint3D", lmodelsDrawPoint3D ); - lua_register( L, "RL_DrawCircle3D", lmodelsDrawCircle3D ); - lua_register( L, "RL_DrawTriangle3D", lmodelsDrawTriangle3D ); - lua_register( L, "RL_DrawCube", lmodelsDrawCube ); - lua_register( L, "RL_DrawCubeWires", lmodelsDrawCubeWires ); - lua_register( L, "RL_DrawCubeTexture", lmodelsDrawCubeTexture ); - lua_register( L, "RL_DrawSphere", lmodelsDrawSphere ); - lua_register( L, "RL_DrawSphereEx", lmodelsDrawSphereEx ); - lua_register( L, "RL_DrawSphereWires", lmodelsDrawSphereWires ); - lua_register( L, "RL_DrawCylinder", lmodelsDrawCylinder ); - lua_register( L, "RL_DrawCylinderEx", lmodelsDrawCylinderEx ); - lua_register( L, "RL_DrawCylinderWires", lmodelsDrawCylinderWires ); - lua_register( L, "RL_DrawCylinderWiresEx", lmodelsDrawCylinderWiresEx ); - lua_register( L, "RL_DrawPlane", lmodelsDrawPlane ); - lua_register( L, "RL_DrawQuad3DTexture", lmodelDrawQuad3DTexture ); - lua_register( L, "RL_DrawRay", lmodelsDrawRay ); - lua_register( L, "RL_DrawGrid", lmodelsDrawGrid ); + assingGlobalFunction( "DrawLine3D", lmodelsDrawLine3D ); + assingGlobalFunction( "DrawPoint3D", lmodelsDrawPoint3D ); + assingGlobalFunction( "DrawCircle3D", lmodelsDrawCircle3D ); + assingGlobalFunction( "DrawTriangle3D", lmodelsDrawTriangle3D ); + assingGlobalFunction( "DrawCube", lmodelsDrawCube ); + assingGlobalFunction( "DrawCubeWires", lmodelsDrawCubeWires ); + assingGlobalFunction( "DrawCubeTexture", lmodelsDrawCubeTexture ); + assingGlobalFunction( "DrawSphere", lmodelsDrawSphere ); + assingGlobalFunction( "DrawSphereEx", lmodelsDrawSphereEx ); + assingGlobalFunction( "DrawSphereWires", lmodelsDrawSphereWires ); + assingGlobalFunction( "DrawCylinder", lmodelsDrawCylinder ); + assingGlobalFunction( "DrawCylinderEx", lmodelsDrawCylinderEx ); + assingGlobalFunction( "DrawCylinderWires", lmodelsDrawCylinderWires ); + assingGlobalFunction( "DrawCylinderWiresEx", lmodelsDrawCylinderWiresEx ); + assingGlobalFunction( "DrawPlane", lmodelsDrawPlane ); + assingGlobalFunction( "DrawQuad3DTexture", lmodelDrawQuad3DTexture ); + assingGlobalFunction( "DrawRay", lmodelsDrawRay ); + assingGlobalFunction( "DrawGrid", lmodelsDrawGrid ); /* Mesh. */ - lua_register( L, "RL_GenMeshPoly", lmodelsGenMeshPoly ); - lua_register( L, "RL_GenMeshPlane", lmodelsGenMeshPlane ); - lua_register( L, "RL_GenMeshCube", lmodelsGenMeshCube ); - lua_register( L, "RL_GenMeshSphere", lmodelsGenMeshSphere ); - lua_register( L, "RL_GenMeshCylinder", lmodelsGenMeshCylinder ); - lua_register( L, "RL_GenMeshCone", lmodelsGenMeshCone ); - lua_register( L, "RL_GenMeshTorus", lmodelsGenMeshTorus ); - lua_register( L, "RL_GenMeshKnot", lmodelsGenMeshKnot ); - lua_register( L, "RL_GenMeshHeightmap", lmodelsGenMeshHeightmap ); - lua_register( L, "RL_GenMeshCustom", lmodelsGenMeshCustom ); - lua_register( L, "RL_UpdateMesh", lmodelsUpdateMesh ); - lua_register( L, "RL_UnloadMesh", lmodelsUnloadMesh ); - lua_register( L, "RL_DrawMesh", lmodelsDrawMesh ); - lua_register( L, "RL_DrawMeshInstanced", lmodelsDrawMeshInstanced ); - lua_register( L, "RL_SetMeshColor", lmodelsSetMeshColor ); - lua_register( L, "RL_ExportMesh", lmodelsExportMesh ); - lua_register( L, "RL_GetMeshBoundingBox", lmodelsGetMeshBoundingBox ); - lua_register( L, "RL_GenMeshTangents", lmodelsGenMeshTangents ); + assingGlobalFunction( "GenMeshPoly", lmodelsGenMeshPoly ); + assingGlobalFunction( "GenMeshPlane", lmodelsGenMeshPlane ); + assingGlobalFunction( "GenMeshCube", lmodelsGenMeshCube ); + assingGlobalFunction( "GenMeshSphere", lmodelsGenMeshSphere ); + assingGlobalFunction( "GenMeshCylinder", lmodelsGenMeshCylinder ); + assingGlobalFunction( "GenMeshCone", lmodelsGenMeshCone ); + assingGlobalFunction( "GenMeshTorus", lmodelsGenMeshTorus ); + assingGlobalFunction( "GenMeshKnot", lmodelsGenMeshKnot ); + assingGlobalFunction( "GenMeshHeightmap", lmodelsGenMeshHeightmap ); + assingGlobalFunction( "GenMeshCustom", lmodelsGenMeshCustom ); + assingGlobalFunction( "UpdateMesh", lmodelsUpdateMesh ); + assingGlobalFunction( "UnloadMesh", lmodelsUnloadMesh ); + assingGlobalFunction( "DrawMesh", lmodelsDrawMesh ); + assingGlobalFunction( "DrawMeshInstanced", lmodelsDrawMeshInstanced ); + assingGlobalFunction( "SetMeshColor", lmodelsSetMeshColor ); + assingGlobalFunction( "ExportMesh", lmodelsExportMesh ); + assingGlobalFunction( "GetMeshBoundingBox", lmodelsGetMeshBoundingBox ); + assingGlobalFunction( "GenMeshTangents", lmodelsGenMeshTangents ); /* Material. */ - lua_register( L, "RL_LoadMaterialDefault", lmodelsLoadMaterialDefault ); - lua_register( L, "RL_CreateMaterial", lmodelsCreateMaterial ); - lua_register( L, "RL_UnloadMaterial", lmodelsUnloadMaterial ); - lua_register( L, "RL_SetMaterialTexture", lmodelsSetMaterialTexture ); - lua_register( L, "RL_SetMaterialColor", lmodelsSetMaterialColor ); - lua_register( L, "RL_SetMaterialValue", lmodelsSetMaterialValue ); - lua_register( L, "RL_SetMaterialShader", lmodelsSetMaterialShader ); + assingGlobalFunction( "LoadMaterialDefault", lmodelsLoadMaterialDefault ); + assingGlobalFunction( "CreateMaterial", lmodelsCreateMaterial ); + assingGlobalFunction( "UnloadMaterial", lmodelsUnloadMaterial ); + assingGlobalFunction( "SetMaterialTexture", lmodelsSetMaterialTexture ); + assingGlobalFunction( "SetMaterialColor", lmodelsSetMaterialColor ); + assingGlobalFunction( "SetMaterialValue", lmodelsSetMaterialValue ); + assingGlobalFunction( "SetMaterialShader", lmodelsSetMaterialShader ); /* Model. */ - lua_register( L, "RL_LoadModel", lmodelsLoadModel ); - lua_register( L, "RL_LoadModelFromMesh", lmodelsLoadModelFromMesh ); - lua_register( L, "RL_UnloadModel", lmodelsUnloadModel ); - lua_register( L, "RL_DrawModel", lmodelsDrawModel ); - lua_register( L, "RL_DrawModelEx", lmodelsDrawModelEx ); - lua_register( L, "RL_SetModelMaterial", lmodelsSetModelMaterial ); - lua_register( L, "RL_SetModelMeshMaterial", lmodelsSetModelMeshMaterial ); - lua_register( L, "RL_DrawBillboard", lmodelsDrawBillboard ); - lua_register( L, "RL_DrawBillboardRec", lmodelsDrawBillboardRec ); - lua_register( L, "RL_SetModelTransform", lmodelsSetModelTransform ); - lua_register( L, "RL_GetModelTransform", lmodelsGetModelTransform ); + assingGlobalFunction( "LoadModel", lmodelsLoadModel ); + assingGlobalFunction( "LoadModelFromMesh", lmodelsLoadModelFromMesh ); + assingGlobalFunction( "UnloadModel", lmodelsUnloadModel ); + assingGlobalFunction( "DrawModel", lmodelsDrawModel ); + assingGlobalFunction( "DrawModelEx", lmodelsDrawModelEx ); + assingGlobalFunction( "SetModelMaterial", lmodelsSetModelMaterial ); + assingGlobalFunction( "SetModelMeshMaterial", lmodelsSetModelMeshMaterial ); + assingGlobalFunction( "DrawBillboard", lmodelsDrawBillboard ); + assingGlobalFunction( "DrawBillboardRec", lmodelsDrawBillboardRec ); + assingGlobalFunction( "SetModelTransform", lmodelsSetModelTransform ); + assingGlobalFunction( "GetModelTransform", lmodelsGetModelTransform ); /* Animations. */ - lua_register( L, "RL_LoadModelAnimations", lmodelsLoadModelAnimations ); - lua_register( L, "RL_UpdateModelAnimation", lmodelsUpdateModelAnimation ); - lua_register( L, "RL_UnloadModelAnimations", lmodelsUnloadModelAnimations ); - lua_register( L, "RL_IsModelAnimationValid", lmodelsIsModelAnimationValid ); - lua_register( L, "RL_GetModelAnimationBoneCount", lmodelsGetModelAnimationBoneCount ); - lua_register( L, "RL_GetModelAnimationFrameCount", lmodelsGetModelAnimationFrameCount ); + assingGlobalFunction( "LoadModelAnimations", lmodelsLoadModelAnimations ); + assingGlobalFunction( "UpdateModelAnimation", lmodelsUpdateModelAnimation ); + assingGlobalFunction( "UnloadModelAnimations", lmodelsUnloadModelAnimations ); + assingGlobalFunction( "IsModelAnimationValid", lmodelsIsModelAnimationValid ); + assingGlobalFunction( "GetModelAnimationBoneCount", lmodelsGetModelAnimationBoneCount ); + assingGlobalFunction( "GetModelAnimationFrameCount", lmodelsGetModelAnimationFrameCount ); /* Collision. */ - lua_register( L, "RL_CheckCollisionSpheres", lmodelsCheckCollisionSpheres ); - lua_register( L, "RL_CheckCollisionBoxes", lmodelsCheckCollisionBoxes ); - lua_register( L, "RL_CheckCollisionBoxSphere", lmodelsCheckCollisionBoxSphere ); - lua_register( L, "RL_GetRayCollisionSphere", lmodelsGetRayCollisionSphere ); - lua_register( L, "RL_GetRayCollisionBox", lmodelsGetRayCollisionBox ); - lua_register( L, "RL_GetRayCollisionMesh", lmodelsGetRayCollisionMesh ); - lua_register( L, "RL_GetRayCollisionTriangle", lmodelsGetRayCollisionTriangle ); - lua_register( L, "RL_GetRayCollisionQuad", lmodelsGetRayCollisionQuad ); + assingGlobalFunction( "CheckCollisionSpheres", lmodelsCheckCollisionSpheres ); + assingGlobalFunction( "CheckCollisionBoxes", lmodelsCheckCollisionBoxes ); + assingGlobalFunction( "CheckCollisionBoxSphere", lmodelsCheckCollisionBoxSphere ); + assingGlobalFunction( "GetRayCollisionSphere", lmodelsGetRayCollisionSphere ); + assingGlobalFunction( "GetRayCollisionBox", lmodelsGetRayCollisionBox ); + assingGlobalFunction( "GetRayCollisionMesh", lmodelsGetRayCollisionMesh ); + assingGlobalFunction( "GetRayCollisionTriangle", lmodelsGetRayCollisionTriangle ); + assingGlobalFunction( "GetRayCollisionQuad", lmodelsGetRayCollisionQuad ); /* Text. */ /* Loading. */ - lua_register( L, "RL_LoadFont", ltextLoadFont ); - lua_register( L, "RL_LoadFontEx", ltextLoadFontEx ); - lua_register( L, "RL_LoadFontFromImage", ltextLoadFontFromImage ); - lua_register( L, "RL_UnloadFont", ltextUnloadFont ); + assingGlobalFunction( "LoadFont", ltextLoadFont ); + assingGlobalFunction( "LoadFontEx", ltextLoadFontEx ); + assingGlobalFunction( "LoadFontFromImage", ltextLoadFontFromImage ); + assingGlobalFunction( "UnloadFont", ltextUnloadFont ); /* Drawing. */ - lua_register( L, "RL_DrawFPS", ltextDrawFPS ); - lua_register( L, "RL_DrawText", ltextDrawText ); - lua_register( L, "RL_DrawTextPro", ltextDrawTextPro ); + assingGlobalFunction( "DrawFPS", ltextDrawFPS ); + assingGlobalFunction( "DrawText", ltextDrawText ); + assingGlobalFunction( "DrawTextPro", ltextDrawTextPro ); /* Misc. */ - lua_register( L, "RL_MeasureText", ltextMeasureText ); - lua_register( L, "RL_GetFontBaseSize", ltextGetFontBaseSize ); - lua_register( L, "RL_GetFontGlyphCount", ltextGetFontGlyphCount ); - lua_register( L, "RL_GetFontGlyphPadding", ltextGetFontGlyphPadding ); + assingGlobalFunction( "MeasureText", ltextMeasureText ); + assingGlobalFunction( "GetFontBaseSize", ltextGetFontBaseSize ); + assingGlobalFunction( "GetFontGlyphCount", ltextGetFontGlyphCount ); + assingGlobalFunction( "GetFontGlyphPadding", ltextGetFontGlyphPadding ); /* Audio. */ /* Audio device management. */ - lua_register( L, "RL_SetMasterVolume", laudioSetMasterVolume ); + assingGlobalFunction( "SetMasterVolume", laudioSetMasterVolume ); /* Wave/Sound Loading. */ - lua_register( L, "RL_LoadSound", laudioLoadSound ); - lua_register( L, "RL_LoadWave", laudioLoadWave ); - lua_register( L, "RL_LoadSoundFromWave", laudioLoadSoundFromWave ); - lua_register( L, "RL_UnloadSound", laudioUnloadSound ); - lua_register( L, "RL_UnloadWave", laudioUnloadWave ); - lua_register( L, "RL_ExportWave", laudioExportWave ); - lua_register( L, "RL_ExportWaveAsCode", laudioExportWaveAsCode ); + assingGlobalFunction( "LoadSound", laudioLoadSound ); + assingGlobalFunction( "LoadWave", laudioLoadWave ); + assingGlobalFunction( "LoadSoundFromWave", laudioLoadSoundFromWave ); + assingGlobalFunction( "UnloadSound", laudioUnloadSound ); + assingGlobalFunction( "UnloadWave", laudioUnloadWave ); + assingGlobalFunction( "ExportWave", laudioExportWave ); + assingGlobalFunction( "ExportWaveAsCode", laudioExportWaveAsCode ); /* Wave/Sound management */ - lua_register( L, "RL_PlaySound", laudioPlaySound ); - lua_register( L, "RL_StopSound", laudioStopSound ); - lua_register( L, "RL_PauseSound", laudioPauseSound ); - lua_register( L, "RL_ResumeSound", laudioResumeSound ); - lua_register( L, "RL_PlaySoundMulti", laudioPlaySoundMulti ); - lua_register( L, "RL_StopSoundMulti", laudioStopSoundMulti ); - lua_register( L, "RL_GetSoundsPlaying", laudioGetSoundsPlaying ); - lua_register( L, "RL_IsSoundPlaying", laudioIsSoundPlaying ); - lua_register( L, "RL_SetSoundVolume", laudioSetSoundVolume ); - lua_register( L, "RL_SetSoundPitch", laudioSetSoundPitch ); - lua_register( L, "RL_SetSoundPan", laudioSetSoundPan ); - lua_register( L, "RL_WaveFormat", laudioWaveFormat ); - lua_register( L, "RL_WaveCopy", laudioWaveCopy ); - lua_register( L, "RL_WaveCrop", laudioWaveCrop ); + assingGlobalFunction( "PlaySound", laudioPlaySound ); + assingGlobalFunction( "StopSound", laudioStopSound ); + assingGlobalFunction( "PauseSound", laudioPauseSound ); + assingGlobalFunction( "ResumeSound", laudioResumeSound ); + assingGlobalFunction( "PlaySoundMulti", laudioPlaySoundMulti ); + assingGlobalFunction( "StopSoundMulti", laudioStopSoundMulti ); + assingGlobalFunction( "GetSoundsPlaying", laudioGetSoundsPlaying ); + assingGlobalFunction( "IsSoundPlaying", laudioIsSoundPlaying ); + assingGlobalFunction( "SetSoundVolume", laudioSetSoundVolume ); + assingGlobalFunction( "SetSoundPitch", laudioSetSoundPitch ); + assingGlobalFunction( "SetSoundPan", laudioSetSoundPan ); + assingGlobalFunction( "WaveFormat", laudioWaveFormat ); + assingGlobalFunction( "WaveCopy", laudioWaveCopy ); + assingGlobalFunction( "WaveCrop", laudioWaveCrop ); /* Music management. */ - lua_register( L, "RL_LoadMusicStream", laudioLoadMusicStream ); - lua_register( L, "RL_PlayMusicStream", laudioPlayMusicStream ); - lua_register( L, "RL_IsMusicStreamPlaying", laudioIsMusicStreamPlaying ); - lua_register( L, "RL_StopMusicStream", laudioStopMusicStream ); - lua_register( L, "RL_PauseMusicStream", laudioPauseMusicStream ); - lua_register( L, "RL_ResumeMusicStream", laudioResumeMusicStream ); - lua_register( L, "RL_SetMusicVolume", laudioSetMusicVolume ); - lua_register( L, "RL_SetMusicPitch", laudioSetMusicPitch ); - lua_register( L, "RL_SetMusicPan", laudioSetMusicPan ); - lua_register( L, "RL_GetMusicTimeLength", laudioGetMusicTimeLength ); - lua_register( L, "RL_GetMusicTimePlayed", laudioGetMusicTimePlayed ); + assingGlobalFunction( "LoadMusicStream", laudioLoadMusicStream ); + assingGlobalFunction( "PlayMusicStream", laudioPlayMusicStream ); + assingGlobalFunction( "IsMusicStreamPlaying", laudioIsMusicStreamPlaying ); + assingGlobalFunction( "StopMusicStream", laudioStopMusicStream ); + assingGlobalFunction( "PauseMusicStream", laudioPauseMusicStream ); + assingGlobalFunction( "ResumeMusicStream", laudioResumeMusicStream ); + assingGlobalFunction( "SetMusicVolume", laudioSetMusicVolume ); + assingGlobalFunction( "SetMusicPitch", laudioSetMusicPitch ); + assingGlobalFunction( "SetMusicPan", laudioSetMusicPan ); + assingGlobalFunction( "GetMusicTimeLength", laudioGetMusicTimeLength ); + assingGlobalFunction( "GetMusicTimePlayed", laudioGetMusicTimePlayed ); /* Math. */ /* Utils. */ - lua_register( L, "RL_Clamp", lmathClamp ); - lua_register( L, "RL_Lerp", lmathLerp ); - lua_register( L, "RL_Normalize", lmathNormalize ); - lua_register( L, "RL_Remap", lmathRemap ); - lua_register( L, "RL_Wrap", lmathWrap ); - lua_register( L, "RL_FloatEquals", lmathFloatEquals ); + assingGlobalFunction( "Clamp", lmathClamp ); + assingGlobalFunction( "Lerp", lmathLerp ); + assingGlobalFunction( "Normalize", lmathNormalize ); + assingGlobalFunction( "Remap", lmathRemap ); + assingGlobalFunction( "Wrap", lmathWrap ); + assingGlobalFunction( "FloatEquals", lmathFloatEquals ); /* Vector2. */ - lua_register( L, "RL_Vector2Zero", lmathVector2Zero ); - lua_register( L, "RL_Vector2One", lmathVector2One ); - lua_register( L, "RL_Vector2Add", lmathVector2Add ); - lua_register( L, "RL_Vector2AddValue", lmathVector2AddValue ); - lua_register( L, "RL_Vector2Subtract", lmathVector2Subtract ); - lua_register( L, "RL_Vector2SubtractValue", lmathVector2SubtractValue ); - lua_register( L, "RL_Vector2Length", lmathVector2Length ); - lua_register( L, "RL_Vector2LengthSqr", lmathVector2LengthSqr ); - lua_register( L, "RL_Vector2DotProduct", lmathVector2DotProduct ); - lua_register( L, "RL_Vector2Distance", lmathVector2Distance ); - lua_register( L, "RL_Vector2DistanceSqr", lmathVector2DistanceSqr ); - lua_register( L, "RL_Vector2Angle", lmathVector2Angle ); - lua_register( L, "RL_Vector2Scale", lmathVector2Scale ); - lua_register( L, "RL_Vector2Multiply", lmathVector2Multiply ); - lua_register( L, "RL_Vector2Negate", lmathVector2Negate ); - lua_register( L, "RL_Vector2Divide", lmathVector2Divide ); - lua_register( L, "RL_Vector2Normalize", lmathVector2Normalize ); - lua_register( L, "RL_Vector2Transform", lmathVector2Transform ); - lua_register( L, "RL_Vector2Lerp", lmathVector2Lerp ); - lua_register( L, "RL_Vector2Reflect", lmathVector2Reflect ); - lua_register( L, "RL_Vector2Rotate", lmathVector2Rotate ); - lua_register( L, "RL_Vector2MoveTowards", lmathVector2MoveTowards ); - lua_register( L, "RL_Vector2Invert", lmathVector2Invert ); - lua_register( L, "RL_Vector2Clamp", lmathVector2Clamp ); - lua_register( L, "RL_Vector2ClampValue", lmathVector2ClampValue ); - lua_register( L, "RL_Vector2Equals", lmathVector2Equals ); + assingGlobalFunction( "Vector2Zero", lmathVector2Zero ); + assingGlobalFunction( "Vector2One", lmathVector2One ); + assingGlobalFunction( "Vector2Add", lmathVector2Add ); + assingGlobalFunction( "Vector2AddValue", lmathVector2AddValue ); + assingGlobalFunction( "Vector2Subtract", lmathVector2Subtract ); + assingGlobalFunction( "Vector2SubtractValue", lmathVector2SubtractValue ); + assingGlobalFunction( "Vector2Length", lmathVector2Length ); + assingGlobalFunction( "Vector2LengthSqr", lmathVector2LengthSqr ); + assingGlobalFunction( "Vector2DotProduct", lmathVector2DotProduct ); + assingGlobalFunction( "Vector2Distance", lmathVector2Distance ); + assingGlobalFunction( "Vector2DistanceSqr", lmathVector2DistanceSqr ); + assingGlobalFunction( "Vector2Angle", lmathVector2Angle ); + assingGlobalFunction( "Vector2Scale", lmathVector2Scale ); + assingGlobalFunction( "Vector2Multiply", lmathVector2Multiply ); + assingGlobalFunction( "Vector2Negate", lmathVector2Negate ); + assingGlobalFunction( "Vector2Divide", lmathVector2Divide ); + assingGlobalFunction( "Vector2Normalize", lmathVector2Normalize ); + assingGlobalFunction( "Vector2Transform", lmathVector2Transform ); + assingGlobalFunction( "Vector2Lerp", lmathVector2Lerp ); + assingGlobalFunction( "Vector2Reflect", lmathVector2Reflect ); + assingGlobalFunction( "Vector2Rotate", lmathVector2Rotate ); + assingGlobalFunction( "Vector2MoveTowards", lmathVector2MoveTowards ); + assingGlobalFunction( "Vector2Invert", lmathVector2Invert ); + assingGlobalFunction( "Vector2Clamp", lmathVector2Clamp ); + assingGlobalFunction( "Vector2ClampValue", lmathVector2ClampValue ); + assingGlobalFunction( "Vector2Equals", lmathVector2Equals ); /* Vector3. */ - lua_register( L, "RL_Vector3Zero", lmathVector3Zero ); - lua_register( L, "RL_Vector3One", lmathVector3One ); - lua_register( L, "RL_Vector3Add", lmathVector3Add ); - lua_register( L, "RL_Vector3AddValue", lmathVector3AddValue ); - lua_register( L, "RL_Vector3Subtract", lmathVector3Subtract ); - lua_register( L, "RL_Vector3SubtractValue", lmathVector3SubtractValue ); - lua_register( L, "RL_Vector3Scale", lmathVector3Scale ); - lua_register( L, "RL_Vector3Multiply", lmathVector3Multiply ); - lua_register( L, "RL_Vector3CrossProduct", lmathVector3CrossProduct ); - lua_register( L, "RL_Vector3Perpendicular", lmathVector3Perpendicular ); - lua_register( L, "RL_Vector3Length", lmathVector3Length ); - lua_register( L, "RL_Vector3LengthSqr", lmathVector3LengthSqr ); - lua_register( L, "RL_Vector3DotProduct", lmathVector3DotProduct ); - lua_register( L, "RL_Vector3Distance", lmathVector3Distance ); - lua_register( L, "RL_Vector3DistanceSqr", lmathVector3DistanceSqr ); - lua_register( L, "RL_Vector3Angle", lmathVector3Angle ); - lua_register( L, "RL_Vector3Negate", lmathVector3Negate ); - lua_register( L, "RL_Vector3Divide", lmathVector3Divide ); - lua_register( L, "RL_Vector3Normalize", lmathVector3Normalize ); - lua_register( L, "RL_Vector3OrthoNormalize", lmathVector3OrthoNormalize ); - lua_register( L, "RL_Vector3Transform", lmathVector3Transform ); - lua_register( L, "RL_Vector3RotateByQuaternion", lmathVector3RotateByQuaternion ); - lua_register( L, "RL_Vector3Lerp", lmathVector3Lerp ); - lua_register( L, "RL_Vector3Reflect", lmathVector3Reflect ); - lua_register( L, "RL_Vector3Min", lmathVector3Min ); - lua_register( L, "RL_Vector3Max", lmathVector3Max ); - lua_register( L, "RL_Vector3Barycenter", lmathVector3Barycenter ); - lua_register( L, "RL_Vector3Unproject", lmathVector3Unproject ); - lua_register( L, "RL_Vector3Invert", lmathVector3Invert ); - lua_register( L, "RL_Vector3Clamp", lmathVector3Clamp ); - lua_register( L, "RL_Vector3ClampValue", lmathVector3ClampValue ); - lua_register( L, "RL_Vector3Equals", lmathVector3Equals ); - lua_register( L, "RL_Vector3Refract", lmathVector3Refract ); + assingGlobalFunction( "Vector3Zero", lmathVector3Zero ); + assingGlobalFunction( "Vector3One", lmathVector3One ); + assingGlobalFunction( "Vector3Add", lmathVector3Add ); + assingGlobalFunction( "Vector3AddValue", lmathVector3AddValue ); + assingGlobalFunction( "Vector3Subtract", lmathVector3Subtract ); + assingGlobalFunction( "Vector3SubtractValue", lmathVector3SubtractValue ); + assingGlobalFunction( "Vector3Scale", lmathVector3Scale ); + assingGlobalFunction( "Vector3Multiply", lmathVector3Multiply ); + assingGlobalFunction( "Vector3CrossProduct", lmathVector3CrossProduct ); + assingGlobalFunction( "Vector3Perpendicular", lmathVector3Perpendicular ); + assingGlobalFunction( "Vector3Length", lmathVector3Length ); + assingGlobalFunction( "Vector3LengthSqr", lmathVector3LengthSqr ); + assingGlobalFunction( "Vector3DotProduct", lmathVector3DotProduct ); + assingGlobalFunction( "Vector3Distance", lmathVector3Distance ); + assingGlobalFunction( "Vector3DistanceSqr", lmathVector3DistanceSqr ); + assingGlobalFunction( "Vector3Angle", lmathVector3Angle ); + assingGlobalFunction( "Vector3Negate", lmathVector3Negate ); + assingGlobalFunction( "Vector3Divide", lmathVector3Divide ); + assingGlobalFunction( "Vector3Normalize", lmathVector3Normalize ); + assingGlobalFunction( "Vector3OrthoNormalize", lmathVector3OrthoNormalize ); + assingGlobalFunction( "Vector3Transform", lmathVector3Transform ); + assingGlobalFunction( "Vector3RotateByQuaternion", lmathVector3RotateByQuaternion ); + assingGlobalFunction( "Vector3Lerp", lmathVector3Lerp ); + assingGlobalFunction( "Vector3Reflect", lmathVector3Reflect ); + assingGlobalFunction( "Vector3Min", lmathVector3Min ); + assingGlobalFunction( "Vector3Max", lmathVector3Max ); + assingGlobalFunction( "Vector3Barycenter", lmathVector3Barycenter ); + assingGlobalFunction( "Vector3Unproject", lmathVector3Unproject ); + assingGlobalFunction( "Vector3Invert", lmathVector3Invert ); + assingGlobalFunction( "Vector3Clamp", lmathVector3Clamp ); + assingGlobalFunction( "Vector3ClampValue", lmathVector3ClampValue ); + assingGlobalFunction( "Vector3Equals", lmathVector3Equals ); + assingGlobalFunction( "Vector3Refract", lmathVector3Refract ); /* Matrix. */ - lua_register( L, "RL_MatrixDeterminant", lmathMatrixDeterminant ); - lua_register( L, "RL_MatrixTrace", lmathMatrixTrace ); - lua_register( L, "RL_MatrixTranspose", lmathMatrixTranspose ); - lua_register( L, "RL_MatrixInvert", lmathMatrixInvert ); - lua_register( L, "RL_MatrixIdentity", lmathMatrixIdentity ); - lua_register( L, "RL_MatrixAdd", lmathMatrixAdd ); - lua_register( L, "RL_MatrixSubtract", lmathMatrixSubtract ); - lua_register( L, "RL_MatrixMultiply", lmathMatrixMultiply ); - lua_register( L, "RL_MatrixTranslate", lmathMatrixTranslate ); - lua_register( L, "RL_MatrixRotate", lmathMatrixRotate ); - lua_register( L, "RL_MatrixRotateX", lmathMatrixRotateX ); - lua_register( L, "RL_MatrixRotateY", lmathMatrixRotateY ); - lua_register( L, "RL_MatrixRotateZ", lmathMatrixRotateZ ); - lua_register( L, "RL_MatrixRotateXYZ", lmathMatrixRotateXYZ ); - lua_register( L, "RL_MatrixRotateZYX", lmathMatrixRotateZYX ); - lua_register( L, "RL_MatrixScale", lmathMatrixScale ); - lua_register( L, "RL_MatrixFrustum", lmathMatrixFrustum ); - lua_register( L, "RL_MatrixPerspective", lmathMatrixPerspective ); - lua_register( L, "RL_MatrixOrtho", lmathMatrixOrtho ); - lua_register( L, "RL_MatrixLookAt", lmathMatrixLookAt ); + assingGlobalFunction( "MatrixDeterminant", lmathMatrixDeterminant ); + assingGlobalFunction( "MatrixTrace", lmathMatrixTrace ); + assingGlobalFunction( "MatrixTranspose", lmathMatrixTranspose ); + assingGlobalFunction( "MatrixInvert", lmathMatrixInvert ); + assingGlobalFunction( "MatrixIdentity", lmathMatrixIdentity ); + assingGlobalFunction( "MatrixAdd", lmathMatrixAdd ); + assingGlobalFunction( "MatrixSubtract", lmathMatrixSubtract ); + assingGlobalFunction( "MatrixMultiply", lmathMatrixMultiply ); + assingGlobalFunction( "MatrixTranslate", lmathMatrixTranslate ); + assingGlobalFunction( "MatrixRotate", lmathMatrixRotate ); + assingGlobalFunction( "MatrixRotateX", lmathMatrixRotateX ); + assingGlobalFunction( "MatrixRotateY", lmathMatrixRotateY ); + assingGlobalFunction( "MatrixRotateZ", lmathMatrixRotateZ ); + assingGlobalFunction( "MatrixRotateXYZ", lmathMatrixRotateXYZ ); + assingGlobalFunction( "MatrixRotateZYX", lmathMatrixRotateZYX ); + assingGlobalFunction( "MatrixScale", lmathMatrixScale ); + assingGlobalFunction( "MatrixFrustum", lmathMatrixFrustum ); + assingGlobalFunction( "MatrixPerspective", lmathMatrixPerspective ); + assingGlobalFunction( "MatrixOrtho", lmathMatrixOrtho ); + assingGlobalFunction( "MatrixLookAt", lmathMatrixLookAt ); /* Quaternion. */ - lua_register( L, "RL_QuaternionAdd", lmathQuaternionAdd ); - lua_register( L, "RL_QuaternionAddValue", lmathQuaternionAddValue ); - lua_register( L, "RL_QuaternionSubtract", lmathQuaternionSubtract ); - lua_register( L, "RL_QuaternionSubtractValue", lmathQuaternionSubtractValue ); - lua_register( L, "RL_QuaternionIdentity", lmathQuaternionIdentity ); - lua_register( L, "RL_QuaternionLength", lmathQuaternionLength ); - lua_register( L, "RL_QuaternionNormalize", lmathQuaternionNormalize ); - lua_register( L, "RL_QuaternionInvert", lmathQuaternionInvert ); - lua_register( L, "RL_QuaternionMultiply", lmathQuaternionMultiply ); - lua_register( L, "RL_QuaternionScale", lmathQuaternionScale ); - lua_register( L, "RL_QuaternionDivide", lmathQuaternionDivide ); - lua_register( L, "RL_QuaternionLerp", lmathQuaternionLerp ); - lua_register( L, "RL_QuaternionNlerp", lmathQuaternionNlerp ); - lua_register( L, "RL_QuaternionSlerp", lmathQuaternionSlerp ); - lua_register( L, "RL_QuaternionFromVector3ToVector3", lmathQuaternionFromVector3ToVector3 ); - lua_register( L, "RL_QuaternionFromMatrix", lmathQuaternionFromMatrix ); - lua_register( L, "RL_QuaternionToMatrix", lmathQuaternionToMatrix ); - lua_register( L, "RL_QuaternionFromAxisAngle", lmathQuaternionFromAxisAngle ); - lua_register( L, "RL_QuaternionToAxisAngle", lmathQuaternionToAxisAngle ); - lua_register( L, "RL_QuaternionFromEuler", lmathQuaternionFromEuler ); - lua_register( L, "RL_QuaternionToEuler", lmathQuaternionToEuler ); - lua_register( L, "RL_QuaternionTransform", lmathQuaternionTransform ); - lua_register( L, "RL_QuaternionEquals", lmathQuaternionEquals ); + assingGlobalFunction( "QuaternionAdd", lmathQuaternionAdd ); + assingGlobalFunction( "QuaternionAddValue", lmathQuaternionAddValue ); + assingGlobalFunction( "QuaternionSubtract", lmathQuaternionSubtract ); + assingGlobalFunction( "QuaternionSubtractValue", lmathQuaternionSubtractValue ); + assingGlobalFunction( "QuaternionIdentity", lmathQuaternionIdentity ); + assingGlobalFunction( "QuaternionLength", lmathQuaternionLength ); + assingGlobalFunction( "QuaternionNormalize", lmathQuaternionNormalize ); + assingGlobalFunction( "QuaternionInvert", lmathQuaternionInvert ); + assingGlobalFunction( "QuaternionMultiply", lmathQuaternionMultiply ); + assingGlobalFunction( "QuaternionScale", lmathQuaternionScale ); + assingGlobalFunction( "QuaternionDivide", lmathQuaternionDivide ); + assingGlobalFunction( "QuaternionLerp", lmathQuaternionLerp ); + assingGlobalFunction( "QuaternionNlerp", lmathQuaternionNlerp ); + assingGlobalFunction( "QuaternionSlerp", lmathQuaternionSlerp ); + assingGlobalFunction( "QuaternionFromVector3ToVector3", lmathQuaternionFromVector3ToVector3 ); + assingGlobalFunction( "QuaternionFromMatrix", lmathQuaternionFromMatrix ); + assingGlobalFunction( "QuaternionToMatrix", lmathQuaternionToMatrix ); + assingGlobalFunction( "QuaternionFromAxisAngle", lmathQuaternionFromAxisAngle ); + assingGlobalFunction( "QuaternionToAxisAngle", lmathQuaternionToAxisAngle ); + assingGlobalFunction( "QuaternionFromEuler", lmathQuaternionFromEuler ); + assingGlobalFunction( "QuaternionToEuler", lmathQuaternionToEuler ); + assingGlobalFunction( "QuaternionTransform", lmathQuaternionTransform ); + assingGlobalFunction( "QuaternionEquals", lmathQuaternionEquals ); /* Gui. */ /* Global. */ - lua_register( L, "RL_GuiEnable", lguiGuiEnable ); - lua_register( L, "RL_GuiDisable", lguiGuiDisable ); - lua_register( L, "RL_GuiLock", lguiGuiLock ); - lua_register( L, "RL_GuiUnlock", lguiGuiUnlock ); - lua_register( L, "RL_GuiIsLocked", lguiGuiIsLocked ); - lua_register( L, "RL_GuiFade", lguiGuiFade ); - lua_register( L, "RL_GuiSetState", lguiGuiSetState ); - lua_register( L, "RL_GuiGetState", lguiGuiGetState ); + assingGlobalFunction( "GuiEnable", lguiGuiEnable ); + assingGlobalFunction( "GuiDisable", lguiGuiDisable ); + assingGlobalFunction( "GuiLock", lguiGuiLock ); + assingGlobalFunction( "GuiUnlock", lguiGuiUnlock ); + assingGlobalFunction( "GuiIsLocked", lguiGuiIsLocked ); + assingGlobalFunction( "GuiFade", lguiGuiFade ); + assingGlobalFunction( "GuiSetState", lguiGuiSetState ); + assingGlobalFunction( "GuiGetState", lguiGuiGetState ); /* Font. */ - lua_register( L, "RL_GuiSetFont", lguiGuiSetFont ); + assingGlobalFunction( "GuiSetFont", lguiGuiSetFont ); /* Style. */ - lua_register( L, "RL_GuiSetStyle", lguiGuiSetStyle ); - lua_register( L, "RL_GuiGetStyle", lguiGuiGetStyle ); - lua_register( L, "RL_GuiLoadStyle", lguiGuiLoadStyle ); - lua_register( L, "RL_GuiLoadStyleDefault", lguiGuiLoadStyleDefault ); + assingGlobalFunction( "GuiSetStyle", lguiGuiSetStyle ); + assingGlobalFunction( "GuiGetStyle", lguiGuiGetStyle ); + assingGlobalFunction( "GuiLoadStyle", lguiGuiLoadStyle ); + assingGlobalFunction( "GuiLoadStyleDefault", lguiGuiLoadStyleDefault ); /* Container. */ - lua_register( L, "RL_GuiWindowBox", lguiGuiWindowBox ); - lua_register( L, "RL_GuiGroupBox", lguiGuiGroupBox ); - lua_register( L, "RL_GuiLine", lguiGuiLine ); - lua_register( L, "RL_GuiPanel", lguiGuiPanel ); - lua_register( L, "RL_GuiScrollPanel", lguiGuiScrollPanel ); + assingGlobalFunction( "GuiWindowBox", lguiGuiWindowBox ); + assingGlobalFunction( "GuiGroupBox", lguiGuiGroupBox ); + assingGlobalFunction( "GuiLine", lguiGuiLine ); + assingGlobalFunction( "GuiPanel", lguiGuiPanel ); + assingGlobalFunction( "GuiScrollPanel", lguiGuiScrollPanel ); /* Basic. */ - lua_register( L, "RL_GuiLabel", lguiGuiLabel ); - lua_register( L, "RL_GuiButton", lguiGuiButton ); - lua_register( L, "RL_GuiLabelButton", lguiGuiLabelButton ); - lua_register( L, "RL_GuiToggle", lguiGuiToggle ); - lua_register( L, "RL_GuiToggleGroup", lguiGuiToggleGroup ); - lua_register( L, "RL_GuiCheckBox", lguiGuiCheckBox ); - lua_register( L, "RL_GuiComboBox", lguiGuiComboBox ); - lua_register( L, "RL_GuiTextBox", lguiGuiTextBox ); - lua_register( L, "RL_GuiTextBoxMulti", lguiGuiTextBoxMulti ); - lua_register( L, "RL_GuiSpinner", lguiGuiSpinner ); - lua_register( L, "RL_GuiValueBox", lguiGuiValueBox ); - lua_register( L, "RL_GuiSlider", lguiGuiSlider ); - lua_register( L, "RL_GuiSliderBar", lguiGuiSliderBar ); - lua_register( L, "RL_GuiProgressBar", lguiGuiProgressBar ); - lua_register( L, "RL_GuiScrollBar", lguiGuiScrollBar ); - lua_register( L, "RL_GuiDropdownBox", lguiGuiDropdownBox ); - lua_register( L, "RL_GuiStatusBar", lguiGuiStatusBar ); - lua_register( L, "RL_GuiDummyRec", lguiGuiDummyRec ); - lua_register( L, "RL_GuiGrid", lguiGuiGrid ); + assingGlobalFunction( "GuiLabel", lguiGuiLabel ); + assingGlobalFunction( "GuiButton", lguiGuiButton ); + assingGlobalFunction( "GuiLabelButton", lguiGuiLabelButton ); + assingGlobalFunction( "GuiToggle", lguiGuiToggle ); + assingGlobalFunction( "GuiToggleGroup", lguiGuiToggleGroup ); + assingGlobalFunction( "GuiCheckBox", lguiGuiCheckBox ); + assingGlobalFunction( "GuiComboBox", lguiGuiComboBox ); + assingGlobalFunction( "GuiTextBox", lguiGuiTextBox ); + assingGlobalFunction( "GuiTextBoxMulti", lguiGuiTextBoxMulti ); + assingGlobalFunction( "GuiSpinner", lguiGuiSpinner ); + assingGlobalFunction( "GuiValueBox", lguiGuiValueBox ); + assingGlobalFunction( "GuiSlider", lguiGuiSlider ); + assingGlobalFunction( "GuiSliderBar", lguiGuiSliderBar ); + assingGlobalFunction( "GuiProgressBar", lguiGuiProgressBar ); + assingGlobalFunction( "GuiScrollBar", lguiGuiScrollBar ); + assingGlobalFunction( "GuiDropdownBox", lguiGuiDropdownBox ); + assingGlobalFunction( "GuiStatusBar", lguiGuiStatusBar ); + assingGlobalFunction( "GuiDummyRec", lguiGuiDummyRec ); + assingGlobalFunction( "GuiGrid", lguiGuiGrid ); /* Advanced. */ - lua_register( L, "RL_GuiListView", lguiGuiListView ); - lua_register( L, "RL_GuiListViewEx", lguiGuiListViewEx ); - lua_register( L, "RL_GuiMessageBox", lguiGuiMessageBox ); - lua_register( L, "RL_GuiTextInputBox", lguiGuiTextInputBox ); - lua_register( L, "RL_GuiColorPicker", lguiGuiColorPicker ); - lua_register( L, "RL_GuiColorPanel", lguiGuiColorPanel ); - lua_register( L, "RL_GuiColorBarAlpha", lguiGuiColorBarAlpha ); - lua_register( L, "RL_GuiColorBarHue", lguiGuiColorBarHue ); + assingGlobalFunction( "GuiListView", lguiGuiListView ); + assingGlobalFunction( "GuiListViewEx", lguiGuiListViewEx ); + assingGlobalFunction( "GuiMessageBox", lguiGuiMessageBox ); + assingGlobalFunction( "GuiTextInputBox", lguiGuiTextInputBox ); + assingGlobalFunction( "GuiColorPicker", lguiGuiColorPicker ); + assingGlobalFunction( "GuiColorPanel", lguiGuiColorPanel ); + assingGlobalFunction( "GuiColorBarAlpha", lguiGuiColorBarAlpha ); + assingGlobalFunction( "GuiColorBarHue", lguiGuiColorBarHue ); /* Icons. */ - lua_register( L, "RL_GuiIconText", lguiGuiIconText ); - lua_register( L, "RL_GuiDrawIcon", lguiGuiDrawIcon ); - lua_register( L, "RL_GuiSetIconScale", lguiGuiSetIconScale ); - lua_register( L, "RL_GuiSetIconPixel", lguiGuiSetIconPixel ); - lua_register( L, "RL_GuiClearIconPixel", lguiGuiClearIconPixel ); - lua_register( L, "RL_GuiCheckIconPixel", lguiGuiCheckIconPixel ); + assingGlobalFunction( "GuiIconText", lguiGuiIconText ); + assingGlobalFunction( "GuiDrawIcon", lguiGuiDrawIcon ); + assingGlobalFunction( "GuiSetIconScale", lguiGuiSetIconScale ); + assingGlobalFunction( "GuiSetIconPixel", lguiGuiSetIconPixel ); + assingGlobalFunction( "GuiClearIconPixel", lguiGuiClearIconPixel ); + assingGlobalFunction( "GuiCheckIconPixel", lguiGuiCheckIconPixel ); /* Lights */ /* Basics. */ - lua_register( L, "RL_CreateLight", llightsCreateLight ); - lua_register( L, "RL_UpdateLightValues", llightsUpdateLightValues ); + assingGlobalFunction( "CreateLight", llightsCreateLight ); + assingGlobalFunction( "UpdateLightValues", llightsUpdateLightValues ); /* RLGL */ /* General render state. */ - lua_register( L, "RL_rlglSetLineWidth", lrlglSetLineWidth ); - lua_register( L, "RL_rlglGetLineWidth", lrlglGetLineWidth ); + assingGlobalFunction( "rlglSetLineWidth", lrlglSetLineWidth ); + assingGlobalFunction( "rlglGetLineWidth", lrlglGetLineWidth ); /* Easings */ /* Linear Easing functions. */ - lua_register( L, "RL_EaseLinear", leasingsEaseLinear ); + assingGlobalFunction( "EaseLinear", leasingsEaseLinear ); /* Sine Easing functions. */ - lua_register( L, "RL_EaseSineIn", leasingsEaseSineIn ); - lua_register( L, "RL_EaseSineOut", leasingsEaseSineOut ); - lua_register( L, "RL_EaseSineInOut", leasingsEaseSineInOut ); + assingGlobalFunction( "EaseSineIn", leasingsEaseSineIn ); + assingGlobalFunction( "EaseSineOut", leasingsEaseSineOut ); + assingGlobalFunction( "EaseSineInOut", leasingsEaseSineInOut ); /* Circular Easing functions. */ - lua_register( L, "RL_EaseCircIn", leasingsEaseCircIn ); - lua_register( L, "RL_EaseCircOut", leasingsEaseCircOut ); - lua_register( L, "RL_EaseCircInOut", leasingsEaseCircInOut ); + assingGlobalFunction( "EaseCircIn", leasingsEaseCircIn ); + assingGlobalFunction( "EaseCircOut", leasingsEaseCircOut ); + assingGlobalFunction( "EaseCircInOut", leasingsEaseCircInOut ); /* Cubic Easing functions. */ - lua_register( L, "RL_EaseCubicIn", leasingsEaseCubicIn ); - lua_register( L, "RL_EaseCubicOut", leasingsEaseCubicOut ); - lua_register( L, "RL_EaseCubicInOut", leasingsEaseCubicInOut ); + assingGlobalFunction( "EaseCubicIn", leasingsEaseCubicIn ); + assingGlobalFunction( "EaseCubicOut", leasingsEaseCubicOut ); + assingGlobalFunction( "EaseCubicInOut", leasingsEaseCubicInOut ); /* Quadratic Easing functions. */ - lua_register( L, "RL_EaseQuadIn", leasingsEaseQuadIn ); - lua_register( L, "RL_EaseQuadOut", leasingsEaseQuadOut ); - lua_register( L, "RL_EaseQuadInOut", leasingsEaseQuadInOut ); + assingGlobalFunction( "EaseQuadIn", leasingsEaseQuadIn ); + assingGlobalFunction( "EaseQuadOut", leasingsEaseQuadOut ); + assingGlobalFunction( "EaseQuadInOut", leasingsEaseQuadInOut ); /* Exponential Easing functions. */ - lua_register( L, "RL_EaseExpoIn", leasingsEaseExpoIn ); - lua_register( L, "RL_EaseExpoOut", leasingsEaseExpoOut ); - lua_register( L, "RL_EaseExpoInOut", leasingsEaseExpoInOut ); + assingGlobalFunction( "EaseExpoIn", leasingsEaseExpoIn ); + assingGlobalFunction( "EaseExpoOut", leasingsEaseExpoOut ); + assingGlobalFunction( "EaseExpoInOut", leasingsEaseExpoInOut ); /* Back Easing functions. */ - lua_register( L, "RL_EaseBackIn", leasingsEaseBackIn ); - lua_register( L, "RL_EaseBackOut", leasingsEaseBackOut ); - lua_register( L, "RL_EaseBackInOut", leasingsEaseBackInOut ); + assingGlobalFunction( "EaseBackIn", leasingsEaseBackIn ); + assingGlobalFunction( "EaseBackOut", leasingsEaseBackOut ); + assingGlobalFunction( "EaseBackInOut", leasingsEaseBackInOut ); /* Bounce Easing functions. */ - lua_register( L, "RL_EaseBounceIn", leasingsEaseBounceIn ); - lua_register( L, "RL_EaseBounceOut", leasingsEaseBounceOut ); - lua_register( L, "RL_EaseBounceInOut", leasingsEaseBounceInOut ); + assingGlobalFunction( "EaseBounceIn", leasingsEaseBounceIn ); + assingGlobalFunction( "EaseBounceOut", leasingsEaseBounceOut ); + assingGlobalFunction( "EaseBounceInOut", leasingsEaseBounceInOut ); /* Elastic Easing functions. */ - lua_register( L, "RL_EaseElasticIn", leasingsEaseElasticIn ); - lua_register( L, "RL_EaseElasticOut", leasingsEaseElasticOut ); - lua_register( L, "RL_EaseElasticInOut", leasingsEaseElasticInOut ); + assingGlobalFunction( "EaseElasticIn", leasingsEaseElasticIn ); + assingGlobalFunction( "EaseElasticOut", leasingsEaseElasticOut ); + assingGlobalFunction( "EaseElasticInOut", leasingsEaseElasticInOut ); + + lua_pop( L, -1 ); } /* Lua util functions. */ @@ -1716,7 +1746,7 @@ Ray uluaGetRay( lua_State *L ) { lua_pushnil( L ); while ( lua_next( L, t ) != 0 ) { - if ( lua_isnumber( L, -1 ) ) { + if ( lua_istable( L, -1 ) ) { if ( lua_isnumber( L, -2 ) ) { switch ( i ) { case 0: diff --git a/src/models.c b/src/models.c index 6258f81..cef36dd 100644 --- a/src/models.c +++ b/src/models.c @@ -125,7 +125,7 @@ static int newMesh() { */ /* -> success = RL_DrawLine3D( Vector3 startPos, Vector3 endPos, Color color ) +> success = RL.DrawLine3D( Vector3 startPos, Vector3 endPos, Color color ) Draw a line in 3D world space @@ -134,7 +134,7 @@ Draw a line in 3D world space */ int lmodelsDrawLine3D( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawLine3D( Vector3 startPos, Vector3 endPos, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLine3D( Vector3 startPos, Vector3 endPos, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -151,7 +151,7 @@ int lmodelsDrawLine3D( lua_State *L ) { } /* -> success = RL_DrawPoint3D( Vector3 position, Color color ) +> success = RL.DrawPoint3D( Vector3 position, Color color ) Draw a point in 3D space, actually a small line @@ -160,7 +160,7 @@ Draw a point in 3D space, actually a small line */ int lmodelsDrawPoint3D( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawPoint3D( Vector3 position, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPoint3D( Vector3 position, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -175,7 +175,7 @@ int lmodelsDrawPoint3D( lua_State *L ) { } /* -> success = RL_DrawCircle3D( Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color ) +> success = RL.DrawCircle3D( Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color ) Draw a circle in 3D world space @@ -184,7 +184,7 @@ Draw a circle in 3D world space */ int lmodelsDrawCircle3D( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCircle3D( Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircle3D( Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -205,7 +205,7 @@ int lmodelsDrawCircle3D( lua_State *L ) { } /* -> success = RL_DrawTriangle3D( Vector3 v1, Vector3 v2, Vector3 v3, Color color ) +> success = RL.DrawTriangle3D( Vector3 v1, Vector3 v2, Vector3 v3, Color color ) Draw a color-filled triangle ( Vertex in counter-clockwise order! ) @@ -214,7 +214,7 @@ Draw a color-filled triangle ( Vertex in counter-clockwise order! ) */ int lmodelsDrawTriangle3D( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTriangle3D( Vector3 v1, Vector3 v2, Vector3 v3, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangle3D( Vector3 v1, Vector3 v2, Vector3 v3, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -233,7 +233,7 @@ int lmodelsDrawTriangle3D( lua_State *L ) { } /* -> success = RL_DrawCube( Vector3 position, Vector3 size, Color color ) +> success = RL.DrawCube( Vector3 position, Vector3 size, Color color ) Draw cube @@ -242,7 +242,7 @@ Draw cube */ int lmodelsDrawCube( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCube( Vector3 position, Vector3 size, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCube( Vector3 position, Vector3 size, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -259,7 +259,7 @@ int lmodelsDrawCube( lua_State *L ) { } /* -> success = RL_DrawCubeWires( Vector3 position, Vector3 size, Color color ) +> success = RL.DrawCubeWires( Vector3 position, Vector3 size, Color color ) Draw cube wires @@ -268,7 +268,7 @@ Draw cube wires */ int lmodelsDrawCubeWires( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCubeWires( Vector3 position, Vector3 size, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCubeWires( Vector3 position, Vector3 size, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -285,7 +285,7 @@ int lmodelsDrawCubeWires( lua_State *L ) { } /* -> success = RL_DrawCubeTexture( Texture2D texture, Vector3 position, Vector3 size, Color color ) +> success = RL.DrawCubeTexture( Texture2D texture, Vector3 position, Vector3 size, Color color ) Draw cube textured @@ -294,7 +294,7 @@ Draw cube textured */ int lmodelsDrawCubeTexture( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCubeTexture( Texture2D texture, Vector3 position, Vector3 size, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCubeTexture( Texture2D texture, Vector3 position, Vector3 size, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -318,7 +318,7 @@ int lmodelsDrawCubeTexture( lua_State *L ) { } /* -> success = RL_DrawSphere( Vector3 centerPos, float radius, Color color ) +> success = RL.DrawSphere( Vector3 centerPos, float radius, Color color ) Draw sphere @@ -327,7 +327,7 @@ Draw sphere */ int lmodelsDrawSphere( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawSphere( Vector3 centerPos, float radius, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawSphere( Vector3 centerPos, float radius, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -344,7 +344,7 @@ int lmodelsDrawSphere( lua_State *L ) { } /* -> success = RL_DrawSphereEx( Vector3 centerPos, float radius, int rings, int slices, Color color ) +> success = RL.DrawSphereEx( Vector3 centerPos, float radius, int rings, int slices, Color color ) Draw sphere with extended parameters @@ -353,7 +353,7 @@ Draw sphere with extended parameters */ int lmodelsDrawSphereEx( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawSphereEx( Vector3 centerPos, float radius, int rings, int slices, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawSphereEx( Vector3 centerPos, float radius, int rings, int slices, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -374,7 +374,7 @@ int lmodelsDrawSphereEx( lua_State *L ) { } /* -> success = RL_DrawSphereWires( Vector3 centerPos, float radius, int rings, int slices, Color color ) +> success = RL.DrawSphereWires( Vector3 centerPos, float radius, int rings, int slices, Color color ) Draw sphere wires @@ -383,7 +383,7 @@ Draw sphere wires */ int lmodelsDrawSphereWires( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawSphereWires( Vector3 centerPos, float radius, int rings, int slices, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawSphereWires( Vector3 centerPos, float radius, int rings, int slices, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -404,7 +404,7 @@ int lmodelsDrawSphereWires( lua_State *L ) { } /* -> success = RL_DrawCylinder( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color ) +> success = RL.DrawCylinder( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color ) Draw a cylinder/cone @@ -413,7 +413,7 @@ Draw a cylinder/cone */ int lmodelsDrawCylinder( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCylinder( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCylinder( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -436,7 +436,7 @@ int lmodelsDrawCylinder( lua_State *L ) { } /* -> success = RL_DrawCylinderEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color ) +> success = RL.DrawCylinderEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color ) Draw a cylinder with base at startPos and top at endPos @@ -445,7 +445,7 @@ Draw a cylinder with base at startPos and top at endPos */ int lmodelsDrawCylinderEx( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_istable( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCylinderEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCylinderEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -468,7 +468,7 @@ int lmodelsDrawCylinderEx( lua_State *L ) { } /* -> success = RL_DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color ) +> success = RL.DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color ) Draw a cylinder/cone wires @@ -477,7 +477,7 @@ Draw a cylinder/cone wires */ int lmodelsDrawCylinderWires( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -500,7 +500,7 @@ int lmodelsDrawCylinderWires( lua_State *L ) { } /* -> success = RL_DrawCylinderWiresEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color ) +> success = RL.DrawCylinderWiresEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color ) Draw a cylinder wires with base at startPos and top at endPos @@ -509,7 +509,7 @@ Draw a cylinder wires with base at startPos and top at endPos */ int lmodelsDrawCylinderWiresEx( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_istable( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCylinderWiresEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCylinderWiresEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -532,7 +532,7 @@ int lmodelsDrawCylinderWiresEx( lua_State *L ) { } /* -> success = RL_DrawPlane( Vector3 centerPos, Vector2 size, Color color ) +> success = RL.DrawPlane( Vector3 centerPos, Vector2 size, Color color ) Draw a plane XZ @@ -541,7 +541,7 @@ Draw a plane XZ */ int lmodelsDrawPlane( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawPlane( Vector3 centerPos, Vector2 size, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPlane( Vector3 centerPos, Vector2 size, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -558,7 +558,7 @@ int lmodelsDrawPlane( lua_State *L ) { } /* -> success = RL_DrawQuad3DTexture( texture, Vector3{} vertices, Vector2{} texCoords, Color{} colors ) +> success = RL.DrawQuad3DTexture( Texture2D texture, Vector3{} vertices, Vector2{} texCoords, Color{} colors ) Draw 3D textured quad. ( Texture coordinates opengl style 0.0 - 1.0 ). @@ -567,7 +567,7 @@ Draw 3D textured quad. ( Texture coordinates opengl style 0.0 - 1.0 ). */ int lmodelDrawQuad3DTexture( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawQuad3DTexture( texture, Vector3{} vertices, Vector2{} texCoords, Color{} colors )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawQuad3DTexture( Texture2D texture, Vector3{} vertices, Vector2{} texCoords, Color{} colors )" ); lua_pushboolean( L, false ); return 1; } @@ -647,7 +647,7 @@ int lmodelDrawQuad3DTexture( lua_State *L ) { } /* -> success = RL_DrawRay( Ray ray, Color color ) +> success = RL.DrawRay( Ray ray, Color color ) Draw a ray line @@ -656,7 +656,7 @@ Draw a ray line */ int lmodelsDrawRay( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRay( Ray ray, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRay( Ray ray, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -671,7 +671,7 @@ int lmodelsDrawRay( lua_State *L ) { } /* -> success = RL_DrawGrid( int slices, float spacing ) +> success = RL.DrawGrid( int slices, float spacing ) Draw a grid ( Centered at ( 0, 0, 0 ) ) @@ -680,7 +680,7 @@ Draw a grid ( Centered at ( 0, 0, 0 ) ) */ int lmodelsDrawGrid( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawGrid( int slices, float spacing )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawGrid( int slices, float spacing )" ); lua_pushboolean( L, false ); return 1; } @@ -695,7 +695,7 @@ int lmodelsDrawGrid( lua_State *L ) { */ /* -> mesh = RL_GenMeshPoly( int sides, float radius ) +> mesh = RL.GenMeshPoly( int sides, float radius ) Generate polygonal mesh @@ -704,7 +704,7 @@ Generate polygonal mesh */ int lmodelsGenMeshPoly( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshPoly( int sides, float radius )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshPoly( int sides, float radius )" ); lua_pushinteger( L, -1 ); return 1; } @@ -720,7 +720,7 @@ int lmodelsGenMeshPoly( lua_State *L ) { } /* -> mesh = RL_GenMeshPlane( float width, float length, int resX, int resZ ) +> mesh = RL.GenMeshPlane( float width, float length, int resX, int resZ ) Generate plane mesh ( With subdivisions ) @@ -729,7 +729,7 @@ Generate plane mesh ( With subdivisions ) */ int lmodelsGenMeshPlane( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshPlane( float width, float length, int resX, int resZ )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshPlane( float width, float length, int resX, int resZ )" ); lua_pushinteger( L, -1 ); return 1; } @@ -747,7 +747,7 @@ int lmodelsGenMeshPlane( lua_State *L ) { } /* -> mesh = RL_GenMeshCube( Vector3 size ) +> mesh = RL.GenMeshCube( Vector3 size ) Generate cuboid mesh @@ -756,7 +756,7 @@ Generate cuboid mesh */ int lmodelsGenMeshCube( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshCube( Vector3 size )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshCube( Vector3 size )" ); lua_pushinteger( L, -1 ); return 1; } @@ -771,7 +771,7 @@ int lmodelsGenMeshCube( lua_State *L ) { } /* -> mesh = RL_GenMeshSphere( float radius, int rings, int slices ) +> mesh = RL.GenMeshSphere( float radius, int rings, int slices ) Generate sphere mesh ( Standard sphere ) @@ -780,7 +780,7 @@ Generate sphere mesh ( Standard sphere ) */ int lmodelsGenMeshSphere( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshSphere( float radius, int rings, int slices )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshSphere( float radius, int rings, int slices )" ); lua_pushinteger( L, -1 ); return 1; } @@ -797,7 +797,7 @@ int lmodelsGenMeshSphere( lua_State *L ) { } /* -> mesh = RL_GenMeshCylinder( float radius, float height, int slices ) +> mesh = RL.GenMeshCylinder( float radius, float height, int slices ) Generate cylinder mesh @@ -806,7 +806,7 @@ Generate cylinder mesh */ int lmodelsGenMeshCylinder( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshCylinder( float radius, float height, int slices )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshCylinder( float radius, float height, int slices )" ); lua_pushinteger( L, -1 ); return 1; } @@ -823,7 +823,7 @@ int lmodelsGenMeshCylinder( lua_State *L ) { } /* -> mesh = RL_GenMeshCone( float radius, float height, int slices ) +> mesh = RL.GenMeshCone( float radius, float height, int slices ) Generate cone/pyramid mesh @@ -832,7 +832,7 @@ Generate cone/pyramid mesh */ int lmodelsGenMeshCone( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshCone( float radius, float height, int slices )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshCone( float radius, float height, int slices )" ); lua_pushinteger( L, -1 ); return 1; } @@ -849,7 +849,7 @@ int lmodelsGenMeshCone( lua_State *L ) { } /* -> mesh = RL_GenMeshTorus( float radius, float size, int radSeg, int sides ) +> mesh = RL.GenMeshTorus( float radius, float size, int radSeg, int sides ) Generate torus mesh @@ -858,7 +858,7 @@ Generate torus mesh */ int lmodelsGenMeshTorus( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshTorus( float radius, float size, int radSeg, int sides )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshTorus( float radius, float size, int radSeg, int sides )" ); lua_pushinteger( L, -1 ); return 1; } @@ -876,7 +876,7 @@ int lmodelsGenMeshTorus( lua_State *L ) { } /* -> mesh = RL_GenMeshKnot( float radius, float size, int radSeg, int sides ) +> mesh = RL.GenMeshKnot( float radius, float size, int radSeg, int sides ) Generate torus mesh @@ -885,7 +885,7 @@ Generate torus mesh */ int lmodelsGenMeshKnot( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshKnot( float radius, float size, int radSeg, int sides )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshKnot( float radius, float size, int radSeg, int sides )" ); lua_pushinteger( L, -1 ); return 1; } @@ -903,7 +903,7 @@ int lmodelsGenMeshKnot( lua_State *L ) { } /* -> mesh = RL_GenMeshHeightmap( Image heightmap, Vector3 size ) +> mesh = RL.GenMeshHeightmap( Image heightmap, Vector3 size ) Generate heightmap mesh from image data @@ -912,7 +912,7 @@ Generate heightmap mesh from image data */ int lmodelsGenMeshHeightmap( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshHeightmap( Image heightmap, Vector3 size )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshHeightmap( Image heightmap, Vector3 size )" ); lua_pushinteger( L, -1 ); return 1; } @@ -935,7 +935,7 @@ int lmodelsGenMeshHeightmap( lua_State *L ) { } /* -> mesh = RL_GenMeshCustom( Mesh{}, bool dynamic ) +> mesh = RL.GenMeshCustom( Mesh{} mesh, bool dynamic ) Generate custom mesh from vertex attribute data and uploads it into a VAO ( if supported ) and VBO @@ -944,7 +944,7 @@ Generate custom mesh from vertex attribute data and uploads it into a VAO ( if s */ int lmodelsGenMeshCustom( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isboolean( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshCustom( Mesh{}, bool dynamic )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshCustom( Mesh{} mesh, bool dynamic )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1102,7 +1102,7 @@ int lmodelsGenMeshCustom( lua_State *L ) { } /* -> success = RL_UpdateMesh( Mesh{} ) +> success = RL.UpdateMesh( Mesh{} mesh ) Update mesh vertex data in GPU. Note! Mainly intented to be used with custom meshes. @@ -1112,7 +1112,7 @@ Note! Mainly intented to be used with custom meshes. */ int lmodelsUpdateMesh( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UpdateMesh( Mesh{} )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateMesh( Mesh{} mesh )" ); lua_pushboolean( L, false ); return 1; } @@ -1241,7 +1241,7 @@ int lmodelsUpdateMesh( lua_State *L ) { } /* -> success = RL_UnloadMesh( Mesh mesh ) +> success = RL.UnloadMesh( Mesh mesh ) Unload mesh data from CPU and GPU @@ -1250,7 +1250,7 @@ Unload mesh data from CPU and GPU */ int lmodelsUnloadMesh( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadMesh( Mesh mesh )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadMesh( Mesh mesh )" ); lua_pushboolean( L, false ); return 1; } @@ -1268,7 +1268,7 @@ int lmodelsUnloadMesh( lua_State *L ) { } /* -> success = RL_DrawMesh( Mesh mesh, Material material, Matrix transform ) +> success = RL.DrawMesh( Mesh mesh, Material material, Matrix transform ) Draw a 3d mesh with material and transform @@ -1277,7 +1277,7 @@ Draw a 3d mesh with material and transform */ int lmodelsDrawMesh( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawMesh( Mesh mesh, Material material, Matrix transform )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawMesh( Mesh mesh, Material material, Matrix transform )" ); lua_pushboolean( L, false ); return 1; } @@ -1299,7 +1299,7 @@ int lmodelsDrawMesh( lua_State *L ) { } /* -> success = RL_DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances ) +> success = RL.DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances ) Draw multiple mesh instances with material and different transforms @@ -1308,7 +1308,7 @@ Draw multiple mesh instances with material and different transforms */ int lmodelsDrawMeshInstanced( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances )" ); lua_pushboolean( L, false ); return 1; } @@ -1342,7 +1342,7 @@ int lmodelsDrawMeshInstanced( lua_State *L ) { } /* -> success = RL_SetMeshColor( Mesh mesh, Color color ) +> success = RL.SetMeshColor( Mesh mesh, Color color ) Updades mesh color vertex attribute buffer NOTE: Currently only works on custom mesh @@ -1352,7 +1352,7 @@ NOTE: Currently only works on custom mesh */ int lmodelsSetMeshColor( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMeshColor( Mesh mesh, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMeshColor( Mesh mesh, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1388,7 +1388,7 @@ int lmodelsSetMeshColor( lua_State *L ) { } /* -> success = RL_ExportMesh( Mesh mesh, string fileName ) +> success = RL.ExportMesh( Mesh mesh, string fileName ) Export mesh data to file, returns true on success @@ -1397,7 +1397,7 @@ Export mesh data to file, returns true on success */ int lmodelsExportMesh( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ExportMesh( Mesh mesh, string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportMesh( Mesh mesh, string fileName )" ); lua_pushboolean( L, false ); return 1; } @@ -1413,7 +1413,7 @@ int lmodelsExportMesh( lua_State *L ) { } /* -> boundingBox = RL_GetMeshBoundingBox( Mesh mesh ) +> boundingBox = RL.GetMeshBoundingBox( Mesh mesh ) Compute mesh bounding box limits @@ -1422,7 +1422,7 @@ Compute mesh bounding box limits */ int lmodelsGetMeshBoundingBox( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetMeshBoundingBox( Mesh mesh )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMeshBoundingBox( Mesh mesh )" ); lua_pushboolean( L, false ); return 1; } @@ -1438,7 +1438,7 @@ int lmodelsGetMeshBoundingBox( lua_State *L ) { } /* -> success = RL_GenMeshTangents( Mesh mesh ) +> success = RL.GenMeshTangents( Mesh mesh ) Compute mesh tangents @@ -1447,7 +1447,7 @@ Compute mesh tangents */ int lmodelsGenMeshTangents( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenMeshTangents( Mesh mesh )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshTangents( Mesh mesh )" ); lua_pushboolean( L, false ); return 1; } @@ -1468,7 +1468,7 @@ int lmodelsGenMeshTangents( lua_State *L ) { */ /* -> material = RL_LoadMaterialDefault() +> material = RL.LoadMaterialDefault() Load default material @@ -1491,7 +1491,7 @@ int lmodelsLoadMaterialDefault( lua_State *L ) { } /* -> material = RL_CreateMaterial( material{} ) +> material = RL.CreateMaterial( Material{} material ) Load material from table. See material table definition @@ -1500,7 +1500,7 @@ Load material from table. See material table definition */ int lmodelsCreateMaterial( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CreateMaterial( material{} )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CreateMaterial( Material{} material )" ); lua_pushboolean( L, false ); return 1; } @@ -1592,7 +1592,7 @@ int lmodelsCreateMaterial( lua_State *L ) { } /* -> success = RL_UnloadMaterial( Material material ) +> success = RL.UnloadMaterial( Material material ) Unload material from GPU memory ( VRAM ) @@ -1601,7 +1601,7 @@ Unload material from GPU memory ( VRAM ) */ int lmodelsUnloadMaterial( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadMaterial( Material material )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadMaterial( Material material )" ); lua_pushboolean( L, false ); return 1; } @@ -1619,7 +1619,7 @@ int lmodelsUnloadMaterial( lua_State *L ) { } /* -> success = RL_SetMaterialTexture( Material material, int mapType, Texture2D texture ) +> success = RL.SetMaterialTexture( Material material, int mapType, Texture2D texture ) Set texture for a material map type ( MATERIAL_MAP_ALBEDO, MATERIAL_MAP_METALNESS... ) @@ -1628,7 +1628,7 @@ Set texture for a material map type ( MATERIAL_MAP_ALBEDO, MATERIAL_MAP_METALNES */ int lmodelsSetMaterialTexture( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMaterialTexture( Material material, int mapType, Texture2D texture )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMaterialTexture( Material material, int mapType, Texture2D texture )" ); lua_pushboolean( L, false ); return 1; } @@ -1647,7 +1647,7 @@ int lmodelsSetMaterialTexture( lua_State *L ) { } /* -> success = RL_SetMaterialColor( Material material, int mapType, Color color ) +> success = RL.SetMaterialColor( Material material, int mapType, Color color ) Set color for a material map type @@ -1656,7 +1656,7 @@ Set color for a material map type */ int lmodelsSetMaterialColor( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMaterialColor( Material material, int mapType, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMaterialColor( Material material, int mapType, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1678,7 +1678,7 @@ int lmodelsSetMaterialColor( lua_State *L ) { } /* -> success = RL_SetMaterialValue( Material material, int mapType, float value ) +> success = RL.SetMaterialValue( Material material, int mapType, float value ) Set value for a material map type @@ -1687,7 +1687,7 @@ Set value for a material map type */ int lmodelsSetMaterialValue( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMaterialValue( Material material, int mapType, float value )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMaterialValue( Material material, int mapType, float value )" ); lua_pushboolean( L, false ); return 1; } @@ -1709,7 +1709,7 @@ int lmodelsSetMaterialValue( lua_State *L ) { } /* -> success = RL_SetMaterialShader( Material material, Shader shader ) +> success = RL.SetMaterialShader( Material material, Shader shader ) Set shader for material @@ -1718,7 +1718,7 @@ Set shader for material */ int lmodelsSetMaterialShader( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetMaterialShader( Material material, Shader shader )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMaterialShader( Material material, Shader shader )" ); lua_pushboolean( L, false ); return 1; } @@ -1742,7 +1742,7 @@ int lmodelsSetMaterialShader( lua_State *L ) { */ /* -> model = RL_LoadModel( string fileName ) +> model = RL.LoadModel( string fileName ) Load model from files ( Meshes and materials ) @@ -1751,7 +1751,7 @@ Load model from files ( Meshes and materials ) */ int lmodelsLoadModel( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadModel( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadModel( string fileName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1771,7 +1771,7 @@ int lmodelsLoadModel( lua_State *L ) { } /* -> model = RL_LoadModelFromMesh( Mesh mesh ) +> model = RL.LoadModelFromMesh( Mesh mesh ) Load model from generated mesh ( Default material ) @@ -1780,7 +1780,7 @@ Load model from generated mesh ( Default material ) */ int lmodelsLoadModelFromMesh( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadModelFromMesh( Mesh mesh )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadModelFromMesh( Mesh mesh )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1806,7 +1806,7 @@ int lmodelsLoadModelFromMesh( lua_State *L ) { } /* -> success = RL_UnloadModel( Model model ) +> success = RL.UnloadModel( Model model ) Unload model ( Including meshes ) from memory ( RAM and/or VRAM ) @@ -1815,7 +1815,7 @@ Unload model ( Including meshes ) from memory ( RAM and/or VRAM ) */ int lmodelsUnloadModel( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadModel( Model model )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadModel( Model model )" ); lua_pushboolean( L, false ); return 1; } @@ -1833,7 +1833,7 @@ int lmodelsUnloadModel( lua_State *L ) { } /* -> success = RL_DrawModel( Model model, Vector3 position, float scale, Color tint ) +> success = RL.DrawModel( Model model, Vector3 position, float scale, Color tint ) Draw a model ( With texture if set ) @@ -1842,7 +1842,7 @@ Draw a model ( With texture if set ) */ int lmodelsDrawModel( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawModel( Model model, Vector3 position, float scale, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawModel( Model model, Vector3 position, float scale, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -1866,7 +1866,7 @@ int lmodelsDrawModel( lua_State *L ) { } /* -> success = RL_DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint ) +> success = RL.DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint ) Draw a model with extended parameters @@ -1876,7 +1876,7 @@ Draw a model with extended parameters int lmodelsDrawModelEx( lua_State *L ) { if ( !lua_isnumber( L, -6 ) || !lua_istable( L, -5 ) || !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -1904,7 +1904,7 @@ int lmodelsDrawModelEx( lua_State *L ) { } /* -> success = RL_SetModelMaterial( Model model, Material modelMaterial, Material material ) +> success = RL.SetModelMaterial( Model model, Material modelMaterial, Material material ) Copies material to model material. ( Model material is the material id in models. Material can be deleted if not used elsewhere ) @@ -1913,7 +1913,7 @@ Copies material to model material. ( Model material is the material id in models */ int lmodelsSetModelMaterial( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetModelMaterial( Model model, Material modelMaterial, Material material )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetModelMaterial( Model model, Material modelMaterial, Material material )" ); lua_pushboolean( L, false ); return 1; } @@ -1952,7 +1952,7 @@ int lmodelsSetModelMaterial( lua_State *L ) { } /* -> success = RL_SetModelMeshMaterial( Model model, int meshId, int materialId ) +> success = RL.SetModelMeshMaterial( Model model, int meshId, int materialId ) Set material for a mesh ( Mesh and material on this model ) @@ -1961,7 +1961,7 @@ Set material for a mesh ( Mesh and material on this model ) */ int lmodelsSetModelMeshMaterial( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetModelMeshMaterial( Model model, int meshId, int materialId )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetModelMeshMaterial( Model model, int meshId, int materialId )" ); lua_pushboolean( L, false ); return 1; } @@ -1981,7 +1981,7 @@ int lmodelsSetModelMeshMaterial( lua_State *L ) { } /* -> success = RL_DrawBillboard( Camera camera, Texture2D texture, Vector3 position, float size, Color tint ) +> success = RL.DrawBillboard( Camera camera, Texture2D texture, Vector3 position, float size, Color tint ) Draw a billboard texture @@ -1991,7 +1991,7 @@ Draw a billboard texture int lmodelsDrawBillboard( lua_State *L ) { if ( !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawBillboard( Camera camera, Texture2D texture, Vector3 position, float size, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawBillboard( Camera camera, Texture2D texture, Vector3 position, float size, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -2016,7 +2016,7 @@ int lmodelsDrawBillboard( lua_State *L ) { } /* -> success = RL_DrawBillboardRec( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint ) +> success = RL.DrawBillboardRec( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint ) Draw a billboard texture defined by source @@ -2026,7 +2026,7 @@ Draw a billboard texture defined by source int lmodelsDrawBillboardRec( lua_State *L ) { if ( !lua_isnumber( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawBillboardRec( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawBillboardRec( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -2053,7 +2053,7 @@ int lmodelsDrawBillboardRec( lua_State *L ) { } /* -> success = RL_SetModelTransform( Model model, Matrix transform ) +> success = RL.SetModelTransform( Model model, Matrix transform ) Set model transform matrix @@ -2062,7 +2062,7 @@ Set model transform matrix */ int lmodelsSetModelTransform( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetModelTransform( Model model, Matrix transform )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetModelTransform( Model model, Matrix transform )" ); lua_pushboolean( L, false ); return 1; } @@ -2081,7 +2081,7 @@ int lmodelsSetModelTransform( lua_State *L ) { } /* -> transform = RL_GetModelTransform( Model model ) +> transform = RL.GetModelTransform( Model model ) Get model transform matrix @@ -2090,7 +2090,7 @@ Get model transform matrix */ int lmodelsGetModelTransform( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetModelTransform( Model model )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetModelTransform( Model model )" ); lua_pushboolean( L, false ); return 1; } @@ -2110,7 +2110,7 @@ int lmodelsGetModelTransform( lua_State *L ) { */ /* -> animations, animationCount = RL_LoadModelAnimations( string fileName ) +> animations, animationCount = RL.LoadModelAnimations( string fileName ) Load model animations from file @@ -2119,7 +2119,7 @@ Load model animations from file */ int lmodelsLoadModelAnimations( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadModelAnimations( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadModelAnimations( string fileName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -2141,7 +2141,7 @@ int lmodelsLoadModelAnimations( lua_State *L ) { } /* -> success = RL_UpdateModelAnimation( Model model, ModelAnimations animations, int animation, int frame ) +> success = RL.UpdateModelAnimation( Model model, ModelAnimations animations, int animation, int frame ) Update model animation pose @@ -2150,7 +2150,7 @@ Update model animation pose */ int lmodelsUpdateModelAnimation( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UpdateModelAnimation( Model model, ModelAnimations animations, int animation, int frame )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateModelAnimation( Model model, ModelAnimations animations, int animation, int frame )" ); lua_pushboolean( L, false ); return 1; } @@ -2169,7 +2169,7 @@ int lmodelsUpdateModelAnimation( lua_State *L ) { } /* -> success = RL_UnloadModelAnimations( ModelAnimations animations ) +> success = RL.UnloadModelAnimations( ModelAnimations animations ) Unload animation data @@ -2178,7 +2178,7 @@ Unload animation data */ int lmodelsUnloadModelAnimations( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadModelAnimations( ModelAnimations animations )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadModelAnimations( ModelAnimations animations )" ); lua_pushboolean( L, false ); return 1; } @@ -2198,7 +2198,7 @@ int lmodelsUnloadModelAnimations( lua_State *L ) { } /* -> valid = RL_IsModelAnimationValid( Model model, ModelAnimations animations ) +> valid = RL.IsModelAnimationValid( Model model, ModelAnimations animations ) Check model animation skeleton match @@ -2207,7 +2207,7 @@ Check model animation skeleton match */ int lmodelsIsModelAnimationValid( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_IsModelAnimationValid( Model model, ModelAnimations animations )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsModelAnimationValid( Model model, ModelAnimations animations )" ); lua_pushnil( L ); return 1; } @@ -2224,7 +2224,7 @@ int lmodelsIsModelAnimationValid( lua_State *L ) { } /* -> boneCount = RL_GetModelAnimationBoneCount( ModelAnimations animations, int animation ) +> boneCount = RL.GetModelAnimationBoneCount( ModelAnimations animations, int animation ) Return modelAnimation bone count @@ -2233,7 +2233,7 @@ Return modelAnimation bone count */ int lmodelsGetModelAnimationBoneCount( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetModelAnimationBoneCount( ModelAnimations animations, int animation )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetModelAnimationBoneCount( ModelAnimations animations, int animation )" ); lua_pushboolean( L, false ); return 1; } @@ -2249,7 +2249,7 @@ int lmodelsGetModelAnimationBoneCount( lua_State *L ) { } /* -> frameCount = RL_GetModelAnimationFrameCount( ModelAnimations animations, int animation ) +> frameCount = RL.GetModelAnimationFrameCount( ModelAnimations animations, int animation ) Return modelAnimation frame count @@ -2258,7 +2258,7 @@ Return modelAnimation frame count */ int lmodelsGetModelAnimationFrameCount( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetModelAnimationFrameCount( ModelAnimations animations, int animation )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetModelAnimationFrameCount( ModelAnimations animations, int animation )" ); lua_pushboolean( L, false ); return 1; } @@ -2278,7 +2278,7 @@ int lmodelsGetModelAnimationFrameCount( lua_State *L ) { */ /* -> collision = RL_CheckCollisionSpheres( Vector3 center1, float radius1, Vector3 center2, float radius2 ) +> collision = RL.CheckCollisionSpheres( Vector3 center1, float radius1, Vector3 center2, float radius2 ) Check collision between two spheres @@ -2287,7 +2287,7 @@ Check collision between two spheres */ int lmodelsCheckCollisionSpheres( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionSpheres( Vector3 center1, float radius1, Vector3 center2, float radius2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionSpheres( Vector3 center1, float radius1, Vector3 center2, float radius2 )" ); lua_pushnil( L ); return 1; } @@ -2305,7 +2305,7 @@ int lmodelsCheckCollisionSpheres( lua_State *L ) { } /* -> collision = RL_CheckCollisionBoxes( BoundingBox box1, BoundingBox box2 ) +> collision = RL.CheckCollisionBoxes( BoundingBox box1, BoundingBox box2 ) Check collision between two bounding boxes @@ -2314,7 +2314,7 @@ Check collision between two bounding boxes */ int lmodelsCheckCollisionBoxes( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionBoxes( BoundingBox box1, BoundingBox box2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionBoxes( BoundingBox box1, BoundingBox box2 )" ); lua_pushnil( L ); return 1; } @@ -2328,7 +2328,7 @@ int lmodelsCheckCollisionBoxes( lua_State *L ) { } /* -> collision = RL_CheckCollisionBoxSphere( BoundingBox box, Vector3 center, float radius ) +> collision = RL.CheckCollisionBoxSphere( BoundingBox box, Vector3 center, float radius ) Check collision between box and sphere @@ -2337,7 +2337,7 @@ Check collision between box and sphere */ int lmodelsCheckCollisionBoxSphere( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionBoxSphere( BoundingBox box, Vector3 center, float radius )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionBoxSphere( BoundingBox box, Vector3 center, float radius )" ); lua_pushnil( L ); return 1; } @@ -2353,7 +2353,7 @@ int lmodelsCheckCollisionBoxSphere( lua_State *L ) { } /* -> rayCollision = RL_GetRayCollisionSphere( Ray ray, Vector3 center, float radius ) +> rayCollision = RL.GetRayCollisionSphere( Ray ray, Vector3 center, float radius ) Get collision info between ray and sphere. ( RayCollision is Lua table of { hit, distance, point, normal } ) @@ -2362,7 +2362,7 @@ Get collision info between ray and sphere. ( RayCollision is Lua table of { hit, */ int lmodelsGetRayCollisionSphere( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetRayCollisionSphere( Ray ray, Vector3 center, float radius )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionSphere( Ray ray, Vector3 center, float radius )" ); lua_pushnil( L ); return 1; } @@ -2378,7 +2378,7 @@ int lmodelsGetRayCollisionSphere( lua_State *L ) { } /* -> rayCollision = RL_GetRayCollisionBox( Ray ray, BoundingBox box ) +> rayCollision = RL.GetRayCollisionBox( Ray ray, BoundingBox box ) Get collision info between ray and box @@ -2387,7 +2387,7 @@ Get collision info between ray and box */ int lmodelsGetRayCollisionBox( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetRayCollisionBox( Ray ray, BoundingBox box )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionBox( Ray ray, BoundingBox box )" ); lua_pushnil( L ); return 1; } @@ -2401,7 +2401,7 @@ int lmodelsGetRayCollisionBox( lua_State *L ) { } /* -> rayCollision = RL_GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform ) +> rayCollision = RL.GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform ) Get collision info between ray and mesh @@ -2410,10 +2410,11 @@ Get collision info between ray and mesh */ int lmodelsGetRayCollisionMesh( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform )" ); lua_pushnil( L ); return 1; } + // Matrix transform = MatrixIdentity(); Matrix transform = uluaGetMatrix( L ); lua_pop( L, 1 ); size_t meshId = lua_tointeger( L, -1 ); @@ -2424,13 +2425,13 @@ int lmodelsGetRayCollisionMesh( lua_State *L ) { lua_pushnil( L ); return 1; } - uluaPushRayCollision( L, GetRayCollisionMesh( ray, *state->meshes[ meshId ], transform ) ); + // uluaPushRayCollision( L, GetRayCollisionMesh( ray, *state->meshes[ meshId ], transform ) ); return 1; } /* -> rayCollision = RL_GetRayCollisionTriangle( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3 ) +> rayCollision = RL.GetRayCollisionTriangle( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3 ) Get collision info between ray and triangle @@ -2439,7 +2440,7 @@ Get collision info between ray and triangle */ int lmodelsGetRayCollisionTriangle( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetRayCollisionTriangle( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionTriangle( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3 )" ); lua_pushnil( L ); return 1; } @@ -2457,7 +2458,7 @@ int lmodelsGetRayCollisionTriangle( lua_State *L ) { } /* -> rayCollision = RL_GetRayCollisionQuad( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4 ) +> rayCollision = RL.GetRayCollisionQuad( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4 ) Get collision info between ray and quad @@ -2467,7 +2468,7 @@ Get collision info between ray and quad int lmodelsGetRayCollisionQuad( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetRayCollisionQuad( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionQuad( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4 )" ); lua_pushnil( L ); return 1; } diff --git a/src/rgui.c b/src/rgui.c index 9b8502d..ee55067 100644 --- a/src/rgui.c +++ b/src/rgui.c @@ -11,7 +11,7 @@ */ /* -> RL_GuiEnable() +> RL.GuiEnable() Enable gui controls ( global state ) */ @@ -22,7 +22,7 @@ int lguiGuiEnable( lua_State *L ) { } /* -> RL_GuiDisable() +> RL.GuiDisable() Disable gui controls ( global state ) */ @@ -33,7 +33,7 @@ int lguiGuiDisable( lua_State *L ) { } /* -> RL_GuiLock() +> RL.GuiLock() Lock gui controls ( global state ) */ @@ -44,7 +44,7 @@ int lguiGuiLock( lua_State *L ) { } /* -> RL_GuiUnlock() +> RL.GuiUnlock() Unlock gui controls ( global state ) */ @@ -55,7 +55,7 @@ int lguiGuiUnlock( lua_State *L ) { } /* -> locked = RL_GuiIsLocked() +> locked = RL.GuiIsLocked() Check if gui is locked ( global state ) @@ -68,7 +68,7 @@ int lguiGuiIsLocked( lua_State *L ) { } /* -> success = RL_GuiFade( float alpha ) +> success = RL.GuiFade( float alpha ) Set gui controls alpha ( global state ), alpha goes from 0.0f to 1.0f @@ -77,7 +77,7 @@ Set gui controls alpha ( global state ), alpha goes from 0.0f to 1.0f */ int lguiGuiFade( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiFade( float alpha )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiFade( float alpha )" ); lua_pushboolean( L, false ); return 1; } @@ -88,7 +88,7 @@ int lguiGuiFade( lua_State *L ) { } /* -> success = RL_GuiSetState( int state ) +> success = RL.GuiSetState( int state ) Set gui state ( global state ) @@ -97,7 +97,7 @@ Set gui state ( global state ) */ int lguiGuiSetState( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiSetState( int state )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetState( int state )" ); lua_pushboolean( L, false ); return 1; } @@ -108,7 +108,7 @@ int lguiGuiSetState( lua_State *L ) { } /* -> state = RL_GuiGetState() +> state = RL.GuiGetState() Get gui state ( global state ) @@ -125,7 +125,7 @@ int lguiGuiGetState( lua_State *L ) { */ /* -> success = RL_GuiSetFont( Font font ) +> success = RL.GuiSetFont( Font font ) Set gui custom font ( Global state ) @@ -134,7 +134,7 @@ Set gui custom font ( Global state ) */ int lguiGuiSetFont( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiSetFont( Font font )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetFont( Font font )" ); lua_pushboolean( L, false ); return 1; } @@ -149,7 +149,7 @@ int lguiGuiSetFont( lua_State *L ) { */ /* -> success = RL_GuiSetStyle( int control, int property, int value ) +> success = RL.GuiSetStyle( int control, int property, int value ) Set one style property @@ -158,7 +158,7 @@ Set one style property */ int lguiGuiSetStyle( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiSetStyle( int control, int property, int value )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetStyle( int control, int property, int value )" ); lua_pushboolean( L, false ); return 1; } @@ -169,7 +169,7 @@ int lguiGuiSetStyle( lua_State *L ) { } /* -> value = RL_GuiGetStyle( int control, int property ) +> value = RL.GuiGetStyle( int control, int property ) Get one style property @@ -178,7 +178,7 @@ Get one style property */ int lguiGuiGetStyle( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiGetStyle( int control, int property )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiGetStyle( int control, int property )" ); lua_pushboolean( L, false ); return 1; } @@ -188,7 +188,7 @@ int lguiGuiGetStyle( lua_State *L ) { } /* -> success = RL_GuiLoadStyle( int control, int property ) +> success = RL.GuiLoadStyle( int control, int property ) Load style file over global style variable ( .rgs ) @@ -197,7 +197,7 @@ Load style file over global style variable ( .rgs ) */ int lguiGuiLoadStyle( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiLoadStyle( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiLoadStyle( string fileName )" ); lua_pushboolean( L, false ); return 1; } @@ -208,7 +208,7 @@ int lguiGuiLoadStyle( lua_State *L ) { } /* -> RL_GuiLoadStyleDefault() +> RL.GuiLoadStyleDefault() Load style default over global style */ @@ -223,7 +223,7 @@ int lguiGuiLoadStyleDefault( lua_State *L ) { */ /* -> state = RL_GuiWindowBox( Rectangle bounds, string title ) +> state = RL.GuiWindowBox( Rectangle bounds, string title ) Window Box control, shows a window that can be closed @@ -232,7 +232,7 @@ Window Box control, shows a window that can be closed */ int lguiGuiWindowBox( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiWindowBox( Rectangle bounds, string title )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiWindowBox( Rectangle bounds, string title )" ); lua_pushnil( L ); return 1; } @@ -247,7 +247,7 @@ int lguiGuiWindowBox( lua_State *L ) { } /* -> success = RL_GuiGroupBox( Rectangle bounds, string text ) +> success = RL.GuiGroupBox( Rectangle bounds, string text ) Group Box control with text name @@ -256,7 +256,7 @@ Group Box control with text name */ int lguiGuiGroupBox( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiGroupBox( Rectangle bounds, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiGroupBox( Rectangle bounds, string text )" ); lua_pushboolean( L, false ); return 1; } @@ -272,7 +272,7 @@ int lguiGuiGroupBox( lua_State *L ) { } /* -> success = RL_GuiLine( Rectangle bounds, string text ) +> success = RL.GuiLine( Rectangle bounds, string text ) Line separator control, could contain text @@ -281,7 +281,7 @@ Line separator control, could contain text */ int lguiGuiLine( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiLine( Rectangle bounds, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiLine( Rectangle bounds, string text )" ); lua_pushboolean( L, false ); return 1; } @@ -297,7 +297,7 @@ int lguiGuiLine( lua_State *L ) { } /* -> success = RL_GuiPanel( Rectangle bounds, string text ) +> success = RL.GuiPanel( Rectangle bounds, string text ) Panel control, useful to group controls @@ -306,7 +306,7 @@ Panel control, useful to group controls */ int lguiGuiPanel( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiPanel( Rectangle bounds, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiPanel( Rectangle bounds, string text )" ); lua_pushboolean( L, false ); return 1; } @@ -322,7 +322,7 @@ int lguiGuiPanel( lua_State *L ) { } /* -> view, scroll = RL_GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll ) +> view, scroll = RL.GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll ) Scroll Panel control @@ -331,7 +331,7 @@ Scroll Panel control */ int lguiGuiScrollPanel( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isstring( L, -3 ) || lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll )" ); lua_pushboolean( L, false ); return 1; } @@ -355,7 +355,7 @@ int lguiGuiScrollPanel( lua_State *L ) { */ /* -> success = RL_GuiLabel( Rectangle bounds, string text ) +> success = RL.GuiLabel( Rectangle bounds, string text ) Label control, shows text @@ -364,7 +364,7 @@ Label control, shows text */ int lguiGuiLabel( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiLabel( Rectangle bounds, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiLabel( Rectangle bounds, string text )" ); lua_pushboolean( L, false ); return 1; } @@ -380,7 +380,7 @@ int lguiGuiLabel( lua_State *L ) { } /* -> clicked = RL_GuiButton( Rectangle bounds, string text ) +> clicked = RL.GuiButton( Rectangle bounds, string text ) Button control, returns true when clicked @@ -389,7 +389,7 @@ Button control, returns true when clicked */ int lguiGuiButton( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiButton( Rectangle bounds, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiButton( Rectangle bounds, string text )" ); lua_pushnil( L ); return 1; } @@ -404,7 +404,7 @@ int lguiGuiButton( lua_State *L ) { } /* -> clicked = RL_GuiLabelButton( Rectangle bounds, string text ) +> clicked = RL.GuiLabelButton( Rectangle bounds, string text ) Label button control, show true when clicked @@ -413,7 +413,7 @@ Label button control, show true when clicked */ int lguiGuiLabelButton( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiLabelButton( Rectangle bounds, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiLabelButton( Rectangle bounds, string text )" ); lua_pushnil( L ); return 1; } @@ -428,7 +428,7 @@ int lguiGuiLabelButton( lua_State *L ) { } /* -> active = RL_GuiToggle( Rectangle bounds, string text, bool active ) +> active = RL.GuiToggle( Rectangle bounds, string text, bool active ) Toggle Button control, returns true when active @@ -437,7 +437,7 @@ Toggle Button control, returns true when active */ int lguiGuiToggle( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isstring( L, -2 ) || !lua_isboolean( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiToggle( Rectangle bounds, string text, bool active )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiToggle( Rectangle bounds, string text, bool active )" ); lua_pushnil( L ); return 1; } @@ -454,7 +454,7 @@ int lguiGuiToggle( lua_State *L ) { } /* -> index = RL_GuiToggleGroup( Rectangle bounds, string text, int active ) +> index = RL.GuiToggleGroup( Rectangle bounds, string text, int active ) Toggle Group control, returns active toggle index @@ -463,7 +463,7 @@ Toggle Group control, returns active toggle index */ int lguiGuiToggleGroup( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isstring( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiToggleGroup( Rectangle bounds, string text, bool active )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiToggleGroup( Rectangle bounds, string text, bool active )" ); lua_pushboolean( L, false ); return 1; } @@ -480,7 +480,7 @@ int lguiGuiToggleGroup( lua_State *L ) { } /* -> active = RL_GuiCheckBox( Rectangle bounds, string text, bool checked ) +> active = RL.GuiCheckBox( Rectangle bounds, string text, bool checked ) Check Box control, returns true when active @@ -489,7 +489,7 @@ Check Box control, returns true when active */ int lguiGuiCheckBox( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isstring( L, -2 ) || !lua_isboolean( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiCheckBox( Rectangle bounds, string text, bool checked )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiCheckBox( Rectangle bounds, string text, bool checked )" ); lua_pushnil( L ); return 1; } @@ -506,7 +506,7 @@ int lguiGuiCheckBox( lua_State *L ) { } /* -> active = RL_GuiComboBox( Rectangle bounds, string text, int active ) +> active = RL.GuiComboBox( Rectangle bounds, string text, int active ) Combo Box control, returns selected item index @@ -515,7 +515,7 @@ Combo Box control, returns selected item index */ int lguiGuiComboBox( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isstring( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiComboBox( Rectangle bounds, string text, int active )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiComboBox( Rectangle bounds, string text, int active )" ); lua_pushnil( L ); return 1; } @@ -532,7 +532,7 @@ int lguiGuiComboBox( lua_State *L ) { } /* -> pressed, text = RL_GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode ) +> pressed, text = RL.GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode ) Text Box control, updates input text @@ -541,7 +541,7 @@ Text Box control, updates input text */ int lguiGuiTextBox( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isstring( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isboolean( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode )" ); lua_pushnil( L ); return 1; } @@ -561,7 +561,7 @@ int lguiGuiTextBox( lua_State *L ) { } /* -> pressed, text = RL_GuiTextBoxMulti( Rectangle bounds, string text, int textSize, bool editMode ) +> pressed, text = RL.GuiTextBoxMulti( Rectangle bounds, string text, int textSize, bool editMode ) Text Box control with multiple lines @@ -570,7 +570,7 @@ Text Box control with multiple lines */ int lguiGuiTextBoxMulti( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isstring( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isboolean( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiTextBoxMulti( Rectangle bounds, string text, int textSize, bool editMode )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiTextBoxMulti( Rectangle bounds, string text, int textSize, bool editMode )" ); lua_pushnil( L ); return 1; } @@ -590,7 +590,7 @@ int lguiGuiTextBoxMulti( lua_State *L ) { } /* -> pressed, value = RL_GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode ) +> pressed, value = RL.GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode ) Spinner control, returns selected value @@ -600,7 +600,7 @@ Spinner control, returns selected value int lguiGuiSpinner( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isstring( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isboolean( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )" ); lua_pushnil( L ); return 1; } @@ -624,7 +624,7 @@ int lguiGuiSpinner( lua_State *L ) { } /* -> pressed, value = RL_GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode ) +> pressed, value = RL.GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode ) Value Box control, updates input text with numbers @@ -634,7 +634,7 @@ Value Box control, updates input text with numbers int lguiGuiValueBox( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isstring( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isboolean( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )" ); lua_pushnil( L ); return 1; } @@ -658,7 +658,7 @@ int lguiGuiValueBox( lua_State *L ) { } /* -> value = RL_GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) +> value = RL.GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) Slider control, returns selected value @@ -668,7 +668,7 @@ Slider control, returns selected value int lguiGuiSlider( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isstring( L, -5 ) || !lua_isstring( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" ); lua_pushnil( L ); return 1; } @@ -692,7 +692,7 @@ int lguiGuiSlider( lua_State *L ) { } /* -> value = RL_GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) +> value = RL.GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) Slider Bar control, returns selected value @@ -702,7 +702,7 @@ Slider Bar control, returns selected value int lguiGuiSliderBar( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isstring( L, -5 ) || !lua_isstring( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" ); lua_pushnil( L ); return 1; } @@ -726,7 +726,7 @@ int lguiGuiSliderBar( lua_State *L ) { } /* -> value = RL_GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) +> value = RL.GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue ) Progress Bar control, shows current progress value @@ -736,7 +736,7 @@ Progress Bar control, shows current progress value int lguiGuiProgressBar( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isstring( L, -5 ) || !lua_isstring( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" ); lua_pushnil( L ); return 1; } @@ -760,7 +760,7 @@ int lguiGuiProgressBar( lua_State *L ) { } /* -> value = RL_GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue ) +> value = RL.GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue ) Scroll Bar control @@ -769,7 +769,7 @@ Scroll Bar control */ int lguiGuiScrollBar( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue )" ); lua_pushnil( L ); return 1; } @@ -787,7 +787,7 @@ int lguiGuiScrollBar( lua_State *L ) { } /* -> pressed, item = RL_GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode ) +> pressed, item = RL.GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode ) Dropdown Box control, returns selected item @@ -796,7 +796,7 @@ Dropdown Box control, returns selected item */ int lguiGuiDropdownBox( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isstring( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isboolean( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode )" ); lua_pushnil( L ); return 1; } @@ -816,7 +816,7 @@ int lguiGuiDropdownBox( lua_State *L ) { } /* -> success = RL_GuiStatusBar( Rectangle bounds, string text ) +> success = RL.GuiStatusBar( Rectangle bounds, string text ) Status Bar control, shows info text @@ -825,7 +825,7 @@ Status Bar control, shows info text */ int lguiGuiStatusBar( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiStatusBar( Rectangle bounds, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiStatusBar( Rectangle bounds, string text )" ); lua_pushboolean( L, false ); return 1; } @@ -841,7 +841,7 @@ int lguiGuiStatusBar( lua_State *L ) { } /* -> success = RL_GuiDummyRec( Rectangle bounds, string text ) +> success = RL.GuiDummyRec( Rectangle bounds, string text ) Dummy control for placeholders @@ -850,7 +850,7 @@ Dummy control for placeholders */ int lguiGuiDummyRec( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiDummyRec( Rectangle bounds, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiDummyRec( Rectangle bounds, string text )" ); lua_pushboolean( L, false ); return 1; } @@ -866,7 +866,7 @@ int lguiGuiDummyRec( lua_State *L ) { } /* -> cell = RL_GuiGrid( Rectangle bounds, string text, float spacing, int subdivs ) +> cell = RL.GuiGrid( Rectangle bounds, string text, float spacing, int subdivs ) Grid control, returns mouse cell position @@ -875,7 +875,7 @@ Grid control, returns mouse cell position */ int lguiGuiGrid( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isstring( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiGrid( Rectangle bounds, string text, float spacing, int subdivs )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiGrid( Rectangle bounds, string text, float spacing, int subdivs )" ); lua_pushboolean( L, false ); return 1; } @@ -898,7 +898,7 @@ int lguiGuiGrid( lua_State *L ) { */ /* -> itemIndex, scrollIndex = RL_GuiListView( Rectangle bounds, string text, int scrollIndex, int active ) +> itemIndex, scrollIndex = RL.GuiListView( Rectangle bounds, string text, int scrollIndex, int active ) List View control, returns selected list item index and scroll index @@ -907,7 +907,7 @@ List View control, returns selected list item index and scroll index */ int lguiGuiListView( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isstring( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiListView( Rectangle bounds, string text, int scrollIndex, int active )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiListView( Rectangle bounds, string text, int scrollIndex, int active )" ); lua_pushnil( L ); return 1; } @@ -927,7 +927,7 @@ int lguiGuiListView( lua_State *L ) { } /* -> itemIndex, scrollIndex, focus = RL_GuiListViewEx( Rectangle bounds, string text, int focus, int scrollIndex, int active ) +> itemIndex, scrollIndex, focus = RL.GuiListViewEx( Rectangle bounds, string text, int focus, int scrollIndex, int active ) List View with extended parameters, returns selected list item index, scroll index and focus @@ -937,7 +937,7 @@ List View with extended parameters, returns selected list item index, scroll ind int lguiGuiListViewEx( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_isstring( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiListViewEx( Rectangle bounds, string text, int focus, int scrollIndex, int active )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiListViewEx( Rectangle bounds, string text, int focus, int scrollIndex, int active )" ); lua_pushnil( L ); return 1; } @@ -960,7 +960,7 @@ int lguiGuiListViewEx( lua_State *L ) { } /* -> buttonIndex = RL_GuiMessageBox( Rectangle bounds, string title, string message, string buttons ) +> buttonIndex = RL.GuiMessageBox( Rectangle bounds, string title, string message, string buttons ) Message Box control, displays a message, returns button index ( 0 is x button ) @@ -969,7 +969,7 @@ Message Box control, displays a message, returns button index ( 0 is x button ) */ int lguiGuiMessageBox( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isstring( L, -3 ) || !lua_isstring( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiMessageBox( Rectangle bounds, string title, string message, string buttons )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiMessageBox( Rectangle bounds, string title, string message, string buttons )" ); lua_pushboolean( L, false ); return 1; } @@ -990,7 +990,7 @@ int lguiGuiMessageBox( lua_State *L ) { } /* -> buttonIndex, text, secretViewActive = RL_GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, int secretViewActive ) +> buttonIndex, text, secretViewActive = RL.GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, int secretViewActive ) Text Input Box control, ask for text, supports secret @@ -999,7 +999,7 @@ Text Input Box control, ask for text, supports secret */ int lguiGuiTextInputBox( lua_State *L ) { if ( !lua_istable( L, -7 ) || !lua_isstring( L, -6 ) || !lua_isstring( L, -5 ) || !lua_isstring( L, -4 ) || !lua_isstring( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, int secretViewActive )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, int secretViewActive )" ); lua_pushboolean( L, false ); return 1; } @@ -1029,7 +1029,7 @@ int lguiGuiTextInputBox( lua_State *L ) { } /* -> color = RL_GuiColorPicker( Rectangle bounds, string text, Color color ) +> color = RL.GuiColorPicker( Rectangle bounds, string text, Color color ) Color Picker control ( multiple color controls ) @@ -1038,7 +1038,7 @@ Color Picker control ( multiple color controls ) */ int lguiGuiColorPicker( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isstring( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiColorPicker( Rectangle bounds, string text, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiColorPicker( Rectangle bounds, string text, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1055,7 +1055,7 @@ int lguiGuiColorPicker( lua_State *L ) { } /* -> color = RL_GuiColorPanel( Rectangle bounds, string text, Color color ) +> color = RL.GuiColorPanel( Rectangle bounds, string text, Color color ) Color Panel control @@ -1064,7 +1064,7 @@ Color Panel control */ int lguiGuiColorPanel( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isstring( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiColorPanel( Rectangle bounds, string text, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiColorPanel( Rectangle bounds, string text, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1081,7 +1081,7 @@ int lguiGuiColorPanel( lua_State *L ) { } /* -> alpha = RL_GuiColorBarAlpha( Rectangle bounds, string text, float alpha ) +> alpha = RL.GuiColorBarAlpha( Rectangle bounds, string text, float alpha ) Color Bar Alpha control @@ -1090,7 +1090,7 @@ Color Bar Alpha control */ int lguiGuiColorBarAlpha( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isstring( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiColorBarAlpha( Rectangle bounds, string text, float alpha )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiColorBarAlpha( Rectangle bounds, string text, float alpha )" ); lua_pushboolean( L, false ); return 1; } @@ -1107,7 +1107,7 @@ int lguiGuiColorBarAlpha( lua_State *L ) { } /* -> hue = RL_GuiColorBarHue( Rectangle bounds, string text, float value ) +> hue = RL.GuiColorBarHue( Rectangle bounds, string text, float value ) Color Bar Hue control @@ -1116,7 +1116,7 @@ Color Bar Hue control */ int lguiGuiColorBarHue( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isstring( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiColorBarHue( Rectangle bounds, string text, float value )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiColorBarHue( Rectangle bounds, string text, float value )" ); lua_pushboolean( L, false ); return 1; } @@ -1137,7 +1137,7 @@ int lguiGuiColorBarHue( lua_State *L ) { */ /* -> text = RL_GuiIconText( int iconId, string text ) +> text = RL.GuiIconText( int iconId, string text ) Get text with icon id prepended ( if supported ) @@ -1146,7 +1146,7 @@ Get text with icon id prepended ( if supported ) */ int lguiGuiIconText( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiIconText( int iconId, string text )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiIconText( int iconId, string text )" ); lua_pushboolean( L, false ); return 1; } @@ -1166,7 +1166,7 @@ int lguiGuiIconText( lua_State *L ) { } /* -> success = RL_GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color ) +> success = RL.GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color ) Draw icon @@ -1175,7 +1175,7 @@ Draw icon */ int lguiGuiDrawIcon( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1194,7 +1194,7 @@ int lguiGuiDrawIcon( lua_State *L ) { } /* -> success = RL_GuiSetIconScale( int scale ) +> success = RL.GuiSetIconScale( int scale ) Set icon scale ( 1 by default ) @@ -1203,7 +1203,7 @@ Set icon scale ( 1 by default ) */ int lguiGuiSetIconScale( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiSetIconScale( int scale )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetIconScale( int scale )" ); lua_pushboolean( L, false ); return 1; } @@ -1214,7 +1214,7 @@ int lguiGuiSetIconScale( lua_State *L ) { } /* -> success = RL_GuiSetIconPixel( int iconId, Vector2 pos ) +> success = RL.GuiSetIconPixel( int iconId, Vector2 pos ) Set icon pixel value @@ -1223,7 +1223,7 @@ Set icon pixel value */ int lguiGuiSetIconPixel( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiSetIconPixel( int iconId, Vector2 pos )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetIconPixel( int iconId, Vector2 pos )" ); lua_pushboolean( L, false ); return 1; } @@ -1238,7 +1238,7 @@ int lguiGuiSetIconPixel( lua_State *L ) { } /* -> success = RL_GuiClearIconPixel( int iconId, Vector2 pos ) +> success = RL.GuiClearIconPixel( int iconId, Vector2 pos ) Clear icon pixel value @@ -1247,7 +1247,7 @@ Clear icon pixel value */ int lguiGuiClearIconPixel( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiClearIconPixel( int iconId, Vector2 pos )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiClearIconPixel( int iconId, Vector2 pos )" ); lua_pushboolean( L, false ); return 1; } @@ -1262,7 +1262,7 @@ int lguiGuiClearIconPixel( lua_State *L ) { } /* -> value = RL_GuiCheckIconPixel( int iconId, Vector2 pos ) +> value = RL.GuiCheckIconPixel( int iconId, Vector2 pos ) Check icon pixel value @@ -1271,7 +1271,7 @@ Check icon pixel value */ int lguiGuiCheckIconPixel( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GuiCheckIconPixel( int iconId, Vector2 pos )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiCheckIconPixel( int iconId, Vector2 pos )" ); lua_pushnil( L ); return 1; } diff --git a/src/rlgl.c b/src/rlgl.c index 0ca3383..c025c01 100644 --- a/src/rlgl.c +++ b/src/rlgl.c @@ -8,7 +8,7 @@ */ /* -> success = RL_rlSetLineWidth( float width ) +> success = RL.rlSetLineWidth( float width ) Set the line drawing width @@ -17,7 +17,7 @@ Set the line drawing width */ int lrlglSetLineWidth( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_rlSetLineWidth( float width )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetLineWidth( float width )" ); lua_pushboolean( L, false ); return 1; } @@ -28,7 +28,7 @@ int lrlglSetLineWidth( lua_State *L ) { } /* -> width = RL_rlGetLineWidth() +> width = RL.rlGetLineWidth() Get the line drawing width diff --git a/src/rmath.c b/src/rmath.c index a83eac4..26054e4 100644 --- a/src/rmath.c +++ b/src/rmath.c @@ -16,7 +16,7 @@ inline int imax( int a, int b ) { */ /* -> result = RL_Clamp( float value, float min, float max ) +> result = RL.Clamp( float value, float min, float max ) Clamp float value @@ -25,7 +25,7 @@ Clamp float value */ int lmathClamp( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Clamp( float value, float min, float max )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Clamp( float value, float min, float max )" ); lua_pushboolean( L, false ); return 1; } @@ -39,7 +39,7 @@ int lmathClamp( lua_State *L ) { } /* -> result = RL_Lerp( float start, float end, float amount ) +> result = RL.Lerp( float start, float end, float amount ) Calculate linear interpolation between two floats @@ -48,7 +48,7 @@ Calculate linear interpolation between two floats */ int lmathLerp( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Lerp( float start, float end, float amount )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Lerp( float start, float end, float amount )" ); lua_pushboolean( L, false ); return 1; } @@ -62,7 +62,7 @@ int lmathLerp( lua_State *L ) { } /* -> result = RL_Normalize( float value, float start, float end ) +> result = RL.Normalize( float value, float start, float end ) Normalize input value within input range @@ -71,7 +71,7 @@ Normalize input value within input range */ int lmathNormalize( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Normalize( float value, float start, float end )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Normalize( float value, float start, float end )" ); lua_pushboolean( L, false ); return 1; } @@ -85,7 +85,7 @@ int lmathNormalize( lua_State *L ) { } /* -> result = RL_Remap( float value, float inputStart, float inputEnd, float outputStart, float outputEnd ) +> result = RL.Remap( float value, float inputStart, float inputEnd, float outputStart, float outputEnd ) Remap input value within input range to output range @@ -95,7 +95,7 @@ Remap input value within input range to output range int lmathRemap( lua_State *L ) { if ( !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Remap( float value, float inputStart, float inputEnd, float outputStart, float outputEnd )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Remap( float value, float inputStart, float inputEnd, float outputStart, float outputEnd )" ); lua_pushboolean( L, false ); return 1; } @@ -111,7 +111,7 @@ int lmathRemap( lua_State *L ) { } /* -> result = RL_Wrap( float value, float min, float max ) +> result = RL.Wrap( float value, float min, float max ) Wrap input value from min to max @@ -120,7 +120,7 @@ Wrap input value from min to max */ int lmathWrap( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Wrap( float value, float min, float max )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Wrap( float value, float min, float max )" ); lua_pushboolean( L, false ); return 1; } @@ -134,7 +134,7 @@ int lmathWrap( lua_State *L ) { } /* -> result = RL_FloatEquals( float x, float y ) +> result = RL.FloatEquals( float x, float y ) Check whether two given floats are almost equal @@ -143,7 +143,7 @@ Check whether two given floats are almost equal */ int lmathFloatEquals( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_FloatEquals( float x, float y )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.FloatEquals( float x, float y )" ); lua_pushboolean( L, false ); return 1; } @@ -160,7 +160,7 @@ int lmathFloatEquals( lua_State *L ) { */ /* -> result = RL_Vector2Zero() +> result = RL.Vector2Zero() Vector with components value 0.0f @@ -173,7 +173,7 @@ int lmathVector2Zero( lua_State *L ) { } /* -> result = RL_Vector2One() +> result = RL.Vector2One() Vector with components value 1.0f @@ -186,7 +186,7 @@ int lmathVector2One( lua_State *L ) { } /* -> result = RL_Vector2Add( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Add( Vector2 v1, Vector2 v2 ) Add two vectors (v1 + v2) @@ -195,7 +195,7 @@ Add two vectors (v1 + v2) */ int lmathVector2Add( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Add( Vector2 v1, Vector2 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Add( Vector2 v1, Vector2 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -209,7 +209,7 @@ int lmathVector2Add( lua_State *L ) { } /* -> result = RL_Vector2AddValue( Vector2 v, float add ) +> result = RL.Vector2AddValue( Vector2 v, float add ) Add vector and float value @@ -218,7 +218,7 @@ Add vector and float value */ int lmathVector2AddValue( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2AddValue( Vector2 v, float add )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2AddValue( Vector2 v, float add )" ); lua_pushboolean( L, false ); return 1; } @@ -232,7 +232,7 @@ int lmathVector2AddValue( lua_State *L ) { } /* -> result = RL_Vector2Subtract( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Subtract( Vector2 v1, Vector2 v2 ) Subtract two vectors (v1 - v2) @@ -241,7 +241,7 @@ Subtract two vectors (v1 - v2) */ int lmathVector2Subtract( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Subtract( Vector2 v1, Vector2 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Subtract( Vector2 v1, Vector2 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -255,7 +255,7 @@ int lmathVector2Subtract( lua_State *L ) { } /* -> result = RL_Vector2SubtractValue( Vector2 v, float sub ) +> result = RL.Vector2SubtractValue( Vector2 v, float sub ) Subtract vector by float value @@ -264,7 +264,7 @@ Subtract vector by float value */ int lmathVector2SubtractValue( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2SubtractValue( Vector2 v, float sub )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2SubtractValue( Vector2 v, float sub )" ); lua_pushboolean( L, false ); return 1; } @@ -278,7 +278,7 @@ int lmathVector2SubtractValue( lua_State *L ) { } /* -> result = RL_Vector2Length( vector2 v ) +> result = RL.Vector2Length( vector2 v ) Calculate vector length @@ -287,7 +287,7 @@ Calculate vector length */ int lmathVector2Length( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Length( vector2 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Length( vector2 v )" ); lua_pushboolean( L, false ); return 1; } @@ -299,7 +299,7 @@ int lmathVector2Length( lua_State *L ) { } /* -> result = RL_Vector2LengthSqr( vector2 v ) +> result = RL.Vector2LengthSqr( vector2 v ) Calculate vector square length @@ -308,7 +308,7 @@ Calculate vector square length */ int lmathVector2LengthSqr( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2LengthSqr( vector2 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2LengthSqr( vector2 v )" ); lua_pushboolean( L, false ); return 1; } @@ -320,7 +320,7 @@ int lmathVector2LengthSqr( lua_State *L ) { } /* -> result = RL_Vector2DotProduct( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2DotProduct( Vector2 v1, Vector2 v2 ) Calculate two vectors dot product @@ -329,7 +329,7 @@ Calculate two vectors dot product */ int lmathVector2DotProduct( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2DotProduct( Vector2 v1, Vector2 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2DotProduct( Vector2 v1, Vector2 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -343,7 +343,7 @@ int lmathVector2DotProduct( lua_State *L ) { } /* -> result = RL_Vector2Distance( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Distance( Vector2 v1, Vector2 v2 ) Calculate distance between two vectors @@ -352,7 +352,7 @@ Calculate distance between two vectors */ int lmathVector2Distance( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Distance( Vector2 v1, Vector2 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Distance( Vector2 v1, Vector2 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -366,7 +366,7 @@ int lmathVector2Distance( lua_State *L ) { } /* -> result = RL_Vector2DistanceSqr( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2DistanceSqr( Vector2 v1, Vector2 v2 ) Calculate square distance between two vectors @@ -375,7 +375,7 @@ Calculate square distance between two vectors */ int lmathVector2DistanceSqr( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2DistanceSqr( Vector2 v1, Vector2 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2DistanceSqr( Vector2 v1, Vector2 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -389,7 +389,7 @@ int lmathVector2DistanceSqr( lua_State *L ) { } /* -> result = RL_Vector2Angle( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Angle( Vector2 v1, Vector2 v2 ) Calculate angle from two vectors @@ -398,7 +398,7 @@ Calculate angle from two vectors */ int lmathVector2Angle( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Angle( Vector2 v1, Vector2 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Angle( Vector2 v1, Vector2 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -412,7 +412,7 @@ int lmathVector2Angle( lua_State *L ) { } /* -> result = RL_Vector2Scale( Vector2 v, float scale ) +> result = RL.Vector2Scale( Vector2 v, float scale ) Scale vector ( multiply by value ) @@ -421,7 +421,7 @@ Scale vector ( multiply by value ) */ int lmathVector2Scale( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Scale( Vector2 v, float scale )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Scale( Vector2 v, float scale )" ); lua_pushboolean( L, false ); return 1; } @@ -435,7 +435,7 @@ int lmathVector2Scale( lua_State *L ) { } /* -> result = RL_Vector2Multiply( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Multiply( Vector2 v1, Vector2 v2 ) Multiply vector by vector @@ -444,7 +444,7 @@ Multiply vector by vector */ int lmathVector2Multiply( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Multiply( Vector2 v1, Vector2 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Multiply( Vector2 v1, Vector2 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -458,7 +458,7 @@ int lmathVector2Multiply( lua_State *L ) { } /* -> result = RL_Vector2Negate( Vector2 v ) +> result = RL.Vector2Negate( Vector2 v ) Negate vector @@ -467,7 +467,7 @@ Negate vector */ int lmathVector2Negate( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Negate( Vector2 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Negate( Vector2 v )" ); lua_pushboolean( L, false ); return 1; } @@ -479,7 +479,7 @@ int lmathVector2Negate( lua_State *L ) { } /* -> result = RL_Vector2Divide( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Divide( Vector2 v1, Vector2 v2 ) Divide vector by vector @@ -488,7 +488,7 @@ Divide vector by vector */ int lmathVector2Divide( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Divide( Vector2 v1, Vector2 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Divide( Vector2 v1, Vector2 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -502,7 +502,7 @@ int lmathVector2Divide( lua_State *L ) { } /* -> result = RL_Vector2Normalize( Vector2 v ) +> result = RL.Vector2Normalize( Vector2 v ) Normalize provided vector @@ -511,7 +511,7 @@ Normalize provided vector */ int lmathVector2Normalize( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Normalize( Vector2 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Normalize( Vector2 v )" ); lua_pushboolean( L, false ); return 1; } @@ -523,7 +523,7 @@ int lmathVector2Normalize( lua_State *L ) { } /* -> result = RL_Vector2Transform( Vector2 v, Matrix mat ) +> result = RL.Vector2Transform( Vector2 v, Matrix mat ) Transforms a Vector2 by a given Matrix @@ -532,7 +532,7 @@ Transforms a Vector2 by a given Matrix */ int lmathVector2Transform( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Transform( Vector2 v, Matrix mat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Transform( Vector2 v, Matrix mat )" ); lua_pushboolean( L, false ); return 1; } @@ -546,7 +546,7 @@ int lmathVector2Transform( lua_State *L ) { } /* -> result = RL_Vector2Lerp( Vector2 v1, Vector2 v2, float amount ) +> result = RL.Vector2Lerp( Vector2 v1, Vector2 v2, float amount ) Calculate linear interpolation between two vectors @@ -555,7 +555,7 @@ Calculate linear interpolation between two vectors */ int lmathVector2Lerp( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Lerp( Vector2 v1, Vector2 v2, float amount )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Lerp( Vector2 v1, Vector2 v2, float amount )" ); lua_pushboolean( L, false ); return 1; } @@ -571,7 +571,7 @@ int lmathVector2Lerp( lua_State *L ) { } /* -> result = RL_Vector2Reflect( Vector2 v, Vector2 normal ) +> result = RL.Vector2Reflect( Vector2 v, Vector2 normal ) Calculate reflected vector to normal @@ -580,7 +580,7 @@ Calculate reflected vector to normal */ int lmathVector2Reflect( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Reflect( Vector2 v, Vector2 normal )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Reflect( Vector2 v, Vector2 normal )" ); lua_pushboolean( L, false ); return 1; } @@ -594,7 +594,7 @@ int lmathVector2Reflect( lua_State *L ) { } /* -> result = RL_Vector2Rotate( Vector2 v, float angle ) +> result = RL.Vector2Rotate( Vector2 v, float angle ) Rotate vector by angle @@ -603,7 +603,7 @@ Rotate vector by angle */ int lmathVector2Rotate( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Rotate( Vector2 v, float angle )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Rotate( Vector2 v, float angle )" ); lua_pushboolean( L, false ); return 1; } @@ -617,7 +617,7 @@ int lmathVector2Rotate( lua_State *L ) { } /* -> result = RL_Vector2MoveTowards( Vector2 v, Vector2 target, float maxDistance ) +> result = RL.Vector2MoveTowards( Vector2 v, Vector2 target, float maxDistance ) Move Vector towards target @@ -626,7 +626,7 @@ Move Vector towards target */ int lmathVector2MoveTowards( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2MoveTowards( Vector2 v, Vector2 target, float maxDistance )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2MoveTowards( Vector2 v, Vector2 target, float maxDistance )" ); lua_pushboolean( L, false ); return 1; } @@ -642,7 +642,7 @@ int lmathVector2MoveTowards( lua_State *L ) { } /* -> result = RL_Vector2Invert( Vector2 v ) +> result = RL.Vector2Invert( Vector2 v ) Invert the given vector @@ -651,7 +651,7 @@ Invert the given vector */ int lmathVector2Invert( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Invert( Vector2 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Invert( Vector2 v )" ); lua_pushboolean( L, false ); return 1; } @@ -663,7 +663,7 @@ int lmathVector2Invert( lua_State *L ) { } /* -> result = RL_Vector2Clamp( Vector2 v, Vector2 min, Vector2 max ) +> result = RL.Vector2Clamp( Vector2 v, Vector2 min, Vector2 max ) Clamp the components of the vector between min and max values specified by the given vectors @@ -673,7 +673,7 @@ min and max values specified by the given vectors */ int lmathVector2Clamp( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Clamp( Vector2 v, Vector2 min, Vector2 max )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Clamp( Vector2 v, Vector2 min, Vector2 max )" ); lua_pushboolean( L, false ); return 1; } @@ -689,7 +689,7 @@ int lmathVector2Clamp( lua_State *L ) { } /* -> result = RL_Vector2ClampValue( Vector2 v, float min, float max ) +> result = RL.Vector2ClampValue( Vector2 v, float min, float max ) Clamp the magnitude of the vector between two min and max values @@ -698,7 +698,7 @@ Clamp the magnitude of the vector between two min and max values */ int lmathVector2ClampValue( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2ClampValue( Vector2 v, float min, float max )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2ClampValue( Vector2 v, float min, float max )" ); lua_pushboolean( L, false ); return 1; } @@ -714,7 +714,7 @@ int lmathVector2ClampValue( lua_State *L ) { } /* -> result = RL_Vector2Equals( Vector2 v1, Vector2 v2 ) +> result = RL.Vector2Equals( Vector2 v1, Vector2 v2 ) Check whether two given vectors are almost equal @@ -723,7 +723,7 @@ Check whether two given vectors are almost equal */ int lmathVector2Equals( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector2Equals( Vector2 v1, Vector2 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Equals( Vector2 v1, Vector2 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -741,7 +741,7 @@ int lmathVector2Equals( lua_State *L ) { */ /* -> result = RL_Vector3Zero() +> result = RL.Vector3Zero() Vector with components value 0.0f @@ -754,7 +754,7 @@ int lmathVector3Zero( lua_State *L ) { } /* -> result = RL_Vector3One() +> result = RL.Vector3One() Vector with components value 1.0f @@ -767,7 +767,7 @@ int lmathVector3One( lua_State *L ) { } /* -> result = RL_Vector3Add( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Add( Vector3 v1, Vector3 v2 ) Add two vectors @@ -776,7 +776,7 @@ Add two vectors */ int lmathVector3Add( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Add( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Add( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -790,7 +790,7 @@ int lmathVector3Add( lua_State *L ) { } /* -> result = RL_Vector3AddValue( Vector3 v, float add ) +> result = RL.Vector3AddValue( Vector3 v, float add ) Add vector and float value @@ -799,7 +799,7 @@ Add vector and float value */ int lmathVector3AddValue( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3AddValue( Vector3 v, float add )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3AddValue( Vector3 v, float add )" ); lua_pushboolean( L, false ); return 1; } @@ -813,7 +813,7 @@ int lmathVector3AddValue( lua_State *L ) { } /* -> result = RL_Vector3Subtract( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Subtract( Vector3 v1, Vector3 v2 ) Subtract two vectors @@ -822,7 +822,7 @@ Subtract two vectors */ int lmathVector3Subtract( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Subtract( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Subtract( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -836,7 +836,7 @@ int lmathVector3Subtract( lua_State *L ) { } /* -> result = RL_Vector3SubtractValue( Vector3 v, float sub ) +> result = RL.Vector3SubtractValue( Vector3 v, float sub ) Subtract vector by float value @@ -845,7 +845,7 @@ Subtract vector by float value */ int lmathVector3SubtractValue( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3SubtractValue( Vector3 v, float sub )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3SubtractValue( Vector3 v, float sub )" ); lua_pushboolean( L, false ); return 1; } @@ -859,7 +859,7 @@ int lmathVector3SubtractValue( lua_State *L ) { } /* -> result = RL_Vector3Scale( Vector3 v, float scalar ) +> result = RL.Vector3Scale( Vector3 v, float scalar ) Multiply vector by scalar @@ -868,7 +868,7 @@ Multiply vector by scalar */ int lmathVector3Scale( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Scale( Vector3 v, float scalar )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Scale( Vector3 v, float scalar )" ); lua_pushboolean( L, false ); return 1; } @@ -882,7 +882,7 @@ int lmathVector3Scale( lua_State *L ) { } /* -> result = RL_Vector3Multiply( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Multiply( Vector3 v1, Vector3 v2 ) Multiply vector by vector @@ -891,7 +891,7 @@ Multiply vector by vector */ int lmathVector3Multiply( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Multiply( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Multiply( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -905,7 +905,7 @@ int lmathVector3Multiply( lua_State *L ) { } /* -> result = RL_Vector3CrossProduct( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3CrossProduct( Vector3 v1, Vector3 v2 ) Calculate two vectors cross product @@ -914,7 +914,7 @@ Calculate two vectors cross product */ int lmathVector3CrossProduct( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3CrossProduct( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3CrossProduct( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -928,7 +928,7 @@ int lmathVector3CrossProduct( lua_State *L ) { } /* -> result = RL_Vector3Perpendicular( Vector3 v ) +> result = RL.Vector3Perpendicular( Vector3 v ) Calculate one vector perpendicular vector @@ -937,7 +937,7 @@ Calculate one vector perpendicular vector */ int lmathVector3Perpendicular( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Perpendicular( Vector3 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Perpendicular( Vector3 v )" ); lua_pushboolean( L, false ); return 1; } @@ -949,7 +949,7 @@ int lmathVector3Perpendicular( lua_State *L ) { } /* -> result = RL_Vector3Length( Vector3 v ) +> result = RL.Vector3Length( Vector3 v ) Calculate vector length @@ -958,7 +958,7 @@ Calculate vector length */ int lmathVector3Length( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Length( Vector3 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Length( Vector3 v )" ); lua_pushboolean( L, false ); return 1; } @@ -970,7 +970,7 @@ int lmathVector3Length( lua_State *L ) { } /* -> result = RL_Vector3LengthSqr( Vector3 v ) +> result = RL.Vector3LengthSqr( Vector3 v ) Calculate vector square length @@ -979,7 +979,7 @@ Calculate vector square length */ int lmathVector3LengthSqr( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3LengthSqr( Vector3 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3LengthSqr( Vector3 v )" ); lua_pushboolean( L, false ); return 1; } @@ -991,7 +991,7 @@ int lmathVector3LengthSqr( lua_State *L ) { } /* -> result = RL_Vector3DotProduct( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3DotProduct( Vector3 v1, Vector3 v2 ) Calculate two vectors dot product @@ -1000,7 +1000,7 @@ Calculate two vectors dot product */ int lmathVector3DotProduct( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3DotProduct( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3DotProduct( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1014,7 +1014,7 @@ int lmathVector3DotProduct( lua_State *L ) { } /* -> result = RL_Vector3Distance( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Distance( Vector3 v1, Vector3 v2 ) Calculate distance between two vectors @@ -1023,7 +1023,7 @@ Calculate distance between two vectors */ int lmathVector3Distance( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Distance( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Distance( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1037,7 +1037,7 @@ int lmathVector3Distance( lua_State *L ) { } /* -> result = RL_Vector3DistanceSqr( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3DistanceSqr( Vector3 v1, Vector3 v2 ) Calculate square distance between two vectors @@ -1046,7 +1046,7 @@ Calculate square distance between two vectors */ int lmathVector3DistanceSqr( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3DistanceSqr( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3DistanceSqr( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1060,7 +1060,7 @@ int lmathVector3DistanceSqr( lua_State *L ) { } /* -> result = RL_Vector3Angle( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Angle( Vector3 v1, Vector3 v2 ) Calculate angle between two vectors @@ -1069,7 +1069,7 @@ Calculate angle between two vectors */ int lmathVector3Angle( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Angle( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Angle( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1083,7 +1083,7 @@ int lmathVector3Angle( lua_State *L ) { } /* -> result = RL_Vector3Negate( Vector3 v ) +> result = RL.Vector3Negate( Vector3 v ) Negate provided vector ( invert direction ) @@ -1092,7 +1092,7 @@ Negate provided vector ( invert direction ) */ int lmathVector3Negate( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Negate( Vector3 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Negate( Vector3 v )" ); lua_pushboolean( L, false ); return 1; } @@ -1104,7 +1104,7 @@ int lmathVector3Negate( lua_State *L ) { } /* -> result = RL_Vector3Divide( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Divide( Vector3 v1, Vector3 v2 ) Divide vector by vector @@ -1113,7 +1113,7 @@ Divide vector by vector */ int lmathVector3Divide( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Divide( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Divide( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1127,7 +1127,7 @@ int lmathVector3Divide( lua_State *L ) { } /* -> result = RL_Vector3Normalize( Vector3 v ) +> result = RL.Vector3Normalize( Vector3 v ) Normalize provided vector @@ -1136,7 +1136,7 @@ Normalize provided vector */ int lmathVector3Normalize( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Normalize( Vector3 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Normalize( Vector3 v )" ); lua_pushboolean( L, false ); return 1; } @@ -1148,7 +1148,7 @@ int lmathVector3Normalize( lua_State *L ) { } /* -> v1, v2 = RL_Vector3OrthoNormalize( Vector3 v1, Vector3 v2 ) +> v1, v2 = RL.Vector3OrthoNormalize( Vector3 v1, Vector3 v2 ) Orthonormalize provided vectors. Makes vectors normalized and orthogonal to each other. Gram-Schmidt function implementation @@ -1158,7 +1158,7 @@ Gram-Schmidt function implementation */ int lmathVector3OrthoNormalize( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3OrthoNormalize( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3OrthoNormalize( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1175,7 +1175,7 @@ int lmathVector3OrthoNormalize( lua_State *L ) { } /* -> result = RL_Vector3Transform( Vector3 v, Matrix mat ) +> result = RL.Vector3Transform( Vector3 v, Matrix mat ) Transforms a Vector3 by a given Matrix @@ -1184,7 +1184,7 @@ Transforms a Vector3 by a given Matrix */ int lmathVector3Transform( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Transform( Vector3 v, Matrix mat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Transform( Vector3 v, Matrix mat )" ); lua_pushboolean( L, false ); return 1; } @@ -1198,7 +1198,7 @@ int lmathVector3Transform( lua_State *L ) { } /* -> result = RL_Vector3RotateByQuaternion( Vector3 v, Quaternion q ) +> result = RL.Vector3RotateByQuaternion( Vector3 v, Quaternion q ) Transform a vector by quaternion rotation @@ -1207,7 +1207,7 @@ Transform a vector by quaternion rotation */ int lmathVector3RotateByQuaternion( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3RotateByQuaternion( Vector3 v, Quaternion q )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3RotateByQuaternion( Vector3 v, Quaternion q )" ); lua_pushboolean( L, false ); return 1; } @@ -1221,7 +1221,7 @@ int lmathVector3RotateByQuaternion( lua_State *L ) { } /* -> result = RL_Vector3RotateByAxisAngle( Vector3 v, Vector3 axis, float angle ) +> result = RL.Vector3RotateByAxisAngle( Vector3 v, Vector3 axis, float angle ) Rotates a vector around an axis @@ -1230,7 +1230,7 @@ Rotates a vector around an axis */ int lmathVector3RotateByAxisAngle( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3RotateByAxisAngle( Vector3 v, Vector3 axis, float angle )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3RotateByAxisAngle( Vector3 v, Vector3 axis, float angle )" ); lua_pushboolean( L, false ); return 1; } @@ -1246,7 +1246,7 @@ int lmathVector3RotateByAxisAngle( lua_State *L ) { } /* -> result = RL_Vector3Lerp( Vector3 v1, Vector3 v2, float amount ) +> result = RL.Vector3Lerp( Vector3 v1, Vector3 v2, float amount ) Calculate linear interpolation between two vectors @@ -1255,7 +1255,7 @@ Calculate linear interpolation between two vectors */ int lmathVector3Lerp( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Lerp( Vector3 v1, Vector3 v2, float amount )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Lerp( Vector3 v1, Vector3 v2, float amount )" ); lua_pushboolean( L, false ); return 1; } @@ -1271,7 +1271,7 @@ int lmathVector3Lerp( lua_State *L ) { } /* -> result = RL_Vector3Reflect( Vector3 v, Vector3 normal ) +> result = RL.Vector3Reflect( Vector3 v, Vector3 normal ) Calculate reflected vector to normal @@ -1280,7 +1280,7 @@ Calculate reflected vector to normal */ int lmathVector3Reflect( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Reflect( Vector3 v, Vector3 normal )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Reflect( Vector3 v, Vector3 normal )" ); lua_pushboolean( L, false ); return 1; } @@ -1294,7 +1294,7 @@ int lmathVector3Reflect( lua_State *L ) { } /* -> result = RL_Vector3Min( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Min( Vector3 v1, Vector3 v2 ) Get min value for each pair of components @@ -1303,7 +1303,7 @@ Get min value for each pair of components */ int lmathVector3Min( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Min( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Min( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1317,7 +1317,7 @@ int lmathVector3Min( lua_State *L ) { } /* -> result = RL_Vector3Max( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Max( Vector3 v1, Vector3 v2 ) Get max value for each pair of components @@ -1326,7 +1326,7 @@ Get max value for each pair of components */ int lmathVector3Max( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Max( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Max( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1340,7 +1340,7 @@ int lmathVector3Max( lua_State *L ) { } /* -> result = RL_Vector3Barycenter( Vector3 p, Vector3 a, Vector3 b, Vector3 c ) +> result = RL.Vector3Barycenter( Vector3 p, Vector3 a, Vector3 b, Vector3 c ) Compute barycenter coordinates ( u, v, w ) for point p with respect to triangle ( a, b, c ) NOTE: Assumes P is on the plane of the triangle @@ -1350,7 +1350,7 @@ NOTE: Assumes P is on the plane of the triangle */ int lmathVector3Barycenter( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Barycenter( Vector3 p, Vector3 a, Vector3 b, Vector3 c )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Barycenter( Vector3 p, Vector3 a, Vector3 b, Vector3 c )" ); lua_pushboolean( L, false ); return 1; } @@ -1368,7 +1368,7 @@ int lmathVector3Barycenter( lua_State *L ) { } /* -> result = RL_Vector3Unproject( Vector3 source, Matrix projection, Matrix view ) +> result = RL.Vector3Unproject( Vector3 source, Matrix projection, Matrix view ) Projects a Vector3 from screen space into object space NOTE: We are avoiding calling other raymath functions despite available @@ -1378,7 +1378,7 @@ NOTE: We are avoiding calling other raymath functions despite available */ int lmathVector3Unproject( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Unproject( Vector3 source, Matrix projection, Matrix view )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Unproject( Vector3 source, Matrix projection, Matrix view )" ); lua_pushboolean( L, false ); return 1; } @@ -1394,7 +1394,7 @@ int lmathVector3Unproject( lua_State *L ) { } /* -> result = RL_Vector3Invert( Vector3 v ) +> result = RL.Vector3Invert( Vector3 v ) Invert the given vector @@ -1403,7 +1403,7 @@ Invert the given vector */ int lmathVector3Invert( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Invert( Vector3 v )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Invert( Vector3 v )" ); lua_pushboolean( L, false ); return 1; } @@ -1415,7 +1415,7 @@ int lmathVector3Invert( lua_State *L ) { } /* -> result = RL_Vector3Clamp( Vector3 v, Vector3 min, Vector3 max ) +> result = RL.Vector3Clamp( Vector3 v, Vector3 min, Vector3 max ) Clamp the components of the vector between min and max values specified by the given vectors @@ -1425,7 +1425,7 @@ min and max values specified by the given vectors */ int lmathVector3Clamp( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Clamp( Vector3 v, Vector3 min, Vector3 max )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Clamp( Vector3 v, Vector3 min, Vector3 max )" ); lua_pushboolean( L, false ); return 1; } @@ -1441,7 +1441,7 @@ int lmathVector3Clamp( lua_State *L ) { } /* -> result = RL_Vector3ClampValue( Vector3 v, float min, float max ) +> result = RL.Vector3ClampValue( Vector3 v, float min, float max ) Clamp the magnitude of the vector between two values @@ -1450,7 +1450,7 @@ Clamp the magnitude of the vector between two values */ int lmathVector3ClampValue( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3ClampValue( Vector3 v, float min, float max )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3ClampValue( Vector3 v, float min, float max )" ); lua_pushboolean( L, false ); return 1; } @@ -1466,7 +1466,7 @@ int lmathVector3ClampValue( lua_State *L ) { } /* -> result = RL_Vector3Equals( Vector3 v1, Vector3 v2 ) +> result = RL.Vector3Equals( Vector3 v1, Vector3 v2 ) Check whether two given vectors are almost equal @@ -1475,7 +1475,7 @@ Check whether two given vectors are almost equal */ int lmathVector3Equals( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Equals( Vector3 v1, Vector3 v2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Equals( Vector3 v1, Vector3 v2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1489,7 +1489,7 @@ int lmathVector3Equals( lua_State *L ) { } /* -> result = RL_Vector3Refract( Vector3 v, Vector3 n, float r ) +> result = RL.Vector3Refract( Vector3 v, Vector3 n, float r ) Compute the direction of a refracted ray where v specifies the normalized direction of the incoming ray, n specifies the @@ -1503,7 +1503,7 @@ on the other side of the surface */ int lmathVector3Refract( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Vector3Refract( Vector3 v, Vector3 n, float r )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Refract( Vector3 v, Vector3 n, float r )" ); lua_pushboolean( L, false ); return 1; } @@ -1523,7 +1523,7 @@ int lmathVector3Refract( lua_State *L ) { */ /* -> result = RL_MatrixDeterminant( Matrix mat ) +> result = RL.MatrixDeterminant( Matrix mat ) Compute matrix determinant @@ -1532,7 +1532,7 @@ Compute matrix determinant */ int lmathMatrixDeterminant( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixDeterminant( Matrix mat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixDeterminant( Matrix mat )" ); lua_pushboolean( L, false ); return 1; } @@ -1544,7 +1544,7 @@ int lmathMatrixDeterminant( lua_State *L ) { } /* -> result = RL_MatrixTrace( Matrix mat ) +> result = RL.MatrixTrace( Matrix mat ) Get the trace of the matrix ( sum of the values along the diagonal ) @@ -1553,7 +1553,7 @@ Get the trace of the matrix ( sum of the values along the diagonal ) */ int lmathMatrixTrace( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixTrace( Matrix mat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixTrace( Matrix mat )" ); lua_pushboolean( L, false ); return 1; } @@ -1565,7 +1565,7 @@ int lmathMatrixTrace( lua_State *L ) { } /* -> result = RL_MatrixTranspose( Matrix mat ) +> result = RL.MatrixTranspose( Matrix mat ) Transposes provided matrix @@ -1574,7 +1574,7 @@ Transposes provided matrix */ int lmathMatrixTranspose( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixTranspose( Matrix mat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixTranspose( Matrix mat )" ); lua_pushboolean( L, false ); return 1; } @@ -1586,7 +1586,7 @@ int lmathMatrixTranspose( lua_State *L ) { } /* -> result = RL_MatrixInvert( Matrix mat ) +> result = RL.MatrixInvert( Matrix mat ) Invert provided matrix @@ -1595,7 +1595,7 @@ Invert provided matrix */ int lmathMatrixInvert( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixInvert( Matrix mat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixInvert( Matrix mat )" ); lua_pushboolean( L, false ); return 1; } @@ -1607,7 +1607,7 @@ int lmathMatrixInvert( lua_State *L ) { } /* -> result = RL_MatrixIdentity() +> result = RL.MatrixIdentity() Get identity matrix @@ -1620,7 +1620,7 @@ int lmathMatrixIdentity( lua_State *L ) { } /* -> result = RL_MatrixAdd( Matrix left, Matrix right ) +> result = RL.MatrixAdd( Matrix left, Matrix right ) Add two matrices @@ -1629,7 +1629,7 @@ Add two matrices */ int lmathMatrixAdd( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixAdd( Matrix left, Matrix right )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixAdd( Matrix left, Matrix right )" ); lua_pushboolean( L, false ); return 1; } @@ -1643,7 +1643,7 @@ int lmathMatrixAdd( lua_State *L ) { } /* -> result = RL_MatrixSubtract( Matrix left, Matrix right ) +> result = RL.MatrixSubtract( Matrix left, Matrix right ) Subtract two matrices (left - right) @@ -1652,7 +1652,7 @@ Subtract two matrices (left - right) */ int lmathMatrixSubtract( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixSubtract( Matrix left, Matrix right )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixSubtract( Matrix left, Matrix right )" ); lua_pushboolean( L, false ); return 1; } @@ -1666,7 +1666,7 @@ int lmathMatrixSubtract( lua_State *L ) { } /* -> result = RL_MatrixMultiply( Matrix left, Matrix right ) +> result = RL.MatrixMultiply( Matrix left, Matrix right ) Get two matrix multiplication @@ -1675,7 +1675,7 @@ Get two matrix multiplication */ int lmathMatrixMultiply( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixMultiply( Matrix left, Matrix right )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixMultiply( Matrix left, Matrix right )" ); lua_pushboolean( L, false ); return 1; } @@ -1689,7 +1689,7 @@ int lmathMatrixMultiply( lua_State *L ) { } /* -> result = RL_MatrixTranslate( Vector3 translate ) +> result = RL.MatrixTranslate( Vector3 translate ) Get translation matrix @@ -1698,7 +1698,7 @@ Get translation matrix */ int lmathMatrixTranslate( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixTranslate( Vector3 translate )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixTranslate( Vector3 translate )" ); lua_pushboolean( L, false ); return 1; } @@ -1710,7 +1710,7 @@ int lmathMatrixTranslate( lua_State *L ) { } /* -> result = RL_MatrixRotate( Vector3 axis, float angle ) +> result = RL.MatrixRotate( Vector3 axis, float angle ) Create rotation matrix from axis and angle. NOTE: Angle should be provided in radians @@ -1719,7 +1719,7 @@ Create rotation matrix from axis and angle. NOTE: Angle should be provided in ra */ int lmathMatrixRotate( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixRotate( Vector3 axis, float angle )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotate( Vector3 axis, float angle )" ); lua_pushboolean( L, false ); return 1; } @@ -1733,7 +1733,7 @@ int lmathMatrixRotate( lua_State *L ) { } /* -> result = RL_MatrixRotateX( float angle ) +> result = RL.MatrixRotateX( float angle ) Get x-rotation matrix ( angle in radians ) @@ -1742,7 +1742,7 @@ Get x-rotation matrix ( angle in radians ) */ int lmathMatrixRotateX( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixRotateX( float angle )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateX( float angle )" ); lua_pushboolean( L, false ); return 1; } @@ -1754,7 +1754,7 @@ int lmathMatrixRotateX( lua_State *L ) { } /* -> result = RL_MatrixRotateY( float angle ) +> result = RL.MatrixRotateY( float angle ) Get y-rotation matrix ( angle in radians ) @@ -1763,7 +1763,7 @@ Get y-rotation matrix ( angle in radians ) */ int lmathMatrixRotateY( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixRotateY( float angle )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateY( float angle )" ); lua_pushboolean( L, false ); return 1; } @@ -1775,7 +1775,7 @@ int lmathMatrixRotateY( lua_State *L ) { } /* -> result = RL_MatrixRotateZ( float angle ) +> result = RL.MatrixRotateZ( float angle ) Get z-rotation matrix ( angle in radians ) @@ -1784,7 +1784,7 @@ Get z-rotation matrix ( angle in radians ) */ int lmathMatrixRotateZ( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixRotateZ( float angle )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateZ( float angle )" ); lua_pushboolean( L, false ); return 1; } @@ -1796,7 +1796,7 @@ int lmathMatrixRotateZ( lua_State *L ) { } /* -> result = RL_MatrixRotateXYZ( Vector3 angle ) +> result = RL.MatrixRotateXYZ( Vector3 angle ) Get xyz-rotation matrix ( angles in radians ) @@ -1805,7 +1805,7 @@ Get xyz-rotation matrix ( angles in radians ) */ int lmathMatrixRotateXYZ( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixRotateXYZ( Vector3 angle )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateXYZ( Vector3 angle )" ); lua_pushboolean( L, false ); return 1; } @@ -1817,7 +1817,7 @@ int lmathMatrixRotateXYZ( lua_State *L ) { } /* -> result = RL_MatrixRotateZYX( Vector3 angle ) +> result = RL.MatrixRotateZYX( Vector3 angle ) Get zyx-rotation matrix ( angles in radians ) @@ -1826,7 +1826,7 @@ Get zyx-rotation matrix ( angles in radians ) */ int lmathMatrixRotateZYX( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixRotateZYX( Vector3 angle )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateZYX( Vector3 angle )" ); lua_pushboolean( L, false ); return 1; } @@ -1838,7 +1838,7 @@ int lmathMatrixRotateZYX( lua_State *L ) { } /* -> result = RL_MatrixScale( Vector3 scale ) +> result = RL.MatrixScale( Vector3 scale ) Get scaling matrix @@ -1847,7 +1847,7 @@ Get scaling matrix */ int lmathMatrixScale( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixScale( Vector3 scale )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixScale( Vector3 scale )" ); lua_pushboolean( L, false ); return 1; } @@ -1859,7 +1859,7 @@ int lmathMatrixScale( lua_State *L ) { } /* -> result = RL_MatrixFrustum( double left, double right, double bottom, double top, double near, double far ) +> result = RL.MatrixFrustum( double left, double right, double bottom, double top, double near, double far ) Get perspective projection matrix @@ -1869,7 +1869,7 @@ Get perspective projection matrix int lmathMatrixFrustum( lua_State *L ) { if ( !lua_isnumber( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixFrustum( double left, double right, double bottom, double top, double near, double far )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixFrustum( double left, double right, double bottom, double top, double near, double far )" ); lua_pushboolean( L, false ); return 1; } @@ -1886,7 +1886,7 @@ int lmathMatrixFrustum( lua_State *L ) { } /* -> result = RL_MatrixPerspective( double fovy, double aspect, double near, double far ) +> result = RL.MatrixPerspective( double fovy, double aspect, double near, double far ) Get perspective projection matrix @@ -1895,7 +1895,7 @@ Get perspective projection matrix */ int lmathMatrixPerspective( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixPerspective( double fovy, double aspect, double near, double far )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixPerspective( double fovy, double aspect, double near, double far )" ); lua_pushboolean( L, false ); return 1; } @@ -1910,7 +1910,7 @@ int lmathMatrixPerspective( lua_State *L ) { } /* -> result = RL_MatrixOrtho( double left, double right, double bottom, double top, double near, double far ) +> result = RL.MatrixOrtho( double left, double right, double bottom, double top, double near, double far ) Get orthographic projection matrix @@ -1920,7 +1920,7 @@ Get orthographic projection matrix int lmathMatrixOrtho( lua_State *L ) { if ( !lua_isnumber( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixOrtho( double left, double right, double bottom, double top, double near, double far )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixOrtho( double left, double right, double bottom, double top, double near, double far )" ); lua_pushboolean( L, false ); return 1; } @@ -1937,7 +1937,7 @@ int lmathMatrixOrtho( lua_State *L ) { } /* -> result = RL_MatrixLookAt( Vector3 eye, Vector3 target, Vector3 up ) +> result = RL.MatrixLookAt( Vector3 eye, Vector3 target, Vector3 up ) Get camera look-at matrix ( View matrix ) @@ -1946,7 +1946,7 @@ Get camera look-at matrix ( View matrix ) */ int lmathMatrixLookAt( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MatrixLookAt( Vector3 eye, Vector3 target, Vector3 up )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixLookAt( Vector3 eye, Vector3 target, Vector3 up )" ); lua_pushboolean( L, false ); return 1; } @@ -1966,7 +1966,7 @@ int lmathMatrixLookAt( lua_State *L ) { */ /* -> result = RL_QuaternionAdd( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionAdd( Quaternion q1, Quaternion q2 ) Add two quaternions @@ -1975,7 +1975,7 @@ Add two quaternions */ int lmathQuaternionAdd( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionAdd( Quaternion q1, Quaternion q2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionAdd( Quaternion q1, Quaternion q2 )" ); lua_pushboolean( L, false ); return 1; } @@ -1989,7 +1989,7 @@ int lmathQuaternionAdd( lua_State *L ) { } /* -> result = RL_QuaternionAddValue( Quaternion q, float add ) +> result = RL.QuaternionAddValue( Quaternion q, float add ) Add quaternion and float value @@ -1998,7 +1998,7 @@ Add quaternion and float value */ int lmathQuaternionAddValue( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionAddValue( Quaternion q, float add )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionAddValue( Quaternion q, float add )" ); lua_pushboolean( L, false ); return 1; } @@ -2012,7 +2012,7 @@ int lmathQuaternionAddValue( lua_State *L ) { } /* -> result = RL_QuaternionSubtract( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionSubtract( Quaternion q1, Quaternion q2 ) Subtract two quaternions @@ -2021,7 +2021,7 @@ Subtract two quaternions */ int lmathQuaternionSubtract( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionSubtract( Quaternion q1, Quaternion q2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionSubtract( Quaternion q1, Quaternion q2 )" ); lua_pushboolean( L, false ); return 1; } @@ -2035,7 +2035,7 @@ int lmathQuaternionSubtract( lua_State *L ) { } /* -> result = RL_QuaternionSubtractValue( Quaternion q, float sub ) +> result = RL.QuaternionSubtractValue( Quaternion q, float sub ) Subtract quaternion and float value @@ -2044,7 +2044,7 @@ Subtract quaternion and float value */ int lmathQuaternionSubtractValue( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionSubtractValue( Quaternion q, float sub )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionSubtractValue( Quaternion q, float sub )" ); lua_pushboolean( L, false ); return 1; } @@ -2058,7 +2058,7 @@ int lmathQuaternionSubtractValue( lua_State *L ) { } /* -> result = RL_QuaternionIdentity() +> result = RL.QuaternionIdentity() Get identity quaternion @@ -2071,7 +2071,7 @@ int lmathQuaternionIdentity( lua_State *L ) { } /* -> result = RL_QuaternionLength( Quaternion q ) +> result = RL.QuaternionLength( Quaternion q ) Computes the length of a quaternion @@ -2080,7 +2080,7 @@ Computes the length of a quaternion */ int lmathQuaternionLength( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionLength( Quaternion q )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionLength( Quaternion q )" ); lua_pushboolean( L, false ); return 1; } @@ -2092,7 +2092,7 @@ int lmathQuaternionLength( lua_State *L ) { } /* -> result = RL_QuaternionNormalize( Quaternion q ) +> result = RL.QuaternionNormalize( Quaternion q ) Normalize provided quaternion @@ -2101,7 +2101,7 @@ Normalize provided quaternion */ int lmathQuaternionNormalize( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionNormalize( Quaternion q )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionNormalize( Quaternion q )" ); lua_pushboolean( L, false ); return 1; } @@ -2113,7 +2113,7 @@ int lmathQuaternionNormalize( lua_State *L ) { } /* -> result = RL_QuaternionInvert( Quaternion q ) +> result = RL.QuaternionInvert( Quaternion q ) Invert provided quaternion @@ -2122,7 +2122,7 @@ Invert provided quaternion */ int lmathQuaternionInvert( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionInvert( Quaternion q )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionInvert( Quaternion q )" ); lua_pushboolean( L, false ); return 1; } @@ -2134,7 +2134,7 @@ int lmathQuaternionInvert( lua_State *L ) { } /* -> result = RL_QuaternionMultiply( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionMultiply( Quaternion q1, Quaternion q2 ) Calculate two quaternion multiplication @@ -2143,7 +2143,7 @@ Calculate two quaternion multiplication */ int lmathQuaternionMultiply( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionMultiply( Quaternion q1, Quaternion q2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionMultiply( Quaternion q1, Quaternion q2 )" ); lua_pushboolean( L, false ); return 1; } @@ -2157,7 +2157,7 @@ int lmathQuaternionMultiply( lua_State *L ) { } /* -> result = RL_QuaternionScale( Quaternion q, float mul ) +> result = RL.QuaternionScale( Quaternion q, float mul ) Scale quaternion by float value @@ -2166,7 +2166,7 @@ Scale quaternion by float value */ int lmathQuaternionScale( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionScale( Quaternion q, float mul )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionScale( Quaternion q, float mul )" ); lua_pushboolean( L, false ); return 1; } @@ -2180,7 +2180,7 @@ int lmathQuaternionScale( lua_State *L ) { } /* -> result = RL_QuaternionDivide( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionDivide( Quaternion q1, Quaternion q2 ) Divide two quaternions @@ -2189,7 +2189,7 @@ Divide two quaternions */ int lmathQuaternionDivide( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionDivide( Quaternion q1, Quaternion q2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionDivide( Quaternion q1, Quaternion q2 )" ); lua_pushboolean( L, false ); return 1; } @@ -2203,7 +2203,7 @@ int lmathQuaternionDivide( lua_State *L ) { } /* -> result = RL_QuaternionLerp( Quaternion q1, Quaternion q2, float amount ) +> result = RL.QuaternionLerp( Quaternion q1, Quaternion q2, float amount ) Calculate linear interpolation between two quaternions @@ -2212,7 +2212,7 @@ Calculate linear interpolation between two quaternions */ int lmathQuaternionLerp( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionLerp( Quaternion q1, Quaternion q2, float amount )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionLerp( Quaternion q1, Quaternion q2, float amount )" ); lua_pushboolean( L, false ); return 1; } @@ -2228,7 +2228,7 @@ int lmathQuaternionLerp( lua_State *L ) { } /* -> result = RL_QuaternionNlerp( Quaternion q1, Quaternion q2, float amount ) +> result = RL.QuaternionNlerp( Quaternion q1, Quaternion q2, float amount ) Calculate slerp-optimized interpolation between two quaternions @@ -2237,7 +2237,7 @@ Calculate slerp-optimized interpolation between two quaternions */ int lmathQuaternionNlerp( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionNlerp( Quaternion q1, Quaternion q2, float amount )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionNlerp( Quaternion q1, Quaternion q2, float amount )" ); lua_pushboolean( L, false ); return 1; } @@ -2253,7 +2253,7 @@ int lmathQuaternionNlerp( lua_State *L ) { } /* -> result = RL_QuaternionSlerp( Quaternion q1, Quaternion q2, float amount ) +> result = RL.QuaternionSlerp( Quaternion q1, Quaternion q2, float amount ) Calculates spherical linear interpolation between two quaternions @@ -2262,7 +2262,7 @@ Calculates spherical linear interpolation between two quaternions */ int lmathQuaternionSlerp( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionSlerp( Quaternion q1, Quaternion q2, float amount )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionSlerp( Quaternion q1, Quaternion q2, float amount )" ); lua_pushboolean( L, false ); return 1; } @@ -2278,7 +2278,7 @@ int lmathQuaternionSlerp( lua_State *L ) { } /* -> result = RL_QuaternionFromVector3ToVector3( Vector3 from, Vector3 to ) +> result = RL.QuaternionFromVector3ToVector3( Vector3 from, Vector3 to ) Calculate quaternion based on the rotation from one vector to another @@ -2287,7 +2287,7 @@ Calculate quaternion based on the rotation from one vector to another */ int lmathQuaternionFromVector3ToVector3( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionFromVector3ToVector3( Vector3 from, Vector3 to )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionFromVector3ToVector3( Vector3 from, Vector3 to )" ); lua_pushboolean( L, false ); return 1; } @@ -2301,7 +2301,7 @@ int lmathQuaternionFromVector3ToVector3( lua_State *L ) { } /* -> result = RL_QuaternionFromMatrix( Matrix mat ) +> result = RL.QuaternionFromMatrix( Matrix mat ) Get a quaternion for a given rotation matrix @@ -2310,7 +2310,7 @@ Get a quaternion for a given rotation matrix */ int lmathQuaternionFromMatrix( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionFromMatrix( Matrix mat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionFromMatrix( Matrix mat )" ); lua_pushboolean( L, false ); return 1; } @@ -2322,7 +2322,7 @@ int lmathQuaternionFromMatrix( lua_State *L ) { } /* -> result = RL_QuaternionToMatrix( Quaternion q ) +> result = RL.QuaternionToMatrix( Quaternion q ) Get a quaternion for a given rotation matrix @@ -2331,7 +2331,7 @@ Get a quaternion for a given rotation matrix */ int lmathQuaternionToMatrix( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionToMatrix( Quaternion q )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionToMatrix( Quaternion q )" ); lua_pushboolean( L, false ); return 1; } @@ -2343,7 +2343,7 @@ int lmathQuaternionToMatrix( lua_State *L ) { } /* -> result = RL_QuaternionFromAxisAngle( Vector3 axis, float angle ) +> result = RL.QuaternionFromAxisAngle( Vector3 axis, float angle ) Get rotation quaternion for an angle and axis NOTE: angle must be provided in radians @@ -2353,7 +2353,7 @@ NOTE: angle must be provided in radians */ int lmathQuaternionFromAxisAngle( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionFromAxisAngle( Vector3 axis, float angle )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionFromAxisAngle( Vector3 axis, float angle )" ); lua_pushboolean( L, false ); return 1; } @@ -2367,7 +2367,7 @@ int lmathQuaternionFromAxisAngle( lua_State *L ) { } /* -> axis, angle = RL_QuaternionToAxisAngle( Quaternion q ) +> axis, angle = RL.QuaternionToAxisAngle( Quaternion q ) Get the rotation angle and axis for a given quaternion @@ -2376,7 +2376,7 @@ Get the rotation angle and axis for a given quaternion */ int lmathQuaternionToAxisAngle( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionToAxisAngle( Quaternion q )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionToAxisAngle( Quaternion q )" ); lua_pushboolean( L, false ); return 1; } @@ -2393,7 +2393,7 @@ int lmathQuaternionToAxisAngle( lua_State *L ) { } /* -> result = RL_QuaternionFromEuler( float pitch, float yaw, float roll ) +> result = RL.QuaternionFromEuler( float pitch, float yaw, float roll ) Get the quaternion equivalent to Euler angles NOTE: Rotation order is ZYX @@ -2403,7 +2403,7 @@ NOTE: Rotation order is ZYX */ int lmathQuaternionFromEuler( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionFromEuler( float pitch, float yaw, float roll )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionFromEuler( float pitch, float yaw, float roll )" ); lua_pushboolean( L, false ); return 1; } @@ -2417,7 +2417,7 @@ int lmathQuaternionFromEuler( lua_State *L ) { } /* -> result = RL_QuaternionToEuler( Quaternion q ) +> result = RL.QuaternionToEuler( Quaternion q ) Get the Euler angles equivalent to quaternion (roll, pitch, yaw) NOTE: Angles are returned in a Vector3 struct in radians @@ -2427,7 +2427,7 @@ NOTE: Angles are returned in a Vector3 struct in radians */ int lmathQuaternionToEuler( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionToEuler( Quaternion q )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionToEuler( Quaternion q )" ); lua_pushboolean( L, false ); return 1; } @@ -2439,7 +2439,7 @@ int lmathQuaternionToEuler( lua_State *L ) { } /* -> result = RL_QuaternionTransform( Quaternion q, Matrix mat ) +> result = RL.QuaternionTransform( Quaternion q, Matrix mat ) Transform a quaternion given a transformation matrix @@ -2448,7 +2448,7 @@ Transform a quaternion given a transformation matrix */ int lmathQuaternionTransform( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionTransform( Quaternion q, Matrix mat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionTransform( Quaternion q, Matrix mat )" ); lua_pushboolean( L, false ); return 1; } @@ -2462,7 +2462,7 @@ int lmathQuaternionTransform( lua_State *L ) { } /* -> result = RL_QuaternionEquals( Quaternion q1, Quaternion q2 ) +> result = RL.QuaternionEquals( Quaternion q1, Quaternion q2 ) Check whether two given quaternions are almost equal @@ -2471,7 +2471,7 @@ Check whether two given quaternions are almost equal */ int lmathQuaternionEquals( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_QuaternionEquals( Quaternion q1, Quaternion q2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionEquals( Quaternion q1, Quaternion q2 )" ); lua_pushboolean( L, false ); return 1; } diff --git a/src/shapes.c b/src/shapes.c index 30006ce..cf50ca3 100644 --- a/src/shapes.c +++ b/src/shapes.c @@ -8,7 +8,7 @@ */ /* -> success = RL_SetShapesTexture( Texture2D texture, Rectangle source ) +> success = RL.SetShapesTexture( Texture2D texture, Rectangle source ) Set texture and rectangle to be used on shapes drawing NOTE: It can be useful when using basic shapes and one single font, @@ -19,7 +19,7 @@ defining a font char white rectangle would allow drawing everything in a single */ int lshapesSetShapesTexture( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetShapesTexture( Texture2D texture, Rectangle source )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShapesTexture( Texture2D texture, Rectangle source )" ); lua_pushboolean( L, false ); return 1; } @@ -38,7 +38,7 @@ int lshapesSetShapesTexture( lua_State *L ) { } /* -> success = RL_DrawPixel( Vector2 pos, Color color ) +> success = RL.DrawPixel( Vector2 pos, Color color ) Draw a pixel @@ -47,7 +47,7 @@ Draw a pixel */ int lshapesDrawPixel( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawPixel( Vector2 pos, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPixel( Vector2 pos, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -62,7 +62,7 @@ int lshapesDrawPixel( lua_State *L ) { } /* -> success = RL_DrawLine( Vector2 startPos, Vector2 endPos, float thickness, Color color ) +> success = RL.DrawLine( Vector2 startPos, Vector2 endPos, float thickness, Color color ) Draw a line defining thickness @@ -71,7 +71,7 @@ Draw a line defining thickness */ int lshapesDrawLine( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawLine( Vector2 startPos, Vector2 endPos, float thickness, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLine( Vector2 startPos, Vector2 endPos, float thickness, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -90,7 +90,7 @@ int lshapesDrawLine( lua_State *L ) { } /* -> success = RL_DrawLineBezier( Vector2 startPos, Vector2 endPos, float thickness, Color color ) +> success = RL.DrawLineBezier( Vector2 startPos, Vector2 endPos, float thickness, Color color ) Draw a line using cubic-bezier curves in-out @@ -99,7 +99,7 @@ Draw a line using cubic-bezier curves in-out */ int lshapesDrawLineBezier( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawLineBezier( Vector2 startPos, Vector2 endPos, float thickness, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLineBezier( Vector2 startPos, Vector2 endPos, float thickness, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -118,7 +118,7 @@ int lshapesDrawLineBezier( lua_State *L ) { } /* -> success = RL_DrawLineBezierQuad( Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thickness, Color color ) +> success = RL.DrawLineBezierQuad( Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thickness, Color color ) Draw line using quadratic bezier curves with a control point @@ -127,7 +127,7 @@ Draw line using quadratic bezier curves with a control point */ int lshapesDrawLineBezierQuad( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawLineBezier( Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thickness, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLineBezier( Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thickness, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -148,7 +148,7 @@ int lshapesDrawLineBezierQuad( lua_State *L ) { } /* -> success = RL_DrawLineBezierCubic( Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thickness, Color color ) +> success = RL.DrawLineBezierCubic( Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thickness, Color color ) Draw line using quadratic bezier curves with a control point @@ -158,7 +158,7 @@ Draw line using quadratic bezier curves with a control point int lshapesDrawLineBezierCubic( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_istable( L, -5 ) || !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawLineBezierCubic( Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thickness, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLineBezierCubic( Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thickness, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -181,7 +181,7 @@ int lshapesDrawLineBezierCubic( lua_State *L ) { } /* -> success = RL_DrawLineStrip( Vector2 points{}, int pointsCount, Color color ) +> success = RL.DrawLineStrip( Vector2{} points, int pointsCount, Color color ) Draw lines sequence @@ -190,7 +190,7 @@ Draw lines sequence */ int lshapesDrawLineStrip( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawLineStrip( Vector2 points{}, int pointsCount, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLineStrip( Vector2{} points, int pointsCount, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -217,7 +217,7 @@ int lshapesDrawLineStrip( lua_State *L ) { } /* -> success = RL_DrawCircle( Vector2 center, float radius, Color color ) +> success = RL.DrawCircle( Vector2 center, float radius, Color color ) Draw a color-filled circle @@ -226,7 +226,7 @@ Draw a color-filled circle */ int lshapesDrawCircle( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCircle( Vector2 center, float radius, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircle( Vector2 center, float radius, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -243,7 +243,7 @@ int lshapesDrawCircle( lua_State *L ) { } /* -> success = RL_DrawCircleSector( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color ) +> success = RL.DrawCircleSector( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color ) Draw a piece of a circle @@ -253,7 +253,7 @@ Draw a piece of a circle int lshapesDrawCircleSector( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCircleSector( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircleSector( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -276,7 +276,7 @@ int lshapesDrawCircleSector( lua_State *L ) { } /* -> success = RL_DrawCircleSectorLines( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color ) +> success = RL.DrawCircleSectorLines( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color ) Draw circle sector outline @@ -286,7 +286,7 @@ Draw circle sector outline int lshapesDrawCircleSectorLines( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCircleSectorLines( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircleSectorLines( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -309,7 +309,7 @@ int lshapesDrawCircleSectorLines( lua_State *L ) { } /* -> success = RL_DrawCircleGradient( Vector2 center, float radius, Color color1, Color color2 ) +> success = RL.DrawCircleGradient( Vector2 center, float radius, Color color1, Color color2 ) Draw a gradient-filled circle @@ -318,7 +318,7 @@ Draw a gradient-filled circle */ int lshapesDrawCircleGradient( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCircleGradient( Vector2 center, float radius, Color color1, Color color2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircleGradient( Vector2 center, float radius, Color color1, Color color2 )" ); lua_pushboolean( L, false ); return 1; } @@ -337,7 +337,7 @@ int lshapesDrawCircleGradient( lua_State *L ) { } /* -> success = RL_DrawCircleLines( Vector2 center, float radius, Color color ) +> success = RL.DrawCircleLines( Vector2 center, float radius, Color color ) Draw circle outline @@ -346,7 +346,7 @@ Draw circle outline */ int lshapesDrawCircleLines( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawCircleLines( Vector2 center, float radius, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircleLines( Vector2 center, float radius, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -363,7 +363,7 @@ int lshapesDrawCircleLines( lua_State *L ) { } /* -> success = RL_DrawEllipse( Vector2 center, float radiusH, float radiusV, Color color ) +> success = RL.DrawEllipse( Vector2 center, float radiusH, float radiusV, Color color ) Draw ellipse @@ -372,7 +372,7 @@ Draw ellipse */ int lshapesDrawEllipse( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawEllipse( Vector2 center, float radiusH, float radiusV, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawEllipse( Vector2 center, float radiusH, float radiusV, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -391,7 +391,7 @@ int lshapesDrawEllipse( lua_State *L ) { } /* -> success = RL_DrawEllipseLines( Vector2 center, float radiusH, float radiusV, Color color ) +> success = RL.DrawEllipseLines( Vector2 center, float radiusH, float radiusV, Color color ) Draw ellipse outline @@ -400,7 +400,7 @@ Draw ellipse outline */ int lshapesDrawEllipseLines( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawEllipseLines( Vector2 center, float radiusH, float radiusV, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawEllipseLines( Vector2 center, float radiusH, float radiusV, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -419,7 +419,7 @@ int lshapesDrawEllipseLines( lua_State *L ) { } /* -> success = RL_DrawRing( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color ) +> success = RL.DrawRing( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color ) Draw ring @@ -429,7 +429,7 @@ Draw ring int lshapesDrawRing( lua_State *L ) { if ( !lua_istable( L, -7 ) || !lua_istable( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRing( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRing( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -454,7 +454,7 @@ int lshapesDrawRing( lua_State *L ) { } /* -> success = RL_DrawRingLines( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color ) +> success = RL.DrawRingLines( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color ) Draw ring outline @@ -464,7 +464,7 @@ Draw ring outline int lshapesDrawRingLines( lua_State *L ) { if ( !lua_istable( L, -7 ) || !lua_istable( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRingLines( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRingLines( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -489,7 +489,7 @@ int lshapesDrawRingLines( lua_State *L ) { } /* -> success = RL_DrawRectangle( Rectangle rec, Color color ) +> success = RL.DrawRectangle( Rectangle rec, Color color ) Draw a color-filled rectangle @@ -498,7 +498,7 @@ Draw a color-filled rectangle */ int lshapesDrawRectangle( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectangle( Rectangle rec, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangle( Rectangle rec, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -513,7 +513,7 @@ int lshapesDrawRectangle( lua_State *L ) { } /* -> success = RL_DrawRectanglePro( Rectangle rec, Vector2 origin, float rotation, Color color ) +> success = RL.DrawRectanglePro( Rectangle rec, Vector2 origin, float rotation, Color color ) Draw a color-filled rectangle with pro parameters @@ -522,7 +522,7 @@ Draw a color-filled rectangle with pro parameters */ int lshapesDrawRectanglePro( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectanglePro( Rectangle rec, Vector2 origin, float rotation, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectanglePro( Rectangle rec, Vector2 origin, float rotation, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -541,7 +541,7 @@ int lshapesDrawRectanglePro( lua_State *L ) { } /* -> success = RL_DrawRectangleGradientV( Rectangle rectangle, Color color1, Color color2 ) +> success = RL.DrawRectangleGradientV( Rectangle rectangle, Color color1, Color color2 ) Draw a vertical-gradient-filled rectangle @@ -550,7 +550,7 @@ Draw a vertical-gradient-filled rectangle */ int lshapesDrawRectangleGradientV( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectangleGradientV( Rectangle rectangle, Color color1, Color color2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleGradientV( Rectangle rectangle, Color color1, Color color2 )" ); lua_pushboolean( L, false ); return 1; } @@ -567,7 +567,7 @@ int lshapesDrawRectangleGradientV( lua_State *L ) { } /* -> success = RL_DrawRectangleGradientH( Rectangle rectangle, Color color1, Color color2 ) +> success = RL.DrawRectangleGradientH( Rectangle rectangle, Color color1, Color color2 ) Draw a horizontal-gradient-filled rectangle @@ -576,7 +576,7 @@ Draw a horizontal-gradient-filled rectangle */ int lshapesDrawRectangleGradientH( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectangleGradientH( Rectangle rectangle, Color color1, Color color2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleGradientH( Rectangle rectangle, Color color1, Color color2 )" ); lua_pushboolean( L, false ); return 1; } @@ -593,7 +593,7 @@ int lshapesDrawRectangleGradientH( lua_State *L ) { } /* -> success = RL_DrawRectangleGradientEx( Rectangle rectangle, Color col1, Color col2, Color col3, Color col4 ) +> success = RL.DrawRectangleGradientEx( Rectangle rectangle, Color col1, Color col2, Color col3, Color col4 ) Draw a gradient-filled rectangle with custom vertex colors @@ -602,7 +602,7 @@ Draw a gradient-filled rectangle with custom vertex colors */ int lshapesDrawRectangleGradientEx( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectangleGradientEx( Rectangle rectangle, Color col1, Color col2, Color col3, Color col4 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleGradientEx( Rectangle rectangle, Color col1, Color col2, Color col3, Color col4 )" ); lua_pushboolean( L, false ); return 1; } @@ -623,7 +623,7 @@ int lshapesDrawRectangleGradientEx( lua_State *L ) { } /* -> success = RL_DrawRectangleLines( Rectangle rec, Color color ) +> success = RL.DrawRectangleLines( Rectangle rec, Color color ) Draw rectangle outline @@ -632,7 +632,7 @@ Draw rectangle outline */ int lshapesDrawRectangleLines( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectangle( Rectangle rec, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleLines( Rectangle rec, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -647,7 +647,7 @@ int lshapesDrawRectangleLines( lua_State *L ) { } /* -> success = RL_DrawRectangleLinesEx( Rectangle rec, int lineThick, Color color ) +> success = RL.DrawRectangleLinesEx( Rectangle rec, int lineThick, Color color ) Draw rectangle outline with extended parameters @@ -656,7 +656,7 @@ Draw rectangle outline with extended parameters */ int lshapesDrawRectangleLinesEx( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectangleLinesEx( Rectangle rec, int lineThick, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleLinesEx( Rectangle rec, int lineThick, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -673,7 +673,7 @@ int lshapesDrawRectangleLinesEx( lua_State *L ) { } /* -> success = RL_DrawRectangleRounded( Rectangle rec, float roundness, int segments, Color color ) +> success = RL.DrawRectangleRounded( Rectangle rec, float roundness, int segments, Color color ) Draw rectangle with rounded edges @@ -682,7 +682,7 @@ Draw rectangle with rounded edges */ int lshapesDrawRectangleRounded( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectangleRounded( Rectangle rec, float roundness, int segments, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleRounded( Rectangle rec, float roundness, int segments, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -701,7 +701,7 @@ int lshapesDrawRectangleRounded( lua_State *L ) { } /* -> success = RL_DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, int lineThick, Color color ) +> success = RL.DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, int lineThick, Color color ) Draw rectangle with rounded edges outline @@ -710,7 +710,7 @@ Draw rectangle with rounded edges outline */ int lshapesDrawRectangleRoundedLines( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, int lineThick, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, int lineThick, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -731,7 +731,7 @@ int lshapesDrawRectangleRoundedLines( lua_State *L ) { } /* -> success = RL_DrawTriangle( Vector2 v1, Vector2 v2, Vector2 v3, Color color ) +> success = RL.DrawTriangle( Vector2 v1, Vector2 v2, Vector2 v3, Color color ) Draw a color-filled triangle ( Vertex in counter-clockwise order! ) @@ -740,7 +740,7 @@ Draw a color-filled triangle ( Vertex in counter-clockwise order! ) */ int lshapesDrawTriangle( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTriangle( Vector2 v1, Vector2 v2, Vector2 v3, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangle( Vector2 v1, Vector2 v2, Vector2 v3, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -759,7 +759,7 @@ int lshapesDrawTriangle( lua_State *L ) { } /* -> success = RL_DrawTriangleLines( Vector2 v1, Vector2 v2, Vector2 v3, Color color ) +> success = RL.DrawTriangleLines( Vector2 v1, Vector2 v2, Vector2 v3, Color color ) Draw triangle outline ( Vertex in counter-clockwise order! ) @@ -768,7 +768,7 @@ Draw triangle outline ( Vertex in counter-clockwise order! ) */ int lshapesDrawTriangleLines( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTriangleLines( Vector2 v1, Vector2 v2, Vector2 v3, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangleLines( Vector2 v1, Vector2 v2, Vector2 v3, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -787,7 +787,7 @@ int lshapesDrawTriangleLines( lua_State *L ) { } /* -> success = RL_DrawTriangleFan( Vector2 points{}, int pointsCount, Color color ) +> success = RL.DrawTriangleFan( Vector2{} points, int pointsCount, Color color ) Draw a triangle fan defined by points ( first vertex is the center ) @@ -796,7 +796,7 @@ Draw a triangle fan defined by points ( first vertex is the center ) */ int lshapesDrawTriangleFan( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTriangleFan( Vector2 points{}, int pointsCount, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangleFan( Vector2{} points, int pointsCount, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -823,7 +823,7 @@ int lshapesDrawTriangleFan( lua_State *L ) { } /* -> success = RL_DrawTriangleStrip( Vector2 points{}, int pointsCount, Color color ) +> success = RL.DrawTriangleStrip( Vector2{} points, int pointsCount, Color color ) Draw a triangle strip defined by points @@ -832,7 +832,7 @@ Draw a triangle strip defined by points */ int lshapesDrawTriangleStrip( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTriangleStrip( Vector2 points{}, int pointsCount, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangleStrip( Vector2{} points, int pointsCount, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -859,7 +859,7 @@ int lshapesDrawTriangleStrip( lua_State *L ) { } /* -> success = RL_DrawPoly( Vector2 center, int sides, float radius, float rotation, Color color ) +> success = RL.DrawPoly( Vector2 center, int sides, float radius, float rotation, Color color ) Draw a regular polygon ( Vector version ) @@ -868,7 +868,7 @@ Draw a regular polygon ( Vector version ) */ int lshapesDrawPoly( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawPoly( Vector2 center, int sides, float radius, float rotation, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPoly( Vector2 center, int sides, float radius, float rotation, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -889,7 +889,7 @@ int lshapesDrawPoly( lua_State *L ) { } /* -> success = RL_DrawPolyLines( Vector2 center, int sides, float radius, float rotation, Color color ) +> success = RL.DrawPolyLines( Vector2 center, int sides, float radius, float rotation, Color color ) Draw a polygon outline of n sides @@ -898,7 +898,7 @@ Draw a polygon outline of n sides */ int lshapesDrawPolyLines( lua_State *L ) { if ( !lua_istable( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawPolyLines( Vector2 center, int sides, float radius, float rotation, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPolyLines( Vector2 center, int sides, float radius, float rotation, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -919,7 +919,7 @@ int lshapesDrawPolyLines( lua_State *L ) { } /* -> success = RL_DrawPolyLinesEx( Vector2 center, int sides, float radius, float rotation, float lineThick, Color color ) +> success = RL.DrawPolyLinesEx( Vector2 center, int sides, float radius, float rotation, float lineThick, Color color ) Draw a polygon outline of n sides with extended parameters @@ -929,7 +929,7 @@ Draw a polygon outline of n sides with extended parameters int lshapesDrawPolyLinesEx( lua_State *L ) { if ( !lua_istable( L, -6 ) || !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawPolyLinesEx( Vector2 center, int sides, float radius, float rotation, float lineThick, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPolyLinesEx( Vector2 center, int sides, float radius, float rotation, float lineThick, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -956,7 +956,7 @@ int lshapesDrawPolyLinesEx( lua_State *L ) { */ /* -> collision = RL_CheckCollisionRecs( Rectangle rec1, Rectangle rec2 ) +> collision = RL.CheckCollisionRecs( Rectangle rec1, Rectangle rec2 ) Check collision between two rectangles @@ -965,7 +965,7 @@ Check collision between two rectangles */ int lshapesCheckCollisionRecs( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionRecs( Rectangle rec1, Rectangle rec2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionRecs( Rectangle rec1, Rectangle rec2 )" ); lua_pushnil( L ); return 1; } @@ -979,7 +979,7 @@ int lshapesCheckCollisionRecs( lua_State *L ) { } /* -> collision = RL_CheckCollisionCircles( Vector2 center1, float radius1, Vector2 center2, float radius2 ) +> collision = RL.CheckCollisionCircles( Vector2 center1, float radius1, Vector2 center2, float radius2 ) Check collision between two circles @@ -988,7 +988,7 @@ Check collision between two circles */ int lshapesCheckCollisionCircles( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionCircles( Vector2 center1, float radius1, Vector2 center2, float radius2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionCircles( Vector2 center1, float radius1, Vector2 center2, float radius2 )" ); lua_pushnil( L ); return 1; } @@ -1006,7 +1006,7 @@ int lshapesCheckCollisionCircles( lua_State *L ) { } /* -> collision = RL_CheckCollisionCircleRec( Vector2 center, float radius, Rectangle rec ) +> collision = RL.CheckCollisionCircleRec( Vector2 center, float radius, Rectangle rec ) Check collision between circle and rectangle @@ -1015,7 +1015,7 @@ Check collision between circle and rectangle */ int lshapesCheckCollisionCircleRec( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionCircleRec( Vector2 center, float radius, Rectangle rec )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionCircleRec( Vector2 center, float radius, Rectangle rec )" ); lua_pushnil( L ); return 1; } @@ -1031,7 +1031,7 @@ int lshapesCheckCollisionCircleRec( lua_State *L ) { } /* -> collision = RL_CheckCollisionPointRec( Vector2 point, Rectangle rec ) +> collision = RL.CheckCollisionPointRec( Vector2 point, Rectangle rec ) Check if point is inside rectangle @@ -1040,7 +1040,7 @@ Check if point is inside rectangle */ int lshapesCheckCollisionPointRec( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionPointRec( Vector2 point, Rectangle rec )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionPointRec( Vector2 point, Rectangle rec )" ); lua_pushnil( L ); return 1; } @@ -1054,7 +1054,7 @@ int lshapesCheckCollisionPointRec( lua_State *L ) { } /* -> collision = RL_CheckCollisionPointCircle( Vector2 point, Vector2 center, float radius ) +> collision = RL.CheckCollisionPointCircle( Vector2 point, Vector2 center, float radius ) Check if point is inside circle @@ -1063,7 +1063,7 @@ Check if point is inside circle */ int lshapesCheckCollisionPointCircle( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionPointCircle( Vector2 point, Vector2 center, float radius )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionPointCircle( Vector2 point, Vector2 center, float radius )" ); lua_pushnil( L ); return 1; } @@ -1079,7 +1079,7 @@ int lshapesCheckCollisionPointCircle( lua_State *L ) { } /* -> collision = RL_CheckCollisionPointTriangle( Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3 ) +> collision = RL.CheckCollisionPointTriangle( Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3 ) Check if point is inside a triangle @@ -1088,7 +1088,7 @@ Check if point is inside a triangle */ int lshapesCheckCollisionPointTriangle( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionPointTriangle( Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionPointTriangle( Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3 )" ); lua_pushnil( L ); return 1; } @@ -1106,7 +1106,7 @@ int lshapesCheckCollisionPointTriangle( lua_State *L ) { } /* -> collision, position = RL_CheckCollisionLines( Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2 ) +> collision, position = RL.CheckCollisionLines( Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2 ) Check the collision between two lines defined by two points each, returns collision point by reference @@ -1115,7 +1115,7 @@ Check the collision between two lines defined by two points each, returns collis */ int lshapesCheckCollisionLines( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionLines( Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionLines( Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2 )" ); lua_pushnil( L ); return 1; } @@ -1136,7 +1136,7 @@ int lshapesCheckCollisionLines( lua_State *L ) { } /* -> collision = RL_CheckCollisionPointLine( Vector2 point, Vector2 p1, Vector2 p2, int threshold ) +> collision = RL.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] @@ -1145,7 +1145,7 @@ Check if point belongs to line created between two points [p1] and [p2] with def */ int lshapesCheckCollisionPointLine( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_CheckCollisionPointLine( Vector2 point, Vector2 p1, Vector2 p2, int threshold )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionPointLine( Vector2 point, Vector2 p1, Vector2 p2, int threshold )" ); lua_pushnil( L ); return 1; } @@ -1163,7 +1163,7 @@ int lshapesCheckCollisionPointLine( lua_State *L ) { } /* -> rectangle = RL_GetCollisionRec( Rectangle rec1, Rectangle rec2 ) +> rectangle = RL.GetCollisionRec( Rectangle rec1, Rectangle rec2 ) Get collision rectangle for two rectangles collision @@ -1173,7 +1173,7 @@ Get collision rectangle for two rectangles collision int lshapesGetCollisionRec( lua_State *L ) { /* Rectangle rec1, Rectangle rec2 */ if ( !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetCollisionRec( Rectangle rec1, Rectangle rec2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCollisionRec( Rectangle rec1, Rectangle rec2 )" ); lua_pushnil( L ); return 1; } diff --git a/src/text.c b/src/text.c index f5f8b68..a7a3d06 100644 --- a/src/text.c +++ b/src/text.c @@ -34,7 +34,7 @@ bool validFont( size_t id ) { */ /* -> font = RL_LoadFont( string fileName ) +> font = RL.LoadFont( string fileName ) Load font from file into GPU memory ( VRAM ) @@ -43,7 +43,7 @@ Load font from file into GPU memory ( VRAM ) */ int ltextLoadFont( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadFont( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadFont( string fileName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -63,7 +63,7 @@ int ltextLoadFont( lua_State *L ) { } /* -> font = RL_LoadFontEx( string fileName, int fontSize ) +> font = RL.LoadFontEx( string fileName, int fontSize ) Load font from file with extended parameters. Loading the default character set @@ -72,7 +72,7 @@ Load font from file with extended parameters. Loading the default character set */ int ltextLoadFontEx( lua_State *L ) { if ( !lua_isstring( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadFontEx( string fileName, int fontSize )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadFontEx( string fileName, int fontSize )" ); lua_pushinteger( L, -1 ); return 1; } @@ -92,7 +92,7 @@ int ltextLoadFontEx( lua_State *L ) { } /* -> font = RL_LoadFontFromImage( Image image, Color key, int firstChar ) +> font = RL.LoadFontFromImage( Image image, Color key, int firstChar ) Load font from Image ( XNA style ) @@ -101,7 +101,7 @@ Load font from Image ( XNA style ) */ int ltextLoadFontFromImage( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadFontFromImage( Image image, Color key, int firstChar )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadFontFromImage( Image image, Color key, int firstChar )" ); lua_pushinteger( L, -1 ); return 1; } @@ -133,7 +133,7 @@ int ltextLoadFontFromImage( lua_State *L ) { } /* -> success = RL_UnloadFont( Font font ) +> success = RL.UnloadFont( Font font ) Unload Font from GPU memory ( VRAM ) @@ -142,7 +142,7 @@ Unload Font from GPU memory ( VRAM ) */ int ltextUnloadFont( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadFont( Font font )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadFont( Font font )" ); lua_pushboolean( L, false ); return 1; } @@ -164,7 +164,7 @@ int ltextUnloadFont( lua_State *L ) { */ /* -> success = RL_DrawFPS( Vector2 pos ) +> success = RL.DrawFPS( Vector2 pos ) Draw current FPS @@ -173,7 +173,7 @@ Draw current FPS */ int ltextDrawFPS( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawFPS( Vector2 pos )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawFPS( Vector2 pos )" ); lua_pushboolean( L, false ); return 1; } @@ -186,7 +186,7 @@ int ltextDrawFPS( lua_State *L ) { } /* -> success = RL_DrawText( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint ) +> success = RL.DrawText( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint ) Draw text using font and additional parameters @@ -196,7 +196,7 @@ Draw text using font and additional parameters int ltextDrawText( lua_State *L ) { if ( !lua_isnumber( L, -6 ) || !lua_isstring( L, -5 ) || !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawText( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawText( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -221,7 +221,7 @@ int ltextDrawText( lua_State *L ) { } /* -> success = RL_DrawTextPro( Font font, string text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint ) +> success = RL.DrawTextPro( Font font, string text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint ) Draw text using Font and pro parameters ( rotation ) @@ -231,7 +231,7 @@ Draw text using Font and pro parameters ( rotation ) int ltextDrawTextPro( lua_State *L ) { if ( !lua_isnumber( L, -8 ) || !lua_isstring( L, -7 ) || !lua_istable( L, -6 ) || !lua_istable( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTextPro( Font font, string text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTextPro( Font font, string text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -264,7 +264,7 @@ int ltextDrawTextPro( lua_State *L ) { */ /* -> size = RL_MeasureText( Font font, string text, float fontSize, float spacing ) +> size = RL.MeasureText( Font font, string text, float fontSize, float spacing ) Measure string size for Font @@ -273,7 +273,7 @@ Measure string size for Font */ int ltextMeasureText( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_isstring( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_MeasureText( Font font, string text, float fontSize, float spacing )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MeasureText( Font font, string text, float fontSize, float spacing )" ); lua_pushboolean( L, false ); return 1; } @@ -293,7 +293,7 @@ int ltextMeasureText( lua_State *L ) { } /* -> baseSize = RL_GetFontBaseSize( Font font ) +> baseSize = RL.GetFontBaseSize( Font font ) Get font baseSize @@ -302,7 +302,7 @@ Get font baseSize */ int ltextGetFontBaseSize( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetFontBaseSize( Font font )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFontBaseSize( Font font )" ); lua_pushboolean( L, false ); return 1; } @@ -318,7 +318,7 @@ int ltextGetFontBaseSize( lua_State *L ) { } /* -> glyphCount = RL_GetFontGlyphCount( Font font ) +> glyphCount = RL.GetFontGlyphCount( Font font ) Get font glyphCount @@ -327,7 +327,7 @@ Get font glyphCount */ int ltextGetFontGlyphCount( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetFontGlyphCount( Font font )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFontGlyphCount( Font font )" ); lua_pushboolean( L, false ); return 1; } @@ -343,7 +343,7 @@ int ltextGetFontGlyphCount( lua_State *L ) { } /* -> glyphPadding = RL_GetFontGlyphPadding( Font font ) +> glyphPadding = RL.GetFontGlyphPadding( Font font ) Get font glyphPadding @@ -352,7 +352,7 @@ Get font glyphPadding */ int ltextGetFontGlyphPadding( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetFontGlyphPadding( Font font )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFontGlyphPadding( Font font )" ); lua_pushboolean( L, false ); return 1; } diff --git a/src/textures.c b/src/textures.c index 5121718..6398971 100644 --- a/src/textures.c +++ b/src/textures.c @@ -136,7 +136,7 @@ Texture2D* texturesGetSourceTexture( size_t index ) { */ /* -> image = RL_LoadImage( string fileName ) +> image = RL.LoadImage( string fileName ) Load image from file into CPU memory ( RAM ) @@ -145,7 +145,7 @@ Load image from file into CPU memory ( RAM ) */ int ltexturesLoadImage( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadImage( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadImage( string fileName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -164,7 +164,7 @@ int ltexturesLoadImage( lua_State *L ) { } /* -> image = RL_LoadImageFromTexture( Texture2D texture ) +> image = RL.LoadImageFromTexture( Texture2D texture ) Load image from GPU texture data @@ -173,7 +173,7 @@ Load image from GPU texture data */ int ltexturesLoadImageFromTexture( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadImageFromTexture( Texture2D texture )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadImageFromTexture( Texture2D texture )" ); lua_pushinteger( L, -1 ); return 1; } @@ -191,7 +191,7 @@ int ltexturesLoadImageFromTexture( lua_State *L ) { } /* -> image = RL_LoadImageFromScreen() +> image = RL.LoadImageFromScreen() Load image from screen buffer and ( screenshot ) @@ -206,7 +206,7 @@ int ltexturesLoadImageFromScreen( lua_State *L ) { } /* -> success = RL_UnloadImage( Image image ) +> success = RL.UnloadImage( Image image ) Unload image from CPU memory ( RAM ) @@ -215,7 +215,7 @@ Unload image from CPU memory ( RAM ) */ int ltexturesUnloadImage( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadImage( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadImage( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -233,7 +233,7 @@ int ltexturesUnloadImage( lua_State *L ) { } /* -> success = RL_ExportImage( Image image, string fileName ) +> success = RL.ExportImage( Image image, string fileName ) Export image data to file, returns true on success @@ -242,7 +242,7 @@ Export image data to file, returns true on success */ int ltexturesExportImage( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ExportImage( Image image, string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportImage( Image image, string fileName )" ); lua_pushnil( L ); return 1; } @@ -258,7 +258,7 @@ int ltexturesExportImage( lua_State *L ) { } /* -> success = RL_ExportImageAsCode( Image image, string fileName ) +> success = RL.ExportImageAsCode( Image image, string fileName ) Export image as code file defining an array of bytes, returns true on success @@ -267,7 +267,7 @@ Export image as code file defining an array of bytes, returns true on success */ int ltexturesExportImageAsCode( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ExportImageAsCode( Image image, string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportImageAsCode( Image image, string fileName )" ); lua_pushnil( L ); return 1; } @@ -287,7 +287,7 @@ int ltexturesExportImageAsCode( lua_State *L ) { */ /* -> image = RL_GenImageColor( int width, int height, Color color ) +> image = RL.GenImageColor( int width, int height, Color color ) Generate image: plain color @@ -296,7 +296,7 @@ Generate image: plain color */ int ltexturesGenImageColor( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenImageColor( int width, int height, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageColor( int width, int height, Color color )" ); lua_pushinteger( L, -1 ); return 1; } @@ -314,7 +314,7 @@ int ltexturesGenImageColor( lua_State *L ) { } /* -> image = RL_GenImageGradientV( Vector2 size, Color top, Color bottom ) +> image = RL.GenImageGradientV( Vector2 size, Color top, Color bottom ) Generate image: vertical gradient @@ -323,7 +323,7 @@ Generate image: vertical gradient */ int ltexturesGenImageGradientV( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenImageGradientV( Vector2 size, Color top, Color bottom )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageGradientV( Vector2 size, Color top, Color bottom )" ); lua_pushinteger( L, -1 ); return 1; } @@ -341,7 +341,7 @@ int ltexturesGenImageGradientV( lua_State *L ) { } /* -> image = RL_GenImageGradientH( Vector2 size, Color left, Color right ) +> image = RL.GenImageGradientH( Vector2 size, Color left, Color right ) Generate image: horizontal gradient @@ -350,7 +350,7 @@ Generate image: horizontal gradient */ int ltexturesGenImageGradientH( lua_State *L ) { if ( !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenImageGradientH( Vector2 size, Color left, Color right )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageGradientH( Vector2 size, Color left, Color right )" ); lua_pushinteger( L, -1 ); return 1; } @@ -368,7 +368,7 @@ int ltexturesGenImageGradientH( lua_State *L ) { } /* -> image = RL_GenImageGradientRadial( Vector2 size, float density, Color inner, Color outer ) +> image = RL.GenImageGradientRadial( Vector2 size, float density, Color inner, Color outer ) Generate image: radial gradient @@ -377,7 +377,7 @@ Generate image: radial gradient */ int ltexturesGenImageGradientRadial( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenImageGradientRadial( Vector2 size, float density, Color inner, Color outer )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageGradientRadial( Vector2 size, float density, Color inner, Color outer )" ); lua_pushinteger( L, -1 ); return 1; } @@ -397,7 +397,7 @@ int ltexturesGenImageGradientRadial( lua_State *L ) { } /* -> image = RL_GenImageChecked( Vector2 size, Vector2 checks, Color col1, Color col2 ) +> image = RL.GenImageChecked( Vector2 size, Vector2 checks, Color col1, Color col2 ) Generate image: checked @@ -406,7 +406,7 @@ Generate image: checked */ int ltexturesGenImageChecked( lua_State *L ) { if ( !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenImageChecked( Vector2 size, Vector2 checks, Color col1, Color col2 )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageChecked( Vector2 size, Vector2 checks, Color col1, Color col2 )" ); lua_pushinteger( L, -1 ); return 1; } @@ -426,7 +426,7 @@ int ltexturesGenImageChecked( lua_State *L ) { } /* -> image = RL_GenImageWhiteNoise( Vector2 size, float factor ) +> image = RL.GenImageWhiteNoise( Vector2 size, float factor ) Generate image: white noise @@ -435,7 +435,7 @@ Generate image: white noise */ int ltexturesGenImageWhiteNoise( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenImageWhiteNoise( Vector2 size, float factor )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageWhiteNoise( Vector2 size, float factor )" ); lua_pushinteger( L, -1 ); return 1; } @@ -451,7 +451,7 @@ int ltexturesGenImageWhiteNoise( lua_State *L ) { } /* -> image = RL_GenImageCellular( Vector2 size, int tileSize ) +> image = RL.GenImageCellular( Vector2 size, int tileSize ) Generate image: cellular algorithm. Bigger tileSize means bigger cells @@ -460,7 +460,7 @@ Generate image: cellular algorithm. Bigger tileSize means bigger cells */ int ltexturesGenImageCellular( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenImageCellular( Vector2 size, int tileSize )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageCellular( Vector2 size, int tileSize )" ); lua_pushinteger( L, -1 ); return 1; } @@ -480,7 +480,7 @@ int ltexturesGenImageCellular( lua_State *L ) { */ /* -> image = RL_ImageCopy( Image image ) +> image = RL.ImageCopy( Image image ) Create an image duplicate ( useful for transformations ) @@ -489,7 +489,7 @@ Create an image duplicate ( useful for transformations ) */ int ltexturesImageCopy( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageCopy( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageCopy( Image image )" ); lua_pushinteger( L, -1 ); return 1; } @@ -507,7 +507,7 @@ int ltexturesImageCopy( lua_State *L ) { } /* -> image = RL_ImageFromImage( Image image, Rectangle rec ) +> image = RL.ImageFromImage( Image image, Rectangle rec ) Create an image from another image piece @@ -516,7 +516,7 @@ Create an image from another image piece */ int ltexturesImageFromImage( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageFromImage( Image image, Rectangle rec )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageFromImage( Image image, Rectangle rec )" ); lua_pushinteger( L, -1 ); return 1; } @@ -536,7 +536,7 @@ int ltexturesImageFromImage( lua_State *L ) { } /* -> image = RL_ImageText( Font font, string text, float fontSize, float spacing, Color tint ) +> image = RL.ImageText( Font font, string text, float fontSize, float spacing, Color tint ) Create an image from text ( custom sprite font ) @@ -546,7 +546,7 @@ Create an image from text ( custom sprite font ) int ltexturesImageText( lua_State *L ) { if ( !lua_isnumber( L, -5 ) || !lua_isstring( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageText( Font font, string text, float fontSize, float spacing, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageText( Font font, string text, float fontSize, float spacing, Color tint )" ); lua_pushinteger( L, -1 ); return 1; } @@ -570,7 +570,7 @@ int ltexturesImageText( lua_State *L ) { } /* -> success = RL_ImageFormat( Image image, int newFormat ) +> success = RL.ImageFormat( Image image, int newFormat ) Convert image data to desired format @@ -579,7 +579,7 @@ Convert image data to desired format */ int ltexturesImageFormat( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageFormat( Image image, int newFormat )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageFormat( Image image, int newFormat )" ); lua_pushboolean( L, false ); return 1; } @@ -598,7 +598,7 @@ int ltexturesImageFormat( lua_State *L ) { } /* -> success = RL_ImageToPOT( Image image, Color fill ) +> success = RL.ImageToPOT( Image image, Color fill ) Convert image to POT ( power-of-two ) @@ -607,7 +607,7 @@ Convert image to POT ( power-of-two ) */ int ltexturesImageToPOT( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageToPOT( Image image, Color fill )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageToPOT( Image image, Color fill )" ); lua_pushboolean( L, false ); return 1; } @@ -626,7 +626,7 @@ int ltexturesImageToPOT( lua_State *L ) { } /* -> success = RL_ImageCrop( Image image, Rectangle crop ) +> success = RL.ImageCrop( Image image, Rectangle crop ) Crop an image to a defined rectangle @@ -635,7 +635,7 @@ Crop an image to a defined rectangle */ int ltexturesImageCrop( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageCrop( Image image, Rectangle crop )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageCrop( Image image, Rectangle crop )" ); lua_pushboolean( L, false ); return 1; } @@ -654,7 +654,7 @@ int ltexturesImageCrop( lua_State *L ) { } /* -> success = RL_ImageAlphaCrop( Image image, float threshold ) +> success = RL.ImageAlphaCrop( Image image, float threshold ) Crop image depending on alpha value @@ -663,7 +663,7 @@ Crop image depending on alpha value */ int ltexturesImageAlphaCrop( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageAlphaCrop( Image image, float threshold )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageAlphaCrop( Image image, float threshold )" ); lua_pushboolean( L, false ); return 1; } @@ -682,7 +682,7 @@ int ltexturesImageAlphaCrop( lua_State *L ) { } /* -> success = RL_ImageAlphaClear( Image image, Color color, float threshold ) +> success = RL.ImageAlphaClear( Image image, Color color, float threshold ) Clear alpha channel to desired color @@ -691,7 +691,7 @@ Clear alpha channel to desired color */ int ltexturesImageAlphaClear( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageAlphaClear( Image image, Color color, float threshold )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageAlphaClear( Image image, Color color, float threshold )" ); lua_pushboolean( L, false ); return 1; } @@ -712,7 +712,7 @@ int ltexturesImageAlphaClear( lua_State *L ) { } /* -> success = RL_ImageAlphaMask( Image image, Image alphaMask ) +> success = RL.ImageAlphaMask( Image image, Image alphaMask ) Apply alpha mask to image @@ -721,7 +721,7 @@ Apply alpha mask to image */ int ltexturesImageAlphaMask( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageAlphaMask( Image image, Image alphaMask )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageAlphaMask( Image image, Image alphaMask )" ); lua_pushboolean( L, false ); return 1; } @@ -740,7 +740,7 @@ int ltexturesImageAlphaMask( lua_State *L ) { } /* -> success = RL_ImageAlphaPremultiply( Image image ) +> success = RL.ImageAlphaPremultiply( Image image ) Premultiply alpha channel @@ -749,7 +749,7 @@ Premultiply alpha channel */ int ltexturesImageAlphaPremultiply( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageAlphaPremultiply( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageAlphaPremultiply( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -766,7 +766,7 @@ int ltexturesImageAlphaPremultiply( lua_State *L ) { } /* -> success = RL_ImageResize( Image image, Vector2 size ) +> success = RL.ImageResize( Image image, Vector2 size ) Resize image ( Bicubic scaling algorithm ) @@ -775,7 +775,7 @@ Resize image ( Bicubic scaling algorithm ) */ int ltexturesImageResize( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageResize( Image image, Vector2 size )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageResize( Image image, Vector2 size )" ); lua_pushboolean( L, false ); return 1; } @@ -794,7 +794,7 @@ int ltexturesImageResize( lua_State *L ) { } /* -> success = RL_ImageResizeNN( Image image, Vector2 size ) +> success = RL.ImageResizeNN( Image image, Vector2 size ) Resize image ( Nearest-Neighbor scaling algorithm ) @@ -803,7 +803,7 @@ Resize image ( Nearest-Neighbor scaling algorithm ) */ int ltexturesImageResizeNN( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageResizeNN( Image image, Vector2 size )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageResizeNN( Image image, Vector2 size )" ); lua_pushboolean( L, false ); return 1; } @@ -822,7 +822,7 @@ int ltexturesImageResizeNN( lua_State *L ) { } /* -> success = RL_ImageResizeCanvas( Image image, Vector2 size, Vector2 offset, Color fill ) +> success = RL.ImageResizeCanvas( Image image, Vector2 size, Vector2 offset, Color fill ) Resize canvas and fill with color @@ -831,7 +831,7 @@ Resize canvas and fill with color */ int ltexturesImageResizeCanvas( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageResizeCanvas( Image image, Vector2 size, Vector2 offset, Color fill )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageResizeCanvas( Image image, Vector2 size, Vector2 offset, Color fill )" ); lua_pushboolean( L, false ); return 1; } @@ -854,7 +854,7 @@ int ltexturesImageResizeCanvas( lua_State *L ) { } /* -> success = RL_ImageMipmaps( Image image ) +> success = RL.ImageMipmaps( Image image ) Generate all mipmap levels for a provided image @@ -863,7 +863,7 @@ Generate all mipmap levels for a provided image */ int ltexturesImageMipmaps( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageMipmaps( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageMipmaps( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -880,7 +880,7 @@ int ltexturesImageMipmaps( lua_State *L ) { } /* -> success = RL_ImageDither( Image image, Color bpp ) +> success = RL.ImageDither( Image image, Color bpp ) Dither image data to 16bpp or lower ( Floyd-Steinberg dithering ) @@ -889,7 +889,7 @@ Dither image data to 16bpp or lower ( Floyd-Steinberg dithering ) */ int ltexturesImageDither( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageDither( Image image, Color bpp )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDither( Image image, Color bpp )" ); lua_pushboolean( L, false ); return 1; } @@ -908,7 +908,7 @@ int ltexturesImageDither( lua_State *L ) { } /* -> success = RL_ImageFlipVertical( Image image ) +> success = RL.ImageFlipVertical( Image image ) Flip image vertically @@ -917,7 +917,7 @@ Flip image vertically */ int ltexturesImageFlipVertical( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageFlipVertical( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageFlipVertical( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -934,7 +934,7 @@ int ltexturesImageFlipVertical( lua_State *L ) { } /* -> success = RL_ImageFlipHorizontal( Image image ) +> success = RL.ImageFlipHorizontal( Image image ) Flip image horizontally @@ -943,7 +943,7 @@ Flip image horizontally */ int ltexturesImageFlipHorizontal( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageFlipHorizontal( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageFlipHorizontal( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -960,7 +960,7 @@ int ltexturesImageFlipHorizontal( lua_State *L ) { } /* -> success = RL_ImageRotateCW( Image image ) +> success = RL.ImageRotateCW( Image image ) Rotate image clockwise 90deg @@ -969,7 +969,7 @@ Rotate image clockwise 90deg */ int ltexturesImageRotateCW( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageRotateCW( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageRotateCW( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -986,7 +986,7 @@ int ltexturesImageRotateCW( lua_State *L ) { } /* -> success = RL_ImageRotateCCW( Image image ) +> success = RL.ImageRotateCCW( Image image ) Rotate image counter-clockwise 90deg @@ -995,7 +995,7 @@ Rotate image counter-clockwise 90deg */ int ltexturesImageRotateCCW( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageRotateCCW( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageRotateCCW( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -1012,7 +1012,7 @@ int ltexturesImageRotateCCW( lua_State *L ) { } /* -> success = RL_ImageColorTint( Image image, Color color ) +> success = RL.ImageColorTint( Image image, Color color ) Modify image color: tint @@ -1021,7 +1021,7 @@ Modify image color: tint */ int ltexturesImageColorTint( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageColorTint( Image image, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorTint( Image image, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1040,7 +1040,7 @@ int ltexturesImageColorTint( lua_State *L ) { } /* -> success = RL_ImageColorInvert( Image image ) +> success = RL.ImageColorInvert( Image image ) Modify image color: invert @@ -1049,7 +1049,7 @@ Modify image color: invert */ int ltexturesImageColorInvert( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageColorInvert( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorInvert( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -1066,7 +1066,7 @@ int ltexturesImageColorInvert( lua_State *L ) { } /* -> success = RL_ImageColorGrayscale( Image image ) +> success = RL.ImageColorGrayscale( Image image ) Modify image color: grayscale @@ -1075,7 +1075,7 @@ Modify image color: grayscale */ int ltexturesImageColorGrayscale( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageColorGrayscale( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorGrayscale( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -1092,7 +1092,7 @@ int ltexturesImageColorGrayscale( lua_State *L ) { } /* -> success = RL_ImageColorContrast( Image image, float contrast ) +> success = RL.ImageColorContrast( Image image, float contrast ) Modify image color: contrast ( -100 to 100 ) @@ -1101,7 +1101,7 @@ Modify image color: contrast ( -100 to 100 ) */ int ltexturesImageColorContrast( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageColorContrast( Image image, float contrast )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorContrast( Image image, float contrast )" ); lua_pushboolean( L, false ); return 1; } @@ -1120,7 +1120,7 @@ int ltexturesImageColorContrast( lua_State *L ) { } /* -> success = RL_ImageColorBrightness( Image image, int brightness ) +> success = RL.ImageColorBrightness( Image image, int brightness ) Modify image color: brightness ( -255 to 255 ) @@ -1129,7 +1129,7 @@ Modify image color: brightness ( -255 to 255 ) */ int ltexturesImageColorBrightness( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageColorBrightness( Image image, int brightness )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorBrightness( Image image, int brightness )" ); lua_pushboolean( L, false ); return 1; } @@ -1148,7 +1148,7 @@ int ltexturesImageColorBrightness( lua_State *L ) { } /* -> success = RL_ImageColorReplace( Image image, Color color, Color replace ) +> success = RL.ImageColorReplace( Image image, Color color, Color replace ) Modify image color: replace color @@ -1157,7 +1157,7 @@ Modify image color: replace color */ int ltexturesImageColorReplace( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageColorReplace( Image image, Color color, Color replace )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorReplace( Image image, Color color, Color replace )" ); lua_pushboolean( L, false ); return 1; } @@ -1178,7 +1178,7 @@ int ltexturesImageColorReplace( lua_State *L ) { } /* -> colors = RL_LoadImageColors( Image image ) +> colors = RL.LoadImageColors( Image image ) Load color data from image as a Color array ( RGBA - 32bit ) @@ -1187,7 +1187,7 @@ Load color data from image as a Color array ( RGBA - 32bit ) */ int ltexturesLoadImageColors( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadImageColors( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadImageColors( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -1213,7 +1213,7 @@ int ltexturesLoadImageColors( lua_State *L ) { } /* -> colors = RL_LoadImagePalette( Image image, int maxPaletteSize ) +> colors = RL.LoadImagePalette( Image image, int maxPaletteSize ) Load colors palette from image as a Color array ( RGBA - 32bit ) @@ -1222,7 +1222,7 @@ Load colors palette from image as a Color array ( RGBA - 32bit ) */ int ltexturesLoadImagePalette( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadImagePalette( Image image, int maxPaletteSize )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadImagePalette( Image image, int maxPaletteSize )" ); lua_pushboolean( L, false ); return 1; } @@ -1250,7 +1250,7 @@ int ltexturesLoadImagePalette( lua_State *L ) { } /* -> rectangle = RL_GetImageAlphaBorder( Image image, float threshold ) +> rectangle = RL.GetImageAlphaBorder( Image image, float threshold ) Get image alpha border rectangle @@ -1259,7 +1259,7 @@ Get image alpha border rectangle */ int ltexturesGetImageAlphaBorder( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetImageAlphaBorder( Image image, float threshold )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageAlphaBorder( Image image, float threshold )" ); lua_pushboolean( L, false ); return 1; } @@ -1277,7 +1277,7 @@ int ltexturesGetImageAlphaBorder( lua_State *L ) { } /* -> color = RL_GetImageColor( Image image, Vector2 pixelPos ) +> color = RL.GetImageColor( Image image, Vector2 pixelPos ) Get image pixel color at ( x, y ) position @@ -1286,7 +1286,7 @@ Get image pixel color at ( x, y ) position */ int ltexturesGetImageColor( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetImageColor( Image image, Vector2 pixelPos )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageColor( Image image, Vector2 pixelPos )" ); lua_pushboolean( L, false ); return 1; } @@ -1308,7 +1308,7 @@ int ltexturesGetImageColor( lua_State *L ) { */ /* -> success = RL_ImageClearBackground( Image dst, Color color ) +> success = RL.ImageClearBackground( Image dst, Color color ) Clear image background with given color @@ -1317,7 +1317,7 @@ Clear image background with given color */ int ltexturesImageClearBackground( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageClearBackground( Image dst, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageClearBackground( Image dst, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1337,7 +1337,7 @@ int ltexturesImageClearBackground( lua_State *L ) { } /* -> success = RL_ImageDrawPixel( Image dst, Vector2 position, Color color ) +> success = RL.ImageDrawPixel( Image dst, Vector2 position, Color color ) Draw pixel within an image @@ -1346,7 +1346,7 @@ Draw pixel within an image */ int ltexturesImageDrawPixel( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageDrawPixel( Image dst, Vector2 position, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawPixel( Image dst, Vector2 position, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1368,7 +1368,7 @@ int ltexturesImageDrawPixel( lua_State *L ) { } /* -> success = RL_ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color ) +> success = RL.ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color ) Draw line within an image @@ -1377,7 +1377,7 @@ Draw line within an image */ int ltexturesImageDrawLine( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1401,7 +1401,7 @@ int ltexturesImageDrawLine( lua_State *L ) { } /* -> success = RL_ImageDrawCircle( Image dst, Vector2 center, int radius, Color color ) +> success = RL.ImageDrawCircle( Image dst, Vector2 center, int radius, Color color ) Draw circle within an image @@ -1410,7 +1410,7 @@ Draw circle within an image */ int ltexturesImageDrawCircle( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageDrawCircle( Image dst, Vector2 center, int radius, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawCircle( Image dst, Vector2 center, int radius, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1434,7 +1434,7 @@ int ltexturesImageDrawCircle( lua_State *L ) { } /* -> success = RL_ImageDrawRectangle( Image dst, Rectangle rec, Color color ) +> success = RL.ImageDrawRectangle( Image dst, Rectangle rec, Color color ) Draw rectangle within an image @@ -1443,7 +1443,7 @@ Draw rectangle within an image */ int ltexturesImageDrawRectangle( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageDrawRectangle( Image dst, Rectangle rec, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawRectangle( Image dst, Rectangle rec, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1465,7 +1465,7 @@ int ltexturesImageDrawRectangle( lua_State *L ) { } /* -> success = RL_DrawRectangleLines( Image dst, Rectangle rec, int thick, Color color ) +> success = RL.ImageDrawRectangleLines( Image dst, Rectangle rec, int thick, Color color ) Draw rectangle lines within an image @@ -1474,7 +1474,7 @@ Draw rectangle lines within an image */ int ltexturesImageDrawRectangleLines( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawRectangleLines( Image dst, Rectangle rec, int thick, Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawRectangleLines( Image dst, Rectangle rec, int thick, Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -1498,7 +1498,7 @@ int ltexturesImageDrawRectangleLines( lua_State *L ) { } /* -> success = RL_ImageDraw( Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint ) +> success = RL.ImageDraw( Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint ) Draw a source image within a destination image ( Tint applied to source ) @@ -1507,7 +1507,7 @@ Draw a source image within a destination image ( Tint applied to source ) */ int ltexturesImageDraw( lua_State *L ) { if ( !lua_isnumber( L, -5 ) || !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageDraw( Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDraw( Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -1533,7 +1533,7 @@ int ltexturesImageDraw( lua_State *L ) { } /* -> success = RL_ImageDrawTextEx( Image dst, Font font, string text, Vector2 position, float fontSize, float spacing, Color tint ) +> success = RL.ImageDrawTextEx( Image dst, Font font, string text, Vector2 position, float fontSize, float spacing, Color tint ) Draw text ( Custom sprite font ) within an image ( Destination ) @@ -1543,7 +1543,7 @@ Draw text ( Custom sprite font ) within an image ( Destination ) int ltexturesImageDrawTextEx( lua_State *L ) { if ( !lua_isnumber( L, -7 ) || !lua_isnumber( L, -6 ) || !lua_isstring( L, -5 ) || !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ImageDrawTextEx( Image dst, Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawTextEx( Image dst, Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -1574,7 +1574,7 @@ int ltexturesImageDrawTextEx( lua_State *L ) { */ /* -> size = RL_GetImageSize( Image image ) +> size = RL.GetImageSize( Image image ) Get image size @@ -1583,7 +1583,7 @@ Get image size */ int ltexturesGetImageSize( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetImageSize( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageSize( Image image )" ); lua_pushnil( L ); return 1; } @@ -1601,7 +1601,7 @@ int ltexturesGetImageSize( lua_State *L ) { } /* -> mipmaps = RL_GetImageMipmaps( Image image ) +> mipmaps = RL.GetImageMipmaps( Image image ) Get image mipmaps. Mipmap levels, 1 by default @@ -1610,7 +1610,7 @@ Get image mipmaps. Mipmap levels, 1 by default */ int ltexturesGetImageMipmaps( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetImageMipmaps( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageMipmaps( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -1626,7 +1626,7 @@ int ltexturesGetImageMipmaps( lua_State *L ) { } /* -> format = RL_GetImageFormat( Image image ) +> format = RL.GetImageFormat( Image image ) Get image data format ( PixelFormat type ) @@ -1635,7 +1635,7 @@ Get image data format ( PixelFormat type ) */ int ltexturesGetImageFormat( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetImageFormat( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageFormat( Image image )" ); lua_pushboolean( L, false ); return 1; } @@ -1655,7 +1655,7 @@ int ltexturesGetImageFormat( lua_State *L ) { */ /* -> texture = RL_LoadTexture( string fileName ) +> texture = RL.LoadTexture( string fileName ) Load texture from file into GPU memory ( VRAM ) @@ -1664,7 +1664,7 @@ Load texture from file into GPU memory ( VRAM ) */ int ltexturesLoadTexture( lua_State *L ) { if ( !lua_isstring( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadTexture( string fileName )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadTexture( string fileName )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1682,7 +1682,7 @@ int ltexturesLoadTexture( lua_State *L ) { } /* -> texture = RL_LoadTextureFromImage( Image image ) +> texture = RL.LoadTextureFromImage( Image image ) Load texture from image data @@ -1691,7 +1691,7 @@ Load texture from image data */ int ltexturesLoadTextureFromImage( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadTextureFromImage( Image image )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadTextureFromImage( Image image )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1709,7 +1709,7 @@ int ltexturesLoadTextureFromImage( lua_State *L ) { } /* -> texture = RL_LoadTextureCubemap( Image image, int layout ) +> texture = RL.LoadTextureCubemap( Image image, int layout ) Load cubemap from image, multiple image cubemap layouts supported @@ -1718,7 +1718,7 @@ Load cubemap from image, multiple image cubemap layouts supported */ int ltexturesLoadTextureCubemap( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadTextureCubemap( Image image, int layout )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadTextureCubemap( Image image, int layout )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1737,7 +1737,7 @@ int ltexturesLoadTextureCubemap( lua_State *L ) { } /* -> renderTexture = RL_LoadRenderTexture( Vector2 size ) +> renderTexture = RL.LoadRenderTexture( Vector2 size ) Load texture for rendering ( framebuffer ) @@ -1746,7 +1746,7 @@ Load texture for rendering ( framebuffer ) */ int ltexturesLoadRenderTexture( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_LoadRenderTexture( Vector2 size )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadRenderTexture( Vector2 size )" ); lua_pushinteger( L, -1 ); return 1; } @@ -1767,7 +1767,7 @@ int ltexturesLoadRenderTexture( lua_State *L ) { } /* -> success = RL_UnloadTexture( Texture2D texture ) +> success = RL.UnloadTexture( Texture2D texture ) Unload texture from GPU memory ( VRAM ) @@ -1776,7 +1776,7 @@ Unload texture from GPU memory ( VRAM ) */ int ltexturesUnloadTexture( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadTexture( Texture2D texture )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadTexture( Texture2D texture )" ); lua_pushboolean( L, false ); return 1; } @@ -1794,7 +1794,7 @@ int ltexturesUnloadTexture( lua_State *L ) { } /* -> success = RL_UnloadRenderTexture( RenderTexture2D target ) +> success = RL.UnloadRenderTexture( RenderTexture2D target ) Unload render texture from GPU memory ( VRAM ) @@ -1803,7 +1803,7 @@ Unload render texture from GPU memory ( VRAM ) */ int ltexturesUnloadRenderTexture( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UnloadRenderTexture( RenderTexture2D target )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadRenderTexture( RenderTexture2D target )" ); lua_pushboolean( L, false ); return 1; } @@ -1821,7 +1821,7 @@ int ltexturesUnloadRenderTexture( lua_State *L ) { } /* -> success = RL_UpdateTexture( Texture2D texture, int pixels{ {} } ) +> success = RL.UpdateTexture( Texture2D texture, int{} pixels ) Update GPU texture with new data NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format @@ -1831,7 +1831,7 @@ NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, */ int ltexturesUpdateTexture( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UpdateTexture( Texture2D texture, int pixels{ {} } )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateTexture( Texture2D texture, int{} pixels )" ); lua_pushboolean( L, false ); return 1; } @@ -1873,7 +1873,7 @@ int ltexturesUpdateTexture( lua_State *L ) { } /* -> success = RL_UpdateTextureRec( Texture2D texture, Rectangle rec, int pixels{ {} } ) +> success = RL.UpdateTextureRec( Texture2D texture, Rectangle rec, int{} pixels ) Update GPU texture rectangle with new data NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format @@ -1883,7 +1883,7 @@ NOTE! Should be TEXTURE_SOURCE_TEXTURE. Pixel should be in format { { 255, 255, */ int ltexturesUpdateTextureRec( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_UpdateTextureRec( Texture2D texture, Rectangle rec, int pixels{ {} } )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateTextureRec( Texture2D texture, Rectangle rec, int{} pixels )" ); lua_pushboolean( L, false ); return 1; } @@ -1933,7 +1933,7 @@ int ltexturesUpdateTextureRec( lua_State *L ) { */ /* -> success = RL_DrawTexture( Texture2D texture, Vector2 position, Color tint ) +> success = RL.DrawTexture( Texture2D texture, Vector2 position, Color tint ) Draw a Texture2D @@ -1942,7 +1942,7 @@ Draw a Texture2D */ int ltexturesDrawTexture( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTexture( Texture2D texture, Vector2 position, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTexture( Texture2D texture, Vector2 position, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -1964,7 +1964,7 @@ int ltexturesDrawTexture( lua_State *L ) { } /* -> success = RL_DrawTextureRec( Texture2D texture, Rectangle source, Vector2 position, Color tint ) +> success = RL.DrawTextureRec( Texture2D texture, Rectangle source, Vector2 position, Color tint ) Draw a part of a texture defined by a rectangle @@ -1973,7 +1973,7 @@ Draw a part of a texture defined by a rectangle */ int ltexturesDrawTextureRec( lua_State *L ) { if ( !lua_isnumber( L, -4 ) || !lua_istable( L, -3 ) || !lua_istable( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTextureRec( Texture2D texture, Rectangle source, Vector2 position, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTextureRec( Texture2D texture, Rectangle source, Vector2 position, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -1997,7 +1997,7 @@ int ltexturesDrawTextureRec( lua_State *L ) { } /* -> success = RL_DrawTextureTiled( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint ) +> success = RL.DrawTextureTiled( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint ) Draw part of a texture ( defined by a rectangle ) with rotation and scale tiled into dest @@ -2007,7 +2007,7 @@ Draw part of a texture ( defined by a rectangle ) with rotation and scale tiled int ltexturesDrawTextureTiled( lua_State *L ) { if ( !lua_isnumber( L, -7 ) || !lua_istable( L, -6 ) || !lua_istable( L, -5 ) || !lua_istable( L, -4 ) || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTextureTiled( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTextureTiled( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -2037,7 +2037,7 @@ int ltexturesDrawTextureTiled( lua_State *L ) { } /* -> success = RL_DrawTexturePro( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint ) +> success = RL.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 @@ -2047,7 +2047,7 @@ Draw a part of a texture defined by a rectangle with "pro" parameters int ltexturesDrawTexturePro( lua_State *L ) { if ( !lua_isnumber( L, -6 ) || !lua_istable( L, -5 ) || !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTexturePro( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTexturePro( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -2075,7 +2075,7 @@ int ltexturesDrawTexturePro( lua_State *L ) { } /* -> success = RL_DrawTextureNPatch( Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint ) +> success = RL.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 @@ -2085,7 +2085,7 @@ Draws a texture ( or part of it ) that stretches or shrinks nicely int ltexturesDrawTextureNPatch( lua_State *L ) { if ( !lua_isnumber( L, -6 ) || !lua_istable( L, -5 ) || !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTextureNPatch( Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTextureNPatch( Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -2113,7 +2113,7 @@ int ltexturesDrawTextureNPatch( lua_State *L ) { } /* -> success = RL_DrawTexturePoly( Texture2D texture, Vector2 center, Vector2{} points, Vector2{} texcoords, int pointsCount, Color tint ) +> success = RL.DrawTexturePoly( Texture2D texture, Vector2 center, Vector2{} points, Vector2{} texcoords, int pointsCount, Color tint ) Draw a textured polygon ( Convex ) @@ -2123,7 +2123,7 @@ Draw a textured polygon ( Convex ) int ltexturesDrawTexturePoly( lua_State *L ) { if ( !lua_isnumber( L, -6 ) || !lua_istable( L, -5 ) || !lua_istable( L, -4 ) || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_DrawTexturePoly( Texture2D texture, Vector2 center, Vector2 points{}, Vector2 texcoords{}, int pointsCount, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTexturePoly( Texture2D texture, Vector2 center, Vector2 points{}, Vector2 texcoords{}, int pointsCount, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -2171,7 +2171,7 @@ int ltexturesDrawTexturePoly( lua_State *L ) { } /* -> success = RL_BeginTextureMode( RenderTexture2D target ) +> success = RL.BeginTextureMode( RenderTexture2D target ) Begin drawing to render texture @@ -2180,7 +2180,7 @@ Begin drawing to render texture */ int ltexturesBeginTextureMode( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_BeginTextureMode( RenderTexture2D target )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginTextureMode( RenderTexture2D target )" ); lua_pushboolean( L, false ); return 1; } @@ -2198,7 +2198,7 @@ int ltexturesBeginTextureMode( lua_State *L ) { } /* -> RL_EndTextureMode() +> RL.EndTextureMode() Ends drawing to render texture */ @@ -2209,7 +2209,7 @@ int ltexturesEndTextureMode( lua_State *L ) { } /* -> success = RL_SetTextureSource( int textureSource ) +> success = RL.SetTextureSource( int textureSource ) Set what texture source to use ( TEXTURE_SOURCE_TEXTURE or TEXTURE_SOURCE_RENDER_TEXTURE ) @@ -2218,7 +2218,7 @@ Set what texture source to use ( TEXTURE_SOURCE_TEXTURE or TEXTURE_SOURCE_RENDER */ int ltexturesSetTextureSource( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetTextureSource( int textureSource )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetTextureSource( int textureSource )" ); lua_pushboolean( L, false ); return 1; } @@ -2237,7 +2237,7 @@ int ltexturesSetTextureSource( lua_State *L ) { } /* -> textureSource = RL_GetTextureSource() +> textureSource = RL.GetTextureSource() Get current texture source type ( TEXTURE_SOURCE_TEXTURE or TEXTURE_SOURCE_RENDER_TEXTURE ) @@ -2254,7 +2254,7 @@ int ltexturesGetTextureSource( lua_State *L ) { */ /* -> success = RL_GenTextureMipmaps( Texture2D texture ) +> success = RL.GenTextureMipmaps( Texture2D texture ) Generate GPU mipmaps for a texture @@ -2263,7 +2263,7 @@ Generate GPU mipmaps for a texture */ int ltexturesGenTextureMipmaps( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GenTextureMipmaps( Texture2D texture )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenTextureMipmaps( Texture2D texture )" ); lua_pushboolean( L, false ); return 1; } @@ -2282,7 +2282,7 @@ int ltexturesGenTextureMipmaps( lua_State *L ) { } /* -> success = RL_SetTextureFilter( Texture2D texture, int filter ) +> success = RL.SetTextureFilter( Texture2D texture, int filter ) Set texture scaling filter mode ( TEXTURE_FILTER_POINT, TEXTURE_FILTER_BILINEAR... ) @@ -2291,7 +2291,7 @@ Set texture scaling filter mode ( TEXTURE_FILTER_POINT, TEXTURE_FILTER_BILINEAR. */ int ltexturesSetTextureFilter( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetTextureFilter( Texture2D texture, int filter )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetTextureFilter( Texture2D texture, int filter )" ); lua_pushboolean( L, false ); return 1; } @@ -2310,7 +2310,7 @@ int ltexturesSetTextureFilter( lua_State *L ) { } /* -> success = RL_SetTextureWrap( Texture2D texture, int wrap ) +> success = RL.SetTextureWrap( Texture2D texture, int wrap ) Set texture wrapping mode ( TEXTURE_WRAP_REPEAT, TEXTURE_WRAP_CLAMP... ) @@ -2319,7 +2319,7 @@ Set texture wrapping mode ( TEXTURE_WRAP_REPEAT, TEXTURE_WRAP_CLAMP... ) */ int ltexturesSetTextureWrap( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_SetTextureWrap( Texture2D texture, int wrap )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetTextureWrap( Texture2D texture, int wrap )" ); lua_pushboolean( L, false ); return 1; } @@ -2339,7 +2339,7 @@ int ltexturesSetTextureWrap( lua_State *L ) { } /* -> size = RL_GetTextureSize( Texture2D texture ) +> size = RL.GetTextureSize( Texture2D texture ) Get texture size @@ -2348,7 +2348,7 @@ Get texture size */ int ltexturesGetTextureSize( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetTextureSize( Texture2D texture )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTextureSize( Texture2D texture )" ); lua_pushnil( L ); return 1; } @@ -2365,7 +2365,7 @@ int ltexturesGetTextureSize( lua_State *L ) { } /* -> mipmaps = RL_GetTextureMipmaps( Texture2D texture ) +> mipmaps = RL.GetTextureMipmaps( Texture2D texture ) Get texture mipmaps. Mipmap levels, 1 by default @@ -2374,7 +2374,7 @@ Get texture mipmaps. Mipmap levels, 1 by default */ int ltexturesGetTextureMipmaps( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetTextureMipmaps( Texture2D texture )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTextureMipmaps( Texture2D texture )" ); lua_pushboolean( L, false ); return 1; } @@ -2391,7 +2391,7 @@ int ltexturesGetTextureMipmaps( lua_State *L ) { } /* -> format = RL_GetTextureFormat( Texture2D texture ) +> format = RL.GetTextureFormat( Texture2D texture ) Get texture mipmaps. Mipmap levels, 1 by default @@ -2400,7 +2400,7 @@ Get texture mipmaps. Mipmap levels, 1 by default */ int ltexturesGetTextureFormat( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetTextureFormat( Texture2D texture )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTextureFormat( Texture2D texture )" ); lua_pushboolean( L, false ); return 1; } @@ -2421,7 +2421,7 @@ int ltexturesGetTextureFormat( lua_State *L ) { */ /* -> color = RL_Fade( Color color, float alpha ) +> color = RL.Fade( Color color, float alpha ) Returns color with alpha applied, alpha goes from 0.0f to 1.0f @@ -2430,7 +2430,7 @@ Returns color with alpha applied, alpha goes from 0.0f to 1.0f */ int ltexturesFade( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_Fade( Color color, float alpha )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Fade( Color color, float alpha )" ); lua_pushboolean( L, false ); return 1; } @@ -2444,7 +2444,7 @@ int ltexturesFade( lua_State *L ) { } /* -> value = RL_ColorToInt( Color color ) +> value = RL.ColorToInt( Color color ) Returns hexadecimal value for a Color @@ -2453,7 +2453,7 @@ Returns hexadecimal value for a Color */ int ltexturesColorToInt( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ColorToInt( Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorToInt( Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -2465,7 +2465,7 @@ int ltexturesColorToInt( lua_State *L ) { } /* -> color = RL_ColorNormalize( Color color ) +> color = RL.ColorNormalize( Color color ) Returns Color normalized as float [0..1] @@ -2474,7 +2474,7 @@ Returns Color normalized as float [0..1] */ int ltexturesColorNormalize( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ColorNormalize( Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorNormalize( Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -2486,7 +2486,7 @@ int ltexturesColorNormalize( lua_State *L ) { } /* -> color = RL_ColorFromNormalized( Vector4 normalized ) +> color = RL.ColorFromNormalized( Vector4 normalized ) Color from normalized values [0..1] @@ -2495,7 +2495,7 @@ Color from normalized values [0..1] */ int ltexturesColorFromNormalized( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ColorFromNormalized( Vector4 normalized )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorFromNormalized( Vector4 normalized )" ); lua_pushboolean( L, false ); return 1; } @@ -2507,7 +2507,7 @@ int ltexturesColorFromNormalized( lua_State *L ) { } /* -> HSV = RL_ColorToHSV( Color color ) +> HSV = RL.ColorToHSV( Color color ) Returns HSV values for a Color, hue [0..360], saturation/value [0..1] @@ -2516,7 +2516,7 @@ Returns HSV values for a Color, hue [0..360], saturation/value [0..1] */ int ltexturesColorToHSV( lua_State *L ) { if ( !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ColorToHSV( Color color )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorToHSV( Color color )" ); lua_pushboolean( L, false ); return 1; } @@ -2528,7 +2528,7 @@ int ltexturesColorToHSV( lua_State *L ) { } /* -> color = RL_ColorFromHSV( float hue, float saturation, float value ) +> color = RL.ColorFromHSV( float hue, float saturation, float value ) Returns a Color from HSV values, hue [0..360], saturation/value [0..1] @@ -2537,7 +2537,7 @@ Returns a Color from HSV values, hue [0..360], saturation/value [0..1] */ int ltexturesColorFromHSV( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ColorFromHSV( float hue, float saturation, float value )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorFromHSV( float hue, float saturation, float value )" ); lua_pushboolean( L, false ); return 1; } @@ -2547,7 +2547,7 @@ int ltexturesColorFromHSV( lua_State *L ) { } /* -> color = RL_ColorAlpha( Color color, float alpha ) +> color = RL.ColorAlpha( Color color, float alpha ) Returns color with alpha applied, alpha goes from 0.0f to 1.0f @@ -2556,7 +2556,7 @@ Returns color with alpha applied, alpha goes from 0.0f to 1.0f */ int ltexturesColorAlpha( lua_State *L ) { if ( !lua_istable( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ColorAlpha( Color color, float alpha )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorAlpha( Color color, float alpha )" ); lua_pushboolean( L, false ); return 1; } @@ -2570,7 +2570,7 @@ int ltexturesColorAlpha( lua_State *L ) { } /* -> color = RL_ColorAlphaBlend( Color dst, Color src, Color tint ) +> color = RL.ColorAlphaBlend( Color dst, Color src, Color tint ) Returns src alpha-blended into dst color with tint @@ -2579,7 +2579,7 @@ Returns src alpha-blended into dst color with tint */ int ltexturesColorAlphaBlend( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_ColorAlphaBlend( Color dst, Color src, Color tint )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorAlphaBlend( Color dst, Color src, Color tint )" ); lua_pushboolean( L, false ); return 1; } @@ -2595,7 +2595,7 @@ int ltexturesColorAlphaBlend( lua_State *L ) { } /* -> Color = RL_GetColor( unsigned int hexValue ) +> Color = RL.GetColor( unsigned int hexValue ) Get Color structure from hexadecimal value @@ -2604,7 +2604,7 @@ Get Color structure from hexadecimal value */ int ltexturesGetColor( lua_State *L ) { if ( !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetColor( unsigned int hexValue )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetColor( unsigned int hexValue )" ); lua_pushboolean( L, false ); return 1; } @@ -2614,7 +2614,7 @@ int ltexturesGetColor( lua_State *L ) { } /* -> Color = RL_GetPixelColor( Texture2D texture, Vector2 position ) +> Color = RL.GetPixelColor( Texture2D texture, Vector2 position ) Get pixel color from source texture @@ -2623,7 +2623,7 @@ Get pixel color from source texture */ int ltexturesGetPixelColor( lua_State *L ) { if ( !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetPixelColor( Texture2D texture, Vector2 position )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetPixelColor( Texture2D texture, Vector2 position )" ); lua_pushboolean( L, false ); return 1; } @@ -2645,7 +2645,7 @@ int ltexturesGetPixelColor( lua_State *L ) { } /* -> size = RL_GetPixelDataSize( int width, int height, int format ) +> size = RL.GetPixelDataSize( int width, int height, int format ) Get pixel data size in bytes for certain format @@ -2654,7 +2654,7 @@ Get pixel data size in bytes for certain format */ int ltexturesGetPixelDataSize( lua_State *L ) { if ( !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_isnumber( L, -1 ) ) { - TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_GetPixelDataSize( int width, int height, int format )" ); + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetPixelDataSize( int width, int height, int format )" ); lua_pushboolean( L, false ); return 1; } -- cgit v1.2.3