summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/audio.h92
-rw-r--r--include/core.h416
-rw-r--r--include/lgl.h2
-rw-r--r--include/lights.h24
-rw-r--r--include/lrlgl.h278
-rw-r--r--include/lua_core.h140
-rw-r--r--include/models.h206
-rw-r--r--include/platforms/core_desktop_sdl.h2
-rw-r--r--include/reasings.h50
-rw-r--r--include/rgui.h114
-rw-r--r--include/rmath.h220
-rw-r--r--include/shapes.h110
-rw-r--r--include/state.h12
-rw-r--r--include/text.h98
-rw-r--r--include/textures.h216
-rw-r--r--src/audio.c162
-rw-r--r--src/core.c620
-rw-r--r--src/easings.c50
-rw-r--r--src/gl.c6
-rw-r--r--src/lights.c50
-rw-r--r--src/lua_core.c298
-rw-r--r--src/main.c4
-rw-r--r--src/models.c362
-rw-r--r--src/platforms/core_desktop.c50
-rw-r--r--src/platforms/core_desktop_sdl.c12
-rw-r--r--src/platforms/core_web.c2
-rw-r--r--src/rgui.c130
-rw-r--r--src/rlgl.c310
-rw-r--r--src/rmath.c220
-rw-r--r--src/shapes.c114
-rw-r--r--src/state.c6
-rw-r--r--src/text.c180
-rw-r--r--src/textures.c396
33 files changed, 2476 insertions, 2476 deletions
diff --git a/include/audio.h b/include/audio.h
index 58afc7f..cee8f0b 100644
--- a/include/audio.h
+++ b/include/audio.h
@@ -1,52 +1,52 @@
#pragma once
/* Audio device management functions. */
-int laudioInitAudioDevice( lua_State *L );
-int laudioCloseAudioDevice( lua_State *L );
-int laudioIsAudioDeviceReady( lua_State *L );
-int laudioSetMasterVolume( lua_State *L );
-int laudioGetMasterVolume( lua_State *L );
+int laudioInitAudioDevice( lua_State* L );
+int laudioCloseAudioDevice( lua_State* L );
+int laudioIsAudioDeviceReady( lua_State* L );
+int laudioSetMasterVolume( lua_State* L );
+int laudioGetMasterVolume( lua_State* L );
/* Wave/Sound loading/unloading functions. */
-int laudioLoadSound( lua_State *L );
-int laudioLoadWave( lua_State *L );
-int laudioLoadWaveFromMemory( lua_State *L );
-int laudioIsWaveReady( lua_State *L );
-int laudioLoadSoundFromWave( lua_State *L );
-int laudioLoadSoundAlias( lua_State *L );
-int laudioIsSoundReady( lua_State *L );
-int laudioUnloadWave( lua_State *L );
-int laudioUnloadSound( lua_State *L );
-int laudioUnloadSoundAlias( lua_State *L );
-int laudioExportWave( lua_State *L );
-int laudioExportWaveAsCode( lua_State *L );
+int laudioLoadSound( lua_State* L );
+int laudioLoadWave( lua_State* L );
+int laudioLoadWaveFromMemory( lua_State* L );
+int laudioIsWaveReady( lua_State* L );
+int laudioLoadSoundFromWave( lua_State* L );
+int laudioLoadSoundAlias( lua_State* L );
+int laudioIsSoundReady( lua_State* L );
+int laudioUnloadWave( lua_State* L );
+int laudioUnloadSound( lua_State* L );
+int laudioUnloadSoundAlias( lua_State* L );
+int laudioExportWave( lua_State* L );
+int laudioExportWaveAsCode( lua_State* L );
/* Wave/Sound management functions. */
-int laudioPlaySound( lua_State *L );
-int laudioStopSound( lua_State *L );
-int laudioPauseSound( lua_State *L );
-int laudioResumeSound( lua_State *L );
-int laudioIsSoundPlaying( lua_State *L );
-int laudioSetSoundVolume( lua_State *L );
-int laudioSetSoundPitch( lua_State *L );
-int laudioSetSoundPan( lua_State *L );
-int laudioWaveFormat( lua_State *L );
-int laudioWaveCopy( lua_State *L );
-int laudioWaveCrop( lua_State *L );
+int laudioPlaySound( lua_State* L );
+int laudioStopSound( lua_State* L );
+int laudioPauseSound( lua_State* L );
+int laudioResumeSound( lua_State* L );
+int laudioIsSoundPlaying( lua_State* L );
+int laudioSetSoundVolume( lua_State* L );
+int laudioSetSoundPitch( lua_State* L );
+int laudioSetSoundPan( lua_State* L );
+int laudioWaveFormat( lua_State* L );
+int laudioWaveCopy( lua_State* L );
+int laudioWaveCrop( lua_State* L );
/* Music management functions. */
-int laudioLoadMusicStream( lua_State *L );
-int laudioLoadMusicStreamFromMemory( lua_State *L );
-int laudioIsMusicReady( lua_State *L );
-int laudioUnloadMusicStream( lua_State *L );
-int laudioPlayMusicStream( lua_State *L );
-int laudioIsMusicStreamPlaying( lua_State *L );
-int laudioUpdateMusicStream( lua_State *L );
-int laudioStopMusicStream( lua_State *L );
-int laudioPauseMusicStream( lua_State *L );
-int laudioResumeMusicStream( lua_State *L );
-int laudioSeekMusicStream( lua_State *L );
-int laudioSetMusicVolume( lua_State *L );
-int laudioSetMusicPitch( lua_State *L );
-int laudioSetMusicPan( lua_State *L );
-int laudioSetMusicLooping( lua_State *L );
-int laudioGetMusicLooping( lua_State *L );
-int laudioGetMusicTimeLength( lua_State *L );
-int laudioGetMusicTimePlayed( lua_State *L );
+int laudioLoadMusicStream( lua_State* L );
+int laudioLoadMusicStreamFromMemory( lua_State* L );
+int laudioIsMusicReady( lua_State* L );
+int laudioUnloadMusicStream( lua_State* L );
+int laudioPlayMusicStream( lua_State* L );
+int laudioIsMusicStreamPlaying( lua_State* L );
+int laudioUpdateMusicStream( lua_State* L );
+int laudioStopMusicStream( lua_State* L );
+int laudioPauseMusicStream( lua_State* L );
+int laudioResumeMusicStream( lua_State* L );
+int laudioSeekMusicStream( lua_State* L );
+int laudioSetMusicVolume( lua_State* L );
+int laudioSetMusicPitch( lua_State* L );
+int laudioSetMusicPan( lua_State* L );
+int laudioSetMusicLooping( lua_State* L );
+int laudioGetMusicLooping( lua_State* L );
+int laudioGetMusicTimeLength( lua_State* L );
+int laudioGetMusicTimePlayed( lua_State* L );
diff --git a/include/core.h b/include/core.h
index 8e163a8..ddbf442 100644
--- a/include/core.h
+++ b/include/core.h
@@ -4,229 +4,229 @@
void unloadBuffer( Buffer *buffer );
/* Window-related functions. */
-int lcoreCloseWindow( lua_State *L );
-int lcoreIsWindowReady( lua_State *L );
-int lcoreIsWindowFullscreen( lua_State *L );
-int lcoreIsWindowHidden( lua_State *L );
-int lcoreIsWindowMinimized( lua_State *L );
-int lcoreIsWindowMaximized( lua_State *L );
-int lcoreIsWindowFocused( lua_State *L );
-int lcoreIsWindowResized( lua_State *L );
-int lcoreIsWindowState( lua_State *L );
-int lcoreSetWindowState( lua_State *L );
-int lcoreClearWindowState( lua_State *L );
-int lcoreToggleFullscreen( lua_State *L );
-int lcoreToggleBorderlessWindowed( lua_State *L );
-int lcoreMaximizeWindow( lua_State *L );
-int lcoreMinimizeWindow( lua_State *L );
-int lcoreRestoreWindow( lua_State *L );
-int lcoreSetWindowIcon( lua_State *L );
-int lcoreSetWindowIcons( lua_State *L );
-int lcoreSetWindowTitle( lua_State *L );
-int lcoreSetWindowPosition( lua_State *L );
-int lcoreSetWindowMonitor( lua_State *L );
-int lcoreSetWindowMinSize( lua_State *L );
-int lcoreSetWindowMaxSize( lua_State *L );
-int lcoreSetWindowSize( lua_State *L );
-int lcoreSetWindowOpacity( lua_State *L );
-int lcoreSetWindowFocused( lua_State *L );
-int lcoreGetWindowHandle( lua_State *L );
-int lcoreGetScreenSize( lua_State *L );
-int lcoreGetRenderSize( lua_State *L );
-int lcoreGetMonitorCount( lua_State *L );
-int lcoreGetCurrentMonitor( lua_State *L );
-int lcoreGetMonitorPosition( lua_State *L );
-int lcoreGetMonitorSize( lua_State *L );
-int lcoreGetMonitorPhysicalSize( lua_State *L );
-int lcoreGetMonitorRefreshRate( lua_State *L );
-int lcoreGetWindowPosition( lua_State *L );
-int lcoreGetWindowScaleDPI( lua_State *L );
-int lcoreGetMonitorName( lua_State *L );
-int lcoreSetClipboardText( lua_State *L );
-int lcoreGetClipboardText( lua_State *L );
+int lcoreCloseWindow( lua_State* L );
+int lcoreIsWindowReady( lua_State* L );
+int lcoreIsWindowFullscreen( lua_State* L );
+int lcoreIsWindowHidden( lua_State* L );
+int lcoreIsWindowMinimized( lua_State* L );
+int lcoreIsWindowMaximized( lua_State* L );
+int lcoreIsWindowFocused( lua_State* L );
+int lcoreIsWindowResized( lua_State* L );
+int lcoreIsWindowState( lua_State* L );
+int lcoreSetWindowState( lua_State* L );
+int lcoreClearWindowState( lua_State* L );
+int lcoreToggleFullscreen( lua_State* L );
+int lcoreToggleBorderlessWindowed( lua_State* L );
+int lcoreMaximizeWindow( lua_State* L );
+int lcoreMinimizeWindow( lua_State* L );
+int lcoreRestoreWindow( lua_State* L );
+int lcoreSetWindowIcon( lua_State* L );
+int lcoreSetWindowIcons( lua_State* L );
+int lcoreSetWindowTitle( lua_State* L );
+int lcoreSetWindowPosition( lua_State* L );
+int lcoreSetWindowMonitor( lua_State* L );
+int lcoreSetWindowMinSize( lua_State* L );
+int lcoreSetWindowMaxSize( lua_State* L );
+int lcoreSetWindowSize( lua_State* L );
+int lcoreSetWindowOpacity( lua_State* L );
+int lcoreSetWindowFocused( lua_State* L );
+int lcoreGetWindowHandle( lua_State* L );
+int lcoreGetScreenSize( lua_State* L );
+int lcoreGetRenderSize( lua_State* L );
+int lcoreGetMonitorCount( lua_State* L );
+int lcoreGetCurrentMonitor( lua_State* L );
+int lcoreGetMonitorPosition( lua_State* L );
+int lcoreGetMonitorSize( lua_State* L );
+int lcoreGetMonitorPhysicalSize( lua_State* L );
+int lcoreGetMonitorRefreshRate( lua_State* L );
+int lcoreGetWindowPosition( lua_State* L );
+int lcoreGetWindowScaleDPI( lua_State* L );
+int lcoreGetMonitorName( lua_State* L );
+int lcoreSetClipboardText( lua_State* L );
+int lcoreGetClipboardText( lua_State* L );
/* Cursor-related functions. */
-int lcoreShowCursor( lua_State *L );
-int lcoreHideCursor( lua_State *L );
-int lcoreIsCursorHidden( lua_State *L );
-int lcoreEnableCursor( lua_State *L );
-int lcoreDisableCursor( lua_State *L );
-int lcoreIsCursorOnScreen( lua_State *L );
+int lcoreShowCursor( lua_State* L );
+int lcoreHideCursor( lua_State* L );
+int lcoreIsCursorHidden( lua_State* L );
+int lcoreEnableCursor( lua_State* L );
+int lcoreDisableCursor( lua_State* L );
+int lcoreIsCursorOnScreen( lua_State* L );
/* Drawing-related functions. */
-int lcoreClearBackground( lua_State *L );
-int lcoreBeginDrawing( lua_State *L );
-int lcoreEndDrawing( lua_State *L );
-int lcoreBeginMode2D( lua_State *L );
-int lcoreEndMode2D( lua_State *L );
-int lcoreBeginMode3D( lua_State *L );
-int lcoreEndMode3D( lua_State *L );
-int lcoreBeginTextureMode( lua_State *L );
-int lcoreEndTextureMode( lua_State *L );
-int lcoreBeginShaderMode( lua_State *L );
-int lcoreEndShaderMode( lua_State *L );
-int lcoreBeginBlendMode( lua_State *L );
-int lcoreEndBlendMode( lua_State *L );
-int lcoreBeginScissorMode( lua_State *L );
-int lcoreEndScissorMode( lua_State *L );
+int lcoreClearBackground( lua_State* L );
+int lcoreBeginDrawing( lua_State* L );
+int lcoreEndDrawing( lua_State* L );
+int lcoreBeginMode2D( lua_State* L );
+int lcoreEndMode2D( lua_State* L );
+int lcoreBeginMode3D( lua_State* L );
+int lcoreEndMode3D( lua_State* L );
+int lcoreBeginTextureMode( lua_State* L );
+int lcoreEndTextureMode( lua_State* L );
+int lcoreBeginShaderMode( lua_State* L );
+int lcoreEndShaderMode( lua_State* L );
+int lcoreBeginBlendMode( lua_State* L );
+int lcoreEndBlendMode( lua_State* L );
+int lcoreBeginScissorMode( lua_State* L );
+int lcoreEndScissorMode( lua_State* L );
/* Shader management functions. */
-int lcoreLoadShader( lua_State *L );
-int lcoreLoadShaderFromMemory( lua_State *L );
-int lcoreIsShaderReady( lua_State *L );
-int lcoreGetShaderId( lua_State *L );
-int lcoreGetShaderLocation( lua_State *L );
-int lcoreGetShaderLocationAttrib( lua_State *L );
-int lcoreSetShaderLocationIndex( lua_State *L );
-int lcoreGetShaderLocationIndex( lua_State *L );
-int lcoreSetShaderValueMatrix( lua_State *L );
-int lcoreSetShaderValueTexture( lua_State *L );
-int lcoreSetShaderValue( lua_State *L );
-int lcoreSetShaderValueV( lua_State *L );
-int lcoreUnloadShader( lua_State *L );
+int lcoreLoadShader( lua_State* L );
+int lcoreLoadShaderFromMemory( lua_State* L );
+int lcoreIsShaderReady( lua_State* L );
+int lcoreGetShaderId( lua_State* L );
+int lcoreGetShaderLocation( lua_State* L );
+int lcoreGetShaderLocationAttrib( lua_State* L );
+int lcoreSetShaderLocationIndex( lua_State* L );
+int lcoreGetShaderLocationIndex( lua_State* L );
+int lcoreSetShaderValueMatrix( lua_State* L );
+int lcoreSetShaderValueTexture( lua_State* L );
+int lcoreSetShaderValue( lua_State* L );
+int lcoreSetShaderValueV( lua_State* L );
+int lcoreUnloadShader( lua_State* L );
/* Screen-space-related functions. */
-int lcoreGetMouseRay( lua_State *L );
-int lcoreGetCameraMatrix( lua_State *L );
-int lcoreGetCameraMatrix2D( lua_State *L );
-int lcoreGetWorldToScreen( lua_State *L );
-int lcoreGetWorldToScreenEx( lua_State *L );
-int lcoreGetWorldToScreen2D( lua_State *L );
-int lcoreGetScreenToWorld2D( lua_State *L );
+int lcoreGetMouseRay( lua_State* L );
+int lcoreGetCameraMatrix( lua_State* L );
+int lcoreGetCameraMatrix2D( lua_State* L );
+int lcoreGetWorldToScreen( lua_State* L );
+int lcoreGetWorldToScreenEx( lua_State* L );
+int lcoreGetWorldToScreen2D( lua_State* L );
+int lcoreGetScreenToWorld2D( lua_State* L );
/* Timing-related functions. */
-int lcoreSetTargetFPS( lua_State *L );
-int lcoreGetFPS( lua_State *L );
-int lcoreGetFrameTime( lua_State *L );
-int lcoreGetTime( lua_State *L );
+int lcoreSetTargetFPS( lua_State* L );
+int lcoreGetFPS( lua_State* L );
+int lcoreGetFrameTime( lua_State* L );
+int lcoreGetTime( lua_State* L );
/* Random values generation functions. */
-int lcoreSetRandomSeed( lua_State *L );
-int lcoreGetRandomValue( lua_State *L );
-int lcoreLoadRandomSequence( lua_State *L );
+int lcoreSetRandomSeed( lua_State* L );
+int lcoreGetRandomValue( lua_State* L );
+int lcoreLoadRandomSequence( lua_State* L );
/* Misc. functions */
-int lcoreTakeScreenshot( lua_State *L );
-int lcoreSetConfigFlags( lua_State *L );
-int lcoreTraceLog( lua_State *L );
-int lcoreSetTraceLogLevel( lua_State *L );
-int lcoreSetLogLevelInvalid( lua_State *L );
-int lcoreGetLogLevelInvalid( lua_State *L );
-int lcoreOpenURL( lua_State *L );
-int lcoreIsGCUnloadEnabled( lua_State *L );
-int lcoreSetGCUnload( lua_State *L );
+int lcoreTakeScreenshot( lua_State* L );
+int lcoreSetConfigFlags( lua_State* L );
+int lcoreTraceLog( lua_State* L );
+int lcoreSetTraceLogLevel( lua_State* L );
+int lcoreSetLogLevelInvalid( lua_State* L );
+int lcoreGetLogLevelInvalid( lua_State* L );
+int lcoreOpenURL( lua_State* L );
+int lcoreIsGCUnloadEnabled( lua_State* L );
+int lcoreSetGCUnload( lua_State* L );
/* Files management functions. */
-int lcoreLoadFileData( lua_State *L );
-int lcoreSaveFileData( lua_State *L );
-int lcoreExportDataAsCode( lua_State *L );
-int lcoreLoadFileText( lua_State *L );
-int lcoreSaveFileText( lua_State *L );
+int lcoreLoadFileData( lua_State* L );
+int lcoreSaveFileData( lua_State* L );
+int lcoreExportDataAsCode( lua_State* L );
+int lcoreLoadFileText( lua_State* L );
+int lcoreSaveFileText( lua_State* L );
/* Files system functions. */
-int lcoreGetBasePath( lua_State *L );
-int lcoreFileExists( lua_State *L );
-int lcoreDirectoryExists( lua_State *L );
-int lcoreIsFileExtension( lua_State *L );
-int lcoreGetFileLength( lua_State *L );
-int lcoreGetFileExtension( lua_State *L );
-int lcoreGetFileName( lua_State *L );
-int lcoreGetFileNameWithoutExt( lua_State *L );
-int lcoreGetDirectoryPath( lua_State *L );
-int lcoreGetPrevDirectoryPath( lua_State *L );
-int lcoreGetWorkingDirectory( lua_State *L );
-int lcoreGetApplicationDirectory( lua_State *L );
-int lcoreLoadDirectoryFiles( lua_State *L );
-int lcoreLoadDirectoryFilesEx( lua_State *L );
-int lcoreChangeDirectory( lua_State *L );
-int lcoreIsPathFile( lua_State *L );
-int lcoreIsFileDropped( lua_State *L );
-int lcoreLoadDroppedFiles( lua_State *L );
-int lcoreGetFileModTime( lua_State *L );
+int lcoreGetBasePath( lua_State* L );
+int lcoreFileExists( lua_State* L );
+int lcoreDirectoryExists( lua_State* L );
+int lcoreIsFileExtension( lua_State* L );
+int lcoreGetFileLength( lua_State* L );
+int lcoreGetFileExtension( lua_State* L );
+int lcoreGetFileName( lua_State* L );
+int lcoreGetFileNameWithoutExt( lua_State* L );
+int lcoreGetDirectoryPath( lua_State* L );
+int lcoreGetPrevDirectoryPath( lua_State* L );
+int lcoreGetWorkingDirectory( lua_State* L );
+int lcoreGetApplicationDirectory( lua_State* L );
+int lcoreLoadDirectoryFiles( lua_State* L );
+int lcoreLoadDirectoryFilesEx( lua_State* L );
+int lcoreChangeDirectory( lua_State* L );
+int lcoreIsPathFile( lua_State* L );
+int lcoreIsFileDropped( lua_State* L );
+int lcoreLoadDroppedFiles( lua_State* L );
+int lcoreGetFileModTime( lua_State* L );
/* Compression/Encoding functionality. */
-int lcoreCompressData( lua_State *L );
-int lcoreDecompressData( lua_State *L );
-int lcoreEncodeDataBase64( lua_State *L );
-int lcoreDecodeDataBase64( lua_State *L );
+int lcoreCompressData( lua_State* L );
+int lcoreDecompressData( lua_State* L );
+int lcoreEncodeDataBase64( lua_State* L );
+int lcoreDecodeDataBase64( lua_State* L );
/* Input-related functions: keyboard. */
-int lcoreIsKeyPressed( lua_State *L );
-int lcoreIsKeyDown( lua_State *L );
-int lcoreIsKeyReleased( lua_State *L );
-int lcoreIsKeyUp( lua_State *L );
-int lcoreGetKeyPressed( lua_State *L );
-int lcoreGetCharPressed( lua_State *L );
-int lcoreSetExitKey( lua_State *L );
-int lcoreGetKeyName( lua_State *L );
-int lcoreGetKeyScancode( lua_State *L );
+int lcoreIsKeyPressed( lua_State* L );
+int lcoreIsKeyDown( lua_State* L );
+int lcoreIsKeyReleased( lua_State* L );
+int lcoreIsKeyUp( lua_State* L );
+int lcoreGetKeyPressed( lua_State* L );
+int lcoreGetCharPressed( lua_State* L );
+int lcoreSetExitKey( lua_State* L );
+int lcoreGetKeyName( lua_State* L );
+int lcoreGetKeyScancode( lua_State* L );
/* Input-related functions: gamepads. */
-int lcoreIsGamepadAvailable( lua_State *L );
-int lcoreGetGamepadName( lua_State *L );
-int lcoreIsGamepadButtonPressed( lua_State *L );
-int lcoreIsGamepadButtonDown( lua_State *L );
-int lcoreIsGamepadButtonReleased( lua_State *L );
-int lcoreGetGamepadAxisCount( lua_State *L );
-int lcoreGetGamepadAxisMovement( lua_State *L );
-int lcoreSetGamepadMappings( lua_State *L );
+int lcoreIsGamepadAvailable( lua_State* L );
+int lcoreGetGamepadName( lua_State* L );
+int lcoreIsGamepadButtonPressed( lua_State* L );
+int lcoreIsGamepadButtonDown( lua_State* L );
+int lcoreIsGamepadButtonReleased( lua_State* L );
+int lcoreGetGamepadAxisCount( lua_State* L );
+int lcoreGetGamepadAxisMovement( lua_State* L );
+int lcoreSetGamepadMappings( lua_State* L );
/* Input-related functions: mouse. */
-int lcoreIsMouseButtonPressed( lua_State *L );
-int lcoreIsMouseButtonDown( lua_State *L );
-int lcoreIsMouseButtonReleased( lua_State *L );
-int lcoreIsMouseButtonUp( lua_State *L );
-int lcoreGetMousePosition( lua_State *L );
-int lcoreGetMouseDelta( lua_State *L );
-int lcoreSetMousePosition( lua_State *L );
-int lcoreSetMouseOffset( lua_State *L );
-int lcoreSetMouseScale( lua_State *L );
-int lcoreGetMouseWheelMove( lua_State *L );
-int lcoreSetMouseCursor( lua_State *L );
+int lcoreIsMouseButtonPressed( lua_State* L );
+int lcoreIsMouseButtonDown( lua_State* L );
+int lcoreIsMouseButtonReleased( lua_State* L );
+int lcoreIsMouseButtonUp( lua_State* L );
+int lcoreGetMousePosition( lua_State* L );
+int lcoreGetMouseDelta( lua_State* L );
+int lcoreSetMousePosition( lua_State* L );
+int lcoreSetMouseOffset( lua_State* L );
+int lcoreSetMouseScale( lua_State* L );
+int lcoreGetMouseWheelMove( lua_State* L );
+int lcoreSetMouseCursor( lua_State* L );
/* Input-related functions: touch. */
-int lcoreGetTouchPosition( lua_State *L );
-int lcoreGetTouchPointId( lua_State *L );
-int lcoreGetTouchPointCount( lua_State *L );
+int lcoreGetTouchPosition( lua_State* L );
+int lcoreGetTouchPointId( lua_State* L );
+int lcoreGetTouchPointCount( lua_State* L );
/* Input-related functions: gestures. */
-int lcoreSetGesturesEnabled( lua_State *L );
-int lcoreIsGestureDetected( lua_State *L );
-int lcoreGetGestureDetected( lua_State *L );
-int lcoreGetGestureHoldDuration( lua_State *L );
-int lcoreGetGestureDragVector( lua_State *L );
-int lcoreGetGestureDragAngle( lua_State *L );
-int lcoreGetGesturePinchVector( lua_State *L );
-int lcoreGetGesturePinchAngle( lua_State *L );
+int lcoreSetGesturesEnabled( lua_State* L );
+int lcoreIsGestureDetected( lua_State* L );
+int lcoreGetGestureDetected( lua_State* L );
+int lcoreGetGestureHoldDuration( lua_State* L );
+int lcoreGetGestureDragVector( lua_State* L );
+int lcoreGetGestureDragAngle( lua_State* L );
+int lcoreGetGesturePinchVector( lua_State* L );
+int lcoreGetGesturePinchAngle( lua_State* L );
/* Camera2D System functions. */
-int lcoreCreateCamera2D( lua_State *L );
-int lcoreSetCamera2DTarget( lua_State *L );
-int lcoreSetCamera2DOffset( lua_State *L );
-int lcoreSetCamera2DRotation( lua_State *L );
-int lcoreSetCamera2DZoom( lua_State *L );
-int lcoreGetCamera2DTarget( lua_State *L );
-int lcoreGetCamera2DOffset( lua_State *L );
-int lcoreGetCamera2DRotation( lua_State *L );
-int lcoreGetCamera2DZoom( lua_State *L );
+int lcoreCreateCamera2D( lua_State* L );
+int lcoreSetCamera2DTarget( lua_State* L );
+int lcoreSetCamera2DOffset( lua_State* L );
+int lcoreSetCamera2DRotation( lua_State* L );
+int lcoreSetCamera2DZoom( lua_State* L );
+int lcoreGetCamera2DTarget( lua_State* L );
+int lcoreGetCamera2DOffset( lua_State* L );
+int lcoreGetCamera2DRotation( lua_State* L );
+int lcoreGetCamera2DZoom( lua_State* L );
/* Camera3D System functions. */
-int lcoreCreateCamera3D( lua_State *L );
-int lcoreSetCamera3DPosition( lua_State *L );
-int lcoreSetCamera3DTarget( lua_State *L );
-int lcoreSetCamera3DUp( lua_State *L );
-int lcoreSetCamera3DFovy( lua_State *L );
-int lcoreSetCamera3DProjection( lua_State *L );
-int lcoreGetCamera3DPosition( lua_State *L );
-int lcoreGetCamera3DTarget( lua_State *L );
-int lcoreGetCamera3DUp( lua_State *L );
-int lcoreGetCamera3DFovy( lua_State *L );
-int lcoreGetCamera3DProjection( lua_State *L );
-int lcoreGetCamera3DForward( lua_State *L );
-int lcoreGetCamera3DUpNormalized( lua_State *L );
-int lcoreGetCamera3DRight( lua_State *L );
-int lcoreCamera3DMoveForward( lua_State *L );
-int lcoreCamera3DMoveUp( lua_State *L );
-int lcoreCamera3DMoveRight( lua_State *L );
-int lcoreCamera3DMoveToTarget( lua_State *L );
-int lcoreCamera3DYaw( lua_State *L );
-int lcoreCamera3DPitch( lua_State *L );
-int lcoreCamera3DRoll( lua_State *L );
-int lcoreGetCamera3DViewMatrix( lua_State *L );
-int lcoreGetCamera3DProjectionMatrix( lua_State *L );
-int lcoreUpdateCamera3D( lua_State *L );
-int lcoreUpdateCamera3DPro( lua_State *L );
+int lcoreCreateCamera3D( lua_State* L );
+int lcoreSetCamera3DPosition( lua_State* L );
+int lcoreSetCamera3DTarget( lua_State* L );
+int lcoreSetCamera3DUp( lua_State* L );
+int lcoreSetCamera3DFovy( lua_State* L );
+int lcoreSetCamera3DProjection( lua_State* L );
+int lcoreGetCamera3DPosition( lua_State* L );
+int lcoreGetCamera3DTarget( lua_State* L );
+int lcoreGetCamera3DUp( lua_State* L );
+int lcoreGetCamera3DFovy( lua_State* L );
+int lcoreGetCamera3DProjection( lua_State* L );
+int lcoreGetCamera3DForward( lua_State* L );
+int lcoreGetCamera3DUpNormalized( lua_State* L );
+int lcoreGetCamera3DRight( lua_State* L );
+int lcoreCamera3DMoveForward( lua_State* L );
+int lcoreCamera3DMoveUp( lua_State* L );
+int lcoreCamera3DMoveRight( lua_State* L );
+int lcoreCamera3DMoveToTarget( lua_State* L );
+int lcoreCamera3DYaw( lua_State* L );
+int lcoreCamera3DPitch( lua_State* L );
+int lcoreCamera3DRoll( lua_State* L );
+int lcoreGetCamera3DViewMatrix( lua_State* L );
+int lcoreGetCamera3DProjectionMatrix( lua_State* L );
+int lcoreUpdateCamera3D( lua_State* L );
+int lcoreUpdateCamera3DPro( lua_State* L );
/* Buffer management functions. */
-int lcoreLoadBuffer( lua_State *L );
-int lcoreLoadBufferFromFile( lua_State *L );
-int lcoreLoadBufferFromString( lua_State *L );
-int lcoreUnloadBuffer( lua_State *L );
-int lcoreGetBufferData( lua_State *L );
-int lcoreGetBufferType( lua_State *L );
-int lcoreGetBufferSize( lua_State *L );
-int lcoreGetBufferElementSize( lua_State *L );
-int lcoreGetBufferLength( lua_State *L );
-int lcoreExportBuffer( lua_State *L );
+int lcoreLoadBuffer( lua_State* L );
+int lcoreLoadBufferFromFile( lua_State* L );
+int lcoreLoadBufferFromString( lua_State* L );
+int lcoreUnloadBuffer( lua_State* L );
+int lcoreGetBufferData( lua_State* L );
+int lcoreGetBufferType( lua_State* L );
+int lcoreGetBufferSize( lua_State* L );
+int lcoreGetBufferElementSize( lua_State* L );
+int lcoreGetBufferLength( lua_State* L );
+int lcoreExportBuffer( lua_State* L );
diff --git a/include/lgl.h b/include/lgl.h
index f895a1c..451f595 100644
--- a/include/lgl.h
+++ b/include/lgl.h
@@ -1,4 +1,4 @@
#pragma once
/* Framebuffer management. */
-int lglBlitFramebuffer( lua_State *L );
+int lglBlitFramebuffer( lua_State* L );
diff --git a/include/lights.h b/include/lights.h
index 24bbbb4..23947ce 100644
--- a/include/lights.h
+++ b/include/lights.h
@@ -1,15 +1,15 @@
#pragma once
/* Light management functions. */
-int llightsCreateLight( lua_State *L );
-int llightsUpdateLightValues( lua_State *L );
-int llightsSetLightType( lua_State *L );
-int llightsSetLightPosition( lua_State *L );
-int llightsSetLightTarget( lua_State *L );
-int llightsSetLightColor( lua_State *L );
-int llightsSetLightEnabled( lua_State *L );
-int llightsGetLightType( lua_State *L );
-int llightsGetLightPosition( lua_State *L );
-int llightsGetLightTarget( lua_State *L );
-int llightsGetLightColor( lua_State *L );
-int llightsIsLightEnabled( lua_State *L );
+int llightsCreateLight( lua_State* L );
+int llightsUpdateLightValues( lua_State* L );
+int llightsSetLightType( lua_State* L );
+int llightsSetLightPosition( lua_State* L );
+int llightsSetLightTarget( lua_State* L );
+int llightsSetLightColor( lua_State* L );
+int llightsSetLightEnabled( lua_State* L );
+int llightsGetLightType( lua_State* L );
+int llightsGetLightPosition( lua_State* L );
+int llightsGetLightTarget( lua_State* L );
+int llightsGetLightColor( lua_State* L );
+int llightsIsLightEnabled( lua_State* L );
diff --git a/include/lrlgl.h b/include/lrlgl.h
index 71d9641..b9c45b1 100644
--- a/include/lrlgl.h
+++ b/include/lrlgl.h
@@ -1,158 +1,158 @@
#pragma once
/* Matrix operations */
-int lrlglMatrixMode( lua_State *L );
-int lrlglPushMatrix( lua_State *L );
-int lrlglPopMatrix( lua_State *L );
-int lrlglLoadIdentity( lua_State *L );
-int lrlglTranslatef( lua_State *L );
-int lrlglRotatef( lua_State *L );
-int lrlglScalef( lua_State *L );
-int lrlglMultMatrixf( lua_State *L );
-int lrlglFrustum( lua_State *L );
-int lrlglOrtho( lua_State *L );
-int lrlglViewport( lua_State *L );
+int lrlglMatrixMode( lua_State* L );
+int lrlglPushMatrix( lua_State* L );
+int lrlglPopMatrix( lua_State* L );
+int lrlglLoadIdentity( lua_State* L );
+int lrlglTranslatef( lua_State* L );
+int lrlglRotatef( lua_State* L );
+int lrlglScalef( lua_State* L );
+int lrlglMultMatrixf( lua_State* L );
+int lrlglFrustum( lua_State* L );
+int lrlglOrtho( lua_State* L );
+int lrlglViewport( lua_State* L );
/* Vertex level operations */
-int lrlglBegin( lua_State *L );
-int lrlglEnd( lua_State *L );
-int lrlglVertex2f( lua_State *L );
-int lrlglVertex3f( lua_State *L );
-int lrlglTexCoord2f( lua_State *L );
-int lrlglNormal3f( lua_State *L );
-int lrlglColor4ub( lua_State *L );
-int lrlglColor3f( lua_State *L );
-int lrlglColor4f( lua_State *L );
+int lrlglBegin( lua_State* L );
+int lrlglEnd( lua_State* L );
+int lrlglVertex2f( lua_State* L );
+int lrlglVertex3f( lua_State* L );
+int lrlglTexCoord2f( lua_State* L );
+int lrlglNormal3f( lua_State* L );
+int lrlglColor4ub( lua_State* L );
+int lrlglColor3f( lua_State* L );
+int lrlglColor4f( lua_State* L );
/* Vertex buffers state */
-int lrlglEnableVertexArray( lua_State *L );
-int lrlglDisableVertexArray( lua_State *L );
-int lrlglEnableVertexBuffer( lua_State *L );
-int lrlglDisableVertexBuffer( lua_State *L );
-int lrlglEnableVertexBufferElement( lua_State *L );
-int lrlglDisableVertexBufferElement( lua_State *L );
-int lrlglEnableVertexAttribute( lua_State *L );
-int lrlglDisableVertexAttribute( lua_State *L );
+int lrlglEnableVertexArray( lua_State* L );
+int lrlglDisableVertexArray( lua_State* L );
+int lrlglEnableVertexBuffer( lua_State* L );
+int lrlglDisableVertexBuffer( lua_State* L );
+int lrlglEnableVertexBufferElement( lua_State* L );
+int lrlglDisableVertexBufferElement( lua_State* L );
+int lrlglEnableVertexAttribute( lua_State* L );
+int lrlglDisableVertexAttribute( lua_State* L );
/* Textures state */
-int lrlglActiveTextureSlot( lua_State *L );
-int lrlglEnableTexture( lua_State *L );
-int lrlglDisableTexture( lua_State *L );
-int lrlglEnableTextureCubemap( lua_State *L );
-int lrlglDisableTextureCubemap( lua_State *L );
-int lrlglTextureParameters( lua_State *L );
-int lrlglCubemapParameters( lua_State *L );
+int lrlglActiveTextureSlot( lua_State* L );
+int lrlglEnableTexture( lua_State* L );
+int lrlglDisableTexture( lua_State* L );
+int lrlglEnableTextureCubemap( lua_State* L );
+int lrlglDisableTextureCubemap( lua_State* L );
+int lrlglTextureParameters( lua_State* L );
+int lrlglCubemapParameters( lua_State* L );
/* Shader state. */
-int lrlglEnableShader( lua_State *L );
-int lrlglDisableShader( lua_State *L );
+int lrlglEnableShader( lua_State* L );
+int lrlglDisableShader( lua_State* L );
/* Framebuffer state. */
-int lrlglEnableFramebuffer( lua_State *L );
-int lrlglDisableFramebuffer( lua_State *L );
-int lrlglActiveDrawBuffers( lua_State *L );
+int lrlglEnableFramebuffer( lua_State* L );
+int lrlglDisableFramebuffer( lua_State* L );
+int lrlglActiveDrawBuffers( lua_State* L );
/* General render state. */
-int lrlglEnableColorBlend( lua_State *L );
-int lrlglDisableColorBlend( lua_State *L );
-int lrlglEnableDepthTest( lua_State *L );
-int lrlglDisableDepthTest( lua_State *L );
-int lrlglEnableDepthMask( lua_State *L );
-int lrlglDisableDepthMask( lua_State *L );
-int lrlglEnableBackfaceCulling( lua_State *L );
-int lrlglDisableBackfaceCulling( lua_State *L );
-int lrlglSetCullFace( lua_State *L );
-int lrlglEnableScissorTest( lua_State *L );
-int lrlglDisableScissorTest( lua_State *L );
-int lrlglScissor( lua_State *L );
-int lrlglEnableWireMode( lua_State *L );
-int lrlglDisableWireMode( lua_State *L );
-int lrlglSetLineWidth( lua_State *L );
-int lrlglGetLineWidth( lua_State *L );
-int lrlglEnableSmoothLines( lua_State *L );
-int lrlglDisableSmoothLines( lua_State *L );
-int lrlglEnableStereoRender( lua_State *L );
-int lrlglDisableStereoRender( lua_State *L );
-int lrlglIsStereoRenderEnabled( lua_State *L );
-int lrlglClearColor( lua_State *L );
-int lrlglClearScreenBuffers( lua_State *L );
-int lrlglCheckErrors( lua_State *L );
-int lrlglSetBlendMode( lua_State *L );
-int lrlglSetBlendFactors( lua_State *L );
-int lrlglSetBlendFactorsSeparate( lua_State *L );
+int lrlglEnableColorBlend( lua_State* L );
+int lrlglDisableColorBlend( lua_State* L );
+int lrlglEnableDepthTest( lua_State* L );
+int lrlglDisableDepthTest( lua_State* L );
+int lrlglEnableDepthMask( lua_State* L );
+int lrlglDisableDepthMask( lua_State* L );
+int lrlglEnableBackfaceCulling( lua_State* L );
+int lrlglDisableBackfaceCulling( lua_State* L );
+int lrlglSetCullFace( lua_State* L );
+int lrlglEnableScissorTest( lua_State* L );
+int lrlglDisableScissorTest( lua_State* L );
+int lrlglScissor( lua_State* L );
+int lrlglEnableWireMode( lua_State* L );
+int lrlglDisableWireMode( lua_State* L );
+int lrlglSetLineWidth( lua_State* L );
+int lrlglGetLineWidth( lua_State* L );
+int lrlglEnableSmoothLines( lua_State* L );
+int lrlglDisableSmoothLines( lua_State* L );
+int lrlglEnableStereoRender( lua_State* L );
+int lrlglDisableStereoRender( lua_State* L );
+int lrlglIsStereoRenderEnabled( lua_State* L );
+int lrlglClearColor( lua_State* L );
+int lrlglClearScreenBuffers( lua_State* L );
+int lrlglCheckErrors( lua_State* L );
+int lrlglSetBlendMode( lua_State* L );
+int lrlglSetBlendFactors( lua_State* L );
+int lrlglSetBlendFactorsSeparate( lua_State* L );
/* Initialization functions */
-int lrlglGetVersion( lua_State *L );
-int lrlglSetFramebufferWidth( lua_State *L );
-int lrlglGetFramebufferWidth( lua_State *L );
-int lrlglSetFramebufferHeight( lua_State *L );
-int lrlglGetFramebufferHeight( lua_State *L );
-int lrlglGetTextureIdDefault( lua_State *L );
-int lrlglGetShaderIdDefault( lua_State *L );
-int lrlglGetShaderLocsDefault( lua_State *L );
+int lrlglGetVersion( lua_State* L );
+int lrlglSetFramebufferWidth( lua_State* L );
+int lrlglGetFramebufferWidth( lua_State* L );
+int lrlglSetFramebufferHeight( lua_State* L );
+int lrlglGetFramebufferHeight( lua_State* L );
+int lrlglGetTextureIdDefault( lua_State* L );
+int lrlglGetShaderIdDefault( lua_State* L );
+int lrlglGetShaderLocsDefault( lua_State* L );
/* Render batch management */
-int lrlglLoadRenderBatch( lua_State *L );
-int lrlglUnloadRenderBatch( lua_State *L );
-int lrlglDrawRenderBatch( lua_State *L );
-int lrlglSetRenderBatchActive( lua_State *L );
-int lrlglDrawRenderBatchActive( lua_State *L );
-int lrlglCheckRenderBatchLimit( lua_State *L );
-int lrlglSetTexture( lua_State *L );
+int lrlglLoadRenderBatch( lua_State* L );
+int lrlglUnloadRenderBatch( lua_State* L );
+int lrlglDrawRenderBatch( lua_State* L );
+int lrlglSetRenderBatchActive( lua_State* L );
+int lrlglDrawRenderBatchActive( lua_State* L );
+int lrlglCheckRenderBatchLimit( lua_State* L );
+int lrlglSetTexture( lua_State* L );
/* Vertex buffers management */
-int lrlglLoadVertexArray( lua_State *L );
-int lrlglLoadVertexBuffer( lua_State *L );
-int lrlglLoadVertexBufferElement( lua_State *L );
-int lrlglUpdateVertexBuffer( lua_State *L );
-int lrlglUpdateVertexBufferElements( lua_State *L );
-int lrlglUnloadVertexArray( lua_State *L );
-int lrlglUnloadVertexBuffer( lua_State *L );
-int lrlglSetVertexAttribute( lua_State *L );
-int lrlglSetVertexAttributeDivisor( lua_State *L );
-int lrlglSetVertexAttributeDefault( lua_State *L );
-int lrlglDrawVertexArray( lua_State *L );
-int lrlglDrawVertexArrayElements( lua_State *L );
-int lrlglDrawVertexArrayInstanced( lua_State *L );
-int lrlglDrawVertexArrayElementsInstanced( lua_State *L );
+int lrlglLoadVertexArray( lua_State* L );
+int lrlglLoadVertexBuffer( lua_State* L );
+int lrlglLoadVertexBufferElement( lua_State* L );
+int lrlglUpdateVertexBuffer( lua_State* L );
+int lrlglUpdateVertexBufferElements( lua_State* L );
+int lrlglUnloadVertexArray( lua_State* L );
+int lrlglUnloadVertexBuffer( lua_State* L );
+int lrlglSetVertexAttribute( lua_State* L );
+int lrlglSetVertexAttributeDivisor( lua_State* L );
+int lrlglSetVertexAttributeDefault( lua_State* L );
+int lrlglDrawVertexArray( lua_State* L );
+int lrlglDrawVertexArrayElements( lua_State* L );
+int lrlglDrawVertexArrayInstanced( lua_State* L );
+int lrlglDrawVertexArrayElementsInstanced( lua_State* L );
/* Textures management */
-int lrlglLoadTexture( lua_State *L );
-int lrlglLoadTextureDepth( lua_State *L );
-int lrlglLoadTextureCubemap( lua_State *L );
-int lrlglUpdateTexture( lua_State *L );
-int lrlglGetGlTextureFormats( lua_State *L );
-int lrlglGetPixelFormatName( lua_State *L );
-int lrlglUnloadTexture( lua_State *L );
-int lrlglGenTextureMipmaps( lua_State *L );
-int lrlglReadTexturePixels( lua_State *L );
-int lrlglReadScreenPixels( lua_State *L );
+int lrlglLoadTexture( lua_State* L );
+int lrlglLoadTextureDepth( lua_State* L );
+int lrlglLoadTextureCubemap( lua_State* L );
+int lrlglUpdateTexture( lua_State* L );
+int lrlglGetGlTextureFormats( lua_State* L );
+int lrlglGetPixelFormatName( lua_State* L );
+int lrlglUnloadTexture( lua_State* L );
+int lrlglGenTextureMipmaps( lua_State* L );
+int lrlglReadTexturePixels( lua_State* L );
+int lrlglReadScreenPixels( lua_State* L );
/* Framebuffer management (fbo) */
-int lrlglLoadFramebuffer( lua_State *L );
-int lrlglFramebufferAttach( lua_State *L );
-int lrlglFramebufferComplete( lua_State *L );
-int lrlglUnloadFramebuffer( lua_State *L );
+int lrlglLoadFramebuffer( lua_State* L );
+int lrlglFramebufferAttach( lua_State* L );
+int lrlglFramebufferComplete( lua_State* L );
+int lrlglUnloadFramebuffer( lua_State* L );
/* Shaders management */
-int lrlglLoadShaderCode( lua_State *L );
-int lrlglCompileShader( lua_State *L );
-int lrlglLoadShaderProgram( lua_State *L );
-int lrlglUnloadShaderProgram( lua_State *L );
-int lrlglGetLocationUniform( lua_State *L );
-int lrlglGetLocationAttrib( lua_State *L );
-int lrlglSetUniform( lua_State *L );
-int lrlglSetUniformMatrix( lua_State *L );
-int lrlglSetUniformSampler( lua_State *L );
-int lrlglSetShader( lua_State *L );
+int lrlglLoadShaderCode( lua_State* L );
+int lrlglCompileShader( lua_State* L );
+int lrlglLoadShaderProgram( lua_State* L );
+int lrlglUnloadShaderProgram( lua_State* L );
+int lrlglGetLocationUniform( lua_State* L );
+int lrlglGetLocationAttrib( lua_State* L );
+int lrlglSetUniform( lua_State* L );
+int lrlglSetUniformMatrix( lua_State* L );
+int lrlglSetUniformSampler( lua_State* L );
+int lrlglSetShader( lua_State* L );
/* Compute shader management */
-int lrlglLoadComputeShaderProgram( lua_State *L );
-int lrlglComputeShaderDispatch( lua_State *L );
+int lrlglLoadComputeShaderProgram( lua_State* L );
+int lrlglComputeShaderDispatch( lua_State* L );
/* Shader buffer storage object management (ssbo) */
-int lrlglLoadShaderBuffer( lua_State *L );
-int lrlglUnloadShaderBuffer( lua_State *L );
-int lrlglUpdateShaderBuffer( lua_State *L );
-int lrlglBindShaderBuffer( lua_State *L );
-int lrlglReadShaderBuffer( lua_State *L );
-int lrlglCopyShaderBuffer( lua_State *L );
-int lrlglGetShaderBufferSize( lua_State *L );
+int lrlglLoadShaderBuffer( lua_State* L );
+int lrlglUnloadShaderBuffer( lua_State* L );
+int lrlglUpdateShaderBuffer( lua_State* L );
+int lrlglBindShaderBuffer( lua_State* L );
+int lrlglReadShaderBuffer( lua_State* L );
+int lrlglCopyShaderBuffer( lua_State* L );
+int lrlglGetShaderBufferSize( lua_State* L );
/* Buffer management */
-int lrlglBindImageTexture( lua_State *L );
+int lrlglBindImageTexture( lua_State* L );
/* Matrix state management */
-int lrlglGetMatrixModelview( lua_State *L );
-int lrlglGetMatrixProjection( lua_State *L );
-int lrlglGetMatrixTransform( lua_State *L );
-int lrlglGetMatrixProjectionStereo( lua_State *L );
-int lrlglGetMatrixViewOffsetStereo( lua_State *L );
-int lrlglSetMatrixProjection( lua_State *L );
-int lrlglSetMatrixModelview( lua_State *L );
-int lrlglSetMatrixProjectionStereo( lua_State *L );
-int lrlglSetMatrixViewOffsetStereo( lua_State *L );
+int lrlglGetMatrixModelview( lua_State* L );
+int lrlglGetMatrixProjection( lua_State* L );
+int lrlglGetMatrixTransform( lua_State* L );
+int lrlglGetMatrixProjectionStereo( lua_State* L );
+int lrlglGetMatrixViewOffsetStereo( lua_State* L );
+int lrlglSetMatrixProjection( lua_State* L );
+int lrlglSetMatrixModelview( lua_State* L );
+int lrlglSetMatrixProjectionStereo( lua_State* L );
+int lrlglSetMatrixViewOffsetStereo( lua_State* L );
diff --git a/include/lua_core.h b/include/lua_core.h
index 50ef43c..4582669 100644
--- a/include/lua_core.h
+++ b/include/lua_core.h
@@ -14,18 +14,18 @@ enum BufferType {
typedef struct {
int type;
size_t size;
- void *data;
+ void* data;
} Buffer;
/* Global assing functions. */
-void assignGlobalInt( int value, const char *name );
-void assignGlobalFloat( float value, const char *name );
-void assignGlobalDouble( double value, const char *name );
-void assignGlobalColor( Color color, const char *name );
-void assingGlobalFunction( const char *name, int ( *functionPtr )( lua_State* ) );
+void assignGlobalInt( int value, const char* name );
+void assignGlobalFloat( float value, const char* name );
+void assignGlobalDouble( double value, const char* name );
+void assignGlobalColor( Color color, const char* name );
+void assingGlobalFunction( const char* name, int ( *functionPtr )( lua_State* ) );
-bool luaInit( int argn, const char **argc );
-int luaTraceback( lua_State *L );
+bool luaInit( int argn, const char** argc );
+int luaTraceback( lua_State* L );
bool luaCallMain();
void luaCallUpdate();
void luaCallDraw();
@@ -34,67 +34,67 @@ void luaRegister();
void platformDefineGlobals();
void luaPlatformRegister();
/* Lua get types. */
-bool uluaGetBoolean( lua_State *L, int index );
-Color uluaGetColor( lua_State *L, int index );
-Vector2 uluaGetVector2( lua_State *L, int index );
-Vector3 uluaGetVector3( lua_State *L, int index );
-Vector4 uluaGetVector4( lua_State *L, int index );
-Rectangle uluaGetRectangle( lua_State *L, int index );
-Quaternion uluaGetQuaternion( lua_State *L, int index );
-Matrix uluaGetMatrix( lua_State *L, int index );
-BoundingBox uluaGetBoundingBox( lua_State *L, int index );
-Ray uluaGetRay( lua_State *L, int index );
-NPatchInfo uluaGetNPatchInfo( lua_State *L, int index );
-BoneInfo uluaGetBoneInfo( lua_State *L, int index );
-Transform uluaGetTransform( lua_State *L, int index );
-Buffer* uluaGetBuffer( lua_State *L, int index );
-Image* uluaGetImage( lua_State *L, int index );
-Texture* uluaGetTexture( lua_State *L, int index );
-RenderTexture* uluaGetRenderTexture( lua_State *L, int index );
-Shader* uluaGetShader( lua_State *L, int index );
-Mesh* uluaGetMesh( lua_State *L, int index );
-Camera2D* uluaGetCamera2D( lua_State *L, int index );
-Camera3D* uluaGetCamera3D( lua_State *L, int index );
-Font* uluaGetFont( lua_State *L, int index );
-GlyphInfo* uluaGetGlyphInfo( lua_State *L, int index );
-Wave* uluaGetWave( lua_State *L, int index );
-Sound* uluaGetSound( lua_State *L, int index );
-Music* uluaGetMusic( lua_State *L, int index );
-Light* uluaGetLight( lua_State *L, int index );
-Material* uluaGetMaterial( lua_State *L, int index );
-Model* uluaGetModel( lua_State *L, int index );
-ModelAnimation* uluaGetModelAnimation( lua_State *L, int index );
-rlRenderBatch* uluaGetRLRenderBatch( lua_State *L, int index );
+bool uluaGetBoolean( lua_State* L, int index );
+Color uluaGetColor( lua_State* L, int index );
+Vector2 uluaGetVector2( lua_State* L, int index );
+Vector3 uluaGetVector3( lua_State* L, int index );
+Vector4 uluaGetVector4( lua_State* L, int index );
+Rectangle uluaGetRectangle( lua_State* L, int index );
+Quaternion uluaGetQuaternion( lua_State* L, int index );
+Matrix uluaGetMatrix( lua_State* L, int index );
+BoundingBox uluaGetBoundingBox( lua_State* L, int index );
+Ray uluaGetRay( lua_State* L, int index );
+NPatchInfo uluaGetNPatchInfo( lua_State* L, int index );
+BoneInfo uluaGetBoneInfo( lua_State* L, int index );
+Transform uluaGetTransform( lua_State* L, int index );
+Buffer* uluaGetBuffer( lua_State* L, int index );
+Image* uluaGetImage( lua_State* L, int index );
+Texture* uluaGetTexture( lua_State* L, int index );
+RenderTexture* uluaGetRenderTexture( lua_State* L, int index );
+Shader* uluaGetShader( lua_State* L, int index );
+Mesh* uluaGetMesh( lua_State* L, int index );
+Camera2D* uluaGetCamera2D( lua_State* L, int index );
+Camera3D* uluaGetCamera3D( lua_State* L, int index );
+Font* uluaGetFont( lua_State* L, int index );
+GlyphInfo* uluaGetGlyphInfo( lua_State* L, int index );
+Wave* uluaGetWave( lua_State* L, int index );
+Sound* uluaGetSound( lua_State* L, int index );
+Music* uluaGetMusic( lua_State* L, int index );
+Light* uluaGetLight( lua_State* L, int index );
+Material* uluaGetMaterial( lua_State* L, int index );
+Model* uluaGetModel( lua_State* L, int index );
+ModelAnimation* uluaGetModelAnimation( lua_State* L, int index );
+rlRenderBatch* uluaGetRLRenderBatch( lua_State* L, int index );
/* Lua push types. */
-void uluaPushColor( lua_State *L, Color color );
-void uluaPushVector2( lua_State *L, Vector2 vector );
-void uluaPushVector3( lua_State *L, Vector3 vector );
-void uluaPushVector4( lua_State *L, Vector4 vector );
-void uluaPushRectangle( lua_State *L, Rectangle rect );
-void uluaPushQuaternion( lua_State *L, Quaternion quaternion );
-void uluaPushMatrix( lua_State *L, Matrix matrix );
-void uluaPushRay( lua_State *L, Ray ray );
-void uluaPushRayCollision( lua_State *L, RayCollision rayCol );
-void uluaPushBoundingBox( lua_State *L, BoundingBox box );
-void uluaPushBoneInfo( lua_State *L, BoneInfo boneInfo );
-void uluaPushTransform( lua_State *L, Transform transform );
-void uluaPushBuffer( lua_State *L, Buffer buffer );
-void uluaPushImage( lua_State *L, Image image );
-void uluaPushTexture( lua_State *L, Texture texture );
-void uluaPushRenderTexture( lua_State *L, RenderTexture renderTexture );
-void uluaPushCamera2D( lua_State *L, Camera2D camera );
-void uluaPushCamera3D( lua_State *L, Camera3D camera );
-void uluaPushShader( lua_State *L, Shader shader );
-void uluaPushFont( lua_State *L, Font font );
-void uluaPushGlyphInfo( lua_State *L, GlyphInfo glyph );
-void uluaPushWave( lua_State *L, Wave wave );
-void uluaPushSound( lua_State *L, Sound sound );
-void uluaPushMusic( lua_State *L, Music music );
-void uluaPushLight( lua_State *L, Light light );
-void uluaPushMaterial( lua_State *L, Material material );
-void uluaPushMesh( lua_State *L, Mesh mesh );
-void uluaPushModel( lua_State *L, Model model );
-void uluaPushModelAnimation( lua_State *L, ModelAnimation modelAnimation );
-void uluaPushRLRenderBatch( lua_State *L, rlRenderBatch renderBatch );
+void uluaPushColor( lua_State* L, Color color );
+void uluaPushVector2( lua_State* L, Vector2 vector );
+void uluaPushVector3( lua_State* L, Vector3 vector );
+void uluaPushVector4( lua_State* L, Vector4 vector );
+void uluaPushRectangle( lua_State* L, Rectangle rect );
+void uluaPushQuaternion( lua_State* L, Quaternion quaternion );
+void uluaPushMatrix( lua_State* L, Matrix matrix );
+void uluaPushRay( lua_State* L, Ray ray );
+void uluaPushRayCollision( lua_State* L, RayCollision rayCol );
+void uluaPushBoundingBox( lua_State* L, BoundingBox box );
+void uluaPushBoneInfo( lua_State* L, BoneInfo boneInfo );
+void uluaPushTransform( lua_State* L, Transform transform );
+void uluaPushBuffer( lua_State* L, Buffer buffer );
+void uluaPushImage( lua_State* L, Image image );
+void uluaPushTexture( lua_State* L, Texture texture );
+void uluaPushRenderTexture( lua_State* L, RenderTexture renderTexture );
+void uluaPushCamera2D( lua_State* L, Camera2D camera );
+void uluaPushCamera3D( lua_State* L, Camera3D camera );
+void uluaPushShader( lua_State* L, Shader shader );
+void uluaPushFont( lua_State* L, Font font );
+void uluaPushGlyphInfo( lua_State* L, GlyphInfo glyph );
+void uluaPushWave( lua_State* L, Wave wave );
+void uluaPushSound( lua_State* L, Sound sound );
+void uluaPushMusic( lua_State* L, Music music );
+void uluaPushLight( lua_State* L, Light light );
+void uluaPushMaterial( lua_State* L, Material material );
+void uluaPushMesh( lua_State* L, Mesh mesh );
+void uluaPushModel( lua_State* L, Model model );
+void uluaPushModelAnimation( lua_State* L, ModelAnimation modelAnimation );
+void uluaPushRLRenderBatch( lua_State* L, rlRenderBatch renderBatch );
/* Utils. */
-int uluaGetTableLen( lua_State *L, int index );
+int uluaGetTableLen( lua_State* L, int index );
diff --git a/include/models.h b/include/models.h
index 68ebb3e..786b16e 100644
--- a/include/models.h
+++ b/include/models.h
@@ -1,118 +1,118 @@
#pragma once
/* Internals. */
-void unloadMaterial( Material *material );
+void unloadMaterial( Material* material );
/* Deleted from raylib. Need for freeing models. */
void DrawBillboardProNoRatio( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint );
void DrawBillboardRecNoRatio( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint );
/* Basic geometric 3D shapes drawing functions. */
-int lmodelsDrawLine3D( lua_State *L );
-int lmodelsDrawPoint3D( lua_State *L );
-int lmodelsDrawCircle3D( lua_State *L );
-int lmodelsDrawTriangle3D( lua_State *L );
-int lmodelsDrawCube( lua_State *L );
-int lmodelsDrawCubeWires( lua_State *L );
-int lmodelsDrawSphere( lua_State *L );
-int lmodelsDrawSphereEx( lua_State *L );
-int lmodelsDrawSphereWires( lua_State *L );
-int lmodelsDrawCylinder( lua_State *L );
-int lmodelsDrawCylinderEx( lua_State *L );
-int lmodelsDrawCylinderWires( lua_State *L );
-int lmodelsDrawCylinderWiresEx( lua_State *L );
-int lmodelsDrawCapsule( lua_State *L );
-int lmodelsDrawCapsuleWires( lua_State *L );
-int lmodelsDrawPlane( lua_State *L );
-int lmodelDrawQuad3DTexture( lua_State *L );
-int lmodelsDrawRay( lua_State *L );
-int lmodelsDrawGrid( lua_State *L );
+int lmodelsDrawLine3D( lua_State* L );
+int lmodelsDrawPoint3D( lua_State* L );
+int lmodelsDrawCircle3D( lua_State* L );
+int lmodelsDrawTriangle3D( lua_State* L );
+int lmodelsDrawCube( lua_State* L );
+int lmodelsDrawCubeWires( lua_State* L );
+int lmodelsDrawSphere( lua_State* L );
+int lmodelsDrawSphereEx( lua_State* L );
+int lmodelsDrawSphereWires( lua_State* L );
+int lmodelsDrawCylinder( lua_State* L );
+int lmodelsDrawCylinderEx( lua_State* L );
+int lmodelsDrawCylinderWires( lua_State* L );
+int lmodelsDrawCylinderWiresEx( lua_State* L );
+int lmodelsDrawCapsule( lua_State* L );
+int lmodelsDrawCapsuleWires( lua_State* L );
+int lmodelsDrawPlane( lua_State* L );
+int lmodelDrawQuad3DTexture( lua_State* L );
+int lmodelsDrawRay( lua_State* L );
+int lmodelsDrawGrid( lua_State* L );
/* Model management functions. */
-int lmodelsLoadModel( lua_State *L );
-int lmodelsLoadModelFromMesh( lua_State *L );
-int lmodelsIsModelReady( lua_State *L );
-int lmodelsUnloadModel( lua_State *L );
-int lmodelsGetModelBoundingBox( lua_State *L );
-int lmodelsSetModelTransform( lua_State *L );
-int lmodelsSetModelMesh( lua_State *L );
-int lmodelsSetModelMaterial( lua_State *L );
-int lmodelsSetModelMeshMaterial( lua_State *L );
-int lmodelsSetModelBone( lua_State *L );
-int lmodelsSetModelBindPose( lua_State *L );
-int lmodelsGetModelTransform( lua_State *L );
-int lmodelsGetModelMeshCount( lua_State *L );
-int lmodelsGetModelMaterialCount( lua_State *L );
-int lmodelsGetModelMesh( lua_State *L );
-int lmodelsGetModelMaterial( lua_State *L );
-int lmodelsGetModelBoneCount( lua_State *L );
-int lmodelsGetModelBone( lua_State *L );
-int lmodelsGetModelBindPose( lua_State *L );
+int lmodelsLoadModel( lua_State* L );
+int lmodelsLoadModelFromMesh( lua_State* L );
+int lmodelsIsModelReady( lua_State* L );
+int lmodelsUnloadModel( lua_State* L );
+int lmodelsGetModelBoundingBox( lua_State* L );
+int lmodelsSetModelTransform( lua_State* L );
+int lmodelsSetModelMesh( lua_State* L );
+int lmodelsSetModelMaterial( lua_State* L );
+int lmodelsSetModelMeshMaterial( lua_State* L );
+int lmodelsSetModelBone( lua_State* L );
+int lmodelsSetModelBindPose( lua_State* L );
+int lmodelsGetModelTransform( lua_State* L );
+int lmodelsGetModelMeshCount( lua_State* L );
+int lmodelsGetModelMaterialCount( lua_State* L );
+int lmodelsGetModelMesh( lua_State* L );
+int lmodelsGetModelMaterial( lua_State* L );
+int lmodelsGetModelBoneCount( lua_State* L );
+int lmodelsGetModelBone( lua_State* L );
+int lmodelsGetModelBindPose( lua_State* L );
/* Model drawing functions. */
-int lmodelsDrawModel( lua_State *L );
-int lmodelsDrawModelEx( lua_State *L );
-int lmodelsDrawModelWires( lua_State *L );
-int lmodelsDrawModelWiresEx( lua_State *L );
-int lmodelsDrawBoundingBox( lua_State *L );
-int lmodelsDrawBillboard( lua_State *L );
-int lmodelsDrawBillboardRec( lua_State *L );
-int lmodelsDrawBillboardPro( lua_State *L );
+int lmodelsDrawModel( lua_State* L );
+int lmodelsDrawModelEx( lua_State* L );
+int lmodelsDrawModelWires( lua_State* L );
+int lmodelsDrawModelWiresEx( lua_State* L );
+int lmodelsDrawBoundingBox( lua_State* L );
+int lmodelsDrawBillboard( lua_State* L );
+int lmodelsDrawBillboardRec( lua_State* L );
+int lmodelsDrawBillboardPro( lua_State* L );
/* Mesh management functions. */
-int lmodelsUpdateMesh( lua_State *L );
-int lmodelsUnloadMesh( lua_State *L );
-int lmodelsDrawMesh( lua_State *L );
-int lmodelsDrawMeshInstanced( lua_State *L );
-int lmodelsSetMeshColor( lua_State *L );
-int lmodelsExportMesh( lua_State *L );
-int lmodelsGetMeshBoundingBox( lua_State *L );
-int lmodelsGenMeshTangents( lua_State *L );
+int lmodelsUpdateMesh( lua_State* L );
+int lmodelsUnloadMesh( lua_State* L );
+int lmodelsDrawMesh( lua_State* L );
+int lmodelsDrawMeshInstanced( lua_State* L );
+int lmodelsSetMeshColor( lua_State* L );
+int lmodelsExportMesh( lua_State* L );
+int lmodelsGetMeshBoundingBox( lua_State* L );
+int lmodelsGenMeshTangents( lua_State* L );
/* Mesh generation functions. */
-int lmodelsGenMeshPoly( lua_State *L );
-int lmodelsGenMeshPlane( lua_State *L );
-int lmodelsGenMeshCube( lua_State *L );
-int lmodelsGenMeshSphere( lua_State *L );
-int lmodelsGenMeshCylinder( lua_State *L );
-int lmodelsGenMeshCone( lua_State *L );
-int lmodelsGenMeshTorus( lua_State *L );
-int lmodelsGenMeshKnot( lua_State *L );
-int lmodelsGenMeshHeightmap( lua_State *L );
-int lmodelsGenMeshCubicmap( lua_State *L );
-int lmodelsGenMeshCustom( lua_State *L );
+int lmodelsGenMeshPoly( lua_State* L );
+int lmodelsGenMeshPlane( lua_State* L );
+int lmodelsGenMeshCube( lua_State* L );
+int lmodelsGenMeshSphere( lua_State* L );
+int lmodelsGenMeshCylinder( lua_State* L );
+int lmodelsGenMeshCone( lua_State* L );
+int lmodelsGenMeshTorus( lua_State* L );
+int lmodelsGenMeshKnot( lua_State* L );
+int lmodelsGenMeshHeightmap( lua_State* L );
+int lmodelsGenMeshCubicmap( lua_State* L );
+int lmodelsGenMeshCustom( lua_State* L );
/* Material management functions. */
-int lmodelsLoadMaterials( lua_State *L );
-int lmodelsGetMaterialDefault( lua_State *L );
-int lmodelsLoadMaterialDefault( lua_State *L );
-int lmodelsCreateMaterial( lua_State *L );
-int lmodelsIsMaterialReady( lua_State *L );
-int lmodelsUnloadMaterial( lua_State *L );
-int lmodelsSetMaterialTexture( lua_State *L );
-int lmodelsSetMaterialColor( lua_State *L );
-int lmodelsSetMaterialValue( lua_State *L );
-int lmodelsSetMaterialShader( lua_State *L );
-int lmodelsSetMaterialParams( lua_State *L );
-int lmodelsGetMaterialTexture( lua_State *L );
-int lmodelsGetMaterialColor( lua_State *L );
-int lmodelsGetMaterialValue( lua_State *L );
-int lmodelsGetMaterialShader( lua_State *L );
-int lmodelsGetMaterialParams( lua_State *L );
+int lmodelsLoadMaterials( lua_State* L );
+int lmodelsGetMaterialDefault( lua_State* L );
+int lmodelsLoadMaterialDefault( lua_State* L );
+int lmodelsCreateMaterial( lua_State* L );
+int lmodelsIsMaterialReady( lua_State* L );
+int lmodelsUnloadMaterial( lua_State* L );
+int lmodelsSetMaterialTexture( lua_State* L );
+int lmodelsSetMaterialColor( lua_State* L );
+int lmodelsSetMaterialValue( lua_State* L );
+int lmodelsSetMaterialShader( lua_State* L );
+int lmodelsSetMaterialParams( lua_State* L );
+int lmodelsGetMaterialTexture( lua_State* L );
+int lmodelsGetMaterialColor( lua_State* L );
+int lmodelsGetMaterialValue( lua_State* L );
+int lmodelsGetMaterialShader( lua_State* L );
+int lmodelsGetMaterialParams( lua_State* L );
/* Model animations management functions. */
-int lmodelsLoadModelAnimations( lua_State *L );
-int lmodelsUpdateModelAnimation( lua_State *L );
-int lmodelsUnloadModelAnimation( lua_State *L );
-int lmodelsUnloadModelAnimations( lua_State *L );
-int lmodelsIsModelAnimationValid( lua_State *L );
-int lmodelsSetModelAnimationBone( lua_State *L );
-int lmodelsSetModelAnimationFramePose( lua_State *L );
-int lmodelsSetModelAnimationName( lua_State *L );
-int lmodelsGetModelAnimationBoneCount( lua_State *L );
-int lmodelsGetModelAnimationFrameCount( lua_State *L );
-int lmodelsGetModelAnimationBone( lua_State *L );
-int lmodelsGetModelAnimationFramePose( lua_State *L );
-int lmodelsGetModelAnimationName( lua_State *L );
+int lmodelsLoadModelAnimations( lua_State* L );
+int lmodelsUpdateModelAnimation( lua_State* L );
+int lmodelsUnloadModelAnimation( lua_State* L );
+int lmodelsUnloadModelAnimations( lua_State* L );
+int lmodelsIsModelAnimationValid( lua_State* L );
+int lmodelsSetModelAnimationBone( lua_State* L );
+int lmodelsSetModelAnimationFramePose( lua_State* L );
+int lmodelsSetModelAnimationName( lua_State* L );
+int lmodelsGetModelAnimationBoneCount( lua_State* L );
+int lmodelsGetModelAnimationFrameCount( lua_State* L );
+int lmodelsGetModelAnimationBone( lua_State* L );
+int lmodelsGetModelAnimationFramePose( lua_State* L );
+int lmodelsGetModelAnimationName( lua_State* L );
/* Collision detection functions. */
-int lmodelsCheckCollisionSpheres( lua_State *L );
-int lmodelsCheckCollisionBoxes( lua_State *L );
-int lmodelsCheckCollisionBoxSphere( lua_State *L );
-int lmodelsGetRayCollisionSphere( lua_State *L );
-int lmodelsGetRayCollisionBox( lua_State *L );
-int lmodelsGetRayCollisionMesh( lua_State *L );
-int lmodelsGetRayCollisionTriangle( lua_State *L );
-int lmodelsGetRayCollisionQuad( lua_State *L );
+int lmodelsCheckCollisionSpheres( lua_State* L );
+int lmodelsCheckCollisionBoxes( lua_State* L );
+int lmodelsCheckCollisionBoxSphere( lua_State* L );
+int lmodelsGetRayCollisionSphere( lua_State* L );
+int lmodelsGetRayCollisionBox( lua_State* L );
+int lmodelsGetRayCollisionMesh( lua_State* L );
+int lmodelsGetRayCollisionTriangle( lua_State* L );
+int lmodelsGetRayCollisionQuad( lua_State* L );
diff --git a/include/platforms/core_desktop_sdl.h b/include/platforms/core_desktop_sdl.h
index ea2a86d..e787494 100644
--- a/include/platforms/core_desktop_sdl.h
+++ b/include/platforms/core_desktop_sdl.h
@@ -6,7 +6,7 @@
// typedef struct {
// int SDL_eventQueueLen;
-// SDL_Event **SDL_eventQueue;
+// SDL_Event** SDL_eventQueue;
// } SDL_State;
// extern SDL_State *SDL_state;
diff --git a/include/reasings.h b/include/reasings.h
index e8c9a65..b998ce9 100644
--- a/include/reasings.h
+++ b/include/reasings.h
@@ -1,44 +1,44 @@
#pragma once
/* Linear Easing functions. */
-int leasingsEaseLinear( lua_State *L );
+int leasingsEaseLinear( lua_State* L );
/* Sine Easing functions. */
-int leasingsEaseSineIn( lua_State *L );
-int leasingsEaseSineOut( lua_State *L );
-int leasingsEaseSineInOut( lua_State *L );
+int leasingsEaseSineIn( lua_State* L );
+int leasingsEaseSineOut( lua_State* L );
+int leasingsEaseSineInOut( lua_State* L );
/* Circular Easing functions. */
-int leasingsEaseCircIn( lua_State *L );
-int leasingsEaseCircOut( lua_State *L );
-int leasingsEaseCircInOut( lua_State *L );
+int leasingsEaseCircIn( lua_State* L );
+int leasingsEaseCircOut( lua_State* L );
+int leasingsEaseCircInOut( lua_State* L );
/* Cubic Easing functions. */
-int leasingsEaseCubicIn( lua_State *L );
-int leasingsEaseCubicOut( lua_State *L );
-int leasingsEaseCubicInOut( lua_State *L );
+int leasingsEaseCubicIn( lua_State* L );
+int leasingsEaseCubicOut( lua_State* L );
+int leasingsEaseCubicInOut( lua_State* L );
/* Quadratic Easing functions. */
-int leasingsEaseQuadIn( lua_State *L );
-int leasingsEaseQuadOut( lua_State *L );
-int leasingsEaseQuadInOut( lua_State *L );
+int leasingsEaseQuadIn( lua_State* L );
+int leasingsEaseQuadOut( lua_State* L );
+int leasingsEaseQuadInOut( lua_State* L );
/* Exponential Easing functions. */
-int leasingsEaseExpoIn( lua_State *L );
-int leasingsEaseExpoOut( lua_State *L );
-int leasingsEaseExpoInOut( lua_State *L );
+int leasingsEaseExpoIn( lua_State* L );
+int leasingsEaseExpoOut( lua_State* L );
+int leasingsEaseExpoInOut( lua_State* L );
/* Back Easing functions. */
-int leasingsEaseBackIn( lua_State *L );
-int leasingsEaseBackOut( lua_State *L );
-int leasingsEaseBackInOut( lua_State *L );
+int leasingsEaseBackIn( lua_State* L );
+int leasingsEaseBackOut( lua_State* L );
+int leasingsEaseBackInOut( lua_State* L );
/* Bounce Easing functions. */
-int leasingsEaseBounceIn( lua_State *L );
-int leasingsEaseBounceOut( lua_State *L );
-int leasingsEaseBounceInOut( lua_State *L );
+int leasingsEaseBounceIn( lua_State* L );
+int leasingsEaseBounceOut( lua_State* L );
+int leasingsEaseBounceInOut( lua_State* L );
/* Elastic Easing functions. */
-int leasingsEaseElasticIn( lua_State *L );
-int leasingsEaseElasticOut( lua_State *L );
-int leasingsEaseElasticInOut( lua_State *L );
+int leasingsEaseElasticIn( lua_State* L );
+int leasingsEaseElasticOut( lua_State* L );
+int leasingsEaseElasticInOut( lua_State* L );
diff --git a/include/rgui.h b/include/rgui.h
index 7f2641b..7afc310 100644
--- a/include/rgui.h
+++ b/include/rgui.h
@@ -1,68 +1,68 @@
#pragma once
/* Global gui state control functions. */
-int lguiGuiEnable( lua_State *L );
-int lguiGuiDisable( lua_State *L );
-int lguiGuiLock( lua_State *L );
-int lguiGuiUnlock( lua_State *L );
-int lguiGuiIsLocked( lua_State *L );
-int lguiGuiSetAlpha( lua_State *L );
-int lguiGuiSetState( lua_State *L );
-int lguiGuiGetState( lua_State *L );
+int lguiGuiEnable( lua_State* L );
+int lguiGuiDisable( lua_State* L );
+int lguiGuiLock( lua_State* L );
+int lguiGuiUnlock( lua_State* L );
+int lguiGuiIsLocked( lua_State* L );
+int lguiGuiSetAlpha( lua_State* L );
+int lguiGuiSetState( lua_State* L );
+int lguiGuiGetState( lua_State* L );
/* Font set/get functions. */
-int lguiGuiSetFont( lua_State *L );
-int lguiGuiGetFont( lua_State *L );
+int lguiGuiSetFont( lua_State* L );
+int lguiGuiGetFont( lua_State* L );
/* Style set/get functions. */
-int lguiGuiSetStyle( lua_State *L );
-int lguiGuiGetStyle( lua_State *L );
+int lguiGuiSetStyle( lua_State* L );
+int lguiGuiGetStyle( lua_State* L );
/* Styles loading functions. */
-int lguiGuiLoadStyle( lua_State *L );
-int lguiGuiLoadStyleDefault( lua_State *L );
+int lguiGuiLoadStyle( lua_State* L );
+int lguiGuiLoadStyleDefault( lua_State* L );
/* Tooltips management functions. */
-int lguiGuiEnableTooltip( lua_State *L );
-int lguiGuiDisableTooltip( lua_State *L );
-int lguiGuiSetTooltip( lua_State *L );
+int lguiGuiEnableTooltip( lua_State* L );
+int lguiGuiDisableTooltip( lua_State* L );
+int lguiGuiSetTooltip( lua_State* L );
/* Icons functionality. */
-int lguiGuiIconText( lua_State *L );
-int lguiGuiSetIconScale( lua_State *L );
-int lguiGuiGetIcons( lua_State *L );
-int lguiGuiLoadIcons( lua_State *L );
-int lguiGuiDrawIcon( lua_State *L );
+int lguiGuiIconText( lua_State* L );
+int lguiGuiSetIconScale( lua_State* L );
+int lguiGuiGetIcons( lua_State* L );
+int lguiGuiLoadIcons( lua_State* L );
+int lguiGuiDrawIcon( lua_State* L );
/* Container/separator controls, useful for controls organization. */
-int lguiGuiWindowBox( lua_State *L );
-int lguiGuiGroupBox( lua_State *L );
-int lguiGuiLine( lua_State *L );
-int lguiGuiPanel( lua_State *L );
-int lguiGuiTabBar( lua_State *L );
-int lguiGuiScrollPanel( lua_State *L );
+int lguiGuiWindowBox( lua_State* L );
+int lguiGuiGroupBox( lua_State* L );
+int lguiGuiLine( lua_State* L );
+int lguiGuiPanel( lua_State* L );
+int lguiGuiTabBar( lua_State* L );
+int lguiGuiScrollPanel( lua_State* L );
/* Basic controls set. */
-int lguiGuiLabel( lua_State *L );
-int lguiGuiButton( lua_State *L );
-int lguiGuiLabelButton( lua_State *L );
-int lguiGuiToggle( lua_State *L );
-int lguiGuiToggleGroup( lua_State *L );
-int lguiGuiToggleSlider( lua_State *L );
-int lguiGuiCheckBox( lua_State *L );
-int lguiGuiComboBox( lua_State *L );
-int lguiGuiDropdownBox( lua_State *L );
-int lguiGuiSpinner( lua_State *L );
-int lguiGuiValueBox( lua_State *L );
-int lguiGuiTextBox( lua_State *L );
-int lguiGuiSlider( lua_State *L );
-int lguiGuiSliderBar( lua_State *L );
-int lguiGuiProgressBar( lua_State *L );
-int lguiGuiStatusBar( lua_State *L );
-int lguiGuiDummyRec( lua_State *L );
-int lguiGuiGrid( lua_State *L );
-int lguiGuiScrollBar( lua_State *L );
+int lguiGuiLabel( lua_State* L );
+int lguiGuiButton( lua_State* L );
+int lguiGuiLabelButton( lua_State* L );
+int lguiGuiToggle( lua_State* L );
+int lguiGuiToggleGroup( lua_State* L );
+int lguiGuiToggleSlider( lua_State* L );
+int lguiGuiCheckBox( lua_State* L );
+int lguiGuiComboBox( lua_State* L );
+int lguiGuiDropdownBox( lua_State* L );
+int lguiGuiSpinner( lua_State* L );
+int lguiGuiValueBox( lua_State* L );
+int lguiGuiTextBox( lua_State* L );
+int lguiGuiSlider( lua_State* L );
+int lguiGuiSliderBar( lua_State* L );
+int lguiGuiProgressBar( lua_State* L );
+int lguiGuiStatusBar( lua_State* L );
+int lguiGuiDummyRec( lua_State* L );
+int lguiGuiGrid( lua_State* L );
+int lguiGuiScrollBar( lua_State* L );
/* Advance controls set. */
-int lguiGuiListView( lua_State *L );
-int lguiGuiListViewEx( lua_State *L );
-int lguiGuiMessageBox( lua_State *L );
-int lguiGuiTextInputBox( lua_State *L );
-int lguiGuiColorPicker( lua_State *L );
-int lguiGuiColorPanel( lua_State *L );
-int lguiGuiColorBarAlpha( lua_State *L );
-int lguiGuiColorBarHue( lua_State *L );
-int lguiGuiColorPickerHSV( lua_State *L );
-int lguiGuiColorPanelHSV( lua_State *L );
+int lguiGuiListView( lua_State* L );
+int lguiGuiListViewEx( lua_State* L );
+int lguiGuiMessageBox( lua_State* L );
+int lguiGuiTextInputBox( lua_State* L );
+int lguiGuiColorPicker( lua_State* L );
+int lguiGuiColorPanel( lua_State* L );
+int lguiGuiColorBarAlpha( lua_State* L );
+int lguiGuiColorBarHue( lua_State* L );
+int lguiGuiColorPickerHSV( lua_State* L );
+int lguiGuiColorPanelHSV( lua_State* L );
diff --git a/include/rmath.h b/include/rmath.h
index 206af6e..26642d9 100644
--- a/include/rmath.h
+++ b/include/rmath.h
@@ -4,117 +4,117 @@ int imin( int a, int b );
int imax( int a, int b );
/* Utils. */
-int lmathClamp( lua_State *L );
-int lmathLerp( lua_State *L );
-int lmathNormalize( lua_State *L );
-int lmathRemap( lua_State *L );
-int lmathWrap( lua_State *L );
-int lmathFloatEquals( lua_State *L );
+int lmathClamp( lua_State* L );
+int lmathLerp( lua_State* L );
+int lmathNormalize( lua_State* L );
+int lmathRemap( lua_State* L );
+int lmathWrap( lua_State* L );
+int lmathFloatEquals( lua_State* L );
/* Vector2. */
-int lmathVector2Zero( lua_State *L );
-int lmathVector2One( lua_State *L );
-int lmathVector2Add( lua_State *L );
-int lmathVector2AddValue( lua_State *L );
-int lmathVector2Subtract( lua_State *L );
-int lmathVector2SubtractValue( lua_State *L );
-int lmathVector2Length( lua_State *L );
-int lmathVector2LengthSqr( lua_State *L );
-int lmathVector2DotProduct( lua_State *L );
-int lmathVector2Distance( lua_State *L );
-int lmathVector2DistanceSqr( lua_State *L );
-int lmathVector2Angle( lua_State *L );
-int lmathVector2LineAngle( lua_State *L );
-int lmathVector2Scale( lua_State *L );
-int lmathVector2Multiply( lua_State *L );
-int lmathVector2Negate( lua_State *L );
-int lmathVector2Divide( lua_State *L );
-int lmathVector2Normalize( lua_State *L );
-int lmathVector2Transform( lua_State *L );
-int lmathVector2Lerp( lua_State *L );
-int lmathVector2Reflect( lua_State *L );
-int lmathVector2Rotate( lua_State *L );
-int lmathVector2MoveTowards( lua_State *L );
-int lmathVector2Invert( lua_State *L );
-int lmathVector2Clamp( lua_State *L );
-int lmathVector2ClampValue( lua_State *L );
-int lmathVector2Equals( lua_State *L );
+int lmathVector2Zero( lua_State* L );
+int lmathVector2One( lua_State* L );
+int lmathVector2Add( lua_State* L );
+int lmathVector2AddValue( lua_State* L );
+int lmathVector2Subtract( lua_State* L );
+int lmathVector2SubtractValue( lua_State* L );
+int lmathVector2Length( lua_State* L );
+int lmathVector2LengthSqr( lua_State* L );
+int lmathVector2DotProduct( lua_State* L );
+int lmathVector2Distance( lua_State* L );
+int lmathVector2DistanceSqr( lua_State* L );
+int lmathVector2Angle( lua_State* L );
+int lmathVector2LineAngle( lua_State* L );
+int lmathVector2Scale( lua_State* L );
+int lmathVector2Multiply( lua_State* L );
+int lmathVector2Negate( lua_State* L );
+int lmathVector2Divide( lua_State* L );
+int lmathVector2Normalize( lua_State* L );
+int lmathVector2Transform( lua_State* L );
+int lmathVector2Lerp( lua_State* L );
+int lmathVector2Reflect( lua_State* L );
+int lmathVector2Rotate( lua_State* L );
+int lmathVector2MoveTowards( lua_State* L );
+int lmathVector2Invert( lua_State* L );
+int lmathVector2Clamp( lua_State* L );
+int lmathVector2ClampValue( lua_State* L );
+int lmathVector2Equals( lua_State* L );
/* Vector3. */
-int lmathVector3Zero( lua_State *L );
-int lmathVector3One( lua_State *L );
-int lmathVector3Add( lua_State *L );
-int lmathVector3AddValue( lua_State *L );
-int lmathVector3Subtract( lua_State *L );
-int lmathVector3SubtractValue( lua_State *L );
-int lmathVector3Scale( lua_State *L );
-int lmathVector3Multiply( lua_State *L );
-int lmathVector3CrossProduct( lua_State *L );
-int lmathVector3Perpendicular( lua_State *L );
-int lmathVector3Length( lua_State *L );
-int lmathVector3LengthSqr( lua_State *L );
-int lmathVector3DotProduct( lua_State *L );
-int lmathVector3Distance( lua_State *L );
-int lmathVector3DistanceSqr( lua_State *L );
-int lmathVector3Angle( lua_State *L );
-int lmathVector3Negate( lua_State *L );
-int lmathVector3Divide( lua_State *L );
-int lmathVector3Normalize( lua_State *L );
-int lmathVector3OrthoNormalize( lua_State *L );
-int lmathVector3Transform( lua_State *L );
-int lmathVector3RotateByQuaternion( lua_State *L );
-int lmathVector3RotateByAxisAngle( lua_State *L );
-int lmathVector3Lerp( lua_State *L );
-int lmathVector3Reflect( lua_State *L );
-int lmathVector3Min( lua_State *L );
-int lmathVector3Max( lua_State *L );
-int lmathVector3Barycenter( lua_State *L );
-int lmathVector3Unproject( lua_State *L );
-int lmathVector3Invert( lua_State *L );
-int lmathVector3Clamp( lua_State *L );
-int lmathVector3ClampValue( lua_State *L );
-int lmathVector3Equals( lua_State *L );
-int lmathVector3Refract( lua_State *L );
+int lmathVector3Zero( lua_State* L );
+int lmathVector3One( lua_State* L );
+int lmathVector3Add( lua_State* L );
+int lmathVector3AddValue( lua_State* L );
+int lmathVector3Subtract( lua_State* L );
+int lmathVector3SubtractValue( lua_State* L );
+int lmathVector3Scale( lua_State* L );
+int lmathVector3Multiply( lua_State* L );
+int lmathVector3CrossProduct( lua_State* L );
+int lmathVector3Perpendicular( lua_State* L );
+int lmathVector3Length( lua_State* L );
+int lmathVector3LengthSqr( lua_State* L );
+int lmathVector3DotProduct( lua_State* L );
+int lmathVector3Distance( lua_State* L );
+int lmathVector3DistanceSqr( lua_State* L );
+int lmathVector3Angle( lua_State* L );
+int lmathVector3Negate( lua_State* L );
+int lmathVector3Divide( lua_State* L );
+int lmathVector3Normalize( lua_State* L );
+int lmathVector3OrthoNormalize( lua_State* L );
+int lmathVector3Transform( lua_State* L );
+int lmathVector3RotateByQuaternion( lua_State* L );
+int lmathVector3RotateByAxisAngle( lua_State* L );
+int lmathVector3Lerp( lua_State* L );
+int lmathVector3Reflect( lua_State* L );
+int lmathVector3Min( lua_State* L );
+int lmathVector3Max( lua_State* L );
+int lmathVector3Barycenter( lua_State* L );
+int lmathVector3Unproject( lua_State* L );
+int lmathVector3Invert( lua_State* L );
+int lmathVector3Clamp( lua_State* L );
+int lmathVector3ClampValue( lua_State* L );
+int lmathVector3Equals( lua_State* L );
+int lmathVector3Refract( lua_State* L );
/* Matrix. */
-int lmathMatrixDeterminant( lua_State *L );
-int lmathMatrixTrace( lua_State *L );
-int lmathMatrixTranspose( lua_State *L );
-int lmathMatrixInvert( lua_State *L );
-int lmathMatrixIdentity( lua_State *L );
-int lmathMatrixAdd( lua_State *L );
-int lmathMatrixSubtract( lua_State *L );
-int lmathMatrixMultiply( lua_State *L );
-int lmathMatrixTranslate( lua_State *L );
-int lmathMatrixRotate( lua_State *L );
-int lmathMatrixRotateX( lua_State *L );
-int lmathMatrixRotateY( lua_State *L );
-int lmathMatrixRotateZ( lua_State *L );
-int lmathMatrixRotateXYZ( lua_State *L );
-int lmathMatrixRotateZYX( lua_State *L );
-int lmathMatrixScale( lua_State *L );
-int lmathMatrixFrustum( lua_State *L );
-int lmathMatrixPerspective( lua_State *L );
-int lmathMatrixOrtho( lua_State *L );
-int lmathMatrixLookAt( lua_State *L );
+int lmathMatrixDeterminant( lua_State* L );
+int lmathMatrixTrace( lua_State* L );
+int lmathMatrixTranspose( lua_State* L );
+int lmathMatrixInvert( lua_State* L );
+int lmathMatrixIdentity( lua_State* L );
+int lmathMatrixAdd( lua_State* L );
+int lmathMatrixSubtract( lua_State* L );
+int lmathMatrixMultiply( lua_State* L );
+int lmathMatrixTranslate( lua_State* L );
+int lmathMatrixRotate( lua_State* L );
+int lmathMatrixRotateX( lua_State* L );
+int lmathMatrixRotateY( lua_State* L );
+int lmathMatrixRotateZ( lua_State* L );
+int lmathMatrixRotateXYZ( lua_State* L );
+int lmathMatrixRotateZYX( lua_State* L );
+int lmathMatrixScale( lua_State* L );
+int lmathMatrixFrustum( lua_State* L );
+int lmathMatrixPerspective( lua_State* L );
+int lmathMatrixOrtho( lua_State* L );
+int lmathMatrixLookAt( lua_State* L );
/* Quaternion. */
-int lmathQuaternionAdd( lua_State *L );
-int lmathQuaternionAddValue( lua_State *L );
-int lmathQuaternionSubtract( lua_State *L );
-int lmathQuaternionSubtractValue( lua_State *L );
-int lmathQuaternionIdentity( lua_State *L );
-int lmathQuaternionLength( lua_State *L );
-int lmathQuaternionNormalize( lua_State *L );
-int lmathQuaternionInvert( lua_State *L );
-int lmathQuaternionMultiply( lua_State *L );
-int lmathQuaternionScale( lua_State *L );
-int lmathQuaternionDivide( lua_State *L );
-int lmathQuaternionLerp( lua_State *L );
-int lmathQuaternionNlerp( lua_State *L );
-int lmathQuaternionSlerp( lua_State *L );
-int lmathQuaternionFromVector3ToVector3( lua_State *L );
-int lmathQuaternionFromMatrix( lua_State *L );
-int lmathQuaternionToMatrix( lua_State *L );
-int lmathQuaternionFromAxisAngle( lua_State *L );
-int lmathQuaternionToAxisAngle( lua_State *L );
-int lmathQuaternionFromEuler( lua_State *L );
-int lmathQuaternionToEuler( lua_State *L );
-int lmathQuaternionTransform( lua_State *L );
-int lmathQuaternionEquals( lua_State *L );
+int lmathQuaternionAdd( lua_State* L );
+int lmathQuaternionAddValue( lua_State* L );
+int lmathQuaternionSubtract( lua_State* L );
+int lmathQuaternionSubtractValue( lua_State* L );
+int lmathQuaternionIdentity( lua_State* L );
+int lmathQuaternionLength( lua_State* L );
+int lmathQuaternionNormalize( lua_State* L );
+int lmathQuaternionInvert( lua_State* L );
+int lmathQuaternionMultiply( lua_State* L );
+int lmathQuaternionScale( lua_State* L );
+int lmathQuaternionDivide( lua_State* L );
+int lmathQuaternionLerp( lua_State* L );
+int lmathQuaternionNlerp( lua_State* L );
+int lmathQuaternionSlerp( lua_State* L );
+int lmathQuaternionFromVector3ToVector3( lua_State* L );
+int lmathQuaternionFromMatrix( lua_State* L );
+int lmathQuaternionToMatrix( lua_State* L );
+int lmathQuaternionFromAxisAngle( lua_State* L );
+int lmathQuaternionToAxisAngle( lua_State* L );
+int lmathQuaternionFromEuler( lua_State* L );
+int lmathQuaternionToEuler( lua_State* L );
+int lmathQuaternionTransform( lua_State* L );
+int lmathQuaternionEquals( lua_State* L );
diff --git a/include/shapes.h b/include/shapes.h
index 92c0f97..13abee6 100644
--- a/include/shapes.h
+++ b/include/shapes.h
@@ -1,61 +1,61 @@
#pragma once
/* Basic shapes drawing functions. */
-int lshapesSetShapesTexture( lua_State *L );
-int lshapesDrawPixel( lua_State *L );
-int lshapesDrawLine( lua_State *L );
-int lshapesDrawLineBezier( lua_State *L );
-int lshapesDrawLineStrip( lua_State *L );
-int lshapesDrawCircle( lua_State *L );
-int lshapesDrawCircleSector( lua_State *L );
-int lshapesDrawCircleSectorLines( lua_State *L );
-int lshapesDrawCircleGradient( lua_State *L );
-int lshapesDrawCircleLines( lua_State *L );
-int lshapesDrawEllipse( lua_State *L );
-int lshapesDrawEllipseLines( lua_State *L );
-int lshapesDrawRing( lua_State *L );
-int lshapesDrawRingLines( lua_State *L );
-int lshapesDrawRectangle( lua_State *L );
-int lshapesDrawRectanglePro( lua_State *L );
-int lshapesDrawRectangleGradientV( lua_State *L );
-int lshapesDrawRectangleGradientH( lua_State *L );
-int lshapesDrawRectangleGradientEx( lua_State *L );
-int lshapesDrawRectangleLines( lua_State *L );
-int lshapesDrawRectangleLinesEx( lua_State *L );
-int lshapesDrawRectangleRounded( lua_State *L );
-int lshapesDrawRectangleRoundedLines( lua_State *L );
-int lshapesDrawTriangle( lua_State *L );
-int lshapesDrawTriangleLines( lua_State *L );
-int lshapesDrawTriangleFan( lua_State *L );
-int lshapesDrawTriangleStrip( lua_State *L );
-int lshapesDrawPoly( lua_State *L );
-int lshapesDrawPolyLines( lua_State *L );
-int lshapesDrawPolyLinesEx( lua_State *L );
+int lshapesSetShapesTexture( lua_State* L );
+int lshapesDrawPixel( lua_State* L );
+int lshapesDrawLine( lua_State* L );
+int lshapesDrawLineBezier( lua_State* L );
+int lshapesDrawLineStrip( lua_State* L );
+int lshapesDrawCircle( lua_State* L );
+int lshapesDrawCircleSector( lua_State* L );
+int lshapesDrawCircleSectorLines( lua_State* L );
+int lshapesDrawCircleGradient( lua_State* L );
+int lshapesDrawCircleLines( lua_State* L );
+int lshapesDrawEllipse( lua_State* L );
+int lshapesDrawEllipseLines( lua_State* L );
+int lshapesDrawRing( lua_State* L );
+int lshapesDrawRingLines( lua_State* L );
+int lshapesDrawRectangle( lua_State* L );
+int lshapesDrawRectanglePro( lua_State* L );
+int lshapesDrawRectangleGradientV( lua_State* L );
+int lshapesDrawRectangleGradientH( lua_State* L );
+int lshapesDrawRectangleGradientEx( lua_State* L );
+int lshapesDrawRectangleLines( lua_State* L );
+int lshapesDrawRectangleLinesEx( lua_State* L );
+int lshapesDrawRectangleRounded( lua_State* L );
+int lshapesDrawRectangleRoundedLines( lua_State* L );
+int lshapesDrawTriangle( lua_State* L );
+int lshapesDrawTriangleLines( lua_State* L );
+int lshapesDrawTriangleFan( lua_State* L );
+int lshapesDrawTriangleStrip( lua_State* L );
+int lshapesDrawPoly( lua_State* L );
+int lshapesDrawPolyLines( lua_State* L );
+int lshapesDrawPolyLinesEx( lua_State* L );
/* Splines drawing functions. */
-int lshapesDrawSplineLinear( lua_State *L );
-int lshapesDrawSplineBasis( lua_State *L );
-int lshapesDrawSplineCatmullRom( lua_State *L );
-int lshapesDrawSplineBezierQuadratic( lua_State *L );
-int lshapesDrawSplineBezierCubic( lua_State *L );
-int lshapesDrawSplineSegmentLinear( lua_State *L );
-int lshapesDrawSplineSegmentBasis( lua_State *L );
-int lshapesDrawSplineSegmentCatmullRom( lua_State *L );
-int lshapesDrawSplineSegmentBezierQuadratic( lua_State *L );
-int lshapesDrawSplineSegmentBezierCubic( lua_State *L );
+int lshapesDrawSplineLinear( lua_State* L );
+int lshapesDrawSplineBasis( lua_State* L );
+int lshapesDrawSplineCatmullRom( lua_State* L );
+int lshapesDrawSplineBezierQuadratic( lua_State* L );
+int lshapesDrawSplineBezierCubic( lua_State* L );
+int lshapesDrawSplineSegmentLinear( lua_State* L );
+int lshapesDrawSplineSegmentBasis( lua_State* L );
+int lshapesDrawSplineSegmentCatmullRom( lua_State* L );
+int lshapesDrawSplineSegmentBezierQuadratic( lua_State* L );
+int lshapesDrawSplineSegmentBezierCubic( lua_State* L );
/* Basic Spline segment point evaluation functions, for a given t [0.0f .. 1.0f]. */
-int lshapesGetSplinePointLinear( lua_State *L );
-int lshapesGetSplinePointBasis( lua_State *L );
-int lshapesGetSplinePointCatmullRom( lua_State *L );
-int lshapesGetSplinePointBezierQuad( lua_State *L );
-int lshapesGetSplinePointBezierCubic( lua_State *L );
+int lshapesGetSplinePointLinear( lua_State* L );
+int lshapesGetSplinePointBasis( lua_State* L );
+int lshapesGetSplinePointCatmullRom( lua_State* L );
+int lshapesGetSplinePointBezierQuad( lua_State* L );
+int lshapesGetSplinePointBezierCubic( lua_State* L );
/* Basic shapes collision detection functions. */
-int lshapesCheckCollisionRecs( lua_State *L );
-int lshapesCheckCollisionCircles( lua_State *L );
-int lshapesCheckCollisionCircleRec( lua_State *L );
-int lshapesCheckCollisionPointRec( lua_State *L );
-int lshapesCheckCollisionPointCircle( lua_State *L );
-int lshapesCheckCollisionPointTriangle( lua_State *L );
-int lshapesCheckCollisionPointPoly( lua_State *L );
-int lshapesCheckCollisionLines( lua_State *L );
-int lshapesCheckCollisionPointLine( lua_State *L );
-int lshapesGetCollisionRec( lua_State *L );
+int lshapesCheckCollisionRecs( lua_State* L );
+int lshapesCheckCollisionCircles( lua_State* L );
+int lshapesCheckCollisionCircleRec( lua_State* L );
+int lshapesCheckCollisionPointRec( lua_State* L );
+int lshapesCheckCollisionPointCircle( lua_State* L );
+int lshapesCheckCollisionPointTriangle( lua_State* L );
+int lshapesCheckCollisionPointPoly( lua_State* L );
+int lshapesCheckCollisionLines( lua_State* L );
+int lshapesCheckCollisionPointLine( lua_State* L );
+int lshapesGetCollisionRec( lua_State* L );
diff --git a/include/state.h b/include/state.h
index 9a29720..f38aaf1 100644
--- a/include/state.h
+++ b/include/state.h
@@ -5,17 +5,17 @@
#endif
typedef struct {
- char *exePath;
+ char* exePath;
bool hasWindow;
bool run;
bool gcUnload;
- lua_State *luaState;
+ lua_State* luaState;
Vector2 resolution;
int logLevelInvalid;
Font defaultFont;
Material defaultMaterial;
Texture defaultTexture;
- int *RLGLcurrentShaderLocs;
+ int* RLGLcurrentShaderLocs;
/* Events. */
#ifdef PLATFORM_DESKTOP
/* Window events. */
@@ -38,12 +38,12 @@ typedef struct {
GLFWpentabletproximityfun glfwtabletProximityCallback;
#elif PLATFORM_DESKTOP_SDL
int SDL_eventQueueLen;
- SDL_Event *SDL_eventQueue;
+ SDL_Event* SDL_eventQueue;
#endif
} State;
extern State *state;
-bool stateInit( int argn, const char **argc, const char *exePath );
-void stateInitInterpret( int argn, const char **argc );
+bool stateInit( int argn, const char** argc, const char* exePath );
+void stateInitInterpret( int argn, const char** argc );
void stateFree();
diff --git a/include/text.h b/include/text.h
index ff516d2..cd78f4a 100644
--- a/include/text.h
+++ b/include/text.h
@@ -2,57 +2,57 @@
void unloadGlyphInfo( GlyphInfo *glyph );
/* Font loading/unloading functions. */
-int ltextGetFontDefault( lua_State *L );
-int ltextLoadFont( lua_State *L );
-int ltextLoadFontEx( lua_State *L );
-int ltextLoadFontFromImage( lua_State *L );
-int ltextLoadFontFromMemory( lua_State *L );
-int ltextLoadFontFromData( lua_State *L );
-int ltextIsFontReady( lua_State *L );
-int ltextLoadFontData( lua_State *L );
-int ltextGenImageFontAtlas( lua_State *L );
-int ltextUnloadFont( lua_State *L );
-int ltextExportFontAsCode( lua_State *L );
+int ltextGetFontDefault( lua_State* L );
+int ltextLoadFont( lua_State* L );
+int ltextLoadFontEx( lua_State* L );
+int ltextLoadFontFromImage( lua_State* L );
+int ltextLoadFontFromMemory( lua_State* L );
+int ltextLoadFontFromData( lua_State* L );
+int ltextIsFontReady( lua_State* L );
+int ltextLoadFontData( lua_State* L );
+int ltextGenImageFontAtlas( lua_State* L );
+int ltextUnloadFont( lua_State* L );
+int ltextExportFontAsCode( lua_State* L );
/* Text drawing functions. */
-int ltextDrawFPS( lua_State *L );
-int ltextDrawText( lua_State *L );
-int ltextDrawTextEx( lua_State *L );
-int ltextDrawTextPro( lua_State *L );
-int ltextDrawTextCodepoint( lua_State *L );
-int ltextDrawTextCodepoints( lua_State *L );
-int ltextDrawTextBoxed( lua_State *L );
-int ltextDrawTextBoxedTinted( lua_State *L );
+int ltextDrawFPS( lua_State* L );
+int ltextDrawText( lua_State* L );
+int ltextDrawTextEx( lua_State* L );
+int ltextDrawTextPro( lua_State* L );
+int ltextDrawTextCodepoint( lua_State* L );
+int ltextDrawTextCodepoints( lua_State* L );
+int ltextDrawTextBoxed( lua_State* L );
+int ltextDrawTextBoxedTinted( lua_State* L );
/* Text font info functions. */
-int ltextSetTextLineSpacing( lua_State *L );
-int ltextMeasureText( lua_State *L );
-int ltextGetGlyphIndex( lua_State *L );
-int ltextGetGlyphInfo( lua_State *L );
-int ltextGetGlyphInfoByIndex( lua_State *L );
-int ltextGetGlyphAtlasRec( lua_State *L );
-int ltextGetGlyphAtlasRecByIndex( lua_State *L );
-int ltextGetFontBaseSize( lua_State *L );
-int ltextGetFontGlyphCount( lua_State *L );
-int ltextGetFontGlyphPadding( lua_State *L );
-int ltextGetFontTexture( lua_State *L );
+int ltextSetTextLineSpacing( lua_State* L );
+int ltextMeasureText( lua_State* L );
+int ltextGetGlyphIndex( lua_State* L );
+int ltextGetGlyphInfo( lua_State* L );
+int ltextGetGlyphInfoByIndex( lua_State* L );
+int ltextGetGlyphAtlasRec( lua_State* L );
+int ltextGetGlyphAtlasRecByIndex( lua_State* L );
+int ltextGetFontBaseSize( lua_State* L );
+int ltextGetFontGlyphCount( lua_State* L );
+int ltextGetFontGlyphPadding( lua_State* L );
+int ltextGetFontTexture( lua_State* L );
/* GlyphInfo management functions. */
-int ltextLoadGlyphInfo( lua_State *L );
-int ltextUnloadGlyphInfo( lua_State *L );
-int ltextSetGlyphInfoValue( lua_State *L );
-int ltextSetGlyphInfoOffset( lua_State *L );
-int ltextSetGlyphInfoAdvanceX( lua_State *L );
-int ltextSetGlyphInfoImage( lua_State *L );
-int ltextGetGlyphInfoValue( lua_State *L );
-int ltextGetGlyphInfoOffset( lua_State *L );
-int ltextGetGlyphInfoAdvanceX( lua_State *L );
-int ltextGetGlyphInfoImage( lua_State *L );
+int ltextLoadGlyphInfo( lua_State* L );
+int ltextUnloadGlyphInfo( lua_State* L );
+int ltextSetGlyphInfoValue( lua_State* L );
+int ltextSetGlyphInfoOffset( lua_State* L );
+int ltextSetGlyphInfoAdvanceX( lua_State* L );
+int ltextSetGlyphInfoImage( lua_State* L );
+int ltextGetGlyphInfoValue( lua_State* L );
+int ltextGetGlyphInfoOffset( lua_State* L );
+int ltextGetGlyphInfoAdvanceX( lua_State* L );
+int ltextGetGlyphInfoImage( lua_State* L );
/* Text codepoints management functions (unicode characters). */
-int ltextLoadUTF8( lua_State *L );
-int ltextLoadCodepoints( lua_State *L );
-int ltextGetCodepointCount( lua_State *L );
-int ltextGetCodepoint( lua_State *L );
-int ltextGetCodepointNext( lua_State *L );
-int ltextGetCodepointPrevious( lua_State *L );
-int ltextCodepointToUTF8( lua_State *L );
+int ltextLoadUTF8( lua_State* L );
+int ltextLoadCodepoints( lua_State* L );
+int ltextGetCodepointCount( lua_State* L );
+int ltextGetCodepoint( lua_State* L );
+int ltextGetCodepointNext( lua_State* L );
+int ltextGetCodepointPrevious( lua_State* L );
+int ltextCodepointToUTF8( lua_State* L );
/* Text strings management functions (no UTF-8 strings, only byte chars) */
-int ltextTextInsert( lua_State *L );
-int ltextTextSplit( lua_State *L );
+int ltextTextInsert( lua_State* L );
+int ltextTextSplit( lua_State* L );
diff --git a/include/textures.h b/include/textures.h
index a3218a0..e8e376f 100644
--- a/include/textures.h
+++ b/include/textures.h
@@ -1,120 +1,120 @@
#pragma once
/* Image loading functions. */
-int ltexturesLoadImage( lua_State *L );
-int ltexturesLoadImageRaw( lua_State *L );
-int ltexturesLoadImageSvg( lua_State *L );
-int ltexturesLoadImageAnim( lua_State *L );
-int ltexturesLoadImageFromMemory( lua_State *L );
-int ltexturesLoadImageFromData( lua_State *L );
-int ltexturesLoadImageFromTexture( lua_State *L );
-int ltexturesLoadImageFromScreen( lua_State *L );
-int ltextureIsImageReady( lua_State *L );
-int ltextureUnloadImage( lua_State *L );
-int ltexturesExportImage( lua_State *L );
-int ltexturesExportImageToMemory( lua_State *L );
-int ltexturesExportImageAsCode( lua_State *L );
+int ltexturesLoadImage( lua_State* L );
+int ltexturesLoadImageRaw( lua_State* L );
+int ltexturesLoadImageSvg( lua_State* L );
+int ltexturesLoadImageAnim( lua_State* L );
+int ltexturesLoadImageFromMemory( lua_State* L );
+int ltexturesLoadImageFromData( lua_State* L );
+int ltexturesLoadImageFromTexture( lua_State* L );
+int ltexturesLoadImageFromScreen( lua_State* L );
+int ltextureIsImageReady( lua_State* L );
+int ltextureUnloadImage( lua_State* L );
+int ltexturesExportImage( lua_State* L );
+int ltexturesExportImageToMemory( lua_State* L );
+int ltexturesExportImageAsCode( lua_State* L );
/* Image generation functions. */
-int ltexturesGenImageColor( lua_State *L );
-int ltexturesGenImageGradientLinear( lua_State *L );
-int ltexturesGenImageGradientRadial( lua_State *L );
-int ltexturesGenImageGradientSquare( lua_State *L );
-int ltexturesGenImageChecked( lua_State *L );
-int ltexturesGenImageWhiteNoise( lua_State *L );
-int ltexturesGenImagePerlinNoise( lua_State *L );
-int ltexturesGenImageCellular( lua_State *L );
-int ltexturesGenImageText( lua_State *L );
+int ltexturesGenImageColor( lua_State* L );
+int ltexturesGenImageGradientLinear( lua_State* L );
+int ltexturesGenImageGradientRadial( lua_State* L );
+int ltexturesGenImageGradientSquare( lua_State* L );
+int ltexturesGenImageChecked( lua_State* L );
+int ltexturesGenImageWhiteNoise( lua_State* L );
+int ltexturesGenImagePerlinNoise( lua_State* L );
+int ltexturesGenImageCellular( lua_State* L );
+int ltexturesGenImageText( lua_State* L );
/* Image manipulation functions. */
-int ltexturesImageCopy( lua_State *L );
-int ltexturesImageFromImage( lua_State *L );
-int ltexturesImageText( lua_State *L );
-int ltexturesImageFormat( lua_State *L );
-int ltexturesImageToPOT( lua_State *L );
-int ltexturesImageCrop( lua_State *L );
-int ltexturesImageAlphaCrop( lua_State *L );
-int ltexturesImageAlphaClear( lua_State *L );
-int ltexturesImageAlphaMask( lua_State *L );
-int ltexturesImageAlphaPremultiply( lua_State *L );
-int ltexturesImageBlurGaussian( lua_State *L );
-int ltexturesImageResize( lua_State *L );
-int ltexturesImageResizeNN( lua_State *L );
-int ltexturesImageResizeCanvas( lua_State *L );
-int ltexturesImageMipmaps( lua_State *L );
-int ltexturesImageDither( lua_State *L );
-int ltexturesImageFlipVertical( lua_State *L );
-int ltexturesImageFlipHorizontal( lua_State *L );
-int ltexturesImageRotate( lua_State *L );
-int ltexturesImageRotateCW( lua_State *L );
-int ltexturesImageRotateCCW( lua_State *L );
-int ltexturesImageColorTint( lua_State *L );
-int ltexturesImageColorInvert( lua_State *L );
-int ltexturesImageColorGrayscale( lua_State *L );
-int ltexturesImageColorContrast( lua_State *L );
-int ltexturesImageColorBrightness( lua_State *L );
-int ltexturesImageColorReplace( lua_State *L );
-int ltexturesLoadImageColors( lua_State *L );
-int ltexturesLoadImagePalette( lua_State *L );
-int ltexturesGetImageAlphaBorder( lua_State *L );
-int ltexturesGetImageColor( lua_State *L );
+int ltexturesImageCopy( lua_State* L );
+int ltexturesImageFromImage( lua_State* L );
+int ltexturesImageText( lua_State* L );
+int ltexturesImageFormat( lua_State* L );
+int ltexturesImageToPOT( lua_State* L );
+int ltexturesImageCrop( lua_State* L );
+int ltexturesImageAlphaCrop( lua_State* L );
+int ltexturesImageAlphaClear( lua_State* L );
+int ltexturesImageAlphaMask( lua_State* L );
+int ltexturesImageAlphaPremultiply( lua_State* L );
+int ltexturesImageBlurGaussian( lua_State* L );
+int ltexturesImageResize( lua_State* L );
+int ltexturesImageResizeNN( lua_State* L );
+int ltexturesImageResizeCanvas( lua_State* L );
+int ltexturesImageMipmaps( lua_State* L );
+int ltexturesImageDither( lua_State* L );
+int ltexturesImageFlipVertical( lua_State* L );
+int ltexturesImageFlipHorizontal( lua_State* L );
+int ltexturesImageRotate( lua_State* L );
+int ltexturesImageRotateCW( lua_State* L );
+int ltexturesImageRotateCCW( lua_State* L );
+int ltexturesImageColorTint( lua_State* L );
+int ltexturesImageColorInvert( lua_State* L );
+int ltexturesImageColorGrayscale( lua_State* L );
+int ltexturesImageColorContrast( lua_State* L );
+int ltexturesImageColorBrightness( lua_State* L );
+int ltexturesImageColorReplace( lua_State* L );
+int ltexturesLoadImageColors( lua_State* L );
+int ltexturesLoadImagePalette( lua_State* L );
+int ltexturesGetImageAlphaBorder( lua_State* L );
+int ltexturesGetImageColor( lua_State* L );
/* Image configuration functions. */
-int ltexturesGetImageData( lua_State *L );
-int ltexturesGetImageSize( lua_State *L );
-int ltexturesGetImageMipmaps( lua_State *L );
-int ltexturesGetImageFormat( lua_State *L );
+int ltexturesGetImageData( lua_State* L );
+int ltexturesGetImageSize( lua_State* L );
+int ltexturesGetImageMipmaps( lua_State* L );
+int ltexturesGetImageFormat( lua_State* L );
/* Image drawing functions. */
-int ltexturesImageClearBackground( lua_State *L );
-int ltexturesImageDrawPixel( lua_State *L );
-int ltexturesImageDrawLine( lua_State *L );
-int ltexturesImageDrawCircle( lua_State *L );
-int ltexturesImageDrawCircleLines( lua_State *L );
-int ltexturesImageDrawRectangle( lua_State *L );
-int ltexturesImageDrawRectangleLines( lua_State *L );
-int ltexturesImageDraw( lua_State *L );
-int ltexturesImageDrawTextEx( lua_State *L );
+int ltexturesImageClearBackground( lua_State* L );
+int ltexturesImageDrawPixel( lua_State* L );
+int ltexturesImageDrawLine( lua_State* L );
+int ltexturesImageDrawCircle( lua_State* L );
+int ltexturesImageDrawCircleLines( lua_State* L );
+int ltexturesImageDrawRectangle( lua_State* L );
+int ltexturesImageDrawRectangleLines( lua_State* L );
+int ltexturesImageDraw( lua_State* L );
+int ltexturesImageDrawTextEx( lua_State* L );
/* Texture loading functions. */
-int ltexturesGetTextureDefault( lua_State *L );
-int ltexturesLoadTexture( lua_State *L );
-int ltexturesLoadTextureFromImage( lua_State *L );
-int ltexturesLoadTextureCubemap( lua_State *L );
-int ltexturesLoadTextureFromData( lua_State *L );
-int ltexturesLoadRenderTexture( lua_State *L );
-int ltexturesLoadRenderTextureFromData( lua_State *L );
-int ltexturesIsTextureReady( lua_State *L );
-int ltextureUnloadTexture( lua_State *L );
-int ltexturesIsRenderTextureReady( lua_State *L );
-int ltextureUnloadRenderTexture( lua_State *L );
-int ltexturesUpdateTexture( lua_State *L );
-int ltexturesUpdateTextureRec( lua_State *L );
+int ltexturesGetTextureDefault( lua_State* L );
+int ltexturesLoadTexture( lua_State* L );
+int ltexturesLoadTextureFromImage( lua_State* L );
+int ltexturesLoadTextureCubemap( lua_State* L );
+int ltexturesLoadTextureFromData( lua_State* L );
+int ltexturesLoadRenderTexture( lua_State* L );
+int ltexturesLoadRenderTextureFromData( lua_State* L );
+int ltexturesIsTextureReady( lua_State* L );
+int ltextureUnloadTexture( lua_State* L );
+int ltexturesIsRenderTextureReady( lua_State* L );
+int ltextureUnloadRenderTexture( lua_State* L );
+int ltexturesUpdateTexture( lua_State* L );
+int ltexturesUpdateTextureRec( lua_State* L );
/* Texture configuration functions. */
-int ltexturesGenTextureMipmaps( lua_State *L );
-int ltexturesSetTextureFilter( lua_State *L );
-int ltexturesSetTextureWrap( lua_State *L );
-int ltexturesGetTextureId( lua_State *L );
-int ltexturesGetTextureSize( lua_State *L );
-int ltexturesGetTextureMipmaps( lua_State *L );
-int ltexturesGetTextureFormat( lua_State *L );
+int ltexturesGenTextureMipmaps( lua_State* L );
+int ltexturesSetTextureFilter( lua_State* L );
+int ltexturesSetTextureWrap( lua_State* L );
+int ltexturesGetTextureId( lua_State* L );
+int ltexturesGetTextureSize( lua_State* L );
+int ltexturesGetTextureMipmaps( lua_State* L );
+int ltexturesGetTextureFormat( lua_State* L );
/* Texture drawing functions. */
-int ltexturesDrawTexture( lua_State *L );
-int ltexturesDrawTextureRec( lua_State *L );
-int ltexturesDrawTexturePro( lua_State *L );
-int ltexturesDrawTextureNPatch( lua_State *L );
-int ltexturesDrawTextureNPatchRepeat( lua_State *L );
+int ltexturesDrawTexture( lua_State* L );
+int ltexturesDrawTextureRec( lua_State* L );
+int ltexturesDrawTexturePro( lua_State* L );
+int ltexturesDrawTextureNPatch( lua_State* L );
+int ltexturesDrawTextureNPatchRepeat( lua_State* L );
/* RenderTexture configuration functions. */
-int ltexturesGetRenderTextureId( lua_State *L );
-int ltexturesGetRenderTextureTexture( lua_State *L );
-int ltexturesGetRenderTextureDepthTexture( lua_State *L );
+int ltexturesGetRenderTextureId( lua_State* L );
+int ltexturesGetRenderTextureTexture( lua_State* L );
+int ltexturesGetRenderTextureDepthTexture( lua_State* L );
/* Color/pixel related functions. */
-int ltexturesFade( lua_State *L );
-int ltexturesColorToInt( lua_State *L );
-int ltexturesColorNormalize( lua_State *L );
-int ltexturesColorFromNormalized( lua_State *L );
-int ltexturesColorToHSV( lua_State *L );
-int ltexturesColorFromHSV( lua_State *L );
-int ltexturesColorTint( lua_State *L );
-int ltexturesColorBrightness( lua_State *L );
-int ltexturesColorContrast( lua_State *L );
-int ltexturesColorAlpha( lua_State *L );
-int ltexturesColorAlphaBlend( lua_State *L );
-int ltexturesGetColor( lua_State *L );
-int ltexturesGetPixelColor( lua_State *L );
-int ltexturesGetPixelDataSize( lua_State *L );
+int ltexturesFade( lua_State* L );
+int ltexturesColorToInt( lua_State* L );
+int ltexturesColorNormalize( lua_State* L );
+int ltexturesColorFromNormalized( lua_State* L );
+int ltexturesColorToHSV( lua_State* L );
+int ltexturesColorFromHSV( lua_State* L );
+int ltexturesColorTint( lua_State* L );
+int ltexturesColorBrightness( lua_State* L );
+int ltexturesColorContrast( lua_State* L );
+int ltexturesColorAlpha( lua_State* L );
+int ltexturesColorAlphaBlend( lua_State* L );
+int ltexturesGetColor( lua_State* L );
+int ltexturesGetPixelColor( lua_State* L );
+int ltexturesGetPixelDataSize( lua_State* L );
diff --git a/src/audio.c b/src/audio.c
index a02120a..04085b4 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -12,7 +12,7 @@
Initialize audio device and context
*/
-int laudioInitAudioDevice( lua_State *L ) {
+int laudioInitAudioDevice( lua_State* L ) {
InitAudioDevice();
return 0;
@@ -23,7 +23,7 @@ int laudioInitAudioDevice( lua_State *L ) {
Close the audio device and context
*/
-int laudioCloseAudioDevice( lua_State *L ) {
+int laudioCloseAudioDevice( lua_State* L ) {
CloseAudioDevice();
return 0;
@@ -36,7 +36,7 @@ Check if audio device has been initialized successfully
- Success return bool
*/
-int laudioIsAudioDeviceReady( lua_State *L ) {
+int laudioIsAudioDeviceReady( lua_State* L ) {
lua_pushboolean( L, IsAudioDeviceReady() );
return 1;
@@ -47,7 +47,7 @@ int laudioIsAudioDeviceReady( lua_State *L ) {
Set master volume (listener)
*/
-int laudioSetMasterVolume( lua_State *L ) {
+int laudioSetMasterVolume( lua_State* L ) {
float volume = luaL_checknumber( L, 1 );
SetMasterVolume( volume );
@@ -62,7 +62,7 @@ Get master volume (listener)
- Success return float
*/
-int laudioGetMasterVolume( lua_State *L ) {
+int laudioGetMasterVolume( lua_State* L ) {
lua_pushnumber( L, GetMasterVolume() );
return 1;
@@ -80,7 +80,7 @@ Load sound from file
- Failure return nil
- Success return Sound
*/
-int laudioLoadSound( lua_State *L ) {
+int laudioLoadSound( lua_State* L ) {
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
uluaPushSound( L, LoadSound( lua_tostring( L, 1 ) ) );
@@ -100,7 +100,7 @@ Load wave data from file
- Failure return nil
- Success return Wave
*/
-int laudioLoadWave( lua_State *L ) {
+int laudioLoadWave( lua_State* L ) {
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
uluaPushWave( L, LoadWave( lua_tostring( L, 1 ) ) );
@@ -119,7 +119,7 @@ Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
- Success return Wave
*/
-int laudioLoadWaveFromMemory( lua_State *L ) {
+int laudioLoadWaveFromMemory( lua_State* L ) {
const char* fileType = luaL_checkstring( L, 1 );
Buffer* buffer = uluaGetBuffer( L, 2 );
@@ -135,8 +135,8 @@ Checks if wave data is ready
- Success return bool
*/
-int laudioIsWaveReady( lua_State *L ) {
- Wave *wave = uluaGetWave( L, 1 );
+int laudioIsWaveReady( lua_State* L ) {
+ Wave* wave = uluaGetWave( L, 1 );
lua_pushboolean( L, IsWaveReady( *wave ) );
@@ -150,8 +150,8 @@ Load sound from wave data
- Success return Sound
*/
-int laudioLoadSoundFromWave( lua_State *L ) {
- Wave *wave = uluaGetWave( L, 1 );
+int laudioLoadSoundFromWave( lua_State* L ) {
+ Wave* wave = uluaGetWave( L, 1 );
uluaPushSound( L, LoadSoundFromWave( *wave ) );
@@ -165,8 +165,8 @@ Create a new sound that shares the same sample data as the source sound, does no
- Success return Sound
*/
-int laudioLoadSoundAlias( lua_State *L ) {
- Sound *source = uluaGetSound( L, 1 );
+int laudioLoadSoundAlias( lua_State* L ) {
+ Sound* source = uluaGetSound( L, 1 );
uluaPushSound( L, LoadSoundAlias( *source ) );
@@ -180,8 +180,8 @@ Checks if a sound is ready
- Success return bool
*/
-int laudioIsSoundReady( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioIsSoundReady( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
lua_pushboolean( L, IsSoundReady( *sound ) );
@@ -193,8 +193,8 @@ int laudioIsSoundReady( lua_State *L ) {
Unload wave data
*/
-int laudioUnloadWave( lua_State *L ) {
- Wave *wave = uluaGetWave( L, 1 );
+int laudioUnloadWave( lua_State* L ) {
+ Wave* wave = uluaGetWave( L, 1 );
UnloadWave( *wave );
@@ -206,8 +206,8 @@ int laudioUnloadWave( lua_State *L ) {
Unload sound
*/
-int laudioUnloadSound( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioUnloadSound( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
UnloadSound( *sound );
@@ -219,8 +219,8 @@ int laudioUnloadSound( lua_State *L ) {
Unload a sound alias (does not deallocate sample data)
*/
-int laudioUnloadSoundAlias( lua_State *L ) {
- Sound *alias = uluaGetSound( L, 1 );
+int laudioUnloadSoundAlias( lua_State* L ) {
+ Sound* alias = uluaGetSound( L, 1 );
UnloadSoundAlias( *alias );
@@ -234,8 +234,8 @@ Export wave data to file, returns true on success
- Success return bool
*/
-int laudioExportWave( lua_State *L ) {
- Wave *wave = uluaGetWave( L, 1 );
+int laudioExportWave( lua_State* L ) {
+ Wave* wave = uluaGetWave( L, 1 );
lua_pushboolean( L, ExportWave( *wave, luaL_checkstring( L, 2 ) ) );
@@ -249,8 +249,8 @@ Export wave sample data to code (.h), returns true on success
- Success return true
*/
-int laudioExportWaveAsCode( lua_State *L ) {
- Wave *wave = uluaGetWave( L, 1 );
+int laudioExportWaveAsCode( lua_State* L ) {
+ Wave* wave = uluaGetWave( L, 1 );
lua_pushboolean( L, ExportWaveAsCode( *wave, luaL_checkstring( L, 2 ) ) );
@@ -266,8 +266,8 @@ int laudioExportWaveAsCode( lua_State *L ) {
Play a sound
*/
-int laudioPlaySound( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioPlaySound( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
PlaySound( *sound );
@@ -279,8 +279,8 @@ int laudioPlaySound( lua_State *L ) {
Stop playing a sound
*/
-int laudioStopSound( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioStopSound( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
StopSound( *sound );
@@ -292,8 +292,8 @@ int laudioStopSound( lua_State *L ) {
Pause a sound
*/
-int laudioPauseSound( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioPauseSound( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
PauseSound( *sound );
@@ -305,8 +305,8 @@ int laudioPauseSound( lua_State *L ) {
Resume a paused sound
*/
-int laudioResumeSound( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioResumeSound( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
ResumeSound( *sound );
@@ -320,8 +320,8 @@ Check if a sound is currently playing
- Success return bool
*/
-int laudioIsSoundPlaying( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioIsSoundPlaying( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
lua_pushboolean( L, IsSoundPlaying( *sound ) );
@@ -333,8 +333,8 @@ int laudioIsSoundPlaying( lua_State *L ) {
Set volume for a sound (1.0 is max level)
*/
-int laudioSetSoundVolume( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioSetSoundVolume( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
float volume = luaL_checknumber( L, 2 );
SetSoundVolume( *sound, volume );
@@ -347,8 +347,8 @@ int laudioSetSoundVolume( lua_State *L ) {
Set pitch for a sound (1.0 is base level)
*/
-int laudioSetSoundPitch( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioSetSoundPitch( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
float pitch = luaL_checknumber( L, 2 );
SetSoundPitch( *sound, pitch );
@@ -361,8 +361,8 @@ int laudioSetSoundPitch( lua_State *L ) {
Set pan for a sound (0.5 is center)
*/
-int laudioSetSoundPan( lua_State *L ) {
- Sound *sound = uluaGetSound( L, 1 );
+int laudioSetSoundPan( lua_State* L ) {
+ Sound* sound = uluaGetSound( L, 1 );
float pan = luaL_checknumber( L, 2 );
SetSoundPan( *sound, pan );
@@ -375,8 +375,8 @@ int laudioSetSoundPan( lua_State *L ) {
Convert wave data to desired format
*/
-int laudioWaveFormat( lua_State *L ) {
- Wave *wave = uluaGetWave( L, 1 );
+int laudioWaveFormat( lua_State* L ) {
+ Wave* wave = uluaGetWave( L, 1 );
int sampleRate = luaL_checkinteger( L, 2 );
int sampleSize = luaL_checkinteger( L, 3 );
int channels = luaL_checkinteger( L, 4 );
@@ -393,8 +393,8 @@ Copy a wave to a new wave
- Success return Wave
*/
-int laudioWaveCopy( lua_State *L ) {
- Wave *wave = uluaGetWave( L, 1 );
+int laudioWaveCopy( lua_State* L ) {
+ Wave* wave = uluaGetWave( L, 1 );
uluaPushWave( L, WaveCopy( *wave ) );
@@ -406,8 +406,8 @@ int laudioWaveCopy( lua_State *L ) {
Crop a wave to defined samples range
*/
-int laudioWaveCrop( lua_State *L ) {
- Wave *wave = uluaGetWave( L, 1 );
+int laudioWaveCrop( lua_State* L ) {
+ Wave* wave = uluaGetWave( L, 1 );
int initSample = luaL_checkinteger( L, 2 );
int finalSample = luaL_checkinteger( L, 3 );
@@ -427,7 +427,7 @@ Load music stream from file
- Success return Music
*/
-int laudioLoadMusicStream( lua_State *L ) {
+int laudioLoadMusicStream( lua_State* L ) {
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
uluaPushMusic( L, LoadMusicStream( lua_tostring( L, 1 ) ) );
@@ -462,8 +462,8 @@ Checks if a music stream is ready
- Success return bool
*/
-int laudioIsMusicReady( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioIsMusicReady( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
lua_pushboolean( L, IsMusicReady( *music ) );
@@ -475,8 +475,8 @@ int laudioIsMusicReady( lua_State *L ) {
Unload music stream
*/
-int laudioUnloadMusicStream( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioUnloadMusicStream( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
UnloadMusicStream( *music );
@@ -488,8 +488,8 @@ int laudioUnloadMusicStream( lua_State *L ) {
Start music playing
*/
-int laudioPlayMusicStream( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioPlayMusicStream( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
PlayMusicStream( *music );
@@ -503,8 +503,8 @@ Check if music is playing
- Success return bool
*/
-int laudioIsMusicStreamPlaying( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioIsMusicStreamPlaying( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
lua_pushboolean( L, IsMusicStreamPlaying( *music ) );
@@ -516,8 +516,8 @@ int laudioIsMusicStreamPlaying( lua_State *L ) {
Updates buffers for music streaming
*/
-int laudioUpdateMusicStream( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioUpdateMusicStream( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
UpdateMusicStream( *music );
@@ -529,8 +529,8 @@ int laudioUpdateMusicStream( lua_State *L ) {
Stop music playing
*/
-int laudioStopMusicStream( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioStopMusicStream( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
StopMusicStream( *music );
@@ -542,8 +542,8 @@ int laudioStopMusicStream( lua_State *L ) {
Pause music playing
*/
-int laudioPauseMusicStream( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioPauseMusicStream( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
PauseMusicStream( *music );
@@ -555,8 +555,8 @@ int laudioPauseMusicStream( lua_State *L ) {
Resume playing paused music
*/
-int laudioResumeMusicStream( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioResumeMusicStream( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
ResumeMusicStream( *music );
@@ -568,8 +568,8 @@ int laudioResumeMusicStream( lua_State *L ) {
Seek music to a position (in seconds)
*/
-int laudioSeekMusicStream( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioSeekMusicStream( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
float position = luaL_checknumber( L, 2 );
SeekMusicStream( *music, position );
@@ -582,8 +582,8 @@ int laudioSeekMusicStream( lua_State *L ) {
Set volume for music (1.0 is max level)
*/
-int laudioSetMusicVolume( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioSetMusicVolume( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
float volume = luaL_checknumber( L, 2 );
SetMusicVolume( *music, volume );
@@ -596,8 +596,8 @@ int laudioSetMusicVolume( lua_State *L ) {
Set pitch for a music (1.0 is base level)
*/
-int laudioSetMusicPitch( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioSetMusicPitch( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
float pitch = luaL_checknumber( L, 2 );
SetMusicPitch( *music, pitch );
@@ -610,8 +610,8 @@ int laudioSetMusicPitch( lua_State *L ) {
Set pan for a music (0.5 is center)
*/
-int laudioSetMusicPan( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioSetMusicPan( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
float pan = luaL_checknumber( L, 2 );
SetMusicPitch( *music, pan );
@@ -624,8 +624,8 @@ int laudioSetMusicPan( lua_State *L ) {
Set looping for a music
*/
-int laudioSetMusicLooping( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioSetMusicLooping( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
bool looping = uluaGetBoolean( L, 2 );
music->looping = looping;
@@ -640,8 +640,8 @@ Get looping of a music
- Success return bool
*/
-int laudioGetMusicLooping( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioGetMusicLooping( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
lua_pushboolean( L, music->looping );
@@ -655,8 +655,8 @@ Get music time length (in seconds)
- Success return float
*/
-int laudioGetMusicTimeLength( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioGetMusicTimeLength( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
lua_pushnumber( L, GetMusicTimeLength( *music ) );
@@ -670,8 +670,8 @@ Get current music time played (in seconds)
- Success return float
*/
-int laudioGetMusicTimePlayed( lua_State *L ) {
- Music *music = uluaGetMusic( L, 1 );
+int laudioGetMusicTimePlayed( lua_State* L ) {
+ Music* music = uluaGetMusic( L, 1 );
lua_pushnumber( L, GetMusicTimePlayed( *music ) );
diff --git a/src/core.c b/src/core.c
index aecf9e3..e9c93ba 100644
--- a/src/core.c
+++ b/src/core.c
@@ -4,7 +4,7 @@
#include "textures.h"
#include "lua_core.h"
-static int getBufferElementSize( Buffer *buffer ) {
+static int getBufferElementSize( Buffer* buffer ) {
switch ( buffer->type ) {
case BUFFER_UNSIGNED_CHAR: return sizeof( unsigned char );
case BUFFER_UNSIGNED_SHORT: return sizeof( unsigned short );
@@ -18,7 +18,7 @@ static int getBufferElementSize( Buffer *buffer ) {
return 1;
}
-void unloadBuffer( Buffer *buffer ) {
+void unloadBuffer( Buffer* buffer ) {
free( buffer->data );
TraceLog( LOG_INFO, "BUFFER: Unloaded buffer with %u bytes of data", buffer->size );
@@ -33,7 +33,7 @@ void unloadBuffer( Buffer *buffer ) {
Close window and unload OpenGL context and free all resources
*/
-int lcoreCloseWindow( lua_State *L ) {
+int lcoreCloseWindow( lua_State* L ) {
state->run = false;
return 0;
@@ -46,7 +46,7 @@ Check if window has been initialized successfully
- Success return bool
*/
-int lcoreIsWindowReady( lua_State *L ) {
+int lcoreIsWindowReady( lua_State* L ) {
lua_pushboolean( L, IsWindowReady() );
return 1;
@@ -59,7 +59,7 @@ Check if window is currently fullscreen
- Success return bool
*/
-int lcoreIsWindowFullscreen( lua_State *L ) {
+int lcoreIsWindowFullscreen( lua_State* L ) {
lua_pushboolean( L, IsWindowFullscreen() );
return 1;
@@ -72,7 +72,7 @@ Check if window is currently hidden (only PLATFORM_DESKTOP)
- Success return bool
*/
-int lcoreIsWindowHidden( lua_State *L ) {
+int lcoreIsWindowHidden( lua_State* L ) {
lua_pushboolean( L, IsWindowHidden() );
return 1;
@@ -85,7 +85,7 @@ Check if window is currently minimized (only PLATFORM_DESKTOP)
- Success return bool
*/
-int lcoreIsWindowMinimized( lua_State *L ) {
+int lcoreIsWindowMinimized( lua_State* L ) {
lua_pushboolean( L, IsWindowMinimized() );
return 1;
@@ -98,7 +98,7 @@ Check if window is currently maximized (only PLATFORM_DESKTOP)
- Success return bool
*/
-int lcoreIsWindowMaximized( lua_State *L ) {
+int lcoreIsWindowMaximized( lua_State* L ) {
lua_pushboolean( L, IsWindowMaximized() );
return 1;
@@ -111,7 +111,7 @@ Check if window is currently focused (only PLATFORM_DESKTOP)
- Success return bool
*/
-int lcoreIsWindowFocused( lua_State *L ) {
+int lcoreIsWindowFocused( lua_State* L ) {
lua_pushboolean( L, IsWindowFocused() );
return 1;
@@ -124,7 +124,7 @@ Check if window has been resized from last frame
- Success return bool
*/
-int lcoreIsWindowResized( lua_State *L ) {
+int lcoreIsWindowResized( lua_State* L ) {
lua_pushboolean( L, IsWindowResized() );
return 1;
@@ -137,7 +137,7 @@ Check if one specific window flag is enabled (FLAG_FULLSCREEN_MODE, FLAG_WINDOW_
- Success return bool
*/
-int lcoreIsWindowState( lua_State *L ) {
+int lcoreIsWindowState( lua_State* L ) {
unsigned int flag = (unsigned int)luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsWindowState( flag ) );
@@ -150,7 +150,7 @@ int lcoreIsWindowState( lua_State *L ) {
Set window configuration state using flags (FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE...)
*/
-int lcoreSetWindowState( lua_State *L ) {
+int lcoreSetWindowState( lua_State* L ) {
unsigned int flag = (unsigned int)luaL_checkinteger( L, 1 );
SetWindowState( flag );
@@ -165,7 +165,7 @@ Clear window configuration state flags (FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZA
- Success return bool
*/
-int lcoreClearWindowState( lua_State *L ) {
+int lcoreClearWindowState( lua_State* L ) {
unsigned int flag = (unsigned int)luaL_checkinteger( L, 1 );
ClearWindowState( flag );
@@ -178,7 +178,7 @@ int lcoreClearWindowState( lua_State *L ) {
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
*/
-int lcoreToggleFullscreen( lua_State *L ) {
+int lcoreToggleFullscreen( lua_State* L ) {
ToggleFullscreen();
return 0;
@@ -189,7 +189,7 @@ int lcoreToggleFullscreen( lua_State *L ) {
Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
*/
-int lcoreToggleBorderlessWindowed( lua_State *L ) {
+int lcoreToggleBorderlessWindowed( lua_State* L ) {
ToggleBorderlessWindowed();
return 0;
@@ -200,7 +200,7 @@ int lcoreToggleBorderlessWindowed( lua_State *L ) {
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
*/
-int lcoreMaximizeWindow( lua_State *L ) {
+int lcoreMaximizeWindow( lua_State* L ) {
MaximizeWindow();
return 0;
@@ -211,7 +211,7 @@ int lcoreMaximizeWindow( lua_State *L ) {
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
*/
-int lcoreMinimizeWindow( lua_State *L ) {
+int lcoreMinimizeWindow( lua_State* L ) {
MinimizeWindow();
return 0;
@@ -222,7 +222,7 @@ int lcoreMinimizeWindow( lua_State *L ) {
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
*/
-int lcoreRestoreWindow( lua_State *L ) {
+int lcoreRestoreWindow( lua_State* L ) {
RestoreWindow();
return 0;
@@ -233,8 +233,8 @@ int lcoreRestoreWindow( lua_State *L ) {
Set icon for window (Only PLATFORM_DESKTOP)
*/
-int lcoreSetWindowIcon( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int lcoreSetWindowIcon( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
SetWindowIcon( *image );
@@ -246,7 +246,7 @@ int lcoreSetWindowIcon( lua_State *L ) {
Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
*/
-int lcoreSetWindowIcons( lua_State *L ) {
+int lcoreSetWindowIcons( lua_State* L ) {
int count = uluaGetTableLen( L, 1 );
Image images[ count ];
@@ -270,7 +270,7 @@ int lcoreSetWindowIcons( lua_State *L ) {
Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)
*/
-int lcoreSetWindowTitle( lua_State *L ) {
+int lcoreSetWindowTitle( lua_State* L ) {
SetWindowTitle( luaL_checkstring( L, 1 ) );
return 0;
@@ -281,7 +281,7 @@ int lcoreSetWindowTitle( lua_State *L ) {
Set window position on screen
*/
-int lcoreSetWindowPosition( lua_State *L ) {
+int lcoreSetWindowPosition( lua_State* L ) {
Vector2 pos = uluaGetVector2( L, 1 );
SetWindowPosition( pos.x, pos.y );
@@ -294,7 +294,7 @@ int lcoreSetWindowPosition( lua_State *L ) {
Set monitor for the current window
*/
-int lcoreSetWindowMonitor( lua_State *L ) {
+int lcoreSetWindowMonitor( lua_State* L ) {
int monitor = luaL_checkinteger( L, 1 );
SetWindowMonitor( monitor );
@@ -307,7 +307,7 @@ int lcoreSetWindowMonitor( lua_State *L ) {
Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
*/
-int lcoreSetWindowMinSize( lua_State *L ) {
+int lcoreSetWindowMinSize( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
SetWindowMinSize( (int)size.x, (int)size.y );
@@ -320,7 +320,7 @@ int lcoreSetWindowMinSize( lua_State *L ) {
Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
*/
-int lcoreSetWindowMaxSize( lua_State *L ) {
+int lcoreSetWindowMaxSize( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
SetWindowMaxSize( (int)size.x, (int)size.y );
@@ -333,7 +333,7 @@ int lcoreSetWindowMaxSize( lua_State *L ) {
Set window dimensions
*/
-int lcoreSetWindowSize( lua_State *L ) {
+int lcoreSetWindowSize( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
SetWindowSize( (int)size.x, (int)size.y );
@@ -346,7 +346,7 @@ int lcoreSetWindowSize( lua_State *L ) {
Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
*/
-int lcoreSetWindowOpacity( lua_State *L ) {
+int lcoreSetWindowOpacity( lua_State* L ) {
float opacity = luaL_checknumber( L, 1 );
SetWindowOpacity( opacity );
@@ -359,7 +359,7 @@ int lcoreSetWindowOpacity( lua_State *L ) {
Set window focused (only PLATFORM_DESKTOP)
*/
-int lcoreSetWindowFocused( lua_State *L ) {
+int lcoreSetWindowFocused( lua_State* L ) {
SetWindowFocused();
return 0;
@@ -372,7 +372,7 @@ Get native window handle. Return as lightuserdata
- Success return lightuserdata
*/
-int lcoreGetWindowHandle( lua_State *L ) {
+int lcoreGetWindowHandle( lua_State* L ) {
lua_pushlightuserdata( L, GetWindowHandle() );
return 1;
@@ -385,7 +385,7 @@ Get screen size
- Success return Vector2
*/
-int lcoreGetScreenSize( lua_State *L ) {
+int lcoreGetScreenSize( lua_State* L ) {
Vector2 size = (Vector2){ GetScreenWidth(), GetScreenHeight() };
uluaPushVector2( L, size );
@@ -399,7 +399,7 @@ Get render size
- Success return Vector2
*/
-int lcoreGetRenderSize( lua_State *L ) {
+int lcoreGetRenderSize( lua_State* L ) {
Vector2 size = (Vector2){ GetRenderWidth(), GetRenderHeight() };
uluaPushVector2( L, size );
@@ -413,7 +413,7 @@ Get number of connected monitors
- Success return int
*/
-int lcoreGetMonitorCount( lua_State *L ) {
+int lcoreGetMonitorCount( lua_State* L ) {
lua_pushinteger( L, GetMonitorCount() );
return 1;
@@ -426,7 +426,7 @@ Get current connected monitor
- Success return int
*/
-int lcoreGetCurrentMonitor( lua_State *L ) {
+int lcoreGetCurrentMonitor( lua_State* L ) {
lua_pushinteger( L, GetCurrentMonitor() );
return 1;
@@ -439,7 +439,7 @@ Get specified monitor position
- Success return Vector2
*/
-int lcoreGetMonitorPosition( lua_State *L ) {
+int lcoreGetMonitorPosition( lua_State* L ) {
int monitor = luaL_checkinteger( L, 1 );
uluaPushVector2( L, GetMonitorPosition( monitor ) );
@@ -454,7 +454,7 @@ Get specified monitor size
- Success return Vector2
*/
-int lcoreGetMonitorSize( lua_State *L ) {
+int lcoreGetMonitorSize( lua_State* L ) {
int monitor = luaL_checkinteger( L, 1 );
Vector2 size = (Vector2){ GetMonitorWidth( monitor ), GetMonitorHeight( monitor ) };
@@ -470,7 +470,7 @@ Get specified monitor physical size in millimetres
- Success return Vector2
*/
-int lcoreGetMonitorPhysicalSize( lua_State *L ) {
+int lcoreGetMonitorPhysicalSize( lua_State* L ) {
int monitor = luaL_checkinteger( L, 1 );
Vector2 size = { GetMonitorPhysicalWidth( monitor ), GetMonitorPhysicalHeight( monitor ) };
@@ -486,7 +486,7 @@ Get specified monitor refresh rate
- Success return int
*/
-int lcoreGetMonitorRefreshRate( lua_State *L ) {
+int lcoreGetMonitorRefreshRate( lua_State* L ) {
int monitor = luaL_checkinteger( L, 1 );
lua_pushinteger( L, GetMonitorRefreshRate( monitor ) );
@@ -501,7 +501,7 @@ Get window position on monitor
- Success return Vector2
*/
-int lcoreGetWindowPosition( lua_State *L ) {
+int lcoreGetWindowPosition( lua_State* L ) {
uluaPushVector2( L, GetWindowPosition() );
return 1;
@@ -514,7 +514,7 @@ Get window scale DPI factor
- Success return Vector2
*/
-int lcoreGetWindowScaleDPI( lua_State *L ) {
+int lcoreGetWindowScaleDPI( lua_State* L ) {
uluaPushVector2( L, GetWindowScaleDPI() );
return 1;
@@ -527,7 +527,7 @@ Get the human-readable, UTF-8 encoded name of the specified monitor
- Success return string
*/
-int lcoreGetMonitorName( lua_State *L ) {
+int lcoreGetMonitorName( lua_State* L ) {
int monitor = luaL_checkinteger( L, 1 );
lua_pushstring( L, GetMonitorName( monitor ) );
@@ -540,7 +540,7 @@ int lcoreGetMonitorName( lua_State *L ) {
Set clipboard text content
*/
-int lcoreSetClipboardText( lua_State *L ) {
+int lcoreSetClipboardText( lua_State* L ) {
SetClipboardText( luaL_checkstring( L, 1 ) );
return 0;
@@ -553,7 +553,7 @@ Get clipboard text content
- Success return string
*/
-int lcoreGetClipboardText( lua_State *L ) {
+int lcoreGetClipboardText( lua_State* L ) {
lua_pushstring( L, GetClipboardText() );
return 1;
@@ -568,7 +568,7 @@ int lcoreGetClipboardText( lua_State *L ) {
Shows cursor
*/
-int lcoreShowCursor( lua_State *L ) {
+int lcoreShowCursor( lua_State* L ) {
ShowCursor();
return 0;
@@ -579,7 +579,7 @@ int lcoreShowCursor( lua_State *L ) {
Hides cursor
*/
-int lcoreHideCursor( lua_State *L ) {
+int lcoreHideCursor( lua_State* L ) {
HideCursor();
return 0;
@@ -592,7 +592,7 @@ Check if cursor is not visible
- Success return bool
*/
-int lcoreIsCursorHidden( lua_State *L ) {
+int lcoreIsCursorHidden( lua_State* L ) {
lua_pushboolean( L, IsCursorHidden() );
return 1;
@@ -603,7 +603,7 @@ int lcoreIsCursorHidden( lua_State *L ) {
Enables cursor (unlock cursor)
*/
-int lcoreEnableCursor( lua_State *L ) {
+int lcoreEnableCursor( lua_State* L ) {
EnableCursor();
return 0;
@@ -614,7 +614,7 @@ int lcoreEnableCursor( lua_State *L ) {
Disables cursor (lock cursor)
*/
-int lcoreDisableCursor( lua_State *L ) {
+int lcoreDisableCursor( lua_State* L ) {
DisableCursor();
return 0;
@@ -627,7 +627,7 @@ Check if cursor is on the screen
- Success return bool
*/
-int lcoreIsCursorOnScreen( lua_State *L ) {
+int lcoreIsCursorOnScreen( lua_State* L ) {
lua_pushboolean( L, IsCursorOnScreen() );
return 1;
@@ -642,7 +642,7 @@ int lcoreIsCursorOnScreen( lua_State *L ) {
Set background color (framebuffer clear color)
*/
-int lcoreClearBackground( lua_State *L ) {
+int lcoreClearBackground( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
ClearBackground( color );
@@ -655,7 +655,7 @@ int lcoreClearBackground( lua_State *L ) {
Setup canvas (framebuffer) to start drawing
*/
-int lcoreBeginDrawing( lua_State *L ) {
+int lcoreBeginDrawing( lua_State* L ) {
BeginDrawing();
return 0;
@@ -666,7 +666,7 @@ int lcoreBeginDrawing( lua_State *L ) {
End canvas drawing and swap buffers (double buffering)
*/
-int lcoreEndDrawing( lua_State *L ) {
+int lcoreEndDrawing( lua_State* L ) {
EndDrawing();
return 0;
@@ -677,8 +677,8 @@ int lcoreEndDrawing( lua_State *L ) {
Begin 2D mode with custom camera (2D)
*/
-int lcoreBeginMode2D( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreBeginMode2D( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
BeginMode2D( *camera );
@@ -690,7 +690,7 @@ int lcoreBeginMode2D( lua_State *L ) {
Ends 2D mode with custom camera
*/
-int lcoreEndMode2D( lua_State *L ) {
+int lcoreEndMode2D( lua_State* L ) {
EndMode2D();
return 0;
@@ -701,8 +701,8 @@ int lcoreEndMode2D( lua_State *L ) {
Begin 3D mode with custom camera (3D)
*/
-int lcoreBeginMode3D( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreBeginMode3D( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
BeginMode3D( *camera );
@@ -714,7 +714,7 @@ int lcoreBeginMode3D( lua_State *L ) {
Ends 3D mode and returns to default 2D orthographic mode
*/
-int lcoreEndMode3D( lua_State *L ) {
+int lcoreEndMode3D( lua_State* L ) {
EndMode3D();
return 0;
@@ -725,8 +725,8 @@ int lcoreEndMode3D( lua_State *L ) {
Begin drawing to render texture
*/
-int lcoreBeginTextureMode( lua_State *L ) {
- RenderTexture *renderTexture = uluaGetRenderTexture( L, 1 );
+int lcoreBeginTextureMode( lua_State* L ) {
+ RenderTexture* renderTexture = uluaGetRenderTexture( L, 1 );
BeginTextureMode( *renderTexture );
@@ -738,7 +738,7 @@ int lcoreBeginTextureMode( lua_State *L ) {
Ends drawing to render texture
*/
-int lcoreEndTextureMode( lua_State *L ) {
+int lcoreEndTextureMode( lua_State* L ) {
EndTextureMode();
return 0;
@@ -749,8 +749,8 @@ int lcoreEndTextureMode( lua_State *L ) {
Begin custom shader drawing
*/
-int lcoreBeginShaderMode( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreBeginShaderMode( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
BeginShaderMode( *shader );
@@ -762,7 +762,7 @@ int lcoreBeginShaderMode( lua_State *L ) {
End custom shader drawing (use default shader)
*/
-int lcoreEndShaderMode( lua_State *L ) {
+int lcoreEndShaderMode( lua_State* L ) {
EndShaderMode();
return 0;
@@ -773,7 +773,7 @@ int lcoreEndShaderMode( lua_State *L ) {
Begin blending mode (BLEND_ALPHA, BLEND_ADDITIVE, BLEND_MULTIPLIED...)
*/
-int lcoreBeginBlendMode( lua_State *L ) {
+int lcoreBeginBlendMode( lua_State* L ) {
int mode = luaL_checkinteger( L, 1 );
BeginBlendMode( mode );
@@ -786,7 +786,7 @@ int lcoreBeginBlendMode( lua_State *L ) {
End blending mode (reset to default: BLEND_ALPHA)
*/
-int lcoreEndBlendMode( lua_State *L ) {
+int lcoreEndBlendMode( lua_State* L ) {
EndBlendMode();
return 0;
@@ -797,7 +797,7 @@ int lcoreEndBlendMode( lua_State *L ) {
Begin scissor mode (define screen area for following drawing)
*/
-int lcoreBeginScissorMode( lua_State *L ) {
+int lcoreBeginScissorMode( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
BeginScissorMode( rect.x, rect.y, rect.width, rect.height );
@@ -810,7 +810,7 @@ int lcoreBeginScissorMode( lua_State *L ) {
End scissor mode
*/
-int lcoreEndScissorMode( lua_State *L ) {
+int lcoreEndScissorMode( lua_State* L ) {
EndScissorMode();
return 0;
@@ -829,15 +829,15 @@ NOTE: Set nil if no shader
- Failure return nil
- Success return Shader
*/
-int lcoreLoadShader( lua_State *L ) {
+int lcoreLoadShader( lua_State* L ) {
if ( !( lua_isstring( L, 1 ) || lua_isnil( L, 1 ) ) || !( lua_isstring( L, 2 ) || lua_isnil( L, 2 ) ) ) {
TraceLog( state->logLevelInvalid, "%s", "Argument needs to be string or nil" );
lua_pushnil( L );
return 1;
}
/* Will result to NULL if given nil. */
- const char *vsFileName = lua_tostring( L, 1 );
- const char *fsFileName = lua_tostring( L, 2 );
+ const char* vsFileName = lua_tostring( L, 1 );
+ const char* fsFileName = lua_tostring( L, 2 );
uluaPushShader( L, LoadShader( vsFileName, fsFileName ) );
@@ -854,15 +854,15 @@ NOTE: Set nil if no shader
- Success return Shader
*/
-int lcoreLoadShaderFromMemory( lua_State *L ) {
+int lcoreLoadShaderFromMemory( lua_State* L ) {
if ( !( lua_isstring( L, 1 ) || lua_isnil( L, 1 ) ) || !( lua_isstring( L, 2 ) || lua_isnil( L, 2 ) ) ) {
TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadShaderFromMemory( string vsCode, string fsCode )" );
lua_pushnil( L );
return 1;
}
/* Will result to NULL if given nil. */
- const char *vs = lua_tostring( L, 1 );
- const char *fs = lua_tostring( L, 2 );
+ const char* vs = lua_tostring( L, 1 );
+ const char* fs = lua_tostring( L, 2 );
uluaPushShader( L, LoadShaderFromMemory( vs, fs ) );
@@ -876,8 +876,8 @@ Check if a shader is ready
- Success return bool
*/
-int lcoreIsShaderReady( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreIsShaderReady( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
lua_pushboolean( L, IsShaderReady( *shader ) );
@@ -891,8 +891,8 @@ Get shader program id
- Success return int
*/
-int lcoreGetShaderId( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreGetShaderId( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
lua_pushinteger( L, shader->id );
@@ -906,8 +906,8 @@ Get shader uniform location
- Success return int
*/
-int lcoreGetShaderLocation( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreGetShaderLocation( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
lua_pushinteger( L, GetShaderLocation( *shader, luaL_checkstring( L, 2 ) ) );
@@ -921,8 +921,8 @@ Get shader attribute location
- Success return int
*/
-int lcoreGetShaderLocationAttrib( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreGetShaderLocationAttrib( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
lua_pushinteger( L, GetShaderLocationAttrib( *shader, luaL_checkstring( L, 2 ) ) );
@@ -934,8 +934,8 @@ int lcoreGetShaderLocationAttrib( lua_State *L ) {
Set shader location index
*/
-int lcoreSetShaderLocationIndex( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreSetShaderLocationIndex( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
int shaderLocationIndex = luaL_checkinteger( L, 2 );
int location = luaL_checkinteger( L, 3 );
@@ -951,8 +951,8 @@ Get shader location index
- Success return int
*/
-int lcoreGetShaderLocationIndex( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreGetShaderLocationIndex( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
int shaderLocationIndex = luaL_checkinteger( L, 2 );
lua_pushinteger( L, shader->locs[ shaderLocationIndex ] );
@@ -965,8 +965,8 @@ int lcoreGetShaderLocationIndex( lua_State *L ) {
Set shader uniform value (matrix 4x4)
*/
-int lcoreSetShaderValueMatrix( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreSetShaderValueMatrix( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
int locIndex = luaL_checkinteger( L, 2 );
Matrix mat = uluaGetMatrix( L, 3 );
@@ -980,10 +980,10 @@ int lcoreSetShaderValueMatrix( lua_State *L ) {
Set shader uniform value for texture (sampler2d)
*/
-int lcoreSetShaderValueTexture( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreSetShaderValueTexture( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
int locIndex = luaL_checkinteger( L, 2 );
- Texture *texture = uluaGetTexture( L, 3 );
+ Texture* texture = uluaGetTexture( L, 3 );
SetShaderValueTexture( *shader, locIndex, *texture );
@@ -996,8 +996,8 @@ int lcoreSetShaderValueTexture( lua_State *L ) {
Set shader uniform value
NOTE: Even one value should be in table
*/
-int lcoreSetShaderValue( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreSetShaderValue( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
int locIndex = luaL_checkinteger( L, 2 );
size_t valueCount = uluaGetTableLen( L, 3 );
int uniformType = luaL_checkinteger( L, 4 );
@@ -1038,8 +1038,8 @@ int lcoreSetShaderValue( lua_State *L ) {
Set shader uniform value vector
NOTE: Even one value should be in table
*/
-int lcoreSetShaderValueV( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreSetShaderValueV( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
int locIndex = luaL_checkinteger( L, 2 );
size_t valueCount = uluaGetTableLen( L, 3 );
int uniformType = luaL_checkinteger( L, 4 );
@@ -1080,8 +1080,8 @@ int lcoreSetShaderValueV( lua_State *L ) {
Unload shader from GPU memory (VRAM)
*/
-int lcoreUnloadShader( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
+int lcoreUnloadShader( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
UnloadShader( *shader );
@@ -1099,9 +1099,9 @@ Get a ray trace from mouse position
- Success return Ray
*/
-int lcoreGetMouseRay( lua_State *L ) {
+int lcoreGetMouseRay( lua_State* L ) {
Vector2 mousePosition = uluaGetVector2( L, 1 );
- Camera3D *camera = uluaGetCamera3D( L, 2 );
+ Camera3D* camera = uluaGetCamera3D( L, 2 );
uluaPushRay( L, GetMouseRay( mousePosition, *camera ) );
@@ -1115,8 +1115,8 @@ Get camera transform matrix (view matrix)
- Success return Matrix
*/
-int lcoreGetCameraMatrix( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCameraMatrix( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
uluaPushMatrix( L, GetCameraMatrix( *camera ) );
@@ -1130,8 +1130,8 @@ Get camera 2d transform matrix
- Success return Matrix
*/
-int lcoreGetCameraMatrix2D( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreGetCameraMatrix2D( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
uluaPushMatrix( L, GetCameraMatrix2D( *camera ) );
@@ -1145,9 +1145,9 @@ Get the screen space position for a 3d world space position
- Success return Vector2
*/
-int lcoreGetWorldToScreen( lua_State *L ) {
+int lcoreGetWorldToScreen( lua_State* L ) {
Vector3 position = uluaGetVector3( L, 1 );
- Camera3D *camera = uluaGetCamera3D( L, 2 );
+ Camera3D* camera = uluaGetCamera3D( L, 2 );
uluaPushVector2( L, GetWorldToScreen( position, *camera ) );
@@ -1161,9 +1161,9 @@ Get size position for a 3d world space position
- Success return Vector2
*/
-int lcoreGetWorldToScreenEx( lua_State *L ) {
+int lcoreGetWorldToScreenEx( lua_State* L ) {
Vector3 position = uluaGetVector3( L, 1 );
- Camera3D *camera = uluaGetCamera3D( L, 2 );
+ Camera3D* camera = uluaGetCamera3D( L, 2 );
Vector2 size = uluaGetVector2( L, 3 );
uluaPushVector2( L, GetWorldToScreenEx( position, *camera, size.x, size.y ) );
@@ -1178,9 +1178,9 @@ Get the screen space position for a 2d camera world space position
- Success return Vector2
*/
-int lcoreGetWorldToScreen2D( lua_State *L ) {
+int lcoreGetWorldToScreen2D( lua_State* L ) {
Vector2 position = uluaGetVector2( L, 1 );
- Camera2D *camera = uluaGetCamera2D( L, 2 );
+ Camera2D* camera = uluaGetCamera2D( L, 2 );
uluaPushVector2( L, GetWorldToScreen2D( position, *camera ) );
@@ -1194,9 +1194,9 @@ Get the world space position for a 2d camera screen space position
- Success return Vector2
*/
-int lcoreGetScreenToWorld2D( lua_State *L ) {
+int lcoreGetScreenToWorld2D( lua_State* L ) {
Vector2 position = uluaGetVector2( L, 1 );
- Camera2D *camera = uluaGetCamera2D( L, 2 );
+ Camera2D* camera = uluaGetCamera2D( L, 2 );
uluaPushVector2( L, GetScreenToWorld2D( position, *camera ) );
@@ -1212,7 +1212,7 @@ int lcoreGetScreenToWorld2D( lua_State *L ) {
Set target FPS (maximum)
*/
-int lcoreSetTargetFPS( lua_State *L ) {
+int lcoreSetTargetFPS( lua_State* L ) {
int fps = luaL_checkinteger( L, 1 );
SetTargetFPS( fps );
@@ -1227,7 +1227,7 @@ Get current FPS
- Success return int
*/
-int lcoreGetFPS( lua_State *L ) {
+int lcoreGetFPS( lua_State* L ) {
lua_pushinteger( L, GetFPS() );
return 1;
@@ -1240,7 +1240,7 @@ Get time in seconds for last frame drawn (Delta time)
- Success return float
*/
-int lcoreGetFrameTime( lua_State *L ) {
+int lcoreGetFrameTime( lua_State* L ) {
lua_pushnumber( L, GetFrameTime() );
return 1;
@@ -1253,7 +1253,7 @@ Get elapsed time in seconds since InitWindow()
- Success return float
*/
-int lcoreGetTime( lua_State *L ) {
+int lcoreGetTime( lua_State* L ) {
lua_pushnumber( L, GetTime() );
return 1;
@@ -1268,7 +1268,7 @@ int lcoreGetTime( lua_State *L ) {
Set the seed for the random number generator
*/
-int lcoreSetRandomSeed( lua_State *L ) {
+int lcoreSetRandomSeed( lua_State* L ) {
unsigned int seed = (unsigned int)luaL_checkinteger( L, 1 );
SetRandomSeed( seed );
@@ -1283,7 +1283,7 @@ Get a random value between min and max (both included)
- Success return int
*/
-int lcoreGetRandomValue( lua_State *L ) {
+int lcoreGetRandomValue( lua_State* L ) {
int min = luaL_checkinteger( L, 1 );
int max = luaL_checkinteger( L, 2 );
@@ -1299,12 +1299,12 @@ Load random values sequence, no values repeated
- Success return int{}
*/
-int lcoreLoadRandomSequence( lua_State *L ) {
+int lcoreLoadRandomSequence( lua_State* L ) {
unsigned int count = luaL_checkinteger( L, 1 );
int min = luaL_checkinteger( L, 1 );
int max = luaL_checkinteger( L, 2 );
- int *sequence = LoadRandomSequence( count, min, max );
+ int* sequence = LoadRandomSequence( count, min, max );
lua_createtable( L, count, 0 );
for ( int i = 0; i < count; i++ ) {
@@ -1325,7 +1325,7 @@ int lcoreLoadRandomSequence( lua_State *L ) {
Takes a screenshot of current screen (filename extension defines format)
*/
-int lcoreTakeScreenshot( lua_State *L ) {
+int lcoreTakeScreenshot( lua_State* L ) {
TakeScreenshot( luaL_checkstring( L, 1 ) );
return 0;
@@ -1336,7 +1336,7 @@ int lcoreTakeScreenshot( lua_State *L ) {
Setup init configuration flags (view FLAGS)
*/
-int lcoreSetConfigFlags( lua_State *L ) {
+int lcoreSetConfigFlags( lua_State* L ) {
unsigned int flag = (unsigned int)luaL_checkinteger( L, 1 );
SetConfigFlags( flag );
@@ -1349,7 +1349,7 @@ int lcoreSetConfigFlags( lua_State *L ) {
Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
*/
-int lcoreTraceLog( lua_State *L ) {
+int lcoreTraceLog( lua_State* L ) {
int logLevel = luaL_checkinteger( L, 1 );
TraceLog( logLevel, "%s", luaL_checkstring( L, 2 ) );
@@ -1362,7 +1362,7 @@ int lcoreTraceLog( lua_State *L ) {
Set the current threshold (minimum) log level
*/
-int lcoreSetTraceLogLevel( lua_State *L ) {
+int lcoreSetTraceLogLevel( lua_State* L ) {
int logLevel = luaL_checkinteger( L, 1 );
SetTraceLogLevel( logLevel );
@@ -1375,7 +1375,7 @@ int lcoreSetTraceLogLevel( lua_State *L ) {
Set the log level for bad function calls and invalid data formats.
*/
-int lcoreSetLogLevelInvalid( lua_State *L ) {
+int lcoreSetLogLevelInvalid( lua_State* L ) {
state->logLevelInvalid = luaL_checkinteger( L, 1 );
return 0;
@@ -1388,7 +1388,7 @@ Get the log level for bad function calls and invalid data formats.
- Success return int
*/
-int lcoreGetLogLevelInvalid( lua_State *L ) {
+int lcoreGetLogLevelInvalid( lua_State* L ) {
lua_pushinteger( L, state->logLevelInvalid );
return 1;
@@ -1399,7 +1399,7 @@ int lcoreGetLogLevelInvalid( lua_State *L ) {
Open URL with default system browser (if available)
*/
-int lcoreOpenURL( lua_State *L ) {
+int lcoreOpenURL( lua_State* L ) {
OpenURL( luaL_checkstring( L, 1 ) );
return 0;
@@ -1412,7 +1412,7 @@ Check if Lua garbage collection is set to unload object data
- Success return bool
*/
-int lcoreIsGCUnloadEnabled( lua_State *L ) {
+int lcoreIsGCUnloadEnabled( lua_State* L ) {
lua_pushboolean( L, state->gcUnload );
return 1;
@@ -1423,7 +1423,7 @@ int lcoreIsGCUnloadEnabled( lua_State *L ) {
Set Lua garbage collection to unload object data
*/
-int lcoreSetGCUnload( lua_State *L ) {
+int lcoreSetGCUnload( lua_State* L ) {
state->gcUnload = uluaGetBoolean( L, 1 );
return 0;
@@ -1440,8 +1440,8 @@ Load file data as byte array (read). Buffer type is BUFFER_UNSIGNED_CHAR
- Success return Buffer
*/
-int lcoreLoadFileData( lua_State *L ) {
- const char *fileName = luaL_checkstring( L, 1 );
+int lcoreLoadFileData( lua_State* L ) {
+ const char* fileName = luaL_checkstring( L, 1 );
Buffer buffer = {
.type = BUFFER_UNSIGNED_CHAR
@@ -1460,9 +1460,9 @@ Save data to file from byte array (write), returns true on success
- Success return bool
*/
-int lcoreSaveFileData( lua_State *L ) {
- const char *fileName = luaL_checkstring( L, 1 );
- Buffer *buffer = uluaGetBuffer( L, 2 );
+int lcoreSaveFileData( lua_State* L ) {
+ const char* fileName = luaL_checkstring( L, 1 );
+ Buffer* buffer = uluaGetBuffer( L, 2 );
lua_pushboolean( L, SaveFileData( fileName, buffer->data, buffer->size ) );
@@ -1476,9 +1476,9 @@ Export data to code (.h), returns true on success
- Success return bool
*/
-int lcoreExportDataAsCode( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
- const char *fileName = luaL_checkstring( L, 2 );
+int lcoreExportDataAsCode( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
+ const char* fileName = luaL_checkstring( L, 2 );
lua_pushboolean( L, ExportDataAsCode( buffer->data, buffer->size, fileName ) );
@@ -1492,10 +1492,10 @@ Load text data from file (read)
- Success return string
*/
-int lcoreLoadFileText( lua_State *L ) {
- const char *fileName = luaL_checkstring( L, 1 );
+int lcoreLoadFileText( lua_State* L ) {
+ const char* fileName = luaL_checkstring( L, 1 );
- char *text = LoadFileText( fileName );
+ char* text = LoadFileText( fileName );
lua_pushstring( L, text );
UnloadFileText( text );
@@ -1509,9 +1509,9 @@ Save text data to file (write), returns true on success
- Success return bool
*/
-int lcoreSaveFileText( lua_State *L ) {
- const char *fileName = luaL_checkstring( L, 1 );
- char *text = (char*)luaL_checkstring( L, 2 );
+int lcoreSaveFileText( lua_State* L ) {
+ const char* fileName = luaL_checkstring( L, 1 );
+ char* text = (char*)luaL_checkstring( L, 2 );
lua_pushboolean( L, SaveFileText( fileName, text ) );
@@ -1529,7 +1529,7 @@ Return game directory (where main.lua is located)
- Success return string
*/
-int lcoreGetBasePath( lua_State *L ) {
+int lcoreGetBasePath( lua_State* L ) {
lua_pushstring( L, state->exePath );
return 1;
@@ -1542,7 +1542,7 @@ Check if file exists
- Success return bool
*/
-int lcoreFileExists( lua_State *L ) {
+int lcoreFileExists( lua_State* L ) {
lua_pushboolean( L, FileExists( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1555,7 +1555,7 @@ Check if a directory path exists
- Success return bool
*/
-int lcoreDirectoryExists( lua_State *L ) {
+int lcoreDirectoryExists( lua_State* L ) {
lua_pushboolean( L, DirectoryExists( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1568,7 +1568,7 @@ Check file extension (Including point: .png, .wav)
- Success return bool
*/
-int lcoreIsFileExtension( lua_State *L ) {
+int lcoreIsFileExtension( lua_State* L ) {
lua_pushboolean( L, IsFileExtension( luaL_checkstring( L, 1 ), luaL_checkstring( L, 2 ) ) );
return 1;
@@ -1581,7 +1581,7 @@ Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
- Success return int
*/
-int lcoreGetFileLength( lua_State *L ) {
+int lcoreGetFileLength( lua_State* L ) {
lua_pushinteger( L, GetFileLength( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1594,7 +1594,7 @@ Get pointer to extension for a filename string (Includes dot: '.png')
- Success return string
*/
-int lcoreGetFileExtension( lua_State *L ) {
+int lcoreGetFileExtension( lua_State* L ) {
lua_pushstring( L, GetFileExtension( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1607,7 +1607,7 @@ Get pointer to filename for a path string
- Success return string
*/
-int lcoreGetFileName( lua_State *L ) {
+int lcoreGetFileName( lua_State* L ) {
lua_pushstring( L, GetFileName( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1620,7 +1620,7 @@ Get filename string without extension (Uses static string)
- Success return string
*/
-int lcoreGetFileNameWithoutExt( lua_State *L ) {
+int lcoreGetFileNameWithoutExt( lua_State* L ) {
lua_pushstring( L, GetFileNameWithoutExt( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1633,7 +1633,7 @@ Get full path for a given fileName with path (Uses static string)
- Success return string
*/
-int lcoreGetDirectoryPath( lua_State *L ) {
+int lcoreGetDirectoryPath( lua_State* L ) {
lua_pushstring( L, GetDirectoryPath( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1646,7 +1646,7 @@ Get previous directory path for a given path (Uses static string)
- Success return string
*/
-int lcoreGetPrevDirectoryPath( lua_State *L ) {
+int lcoreGetPrevDirectoryPath( lua_State* L ) {
lua_pushstring( L, GetPrevDirectoryPath( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1659,7 +1659,7 @@ Get current working directory (Uses static string)
- Success return string
*/
-int lcoreGetWorkingDirectory( lua_State *L ) {
+int lcoreGetWorkingDirectory( lua_State* L ) {
lua_pushstring( L, GetWorkingDirectory() );
return 1;
@@ -1672,7 +1672,7 @@ Get the directory of the running application (uses static string)
- Success return string
*/
-int lcoreGetApplicationDirectory( lua_State *L ) {
+int lcoreGetApplicationDirectory( lua_State* L ) {
lua_pushstring( L, GetApplicationDirectory() );
return 1;
@@ -1685,7 +1685,7 @@ Load directory filepaths
- Success return string{}
*/
-int lcoreLoadDirectoryFiles( lua_State *L ) {
+int lcoreLoadDirectoryFiles( lua_State* L ) {
FilePathList files = LoadDirectoryFiles( luaL_checkstring( L, 1 ) );
lua_createtable( L, files.count, 0 );
@@ -1706,7 +1706,7 @@ Load directory filepaths with extension filtering and recursive directory scan
- Success return string{}
*/
-int lcoreLoadDirectoryFilesEx( lua_State *L ) {
+int lcoreLoadDirectoryFilesEx( lua_State* L ) {
bool scanSubdirs = uluaGetBoolean( L, 3 );
FilePathList files = LoadDirectoryFilesEx( luaL_checkstring( L, 1 ), luaL_checkstring( L, 2 ), scanSubdirs );
@@ -1729,7 +1729,7 @@ Change working directory, return true on success
- Success return bool
*/
-int lcoreChangeDirectory( lua_State *L ) {
+int lcoreChangeDirectory( lua_State* L ) {
lua_pushboolean( L, ChangeDirectory( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1742,7 +1742,7 @@ Check if a given path is a file or a directory
- Success return bool
*/
-int lcoreIsPathFile( lua_State *L ) {
+int lcoreIsPathFile( lua_State* L ) {
lua_pushboolean( L, IsPathFile( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1755,7 +1755,7 @@ Check if a file has been dropped into window
- Success return bool
*/
-int lcoreIsFileDropped( lua_State *L ) {
+int lcoreIsFileDropped( lua_State* L ) {
lua_pushboolean( L, IsFileDropped() );
return 1;
@@ -1768,7 +1768,7 @@ Load dropped filepaths
- Success return string{}
*/
-int lcoreLoadDroppedFiles( lua_State *L ) {
+int lcoreLoadDroppedFiles( lua_State* L ) {
FilePathList files = LoadDroppedFiles();
lua_createtable( L, files.count, 0 );
@@ -1789,7 +1789,7 @@ Get file modification time (Last write time)
- Success return int
*/
-int lcoreGetFileModTime( lua_State *L ) {
+int lcoreGetFileModTime( lua_State* L ) {
lua_pushinteger( L, GetFileModTime( luaL_checkstring( L, 1 ) ) );
return 1;
@@ -1806,13 +1806,13 @@ Compress data (DEFLATE algorithm)
- Success return Buffer
*/
-int lcoreCompressData( lua_State *L ) {
- Buffer *inBuffer = uluaGetBuffer( L, 1 );
+int lcoreCompressData( lua_State* L ) {
+ Buffer* inBuffer = uluaGetBuffer( L, 1 );
Buffer outBuffer = {
.size = 0,
.type = inBuffer->type
};
- unsigned char *compData = CompressData( inBuffer->data, inBuffer->size, (int*)&outBuffer.size );
+ unsigned char* compData = CompressData( inBuffer->data, inBuffer->size, (int*)&outBuffer.size );
outBuffer.data = malloc( outBuffer.size );
memcpy( outBuffer.data, compData, outBuffer.size );
@@ -1830,13 +1830,13 @@ Decompress data (DEFLATE algorithm).
- Success Buffer
*/
-int lcoreDecompressData( lua_State *L ) {
- Buffer *inBuffer = uluaGetBuffer( L, 1 );
+int lcoreDecompressData( lua_State* L ) {
+ Buffer* inBuffer = uluaGetBuffer( L, 1 );
Buffer outBuffer = {
.size = 0,
.type = inBuffer->type
};
- unsigned char *data = DecompressData( inBuffer->data, inBuffer->size, (int*)&outBuffer.size );
+ unsigned char* data = DecompressData( inBuffer->data, inBuffer->size, (int*)&outBuffer.size );
outBuffer.data = malloc( outBuffer.size );
memcpy( outBuffer.data, data, outBuffer.size );
@@ -1854,12 +1854,12 @@ Encode data to Base64 string
- Success return string, int
*/
-int lcoreEncodeDataBase64( lua_State *L ) {
+int lcoreEncodeDataBase64( lua_State* L ) {
int dataSize = 0;
- const char *string = luaL_checklstring( L, 1, (size_t*)&dataSize );
+ const char* string = luaL_checklstring( L, 1, (size_t*)&dataSize );
int outputSize = 0;
- char *compData = EncodeDataBase64( string, dataSize, &outputSize );
+ char* compData = EncodeDataBase64( string, dataSize, &outputSize );
lua_pushstring( L, compData );
lua_pushinteger( L, outputSize );
@@ -1876,9 +1876,9 @@ Decode Base64 string data
- Success return string, int
*/
-int lcoreDecodeDataBase64( lua_State *L ) {
+int lcoreDecodeDataBase64( lua_State* L ) {
int outputSize = 0;
- unsigned char *decodedData = DecodeDataBase64( luaL_checkstring( L, 1 ), &outputSize );
+ unsigned char* decodedData = DecodeDataBase64( luaL_checkstring( L, 1 ), &outputSize );
lua_pushstring( L, decodedData );
lua_pushinteger( L, outputSize );
@@ -1899,7 +1899,7 @@ Detect if a key has been pressed once
- Success return bool
*/
-int lcoreIsKeyPressed( lua_State *L ) {
+int lcoreIsKeyPressed( lua_State* L ) {
int key = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsKeyPressed( key ) );
@@ -1914,7 +1914,7 @@ Detect if a key is being pressed
- Success return bool
*/
-int lcoreIsKeyDown( lua_State *L ) {
+int lcoreIsKeyDown( lua_State* L ) {
int key = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsKeyDown( key ) );
@@ -1929,7 +1929,7 @@ Detect if a key has been released once
- Success return bool
*/
-int lcoreIsKeyReleased( lua_State *L ) {
+int lcoreIsKeyReleased( lua_State* L ) {
int key = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsKeyReleased( key ) );
@@ -1944,7 +1944,7 @@ Check if a key is NOT being pressed
- Success return bool
*/
-int lcoreIsKeyUp( lua_State *L ) {
+int lcoreIsKeyUp( lua_State* L ) {
int key = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsKeyUp( key ) );
@@ -1959,7 +1959,7 @@ Get key pressed (keycode), call it multiple times for keys queued, returns 0 whe
- Success return int
*/
-int lcoreGetKeyPressed( lua_State *L ) {
+int lcoreGetKeyPressed( lua_State* L ) {
lua_pushinteger( L, GetKeyPressed() );
return 1;
@@ -1972,7 +1972,7 @@ Get char pressed (unicode), call it multiple times for chars queued, returns 0 w
- Success return int
*/
-int lcoreGetCharPressed( lua_State *L ) {
+int lcoreGetCharPressed( lua_State* L ) {
lua_pushinteger( L, GetCharPressed() );
return 1;
@@ -1983,7 +1983,7 @@ int lcoreGetCharPressed( lua_State *L ) {
Set a custom key to exit program (default is ESC)
*/
-int lcoreSetExitKey( lua_State *L ) {
+int lcoreSetExitKey( lua_State* L ) {
int key = luaL_checkinteger( L, 1 );
SetExitKey( key );
@@ -2002,7 +2002,7 @@ Detect if a gamepad is available
- Success return bool
*/
-int lcoreIsGamepadAvailable( lua_State *L ) {
+int lcoreIsGamepadAvailable( lua_State* L ) {
int gamepad = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsGamepadAvailable( gamepad ) );
@@ -2017,7 +2017,7 @@ Return gamepad internal name id
- Success return string
*/
-int lcoreGetGamepadName( lua_State *L ) {
+int lcoreGetGamepadName( lua_State* L ) {
int gamepad = luaL_checkinteger( L, 1 );
lua_pushstring( L, GetGamepadName( gamepad ) );
@@ -2032,7 +2032,7 @@ Detect if a gamepad button has been pressed once
- Success return bool
*/
-int lcoreIsGamepadButtonPressed( lua_State *L ) {
+int lcoreIsGamepadButtonPressed( lua_State* L ) {
int gamepad = luaL_checkinteger( L, 1 );
int button = luaL_checkinteger( L, 2 );
@@ -2048,7 +2048,7 @@ Detect if a gamepad button is being pressed
- Success return bool
*/
-int lcoreIsGamepadButtonDown( lua_State *L ) {
+int lcoreIsGamepadButtonDown( lua_State* L ) {
int gamepad = luaL_checkinteger( L, 1 );
int button = luaL_checkinteger( L, 2 );
@@ -2064,7 +2064,7 @@ Detect if a gamepad button has been released once
- Success return bool
*/
-int lcoreIsGamepadButtonReleased( lua_State *L ) {
+int lcoreIsGamepadButtonReleased( lua_State* L ) {
int gamepad = luaL_checkinteger( L, 1 );
int button = luaL_checkinteger( L, 2 );
@@ -2080,7 +2080,7 @@ Return gamepad axis count for a gamepad
- Success return int
*/
-int lcoreGetGamepadAxisCount( lua_State *L ) {
+int lcoreGetGamepadAxisCount( lua_State* L ) {
int gamepad = luaL_checkinteger( L, 1 );
lua_pushinteger( L, GetGamepadAxisCount( gamepad ) );
@@ -2095,7 +2095,7 @@ Return axis movement value for a gamepad axis
- Success return float
*/
-int lcoreGetGamepadAxisMovement( lua_State *L ) {
+int lcoreGetGamepadAxisMovement( lua_State* L ) {
int gamepad = luaL_checkinteger( L, 1 );
int axis = luaL_checkinteger( L, 2 );
@@ -2111,8 +2111,8 @@ Set internal gamepad mappings (SDL_GameControllerDB)
- Success return int
*/
-int lcoreSetGamepadMappings( lua_State *L ) {
- const char *mappings = luaL_checkstring( L, 1 );
+int lcoreSetGamepadMappings( lua_State* L ) {
+ const char* mappings = luaL_checkstring( L, 1 );
lua_pushnumber( L, SetGamepadMappings( mappings ) );
@@ -2130,7 +2130,7 @@ Detect if a mouse button has been pressed once
- Success return bool
*/
-int lcoreIsMouseButtonPressed( lua_State *L ) {
+int lcoreIsMouseButtonPressed( lua_State* L ) {
int button = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsMouseButtonPressed( button ) );
@@ -2145,7 +2145,7 @@ Detect if a mouse button is being pressed
- Success return bool
*/
-int lcoreIsMouseButtonDown( lua_State *L ) {
+int lcoreIsMouseButtonDown( lua_State* L ) {
int button = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsMouseButtonDown( button ) );
@@ -2160,7 +2160,7 @@ Detect if a mouse button has been released once
- Success return bool
*/
-int lcoreIsMouseButtonReleased( lua_State *L ) {
+int lcoreIsMouseButtonReleased( lua_State* L ) {
int button = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsMouseButtonReleased( button ) );
@@ -2175,7 +2175,7 @@ Check if a mouse button is NOT being pressed
- Success return bool
*/
-int lcoreIsMouseButtonUp( lua_State *L ) {
+int lcoreIsMouseButtonUp( lua_State* L ) {
int button = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsMouseButtonUp( button ) );
@@ -2190,7 +2190,7 @@ Returns mouse position
- Success return Vector2
*/
-int lcoreGetMousePosition( lua_State *L ) {
+int lcoreGetMousePosition( lua_State* L ) {
uluaPushVector2( L, GetMousePosition() );
return 1;
@@ -2203,7 +2203,7 @@ Get mouse delta between frames
- Success return Vector2
*/
-int lcoreGetMouseDelta( lua_State *L ) {
+int lcoreGetMouseDelta( lua_State* L ) {
uluaPushVector2( L, GetMouseDelta() );
return 1;
@@ -2214,7 +2214,7 @@ int lcoreGetMouseDelta( lua_State *L ) {
Set mouse position XY
*/
-int lcoreSetMousePosition( lua_State *L ) {
+int lcoreSetMousePosition( lua_State* L ) {
Vector2 pos = uluaGetVector2( L, 1 );
SetMousePosition( pos.x, pos.y );
@@ -2227,7 +2227,7 @@ int lcoreSetMousePosition( lua_State *L ) {
Set mouse offset
*/
-int lcoreSetMouseOffset( lua_State *L ) {
+int lcoreSetMouseOffset( lua_State* L ) {
Vector2 offset = uluaGetVector2( L, 1 );
SetMouseOffset( offset.x, offset.y );
@@ -2240,7 +2240,7 @@ int lcoreSetMouseOffset( lua_State *L ) {
Set mouse scaling
*/
-int lcoreSetMouseScale( lua_State *L ) {
+int lcoreSetMouseScale( lua_State* L ) {
Vector2 scale = uluaGetVector2( L, 1 );
SetMouseScale( scale.x, scale.y );
@@ -2255,7 +2255,7 @@ Returns mouse wheel movement Y
- Success return float
*/
-int lcoreGetMouseWheelMove( lua_State *L ) {
+int lcoreGetMouseWheelMove( lua_State* L ) {
lua_pushnumber( L, GetMouseWheelMove() );
return 1;
@@ -2266,7 +2266,7 @@ int lcoreGetMouseWheelMove( lua_State *L ) {
Set mouse cursor
*/
-int lcoreSetMouseCursor( lua_State *L ) {
+int lcoreSetMouseCursor( lua_State* L ) {
int cursor = luaL_checkinteger( L, 1 );
SetMouseCursor( cursor );
@@ -2285,7 +2285,7 @@ Get touch position XY for a touch point index (relative to screen size)
- Success return Vector2
*/
-int lcoreGetTouchPosition( lua_State *L ) {
+int lcoreGetTouchPosition( lua_State* L ) {
int index = luaL_checkinteger( L, 1 );
uluaPushVector2( L, GetTouchPosition( index ) );
@@ -2300,7 +2300,7 @@ Get touch point identifier for given index
- Success return int
*/
-int lcoreGetTouchPointId( lua_State *L ) {
+int lcoreGetTouchPointId( lua_State* L ) {
int index = luaL_checkinteger( L, 1 );
lua_pushinteger( L, GetTouchPointId( index ) );
@@ -2315,7 +2315,7 @@ Get touch point identifier for given index
- Success return int
*/
-int lcoreGetTouchPointCount( lua_State *L ) {
+int lcoreGetTouchPointCount( lua_State* L ) {
lua_pushinteger( L, GetTouchPointCount() );
return 1;
@@ -2330,7 +2330,7 @@ int lcoreGetTouchPointCount( lua_State *L ) {
Enable a set of gestures using flags
*/
-int lcoreSetGesturesEnabled( lua_State *L ) {
+int lcoreSetGesturesEnabled( lua_State* L ) {
unsigned int flags = (unsigned int)luaL_checkinteger( L, 1 );
SetGesturesEnabled( flags );
@@ -2345,7 +2345,7 @@ Check if a gesture have been detected
- Success return bool
*/
-int lcoreIsGestureDetected( lua_State *L ) {
+int lcoreIsGestureDetected( lua_State* L ) {
int gesture = luaL_checkinteger( L, 1 );
lua_pushboolean( L, IsGestureDetected( gesture ) );
@@ -2360,7 +2360,7 @@ Get latest detected gesture
- Success return int
*/
-int lcoreGetGestureDetected( lua_State *L ) {
+int lcoreGetGestureDetected( lua_State* L ) {
lua_pushinteger( L, GetGestureDetected() );
return 1;
@@ -2373,7 +2373,7 @@ Get gesture hold time in milliseconds
- Success return float
*/
-int lcoreGetGestureHoldDuration( lua_State *L ) {
+int lcoreGetGestureHoldDuration( lua_State* L ) {
lua_pushnumber( L, GetGestureHoldDuration() );
return 1;
@@ -2386,7 +2386,7 @@ Get gesture drag vector
- Success return Vector2
*/
-int lcoreGetGestureDragVector( lua_State *L ) {
+int lcoreGetGestureDragVector( lua_State* L ) {
uluaPushVector2( L, GetGestureDragVector() );
return 1;
@@ -2399,7 +2399,7 @@ Get gesture drag angle
- Success return float
*/
-int lcoreGetGestureDragAngle( lua_State *L ) {
+int lcoreGetGestureDragAngle( lua_State* L ) {
lua_pushnumber( L, GetGestureDragAngle() );
return 1;
@@ -2412,7 +2412,7 @@ Get gesture pinch delta
- Success return Vector2
*/
-int lcoreGetGesturePinchVector( lua_State *L ) {
+int lcoreGetGesturePinchVector( lua_State* L ) {
uluaPushVector2( L, GetGesturePinchVector() );
return 1;
@@ -2425,7 +2425,7 @@ Get gesture pinch angle
- Success return float
*/
-int lcoreGetGesturePinchAngle( lua_State *L ) {
+int lcoreGetGesturePinchAngle( lua_State* L ) {
lua_pushnumber( L, GetGesturePinchAngle() );
return 1;
@@ -2442,7 +2442,7 @@ Return camera2D set to default configuration
- Success return Camera2D
*/
-int lcoreCreateCamera2D( lua_State *L ) {
+int lcoreCreateCamera2D( lua_State* L ) {
Camera2D camera = { 0 };
camera.offset = (Vector2){ 0.0, 0.0 };
@@ -2460,8 +2460,8 @@ int lcoreCreateCamera2D( lua_State *L ) {
Set camera target (rotation and zoom origin)
*/
-int lcoreSetCamera2DTarget( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreSetCamera2DTarget( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
Vector2 target = uluaGetVector2( L, 2 );
camera->target = target;
@@ -2474,8 +2474,8 @@ int lcoreSetCamera2DTarget( lua_State *L ) {
Set camera offset (displacement from target)
*/
-int lcoreSetCamera2DOffset( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreSetCamera2DOffset( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
Vector2 offset = uluaGetVector2( L, 2 );
camera->offset = offset;
@@ -2488,8 +2488,8 @@ int lcoreSetCamera2DOffset( lua_State *L ) {
Set camera rotation in degrees
*/
-int lcoreSetCamera2DRotation( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreSetCamera2DRotation( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
float rotation = luaL_checknumber( L, 2 );
camera->rotation = rotation;
@@ -2502,8 +2502,8 @@ int lcoreSetCamera2DRotation( lua_State *L ) {
Set camera zoom (scaling), should be 1.0f by default
*/
-int lcoreSetCamera2DZoom( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreSetCamera2DZoom( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
float zoom = luaL_checknumber( L, 2 );
camera->zoom = zoom;
@@ -2518,8 +2518,8 @@ Get camera2D target
- Success return Vector2
*/
-int lcoreGetCamera2DTarget( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreGetCamera2DTarget( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
uluaPushVector2( L, camera->target );
@@ -2533,8 +2533,8 @@ Get camera2D offset
- Success return Vector2
*/
-int lcoreGetCamera2DOffset( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreGetCamera2DOffset( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
uluaPushVector2( L, camera->offset );
return 1;
@@ -2547,8 +2547,8 @@ Get camera2D rotation
- Success return float
*/
-int lcoreGetCamera2DRotation( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreGetCamera2DRotation( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
lua_pushnumber( L, camera->rotation );
return 1;
@@ -2561,8 +2561,8 @@ Get camera2D zoom
- Success return float
*/
-int lcoreGetCamera2DZoom( lua_State *L ) {
- Camera2D *camera = uluaGetCamera2D( L, 1 );
+int lcoreGetCamera2DZoom( lua_State* L ) {
+ Camera2D* camera = uluaGetCamera2D( L, 1 );
lua_pushnumber( L, camera->zoom );
return 1;
@@ -2579,7 +2579,7 @@ Return camera3D id set to default configuration
- Success return int
*/
-int lcoreCreateCamera3D( lua_State *L ) {
+int lcoreCreateCamera3D( lua_State* L ) {
Camera3D camera = { 0 };
camera.position = (Vector3){ 0.0, 0.0, 0.0 };
@@ -2598,8 +2598,8 @@ int lcoreCreateCamera3D( lua_State *L ) {
Set camera position (Remember to call "RL.UpdateCamera3D()" to apply changes)
*/
-int lcoreSetCamera3DPosition( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreSetCamera3DPosition( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
Vector3 pos = uluaGetVector3( L, 2 );
camera->position = pos;
@@ -2612,8 +2612,8 @@ int lcoreSetCamera3DPosition( lua_State *L ) {
Set camera target it looks-at
*/
-int lcoreSetCamera3DTarget( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreSetCamera3DTarget( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
Vector3 target = uluaGetVector3( L, 2 );
camera->target = target;
@@ -2626,8 +2626,8 @@ int lcoreSetCamera3DTarget( lua_State *L ) {
Set camera up vector (Rotation over it's axis)
*/
-int lcoreSetCamera3DUp( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreSetCamera3DUp( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
Vector3 up = uluaGetVector3( L, 2 );
camera->up = up;
@@ -2640,8 +2640,8 @@ int lcoreSetCamera3DUp( lua_State *L ) {
Set camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
*/
-int lcoreSetCamera3DFovy( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreSetCamera3DFovy( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
float fovy = luaL_checknumber( L, 2 );
camera->fovy = fovy;
@@ -2654,8 +2654,8 @@ int lcoreSetCamera3DFovy( lua_State *L ) {
Set camera projection mode (CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC)
*/
-int lcoreSetCamera3DProjection( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreSetCamera3DProjection( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
int projection = luaL_checkinteger( L, 2 );
camera->projection = projection;
@@ -2670,8 +2670,8 @@ Get camera position
- Success return Vector3
*/
-int lcoreGetCamera3DPosition( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DPosition( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
uluaPushVector3( L, camera->position );
@@ -2685,8 +2685,8 @@ Get camera target it looks-at
- Success return Vector3
*/
-int lcoreGetCamera3DTarget( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DTarget( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
uluaPushVector3( L, camera->target );
@@ -2700,8 +2700,8 @@ Get camera up vector (Rotation over it's axis)
- Success return Vector3
*/
-int lcoreGetCamera3DUp( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DUp( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
uluaPushVector3( L, camera->up );
@@ -2715,8 +2715,8 @@ Get camera field-of-view apperture in Y (degrees) in perspective, used as near p
- Success return float
*/
-int lcoreGetCamera3DFovy( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DFovy( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
lua_pushnumber( L, camera->fovy );
@@ -2730,8 +2730,8 @@ Get camera projection mode
- Success return int
*/
-int lcoreGetCamera3DProjection( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DProjection( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
lua_pushinteger( L, camera->projection );
@@ -2745,8 +2745,8 @@ Returns the cameras forward vector (normalized)
- Success return Vector3
*/
-int lcoreGetCamera3DForward( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DForward( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
uluaPushVector3( L, GetCameraForward( camera ) );
@@ -2761,8 +2761,8 @@ Note: The up vector might not be perpendicular to the forward vector
- Success return Vector3
*/
-int lcoreGetCamera3DUpNormalized( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DUpNormalized( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
uluaPushVector3( L, GetCameraUp( camera ) );
@@ -2776,8 +2776,8 @@ Returns the cameras right vector (normalized)
- Success return Vector3
*/
-int lcoreGetCamera3DRight( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DRight( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
uluaPushVector3( L, GetCameraRight( camera ) );
@@ -2789,8 +2789,8 @@ int lcoreGetCamera3DRight( lua_State *L ) {
Moves the camera in it's forward direction
*/
-int lcoreCamera3DMoveForward( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreCamera3DMoveForward( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
float distance = luaL_checknumber( L, 2 );
bool moveInWorldPlane = uluaGetBoolean( L, 3 );
@@ -2804,8 +2804,8 @@ int lcoreCamera3DMoveForward( lua_State *L ) {
Moves the camera in it's up direction
*/
-int lcoreCamera3DMoveUp( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreCamera3DMoveUp( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
float distance = luaL_checknumber( L, 2 );
CameraMoveUp( camera, distance );
@@ -2818,8 +2818,8 @@ int lcoreCamera3DMoveUp( lua_State *L ) {
Moves the camera target in it's current right direction
*/
-int lcoreCamera3DMoveRight( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreCamera3DMoveRight( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
float distance = luaL_checknumber( L, 2 );
bool moveInWorldPlane = uluaGetBoolean( L, 3 );
@@ -2833,8 +2833,8 @@ int lcoreCamera3DMoveRight( lua_State *L ) {
Moves the camera position closer/farther to/from the camera target
*/
-int lcoreCamera3DMoveToTarget( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreCamera3DMoveToTarget( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
float delta = luaL_checknumber( L, 2 );
CameraMoveToTarget( camera, delta );
@@ -2850,8 +2850,8 @@ Yaw is "looking left and right"
If rotateAroundTarget is false, the camera rotates around it's position
Note: angle must be provided in radians
*/
-int lcoreCamera3DYaw( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreCamera3DYaw( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
float delta = luaL_checknumber( L, 2 );
bool rotateAroundTarget = uluaGetBoolean( L, 3 );
@@ -2869,8 +2869,8 @@ Rotates the camera around it's right vector, pitch is "looking up and down"
- rotateUp rotates the up direction as well (typically only usefull in CAMERA_FREE)
NOTE: angle must be provided in radians
*/
-int lcoreCamera3DPitch( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreCamera3DPitch( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
float delta = luaL_checknumber( L, 2 );
bool lockView = uluaGetBoolean( L, 3 );
bool rotateAroundTarget = uluaGetBoolean( L, 4 );
@@ -2888,8 +2888,8 @@ Rotates the camera around it's forward vector
Roll is "turning your head sideways to the left or right"
Note: angle must be provided in radians
*/
-int lcoreCamera3DRoll( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreCamera3DRoll( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
float angle = luaL_checknumber( L, 2 );
CameraRoll( camera, angle );
@@ -2904,8 +2904,8 @@ Returns the camera view matrix
- Success return Matrix
*/
-int lcoreGetCamera3DViewMatrix( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DViewMatrix( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
uluaPushMatrix( L, GetCameraViewMatrix( camera ) );
@@ -2919,8 +2919,8 @@ Returns the camera projection matrix
- Success return Matrix
*/
-int lcoreGetCamera3DProjectionMatrix( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreGetCamera3DProjectionMatrix( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
float aspect = luaL_checknumber( L, 2 );
uluaPushMatrix( L, GetCameraProjectionMatrix( camera, aspect ) );
@@ -2933,8 +2933,8 @@ int lcoreGetCamera3DProjectionMatrix( lua_State *L ) {
Update camera position for selected mode
*/
-int lcoreUpdateCamera3D( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreUpdateCamera3D( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
int mode = luaL_checkinteger( L, 2 );
UpdateCamera( camera, mode );
@@ -2947,8 +2947,8 @@ int lcoreUpdateCamera3D( lua_State *L ) {
Update camera movement, movement/rotation values should be provided by user
*/
-int lcoreUpdateCamera3DPro( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
+int lcoreUpdateCamera3DPro( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
Vector3 movement = uluaGetVector3( L, 2 );
Vector3 rotation = uluaGetVector3( L, 3 );
float zoom = luaL_checknumber( L, 4 );
@@ -2969,7 +2969,7 @@ Load Buffer. Type should be one of the Buffer types. Empty buffer will set data
- Success return Buffer
*/
-int lcoreLoadBuffer( lua_State *L ) {
+int lcoreLoadBuffer( lua_State* L ) {
luaL_checktype( L, 1, LUA_TTABLE );
int type = luaL_checkinteger( L, 2 );
@@ -2990,14 +2990,14 @@ int lcoreLoadBuffer( lua_State *L ) {
int t = 1;
int i = 0;
- unsigned char *ucp = buffer.data;
+ unsigned char* ucp = buffer.data;
unsigned short *usp = buffer.data;
- unsigned int *uip = buffer.data;
- char *cp = buffer.data;
+ unsigned int* uip = buffer.data;
+ char* cp = buffer.data;
short *sp = buffer.data;
- int *ip = buffer.data;
- float *fp = buffer.data;
- double *dp = buffer.data;
+ int* ip = buffer.data;
+ float* fp = buffer.data;
+ double* dp = buffer.data;
lua_pushnil( L );
@@ -3054,8 +3054,8 @@ Read buffer data from binary file
- Failure return nil
- Success return Buffer
*/
-int lcoreLoadBufferFromFile( lua_State *L ) {
- const char *path = luaL_checkstring( L, 1 );
+int lcoreLoadBufferFromFile( lua_State* L ) {
+ const char* path = luaL_checkstring( L, 1 );
int type = luaL_checkinteger( L, 2 );
int fileLen = GetFileLength( path );
@@ -3065,7 +3065,7 @@ int lcoreLoadBufferFromFile( lua_State *L ) {
.data = malloc( fileLen )
};
size_t elementSize = getBufferElementSize( &buffer );
- FILE *file;
+ FILE* file;
file = fopen( path, "rb" );
if ( file == NULL ) {
@@ -3089,9 +3089,9 @@ Read buffer data from string
- Failure return nil
- Success return Buffer
*/
-int lcoreLoadBufferFromString( lua_State *L ) {
+int lcoreLoadBufferFromString( lua_State* L ) {
size_t len = 0;
- const char *string = luaL_checklstring( L, 1, &len );
+ const char* string = luaL_checklstring( L, 1, &len );
Buffer buffer = {
.type = BUFFER_UNSIGNED_CHAR,
@@ -3110,8 +3110,8 @@ int lcoreLoadBufferFromString( lua_State *L ) {
Unload buffer data
*/
-int lcoreUnloadBuffer( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
+int lcoreUnloadBuffer( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
unloadBuffer( buffer );
@@ -3125,13 +3125,13 @@ Get buffer data as table in the format it was stored
- Success return data{}
*/
-int lcoreGetBufferData( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
+int lcoreGetBufferData( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
size_t position = luaL_checkinteger( L, 2 );
size_t length = luaL_checkinteger( L, 3 );
if ( buffer->type == BUFFER_UNSIGNED_CHAR ) {
- unsigned char *p = buffer->data + position * sizeof( unsigned char );
+ unsigned char* p = buffer->data + position * sizeof( unsigned char );
size_t bufLen = buffer->size / sizeof( unsigned char );
size_t count = bufLen < ( position + length ) ? ( position + length ) - bufLen : length;
lua_createtable( L, count, 0 );
@@ -3155,7 +3155,7 @@ int lcoreGetBufferData( lua_State *L ) {
}
}
else if ( buffer->type == BUFFER_UNSIGNED_INT ) {
- unsigned int *p = buffer->data + position * sizeof( unsigned int );
+ unsigned int* p = buffer->data + position * sizeof( unsigned int );
size_t bufLen = buffer->size / sizeof( unsigned int );
size_t count = bufLen < ( position + length ) ? ( position + length ) - bufLen : length;
lua_createtable( L, count, 0 );
@@ -3167,7 +3167,7 @@ int lcoreGetBufferData( lua_State *L ) {
}
}
else if ( buffer->type == BUFFER_CHAR ) {
- char *p = buffer->data + position * sizeof( char );
+ char* p = buffer->data + position * sizeof( char );
size_t bufLen = buffer->size / sizeof( char );
size_t count = bufLen < ( position + length ) ? ( position + length ) - bufLen : length;
lua_createtable( L, count, 0 );
@@ -3191,7 +3191,7 @@ int lcoreGetBufferData( lua_State *L ) {
}
}
else if ( buffer->type == BUFFER_INT ) {
- int *p = buffer->data + position * sizeof( int );
+ int* p = buffer->data + position * sizeof( int );
size_t bufLen = buffer->size / sizeof( int );
size_t count = bufLen < ( position + length ) ? ( position + length ) - bufLen : length;
lua_createtable( L, count, 0 );
@@ -3203,7 +3203,7 @@ int lcoreGetBufferData( lua_State *L ) {
}
}
else if ( buffer->type == BUFFER_FLOAT ) {
- float *p = buffer->data + position * sizeof( float );
+ float* p = buffer->data + position * sizeof( float );
size_t bufLen = buffer->size / sizeof( float );
size_t count = bufLen < ( position + length ) ? ( position + length ) - bufLen : length;
lua_createtable( L, count, 0 );
@@ -3215,7 +3215,7 @@ int lcoreGetBufferData( lua_State *L ) {
}
}
else if ( buffer->type == BUFFER_DOUBLE ) {
- double *p = buffer->data + position * sizeof( double );
+ double* p = buffer->data + position * sizeof( double );
size_t bufLen = buffer->size / sizeof( double );
size_t count = bufLen < ( position + length ) ? ( position + length ) - bufLen : length;
lua_createtable( L, count, 0 );
@@ -3236,8 +3236,8 @@ Get buffer type
- Success return int
*/
-int lcoreGetBufferType( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
+int lcoreGetBufferType( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
lua_pushinteger( L, buffer->type );
@@ -3251,8 +3251,8 @@ Get buffer size in bytes
- Success return int
*/
-int lcoreGetBufferSize( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
+int lcoreGetBufferSize( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
lua_pushinteger( L, buffer->size );
@@ -3266,8 +3266,8 @@ Get buffer element size in bytes
- Success return int
*/
-int lcoreGetBufferElementSize( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
+int lcoreGetBufferElementSize( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
lua_pushinteger( L, getBufferElementSize( buffer ) );
@@ -3281,8 +3281,8 @@ Get buffer element count
- Success return int
*/
-int lcoreGetBufferLength( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
+int lcoreGetBufferLength( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
lua_pushinteger( L, buffer->size / getBufferElementSize( buffer ) );
@@ -3294,12 +3294,12 @@ int lcoreGetBufferLength( lua_State *L ) {
Write buffer data to binary file
*/
-int lcoreExportBuffer( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
- const char *path = luaL_checkstring( L, 2 );
+int lcoreExportBuffer( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
+ const char* path = luaL_checkstring( L, 2 );
size_t elementSize = getBufferElementSize( buffer );
- FILE *file;
+ FILE* file;
file = fopen( path, "wb" );
fwrite( buffer->data, elementSize, buffer->size / elementSize, file );
diff --git a/src/easings.c b/src/easings.c
index cae349c..01bb4bf 100644
--- a/src/easings.c
+++ b/src/easings.c
@@ -15,7 +15,7 @@ Ease linear
- Success return float
*/
-int leasingsEaseLinear( lua_State *L ) {
+int leasingsEaseLinear( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -37,7 +37,7 @@ Ease sine in
- Success return float
*/
-int leasingsEaseSineIn( lua_State *L ) {
+int leasingsEaseSineIn( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -55,7 +55,7 @@ Ease sine out
- Success return float
*/
-int leasingsEaseSineOut( lua_State *L ) {
+int leasingsEaseSineOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -73,7 +73,7 @@ Ease sine in out
- Success return float
*/
-int leasingsEaseSineInOut( lua_State *L ) {
+int leasingsEaseSineInOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -95,7 +95,7 @@ Ease circle in
- Success return float
*/
-int leasingsEaseCircIn( lua_State *L ) {
+int leasingsEaseCircIn( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -113,7 +113,7 @@ Ease circle out
- Success return float
*/
-int leasingsEaseCircOut( lua_State *L ) {
+int leasingsEaseCircOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -131,7 +131,7 @@ Ease circle in out
- Success return float
*/
-int leasingsEaseCircInOut( lua_State *L ) {
+int leasingsEaseCircInOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -153,7 +153,7 @@ Ease cubic in
- Success return float
*/
-int leasingsEaseCubicIn( lua_State *L ) {
+int leasingsEaseCubicIn( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -171,7 +171,7 @@ Ease cubic out
- Success return float
*/
-int leasingsEaseCubicOut( lua_State *L ) {
+int leasingsEaseCubicOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -189,7 +189,7 @@ Ease cubic in out
- Success return float
*/
-int leasingsEaseCubicInOut( lua_State *L ) {
+int leasingsEaseCubicInOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -211,7 +211,7 @@ Ease quadratic in
- Success return float
*/
-int leasingsEaseQuadIn( lua_State *L ) {
+int leasingsEaseQuadIn( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -229,7 +229,7 @@ Ease quadratic out
- Success return float
*/
-int leasingsEaseQuadOut( lua_State *L ) {
+int leasingsEaseQuadOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -247,7 +247,7 @@ Ease quadratic in out
- Success return float
*/
-int leasingsEaseQuadInOut( lua_State *L ) {
+int leasingsEaseQuadInOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -269,7 +269,7 @@ Ease exponential in
- Success return float
*/
-int leasingsEaseExpoIn( lua_State *L ) {
+int leasingsEaseExpoIn( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -287,7 +287,7 @@ Ease exponential out
- Success return float
*/
-int leasingsEaseExpoOut( lua_State *L ) {
+int leasingsEaseExpoOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -305,7 +305,7 @@ Ease exponential in out
- Success return float
*/
-int leasingsEaseExpoInOut( lua_State *L ) {
+int leasingsEaseExpoInOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -327,7 +327,7 @@ Ease back in
- Success return float
*/
-int leasingsEaseBackIn( lua_State *L ) {
+int leasingsEaseBackIn( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -345,7 +345,7 @@ Ease back out
- Success return float
*/
-int leasingsEaseBackOut( lua_State *L ) {
+int leasingsEaseBackOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -363,7 +363,7 @@ Ease back in out
- Success return float
*/
-int leasingsEaseBackInOut( lua_State *L ) {
+int leasingsEaseBackInOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -385,7 +385,7 @@ Ease bounce in
- Success return float
*/
-int leasingsEaseBounceIn( lua_State *L ) {
+int leasingsEaseBounceIn( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -403,7 +403,7 @@ Ease bounce out
- Success return float
*/
-int leasingsEaseBounceOut( lua_State *L ) {
+int leasingsEaseBounceOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -421,7 +421,7 @@ Ease bounce in out
- Success return float
*/
-int leasingsEaseBounceInOut( lua_State *L ) {
+int leasingsEaseBounceInOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -443,7 +443,7 @@ Ease elastic in
- Success return float
*/
-int leasingsEaseElasticIn( lua_State *L ) {
+int leasingsEaseElasticIn( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -461,7 +461,7 @@ Ease elastic out
- Success return float
*/
-int leasingsEaseElasticOut( lua_State *L ) {
+int leasingsEaseElasticOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
@@ -479,7 +479,7 @@ Ease elastic in out
- Success return float
*/
-int leasingsEaseElasticInOut( lua_State *L ) {
+int leasingsEaseElasticInOut( lua_State* L ) {
float t = luaL_checknumber( L, 1 );
float b = luaL_checknumber( L, 2 );
float c = luaL_checknumber( L, 3 );
diff --git a/src/gl.c b/src/gl.c
index 5bb99ce..dfc2a47 100644
--- a/src/gl.c
+++ b/src/gl.c
@@ -14,7 +14,7 @@
Copy a block of pixels from one framebuffer object to another.
Use -1 RenderTexture for window framebuffer
*/
-int lglBlitFramebuffer( lua_State *L ) {
+int lglBlitFramebuffer( lua_State* L ) {
#if defined( PLATFORM_DESKTOP ) || defined( PLATFORM_DESKTOP_SDL )
if ( !( lua_isuserdata( L, 1 ) || lua_isnil( L, 1 ) ) || !( lua_isuserdata( L, 2 ) || lua_isnil( L, 2 ) ) ) {
TraceLog( state->logLevelInvalid, "%s", "Argument needs to be RenderTexture or nil" );
@@ -30,7 +30,7 @@ int lglBlitFramebuffer( lua_State *L ) {
glBindFramebuffer( GL_READ_FRAMEBUFFER, 0 );
}
else {
- RenderTexture *srcTex = uluaGetRenderTexture( L, 1 );
+ RenderTexture* srcTex = uluaGetRenderTexture( L, 1 );
glBindFramebuffer( GL_READ_FRAMEBUFFER, srcTex->id );
}
@@ -38,7 +38,7 @@ int lglBlitFramebuffer( lua_State *L ) {
glBindFramebuffer( GL_DRAW_FRAMEBUFFER, 0 );
}
else {
- RenderTexture *dstTex = uluaGetRenderTexture( L, 2 );
+ RenderTexture* dstTex = uluaGetRenderTexture( L, 2 );
glBindFramebuffer( GL_DRAW_FRAMEBUFFER, dstTex->id );
}
diff --git a/src/lights.c b/src/lights.c
index bef40a5..1372270 100644
--- a/src/lights.c
+++ b/src/lights.c
@@ -18,12 +18,12 @@ Create a light and get shader locations
- Success return Light
*/
-int llightsCreateLight( lua_State *L ) {
+int llightsCreateLight( lua_State* L ) {
int type = luaL_checkinteger( L, 1 );
Vector3 position = uluaGetVector3( L, 2 );
Vector3 target = uluaGetVector3( L, 3 );
Color color = uluaGetColor( L, 4 );
- Shader *shader = uluaGetShader( L, 5 );
+ Shader* shader = uluaGetShader( L, 5 );
uluaPushLight( L, CreateLight( type, position, target, color, *shader ) );
@@ -35,9 +35,9 @@ int llightsCreateLight( lua_State *L ) {
Send light properties to shader
*/
-int llightsUpdateLightValues( lua_State *L ) {
- Shader *shader = uluaGetShader( L, 1 );
- Light *light = uluaGetLight( L, 2 );
+int llightsUpdateLightValues( lua_State* L ) {
+ Shader* shader = uluaGetShader( L, 1 );
+ Light* light = uluaGetLight( L, 2 );
UpdateLightValues( *shader, *light );
@@ -49,8 +49,8 @@ int llightsUpdateLightValues( lua_State *L ) {
Set light type
*/
-int llightsSetLightType( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsSetLightType( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
int type = luaL_checkinteger( L, 2 );
light->type = type;
@@ -63,8 +63,8 @@ int llightsSetLightType( lua_State *L ) {
Set light position
*/
-int llightsSetLightPosition( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsSetLightPosition( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
Vector3 position = uluaGetVector3( L, 2 );
light->position = position;
@@ -77,8 +77,8 @@ int llightsSetLightPosition( lua_State *L ) {
Set light target
*/
-int llightsSetLightTarget( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsSetLightTarget( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
Vector3 target = uluaGetVector3( L, 2 );
light->target = target;
@@ -91,8 +91,8 @@ int llightsSetLightTarget( lua_State *L ) {
Set light color
*/
-int llightsSetLightColor( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsSetLightColor( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
Color color = uluaGetColor( L, 2 );
light->color = color;
@@ -105,8 +105,8 @@ int llightsSetLightColor( lua_State *L ) {
Set light enabled
*/
-int llightsSetLightEnabled( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsSetLightEnabled( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
bool enabled = uluaGetBoolean( L, 2 );
light->enabled = enabled;
@@ -121,8 +121,8 @@ Get light type
- Success return int
*/
-int llightsGetLightType( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsGetLightType( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
lua_pushinteger( L, light->type );
@@ -136,8 +136,8 @@ Get light position
- Success return Vector3
*/
-int llightsGetLightPosition( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsGetLightPosition( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
uluaPushVector3( L, light->position );
@@ -151,8 +151,8 @@ Get light target
- Success return Vector3
*/
-int llightsGetLightTarget( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsGetLightTarget( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
uluaPushVector3( L, light->target );
@@ -166,8 +166,8 @@ Get light color
- Success return Color
*/
-int llightsGetLightColor( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsGetLightColor( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
uluaPushColor( L, light->color );
@@ -181,8 +181,8 @@ Get light enabled
- Success return bool
*/
-int llightsIsLightEnabled( lua_State *L ) {
- Light *light = uluaGetLight( L, 1 );
+int llightsIsLightEnabled( lua_State* L ) {
+ Light* light = uluaGetLight( L, 1 );
lua_pushboolean( L, light->enabled );
diff --git a/src/lua_core.c b/src/lua_core.c
index b9939cb..1fb4969 100644
--- a/src/lua_core.c
+++ b/src/lua_core.c
@@ -25,16 +25,16 @@
/* Define types. */
/* Buffer. */
-static int gcBuffer( lua_State *L ) {
+static int gcBuffer( lua_State* L ) {
if ( state->gcUnload ) {
- Buffer *buffer = luaL_checkudata( L, 1, "Buffer" );
+ Buffer* buffer = luaL_checkudata( L, 1, "Buffer" );
unloadBuffer( buffer );
}
return 0;
}
static void defineBuffer() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Buffer" );
lua_pushvalue( L, -1 );
@@ -44,16 +44,16 @@ static void defineBuffer() {
}
/* Image */
-static int gcImage( lua_State *L ) {
+static int gcImage( lua_State* L ) {
if ( state->gcUnload ) {
- Image *image = luaL_checkudata( L, 1, "Image" );
+ Image* image = luaL_checkudata( L, 1, "Image" );
UnloadImage( *image );
}
return 0;
}
static void defineImage() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Image" );
lua_pushvalue( L, -1 );
@@ -63,16 +63,16 @@ static void defineImage() {
}
/* Texture */
-static int gcTexture( lua_State *L ) {
+static int gcTexture( lua_State* L ) {
if ( state->gcUnload ) {
- Texture *texture = luaL_checkudata( L, 1, "Texture" );
+ Texture* texture = luaL_checkudata( L, 1, "Texture" );
UnloadTexture( *texture );
}
return 0;
}
static void defineTexture() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Texture" );
lua_pushvalue( L, -1 );
@@ -82,16 +82,16 @@ static void defineTexture() {
}
/* RenderRexture. */
-static int gcRenderTexture( lua_State *L ) {
+static int gcRenderTexture( lua_State* L ) {
if ( state->gcUnload ) {
- RenderTexture *renderTexture = luaL_checkudata( L, 1, "RenderTexture" );
+ RenderTexture* renderTexture = luaL_checkudata( L, 1, "RenderTexture" );
UnloadRenderTexture( *renderTexture );
}
return 0;
}
static void defineRenderTexture() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "RenderTexture" );
lua_pushvalue( L, -1 );
@@ -102,7 +102,7 @@ static void defineRenderTexture() {
/* Camera2D. */
static void defineCamera2D() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Camera2D" );
lua_pushvalue( L, -1 );
@@ -111,7 +111,7 @@ static void defineCamera2D() {
/* Camera3D. */
static void defineCamera3D() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Camera3D" );
lua_pushvalue( L, -1 );
@@ -119,16 +119,16 @@ static void defineCamera3D() {
}
/* Shader. */
-static int gcShader( lua_State *L ) {
+static int gcShader( lua_State* L ) {
if ( state->gcUnload ) {
- Shader *shader = luaL_checkudata( L, 1, "Shader" );
+ Shader* shader = luaL_checkudata( L, 1, "Shader" );
UnloadShader( *shader );
}
return 0;
}
static void defineShader() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Shader" );
lua_pushvalue( L, -1 );
@@ -138,16 +138,16 @@ static void defineShader() {
}
/* Font. */
-static int gcFont( lua_State *L ) {
+static int gcFont( lua_State* L ) {
if ( state->gcUnload ) {
- Font *font = luaL_checkudata( L, 1, "Font" );
+ Font* font = luaL_checkudata( L, 1, "Font" );
UnloadFont( *font );
}
return 0;
}
static void defineFont() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Font" );
lua_pushvalue( L, -1 );
@@ -157,16 +157,16 @@ static void defineFont() {
}
/* GlyphInfo. */
-static int gcGlyphInfo( lua_State *L ) {
+static int gcGlyphInfo( lua_State* L ) {
if ( state->gcUnload ) {
- GlyphInfo *glyph = luaL_checkudata( L, 1, "GlyphInfo" );
+ GlyphInfo* glyph = luaL_checkudata( L, 1, "GlyphInfo" );
unloadGlyphInfo( glyph );
}
return 0;
}
static void defineGlyphInfo() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "GlyphInfo" );
lua_pushvalue( L, -1 );
@@ -176,16 +176,16 @@ static void defineGlyphInfo() {
}
/* Wave. */
-static int gcWave( lua_State *L ) {
+static int gcWave( lua_State* L ) {
if ( state->gcUnload ) {
- Wave *wave = luaL_checkudata( L, 1, "Wave" );
+ Wave* wave = luaL_checkudata( L, 1, "Wave" );
UnloadWave( *wave );
}
return 0;
}
static void defineWave() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Wave" );
lua_pushvalue( L, -1 );
@@ -195,16 +195,16 @@ static void defineWave() {
}
/* Sound. */
-static int gcSound( lua_State *L ) {
+static int gcSound( lua_State* L ) {
if ( state->gcUnload ) {
- Sound *sound = luaL_checkudata( L, 1, "Sound" );
+ Sound* sound = luaL_checkudata( L, 1, "Sound" );
UnloadSound( *sound );
}
return 0;
}
static void defineSound() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Sound" );
lua_pushvalue( L, -1 );
@@ -214,16 +214,16 @@ static void defineSound() {
}
/* Music. */
-static int gcMusic( lua_State *L ) {
+static int gcMusic( lua_State* L ) {
if ( state->gcUnload ) {
- Music *music = luaL_checkudata( L, 1, "Music" );
+ Music* music = luaL_checkudata( L, 1, "Music" );
UnloadMusicStream( *music );
}
return 0;
}
static void defineMusic() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Music" );
lua_pushvalue( L, -1 );
@@ -234,7 +234,7 @@ static void defineMusic() {
/* Light. */
static void defineLight() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Light" );
lua_pushvalue( L, -1 );
@@ -242,9 +242,9 @@ static void defineLight() {
}
/* Material. */
-static int gcMaterial( lua_State *L ) {
+static int gcMaterial( lua_State* L ) {
if ( state->gcUnload ) {
- Material *material = luaL_checkudata( L, 1, "Material" );
+ Material* material = luaL_checkudata( L, 1, "Material" );
/* Custom UnloadMaterial since we don't want to free Shaders or Textures. */
unloadMaterial( material );
}
@@ -252,7 +252,7 @@ static int gcMaterial( lua_State *L ) {
}
static void defineMaterial() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Material" );
lua_pushvalue( L, -1 );
@@ -262,16 +262,16 @@ static void defineMaterial() {
}
/* Mesh. */
-static int gcMesh( lua_State *L ) {
+static int gcMesh( lua_State* L ) {
if ( state->gcUnload ) {
- Mesh *mesh = luaL_checkudata( L, 1, "Mesh" );
+ Mesh* mesh = luaL_checkudata( L, 1, "Mesh" );
UnloadMesh( *mesh );
}
return 0;
}
static void defineMesh() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Mesh" );
lua_pushvalue( L, -1 );
@@ -281,16 +281,16 @@ static void defineMesh() {
}
/* Model. */
-static int gcModel( lua_State *L ) {
+static int gcModel( lua_State* L ) {
if ( state->gcUnload ) {
- Model *model = luaL_checkudata( L, 1, "Model" );
+ Model* model = luaL_checkudata( L, 1, "Model" );
UnloadModel( *model );
}
return 0;
}
static void defineModel() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "Model" );
lua_pushvalue( L, -1 );
@@ -300,16 +300,16 @@ static void defineModel() {
}
/* ModelAnimation. */
-static int gcModelAnimation( lua_State *L ) {
+static int gcModelAnimation( lua_State* L ) {
if ( state->gcUnload ) {
- ModelAnimation *modelAnimation = luaL_checkudata( L, 1, "ModelAnimation" );
+ ModelAnimation* modelAnimation = luaL_checkudata( L, 1, "ModelAnimation" );
UnloadModelAnimation( *modelAnimation );
}
return 0;
}
static void defineModelAnimation() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "ModelAnimation" );
lua_pushvalue( L, -1 );
@@ -319,16 +319,16 @@ static void defineModelAnimation() {
}
/* rlRenderBatch. */
-static int gcRLRenderBatch( lua_State *L ) {
+static int gcRLRenderBatch( lua_State* L ) {
if ( state->gcUnload ) {
- rlRenderBatch *renderBatch = luaL_checkudata( L, 1, "rlRenderBatch" );
+ rlRenderBatch* renderBatch = luaL_checkudata( L, 1, "rlRenderBatch" );
rlUnloadRenderBatch( *renderBatch );
}
return 0;
}
static void defineRLRenderBatch() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_newmetatable( L, "rlRenderBatch" );
lua_pushvalue( L, -1 );
@@ -339,38 +339,38 @@ static void defineRLRenderBatch() {
/* Assing globals. */
-void assignGlobalInt( int value, const char *name ) {
- lua_State *L = state->luaState;
+void assignGlobalInt( int value, const char* name ) {
+ lua_State* L = state->luaState;
lua_pushinteger( L, value );
lua_setfield( L, -2, name );
}
-void assignGlobalFloat( float value, const char *name ) {
- lua_State *L = state->luaState;
+void assignGlobalFloat( float value, const char* name ) {
+ lua_State* L = state->luaState;
lua_pushnumber( L, value );
lua_setfield( L, -2, name );
}
-void assignGlobalDouble( double value, const char *name ) {
- lua_State *L = state->luaState;
+void assignGlobalDouble( double value, const char* name ) {
+ lua_State* L = state->luaState;
lua_pushnumber( L, value );
lua_setfield( L, -2, name );
}
-void assignGlobalColor( Color color, const char *name ) {
- lua_State *L = state->luaState;
+void assignGlobalColor( Color color, const char* name ) {
+ lua_State* L = state->luaState;
uluaPushColor( L, color );
lua_setfield( L, -2, name );
}
-void assingGlobalFunction( const char *name, int ( *functionPtr )( lua_State* ) ) {
- lua_State *L = state->luaState;
+void assingGlobalFunction( const char* name, int ( *functionPtr )( lua_State* ) ) {
+ lua_State* L = state->luaState;
lua_pushcfunction( L, functionPtr );
lua_setfield( L, -2, name );
}
static void defineGlobals() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_newtable( L );
lua_setglobal( L, "RL" );
@@ -960,7 +960,7 @@ static void defineGlobals() {
}
// Custom logging funtion.
-static void logCustom( int logLevel, const char *text, va_list args ) {
+static void logCustom( int logLevel, const char* text, va_list args ) {
char string[ STRING_LEN ] = {'\0'};
char msg[ STRING_LEN ] = {'\0'};
@@ -979,7 +979,7 @@ static void logCustom( int logLevel, const char *text, va_list args ) {
printf( "%s\n", msg );
/* Call Lua log function if exists. */
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
/* Prevent calling lua log function when lua is already shutdown. */
if ( L != NULL ) {
@@ -1004,9 +1004,9 @@ static void logCustom( int logLevel, const char *text, va_list args ) {
}
}
-bool luaInit( int argn, const char **argc ) {
+bool luaInit( int argn, const char** argc ) {
state->luaState = luaL_newstate();
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
luaL_openlibs( L );
@@ -1057,7 +1057,7 @@ bool luaInit( int argn, const char **argc ) {
return true;
}
-int luaTraceback( lua_State *L ) {
+int luaTraceback( lua_State* L ) {
lua_getglobal( L, "debug" );
if ( !lua_istable( L, -1 ) ) {
@@ -1078,7 +1078,7 @@ int luaTraceback( lua_State *L ) {
}
bool luaCallMain() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
char path[ STRING_LEN ] = { '\0' };
@@ -1132,7 +1132,7 @@ void luaCallUpdate() {
#if defined PLATFORM_DESKTOP_SDL && defined LUA_EVENTS
platformSendEvents();
#endif
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop(L);
@@ -1154,7 +1154,7 @@ void luaCallUpdate() {
}
void luaCallDraw() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop(L);
@@ -1175,7 +1175,7 @@ void luaCallDraw() {
}
void luaCallExit() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop(L);
@@ -1193,7 +1193,7 @@ void luaCallExit() {
}
void luaRegister() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_getglobal( L, "RL" );
/* Core. */
@@ -2226,13 +2226,13 @@ void luaRegister() {
/* Lua util functions. */
-bool uluaGetBoolean( lua_State *L, int index ) {
+bool uluaGetBoolean( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TBOOLEAN );
return lua_toboolean( L, index );
}
-Color uluaGetColor( lua_State *L, int index ) {
+Color uluaGetColor( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
Color color = { 0, 0, 0, 255 };
@@ -2280,7 +2280,7 @@ Color uluaGetColor( lua_State *L, int index ) {
return color;
}
-Vector2 uluaGetVector2( lua_State *L, int index ) {
+Vector2 uluaGetVector2( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
Vector2 vector = { 0.0f, 0.0f };
@@ -2316,7 +2316,7 @@ Vector2 uluaGetVector2( lua_State *L, int index ) {
return vector;
}
-Vector3 uluaGetVector3( lua_State *L, int index ) {
+Vector3 uluaGetVector3( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
Vector3 vector = { 0.0f, 0.0f, 0.0f };
@@ -2358,7 +2358,7 @@ Vector3 uluaGetVector3( lua_State *L, int index ) {
return vector;
}
-Vector4 uluaGetVector4( lua_State *L, int index ) {
+Vector4 uluaGetVector4( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
Vector4 vector = { 0.0f, 0.0f, 0.0f, 0.0f };
@@ -2406,7 +2406,7 @@ Vector4 uluaGetVector4( lua_State *L, int index ) {
return vector;
}
-Rectangle uluaGetRectangle( lua_State *L, int index ) {
+Rectangle uluaGetRectangle( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
Rectangle rect = { 0.0f, 0.0f, 0.0f, 0.0f };
@@ -2454,7 +2454,7 @@ Rectangle uluaGetRectangle( lua_State *L, int index ) {
return rect;
}
-Quaternion uluaGetQuaternion( lua_State *L, int index ) {
+Quaternion uluaGetQuaternion( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
Quaternion quaternion = { 0.0f, 0.0f, 0.0f, 0.0f };
@@ -2502,7 +2502,7 @@ Quaternion uluaGetQuaternion( lua_State *L, int index ) {
return quaternion;
}
-Matrix uluaGetMatrix( lua_State *L, int index ) {
+Matrix uluaGetMatrix( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
Matrix matrix = { 0.0f };
float m[4][4];
@@ -2547,7 +2547,7 @@ Matrix uluaGetMatrix( lua_State *L, int index ) {
return matrix;
}
-BoundingBox uluaGetBoundingBox( lua_State *L, int index ) {
+BoundingBox uluaGetBoundingBox( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
BoundingBox box = { .min = { 0.0, 0.0, 0.0 }, .max = { 0.0, 0.0, 0.0 } };
@@ -2583,7 +2583,7 @@ BoundingBox uluaGetBoundingBox( lua_State *L, int index ) {
return box;
}
-Ray uluaGetRay( lua_State *L, int index ) {
+Ray uluaGetRay( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
Ray ray = { .position = { 0.0, 0.0, 0.0 }, .direction = { 0.0, 0.0, 0.0 } };
@@ -2619,7 +2619,7 @@ Ray uluaGetRay( lua_State *L, int index ) {
return ray;
}
-NPatchInfo uluaGetNPatchInfo( lua_State *L, int index ) {
+NPatchInfo uluaGetNPatchInfo( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
NPatchInfo npatch = { .source = { 0.0, 0.0, 0.0, 0.0 }, .left = 0, .top = 0, .right = 0, .bottom = 0, .layout = NPATCH_NINE_PATCH };
@@ -2678,7 +2678,7 @@ NPatchInfo uluaGetNPatchInfo( lua_State *L, int index ) {
return npatch;
}
-BoneInfo uluaGetBoneInfo( lua_State *L, int index ) {
+BoneInfo uluaGetBoneInfo( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
BoneInfo bone = { 0 };
@@ -2715,7 +2715,7 @@ BoneInfo uluaGetBoneInfo( lua_State *L, int index ) {
return bone;
}
-Transform uluaGetTransform( lua_State *L, int index ) {
+Transform uluaGetTransform( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
Transform transform = { 0 };
@@ -2758,126 +2758,126 @@ Transform uluaGetTransform( lua_State *L, int index ) {
return transform;
}
-Buffer* uluaGetBuffer( lua_State *L, int index ) {
+Buffer* uluaGetBuffer( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Buffer*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Buffer" );
}
-Image* uluaGetImage( lua_State *L, int index ) {
+Image* uluaGetImage( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Image*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Image" );
}
-Texture* uluaGetTexture( lua_State *L, int index ) {
+Texture* uluaGetTexture( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Texture*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Texture" );
}
-RenderTexture* uluaGetRenderTexture( lua_State *L, int index ) {
+RenderTexture* uluaGetRenderTexture( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (RenderTexture*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "RenderTexture" );
}
-Shader* uluaGetShader( lua_State *L, int index ) {
+Shader* uluaGetShader( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Shader*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Shader" );
}
-Mesh* uluaGetMesh( lua_State *L, int index ) {
+Mesh* uluaGetMesh( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Mesh*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Mesh" );
}
-Camera2D* uluaGetCamera2D( lua_State *L, int index ) {
+Camera2D* uluaGetCamera2D( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Camera2D*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Camera2D" );
}
-Camera3D* uluaGetCamera3D( lua_State *L, int index ) {
+Camera3D* uluaGetCamera3D( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Camera3D*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Camera3D" );
}
-Font* uluaGetFont( lua_State *L, int index ) {
+Font* uluaGetFont( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Font*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Font" );
}
-GlyphInfo* uluaGetGlyphInfo( lua_State *L, int index ) {
+GlyphInfo* uluaGetGlyphInfo( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (GlyphInfo*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "GlyphInfo" );
}
-Wave* uluaGetWave( lua_State *L, int index ) {
+Wave* uluaGetWave( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Wave*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Wave" );
}
-Sound* uluaGetSound( lua_State *L, int index ) {
+Sound* uluaGetSound( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Sound*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Sound" );
}
-Music* uluaGetMusic( lua_State *L, int index ) {
+Music* uluaGetMusic( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Music*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Music" );
}
-Light* uluaGetLight( lua_State *L, int index ) {
+Light* uluaGetLight( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Light*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Light" );
}
-Material* uluaGetMaterial( lua_State *L, int index ) {
+Material* uluaGetMaterial( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Material*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Material" );
}
-Model* uluaGetModel( lua_State *L, int index ) {
+Model* uluaGetModel( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (Model*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "Model" );
}
-ModelAnimation* uluaGetModelAnimation( lua_State *L, int index ) {
+ModelAnimation* uluaGetModelAnimation( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (ModelAnimation*)lua_touserdata( L, index );
}
return luaL_checkudata( L, index, "ModelAnimation" );
}
-rlRenderBatch* uluaGetRLRenderBatch( lua_State *L, int index ) {
+rlRenderBatch* uluaGetRLRenderBatch( lua_State* L, int index ) {
if ( lua_islightuserdata( L, index ) ) {
return (rlRenderBatch*)lua_touserdata( L, index );
}
@@ -2886,7 +2886,7 @@ rlRenderBatch* uluaGetRLRenderBatch( lua_State *L, int index ) {
/* Push types. */
-void uluaPushColor( lua_State *L, Color color ) {
+void uluaPushColor( lua_State* L, Color color ) {
lua_createtable( L, 3, 0 );
lua_pushnumber( L, color.r );
lua_rawseti( L, -2, 1 );
@@ -2898,7 +2898,7 @@ void uluaPushColor( lua_State *L, Color color ) {
lua_rawseti( L, -2, 4 );
}
-void uluaPushVector2( lua_State *L, Vector2 vector ) {
+void uluaPushVector2( lua_State* L, Vector2 vector ) {
lua_createtable( L, 2, 0 );
lua_pushnumber( L, vector.x );
lua_rawseti( L, -2, 1 );
@@ -2906,7 +2906,7 @@ void uluaPushVector2( lua_State *L, Vector2 vector ) {
lua_rawseti( L, -2, 2 );
}
-void uluaPushVector3( lua_State *L, Vector3 vector ) {
+void uluaPushVector3( lua_State* L, Vector3 vector ) {
lua_createtable( L, 3, 0 );
lua_pushnumber( L, vector.x );
lua_rawseti( L, -2, 1 );
@@ -2916,7 +2916,7 @@ void uluaPushVector3( lua_State *L, Vector3 vector ) {
lua_rawseti( L, -2, 3 );
}
-void uluaPushVector4( lua_State *L, Vector4 vector ) {
+void uluaPushVector4( lua_State* L, Vector4 vector ) {
lua_createtable( L, 4, 0 );
lua_pushnumber( L, vector.x );
lua_rawseti( L, -2, 1 );
@@ -2928,7 +2928,7 @@ void uluaPushVector4( lua_State *L, Vector4 vector ) {
lua_rawseti( L, -2, 4 );
}
-void uluaPushRectangle( lua_State *L, Rectangle rect ) {
+void uluaPushRectangle( lua_State* L, Rectangle rect ) {
lua_createtable( L, 4, 0 );
lua_pushnumber( L, rect.x );
lua_rawseti( L, -2, 1 );
@@ -2940,7 +2940,7 @@ void uluaPushRectangle( lua_State *L, Rectangle rect ) {
lua_rawseti( L, -2, 4 );
}
-void uluaPushQuaternion( lua_State *L, Quaternion quaternion ) {
+void uluaPushQuaternion( lua_State* L, Quaternion quaternion ) {
lua_createtable( L, 4, 0 );
lua_pushnumber( L, quaternion.x );
lua_rawseti( L, -2, 1 );
@@ -2952,7 +2952,7 @@ void uluaPushQuaternion( lua_State *L, Quaternion quaternion ) {
lua_rawseti( L, -2, 4 );
}
-void uluaPushMatrix( lua_State *L, Matrix matrix ) {
+void uluaPushMatrix( lua_State* L, Matrix matrix ) {
lua_createtable( L, 4, 0 );
lua_createtable( L, 4, 0 );
@@ -3000,7 +3000,7 @@ void uluaPushMatrix( lua_State *L, Matrix matrix ) {
lua_rawseti( L, -2, 4 );
}
-void uluaPushRay( lua_State *L, Ray ray ) {
+void uluaPushRay( lua_State* L, Ray ray ) {
lua_createtable( L, 2, 0 );
lua_createtable( L, 3, 0 );
@@ -3022,7 +3022,7 @@ void uluaPushRay( lua_State *L, Ray ray ) {
lua_rawseti( L, -2, 2 );
}
-void uluaPushRayCollision( lua_State *L, RayCollision rayCol ) {
+void uluaPushRayCollision( lua_State* L, RayCollision rayCol ) {
lua_createtable( L, 4, 0 );
lua_pushboolean( L, rayCol.hit );
lua_setfield( L, -2, "hit" );
@@ -3034,7 +3034,7 @@ void uluaPushRayCollision( lua_State *L, RayCollision rayCol ) {
lua_setfield( L, -2, "normal" );
}
-void uluaPushBoundingBox( lua_State *L, BoundingBox box ) {
+void uluaPushBoundingBox( lua_State* L, BoundingBox box ) {
lua_createtable( L, 2, 0 );
lua_createtable( L, 3, 0 );
@@ -3056,7 +3056,7 @@ void uluaPushBoundingBox( lua_State *L, BoundingBox box ) {
lua_rawseti( L, -2, 2 );
}
-void uluaPushBoneInfo( lua_State *L, BoneInfo boneInfo ) {
+void uluaPushBoneInfo( lua_State* L, BoneInfo boneInfo ) {
lua_createtable( L, 2, 0 );
lua_pushstring( L, boneInfo.name );
lua_setfield( L, -2, "name" );
@@ -3064,7 +3064,7 @@ void uluaPushBoneInfo( lua_State *L, BoneInfo boneInfo ) {
lua_setfield( L, -2, "parent" );
}
-void uluaPushTransform( lua_State *L, Transform transform ) {
+void uluaPushTransform( lua_State* L, Transform transform ) {
lua_createtable( L, 3, 0 );
uluaPushVector3( L, transform.translation );
lua_setfield( L, -2, "name" );
@@ -3074,118 +3074,118 @@ void uluaPushTransform( lua_State *L, Transform transform ) {
lua_setfield( L, -2, "scale" );
}
-void uluaPushBuffer( lua_State *L, Buffer buffer ) {
+void uluaPushBuffer( lua_State* L, Buffer buffer ) {
if ( buffer.size == 0 ) {
buffer.data = NULL;
}
- Buffer *bufferP = lua_newuserdata( L, sizeof( Buffer ) );
+ Buffer* bufferP = lua_newuserdata( L, sizeof( Buffer ) );
*bufferP = buffer;
luaL_setmetatable( L, "Buffer" );
}
-void uluaPushImage( lua_State *L, Image image ) {
- Image *imageP = lua_newuserdata( L, sizeof( Image ) );
+void uluaPushImage( lua_State* L, Image image ) {
+ Image* imageP = lua_newuserdata( L, sizeof( Image ) );
*imageP = image;
luaL_setmetatable( L, "Image" );
}
-void uluaPushTexture( lua_State *L, Texture texture ) {
- Texture *textureP = lua_newuserdata( L, sizeof( Texture ) );
+void uluaPushTexture( lua_State* L, Texture texture ) {
+ Texture* textureP = lua_newuserdata( L, sizeof( Texture ) );
*textureP = texture;
luaL_setmetatable( L, "Texture" );
}
-void uluaPushRenderTexture( lua_State *L, RenderTexture renderTexture ) {
- RenderTexture *renderTextureP = lua_newuserdata( L, sizeof( RenderTexture ) );
+void uluaPushRenderTexture( lua_State* L, RenderTexture renderTexture ) {
+ RenderTexture* renderTextureP = lua_newuserdata( L, sizeof( RenderTexture ) );
*renderTextureP = renderTexture;
luaL_setmetatable( L, "RenderTexture" );
}
-void uluaPushCamera2D( lua_State *L, Camera2D camera ) {
- Camera2D *cameraP = lua_newuserdata( L, sizeof( Camera2D ) );
+void uluaPushCamera2D( lua_State* L, Camera2D camera ) {
+ Camera2D* cameraP = lua_newuserdata( L, sizeof( Camera2D ) );
*cameraP = camera;
luaL_setmetatable( L, "Camera2D" );
}
-void uluaPushCamera3D( lua_State *L, Camera3D camera ) {
- Camera3D *cameraP = lua_newuserdata( L, sizeof( Camera3D ) );
+void uluaPushCamera3D( lua_State* L, Camera3D camera ) {
+ Camera3D* cameraP = lua_newuserdata( L, sizeof( Camera3D ) );
*cameraP = camera;
luaL_setmetatable( L, "Camera3D" );
}
-void uluaPushShader( lua_State *L, Shader shader ) {
- Shader *shaderP = lua_newuserdata( L, sizeof( Shader ) );
+void uluaPushShader( lua_State* L, Shader shader ) {
+ Shader* shaderP = lua_newuserdata( L, sizeof( Shader ) );
*shaderP = shader;
luaL_setmetatable( L, "Shader" );
}
-void uluaPushFont( lua_State *L, Font font ) {
- Font *fontP = lua_newuserdata( L, sizeof( Font ) );
+void uluaPushFont( lua_State* L, Font font ) {
+ Font* fontP = lua_newuserdata( L, sizeof( Font ) );
*fontP = font;
luaL_setmetatable( L, "Font" );
}
-void uluaPushGlyphInfo( lua_State *L, GlyphInfo glyph ) {
- GlyphInfo *glyphP = lua_newuserdata( L, sizeof( GlyphInfo ) );
+void uluaPushGlyphInfo( lua_State* L, GlyphInfo glyph ) {
+ GlyphInfo* glyphP = lua_newuserdata( L, sizeof( GlyphInfo ) );
*glyphP = glyph;
luaL_setmetatable( L, "GlyphInfo" );
}
-void uluaPushWave( lua_State *L, Wave wave ) {
- Wave *waveP = lua_newuserdata( L, sizeof( Wave ) );
+void uluaPushWave( lua_State* L, Wave wave ) {
+ Wave* waveP = lua_newuserdata( L, sizeof( Wave ) );
*waveP = wave;
luaL_setmetatable( L, "Wave" );
}
-void uluaPushSound( lua_State *L, Sound sound ) {
- Sound *soundP = lua_newuserdata( L, sizeof( Sound ) );
+void uluaPushSound( lua_State* L, Sound sound ) {
+ Sound* soundP = lua_newuserdata( L, sizeof( Sound ) );
*soundP = sound;
luaL_setmetatable( L, "Sound" );
}
-void uluaPushMusic( lua_State *L, Music music ) {
- Music *musicP = lua_newuserdata( L, sizeof( Music ) );
+void uluaPushMusic( lua_State* L, Music music ) {
+ Music* musicP = lua_newuserdata( L, sizeof( Music ) );
*musicP = music;
luaL_setmetatable( L, "Music" );
}
-void uluaPushLight( lua_State *L, Light light ) {
- Light *lightP = lua_newuserdata( L, sizeof( Light ) );
+void uluaPushLight( lua_State* L, Light light ) {
+ Light* lightP = lua_newuserdata( L, sizeof( Light ) );
*lightP = light;
luaL_setmetatable( L, "Light" );
}
-void uluaPushMaterial( lua_State *L, Material material ) {
- Material *materialP = lua_newuserdata( L, sizeof( Material ) );
+void uluaPushMaterial( lua_State* L, Material material ) {
+ Material* materialP = lua_newuserdata( L, sizeof( Material ) );
*materialP = material;
luaL_setmetatable( L, "Material" );
}
-void uluaPushMesh( lua_State *L, Mesh mesh ) {
- Mesh *meshP = lua_newuserdata( L, sizeof( Mesh ) );
+void uluaPushMesh( lua_State* L, Mesh mesh ) {
+ Mesh* meshP = lua_newuserdata( L, sizeof( Mesh ) );
*meshP = mesh;
luaL_setmetatable( L, "Mesh" );
}
-void uluaPushModel( lua_State *L, Model model ) {
- Model *modelP = lua_newuserdata( L, sizeof( Model ) );
+void uluaPushModel( lua_State* L, Model model ) {
+ Model* modelP = lua_newuserdata( L, sizeof( Model ) );
*modelP = model;
luaL_setmetatable( L, "Model" );
}
-void uluaPushModelAnimation( lua_State *L, ModelAnimation modelAnimation ) {
- ModelAnimation *modelAnimationP = lua_newuserdata( L, sizeof( ModelAnimation ) );
+void uluaPushModelAnimation( lua_State* L, ModelAnimation modelAnimation ) {
+ ModelAnimation* modelAnimationP = lua_newuserdata( L, sizeof( ModelAnimation ) );
*modelAnimationP = modelAnimation;
luaL_setmetatable( L, "ModelAnimation" );
}
-void uluaPushRLRenderBatch( lua_State *L, rlRenderBatch renderBatch ) {
- rlRenderBatch *renderBatchP = lua_newuserdata( L, sizeof( rlRenderBatch ) );
+void uluaPushRLRenderBatch( lua_State* L, rlRenderBatch renderBatch ) {
+ rlRenderBatch* renderBatchP = lua_newuserdata( L, sizeof( rlRenderBatch ) );
*renderBatchP = renderBatch;
luaL_setmetatable( L, "rlRenderBatch" );
}
-int uluaGetTableLen( lua_State *L, int index ) {
+int uluaGetTableLen( lua_State* L, int index ) {
luaL_checktype( L, index, LUA_TTABLE );
int t = index, i = 0;
lua_pushnil( L );
diff --git a/src/main.c b/src/main.c
index 3557bc5..1dcac9c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -19,7 +19,7 @@ inline static void printVersion() {
#endif
}
-int main( int argn, const char **argc ) {
+int main( int argn, const char** argc ) {
char exePath[ STRING_LEN ] = { '\0' };
bool interpret_mode = false;
@@ -50,7 +50,7 @@ int main( int argn, const char **argc ) {
if ( interpret_mode ) {
stateInitInterpret( argn, argc );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
diff --git a/src/models.c b/src/models.c
index 84e0b1a..2133632 100644
--- a/src/models.c
+++ b/src/models.c
@@ -6,7 +6,7 @@
#include "textures.h"
#include "core.h"
-void unloadMaterial( Material *material ) {
+void unloadMaterial( Material* material ) {
free( material->maps );
}
@@ -115,7 +115,7 @@ void DrawBillboardRecNoRatio( Camera camera, Texture2D texture, Rectangle source
Draw a line in 3D world space
*/
-int lmodelsDrawLine3D( lua_State *L ) {
+int lmodelsDrawLine3D( lua_State* L ) {
Vector3 startPos = uluaGetVector3( L, 1 );
Vector3 endPos = uluaGetVector3( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -130,7 +130,7 @@ int lmodelsDrawLine3D( lua_State *L ) {
Draw a point in 3D space, actually a small line
*/
-int lmodelsDrawPoint3D( lua_State *L ) {
+int lmodelsDrawPoint3D( lua_State* L ) {
Vector3 position = uluaGetVector3( L, 1 );
Color color = uluaGetColor( L, 2 );
@@ -144,7 +144,7 @@ int lmodelsDrawPoint3D( lua_State *L ) {
Draw a circle in 3D world space
*/
-int lmodelsDrawCircle3D( lua_State *L ) {
+int lmodelsDrawCircle3D( lua_State* L ) {
Vector3 center = uluaGetVector3( L, 1 );
float radius = luaL_checknumber( L, 2 );
Vector3 rotationAxis = uluaGetVector3( L, 3 );
@@ -161,7 +161,7 @@ int lmodelsDrawCircle3D( lua_State *L ) {
Draw a color-filled triangle (Vertex in counter-clockwise order!)
*/
-int lmodelsDrawTriangle3D( lua_State *L ) {
+int lmodelsDrawTriangle3D( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
Vector3 v3 = uluaGetVector3( L, 3 );
@@ -177,7 +177,7 @@ int lmodelsDrawTriangle3D( lua_State *L ) {
Draw cube
*/
-int lmodelsDrawCube( lua_State *L ) {
+int lmodelsDrawCube( lua_State* L ) {
Vector3 pos = uluaGetVector3( L, 1 );
Vector3 size = uluaGetVector3( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -192,7 +192,7 @@ int lmodelsDrawCube( lua_State *L ) {
Draw cube wires
*/
-int lmodelsDrawCubeWires( lua_State *L ) {
+int lmodelsDrawCubeWires( lua_State* L ) {
Vector3 pos = uluaGetVector3( L, 1 );
Vector3 size = uluaGetVector3( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -207,7 +207,7 @@ int lmodelsDrawCubeWires( lua_State *L ) {
Draw sphere
*/
-int lmodelsDrawSphere( lua_State *L ) {
+int lmodelsDrawSphere( lua_State* L ) {
Vector3 centerPos = uluaGetVector3( L, 1 );
float radius = luaL_checknumber( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -222,7 +222,7 @@ int lmodelsDrawSphere( lua_State *L ) {
Draw sphere with extended parameters
*/
-int lmodelsDrawSphereEx( lua_State *L ) {
+int lmodelsDrawSphereEx( lua_State* L ) {
Vector3 centerPos = uluaGetVector3( L, 1 );
float radius = luaL_checknumber( L, 2 );
int rings = luaL_checkinteger( L, 3 );
@@ -239,7 +239,7 @@ int lmodelsDrawSphereEx( lua_State *L ) {
Draw sphere wires
*/
-int lmodelsDrawSphereWires( lua_State *L ) {
+int lmodelsDrawSphereWires( lua_State* L ) {
Vector3 centerPos = uluaGetVector3( L, 1 );
float radius = luaL_checknumber( L, 2 );
int rings = luaL_checkinteger( L, 3 );
@@ -256,7 +256,7 @@ int lmodelsDrawSphereWires( lua_State *L ) {
Draw a cylinder/cone
*/
-int lmodelsDrawCylinder( lua_State *L ) {
+int lmodelsDrawCylinder( lua_State* L ) {
Vector3 position = uluaGetVector3( L, 1 );
float radiusTop = luaL_checknumber( L, 2 );
float radiusBottom = luaL_checknumber( L, 3 );
@@ -274,7 +274,7 @@ int lmodelsDrawCylinder( lua_State *L ) {
Draw a cylinder with base at startPos and top at endPos
*/
-int lmodelsDrawCylinderEx( lua_State *L ) {
+int lmodelsDrawCylinderEx( lua_State* L ) {
Vector3 startPos = uluaGetVector3( L, 1 );
Vector3 endPos = uluaGetVector3( L, 2 );
float startRadius = luaL_checknumber( L, 3 );
@@ -292,7 +292,7 @@ int lmodelsDrawCylinderEx( lua_State *L ) {
Draw a cylinder/cone wires
*/
-int lmodelsDrawCylinderWires( lua_State *L ) {
+int lmodelsDrawCylinderWires( lua_State* L ) {
Vector3 position = uluaGetVector3( L, 1 );
float radiusTop = luaL_checknumber( L, 2 );
float radiusBottom = luaL_checknumber( L, 3 );
@@ -310,7 +310,7 @@ int lmodelsDrawCylinderWires( lua_State *L ) {
Draw a cylinder wires with base at startPos and top at endPos
*/
-int lmodelsDrawCylinderWiresEx( lua_State *L ) {
+int lmodelsDrawCylinderWiresEx( lua_State* L ) {
Vector3 startPos = uluaGetVector3( L, 1 );
Vector3 endPos = uluaGetVector3( L, 2 );
float startRadius = luaL_checknumber( L, 3 );
@@ -328,7 +328,7 @@ int lmodelsDrawCylinderWiresEx( lua_State *L ) {
Draw a capsule with the center of its sphere caps at startPos and endPos
*/
-int lmodelsDrawCapsule( lua_State *L ) {
+int lmodelsDrawCapsule( lua_State* L ) {
Vector3 startPos = uluaGetVector3( L, 1 );
Vector3 endPos = uluaGetVector3( L, 2 );
float radius = luaL_checknumber( L, 3 );
@@ -346,7 +346,7 @@ int lmodelsDrawCapsule( lua_State *L ) {
Draw capsule wireframe with the center of its sphere caps at startPos and endPos
*/
-int lmodelsDrawCapsuleWires( lua_State *L ) {
+int lmodelsDrawCapsuleWires( lua_State* L ) {
Vector3 startPos = uluaGetVector3( L, 1 );
Vector3 endPos = uluaGetVector3( L, 2 );
float radius = luaL_checknumber( L, 3 );
@@ -364,7 +364,7 @@ int lmodelsDrawCapsuleWires( lua_State *L ) {
Draw a plane XZ
*/
-int lmodelsDrawPlane( lua_State *L ) {
+int lmodelsDrawPlane( lua_State* L ) {
Vector3 centerPos = uluaGetVector3( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -379,8 +379,8 @@ int lmodelsDrawPlane( lua_State *L ) {
Draw 3D textured quad. (Texture coordinates opengl style 0.0 - 1.0)
*/
-int lmodelDrawQuad3DTexture( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int lmodelDrawQuad3DTexture( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
/* Vertices. */
Vector3 vertices[4] = { 0 };
@@ -447,7 +447,7 @@ int lmodelDrawQuad3DTexture( lua_State *L ) {
Draw a ray line
*/
-int lmodelsDrawRay( lua_State *L ) {
+int lmodelsDrawRay( lua_State* L ) {
Ray ray = uluaGetRay( L, 1 );
Color color = uluaGetColor( L, 2 );
@@ -461,7 +461,7 @@ int lmodelsDrawRay( lua_State *L ) {
Draw a grid (Centered at ( 0, 0, 0 ))
*/
-int lmodelsDrawGrid( lua_State *L ) {
+int lmodelsDrawGrid( lua_State* L ) {
int slices = luaL_checkinteger( L, 1 );
float spacing = luaL_checknumber( L, 2 );
@@ -482,7 +482,7 @@ Load model from files (Meshes and materials)
- Failure return nil
- Success return Model
*/
-int lmodelsLoadModel( lua_State *L ) {
+int lmodelsLoadModel( lua_State* L ) {
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
uluaPushModel( L, LoadModel( lua_tostring( L, 1 ) ) );
@@ -501,8 +501,8 @@ Load model from generated mesh (Default material)
- Success return Model
*/
-int lmodelsLoadModelFromMesh( lua_State *L ) {
- Mesh *mesh = uluaGetMesh( L, 1 );
+int lmodelsLoadModelFromMesh( lua_State* L ) {
+ Mesh* mesh = uluaGetMesh( L, 1 );
uluaPushModel( L, LoadModelFromMesh( *mesh ) );
@@ -516,8 +516,8 @@ Check if a model is ready
- Success return bool
*/
-int lmodelsIsModelReady( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsIsModelReady( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
lua_pushboolean( L, IsModelReady( *model ) );
@@ -529,8 +529,8 @@ int lmodelsIsModelReady( lua_State *L ) {
Unload model (including meshes) from memory (RAM and/or VRAM)
*/
-int lmodelsUnloadModel( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsUnloadModel( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
UnloadModel( *model );
@@ -544,8 +544,8 @@ Compute model bounding box limits (considers all meshes)
- Success return BoundingBox
*/
-int lmodelsGetModelBoundingBox( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsGetModelBoundingBox( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
uluaPushBoundingBox( L, GetModelBoundingBox( *model ) );
@@ -557,8 +557,8 @@ int lmodelsGetModelBoundingBox( lua_State *L ) {
Set model transform matrix
*/
-int lmodelsSetModelTransform( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsSetModelTransform( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
Matrix transform = uluaGetMatrix( L, 2 );
model->transform = transform;
@@ -574,10 +574,10 @@ Set model mesh.
- Failure return false
- Success return true
*/
-int lmodelsSetModelMesh( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsSetModelMesh( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
int meshId = luaL_checkinteger( L, 2 );
- Mesh *mesh = uluaGetMesh( L, 3 );
+ Mesh* mesh = uluaGetMesh( L, 3 );
if ( 0 <= meshId && meshId < model->meshCount ) {
model->meshes[ meshId ] = *mesh;
@@ -598,10 +598,10 @@ Set material to model material
- Failure return false
- Success return true
*/
-int lmodelsSetModelMaterial( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsSetModelMaterial( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
int materialId = luaL_checkinteger( L, 2 );
- Material *material = uluaGetMaterial( L, 3 );
+ Material* material = uluaGetMaterial( L, 3 );
if ( 0 <= materialId && materialId < model->materialCount ) {
model->materials[ materialId ] = *material;
@@ -619,8 +619,8 @@ int lmodelsSetModelMaterial( lua_State *L ) {
Set material for a mesh (Mesh and material on this model)
*/
-int lmodelsSetModelMeshMaterial( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsSetModelMeshMaterial( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
int meshId = luaL_checkinteger( L, 2 );
int materialId = luaL_checkinteger( L, 3 );
@@ -643,8 +643,8 @@ Set model bone information (skeleton)
- Failure return false
- Success return true
*/
-int lmodelsSetModelBone( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsSetModelBone( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
int boneId = luaL_checkinteger( L, 2 );
BoneInfo bone = uluaGetBoneInfo( L, 3 );
@@ -667,8 +667,8 @@ Set model bones base transformation (pose)
- Failure return false
- Success return true
*/
-int lmodelsSetModelBindPose( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsSetModelBindPose( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
int boneId = luaL_checkinteger( L, 2 );
Transform pose = uluaGetTransform( L, 3 );
@@ -690,8 +690,8 @@ Get model transform matrix
- Success return Matrix
*/
-int lmodelsGetModelTransform( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsGetModelTransform( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
uluaPushMatrix( L, model->transform );
@@ -705,8 +705,8 @@ Get model number of meshes
- Success return int
*/
-int lmodelsGetModelMeshCount( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsGetModelMeshCount( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
lua_pushinteger( L, model->meshCount );
@@ -720,8 +720,8 @@ Get model number of materials
- Success return int
*/
-int lmodelsGetModelMaterialCount( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsGetModelMaterialCount( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
lua_pushinteger( L, model->materialCount );
@@ -736,8 +736,8 @@ Get model mesh. Return as lightuserdata
- Failure return nil
- Success return Mesh
*/
-int lmodelsGetModelMesh( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsGetModelMesh( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
int meshId = luaL_checkinteger( L, 2 );
if ( 0 <= meshId && meshId < model->meshCount ) {
@@ -758,8 +758,8 @@ Get model material. Return as lightuserdata
- Failure return nil
- Success return Material
*/
-int lmodelsGetModelMaterial( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsGetModelMaterial( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
int materialId = luaL_checkinteger( L, 2 );
if ( 0 <= materialId && materialId < model->materialCount ) {
@@ -779,8 +779,8 @@ Get model number of bones
- Success return int
*/
-int lmodelsGetModelBoneCount( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsGetModelBoneCount( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
lua_pushinteger( L, model->boneCount );
@@ -795,8 +795,8 @@ Get model bones information (skeleton)
- Failure return nil
- Success return BoneInfo
*/
-int lmodelsGetModelBone( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsGetModelBone( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
int boneId = luaL_checkinteger( L, 2 );
if ( 0 <= boneId && boneId < model->boneCount ) {
@@ -817,8 +817,8 @@ Get models bones base transformation (pose)
- Failure return nil
- Success return Transform
*/
-int lmodelsGetModelBindPose( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsGetModelBindPose( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
int boneId = luaL_checkinteger( L, 2 );
if ( 0 <= boneId && boneId < model->boneCount ) {
@@ -840,8 +840,8 @@ int lmodelsGetModelBindPose( lua_State *L ) {
Draw a model (With texture if set)
*/
-int lmodelsDrawModel( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsDrawModel( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
Vector3 position = uluaGetVector3( L, 2 );
float scale = luaL_checknumber( L, 3 );
Color tint = uluaGetColor( L, 4 );
@@ -856,8 +856,8 @@ int lmodelsDrawModel( lua_State *L ) {
Draw a model with extended parameters
*/
-int lmodelsDrawModelEx( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsDrawModelEx( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
Vector3 position = uluaGetVector3( L, 2 );
Vector3 rotationAxis = uluaGetVector3( L, 3 );
float rotationAngle = luaL_checknumber( L, 4 );
@@ -874,8 +874,8 @@ int lmodelsDrawModelEx( lua_State *L ) {
Draw a model wires (with texture if set)
*/
-int lmodelsDrawModelWires( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsDrawModelWires( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
Vector3 position = uluaGetVector3( L, 2 );
float scale = luaL_checknumber( L, 3 );
Color tint = uluaGetColor( L, 4 );
@@ -890,8 +890,8 @@ int lmodelsDrawModelWires( lua_State *L ) {
Draw a model wires (with texture if set) with extended parameters
*/
-int lmodelsDrawModelWiresEx( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
+int lmodelsDrawModelWiresEx( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
Vector3 position = uluaGetVector3( L, 2 );
Vector3 rotationAxis = uluaGetVector3( L, 3 );
float rotationAngle = luaL_checknumber( L, 4 );
@@ -908,7 +908,7 @@ int lmodelsDrawModelWiresEx( lua_State *L ) {
Draw bounding box (wires)
*/
-int lmodelsDrawBoundingBox( lua_State *L ) {
+int lmodelsDrawBoundingBox( lua_State* L ) {
BoundingBox box = uluaGetBoundingBox( L, 1 );
Color color = uluaGetColor( L, 2 );
@@ -922,9 +922,9 @@ int lmodelsDrawBoundingBox( lua_State *L ) {
Draw a billboard texture
*/
-int lmodelsDrawBillboard( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
- Texture *texture = uluaGetTexture( L, 2 );
+int lmodelsDrawBillboard( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
+ Texture* texture = uluaGetTexture( L, 2 );
Vector3 position = uluaGetVector3( L, 3 );
float size = luaL_checknumber( L, 4 );
Color tint = uluaGetColor( L, 5 );
@@ -939,9 +939,9 @@ int lmodelsDrawBillboard( lua_State *L ) {
Draw a billboard texture defined by source
*/
-int lmodelsDrawBillboardRec( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
- Texture *texture = uluaGetTexture( L, 2 );
+int lmodelsDrawBillboardRec( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
+ Texture* texture = uluaGetTexture( L, 2 );
Rectangle source = uluaGetRectangle( L, 3 );
Vector3 position = uluaGetVector3( L, 4 );
Vector2 size = uluaGetVector2( L, 5 );
@@ -957,9 +957,9 @@ int lmodelsDrawBillboardRec( lua_State *L ) {
Draw a billboard texture defined by source and rotation
*/
-int lmodelsDrawBillboardPro( lua_State *L ) {
- Camera3D *camera = uluaGetCamera3D( L, 1 );
- Texture *texture = uluaGetTexture( L, 2 );
+int lmodelsDrawBillboardPro( lua_State* L ) {
+ Camera3D* camera = uluaGetCamera3D( L, 1 );
+ Texture* texture = uluaGetTexture( L, 2 );
Rectangle source = uluaGetRectangle( L, 3 );
Vector3 position = uluaGetVector3( L, 4 );
Vector3 up = uluaGetVector3( L, 5 );
@@ -983,8 +983,8 @@ int lmodelsDrawBillboardPro( lua_State *L ) {
Update mesh vertex data in GPU.
NOTE: Mainly intented to be used with custom meshes.
*/
-int lmodelsUpdateMesh( lua_State *L ) {
- Mesh *mesh = uluaGetMesh( L, 1 );
+int lmodelsUpdateMesh( lua_State* L ) {
+ Mesh* mesh = uluaGetMesh( L, 1 );
luaL_checktype( L, 2, LUA_TTABLE );
int t = 2;
@@ -1107,8 +1107,8 @@ int lmodelsUpdateMesh( lua_State *L ) {
Unload mesh data from CPU and GPU
*/
-int lmodelsUnloadMesh( lua_State *L ) {
- Mesh *mesh = uluaGetMesh( L, 1 );
+int lmodelsUnloadMesh( lua_State* L ) {
+ Mesh* mesh = uluaGetMesh( L, 1 );
UnloadMesh( *mesh );
@@ -1120,9 +1120,9 @@ int lmodelsUnloadMesh( lua_State *L ) {
Draw a 3d mesh with material and transform
*/
-int lmodelsDrawMesh( lua_State *L ) {
- Mesh *mesh = uluaGetMesh( L, 1 );
- Material *material = uluaGetMaterial( L, 2 );
+int lmodelsDrawMesh( lua_State* L ) {
+ Mesh* mesh = uluaGetMesh( L, 1 );
+ Material* material = uluaGetMaterial( L, 2 );
Matrix matrix = uluaGetMatrix( L, 3 );
DrawMesh( *mesh, *material, matrix );
@@ -1135,9 +1135,9 @@ int lmodelsDrawMesh( lua_State *L ) {
Draw multiple mesh instances with material and different transforms
*/
-int lmodelsDrawMeshInstanced( lua_State *L ) {
- Mesh *mesh = uluaGetMesh( L, 1 );
- Material *material = uluaGetMaterial( L, 2 );
+int lmodelsDrawMeshInstanced( lua_State* L ) {
+ Mesh* mesh = uluaGetMesh( L, 1 );
+ Material* material = uluaGetMaterial( L, 2 );
luaL_checktype( L, 3, LUA_TTABLE );
int instances = luaL_checkinteger( L, 4 );
@@ -1167,8 +1167,8 @@ NOTE: Currently only works on custom mesh
- Failure return false
- Success return true
*/
-int lmodelsSetMeshColor( lua_State *L ) {
- Mesh *mesh = uluaGetMesh( L, 1 );
+int lmodelsSetMeshColor( lua_State* L ) {
+ Mesh* mesh = uluaGetMesh( L, 1 );
Color color = uluaGetColor( L, 2 );
if ( mesh->colors == NULL ) {
@@ -1198,8 +1198,8 @@ Export mesh data to file, returns true on success
- Success return bool
*/
-int lmodelsExportMesh( lua_State *L ) {
- Mesh *mesh = uluaGetMesh( L, 1 );
+int lmodelsExportMesh( lua_State* L ) {
+ Mesh* mesh = uluaGetMesh( L, 1 );
lua_pushboolean( L, ExportMesh( *mesh, luaL_checkstring( L, 2 ) ) );
@@ -1213,8 +1213,8 @@ Compute mesh bounding box limits
- Success return BoundingBox
*/
-int lmodelsGetMeshBoundingBox( lua_State *L ) {
- Mesh *mesh = uluaGetMesh( L, 1 );
+int lmodelsGetMeshBoundingBox( lua_State* L ) {
+ Mesh* mesh = uluaGetMesh( L, 1 );
uluaPushBoundingBox( L, GetMeshBoundingBox( *mesh ) );
@@ -1226,8 +1226,8 @@ int lmodelsGetMeshBoundingBox( lua_State *L ) {
Compute mesh tangents
*/
-int lmodelsGenMeshTangents( lua_State *L ) {
- Mesh *mesh = uluaGetMesh( L, 1 );
+int lmodelsGenMeshTangents( lua_State* L ) {
+ Mesh* mesh = uluaGetMesh( L, 1 );
GenMeshTangents( mesh );
@@ -1245,7 +1245,7 @@ Generate polygonal mesh
- Success return Mesh
*/
-int lmodelsGenMeshPoly( lua_State *L ) {
+int lmodelsGenMeshPoly( lua_State* L ) {
int sides = luaL_checkinteger( L, 1 );
float radius = luaL_checknumber( L, 2 );
@@ -1261,7 +1261,7 @@ Generate plane mesh (With subdivisions)
- Success return Mesh
*/
-int lmodelsGenMeshPlane( lua_State *L ) {
+int lmodelsGenMeshPlane( lua_State* L ) {
float width = luaL_checknumber( L, 1 );
float length = luaL_checknumber( L, 2 );
int resX = luaL_checkinteger( L, 3 );
@@ -1279,7 +1279,7 @@ Generate cuboid mesh
- Success return Mesh
*/
-int lmodelsGenMeshCube( lua_State *L ) {
+int lmodelsGenMeshCube( lua_State* L ) {
Vector3 size = uluaGetVector3( L, 1 );
uluaPushMesh( L, GenMeshCube( size.x, size.y, size.z ) );
@@ -1294,7 +1294,7 @@ Generate sphere mesh (Standard sphere)
- Success return Mesh
*/
-int lmodelsGenMeshSphere( lua_State *L ) {
+int lmodelsGenMeshSphere( lua_State* L ) {
float radius = luaL_checknumber( L, 1 );
int rings = luaL_checkinteger( L, 2 );
int slices = luaL_checkinteger( L, 3 );
@@ -1311,7 +1311,7 @@ Generate cylinder mesh
- Success return Mesh
*/
-int lmodelsGenMeshCylinder( lua_State *L ) {
+int lmodelsGenMeshCylinder( lua_State* L ) {
float radius = luaL_checknumber( L, 1 );
float height = luaL_checknumber( L, 2 );
int slices = luaL_checkinteger( L, 3 );
@@ -1328,7 +1328,7 @@ Generate cone/pyramid mesh
- Success return Mesh
*/
-int lmodelsGenMeshCone( lua_State *L ) {
+int lmodelsGenMeshCone( lua_State* L ) {
float radius = luaL_checknumber( L, 1 );
float height = luaL_checknumber( L, 2 );
int slices = luaL_checkinteger( L, 3 );
@@ -1345,7 +1345,7 @@ Generate torus mesh
- Success return Mesh
*/
-int lmodelsGenMeshTorus( lua_State *L ) {
+int lmodelsGenMeshTorus( lua_State* L ) {
float radius = luaL_checknumber( L, 1 );
float size = luaL_checknumber( L, 2 );
int radSeg = luaL_checkinteger( L, 3 );
@@ -1363,7 +1363,7 @@ Generate torus mesh
- Success return Mesh
*/
-int lmodelsGenMeshKnot( lua_State *L ) {
+int lmodelsGenMeshKnot( lua_State* L ) {
float radius = luaL_checknumber( L, 1 );
float size = luaL_checknumber( L, 2 );
int radSeg = luaL_checkinteger( L, 3 );
@@ -1381,8 +1381,8 @@ Generate heightmap mesh from image data
- Success return Mesh
*/
-int lmodelsGenMeshHeightmap( lua_State *L ) {
- Image *heightmap = uluaGetImage( L, 1 );
+int lmodelsGenMeshHeightmap( lua_State* L ) {
+ Image* heightmap = uluaGetImage( L, 1 );
Vector3 size = uluaGetVector3( L, 2 );
uluaPushMesh( L, GenMeshHeightmap( *heightmap, size ) );
@@ -1397,8 +1397,8 @@ Generate cubes-based map mesh from image data
- Success return Mesh
*/
-int lmodelsGenMeshCubicmap( lua_State *L ) {
- Image *cubicmap = uluaGetImage( L, 1 );
+int lmodelsGenMeshCubicmap( lua_State* L ) {
+ Image* cubicmap = uluaGetImage( L, 1 );
Vector3 cubeSize = uluaGetVector3( L, 2 );
uluaPushMesh( L, GenMeshCubicmap( *cubicmap, cubeSize ) );
@@ -1413,7 +1413,7 @@ Generate custom mesh from vertex attribute data and uploads it into a VAO (if su
- Success return Mesh
*/
-int lmodelsGenMeshCustom( lua_State *L ) {
+int lmodelsGenMeshCustom( lua_State* L ) {
luaL_checktype( L, 1, LUA_TTABLE );
bool dynamic = uluaGetBoolean( L, 2 );
@@ -1573,11 +1573,11 @@ Load materials from model file
- Success return Material{}
*/
-int lmodelsLoadMaterials( lua_State *L ) {
- const char *fileName = luaL_checkstring( L, 1 );
+int lmodelsLoadMaterials( lua_State* L ) {
+ const char* fileName = luaL_checkstring( L, 1 );
int materialCount = 0;
- Material *materials = LoadMaterials( fileName, &materialCount );
+ Material* materials = LoadMaterials( fileName, &materialCount );
lua_createtable( L, materialCount, 0 );
for ( int i = 0; i < materialCount; i++ ) {
@@ -1594,7 +1594,7 @@ Default material for reference. Return as lightuserdata
- Success return Material
*/
-int lmodelsGetMaterialDefault( lua_State *L ) {
+int lmodelsGetMaterialDefault( lua_State* L ) {
lua_pushlightuserdata( L, &state->defaultMaterial );
return 1;
@@ -1607,7 +1607,7 @@ Load default material as new object
- Success return Material
*/
-int lmodelsLoadMaterialDefault( lua_State *L ) {
+int lmodelsLoadMaterialDefault( lua_State* L ) {
uluaPushMaterial( L, LoadMaterialDefault() );
return 1;
@@ -1620,7 +1620,7 @@ Load material from table. See material table definition
- Success return Material
*/
-int lmodelsCreateMaterial( lua_State *L ) {
+int lmodelsCreateMaterial( lua_State* L ) {
luaL_checktype( L, 1, LUA_TTABLE );
Material material = LoadMaterialDefault();
@@ -1651,7 +1651,7 @@ int lmodelsCreateMaterial( lua_State *L ) {
while ( lua_next( L, t4 ) != 0 ) {
if ( strcmp( "texture", (char*)lua_tostring( L, -2 ) ) == 0 ) {
- Texture *texture = uluaGetTexture( L, lua_gettop( L ) );
+ Texture* texture = uluaGetTexture( L, lua_gettop( L ) );
material.maps[map].texture = *texture;
}
else if ( strcmp( "color", (char*)lua_tostring( L, -2 ) ) == 0 ) {
@@ -1687,7 +1687,7 @@ int lmodelsCreateMaterial( lua_State *L ) {
}
}
else if ( strcmp( "shader", (char*)lua_tostring( L, -2 ) ) == 0 ) {
- Shader *shader = uluaGetShader( L, lua_gettop( L ) );
+ Shader* shader = uluaGetShader( L, lua_gettop( L ) );
material.shader = *shader;
}
lua_pop( L, 1 );
@@ -1704,8 +1704,8 @@ Check if a material is ready
- Success return bool
*/
-int lmodelsIsMaterialReady( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsIsMaterialReady( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
lua_pushboolean( L, IsMaterialReady( *material ) );
@@ -1717,8 +1717,8 @@ int lmodelsIsMaterialReady( lua_State *L ) {
Unload material from GPU memory (VRAM)
*/
-int lmodelsUnloadMaterial( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsUnloadMaterial( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
/* Custom UnloadMaterial since we don't want to free Shaders or Textures. */
unloadMaterial( material );
@@ -1733,10 +1733,10 @@ int lmodelsUnloadMaterial( lua_State *L ) {
Set texture for a material map type (MATERIAL_MAP_ALBEDO, MATERIAL_MAP_METALNESS...)
*/
-int lmodelsSetMaterialTexture( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsSetMaterialTexture( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
int mapType = luaL_checkinteger( L, 2 );
- Texture *texture = uluaGetTexture( L, 3 );
+ Texture* texture = uluaGetTexture( L, 3 );
SetMaterialTexture( material, mapType, *texture );
@@ -1748,8 +1748,8 @@ int lmodelsSetMaterialTexture( lua_State *L ) {
Set color for a material map type
*/
-int lmodelsSetMaterialColor( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsSetMaterialColor( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
int mapType = luaL_checkinteger( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -1763,8 +1763,8 @@ int lmodelsSetMaterialColor( lua_State *L ) {
Set value for a material map type
*/
-int lmodelsSetMaterialValue( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsSetMaterialValue( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
int mapType = luaL_checkinteger( L, 2 );
float value = luaL_checknumber( L, 3 );
@@ -1778,9 +1778,9 @@ int lmodelsSetMaterialValue( lua_State *L ) {
Set shader for material
*/
-int lmodelsSetMaterialShader( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
- Shader *shader = uluaGetShader( L, 2 );
+int lmodelsSetMaterialShader( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
+ Shader* shader = uluaGetShader( L, 2 );
material->shader = *shader;
@@ -1792,8 +1792,8 @@ int lmodelsSetMaterialShader( lua_State *L ) {
Set material generic parameters (if required)
*/
-int lmodelsSetMaterialParams( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsSetMaterialParams( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
size_t len = uluaGetTableLen( L, 2 );
@@ -1824,8 +1824,8 @@ Get texture from material map type. Return as lightuserdata
- Success return Texture
*/
-int lmodelsGetMaterialTexture( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsGetMaterialTexture( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
int mapType = luaL_checkinteger( L, 2 );
lua_pushlightuserdata( L, &material->maps[ mapType ].texture );
@@ -1840,8 +1840,8 @@ Get color from material map type
- Success return Color
*/
-int lmodelsGetMaterialColor( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsGetMaterialColor( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
int mapType = luaL_checkinteger( L, 2 );
uluaPushColor( L, material->maps[ mapType ].color );
@@ -1856,8 +1856,8 @@ Get color from material map type
- Success return float
*/
-int lmodelsGetMaterialValue( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsGetMaterialValue( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
int mapType = luaL_checkinteger( L, 2 );
lua_pushnumber( L, material->maps[ mapType ].value );
@@ -1872,8 +1872,8 @@ Get material shader. Return as lightuserdata
- Success return Shader
*/
-int lmodelsGetMaterialShader( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsGetMaterialShader( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
lua_pushlightuserdata( L, &material->shader );
@@ -1887,8 +1887,8 @@ Get material parameters
- Success return float{}
*/
-int lmodelsGetMaterialParams( lua_State *L ) {
- Material *material = uluaGetMaterial( L, 1 );
+int lmodelsGetMaterialParams( lua_State* L ) {
+ Material* material = uluaGetMaterial( L, 1 );
Vector4 params = {
material->params[0],
@@ -1913,10 +1913,10 @@ Load model animations from file
- Failure return nil
- Success return ModelAnimations{}
*/
-int lmodelsLoadModelAnimations( lua_State *L ) {
+int lmodelsLoadModelAnimations( lua_State* L ) {
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
int animationCount = 0;
- ModelAnimation *anims = LoadModelAnimations( lua_tostring( L, 1 ), &animationCount );
+ ModelAnimation* anims = LoadModelAnimations( lua_tostring( L, 1 ), &animationCount );
lua_createtable( L, animationCount, 0 );
@@ -1937,9 +1937,9 @@ int lmodelsLoadModelAnimations( lua_State *L ) {
Update model animation pose
*/
-int lmodelsUpdateModelAnimation( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
- ModelAnimation *animation = uluaGetModelAnimation( L, 2 );
+int lmodelsUpdateModelAnimation( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
+ ModelAnimation* animation = uluaGetModelAnimation( L, 2 );
int frame = luaL_checkinteger( L, 3 );
UpdateModelAnimation( *model, *animation, frame );
@@ -1952,8 +1952,8 @@ int lmodelsUpdateModelAnimation( lua_State *L ) {
Unload animation data
*/
-int lmodelsUnloadModelAnimation( lua_State *L ) {
- ModelAnimation *animation = uluaGetModelAnimation( L, 1 );
+int lmodelsUnloadModelAnimation( lua_State* L ) {
+ ModelAnimation* animation = uluaGetModelAnimation( L, 1 );
UnloadModelAnimation( *animation );
@@ -1965,13 +1965,13 @@ int lmodelsUnloadModelAnimation( lua_State *L ) {
Unload animation table data
*/
-int lmodelsUnloadModelAnimations( lua_State *L ) {
+int lmodelsUnloadModelAnimations( lua_State* L ) {
int t = 1, i = 0;
lua_pushnil( L );
while ( lua_next( L, t ) != 0 ) {
if ( lua_isuserdata( L, -1 ) ) {
- ModelAnimation *animation = uluaGetModelAnimation( L, lua_gettop( L ) );
+ ModelAnimation* animation = uluaGetModelAnimation( L, lua_gettop( L ) );
UnloadModelAnimation( *animation );
}
i++;
@@ -1987,9 +1987,9 @@ Check model animation skeleton match
- Success return bool
*/
-int lmodelsIsModelAnimationValid( lua_State *L ) {
- Model *model = uluaGetModel( L, 1 );
- ModelAnimation *animation = uluaGetModelAnimation( L, 2 );
+int lmodelsIsModelAnimationValid( lua_State* L ) {
+ Model* model = uluaGetModel( L, 1 );
+ ModelAnimation* animation = uluaGetModelAnimation( L, 2 );
lua_pushboolean( L, IsModelAnimationValid( *model, *animation ) );
@@ -2004,8 +2004,8 @@ Set modelAnimation bones information (skeleton)
- Failure return false
- Success return true
*/
-int lmodelsSetModelAnimationBone( lua_State *L ) {
- ModelAnimation *animation = uluaGetModelAnimation( L, 1 );
+int lmodelsSetModelAnimationBone( lua_State* L ) {
+ ModelAnimation* animation = uluaGetModelAnimation( L, 1 );
int boneId = luaL_checkinteger( L, 2 );
BoneInfo bone = uluaGetBoneInfo( L, 3 );
@@ -2028,8 +2028,8 @@ Set modelAnimation bones base transformation (pose)
- Failure return false
- Success return true
*/
-int lmodelsSetModelAnimationFramePose( lua_State *L ) {
- ModelAnimation *animation = uluaGetModelAnimation( L, 1 );
+int lmodelsSetModelAnimationFramePose( lua_State* L ) {
+ ModelAnimation* animation = uluaGetModelAnimation( L, 1 );
int frame = luaL_checkinteger( L, 2 );
int boneId = luaL_checkinteger( L, 3 );
Transform pose = uluaGetTransform( L, 4 );
@@ -2050,9 +2050,9 @@ int lmodelsSetModelAnimationFramePose( lua_State *L ) {
Set modelAnimation name
*/
-int lmodelsSetModelAnimationName( lua_State *L ) {
- ModelAnimation *animation = uluaGetModelAnimation( L, 1 );
- const char *name = luaL_checkstring( L, 2 );
+int lmodelsSetModelAnimationName( lua_State* L ) {
+ ModelAnimation* animation = uluaGetModelAnimation( L, 1 );
+ const char* name = luaL_checkstring( L, 2 );
strncpy( animation->name, name, 32 );
@@ -2066,8 +2066,8 @@ Return modelAnimation bone count
- Success return int
*/
-int lmodelsGetModelAnimationBoneCount( lua_State *L ) {
- ModelAnimation *modelAnimation = uluaGetModelAnimation( L, 1 );
+int lmodelsGetModelAnimationBoneCount( lua_State* L ) {
+ ModelAnimation* modelAnimation = uluaGetModelAnimation( L, 1 );
lua_pushinteger( L, modelAnimation->boneCount );
@@ -2081,8 +2081,8 @@ Return modelAnimation frame count
- Success return int
*/
-int lmodelsGetModelAnimationFrameCount( lua_State *L ) {
- ModelAnimation *modelAnimation = uluaGetModelAnimation( L, 1 );
+int lmodelsGetModelAnimationFrameCount( lua_State* L ) {
+ ModelAnimation* modelAnimation = uluaGetModelAnimation( L, 1 );
lua_pushinteger( L, modelAnimation->frameCount );
@@ -2097,8 +2097,8 @@ Get modelAnimation bones information (skeleton)
- Failure return nil
- Success return BoneInfo
*/
-int lmodelsGetModelAnimationBone( lua_State *L ) {
- ModelAnimation *animation = uluaGetModelAnimation( L, 1 );
+int lmodelsGetModelAnimationBone( lua_State* L ) {
+ ModelAnimation* animation = uluaGetModelAnimation( L, 1 );
int boneId = luaL_checkinteger( L, 2 );
if ( 0 <= boneId && boneId < animation->boneCount ) {
@@ -2119,8 +2119,8 @@ Get modelAnimation bones base transformation (pose)
- Failure return nil
- Success return Transform
*/
-int lmodelsGetModelAnimationFramePose( lua_State *L ) {
- ModelAnimation *animation = uluaGetModelAnimation( L, 1 );
+int lmodelsGetModelAnimationFramePose( lua_State* L ) {
+ ModelAnimation* animation = uluaGetModelAnimation( L, 1 );
int frame = luaL_checkinteger( L, 2 );
int boneId = luaL_checkinteger( L, 3 );
@@ -2141,8 +2141,8 @@ Get modelAnimation name
- Success return string
*/
-int lmodelsGetModelAnimationName( lua_State *L ) {
- ModelAnimation *animation = uluaGetModelAnimation( L, 1 );
+int lmodelsGetModelAnimationName( lua_State* L ) {
+ ModelAnimation* animation = uluaGetModelAnimation( L, 1 );
lua_pushstring( L, animation->name );
@@ -2160,7 +2160,7 @@ Check collision between two spheres
- Success return bool
*/
-int lmodelsCheckCollisionSpheres( lua_State *L ) {
+int lmodelsCheckCollisionSpheres( lua_State* L ) {
Vector3 center1 = uluaGetVector3( L, 1 );
float radius1 = luaL_checknumber( L, 2 );
Vector3 center2 = uluaGetVector3( L, 3 );
@@ -2178,7 +2178,7 @@ Check collision between two bounding boxes
- Success return bool
*/
-int lmodelsCheckCollisionBoxes( lua_State *L ) {
+int lmodelsCheckCollisionBoxes( lua_State* L ) {
BoundingBox box1 = uluaGetBoundingBox( L, 1 );
BoundingBox box2 = uluaGetBoundingBox( L, 2 );
@@ -2194,7 +2194,7 @@ Check collision between box and sphere
- Success return bool
*/
-int lmodelsCheckCollisionBoxSphere( lua_State *L ) {
+int lmodelsCheckCollisionBoxSphere( lua_State* L ) {
BoundingBox box = uluaGetBoundingBox( L, 1 );
Vector3 center = uluaGetVector3( L, 2 );
float radius = luaL_checknumber( L, 3 );
@@ -2211,7 +2211,7 @@ Get collision info between ray and sphere. ( RayCollision is Lua table of { hit,
- Success return RayCollision
*/
-int lmodelsGetRayCollisionSphere( lua_State *L ) {
+int lmodelsGetRayCollisionSphere( lua_State* L ) {
Ray ray = uluaGetRay( L, 1 );
Vector3 center = uluaGetVector3( L, 2 );
float radius = luaL_checknumber( L, 3 );
@@ -2228,7 +2228,7 @@ Get collision info between ray and box
- Success return RayCollision
*/
-int lmodelsGetRayCollisionBox( lua_State *L ) {
+int lmodelsGetRayCollisionBox( lua_State* L ) {
Ray ray = uluaGetRay( L, 1 );
BoundingBox box = uluaGetBoundingBox( L, 2 );
@@ -2244,9 +2244,9 @@ Get collision info between ray and mesh
- Success return RayCollision
*/
-int lmodelsGetRayCollisionMesh( lua_State *L ) {
+int lmodelsGetRayCollisionMesh( lua_State* L ) {
Ray ray = uluaGetRay( L, 1 );
- Mesh *mesh = uluaGetMesh( L, 2 );
+ Mesh* mesh = uluaGetMesh( L, 2 );
Matrix transform = uluaGetMatrix( L, 3 );
uluaPushRayCollision( L, GetRayCollisionMesh( ray, *mesh, transform ) );
@@ -2261,7 +2261,7 @@ Get collision info between ray and triangle
- Success return RayCollision
*/
-int lmodelsGetRayCollisionTriangle( lua_State *L ) {
+int lmodelsGetRayCollisionTriangle( lua_State* L ) {
Ray ray = uluaGetRay( L, 1 );
Vector3 p1 = uluaGetVector3( L, 2 );
Vector3 p2 = uluaGetVector3( L, 3 );
@@ -2279,7 +2279,7 @@ Get collision info between ray and quad
- Success return RayCollision
*/
-int lmodelsGetRayCollisionQuad( lua_State *L ) {
+int lmodelsGetRayCollisionQuad( lua_State* L ) {
Ray ray = uluaGetRay( L, 1 );
Vector3 p1 = uluaGetVector3( L, 2 );
Vector3 p2 = uluaGetVector3( L, 3 );
diff --git a/src/platforms/core_desktop.c b/src/platforms/core_desktop.c
index 3d62f53..368d27d 100644
--- a/src/platforms/core_desktop.c
+++ b/src/platforms/core_desktop.c
@@ -4,7 +4,7 @@
#include "platforms/core_desktop.h"
void platformDefineGlobals() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_getglobal( L, "RL" );
/*DOC_DEFINES_START*/
@@ -55,11 +55,11 @@ this function returns nil but does not emit an error.
- Success return string or nil
*/
-int lcoreGetKeyName( lua_State *L ) {
+int lcoreGetKeyName( lua_State* L ) {
int key = luaL_checkinteger( L, 1 );
int scancode = luaL_checkinteger( L, 2 );
- const char *keyName = glfwGetKeyName( key, scancode );
+ const char* keyName = glfwGetKeyName( key, scancode );
if ( keyName != NULL ) {
lua_pushstring( L, keyName );
@@ -79,7 +79,7 @@ If the key is KEY_UNKNOWN or does not exist on the keyboard this method will ret
- Success return int
*/
-int lcoreGetKeyScancode( lua_State *L ) {
+int lcoreGetKeyScancode( lua_State* L ) {
int key = luaL_checkinteger( L, 1 );
lua_pushinteger( L, glfwGetKeyScancode( key ) );
@@ -98,11 +98,11 @@ int lcoreGetKeyScancode( lua_State *L ) {
Called when the window is resized. Type GLFW_WINDOW_SIZE_EVENT
*/
-static void windowSizeEvent( GLFWwindow *window, int width, int height ) {
+static void windowSizeEvent( GLFWwindow* window, int width, int height ) {
/* Pass through to raylib callback. */
state->raylibWindowSizeCallback( window, width, height );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -134,11 +134,11 @@ static void windowSizeEvent( GLFWwindow *window, int width, int height ) {
Called when the window is maximized or restored. Type GLFW_WINDOW_MAXIMIZE_EVENT
*/
-static void windowMaximizeEvent( GLFWwindow *window, int maximized ) {
+static void windowMaximizeEvent( GLFWwindow* window, int maximized ) {
/* Pass through to raylib callback. */
state->raylibWindowMaximizeCallback( window, maximized );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -168,11 +168,11 @@ static void windowMaximizeEvent( GLFWwindow *window, int maximized ) {
Called when the window is iconified or restored. Type GLFW_WINDOW_ICONYFY_EVENT
*/
-static void windowIconyfyEvent( GLFWwindow *window, int iconified ) {
+static void windowIconyfyEvent( GLFWwindow* window, int iconified ) {
/* Pass through to raylib callback. */
state->raylibWindowIconifyCallback( window, iconified );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -200,11 +200,11 @@ static void windowIconyfyEvent( GLFWwindow *window, int iconified ) {
Called when the window gains or loses input focus. Type GLFW_WINDOW_FOCUS_EVENT
*/
-static void windowFocusEvent( GLFWwindow *window, int focused ) {
+static void windowFocusEvent( GLFWwindow* window, int focused ) {
/* Pass through to raylib callback. */
state->raylibWindowFocusCallback( window, focused );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -232,11 +232,11 @@ static void windowFocusEvent( GLFWwindow *window, int focused ) {
Called when files are dropped to the window. Type GLFW_WINDOW_DROP_EVENT
*/
-static void windowDropEvent( GLFWwindow *window, int count, const char **paths ) {
+static void windowDropEvent( GLFWwindow* window, int count, const char** paths ) {
/* Pass through to raylib callback. */
state->raylibWindowDropCallback( window, count, paths );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -280,7 +280,7 @@ static void keyInputEvent( GLFWwindow* window, int key, int scancode, int action
/* Pass through to raylib callback. */
state->raylibKeyCallback( window, key, scancode, action, mods );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -318,7 +318,7 @@ static void charInputEvent( GLFWwindow* window, unsigned int key ) {
/* Pass through to raylib callback. */
state->raylibCharCallback( window, key );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -350,7 +350,7 @@ static void mouseButtonInputEvent( GLFWwindow* window, int button, int action, i
/* Pass through to raylib callback. */
state->raylibMouseButtonCallback( window, button, action, mods );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -386,7 +386,7 @@ static void mouseCursorPosInputEvent( GLFWwindow* window, double x, double y ) {
/* Pass through to raylib callback. */
state->raylibMouseCursorPosCallback( window, x, y );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -420,7 +420,7 @@ static void mouseScrollInputEvent( GLFWwindow* window, double xoffset, double yo
/* Pass through to raylib callback. */
state->raylibMouseScrollCallback( window, xoffset, yoffset );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -454,7 +454,7 @@ static void cursorEnterInputEvent( GLFWwindow* window, int enter ) {
/* Pass through to raylib callback. */
state->raylibCursorEnterCallback( window, enter );
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -488,7 +488,7 @@ static void joystickEvent( int jid, int event ) {
state->raylibJoystickCallback( jid, event );
}
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -520,7 +520,7 @@ Called when the pen tablet data is updated. Type GLFW_PEN_TABLET_DATA_EVENT
NOTE: Experimental. Needs glfw PR https://github.com/glfw/glfw/pull/1445
*/
static void penTabletDataEvent( double x, double y, double z, double pressure, double pitch, double yaw, double roll ) {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -562,7 +562,7 @@ Called when the pen tablet cursor has changed. Type GLFW_PEN_TABLET_CURSOR_EVENT
NOTE: Experimental. Needs glfw PR https://github.com/glfw/glfw/pull/1445
*/
static void penTabletCursorEvent( unsigned int identifier ) {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -592,7 +592,7 @@ Called when the pen tablet proximity has changed. Type GLFW_PEN_TABLET_PROXIMITY
NOTE: Experimental. Needs glfw PR https://github.com/glfw/glfw/pull/1445
*/
static void penTabletProximityEvent( int proxState ) {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -640,7 +640,7 @@ static void platformRegisterEvents() {
}
void luaPlatformRegister() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_getglobal( L, "RL" );
/* Input-related functions: keyboard. */
diff --git a/src/platforms/core_desktop_sdl.c b/src/platforms/core_desktop_sdl.c
index 4ef7705..4105b25 100644
--- a/src/platforms/core_desktop_sdl.c
+++ b/src/platforms/core_desktop_sdl.c
@@ -4,7 +4,7 @@
#include "platforms/core_desktop_sdl.h"
void platformDefineGlobals() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_getglobal( L, "RL" );
/*DOC_DEFINES_START*/
@@ -88,7 +88,7 @@ Use this function to get a human-readable name for a key. If the key doesn't hav
- Success return string
*/
-int lcoreGetKeyName( lua_State *L ) {
+int lcoreGetKeyName( lua_State* L ) {
int key = luaL_checkinteger( L, 1 );
lua_pushstring( L, SDL_GetKeyName( key ) );
@@ -103,7 +103,7 @@ Use this function to get the scancode corresponding to the given key code accord
- Success return int
*/
-int lcoreGetScancodeFromKey( lua_State *L ) {
+int lcoreGetScancodeFromKey( lua_State* L ) {
int key = luaL_checkinteger( L, 1 );
lua_pushinteger( L, SDL_GetScancodeFromKey( key ) );
@@ -118,7 +118,7 @@ int lcoreGetScancodeFromKey( lua_State *L ) {
*/
/* This function is not thread safe so we don't use Lua inside it directly. It only adds events to another queue. */
-static int SDLEventFilter( void *userdata, SDL_Event *event ) {
+static int SDLEventFilter( void* userdata, SDL_Event* event ) {
/* SDL_EVENT_POLL_SENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
if ( event->type != SDL_QUIT && event->type != 0x7F00 && state->SDL_eventQueueLen < PLATFORM_SDL_EVENT_QUEUE_LEN ) {
state->SDL_eventQueue[ state->SDL_eventQueueLen ] = *event;
@@ -134,7 +134,7 @@ static void platformRegisterEvents() {
}
static void platformSendEvents() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_pushcfunction( L, luaTraceback );
int tracebackidx = lua_gettop( L );
@@ -546,7 +546,7 @@ Event occurs an event of type SDL_DOLLARGESTURE or SDL_DOLLARRECORD is reported.
}
void luaPlatformRegister() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_getglobal( L, "RL" );
/* Input-related functions: keyboard. */
diff --git a/src/platforms/core_web.c b/src/platforms/core_web.c
index 2cf255a..ba9e1d5 100644
--- a/src/platforms/core_web.c
+++ b/src/platforms/core_web.c
@@ -3,7 +3,7 @@
#include "core.h"
void platformDefineGlobals() {
- lua_State *L = state->luaState;
+ lua_State* L = state->luaState;
lua_getglobal( L, "RL" );
/*DOC_DEFINES_START*/
diff --git a/src/rgui.c b/src/rgui.c
index 87c7e02..3a4420c 100644
--- a/src/rgui.c
+++ b/src/rgui.c
@@ -15,7 +15,7 @@
Enable gui controls (global state)
*/
-int lguiGuiEnable( lua_State *L ) {
+int lguiGuiEnable( lua_State* L ) {
GuiEnable();
return 0;
@@ -26,7 +26,7 @@ int lguiGuiEnable( lua_State *L ) {
Disable gui controls (global state)
*/
-int lguiGuiDisable( lua_State *L ) {
+int lguiGuiDisable( lua_State* L ) {
GuiDisable();
return 0;
@@ -37,7 +37,7 @@ int lguiGuiDisable( lua_State *L ) {
Lock gui controls (global state)
*/
-int lguiGuiLock( lua_State *L ) {
+int lguiGuiLock( lua_State* L ) {
GuiLock();
return 0;
@@ -48,7 +48,7 @@ int lguiGuiLock( lua_State *L ) {
Unlock gui controls (global state)
*/
-int lguiGuiUnlock( lua_State *L ) {
+int lguiGuiUnlock( lua_State* L ) {
GuiUnlock();
return 0;
@@ -61,7 +61,7 @@ Check if gui is locked (global state)
- Success return bool
*/
-int lguiGuiIsLocked( lua_State *L ) {
+int lguiGuiIsLocked( lua_State* L ) {
lua_pushboolean( L, GuiIsLocked() );
return 1;
@@ -72,7 +72,7 @@ int lguiGuiIsLocked( lua_State *L ) {
Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
*/
-int lguiGuiSetAlpha( lua_State *L ) {
+int lguiGuiSetAlpha( lua_State* L ) {
float alpha = luaL_checknumber( L, 1 );
GuiSetAlpha( alpha );
@@ -85,7 +85,7 @@ int lguiGuiSetAlpha( lua_State *L ) {
Set gui state (global state)
*/
-int lguiGuiSetState( lua_State *L ) {
+int lguiGuiSetState( lua_State* L ) {
int state = luaL_checkinteger( L, 1 );
GuiSetState( state );
@@ -100,7 +100,7 @@ Get gui state (global state)
- Success return int
*/
-int lguiGuiGetState( lua_State *L ) {
+int lguiGuiGetState( lua_State* L ) {
lua_pushinteger( L, GuiGetState() );
return 1;
@@ -115,8 +115,8 @@ int lguiGuiGetState( lua_State *L ) {
Set gui custom font (global state)
*/
-int lguiGuiSetFont( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int lguiGuiSetFont( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
GuiSetFont( *font );
@@ -130,7 +130,7 @@ Get gui custom font (global state)
- Success return Font
*/
-int lguiGuiGetFont( lua_State *L ) {
+int lguiGuiGetFont( lua_State* L ) {
uluaPushFont( L, GuiGetFont() );
return 1;
@@ -145,7 +145,7 @@ int lguiGuiGetFont( lua_State *L ) {
Set one style property
*/
-int lguiGuiSetStyle( lua_State *L ) {
+int lguiGuiSetStyle( lua_State* L ) {
int control = luaL_checkinteger( L, 1 );
int property = luaL_checkinteger( L, 2 );
int value = luaL_checkinteger( L, 3 );
@@ -162,7 +162,7 @@ Get one style property
- Success return int
*/
-int lguiGuiGetStyle( lua_State *L ) {
+int lguiGuiGetStyle( lua_State* L ) {
int control = luaL_checkinteger( L, 1 );
int property = luaL_checkinteger( L, 2 );
@@ -183,7 +183,7 @@ Load style file over global style variable (.rgs)
- Failure return nil
- Success return true
*/
-int lguiGuiLoadStyle( lua_State *L ) {
+int lguiGuiLoadStyle( lua_State* L ) {
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
GuiLoadStyle( lua_tostring( L, 1 ) );
lua_pushboolean( L, true );
@@ -201,7 +201,7 @@ int lguiGuiLoadStyle( lua_State *L ) {
Load style default over global style
*/
-int lguiGuiLoadStyleDefault( lua_State *L ) {
+int lguiGuiLoadStyleDefault( lua_State* L ) {
GuiLoadStyleDefault();
return 0;
@@ -216,7 +216,7 @@ int lguiGuiLoadStyleDefault( lua_State *L ) {
Enable gui tooltips (global state)
*/
-int lguiGuiEnableTooltip( lua_State *L ) {
+int lguiGuiEnableTooltip( lua_State* L ) {
GuiEnableTooltip();
return 0;
@@ -227,7 +227,7 @@ int lguiGuiEnableTooltip( lua_State *L ) {
Disable gui tooltips (global state)
*/
-int lguiGuiDisableTooltip( lua_State *L ) {
+int lguiGuiDisableTooltip( lua_State* L ) {
GuiDisableTooltip();
return 0;
@@ -238,7 +238,7 @@ int lguiGuiDisableTooltip( lua_State *L ) {
Set tooltip string
*/
-int lguiGuiSetTooltip( lua_State *L ) {
+int lguiGuiSetTooltip( lua_State* L ) {
GuiSetTooltip( luaL_checkstring( L, 1 ) );
return 0;
@@ -255,7 +255,7 @@ Get text with icon id prepended (if supported)
- Success return string
*/
-int lguiGuiIconText( lua_State *L ) {
+int lguiGuiIconText( lua_State* L ) {
int iconId = luaL_checkinteger( L, 1 );
if ( TextIsEqual( luaL_checkstring( L, 2 ), "" ) ) {
@@ -273,7 +273,7 @@ int lguiGuiIconText( lua_State *L ) {
Set icon scale (1 by default)
*/
-int lguiGuiSetIconScale( lua_State *L ) {
+int lguiGuiSetIconScale( lua_State* L ) {
unsigned int scale = luaL_checkinteger( L, 1 );
GuiSetIconScale( scale );
@@ -288,7 +288,7 @@ Get raygui icons data pointer
- Success return int
*/
-int lguiGuiGetIcons( lua_State *L ) {
+int lguiGuiGetIcons( lua_State* L ) {
lua_pushinteger( L, *GuiGetIcons() );
return 1;
@@ -302,12 +302,12 @@ Load raygui icons file (.rgi) into internal icons data
- Failure return nil
- Success return strings{}
*/
-int lguiGuiLoadIcons( lua_State *L ) {
- const char *fileName = luaL_checkstring( L, 1 );
+int lguiGuiLoadIcons( lua_State* L ) {
+ const char* fileName = luaL_checkstring( L, 1 );
bool loadIconsName = uluaGetBoolean( L, 2 );
if ( FileExists( fileName ) ) {
- char **iconNames = GuiLoadIcons( fileName, loadIconsName );
+ char** iconNames = GuiLoadIcons( fileName, loadIconsName );
lua_createtable( L, 255, 0 );
@@ -331,7 +331,7 @@ int lguiGuiLoadIcons( lua_State *L ) {
Draw icon
*/
-int lguiGuiDrawIcon( lua_State *L ) {
+int lguiGuiDrawIcon( lua_State* L ) {
int iconId = luaL_checkinteger( L, 1 );
Vector2 pos = uluaGetVector2( L, 2 );
int pixelSize = luaL_checkinteger( L, 3 );
@@ -353,7 +353,7 @@ Window Box control, shows a window that can be closed
- Success return int
*/
-int lguiGuiWindowBox( lua_State *L ) {
+int lguiGuiWindowBox( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiWindowBox( bounds, luaL_checkstring( L, 2 ) ) );
@@ -368,7 +368,7 @@ Group Box control with text name
- Success return int
*/
-int lguiGuiGroupBox( lua_State *L ) {
+int lguiGuiGroupBox( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiGroupBox( bounds, luaL_checkstring( L, 2 ) ) );
@@ -383,7 +383,7 @@ Line separator control, could contain text
- Success return int
*/
-int lguiGuiLine( lua_State *L ) {
+int lguiGuiLine( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiLine( bounds, luaL_checkstring( L, 2 ) ) );
@@ -398,7 +398,7 @@ Panel control, useful to group controls
- Success return int
*/
-int lguiGuiPanel( lua_State *L ) {
+int lguiGuiPanel( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiPanel( bounds, luaL_checkstring( L, 2 ) ) );
@@ -413,12 +413,12 @@ Tab Bar control, returns TAB to be closed or -1
- Success return int, int
*/
-int lguiGuiTabBar( lua_State *L ) {
+int lguiGuiTabBar( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int active = luaL_checkinteger( L, 3 );
int count = 0;
- const char **text = TextSplit( luaL_checkstring( L, 2 ), ';', &count );
+ const char** text = TextSplit( luaL_checkstring( L, 2 ), ';', &count );
lua_pushinteger( L, GuiTabBar( bounds, text, count, &active ) );
lua_pushinteger( L, active );
@@ -433,7 +433,7 @@ Scroll Panel control
- Success return int, Vector2, Rectangle
*/
-int lguiGuiScrollPanel( lua_State *L ) {
+int lguiGuiScrollPanel( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
Rectangle content = uluaGetRectangle( L, 3 );
Vector2 scroll = uluaGetVector2( L, 4 );
@@ -457,7 +457,7 @@ Label control, shows text
- Success return int
*/
-int lguiGuiLabel( lua_State *L ) {
+int lguiGuiLabel( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiLabel( bounds, luaL_checkstring( L, 2 ) ) );
@@ -472,7 +472,7 @@ Button control, returns true when clicked
- Success return int
*/
-int lguiGuiButton( lua_State *L ) {
+int lguiGuiButton( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiButton( bounds, luaL_checkstring( L, 2 ) ) );
@@ -487,7 +487,7 @@ Label button control, show true when clicked
- Success return int
*/
-int lguiGuiLabelButton( lua_State *L ) {
+int lguiGuiLabelButton( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiLabelButton( bounds, luaL_checkstring( L, 2 ) ) );
@@ -502,7 +502,7 @@ Toggle Button control, returns true when active
- Success return int, bool
*/
-int lguiGuiToggle( lua_State *L ) {
+int lguiGuiToggle( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
bool active = uluaGetBoolean( L, 3 );
@@ -519,7 +519,7 @@ Toggle Group control, returns active toggle index
- Success return int, int
*/
-int lguiGuiToggleGroup( lua_State *L ) {
+int lguiGuiToggleGroup( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int active = luaL_checkinteger( L, 3 );
@@ -536,7 +536,7 @@ Toggle Slider control, returns true when clicked
- Success return int, int
*/
-int lguiGuiToggleSlider( lua_State *L ) {
+int lguiGuiToggleSlider( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int active = luaL_checkinteger( L, 3 );
@@ -553,7 +553,7 @@ Check Box control, returns true when active
- Success return bool, Rectangle
*/
-int lguiGuiCheckBox( lua_State *L ) {
+int lguiGuiCheckBox( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
bool checked = uluaGetBoolean( L, 3 );
@@ -572,7 +572,7 @@ Combo Box control, returns selected item index
- Success return int, int
*/
-int lguiGuiComboBox( lua_State *L ) {
+int lguiGuiComboBox( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int active = luaL_checkinteger( L, 3 );
@@ -589,7 +589,7 @@ Dropdown Box control, returns selected item
- Success return int, int
*/
-int lguiGuiDropdownBox( lua_State *L ) {
+int lguiGuiDropdownBox( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int active = luaL_checkinteger( L, 3 );
bool editMode = uluaGetBoolean( L, 4 );
@@ -607,7 +607,7 @@ Spinner control, returns selected value
- Success return int, int, Rectangle
*/
-int lguiGuiSpinner( lua_State *L ) {
+int lguiGuiSpinner( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int value = luaL_checkinteger( L, 3 );
int minValue = luaL_checkinteger( L, 4 );
@@ -629,7 +629,7 @@ Value Box control, updates input text with numbers
- Success return int, int, Rectangle
*/
-int lguiGuiValueBox( lua_State *L ) {
+int lguiGuiValueBox( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int value = luaL_checkinteger( L, 3 );
int minValue = luaL_checkinteger( L, 4 );
@@ -651,7 +651,7 @@ Text Box control, updates input text
- Success return int, string
*/
-int lguiGuiTextBox( lua_State *L ) {
+int lguiGuiTextBox( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int textSize = luaL_checkinteger( L, 3 );
char text[ textSize + 1 ];
@@ -671,7 +671,7 @@ Slider control, returns selected value
- Success return int, float, Rectangle, Rectangle
*/
-int lguiGuiSlider( lua_State *L ) {
+int lguiGuiSlider( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
float value = luaL_checknumber( L, 4 );
float minValue = luaL_checknumber( L, 5 );
@@ -694,7 +694,7 @@ Slider Bar control, returns selected value
- Success return int, float, Rectangle, Rectangle
*/
-int lguiGuiSliderBar( lua_State *L ) {
+int lguiGuiSliderBar( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
float value = luaL_checknumber( L, 4 );
float minValue = luaL_checknumber( L, 5 );
@@ -717,7 +717,7 @@ Progress Bar control, shows current progress value
- Success return int, float, Rectangle, Rectangle
*/
-int lguiGuiProgressBar( lua_State *L ) {
+int lguiGuiProgressBar( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
float value = luaL_checknumber( L, 4 );
float minValue = luaL_checknumber( L, 5 );
@@ -740,7 +740,7 @@ Status Bar control, shows info text
- Success return int
*/
-int lguiGuiStatusBar( lua_State *L ) {
+int lguiGuiStatusBar( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiStatusBar( bounds, luaL_checkstring( L, 2 ) ) );
@@ -755,7 +755,7 @@ Dummy control for placeholders
- Success return int
*/
-int lguiGuiDummyRec( lua_State *L ) {
+int lguiGuiDummyRec( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiDummyRec( bounds, luaL_checkstring( L, 2 ) ) );
@@ -770,7 +770,7 @@ Grid control, returns mouse cell position
- Success return int, Vector2
*/
-int lguiGuiGrid( lua_State *L ) {
+int lguiGuiGrid( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
float spacing = luaL_checknumber( L, 3 );
int subdivs = luaL_checkinteger( L, 4 );
@@ -789,7 +789,7 @@ Scroll bar control
- Success return int
*/
-int lguiGuiScrollBar( lua_State *L ) {
+int lguiGuiScrollBar( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int value = luaL_checkinteger( L, 2 );
int minValue = luaL_checkinteger( L, 3 );
@@ -811,7 +811,7 @@ List View control, returns selected list item index
- Success return int, int, int
*/
-int lguiGuiListView( lua_State *L ) {
+int lguiGuiListView( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int scrollIndex = luaL_checkinteger( L, 3 );
int active = luaL_checkinteger( L, 4 );
@@ -830,14 +830,14 @@ List View with extended parameters
- Success return int, int, int, int
*/
-int lguiGuiListViewEx( lua_State *L ) {
+int lguiGuiListViewEx( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
int scrollIndex = luaL_checkinteger( L, 3 );
int active = luaL_checkinteger( L, 4 );
int focus = luaL_checkinteger( L, 5 );
int count = 0;
- const char **text = TextSplit( luaL_checkstring( L, 2 ), ';', &count );
+ const char** text = TextSplit( luaL_checkstring( L, 2 ), ';', &count );
lua_pushinteger( L, GuiListViewEx( bounds, text, count, &scrollIndex, &active, &focus ) );
lua_pushinteger( L, scrollIndex );
@@ -854,7 +854,7 @@ Message Box control, displays a message
- Success return int
*/
-int lguiGuiMessageBox( lua_State *L ) {
+int lguiGuiMessageBox( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
lua_pushinteger( L, GuiMessageBox( bounds, luaL_checkstring( L, 2 ), luaL_checkstring( L, 3 ), luaL_checkstring( L, 4 ) ) );
@@ -869,11 +869,11 @@ Text Input Box control, ask for text, supports secret
- Success return int, string, bool
*/
-int lguiGuiTextInputBox( lua_State *L ) {
+int lguiGuiTextInputBox( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
- const char *title = luaL_checkstring( L, 2 );
- const char *message = luaL_checkstring( L, 3 );
- const char *buttons = luaL_checkstring( L, 4 );
+ const char* title = luaL_checkstring( L, 2 );
+ const char* message = luaL_checkstring( L, 3 );
+ const char* buttons = luaL_checkstring( L, 4 );
int textMaxSize = luaL_checkinteger( L, 6 );
bool secretViewActive = uluaGetBoolean( L, 7 );
char text[ textMaxSize + 1 ];
@@ -893,7 +893,7 @@ Color Picker control (multiple color controls)
- Success return int, Color
*/
-int lguiGuiColorPicker( lua_State *L ) {
+int lguiGuiColorPicker( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
Color color = uluaGetColor( L, 3 );
@@ -910,7 +910,7 @@ Color Panel control
- Success return int, Color
*/
-int lguiGuiColorPanel( lua_State *L ) {
+int lguiGuiColorPanel( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
Color color = uluaGetColor( L, 3 );
@@ -927,7 +927,7 @@ Color Bar Alpha control
- Success return int, float
*/
-int lguiGuiColorBarAlpha( lua_State *L ) {
+int lguiGuiColorBarAlpha( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
float alpha = luaL_checknumber( L, 3 );
@@ -944,7 +944,7 @@ Color Bar Hue control
- Success return int, float
*/
-int lguiGuiColorBarHue( lua_State *L ) {
+int lguiGuiColorBarHue( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
float value = luaL_checknumber( L, 3 );
@@ -961,7 +961,7 @@ Color Picker control that avoids conversion to RGB on each call (multiple color
- Success return int, Vector3
*/
-int lguiGuiColorPickerHSV( lua_State *L ) {
+int lguiGuiColorPickerHSV( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
Vector3 colorHsv = uluaGetVector3( L, 3 );
@@ -978,7 +978,7 @@ Color Panel control that returns HSV color value, used by GuiColorPickerHSV()
- Success return int, Vector3
*/
-int lguiGuiColorPanelHSV( lua_State *L ) {
+int lguiGuiColorPanelHSV( lua_State* L ) {
Rectangle bounds = uluaGetRectangle( L, 1 );
Vector3 colorHsv = uluaGetVector3( L, 3 );
diff --git a/src/rlgl.c b/src/rlgl.c
index 4f45c19..b0bd067 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -12,7 +12,7 @@
Choose the current matrix to be transformed
*/
-int lrlglMatrixMode( lua_State *L ) {
+int lrlglMatrixMode( lua_State* L ) {
rlMatrixMode( luaL_checkinteger( L, 1 ) );
return 0;
@@ -23,7 +23,7 @@ int lrlglMatrixMode( lua_State *L ) {
Push the current matrix to stack
*/
-int lrlglPushMatrix( lua_State *L ) {
+int lrlglPushMatrix( lua_State* L ) {
rlPushMatrix();
return 0;
@@ -34,7 +34,7 @@ int lrlglPushMatrix( lua_State *L ) {
Pop latest inserted matrix from stack
*/
-int lrlglPopMatrix( lua_State *L ) {
+int lrlglPopMatrix( lua_State* L ) {
rlPopMatrix();
return 0;
@@ -45,7 +45,7 @@ int lrlglPopMatrix( lua_State *L ) {
Reset current matrix to identity matrix
*/
-int lrlglLoadIdentity( lua_State *L ) {
+int lrlglLoadIdentity( lua_State* L ) {
rlLoadIdentity();
return 0;
@@ -56,7 +56,7 @@ int lrlglLoadIdentity( lua_State *L ) {
Multiply the current matrix by a translation matrix
*/
-int lrlglTranslatef( lua_State *L ) {
+int lrlglTranslatef( lua_State* L ) {
Vector3 translation = uluaGetVector3( L, 1 );
rlTranslatef( translation.x, translation.y, translation.z );
@@ -69,7 +69,7 @@ int lrlglTranslatef( lua_State *L ) {
Multiply the current matrix by a rotation matrix
*/
-int lrlglRotatef( lua_State *L ) {
+int lrlglRotatef( lua_State* L ) {
float angle = luaL_checknumber( L, 1 );
Vector3 rotation = uluaGetVector3( L, 2 );
@@ -83,7 +83,7 @@ int lrlglRotatef( lua_State *L ) {
Multiply the current matrix by a scaling matrix
*/
-int lrlglScalef( lua_State *L ) {
+int lrlglScalef( lua_State* L ) {
Vector3 scale = uluaGetVector3( L, 1 );
rlScalef( scale.x, scale.y, scale.z );
@@ -96,7 +96,7 @@ int lrlglScalef( lua_State *L ) {
Multiply the current matrix by another matrix
*/
-int lrlglMultMatrixf( lua_State *L ) {
+int lrlglMultMatrixf( lua_State* L ) {
Matrix matrix = uluaGetMatrix( L, 1 );
float matf[16] = {
@@ -115,7 +115,7 @@ int lrlglMultMatrixf( lua_State *L ) {
Multiply the current matrix by a perspective matrix generated by parameters
*/
-int lrlglFrustum( lua_State *L ) {
+int lrlglFrustum( lua_State* L ) {
double left = luaL_checknumber( L, 1 );
double right = luaL_checknumber( L, 2 );
double bottom = luaL_checknumber( L, 3 );
@@ -133,7 +133,7 @@ int lrlglFrustum( lua_State *L ) {
Multiply the current matrix by an orthographic matrix generated by parameters
*/
-int lrlglOrtho( lua_State *L ) {
+int lrlglOrtho( lua_State* L ) {
double left = luaL_checknumber( L, 1 );
double right = luaL_checknumber( L, 2 );
double bottom = luaL_checknumber( L, 3 );
@@ -152,7 +152,7 @@ int lrlglOrtho( lua_State *L ) {
Set the viewport area (transformation from normalized device coordinates to window coordinates)
NOTE: We store current viewport dimensions
*/
-int lrlglViewport( lua_State *L ) {
+int lrlglViewport( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
rlViewport( rect.x, rect.y, rect.width, rect.height );
@@ -169,7 +169,7 @@ int lrlglViewport( lua_State *L ) {
Initialize drawing mode (how to organize vertex)
*/
-int lrlglBegin( lua_State *L ) {
+int lrlglBegin( lua_State* L ) {
rlBegin( luaL_checkinteger( L, 1 ) );
return 0;
@@ -180,7 +180,7 @@ int lrlglBegin( lua_State *L ) {
Finish vertex providing
*/
-int lrlglEnd( lua_State *L ) {
+int lrlglEnd( lua_State* L ) {
rlEnd();
return 0;
@@ -191,7 +191,7 @@ int lrlglEnd( lua_State *L ) {
Define one vertex (position)
*/
-int lrlglVertex2f( lua_State *L ) {
+int lrlglVertex2f( lua_State* L ) {
Vector2 position = uluaGetVector2( L, 1 );
rlVertex2f( position.x, position.y );
@@ -204,7 +204,7 @@ int lrlglVertex2f( lua_State *L ) {
Define one vertex (position)
*/
-int lrlglVertex3f( lua_State *L ) {
+int lrlglVertex3f( lua_State* L ) {
Vector3 position = uluaGetVector3( L, 1 );
rlVertex3f( position.x, position.y, position.z );
@@ -217,7 +217,7 @@ int lrlglVertex3f( lua_State *L ) {
Define one vertex (texture coordinate) - 2 float
*/
-int lrlglTexCoord2f( lua_State *L ) {
+int lrlglTexCoord2f( lua_State* L ) {
Vector2 texCoord = uluaGetVector2( L, 1 );
rlTexCoord2f( texCoord.x, texCoord.y );
@@ -230,7 +230,7 @@ int lrlglTexCoord2f( lua_State *L ) {
Define one vertex (normal) - 3 float
*/
-int lrlglNormal3f( lua_State *L ) {
+int lrlglNormal3f( lua_State* L ) {
Vector3 normal = uluaGetVector3( L, 1 );
rlNormal3f( normal.x, normal.y, normal.z );
@@ -243,7 +243,7 @@ int lrlglNormal3f( lua_State *L ) {
Define one vertex (color) - 4 byte
*/
-int lrlglColor4ub( lua_State *L ) {
+int lrlglColor4ub( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
rlColor4ub( color.r, color.g, color.b, color.a );
@@ -256,7 +256,7 @@ int lrlglColor4ub( lua_State *L ) {
Define one vertex (color) - 3 float
*/
-int lrlglColor3f( lua_State *L ) {
+int lrlglColor3f( lua_State* L ) {
Vector3 color = uluaGetVector3( L, 1 );
rlColor3f( color.x, color.y, color.z );
@@ -269,7 +269,7 @@ int lrlglColor3f( lua_State *L ) {
Define one vertex (color) - 4 float
*/
-int lrlglColor4f( lua_State *L ) {
+int lrlglColor4f( lua_State* L ) {
Vector4 color = uluaGetVector4( L, 1 );
rlColor4f( color.x, color.y, color.z, color.w );
@@ -288,7 +288,7 @@ Enable vertex array (VAO, if supported)
- Success return bool
*/
-int lrlglEnableVertexArray( lua_State *L ) {
+int lrlglEnableVertexArray( lua_State* L ) {
lua_pushboolean( L, rlEnableVertexArray( luaL_checkinteger( L, 1 ) ) );
return 1;
@@ -299,7 +299,7 @@ int lrlglEnableVertexArray( lua_State *L ) {
Disable vertex array (VAO, if supported)
*/
-int lrlglDisableVertexArray( lua_State *L ) {
+int lrlglDisableVertexArray( lua_State* L ) {
rlDisableVertexArray();
return 0;
@@ -313,7 +313,7 @@ Enable vertex buffer (VBO)
- Failure return false
- Success return true
*/
-int lrlglEnableVertexBuffer( lua_State *L ) {
+int lrlglEnableVertexBuffer( lua_State* L ) {
rlEnableVertexBuffer( luaL_checkinteger( L, 1 ) );
return 0;
@@ -324,7 +324,7 @@ int lrlglEnableVertexBuffer( lua_State *L ) {
Disable vertex buffer (VBO)
*/
-int lrlglDisableVertexBuffer( lua_State *L ) {
+int lrlglDisableVertexBuffer( lua_State* L ) {
rlDisableVertexBuffer();
return 0;
@@ -335,7 +335,7 @@ int lrlglDisableVertexBuffer( lua_State *L ) {
Enable vertex buffer element (VBO element)
*/
-int lrlglEnableVertexBufferElement( lua_State *L ) {
+int lrlglEnableVertexBufferElement( lua_State* L ) {
rlEnableVertexBufferElement( luaL_checkinteger( L, 1 ) );
return 0;
@@ -346,7 +346,7 @@ int lrlglEnableVertexBufferElement( lua_State *L ) {
Disable vertex buffer element (VBO element)
*/
-int lrlglDisableVertexBufferElement( lua_State *L ) {
+int lrlglDisableVertexBufferElement( lua_State* L ) {
rlDisableVertexBufferElement();
return 0;
@@ -357,7 +357,7 @@ int lrlglDisableVertexBufferElement( lua_State *L ) {
Enable vertex attribute index
*/
-int lrlglEnableVertexAttribute( lua_State *L ) {
+int lrlglEnableVertexAttribute( lua_State* L ) {
rlEnableVertexAttribute( luaL_checkinteger( L, 1 ) );
return 0;
@@ -368,7 +368,7 @@ int lrlglEnableVertexAttribute( lua_State *L ) {
Disable vertex attribute index
*/
-int lrlglDisableVertexAttribute( lua_State *L ) {
+int lrlglDisableVertexAttribute( lua_State* L ) {
rlDisableVertexAttribute( luaL_checkinteger( L, 1 ) );
return 0;
@@ -383,7 +383,7 @@ int lrlglDisableVertexAttribute( lua_State *L ) {
Select and active a texture slot
*/
-int lrlglActiveTextureSlot( lua_State *L ) {
+int lrlglActiveTextureSlot( lua_State* L ) {
rlActiveTextureSlot( luaL_checkinteger( L, 1 ) );
return 0;
@@ -394,7 +394,7 @@ int lrlglActiveTextureSlot( lua_State *L ) {
Enable texture
*/
-int lrlglEnableTexture( lua_State *L ) {
+int lrlglEnableTexture( lua_State* L ) {
rlEnableTexture( luaL_checkinteger( L, 1 ) );
return 0;
@@ -405,7 +405,7 @@ int lrlglEnableTexture( lua_State *L ) {
Disable texture
*/
-int lrlglDisableTexture( lua_State *L ) {
+int lrlglDisableTexture( lua_State* L ) {
rlDisableTexture();
return 0;
@@ -416,7 +416,7 @@ int lrlglDisableTexture( lua_State *L ) {
Enable texture cubemap
*/
-int lrlglEnableTextureCubemap( lua_State *L ) {
+int lrlglEnableTextureCubemap( lua_State* L ) {
rlEnableTextureCubemap( luaL_checkinteger( L, 1 ) );
return 0;
@@ -427,7 +427,7 @@ int lrlglEnableTextureCubemap( lua_State *L ) {
Disable texture cubemap
*/
-int lrlglDisableTextureCubemap( lua_State *L ) {
+int lrlglDisableTextureCubemap( lua_State* L ) {
rlDisableTextureCubemap();
return 0;
@@ -438,7 +438,7 @@ int lrlglDisableTextureCubemap( lua_State *L ) {
Set texture parameters (filter, wrap)
*/
-int lrlglTextureParameters( lua_State *L ) {
+int lrlglTextureParameters( lua_State* L ) {
unsigned int id = luaL_checkinteger( L, 1 );
int param = luaL_checkinteger( L, 2 );
int value = luaL_checkinteger( L, 3 );
@@ -453,7 +453,7 @@ int lrlglTextureParameters( lua_State *L ) {
Set cubemap parameters (filter, wrap)
*/
-int lrlglCubemapParameters( lua_State *L ) {
+int lrlglCubemapParameters( lua_State* L ) {
unsigned int id = luaL_checkinteger( L, 1 );
int param = luaL_checkinteger( L, 2 );
int value = luaL_checkinteger( L, 3 );
@@ -472,7 +472,7 @@ int lrlglCubemapParameters( lua_State *L ) {
Enable shader program
*/
-int lrlglEnableShader( lua_State *L ) {
+int lrlglEnableShader( lua_State* L ) {
rlEnableShader( luaL_checkinteger( L, 1 ) );
return 0;
@@ -483,7 +483,7 @@ int lrlglEnableShader( lua_State *L ) {
Disable shader program
*/
-int lrlglDisableShader( lua_State *L ) {
+int lrlglDisableShader( lua_State* L ) {
rlDisableShader();
return 0;
@@ -498,7 +498,7 @@ int lrlglDisableShader( lua_State *L ) {
Enable render texture (fbo)
*/
-int lrlglEnableFramebuffer( lua_State *L ) {
+int lrlglEnableFramebuffer( lua_State* L ) {
rlEnableFramebuffer( luaL_checkinteger( L, 1 ) );
return 0;
@@ -509,7 +509,7 @@ int lrlglEnableFramebuffer( lua_State *L ) {
Disable render texture (fbo), return to default framebuffer
*/
-int lrlglDisableFramebuffer( lua_State *L ) {
+int lrlglDisableFramebuffer( lua_State* L ) {
rlDisableFramebuffer();
return 0;
@@ -520,7 +520,7 @@ int lrlglDisableFramebuffer( lua_State *L ) {
Activate multiple draw color buffers
*/
-int lrlglActiveDrawBuffers( lua_State *L ) {
+int lrlglActiveDrawBuffers( lua_State* L ) {
rlActiveDrawBuffers( luaL_checkinteger( L, 1 ) );
return 0;
@@ -535,7 +535,7 @@ int lrlglActiveDrawBuffers( lua_State *L ) {
Enable color blending
*/
-int lrlglEnableColorBlend( lua_State *L ) {
+int lrlglEnableColorBlend( lua_State* L ) {
rlEnableColorBlend();
return 0;
@@ -546,7 +546,7 @@ int lrlglEnableColorBlend( lua_State *L ) {
Disable color blending
*/
-int lrlglDisableColorBlend( lua_State *L ) {
+int lrlglDisableColorBlend( lua_State* L ) {
rlDisableColorBlend();
return 0;
@@ -557,7 +557,7 @@ int lrlglDisableColorBlend( lua_State *L ) {
Enable depth test
*/
-int lrlglEnableDepthTest( lua_State *L ) {
+int lrlglEnableDepthTest( lua_State* L ) {
rlEnableDepthTest();
return 0;
@@ -568,7 +568,7 @@ int lrlglEnableDepthTest( lua_State *L ) {
Disable depth test
*/
-int lrlglDisableDepthTest( lua_State *L ) {
+int lrlglDisableDepthTest( lua_State* L ) {
rlDisableDepthTest();
return 0;
@@ -579,7 +579,7 @@ int lrlglDisableDepthTest( lua_State *L ) {
Enable depth write
*/
-int lrlglEnableDepthMask( lua_State *L ) {
+int lrlglEnableDepthMask( lua_State* L ) {
rlEnableDepthMask();
return 0;
@@ -590,7 +590,7 @@ int lrlglEnableDepthMask( lua_State *L ) {
Disable depth write
*/
-int lrlglDisableDepthMask( lua_State *L ) {
+int lrlglDisableDepthMask( lua_State* L ) {
rlDisableDepthMask();
return 0;
@@ -601,7 +601,7 @@ int lrlglDisableDepthMask( lua_State *L ) {
Enable backface culling
*/
-int lrlglEnableBackfaceCulling( lua_State *L ) {
+int lrlglEnableBackfaceCulling( lua_State* L ) {
rlEnableBackfaceCulling();
return 0;
@@ -612,7 +612,7 @@ int lrlglEnableBackfaceCulling( lua_State *L ) {
Disable backface culling
*/
-int lrlglDisableBackfaceCulling( lua_State *L ) {
+int lrlglDisableBackfaceCulling( lua_State* L ) {
rlDisableBackfaceCulling();
return 0;
@@ -623,7 +623,7 @@ int lrlglDisableBackfaceCulling( lua_State *L ) {
Set face culling mode
*/
-int lrlglSetCullFace( lua_State *L ) {
+int lrlglSetCullFace( lua_State* L ) {
rlSetCullFace( luaL_checkinteger( L, 1 ) );
return 0;
@@ -634,7 +634,7 @@ int lrlglSetCullFace( lua_State *L ) {
Enable scissor test
*/
-int lrlglEnableScissorTest( lua_State *L ) {
+int lrlglEnableScissorTest( lua_State* L ) {
rlEnableScissorTest();
return 0;
@@ -645,7 +645,7 @@ int lrlglEnableScissorTest( lua_State *L ) {
Disable scissor test
*/
-int lrlglDisableScissorTest( lua_State *L ) {
+int lrlglDisableScissorTest( lua_State* L ) {
rlDisableScissorTest();
return 0;
@@ -656,7 +656,7 @@ int lrlglDisableScissorTest( lua_State *L ) {
Scissor test
*/
-int lrlglScissor( lua_State *L ) {
+int lrlglScissor( lua_State* L ) {
Rectangle area = uluaGetRectangle( L, 1 );
rlScissor( area.x, area.y, area.width, area.height );
@@ -669,7 +669,7 @@ int lrlglScissor( lua_State *L ) {
Enable wire mode
*/
-int lrlglEnableWireMode( lua_State *L ) {
+int lrlglEnableWireMode( lua_State* L ) {
rlEnableWireMode();
return 0;
@@ -680,7 +680,7 @@ int lrlglEnableWireMode( lua_State *L ) {
Disable wire mode
*/
-int lrlglDisableWireMode( lua_State *L ) {
+int lrlglDisableWireMode( lua_State* L ) {
rlDisableWireMode();
return 0;
@@ -691,7 +691,7 @@ int lrlglDisableWireMode( lua_State *L ) {
Set the line drawing width
*/
-int lrlglSetLineWidth( lua_State *L ) {
+int lrlglSetLineWidth( lua_State* L ) {
rlSetLineWidth( luaL_checknumber( L, 1 ) );
return 0;
@@ -704,7 +704,7 @@ Get the line drawing width
- Success return float
*/
-int lrlglGetLineWidth( lua_State *L ) {
+int lrlglGetLineWidth( lua_State* L ) {
lua_pushnumber( L, rlGetLineWidth() );
return 1;
@@ -715,7 +715,7 @@ int lrlglGetLineWidth( lua_State *L ) {
Enable line aliasing
*/
-int lrlglEnableSmoothLines( lua_State *L ) {
+int lrlglEnableSmoothLines( lua_State* L ) {
rlEnableSmoothLines();
return 0;
@@ -726,7 +726,7 @@ int lrlglEnableSmoothLines( lua_State *L ) {
Disable line aliasing
*/
-int lrlglDisableSmoothLines( lua_State *L ) {
+int lrlglDisableSmoothLines( lua_State* L ) {
rlDisableSmoothLines();
return 0;
@@ -737,7 +737,7 @@ int lrlglDisableSmoothLines( lua_State *L ) {
Enable stereo rendering
*/
-int lrlglEnableStereoRender( lua_State *L ) {
+int lrlglEnableStereoRender( lua_State* L ) {
rlEnableStereoRender();
return 0;
@@ -748,7 +748,7 @@ int lrlglEnableStereoRender( lua_State *L ) {
Enable stereo rendering
*/
-int lrlglDisableStereoRender( lua_State *L ) {
+int lrlglDisableStereoRender( lua_State* L ) {
rlDisableStereoRender();
return 0;
@@ -761,7 +761,7 @@ Check if stereo render is enabled
- Success return bool
*/
-int lrlglIsStereoRenderEnabled( lua_State *L ) {
+int lrlglIsStereoRenderEnabled( lua_State* L ) {
lua_pushboolean( L, rlIsStereoRenderEnabled() );
return 1;
@@ -772,7 +772,7 @@ int lrlglIsStereoRenderEnabled( lua_State *L ) {
Clear color buffer with color
*/
-int lrlglClearColor( lua_State *L ) {
+int lrlglClearColor( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
rlClearColor( color.r, color.g, color.b, color.a );
@@ -785,7 +785,7 @@ int lrlglClearColor( lua_State *L ) {
Clear used screen buffers (color and depth)
*/
-int lrlglClearScreenBuffers( lua_State *L ) {
+int lrlglClearScreenBuffers( lua_State* L ) {
rlClearScreenBuffers();
return 0;
@@ -796,7 +796,7 @@ int lrlglClearScreenBuffers( lua_State *L ) {
Check and log OpenGL error codes
*/
-int lrlglCheckErrors( lua_State *L ) {
+int lrlglCheckErrors( lua_State* L ) {
rlCheckErrors();
return 0;
@@ -807,7 +807,7 @@ int lrlglCheckErrors( lua_State *L ) {
Set blending mode
*/
-int lrlglSetBlendMode( lua_State *L ) {
+int lrlglSetBlendMode( lua_State* L ) {
rlSetBlendMode( luaL_checkinteger( L, 1 ) );
return 0;
@@ -818,7 +818,7 @@ int lrlglSetBlendMode( lua_State *L ) {
Set blending mode factor and equation (using OpenGL factors)
*/
-int lrlglSetBlendFactors( lua_State *L ) {
+int lrlglSetBlendFactors( lua_State* L ) {
int glSrcFactor = luaL_checkinteger( L, 1 );
int glDstFactor = luaL_checkinteger( L, 2 );
int glEquation = luaL_checkinteger( L, 3 );
@@ -833,7 +833,7 @@ int lrlglSetBlendFactors( lua_State *L ) {
Set blending mode factors and equations separately (using OpenGL factors)
*/
-int lrlglSetBlendFactorsSeparate( lua_State *L ) {
+int lrlglSetBlendFactorsSeparate( lua_State* L ) {
int glSrcRGB = luaL_checkinteger( L, 1 );
int glDstRGB = luaL_checkinteger( L, 2 );
int glSrcAlpha = luaL_checkinteger( L, 3 );
@@ -858,7 +858,7 @@ Get current OpenGL version
- Success return int
*/
-int lrlglGetVersion( lua_State *L ) {
+int lrlglGetVersion( lua_State* L ) {
lua_pushinteger( L, rlGetVersion() );
return 1;
@@ -869,7 +869,7 @@ int lrlglGetVersion( lua_State *L ) {
Set current framebuffer width
*/
-int lrlglSetFramebufferWidth( lua_State *L ) {
+int lrlglSetFramebufferWidth( lua_State* L ) {
int width = luaL_checkinteger( L, 1 );
rlSetFramebufferWidth( width );
@@ -884,7 +884,7 @@ Get default framebuffer width
- Success return int
*/
-int lrlglGetFramebufferWidth( lua_State *L ) {
+int lrlglGetFramebufferWidth( lua_State* L ) {
lua_pushinteger( L, rlGetFramebufferWidth() );
return 1;
@@ -895,7 +895,7 @@ int lrlglGetFramebufferWidth( lua_State *L ) {
Set current framebuffer height
*/
-int lrlglSetFramebufferHeight( lua_State *L ) {
+int lrlglSetFramebufferHeight( lua_State* L ) {
int height = luaL_checkinteger( L, 1 );
rlSetFramebufferWidth( height );
@@ -910,7 +910,7 @@ Get default framebuffer height
- Success return int
*/
-int lrlglGetFramebufferHeight( lua_State *L ) {
+int lrlglGetFramebufferHeight( lua_State* L ) {
lua_pushinteger( L, rlGetFramebufferHeight() );
return 1;
@@ -923,7 +923,7 @@ Get default texture id
- Success return int
*/
-int lrlglGetTextureIdDefault( lua_State *L ) {
+int lrlglGetTextureIdDefault( lua_State* L ) {
lua_pushinteger( L, rlGetTextureIdDefault() );
return 1;
@@ -936,7 +936,7 @@ Get default shader id
- Success return int
*/
-int lrlglGetShaderIdDefault( lua_State *L ) {
+int lrlglGetShaderIdDefault( lua_State* L ) {
lua_pushinteger( L, rlGetShaderIdDefault() );
return 1;
@@ -949,8 +949,8 @@ Get default shader locations
- Success return int{}
*/
-int lrlglGetShaderLocsDefault( lua_State *L ) {
- int *locs = rlGetShaderLocsDefault();
+int lrlglGetShaderLocsDefault( lua_State* L ) {
+ int* locs = rlGetShaderLocsDefault();
lua_createtable( L, RL_MAX_SHADER_LOCATIONS, 0 );
@@ -973,7 +973,7 @@ Load a render batch system
- Success return rlRenderBatch
*/
-int lrlglLoadRenderBatch( lua_State *L ) {
+int lrlglLoadRenderBatch( lua_State* L ) {
int numBuffers = luaL_checkinteger( L, 1 );
int bufferElements = luaL_checkinteger( L, 2 );
@@ -987,8 +987,8 @@ int lrlglLoadRenderBatch( lua_State *L ) {
Unload render batch system
*/
-int lrlglUnloadRenderBatch( lua_State *L ) {
- rlRenderBatch *renderBatch = uluaGetRLRenderBatch( L, 1 );
+int lrlglUnloadRenderBatch( lua_State* L ) {
+ rlRenderBatch* renderBatch = uluaGetRLRenderBatch( L, 1 );
rlUnloadRenderBatch( *renderBatch );
@@ -1000,8 +1000,8 @@ int lrlglUnloadRenderBatch( lua_State *L ) {
Draw render batch data (Update->Draw->Reset)
*/
-int lrlglDrawRenderBatch( lua_State *L ) {
- rlRenderBatch *renderBatch = uluaGetRLRenderBatch( L, 1 );
+int lrlglDrawRenderBatch( lua_State* L ) {
+ rlRenderBatch* renderBatch = uluaGetRLRenderBatch( L, 1 );
rlDrawRenderBatch( renderBatch );
@@ -1013,8 +1013,8 @@ int lrlglDrawRenderBatch( lua_State *L ) {
Set the active render batch for rlgl (nil for default internal)
*/
-int lrlglSetRenderBatchActive( lua_State *L ) {
- rlRenderBatch *renderBatch = NULL;
+int lrlglSetRenderBatchActive( lua_State* L ) {
+ rlRenderBatch* renderBatch = NULL;
if ( !lua_isnil( L, 1 ) ) {
renderBatch = uluaGetRLRenderBatch( L, 1 );
@@ -1029,7 +1029,7 @@ int lrlglSetRenderBatchActive( lua_State *L ) {
Update and draw internal render batch
*/
-int lrlglDrawRenderBatchActive( lua_State *L ) {
+int lrlglDrawRenderBatchActive( lua_State* L ) {
rlDrawRenderBatchActive();
return 0;
@@ -1042,7 +1042,7 @@ Check internal buffer overflow for a given number of vertex and force a rlRender
- Success return bool
*/
-int lrlglCheckRenderBatchLimit( lua_State *L ) {
+int lrlglCheckRenderBatchLimit( lua_State* L ) {
lua_pushboolean( L, rlCheckRenderBatchLimit( luaL_checkinteger( L, 1 ) ) );
return 1;
@@ -1053,7 +1053,7 @@ int lrlglCheckRenderBatchLimit( lua_State *L ) {
Set current texture for render batch and check buffers limits
*/
-int lrlglSetTexture( lua_State *L ) {
+int lrlglSetTexture( lua_State* L ) {
rlSetTexture( luaL_checkinteger( L, 1 ) );
return 0;
@@ -1070,7 +1070,7 @@ Load vertex array (vao) if supported
- Success return int
*/
-int lrlglLoadVertexArray( lua_State *L ) {
+int lrlglLoadVertexArray( lua_State* L ) {
lua_pushinteger( L, rlLoadVertexArray() );
return 1;
@@ -1083,8 +1083,8 @@ Load a vertex buffer attribute
- Success return int
*/
-int lrlglLoadVertexBuffer( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
+int lrlglLoadVertexBuffer( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
bool dynamic = uluaGetBoolean( L, 2 );
lua_pushinteger( L, rlLoadVertexBuffer( buffer->data, buffer->size, dynamic ) );
@@ -1099,8 +1099,8 @@ Load a new attributes element buffer
- Success return int
*/
-int lrlglLoadVertexBufferElement( lua_State *L ) {
- Buffer *buffer = uluaGetBuffer( L, 1 );
+int lrlglLoadVertexBufferElement( lua_State* L ) {
+ Buffer* buffer = uluaGetBuffer( L, 1 );
bool dynamic = uluaGetBoolean( L, 2 );
lua_pushinteger( L, rlLoadVertexBufferElement( buffer->data, buffer->size, dynamic ) );
@@ -1113,9 +1113,9 @@ int lrlglLoadVertexBufferElement( lua_State *L ) {
Update GPU buffer with new data
*/
-int lrlglUpdateVertexBuffer( lua_State *L ) {
+int lrlglUpdateVertexBuffer( lua_State* L ) {
int bufferId = luaL_checkinteger( L, 1 );
- Buffer *buffer = uluaGetBuffer( L, 2 );
+ Buffer* buffer = uluaGetBuffer( L, 2 );
int offset = luaL_checkinteger( L, 3 );
rlUpdateVertexBuffer( bufferId, buffer->data, buffer->size, offset );
@@ -1128,9 +1128,9 @@ int lrlglUpdateVertexBuffer( lua_State *L ) {
Update vertex buffer elements with new data
*/
-int lrlglUpdateVertexBufferElements( lua_State *L ) {
+int lrlglUpdateVertexBufferElements( lua_State* L ) {
int bufferId = luaL_checkinteger( L, 1 );
- Buffer *buffer = uluaGetBuffer( L, 2 );
+ Buffer* buffer = uluaGetBuffer( L, 2 );
int offset = luaL_checkinteger( L, 3 );
rlUpdateVertexBufferElements( bufferId, buffer->data, buffer->size, offset );
@@ -1143,7 +1143,7 @@ int lrlglUpdateVertexBufferElements( lua_State *L ) {
Unload vertex array object (VAO)
*/
-int lrlglUnloadVertexArray( lua_State *L ) {
+int lrlglUnloadVertexArray( lua_State* L ) {
rlUnloadVertexArray( luaL_checkinteger( L, 1 ) );
return 0;
@@ -1154,7 +1154,7 @@ int lrlglUnloadVertexArray( lua_State *L ) {
Unload vertex buffer (VBO)
*/
-int lrlglUnloadVertexBuffer( lua_State *L ) {
+int lrlglUnloadVertexBuffer( lua_State* L ) {
rlUnloadVertexBuffer( luaL_checkinteger( L, 1 ) );
return 0;
@@ -1165,7 +1165,7 @@ int lrlglUnloadVertexBuffer( lua_State *L ) {
Set vertex attribute. NOTE: Pointer should be given in size of bytes
*/
-int lrlglSetVertexAttribute( lua_State *L ) {
+int lrlglSetVertexAttribute( lua_State* L ) {
int index = luaL_checkinteger( L, 1 );
int compSize = luaL_checkinteger( L, 2 );
int type = luaL_checkinteger( L, 3 );
@@ -1183,7 +1183,7 @@ int lrlglSetVertexAttribute( lua_State *L ) {
Set vertex attribute divisor
*/
-int lrlglSetVertexAttributeDivisor( lua_State *L ) {
+int lrlglSetVertexAttributeDivisor( lua_State* L ) {
unsigned int index = (unsigned int)luaL_checkinteger( L, 1 );
int divisor = luaL_checkinteger( L, 2 );
@@ -1197,7 +1197,7 @@ int lrlglSetVertexAttributeDivisor( lua_State *L ) {
Set vertex attribute default value
*/
-int lrlglSetVertexAttributeDefault( lua_State *L ) {
+int lrlglSetVertexAttributeDefault( lua_State* L ) {
int locIndex = luaL_checkinteger( L, 1 );
int attribType = luaL_checkinteger( L, 3 );
int count = uluaGetTableLen( L, 2 );
@@ -1222,7 +1222,7 @@ int lrlglSetVertexAttributeDefault( lua_State *L ) {
Draw vertex array
*/
-int lrlglDrawVertexArray( lua_State *L ) {
+int lrlglDrawVertexArray( lua_State* L ) {
int offset = luaL_checkinteger( L, 1 );
int count = luaL_checkinteger( L, 2 );
@@ -1236,10 +1236,10 @@ int lrlglDrawVertexArray( lua_State *L ) {
Draw vertex array elements
*/
-int lrlglDrawVertexArrayElements( lua_State *L ) {
+int lrlglDrawVertexArrayElements( lua_State* L ) {
int offset = luaL_checkinteger( L, 1 );
int count = luaL_checkinteger( L, 2 );
- Buffer *buffer = uluaGetBuffer( L, 3 );
+ Buffer* buffer = uluaGetBuffer( L, 3 );
rlDrawVertexArrayElements( offset, count, buffer->data );
@@ -1251,7 +1251,7 @@ int lrlglDrawVertexArrayElements( lua_State *L ) {
Draw vertex array instanced
*/
-int lrlglDrawVertexArrayInstanced( lua_State *L ) {
+int lrlglDrawVertexArrayInstanced( lua_State* L ) {
int offset = luaL_checkinteger( L, 1 );
int count = luaL_checkinteger( L, 2 );
int instances = luaL_checkinteger( L, 3 );
@@ -1266,10 +1266,10 @@ int lrlglDrawVertexArrayInstanced( lua_State *L ) {
Draw vertex array elements instanced
*/
-int lrlglDrawVertexArrayElementsInstanced( lua_State *L ) {
+int lrlglDrawVertexArrayElementsInstanced( lua_State* L ) {
int offset = luaL_checkinteger( L, 1 );
int count = luaL_checkinteger( L, 2 );
- Buffer *buffer = uluaGetBuffer( L, 3 );
+ Buffer* buffer = uluaGetBuffer( L, 3 );
int instances = luaL_checkinteger( L, 4 );
rlDrawVertexArrayElementsInstanced( offset, count, buffer->data, instances );
@@ -1288,8 +1288,8 @@ Load texture in GPU
- Success return int
*/
-int lrlglLoadTexture( lua_State *L ) {
- Buffer *data = uluaGetBuffer( L, 1 );
+int lrlglLoadTexture( lua_State* L ) {
+ Buffer* data = uluaGetBuffer( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
int format = luaL_checkinteger( L, 3 );
int mipmapCount = luaL_checkinteger( L, 4 );
@@ -1306,7 +1306,7 @@ Load depth texture/renderbuffer (to be attached to fbo)
- Success return int
*/
-int lrlglLoadTextureDepth( lua_State *L ) {
+int lrlglLoadTextureDepth( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
bool useRenderBuffer = uluaGetBoolean( L, 2 );
@@ -1322,8 +1322,8 @@ Load texture cubemap
- Success return int
*/
-int lrlglLoadTextureCubemap( lua_State *L ) {
- Buffer *data = uluaGetBuffer( L, 1 );
+int lrlglLoadTextureCubemap( lua_State* L ) {
+ Buffer* data = uluaGetBuffer( L, 1 );
int size = luaL_checkinteger( L, 2 );
int format = luaL_checkinteger( L, 3 );
@@ -1337,12 +1337,12 @@ int lrlglLoadTextureCubemap( lua_State *L ) {
Update GPU texture with new data
*/
-int lrlglUpdateTexture( lua_State *L ) {
+int lrlglUpdateTexture( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
Vector2 offset = uluaGetVector2( L, 2 );
Vector2 size = uluaGetVector2( L, 3 );
int format = luaL_checkinteger( L, 4 );
- Buffer *data = uluaGetBuffer( L, 5 );
+ Buffer* data = uluaGetBuffer( L, 5 );
rlUpdateTexture( id, (int)offset.x, (int)offset.y, (int)size.x, (int)size.y, format, data->data );
@@ -1356,7 +1356,7 @@ Get OpenGL internal formats
- Success return int, int, int
*/
-int lrlglGetGlTextureFormats( lua_State *L ) {
+int lrlglGetGlTextureFormats( lua_State* L ) {
int format = luaL_checkinteger( L, 1 );
unsigned int glInternalFormat, glFormat, glType;
@@ -1376,7 +1376,7 @@ Get name string for pixel format
- Success return string
*/
-int lrlglGetPixelFormatName( lua_State *L ) {
+int lrlglGetPixelFormatName( lua_State* L ) {
int format = luaL_checkinteger( L, 1 );
lua_pushstring( L, rlGetPixelFormatName( format ) );
@@ -1389,7 +1389,7 @@ int lrlglGetPixelFormatName( lua_State *L ) {
Unload texture from GPU memory
*/
-int lrlglUnloadTexture( lua_State *L ) {
+int lrlglUnloadTexture( lua_State* L ) {
rlUnloadTexture( (unsigned int)luaL_checkinteger( L, 1 ) );
return 0;
@@ -1402,7 +1402,7 @@ Generate mipmap data for selected texture
- Success return int
*/
-int lrlglGenTextureMipmaps( lua_State *L ) {
+int lrlglGenTextureMipmaps( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
int format = luaL_checkinteger( L, 3 );
@@ -1422,7 +1422,7 @@ Read texture pixel data
- Success return Buffer
*/
-int lrlglReadTexturePixels( lua_State *L ) {
+int lrlglReadTexturePixels( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
int format = luaL_checkinteger( L, 3 );
@@ -1447,7 +1447,7 @@ Read screen pixel data (color buffer)
- Success return Buffer
*/
-int lrlglReadScreenPixels( lua_State *L ) {
+int lrlglReadScreenPixels( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
size_t dataSize = (int)size.x * (int)size.y * 4 * sizeof(unsigned char);
@@ -1474,7 +1474,7 @@ Load an empty framebuffer
- Success return int
*/
-int lrlglLoadFramebuffer( lua_State *L ) {
+int lrlglLoadFramebuffer( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
lua_pushinteger( L, rlLoadFramebuffer( size.x, size.y ) );
@@ -1487,7 +1487,7 @@ int lrlglLoadFramebuffer( lua_State *L ) {
Attach texture/renderbuffer to a framebuffer
*/
-int lrlglFramebufferAttach( lua_State *L ) {
+int lrlglFramebufferAttach( lua_State* L ) {
unsigned int fboId = luaL_checkinteger( L, 1 );
unsigned int texId = luaL_checkinteger( L, 2 );
int attachType = luaL_checkinteger( L, 3 );
@@ -1506,7 +1506,7 @@ Verify framebuffer is complete
- Success return bool
*/
-int lrlglFramebufferComplete( lua_State *L ) {
+int lrlglFramebufferComplete( lua_State* L ) {
unsigned int id = luaL_checkinteger( L, 1 );
lua_pushboolean( L, rlFramebufferComplete( id ) );
@@ -1519,7 +1519,7 @@ int lrlglFramebufferComplete( lua_State *L ) {
Delete framebuffer from GPU
*/
-int lrlglUnloadFramebuffer( lua_State *L ) {
+int lrlglUnloadFramebuffer( lua_State* L ) {
unsigned int id = luaL_checkinteger( L, 1 );
rlUnloadFramebuffer( id );
@@ -1538,7 +1538,7 @@ Load shader from code strings
- Success return int
*/
-int lrlglLoadShaderCode( lua_State *L ) {
+int lrlglLoadShaderCode( lua_State* L ) {
lua_pushinteger( L, rlLoadShaderCode( luaL_checkstring( L, 1 ), luaL_checkstring( L, 2 ) ) );
return 1;
@@ -1551,7 +1551,7 @@ Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_
- Success return int
*/
-int lrlglCompileShader( lua_State *L ) {
+int lrlglCompileShader( lua_State* L ) {
int type = luaL_checkinteger( L, 2 );
lua_pushinteger( L, rlCompileShader( luaL_checkstring( L, 1 ), type ) );
@@ -1566,7 +1566,7 @@ Load custom shader program
- Success return int
*/
-int lrlglLoadShaderProgram( lua_State *L ) {
+int lrlglLoadShaderProgram( lua_State* L ) {
unsigned int vShaderId = (unsigned int)luaL_checkinteger( L, 1 );
unsigned int fShaderId = (unsigned int)luaL_checkinteger( L, 2 );
@@ -1580,7 +1580,7 @@ int lrlglLoadShaderProgram( lua_State *L ) {
Unload shader program
*/
-int lrlglUnloadShaderProgram( lua_State *L ) {
+int lrlglUnloadShaderProgram( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
rlUnloadShaderProgram( id );
@@ -1595,7 +1595,7 @@ Get shader location uniform
- Success return int
*/
-int lrlglGetLocationUniform( lua_State *L ) {
+int lrlglGetLocationUniform( lua_State* L ) {
unsigned int shaderId = (unsigned int)luaL_checkinteger( L, 1 );
lua_pushinteger( L, rlGetLocationUniform( shaderId, luaL_checkstring( L, 2 ) ) );
@@ -1610,7 +1610,7 @@ Get shader location attribute
- Success return int
*/
-int lrlglGetLocationAttrib( lua_State *L ) {
+int lrlglGetLocationAttrib( lua_State* L ) {
unsigned int shaderId = (unsigned int)luaL_checkinteger( L, 1 );
lua_pushinteger( L, rlGetLocationAttrib( shaderId, luaL_checkstring( L, 2 ) ) );
@@ -1623,9 +1623,9 @@ int lrlglGetLocationAttrib( lua_State *L ) {
Set shader value uniform
*/
-int lrlglSetUniform( lua_State *L ) {
+int lrlglSetUniform( lua_State* L ) {
int locIndex = luaL_checkinteger( L, 1 );
- Buffer *value = uluaGetBuffer( L, 2 );
+ Buffer* value = uluaGetBuffer( L, 2 );
int uniformType = luaL_checkinteger( L, 3 );
int count = luaL_checkinteger( L, 4 );
@@ -1639,7 +1639,7 @@ int lrlglSetUniform( lua_State *L ) {
Set shader value matrix
*/
-int lrlglSetUniformMatrix( lua_State *L ) {
+int lrlglSetUniformMatrix( lua_State* L ) {
int locIndex = luaL_checkinteger( L, 1 );
Matrix mat = uluaGetMatrix( L, 2 );
@@ -1653,7 +1653,7 @@ int lrlglSetUniformMatrix( lua_State *L ) {
Set shader value sampler
*/
-int lrlglSetUniformSampler( lua_State *L ) {
+int lrlglSetUniformSampler( lua_State* L ) {
int locIndex = luaL_checkinteger( L, 1 );
unsigned int textureId = (unsigned int)luaL_checkinteger( L, 2 );
@@ -1667,7 +1667,7 @@ int lrlglSetUniformSampler( lua_State *L ) {
Set shader currently active (id and locations)
*/
-int lrlglSetShader( lua_State *L ) {
+int lrlglSetShader( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
int t = 2, i = 0;
@@ -1698,7 +1698,7 @@ Load compute shader program
- Success return int
*/
-int lrlglLoadComputeShaderProgram( lua_State *L ) {
+int lrlglLoadComputeShaderProgram( lua_State* L ) {
unsigned int shaderId = (unsigned int)luaL_checkinteger( L, 1 );
lua_pushinteger( L, rlLoadComputeShaderProgram( shaderId ) );
@@ -1711,7 +1711,7 @@ int lrlglLoadComputeShaderProgram( lua_State *L ) {
Dispatch compute shader (equivalent to *draw* for graphics pipeline)
*/
-int lrlglComputeShaderDispatch( lua_State *L ) {
+int lrlglComputeShaderDispatch( lua_State* L ) {
unsigned int groupX = (unsigned int)luaL_checkinteger( L, 1 );
unsigned int groupY = (unsigned int)luaL_checkinteger( L, 2 );
unsigned int groupZ = (unsigned int)luaL_checkinteger( L, 3 );
@@ -1732,9 +1732,9 @@ Load shader storage buffer object (SSBO)
- Success return int
*/
-int lrlglLoadShaderBuffer( lua_State *L ) {
+int lrlglLoadShaderBuffer( lua_State* L ) {
unsigned int size = (unsigned int)luaL_checkinteger( L, 1 );
- Buffer *data = uluaGetBuffer( L, 2 );
+ Buffer* data = uluaGetBuffer( L, 2 );
int usageHint = luaL_checkinteger( L, 3 );
lua_pushinteger( L, rlLoadShaderBuffer( size, data->data, usageHint ) );
@@ -1747,7 +1747,7 @@ int lrlglLoadShaderBuffer( lua_State *L ) {
Unload shader storage buffer object (SSBO)
*/
-int lrlglUnloadShaderBuffer( lua_State *L ) {
+int lrlglUnloadShaderBuffer( lua_State* L ) {
unsigned int ssboId = (unsigned int)luaL_checkinteger( L, 1 );
rlUnloadShaderBuffer( ssboId );
@@ -1760,9 +1760,9 @@ int lrlglUnloadShaderBuffer( lua_State *L ) {
Update SSBO buffer data
*/
-int lrlglUpdateShaderBuffer( lua_State *L ) {
+int lrlglUpdateShaderBuffer( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
- Buffer *data = uluaGetBuffer( L, 2 );
+ Buffer* data = uluaGetBuffer( L, 2 );
unsigned int offset = (unsigned int)luaL_checkinteger( L, 3 );
rlUpdateShaderBuffer( id, data->data, data->size, offset );
@@ -1775,7 +1775,7 @@ int lrlglUpdateShaderBuffer( lua_State *L ) {
Bind SSBO buffer
*/
-int lrlglBindShaderBuffer( lua_State *L ) {
+int lrlglBindShaderBuffer( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
unsigned int index = (unsigned int)luaL_checkinteger( L, 2 );
@@ -1791,7 +1791,7 @@ Read SSBO buffer data (GPU->CPU)
- Success return Buffer
*/
-int lrlglReadShaderBuffer( lua_State *L ) {
+int lrlglReadShaderBuffer( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
unsigned int count = (unsigned int)luaL_checkinteger( L, 2 );
unsigned int offset = (unsigned int)luaL_checkinteger( L, 3 );
@@ -1812,7 +1812,7 @@ int lrlglReadShaderBuffer( lua_State *L ) {
Copy SSBO data between buffers
*/
-int lrlglCopyShaderBuffer( lua_State *L ) {
+int lrlglCopyShaderBuffer( lua_State* L ) {
unsigned int destId = (unsigned int)luaL_checkinteger( L, 1 );
unsigned int srcId = (unsigned int)luaL_checkinteger( L, 2 );
unsigned int destOffset = (unsigned int)luaL_checkinteger( L, 3 );
@@ -1831,7 +1831,7 @@ Get SSBO buffer size
- Success return int
*/
-int lrlglGetShaderBufferSize( lua_State *L ) {
+int lrlglGetShaderBufferSize( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
lua_pushinteger( L, rlGetShaderBufferSize( id ) );
@@ -1848,7 +1848,7 @@ int lrlglGetShaderBufferSize( lua_State *L ) {
Bind image texture
*/
-int lrlglBindImageTexture( lua_State *L ) {
+int lrlglBindImageTexture( lua_State* L ) {
unsigned int id = (unsigned int)luaL_checkinteger( L, 1 );
unsigned int index = (unsigned int)luaL_checkinteger( L, 2 );
int format = luaL_checkinteger( L, 3 );
@@ -1870,7 +1870,7 @@ Get internal modelview matrix
- Success return Matrix
*/
-int lrlglGetMatrixModelview( lua_State *L ) {
+int lrlglGetMatrixModelview( lua_State* L ) {
uluaPushMatrix( L, rlGetMatrixModelview() );
return 1;
@@ -1883,7 +1883,7 @@ Get internal projection matrix
- Success return Matrix
*/
-int lrlglGetMatrixProjection( lua_State *L ) {
+int lrlglGetMatrixProjection( lua_State* L ) {
uluaPushMatrix( L, rlGetMatrixProjection() );
return 1;
@@ -1896,7 +1896,7 @@ Get internal accumulated transform matrix
- Success return Matrix
*/
-int lrlglGetMatrixTransform( lua_State *L ) {
+int lrlglGetMatrixTransform( lua_State* L ) {
uluaPushMatrix( L, rlGetMatrixTransform() );
return 1;
@@ -1909,7 +1909,7 @@ Get internal projection matrix for stereo render (selected eye)
- Success return Matrix
*/
-int lrlglGetMatrixProjectionStereo( lua_State *L ) {
+int lrlglGetMatrixProjectionStereo( lua_State* L ) {
uluaPushMatrix( L, rlGetMatrixProjectionStereo( luaL_checkinteger( L, 1 ) ) );
return 1;
@@ -1922,7 +1922,7 @@ Get internal view offset matrix for stereo render (selected eye)
- Success return Matrix
*/
-int lrlglGetMatrixViewOffsetStereo( lua_State *L ) {
+int lrlglGetMatrixViewOffsetStereo( lua_State* L ) {
uluaPushMatrix( L, rlGetMatrixViewOffsetStereo( luaL_checkinteger( L, 1 ) ) );
return 1;
@@ -1933,7 +1933,7 @@ int lrlglGetMatrixViewOffsetStereo( lua_State *L ) {
Set a custom projection matrix (replaces internal projection matrix)
*/
-int lrlglSetMatrixProjection( lua_State *L ) {
+int lrlglSetMatrixProjection( lua_State* L ) {
rlSetMatrixProjection( uluaGetMatrix( L, 1 ) );
return 0;
@@ -1944,7 +1944,7 @@ int lrlglSetMatrixProjection( lua_State *L ) {
Set a custom modelview matrix (replaces internal modelview matrix)
*/
-int lrlglSetMatrixModelview( lua_State *L ) {
+int lrlglSetMatrixModelview( lua_State* L ) {
rlSetMatrixModelview( uluaGetMatrix( L, 1 ) );
return 0;
@@ -1955,7 +1955,7 @@ int lrlglSetMatrixModelview( lua_State *L ) {
Set eyes projection matrices for stereo rendering
*/
-int lrlglSetMatrixProjectionStereo( lua_State *L ) {
+int lrlglSetMatrixProjectionStereo( lua_State* L ) {
rlSetMatrixProjectionStereo( uluaGetMatrix( L, 1 ), uluaGetMatrix( L, 2 ) );
return 0;
@@ -1966,7 +1966,7 @@ int lrlglSetMatrixProjectionStereo( lua_State *L ) {
Set eyes view offsets matrices for stereo rendering
*/
-int lrlglSetMatrixViewOffsetStereo( lua_State *L ) {
+int lrlglSetMatrixViewOffsetStereo( lua_State* L ) {
rlSetMatrixViewOffsetStereo( uluaGetMatrix( L, 1 ), uluaGetMatrix( L, 2 ) );
return 0;
diff --git a/src/rmath.c b/src/rmath.c
index 23a93bf..d8f85b6 100644
--- a/src/rmath.c
+++ b/src/rmath.c
@@ -22,7 +22,7 @@ Clamp float value
- Success return float
*/
-int lmathClamp( lua_State *L ) {
+int lmathClamp( lua_State* L ) {
float value = luaL_checknumber( L, 1 );
float min = luaL_checknumber( L, 2 );
float max = luaL_checknumber( L, 3 );
@@ -39,7 +39,7 @@ Calculate linear interpolation between two floats
- Success return float
*/
-int lmathLerp( lua_State *L ) {
+int lmathLerp( lua_State* L ) {
float start = luaL_checknumber( L, 1 );
float end = luaL_checknumber( L, 2 );
float amount = luaL_checknumber( L, 3 );
@@ -56,7 +56,7 @@ Normalize input value within input range
- Success return float
*/
-int lmathNormalize( lua_State *L ) {
+int lmathNormalize( lua_State* L ) {
float value = luaL_checknumber( L, 1 );
float start = luaL_checknumber( L, 2 );
float end = luaL_checknumber( L, 3 );
@@ -73,7 +73,7 @@ Remap input value within input range to output range
- Success return float
*/
-int lmathRemap( lua_State *L ) {
+int lmathRemap( lua_State* L ) {
float value = luaL_checknumber( L, 1 );
float inputStart = luaL_checknumber( L, 2 );
float inputEnd = luaL_checknumber( L, 3 );
@@ -92,7 +92,7 @@ Wrap input value from min to max
- Success return float
*/
-int lmathWrap( lua_State *L ) {
+int lmathWrap( lua_State* L ) {
float value = luaL_checknumber( L, 1 );
float min = luaL_checknumber( L, 2 );
float max = luaL_checknumber( L, 3 );
@@ -109,7 +109,7 @@ Check whether two given floats are almost equal
- Success return int
*/
-int lmathFloatEquals( lua_State *L ) {
+int lmathFloatEquals( lua_State* L ) {
float x = luaL_checknumber( L, 1 );
float y = luaL_checknumber( L, 2 );
@@ -129,7 +129,7 @@ Vector with components value 0.0f
- Success return Vector2
*/
-int lmathVector2Zero( lua_State *L ) {
+int lmathVector2Zero( lua_State* L ) {
uluaPushVector2( L, Vector2Zero() );
return 1;
@@ -142,7 +142,7 @@ Vector with components value 1.0f
- Success return Vector2
*/
-int lmathVector2One( lua_State *L ) {
+int lmathVector2One( lua_State* L ) {
uluaPushVector2( L, Vector2One() );
return 1;
@@ -155,7 +155,7 @@ Add two vectors (v1 + v2)
- Success return Vector2
*/
-int lmathVector2Add( lua_State *L ) {
+int lmathVector2Add( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -171,7 +171,7 @@ Add vector and float value
- Success return Vector2
*/
-int lmathVector2AddValue( lua_State *L ) {
+int lmathVector2AddValue( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
float add = luaL_checknumber( L, 2 );
@@ -187,7 +187,7 @@ Subtract two vectors (v1 - v2)
- Success return Vector2
*/
-int lmathVector2Subtract( lua_State *L ) {
+int lmathVector2Subtract( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -203,7 +203,7 @@ Subtract vector by float value
- Success return Vector2
*/
-int lmathVector2SubtractValue( lua_State *L ) {
+int lmathVector2SubtractValue( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
float sub = luaL_checknumber( L, 2 );
@@ -219,7 +219,7 @@ Calculate vector length
- Success return float
*/
-int lmathVector2Length( lua_State *L ) {
+int lmathVector2Length( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
lua_pushnumber( L, Vector2Length( v ) );
@@ -234,7 +234,7 @@ Calculate vector square length
- Success return float
*/
-int lmathVector2LengthSqr( lua_State *L ) {
+int lmathVector2LengthSqr( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
lua_pushnumber( L, Vector2LengthSqr( v ) );
@@ -249,7 +249,7 @@ Calculate two vectors dot product
- Success return float
*/
-int lmathVector2DotProduct( lua_State *L ) {
+int lmathVector2DotProduct( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -265,7 +265,7 @@ Calculate distance between two vectors
- Success return float
*/
-int lmathVector2Distance( lua_State *L ) {
+int lmathVector2Distance( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -281,7 +281,7 @@ Calculate square distance between two vectors
- Success return float
*/
-int lmathVector2DistanceSqr( lua_State *L ) {
+int lmathVector2DistanceSqr( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -298,7 +298,7 @@ NOTE: Angle is calculated from origin point (0, 0)
- Success return float
*/
-int lmathVector2Angle( lua_State *L ) {
+int lmathVector2Angle( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -316,7 +316,7 @@ Current implementation should be aligned with glm::angle
- Success return float
*/
-int lmathVector2LineAngle( lua_State *L ) {
+int lmathVector2LineAngle( lua_State* L ) {
Vector2 start = uluaGetVector2( L, 1 );
Vector2 end = uluaGetVector2( L, 2 );
@@ -332,7 +332,7 @@ Scale vector (multiply by value)
- Success return Vector2
*/
-int lmathVector2Scale( lua_State *L ) {
+int lmathVector2Scale( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
float scale = luaL_checknumber( L, 2 );
@@ -348,7 +348,7 @@ Multiply vector by vector
- Success return Vector2
*/
-int lmathVector2Multiply( lua_State *L ) {
+int lmathVector2Multiply( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -364,7 +364,7 @@ Negate vector
- Success return Vector2
*/
-int lmathVector2Negate( lua_State *L ) {
+int lmathVector2Negate( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
uluaPushVector2( L, Vector2Negate( v ) );
@@ -379,7 +379,7 @@ Divide vector by vector
- Success return Vector2
*/
-int lmathVector2Divide( lua_State *L ) {
+int lmathVector2Divide( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -395,7 +395,7 @@ Normalize provided vector
- Success return Vector2
*/
-int lmathVector2Normalize( lua_State *L ) {
+int lmathVector2Normalize( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
uluaPushVector2( L, Vector2Normalize( v ) );
@@ -410,7 +410,7 @@ Transforms a Vector2 by a given Matrix
- Success return Vector2
*/
-int lmathVector2Transform( lua_State *L ) {
+int lmathVector2Transform( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
Matrix mat = uluaGetMatrix( L, 2 );
@@ -426,7 +426,7 @@ Calculate linear interpolation between two vectors
- Success return Vector2
*/
-int lmathVector2Lerp( lua_State *L ) {
+int lmathVector2Lerp( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
float amount = luaL_checknumber( L, 3 );
@@ -443,7 +443,7 @@ Calculate reflected vector to normal
- Success return Vector2
*/
-int lmathVector2Reflect( lua_State *L ) {
+int lmathVector2Reflect( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -459,7 +459,7 @@ Rotate vector by angle
- Success return Vector2
*/
-int lmathVector2Rotate( lua_State *L ) {
+int lmathVector2Rotate( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
float degs = luaL_checknumber( L, 2 );
@@ -475,7 +475,7 @@ Move Vector towards target
- Success return Vector2
*/
-int lmathVector2MoveTowards( lua_State *L ) {
+int lmathVector2MoveTowards( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
float maxDistance = luaL_checknumber( L, 3 );
@@ -492,7 +492,7 @@ Invert the given vector
- Success return Vector2
*/
-int lmathVector2Invert( lua_State *L ) {
+int lmathVector2Invert( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
uluaPushVector2( L, Vector2Invert( v ) );
@@ -508,7 +508,7 @@ min and max values specified by the given vectors
- Success return Vector2
*/
-int lmathVector2Clamp( lua_State *L ) {
+int lmathVector2Clamp( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
Vector2 min = uluaGetVector2( L, 2 );
Vector2 max = uluaGetVector2( L, 3 );
@@ -525,7 +525,7 @@ Clamp the magnitude of the vector between two min and max values
- Success return Vector2
*/
-int lmathVector2ClampValue( lua_State *L ) {
+int lmathVector2ClampValue( lua_State* L ) {
Vector2 v = uluaGetVector2( L, 1 );
float min = luaL_checknumber( L, 2 );
float max = luaL_checknumber( L, 3 );
@@ -542,7 +542,7 @@ Check whether two given vectors are almost equal
- Success return int
*/
-int lmathVector2Equals( lua_State *L ) {
+int lmathVector2Equals( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
@@ -562,7 +562,7 @@ Vector with components value 0.0f
- Success return Vector3
*/
-int lmathVector3Zero( lua_State *L ) {
+int lmathVector3Zero( lua_State* L ) {
uluaPushVector3( L, Vector3Zero() );
return 1;
@@ -575,7 +575,7 @@ Vector with components value 1.0f
- Success return Vector3
*/
-int lmathVector3One( lua_State *L ) {
+int lmathVector3One( lua_State* L ) {
uluaPushVector3( L, Vector3One() );
return 1;
@@ -588,7 +588,7 @@ Add two vectors
- Success return Vector3
*/
-int lmathVector3Add( lua_State *L ) {
+int lmathVector3Add( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -604,7 +604,7 @@ Add vector and float value
- Success return Vector3
*/
-int lmathVector3AddValue( lua_State *L ) {
+int lmathVector3AddValue( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
float add = luaL_checknumber( L, 2 );
@@ -620,7 +620,7 @@ Subtract two vectors
- Success return Vector3
*/
-int lmathVector3Subtract( lua_State *L ) {
+int lmathVector3Subtract( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -636,7 +636,7 @@ Subtract vector by float value
- Success return Vector3
*/
-int lmathVector3SubtractValue( lua_State *L ) {
+int lmathVector3SubtractValue( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
float sub = luaL_checknumber( L, 2 );
@@ -652,7 +652,7 @@ Multiply vector by scalar
- Success return Vector3
*/
-int lmathVector3Scale( lua_State *L ) {
+int lmathVector3Scale( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
float scalar = luaL_checknumber( L, 2 );
@@ -668,7 +668,7 @@ Multiply vector by vector
- Success return Vector3
*/
-int lmathVector3Multiply( lua_State *L ) {
+int lmathVector3Multiply( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -684,7 +684,7 @@ Calculate two vectors cross product
- Success return Vector3
*/
-int lmathVector3CrossProduct( lua_State *L ) {
+int lmathVector3CrossProduct( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -700,7 +700,7 @@ Calculate one vector perpendicular vector
- Success return Vector3
*/
-int lmathVector3Perpendicular( lua_State *L ) {
+int lmathVector3Perpendicular( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
uluaPushVector3( L, Vector3Perpendicular( v ) );
@@ -715,7 +715,7 @@ Calculate vector length
- Success return float
*/
-int lmathVector3Length( lua_State *L ) {
+int lmathVector3Length( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
lua_pushnumber( L, Vector3Length( v ) );
@@ -730,7 +730,7 @@ Calculate vector square length
- Success return float
*/
-int lmathVector3LengthSqr( lua_State *L ) {
+int lmathVector3LengthSqr( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
lua_pushnumber( L, Vector3LengthSqr( v ) );
@@ -745,7 +745,7 @@ Calculate two vectors dot product
- Success return float
*/
-int lmathVector3DotProduct( lua_State *L ) {
+int lmathVector3DotProduct( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -761,7 +761,7 @@ Calculate distance between two vectors
- Success return float
*/
-int lmathVector3Distance( lua_State *L ) {
+int lmathVector3Distance( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -777,7 +777,7 @@ Calculate square distance between two vectors
- Success return float
*/
-int lmathVector3DistanceSqr( lua_State *L ) {
+int lmathVector3DistanceSqr( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -793,7 +793,7 @@ Calculate angle between two vectors
- Success return float
*/
-int lmathVector3Angle( lua_State *L ) {
+int lmathVector3Angle( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -809,7 +809,7 @@ Negate provided vector (invert direction)
- Success return Vector3
*/
-int lmathVector3Negate( lua_State *L ) {
+int lmathVector3Negate( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
uluaPushVector3( L, Vector3Negate( v ) );
@@ -824,7 +824,7 @@ Divide vector by vector
- Success return Vector3
*/
-int lmathVector3Divide( lua_State *L ) {
+int lmathVector3Divide( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -840,7 +840,7 @@ Normalize provided vector
- Success return Vector3
*/
-int lmathVector3Normalize( lua_State *L ) {
+int lmathVector3Normalize( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
uluaPushVector3( L, Vector3Normalize( v ) );
@@ -856,7 +856,7 @@ Gram-Schmidt function implementation
- Success return Vector3, Vector3
*/
-int lmathVector3OrthoNormalize( lua_State *L ) {
+int lmathVector3OrthoNormalize( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -875,7 +875,7 @@ Transforms a Vector3 by a given Matrix
- Success return Vector3
*/
-int lmathVector3Transform( lua_State *L ) {
+int lmathVector3Transform( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
Matrix mat = uluaGetMatrix( L, 2 );
@@ -891,7 +891,7 @@ Transform a vector by quaternion rotation
- Success return Vector3
*/
-int lmathVector3RotateByQuaternion( lua_State *L ) {
+int lmathVector3RotateByQuaternion( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
Quaternion q = uluaGetQuaternion( L, 2 );
@@ -907,7 +907,7 @@ Rotates a vector around an axis
- Success return Vector3
*/
-int lmathVector3RotateByAxisAngle( lua_State *L ) {
+int lmathVector3RotateByAxisAngle( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
Vector3 axis = uluaGetVector3( L, 2 );
float angle = luaL_checknumber( L, 3 );
@@ -924,7 +924,7 @@ Calculate linear interpolation between two vectors
- Success return Vector3
*/
-int lmathVector3Lerp( lua_State *L ) {
+int lmathVector3Lerp( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
float amount = luaL_checknumber( L, 3 );
@@ -941,7 +941,7 @@ Calculate reflected vector to normal
- Success return Vector3
*/
-int lmathVector3Reflect( lua_State *L ) {
+int lmathVector3Reflect( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
Vector3 normal = uluaGetVector3( L, 2 );
@@ -957,7 +957,7 @@ Get min value for each pair of components
- Success return Vector3
*/
-int lmathVector3Min( lua_State *L ) {
+int lmathVector3Min( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -973,7 +973,7 @@ Get max value for each pair of components
- Success return Vector3
*/
-int lmathVector3Max( lua_State *L ) {
+int lmathVector3Max( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -990,7 +990,7 @@ NOTE: Assumes P is on the plane of the triangle
- Success return Vector3
*/
-int lmathVector3Barycenter( lua_State *L ) {
+int lmathVector3Barycenter( lua_State* L ) {
Vector3 p = uluaGetVector3( L, 1 );
Vector3 a = uluaGetVector3( L, 2 );
Vector3 b = uluaGetVector3( L, 3 );
@@ -1009,7 +1009,7 @@ NOTE: We are avoiding calling other raymath functions despite available
- Success return Vector3
*/
-int lmathVector3Unproject( lua_State *L ) {
+int lmathVector3Unproject( lua_State* L ) {
Vector3 source = uluaGetVector3( L, 1 );
Matrix projection = uluaGetMatrix( L, 2 );
Matrix view = uluaGetMatrix( L, 3 );
@@ -1026,7 +1026,7 @@ Invert the given vector
- Success return Vector3
*/
-int lmathVector3Invert( lua_State *L ) {
+int lmathVector3Invert( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
uluaPushVector3( L, Vector3Invert( v ) );
@@ -1042,7 +1042,7 @@ min and max values specified by the given vectors
- Success return Vector3
*/
-int lmathVector3Clamp( lua_State *L ) {
+int lmathVector3Clamp( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
Vector3 min = uluaGetVector3( L, 2 );
Vector3 max = uluaGetVector3( L, 3 );
@@ -1059,7 +1059,7 @@ Clamp the magnitude of the vector between two values
- Success return Vector3
*/
-int lmathVector3ClampValue( lua_State *L ) {
+int lmathVector3ClampValue( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
float min = luaL_checknumber( L, 2 );
float max = luaL_checknumber( L, 3 );
@@ -1076,7 +1076,7 @@ Check whether two given vectors are almost equal
- Success return int
*/
-int lmathVector3Equals( lua_State *L ) {
+int lmathVector3Equals( lua_State* L ) {
Vector3 v1 = uluaGetVector3( L, 1 );
Vector3 v2 = uluaGetVector3( L, 2 );
@@ -1097,7 +1097,7 @@ on the other side of the surface
- Success return Vector3
*/
-int lmathVector3Refract( lua_State *L ) {
+int lmathVector3Refract( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
Vector3 n = uluaGetVector3( L, 2 );
float r = luaL_checknumber( L, 3 );
@@ -1118,7 +1118,7 @@ Compute matrix determinant
- Success return float
*/
-int lmathMatrixDeterminant( lua_State *L ) {
+int lmathMatrixDeterminant( lua_State* L ) {
Matrix mat = uluaGetMatrix( L, 1 );
lua_pushnumber( L, MatrixDeterminant( mat ) );
@@ -1133,7 +1133,7 @@ Get the trace of the matrix (sum of the values along the diagonal)
- Success return float
*/
-int lmathMatrixTrace( lua_State *L ) {
+int lmathMatrixTrace( lua_State* L ) {
Matrix mat = uluaGetMatrix( L, 1 );
lua_pushnumber( L, MatrixTrace( mat ) );
@@ -1148,7 +1148,7 @@ Transposes provided matrix
- Success return Matrix
*/
-int lmathMatrixTranspose( lua_State *L ) {
+int lmathMatrixTranspose( lua_State* L ) {
Matrix mat = uluaGetMatrix( L, 1 );
uluaPushMatrix( L, MatrixTranspose( mat ) );
@@ -1163,7 +1163,7 @@ Invert provided matrix
- Success return Matrix
*/
-int lmathMatrixInvert( lua_State *L ) {
+int lmathMatrixInvert( lua_State* L ) {
Matrix mat = uluaGetMatrix( L, 1 );
uluaPushMatrix( L, MatrixInvert( mat ) );
@@ -1178,7 +1178,7 @@ Get identity matrix
- Success return Matrix
*/
-int lmathMatrixIdentity( lua_State *L ) {
+int lmathMatrixIdentity( lua_State* L ) {
uluaPushMatrix( L, MatrixIdentity() );
return 1;
@@ -1191,7 +1191,7 @@ Add two matrices
- Success return Matrix
*/
-int lmathMatrixAdd( lua_State *L ) {
+int lmathMatrixAdd( lua_State* L ) {
Matrix mat1 = uluaGetMatrix( L, 1 );
Matrix mat2 = uluaGetMatrix( L, 2 );
@@ -1207,7 +1207,7 @@ Subtract two matrices (left - right)
- Success return Matrix
*/
-int lmathMatrixSubtract( lua_State *L ) {
+int lmathMatrixSubtract( lua_State* L ) {
Matrix mat1 = uluaGetMatrix( L, 1 );
Matrix mat2 = uluaGetMatrix( L, 2 );
@@ -1223,7 +1223,7 @@ Get two matrix multiplication
- Success return Matrix
*/
-int lmathMatrixMultiply( lua_State *L ) {
+int lmathMatrixMultiply( lua_State* L ) {
Matrix mat1 = uluaGetMatrix( L, 1 );
Matrix mat2 = uluaGetMatrix( L, 2 );
@@ -1239,7 +1239,7 @@ Get translation matrix
- Success return Matrix
*/
-int lmathMatrixTranslate( lua_State *L ) {
+int lmathMatrixTranslate( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
uluaPushMatrix( L, MatrixTranslate( v.x, v.y, v.z ) );
@@ -1254,7 +1254,7 @@ Create rotation matrix from axis and angle. NOTE: Angle should be provided in ra
- Success return Matrix
*/
-int lmathMatrixRotate( lua_State *L ) {
+int lmathMatrixRotate( lua_State* L ) {
Vector3 axis = uluaGetVector3( L, 1 );
float angle = luaL_checknumber( L, 2 );
@@ -1270,7 +1270,7 @@ Get x-rotation matrix (angle in radians)
- Success return Matrix
*/
-int lmathMatrixRotateX( lua_State *L ) {
+int lmathMatrixRotateX( lua_State* L ) {
float angle = luaL_checknumber( L, 1 );
uluaPushMatrix( L, MatrixRotateX( angle ) );
@@ -1285,7 +1285,7 @@ Get y-rotation matrix (angle in radians)
- Success return Matrix
*/
-int lmathMatrixRotateY( lua_State *L ) {
+int lmathMatrixRotateY( lua_State* L ) {
float angle = luaL_checknumber( L, 1 );
uluaPushMatrix( L, MatrixRotateY( angle ) );
@@ -1300,7 +1300,7 @@ Get z-rotation matrix (angle in radians)
- Success return Matrix
*/
-int lmathMatrixRotateZ( lua_State *L ) {
+int lmathMatrixRotateZ( lua_State* L ) {
float angle = luaL_checknumber( L, 1 );
uluaPushMatrix( L, MatrixRotateZ( angle ) );
@@ -1315,7 +1315,7 @@ Get xyz-rotation matrix (angles in radians)
- Success return Matrix
*/
-int lmathMatrixRotateXYZ( lua_State *L ) {
+int lmathMatrixRotateXYZ( lua_State* L ) {
Vector3 angle = uluaGetVector3( L, 1 );
uluaPushMatrix( L, MatrixRotateXYZ( angle ) );
@@ -1330,7 +1330,7 @@ Get zyx-rotation matrix (angles in radians)
- Success return Matrix
*/
-int lmathMatrixRotateZYX( lua_State *L ) {
+int lmathMatrixRotateZYX( lua_State* L ) {
Vector3 angle = uluaGetVector3( L, 1 );
uluaPushMatrix( L, MatrixRotateZYX( angle ) );
@@ -1345,7 +1345,7 @@ Get scaling matrix
- Success return Matrix
*/
-int lmathMatrixScale( lua_State *L ) {
+int lmathMatrixScale( lua_State* L ) {
Vector3 v = uluaGetVector3( L, 1 );
uluaPushMatrix( L, MatrixScale( v.x, v.y, v.z ) );
@@ -1360,7 +1360,7 @@ Get perspective projection matrix
- Success return Matrix
*/
-int lmathMatrixFrustum( lua_State *L ) {
+int lmathMatrixFrustum( lua_State* L ) {
float left = luaL_checknumber( L, 1 );
float right = luaL_checknumber( L, 2);
float bottom = luaL_checknumber( L, 3 );
@@ -1380,7 +1380,7 @@ Get perspective projection matrix
- Success return Matrix
*/
-int lmathMatrixPerspective( lua_State *L ) {
+int lmathMatrixPerspective( lua_State* L ) {
float fovy = luaL_checknumber( L, 1 );
float aspect = luaL_checknumber( L, 2 );
float near = luaL_checknumber( L, 3 );
@@ -1398,7 +1398,7 @@ Get orthographic projection matrix
- Success return Matrix
*/
-int lmathMatrixOrtho( lua_State *L ) {
+int lmathMatrixOrtho( lua_State* L ) {
float left = luaL_checknumber( L, 1 );
float right = luaL_checknumber( L, 2 );
float bottom = luaL_checknumber( L, 3 );
@@ -1418,7 +1418,7 @@ Get camera look-at matrix (View matrix)
- Success return Matrix
*/
-int lmathMatrixLookAt( lua_State *L ) {
+int lmathMatrixLookAt( lua_State* L ) {
Vector3 eye = uluaGetVector3( L, 1 );
Vector3 target = uluaGetVector3( L, 2 );
Vector3 up = uluaGetVector3( L, 3 );
@@ -1439,7 +1439,7 @@ Add two quaternions
- Success return Quaternion
*/
-int lmathQuaternionAdd( lua_State *L ) {
+int lmathQuaternionAdd( lua_State* L ) {
Quaternion q1 = uluaGetQuaternion( L, 1 );
Quaternion q2 = uluaGetQuaternion( L, 2 );
@@ -1455,7 +1455,7 @@ Add quaternion and float value
- Success return Quaternion
*/
-int lmathQuaternionAddValue( lua_State *L ) {
+int lmathQuaternionAddValue( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
float add = luaL_checknumber( L, 2 );
@@ -1471,7 +1471,7 @@ Subtract two quaternions
- Success return Quaternion
*/
-int lmathQuaternionSubtract( lua_State *L ) {
+int lmathQuaternionSubtract( lua_State* L ) {
Quaternion q1 = uluaGetQuaternion( L, 1 );
Quaternion q2 = uluaGetQuaternion( L, 2 );
@@ -1487,7 +1487,7 @@ Subtract quaternion and float value
- Success return Quaternion
*/
-int lmathQuaternionSubtractValue( lua_State *L ) {
+int lmathQuaternionSubtractValue( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
float sub = luaL_checknumber( L, 2 );
@@ -1503,7 +1503,7 @@ Get identity quaternion
- Success return Quaternion
*/
-int lmathQuaternionIdentity( lua_State *L ) {
+int lmathQuaternionIdentity( lua_State* L ) {
uluaPushQuaternion( L, QuaternionIdentity() );
return 1;
@@ -1516,7 +1516,7 @@ Computes the length of a quaternion
- Success return float
*/
-int lmathQuaternionLength( lua_State *L ) {
+int lmathQuaternionLength( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
lua_pushnumber( L, QuaternionLength( q ) );
@@ -1531,7 +1531,7 @@ Normalize provided quaternion
- Success return Quaternion
*/
-int lmathQuaternionNormalize( lua_State *L ) {
+int lmathQuaternionNormalize( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
uluaPushQuaternion( L, QuaternionNormalize( q ) );
@@ -1546,7 +1546,7 @@ Invert provided quaternion
- Success return Quaternion
*/
-int lmathQuaternionInvert( lua_State *L ) {
+int lmathQuaternionInvert( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
uluaPushQuaternion( L, QuaternionInvert( q ) );
@@ -1561,7 +1561,7 @@ Calculate two quaternion multiplication
- Success return Quaternion
*/
-int lmathQuaternionMultiply( lua_State *L ) {
+int lmathQuaternionMultiply( lua_State* L ) {
Quaternion q1 = uluaGetQuaternion( L, 1 );
Quaternion q2 = uluaGetQuaternion( L, 2 );
@@ -1577,7 +1577,7 @@ Scale quaternion by float value
- Success return Quaternion
*/
-int lmathQuaternionScale( lua_State *L ) {
+int lmathQuaternionScale( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
float mul = luaL_checknumber( L, 2 );
@@ -1593,7 +1593,7 @@ Divide two quaternions
- Success return Quaternion
*/
-int lmathQuaternionDivide( lua_State *L ) {
+int lmathQuaternionDivide( lua_State* L ) {
Quaternion q1 = uluaGetQuaternion( L, 1 );
Quaternion q2 = uluaGetQuaternion( L, 2 );
@@ -1609,7 +1609,7 @@ Calculate linear interpolation between two quaternions
- Success return Quaternion
*/
-int lmathQuaternionLerp( lua_State *L ) {
+int lmathQuaternionLerp( lua_State* L ) {
Quaternion q1 = uluaGetQuaternion( L, 1 );
Quaternion q2 = uluaGetQuaternion( L, 2 );
float amount = luaL_checknumber( L, 3 );
@@ -1626,7 +1626,7 @@ Calculate slerp-optimized interpolation between two quaternions
- Success return Quaternion
*/
-int lmathQuaternionNlerp( lua_State *L ) {
+int lmathQuaternionNlerp( lua_State* L ) {
Quaternion q1 = uluaGetQuaternion( L, 1 );
Quaternion q2 = uluaGetQuaternion( L, 2 );
float amount = luaL_checknumber( L, 3 );
@@ -1643,7 +1643,7 @@ Calculates spherical linear interpolation between two quaternions
- Success return Quaternion
*/
-int lmathQuaternionSlerp( lua_State *L ) {
+int lmathQuaternionSlerp( lua_State* L ) {
Quaternion q1 = uluaGetQuaternion( L, 1 );
Quaternion q2 = uluaGetQuaternion( L, 2 );
float amount = luaL_checknumber( L, 3 );
@@ -1660,7 +1660,7 @@ Calculate quaternion based on the rotation from one vector to another
- Success return Quaternion
*/
-int lmathQuaternionFromVector3ToVector3( lua_State *L ) {
+int lmathQuaternionFromVector3ToVector3( lua_State* L ) {
Vector3 from = uluaGetVector3( L, 1 );
Vector3 to = uluaGetVector3( L, 2 );
@@ -1676,7 +1676,7 @@ Get a quaternion for a given rotation matrix
- Success return Quaternion
*/
-int lmathQuaternionFromMatrix( lua_State *L ) {
+int lmathQuaternionFromMatrix( lua_State* L ) {
Matrix mat = uluaGetMatrix( L, 1 );
uluaPushQuaternion( L, QuaternionFromMatrix( mat ) );
@@ -1691,7 +1691,7 @@ Get a quaternion for a given rotation matrix
- Success return Matrix
*/
-int lmathQuaternionToMatrix( lua_State *L ) {
+int lmathQuaternionToMatrix( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
uluaPushMatrix( L, QuaternionToMatrix( q ) );
@@ -1707,7 +1707,7 @@ NOTE: angle must be provided in radians
- Success return Quaternion
*/
-int lmathQuaternionFromAxisAngle( lua_State *L ) {
+int lmathQuaternionFromAxisAngle( lua_State* L ) {
Vector3 axis = uluaGetVector3( L, 1 );
float angle = luaL_checknumber( L, 2 );
@@ -1723,7 +1723,7 @@ Get the rotation angle and axis for a given quaternion
- Success return Vector3, float
*/
-int lmathQuaternionToAxisAngle( lua_State *L ) {
+int lmathQuaternionToAxisAngle( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
float angle = 0.0;
Vector3 axis = { 0.0 };
@@ -1744,7 +1744,7 @@ NOTE: Rotation order is ZYX
- Success return Quaternion
*/
-int lmathQuaternionFromEuler( lua_State *L ) {
+int lmathQuaternionFromEuler( lua_State* L ) {
float pitch = luaL_checknumber( L, 1 );
float yaw = luaL_checknumber( L, 2 );
float roll = luaL_checknumber( L, 3 );
@@ -1762,7 +1762,7 @@ NOTE: Angles are returned in a Vector3 struct in radians
- Success return Vector3
*/
-int lmathQuaternionToEuler( lua_State *L ) {
+int lmathQuaternionToEuler( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
uluaPushVector3( L, QuaternionToEuler( q ) );
@@ -1777,7 +1777,7 @@ Transform a quaternion given a transformation matrix
- Success return Quaternion
*/
-int lmathQuaternionTransform( lua_State *L ) {
+int lmathQuaternionTransform( lua_State* L ) {
Quaternion q = uluaGetQuaternion( L, 1 );
Matrix mat = uluaGetMatrix( L, 2 );
@@ -1793,7 +1793,7 @@ Check whether two given quaternions are almost equal
- Success return int
*/
-int lmathQuaternionEquals( lua_State *L ) {
+int lmathQuaternionEquals( lua_State* L ) {
Quaternion q1 = uluaGetQuaternion( L, 1 );
Quaternion q2 = uluaGetQuaternion( L, 2 );
diff --git a/src/shapes.c b/src/shapes.c
index ad8ed92..b2bcfaf 100644
--- a/src/shapes.c
+++ b/src/shapes.c
@@ -4,7 +4,7 @@
#include "lua_core.h"
#include "textures.h"
-static inline void getVector2Array( lua_State *L, int index, Vector2 points[] ) {
+static inline void getVector2Array( lua_State* L, int index, Vector2 points[] ) {
int t = index, i = 0;
lua_pushnil( L );
@@ -26,8 +26,8 @@ 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
*/
-int lshapesSetShapesTexture( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int lshapesSetShapesTexture( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
Rectangle source = uluaGetRectangle( L, 2 );
SetShapesTexture( *texture, source );
@@ -40,7 +40,7 @@ int lshapesSetShapesTexture( lua_State *L ) {
Draw a pixel
*/
-int lshapesDrawPixel( lua_State *L ) {
+int lshapesDrawPixel( lua_State* L ) {
Vector2 pos = uluaGetVector2( L, 1 );
Color color = uluaGetColor( L, 2 );
@@ -54,7 +54,7 @@ int lshapesDrawPixel( lua_State *L ) {
Draw a line defining thickness
*/
-int lshapesDrawLine( lua_State *L ) {
+int lshapesDrawLine( lua_State* L ) {
Vector2 startPos = uluaGetVector2( L, 1 );
Vector2 endPos = uluaGetVector2( L, 2 );
float thickness = luaL_checknumber( L, 3 );
@@ -70,7 +70,7 @@ int lshapesDrawLine( lua_State *L ) {
Draw lines sequence
*/
-int lshapesDrawLineStrip( lua_State *L ) {
+int lshapesDrawLineStrip( lua_State* L ) {
int pointsCount = uluaGetTableLen( L, 1 );
Color color = uluaGetColor( L, 2 );
@@ -95,7 +95,7 @@ int lshapesDrawLineStrip( lua_State *L ) {
Draw a line using cubic-bezier curves in-out
*/
-int lshapesDrawLineBezier( lua_State *L ) {
+int lshapesDrawLineBezier( lua_State* L ) {
Vector2 startPos = uluaGetVector2( L, 1 );
Vector2 endPos = uluaGetVector2( L, 2 );
float thickness = luaL_checknumber( L, 3 );
@@ -111,7 +111,7 @@ int lshapesDrawLineBezier( lua_State *L ) {
Draw a color-filled circle
*/
-int lshapesDrawCircle( lua_State *L ) {
+int lshapesDrawCircle( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float radius = luaL_checknumber( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -126,7 +126,7 @@ int lshapesDrawCircle( lua_State *L ) {
Draw a piece of a circle
*/
-int lshapesDrawCircleSector( lua_State *L ) {
+int lshapesDrawCircleSector( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float radius = luaL_checknumber( L, 2 );
float startAngle = luaL_checknumber( L, 3 );
@@ -144,7 +144,7 @@ int lshapesDrawCircleSector( lua_State *L ) {
Draw circle sector outline
*/
-int lshapesDrawCircleSectorLines( lua_State *L ) {
+int lshapesDrawCircleSectorLines( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float radius = luaL_checknumber( L, 2 );
float startAngle = luaL_checknumber( L, 3 );
@@ -162,7 +162,7 @@ int lshapesDrawCircleSectorLines( lua_State *L ) {
Draw a gradient-filled circle
*/
-int lshapesDrawCircleGradient( lua_State *L ) {
+int lshapesDrawCircleGradient( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float radius = luaL_checknumber( L, 2 );
Color color1 = uluaGetColor( L, 3 );
@@ -178,7 +178,7 @@ int lshapesDrawCircleGradient( lua_State *L ) {
Draw circle outline
*/
-int lshapesDrawCircleLines( lua_State *L ) {
+int lshapesDrawCircleLines( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float radius = luaL_checknumber( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -193,7 +193,7 @@ int lshapesDrawCircleLines( lua_State *L ) {
Draw ellipse
*/
-int lshapesDrawEllipse( lua_State *L ) {
+int lshapesDrawEllipse( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float radiusH = luaL_checknumber( L, 2 );
float radiusV = luaL_checknumber( L, 3 );
@@ -209,7 +209,7 @@ int lshapesDrawEllipse( lua_State *L ) {
Draw ellipse outline
*/
-int lshapesDrawEllipseLines( lua_State *L ) {
+int lshapesDrawEllipseLines( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float radiusH = luaL_checknumber( L, 2 );
float radiusV = luaL_checknumber( L, 3 );
@@ -225,7 +225,7 @@ int lshapesDrawEllipseLines( lua_State *L ) {
Draw ring
*/
-int lshapesDrawRing( lua_State *L ) {
+int lshapesDrawRing( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float innerRadius = luaL_checknumber( L, 2 );
float outerRadius = luaL_checknumber( L, 3 );
@@ -244,7 +244,7 @@ int lshapesDrawRing( lua_State *L ) {
Draw ring outline
*/
-int lshapesDrawRingLines( lua_State *L ) {
+int lshapesDrawRingLines( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float innerRadius = luaL_checknumber( L, 2 );
float outerRadius = luaL_checknumber( L, 3 );
@@ -263,7 +263,7 @@ int lshapesDrawRingLines( lua_State *L ) {
Draw a color-filled rectangle
*/
-int lshapesDrawRectangle( lua_State *L ) {
+int lshapesDrawRectangle( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
Color color = uluaGetColor( L, 2 );
@@ -277,7 +277,7 @@ int lshapesDrawRectangle( lua_State *L ) {
Draw a color-filled rectangle with pro parameters
*/
-int lshapesDrawRectanglePro( lua_State *L ) {
+int lshapesDrawRectanglePro( lua_State* L ) {
Rectangle rec = uluaGetRectangle( L, 1 );
Vector2 origin = uluaGetVector2( L, 2 );
float rotation = luaL_checknumber( L, 3 );
@@ -293,7 +293,7 @@ int lshapesDrawRectanglePro( lua_State *L ) {
Draw a vertical-gradient-filled rectangle
*/
-int lshapesDrawRectangleGradientV( lua_State *L ) {
+int lshapesDrawRectangleGradientV( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
Color color1 = uluaGetColor( L, 2 );
Color color2 = uluaGetColor( L, 3 );
@@ -308,7 +308,7 @@ int lshapesDrawRectangleGradientV( lua_State *L ) {
Draw a horizontal-gradient-filled rectangle
*/
-int lshapesDrawRectangleGradientH( lua_State *L ) {
+int lshapesDrawRectangleGradientH( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
Color color1 = uluaGetColor( L, 2 );
Color color2 = uluaGetColor( L, 3 );
@@ -323,7 +323,7 @@ int lshapesDrawRectangleGradientH( lua_State *L ) {
Draw a gradient-filled rectangle with custom vertex colors
*/
-int lshapesDrawRectangleGradientEx( lua_State *L ) {
+int lshapesDrawRectangleGradientEx( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
Color color1 = uluaGetColor( L, 2 );
Color color2 = uluaGetColor( L, 3 );
@@ -340,7 +340,7 @@ int lshapesDrawRectangleGradientEx( lua_State *L ) {
Draw rectangle outline
*/
-int lshapesDrawRectangleLines( lua_State *L ) {
+int lshapesDrawRectangleLines( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
Color color = uluaGetColor( L, 2 );
@@ -354,7 +354,7 @@ int lshapesDrawRectangleLines( lua_State *L ) {
Draw rectangle outline with extended parameters
*/
-int lshapesDrawRectangleLinesEx( lua_State *L ) {
+int lshapesDrawRectangleLinesEx( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
int lineThick = luaL_checkinteger( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -369,7 +369,7 @@ int lshapesDrawRectangleLinesEx( lua_State *L ) {
Draw rectangle with rounded edges
*/
-int lshapesDrawRectangleRounded( lua_State *L ) {
+int lshapesDrawRectangleRounded( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
float roundness = luaL_checknumber( L, 2 );
int segments = luaL_checkinteger( L, 3 );
@@ -385,7 +385,7 @@ int lshapesDrawRectangleRounded( lua_State *L ) {
Draw rectangle with rounded edges outline
*/
-int lshapesDrawRectangleRoundedLines( lua_State *L ) {
+int lshapesDrawRectangleRoundedLines( lua_State* L ) {
Rectangle rect = uluaGetRectangle( L, 1 );
float roundness = luaL_checknumber( L, 2 );
int segments = luaL_checkinteger( L, 3 );
@@ -402,7 +402,7 @@ int lshapesDrawRectangleRoundedLines( lua_State *L ) {
Draw a color-filled triangle (Vertex in counter-clockwise order!)
*/
-int lshapesDrawTriangle( lua_State *L ) {
+int lshapesDrawTriangle( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
Vector2 v3 = uluaGetVector2( L, 3 );
@@ -418,7 +418,7 @@ int lshapesDrawTriangle( lua_State *L ) {
Draw triangle outline (Vertex in counter-clockwise order!)
*/
-int lshapesDrawTriangleLines( lua_State *L ) {
+int lshapesDrawTriangleLines( lua_State* L ) {
Vector2 v1 = uluaGetVector2( L, 1 );
Vector2 v2 = uluaGetVector2( L, 2 );
Vector2 v3 = uluaGetVector2( L, 3 );
@@ -434,7 +434,7 @@ int lshapesDrawTriangleLines( lua_State *L ) {
Draw a triangle fan defined by points (first vertex is the center)
*/
-int lshapesDrawTriangleFan( lua_State *L ) {
+int lshapesDrawTriangleFan( lua_State* L ) {
int pointsCount = uluaGetTableLen( L, 1 );
Color color = uluaGetColor( L, 2 );
@@ -459,7 +459,7 @@ int lshapesDrawTriangleFan( lua_State *L ) {
Draw a triangle strip defined by points
*/
-int lshapesDrawTriangleStrip( lua_State *L ) {
+int lshapesDrawTriangleStrip( lua_State* L ) {
int pointsCount = uluaGetTableLen( L, 1 );
Color color = uluaGetColor( L, 2 );
@@ -484,7 +484,7 @@ int lshapesDrawTriangleStrip( lua_State *L ) {
Draw a regular polygon (Vector version)
*/
-int lshapesDrawPoly( lua_State *L ) {
+int lshapesDrawPoly( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
int sides = luaL_checkinteger( L, 2 );
float radius = luaL_checknumber( L, 3 );
@@ -501,7 +501,7 @@ int lshapesDrawPoly( lua_State *L ) {
Draw a polygon outline of n sides
*/
-int lshapesDrawPolyLines( lua_State *L ) {
+int lshapesDrawPolyLines( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
int sides = luaL_checkinteger( L, 2 );
float radius = luaL_checknumber( L, 3 );
@@ -518,7 +518,7 @@ int lshapesDrawPolyLines( lua_State *L ) {
Draw a polygon outline of n sides with extended parameters
*/
-int lshapesDrawPolyLinesEx( lua_State *L ) {
+int lshapesDrawPolyLinesEx( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
int sides = luaL_checkinteger( L, 2 );
float radius = luaL_checknumber( L, 3 );
@@ -540,7 +540,7 @@ int lshapesDrawPolyLinesEx( lua_State *L ) {
Draw spline: Linear, minimum 2 points
*/
-int lshapesDrawSplineLinear( lua_State *L ) {
+int lshapesDrawSplineLinear( lua_State* L ) {
int pointCount = uluaGetTableLen( L, 1 );
Vector2 points[ pointCount ];
float thick = luaL_checknumber( L, 2 );
@@ -557,7 +557,7 @@ int lshapesDrawSplineLinear( lua_State *L ) {
Draw spline: B-Spline, minimum 4 points
*/
-int lshapesDrawSplineBasis( lua_State *L ) {
+int lshapesDrawSplineBasis( lua_State* L ) {
int pointCount = uluaGetTableLen( L, 1 );
Vector2 points[ pointCount ];
float thick = luaL_checknumber( L, 2 );
@@ -574,7 +574,7 @@ int lshapesDrawSplineBasis( lua_State *L ) {
Draw spline: Catmull-Rom, minimum 4 points
*/
-int lshapesDrawSplineCatmullRom( lua_State *L ) {
+int lshapesDrawSplineCatmullRom( lua_State* L ) {
int pointCount = uluaGetTableLen( L, 1 );
Vector2 points[ pointCount ];
float thick = luaL_checknumber( L, 2 );
@@ -591,7 +591,7 @@ int lshapesDrawSplineCatmullRom( lua_State *L ) {
Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
*/
-int lshapesDrawSplineBezierQuadratic( lua_State *L ) {
+int lshapesDrawSplineBezierQuadratic( lua_State* L ) {
int pointCount = uluaGetTableLen( L, 1 );
Vector2 points[ pointCount ];
float thick = luaL_checknumber( L, 2 );
@@ -608,7 +608,7 @@ int lshapesDrawSplineBezierQuadratic( lua_State *L ) {
Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
*/
-int lshapesDrawSplineBezierCubic( lua_State *L ) {
+int lshapesDrawSplineBezierCubic( lua_State* L ) {
int pointCount = uluaGetTableLen( L, 1 );
Vector2 points[ pointCount ];
float thick = luaL_checknumber( L, 2 );
@@ -625,7 +625,7 @@ int lshapesDrawSplineBezierCubic( lua_State *L ) {
Draw spline segment: Linear, 2 points
*/
-int lshapesDrawSplineSegmentLinear( lua_State *L ) {
+int lshapesDrawSplineSegmentLinear( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 p2 = uluaGetVector2( L, 2 );
float thick = luaL_checknumber( L, 3 );
@@ -641,7 +641,7 @@ int lshapesDrawSplineSegmentLinear( lua_State *L ) {
Draw spline segment: B-Spline, 4 points
*/
-int lshapesDrawSplineSegmentBasis( lua_State *L ) {
+int lshapesDrawSplineSegmentBasis( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 p2 = uluaGetVector2( L, 2 );
Vector2 p3 = uluaGetVector2( L, 3 );
@@ -659,7 +659,7 @@ int lshapesDrawSplineSegmentBasis( lua_State *L ) {
Draw spline segment: Catmull-Rom, 4 points
*/
-int lshapesDrawSplineSegmentCatmullRom( lua_State *L ) {
+int lshapesDrawSplineSegmentCatmullRom( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 p2 = uluaGetVector2( L, 2 );
Vector2 p3 = uluaGetVector2( L, 3 );
@@ -677,7 +677,7 @@ int lshapesDrawSplineSegmentCatmullRom( lua_State *L ) {
Draw spline segment: Quadratic Bezier, 2 points, 1 control point
*/
-int lshapesDrawSplineSegmentBezierQuadratic( lua_State *L ) {
+int lshapesDrawSplineSegmentBezierQuadratic( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 c2 = uluaGetVector2( L, 2 );
Vector2 p3 = uluaGetVector2( L, 3 );
@@ -694,7 +694,7 @@ int lshapesDrawSplineSegmentBezierQuadratic( lua_State *L ) {
Draw spline segment: Cubic Bezier, 2 points, 2 control points
*/
-int lshapesDrawSplineSegmentBezierCubic( lua_State *L ) {
+int lshapesDrawSplineSegmentBezierCubic( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 c2 = uluaGetVector2( L, 2 );
Vector2 c3 = uluaGetVector2( L, 3 );
@@ -718,7 +718,7 @@ Get (evaluate) spline point: Linear
- Success return Vector2
*/
-int lshapesGetSplinePointLinear( lua_State *L ) {
+int lshapesGetSplinePointLinear( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 p2 = uluaGetVector2( L, 2 );
float t = luaL_checknumber( L, 3 );
@@ -735,7 +735,7 @@ Get (evaluate) spline point: B-Spline
- Success return Vector2
*/
-int lshapesGetSplinePointBasis( lua_State *L ) {
+int lshapesGetSplinePointBasis( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 p2 = uluaGetVector2( L, 2 );
Vector2 p3 = uluaGetVector2( L, 3 );
@@ -754,7 +754,7 @@ Get (evaluate) spline point: Catmull-Rom
- Success return Vector2
*/
-int lshapesGetSplinePointCatmullRom( lua_State *L ) {
+int lshapesGetSplinePointCatmullRom( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 p2 = uluaGetVector2( L, 2 );
Vector2 p3 = uluaGetVector2( L, 3 );
@@ -773,7 +773,7 @@ Get (evaluate) spline point: Quadratic Bezier
- Success return Vector2
*/
-int lshapesGetSplinePointBezierQuad( lua_State *L ) {
+int lshapesGetSplinePointBezierQuad( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 c2 = uluaGetVector2( L, 2 );
Vector2 p3 = uluaGetVector2( L, 3 );
@@ -791,7 +791,7 @@ Get (evaluate) spline point: Cubic Bezier
- Success return Vector2
*/
-int lshapesGetSplinePointBezierCubic( lua_State *L ) {
+int lshapesGetSplinePointBezierCubic( lua_State* L ) {
Vector2 p1 = uluaGetVector2( L, 1 );
Vector2 c2 = uluaGetVector2( L, 2 );
Vector2 c3 = uluaGetVector2( L, 3 );
@@ -814,7 +814,7 @@ Check collision between two rectangles
- Success return bool
*/
-int lshapesCheckCollisionRecs( lua_State *L ) {
+int lshapesCheckCollisionRecs( lua_State* L ) {
Rectangle rect1 = uluaGetRectangle( L, 1 );
Rectangle rect2 = uluaGetRectangle( L, 2 );
@@ -830,7 +830,7 @@ Check collision between two circles
- Success return bool
*/
-int lshapesCheckCollisionCircles( lua_State *L ) {
+int lshapesCheckCollisionCircles( lua_State* L ) {
Vector2 center1 = uluaGetVector2( L, 1 );
float radius1 = luaL_checknumber( L, 2 );
Vector2 center2 = uluaGetVector2( L, 3 );
@@ -848,7 +848,7 @@ Check collision between circle and rectangle
- Success return bool
*/
-int lshapesCheckCollisionCircleRec( lua_State *L ) {
+int lshapesCheckCollisionCircleRec( lua_State* L ) {
Vector2 center = uluaGetVector2( L, 1 );
float radius = luaL_checknumber( L, 2 );
Rectangle rec = uluaGetRectangle( L, 3 );
@@ -865,7 +865,7 @@ Check if point is inside rectangle
- Success return bool
*/
-int lshapesCheckCollisionPointRec( lua_State *L ) {
+int lshapesCheckCollisionPointRec( lua_State* L ) {
Vector2 point = uluaGetVector2( L, 1 );
Rectangle rec = uluaGetRectangle( L, 2 );
@@ -881,7 +881,7 @@ Check if point is inside circle
- Success return bool
*/
-int lshapesCheckCollisionPointCircle( lua_State *L ) {
+int lshapesCheckCollisionPointCircle( lua_State* L ) {
Vector2 point = uluaGetVector2( L, 1 );
Vector2 center = uluaGetVector2( L, 2 );
float radius = luaL_checknumber( L, 3 );
@@ -898,7 +898,7 @@ Check if point is inside a triangle
- Success return bool
*/
-int lshapesCheckCollisionPointTriangle( lua_State *L ) {
+int lshapesCheckCollisionPointTriangle( lua_State* L ) {
Vector2 point = uluaGetVector2( L, 1 );
Vector2 p1 = uluaGetVector2( L, 2 );
Vector2 p2 = uluaGetVector2( L, 3 );
@@ -916,7 +916,7 @@ Check if point is within a polygon described by array of vertices
- Success return bool
*/
-int lshapesCheckCollisionPointPoly( lua_State *L ) {
+int lshapesCheckCollisionPointPoly( lua_State* L ) {
Vector2 point = uluaGetVector2( L, 1 );
int pointCount = uluaGetTableLen( L, 2 );
Vector2 points[ pointCount ];
@@ -942,7 +942,7 @@ Check the collision between two lines defined by two points each, returns collis
- Success return bool, Vector2
*/
-int lshapesCheckCollisionLines( lua_State *L ) {
+int lshapesCheckCollisionLines( lua_State* L ) {
Vector2 startPos1 = uluaGetVector2( L, 1 );
Vector2 endPos1 = uluaGetVector2( L, 2 );
Vector2 startPos2 = uluaGetVector2( L, 3 );
@@ -963,7 +963,7 @@ Check if point belongs to line created between two points [p1] and [p2] with def
- Success return bool
*/
-int lshapesCheckCollisionPointLine( lua_State *L ) {
+int lshapesCheckCollisionPointLine( lua_State* L ) {
Vector2 point = uluaGetVector2( L, 1 );
Vector2 p1 = uluaGetVector2( L, 2 );
Vector2 p2 = uluaGetVector2( L, 3 );
@@ -981,7 +981,7 @@ Get collision rectangle for two rectangles collision
- Success return Rectangle
*/
-int lshapesGetCollisionRec( lua_State *L ) {
+int lshapesGetCollisionRec( lua_State* L ) {
Rectangle rec1 = uluaGetRectangle( L, 1 );
Rectangle rec2 = uluaGetRectangle( L, 2 );
diff --git a/src/state.c b/src/state.c
index 716bf4e..a3d5b20 100644
--- a/src/state.c
+++ b/src/state.c
@@ -6,7 +6,7 @@
State *state;
-bool stateInit( int argn, const char **argc, const char *exePath ) {
+bool stateInit( int argn, const char** argc, const char* exePath ) {
state = malloc( sizeof( State ) );
state->exePath = malloc( STRING_LEN * sizeof( char ) );
@@ -32,7 +32,7 @@ bool stateInit( int argn, const char **argc, const char *exePath ) {
state->defaultMaterial = LoadMaterialDefault();
state->defaultTexture = (Texture){ 1, 1, 1, 1, 7 };
state->RLGLcurrentShaderLocs = malloc( RL_MAX_SHADER_LOCATIONS * sizeof( int ) );
- int *defaultShaderLocs = rlGetShaderLocsDefault();
+ int* defaultShaderLocs = rlGetShaderLocsDefault();
for ( int i = 0; i < RL_MAX_SHADER_LOCATIONS; i++ ) {
state->RLGLcurrentShaderLocs[i] = defaultShaderLocs[i];
@@ -45,7 +45,7 @@ bool stateInit( int argn, const char **argc, const char *exePath ) {
return state->run;
}
-void stateInitInterpret( int argn, const char **argc ) {
+void stateInitInterpret( int argn, const char** argc ) {
state = malloc( sizeof( State ) );
luaInit( argn, argc );
}
diff --git a/src/text.c b/src/text.c
index 8981a9a..792507d 100644
--- a/src/text.c
+++ b/src/text.c
@@ -4,15 +4,15 @@
#include "textures.h"
#include "lua_core.h"
-void unloadGlyphInfo( GlyphInfo *glyph ) {
+void unloadGlyphInfo( GlyphInfo* glyph ) {
UnloadImage( glyph->image );
}
// DrawTextBoxed is modified DrawTextBoxedSelectable from raylib [text] example - Rectangle bounds
// Draw text using font inside rectangle limits
-static int DrawTextBoxed( Font font, const char *text, Rectangle rec, float fontSize, float spacing,
-bool wordWrap, Color *tints, int tintCount, Color *backTints, int backTintCount )
+static int DrawTextBoxed( Font font, const char* text, Rectangle rec, float fontSize, float spacing,
+bool wordWrap, Color* tints, int tintCount, Color* backTints, int backTintCount )
{
int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop
@@ -161,7 +161,7 @@ bool wordWrap, Color *tints, int tintCount, Color *backTints, int backTintCount
return mouseChar;
}
-static inline void getCodepoints( lua_State *L, int codepoints[], int index ) {
+static inline void getCodepoints( lua_State* L, int codepoints[], int index ) {
int t = index;
int i = 0;
lua_pushnil( L );
@@ -184,7 +184,7 @@ Get the default Font. Return as lightuserdata
- Success return Font
*/
-int ltextGetFontDefault( lua_State *L ) {
+int ltextGetFontDefault( lua_State* L ) {
lua_pushlightuserdata( L, &state->defaultFont );
return 1;
@@ -198,7 +198,7 @@ Load font from file into GPU memory (VRAM)
- Failure return nil
- Success return Font
*/
-int ltextLoadFont( lua_State *L ) {
+int ltextLoadFont( lua_State* L ) {
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
uluaPushFont( L, LoadFont( lua_tostring( L, 1 ) ) );
@@ -218,7 +218,7 @@ Load font from file with extended parameters, use NULL for codepoints to load th
- Failure return nil
- Success return Font
*/
-int ltextLoadFontEx( lua_State *L ) {
+int ltextLoadFontEx( lua_State* L ) {
int fontSize = luaL_checkinteger( L, 2 );
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
@@ -248,8 +248,8 @@ Load font from Image (XNA style)
- Success return Font
*/
-int ltextLoadFontFromImage( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltextLoadFontFromImage( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Color key = uluaGetColor( L, 2 );
int firstChar = luaL_checkinteger( L, 3 );
@@ -265,9 +265,9 @@ Load font from memory buffer, fileType refers to extension: i.e. '.ttf'. NOTE: f
- Success return Font
*/
-int ltextLoadFontFromMemory( lua_State *L ) {
- const char *fileType = luaL_checkstring( L, 1 );
- Buffer *fileData = uluaGetBuffer( L, 2 );
+int ltextLoadFontFromMemory( lua_State* L ) {
+ const char* fileType = luaL_checkstring( L, 1 );
+ Buffer* fileData = uluaGetBuffer( L, 2 );
int fontSize = luaL_checkinteger( L, 3 );
if ( lua_istable( L, 4 ) ) {
@@ -292,7 +292,7 @@ Load Font from data
- Success return Font
*/
-int ltextLoadFontFromData( lua_State *L ) {
+int ltextLoadFontFromData( lua_State* L ) {
luaL_checktype( L, 1, LUA_TTABLE );
Font font = { 0 };
@@ -353,8 +353,8 @@ Check if a font is ready
- Success return bool
*/
-int ltextIsFontReady( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextIsFontReady( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
lua_pushboolean( L, IsFontReady( *font ) );
@@ -368,8 +368,8 @@ Load font data for further use. NOTE: fileData type should be unsigned char
- Success return GlyphInfo{}
*/
-int ltextLoadFontData( lua_State *L ) {
- Buffer *fileData = uluaGetBuffer( L, 1 );
+int ltextLoadFontData( lua_State* L ) {
+ Buffer* fileData = uluaGetBuffer( L, 1 );
int fontSize = luaL_checkinteger( L, 2 );
int type = luaL_checkinteger( L, 4 );
int codepointCount = 95; // In case no chars count provided, default to 95.
@@ -379,7 +379,7 @@ int ltextLoadFontData( lua_State *L ) {
int codepoints[ codepointCount ];
getCodepoints( L, codepoints, 3 );
- GlyphInfo *glyphs = LoadFontData( fileData->data, fileData->size, fontSize, codepoints, codepointCount, type );
+ GlyphInfo* glyphs = LoadFontData( fileData->data, fileData->size, fontSize, codepoints, codepointCount, type );
lua_createtable( L, codepointCount, 0 );
for ( int i = 0; i < codepointCount; i++ ) {
@@ -391,7 +391,7 @@ int ltextLoadFontData( lua_State *L ) {
return 1;
}
/* If no codepoints provided. */
- GlyphInfo *glyphs = LoadFontData( fileData->data, fileData->size, fontSize, NULL, 0, type );
+ GlyphInfo* glyphs = LoadFontData( fileData->data, fileData->size, fontSize, NULL, 0, type );
lua_createtable( L, codepointCount, 0 );
for ( int i = 0; i < codepointCount; i++ ) {
@@ -410,7 +410,7 @@ Generate image font atlas using chars info. NOTE: Packing method: 0-Default, 1-S
- Success Image, Rectangle{}
*/
-int ltextGenImageFontAtlas( lua_State *L ) {
+int ltextGenImageFontAtlas( lua_State* L ) {
int fontSize = luaL_checkinteger( L, 2 );
int padding = luaL_checkinteger( L, 3 );
int packMethod = luaL_checkinteger( L, 4 );
@@ -444,8 +444,8 @@ int ltextGenImageFontAtlas( lua_State *L ) {
Unload font from GPU memory (VRAM)
*/
-int ltextUnloadFont( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextUnloadFont( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
UnloadFont( *font );
@@ -459,9 +459,9 @@ Export font as code file, returns true on success
- Success return bool
*/
-int ltextExportFontAsCode( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
- const char *fileName = luaL_checkstring( L, 2 );
+int ltextExportFontAsCode( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
+ const char* fileName = luaL_checkstring( L, 2 );
lua_pushboolean( L, ExportFontAsCode( *font, fileName ) );
@@ -477,7 +477,7 @@ int ltextExportFontAsCode( lua_State *L ) {
Draw current FPS
*/
-int ltextDrawFPS( lua_State *L ) {
+int ltextDrawFPS( lua_State* L ) {
Vector2 pos = uluaGetVector2( L, 1 );
DrawFPS( pos.x, pos.y );
@@ -490,7 +490,7 @@ int ltextDrawFPS( lua_State *L ) {
Draw text (using default font)
*/
-int ltextDrawText( lua_State *L ) {
+int ltextDrawText( lua_State* L ) {
Vector2 position = uluaGetVector2( L, 2 );
float fontSize = luaL_checknumber( L, 3 );
Color tint = uluaGetColor( L, 4 );
@@ -505,8 +505,8 @@ int ltextDrawText( lua_State *L ) {
Draw text using font and additional parameters
*/
-int ltextDrawTextEx( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextDrawTextEx( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
Vector2 position = uluaGetVector2( L, 3 );
float fontSize = luaL_checknumber( L, 4 );
float spacing = luaL_checknumber( L, 5 );
@@ -522,8 +522,8 @@ int ltextDrawTextEx( lua_State *L ) {
Draw text using Font and pro parameters (rotation)
*/
-int ltextDrawTextPro( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextDrawTextPro( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
Vector2 position = uluaGetVector2( L, 3 );
Vector2 origin = uluaGetVector2( L, 4 );
float rotation = luaL_checknumber( L, 5 );
@@ -541,8 +541,8 @@ int ltextDrawTextPro( lua_State *L ) {
Draw one character (codepoint)
*/
-int ltextDrawTextCodepoint( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextDrawTextCodepoint( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
int codepoint = luaL_checkinteger( L, 2 );
Vector2 position = uluaGetVector2( L, 3 );
float fontSize = luaL_checknumber( L, 4 );
@@ -558,8 +558,8 @@ int ltextDrawTextCodepoint( lua_State *L ) {
Draw multiple character (codepoint)
*/
-int ltextDrawTextCodepoints( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextDrawTextCodepoints( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
Vector2 position = uluaGetVector2( L, 3 );
float fontSize = luaL_checknumber( L, 4 );
float spacing = luaL_checknumber( L, 5 );
@@ -590,9 +590,9 @@ Draw text using font inside rectangle limits. Return character id from mouse pos
- Success return int
*/
-int ltextDrawTextBoxed( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
- const char *text = luaL_checkstring( L, 2 );
+int ltextDrawTextBoxed( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
+ const char* text = luaL_checkstring( L, 2 );
Rectangle rec = uluaGetRectangle( L, 3 );
float fontSize = luaL_checknumber( L, 4 );
float spacing = luaL_checknumber( L, 5 );
@@ -611,9 +611,9 @@ Draw text using font inside rectangle limits with support for tint and backgroun
- Success return int
*/
-int ltextDrawTextBoxedTinted( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
- const char *text = luaL_checkstring( L, 2 );
+int ltextDrawTextBoxedTinted( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
+ const char* text = luaL_checkstring( L, 2 );
Rectangle rec = uluaGetRectangle( L, 3 );
float fontSize = luaL_checknumber( L, 4 );
float spacing = luaL_checknumber( L, 5 );
@@ -656,7 +656,7 @@ int ltextDrawTextBoxedTinted( lua_State *L ) {
Set vertical line spacing when drawing with line-breaks
*/
-int ltextSetTextLineSpacing( lua_State *L ) {
+int ltextSetTextLineSpacing( lua_State* L ) {
int spacing = luaL_checkinteger( L, 1 );
SetTextLineSpacing( spacing );
@@ -669,8 +669,8 @@ Measure string size for Font
- Success return Vector2
*/
-int ltextMeasureText( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextMeasureText( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
float fontSize = luaL_checknumber( L, 3 );
float spacing = luaL_checknumber( L, 4 );
@@ -686,8 +686,8 @@ Get glyph index position in font for a codepoint (unicode character), fallback t
- Success return int
*/
-int ltextGetGlyphIndex( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextGetGlyphIndex( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
int codepoint = luaL_checkinteger( L, 2 );
lua_pushinteger( L, GetGlyphIndex( *font, codepoint ) );
@@ -702,8 +702,8 @@ Get glyph font info data for a codepoint (unicode character), fallback to '?' if
- Success return GlyphInfo
*/
-int ltextGetGlyphInfo( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextGetGlyphInfo( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
int codepoint = luaL_checkinteger( L, 2 );
int id = GetGlyphIndex( *font, codepoint );
@@ -720,8 +720,8 @@ Get glyph font info data by index. Return as lightuserdata
- Failure return nil
- Success return GlyphInfo
*/
-int ltextGetGlyphInfoByIndex( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextGetGlyphInfoByIndex( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
int index = luaL_checkinteger( L, 2 );
if ( 0 <= index && index < font->glyphCount ) {
@@ -742,8 +742,8 @@ Get glyph rectangle in font atlas for a codepoint (unicode character), fallback
- Success return Rectangle
*/
-int ltextGetGlyphAtlasRec( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextGetGlyphAtlasRec( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
int codepoint = luaL_checkinteger( L, 2 );
uluaPushRectangle( L, GetGlyphAtlasRec( *font, codepoint ) );
@@ -759,8 +759,8 @@ Get glyph rectangle in font atlas by index
- Failure return nil
- Success return Rectangle
*/
-int ltextGetGlyphAtlasRecByIndex( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextGetGlyphAtlasRecByIndex( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
int index = luaL_checkinteger( L, 2 );
if ( 0 <= index && index < font->glyphCount ) {
@@ -781,8 +781,8 @@ Get font base size (default chars height)
- Success return int
*/
-int ltextGetFontBaseSize( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextGetFontBaseSize( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
lua_pushinteger( L, font->baseSize );
@@ -796,8 +796,8 @@ Get font number of glyph characters
- Success return int
*/
-int ltextGetFontGlyphCount( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextGetFontGlyphCount( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
lua_pushinteger( L, font->glyphCount );
@@ -811,8 +811,8 @@ Get font padding around the glyph characters
- Success return int
*/
-int ltextGetFontGlyphPadding( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextGetFontGlyphPadding( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
lua_pushinteger( L, font->glyphPadding );
@@ -826,8 +826,8 @@ Get font texture atlas containing the glyphs. Return as lightuserdata
- Success return Texture
*/
-int ltextGetFontTexture( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltextGetFontTexture( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
lua_pushlightuserdata( L, &font->texture );
@@ -845,7 +845,7 @@ Load GlyphInfo from data
- Success return GlyphInfo
*/
-int ltextLoadGlyphInfo( lua_State *L ) {
+int ltextLoadGlyphInfo( lua_State* L ) {
luaL_checktype( L, 1, LUA_TTABLE );
GlyphInfo glyph = { 0 };
@@ -881,8 +881,8 @@ int ltextLoadGlyphInfo( lua_State *L ) {
Unload glyphInfo image from CPU memory (RAM)
*/
-int ltextUnloadGlyphInfo( lua_State *L ) {
- GlyphInfo *glyph = uluaGetGlyphInfo( L, 1 );
+int ltextUnloadGlyphInfo( lua_State* L ) {
+ GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
unloadGlyphInfo( glyph );
@@ -894,8 +894,8 @@ int ltextUnloadGlyphInfo( lua_State *L ) {
Set glyphInfo character value (Unicode)
*/
-int ltextSetGlyphInfoValue( lua_State *L ) {
- GlyphInfo *glyph = uluaGetGlyphInfo( L, 1 );
+int ltextSetGlyphInfoValue( lua_State* L ) {
+ GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
int value = luaL_checkinteger( L, 2 );
glyph->value = value;
@@ -908,8 +908,8 @@ int ltextSetGlyphInfoValue( lua_State *L ) {
Set glyphInfo character offset when drawing
*/
-int ltextSetGlyphInfoOffset( lua_State *L ) {
- GlyphInfo *glyph = uluaGetGlyphInfo( L, 1 );
+int ltextSetGlyphInfoOffset( lua_State* L ) {
+ GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
Vector2 offset = uluaGetVector2( L, 2 );
glyph->offsetX = (int)offset.x;
@@ -923,8 +923,8 @@ int ltextSetGlyphInfoOffset( lua_State *L ) {
Set glyphInfo character advance position X
*/
-int ltextSetGlyphInfoAdvanceX( lua_State *L ) {
- GlyphInfo *glyph = uluaGetGlyphInfo( L, 1 );
+int ltextSetGlyphInfoAdvanceX( lua_State* L ) {
+ GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
int advanceX = luaL_checkinteger( L, 2 );
glyph->advanceX = advanceX;
@@ -937,8 +937,8 @@ int ltextSetGlyphInfoAdvanceX( lua_State *L ) {
Set glyphInfo character image data
*/
-int ltextSetGlyphInfoImage( lua_State *L ) {
- GlyphInfo *glyph = uluaGetGlyphInfo( L, 1 );
+int ltextSetGlyphInfoImage( lua_State* L ) {
+ GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
Image image = *uluaGetImage( L, 2 );
glyph->image = image;
@@ -953,8 +953,8 @@ Get glyphInfo character value (Unicode)
- Success return int
*/
-int ltextGetGlyphInfoValue( lua_State *L ) {
- GlyphInfo *glyph = uluaGetGlyphInfo( L, 1 );
+int ltextGetGlyphInfoValue( lua_State* L ) {
+ GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
lua_pushinteger( L, glyph->value );
@@ -968,8 +968,8 @@ Get glyphInfo character offset when drawing
- Success return Vector2
*/
-int ltextGetGlyphInfoOffset( lua_State *L ) {
- GlyphInfo *glyph = uluaGetGlyphInfo( L, 1 );
+int ltextGetGlyphInfoOffset( lua_State* L ) {
+ GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
uluaPushVector2( L, (Vector2){ glyph->offsetX, glyph->offsetY } );
@@ -983,8 +983,8 @@ Get glyphInfo character advance position X
- Success return int
*/
-int ltextGetGlyphInfoAdvanceX( lua_State *L ) {
- GlyphInfo *glyph = uluaGetGlyphInfo( L, 1 );
+int ltextGetGlyphInfoAdvanceX( lua_State* L ) {
+ GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
lua_pushinteger( L, glyph->advanceX );
@@ -998,8 +998,8 @@ Get glyphInfo character image data. Return as lightuserdata
- Success return Image
*/
-int ltextGetGlyphInfoImage( lua_State *L ) {
- GlyphInfo *glyph = uluaGetGlyphInfo( L, 1 );
+int ltextGetGlyphInfoImage( lua_State* L ) {
+ GlyphInfo* glyph = uluaGetGlyphInfo( L, 1 );
lua_pushlightuserdata( L, &glyph->image );
@@ -1017,7 +1017,7 @@ Load UTF-8 text encoded from codepoints array
- Success return string
*/
-int ltextLoadUTF8( lua_State *L ) {
+int ltextLoadUTF8( lua_State* L ) {
int codepointCount = uluaGetTableLen( L, 1 );
int codepoints[ codepointCount ];
getCodepoints( L, codepoints, 1 );
@@ -1036,7 +1036,7 @@ Load all codepoints from a UTF-8 text string
- Success return int{}
*/
-int ltextLoadCodepoints( lua_State *L ) {
+int ltextLoadCodepoints( lua_State* L ) {
const char* text = luaL_checkstring( L, 1 );
int count = 0;
@@ -1060,7 +1060,7 @@ Get total number of codepoints in a UTF-8 encoded string
- Success return int
*/
-int ltextGetCodepointCount( lua_State *L ) {
+int ltextGetCodepointCount( lua_State* L ) {
const char* text = luaL_checkstring( L, 1 );
lua_pushinteger( L, GetCodepointCount( text ) );
@@ -1075,7 +1075,7 @@ Get codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
- Success return int, int
*/
-int ltextGetCodepoint( lua_State *L ) {
+int ltextGetCodepoint( lua_State* L ) {
const char* text = luaL_checkstring( L, 1 );
int codepointSize = 0;
@@ -1092,7 +1092,7 @@ Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
- Success return int, int
*/
-int ltextGetCodepointNext( lua_State *L ) {
+int ltextGetCodepointNext( lua_State* L ) {
const char* text = luaL_checkstring( L, 1 );
int codepointSize = 0;
@@ -1109,7 +1109,7 @@ Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failu
- Success return int, int
*/
-int ltextGetCodepointPrevious( lua_State *L ) {
+int ltextGetCodepointPrevious( lua_State* L ) {
const char* text = luaL_checkstring( L, 1 );
int codepointSize = 0;
@@ -1126,7 +1126,7 @@ Encode one codepoint into UTF-8 byte array
- Success return string
*/
-int ltextCodepointToUTF8( lua_State *L ) {
+int ltextCodepointToUTF8( lua_State* L ) {
int codepoint = luaL_checkinteger( L, 1 );
int utf8Size = 0;
@@ -1150,7 +1150,7 @@ Insert text in a specific position, moves all text forward
- Success return string
*/
-int ltextTextInsert( lua_State *L ) {
+int ltextTextInsert( lua_State* L ) {
const char* text = luaL_checkstring( L, 1 );
const char* insert = luaL_checkstring( L, 2 );
int position = luaL_checkinteger( L, 3 );
@@ -1180,7 +1180,7 @@ Split text into multiple strings
- Success return string{}
*/
-int ltextTextSplit( lua_State *L ) {
+int ltextTextSplit( lua_State* L ) {
const char* text = luaL_checkstring( L, 1 );
const char* delimiter = luaL_checkstring( L, 2 );
diff --git a/src/textures.c b/src/textures.c
index 48ba2cd..aa9a053 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -16,7 +16,7 @@ Load image from file into CPU memory (RAM)
- Failure return nil
- Success return Image
*/
-int ltexturesLoadImage( lua_State *L ) {
+int ltexturesLoadImage( lua_State* L ) {
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
uluaPushImage( L, LoadImage( luaL_checkstring( L, 1 ) ) );
@@ -36,8 +36,8 @@ Load image from RAW file data
- Failure return nil
- Success return Image
*/
-int ltexturesLoadImageRaw( lua_State *L ) {
- const char *fileName = luaL_checkstring( L, 1 );
+int ltexturesLoadImageRaw( lua_State* L ) {
+ const char* fileName = luaL_checkstring( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
int format = luaL_checkinteger( L, 3 );
int headerSize = luaL_checkinteger( L, 4 );
@@ -60,8 +60,8 @@ Load image from SVG file data or string with specified size
- Success return Image
*/
-int ltexturesLoadImageSvg( lua_State *L ) {
- const char *fileNameOrString = luaL_checkstring( L, 1 );
+int ltexturesLoadImageSvg( lua_State* L ) {
+ const char* fileNameOrString = luaL_checkstring( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
uluaPushImage( L, LoadImageSvg( fileNameOrString, (int)size.x, (int)size.y ) );
@@ -77,8 +77,8 @@ Load image sequence from file (frames appended to image.data). All frames are re
- Failure return nil
- Success return Image, int
*/
-int ltexturesLoadImageAnim( lua_State *L ) {
- const char *fileName = luaL_checkstring( L, 1 );
+int ltexturesLoadImageAnim( lua_State* L ) {
+ const char* fileName = luaL_checkstring( L, 1 );
if ( FileExists( fileName ) ) {
int frameCount = 0;
@@ -100,9 +100,9 @@ Load image from memory buffer, fileType refers to extension: i.e. '.png'
- Success return Image
*/
-int ltexturesLoadImageFromMemory( lua_State *L ) {
- const char *fileType = luaL_checkstring( L, 1 );
- Buffer *data = uluaGetBuffer( L, 2 );
+int ltexturesLoadImageFromMemory( lua_State* L ) {
+ const char* fileType = luaL_checkstring( L, 1 );
+ Buffer* data = uluaGetBuffer( L, 2 );
uluaPushImage( L, LoadImageFromMemory( fileType, data->data, data->size ) );
@@ -116,8 +116,8 @@ Load image from data
- Success return Image
*/
-int ltexturesLoadImageFromData( lua_State *L ) {
- Buffer *data = uluaGetBuffer( L, 1 );
+int ltexturesLoadImageFromData( lua_State* L ) {
+ Buffer* data = uluaGetBuffer( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
int mipmaps = luaL_checkinteger( L, 3 );
int format = luaL_checkinteger( L, 4 );
@@ -144,8 +144,8 @@ Load image from GPU texture data
- Success return Image
*/
-int ltexturesLoadImageFromTexture( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesLoadImageFromTexture( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
uluaPushImage( L, LoadImageFromTexture( *texture ) );
return 1;
@@ -158,7 +158,7 @@ Load image from screen buffer and (screenshot)
- Success return Image
*/
-int ltexturesLoadImageFromScreen( lua_State *L ) {
+int ltexturesLoadImageFromScreen( lua_State* L ) {
uluaPushImage( L, LoadImageFromScreen() );
return 1;
@@ -171,8 +171,8 @@ Check if an image is ready
- Success return bool
*/
-int ltextureIsImageReady( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltextureIsImageReady( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
lua_pushboolean( L, IsImageReady( *image ) );
@@ -184,8 +184,8 @@ int ltextureIsImageReady( lua_State *L ) {
Unload image from CPU memory (RAM)
*/
-int ltextureUnloadImage( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltextureUnloadImage( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
UnloadImage( *image );
@@ -199,8 +199,8 @@ Export image data to file, returns true on success
- Success return bool
*/
-int ltexturesExportImage( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesExportImage( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
lua_pushboolean( L, ExportImage( *image, luaL_checkstring( L, 2 ) ) );
return 1;
@@ -213,9 +213,9 @@ Export image to memory buffer
- Success return Buffer
*/
-int ltexturesExportImageToMemory( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
- const char *fileType = luaL_checkstring( L, 2 );
+int ltexturesExportImageToMemory( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
+ const char* fileType = luaL_checkstring( L, 2 );
Buffer buffer = {
.type = BUFFER_UNSIGNED_CHAR
@@ -234,8 +234,8 @@ Export image as code file defining an array of bytes, returns true on success
- Success return bool
*/
-int ltexturesExportImageAsCode( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesExportImageAsCode( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
lua_pushboolean( L, ExportImageAsCode( *image, luaL_checkstring( L, 2 ) ) );
return 1;
@@ -252,7 +252,7 @@ Generate image: plain color
- Success return Image
*/
-int ltexturesGenImageColor( lua_State *L ) {
+int ltexturesGenImageColor( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
Color color = uluaGetColor( L, 1 );
@@ -268,7 +268,7 @@ Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradi
- Success return Image
*/
-int ltexturesGenImageGradientLinear( lua_State *L ) {
+int ltexturesGenImageGradientLinear( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
int direction = luaL_checkinteger( L, 2 );
Color start = uluaGetColor( L, 3 );
@@ -286,7 +286,7 @@ Generate image: radial gradient
- Success return Image
*/
-int ltexturesGenImageGradientRadial( lua_State *L ) {
+int ltexturesGenImageGradientRadial( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
float density = luaL_checknumber( L, 2 );
Color inner = uluaGetColor( L, 3 );
@@ -304,7 +304,7 @@ Generate image: square gradient
- Success return Image
*/
-int ltexturesGenImageGradientSquare( lua_State *L ) {
+int ltexturesGenImageGradientSquare( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
float density = luaL_checknumber( L, 2 );
Color inner = uluaGetColor( L, 3 );
@@ -322,7 +322,7 @@ Generate image: checked
- Success return Image
*/
-int ltexturesGenImageChecked( lua_State *L ) {
+int ltexturesGenImageChecked( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
Vector2 checks = uluaGetVector2( L, 2 );
Color col1 = uluaGetColor( L, 3 );
@@ -340,7 +340,7 @@ Generate image: white noise
- Success return Image
*/
-int ltexturesGenImageWhiteNoise( lua_State *L ) {
+int ltexturesGenImageWhiteNoise( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
float factor = luaL_checknumber( L, 2 );
@@ -356,7 +356,7 @@ Generate image: perlin noise
- Success return Image
*/
-int ltexturesGenImagePerlinNoise( lua_State *L ) {
+int ltexturesGenImagePerlinNoise( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
Vector2 offset = uluaGetVector2( L, 2 );
float factor = luaL_checknumber( L, 3 );
@@ -373,7 +373,7 @@ Generate image: cellular algorithm. Bigger tileSize means bigger cells
- Success return Image
*/
-int ltexturesGenImageCellular( lua_State *L ) {
+int ltexturesGenImageCellular( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
int tileSize = luaL_checkinteger( L, 2 );
@@ -389,7 +389,7 @@ Generate image: grayscale image from text data
- Success return Image
*/
-int ltexturesGenImageText( lua_State *L ) {
+int ltexturesGenImageText( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
uluaPushImage( L, GenImageText( (int)size.x, (int)size.y, luaL_checkstring( L, 2 ) ) );
@@ -408,8 +408,8 @@ Create an image duplicate (useful for transformations)
- Success return Image
*/
-int ltexturesImageCopy( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageCopy( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
uluaPushImage( L, ImageCopy( *image ) );
@@ -423,8 +423,8 @@ Create an image from another image piece
- Success return Image
*/
-int ltexturesImageFromImage( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageFromImage( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Rectangle rec = uluaGetRectangle( L, 2 );
uluaPushImage( L, ImageFromImage( *image, rec ) );
@@ -439,8 +439,8 @@ Create an image from text (custom sprite font)
- Success return Image
*/
-int ltexturesImageText( lua_State *L ) {
- Font *font = uluaGetFont( L, 1 );
+int ltexturesImageText( lua_State* L ) {
+ Font* font = uluaGetFont( L, 1 );
float fontSize = lua_tonumber( L, 3 );
float spacing = lua_tonumber( L, 4 );
Color tint = uluaGetColor( L, 5 );
@@ -455,8 +455,8 @@ int ltexturesImageText( lua_State *L ) {
Convert image data to desired format
*/
-int ltexturesImageFormat( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageFormat( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
int newFormat = luaL_checkinteger( L, 2 );
ImageFormat( image, newFormat );
@@ -469,8 +469,8 @@ int ltexturesImageFormat( lua_State *L ) {
Convert image to POT (power-of-two)
*/
-int ltexturesImageToPOT( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageToPOT( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Color fill = uluaGetColor( L, 2 );
ImageToPOT( image, fill );
@@ -483,8 +483,8 @@ int ltexturesImageToPOT( lua_State *L ) {
Crop an image to a defined rectangle
*/
-int ltexturesImageCrop( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageCrop( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Rectangle crop = uluaGetRectangle( L, 2 );
ImageCrop( image, crop );
@@ -497,8 +497,8 @@ int ltexturesImageCrop( lua_State *L ) {
Crop image depending on alpha value
*/
-int ltexturesImageAlphaCrop( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageAlphaCrop( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
float threshold = lua_tonumber( L, 2 );
ImageAlphaCrop( image, threshold );
@@ -511,8 +511,8 @@ int ltexturesImageAlphaCrop( lua_State *L ) {
Clear alpha channel to desired color
*/
-int ltexturesImageAlphaClear( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageAlphaClear( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Color color = uluaGetColor( L, 2 );
float threshold = lua_tonumber( L, 3 );
@@ -526,9 +526,9 @@ int ltexturesImageAlphaClear( lua_State *L ) {
Apply alpha mask to image
*/
-int ltexturesImageAlphaMask( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
- Image *alphaMask = uluaGetImage( L, 2 );
+int ltexturesImageAlphaMask( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
+ Image* alphaMask = uluaGetImage( L, 2 );
ImageAlphaMask( image, *alphaMask );
@@ -540,8 +540,8 @@ int ltexturesImageAlphaMask( lua_State *L ) {
Premultiply alpha channel
*/
-int ltexturesImageAlphaPremultiply( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageAlphaPremultiply( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
ImageAlphaPremultiply( image );
@@ -553,8 +553,8 @@ int ltexturesImageAlphaPremultiply( lua_State *L ) {
Apply Gaussian blur using a box blur approximation
*/
-int ltexturesImageBlurGaussian( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageBlurGaussian( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
int blurSize = luaL_checkinteger( L, 2 );
ImageBlurGaussian( image, blurSize );
@@ -567,8 +567,8 @@ int ltexturesImageBlurGaussian( lua_State *L ) {
Resize image (Bicubic scaling algorithm)
*/
-int ltexturesImageResize( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageResize( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
ImageResize( image, (int)size.x, (int)size.y );
@@ -581,8 +581,8 @@ int ltexturesImageResize( lua_State *L ) {
Resize image (Nearest-Neighbor scaling algorithm)
*/
-int ltexturesImageResizeNN( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageResizeNN( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
ImageResizeNN( image, (int)size.x, (int)size.y );
@@ -595,8 +595,8 @@ int ltexturesImageResizeNN( lua_State *L ) {
Resize canvas and fill with color
*/
-int ltexturesImageResizeCanvas( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageResizeCanvas( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Vector2 size = uluaGetVector2( L, 2 );
Vector2 offset = uluaGetVector2( L, 3 );
Color fill = uluaGetColor( L, 4 );
@@ -611,8 +611,8 @@ int ltexturesImageResizeCanvas( lua_State *L ) {
Generate all mipmap levels for a provided image
*/
-int ltexturesImageMipmaps( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageMipmaps( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
ImageMipmaps( image );
@@ -624,8 +624,8 @@ int ltexturesImageMipmaps( lua_State *L ) {
Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
*/
-int ltexturesImageDither( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageDither( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Color bpp = uluaGetColor( L, 2 );
ImageDither( image, bpp.r, bpp.g, bpp.b, bpp.a );
@@ -638,8 +638,8 @@ int ltexturesImageDither( lua_State *L ) {
Flip image vertically
*/
-int ltexturesImageFlipVertical( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageFlipVertical( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
ImageFlipVertical( image );
@@ -651,8 +651,8 @@ int ltexturesImageFlipVertical( lua_State *L ) {
Flip image horizontally
*/
-int ltexturesImageFlipHorizontal( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageFlipHorizontal( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
ImageFlipHorizontal( image );
@@ -664,8 +664,8 @@ int ltexturesImageFlipHorizontal( lua_State *L ) {
Rotate image by input angle in degrees (-359 to 359)
*/
-int ltexturesImageRotate( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageRotate( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
int degrees = luaL_checkinteger( L, 2 );
ImageRotate( image, degrees );
@@ -678,8 +678,8 @@ int ltexturesImageRotate( lua_State *L ) {
Rotate image clockwise 90deg
*/
-int ltexturesImageRotateCW( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageRotateCW( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
ImageRotateCW( image );
@@ -691,8 +691,8 @@ int ltexturesImageRotateCW( lua_State *L ) {
Rotate image counter-clockwise 90deg
*/
-int ltexturesImageRotateCCW( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageRotateCCW( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
ImageRotateCCW( image );
@@ -704,8 +704,8 @@ int ltexturesImageRotateCCW( lua_State *L ) {
Modify image color: tint
*/
-int ltexturesImageColorTint( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageColorTint( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Color color = uluaGetColor( L, 2 );
ImageColorTint( image, color );
@@ -718,8 +718,8 @@ int ltexturesImageColorTint( lua_State *L ) {
Modify image color: invert
*/
-int ltexturesImageColorInvert( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageColorInvert( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
ImageColorInvert( image );
@@ -731,8 +731,8 @@ int ltexturesImageColorInvert( lua_State *L ) {
Modify image color: grayscale
*/
-int ltexturesImageColorGrayscale( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageColorGrayscale( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
ImageColorGrayscale( image );
@@ -744,8 +744,8 @@ int ltexturesImageColorGrayscale( lua_State *L ) {
Modify image color: contrast (-100 to 100)
*/
-int ltexturesImageColorContrast( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageColorContrast( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
float contrast = luaL_checkinteger( L, 2 );
ImageColorContrast( image, contrast );
@@ -758,8 +758,8 @@ int ltexturesImageColorContrast( lua_State *L ) {
Modify image color: brightness (-255 to 255)
*/
-int ltexturesImageColorBrightness( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageColorBrightness( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
int brightness = luaL_checkinteger( L, 2 );
ImageColorBrightness( image, brightness );
@@ -772,8 +772,8 @@ int ltexturesImageColorBrightness( lua_State *L ) {
Modify image color: replace color
*/
-int ltexturesImageColorReplace( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageColorReplace( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Color color = uluaGetColor( L, 2 );
Color replace = uluaGetColor( L, 3 );
@@ -789,11 +789,11 @@ Load color data from image as a Color array (RGBA - 32bit)
- Success return Color{}
*/
-int ltexturesLoadImageColors( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesLoadImageColors( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
int colorCount = image->width * image->height;
- Color *colors = LoadImageColors( *image );
+ Color* colors = LoadImageColors( *image );
lua_createtable( L, colorCount, 0 );
@@ -813,12 +813,12 @@ Load colors palette from image as a Color array (RGBA - 32bit)
- Success return Color{}
*/
-int ltexturesLoadImagePalette( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesLoadImagePalette( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
int maxPaletteSize = luaL_checkinteger( L, 2 );
int colorCount = 0;
- Color *colors = LoadImagePalette( *image, maxPaletteSize, &colorCount );
+ Color* colors = LoadImagePalette( *image, maxPaletteSize, &colorCount );
lua_createtable( L, colorCount, 0 );
@@ -838,8 +838,8 @@ Get image alpha border rectangle
- Success return Rectangle
*/
-int ltexturesGetImageAlphaBorder( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesGetImageAlphaBorder( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
float threshold = luaL_checknumber( L, 2 );
uluaPushRectangle( L, GetImageAlphaBorder( *image, threshold ) );
@@ -854,8 +854,8 @@ Get image pixel color at (x, y) position
- Success return Color
*/
-int ltexturesGetImageColor( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesGetImageColor( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Vector2 pixelPos = uluaGetVector2( L, 2 );
uluaPushColor( L, GetImageColor( *image, pixelPos.x, pixelPos.y ) );
@@ -874,8 +874,8 @@ Get image data as Buffer
- Success return Buffer
*/
-int ltexturesGetImageData( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesGetImageData( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Buffer buffer = (Buffer){
.type = BUFFER_UNSIGNED_CHAR,
@@ -896,8 +896,8 @@ Get image size
- Success return Vector2
*/
-int ltexturesGetImageSize( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesGetImageSize( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
uluaPushVector2( L, (Vector2){ image->width, image->height } );
@@ -911,8 +911,8 @@ Get image mipmaps. Mipmap levels, 1 by default
- Success return int
*/
-int ltexturesGetImageMipmaps( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesGetImageMipmaps( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
lua_pushinteger( L, image->mipmaps );
@@ -926,8 +926,8 @@ Get image data format (PixelFormat type)
- Success return int
*/
-int ltexturesGetImageFormat( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesGetImageFormat( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
lua_pushinteger( L, image->format );
@@ -943,8 +943,8 @@ int ltexturesGetImageFormat( lua_State *L ) {
Clear image background with given color
*/
-int ltexturesImageClearBackground( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageClearBackground( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Color color = uluaGetColor( L, 2 );
ImageClearBackground( image, color );
@@ -957,8 +957,8 @@ int ltexturesImageClearBackground( lua_State *L ) {
Draw pixel within an image
*/
-int ltexturesImageDrawPixel( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageDrawPixel( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Vector2 position = uluaGetVector2( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -972,8 +972,8 @@ int ltexturesImageDrawPixel( lua_State *L ) {
Draw line within an image
*/
-int ltexturesImageDrawLine( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageDrawLine( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Vector2 start = uluaGetVector2( L, 2 );
Vector2 end = uluaGetVector2( L, 3 );
Color color = uluaGetColor( L, 4 );
@@ -988,8 +988,8 @@ int ltexturesImageDrawLine( lua_State *L ) {
Draw circle within an image
*/
-int ltexturesImageDrawCircle( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageDrawCircle( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Vector2 center = uluaGetVector2( L, 2 );
int radius = luaL_checkinteger( L, 3 );
Color color = uluaGetColor( L, 4 );
@@ -1004,8 +1004,8 @@ int ltexturesImageDrawCircle( lua_State *L ) {
Draw circle outline within an image
*/
-int ltexturesImageDrawCircleLines( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageDrawCircleLines( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Vector2 center = uluaGetVector2( L, 2 );
int radius = luaL_checkinteger( L, 3 );
Color color = uluaGetColor( L, 4 );
@@ -1020,8 +1020,8 @@ int ltexturesImageDrawCircleLines( lua_State *L ) {
Draw rectangle within an image
*/
-int ltexturesImageDrawRectangle( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageDrawRectangle( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Rectangle rec = uluaGetRectangle( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -1035,8 +1035,8 @@ int ltexturesImageDrawRectangle( lua_State *L ) {
Draw rectangle lines within an image
*/
-int ltexturesImageDrawRectangleLines( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesImageDrawRectangleLines( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
Rectangle rec = uluaGetRectangle( L, 2 );
int thick = luaL_checkinteger( L, 3 );
Color color = uluaGetColor( L, 4 );
@@ -1051,9 +1051,9 @@ int ltexturesImageDrawRectangleLines( lua_State *L ) {
Draw a source image within a destination image (Tint applied to source)
*/
-int ltexturesImageDraw( lua_State *L ) {
- Image *imageDstId = uluaGetImage( L, 1 );
- Image *imageSrcId = uluaGetImage( L, 2 );
+int ltexturesImageDraw( lua_State* L ) {
+ Image* imageDstId = uluaGetImage( L, 1 );
+ Image* imageSrcId = uluaGetImage( L, 2 );
Rectangle srcRec = uluaGetRectangle( L, 3 );
Rectangle dstRec = uluaGetRectangle( L, 4 );
Color tint = uluaGetColor( L, 5 );
@@ -1068,9 +1068,9 @@ int ltexturesImageDraw( lua_State *L ) {
Draw text (Custom sprite font) within an image (Destination)
*/
-int ltexturesImageDrawTextEx( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
- Font *font = uluaGetFont( L, 2 );
+int ltexturesImageDrawTextEx( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
+ Font* font = uluaGetFont( L, 2 );
Vector2 position = uluaGetVector2( L, 4 );
float fontSize = luaL_checknumber( L, 5 );
float spacing = luaL_checknumber( L, 6 );
@@ -1092,7 +1092,7 @@ Get default texture. Return as lightuserdata
- Success return Texture
*/
-int ltexturesGetTextureDefault( lua_State *L ) {
+int ltexturesGetTextureDefault( lua_State* L ) {
lua_pushlightuserdata( L, &state->defaultTexture );
return 1;
@@ -1106,7 +1106,7 @@ Load texture from file into GPU memory ( VRAM )
- Failure return nil
- Success return Texture
*/
-int ltexturesLoadTexture( lua_State *L ) {
+int ltexturesLoadTexture( lua_State* L ) {
if ( FileExists( luaL_checkstring( L, 1 ) ) ) {
uluaPushTexture( L, LoadTexture( lua_tostring( L, 1 ) ) );
@@ -1125,8 +1125,8 @@ Load texture from image data
- Success return Texture
*/
-int ltexturesLoadTextureFromImage( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesLoadTextureFromImage( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
uluaPushTexture( L, LoadTextureFromImage( *image ) );
@@ -1140,8 +1140,8 @@ Load cubemap from image, multiple image cubemap layouts supported
- Success return Texture
*/
-int ltexturesLoadTextureCubemap( lua_State *L ) {
- Image *image = uluaGetImage( L, 1 );
+int ltexturesLoadTextureCubemap( lua_State* L ) {
+ Image* image = uluaGetImage( L, 1 );
int layout = luaL_checkinteger( L, 2 );
uluaPushTexture( L, LoadTextureCubemap( *image, layout ) );
@@ -1156,7 +1156,7 @@ Load Texture from data
- Success return Texture
*/
-int ltexturesLoadTextureFromData( lua_State *L ) {
+int ltexturesLoadTextureFromData( lua_State* L ) {
luaL_checktype( L, 1, LUA_TTABLE );
Texture texture = { 0 };
@@ -1194,7 +1194,7 @@ Load texture for rendering (framebuffer)
- Success return RenderTexture
*/
-int ltexturesLoadRenderTexture( lua_State *L ) {
+int ltexturesLoadRenderTexture( lua_State* L ) {
Vector2 size = uluaGetVector2( L, 1 );
uluaPushRenderTexture( L, LoadRenderTexture( (int)size.x, (int)size.y ) );
@@ -1209,7 +1209,7 @@ Load RenderTexture from data (framebuffer)
- Success return RenderTexture
*/
-int ltexturesLoadRenderTextureFromData( lua_State *L ) {
+int ltexturesLoadRenderTextureFromData( lua_State* L ) {
luaL_checktype( L, 1, LUA_TTABLE );
RenderTexture renTexture = { 0 };
@@ -1222,11 +1222,11 @@ int ltexturesLoadRenderTextureFromData( lua_State *L ) {
renTexture.id = (unsigned int)luaL_checkinteger( L, -1 );
}
else if ( strcmp( "texture", (char*)lua_tostring( L, -2 ) ) == 0 ) {
- Texture *texture = uluaGetTexture( L, -1 );
+ Texture* texture = uluaGetTexture( L, -1 );
renTexture.texture = *texture;
}
else if ( strcmp( "depth", (char*)lua_tostring( L, -2 ) ) == 0 ) {
- Texture *depth = uluaGetTexture( L, -1 );
+ Texture* depth = uluaGetTexture( L, -1 );
renTexture.depth = *depth;
}
lua_pop( L, 1 );
@@ -1243,8 +1243,8 @@ Check if a texture is ready
- Success return bool
*/
-int ltexturesIsTextureReady( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesIsTextureReady( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
lua_pushboolean( L, IsTextureReady( *texture ) );
@@ -1256,8 +1256,8 @@ int ltexturesIsTextureReady( lua_State *L ) {
Unload texture from GPU memory (VRAM)
*/
-int ltextureUnloadTexture( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltextureUnloadTexture( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
UnloadTexture( *texture );
@@ -1271,8 +1271,8 @@ Check if a render texture is ready
- Success return bool
*/
-int ltexturesIsRenderTextureReady( lua_State *L ) {
- RenderTexture *target = uluaGetRenderTexture( L, 1 );
+int ltexturesIsRenderTextureReady( lua_State* L ) {
+ RenderTexture* target = uluaGetRenderTexture( L, 1 );
lua_pushboolean( L, IsRenderTextureReady( *target ) );
@@ -1284,8 +1284,8 @@ int ltexturesIsRenderTextureReady( lua_State *L ) {
Unload render texture from GPU memory (VRAM)
*/
-int ltextureUnloadRenderTexture( lua_State *L ) {
- RenderTexture *target = uluaGetRenderTexture( L, 1 );
+int ltextureUnloadRenderTexture( lua_State* L ) {
+ RenderTexture* target = uluaGetRenderTexture( L, 1 );
UnloadRenderTexture( *target );
@@ -1298,11 +1298,11 @@ int ltextureUnloadRenderTexture( lua_State *L ) {
Update GPU texture with new data
NOTE! Should be TEXTURE_TYPE_TEXTURE. Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format
*/
-int ltexturesUpdateTexture( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesUpdateTexture( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
size_t len = uluaGetTableLen( L, 2 );
- unsigned char *pixels = malloc( len * 4 * sizeof( unsigned char ) );
+ unsigned char* pixels = malloc( len * 4 * sizeof( unsigned char ) );
int t = lua_gettop( L );
unsigned int i = 0;
@@ -1336,12 +1336,12 @@ int ltexturesUpdateTexture( lua_State *L ) {
Update GPU texture rectangle with new data.
Pixel should be in format { { 255, 255, 255, 255 }... } depending on the pixel format
*/
-int ltexturesUpdateTextureRec( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesUpdateTextureRec( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
Rectangle rec = uluaGetRectangle( L, 2 );
size_t len = uluaGetTableLen( L, 3 );
- unsigned char *pixels = malloc( len * 4 * sizeof( unsigned char ) );
+ unsigned char* pixels = malloc( len * 4 * sizeof( unsigned char ) );
int t = lua_gettop( L );
unsigned int i = 0;
@@ -1380,8 +1380,8 @@ int ltexturesUpdateTextureRec( lua_State *L ) {
Generate GPU mipmaps for a texture
*/
-int ltexturesGenTextureMipmaps( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesGenTextureMipmaps( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
GenTextureMipmaps( texture );
@@ -1393,8 +1393,8 @@ int ltexturesGenTextureMipmaps( lua_State *L ) {
Set texture scaling filter mode (TEXTURE_FILTER_POINT, TEXTURE_FILTER_BILINEAR...)
*/
-int ltexturesSetTextureFilter( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesSetTextureFilter( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
int filter = luaL_checkinteger( L, 2 );
SetTextureFilter( *texture, filter );
@@ -1407,8 +1407,8 @@ int ltexturesSetTextureFilter( lua_State *L ) {
Set texture wrapping mode (TEXTURE_WRAP_REPEAT, TEXTURE_WRAP_CLAMP...)
*/
-int ltexturesSetTextureWrap( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesSetTextureWrap( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
int wrap = luaL_checkinteger( L, 2 );
SetTextureWrap( *texture, wrap );
@@ -1423,8 +1423,8 @@ Get OpenGL texture id
- Success return int
*/
-int ltexturesGetTextureId( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesGetTextureId( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
lua_pushinteger( L, texture->id );
@@ -1438,8 +1438,8 @@ Get texture size
- Success return Vector2
*/
-int ltexturesGetTextureSize( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesGetTextureSize( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
uluaPushVector2( L, (Vector2){ texture->width, texture->height } );
@@ -1453,8 +1453,8 @@ Get texture mipmaps. Mipmap levels, 1 by default
- Success return int
*/
-int ltexturesGetTextureMipmaps( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesGetTextureMipmaps( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
lua_pushinteger( L, texture->mipmaps );
@@ -1468,8 +1468,8 @@ Get texture data format (PixelFormat type)
- Success return int
*/
-int ltexturesGetTextureFormat( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesGetTextureFormat( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
lua_pushinteger( L, texture->format );
@@ -1485,8 +1485,8 @@ int ltexturesGetTextureFormat( lua_State *L ) {
Draw a Texture2D
*/
-int ltexturesDrawTexture( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesDrawTexture( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
Vector2 pos = uluaGetVector2( L, 2 );
Color color = uluaGetColor( L, 3 );
@@ -1499,8 +1499,8 @@ int ltexturesDrawTexture( lua_State *L ) {
Draw a part of a texture defined by a rectangle
*/
-int ltexturesDrawTextureRec( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesDrawTextureRec( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
Rectangle srcRect = uluaGetRectangle( L, 2 );
Vector2 pos = uluaGetVector2( L, 3 );
Color tint = uluaGetColor( L, 4 );
@@ -1514,8 +1514,8 @@ int ltexturesDrawTextureRec( lua_State *L ) {
Draw a part of a texture defined by a rectangle with "pro" parameters
*/
-int ltexturesDrawTexturePro( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesDrawTexturePro( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
Rectangle srcRect = uluaGetRectangle( L, 2 );
Rectangle dstRect = uluaGetRectangle( L, 3 );
Vector2 origin = uluaGetVector2( L, 4 );
@@ -1532,8 +1532,8 @@ int ltexturesDrawTexturePro( lua_State *L ) {
Draws a texture (or part of it) that stretches or shrinks nicely
*/
-int ltexturesDrawTextureNPatch( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesDrawTextureNPatch( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
NPatchInfo nPatchInfo = uluaGetNPatchInfo( L, 2 );
Rectangle dest = uluaGetRectangle( L, 3 );
Vector2 origin = uluaGetVector2( L, 4 );
@@ -1586,8 +1586,8 @@ inline static void drawNPatchArea( Vector4 src, Vector4 dst, Vector2 texSize ) {
}
}
-int ltexturesDrawTextureNPatchRepeat( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesDrawTextureNPatchRepeat( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
NPatchInfo nPatchInfo = uluaGetNPatchInfo( L, 2 );
Rectangle dest = uluaGetRectangle( L, 3 );
Vector2 origin = uluaGetVector2( L, 4 );
@@ -1774,8 +1774,8 @@ Get OpenGL framebuffer object id
- Success return int
*/
-int ltexturesGetRenderTextureId( lua_State *L ) {
- RenderTexture *renderTexture = uluaGetRenderTexture( L, 1 );
+int ltexturesGetRenderTextureId( lua_State* L ) {
+ RenderTexture* renderTexture = uluaGetRenderTexture( L, 1 );
lua_pushinteger( L, renderTexture->id );
@@ -1789,8 +1789,8 @@ Get color buffer attachment texture. Returns as lightuserdata
- Success return Texture
*/
-int ltexturesGetRenderTextureTexture( lua_State *L ) {
- RenderTexture *renderTexture = uluaGetRenderTexture( L, 1 );
+int ltexturesGetRenderTextureTexture( lua_State* L ) {
+ RenderTexture* renderTexture = uluaGetRenderTexture( L, 1 );
lua_pushlightuserdata( L, &renderTexture->texture );
@@ -1804,8 +1804,8 @@ Get depth buffer attachment texture. Returns as lightuserdata
- Success return Texture
*/
-int ltexturesGetRenderTextureDepthTexture( lua_State *L ) {
- RenderTexture *renderTexture = uluaGetRenderTexture( L, 1 );
+int ltexturesGetRenderTextureDepthTexture( lua_State* L ) {
+ RenderTexture* renderTexture = uluaGetRenderTexture( L, 1 );
lua_pushlightuserdata( L, &renderTexture->depth );
@@ -1823,7 +1823,7 @@ Returns color with alpha applied, alpha goes from 0.0f to 1.0f
- Success return Color
*/
-int ltexturesFade( lua_State *L ) {
+int ltexturesFade( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
float alpha = luaL_checknumber( L, 2 );
@@ -1839,7 +1839,7 @@ Returns hexadecimal value for a Color
- Success return int
*/
-int ltexturesColorToInt( lua_State *L ) {
+int ltexturesColorToInt( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
lua_pushinteger( L, ColorToInt( color ) );
@@ -1854,7 +1854,7 @@ Returns Color normalized as float [0..1]
- Success return Vector4
*/
-int ltexturesColorNormalize( lua_State *L ) {
+int ltexturesColorNormalize( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
uluaPushVector4( L, ColorNormalize( color ) );
@@ -1869,7 +1869,7 @@ Color from normalized values [0..1]
- Success return Color
*/
-int ltexturesColorFromNormalized( lua_State *L ) {
+int ltexturesColorFromNormalized( lua_State* L ) {
Vector4 normalized = uluaGetVector4( L, 1 );
uluaPushColor( L, ColorFromNormalized( normalized ) );
@@ -1884,7 +1884,7 @@ Returns HSV values for a Color, hue [0..360], saturation/value [0..1]
- Success return Vector3
*/
-int ltexturesColorToHSV( lua_State *L ) {
+int ltexturesColorToHSV( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
uluaPushVector3( L, ColorToHSV( color ) );
@@ -1899,7 +1899,7 @@ Returns a Color from HSV values, hue [0..360], saturation/value [0..1]
- Success return Color
*/
-int ltexturesColorFromHSV( lua_State *L ) {
+int ltexturesColorFromHSV( lua_State* L ) {
float hue = luaL_checknumber( L, 1 );
float saturation = luaL_checknumber( L, 2 );
float value = luaL_checknumber( L, 3 );
@@ -1916,7 +1916,7 @@ Get color multiplied with another color
- Success return Color
*/
-int ltexturesColorTint( lua_State *L ) {
+int ltexturesColorTint( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
Color tint = uluaGetColor( L, 2 );
@@ -1932,7 +1932,7 @@ Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
- Success return Color
*/
-int ltexturesColorBrightness( lua_State *L ) {
+int ltexturesColorBrightness( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
float factor = luaL_checknumber( L, 2 );
@@ -1948,7 +1948,7 @@ Get color with contrast correction, contrast values between -1.0f and 1.0f
- Success return Color
*/
-int ltexturesColorContrast( lua_State *L ) {
+int ltexturesColorContrast( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
float contrast = luaL_checknumber( L, 2 );
@@ -1964,7 +1964,7 @@ Returns color with alpha applied, alpha goes from 0.0f to 1.0f
- Success return Color
*/
-int ltexturesColorAlpha( lua_State *L ) {
+int ltexturesColorAlpha( lua_State* L ) {
Color color = uluaGetColor( L, 1 );
float alpha = luaL_checknumber( L, 2 );
@@ -1980,7 +1980,7 @@ Returns src alpha-blended into dst color with tint
- Success return Color
*/
-int ltexturesColorAlphaBlend( lua_State *L ) {
+int ltexturesColorAlphaBlend( lua_State* L ) {
Color dst = uluaGetColor( L, 1 );
Color src = uluaGetColor( L, 2 );
Color tint = uluaGetColor( L, 3 );
@@ -1997,7 +1997,7 @@ Get Color structure from hexadecimal value
- Success return Color
*/
-int ltexturesGetColor( lua_State *L ) {
+int ltexturesGetColor( lua_State* L ) {
unsigned int hexValue = (unsigned int)luaL_checkinteger( L, 1 );
uluaPushColor( L, GetColor( hexValue ) );
@@ -2012,8 +2012,8 @@ Get pixel color from source texture
- Success return Color
*/
-int ltexturesGetPixelColor( lua_State *L ) {
- Texture *texture = uluaGetTexture( L, 1 );
+int ltexturesGetPixelColor( lua_State* L ) {
+ Texture* texture = uluaGetTexture( L, 1 );
Vector2 pos = uluaGetVector2( L, 2 );
Image srcImage = LoadImageFromTexture( *texture );
@@ -2030,7 +2030,7 @@ Get pixel data size in bytes for certain format
- Success return int
*/
-int ltexturesGetPixelDataSize( lua_State *L ) {
+int ltexturesGetPixelDataSize( lua_State* L ) {
int width = luaL_checkinteger( L, 1 );
int height = luaL_checkinteger( L, 2 );
int format = luaL_checkinteger( L, 3 );